+2009-02-21 JimEvins <evins@snaught.com>
+
+ * 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 <evins@snaught.com>
* README:
#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"
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,
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,
/* 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;
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. */
#include <gtk/gtkspinbutton.h>
#include <gtk/gtktoolbar.h>
#include <gtk/gtktoggletoolbutton.h>
-#include <gtk/gtktooltips.h>
#include <string.h>
#include "util.h"
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"),
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);
" <menuitem action='ViewDrawingToolBar' />"
" <menuitem action='ViewPropertyToolBar' />"
" <separator />"
-" <menu action='ViewMainToolBarMenu'>"
-" <menuitem action='ViewMainToolBarToolTips' />"
-" </menu>"
-" <menu action='ViewDrawingToolBarMenu'>"
-" <menuitem action='ViewDrawingToolBarToolTips' />"
-" </menu>"
-" <menu action='ViewPropertyToolBarMenu'>"
-" <menuitem action='ViewPropertyToolBarToolTips' />"
-" </menu>"
-" <separator />"
" <menuitem action='ViewGrid' />"
" <menuitem action='ViewMarkup' />"
" <separator />"
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;
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, "");
}
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 {
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) {