[evolution-patches] [Calendar - Search bar] Fix(es) for 323125, 323126



Hi,

Attached patch fixes bugs #323125 and 323126.

Let me know your comments.

Thanks,

V. Varadhan
Index: gui/cal-search-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/cal-search-bar.c,v
retrieving revision 1.24
diff -u -p -r1.24 cal-search-bar.c
--- gui/cal-search-bar.c	14 Oct 2004 15:02:32 -0000	1.24
+++ gui/cal-search-bar.c	19 Dec 2005 17:46:28 -0000
@@ -35,22 +35,22 @@
 
 /* IDs and option items for the ESearchBar */
 enum {
-	SEARCH_ANY_FIELD_CONTAINS,
 	SEARCH_SUMMARY_CONTAINS,
 	SEARCH_DESCRIPTION_CONTAINS,
+	SEARCH_CATEGORY_IS,
 	SEARCH_COMMENT_CONTAINS,
 	SEARCH_LOCATION_CONTAINS,
-	SEARCH_CATEGORY_IS
+	SEARCH_ANY_FIELD_CONTAINS
 };
 
 /* Comments are disabled because they are kind of useless right now, see bug 33247 */
 static ESearchBarItem search_option_items[] = {
-	{ N_("Any field contains"), SEARCH_ANY_FIELD_CONTAINS, NULL },
 	{ N_("Summary contains"), SEARCH_SUMMARY_CONTAINS, NULL },
 	{ N_("Description contains"), SEARCH_DESCRIPTION_CONTAINS, NULL },
+	{ N_("Category is"), SEARCH_CATEGORY_IS, NULL },
 	{ N_("Comment contains"), SEARCH_COMMENT_CONTAINS, NULL },
 	{ N_("Location contains"), SEARCH_LOCATION_CONTAINS, NULL },
-	{ N_("Category is"), SEARCH_CATEGORY_IS, NULL },
+	{ N_("Any field contains"), SEARCH_ANY_FIELD_CONTAINS, NULL },
 };
 
 /* IDs for the categories suboptions */
@@ -416,8 +416,6 @@ cal_search_bar_construct (CalSearchBar *
 	
 	e_search_bar_construct (E_SEARCH_BAR (cal_search), NULL, items);
 	make_suboptions (cal_search);
-
-	e_search_bar_set_ids (E_SEARCH_BAR (cal_search), SEARCH_CATEGORY_IS, CATEGORIES_ALL);
 
 	return cal_search;
 }
Index: gui/cal-search-bar.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/cal-search-bar.h,v
retrieving revision 1.6
diff -u -p -r1.6 cal-search-bar.h
--- gui/cal-search-bar.h	23 Jun 2005 09:11:05 -0000	1.6
+++ gui/cal-search-bar.h	19 Dec 2005 17:46:28 -0000
@@ -38,12 +38,12 @@ G_BEGIN_DECLS
 typedef struct CalSearchBarPrivate CalSearchBarPrivate;
 
 enum {
-	CAL_SEARCH_ANY_FIELD_CONTAINS    = (1 << 0),
-	CAL_SEARCH_SUMMARY_CONTAINS      = (1 << 1),
-	CAL_SEARCH_DESCRIPTION_CONTAINS  = (1 << 2),
+	CAL_SEARCH_SUMMARY_CONTAINS      = (1 << 0),
+	CAL_SEARCH_DESCRIPTION_CONTAINS  = (1 << 1),
+	CAL_SEARCH_CATEGORY_IS           = (1 << 2),
 	CAL_SEARCH_COMMENT_CONTAINS      = (1 << 3),
 	CAL_SEARCH_LOCATION_CONTAINS     = (1 << 4),
-	CAL_SEARCH_CATEGORY_IS           = (1 << 5)
+	CAL_SEARCH_ANY_FIELD_CONTAINS    = (1 << 5)
 };
 
 #define CAL_SEARCH_ALL (0xff)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2894
diff -u -p -r1.2894 ChangeLog
--- ChangeLog	19 Dec 2005 11:23:09 -0000	1.2894
+++ ChangeLog	19 Dec 2005 17:49:31 -0000
@@ -1,3 +1,15 @@
+2005-12-19  Veerapuram Varadhan	 <vvaradhan novell com>
+
+	Fixes #323125, #323126
+	* gui/cal-search-bar.c: Re-order the search-bar menu items and
+	make "Summary contains", which is what most people use to search
+	for an item (be it a calendar/task/memo), as default.
+	(cal_search_bar_construct): Do not set "Category is" as default
+	option in search-bar menu.
+
+	* gui/cal-search-bar.h: Re-order the bit-values in accordance to
+	re-ordered search-bar menu items.
+	
 2005-12-19  Chenthill Palanisamy  <pchenthill novell com>
 	
 	Committing for David Trowbridge <trowbrds cs colorado edu>


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