diff options
author | Rodney Dawes <dobey@ximian.com> | 2003-01-24 06:44:34 +0800 |
---|---|---|
committer | Rodney Dawes <dobey@src.gnome.org> | 2003-01-24 06:44:34 +0800 |
commit | 703e63c88886dbe863d4f67561fef97b850bf6ac (patch) | |
tree | c94fde94d1524ad80fae7dcaa050091fe8c30717 /mail | |
parent | cf7ef09cd0d807a99e8fbd713890507fc5134ce5 (diff) | |
download | gsoc2013-evolution-703e63c88886dbe863d4f67561fef97b850bf6ac.tar.gz gsoc2013-evolution-703e63c88886dbe863d4f67561fef97b850bf6ac.tar.zst gsoc2013-evolution-703e63c88886dbe863d4f67561fef97b850bf6ac.zip |
Use button_release instead of size_allocate, and get the position from the
2003-01-23 Rodney Dawes <dobey@ximian.com>
* folder-browser.c (fb_resize_cb): Use button_release instead of
size_allocate, and get the position from the Paned widget to prevent
calling CORBA all the time for GConf stuff
svn path=/trunk/; revision=19607
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/folder-browser.c | 21 |
2 files changed, 17 insertions, 10 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 9d97b0c701..867748865b 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2003-01-23 Rodney Dawes <dobey@ximian.com> + + * folder-browser.c (fb_resize_cb): Use button_release instead of + size_allocate, and get the position from the Paned widget to prevent + calling CORBA all the time for GConf stuff + 2003-01-23 Ettore Perazzoli <ettore@ximian.com> * Makefile.am (componentdir): Removed definition; this is now diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 2f9c287fad..a59516d05a 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -1167,7 +1167,6 @@ folder_browser_set_message_preview (FolderBrowser *folder_browser, gboolean show do_message_selected (folder_browser); set_cursor_pos (folder_browser, y); } else { - gtk_paned_set_position (GTK_PANED (folder_browser->vpaned), 10000); gtk_widget_hide (GTK_WIDGET (folder_browser->mail_display)); mail_display_set_message (folder_browser->mail_display, NULL, NULL, NULL); folder_browser_ui_message_loaded (folder_browser); @@ -2357,15 +2356,17 @@ on_cursor_activated (ETree *tree, int row, ETreePath path, gpointer user_data) on_selection_changed ((GtkObject *)tree, user_data); } -static void -fb_resize_cb (GtkWidget *w, GtkAllocation *a, FolderBrowser *fb) +static gboolean +fb_resize_cb (GtkWidget *w, GdkEventButton *e, FolderBrowser *fb) { GConfClient *gconf; - + gconf = gconf_client_get_default (); - + if (GTK_WIDGET_REALIZED (w) && fb->preview_shown) - gconf_client_set_int (gconf, "/apps/evolution/mail/display/paned_size", a->height, NULL); + gconf_client_set_int (gconf, "/apps/evolution/mail/display/paned_size", gtk_paned_get_position (GTK_PANED (w)), NULL); + + return FALSE; } static void @@ -2374,12 +2375,12 @@ paned_size_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpoin FolderBrowser *fb = user_data; int paned_size; - g_signal_handler_block (fb->message_list, fb->paned_resize_id); + g_signal_handler_block (fb->vpaned, fb->paned_resize_id); paned_size = gconf_client_get_int (client, "/apps/evolution/mail/display/paned_size", NULL); gtk_paned_set_position (GTK_PANED (fb->vpaned), paned_size); - g_signal_handler_unblock (fb->message_list, fb->paned_resize_id); + g_signal_handler_unblock (fb->vpaned, fb->paned_resize_id); } static void @@ -2475,9 +2476,9 @@ folder_browser_gui_init (FolderBrowser *fb) gtk_paned_add1 (GTK_PANED (fb->vpaned), GTK_WIDGET (fb->message_list)); gtk_widget_show (GTK_WIDGET (fb->message_list)); - fb->paned_resize_id = g_signal_connect (fb->message_list, "size-allocate", + fb->paned_resize_id = g_signal_connect (fb->vpaned, "button_release_event", G_CALLBACK (fb_resize_cb), fb); - + gconf = gconf_client_get_default (); /* hide deleted */ |