tracker r1616 - in branches/indexer-split: . src/libtracker src/libtracker-gtk src/tracker-indexer src/trackerd



Author: mr
Date: Tue Jun 10 09:14:00 2008
New Revision: 1616
URL: http://svn.gnome.org/viewvc/tracker?rev=1616&view=rev

Log:
	* configure.ac: 
	* src/libtracker-gtk/tracker-metadata-tile.c:
	* src/libtracker/tracker-search.c: (main):
	* src/libtracker/tracker-tag.c: (main):
	* src/tracker-indexer/tracker-main.c: (main):
	* src/trackerd/tracker-main.c: (main):
	* src/trackerd/tracker-watcher.h: Removed the RECENT_GLIB
	definition, it was checking for GLib 2.12, when we depend on 2.14
	anyway. Also removed all places where we uses #if statements for
	RECENT GLIB.


Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/configure.ac
   branches/indexer-split/src/libtracker-gtk/tracker-metadata-tile.c
   branches/indexer-split/src/libtracker/tracker-search.c
   branches/indexer-split/src/libtracker/tracker-tag.c
   branches/indexer-split/src/tracker-indexer/tracker-main.c
   branches/indexer-split/src/trackerd/Makefile.am
   branches/indexer-split/src/trackerd/tracker-main.c
   branches/indexer-split/src/trackerd/tracker-watcher.h

Modified: branches/indexer-split/configure.ac
==============================================================================
--- branches/indexer-split/configure.ac	(original)
+++ branches/indexer-split/configure.ac	Tue Jun 10 09:14:00 2008
@@ -79,6 +79,15 @@
 AC_SUBST(LIBPNG_CFLAGS)
 AC_SUBST(LIBPNG_LIBS)
 
+# Check we have the DBUS binding tool we need
+AC_PATH_PROG(DBUSBINDINGTOOL, dbus-binding-tool)
+if test -z $DBUSBINDINGTOOL; then
+        AC_MSG_ERROR([Could not find 'dbus-binding-tool'])
+fi
+
+GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
+AC_SUBST(GLIB_GENMARSHAL)
+
 ####################################################################
 # DBus Service
 ####################################################################
@@ -152,6 +161,7 @@
 ####################################################################
 # Compiler warning checks
 ####################################################################
+
 AC_ARG_ENABLE(warnings,
               AS_HELP_STRING([--disable-warnings], [disable GCC warnings]),,
               [enable_warnings=yes])
@@ -173,7 +183,6 @@
 # Compiler generate debug code
 ####################################################################
 
-
 AC_ARG_ENABLE([debug_code],
               AS_HELP_STRING([--enable-debug-code], [build with debug symbols]),,
               [enable_debug_code=no])
@@ -195,32 +204,6 @@
 IT_PROG_INTLTOOL([0.35.0])
 
 ####################################################################
-# check for newer glib (>= 2.12.0) for g_option_context_set_summary ()
-# availability
-# used as well in tracker-configuration.c and tracker-metadata-tile.c
-# for other methods availability
-####################################################################
-RECENT_GLIB=2.12.0
-
-PKG_CHECK_MODULES(glib2, [ glib-2.0 >= $RECENT_GLIB ],
-                  [have_recent_glib=yes], [have_recent_glib=no])
-
-if test "$have_recent_glib" = "yes" ; then
-   AC_DEFINE(HAVE_RECENT_GLIB, 1, [Define if we have recent glib])
-fi
-
-AM_CONDITIONAL(HAVE_RECENT_GLIB, test "$have_recent_glib" = "yes")
-
-# Check we have the DBUS binding tool we need
-AC_PATH_PROG(DBUSBINDINGTOOL, dbus-binding-tool)
-if test -z $DBUSBINDINGTOOL; then
-        AC_MSG_ERROR([Could not find 'dbus-binding-tool'])
-fi
-
-GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
-AC_SUBST(GLIB_GENMARSHAL)
-
-####################################################################
 # External QDBM check
 ####################################################################
 
@@ -391,8 +374,6 @@
 AC_SUBST(SQLITE3_CFLAGS)
 AC_SUBST(SQLITE3_LIBS)
 
-
-
 ###############################################################################
 # Check for file monitor backends
 ###############################################################################
@@ -847,37 +828,44 @@
 AC_OUTPUT
 
 echo "
-Tracker-$VERSION:
+Build Configuration:
 
 	prefix:					${prefix}
 	source code location:			${srcdir}
 	compiler:				${CC}
