? addrcheck_report.pid10660
? addrcheck_report.pid8167
? compile
? description-pak
? massif.18274.ps
? massif.18274.txt
? out
? tools
? lib/strnatcmp.c
? lib/strnatcmp.h
? shell/rb-device-manager.c
? shell/rb-device-manager.h
? sources/rb-audiocd-source.c
? sources/rb-audiocd-source.h
? sources/rb-datacd-source.c
? sources/rb-datacd-source.h
? sources/rb-device-source.c
? sources/rb-device-source.h
? widgets/rb-query-creator-private.h
? widgets/rb-query-creator-properties.c
Index: rhythmdb/rhythmdb-tree.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/rhythmdb/rhythmdb-tree.c,v
retrieving revision 1.66
diff -u -r1.66 rhythmdb-tree.c
--- rhythmdb/rhythmdb-tree.c	10 Jul 2005 12:37:56 -0000	1.66
+++ rhythmdb/rhythmdb-tree.c	25 Jul 2005 16:52:13 -0000
@@ -1228,6 +1228,26 @@
 				return FALSE;
 		}
 		break;
+		case RHYTHMDB_QUERY_PROP_CURRENT_TIME_WITHIN:
+		case RHYTHMDB_QUERY_PROP_CURRENT_TIME_NOT_WITHIN:
+		{
+			gulong relative_time;
+			GTimeVal current_time;
+
+			g_assert (rhythmdb_get_property_type (db, data->propid) == G_TYPE_ULONG);
+
+			relative_time = g_value_get_ulong (data->val);
+			g_get_current_time  (&current_time);
+
+			rb_debug ("relative time query: cur=%u, rel=%u", current_time.tv_sec, relative_time);
+
+			if (data->type == RHYTHMDB_QUERY_PROP_CURRENT_TIME_WITHIN)
+				return (rhythmdb_entry_get_ulong (entry, data->propid) >= (current_time.tv_sec - relative_time));
+			else
+				return (rhythmdb_entry_get_ulong (entry, data->propid) < (current_time.tv_sec - relative_time));
+
+			break;
+		}
 		case RHYTHMDB_QUERY_PROP_LIKE:
 		case RHYTHMDB_QUERY_PROP_NOT_LIKE:
 		{
Index: rhythmdb/rhythmdb.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/rhythmdb/rhythmdb.c,v
retrieving revision 1.101
diff -u -r1.101 rhythmdb.c
--- rhythmdb/rhythmdb.c	14 Jul 2005 23:34:17 -0000	1.101
+++ rhythmdb/rhythmdb.c	25 Jul 2005 16:52:20 -0000
@@ -58,6 +58,8 @@
 #define RB_PARSE_DISJ (xmlChar *) "disjunction"
 #define RB_PARSE_GREATER (xmlChar *) "greater"
 #define RB_PARSE_LESS (xmlChar *) "less"
+#define RB_PARSE_CURRENT_TIME_WITHIN (xmlChar *) "current-time-within"
+#define RB_PARSE_CURRENT_TIME_NOT_WITHIN (xmlChar *) "current-time-not-within"
 
 #define RB_PARSE_NICK_START (xmlChar *) "["
 #define RB_PARSE_NICK_END (xmlChar *) "]"
@@ -204,7 +206,6 @@
 static void rhythmdb_volume_unmounted_cb (GnomeVFSVolumeMonitor *monitor,
  					  GnomeVFSVolume *volume, 
  					  gpointer data);
-
 enum
 {
 	PROP_0,
@@ -2174,6 +2175,8 @@
 		case RHYTHMDB_QUERY_PROP_NOT_LIKE:
 		case RHYTHMDB_QUERY_PROP_GREATER:
 		case RHYTHMDB_QUERY_PROP_LESS:
+		case RHYTHMDB_QUERY_PROP_CURRENT_TIME_WITHIN:
+		case RHYTHMDB_QUERY_PROP_CURRENT_TIME_NOT_WITHIN:
 			data->propid = va_arg (args, guint);
 			data->val = g_new0 (GValue, 1);
 			g_value_init (data->val, rhythmdb_get_property_type (db, data->propid));
@@ -2244,6 +2247,8 @@
 		case RHYTHMDB_QUERY_PROP_NOT_LIKE:
 		case RHYTHMDB_QUERY_PROP_GREATER:
 		case RHYTHMDB_QUERY_PROP_LESS:
+		case RHYTHMDB_QUERY_PROP_CURRENT_TIME_WITHIN:
+		case RHYTHMDB_QUERY_PROP_CURRENT_TIME_NOT_WITHIN:
 			g_value_unset (data->val);
 			g_free (data->val);
 			break;
@@ -2402,6 +2407,16 @@
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
 			write_encoded_gvalue (subnode, data->val);
 			break;
+		case RHYTHMDB_QUERY_PROP_CURRENT_TIME_WITHIN:
+			subnode = xmlNewChild (node, NULL, RB_PARSE_CURRENT_TIME_WITHIN, NULL);
+			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
+			write_encoded_gvalue (subnode, data->val);
+			break;
+		case RHYTHMDB_QUERY_PROP_CURRENT_TIME_NOT_WITHIN:
+			subnode = xmlNewChild (node, NULL, RB_PARSE_CURRENT_TIME_NOT_WITHIN, NULL);
+			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
+			write_encoded_gvalue (subnode, data->val);
+			break;
 		}		
 	}
 }
