diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-03-08 13:33:24 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-03-11 22:55:17 +0800 |
commit | 48105100729d28bb09738d0c0a105e5570c4d784 (patch) | |
tree | 2ff4cf0f25dac2a5f89551815c03d90ead0f48de | |
parent | 0446e90f26668049c3d1f5419f2ee70a3b527b96 (diff) | |
download | gsoc2013-empathy-48105100729d28bb09738d0c0a105e5570c4d784.tar gsoc2013-empathy-48105100729d28bb09738d0c0a105e5570c4d784.tar.gz gsoc2013-empathy-48105100729d28bb09738d0c0a105e5570c4d784.tar.bz2 gsoc2013-empathy-48105100729d28bb09738d0c0a105e5570c4d784.tar.lz gsoc2013-empathy-48105100729d28bb09738d0c0a105e5570c4d784.tar.xz gsoc2013-empathy-48105100729d28bb09738d0c0a105e5570c4d784.tar.zst gsoc2013-empathy-48105100729d28bb09738d0c0a105e5570c4d784.zip |
Update Skype account widget per specification
-rw-r--r-- | data/Makefile.am | 7 | ||||
-rw-r--r-- | data/canonical-logo.png | bin | 0 -> 4272 bytes | |||
-rw-r--r-- | data/plugged-into-skype.png | bin | 0 -> 4045 bytes | |||
-rw-r--r-- | libempathy-gtk/empathy-account-widget-skype.ui | 220 | ||||
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 30 |
5 files changed, 227 insertions, 30 deletions
diff --git a/data/Makefile.am b/data/Makefile.am index a0c715550..98eefb973 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -55,6 +55,12 @@ clientfile_DATA = \ htmldir = $(datadir)/empathy html_DATA = Template.html +pixmapsdir = $(datadir)/empathy +pixmaps_DATA = \ + canonical-logo.png \ + plugged-into-skype.png \ + $(NULL) + EXTRA_DIST = \ $(convert_DATA) \ $(desktop_in_files) \ @@ -65,6 +71,7 @@ EXTRA_DIST = \ $(clientfile_DATA) \ $(servicefile_in_files) \ $(gsettings_files) \ + $(pixmaps_DATA) \ $(NULL) DISTCLEANFILES = \ diff --git a/data/canonical-logo.png b/data/canonical-logo.png Binary files differnew file mode 100644 index 000000000..3a1804128 --- /dev/null +++ b/data/canonical-logo.png diff --git a/data/plugged-into-skype.png b/data/plugged-into-skype.png Binary files differnew file mode 100644 index 000000000..670eda7ba --- /dev/null +++ b/data/plugged-into-skype.png diff --git a/libempathy-gtk/empathy-account-widget-skype.ui b/libempathy-gtk/empathy-account-widget-skype.ui index b823cca60..b89c82e0c 100644 --- a/libempathy-gtk/empathy-account-widget-skype.ui +++ b/libempathy-gtk/empathy-account-widget-skype.ui @@ -2,11 +2,12 @@ <interface> <requires lib="gtk+" version="2.16"/> <!-- interface-naming-policy project-wide --> - <object class="GtkVBox" id="vbox_skype_settings"> + <object class="GtkVBox" id="vbox_skype_settings_setup"> <property name="visible">True</property> + <property name="border_width">6</property> <property name="spacing">6</property> <child> - <object class="GtkTable" id="table_common_skype_settings"> + <object class="GtkTable" id="table_common_skype_settings_setup"> <property name="visible">True</property> <property name="n_rows">4</property> <property name="n_columns">2</property> @@ -32,7 +33,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">Skype name:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">entry_id</property> + <property name="mnemonic_widget">entry_id_setup</property> </object> <packing> <property name="x_options">GTK_FILL</property> @@ -40,7 +41,7 @@ </packing> </child> <child> - <object class="GtkEntry" id="entry_id"> + <object class="GtkEntry" id="entry_id_setup"> <property name="visible">True</property> <property name="can_focus">True</property> </object> @@ -51,7 +52,7 @@ </packing> </child> <child> - <object class="GtkEntry" id="entry_password"> + <object class="GtkEntry" id="entry_password_setup"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="visibility">False</property> @@ -104,33 +105,10 @@ Get one at <a href="http://www.skype.com/go/register">Skype.com</a>< <property name="position">0</property> </packing> </child> - <child> - <object class="GtkHButtonBox" id="hbuttonbox1"> - <property name="visible">True</property> - <property name="layout_style">start</property> - <child> - <object class="GtkButton" id="edit-privacy-settings-button"> - <property name="label" translatable="yes">Edit _Privacy Settings...</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> - </child> </object> <object class="GtkVBox" id="vbox_skype_simple"> <property name="visible">True</property> + <property name="border_width">6</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="label_id_simple"> @@ -490,4 +468,188 @@ Get one at <a href="http://www.skype.com/go/register">Skype.com</a>< <action-widget response="0">button1</action-widget> </action-widgets> </object> + <object class="GtkVBox" id="vbox_skype_settings"> + <property name="visible">True</property> + <property name="border_width">6</property> + <property name="spacing">6</property> + <child> + <object class="GtkTable" id="table_common_skype_settings"> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">2</property> + <property name="column_spacing">12</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkLabel" id="label_password1"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Pass_word:</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_id1"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Skype name:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">entry_id_setup</property> + </object> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <object class="GtkEntry" id="entry_id"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <object class="GtkEntry" id="entry_password"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="visibility">False</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <object class="GtkLinkButton" id="linkbutton2"> + <property name="label" translatable="yes">Change Password...</property> + <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="uri">https://secure.skype.com/account/personal/change-password</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkHButtonBox" id="hbuttonbox1"> + <property name="visible">True</property> + <property name="layout_style">start</property> + <child> + <object class="GtkButton" id="edit-privacy-settings-button"> + <property name="label" translatable="yes">Edit _Privacy Settings...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkImage" id="plugged-into-skype-logo"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="stock">gtk-missing-image</property> + </object> + <packing> + <property name="pack_type">end</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label10"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Empathy is plugged into Skype™, allowing free calls to Skype users. Skype is a trademark of Skype Limited or its related companies. This application has not been checked, verified, certified, or otherwise approved or endorsed by Skype Communications S.a.r.l. or any of their related companies.</property> + <property name="wrap">True</property> + </object> + <packing> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkHBox" id="hbox1"> + <property name="visible">True</property> + <child> + <object class="GtkImage" id="canonical-logo"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="stock">gtk-missing-image</property> + </object> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLinkButton" id="linkbutton1"> + <property name="label" translatable="yes">Canonical Support...</property> + <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="uri">http://canonical.com/support</property> + </object> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label11"> + <property name="visible">True</property> + <property name="xalign">0</property> + <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> + </packing> + </child> + </object> </interface> diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 1dfd3f176..1b942b3f3 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -1836,16 +1836,35 @@ account_widget_build_skype (EmpathyAccountWidget *self, self->ui_details->default_focus = g_strdup ("entry_id_simple"); } + else if (priv->creating_account) + { + /* 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, + NULL); + + empathy_account_widget_handle_params (self, + "entry_id_setup", "account", + "entry_password_setup", "password", + NULL); + + self->ui_details->default_focus = g_strdup ("entry_id_setup"); + } else { - GtkWidget *edit_privacy_settings_button; TpAccount *account = empathy_account_settings_get_account (priv->settings); + GtkWidget *edit_privacy_settings_button; + GtkWidget *plugged_into_skype_logo, *canonical_logo; + char *logo; self->ui_details->gui = empathy_builder_get_file (filename, "table_common_skype_settings", &priv->table_common_settings, "vbox_skype_settings", &self->ui_details->widget, "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, @@ -1859,6 +1878,15 @@ 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); + + logo = empathy_file_lookup ("canonical-logo.png", "data"); + gtk_image_set_from_file (GTK_IMAGE (canonical_logo), logo); + g_free (logo); + empathy_account_widget_handle_params (self, "entry_id", "account", "entry_password", "password", |