diff options
author | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2010-12-14 03:43:45 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-04-08 18:41:26 +0800 |
commit | 7b65bf4d60c158d0d4e164972db42e68395a106e (patch) | |
tree | 2f7f74d3e796c910b6c4961481c863c892aa4fb7 | |
parent | f19891b168ec7d5f67b54571a91b1118901c0771 (diff) | |
download | gsoc2013-empathy-7b65bf4d60c158d0d4e164972db42e68395a106e.tar gsoc2013-empathy-7b65bf4d60c158d0d4e164972db42e68395a106e.tar.gz gsoc2013-empathy-7b65bf4d60c158d0d4e164972db42e68395a106e.tar.bz2 gsoc2013-empathy-7b65bf4d60c158d0d4e164972db42e68395a106e.tar.lz gsoc2013-empathy-7b65bf4d60c158d0d4e164972db42e68395a106e.tar.xz gsoc2013-empathy-7b65bf4d60c158d0d4e164972db42e68395a106e.tar.zst gsoc2013-empathy-7b65bf4d60c158d0d4e164972db42e68395a106e.zip |
Add an Skype login widget
With links to register/change password
-rw-r--r-- | libempathy-gtk/Makefile.am | 1 | ||||
-rw-r--r-- | libempathy-gtk/empathy-account-widget-skype.ui | 248 | ||||
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 36 |
3 files changed, 285 insertions, 0 deletions
diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am index 50b5dc547..38e990c8c 100644 --- a/libempathy-gtk/Makefile.am +++ b/libempathy-gtk/Makefile.am @@ -202,6 +202,7 @@ ui_DATA = \ empathy-account-widget-yahoo.ui \ empathy-account-widget-groupwise.ui \ empathy-account-widget-aim.ui \ + empathy-account-widget-skype.ui \ empathy-status-preset-dialog.ui \ empathy-log-window.ui \ empathy-chat.ui \ diff --git a/libempathy-gtk/empathy-account-widget-skype.ui b/libempathy-gtk/empathy-account-widget-skype.ui new file mode 100644 index 000000000..563d91ee8 --- /dev/null +++ b/libempathy-gtk/empathy-account-widget-skype.ui @@ -0,0 +1,248 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <requires lib="gtk+" version="2.16"/> + <object class="GtkAdjustment" id="adjustment1"> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkVBox" id="vbox_skype_settings"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkTable" id="table_common_skype_settings"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="n_rows">4</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_password"> + <property name="visible">True</property> + <property name="can_focus">False</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">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_id"> + <property name="visible">True</property> + <property name="can_focus">False</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</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> + </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> + </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="y_options"></property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Don't have a Skype Name? +Get one at <a href="http://www.skype.com/go/register">Skype.com</a></property> + <property name="use_markup">True</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> + </packing> + </child> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes"><a href="https://login.skype.com/account/password-reset-request">Forgotten your password?</a></property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + </object> + <object class="GtkVBox" id="vbox_skype_simple"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="label_id_simple"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">What is your Skype Name?</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</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="bottom_padding">3</property> + <property name="left_padding">12</property> + <child> + <object class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">4</property> + <child> + <object class="GtkEntry" id="entry_id_simple"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_example"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0.10000000149011612</property> + <property name="label" translatable="yes">Don't have a Skype Name? +Get one at <a href="http://www.skype.com/go/register">Skype.com</a></property> + <property name="use_markup">True</property> + <attributes> + <attribute name="scale" value="0.80000000000000004"/> + </attributes> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_password_simple"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">What is your Skype password?</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</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="left_padding">12</property> + <child> + <object class="GtkVBox" id="vbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkEntry" id="entry_password_simple"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="visibility">False</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes"><a href="https://login.skype.com/account/password-reset-request">Forgotten your password?</a></property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <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 876f6a436..30bb5489f 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -1481,6 +1481,41 @@ account_widget_build_groupwise (EmpathyAccountWidget *self, } static void +account_widget_build_skype (EmpathyAccountWidget *self, + const char *filename) +{ + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); + + if (priv->simple) + { + self->ui_details->gui = empathy_builder_get_file (filename, + "vbox_skype_simple", &self->ui_details->widget, + NULL); + + empathy_account_widget_handle_params (self, + "entry_id_simple", "account", + "entry_password_simple", "password", + NULL); + + self->ui_details->default_focus = g_strdup ("entry_id_simple"); + } + else + { + self->ui_details->gui = empathy_builder_get_file (filename, + "table_common_skype_settings", &priv->table_common_settings, + "vbox_skype_settings", &self->ui_details->widget, + NULL); + + empathy_account_widget_handle_params (self, + "entry_id", "account", + "entry_password", "password", + NULL); + + self->ui_details->default_focus = g_strdup ("entry_id"); + } +} + +static void account_widget_destroy_cb (GtkWidget *widget, EmpathyAccountWidget *self) { @@ -1884,6 +1919,7 @@ do_constructed (GObject *obj) WIDGET (haze, groupwise), WIDGET (idle, irc), WIDGET (sofiasip, sip), + WIDGET (psyke, skype), }; cm_name = empathy_account_settings_get_cm (priv->settings); |