@@ -2442,6 +2457,10 @@
 			data->type = RHYTHMDB_QUERY_PROP_GREATER;
 		} else if (!xmlStrcmp (child->name, RB_PARSE_LESS)) {
 			data->type = RHYTHMDB_QUERY_PROP_LESS;
+		} else if (!xmlStrcmp (child->name, RB_PARSE_CURRENT_TIME_WITHIN)) {
+			data->type = RHYTHMDB_QUERY_PROP_CURRENT_TIME_WITHIN;
+		} else if (!xmlStrcmp (child->name, RB_PARSE_CURRENT_TIME_NOT_WITHIN)) {
+			data->type = RHYTHMDB_QUERY_PROP_CURRENT_TIME_NOT_WITHIN;
 		} else
  			g_assert_not_reached ();
 
@@ -2449,7 +2468,9 @@
 		    || !xmlStrcmp (child->name, RB_PARSE_NOT_LIKE)
 		    || !xmlStrcmp (child->name, RB_PARSE_EQUALS)
 		    || !xmlStrcmp (child->name, RB_PARSE_GREATER)
-		    || !xmlStrcmp (child->name, RB_PARSE_LESS)) {
+		    || !xmlStrcmp (child->name, RB_PARSE_LESS)
+		    || !xmlStrcmp (child->name, RB_PARSE_CURRENT_TIME_WITHIN)
+		    || !xmlStrcmp (child->name, RB_PARSE_CURRENT_TIME_NOT_WITHIN)) {
 			xmlChar *propstr = xmlGetProp (child, RB_PARSE_PROP);
 			gint propid = rhythmdb_propid_from_nice_elt_name (db, propstr);
 			g_free (propstr);
@@ -2638,6 +2659,8 @@
 			ENUM_ENTRY (RHYTHMDB_QUERY_PROP_NOT_LIKE, "Inverted fuzzy property matching"),
 			ENUM_ENTRY (RHYTHMDB_QUERY_PROP_GREATER, "True if property1 >= property2"),
 			ENUM_ENTRY (RHYTHMDB_QUERY_PROP_LESS, "True if property1 <= property2"),
+			ENUM_ENTRY (RHYTHMDB_QUERY_PROP_CURRENT_TIME_WITHIN, "True iff property1 is within property2 of the current time"),
+			ENUM_ENTRY (RHYTHMDB_QUERY_PROP_CURRENT_TIME_NOT_WITHIN, "True iff property1 is not within property2 of the current time"),
 			{ 0, 0, 0 }
 		};
 
Index: rhythmdb/rhythmdb.h
===================================================================
RCS file: /cvs/gnome/rhythmbox/rhythmdb/rhythmdb.h,v
retrieving revision 1.41
diff -u -r1.41 rhythmdb.h
--- rhythmdb/rhythmdb.h	5 Jul 2005 09:15:43 -0000	1.41
+++ rhythmdb/rhythmdb.h	25 Jul 2005 16:52:21 -0000
@@ -59,6 +59,8 @@
 	RHYTHMDB_QUERY_PROP_NOT_LIKE,
 	RHYTHMDB_QUERY_PROP_GREATER,
 	RHYTHMDB_QUERY_PROP_LESS,