-	enable gcc warnings:			$enable_warnings
-	build with debug symbols:		$enable_debug_code
-	file monitor backend to be used:	$primary_backend
-	inotify header location:		$inotify_header
-	ioprio support:				$have_ioprio
-	Win32:					$native_win32
-	HAL support:                    	$have_hal
-	unac accent stripper support:		$enable_unac
-	deskbar-applet support:			$enable_deskbar_applet
-	build search tool (GNOME):		$have_gnome
-	build preferences ui:			$enable_preferences
+
+	win32:					$native_win32
+
+	enable warnings:			$enable_warnings
+	enable debug symbols:    		$enable_debug_code
+
+	enable unac accent stripper:	  	$enable_unac
+
+	support for file monitoring:           	$primary_backend
+	support for ioprio:			$have_ioprio
+	support for HAL:                    	$have_hal
+
+Applications:
+
+	build deskbar-applet:			$enable_deskbar_applet
+	build tracker-search-tool:	        $have_gnome
+	build tracker-preferences:		$enable_preferences
+	build tracker-applet:	                $enable_trackerapplet
 	build libtracker-gtk:			$enable_libtrackergtk
-	tracker applet notification icon:	$enable_trackerapplet
 
-Metadata extractors:
+Metadata Extractors:
 
-	pdf:					$have_poppler
 	png:					yes
+	pdf:					$have_poppler
 	exif (jpeg):				$have_libexif
-	ms and openoffice (gsf):		$have_libgsf
+	ms & openoffice (gsf):		        $have_libgsf
+	xml / html formats:			$have_libxml2
+	embedded / sidecar xmp:			$have_exempi
 	video files:				$videos_are_handled ($videos_handler)
-	xml/html formats:			$have_libxml2
-	embedded/sidecar xmp:			$have_exempi
 
-"
+Warning:
+
+        You must make sure SQLite is compiled with --enable-threadsafe
+	otherwise expect pain!
 
-echo "
-****WARNING**** : You must make sure a version of SQLite compiled with --enable-threadsafe is available otherwise expect pain!
 "

Modified: branches/indexer-split/src/libtracker-gtk/tracker-metadata-tile.c
==============================================================================
--- branches/indexer-split/src/libtracker-gtk/tracker-metadata-tile.c	(original)
+++ branches/indexer-split/src/libtracker-gtk/tracker-metadata-tile.c	Tue Jun 10 09:14:00 2008
@@ -33,146 +33,6 @@
 
 #define TRACKER_METADATA_TILE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_METADATA_TILE, TrackerMetadataTilePrivate))
 
