]> git.sur5r.net Git - glabels/commitdiff
Added view controls for drawing toolbar.
authorJim Evins <evins@snaught.com>
Sat, 7 Sep 2002 05:05:48 +0000 (05:05 +0000)
committerJim Evins <evins@snaught.com>
Sat, 7 Sep 2002 05:05:48 +0000 (05:05 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@96 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/glabels-ui.xml
glabels2/src/mdi.c
glabels2/src/prefs.c
glabels2/src/prefs.h

index a823bc29512806150169c9357ee2ef5735f3bece..1f517a0233449b16a75056ece3f4b6ec308f59b8 100644 (file)
 
        <cmd name="EditUnSelectAll" _label="Un-select All" _tip="Remove all selections"/>
 
-       <cmd name="ViewToolbar" _label="_Toolbar" type="toggle"
-       _tip="Change the visibility of the toolbar in the current window" state="0"/>
+       <cmd name="ViewMainToolbar" _label="_Main Toolbar" type="toggle"
+       _tip="Change the visibility of the main toolbar in the current window" state="0"/>
 
-        <cmd name="ToolbarSystem" id="ToolbarSystem" _label="_Desktop Default" type="radio" 
-         group="buttons" state = "1" _tip="Set toolbar button style according to desktop default"/>
+        <cmd name="MainToolbarSystem" id="MainToolbarSystem" _label="_Desktop Default" type="radio" 
+         group="main_buttons" state = "1" _tip="Set main toolbar button style according to desktop default"/>
 
-       <cmd name="ToolbarIcon" id="ToolbarIcon" _label="_Icon" type="radio" 
-        group="buttons" _tip="Only show icons in the toolbar"/>
+       <cmd name="MainToolbarIcon" id="MainToolbarIcon" _label="_Icon" type="radio" 
+        group="main_buttons" _tip="Only show icons in the main toolbar"/>
 
-       <cmd name="ToolbarIconText" id="ToolbarIconText" _label="Icon and _Text" type="radio" 
-        group="buttons" _tip ="Show both icons and texts in the toolbar"/>
+       <cmd name="MainToolbarIconText" id="MainToolbarIconText" _label="Icon and _Text" type="radio" 
+        group="main_buttons" _tip ="Show both icons and texts in the main toolbar"/>
+
+       <cmd name="MainToolbarTooltips" id="MainToolbarTooltips" _label="Show _Tooltips" type="toggle"
+       _tip="Show tooltips in the main toolbar" state="1"/>
+
+       <cmd name="ViewDrawingToolbar" _label="_Drawing Toolbar" type="toggle"
+       _tip="Change the visibility of the drawing toolbar in the current window" state="0"/>
+
+        <cmd name="DrawingToolbarSystem" id="DrawingToolbarSystem" _label="_Desktop Default" type="radio" 
+         group="drawing_buttons" state = "1" _tip="Set drawing toolbar button style according to desktop default"/>
+
+       <cmd name="DrawingToolbarIcon" id="DrawingToolbarIcon" _label="_Icon" type="radio" 
+        group="drawing_buttons" _tip="Only show icons in the drawing toolbar"/>
+
+       <cmd name="DrawingToolbarIconText" id="DrawingToolbarIconText" _label="Icon and _Text" type="radio" 
+        group="drawing_buttons" _tip ="Show both icons and texts in the drawing toolbar"/>
+
+       <cmd name="DrawingToolbarTooltips" id="DrawingToolbarTooltips" _label="Show _Tooltips" type="toggle"
+       _tip="Show tooltips in the drawing toolbar" state="1"/>
 
         <cmd name="SettingsPreferences" _label="Preferences" _tip="Configure the application"
          pixtype="stock" pixname="gtk-preferences"/>
 
-       <cmd name="ToolbarTooltips" id="ToolbarTooltips" _label="Show _Tooltips" type="toggle"
-       _tip="Show tooltips in the toolbar" state="1"/>
-
        <cmd name="BonoboCustomize" _label="Customize" _tip="Customize toolbars"/>
 
        <cmd name="ToolsArrow"
 
 <submenu name="View" _label="_View" hidden="0">
 
-       <menuitem name="ViewToolbar" id="ViewToolbar" verb=""/>
+       <menuitem name="ViewMainToolbar" id="ViewMainToolbar" verb=""/>
+       <menuitem name="ViewDrawingToolbar" id="ViewDrawingToolbar" verb=""/>
 
        <separator/>
 
-       <submenu name="CustomizeToolbar" _label="_Customize Toolbar">
+       <submenu name="CustomizeMainToolbar" _label="_Customize Main Toolbar">
                
-               <menuitem name="ToolbarSystem" verb=""/>
+               <menuitem name="MainToolbarSystem" verb=""/>
+               <menuitem name="MainToolbarIcon" verb=""/>
+               <menuitem name="MainToolbarIconText" verb=""/>
 
-               <menuitem name="ToolbarIcon" verb=""/>
+               <separator/>
 
-               <menuitem name="ToolbarIconText" verb=""/>
+               <menuitem name="MainToolbarTooltips" verb=""/>
 
-               <separator/>
+       </submenu>
 
-               <menuitem name="ToolbarTooltips" verb=""/>
+       <submenu name="CustomizeDrawingToolbar" _label="_Customize Drawing Toolbar">
+               
+               <menuitem name="DrawingToolbarTooltips" verb=""/>
 
        </submenu>
 
 
 </menu>
 
-<dockitem name="Toolbar" _tip="Main toolbar" config="0" 
+<dockitem name="MainToolbar" _tip="Main toolbar" config="0" 
        behavior = "exclusive" in_new_band="1">
        
        <toolitem name="FileNew" verb=""/>
 </dockitem>
 
 
-<dockitem name="ToolbarTools" _tip="Tools toolbar" config="0" 
+<dockitem name="DrawingToolbar" _tip="Drawing toolbar" config="0" 
        behavior = "exclusive" in_new_band="1" band_num="2">
        
        <toolitem name="ToolsArrow" verb=""/>
index db983d38706c1764f1d1d321c97e201bbf932f3d..fcaac8eccc81fc9147c7f9dd745862112dbf9f55 100644 (file)
@@ -86,8 +86,9 @@ static void gl_mdi_init               (glMDI  *mdi);
 static void gl_mdi_finalize            (GObject        *object);
 
 static void gl_mdi_app_created_cb      (BonoboMDI *mdi, BonoboWindow *win);
-static void gl_mdi_set_app_toolbar_style       (BonoboWindow *win);
-static void gl_mdi_set_app_statusbar_style     (BonoboWindow *win);
+static void gl_mdi_set_app_main_toolbar_style   (BonoboWindow *win);
+static void gl_mdi_set_app_drawing_toolbar_style (BonoboWindow *win);
+static void gl_mdi_set_app_statusbar_style      (BonoboWindow *win);
 
 static gint gl_mdi_add_child_cb (BonoboMDI *mdi, BonoboMDIChild *child);
 static gint gl_mdi_add_view_cb (BonoboMDI *mdi, GtkWidget *view);
@@ -263,23 +264,44 @@ gl_mdi_app_created_cb (BonoboMDI *mdi, BonoboWindow *win)
        g_return_if_fail (ui_component != NULL);
        
        /* Set the toolbar style according to prefs */
-       gl_mdi_set_app_toolbar_style (win);
+       gl_mdi_set_app_main_toolbar_style (win);
                
        /* Add listener fo the view menu */
-       bonobo_ui_component_add_listener (ui_component, "ViewToolbar", 
+       bonobo_ui_component_add_listener (ui_component, "ViewMainToolbar", 
                        (BonoboUIListenerFn)gl_mdi_view_menu_item_toggled_cb, 
                        (gpointer)win);
 
-       bonobo_ui_component_add_listener (ui_component, "ToolbarSystem", 
+       bonobo_ui_component_add_listener (ui_component, "MainToolbarSystem", 
                        (BonoboUIListenerFn)gl_mdi_view_menu_item_toggled_cb, 
                        (gpointer)win);
-       bonobo_ui_component_add_listener (ui_component, "ToolbarIcon", 
+       bonobo_ui_component_add_listener (ui_component, "MainToolbarIcon", 
                        (BonoboUIListenerFn)gl_mdi_view_menu_item_toggled_cb, 
                        (gpointer)win);
-       bonobo_ui_component_add_listener (ui_component, "ToolbarIconText", 
+       bonobo_ui_component_add_listener (ui_component, "MainToolbarIconText", 
                        (BonoboUIListenerFn)gl_mdi_view_menu_item_toggled_cb, 
                        (gpointer)win);
-       bonobo_ui_component_add_listener (ui_component, "ToolbarTooltips", 
+       bonobo_ui_component_add_listener (ui_component, "MainToolbarTooltips", 
+                       (BonoboUIListenerFn)gl_mdi_view_menu_item_toggled_cb, 
+                       (gpointer)win);
+
+       /* Set the toolbar style according to prefs */
+       gl_mdi_set_app_drawing_toolbar_style (win);
+               
+       /* Add listener fo the view menu */
+       bonobo_ui_component_add_listener (ui_component, "ViewDrawingToolbar", 
+                       (BonoboUIListenerFn)gl_mdi_view_menu_item_toggled_cb, 
+                       (gpointer)win);
+
+       bonobo_ui_component_add_listener (ui_component, "DrawingToolbarSystem", 
+                       (BonoboUIListenerFn)gl_mdi_view_menu_item_toggled_cb, 
+                       (gpointer)win);
+       bonobo_ui_component_add_listener (ui_component, "DrawingToolbarIcon", 
+                       (BonoboUIListenerFn)gl_mdi_view_menu_item_toggled_cb, 
+                       (gpointer)win);
+       bonobo_ui_component_add_listener (ui_component, "DrawingToolbarIconText", 
+                       (BonoboUIListenerFn)gl_mdi_view_menu_item_toggled_cb, 
+                       (gpointer)win);
+       bonobo_ui_component_add_listener (ui_component, "DrawingToolbarTooltips", 
                        (BonoboUIListenerFn)gl_mdi_view_menu_item_toggled_cb, 
                        (gpointer)win);
 
@@ -317,47 +339,92 @@ gl_mdi_view_menu_item_toggled_cb (
 
        s = (strcmp (state, "1") == 0);
 
-       if ((strcmp (path, "ViewToolbar") == 0) &&
-           (s != gl_prefs->toolbar_visible))
+       if ((strcmp (path, "ViewMainToolbar") == 0) &&
+           (s != gl_prefs->main_toolbar_visible))
        {
-               gl_prefs->toolbar_visible = s;
-               gl_mdi_set_app_toolbar_style (win);
+               gl_prefs->main_toolbar_visible = s;
+               gl_mdi_set_app_main_toolbar_style (win);
 
                return;
        }
 
-       if (s && (strcmp (path, "ToolbarSystem") == 0) &&
-           (gl_prefs->toolbar_buttons_style != GL_TOOLBAR_SYSTEM))
+       if (s && (strcmp (path, "MainToolbarSystem") == 0) &&
+           (gl_prefs->main_toolbar_buttons_style != GL_TOOLBAR_SYSTEM))
        {               
-               gl_prefs->toolbar_buttons_style = GL_TOOLBAR_SYSTEM;
-               gl_mdi_set_app_toolbar_style (win);
+               gl_prefs->main_toolbar_buttons_style = GL_TOOLBAR_SYSTEM;
+               gl_mdi_set_app_main_toolbar_style (win);
 
                return;
        }
 
-       if (s && (strcmp (path, "ToolbarIcon") == 0) &&
-           (gl_prefs->toolbar_buttons_style != GL_TOOLBAR_ICONS))
+       if (s && (strcmp (path, "MainToolbarIcon") == 0) &&
+           (gl_prefs->main_toolbar_buttons_style != GL_TOOLBAR_ICONS))
        {               
-               gl_prefs->toolbar_buttons_style = GL_TOOLBAR_ICONS;
-               gl_mdi_set_app_toolbar_style (win);
+               gl_prefs->main_toolbar_buttons_style = GL_TOOLBAR_ICONS;
+               gl_mdi_set_app_main_toolbar_style (win);
 
                return;
        }
 
-       if (s && (strcmp (path, "ToolbarIconText") == 0) &&
-           (gl_prefs->toolbar_buttons_style != GL_TOOLBAR_ICONS_AND_TEXT))
+       if (s && (strcmp (path, "MainToolbarIconText") == 0) &&
+           (gl_prefs->main_toolbar_buttons_style != GL_TOOLBAR_ICONS_AND_TEXT))
        {               
-               gl_prefs->toolbar_buttons_style = GL_TOOLBAR_ICONS_AND_TEXT;
-               gl_mdi_set_app_toolbar_style (win);
+               gl_prefs->main_toolbar_buttons_style = GL_TOOLBAR_ICONS_AND_TEXT;
+               gl_mdi_set_app_main_toolbar_style (win);
+
+               return;
+       }
+
+       if ((strcmp (path, "MainToolbarTooltips") == 0) &&
+           (s != gl_prefs->main_toolbar_view_tooltips))
+       {
+               gl_prefs->main_toolbar_view_tooltips = s;
+               gl_mdi_set_app_main_toolbar_style (win);
 
                return;
        }
 
-       if ((strcmp (path, "ToolbarTooltips") == 0) &&
-           (s != gl_prefs->toolbar_view_tooltips))
+       if ((strcmp (path, "ViewDrawingToolbar") == 0) &&
+           (s != gl_prefs->drawing_toolbar_visible))
        {
-               gl_prefs->toolbar_view_tooltips = s;
-               gl_mdi_set_app_toolbar_style (win);
+               gl_prefs->drawing_toolbar_visible = s;
+               gl_mdi_set_app_drawing_toolbar_style (win);
+
+               return;
+       }
+
+       if (s && (strcmp (path, "DrawingToolbarSystem") == 0) &&
+           (gl_prefs->drawing_toolbar_buttons_style != GL_TOOLBAR_SYSTEM))
+       {               
+               gl_prefs->drawing_toolbar_buttons_style = GL_TOOLBAR_SYSTEM;
+               gl_mdi_set_app_drawing_toolbar_style (win);
+
+               return;
+       }
+
+       if (s && (strcmp (path, "DrawingToolbarIcon") == 0) &&
+           (gl_prefs->drawing_toolbar_buttons_style != GL_TOOLBAR_ICONS))
+       {               
+               gl_prefs->drawing_toolbar_buttons_style = GL_TOOLBAR_ICONS;
+               gl_mdi_set_app_drawing_toolbar_style (win);
+
+               return;
+       }
+
+       if (s && (strcmp (path, "DrawingToolbarIconText") == 0) &&
+           (gl_prefs->drawing_toolbar_buttons_style != GL_TOOLBAR_ICONS_AND_TEXT))
+       {               
+               gl_prefs->drawing_toolbar_buttons_style = GL_TOOLBAR_ICONS_AND_TEXT;
+               gl_mdi_set_app_drawing_toolbar_style (win);
+
+               return;
+       }
+
+       if ((strcmp (path, "DrawingToolbarTooltips") == 0) &&
+           (s != gl_prefs->drawing_toolbar_view_tooltips))
+       {
+               gl_prefs->drawing_toolbar_view_tooltips = s;
+               gl_mdi_set_app_drawing_toolbar_style (win);
 
                return;
        }
@@ -365,10 +432,10 @@ gl_mdi_view_menu_item_toggled_cb (
 }
 
 /*---------------------------------------------------------------------------*/
-/* Set toolbar style.                                                        */
+/* Set main toolbar style.                                                   */
 /*---------------------------------------------------------------------------*/
 static void
-gl_mdi_set_app_toolbar_style (BonoboWindow *win)
+gl_mdi_set_app_main_toolbar_style (BonoboWindow *win)
 {
        BonoboUIComponent *ui_component;
        GConfClient *client;
@@ -385,46 +452,167 @@ gl_mdi_set_app_toolbar_style (BonoboWindow *win)
 
        /* Updated view menu */
        gl_ui_set_verb_state (ui_component, 
-                             "/commands/ViewToolbar",
-                             gl_prefs->toolbar_visible);
+                             "/commands/ViewMainToolbar",
+                             gl_prefs->main_toolbar_visible);
 
        gl_ui_set_verb_sensitive (ui_component, 
-                                 "/commands/ToolbarSystem",
-                                 gl_prefs->toolbar_visible);
+                                 "/commands/MainToolbarSystem",
+                                 gl_prefs->main_toolbar_visible);
        gl_ui_set_verb_sensitive (ui_component, 
-                                 "/commands/ToolbarIcon",
-                                 gl_prefs->toolbar_visible);
+                                 "/commands/MainToolbarIcon",
+                                 gl_prefs->main_toolbar_visible);
        gl_ui_set_verb_sensitive (ui_component, 
-                                 "/commands/ToolbarIconText",
-                                 gl_prefs->toolbar_visible);
+                                 "/commands/MainToolbarIconText",
+                                 gl_prefs->main_toolbar_visible);
        gl_ui_set_verb_sensitive (ui_component, 
-                                 "/commands/ToolbarTooltips",
-                                 gl_prefs->toolbar_visible);
+                                 "/commands/MainToolbarTooltips",
+                                 gl_prefs->main_toolbar_visible);
 
        gl_ui_set_verb_state (ui_component, 
-                             "/commands/ToolbarSystem",
-                             gl_prefs->toolbar_buttons_style == GL_TOOLBAR_SYSTEM);
+                             "/commands/MainToolbarSystem",
+                             gl_prefs->main_toolbar_buttons_style == GL_TOOLBAR_SYSTEM);
 
        gl_ui_set_verb_state (ui_component, 
-                             "/commands/ToolbarIcon",
-                             gl_prefs->toolbar_buttons_style == GL_TOOLBAR_ICONS);
+                             "/commands/MainToolbarIcon",
+                             gl_prefs->main_toolbar_buttons_style == GL_TOOLBAR_ICONS);
 
        gl_ui_set_verb_state (ui_component, 
-                             "/commands/ToolbarIconText",
-                             gl_prefs->toolbar_buttons_style == GL_TOOLBAR_ICONS_AND_TEXT);
+                             "/commands/MainToolbarIconText",
+                             gl_prefs->main_toolbar_buttons_style == GL_TOOLBAR_ICONS_AND_TEXT);
+
+       gl_ui_set_verb_state (ui_component, 
+                             "/commands/MainToolbarTooltips",
+                             gl_prefs->main_toolbar_view_tooltips);
+
+       
+       /* Actually update main_toolbar style */
+       bonobo_ui_component_set_prop (
+               ui_component, "/MainToolbar",
+               "tips", gl_prefs->main_toolbar_view_tooltips ? "1" : "0",
+               NULL);
+       
+       switch (gl_prefs->main_toolbar_buttons_style)
+       {
+               case GL_TOOLBAR_SYSTEM:
+                                               
+                       client = gconf_client_get_default ();
+                       if (client == NULL) 
+                               goto error;
+
+                       labels = gconf_client_get_bool (client, 
+                                       "/desktop/gnome/interface/toolbar-labels", NULL);
+
+                       g_object_unref (G_OBJECT (client));
+                       
+                       if (labels)
+                       {                       
+                               gl_debug (DEBUG_MDI, "SYSTEM: BOTH");
+                               bonobo_ui_component_set_prop (
+                                       ui_component, "/MainToolbar", "look", "both", NULL);
+                       
+                       }
+                       else
+                       {
+                               gl_debug (DEBUG_MDI, "SYSTEM: ICONS");
+                               bonobo_ui_component_set_prop (
+                                       ui_component, "/MainToolbar", "look", "icons", NULL);
+                       }
+       
+                       break;
+                       
+               case GL_TOOLBAR_ICONS:
+                       gl_debug (DEBUG_MDI, "GLABELS: ICONS");
+                       bonobo_ui_component_set_prop (
+                               ui_component, "/MainToolbar", "look", "icon", NULL);
+                       
+                       break;
+                       
+               case GL_TOOLBAR_ICONS_AND_TEXT:
+                       gl_debug (DEBUG_MDI, "GLABELS: ICONS_AND_TEXT");
+                       bonobo_ui_component_set_prop (
+                               ui_component, "/MainToolbar", "look", "both", NULL);
+                       
+                       break;
+               default:
+                       goto error;
+                       break;
+       }
+       
+       bonobo_ui_component_set_prop (
+                       ui_component, "/MainToolbar",
+                       "hidden", gl_prefs->main_toolbar_visible ? "0":"1", NULL);
+
+ error:
+       bonobo_ui_component_thaw (ui_component, NULL);
+
+       gl_debug (DEBUG_MDI, "END");
+}
+
+
+/*---------------------------------------------------------------------------*/
+/* Set drawing toolbar style.                                                   */
+/*---------------------------------------------------------------------------*/
+static void
+gl_mdi_set_app_drawing_toolbar_style (BonoboWindow *win)
+{
+       BonoboUIComponent *ui_component;
+       GConfClient *client;
+       gboolean labels;
+
+       gl_debug (DEBUG_MDI, "START");
+       
+       g_return_if_fail (BONOBO_IS_WINDOW (win));
+                       
+       ui_component = bonobo_mdi_get_ui_component_from_window (win);
+       g_return_if_fail (ui_component != NULL);
+                       
+       bonobo_ui_component_freeze (ui_component, NULL);
+
+       /* Updated view menu */
+       gl_ui_set_verb_state (ui_component, 
+                             "/commands/ViewDrawingToolbar",
+                             gl_prefs->drawing_toolbar_visible);
+
+       gl_ui_set_verb_sensitive (ui_component, 
+                                 "/commands/DrawingToolbarSystem",
+                                 gl_prefs->drawing_toolbar_visible);
+       gl_ui_set_verb_sensitive (ui_component, 
+                                 "/commands/DrawingToolbarIcon",
+                                 gl_prefs->drawing_toolbar_visible);
+       gl_ui_set_verb_sensitive (ui_component, 
+                                 "/commands/DrawingToolbarIconText",
+                                 gl_prefs->drawing_toolbar_visible);
+       gl_ui_set_verb_sensitive (ui_component, 
+                                 "/commands/DrawingToolbarTooltips",
+                                 gl_prefs->drawing_toolbar_visible);
+
+       gl_ui_set_verb_state (
+               ui_component, 
+               "/commands/DrawingToolbarSystem",
+               gl_prefs->drawing_toolbar_buttons_style == GL_TOOLBAR_SYSTEM);
+
+       gl_ui_set_verb_state (
+               ui_component, 
+               "/commands/DrawingToolbarIcon",
+               gl_prefs->drawing_toolbar_buttons_style == GL_TOOLBAR_ICONS);
+
+       gl_ui_set_verb_state (
+               ui_component, 
+               "/commands/DrawingToolbarIconText",
+               gl_prefs->drawing_toolbar_buttons_style == GL_TOOLBAR_ICONS_AND_TEXT);
 
        gl_ui_set_verb_state (ui_component, 
-                             "/commands/ToolbarTooltips",
-                             gl_prefs->toolbar_view_tooltips);
+                             "/commands/DrawingToolbarTooltips",
+                             gl_prefs->drawing_toolbar_view_tooltips);
 
        
-       /* Actually update toolbar style */
+       /* Actually update drawing_toolbar style */
        bonobo_ui_component_set_prop (
-               ui_component, "/Toolbar",
-               "tips", gl_prefs->toolbar_view_tooltips ? "1" : "0",
+               ui_component, "/DrawingToolbar",
+               "tips", gl_prefs->drawing_toolbar_view_tooltips ? "1" : "0",
                NULL);
        
