aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2008-10-17 20:46:15 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-10-17 20:46:15 +0800
commit66905c35d768b13f4b53eec9f4042aa9ae6dbae9 (patch)
treef19d14c6ddb7faa389d760fc29702d986b60d355
parent4feea7a284471312f7c9e4c9bfc1502fe0813b04 (diff)
downloadgsoc2013-empathy-66905c35d768b13f4b53eec9f4042aa9ae6dbae9.tar
gsoc2013-empathy-66905c35d768b13f4b53eec9f4042aa9ae6dbae9.tar.gz
gsoc2013-empathy-66905c35d768b13f4b53eec9f4042aa9ae6dbae9.tar.bz2
gsoc2013-empathy-66905c35d768b13f4b53eec9f4042aa9ae6dbae9.tar.lz
gsoc2013-empathy-66905c35d768b13f4b53eec9f4042aa9ae6dbae9.tar.xz
gsoc2013-empathy-66905c35d768b13f4b53eec9f4042aa9ae6dbae9.tar.zst
gsoc2013-empathy-66905c35d768b13f4b53eec9f4042aa9ae6dbae9.zip
Make EmpathyImportDialog a singleton. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=1602
-rw-r--r--src/empathy-import-dialog.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/empathy-import-dialog.c b/src/empathy-import-dialog.c
index f9d34603a..d54083372 100644
--- a/src/empathy-import-dialog.c
+++ b/src/empathy-import-dialog.c
@@ -384,14 +384,19 @@ empathy_import_dialog_response_cb (GtkDialog *dialog_window,
empathy_import_dialog_pidgin_import_accounts ();
}
- gtk_widget_destroy (GTK_WIDGET (dialog_window));
- g_slice_free (EmpathyImportDialog, dialog);
+ gtk_widget_hide (GTK_WIDGET (dialog_window));
}
void
empathy_import_dialog_show (GtkWindow *parent)
{
- EmpathyImportDialog *dialog;
+ static EmpathyImportDialog *dialog = NULL;
+
+ if (dialog)
+ {
+ gtk_window_present (GTK_WINDOW (dialog->window));
+ return;
+ }
dialog = g_slice_new0 (EmpathyImportDialog);