aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/folder-browser-factory.c8
-rw-r--r--mail/mail-view.c13
3 files changed, 23 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 6afe0bc924..9de8de366a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-09 Cody Russell <bratsche@gnome.org>
+
+ * folder-browser-factory.c, mail-view.c: Make the toolbars
+ honor the user's gnomecc settings for detachable toolbars.
+
2000-08-09 Jeffrey Stedfast <fejj@helixcode.com>
* mail-ops.c (composer_send_cb): Get the from address set in the
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index d1b3d818e4..ae170867d1 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -48,6 +48,7 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
{
Bonobo_UIHandler remote_uih;
BonoboControl *toolbar_control;
+ GnomeDockItemBehavior behavior;
GtkWidget *toolbar, *toolbar_frame, *folder_browser;
char *toolbar_name = g_strdup_printf ("/Toolbar%d", fb->serial);
@@ -140,6 +141,11 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
gtk_widget_show_all (toolbar);
+ behavior = GNOME_DOCK_ITEM_BEH_EXCLUSIVE |
+ GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL;
+ if (!gnome_preferences_get_toolbar_detachable ())
+ behavior |= GNOME_DOCK_ITEM_BEH_LOCKED;
+
toolbar_frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (toolbar_frame), GTK_SHADOW_OUT);
gtk_container_add (GTK_CONTAINER (toolbar_frame), toolbar);
@@ -150,7 +156,7 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
toolbar_control = bonobo_control_new (toolbar_frame);
bonobo_ui_handler_dock_add (uih, toolbar_name,
bonobo_object_corba_objref (BONOBO_OBJECT (toolbar_control)),
- GNOME_DOCK_ITEM_BEH_EXCLUSIVE | GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL,
+ behavior,
GNOME_DOCK_TOP,
1, 1, 0);
g_free (toolbar_name);
diff --git a/mail/mail-view.c b/mail/mail-view.c
index 266df872cb..a98cc4d5ca 100644
--- a/mail/mail-view.c
+++ b/mail/mail-view.c
@@ -89,6 +89,7 @@ mail_view_create (FolderBrowser *folder_browser)
GtkWidget *toolbar;
GtkWidget *mail_display;
char *subject;
+ GnomeDockItemBehavior behavior;
msg = folder_browser->mail_display->current_message;
subject = (char *) camel_mime_message_get_subject (msg);
@@ -102,8 +103,16 @@ mail_view_create (FolderBrowser *folder_browser)
gnome_app_fill_toolbar_with_data (GTK_TOOLBAR (toolbar),
mail_view_toolbar,
NULL, folder_browser);
-
- gnome_app_set_toolbar (GNOME_APP (window), GTK_TOOLBAR (toolbar));
+
+ behavior = GNOME_DOCK_ITEM_BEH_NORMAL;
+ if (!gnome_preferences_get_toolbar_detachable ())
+ behavior |= GNOME_DOCK_ITEM_BEH_LOCKED;
+
+ gnome_app_add_toolbar (GNOME_APP (window),
+ GTK_TOOLBAR (toolbar),
+ GNOME_APP_TOOLBAR_NAME,
+ behavior,
+ GNOME_DOCK_TOP, 1, 0, 0);
gnome_app_create_menus (GNOME_APP (window), mail_view_menubar);