+	RHYTHMDB_QUERY_PROP_CURRENT_TIME_WITHIN,
+	RHYTHMDB_QUERY_PROP_CURRENT_TIME_NOT_WITHIN,
 } RhythmDBQueryType;
 
 /* If you modify this enum, don't forget to modify rhythmdb_prop_get_type */
Index: widgets/Makefile.am
===================================================================
RCS file: /cvs/gnome/rhythmbox/widgets/Makefile.am,v
retrieving revision 1.17
diff -u -r1.17 Makefile.am
--- widgets/Makefile.am	12 Jun 2005 18:00:32 -0000	1.17
+++ widgets/Makefile.am	25 Jul 2005 16:52:21 -0000
@@ -43,6 +43,8 @@
 	rb-tree-view.h					\
 	rb-query-creator.c				\
 	rb-query-creator.h				\
+	rb-query-creator-private.h			\
+	rb-query-creator-properties.c			\
 	rb-tree-view-column.c				\
 	rb-tree-view-column.h
 
Index: widgets/rb-query-creator.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/widgets/rb-query-creator.c,v
retrieving revision 1.29
diff -u -r1.29 rb-query-creator.c
--- widgets/rb-query-creator.c	25 Jul 2005 16:30:58 -0000	1.29
+++ widgets/rb-query-creator.c	25 Jul 2005 16:52:28 -0000
@@ -28,49 +28,12 @@
 #include "rhythmdb.h"
 #include "rb-query-creator.h"
 #include "rb-dialog.h"
-#include "rb-rating.h"
 #include "rb-debug.h"
 #include "rb-preferences.h"
 #include "rb-glade-helpers.h"
 #include "eel-gconf-extensions.h"
+#include "rb-query-creator-private.h"
 
-typedef struct
-{
-	const char *name;
-	RhythmDBPropType strict_val;
-	RhythmDBPropType fuzzy_val;
-} RBQueryCreatorPropertyOption;
-
-typedef struct
-{
-	const char *name;
-	gboolean strict;
-	RhythmDBPropType val;
-} RBQueryCreatorCriteriaOption;
-
-const RBQueryCreatorPropertyOption property_options[] =
-{
-	{ N_("Title"), RHYTHMDB_PROP_TITLE, RHYTHMDB_PROP_TITLE_FOLDED },
-	{ N_("Artist"), RHYTHMDB_PROP_ARTIST, RHYTHMDB_PROP_ARTIST_FOLDED },
-	{ N_("Album"), RHYTHMDB_PROP_ALBUM, RHYTHMDB_PROP_ALBUM_FOLDED },
-	{ N_("Genre"), RHYTHMDB_PROP_GENRE, RHYTHMDB_PROP_GENRE_FOLDED },
-	{ N_("Rating"), RHYTHMDB_PROP_RATING, RHYTHMDB_PROP_RATING },
-	{ N_("Path"), RHYTHMDB_PROP_LOCATION, RHYTHMDB_PROP_LOCATION }
-};
-
-const RBQueryCreatorCriteriaOption string_criteria_options[] =
-{
-	{ N_("contains"), 0, RHYTHMDB_QUERY_PROP_LIKE },
-	{ N_("does not contain"), 0, RHYTHMDB_QUERY_PROP_NOT_LIKE },
-	{ N_("equals"), 1, RHYTHMDB_QUERY_PROP_EQUALS }
-};
-
-const RBQueryCreatorCriteriaOption numeric_criteria_options[] =
-{
-	{ N_("equals"), 1, RHYTHMDB_QUERY_PROP_EQUALS },
-	{ N_("at least"), 1, RHYTHMDB_QUERY_PROP_GREATER },	/* matches if A >= B */
-	{ N_("at most"), 1, RHYTHMDB_QUERY_PROP_LESS }		/* matches if A <= B */
-};
 
 static void rb_query_creator_class_init (RBQueryCreatorClass *klass);
 static void rb_query_creator_init (RBQueryCreator *dlg);
