aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-account-prefs.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-01-07 14:33:26 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-01-07 14:33:26 +0800
commit58ff44848944bddcde0faa91efe66d4a444cc509 (patch)
tree796c1160ababf99e8c5b6f421c1ff81f971ee205 /mail/em-account-prefs.c
parent650e78d22d6696d96068994543a3209ea9ba39b5 (diff)
downloadgsoc2013-evolution-58ff44848944bddcde0faa91efe66d4a444cc509.tar.gz
gsoc2013-evolution-58ff44848944bddcde0faa91efe66d4a444cc509.tar.zst
gsoc2013-evolution-58ff44848944bddcde0faa91efe66d4a444cc509.zip
remove old code, setup transient parent and weak ref for refresh. some
2005-01-07 Not Zed <NotZed@Ximian.com> * 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
Diffstat (limited to 'mail/em-account-prefs.c')
-rw-r--r--mail/em-account-prefs.c22
1 files changed, 6 insertions, 16 deletions
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);
}