aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-07-29 04:30:01 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-07-29 04:30:01 +0800
commitbd9979c0dec6ae7abe770199a67906f3b188fd47 (patch)
treefbc252421291a3872d2e8d76daa0b4bdaea0abb1 /libempathy-gtk
parent19eacf8730a0ae8abb9fb7db4696ff4d67d86c5d (diff)
downloadgsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar.gz
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar.bz2
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar.lz
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar.xz
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar.zst
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.zip
Update the Enable/Disable button even if there is no account selected. Set
2007-07-28 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/empathy-accounts-dialog.glade: * libempathy-gtk/empathy-accounts-dialog.c: Update the Enable/Disable button even if there is no account selected. Set it insensitive if no account is selected. Fixes bug #459012. svn path=/trunk/; revision=207
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.c17
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.glade66
2 files changed, 70 insertions, 13 deletions
diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c
index 888b14c4d..2c1225eb4 100644
--- a/libempathy-gtk/empathy-accounts-dialog.c
+++ b/libempathy-gtk/empathy-accounts-dialog.c
@@ -159,15 +159,13 @@ static void accounts_dialog_destroy_cb (GtkWidget
static void
accounts_dialog_setup (EmpathyAccountsDialog *dialog)
{
- GtkTreeView *view;
- GtkListStore *store;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- GList *accounts, *l;
+ GtkTreeView *view;
+ GtkListStore *store;
+ GtkTreeIter iter;
+ GList *accounts, *l;
view = GTK_TREE_VIEW (dialog->treeview);
store = GTK_LIST_STORE (gtk_tree_view_get_model (view));
- selection = gtk_tree_view_get_selection (view);
accounts = mc_accounts_list ();
@@ -215,12 +213,9 @@ accounts_dialog_update_connect_button (EmpathyAccountsDialog *dialog)
account = accounts_dialog_model_get_selected (dialog);
- if (!account) {
- gtk_widget_set_sensitive (dialog->button_connect, FALSE);
- return;
- }
+ gtk_widget_set_sensitive (dialog->button_connect, account != NULL);
- if (mc_account_is_enabled (account)) {
+ if (account && mc_account_is_enabled (account)) {
label = _("Disable");
stock_id = GTK_STOCK_DISCONNECT;
} else {
diff --git a/libempathy-gtk/empathy-accounts-dialog.glade b/libempathy-gtk/empathy-accounts-dialog.glade
index 05ba64f80..f0f1b567e 100644
--- a/libempathy-gtk/empathy-accounts-dialog.glade
+++ b/libempathy-gtk/empathy-accounts-dialog.glade
@@ -106,10 +106,72 @@
<widget class="GtkButton" id="button_connect">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label">gtk-connect</property>
- <property name="use_stock">False</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment30">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox182">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">2</property>
+
+ <child>
+ <widget class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="stock">gtk-connect</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label644">
+ <property name="visible">True</property>
+ <property name="label">Enable</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
<property name="padding">0</property>