From 3479e2bafb401bd4cd7fc3332c52c3c3cbdc8ba0 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 16 Mar 2010 16:05:53 +0100 Subject: remove forget button --- libempathy-gtk/empathy-account-widget-aim.ui | 35 ++---------- libempathy-gtk/empathy-account-widget-groupwise.ui | 63 ++++++---------------- libempathy-gtk/empathy-account-widget-icq.ui | 35 ++---------- libempathy-gtk/empathy-account-widget-jabber.ui | 26 +-------- libempathy-gtk/empathy-account-widget-msn.ui | 63 ++++++---------------- libempathy-gtk/empathy-account-widget-private.h | 1 - libempathy-gtk/empathy-account-widget-sip.c | 1 - libempathy-gtk/empathy-account-widget-sip.ui | 40 -------------- libempathy-gtk/empathy-account-widget-yahoo.ui | 35 ++---------- libempathy-gtk/empathy-account-widget.c | 60 --------------------- 10 files changed, 51 insertions(+), 308 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-account-widget-aim.ui b/libempathy-gtk/empathy-account-widget-aim.ui index 63d894625..e564e9d07 100644 --- a/libempathy-gtk/empathy-account-widget-aim.ui +++ b/libempathy-gtk/empathy-account-widget-aim.ui @@ -16,7 +16,7 @@ True 3 - 3 + 2 12 6 @@ -47,28 +47,6 @@ - - - True - True - True - - - True - gtk-clear - 1 - - - - - 2 - 3 - 2 - 3 - - - - True @@ -77,7 +55,7 @@ 1 - 3 + 2 @@ -96,12 +74,6 @@ - - - - - - True @@ -120,6 +92,9 @@ 2 + + + False diff --git a/libempathy-gtk/empathy-account-widget-groupwise.ui b/libempathy-gtk/empathy-account-widget-groupwise.ui index da1e171d4..6485f59f6 100644 --- a/libempathy-gtk/empathy-account-widget-groupwise.ui +++ b/libempathy-gtk/empathy-account-widget-groupwise.ui @@ -18,49 +18,6 @@ 2 12 6 - - - True - 2 - - - True - True - False - - - - 0 - - - - - True - True - True - - - True - gtk-clear - 1 - - - - - False - False - 1 - - - - - 1 - 2 - 2 - 3 - - - True @@ -100,9 +57,6 @@ - - - True @@ -121,6 +75,23 @@ 2 + + + + + + True + True + False + + + + 1 + 2 + 2 + 3 + + False diff --git a/libempathy-gtk/empathy-account-widget-icq.ui b/libempathy-gtk/empathy-account-widget-icq.ui index f889fd050..1b989b734 100644 --- a/libempathy-gtk/empathy-account-widget-icq.ui +++ b/libempathy-gtk/empathy-account-widget-icq.ui @@ -16,7 +16,7 @@ True 3 - 3 + 2 12 6 @@ -47,28 +47,6 @@ - - - True - True - True - - - True - gtk-clear - 1 - - - - - 2 - 3 - 2 - 3 - - - - True @@ -77,7 +55,7 @@ 1 - 3 + 2 @@ -96,12 +74,6 @@ - - - - - - True @@ -120,6 +92,9 @@ 2 + + + False diff --git a/libempathy-gtk/empathy-account-widget-jabber.ui b/libempathy-gtk/empathy-account-widget-jabber.ui index 746e038a2..7dd33684e 100644 --- a/libempathy-gtk/empathy-account-widget-jabber.ui +++ b/libempathy-gtk/empathy-account-widget-jabber.ui @@ -22,7 +22,7 @@ True 3 - 3 + 2 12 6 @@ -48,7 +48,7 @@ 1 - 3 + 2 @@ -65,28 +65,6 @@ - - - True - True - True - - - True - gtk-clear - 1 - - - - - 2 - 3 - 2 - 3 - GTK_FILL - - - True diff --git a/libempathy-gtk/empathy-account-widget-msn.ui b/libempathy-gtk/empathy-account-widget-msn.ui index 807bfbc4a..e6f6dc64d 100644 --- a/libempathy-gtk/empathy-account-widget-msn.ui +++ b/libempathy-gtk/empathy-account-widget-msn.ui @@ -18,49 +18,6 @@ 2 12 6 - - - True - 2 - - - True - True - False - - - - 0 - - - - - True - True - True - - - True - gtk-clear - 1 - - - - - False - False - 1 - - - - - 1 - 2 - 2 - 3 - - - True @@ -100,9 +57,6 @@ - - - True @@ -121,6 +75,23 @@ 2 + + + + + + True + True + False + + + + 1 + 2 + 2 + 3 + + False diff --git a/libempathy-gtk/empathy-account-widget-private.h b/libempathy-gtk/empathy-account-widget-private.h index 567898bdb..db8dc7ddf 100644 --- a/libempathy-gtk/empathy-account-widget-private.h +++ b/libempathy-gtk/empathy-account-widget-private.h @@ -34,7 +34,6 @@ struct _EmpathyAccountWidgetUIDetails { GtkBuilder *gui; char *default_focus; - gboolean add_forget; }; diff --git a/libempathy-gtk/empathy-account-widget-sip.c b/libempathy-gtk/empathy-account-widget-sip.c index cc32cde8c..5058f6ade 100644 --- a/libempathy-gtk/empathy-account-widget-sip.c +++ b/libempathy-gtk/empathy-account-widget-sip.c @@ -165,7 +165,6 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self, account_widget_sip_discover_stun_toggled_cb, NULL); - self->ui_details->add_forget = TRUE; self->ui_details->default_focus = g_strdup ("entry_userid"); /* Create the 'transport' combo box. The first column has to contain the diff --git a/libempathy-gtk/empathy-account-widget-sip.ui b/libempathy-gtk/empathy-account-widget-sip.ui index 06504252c..e6a96526d 100644 --- a/libempathy-gtk/empathy-account-widget-sip.ui +++ b/libempathy-gtk/empathy-account-widget-sip.ui @@ -57,46 +57,6 @@ - - - True - - - True - True - - - - 0 - - - - - True - True - True - - - True - gtk-clear - 1 - - - - - False - 1 - - - - - 1 - 2 - 2 - 3 - - - True diff --git a/libempathy-gtk/empathy-account-widget-yahoo.ui b/libempathy-gtk/empathy-account-widget-yahoo.ui index c595a3430..c985458bb 100644 --- a/libempathy-gtk/empathy-account-widget-yahoo.ui +++ b/libempathy-gtk/empathy-account-widget-yahoo.ui @@ -17,7 +17,7 @@ True 3 - 3 + 2 12 6 @@ -35,28 +35,6 @@ - - - True - True - True - - - True - gtk-clear - 1 - - - - - 2 - 3 - 2 - 3 - GTK_FILL - - - True @@ -78,7 +56,7 @@ 1 - 3 + 2 @@ -97,12 +75,6 @@ - - - - - - True @@ -121,6 +93,9 @@ 2 + + + False diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 1c20e9fe3..23f2760b3 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -60,7 +60,6 @@ typedef struct { GtkWidget *apply_button; GtkWidget *cancel_button; GtkWidget *entry_password; - GtkWidget *button_forget; GtkWidget *spinbutton_port; GtkWidget *enabled_checkbox; GtkWidget *radiobutton_reuse; @@ -259,36 +258,6 @@ account_widget_checkbutton_toggled_cb (GtkWidget *widget, empathy_account_widget_changed (self); } -static void -account_widget_forget_clicked_cb (GtkWidget *button, - EmpathyAccountWidget *self) -{ - EmpathyAccountWidgetPriv *priv = GET_PRIV (self); - const gchar *param_name; - - param_name = g_object_get_data (G_OBJECT (priv->entry_password), - "param_name"); - - DEBUG ("Unset %s", param_name); - empathy_account_settings_unset (priv->settings, param_name); - gtk_entry_set_text (GTK_ENTRY (priv->entry_password), ""); - - empathy_account_widget_changed (self); -} - -static void -account_widget_password_changed_cb (GtkWidget *entry, - EmpathyAccountWidget *self) -{ - EmpathyAccountWidgetPriv *priv = GET_PRIV (self); - const gchar *str; - - str = gtk_entry_get_text (GTK_ENTRY (entry)); - gtk_widget_set_sensitive (priv->button_forget, !EMP_STR_EMPTY (str)); - - priv->contains_pending_changes = TRUE; -} - static void account_widget_jabber_ssl_toggled_cb (GtkWidget *checkbutton_ssl, EmpathyAccountWidget *self) @@ -978,7 +947,6 @@ account_widget_build_msn (EmpathyAccountWidget *self, NULL); self->ui_details->default_focus = g_strdup ("entry_id"); - self->ui_details->add_forget = TRUE; } } @@ -1177,7 +1145,6 @@ account_widget_build_jabber (EmpathyAccountWidget *self, } self->ui_details->default_focus = g_strdup ("entry_id"); - self->ui_details->add_forget = TRUE; priv->spinbutton_port = spinbutton_port; g_signal_connect (checkbutton_ssl, "toggled", @@ -1235,7 +1202,6 @@ account_widget_build_icq (EmpathyAccountWidget *self, NULL); self->ui_details->default_focus = g_strdup ("entry_uin"); - self->ui_details->add_forget = TRUE; } } @@ -1275,7 +1241,6 @@ account_widget_build_aim (EmpathyAccountWidget *self, NULL); self->ui_details->default_focus = g_strdup ("entry_screenname"); - self->ui_details->add_forget = TRUE; } } @@ -1317,7 +1282,6 @@ account_widget_build_yahoo (EmpathyAccountWidget *self, NULL); self->ui_details->default_focus = g_strdup ("entry_id"); - self->ui_details->add_forget = TRUE; } } @@ -1355,7 +1319,6 @@ account_widget_build_groupwise (EmpathyAccountWidget *self, NULL); self->ui_details->default_focus = g_strdup ("entry_id"); - self->ui_details->add_forget = TRUE; } } @@ -1737,29 +1700,6 @@ do_constructed (GObject *obj) NULL); } - /* handle forget button */ - if (self->ui_details->add_forget) - { - const gchar *password = NULL; - - priv->button_forget = GTK_WIDGET (gtk_builder_get_object - (self->ui_details->gui, "button_forget")); - priv->entry_password = GTK_WIDGET (gtk_builder_get_object - (self->ui_details->gui, "entry_password")); - - password = empathy_account_settings_get_string (priv->settings, - "password"); - gtk_widget_set_sensitive (priv->button_forget, - !EMP_STR_EMPTY (password)); - - g_signal_connect (priv->button_forget, "clicked", - G_CALLBACK (account_widget_forget_clicked_cb), - self); - g_signal_connect (priv->entry_password, "changed", - G_CALLBACK (account_widget_password_changed_cb), - self); - } - /* dup and init the account-manager */ priv->account_manager = tp_account_manager_dup (); -- cgit v1.2.3