[empathy] Only create the EmpathyAccountsDialog if required



commit 5eba91c37b0fdcd1eb5a905477cc98dc1c6d15d9
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Thu Jun 3 17:59:44 2010 +1000

    Only create the EmpathyAccountsDialog if required
    
    https://bugzilla.gnome.org/show_bug.cgi?id=616616

 src/empathy-accounts-common.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-accounts-common.c b/src/empathy-accounts-common.c
index c6c18e8..a214f28 100644
--- a/src/empathy-accounts-common.c
+++ b/src/empathy-accounts-common.c
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]