-#ifndef HAVE_RECENT_GLIB
-/**********************************************************************
- *
- * The following functions are copied from the GLIB 2.12
- * source code, to lower requirement on glib to 2.10 that ships with 
- * Dapper
- *
- **********************************************************************/
-
-/* converts a broken down date representation, relative to UTC, to
- * a timestamp; it uses timegm() if it's available. */
-static time_t
-mktime_utc (struct tm *tm)
-{
-  time_t retval;
-  
-#ifndef HAVE_TIMEGM
-  static const gint days_before[] =
-  {
-    0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
-  };
-#endif
-
-#ifndef HAVE_TIMEGM
-  if (tm->tm_mon < 0 || tm->tm_mon > 11)
-    return (time_t) -1;
-
-  retval = (tm->tm_year - 70) * 365;
-  retval += (tm->tm_year - 68) / 4;
-  retval += days_before[tm->tm_mon] + tm->tm_mday - 1;
-  
-  if (tm->tm_year % 4 == 0 && tm->tm_mon < 2)
-    retval -= 1;
-  
-  retval = ((((retval * 24) + tm->tm_hour) * 60) + tm->tm_min) * 60 + tm->tm_sec;
-#else
-  retval = timegm (tm);
-#endif /* !HAVE_TIMEGM */
-  
-  return retval;
-}
-
-
-
-/**
-* g_time_val_from_iso8601:
-* @iso_date: a ISO 8601 encoded date string
-* @time_: a #GTimeVal
-*
-* Converts a string containing an ISO 8601 encoded date and time
-* to a #GTimeVal and puts it into @time_.
-*
-* Return value: %TRUE if the conversion was successful.
-*
-*/
-gboolean
-g_time_val_from_iso8601 (const gchar *iso_date,
-                         GTimeVal    *time_)
-{
-  struct tm tm;
-  long val;
-
-  g_return_val_if_fail (iso_date != NULL, FALSE);
-  g_return_val_if_fail (time_ != NULL, FALSE);
- 
-  val = strtoul (iso_date, (char **)&iso_date, 10);
-   if (*iso_date == '-')
-     {
-       /* YYYY-MM-DD */
-      tm.tm_year = val - 1900;
-      iso_date++;
-      tm.tm_mon = strtoul (iso_date, (char **)&iso_date, 10) - 1;
-      
-      if (*iso_date++ != '-')
-        return FALSE;
-      
-      tm.tm_mday = strtoul (iso_date, (char **)&iso_date, 10);
-    }
-  else
-    {
-      /* YYYYMMDD */
-      tm.tm_mday = val % 100;
-      tm.tm_mon = (val % 10000) / 100 - 1;
-      tm.tm_year = val / 10000 - 1900;
-    }
-
-  if (*iso_date++ != 'T')
-    return FALSE;
-  
-  val = strtoul (iso_date, (char **)&iso_date, 10);
-  if (*iso_date == ':')
-    {
-      /* hh:mm:ss */
-      tm.tm_hour = val;
-      iso_date++;
-      tm.tm_min = strtoul (iso_date, (char **)&iso_date, 10);
-      
-      if (*iso_date++ != ':')
-        return FALSE;
-      
-      tm.tm_sec = strtoul (iso_date, (char **)&iso_date, 10);
-    }
-  else
-    {
-      /* hhmmss */
-      tm.tm_sec = val % 100;
-      tm.tm_min = (val % 10000) / 100;
-      tm.tm_hour = val / 10000;
-    }
-
-  time_->tv_sec = mktime_utc (&tm);
-  time_->tv_usec = 1;
-  
-  if (*iso_date == '.')
-    time_->tv_usec = strtoul (iso_date + 1, (char **)&iso_date, 10);
-    
-  if (*iso_date == '+' || *iso_date == '-')
-    {
-      gint sign = (*iso_date == '+') ? -1 : 1;
-      
-      val = 60 * strtoul (iso_date + 1, (char **)&iso_date, 10);
-      
-      if (*iso_date == ':')
-        val = 60 * val + strtoul (iso_date + 1, NULL, 10);
-      else
-        val = 60 * (val / 100) + (val % 100);
-
-      time_->tv_sec += (time_t) (val * sign);
-    }
-
-  return TRUE;
-}
-/**********************************************************************
- *
- *                     End of copied functions.
- *
- **********************************************************************/
-#endif /* HAVE_RECENT_GLIB */
-
-
 G_DEFINE_TYPE (TrackerMetadataTile, tracker_metadata_tile, GTK_TYPE_EVENT_BOX)
 
 struct TrackerMetadataTilePrivate {

Modified: branches/indexer-split/src/libtracker/tracker-search.c
==============================================================================
--- branches/indexer-split/src/libtracker/tracker-search.c	(original)
+++ branches/indexer-split/src/libtracker/tracker-search.c	Tue Jun 10 09:14:00 2008
@@ -97,11 +97,7 @@
 			       _("The list of recognized services is:"),
 			       "\n\tDocuments Emails EmailAttachments Music Images Videos Text Development Applications Conversations Folders Files",
 			       NULL);
-
-#ifdef HAVE_RECENT_GLIB
-	g_option_context_set_summary (context, summary);
-#endif /* HAVE_RECENT_GLIB */
-
+        g_option_context_set_summary (context, summary);
 	g_option_context_add_main_entries (context, entries, NULL);
 	g_option_context_parse (context, &argc, &argv, &error);
 