@@ -85,9 +48,6 @@
 					      guint prop_id,
 					      GValue *value,
 					      GParamSpec *pspec);
-static void select_property_from_value (GtkWidget *option_menu,
-					const RBQueryCreatorPropertyOption *options,
-					int length, RhythmDBPropType prop);
 static void select_criteria_from_value (RBQueryCreator *creator,
 					GtkWidget *option_menu,
 					RhythmDBPropType prop,
@@ -106,13 +66,15 @@
 static GtkWidget * create_criteria_option_menu (const RBQueryCreatorCriteriaOption *options,
 						int length, gboolean activate_first);
 static GtkWidget * option_menu_get_active_child (GtkWidget *option_menu);
-static GtkWidget * get_box_widget_at_pos (GtkBox *box, guint pos);
 
 static GtkWidget * append_row (RBQueryCreator *dialog);
 static void add_button_click_cb (GtkWidget *button, RBQueryCreator *creator);
 static void remove_button_click_cb (GtkWidget *button, RBQueryCreator *creator);
 static void limit_toggled_cb (GtkWidget *limit, RBQueryCreator *creator);
 
+static int get_property_index_from_proptype (const RBQueryCreatorPropertyOption *options,
+			    	  int length, RhythmDBPropType prop);
+
 struct RBQueryCreatorPrivate
 {
 	RhythmDB *db;
@@ -381,7 +343,9 @@
 	for (i = 0; i < subquery->len; i++) {
 		RhythmDBQueryData *data = g_ptr_array_index (subquery, i);
 		GtkOptionMenu *propmenu;
-		GtkOptionMenu *criteria_menu;
+		GtkWidget *criteria_menu;
+		int index;
+		const RBQueryCreatorPropertyType *property_type;
 
 		if (data->type == RHYTHMDB_QUERY_DISJUNCTION) {
 			disjunction = TRUE;
@@ -389,26 +353,17 @@
 		}
 
 		propmenu = GTK_OPTION_MENU (get_box_widget_at_pos (GTK_BOX (rows->data), 0));
-		
-		select_property_from_value (GTK_WIDGET (propmenu), property_options,
-					    G_N_ELEMENTS (property_options), data->propid);
+		index = get_property_index_from_proptype (property_options, num_property_options, data->propid);
+		gtk_option_menu_set_history (propmenu, index);
 
-		criteria_menu = GTK_OPTION_MENU (get_box_widget_at_pos (GTK_BOX (rows->data),
-									1));
+		criteria_menu = get_box_widget_at_pos (GTK_BOX (rows->data), 1);
+		select_criteria_from_value (creator, criteria_menu, data->propid, data->type);
 
-		select_criteria_from_value (creator,
-					    GTK_WIDGET (criteria_menu), data->propid,
-					    data->type);
+		property_type = property_options[index].property_type;
+		g_assert (property_type->setWidgetData != NULL);
+		property_type->setWidgetData (get_box_widget_at_pos (GTK_BOX (rows->data), 2),
+					      data->val);
 
-		if (data->propid != RHYTHMDB_PROP_RATING) {
-			GtkEntry *text = GTK_ENTRY (get_box_widget_at_pos (GTK_BOX (rows->data), 2));
-			
-			gtk_entry_set_text (text, g_value_get_string (data->val));
-		} else {
-			RBRating *rating = RB_RATING (get_box_widget_at_pos (GTK_BOX (rows->data), 2));
-			g_object_set (G_OBJECT (rating), "rating",
-				      g_value_get_double (data->val), NULL);
-		}
 		rows = rows->next;
 	}
 
@@ -442,7 +397,7 @@
 	return GTK_WIDGET (creator);
 }
 
-static GtkWidget *
+GtkWidget *
 get_box_widget_at_pos (GtkBox *box, guint pos)
 {
 	GtkWidget *ret = NULL;
@@ -466,50 +421,26 @@
 static const RBQueryCreatorCriteriaOption *
 get_criteria_for_property (RBQueryCreator *creator, RhythmDBPropType prop, guint *length)
 {
-	GType proptype;
-	const RBQueryCreatorCriteriaOption *options = NULL;
+	int index = get_property_index_from_proptype (property_options, num_property_options, prop);
 
-	proptype = rhythmdb_get_property_type (creator->priv->db, prop);
-
-	if (proptype == G_TYPE_STRING) {
-		options = string_criteria_options;
-		if (length)
-			*length = G_N_ELEMENTS (string_criteria_options);
-	} else if (proptype == G_TYPE_DOUBLE) {
-		options = numeric_criteria_options;
-		if (length)
-			*length = G_N_ELEMENTS (numeric_criteria_options);
-	} else
-		g_assert_not_reached ();
-	return options;
-}
+	if (length)
+		*length = property_options[index].property_type->num_criteria_options;
 
-static void
-set_rating_score (RBRating *rating, gdouble score)
-{
-	g_object_set (G_OBJECT (rating), "rating", score, NULL);
+	return property_options[index].property_type->criteria_options;
 }	
 
 static GtkWidget *
 get_entry_for_property (RBQueryCreator *creator, RhythmDBPropType prop,
 			gboolean *constrain)
 {
-	GType proptype;
-	proptype = rhythmdb_get_property_type (creator->priv->db, prop);
-	
-	*constrain = TRUE;
+	const RBQueryCreatorPropertyType *property_type;
+	int index = get_property_index_from_proptype (property_options, num_property_options, prop);
 
-	if (proptype == G_TYPE_STRING)
-		return gtk_entry_new ();
-	else if (prop == RHYTHMDB_PROP_RATING) {
-		RBRating *rating = rb_rating_new ();
-		g_signal_connect_object (G_OBJECT (rating), "rated",
-					 G_CALLBACK (set_rating_score), NULL, 0);
-		*constrain = FALSE;
-		return GTK_WIDGET (rating);
-	} else
-		g_assert_not_reached ();
-	return NULL;
+	property_type = property_options[index].property_type;
+	g_assert (property_type->createWidget != NULL);
+
+	*constrain = TRUE;
+	return property_type->createWidget (constrain);
 }
 
 static int
@@ -527,11 +458,6 @@
 	GList *rows, *row;
 	gboolean disjunction;
 
-	query = rhythmdb_query_parse (dlg->priv->db,
-				      RHYTHMDB_QUERY_PROP_EQUALS,
-				      RHYTHMDB_PROP_TYPE,
-				      RHYTHMDB_ENTRY_TYPE_SONG,
-				      RHYTHMDB_QUERY_END);
 
 	disjunction = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dlg->priv->disjunction_check));
 	
