tracker r2065 - in branches/indexer-split: . src/tracker-utils
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2065 - in branches/indexer-split: . src/tracker-utils
- Date: Wed, 13 Aug 2008 10:41:40 +0000 (UTC)
Author: mr
Date: Wed Aug 13 10:41:39 2008
New Revision: 2065
URL: http://svn.gnome.org/viewvc/tracker?rev=2065&view=rev
Log:
* src/tracker-utils/tracker-files.c:
* src/tracker-utils/tracker-query.c:
* src/tracker-utils/tracker-search.c:
* src/tracker-utils/tracker-stats.c:
* src/tracker-utils/tracker-status.c:
* src/tracker-utils/tracker-tag.c:
* src/tracker-utils/tracker-unique.c: Fixed some of the printing
where \n was omitted. Also fixed the includes for the Win32
compatibility.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/tracker-utils/tracker-files.c
branches/indexer-split/src/tracker-utils/tracker-query.c
branches/indexer-split/src/tracker-utils/tracker-search.c
branches/indexer-split/src/tracker-utils/tracker-stats.c
branches/indexer-split/src/tracker-utils/tracker-status.c
branches/indexer-split/src/tracker-utils/tracker-tag.c
branches/indexer-split/src/tracker-utils/tracker-unique.c
Modified: branches/indexer-split/src/tracker-utils/tracker-files.c
==============================================================================
--- branches/indexer-split/src/tracker-utils/tracker-files.c (original)
+++ branches/indexer-split/src/tracker-utils/tracker-files.c Wed Aug 13 10:41:39 2008
@@ -90,7 +90,8 @@
client = tracker_connect (FALSE);
if (!client) {
- g_printerr (_("Could not establish a DBus connection to Tracker"));
+ g_printerr ("%s\n",
+ _("Could not establish a DBus connection to Tracker"));
return EXIT_FAILURE;
}
@@ -115,7 +116,8 @@
}
if (!array) {
- g_print ("No results were found matching your query\n");
+ g_print ("%s\n",
+ _("No results were found matching your query"));
return EXIT_FAILURE;
}
@@ -145,7 +147,8 @@
}
if (!array) {
- g_print ("No results were found matching your query\n");
+ g_print ("%s\n",
+ _("No results were found matching your query"));
return EXIT_FAILURE;
}
Modified: branches/indexer-split/src/tracker-utils/tracker-query.c
==============================================================================
--- branches/indexer-split/src/tracker-utils/tracker-query.c (original)
+++ branches/indexer-split/src/tracker-utils/tracker-query.c Wed Aug 13 10:41:39 2008
@@ -31,10 +31,9 @@
#include <libtracker/tracker.h>
-#include <config.h>
-#ifdef OS_WIN32
-#include "../trackerd/mingw-compat.h"
-#endif
+#ifdef G_OS_WIN32
+#include <trackerd/mingw-compat.h>
+#endif /* G_OS_WIN32 */
static gchar *path;
static gchar *search;
@@ -135,9 +134,8 @@
if (!fields || !path) {
gchar *help;
- g_printerr (_("Path or fields are missing"));
- g_printerr ("\n"
- "\n");
+ g_printerr ("%s\n\n",
+ _("Path or fields are missing"));
help = g_option_context_get_help (context, TRUE, NULL);
g_option_context_free (context);
@@ -152,7 +150,8 @@
client = tracker_connect (FALSE);
if (!client) {
- g_printerr (_("Could not establish a DBus connection to Tracker"));
+ g_printerr ("%s\n",
+ _("Could not establish a DBus connection to Tracker"));
return EXIT_FAILURE;
}
@@ -161,15 +160,16 @@
}
if (!service) {
- g_print (_("Defaulting to 'files' service"));
- g_print ("\n");
+ g_print ("%s\n",
+ _("Defaulting to 'files' service"));
type = SERVICE_FILES;
} else {
type = tracker_service_name_to_type (service);
if (type == SERVICE_OTHER_FILES && g_ascii_strcasecmp (service, "Other")) {
- g_printerr (_("Service not recognized, searching in other files...\n"));
+ g_printerr ("%s\n",
+ _("Service not recognized, searching in other files..."));
}
}
@@ -204,7 +204,7 @@
g_free (content);
if (error) {
- g_printerr ("%s, %s",
+ g_printerr ("%s, %s\n",
_("Could not convert query file to UTF-8"),
error->message);
g_error_free (error);
@@ -227,7 +227,7 @@
g_free (buffer);
if (error) {
- g_printerr ("%s, %s",
+ g_printerr ("%s, %s\n",
_("Could not query search"),
error->message);
g_error_free (error);
@@ -236,8 +236,8 @@
}
if (!array) {
- g_print (_("No results found matching your query"));
- g_print ("\n");
+ g_print ("%s\n",
+ _("No results found matching your query"));
} else {
g_ptr_array_foreach (array, (GFunc) get_meta_table_data, NULL);
g_ptr_array_free (array, TRUE);
Modified: branches/indexer-split/src/tracker-utils/tracker-search.c
==============================================================================
--- branches/indexer-split/src/tracker-utils/tracker-search.c (original)
+++ branches/indexer-split/src/tracker-utils/tracker-search.c Wed Aug 13 10:41:39 2008
@@ -148,9 +148,8 @@
if (!terms) {
gchar *help;
- g_printerr (_("Search terms are missing"));
- g_printerr ("\n"
- "\n");
+ g_printerr ("%s\n\n",
+ _("Search terms are missing"));
help = g_option_context_get_help (context, TRUE, NULL);
g_option_context_free (context);
@@ -165,7 +164,8 @@
client = tracker_connect (FALSE);
if (!client) {
- g_printerr (_("Could not establish a DBus connection to Tracker"));
+ g_printerr ("%s\n",
+ _("Could not establish a DBus connection to Tracker"));
return EXIT_FAILURE;
}
@@ -174,15 +174,16 @@
}
if (!service) {
- g_print (_("Defaulting to 'files' service"));
- g_print ("\n");
+ g_print ("%s\n",
+ _("Defaulting to 'files' service"));
type = SERVICE_FILES;
} else {
type = tracker_service_name_to_type (service);
if (type == SERVICE_OTHER_FILES && g_ascii_strcasecmp (service, "Other")) {
- g_printerr (_("Service not recognized, searching in other files...\n"));
+ g_printerr ("%s\n",
+ _("Service not recognized, searching in other files..."));
}
}
@@ -199,8 +200,9 @@
g_free (search);
if (error) {
- g_printerr (_("Could not get find detailed results by text"));
- g_printerr (", %s\n", error->message);
+ g_printerr ("%s, %s\n",
+ _("Could not get find detailed results by text"),
+ error->message);
g_error_free (error);
tracker_disconnect (client);
@@ -209,11 +211,11 @@
}
if (!array) {
- g_print (_("No results found matching your query"));
- g_print ("\n");
+ g_print ("%s\n",
+ _("No results found matching your query"));
} else {
- g_print (_("Results:"));
- g_print ("\n");
+ g_print ("%s\n",
+ _("Results:"));
g_ptr_array_foreach (array, (GFunc) get_meta_table_data, NULL);
g_ptr_array_free (array, TRUE);
@@ -229,8 +231,9 @@
g_free (search);
if (error) {
- g_printerr (_("Could not get find results by text"));
- g_printerr (", %s\n", error->message);
+ g_printerr ("%s, %s\n",
+ _("Could not get find results by text"),
+ error->message);
g_error_free (error);
tracker_disconnect (client);
@@ -239,8 +242,8 @@
}
if (!strv) {
- g_print (_("No results found matching your query"));
- g_print ("\n");
+ g_print ("%s\n",
+ _("No results found matching your query"));
} else {
for (p = strv; *p; p++) {
gchar *s;
Modified: branches/indexer-split/src/tracker-utils/tracker-stats.c
==============================================================================
--- branches/indexer-split/src/tracker-utils/tracker-stats.c (original)
+++ branches/indexer-split/src/tracker-utils/tracker-stats.c Wed Aug 13 10:41:39 2008
@@ -72,7 +72,8 @@
client = tracker_connect (FALSE);
if (!client) {
- g_printerr (_("Could not establish a DBus connection to Tracker"));
+ g_printerr ("%s\n",
+ _("Could not establish a DBus connection to Tracker"));
return EXIT_FAILURE;
}
@@ -88,11 +89,11 @@
}
if (!array) {
- g_print (_("No statistics available"));
- g_print ("\n");
+ g_print ("%s\n",
+ _("No statistics available"));
} else {
- g_print (_("Statistics:"));
- g_print ("\n");
+ g_print ("%s\n",
+ _("Statistics:"));
g_ptr_array_foreach (array, (GFunc) get_meta_table_data, NULL);
g_ptr_array_free (array, TRUE);
Modified: branches/indexer-split/src/tracker-utils/tracker-status.c
==============================================================================
--- branches/indexer-split/src/tracker-utils/tracker-status.c (original)
+++ branches/indexer-split/src/tracker-utils/tracker-status.c Wed Aug 13 10:41:39 2008
@@ -45,7 +45,8 @@
client = tracker_connect (FALSE);
if (!client) {
- g_printerr (_("Could not establish a DBus connection to Tracker"));
+ g_printerr ("%s\n",
+ _("Could not establish a DBus connection to Tracker"));
return EXIT_FAILURE;
}
@@ -62,7 +63,11 @@
}
if (status) {
- g_print ("Tracker status is '%s'\n", status);
+ gchar *str;
+
+ str = g_strdup_printf (_("Tracker status is '%s'"), status);
+ g_print ("%s\n", str);
+ g_free (str);
}
tracker_disconnect (client);
Modified: branches/indexer-split/src/tracker-utils/tracker-tag.c
==============================================================================
--- branches/indexer-split/src/tracker-utils/tracker-tag.c (original)
+++ branches/indexer-split/src/tracker-utils/tracker-tag.c Wed Aug 13 10:41:39 2008
@@ -1,4 +1,5 @@
-/* Tracker - indexer and metadata database engine
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
* Copyright (C) 2006, Mr Jamie McCracken (jamiemcc gnome org)
* Copyright (C) 2008, Nokia
*
@@ -29,9 +30,9 @@
#include <libtracker/tracker.h>
-#ifdef OS_WIN32
-#include "../trackerd/mingw-compat.h"
-#endif
+#ifdef G_OS_WIN32
+#include <trackerd/mingw-compat.h>
+#endif /* G_OS_WIN32 */
static gint limit = 512;
static gint offset = 0;
Modified: branches/indexer-split/src/tracker-utils/tracker-unique.c
==============================================================================
--- branches/indexer-split/src/tracker-utils/tracker-unique.c (original)
+++ branches/indexer-split/src/tracker-utils/tracker-unique.c Wed Aug 13 10:41:39 2008
@@ -30,9 +30,9 @@
#include <libtracker/tracker.h>
-#ifdef OS_WIN32
-#include "../trackerd/mingw-compat.h"
-#endif
+#ifdef G_OS_WIN32
+#include <trackerd/mingw-compat.h>
+#endif /* G_OS_WIN32 */
static gchar **fields;
static gchar *service;
@@ -72,27 +72,16 @@
{
gchar **meta;
gchar **p;
- gchar *str;
gint i = 0;
meta = value;
for (p = meta, i = 0; *p; p++, i++) {
- switch (i) {
- case 0:
- str = g_filename_from_utf8 (*p, -1, NULL, NULL, NULL);
- g_print (" %s:'%s'", _("Path"), str);
- g_free (str);
- break;
- case 1:
- g_print (", %s:'%s'", _("Service"), *p);
- break;
- case 2:
- g_print (", %s:'%s'", _("MIME-type"), *p);
- break;
- default:
- break;
- }
+ if (i == 0) {
+ g_print (" %s", *p);
+ } else {
+ g_print (", %s", *p);
+ }
}
g_print ("\n");
@@ -121,9 +110,8 @@
if (!fields) {
gchar *help;
- g_printerr (_("Fields are missing"));
- g_printerr ("\n"
- "\n");
+ g_printerr ("%s\n\n",
+ _("Fields are missing"));
help = g_option_context_get_help (context, TRUE, NULL);
g_option_context_free (context);
@@ -138,20 +126,22 @@
client = tracker_connect (FALSE);
if (!client) {
- g_printerr (_("Could not establish a DBus connection to Tracker"));
+ g_printerr ("%s\n",
+ _("Could not establish a DBus connection to Tracker"));
return EXIT_FAILURE;
}
if (!service) {
- g_print (_("Defaulting to 'files' service"));
- g_print ("\n");
+ g_print ("%s\n",
+ _("Defaulting to 'files' service"));
type = SERVICE_FILES;
} else {
type = tracker_service_name_to_type (service);
if (type == SERVICE_OTHER_FILES && g_ascii_strcasecmp (service, "Other")) {
- g_printerr (_("Service not recognized, searching in other files...\n"));
+ g_printerr ("%s\n",
+ _("Service not recognized, searching in other files..."));
}
}
@@ -189,7 +179,7 @@
g_free (content);
if (error) {
- g_printerr ("%s, %s",
+ g_printerr ("%s, %s\n",
_("Could not convert query file to UTF-8"),
error->message);
g_error_free (error);
@@ -210,7 +200,7 @@
g_free (buffer);
if (error) {
- g_printerr ("%s, %s",
+ g_printerr ("%s, %s\n",
_("Could not query search"),
error->message);
g_error_free (error);
@@ -219,8 +209,8 @@
}
if (!array) {
- g_print (_("No results found matching your query"));
- g_print ("\n");
+ g_print ("%s\n",
+ _("No results found matching your query"));
} else {
g_ptr_array_foreach (array, (GFunc) get_meta_table_data, NULL);
g_ptr_array_free (array, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]