rpms/gtk2/devel gtk+-2.10.4-search.patch, 1.2, 1.3 gtk2.spec, 1.192, 1.193

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Nov 17 18:16:39 UTC 2006


Author: mclasen

Update of /cvs/dist/rpms/gtk2/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv20272

Modified Files:
	gtk+-2.10.4-search.patch gtk2.spec 
Log Message:
tracker support


gtk+-2.10.4-search.patch:
 Makefile.am              |   10 
 gtkfilechooserdefault.c  | 1508 ++++++++++++++++++++++++++++++++++++-----------
 gtkfilechooserprivate.h  |   35 -
 gtkquery.c               |  142 ++++
 gtkquery.h               |   74 ++
 gtksearchengine.c        |  197 ++++++
 gtksearchengine.h        |   91 ++
 gtksearchenginebeagle.c  |  420 +++++++++++++
 gtksearchenginebeagle.h  |   59 +
 gtksearchenginesimple.c  |  378 +++++++++++
 gtksearchenginesimple.h  |   59 +
 gtksearchenginetracker.c |  362 +++++++++++
 gtksearchenginetracker.h |   59 +
 13 files changed, 3050 insertions(+), 344 deletions(-)

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.2 -r 1.3 gtk+-2.10.4-search.patch
Index: gtk+-2.10.4-search.patch
===================================================================
RCS file: /cvs/dist/rpms/gtk2/devel/gtk+-2.10.4-search.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gtk+-2.10.4-search.patch	23 Sep 2006 21:44:40 -0000	1.2
+++ gtk+-2.10.4-search.patch	17 Nov 2006 18:16:36 -0000	1.3
@@ -1,155 +1,526 @@
---- gtk+-2.10.4/gtk/gtkfilechooserdefault.c.search	2006-09-22 12:32:45.000000000 -0400
-+++ gtk+-2.10.4/gtk/gtkfilechooserdefault.c	2006-09-23 17:45:25.000000000 -0400
-@@ -78,6 +78,8 @@
- #include <errno.h>
- #include <string.h>
- #include <time.h>
-+#include <sys/stat.h>
-+#include <sys/types.h>
- 
- 
- 
-@@ -171,13 +173,20 @@
-   SHORTCUTS_COL_PIXBUF,
-   SHORTCUTS_COL_NAME,
-   SHORTCUTS_COL_DATA,
--  SHORTCUTS_COL_IS_VOLUME,
-+  SHORTCUTS_COL_TYPE,
-   SHORTCUTS_COL_REMOVABLE,
-   SHORTCUTS_COL_PIXBUF_VISIBLE,
-   SHORTCUTS_COL_HANDLE,
-   SHORTCUTS_COL_NUM_COLUMNS
- };
- 
-+typedef enum {
-+  SHORTCUT_TYPE_PATH,
-+  SHORTCUT_TYPE_VOLUME,
-+  SHORTCUT_TYPE_SEPARATOR,
-+  SHORTCUT_TYPE_SEARCH
-+} ShortcutType;
+--- /dev/null	2006-11-17 09:38:05.592235477 -0500
++++ gtk+-2.10.6/gtk/gtksearchenginetracker.h	2006-11-17 13:10:09.000000000 -0500
+@@ -0,0 +1,59 @@
++/*
++ * Copyright (C) 2005 Mr Jamie McCracken
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ *
++ * Author: Jamie McCracken (jamiemcc at gnome.org)
++ *
++ * Based on nautilus-search-engine-tracker.h
++ */
 +
