[evolution-patches] Bugfix: 57631



This patch set sentive or insentive of remove button and add button
each time the source is selected.

Regards
? filter/filter-errors.xml
Index: filter/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/filter/ChangeLog,v
retrieving revision 1.403
diff -u -r1.403 ChangeLog
--- a/filter/ChangeLog	28 Apr 2004 06:38:20 -0000	1.403
+++ b/filter/ChangeLog	2 May 2004 18:43:58 -0000
@@ -1,3 +1,7 @@
+2004-05-02  Edgar Luna Díaz  <eald linuxuanl org>
+
+	* vfolder-rule.c (select_source_with_changed): Fix #57631
+
 2004-04-28  Not Zed  <NotZed Ximian com>
 
 	* filter-option.c (filter_option_add): fix a warning.
Index: filter/vfolder-rule.c
===================================================================
RCS file: /cvs/gnome/evolution/filter/vfolder-rule.c,v
retrieving revision 1.45
diff -u -r1.45 vfolder-rule.c
--- a/filter/vfolder-rule.c	28 Apr 2004 06:38:20 -0000	1.45
+++ b/filter/vfolder-rule.c	2 May 2004 18:43:58 -0000
@@ -392,6 +392,13 @@
 }
 
 static void
+set_insensitive (struct _source_data *data)
+{
+	gtk_widget_set_sensitive ((GtkWidget *) data->buttons[BUTTON_ADD], FALSE);
+	gtk_widget_set_sensitive ((GtkWidget *) data->buttons[BUTTON_REMOVE], FALSE);
+}
+
+static void
 select_source (GtkWidget *list, struct _source_data *data)
 {
 	GtkTreeViewColumn *column;
@@ -415,6 +422,11 @@
 	with = gtk_option_menu_get_history((GtkOptionMenu *)widget);
 	if (with < VFOLDER_RULE_WITH_SPECIFIC || with > VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)
 		with = 0;
+	if (with == VFOLDER_RULE_WITH_SPECIFIC)
+		set_sensitive(data);
+	else
+		set_insensitive(data);
+
 	data->vr->with = with;
 }
 
-- 
Edgar A. Luna Díaz - http://linuxuanl.org
Fingerprint: C008 5EAC 5272 AC8C 7589  4821 8B34 6166 8733 8310


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]