From: Jim Evins Date: Sun, 22 Feb 2009 01:24:14 +0000 (+0000) Subject: 2009-02-21 JimEvins X-Git-Tag: glabels-2_3_0~231 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4e719ff243581797720031f50cfa33c835552931;p=glabels 2009-02-21 JimEvins * src/prefs-model.c: (gl_prefs_model_save_settings), (gl_prefs_model_load_settings): * src/prefs-model.h: * src/ui-commands.c: * src/ui-property-bar.c: * src/ui.c: (view_ui_item_toggled_cb), (set_app_main_toolbar_style), (set_app_drawing_toolbar_style): Removed tooltip toggling capability, which wasn't working anyway. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@826 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index 3c18ab99..128cd6b2 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,15 @@ +2009-02-21 JimEvins + + * src/prefs-model.c: (gl_prefs_model_save_settings), + (gl_prefs_model_load_settings): + * src/prefs-model.h: + * src/ui-commands.c: + * src/ui-property-bar.c: + * src/ui.c: (view_ui_item_toggled_cb), + (set_app_main_toolbar_style), (set_app_drawing_toolbar_style): + Removed tooltip toggling capability, which wasn't working + anyway. + 2009-02-21 JimEvins * README: diff --git a/glabels2/src/prefs-model.c b/glabels2/src/prefs-model.c index 72b61792..c106d30a 100644 --- a/glabels2/src/prefs-model.c +++ b/glabels2/src/prefs-model.c @@ -59,13 +59,10 @@ #define PREF_MAIN_TOOLBAR_VISIBLE "/main-toolbar-visible" #define PREF_MAIN_TOOLBAR_BUTTONS_STYLE "/main-toolbar-buttons-style" -#define PREF_MAIN_TOOLBAR_VIEW_TOOLTIPS "/main-toolbar-view-tooltips" #define PREF_DRAWING_TOOLBAR_VISIBLE "/drawing-toolbar-visible" -#define PREF_DRAWING_TOOLBAR_VIEW_TOOLTIPS "/drawing-toolbar-view-tooltips" #define PREF_PROPERTY_TOOLBAR_VISIBLE "/property-toolbar-visible" -#define PREF_PROPERTY_TOOLBAR_VIEW_TOOLTIPS "/property-toolbar-view-tooltips" #define PREF_GRID_VISIBLE "/grid-visible" #define PREF_MARKUP_VISIBLE "/markup-visible" @@ -318,33 +315,18 @@ gl_prefs_model_save_settings (glPrefsModel *prefs_model) prefs_model->main_toolbar_buttons_style, NULL); - gconf_client_set_bool (prefs_model->gconf_client, - BASE_KEY PREF_MAIN_TOOLBAR_VIEW_TOOLTIPS, - prefs_model->main_toolbar_view_tooltips, - NULL); - /* Drawing Toolbar */ gconf_client_set_bool (prefs_model->gconf_client, BASE_KEY PREF_DRAWING_TOOLBAR_VISIBLE, prefs_model->drawing_toolbar_visible, NULL); - gconf_client_set_bool (prefs_model->gconf_client, - BASE_KEY PREF_DRAWING_TOOLBAR_VIEW_TOOLTIPS, - prefs_model->drawing_toolbar_view_tooltips, - NULL); - /* Property Toolbar */ gconf_client_set_bool (prefs_model->gconf_client, BASE_KEY PREF_PROPERTY_TOOLBAR_VISIBLE, prefs_model->property_toolbar_visible, NULL); - gconf_client_set_bool (prefs_model->gconf_client, - BASE_KEY PREF_PROPERTY_TOOLBAR_VIEW_TOOLTIPS, - prefs_model->property_toolbar_view_tooltips, - NULL); - /* View properties */ gconf_client_set_bool (prefs_model->gconf_client, BASE_KEY PREF_GRID_VISIBLE, @@ -477,34 +459,18 @@ gl_prefs_model_load_settings (glPrefsModel *prefs_model) BASE_KEY PREF_MAIN_TOOLBAR_BUTTONS_STYLE, GL_TOOLBAR_SYSTEM); - prefs_model->main_toolbar_view_tooltips = - get_bool (prefs_model->gconf_client, - BASE_KEY PREF_MAIN_TOOLBAR_VIEW_TOOLTIPS, - TRUE); - /* User Inferface/Drawing Toolbar */ prefs_model->drawing_toolbar_visible = get_bool (prefs_model->gconf_client, BASE_KEY PREF_DRAWING_TOOLBAR_VISIBLE, TRUE); - prefs_model->drawing_toolbar_view_tooltips = - get_bool (prefs_model->gconf_client, - BASE_KEY PREF_DRAWING_TOOLBAR_VIEW_TOOLTIPS, - TRUE); - /* User Inferface/Property Toolbar */ prefs_model->property_toolbar_visible = get_bool (prefs_model->gconf_client, BASE_KEY PREF_PROPERTY_TOOLBAR_VISIBLE, TRUE); - prefs_model->property_toolbar_view_tooltips = - get_bool (prefs_model->gconf_client, - BASE_KEY PREF_PROPERTY_TOOLBAR_VIEW_TOOLTIPS, - TRUE); - - /* View properties */ prefs_model->grid_visible = get_bool (prefs_model->gconf_client, diff --git a/glabels2/src/prefs-model.h b/glabels2/src/prefs-model.h index b2cc1cbd..23937fd9 100644 --- a/glabels2/src/prefs-model.h +++ b/glabels2/src/prefs-model.h @@ -81,15 +81,12 @@ struct _glPrefsModel { /* User Interface/Main Toolbar */ gboolean main_toolbar_visible; glToolbarSetting main_toolbar_buttons_style; - gboolean main_toolbar_view_tooltips; /* User Interface/Drawing Toolbar */ gboolean drawing_toolbar_visible; - gboolean drawing_toolbar_view_tooltips; /* User Interface/Property Toolbar */ gboolean property_toolbar_visible; - gboolean property_toolbar_view_tooltips; /* View properties */ gboolean grid_visible; diff --git a/glabels2/src/ui-commands.c b/glabels2/src/ui-commands.c index 2be9a248..c4cc1d19 100644 --- a/glabels2/src/ui-commands.c +++ b/glabels2/src/ui-commands.c @@ -412,28 +412,6 @@ gl_ui_cmd_view_property_bar_toggle (GtkToggleAction *action, gl_debug (DEBUG_COMMANDS, "END"); } -/*****************************************************************************/ -/** View/Property-bar-tooltips-toggle command. */ -/*****************************************************************************/ -void -gl_ui_cmd_view_property_bar_tips_toggle (GtkToggleAction *action, - glWindow *window) -{ - gboolean state; - - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_TOGGLE_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - state = gtk_toggle_action_get_active (action); - - gl_prefs->property_toolbar_view_tooltips = state; - gtk_widget_set_has_tooltip (GTK_WIDGET (window->property_bar), state); - gl_prefs_model_save_settings (gl_prefs); - - gl_debug (DEBUG_COMMANDS, "END"); -} /*****************************************************************************/ /** View/Grid-toggle command. */ diff --git a/glabels2/src/ui-property-bar.c b/glabels2/src/ui-property-bar.c index 4e60561a..79c4190d 100644 --- a/glabels2/src/ui-property-bar.c +++ b/glabels2/src/ui-property-bar.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include "util.h" diff --git a/glabels2/src/ui.c b/glabels2/src/ui.c index f8cbd128..12dc963a 100644 --- a/glabels2/src/ui.c +++ b/glabels2/src/ui.c @@ -439,14 +439,6 @@ static GtkToggleActionEntry toggle_entries[] = { G_CALLBACK (gl_ui_cmd_view_property_bar_toggle), TRUE }, - { "ViewPropertyToolBarToolTips", - NULL, - N_("Show tooltips"), - NULL, - N_("Show tooltips for property toolbar"), - G_CALLBACK (gl_ui_cmd_view_property_bar_tips_toggle), - TRUE }, - { "ViewGrid", NULL, N_("Grid"), @@ -484,22 +476,6 @@ static GtkToggleActionEntry ui_toggle_entries[] = { G_CALLBACK (view_ui_item_toggled_cb), TRUE }, - { "ViewMainToolBarToolTips", - NULL, - N_("Show tooltips"), - NULL, - N_("Show tooltips for main toolbar"), - G_CALLBACK (view_ui_item_toggled_cb), - TRUE }, - - { "ViewDrawingToolBarToolTips", - NULL, - N_("Show tooltips"), - NULL, - N_("Show tooltips for drawing toolbar"), - G_CALLBACK (view_ui_item_toggled_cb), - TRUE }, - }; static guint n_ui_toggle_entries = G_N_ELEMENTS (ui_toggle_entries); @@ -539,16 +515,6 @@ static const gchar *ui_info = " " " " " " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " " " " " " " @@ -982,13 +948,6 @@ view_ui_item_toggled_cb (GtkToggleAction *action, gl_prefs_model_save_settings (gl_prefs); } - if (strcmp (name, "ViewMainToolBarToolTips") == 0) - { - gl_prefs->main_toolbar_view_tooltips = state; - set_app_main_toolbar_style (ui); - gl_prefs_model_save_settings (gl_prefs); - } - if (strcmp (name, "ViewDrawingToolBar") == 0) { gl_prefs->drawing_toolbar_visible = state; @@ -996,13 +955,6 @@ view_ui_item_toggled_cb (GtkToggleAction *action, gl_prefs_model_save_settings (gl_prefs); } - if (strcmp (name, "ViewDrawingToolBarToolTips") == 0) - { - gl_prefs->drawing_toolbar_view_tooltips = state; - set_app_drawing_toolbar_style (ui); - gl_prefs_model_save_settings (gl_prefs); - } - gl_debug (DEBUG_UI, ""); } @@ -1022,18 +974,8 @@ set_app_main_toolbar_style (GtkUIManager *ui) gl_ui_util_set_verb_state (ui, "/ui/ViewMenu/ViewMainToolBar", gl_prefs->main_toolbar_visible); - gl_ui_util_set_verb_sensitive (ui, "/ui/ViewMenu/ViewMainToolBarToolTips", - gl_prefs->main_toolbar_visible); - - gl_ui_util_set_verb_state (ui, "/ui/ViewMenu/ViewMainToolBarToolTips", - gl_prefs->main_toolbar_view_tooltips); - - toolbar = gtk_ui_manager_get_widget (ui, "/MainToolBar"); - gtk_toolbar_set_tooltips (GTK_TOOLBAR (toolbar), - gl_prefs->main_toolbar_view_tooltips); - if (gl_prefs->main_toolbar_visible) { gtk_widget_show_all (toolbar); } else { @@ -1060,18 +1002,8 @@ set_app_drawing_toolbar_style (GtkUIManager *ui) gl_ui_util_set_verb_state (ui, "/ui/MenuBar/ViewMenu/ViewDrawingToolBar", gl_prefs->drawing_toolbar_visible); - gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/ViewMenu/ViewDrawingToolBarToolTips", - gl_prefs->drawing_toolbar_visible); - - gl_ui_util_set_verb_state (ui, "/ui/MenuBar/ViewMenuDrawingToolBarToolTips", - gl_prefs->drawing_toolbar_view_tooltips); - - toolbar = gtk_ui_manager_get_widget (ui, "/DrawingToolBar"); - gtk_toolbar_set_tooltips (GTK_TOOLBAR (toolbar), - gl_prefs->drawing_toolbar_view_tooltips); - gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS); if (gl_prefs->drawing_toolbar_visible) {