From 824dd8a4f0bba86f78df499448e818f5998a96e5 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 27 Mar 2008 07:38:17 +0000 Subject: Add GUI to configure groupwise account. Fixes bug #522862 (Vincent Untz). svn path=/trunk/; revision=827 --- libempathy-gtk/Makefile.am | 1 + .../empathy-account-widget-groupwise.glade | 192 +++++++++++++++++++++ libempathy-gtk/empathy-account-widget.c | 34 ++++ libempathy-gtk/empathy-account-widget.h | 1 + libempathy-gtk/empathy-accounts-dialog.c | 4 + 5 files changed, 232 insertions(+) create mode 100644 libempathy-gtk/empathy-account-widget-groupwise.glade (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am index 1b9a24500..20613ab48 100644 --- a/libempathy-gtk/Makefile.am +++ b/libempathy-gtk/Makefile.am @@ -115,6 +115,7 @@ glade_DATA = \ empathy-account-widget-irc.glade \ empathy-account-widget-icq.glade \ empathy-account-widget-yahoo.glade \ + empathy-account-widget-groupwise.glade \ empathy-group-chat.glade \ empathy-spell-dialog.glade \ empathy-log-window.glade \ diff --git a/libempathy-gtk/empathy-account-widget-groupwise.glade b/libempathy-gtk/empathy-account-widget-groupwise.glade new file mode 100644 index 000000000..94d7b542a --- /dev/null +++ b/libempathy-gtk/empathy-account-widget-groupwise.glade @@ -0,0 +1,192 @@ + + + + + + True + groupwise account settings + False + + + True + 6 + + + True + 2 + 2 + 6 + 6 + + + True + 2 + + + True + True + False + + + + + True + True + Forget password and clear the entry. + 0 + + + True + gtk-clear + 1 + + + + + False + False + 1 + + + + + 1 + 2 + 1 + 2 + + + + + + True + 0 + Pass_word: + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Login I_D: + True + entry_id + + + GTK_FILL + + + + + + True + True + + + 1 + 2 + + + + + + False + + + + + True + True + + + True + 2 + 2 + 6 + 6 + + + True + 0 + _Port: + True + spinbutton_port + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + _Server: + True + entry_server + + + GTK_FILL + + + + + + True + True + + + 1 + 2 + + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 0 65536 1 10 10 + 1 + True + + + 1 + 2 + 1 + 2 + + + + + + + + True + <b>Advanced</b> + True + + + label_item + + + + + False + False + 1 + + + + + + diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index a22949235..4550e9ec3 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -709,3 +709,37 @@ empathy_account_widget_yahoo_new (McAccount *account) return widget; } +GtkWidget * +empathy_account_widget_groupwise_new (McAccount *account) +{ + GladeXML *glade; + GtkWidget *widget; + gchar *filename; + + filename = empathy_file_lookup ("empathy-account-widget-groupwise.glade", + "libempathy-gtk"); + glade = empathy_glade_get_file (filename, + "vbox_groupwise_settings", + NULL, + "vbox_groupwise_settings", &widget, + NULL); + g_free (filename); + + empathy_account_widget_handle_params (account, glade, + "entry_id", "account", + "entry_password", "password", + "entry_server", "server", + "spinbutton_port", "port", + NULL); + + empathy_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 b7ebb6742..5c5940fab 100644 --- a/libempathy-gtk/empathy-account-widget.h +++ b/libempathy-gtk/empathy-account-widget.h @@ -47,6 +47,7 @@ GtkWidget *empathy_account_widget_jabber_new (McAccount *account); GtkWidget *empathy_account_widget_icq_new (McAccount *account); GtkWidget *empathy_account_widget_yahoo_new (McAccount *account); GtkWidget *empathy_account_widget_sip_new (McAccount *account); +GtkWidget *empathy_account_widget_groupwise_new (McAccount *account); G_END_DECLS diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c index 75b3c5472..784bd2b2c 100644 --- a/libempathy-gtk/empathy-accounts-dialog.c +++ b/libempathy-gtk/empathy-accounts-dialog.c @@ -285,6 +285,10 @@ accounts_dialog_update_account (EmpathyAccountsDialog *dialog, dialog->settings_widget = empathy_account_widget_sip_new (account); } + else if (!tp_strdiff (config_ui, "groupwise")) { + dialog->settings_widget = + empathy_account_widget_groupwise_new (account); + } else { dialog->settings_widget = empathy_account_widget_generic_new (account); -- cgit v1.2.3