-       switch (gl_prefs->toolbar_buttons_style)
+       switch (gl_prefs->drawing_toolbar_buttons_style)
        {
                case GL_TOOLBAR_SYSTEM:
                                                
@@ -441,14 +629,14 @@ gl_mdi_set_app_toolbar_style (BonoboWindow *win)
                        {                       
                                gl_debug (DEBUG_MDI, "SYSTEM: BOTH");
                                bonobo_ui_component_set_prop (
-                                       ui_component, "/Toolbar", "look", "both", NULL);
+                                       ui_component, "/DrawingToolbar", "look", "both", NULL);
                        
                        }
                        else
                        {
                                gl_debug (DEBUG_MDI, "SYSTEM: ICONS");
                                bonobo_ui_component_set_prop (
-                                       ui_component, "/Toolbar", "look", "icons", NULL);
+                                       ui_component, "/DrawingToolbar", "look", "icons", NULL);
                        }
        
                        break;
@@ -456,14 +644,14 @@ gl_mdi_set_app_toolbar_style (BonoboWindow *win)
                case GL_TOOLBAR_ICONS:
                        gl_debug (DEBUG_MDI, "GLABELS: ICONS");
                        bonobo_ui_component_set_prop (
-                               ui_component, "/Toolbar", "look", "icon", NULL);
+                               ui_component, "/DrawingToolbar", "look", "icon", NULL);
                        
                        break;
                        
                case GL_TOOLBAR_ICONS_AND_TEXT:
                        gl_debug (DEBUG_MDI, "GLABELS: ICONS_AND_TEXT");
                        bonobo_ui_component_set_prop (
-                               ui_component, "/Toolbar", "look", "both", NULL);
+                               ui_component, "/DrawingToolbar", "look", "both", NULL);
                        
                        break;
                default:
@@ -472,8 +660,8 @@ gl_mdi_set_app_toolbar_style (BonoboWindow *win)
        }
        
        bonobo_ui_component_set_prop (
-                       ui_component, "/Toolbar",
-                       "hidden", gl_prefs->toolbar_visible ? "0":"1", NULL);
+                       ui_component, "/DrawingToolbar",
+                       "hidden", gl_prefs->drawing_toolbar_visible ? "0":"1", NULL);
 
  error:
        bonobo_ui_component_thaw (ui_component, NULL);
index c30040cad55c00d62e2ac3ec90beba13fee205f9..6376d85c5ab1bef30f82ac8966e7bed5de61d444 100644 (file)
@@ -56,9 +56,13 @@ glPreferences      *gl_prefs     = NULL;
 
 #define PREF_DEFAULT_FILL_COLOR             "/default-fill-color"
 
-#define PREF_TOOLBAR_VISIBLE                "/toolbar-visible"
-#define PREF_TOOLBAR_BUTTONS_STYLE          "/toolbar-buttons-style"
-#define PREF_TOOLBAR_VIEW_TOOLTIPS          "/toolbar-view-tooltips"
+#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_BUTTONS_STYLE  "/drawing-toolbar-buttons-style"
+#define PREF_DRAWING_TOOLBAR_VIEW_TOOLTIPS  "/drawing-toolbar-view-tooltips"
 
 #define PREF_MDI_MODE                      "/mdi-mode"
 #define PREF_TABS_POSITION                 "/mdi-tabs-position"
