diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-03-10 12:54:51 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-03-10 18:43:43 +0800 |
commit | 77c57d35a578027d6f5ffea14483ba8762ad995a (patch) | |
tree | ac08b0486329570e81f3644f64ec0bf0c3d97b55 /src/cc-empathy-accounts-panel.c | |
parent | c2cd8fbabc39ee82f28e9617a33c2ae603f711b7 (diff) | |
download | gsoc2013-empathy-77c57d35a578027d6f5ffea14483ba8762ad995a.tar gsoc2013-empathy-77c57d35a578027d6f5ffea14483ba8762ad995a.tar.gz gsoc2013-empathy-77c57d35a578027d6f5ffea14483ba8762ad995a.tar.bz2 gsoc2013-empathy-77c57d35a578027d6f5ffea14483ba8762ad995a.tar.lz gsoc2013-empathy-77c57d35a578027d6f5ffea14483ba8762ad995a.tar.xz gsoc2013-empathy-77c57d35a578027d6f5ffea14483ba8762ad995a.tar.zst gsoc2013-empathy-77c57d35a578027d6f5ffea14483ba8762ad995a.zip |
empathy-accounts: make CcPage insensitive when assistant is being shown
Also destroy assistant when CcPanel becomes inactive.
Diffstat (limited to 'src/cc-empathy-accounts-panel.c')
-rw-r--r-- | src/cc-empathy-accounts-panel.c | 26 |
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; |