aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cc-empathy-accounts-panel.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cc-empathy-accounts-panel.c b/src/cc-empathy-accounts-panel.c
index 24be69121..1fff907f1 100644
--- a/src/cc-empathy-accounts-panel.c
+++ b/src/cc-empathy-accounts-panel.c
@@ -52,6 +52,7 @@ struct CcEmpathyAccountsPanelPrivate
GtkWidget *accounts_window;
GtkWidget *assistant;
+ GtkWidget *container;
};
G_DEFINE_DYNAMIC_TYPE (CcEmpathyAccountsPanel, cc_empathy_accounts_panel, CC_TYPE_PANEL)
@@ -79,7 +80,7 @@ panel_pack_with_accounts_dialog (CcEmpathyAccountsPanel *panel)
gtk_widget_set_no_show_all (action_area, TRUE);
gtk_widget_hide (action_area);
- gtk_widget_reparent (content, GTK_WIDGET (panel));
+ gtk_widget_reparent (content, GTK_WIDGET (panel->priv->container));
}
static void
@@ -217,6 +218,14 @@ cc_empathy_accounts_panel_init (CcEmpathyAccountsPanel *panel)
panel->priv = CC_EMPATHY_ACCOUNTS_PANEL_GET_PRIVATE (panel);
+ /* create a container widget immediately, and pack it into the panel,
+ * because the CC library expects a children to exist after
+ * the object is constructed.
+ */
+ panel->priv->container = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_widget_show (panel->priv->container);
+ gtk_container_add (GTK_CONTAINER (panel), panel->priv->container);
+
empathy_gtk_init ();
/* unref'd in final endpoint callbacks */