@@ -545,62 +471,38 @@
 										       1));
 		guint prop_position = extract_option_menu_index (propmenu);
 		const RBQueryCreatorPropertyOption *prop_option = &property_options[prop_position];
-		const RBQueryCreatorCriteriaOption *criteria_options = get_criteria_for_property (dlg, prop_option->strict_val, NULL);
+		const RBQueryCreatorCriteriaOption *criteria_options = prop_option->property_type->criteria_options;
 		const RBQueryCreatorCriteriaOption *criteria_option = &criteria_options[extract_option_menu_index (criteria_menu)];
-		RhythmDBQueryType criteria = criteria_option->val;
-		RhythmDBPropType prop = criteria_option->strict ? prop_option->strict_val : prop_option->fuzzy_val;
 
-		if (prop != RHYTHMDB_PROP_RATING) {
-			GtkEntry *text = GTK_ENTRY (get_box_widget_at_pos (GTK_BOX (row->data), 2));
-			const char *data = gtk_entry_get_text (GTK_ENTRY (text));
-			char *folded_data = criteria_option->strict ? g_strdup (data) : g_utf8_casefold (data, -1);
+		g_assert (prop_option->property_type->getWidgetData != NULL);
+		{
+			RhythmDBQueryData *data = g_new0 (RhythmDBQueryData, 1);
+			GValue *val = g_new0 (GValue, 1);
+			
+			data->type = criteria_option->val;
+			data->propid = criteria_option->strict ? prop_option->strict_val : prop_option->fuzzy_val;
 			
-			/* ignore the row if the string is empty */
-			if (folded_data && *folded_data) {
-				if (disjunction && row->next)
-					rhythmdb_query_append (dlg->priv->db,
-							       sub_query,
-							       criteria,
-							       prop,
-							       folded_data,
-							       RHYTHMDB_QUERY_DISJUNCTION,
-							       RHYTHMDB_QUERY_END);
-				else
-					rhythmdb_query_append (dlg->priv->db,
-							       sub_query,
-							       criteria,
-							       prop,
-							       folded_data,
-							       RHYTHMDB_QUERY_END);
-			}
-			g_free (folded_data);
-		} else {
-			double rating;
-
-			g_object_get (G_OBJECT (get_box_widget_at_pos (GTK_BOX (row->data), 2)),
-				      "rating", &rating, NULL);
-			if (disjunction && row->next)
-				rhythmdb_query_append (dlg->priv->db,
-						       sub_query,
-						       criteria,
-						       prop,
-						       rating,
-						       RHYTHMDB_QUERY_DISJUNCTION,
-						       RHYTHMDB_QUERY_END);
-			else
-				rhythmdb_query_append (dlg->priv->db,
-						       sub_query,
-						       criteria,
-						       prop,
-						       rating,
-						       RHYTHMDB_QUERY_END);
+			prop_option->property_type->getWidgetData (get_box_widget_at_pos (GTK_BOX (row->data), 2), val);
+			data->val = val;
+			
+			g_ptr_array_add (sub_query, data);
 		}
+
+		if (disjunction && row->next)
+			rhythmdb_query_append (dlg->priv->db,
+					       sub_query,
+					       RHYTHMDB_QUERY_DISJUNCTION,
+					       RHYTHMDB_QUERY_END);
 	}
