gtk+ r19648 - in branches/gtk-2-12: . gtk
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r19648 - in branches/gtk-2-12: . gtk
- Date: Mon, 25 Feb 2008 15:46:26 +0000 (GMT)
Author: matthiasc
Date: Mon Feb 25 15:46:26 2008
New Revision: 19648
URL: http://svn.gnome.org/viewvc/gtk+?rev=19648&view=rev
Log:
Don't use beagle_query_add_hit_type
Modified:
branches/gtk-2-12/ChangeLog
branches/gtk-2-12/gtk/gtksearchenginebeagle.c
Modified: branches/gtk-2-12/gtk/gtksearchenginebeagle.c
==============================================================================
--- branches/gtk-2-12/gtk/gtksearchenginebeagle.c (original)
+++ branches/gtk-2-12/gtk/gtksearchenginebeagle.c Mon Feb 25 15:46:26 2008
@@ -69,8 +69,6 @@
static BeagleQuery *(*beagle_query_new) (void) = NULL;
static void (*beagle_query_add_text) (BeagleQuery *query,
const char *str) = NULL;
-static void (*beagle_query_add_hit_type) (BeagleQuery *query,
- const char *hit_type) = NULL;
static void (*beagle_query_set_max_hits) (BeagleQuery *query,
gint max_hits) = NULL;
static BeagleQueryPartProperty *(*beagle_query_part_property_new) (void) = NULL;
@@ -102,7 +100,6 @@
MAP (beagle_hits_subtracted_response_get_uris),
MAP (beagle_query_new),
MAP (beagle_query_add_text),
- MAP (beagle_query_add_hit_type),
MAP (beagle_query_set_max_hits),
MAP (beagle_query_part_property_new),
MAP (beagle_query_part_set_logic),
@@ -277,6 +274,7 @@
GtkSearchEngineBeagle *beagle;
GError *error;
gchar *text;
+ gchar *query;
error = NULL;
beagle = GTK_SEARCH_ENGINE_BEAGLE (engine);
@@ -298,11 +296,13 @@
"error", G_CALLBACK (beagle_error), engine);
/* We only want files */
- beagle_query_add_hit_type (beagle->priv->current_query, "File");
- beagle_query_set_max_hits (beagle->priv->current_query, 1000);
- text = _gtk_query_get_text (beagle->priv->query);
- beagle_query_add_text (beagle->priv->current_query, text);
+
+ text = _gtk_query_get_text (beagle->priv->query))
+ query = g_strconcat (text, " type:File", NULL);
+
+ beagle_query_set_max_hits (beagle->priv->current_query, 1000);
+ beagle_query_add_text (beagle->priv->current_query, query);
beagle->priv->current_query_uri_prefix = _gtk_query_get_location (beagle->priv->query);
@@ -315,6 +315,7 @@
/* These must live during the lifetime of the query */
g_free (text);
+ g_free (query);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]