diff --git a/include/colors.h b/include/colors.h index 14a24af17..195f01a79 100755 --- a/include/colors.h +++ b/include/colors.h @@ -29,6 +29,7 @@ extern COLOR DISABLED_BACK_COLOR; extern COLOR FOCUS_COLOR; extern COLOR FOCUS_BACK_COLOR; extern COLOR REQUIRED_BACK_COLOR; +extern COLOR EASY_RIDER_COLOR; extern bool CAMPI_SCAVATI; extern bool NATIVE_CONTROLS; diff --git a/include/controls.cpp b/include/controls.cpp index 44c5be5b1..23726ca8e 100755 --- a/include/controls.cpp +++ b/include/controls.cpp @@ -33,6 +33,7 @@ COLOR DISABLED_BACK_COLOR = MASK_BACK_COLOR; COLOR FOCUS_COLOR = NORMAL_COLOR; COLOR FOCUS_BACK_COLOR = COLOR_YELLOW; COLOR REQUIRED_BACK_COLOR = XVT_MAKE_COLOR(255,255,156); +COLOR EASY_RIDER_COLOR = XVT_MAKE_COLOR(228,225,221); bool CAMPI_SCAVATI = true; bool AUTOSELECT = false; @@ -41,7 +42,7 @@ bool AUTOZOOM = false; bool AUTOEND = false; bool NATIVE_CONTROLS = false; int TOOL_SIZE = 24; -bool TOOL_TEXT = true; +bool TOOL_TEXT = false; bool EASY_RIDER = true; HIDDEN bool _button_blocked = false; @@ -318,6 +319,7 @@ void customize_colors() AUTOZOOM = colors.get_bool("AutoZoom", NULL, -1, AUTOZOOM); ADVANCED_GRAPHICS = colors.get_bool("AdvancedGraphics", NULL, -1, ADVANCED_GRAPHICS); EASY_RIDER = colors.get_bool("EasyRider", NULL, -1, EASY_RIDER); + EASY_RIDER_COLOR = blend_colors(NORMAL_BACK_COLOR, DISABLED_BACK_COLOR, 0.5); if (ADVANCED_GRAPHICS) { const long dt = xvt_vobj_get_attr(NULL_WIN, ATTR_DISPLAY_TYPE); diff --git a/include/sheet.cpp b/include/sheet.cpp index 2e312d488..8feec14d9 100755 --- a/include/sheet.cpp +++ b/include/sheet.cpp @@ -1085,7 +1085,7 @@ bool TSheet::get_cell_colors(int row, int col, COLOR& fore, COLOR& back) const { fore = back = 0; // Default colors if (EASY_RIDER && (row & 1)) - back = REQUIRED_BACK_COLOR; + back = EASY_RIDER_COLOR; return false; // Not assigned } diff --git a/include/utility.cpp b/include/utility.cpp index fae1713ea..4743860a6 100755 --- a/include/utility.cpp +++ b/include/utility.cpp @@ -515,7 +515,7 @@ const char* unesc( } -HIDDEN const char * const encryption_key = "QSECOFR-"; +HIDDEN const char* const encryption_key = "QSECOFR-"; // @doc EXTERNAL @@ -573,11 +573,10 @@ istream & eatwhite(istream & i) return i; } -const TString & get_hostname() +const TString& get_hostname() { - TString & tmp = get_tmp_string(256); + TString& tmp = get_tmp_string(256); char* buff = tmp.get_buffer(); - if (xvt_sys_get_host_name(buff, tmp.size())) return tmp; return EMPTY_STRING; @@ -592,11 +591,11 @@ long daytime() bool is_power_station() { const char* ranger[] = { "ANTARES", "ARCHIMEDE", "BATMOBILE", "KIRK", - "PICARD", "SPOCK", "SULU", "UHURA", NULL }; - char hostname[80]; xvt_sys_get_host_name(hostname, sizeof(hostname)); + "MOBILE", "PICARD", "SPOCK", "SULU", "UHURA", NULL }; + const TString& hostname = get_hostname(); for (int i = 0; ranger[i]; i++) { - if (xvt_str_compare_ignoring_case(hostname, ranger[i]) == 0) + if (hostname.compare(ranger[i], true) == 0) return true; } return false;