changeset 7758:71fea13c6fb8

[gaim-migrate @ 8403] Set the buttons in the account editor to be insensitive when nothing is selected. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 05 Dec 2003 08:45:05 +0000
parents 72727edb37ef
children 3ad0811cf62e
files src/gtkaccount.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkaccount.c	Fri Dec 05 05:22:18 2003 +0000
+++ b/src/gtkaccount.c	Fri Dec 05 08:45:05 2003 +0000
@@ -1837,8 +1837,12 @@
 static void
 account_selected_cb(GtkTreeSelection *sel, AccountsWindow *dialog)
 {
-	gtk_widget_set_sensitive(dialog->modify_button, TRUE);
-	gtk_widget_set_sensitive(dialog->delete_button, TRUE);
+	gboolean sensitive;
+
+	sensitive = gtk_tree_selection_get_selected(sel, NULL, NULL);
+
+	gtk_widget_set_sensitive(dialog->modify_button, sensitive);
+	gtk_widget_set_sensitive(dialog->delete_button, sensitive);
 }
 
 static GtkWidget *