]> git.0d.be Git - empathy.git/commitdiff
Only create the EmpathyAccountsDialog if required
authorDanielle Madeley <danielle.madeley@collabora.co.uk>
Thu, 3 Jun 2010 07:59:44 +0000 (17:59 +1000)
committerDanielle Madeley <danielle.madeley@collabora.co.uk>
Thu, 3 Jun 2010 07:59:44 +0000 (17:59 +1000)
https://bugzilla.gnome.org/show_bug.cgi?id=616616

src/empathy-accounts-common.c

index c6c18e834f36b70b7365ebbda4902a54f8099bdb..a214f284a88ce1cc5af5765e0286ee39a2bd2bb5 100644 (file)
@@ -101,9 +101,10 @@ do_show_accounts_ui (TpAccountManager *manager,
     TpAccount *account,
     GCallback window_destroyed_cb)
 {
-  GtkWidget *accounts_window;
+  static GtkWidget *accounts_window = NULL;
 
-  accounts_window = empathy_accounts_dialog_show (NULL, account);
+  if (accounts_window == NULL)
+    accounts_window = empathy_accounts_dialog_show (NULL, account);
 
   if (window_destroyed_cb)
     g_signal_connect (accounts_window, "destroy", window_destroyed_cb, NULL);