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
This commit is contained in:
committed by
Jeffrey Stedfast
parent
be30d82733
commit
cc35ce98a7
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -2369,62 +2349,6 @@ fb_resize_cb (GtkWidget *w, GdkEventButton *e, FolderBrowser *fb)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user