aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-01-25 06:56:49 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-01-25 06:56:49 +0800
commitcc35ce98a7a85b09dca062f7a781d7718cd17db2 (patch)
treed8280cf3eebfea13d8f8230766190200f348dc44 /mail
parentbe30d82733a1f8afda0a496b43a9f14e512ad6a6 (diff)
downloadgsoc2013-evolution-cc35ce98a7a85b09dca062f7a781d7718cd17db2.tar
gsoc2013-evolution-cc35ce98a7a85b09dca062f7a781d7718cd17db2.tar.gz
gsoc2013-evolution-cc35ce98a7a85b09dca062f7a781d7718cd17db2.tar.bz2
gsoc2013-evolution-cc35ce98a7a85b09dca062f7a781d7718cd17db2.tar.lz
gsoc2013-evolution-cc35ce98a7a85b09dca062f7a781d7718cd17db2.tar.xz
gsoc2013-evolution-cc35ce98a7a85b09dca062f7a781d7718cd17db2.tar.zst
gsoc2013-evolution-cc35ce98a7a85b09dca062f7a781d7718cd17db2.zip
Set the paned_size here.
2003-01-24 Jeffrey Stedfast <fejj@ximian.com> * folder-browser-ui.c (folder_browser_ui_add_global): Set the paned_size here. * folder-browser.c (folder_browser_gui_init): Don't bother connecting to the hide-deleted, message-display-style, paned-size, nor show-preview gconf notifications anymore, since we can just set them when the view becomes active again in folder-browser-ui.c. Cuts down on extra overhead. (folder_browser_destroy): No need to disconnect from those notifications anymore either. svn path=/trunk/; revision=19626
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog13
-rw-r--r--mail/folder-browser-ui.c9
-rw-r--r--mail/folder-browser.c105
-rw-r--r--mail/folder-browser.h5
4 files changed, 22 insertions, 110 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 5100dbebbb..c5d25caae5 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,16 @@
+2003-01-24 Jeffrey Stedfast <fejj@ximian.com>
+
+ * folder-browser-ui.c (folder_browser_ui_add_global): Set the
+ paned_size here.
+
+ * folder-browser.c (folder_browser_gui_init): Don't bother
+ connecting to the hide-deleted, message-display-style, paned-size,
+ nor show-preview gconf notifications anymore, since we can just
+ set them when the view becomes active again in
+ folder-browser-ui.c. Cuts down on extra overhead.
+ (folder_browser_destroy): No need to disconnect from those
+ notifications anymore either.
+
2003-01-24 Ettore Perazzoli <ettore@ximian.com>
* Makefile.am (iconsdir): Remove, this is now defined in
diff --git a/mail/folder-browser-ui.c b/mail/folder-browser-ui.c
index 24916b59bf..6680d8dd2a 100644
--- a/mail/folder-browser-ui.c
+++ b/mail/folder-browser-ui.c
@@ -607,6 +607,7 @@ folder_browser_ui_add_global (FolderBrowser *fb)
BonoboUIComponent *uic = fb->uicomp;
gboolean show_preview;
GConfClient *gconf;
+ int paned_size;
if (fb->sensitise_state) {
g_hash_table_destroy (fb->sensitise_state);
@@ -617,6 +618,14 @@ folder_browser_ui_add_global (FolderBrowser *fb)
gconf = gconf_client_get_default ();
+ /* (Pre)view pane size (do this first because it affects the
+ preview settings - see folder_browser_set_message_preview()
+ internals for details) */
+ paned_size = gconf_client_get_int (gconf, "/apps/evolution/mail/display/paned_size", NULL);
+ g_signal_handler_block (fb->vpaned, fb->paned_resize_id);
+ gtk_paned_set_position (GTK_PANED (fb->vpaned), paned_size);
+ g_signal_handler_unblock (fb->vpaned, fb->paned_resize_id);
+
/* (Pre)view toggle */
show_preview = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/show_preview", NULL);
bonobo_ui_component_set_prop (uic, "/commands/ViewPreview", "state", show_preview ? "1" : "0", NULL);
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index a59516d05a..f83921b459 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -197,26 +197,6 @@ folder_browser_destroy (GtkObject *object)
folder_browser->view_menus = NULL;
}
- if (folder_browser->paned_size_notify_id != 0) {
- gconf_client_notify_remove (gconf, folder_browser->paned_size_notify_id);
- folder_browser->paned_size_notify_id = 0;
- }
-
- if (folder_browser->show_preview_notify_id != 0) {
- gconf_client_notify_remove (gconf, folder_browser->show_preview_notify_id);
- folder_browser->show_preview_notify_id = 0;
- }
-
- if (folder_browser->hide_deleted_notify_id != 0) {
- gconf_client_notify_remove (gconf, folder_browser->hide_deleted_notify_id);
- folder_browser->hide_deleted_notify_id = 0;
- }
-
- if (folder_browser->message_style_notify_id != 0) {
- gconf_client_notify_remove (gconf, folder_browser->message_style_notify_id);
- folder_browser->message_style_notify_id = 0;
- }
-
/* wait for all outstanding async events against us */
mail_async_event_destroy (folder_browser->async_event);
@@ -2370,62 +2350,6 @@ fb_resize_cb (GtkWidget *w, GdkEventButton *e, FolderBrowser *fb)
}
static void
-paned_size_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
-{
- FolderBrowser *fb = user_data;
- int paned_size;
-
- 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->vpaned, fb->paned_resize_id);
-}
-
-static void
-show_preview_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
-{
- FolderBrowser *fb = user_data;
- gboolean show_preview;
-
- if (fb->uicomp) {
- show_preview = gconf_client_get_bool (client, "/apps/evolution/mail/display/show_preview", NULL);
- bonobo_ui_component_set_prop (fb->uicomp, "/commands/ViewPreview", "state",
- show_preview ? "1" : "0", NULL);
- }
-}
-
-static void
-hide_deleted_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
-{
- FolderBrowser *fb = user_data;
- gboolean hide_deleted;
-
- if (fb->uicomp) {
- hide_deleted = !gconf_client_get_bool (client, "/apps/evolution/mail/display/show_deleted", NULL);
- bonobo_ui_component_set_prop (fb->uicomp, "/commands/HideDeleted", "state",
- hide_deleted ? "1" : "0", NULL);
- }
-}
-
-static void
-message_style_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
-{
- extern char *message_display_styles[];
- FolderBrowser *fb = user_data;
- const char *uipath;
- int style;
-
- if (fb->uicomp) {
- style = gconf_client_get_int (client, "/apps/evolution/mail/display/message_style", NULL);
- style = style >= 0 && style < MAIL_CONFIG_DISPLAY_MAX ? style : 0;
- uipath = message_display_styles[style];
- bonobo_ui_component_set_prop (fb->uicomp, uipath, "state", "1", NULL);
- }
-}
-
-static void
folder_browser_gui_init (FolderBrowser *fb)
{
extern RuleContext *search_context;
@@ -2480,35 +2404,6 @@ folder_browser_gui_init (FolderBrowser *fb)
G_CALLBACK (fb_resize_cb), fb);
gconf = gconf_client_get_default ();
-
- /* hide deleted */
- gconf_client_add_dir (gconf, "/apps/evolution/mail/display/show_deleted",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- fb->hide_deleted_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/display/show_deleted",
- hide_deleted_changed, fb, NULL, NULL);
-
- /* show preview-pane */
- gconf_client_add_dir (gconf, "/apps/evolution/mail/display/show_preview",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- fb->show_preview_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/display/show_preview",
- show_preview_changed, fb, NULL, NULL);
-
- /* message display style */
- gconf_client_add_dir (gconf, "/apps/evolution/mail/display/message_style",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- fb->message_style_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/display/message_style",
- message_style_changed, fb, NULL, NULL);
-
- /* paned size */
- gconf_client_add_dir (gconf, "/apps/evolution/mail/display/paned_size",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- fb->paned_size_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/display/paned_size",
- paned_size_changed, fb, NULL, NULL);
-
paned_size = gconf_client_get_int (gconf, "/apps/evolution/mail/display/paned_size", NULL);
gtk_paned_add2 (GTK_PANED (fb->vpaned), GTK_WIDGET (fb->mail_display));
gtk_paned_set_position (GTK_PANED (fb->vpaned), paned_size);
diff --git a/mail/folder-browser.h b/mail/folder-browser.h
index 69aca02f9c..24dd8db0bf 100644
--- a/mail/folder-browser.h
+++ b/mail/folder-browser.h
@@ -61,11 +61,6 @@ struct _FolderBrowser {
gulong paned_resize_id;
- guint paned_size_notify_id;
- guint show_preview_notify_id;
- guint hide_deleted_notify_id;
- guint message_style_notify_id;
-
/* a folder we are expunging, dont use other than to compare the pointer value */
CamelFolder *expunging;