aboutsummaryrefslogtreecommitdiffstats
path: root/src/cc-empathy-accounts-panel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cc-empathy-accounts-panel.c')
-rw-r--r--src/cc-empathy-accounts-panel.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/cc-empathy-accounts-panel.c b/src/cc-empathy-accounts-panel.c
index 63500e66c..d69325b7b 100644
--- a/src/cc-empathy-accounts-panel.c
+++ b/src/cc-empathy-accounts-panel.c
@@ -28,6 +28,9 @@
#include <gconf/gconf-client.h>
+#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
+#include <libempathy/empathy-debug.h>
+
#include "cc-empathy-accounts-panel.h"
#include "cc-empathy-accounts-page.h"
@@ -55,6 +58,24 @@ setup_panel (CcEmpathyAccountsPanel *panel)
NULL);
}
+static void
+cc_empathy_accounts_panel_active_changed (CcPanel *self,
+ gboolean is_active)
+{
+ DEBUG ("%s: active = %i", G_STRLOC, is_active);
+
+ if (!is_active)
+ {
+ /* why doesn't control-center call active-changed on the Page? */
+ cc_empathy_accounts_page_destroy_dialogs (
+ CC_EMPATHY_ACCOUNTS_PAGE (
+ CC_EMPATHY_ACCOUNTS_PANEL (self)->priv->empathy_accounts_page));
+ }
+
+ CC_PANEL_CLASS (cc_empathy_accounts_panel_parent_class)->active_changed (
+ self, is_active);
+}
+
static GObject *
cc_empathy_accounts_panel_constructor (GType type,
guint n_construct_properties,
@@ -96,7 +117,10 @@ cc_empathy_accounts_panel_finalize (GObject *object)
static void
cc_empathy_accounts_panel_class_init (CcEmpathyAccountsPanelClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ CcPanelClass *panel_class = CC_PANEL_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ panel_class->active_changed = cc_empathy_accounts_panel_active_changed;
object_class->constructor = cc_empathy_accounts_panel_constructor;
object_class->finalize = cc_empathy_accounts_panel_finalize;