aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-08-04 21:22:29 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-22 21:19:10 +0800
commit3f21eaf356b78cd1e0a8c7d43818e85c7bc12e4a (patch)
tree09f5b8691a4822d2e0ebe736e509f171d6508c90 /libempathy-gtk/empathy-account-widget.c
parentf75d35f22aa745688f9fd932a5de6a6903b3db04 (diff)
downloadgsoc2013-empathy-3f21eaf356b78cd1e0a8c7d43818e85c7bc12e4a.tar
gsoc2013-empathy-3f21eaf356b78cd1e0a8c7d43818e85c7bc12e4a.tar.gz
gsoc2013-empathy-3f21eaf356b78cd1e0a8c7d43818e85c7bc12e4a.tar.bz2
gsoc2013-empathy-3f21eaf356b78cd1e0a8c7d43818e85c7bc12e4a.tar.lz
gsoc2013-empathy-3f21eaf356b78cd1e0a8c7d43818e85c7bc12e4a.tar.xz
gsoc2013-empathy-3f21eaf356b78cd1e0a8c7d43818e85c7bc12e4a.tar.zst
gsoc2013-empathy-3f21eaf356b78cd1e0a8c7d43818e85c7bc12e4a.zip
Implement a generic simple widget
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r--libempathy-gtk/empathy-account-widget.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 3bd8309fa..916de9502 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -377,6 +377,8 @@ accounts_widget_generic_setup (EmpathyAccountWidget *self,
if (param->flags & TP_CONN_MGR_PARAM_FLAG_REQUIRED)
table_settings = table_common_settings;
+ else if (priv->simple)
+ return;
else
table_settings = table_advanced_settings;
@@ -559,10 +561,16 @@ account_widget_build_generic (EmpathyAccountWidget *self,
const char *filename)
{
EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+ GtkWidget *expander_advanced;
+
self->ui_details->gui = empathy_builder_get_file (filename,
"vbox_generic_settings", &self->ui_details->widget,
+ "expander_advanced_settings", &expander_advanced,
NULL);
+ if (priv->simple)
+ gtk_widget_hide (expander_advanced);
+
g_object_ref (self->ui_details->gui);
if (empathy_account_settings_is_ready (priv->settings))
@@ -805,7 +813,7 @@ account_widget_build_groupwise (EmpathyAccountWidget *self,
const char *filename)
{
EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
-
+
if (priv->simple)
{
self->ui_details->gui = empathy_builder_get_file (filename,
@@ -886,6 +894,7 @@ do_get_property (GObject *object,
break;
case PROP_SIMPLE:
g_value_set_boolean (value, priv->simple);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -921,7 +930,13 @@ do_constructed (GObject *obj)
else if (!tp_strdiff (priv->protocol, "sip"))
empathy_account_widget_sip_build (self, filename);
else
- account_widget_build_generic (self, filename);
+ {
+ g_free (filename);
+
+ filename = empathy_file_lookup (
+ "empathy-account-widget-generic.ui", "libempathy-gtk");
+ account_widget_build_generic (self, filename);
+ }
g_free (uiname);
g_free (filename);