aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-02-20 23:44:18 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-02-20 23:44:18 +0800
commit06bf7c534fd270bfac0d20876f121cd8fd8cb9b8 (patch)
tree0882a371e7846367c19a6189c9ddcd2aeebfdcb9 /libempathy-gtk
parent5c02b9d19174d08134091edb7ef4be32aad46073 (diff)
downloadgsoc2013-empathy-06bf7c534fd270bfac0d20876f121cd8fd8cb9b8.tar
gsoc2013-empathy-06bf7c534fd270bfac0d20876f121cd8fd8cb9b8.tar.gz
gsoc2013-empathy-06bf7c534fd270bfac0d20876f121cd8fd8cb9b8.tar.bz2
gsoc2013-empathy-06bf7c534fd270bfac0d20876f121cd8fd8cb9b8.tar.lz
gsoc2013-empathy-06bf7c534fd270bfac0d20876f121cd8fd8cb9b8.tar.xz
gsoc2013-empathy-06bf7c534fd270bfac0d20876f121cd8fd8cb9b8.tar.zst
gsoc2013-empathy-06bf7c534fd270bfac0d20876f121cd8fd8cb9b8.zip
Add GUI to configure ICQ accounts. Fixes bug #513673 (Andreas Henriksson).
svn path=/trunk/; revision=656
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-widget-icq.glade258
-rw-r--r--libempathy-gtk/empathy-account-widget.c33
-rw-r--r--libempathy-gtk/empathy-account-widget.h1
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.c4
4 files changed, 296 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget-icq.glade b/libempathy-gtk/empathy-account-widget-icq.glade
new file mode 100644
index 000000000..0c0c114d1
--- /dev/null
+++ b/libempathy-gtk/empathy-account-widget-icq.glade
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
+<glade-interface>
+ <widget class="GtkWindow" id="account_icq_settings">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">ICQ account settings</property>
+ <property name="resizable">False</property>
+ <child>
+ <widget class="GtkVBox" id="vbox_icq_settings">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkTable" id="table_common_settings">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <widget 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>
+ </widget>
+ <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>
+ <widget class="GtkEntry" id="entry_uin">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">*</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_uin">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">ICQ _UIN:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry_uin</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_forget">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip" translatable="yes">Forget password and clear the entry.</property>
+ <property name="response_id">0</property>
+ <child>
+ <widget class="GtkImage" id="image834">
+ <property name="visible">True</property>
+ <property name="stock">gtk-clear</property>
+ <property name="icon_size">1</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <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>
+ <widget class="GtkLabel" id="label_password">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Pass_word:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry_password</property>
+ </widget>
+ <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>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkExpander" id="expander1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkTable" id="table_advanced_settings">
+ <property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <widget class="GtkEntry" id="entry_charset">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">*</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_charset">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Charset:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry_charset</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <widget class="GtkSpinButton" id="spinbutton_port">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">5222 0 65556 1 10 10</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <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>
+ <widget class="GtkEntry" id="entry_server">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">*</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_port">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Port:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">spinbutton_port</property>
+ </widget>
+ <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>
+ <widget class="GtkLabel" id="label_server">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Server:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry_server</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Override server settings&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Advanced&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</glade-interface>
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index f161a6788..b65219775 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -557,3 +557,36 @@ empathy_account_widget_jabber_new (McAccount *account)
return widget;
}
+GtkWidget *
+empathy_account_widget_icq_new (McAccount *account)
+{
+ GladeXML *glade;
+ GtkWidget *widget;
+ GtkWidget *spinbutton_port;
+
+ glade = empathy_glade_get_file ("empathy-account-widget-icq.glade",
+ "vbox_icq_settings",
+ NULL,
+ "vbox_icq_settings", &widget,
+ "spinbutton_port", &spinbutton_port,
+ NULL);
+
+ empathy_account_widget_handle_params (account, glade,
+ "entry_uin", "account",
+ "entry_password", "password",
+ "entry_server", "server",
+ "spinbutton_port", "port",
+ "entry_charset", "charset",
+ NULL);
+
+ emapthy_account_widget_add_forget_button (account, glade,
+ "button_forget",
+ "entry_password");
+
+ g_object_unref (glade);
+
+ gtk_widget_show (widget);
+
+ return widget;
+}
+
diff --git a/libempathy-gtk/empathy-account-widget.h b/libempathy-gtk/empathy-account-widget.h
index 25a65c183..8ba36c854 100644
--- a/libempathy-gtk/empathy-account-widget.h
+++ b/libempathy-gtk/empathy-account-widget.h
@@ -44,6 +44,7 @@ GtkWidget *empathy_account_widget_generic_new (McAccount *account);
GtkWidget *empathy_account_widget_salut_new (McAccount *account);
GtkWidget *empathy_account_widget_msn_new (McAccount *account);
GtkWidget *empathy_account_widget_jabber_new (McAccount *account);
+GtkWidget *empathy_account_widget_icq_new (McAccount *account);
G_END_DECLS
diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c
index 832063371..2131c9f18 100644
--- a/libempathy-gtk/empathy-accounts-dialog.c
+++ b/libempathy-gtk/empathy-accounts-dialog.c
@@ -274,6 +274,10 @@ accounts_dialog_update_account (EmpathyAccountsDialog *dialog,
dialog->settings_widget =
empathy_account_widget_irc_new (account);
}
+ else if (!tp_strdiff(config_ui, "icq")) {
+ dialog->settings_widget =
+ empathy_account_widget_icq_new (account);
+ }
else {
dialog->settings_widget =
empathy_account_widget_generic_new (account);