From 58ff44848944bddcde0faa91efe66d4a444cc509 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Fri, 7 Jan 2005 06:33:26 +0000 Subject: remove old code, setup transient parent and weak ref for refresh. some 2005-01-07 Not Zed * em-account-prefs.c (account_add_clicked): remove old code, setup transient parent and weak ref for refresh. * *.c: some warning fixes/comment fixes svn path=/trunk/; revision=28263 --- mail/em-account-prefs.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'mail/em-account-prefs.c') diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c index 36e50be9f1..d6276c434a 100644 --- a/mail/em-account-prefs.c +++ b/mail/em-account-prefs.c @@ -143,26 +143,16 @@ account_add_clicked (GtkButton *button, gpointer user_data) EMAccountPrefs *prefs = (EMAccountPrefs *) user_data; if (prefs->druid == NULL) { -#if 0 - GtkWidget *parent; - - prefs->druid = (GtkWidget *) mail_config_druid_new (); - - parent = gtk_widget_get_toplevel ((GtkWidget *) prefs); - if (GTK_WIDGET_TOPLEVEL (parent)) - gtk_window_set_transient_for ((GtkWindow *) prefs->druid, (GtkWindow *) parent); - - g_object_weak_ref ((GObject *) prefs->druid, - (GWeakNotify) account_add_finished, prefs); - - gtk_widget_show (prefs->druid); - g_object_ref (prefs); -#else EMAccountEditor *emae; emae = em_account_editor_new(NULL, EMAE_DRUID); + prefs->druid = emae->editor; + + gtk_window_set_transient_for((GtkWindow *)prefs->druid, (GtkWindow *)gtk_widget_get_toplevel((GtkWidget *)prefs)); + g_object_ref(prefs); + /* rather nasty hack to reload the accounts, it should just listen to the e-account-list */ + g_object_weak_ref((GObject *) prefs->druid, (GWeakNotify) account_add_finished, prefs); gtk_widget_show(emae->editor); -#endif } else { gdk_window_raise (prefs->druid->window); } -- cgit