-	rhythmdb_query_append (dlg->priv->db,
-			       query,
-			       RHYTHMDB_QUERY_SUBQUERY,
-			       sub_query,
-			       RHYTHMDB_QUERY_END);
+	query = rhythmdb_query_parse (dlg->priv->db,
+				      /* type=songs */
+				      RHYTHMDB_QUERY_PROP_EQUALS,
+				      RHYTHMDB_PROP_TYPE,
+				      RHYTHMDB_ENTRY_TYPE_SONG,
+				      /* the constructed query */
+				      RHYTHMDB_QUERY_SUBQUERY,
+				      sub_query,
+				      RHYTHMDB_QUERY_END);
 	return query;
 }
 
@@ -698,14 +600,12 @@
 	gtk_box_reorder_child (dialog->priv->vbox, GTK_WIDGET (hbox), -1);
 
 	/* This is the main (leftmost) GtkOptionMenu, for types. */
-	option = create_property_option_menu (dialog, property_options,
-					      G_N_ELEMENTS (property_options),
-					      FALSE);
+	option = create_property_option_menu (dialog, property_options, num_property_options, FALSE);
 	gtk_size_group_add_widget (dialog->priv->property_size_group, option);
 	gtk_box_pack_start_defaults (hbox, GTK_WIDGET (option));
 	gtk_option_menu_set_history (GTK_OPTION_MENU (option), 0);
-	criteria = create_criteria_option_menu (string_criteria_options,
-						G_N_ELEMENTS (string_criteria_options),
+	criteria = create_criteria_option_menu (property_options[0].property_type->criteria_options,
+						property_options[0].property_type->num_criteria_options,
 						FALSE);
 	gtk_size_group_add_widget (dialog->priv->criteria_size_group, criteria);
 	gtk_box_pack_start_defaults (hbox, GTK_WIDGET (criteria));
@@ -724,21 +624,19 @@
 	return GTK_WIDGET (hbox);
 }
 
-static void
-select_property_from_value (GtkWidget *option_menu,
-			    const RBQueryCreatorPropertyOption *options,
-			    int length, RhythmDBPropType prop)
+static int
+get_property_index_from_proptype (const RBQueryCreatorPropertyOption *options,
+			    	  int length, RhythmDBPropType prop)
 {
 	int i;
 	
-	for (i = 0; i < length; i++) {
-		if (prop == options[i].strict_val || prop == options[i].fuzzy_val) {
-			gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), i);
-			return;
-		}
-	}
+	for (i = 0; i < length; i++)
+		if (prop == options[i].strict_val || prop == options[i].fuzzy_val)
+			return i;
+
 	g_assert_not_reached ();
 }
+
 
 static void
 select_criteria_from_value (RBQueryCreator *creator,
