All pastes #99489 Raw Edit

James Livingston

public text v1 · immutable
#99489 ·published 2006-07-25 11:24 UTC
rendered paste body
diff -u -p -r1.9 rb-query-creator-properties.c
--- widgets/rb-query-creator-properties.c	14 Jul 2006 12:32:01 -0000	1.9
+++ widgets/rb-query-creator-properties.c	25 Jul 2006 11:23:15 -0000
@@ -113,6 +113,7 @@ const gint DEFAULT_SORTING_ORDER = GTK_S
 const RBQueryCreatorCriteriaOption string_criteria_options[] =
 {
 	{ N_("contains"), 0, RHYTHMDB_QUERY_PROP_LIKE },
+	{ N_("contains(strict)"), 1, RHYTHMDB_QUERY_PROP_LIKE },
 	{ N_("does not contain"), 0, RHYTHMDB_QUERY_PROP_NOT_LIKE },
 	{ N_("equals"), 1, RHYTHMDB_QUERY_PROP_EQUALS },
 	{ N_("starts with"), 0, RHYTHMDB_QUERY_PROP_PREFIX },
diff -u -p -r1.42 rb-query-creator.c
--- widgets/rb-query-creator.c	23 Jul 2006 16:05:03 -0000	1.42
+++ widgets/rb-query-creator.c	25 Jul 2006 11:23:16 -0000
@@ -745,13 +745,15 @@ select_criteria_from_value (RBQueryCreat
 	int i;
 	const RBQueryCreatorCriteriaOption *options;
 	guint length;
+	gboolean strict;
 
 	i = get_property_index_from_proptype (property_options, num_property_options, prop);
 	length = property_options[i].property_type->num_criteria_options;
 	options =  property_options[i].property_type->criteria_options;
+	strict = (prop == property_options[i].strict_val);
 
 	for (i = 0; i < length; i++) {
-		if (qtype == options[i].val) {
+		if (qtype == options[i].val && strict == options[i].strict) {
 			gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), i);
 			return;
 		}