aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCody Russell <bratsche@src.gnome.org>2000-08-10 07:59:37 +0800
committerCody Russell <bratsche@src.gnome.org>2000-08-10 07:59:37 +0800
commit57b053b87516dd32f785fcb0cb35e15adc661239 (patch)
treec5ba77eb44e5824915a5f483d9b10486a4ae2b45
parentfc65f736557ec270e57a27d6c813ff3f1d2356ea (diff)
downloadgsoc2013-evolution-57b053b87516dd32f785fcb0cb35e15adc661239.tar
gsoc2013-evolution-57b053b87516dd32f785fcb0cb35e15adc661239.tar.gz
gsoc2013-evolution-57b053b87516dd32f785fcb0cb35e15adc661239.tar.bz2
gsoc2013-evolution-57b053b87516dd32f785fcb0cb35e15adc661239.tar.lz
gsoc2013-evolution-57b053b87516dd32f785fcb0cb35e15adc661239.tar.xz
gsoc2013-evolution-57b053b87516dd32f785fcb0cb35e15adc661239.tar.zst
gsoc2013-evolution-57b053b87516dd32f785fcb0cb35e15adc661239.zip
Made the toolbars conform to the user's gnomecc settings for detachable
toolbars. svn path=/trunk/; revision=4677
-rw-r--r--addressbook/ChangeLog5
-rw-r--r--addressbook/gui/component/addressbook.c7
-rw-r--r--calendar/ChangeLog4
-rw-r--r--calendar/gui/calendar-commands.c7
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/folder-browser-factory.c8
-rw-r--r--mail/mail-view.c13
7 files changed, 44 insertions, 5 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index ee3199562a..2f83d27c87 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-09 Cody Russell <bratsche@gnome.org>
+
+ * gui/component/addressbook.c: Make the toolbar honor the user's
+ gnomecc settings for detachable toolbars.
+
2000-08-09 Nat Friedman <nat@helixcode.com>
* ename/e-name-western-tables.h: Added some military prefixes.
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index ffc40a3424..2e484ee1ff 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -481,6 +481,7 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
Bonobo_UIHandler remote_uih;
GtkWidget *toolbar, *toolbar_frame;
BonoboControl *toolbar_control;
+ GnomeDockItemBehavior behavior;
GtkWidget *hbox = gtk_hbox_new (FALSE, 0);
GtkWidget *quick_search_widget;
@@ -550,11 +551,15 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
gtk_widget_show_all (toolbar_frame);
+ behavior = GNOME_DOCK_ITEM_BEH_EXCLUSIVE;
+ if (!gnome_preferences_get_toolbar_detachable ())
+ behavior |= GNOME_DOCK_ITEM_BEH_LOCKED;
+
toolbar_control = bonobo_control_new (toolbar_frame);
bonobo_ui_handler_dock_add (
uih, "/Toolbar",
bonobo_object_corba_objref (BONOBO_OBJECT (toolbar_control)),
- GNOME_DOCK_ITEM_BEH_EXCLUSIVE,
+ behavior,
GNOME_DOCK_TOP,
1, 1, 0);
}
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 445d11e473..51cb7a39ab 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,7 @@
+2000-08-09 Cody Russell <bratsche@gnome.org>
+ * gui/calendar-commands.c: Make the toolbar honor the user's
+ gnomecc settings for detachable toolbars.
+
2000-08-09 Federico Mena Quintero <federico@helixcode.com>
* gui/alarm.c (pop_alarm): Oops, subtract the new alarm's trigger
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 4f06fd6239..feb3cd9590 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -650,9 +650,14 @@ calendar_control_activate (BonoboControl *control,
gtk_widget_show_all (toolbar_frame);
+ behavior = GNOME_DOCK_ITEM_BEH_EXCLUSIVE |
+ GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL;
+ if (!gnome_preferences_get_toolbar_detachable ())
+ behavior |= GNOME_DOCK_ITEM_BEH_LOCKED;
+
bonobo_ui_handler_dock_add (uih, "/Toolbar",
bonobo_object_corba_objref (BONOBO_OBJECT (bonobo_control_new (toolbar_frame))),
- GNOME_DOCK_ITEM_BEH_EXCLUSIVE | GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL,
+ behavior,
GNOME_DOCK_TOP,
1, 1, 0);
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);