Modified: branches/indexer-split/src/libtracker/tracker-tag.c
==============================================================================
--- branches/indexer-split/src/libtracker/tracker-tag.c	(original)
+++ branches/indexer-split/src/libtracker/tracker-tag.c	Tue Jun 10 09:14:00 2008
@@ -73,11 +73,13 @@
 int 
 main (int argc, char **argv) 
 {
-	TrackerClient *client = NULL;
-	GOptionContext *context = NULL;
-	GError *error = NULL;
-	gchar *example;
-	int i = 0, k;
+	TrackerClient  *client;
+	GOptionContext *context;
+	GError         *error = NULL;
+	gchar          *example;
+        gchar          *summary;
+	gint            i = 0;
+        gint            k;
 
 	setlocale (LC_ALL, "");
 
@@ -85,28 +87,29 @@
         bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
         textdomain (GETTEXT_PACKAGE);
 
-	/* Translators: this messagge will apper immediately after the  */
-	/* usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE>     */
+	/* Translators: this messagge will apper immediately after the  
+         * usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE>     
+         */
 	context = g_option_context_new (_("FILE... - manipulate tags on files"));
+	example = g_strconcat ( "-a ", _("TAG"), 
+                               " -a ", _("TAG"), 
+                               " -a ", _("TAG"), 
+                               NULL);
+
+	/* Translators: this message will appear after the usage string 
+	 * and before the list of options, showing an usage example.   
+         */
+        summary = g_strconcat (_("To add, remove, or search for multiple tags "
+                                 "at the same time, join multiple options like:"), 
+                               "\n\n\t", 
+                               example, 
+                               NULL);
 
-	example = g_strconcat ("-a ", _("TAG"), " -a ", _("TAG"), " -a ", _("TAG"), NULL);
-
-
-#ifdef HAVE_RECENT_GLIB
-	/* Translators: this message will appear after the usage string */
-	/* and before the list of options, showing an usage example.    */
-	g_option_context_set_summary (context,
-				      g_strconcat(_("To add, remove, or search for multiple tags "
-						    "at the same time, join multiple options like:"), 
-						  "\n\n\t", 
-						  example, NULL));
-
-#endif /* HAVE_RECENT_GLIB */
-
+	g_option_context_set_summary (context, summary);	     
 	g_option_context_add_main_entries (context, entries, NULL);
 	g_option_context_parse (context, &argc, &argv, &error);
-
 	g_option_context_free (context);
+        g_free (summary);
 	g_free (example);
 	
 	if (error) {

Modified: branches/indexer-split/src/tracker-indexer/tracker-main.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-main.c	(original)
+++ branches/indexer-split/src/tracker-indexer/tracker-main.c	Tue Jun 10 09:14:00 2008
@@ -186,7 +186,7 @@
 	TrackerIndexer *indexer;
 	GOptionContext *context;
 	GError	       *error = NULL;
-	gchar	       *summary = NULL;
+	gchar	       *summary;
 	gchar	       *example;
         gchar          *filename;
 
@@ -214,7 +214,6 @@
 			       "-e ", _("DIRECTORY"),
 			       NULL);
 
-#ifdef HAVE_RECENT_GLIB
 	/* Translators: this message will appear after the usage
 	 * string and before the list of options, showing an usage
 	 * example.
@@ -224,9 +223,8 @@
 				     "\n"
 				     "\t%s"),
 				   example);
-	g_option_context_set_summary (context, summary);
-#endif /* HAVE_RECENT_GLIB */
 
+	g_option_context_set_summary (context, summary);
 	g_option_context_add_main_entries (context, entries, NULL);
 	g_option_context_parse (context, &argc, &argv, &error);
 	g_option_context_free (context);

Modified: branches/indexer-split/src/trackerd/Makefile.am
==============================================================================
--- branches/indexer-split/src/trackerd/Makefile.am	(original)
+++ branches/indexer-split/src/trackerd/Makefile.am	Tue Jun 10 09:14:00 2008
@@ -64,7 +64,6 @@
 endif # HAVE_FAM
 endif # HAVE_INOTIFY
 
-
 #
 # Daemon sources
 #

Modified: branches/indexer-split/src/trackerd/tracker-main.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-main.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-main.c	Tue Jun 10 09:14:00 2008
@@ -680,6 +680,7 @@
 	GError         *error = NULL;
 	GSList         *l;
 	gchar          *example;
+	gchar          *summary;
 	gboolean        need_index;
 
         g_type_init ();
@@ -708,22 +709,20 @@
 			       " -e ", _("DIRECTORY"),
 			       NULL);
 
-#ifdef HAVE_RECENT_GLIB
-        /* Translators: this message will appear after the usage string */
-        /* and before the list of options, showing an usage example.    */
-        g_option_context_set_summary (context,
-                                      g_strconcat(_("To include or exclude multiple directories "
-                                                    "at the same time, join multiple options like:"),
-
-                                                  "\n\n\t",
-                                                  example, 
-						  NULL));
-
-#endif /* HAVE_RECENT_GLIB */
+        /* Translators: this message will appear after the usage string 
+         * and before the list of options, showing an usage example.   
+	 */
+	summary = g_strconcat (_("To include or exclude multiple directories "
+				 "at the same time, join multiple options like:"),
+			       "\n\n\t",
+			       example, 
+			       NULL);
 
+        g_option_context_set_summary (context, summary);
 	g_option_context_add_main_entries (context, entries, NULL);
 	g_option_context_parse (context, &argc, &argv, &error);
 	g_option_context_free (context);
+	g_free (summary);
 	g_free (example);
 
 	if (error) {

Modified: branches/indexer-split/src/trackerd/tracker-watcher.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-watcher.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-watcher.h	Tue Jun 10 09:14:00 2008
@@ -28,12 +28,12 @@
 
 gboolean tracker_watcher_init           (void);
 void     tracker_watcher_shutdown       (void);
-gboolean tracker_watcher_add_dir        (const char         *dir,
+gboolean tracker_watcher_add_dir        (const gchar        *dir,
 					 TrackerDBInterface *iface);
-void     tracker_watcher_remove_dir     (const char         *dir,
+void     tracker_watcher_remove_dir     (const gchar        *dir,
 					 gboolean            delete_subdirs,
 					 TrackerDBInterface *iface);
-gboolean tracker_watcher_is_dir_watched (const char         *dir,
+gboolean tracker_watcher_is_dir_watched (const gchar        *dir,
 					 TrackerDBInterface *iface);
 gint     tracker_watcher_get_dir_count  (void);
 



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