[evolution-patches] UI : Patch for Bug # 263207




      have added the patch for the bug # 263207.

      Disables the OK button of the Advanced Search Dialog if the last criteria is removed using the remove button.

     and enables the OK button if the first criteria is added to the search.


--
Luv,
S.Antony Vincent Pandian
--- /home/evolution/Antony/filter_bar_bug/filter-rule.c	2005-08-28 20:51:13.000000000 +0530
+++ filter-rule.c	2005-08-28 21:30:59.489982632 +0530
@@ -685,8 +685,11 @@ less_parts (GtkWidget *button, struct _r
 	FilterPart *part;
 	GtkWidget *rule;
 
-	if (g_list_length (data->fr->parts) < 2)
-		return;
+	if (g_list_length (data->fr->parts) < 2){
+		GtkWidget *dialog;
+		dialog = gtk_widget_get_toplevel (button);
+		gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE);
+	}
 	
 	rule = g_object_get_data ((GObject *) button, "rule");
 	part = g_object_get_data ((GObject *) rule, "part");
@@ -735,6 +738,11 @@ more_parts (GtkWidget *button, struct _r
 			return;
 	}
 	
+	if (g_list_length (data->fr->parts) < 1){
+		GtkWidget *dialog;
+		dialog = gtk_widget_get_toplevel (button);
+		gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, TRUE);
+	}
 	/* create a new rule entry, use the first type of rule */
 	new = rule_context_next_part (data->f, NULL);
 	if (new) {
--- /home/evolution/Antony/filter_bar_bug/ChangeLog_filter	2005-08-28 21:25:06.522641824 +0530
+++ ChangeLog	2005-08-28 21:29:13.729060736 +0530
@@ -1,3 +1,11 @@
+2005-08-28  S.Antony Vincent Pandian <santony gmail com>
+
+	* filter-rule.c : Get the dialog window and disable the ok button if 
+	the last remove button is pressed and enable the ok button if a
+	criteria is added as the first one.
+
+	Fixes #263207
+
 2005-05-16  Not Zed  <NotZed Ximian com>
 
 	* moved e-error to e-util


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