aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-accounts.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-02-12 05:20:43 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-02-12 05:20:43 +0800
commitcdb641800827669bdde0ade2e3efd08fd3a2b405 (patch)
tree091a211ff05ee733fa83db961407c9b74b8d0c97 /mail/mail-accounts.c
parentde02508770a38e596ea7ea00fec78d45aaefa551 (diff)
downloadgsoc2013-evolution-cdb641800827669bdde0ade2e3efd08fd3a2b405.tar.gz
gsoc2013-evolution-cdb641800827669bdde0ade2e3efd08fd3a2b405.tar.zst
gsoc2013-evolution-cdb641800827669bdde0ade2e3efd08fd3a2b405.zip
Register a destroy virtual method. (mail_accounts_tab_destroy): Set
2003-02-11 Jeffrey Stedfast <fejj@ximian.com> * mail-accounts.c (mail_accounts_tab_class_init): Register a destroy virtual method. (mail_accounts_tab_destroy): Set mail_display->destroyed = TRUE. * message-list.c (message_list_destroy): Set mail_display->destroyed = TRUE. This is a workaround for the GTK_OBJECT_DESTROYED() macro that we used to use before. svn path=/trunk/; revision=19884
Diffstat (limited to 'mail/mail-accounts.c')
-rw-r--r--mail/mail-accounts.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index ddd92a1bbc..ac6f6d1fd2 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -44,6 +44,7 @@
static void mail_accounts_tab_class_init (MailAccountsTabClass *class);
static void mail_accounts_tab_init (MailAccountsTab *prefs);
static void mail_accounts_tab_finalise (GObject *obj);
+static void mail_accounts_tab_destroy (GtkObject *object);
static void mail_accounts_load (MailAccountsTab *tab);
@@ -81,11 +82,13 @@ mail_accounts_tab_get_type (void)
static void
mail_accounts_tab_class_init (MailAccountsTabClass *klass)
{
- GObjectClass *object_class;
+ GtkObjectClass *gtk_object_class = (GtkObjectClass *) klass;
+ GObjectClass *object_class = (GObjectClass *) klass;
- object_class = (GObjectClass *) klass;
parent_class = g_type_class_ref (gtk_vbox_get_type ());
+ gtk_object_class->destroy = mail_accounts_tab_destroy;
+
object_class->finalize = mail_accounts_tab_finalise;
/* setup static data */
@@ -103,6 +106,16 @@ mail_accounts_tab_init (MailAccountsTab *prefs)
}
static void
+mail_accounts_tab_destroy (GtkObject *obj)
+{
+ MailAccountsTab *prefs = (MailAccountsTab *) obj;
+
+ prefs->destroyed = TRUE;
+
+ parent_class->destroy (obj);
+}
+
+static void
mail_accounts_tab_finalise (GObject *obj)
{
MailAccountsTab *prefs = (MailAccountsTab *) obj;
@@ -120,10 +133,7 @@ account_add_finished (MailAccountsTab *prefs, GObject *deadbeef)
/* Either Cancel or Finished was clicked in the druid so reload the accounts */
prefs->druid = NULL;
-#warning "GTK_OBJECT_DESTROYED"
-#if 0
- if (!GTK_OBJECT_DESTROYED (prefs))
-#endif
+ if (!prefs->destroyed)
mail_accounts_load (prefs);
g_object_unref (prefs);
@@ -151,10 +161,7 @@ account_edit_finished (MailAccountsTab *prefs, GObject *deadbeef)
{
prefs->editor = NULL;
-#warning "GTK_OBJECT_DESTROYED"
-#if 0
- if (!GTK_OBJECT_DESTROYED (prefs))
-#endif
+ if (!prefs->destroyed)
mail_accounts_load (prefs);
g_object_unref (prefs);