[empathy] add a simple version of the Facebook widget



commit 6d2a11ac6fa575de2a4ed9e5f9fe239c2063e07f
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Feb 11 15:47:53 2010 +0000

    add a simple version of the Facebook widget

 libempathy-gtk/empathy-account-widget-jabber.ui |   93 +++++++++++++++++++++++
 libempathy-gtk/empathy-account-widget.c         |   17 ++++-
 2 files changed, 109 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-widget-jabber.ui b/libempathy-gtk/empathy-account-widget-jabber.ui
index 1e88cf1..e69c082 100644
--- a/libempathy-gtk/empathy-account-widget-jabber.ui
+++ b/libempathy-gtk/empathy-account-widget-jabber.ui
@@ -616,4 +616,97 @@ Use &lt;a href="http://www.facebook.com/username/"&gt;this page&lt;/a&gt; to def
       </packing>
     </child>
   </object>
+  <object class="GtkVBox" id="vbox_fb_simple">
+    <property name="visible">True</property>
+    <property name="orientation">vertical</property>
+    <child>
+      <object class="GtkLabel" id="label_id_fb_simple">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">What is your Facebook ID?</property>
+      </object>
+      <packing>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkAlignment" id="alignment_simple_fb_id">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="yalign">0</property>
+        <property name="xscale">0.34999999403953552</property>
+        <property name="yscale">0.34999999403953552</property>
+        <property name="top_padding">6</property>
+        <property name="bottom_padding">3</property>
+        <property name="left_padding">12</property>
+        <child>
+          <object class="GtkVBox" id="vbox2">
+            <property name="visible">True</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">4</property>
+            <child>
+              <object class="GtkEntry" id="entry_id_fb_simple">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">&#x2022;</property>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label_fb_example">
+                <property name="visible">True</property>
+                <property name="xalign">0.10000000149011612</property>
+                <property name="label" translatable="yes">If you are http://facebook.com/badger, enter badger.
+Use &lt;a href="http://www.facebook.com/username/"&gt;this page&lt;/a&gt; to define your Facebook alias.</property>
+                <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="label_password_fb_simple">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="ypad">6</property>
+        <property name="label" translatable="yes">What is your Facebook password?</property>
+      </object>
+      <packing>
+        <property name="position">2</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkAlignment" id="alignment3">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="yalign">0</property>
+        <property name="xscale">0.34999999403953552</property>
+        <property name="yscale">0.5</property>
+        <property name="left_padding">12</property>
+        <child>
+          <object class="GtkEntry" id="entry_password_fb_simple">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="visibility">False</property>
+            <property name="invisible_char">&#x2022;</property>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="position">3</property>
+      </packing>
+    </child>
+  </object>
 </interface>
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 0469f62..4124388 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -1069,7 +1069,22 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
 
       self->ui_details->default_focus = g_strdup ("entry_id_g_simple");
     }
-  /* TODO: Simple widget for Facebook */
+  else if (priv->simple && is_facebook)
+    {
+      /* Simple widget for Facebook */
+      self->ui_details->gui = empathy_builder_get_file (filename,
+          "vbox_fb_simple", &self->ui_details->widget,
+          "entry_id_fb_simple", &entry_id,
+          NULL);
+
+      empathy_account_widget_handle_params (self,
+          "entry_password_fb_simple", "password",
+          NULL);
+
+      setup_facebook_id_widget (self, entry_id);
+
+      self->ui_details->default_focus = g_strdup ("entry_id_fb_simple");
+    }
   else
     {
       /* Full widget for XMPP, Google Talk and Facebook*/



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