diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-10-14 07:22:40 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-10-15 01:26:03 +0800 |
commit | e288bb38a4f04cf4ce00e77b5b81937eda2f0a12 (patch) | |
tree | f3d9ea94a03f443e657d0961e8284b84bf7add4c /src/empathy-account-assistant.c | |
parent | dd33e47cf95d374d9dfb9d0346cf2977c9393a21 (diff) | |
download | gsoc2013-empathy-e288bb38a4f04cf4ce00e77b5b81937eda2f0a12.tar gsoc2013-empathy-e288bb38a4f04cf4ce00e77b5b81937eda2f0a12.tar.gz gsoc2013-empathy-e288bb38a4f04cf4ce00e77b5b81937eda2f0a12.tar.bz2 gsoc2013-empathy-e288bb38a4f04cf4ce00e77b5b81937eda2f0a12.tar.lz gsoc2013-empathy-e288bb38a4f04cf4ce00e77b5b81937eda2f0a12.tar.xz gsoc2013-empathy-e288bb38a4f04cf4ce00e77b5b81937eda2f0a12.tar.zst gsoc2013-empathy-e288bb38a4f04cf4ce00e77b5b81937eda2f0a12.zip |
Show the assistant if there are no non-salut accounts
Diffstat (limited to 'src/empathy-account-assistant.c')
-rw-r--r-- | src/empathy-account-assistant.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c index ca4881fd3..d9834f38b 100644 --- a/src/empathy-account-assistant.c +++ b/src/empathy-account-assistant.c @@ -930,8 +930,20 @@ empathy_account_assistant_init (EmpathyAccountAssistant *self) } GtkWidget * -empathy_account_assistant_new (GtkWindow *window) +empathy_account_assistant_show (GtkWindow *window) { - return g_object_new (EMPATHY_TYPE_ACCOUNT_ASSISTANT, "parent-window", - window, NULL); + static GtkWidget *dialog = NULL; + + if (dialog == NULL) + { + dialog = g_object_new (EMPATHY_TYPE_ACCOUNT_ASSISTANT, "parent-window", + window, NULL); + g_object_add_weak_pointer (G_OBJECT (dialog), (gpointer *) &dialog); + } + + gtk_window_present (GTK_WINDOW (dialog)); + + return dialog; } + + |