@@ -206,20 +210,36 @@ gl_prefs_save_settings (void)
                                 NULL);
 
 
-       /* Toolbar */
+       /* Main Toolbar */
+       gconf_client_set_bool (gconf_client,
+                              BASE_KEY PREF_MAIN_TOOLBAR_VISIBLE,
+                              gl_prefs->main_toolbar_visible,
+                              NULL);
+
+       gconf_client_set_int (gconf_client,
+                             BASE_KEY PREF_MAIN_TOOLBAR_BUTTONS_STYLE,
+                             gl_prefs->main_toolbar_buttons_style,
+                             NULL);
+
+       gconf_client_set_bool (gconf_client,
+                              BASE_KEY PREF_MAIN_TOOLBAR_VIEW_TOOLTIPS,
+                              gl_prefs->main_toolbar_view_tooltips,
+                              NULL);
+
+       /* Drawing Toolbar */
        gconf_client_set_bool (gconf_client,
-                              BASE_KEY PREF_TOOLBAR_VISIBLE,
-                              gl_prefs->toolbar_visible,
+                              BASE_KEY PREF_DRAWING_TOOLBAR_VISIBLE,
+                              gl_prefs->drawing_toolbar_visible,
                               NULL);
 
        gconf_client_set_int (gconf_client,
-                             BASE_KEY PREF_TOOLBAR_BUTTONS_STYLE,
-                             gl_prefs->toolbar_buttons_style,
+                             BASE_KEY PREF_DRAWING_TOOLBAR_BUTTONS_STYLE,
+                             gl_prefs->drawing_toolbar_buttons_style,
                              NULL);
 
        gconf_client_set_bool (gconf_client,
-                              BASE_KEY PREF_TOOLBAR_VIEW_TOOLTIPS,
-                              gl_prefs->toolbar_view_tooltips,
+                              BASE_KEY PREF_DRAWING_TOOLBAR_VIEW_TOOLTIPS,
+                              gl_prefs->drawing_toolbar_view_tooltips,
                               NULL);
 
 
