aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-11-26 14:43:31 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-11-26 14:43:31 +0800
commit989e19963822b5dc48d0074f876a29c695f63158 (patch)
tree872a102e427cac6af166237bb9dd763384082743 /mail/mail-display.c
parent66442571c9fa464dae8b5f0eada5501183cc6656 (diff)
downloadgsoc2013-evolution-989e19963822b5dc48d0074f876a29c695f63158.tar.gz
gsoc2013-evolution-989e19963822b5dc48d0074f876a29c695f63158.tar.zst
gsoc2013-evolution-989e19963822b5dc48d0074f876a29c695f63158.zip
gtk_widget_set_parent_window -> gtk_window_set_transient_for.
2002-11-26 Not Zed <NotZed@Ximian.com> * mail-account-editor.c (mail_account_editor_new): gtk_widget_set_parent_window -> gtk_window_set_transient_for. * mail-callbacks.c (composer_send_queued_cb): dont unref composer. * message-browser.c (message_browser_destroy): moved back from finalise. 2002-11-25 Not Zed <NotZed@Ximian.com> * message-list.c (message_list_dispose): move saving tree state here. (message_list_finalise): And take it from here. * mail-display.c (mail_display_destroy): @#$@# gtk. changed this around a bit. (mail_display_init): Fix prototype, its a gobject. (mail_display_init): ref/sink the invisible gtkobject. svn path=/trunk/; revision=18919
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r--mail/mail-display.c54
1 files changed, 33 insertions, 21 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 559a3c92dc..d5c7a6b0fd 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -1917,7 +1917,7 @@ mail_display_load_images (MailDisplay *md)
*----------------------------------------------------------------------*/
static void
-mail_display_init (GtkObject *object)
+mail_display_init (GObject *object)
{
MailDisplay *mail_display = MAIL_DISPLAY (object);
@@ -1934,6 +1934,8 @@ mail_display_init (GtkObject *object)
mail_display->data = NULL;
mail_display->invisible = gtk_invisible_new ();
+ g_object_ref(mail_display->invisible);
+ gtk_object_sink((GtkObject *)mail_display->invisible);
mail_display->display_style = mail_config_get_message_display_style ();
@@ -1952,33 +1954,43 @@ mail_display_destroy (GtkObject *object)
if (mail_display->html) {
g_object_unref(mail_display->html);
mail_display->html = NULL;
+ }
- if (mail_display->current_message) {
- camel_object_unref (mail_display->current_message);
- g_datalist_clear (mail_display->data);
- fetch_cancel(mail_display);
- }
+ if (mail_display->current_message) {
+ camel_object_unref (mail_display->current_message);
+ g_datalist_clear (mail_display->data);
+ fetch_cancel(mail_display);
+ mail_display->current_message = NULL;
+ }
- g_free (mail_display->charset);
- g_free (mail_display->selection);
+ g_free (mail_display->charset);
+ mail_display->charset = NULL;
+ g_free (mail_display->selection);
+ mail_display->selection = NULL;
+
+ if (mail_display->folder) {
+ if (mail_display->info)
+ camel_folder_free_message_info (mail_display->folder, mail_display->info);
+ camel_object_unref (mail_display->folder);
+ mail_display->folder = NULL;
+ }
- if (mail_display->folder) {
- if (mail_display->info)
- camel_folder_free_message_info (mail_display->folder, mail_display->info);
- camel_object_unref (mail_display->folder);
- }
+ g_free (mail_display->data);
+ mail_display->data = NULL;
- g_free (mail_display->data);
- mail_display->data = NULL;
-
- if (mail_display->idle_id)
- gtk_timeout_remove (mail_display->idle_id);
-
- g_object_unref (mail_display->invisible);
+ if (mail_display->idle_id) {
+ gtk_timeout_remove (mail_display->idle_id);
+ mail_display->idle_id = 0;
+ }
- g_free(mail_display->priv);
+ if (mail_display->invisible) {
+ g_object_unref (mail_display->invisible);
+ mail_display->invisible = NULL;
}
+ g_free(mail_display->priv);
+ mail_display->priv = NULL;
+
mail_display_parent_class->destroy (object);
}