diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2009-08-04 21:22:29 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-08-22 21:19:10 +0800 |
commit | 3f21eaf356b78cd1e0a8c7d43818e85c7bc12e4a (patch) | |
tree | 09f5b8691a4822d2e0ebe736e509f171d6508c90 /libempathy-gtk | |
parent | f75d35f22aa745688f9fd932a5de6a6903b3db04 (diff) | |
download | gsoc2013-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')
-rw-r--r-- | libempathy-gtk/empathy-account-widget-generic.ui | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 19 |
2 files changed, 18 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-account-widget-generic.ui b/libempathy-gtk/empathy-account-widget-generic.ui index 649307e06..ae97f3c98 100644 --- a/libempathy-gtk/empathy-account-widget-generic.ui +++ b/libempathy-gtk/empathy-account-widget-generic.ui @@ -29,7 +29,7 @@ </packing> </child> <child> - <object class="GtkExpander" id="expander1"> + <object class="GtkExpander" id="expander_advanced_settings"> <property name="visible">True</property> <property name="can_focus">True</property> <child> 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); |