preferences: remove option for toolbar tooltips, always enable them
parent
b91a8c813c
commit
67ef283dc8
23
src/pref.c
23
src/pref.c
|
@ -99,7 +99,6 @@ int default_auto_favorites;
|
|||
int default_auto_maps;
|
||||
int skip_startup_mapscan;
|
||||
int default_toolbar_style;
|
||||
int default_toolbar_tips;
|
||||
int default_refresh_sorts;
|
||||
int default_refresh_on_update;
|
||||
int default_resolve_on_update;
|
||||
|
@ -173,7 +172,6 @@ static GtkWidget *auto_maps_check_button;
|
|||
static GtkWidget *show_hostnames_check_button;
|
||||
static GtkWidget *show_defport_check_button;
|
||||
static GtkWidget *toolbar_style_radio_buttons[3];
|
||||
static GtkWidget *toolbar_tips_check_button;
|
||||
static GtkWidget *countbots_check_button;
|
||||
static GtkWidget *refresh_sorts_check_button;
|
||||
static GtkWidget *refresh_on_update_check_button;
|
||||
|
@ -1207,11 +1205,6 @@ static void get_new_defaults (void) {
|
|||
}
|
||||
}
|
||||
|
||||
i = GTK_TOGGLE_BUTTON (toolbar_tips_check_button)->active;
|
||||
if (i != default_toolbar_tips) {
|
||||
config_set_bool ("toolbar tips", default_toolbar_tips = i);
|
||||
}
|
||||
|
||||
i = GTK_TOGGLE_BUTTON (countbots_check_button)->active;
|
||||
if (i != serverlist_countbots) {
|
||||
config_set_bool ("count bots", serverlist_countbots = i);
|
||||
|
@ -1447,14 +1440,6 @@ static void ok_callback (GtkWidget *widget, GtkWidget* window) {
|
|||
// Refresh list of sources on screen in case the 'Show only configured games'
|
||||
// setting has changes, or a game command line has been added or removed.
|
||||
refresh_source_list();
|
||||
|
||||
// Enable / disable tooltips after config change
|
||||
if (default_toolbar_tips) {
|
||||
gtk_tooltips_enable(tooltips);
|
||||
}
|
||||
else {
|
||||
gtk_tooltips_disable(tooltips);
|
||||
}
|
||||
}
|
||||
|
||||
static void update_q1_skin (void) {
|
||||
|
@ -3830,13 +3815,6 @@ static GtkWidget *appearance_options_page (void) {
|
|||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toolbar_style_radio_buttons[default_toolbar_style]), TRUE);
|
||||
|
||||
/* Toolbar Tips */
|
||||
|
||||
toolbar_tips_check_button = gtk_check_button_new_with_label (_("Tooltips"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toolbar_tips_check_button), default_toolbar_tips);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), toolbar_tips_check_button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (toolbar_tips_check_button);
|
||||
|
||||
gtk_widget_show (hbox);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
|
@ -4777,7 +4755,6 @@ int prefs_load (void) {
|
|||
show_default_port = config_get_bool("show default port=true");
|
||||
serverlist_countbots = config_get_bool("count bots=true");
|
||||
default_toolbar_style = config_get_int("toolbar style=2");
|
||||
default_toolbar_tips = config_get_bool("toolbar tips=true");
|
||||
default_refresh_sorts = config_get_bool("sort on refresh=true");
|
||||
default_refresh_on_update = config_get_bool("refresh on update=true");
|
||||
default_resolve_on_update = config_get_bool("resolve on update=false");
|
||||
|
|
|
@ -90,7 +90,6 @@ extern int default_save_plrinfo;
|
|||
extern int default_auto_favorites;
|
||||
extern int default_always_resolve;
|
||||
extern int default_toolbar_style;
|
||||
extern int default_toolbar_tips;
|
||||
extern int default_refresh_sorts;
|
||||
extern int default_refresh_on_update;
|
||||
extern int default_resolve_on_update;
|
||||
|
|
1
src/rc.c
1
src/rc.c
|
@ -82,7 +82,6 @@ static struct keyword keywords[] = {
|
|||
{ "autofavorites", KEYWORD_BOOL, "/" CONFIG_FILE "/General/refresh favorites" },
|
||||
|
||||
{ "tb_style", KEYWORD_INT, "/" CONFIG_FILE "/Appearance/toolbar style" },
|
||||
{ "tb_tips", KEYWORD_BOOL, "/" CONFIG_FILE "/Appearance/toolbar tips" },
|
||||
|
||||
{ "sort_on_refresh", KEYWORD_BOOL, "/" CONFIG_FILE "/Appearance/sort on refresh" },
|
||||
{ "ref_on_update", KEYWORD_BOOL, "/" CONFIG_FILE "/Appearance/refresh on update" },
|
||||
|
|
|
@ -589,15 +589,14 @@ int calculate_clist_row_height (GtkWidget *clist, GdkPixmap *pixmap) {
|
|||
}
|
||||
#endif
|
||||
|
||||
void set_toolbar_appearance (GtkToolbar *toolbar, int style, int tips) {
|
||||
void set_toolbar_appearance (GtkToolbar *toolbar, int style) {
|
||||
switch (style) {
|
||||
case 0: gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_ICONS); break;
|
||||
case 1: gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_TEXT); break;
|
||||
case 2: gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_BOTH); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
gtk_toolbar_set_tooltips (toolbar, tips);
|
||||
gtk_toolbar_set_tooltips(toolbar, TRUE);
|
||||
}
|
||||
|
||||
/******************************* Progress Bar *****************************/
|
||||
|
|
|
@ -101,7 +101,7 @@ extern void source_ctree_select_source (struct master *m);
|
|||
|
||||
extern int calculate_clist_row_height (GtkWidget *clist, GdkPixmap *pixmap);
|
||||
|
||||
extern void set_toolbar_appearance (GtkToolbar *toolbar, int style, int tips);
|
||||
extern void set_toolbar_appearance (GtkToolbar *toolbar, int style);
|
||||
|
||||
extern GtkWidget *create_progress_bar (void);
|
||||
extern void progress_bar_reset (GtkWidget *pbar);
|
||||
|
|
11
src/xqf.c
11
src/xqf.c
|
@ -379,7 +379,7 @@ void server_filter_select_callback (GtkWidget *widget, int number) {
|
|||
|
||||
void start_preferences_dialog (GtkWidget *widget, int page_num) {
|
||||
preferences_dialog (page_num);
|
||||
set_toolbar_appearance (GTK_TOOLBAR (gtk_builder_get_object (builder, "main-toolbar")), default_toolbar_style, default_toolbar_tips);
|
||||
set_toolbar_appearance (GTK_TOOLBAR (gtk_builder_get_object (builder, "main-toolbar")), default_toolbar_style);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2154,7 +2154,7 @@ void populate_main_toolbar (void) {
|
|||
gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (filter_buttons[i]), ((cur_filter & mask) != 0)? TRUE : FALSE);
|
||||
}
|
||||
|
||||
set_toolbar_appearance (GTK_TOOLBAR (gtk_builder_get_object (builder, "main-toolbar")), default_toolbar_style, default_toolbar_tips);
|
||||
set_toolbar_appearance (GTK_TOOLBAR (gtk_builder_get_object (builder, "main-toolbar")), default_toolbar_style);
|
||||
}
|
||||
|
||||
// build server filter menu for toolbar
|
||||
|
@ -2406,12 +2406,7 @@ void populate_main_window (void) {
|
|||
|
||||
// Set tooltips - also in prefs_load
|
||||
tooltips = gtk_tooltips_new ();
|
||||
if (default_toolbar_tips) {
|
||||
gtk_tooltips_enable (tooltips);
|
||||
}
|
||||
else {
|
||||
gtk_tooltips_disable (tooltips);
|
||||
}
|
||||
gtk_tooltips_enable (tooltips);
|
||||
|
||||
gtk_widget_grab_focus (entry);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue