[evolution-patches] patch for bug 310856



Please review and tell me whether it's good enough.


Do you Yahoo!?
With a free 1 GB, there's more in store with Yahoo! Mail.
Index: misc/e-filter-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-filter-bar.c,v
retrieving revision 1.54
diff -u -p -r1.54 e-filter-bar.c
--- misc/e-filter-bar.c	20 Dec 2005 10:33:29 -0000	1.54
+++ misc/e-filter-bar.c	26 Jan 2006 20:46:45 -0000
@@ -70,6 +70,15 @@ rule_editor_destroyed (EFilterBar *efb, 
 	gtk_widget_set_sensitive (E_SEARCH_BAR (efb)->entry, TRUE);
 }
 
+
+static void
+advanced_dialog_destroyed(EFilterBar *efb,GObject *data)
+{
+	efb->save_dialog=NULL;
+	e_search_bar_set_menu_sensitive(E_SEARCH_BAR (efb), E_FILTERBAR_SAVE_ID, TRUE);
+
+}
+
 /* FIXME: need to update the popup menu to match any edited rules, sigh */
 static void
 full_rule_editor_response (GtkWidget *dialog, int response, void *data)
@@ -124,7 +133,7 @@ rule_advanced_response (GtkWidget *dialo
 
 			gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
 			gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED]));
-				
+  				
 			if (response == GTK_RESPONSE_APPLY) {
 				if (!rule_context_find_rule (efb->context, rule->name, rule->source))
 					rule_context_add_rule (efb->context, rule);
@@ -134,8 +143,14 @@ rule_advanced_response (GtkWidget *dialo
 		}
 	}
 	
-	if (response != GTK_RESPONSE_APPLY)
+	if (response == GTK_RESPONSE_CANCEL){
+		g_object_weak_unref ((GObject *) dialog, (GWeakNotify) rule_editor_destroyed, efb);
+		g_object_weak_ref ((GObject *) dialog, (GWeakNotify) advanced_dialog_destroyed, efb);
 		gtk_widget_destroy (dialog);
+	}
+
+	if(response==GTK_RESPONSE_OK)
+		gtk_widget_destroy(dialog);
 }
 
 static void
@@ -182,7 +197,6 @@ do_advanced (ESearchBar *esb)
 		
 		e_search_bar_set_menu_sensitive (esb, E_FILTERBAR_SAVE_ID, FALSE);
 		gtk_widget_set_sensitive (esb->entry, FALSE);
-		
 		gtk_widget_show (dialog);
 	}
 }
@@ -262,7 +276,6 @@ menubar_activated (ESearchBar *esb, int 
 			g_string_free (out, TRUE);
 #endif
 			efb->current_query = (FilterRule *)efb->menu_rules->pdata[id - efb->menu_base];
-			
 			efb->setquery = TRUE;
 			e_search_bar_set_item_id (esb, E_FILTERBAR_ADVANCED_ID);
 			efb->setquery = FALSE;
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/widgets/ChangeLog,v
retrieving revision 1.152
diff -u -p -r1.152 ChangeLog
--- ChangeLog	20 Dec 2005 15:16:13 -0000	1.152
+++ ChangeLog	26 Jan 2006 20:47:08 -0000
@@ -1,3 +1,8 @@
+2005-01-27  Oswald Rodrigues <ozzy_rodrigues novell com>
+	** Fixes bug #310856
+
+	* misc/e-filter-bar.c:changed the callback for cancel and ok buttons to resolve UI issue related to search.
+	
 2005-12-20  Srinivasa Ragavan  <sragavan novell com>
 
 	** Fixes bug #240762


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