diff options
author | 2 <NotZed@Ximian.com> | 2001-11-03 08:07:33 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-11-03 08:07:33 +0800 |
commit | e735e8fa8965d907fe91467482e0fb5d00364bc2 (patch) | |
tree | a769546f14ac3b4c1fce79c462c24b2f7c6d979c /mail | |
parent | 8fcca3dc0b5e3355977230ce61dc172652e69032 (diff) | |
download | gsoc2013-evolution-e735e8fa8965d907fe91467482e0fb5d00364bc2.tar gsoc2013-evolution-e735e8fa8965d907fe91467482e0fb5d00364bc2.tar.gz gsoc2013-evolution-e735e8fa8965d907fe91467482e0fb5d00364bc2.tar.bz2 gsoc2013-evolution-e735e8fa8965d907fe91467482e0fb5d00364bc2.tar.lz gsoc2013-evolution-e735e8fa8965d907fe91467482e0fb5d00364bc2.tar.xz gsoc2013-evolution-e735e8fa8965d907fe91467482e0fb5d00364bc2.tar.zst gsoc2013-evolution-e735e8fa8965d907fe91467482e0fb5d00364bc2.zip |
Disconnect from the message_list_built function so we dont do it every
2001-11-02 <NotZed@Ximian.com>
* message-browser.c (message_browser_message_list_built):
Disconnect from the message_list_built function so we dont do it
every time the list is rebuilt.
* mail-callbacks.c (composer_send_cb): Disable autosave when we're
sending mail.
(composer_sent_cb): Re-enable autosave.
* folder-browser-ui.c (fbui_sensitize_timeout): Make sure we reset
any data we're using on the folderbrowser before doing anything
'cause things could vanish while we're doing it, and also
ref/unref the folderbrowser so it doesn't vanish while w'ere
working.
* folder-browser.c (folder_browser_set_ui_component): If we are
changing the ui comp, remove any pending timeouts. For #13719.
svn path=/trunk/; revision=14575
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 19 | ||||
-rw-r--r-- | mail/folder-browser-ui.c | 17 | ||||
-rw-r--r-- | mail/folder-browser.c | 16 | ||||
-rw-r--r-- | mail/mail-callbacks.c | 2 | ||||
-rw-r--r-- | mail/message-browser.c | 4 |
5 files changed, 49 insertions, 9 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 19a5c4c9c2..5b502ecf33 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,22 @@ +2001-11-02 <NotZed@Ximian.com> + + * message-browser.c (message_browser_message_list_built): + Disconnect from the message_list_built function so we dont do it + every time the list is rebuilt. + + * mail-callbacks.c (composer_send_cb): Disable autosave when we're + sending mail. + (composer_sent_cb): Re-enable autosave. + + * folder-browser-ui.c (fbui_sensitize_timeout): Make sure we reset + any data we're using on the folderbrowser before doing anything + 'cause things could vanish while we're doing it, and also + ref/unref the folderbrowser so it doesn't vanish while w'ere + working. + + * folder-browser.c (folder_browser_set_ui_component): If we are + changing the ui comp, remove any pending timeouts. For #13719. + 2001-11-01 Larry Ewing <lewing@ximian.com> * folder-browser.c (folder_browser_copy): fix cut & paste from the diff --git a/mail/folder-browser-ui.c b/mail/folder-browser-ui.c index 5b137d95bc..4e673cb493 100644 --- a/mail/folder-browser-ui.c +++ b/mail/folder-browser-ui.c @@ -455,13 +455,20 @@ static gboolean fbui_sensitize_timeout (gpointer data) { FolderBrowser *fb = FOLDER_BROWSER (data); - GSList *iter; + GSList *iter, *list; struct sensitize_data *sd; int i; + list = fb->sensitize_changes; + fb->sensitize_changes = NULL; + iter = list; + fb->sensitize_timeout_id = 0; + + gtk_object_ref((GtkObject *)fb); + /*bonobo_ui_component_freeze (uic, NULL);*/ - for (iter = fb->sensitize_changes; iter; iter = iter->next) { + for (; iter; iter = iter->next) { sd = (struct sensitize_data *) iter->data; for (i=0;sd->items[i];i++) { if (fb->uicomp) @@ -470,9 +477,9 @@ fbui_sensitize_timeout (gpointer data) g_free(sd); } - g_slist_free (fb->sensitize_changes); - fb->sensitize_changes = NULL; - fb->sensitize_timeout_id = 0; + g_slist_free (list); + gtk_object_unref((GtkObject *)fb); + return FALSE; } diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 8ff6d97547..0a06090adf 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -69,7 +69,7 @@ #include <camel/camel-mime-message.h> #include <camel/camel-stream-mem.h> -#define d(x) +#define d(x) #define PARENT_TYPE (gtk_table_get_type ()) @@ -895,6 +895,16 @@ void folder_browser_set_ui_component (FolderBrowser *fb, BonoboUIComponent *uicomp) { g_return_if_fail (IS_FOLDER_BROWSER (fb)); + + if (fb->sensitize_timeout_id) { + g_source_remove (fb->sensitize_timeout_id); + fb->sensitize_timeout_id = 0; + } + + if (fb->sensitise_state) { + g_hash_table_destroy(fb->sensitise_state); + fb->sensitise_state = NULL; + } if (fb->uicomp) bonobo_object_unref (BONOBO_OBJECT (fb->uicomp)); @@ -1920,7 +1930,7 @@ done_message_selected (CamelFolder *folder, char *uid, CamelMimeMessage *msg, vo static gboolean do_message_selected (FolderBrowser *fb) { - d(printf ("selecting uid %s (delayed)\n", fb->new_uid ? fb->new_uid : "NONE")); + d(printf ("%p: selecting uid %s (delayed)\n", fb, fb->new_uid ? fb->new_uid : "NONE")); fb->loading_id = 0; @@ -1944,7 +1954,7 @@ do_message_selected (FolderBrowser *fb) static void on_message_selected (MessageList *ml, const char *uid, FolderBrowser *fb) { - d(printf ("selecting uid %s (direct)\n", uid ? uid : "NONE")); + d(printf ("%p: selecting uid %s (direct)\n", fb, uid ? uid : "NONE")); if (fb->loading_id != 0) gtk_timeout_remove (fb->loading_id); diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index cb4f217ad6..ae3fdaad75 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -424,6 +424,7 @@ composer_sent_cb (char *uri, CamelMimeMessage *message, gboolean sent, void *dat } gtk_widget_destroy (GTK_WIDGET (send->composer)); } else { + e_msg_composer_set_enable_autosave(send->composer, TRUE); gtk_widget_show (GTK_WIDGET (send->composer)); gtk_object_unref (GTK_OBJECT (send->composer)); } @@ -617,6 +618,7 @@ composer_send_cb (EMsgComposer *composer, gpointer data) send->composer = composer; gtk_object_ref (GTK_OBJECT (composer)); gtk_widget_hide (GTK_WIDGET (composer)); + e_msg_composer_set_enable_autosave(composer, FALSE); mail_send_mail (transport->url, message, composer_sent_cb, send); } diff --git a/mail/message-browser.c b/mail/message-browser.c index d37d1eab18..c8f2b7ed85 100644 --- a/mail/message-browser.c +++ b/mail/message-browser.c @@ -134,7 +134,9 @@ static void message_browser_message_list_built (MessageList *ml, MessageBrowser *mb) { const char *uid = gtk_object_get_data (GTK_OBJECT (mb), "uid"); - + + gtk_signal_disconnect_by_func (GTK_OBJECT (ml), message_browser_message_list_built, mb); + message_list_select_uid (ml, uid); } |