aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-03-09 11:09:11 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-03-19 02:49:54 +0800
commit40e45123af878fd706dbeff941069d8cf83cf66c (patch)
tree1dd31cfd5e1b3285329294256721d258c564968e
parenta77d7f827d5c120adbac5b7954af755177178185 (diff)
downloadgsoc2013-empathy-40e45123af878fd706dbeff941069d8cf83cf66c.tar
gsoc2013-empathy-40e45123af878fd706dbeff941069d8cf83cf66c.tar.gz
gsoc2013-empathy-40e45123af878fd706dbeff941069d8cf83cf66c.tar.bz2
gsoc2013-empathy-40e45123af878fd706dbeff941069d8cf83cf66c.tar.lz
gsoc2013-empathy-40e45123af878fd706dbeff941069d8cf83cf66c.tar.xz
gsoc2013-empathy-40e45123af878fd706dbeff941069d8cf83cf66c.tar.zst
gsoc2013-empathy-40e45123af878fd706dbeff941069d8cf83cf66c.zip
Add Plugged into Skype info to the add-account dialog too
-rw-r--r--libempathy-gtk/empathy-account-widget-skype.c43
-rw-r--r--libempathy-gtk/empathy-account-widget-skype.ui26
2 files changed, 47 insertions, 22 deletions
diff --git a/libempathy-gtk/empathy-account-widget-skype.c b/libempathy-gtk/empathy-account-widget-skype.c
index dcbef165f..228e5760b 100644
--- a/libempathy-gtk/empathy-account-widget-skype.c
+++ b/libempathy-gtk/empathy-account-widget-skype.c
@@ -403,6 +403,19 @@ account_widget_skype_privacy_settings (GtkWidget *button,
gtk_widget_destroy (dialog);
}
+static void
+account_widget_build_skype_set_pixmap (GtkBuilder *gui,
+ const char *widget,
+ const char *file)
+{
+ GtkImage *image = GTK_IMAGE (gtk_builder_get_object (gui, widget));
+ char *filename = empathy_file_lookup (file, "data");
+
+ gtk_image_set_from_file (image, filename);
+
+ g_free (filename);
+}
+
void
empathy_account_widget_build_skype (EmpathyAccountWidget *self,
const char *filename)
@@ -411,12 +424,23 @@ empathy_account_widget_build_skype (EmpathyAccountWidget *self,
if (priv->simple || priv->creating_account)
{
+ GtkWidget *skype_info;
+
/* if we don't have an account it means we're doing the initial setup */
self->ui_details->gui = empathy_builder_get_file (filename,
"table_common_skype_settings_setup", &priv->table_common_settings,
"vbox_skype_settings_setup", &self->ui_details->widget,
+ "skype-info-vbox", &skype_info,
NULL);
+ account_widget_build_skype_set_pixmap (self->ui_details->gui,
+ "plugged-into-skype-logo", "plugged-into-skype.png");
+ account_widget_build_skype_set_pixmap (self->ui_details->gui,
+ "canonical-logo", "canonical-logo.png");
+
+ gtk_box_pack_end (GTK_BOX (self->ui_details->widget), skype_info,
+ TRUE, TRUE, 0);
+
empathy_account_widget_handle_params (self,
"entry_id_setup", "account",
"entry_password_setup", "password",
@@ -428,16 +452,13 @@ empathy_account_widget_build_skype (EmpathyAccountWidget *self,
{
TpAccount *account =
empathy_account_settings_get_account (priv->settings);
- GtkWidget *edit_privacy_settings_button;
- GtkWidget *plugged_into_skype_logo, *canonical_logo;
- char *logo;
+ GtkWidget *edit_privacy_settings_button, *skype_info;
self->ui_details->gui = empathy_builder_get_file (filename,
"table_common_skype_settings", &priv->table_common_settings,
"vbox_skype_settings", &self->ui_details->widget,
+ "skype-info-vbox", &skype_info,
"edit-privacy-settings-button", &edit_privacy_settings_button,
- "plugged-into-skype-logo", &plugged_into_skype_logo,
- "canonical-logo", &canonical_logo,
NULL);
empathy_builder_connect (self->ui_details->gui, self,
@@ -451,13 +472,13 @@ empathy_account_widget_build_skype (EmpathyAccountWidget *self,
else
gtk_widget_set_sensitive (edit_privacy_settings_button, FALSE);
- logo = empathy_file_lookup ("plugged-into-skype.png", "data");
- gtk_image_set_from_file (GTK_IMAGE (plugged_into_skype_logo), logo);
- g_free (logo);
+ account_widget_build_skype_set_pixmap (self->ui_details->gui,
+ "plugged-into-skype-logo", "plugged-into-skype.png");
+ account_widget_build_skype_set_pixmap (self->ui_details->gui,
+ "canonical-logo", "canonical-logo.png");
- logo = empathy_file_lookup ("canonical-logo.png", "data");
- gtk_image_set_from_file (GTK_IMAGE (canonical_logo), logo);
- g_free (logo);
+ gtk_box_pack_end (GTK_BOX (self->ui_details->widget), skype_info,
+ TRUE, TRUE, 0);
empathy_account_widget_handle_params (self,
"entry_id", "account",
diff --git a/libempathy-gtk/empathy-account-widget-skype.ui b/libempathy-gtk/empathy-account-widget-skype.ui
index 4d2cfebc7..b2d8c588d 100644
--- a/libempathy-gtk/empathy-account-widget-skype.ui
+++ b/libempathy-gtk/empathy-account-widget-skype.ui
@@ -450,7 +450,7 @@ Get one at &lt;a href="http://www.skype.com/go/register"&gt;Skype.com&lt;/a&gt;<
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -474,9 +474,13 @@ Get one at &lt;a href="http://www.skype.com/go/register"&gt;Skype.com&lt;/a&gt;<
</object>
<packing>
<property name="expand">False</property>
- <property name="position">5</property>
+ <property name="position">1</property>
</packing>
</child>
+ </object>
+ <object class="GtkVBox" id="skype-info-vbox">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkImage" id="plugged-into-skype-logo">
<property name="visible">True</property>
@@ -484,8 +488,8 @@ Get one at &lt;a href="http://www.skype.com/go/register"&gt;Skype.com&lt;/a&gt;<
<property name="stock">gtk-missing-image</property>
</object>
<packing>
- <property name="pack_type">end</property>
- <property name="position">3</property>
+ <property name="expand">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -496,8 +500,8 @@ Get one at &lt;a href="http://www.skype.com/go/register"&gt;Skype.com&lt;/a&gt;<
<property name="wrap">True</property>
</object>
<packing>
- <property name="pack_type">end</property>
- <property name="position">2</property>
+ <property name="expand">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -519,7 +523,7 @@ Get one at &lt;a href="http://www.skype.com/go/register"&gt;Skype.com&lt;/a&gt;<
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
+ <property name="relief">none</property>
<property name="uri">http://canonical.com/support</property>
</object>
<packing>
@@ -529,8 +533,8 @@ Get one at &lt;a href="http://www.skype.com/go/register"&gt;Skype.com&lt;/a&gt;<
</child>
</object>
<packing>
- <property name="pack_type">end</property>
- <property name="position">1</property>
+ <property name="expand">False</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -540,8 +544,8 @@ Get one at &lt;a href="http://www.skype.com/go/register"&gt;Skype.com&lt;/a&gt;<
<property name="label" translatable="yes">Canonical provides technical support for Empathy on Ubuntu.</property>
</object>
<packing>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="expand">False</property>
+ <property name="position">3</property>
</packing>
</child>
</object>