diff options
author | 4 <NotZed@Ximian.com> | 2001-10-24 10:56:06 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-10-24 10:56:06 +0800 |
commit | e4fa983be5e2c6a6496ba02f5391800ecee4575d (patch) | |
tree | 648176650d5c3f1e2b8dac2f225bc2ca89fe6069 /mail/folder-browser.c | |
parent | d6088ab1f0e058c35cab4ef247231ca07d456de4 (diff) | |
download | gsoc2013-evolution-e4fa983be5e2c6a6496ba02f5391800ecee4575d.tar.gz gsoc2013-evolution-e4fa983be5e2c6a6496ba02f5391800ecee4575d.tar.zst gsoc2013-evolution-e4fa983be5e2c6a6496ba02f5391800ecee4575d.zip |
all this crap just to make the print icon desensitive at the right time.
fix for #10346
2001-10-24 <NotZed@Ximian.com>
* message-browser.c (message_browser_message_loaded): Call
ui_message_loaded when we are.
* folder-browser-factory.c (control_activate): Freeze/thaw around
all updates.
(control_deactivate): Freeze/thaw around all updates.
* folder-browser.c (folder_browser_init): Setup a hashtable to
keep track of *our* sensitise state, so we can optimise pushes to
bonobo.
(folder_browser_finalise): Free hash here.
(folder_browser_set_message_preview): Call a ui_message_loaded,
even though it isn't, so it updates sensitivities right.
(done_message_selected): Call ui_message_loaded when it really is,
rather than the very fucked up idea of reversing the loaded_uid
check.
* folder-browser-ui.c (folder_browser_ui_set_selection_state):
Dont enable the message-enabled options if the message display is
hidden, e.g. print, view headers, etc.
(folder_browser_ui_rm_all): Forget sensitise state.
(fbui_sensitise_item): Sensitise items via a current-state table,
so we dont have to do bonobo calls every time.
(folder_browser_setup_property_menu): Call sensitise_item.
(folder_browser_ui_add_message):
(folder_browser_ui_add_global): Leave current set_prop "sensitive"
for the stop button, so it doesn't get lost by the stuff in
mail-mt.c
(fbui_real_sensitize_items): Removed.
(fbui_sensitize_timeout): Cleaned up, use sensitise_item to do
work.
(folder_browser_ui_message_loaded): Setup sensitive based on
preview_shown too.
(folder_browser_ui_set_selection_state): And here too.
svn path=/trunk/; revision=13972
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r-- | mail/folder-browser.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 6f75607ee0..89b6f43524 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -169,6 +169,11 @@ folder_browser_finalise (GtkObject *object) if (folder_browser->clipboard_selection) g_byte_array_free (folder_browser->clipboard_selection, TRUE); + + if (folder_browser->sensitise_state) { + g_hash_table_destroy(folder_browser->sensitise_state); + folder_browser->sensitise_state = NULL; + } folder_browser_parent_class->finalize (object); } @@ -1019,16 +1024,15 @@ folder_browser_set_message_preview (FolderBrowser *folder_browser, gboolean show if (show_message_preview) { int y; y = save_cursor_pos (folder_browser); - e_paned_set_position (E_PANED (folder_browser->vpaned), - mail_config_get_paned_size ()); + e_paned_set_position (E_PANED (folder_browser->vpaned), mail_config_get_paned_size ()); gtk_widget_show (GTK_WIDGET (folder_browser->mail_display)); do_message_selected (folder_browser); set_cursor_pos (folder_browser, y); } else { - e_paned_set_position (E_PANED (folder_browser->vpaned), - 10000); + e_paned_set_position (E_PANED (folder_browser->vpaned), 10000); gtk_widget_hide (GTK_WIDGET (folder_browser->mail_display)); mail_display_set_message(folder_browser->mail_display, NULL); + folder_browser_ui_message_loaded(folder_browser); } } @@ -1856,7 +1860,6 @@ done_message_selected (CamelFolder *folder, char *uid, CamelMimeMessage *msg, vo return; mail_display_set_message (fb->mail_display, (CamelMedium *)msg); - folder_browser_ui_message_loaded (fb); /* FIXME: should this signal be emitted here?? */ gtk_signal_emit (GTK_OBJECT (fb), folder_browser_signals [MESSAGE_LOADED], uid); @@ -1874,6 +1877,8 @@ done_message_selected (CamelFolder *folder, char *uid, CamelMimeMessage *msg, vo g_free (fb->loaded_uid); fb->loaded_uid = fb->loading_uid; fb->loading_uid = NULL; + + folder_browser_ui_message_loaded (fb); /* if we are still on the same message, do the 'idle read' thing */ if (fb->seen_id) |