- /* Column numbers for the file list */
- enum {
-   FILE_LIST_COL_NAME,
-@@ -186,6 +195,16 @@
-   FILE_LIST_COL_NUM_COLUMNS
- };
- 
-+/* Column numbers for the search model.  
-+ * Keep this in sync with search_setup_model() 
++#ifndef __GTK_SEARCH_ENGINE_TRACKER_H__
++#define __GTK_SEARCH_ENGINE_TRACKER_H__
++
++#include "gtksearchengine.h"
++
++G_BEGIN_DECLS
++
++#define GTK_TYPE_SEARCH_ENGINE_TRACKER		(_gtk_search_engine_tracker_get_type ())
++#define GTK_SEARCH_ENGINE_TRACKER(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SEARCH_ENGINE_TRACKER, GtkSearchEngineTracker))
++#define GTK_SEARCH_ENGINE_TRACKER_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SEARCH_ENGINE_TRACKER, GtkSearchEngineTrackerClass))
++#define GTK_IS_SEARCH_ENGINE_TRACKER(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SEARCH_ENGINE_TRACKER))
++#define GTK_IS_SEARCH_ENGINE_TRACKER_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SEARCH_ENGINE_TRACKER))
++#define GTK_SEARCH_ENGINE_TRACKER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SEARCH_ENGINE_TRACKER, GtkSearchEngineTrackerClass))
++
++typedef struct _GtkSearchEngineTracker GtkSearchEngineTracker;
++typedef struct _GtkSearchEngineTrackerClass GtkSearchEngineTrackerClass;
++typedef struct _GtkSearchEngineTrackerPrivate GtkSearchEngineTrackerPrivate;
++
++struct _GtkSearchEngineTracker 
++{
++  GtkSearchEngine parent;
++
++  GtkSearchEngineTrackerPrivate *priv;
++};
++
++struct _GtkSearchEngineTrackerClass 
++{
++  GtkSearchEngineClass parent_class;
++};
++
++GType            _gtk_search_engine_tracker_get_type (void);
++
++GtkSearchEngine* _gtk_search_engine_tracker_new      (void);
++
++G_END_DECLS
++
++#endif /* __GTK_SEARCH_ENGINE_TRACKER_H__ */
+--- /dev/null	2006-11-17 09:38:05.592235477 -0500
++++ gtk+-2.10.6/gtk/gtksearchengine.h	2006-11-17 13:08:21.000000000 -0500
+@@ -0,0 +1,91 @@
++/*
++ * Copyright (C) 2005 Novell, Inc.
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ *
++ * Author: Anders Carlsson <andersca at imendio.com> 
++ *
++ * Based on nautilus-search-engine.h
 + */