@@ -332,20 +352,36 @@ gl_prefs_load_settings (void)
                         DEFAULT_FILL_COLOR);
 
 
-       /* User Inferface/Toolbar */
-       gl_prefs->toolbar_visible =
+       /* User Inferface/Main Toolbar */
+       gl_prefs->main_toolbar_visible =
+               get_bool (gconf_client,
+                         BASE_KEY PREF_MAIN_TOOLBAR_VISIBLE,
+                         TRUE);
+
+       gl_prefs->main_toolbar_buttons_style =
+               get_int (gconf_client,
+                        BASE_KEY PREF_MAIN_TOOLBAR_BUTTONS_STYLE,
+                        GL_TOOLBAR_SYSTEM);
+
+       gl_prefs->main_toolbar_view_tooltips =
+               get_bool (gconf_client,
+                         BASE_KEY PREF_MAIN_TOOLBAR_VIEW_TOOLTIPS,
+                         TRUE);
+
+       /* User Inferface/Drawing Toolbar */
+       gl_prefs->drawing_toolbar_visible =
                get_bool (gconf_client,
-                         BASE_KEY PREF_TOOLBAR_VISIBLE,
+                         BASE_KEY PREF_DRAWING_TOOLBAR_VISIBLE,
                          TRUE);
 
-       gl_prefs->toolbar_buttons_style =
+       gl_prefs->drawing_toolbar_buttons_style =
                get_int (gconf_client,
-                        BASE_KEY PREF_TOOLBAR_BUTTONS_STYLE,
+                        BASE_KEY PREF_DRAWING_TOOLBAR_BUTTONS_STYLE,
                         GL_TOOLBAR_SYSTEM);
 
-       gl_prefs->toolbar_view_tooltips =
+       gl_prefs->drawing_toolbar_view_tooltips =
                get_bool (gconf_client,
-                         BASE_KEY PREF_TOOLBAR_VIEW_TOOLTIPS,
+                         BASE_KEY PREF_DRAWING_TOOLBAR_VIEW_TOOLTIPS,
                          TRUE);
 
 
index 40d6ae24a0ce648156ff521ae2ff9b14f8230264..6a0967be0b8db77924b73735983b614bdf060150 100644 (file)
@@ -61,10 +61,15 @@ struct _glPreferences
        /* Fill properties */
        guint            default_fill_color;
 
-       /* User Interface/Toolbar */
-       gboolean                toolbar_visible;
-       glToolbarSetting        toolbar_buttons_style; 
-       gboolean                toolbar_view_tooltips;
+       /* 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;
+       glToolbarSetting        drawing_toolbar_buttons_style; 
+       gboolean                drawing_toolbar_view_tooltips;
 
        /* User Interface/MDI Mode */
        gint            mdi_mode;