[empathy/mc5] Every protocols should now have an "Enabled" checkbox in "edit" mode.



commit d047670385b7dcc65ccdb89969f0e43deea7c93e
Author: Jonathan Tellier <jonathan tellier gmail com>
Date:   Fri Aug 21 16:08:29 2009 -0400

    Every protocols should now have an "Enabled" checkbox in "edit" mode.

 libempathy-gtk/empathy-account-widget-irc.c  |    4 +++-
 libempathy-gtk/empathy-account-widget-irc.h  |    3 ++-
 libempathy-gtk/empathy-account-widget-sip.c  |    4 +++-
 libempathy-gtk/empathy-account-widget-sip.h  |    3 ++-
 libempathy-gtk/empathy-account-widget-sip.ui |    2 +-
 libempathy-gtk/empathy-account-widget.c      |   17 +++++++++++++++--
 6 files changed, 26 insertions(+), 7 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-widget-irc.c b/libempathy-gtk/empathy-account-widget-irc.c
index 932e2f8..e462aa6 100644
--- a/libempathy-gtk/empathy-account-widget-irc.c
+++ b/libempathy-gtk/empathy-account-widget-irc.c
@@ -418,7 +418,8 @@ account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
 
 void
 empathy_account_widget_irc_build (EmpathyAccountWidget *self,
-                                const char *filename)
+    const char *filename,
+    GtkWidget **table_common_settings)
 {
   EmpathyAccountWidgetIrc *settings;
   gchar *dir, *user_file_with_path, *global_file_with_path;
@@ -450,6 +451,7 @@ empathy_account_widget_irc_build (EmpathyAccountWidget *self,
   g_free (user_file_with_path);
 
   self->ui_details->gui = empathy_builder_get_file (filename,
+      "table_irc_settings", table_common_settings,
       "vbox_irc", &self->ui_details->widget,
       "table_irc_settings", &settings->vbox_settings,
       "combobox_network", &settings->combobox_network,
diff --git a/libempathy-gtk/empathy-account-widget-irc.h b/libempathy-gtk/empathy-account-widget-irc.h
index a767871..0221585 100644
--- a/libempathy-gtk/empathy-account-widget-irc.h
+++ b/libempathy-gtk/empathy-account-widget-irc.h
@@ -27,7 +27,8 @@
 G_BEGIN_DECLS
 
 void empathy_account_widget_irc_build (EmpathyAccountWidget *self,
-                                       const char *filename);
+    const char *filename,
+    GtkWidget **table_common_settings);
 
 G_END_DECLS
 
diff --git a/libempathy-gtk/empathy-account-widget-sip.c b/libempathy-gtk/empathy-account-widget-sip.c
index afc20fe..db39dda 100644
--- a/libempathy-gtk/empathy-account-widget-sip.c
+++ b/libempathy-gtk/empathy-account-widget-sip.c
@@ -65,7 +65,8 @@ account_widget_sip_discover_stun_toggled_cb (
 
 void
 empathy_account_widget_sip_build (EmpathyAccountWidget *self,
-                                  const char *filename)
+    const char *filename,
+    GtkWidget **table_common_settings)
 {
   EmpathyAccountWidgetSip *settings;
   GtkWidget *vbox_settings;
@@ -92,6 +93,7 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
       settings->self = self;
 
       self->ui_details->gui = empathy_builder_get_file (filename,
+          "table_common_settings", table_common_settings,
           "vbox_sip_settings", &vbox_settings,
           "entry_stun-server", &settings->entry_stun_server,
           "spinbutton_stun-port", &settings->spinbutton_stun_part,
diff --git a/libempathy-gtk/empathy-account-widget-sip.h b/libempathy-gtk/empathy-account-widget-sip.h
index 435ad6e..6334a74 100644
--- a/libempathy-gtk/empathy-account-widget-sip.h
+++ b/libempathy-gtk/empathy-account-widget-sip.h
@@ -27,7 +27,8 @@
 G_BEGIN_DECLS
 
 void empathy_account_widget_sip_build (EmpathyAccountWidget *self,
-                                       const char *filename);
+    const char *filename,
+    GtkWidget **table_common_settings);
 
 G_END_DECLS
 
diff --git a/libempathy-gtk/empathy-account-widget-sip.ui b/libempathy-gtk/empathy-account-widget-sip.ui
index 84e68b0..65e1647 100644
--- a/libempathy-gtk/empathy-account-widget-sip.ui
+++ b/libempathy-gtk/empathy-account-widget-sip.ui
@@ -11,7 +11,7 @@
     <property name="visible">True</property>
     <property name="orientation">vertical</property>
     <child>
-      <object class="GtkTable" id="table1">
+      <object class="GtkTable" id="table_common_settings">
         <property name="visible">True</property>
         <property name="n_rows">2</property>
         <property name="n_columns">2</property>
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 7a72deb..aa1c672 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -702,6 +702,7 @@ account_widget_build_generic (EmpathyAccountWidget *self,
   GtkWidget *expander_advanced;
 
   self->ui_details->gui = empathy_builder_get_file (filename,
+      "table_common_settings", &priv->table_common_settings,
       "vbox_generic_settings", &self->ui_details->widget,
       "expander_advanced_settings", &expander_advanced,
       NULL);
@@ -722,7 +723,10 @@ static void
 account_widget_build_salut (EmpathyAccountWidget *self,
     const char *filename)
 {
+  EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+
   self->ui_details->gui = empathy_builder_get_file (filename,
+      "table_common_settings", &priv->table_common_settings,
       "vbox_salut_settings", &self->ui_details->widget,
       NULL);
 
@@ -760,6 +764,7 @@ account_widget_build_msn (EmpathyAccountWidget *self,
   else
     {
       self->ui_details->gui = empathy_builder_get_file (filename,
+          "table_common_msn_settings", &priv->table_common_settings,
           "vbox_msn_settings", &self->ui_details->widget,
           NULL);
 
@@ -864,6 +869,7 @@ account_widget_build_icq (EmpathyAccountWidget *self,
   else
     {
       self->ui_details->gui = empathy_builder_get_file (filename,
+          "table_common_settings", &priv->table_common_settings,
           "vbox_icq_settings", &self->ui_details->widget,
           "spinbutton_port", &spinbutton_port,
           NULL);
@@ -904,6 +910,7 @@ account_widget_build_aim (EmpathyAccountWidget *self,
   else
     {
       self->ui_details->gui = empathy_builder_get_file (filename,
+          "table_common_settings", &priv->table_common_settings,
           "vbox_aim_settings", &self->ui_details->widget,
           "spinbutton_port", &spinbutton_port,
           NULL);
@@ -942,6 +949,7 @@ account_widget_build_yahoo (EmpathyAccountWidget *self,
   else
     {
       self->ui_details->gui = empathy_builder_get_file (filename,
+          "table_common_settings", &priv->table_common_settings,
           "vbox_yahoo_settings", &self->ui_details->widget,
           NULL);
 
@@ -983,6 +991,7 @@ account_widget_build_groupwise (EmpathyAccountWidget *self,
   else
     {
       self->ui_details->gui = empathy_builder_get_file (filename,
+          "table_common_groupwise_settings", &priv->table_common_settings,
           "vbox_groupwise_settings", &self->ui_details->widget,
           NULL);
 
@@ -1117,9 +1126,13 @@ do_constructed (GObject *obj)
   else if (!tp_strdiff (priv->protocol, "groupwise"))
     account_widget_build_groupwise (self, filename);
   else if (!tp_strdiff (priv->protocol, "irc"))
-    empathy_account_widget_irc_build (self, filename);
+    empathy_account_widget_irc_build (self, filename,
+        &priv->table_common_settings);
   else if (!tp_strdiff (priv->protocol, "sip"))
-    empathy_account_widget_sip_build (self, filename);
+    empathy_account_widget_sip_build (self, filename,
+        &priv->table_common_settings);
+  else if (!tp_strdiff (priv->protocol, "generic"))
+    account_widget_build_generic (self, filename);
   else
     {
       g_free (filename);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]