-+enum {
-+  SEARCH_MODEL_COL_PATH,
-+  SEARCH_MODEL_COL_DISPLAY_NAME,
-+  SEARCH_MODEL_COL_COLLATION_KEY,
-+  SEARCH_MODEL_COL_STAT
++
++#ifndef __GTK_SEARCH_ENGINE_H__
++#define __GTK_SEARCH_ENGINE_H__
++
++#include <glib-object.h>
++#include "gtkquery.h"
++
++G_BEGIN_DECLS
++
++#define GTK_TYPE_SEARCH_ENGINE		(_gtk_search_engine_get_type ())
++#define GTK_SEARCH_ENGINE(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SEARCH_ENGINE, GtkSearchEngine))
++#define GTK_SEARCH_ENGINE_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SEARCH_ENGINE, GtkSearchEngineClass))
++#define GTK_IS_SEARCH_ENGINE(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SEARCH_ENGINE))
++#define GTK_IS_SEARCH_ENGINE_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SEARCH_ENGINE))
++#define GTK_SEARCH_ENGINE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SEARCH_ENGINE, GtkSearchEngineClass))
++
++typedef struct _GtkSearchEngine GtkSearchEngine;
++typedef struct _GtkSearchEngineClass GtkSearchEngineClass;
++typedef struct _GtkSearchEnginePrivate GtkSearchEnginePrivate;
++
++struct _GtkSearchEngine 
++{
++  GObject parent;
++
++  GtkSearchEnginePrivate *priv;
 +};
 +
- /* Identifiers for target types */
- enum {
-   GTK_TREE_MODEL_ROW,
-@@ -225,9 +244,137 @@
- static const int num_file_list_dest_targets = (sizeof (file_list_dest_targets)
- 					       / sizeof (file_list_dest_targets[0]));
- 
-+/* We dlopen() all the following from libbeagle at runtime */
-+#define BEAGLE_HIT(x) ((BeagleHit *)(x))
-+#define BEAGLE_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), beagle_request_get_type(), BeagleRequest))
-+#define BEAGLE_QUERY_PART(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), beagle_query_part_get_type(), BeagleQueryPart))
++struct _GtkSearchEngineClass 
++{
++  GObjectClass parent_class;
++  
++  /* VTable */
++  void     (*set_query)       (GtkSearchEngine *engine, 
++			       GtkQuery        *query);
++  void     (*start)           (GtkSearchEngine *engine);
++  void     (*stop)            (GtkSearchEngine *engine);
++  gboolean (*is_indexed)      (GtkSearchEngine *engine);
++  
++  /* Signals */
++  void     (*hits_added)      (GtkSearchEngine *engine, 
++			       GList           *hits);
++  void     (*hits_subtracted) (GtkSearchEngine *engine, 
++			       GList           *hits);
++  void     (*finished)        (GtkSearchEngine *engine);
++  void     (*error)           (GtkSearchEngine *engine, 
++			       const gchar     *error_message);
++};
 +
-+typedef enum {
-+        BEAGLE_QUERY_PART_LOGIC_REQUIRED   = 1,
-+	BEAGLE_QUERY_PART_LOGIC_PROHIBITED = 2
[...3054 lines suppressed...]
++ * Based on nautilus-query.c
++ */
++
++#include <config.h>
++#include <string.h>
++
++#include "gtkquery.h"
++
++struct _GtkQueryPrivate 
++{
++  gchar *text;
++  gchar *location_uri;
++  GList *mime_types;
++};
++
++G_DEFINE_TYPE (GtkQuery, _gtk_query, G_TYPE_OBJECT);
++
++static void
++finalize (GObject *object)
++{
++  GtkQuery *query;
++  
++  query = GTK_QUERY (object);
++  
++  g_free (query->priv->text);
++
++  G_OBJECT_CLASS (_gtk_query_parent_class)->finalize (object);
++}
++
++static void
++_gtk_query_class_init (GtkQueryClass *class)
++{
++  GObjectClass *gobject_class;
++  
++  gobject_class = G_OBJECT_CLASS (class);
++  gobject_class->finalize = finalize;
++
++  g_type_class_add_private (gobject_class, sizeof (GtkQueryPrivate));  
++}
++
++static void
++_gtk_query_init (GtkQuery *query)
++{
++  query->priv = G_TYPE_INSTANCE_GET_PRIVATE (query, GTK_TYPE_QUERY, GtkQueryPrivate);
++}
++
++GtkQuery *
++_gtk_query_new (void)
++{
++  return g_object_new (GTK_TYPE_QUERY,  NULL);
++}
++
++
++gchar *
++_gtk_query_get_text (GtkQuery *query)
++{
++  return g_strdup (query->priv->text);
++}
++
++void 
++_gtk_query_set_text (GtkQuery    *query, 
++		    const gchar *text)
++{
++  g_free (query->priv->text);
++  query->priv->text = g_strdup (text);
++}
++
++gchar *
++_gtk_query_get_location (GtkQuery *query)
++{
++  return g_strdup (query->priv->location_uri);
++}
++	
++void
++_gtk_query_set_location (GtkQuery    *query, 
++			const gchar *uri)
++{
++  g_free (query->priv->location_uri);
++  query->priv->location_uri = g_strdup (uri);
++}
++
++GList *
++_gtk_query_get_mime_types (GtkQuery *query)
++{
++  GList *list, *l;
++  gchar *mime_type;
++
++  list = NULL;
++  for (l = query->priv->mime_types; l; l = l->next)
++    {
++      mime_type = (gchar*)l->data;
++      list = g_list_prepend (list, g_strdup (mime_type));
++    }
++
++  return list;
++}
++
++void
++_gtk_query_set_mime_types (GtkQuery *query, 
++			   GList    *mime_types)
++{
++  GList *l;
++  gchar *mime_type;
++
++  g_list_foreach (query->priv->mime_types, (GFunc)g_free, NULL);
++  g_list_free (query->priv->mime_types);
++  query->priv->mime_types = NULL;
++
++  for (l = mime_types; l; l = l->next)
++    {
++      mime_type = (gchar*)l->data;
++      query->priv->mime_types = g_list_prepend (query->priv->mime_types, g_strdup (mime_type));
++    }
++}
++
++void
++_gtk_query_add_mime_type (GtkQuery    *query, 
++			  const gchar *mime_type)
++{
++  query->priv->mime_types = g_list_prepend (query->priv->mime_types,
++					    g_strdup (mime_type));
++}
++
+--- /dev/null	2006-11-17 09:38:05.592235477 -0500
++++ gtk+-2.10.6/gtk/gtkquery.h	2006-11-17 13:07:46.000000000 -0500
+@@ -0,0 +1,74 @@
++/*
++ * Copyright (C) 2005 Novell, Inc.
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ *
++ * Author: Anders Carlsson <andersca at imendio.com>
++ *
++ * Based on nautilus-query.h
++ */
++
++#ifndef __GTK_QUERY_H__
++#define __GTK_QUERY_H__
++
++#include <glib-object.h>
++
++G_BEGIN_DECLS
++
++#define GTK_TYPE_QUERY		(_gtk_query_get_type ())
++#define GTK_QUERY(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_QUERY, GtkQuery))
++#define GTK_QUERY_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_QUERY, GtkQueryClass))
++#define GTK_IS_QUERY(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_QUERY))
++#define GTK_IS_QUERY_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_QUERY))
++#define GTK_QUERY_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_QUERY, GtkQueryClass))
++
++typedef struct _GtkQuery GtkQuery;
++typedef struct _GtkQueryClass GtkQueryClass;
++typedef struct _GtkQueryPrivate GtkQueryPrivate;
++
++struct _GtkQuery 
++{
++  GObject parent;
++
++  GtkQueryPrivate *priv;
++};
++
++struct _GtkQueryClass
++{
++  GObjectClass parent_class;
++};
++
++GType     _gtk_query_get_type       (void);
++gboolean  _gtk_query_enabled        (void);
++
++GtkQuery* _gtk_query_new            (void);
++
++gchar*    _gtk_query_get_text       (GtkQuery    *query);
++void      _gtk_query_set_text       (GtkQuery    *query, 
++				     const gchar *text);
++
++gchar*    _gtk_query_get_location   (GtkQuery    *query);
++void      _gtk_query_set_location   (GtkQuery    *query, 
++				     const gchar *uri);
++
++GList*    _gtk_query_get_mime_types (GtkQuery    *query);
++void      _gtk_query_set_mime_types (GtkQuery    *query, 
++				     GList       *mime_types);
++void      _gtk_query_add_mime_type  (GtkQuery    *query, 
++				     const gchar *mime_type);
++
++G_END_DECLS
++
++#endif /* __GTK_QUERY_H__ */


Index: gtk2.spec
===================================================================
RCS file: /cvs/dist/rpms/gtk2/devel/gtk2.spec,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -r1.192 -r1.193
--- gtk2.spec	16 Nov 2006 14:46:48 -0000	1.192
+++ gtk2.spec	17 Nov 2006 18:16:36 -0000	1.193
@@ -16,7 +16,7 @@
 Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
 Name: gtk2
 Version: %{base_version}
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: LGPL
 Group: System Environment/Libraries
 Source: gtk+-%{version}.tar.bz2
@@ -296,6 +296,9 @@
 %doc tmpdocs/examples
 
 %changelog
+* Fri Nov 17 2006 Matthias Clasen <mclasen at redhat.com> - 2.10.6-3
+- Rework the filechooser search to support tracker, too
+
 * Thu Nov 16 2006 Matthias Clasen <mclasen at redhat.com> - 2.10.6-2
 - Avoid a possible segfault (#215933)
 




More information about the fedora-cvs-commits mailing list