[tracker] tracker-*: print both version and license information.
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] tracker-*: print both version and license information.
- Date: Thu, 19 Nov 2009 13:02:46 +0000 (UTC)
commit d4e3bfd4895f82d268027c63fb04f78b8b93d5d8
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Thu Nov 19 11:58:30 2009 +0000
tracker-*: print both version and license information.
Print tracker version and its license when using --version/-V option, as it is
done with tracker-extract.
src/tracker-control/tracker-control.c | 12 +++++++++++-
src/tracker-search-tool/tracker-search-tool.gs | 13 +++++++++++--
src/tracker-status-icon/tracker-main.c | 12 +++++++++++-
src/tracker-utils/tracker-import.c | 13 ++++++++++++-
src/tracker-utils/tracker-info.c | 12 +++++++++++-
src/tracker-utils/tracker-search.c | 12 +++++++++++-
src/tracker-utils/tracker-sparql.c | 12 +++++++++++-
src/tracker-utils/tracker-stats.c | 12 +++++++++++-
src/tracker-utils/tracker-status.c | 12 +++++++++++-
src/tracker-utils/tracker-tag.c | 12 +++++++++++-
10 files changed, 111 insertions(+), 11 deletions(-)
---
diff --git a/src/tracker-control/tracker-control.c b/src/tracker-control/tracker-control.c
index f12e171..551f6ee 100644
--- a/src/tracker-control/tracker-control.c
+++ b/src/tracker-control/tracker-control.c
@@ -38,6 +38,16 @@
#include <libtracker-miner/tracker-miner-manager.h>
#include <libtracker-miner/tracker-crawler.h>
+#define ABOUT \
+ "Tracker " PACKAGE_VERSION "\n"
+
+#define LICENSE \
+ "This program is free software and comes without any warranty.\n" \
+ "It is licensed under version 2 or later of the General Public " \
+ "License which can be viewed at:\n" \
+ "\n" \
+ " http://www.gnu.org/licenses/gpl.txt\n"
+
static gboolean should_kill;
static gboolean should_terminate;
static gboolean hard_reset;
@@ -214,7 +224,7 @@ main (int argc, char **argv)
g_option_context_free (context);
if (print_version) {
- g_print ("%s\n", PACKAGE_STRING);
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
return EXIT_SUCCESS;
}
diff --git a/src/tracker-search-tool/tracker-search-tool.gs b/src/tracker-search-tool/tracker-search-tool.gs
index 1e34c2c..8a5bbc9 100644
--- a/src/tracker-search-tool/tracker-search-tool.gs
+++ b/src/tracker-search-tool/tracker-search-tool.gs
@@ -23,8 +23,17 @@ uses
Gtk
[CCode (cheader_filename = "config.h")]
-const extern static PACKAGE_STRING : string
+const extern static PACKAGE_VERSION : string
+const static ABOUT : string = "Tracker " + PACKAGE_VERSION + "\n"
+
+const static LICENSE : string =\
+"This program is free software and comes without any warranty.\n" +\
+"It is licensed under version 2 or later of the General Public " +\
+"License which can be viewed at:\n" +\
+"\n" +\
+" http://www.gnu.org/licenses/gpl.txt\n"
+
window : Window
service : string?
terms : array of string?
@@ -55,7 +64,7 @@ init
return
if (print_version)
- stdout.printf ("%s\n", PACKAGE_STRING)
+ stdout.printf ("\n" + ABOUT + "\n" + LICENSE + "\n");
return
var server = new TrackerSearchToolServer
diff --git a/src/tracker-status-icon/tracker-main.c b/src/tracker-status-icon/tracker-main.c
index f4cb95a..d78d457 100644
--- a/src/tracker-status-icon/tracker-main.c
+++ b/src/tracker-status-icon/tracker-main.c
@@ -29,6 +29,16 @@
#include <glib.h>
#include <glib/gi18n.h>
+#define ABOUT \
+ "Tracker " PACKAGE_VERSION "\n"
+
+#define LICENSE \
+ "This program is free software and comes without any warranty.\n" \
+ "It is licensed under version 2 or later of the General Public " \
+ "License which can be viewed at:\n" \
+ "\n" \
+ " http://www.gnu.org/licenses/gpl.txt\n"
+
static gboolean print_version;
/* Unused at the moment */
@@ -59,7 +69,7 @@ main (int argc, char *argv[])
g_option_context_free (context);
if (print_version) {
- g_print ("%s\n", PACKAGE_STRING);
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
return EXIT_SUCCESS;
}
diff --git a/src/tracker-utils/tracker-import.c b/src/tracker-utils/tracker-import.c
index d6ffbec..6054251 100644
--- a/src/tracker-utils/tracker-import.c
+++ b/src/tracker-utils/tracker-import.c
@@ -33,6 +33,17 @@
#include <libtracker-client/tracker.h>
#include <libtracker-common/tracker-common.h>
+#define ABOUT \
+ "Tracker " PACKAGE_VERSION "\n"
+
+#define LICENSE \
+ "This program is free software and comes without any warranty.\n" \
+ "It is licensed under version 2 or later of the General Public " \
+ "License which can be viewed at:\n" \
+ "\n" \
+ " http://www.gnu.org/licenses/gpl.txt\n"
+
+
static gchar **filenames = NULL;
static gboolean print_version;
@@ -70,7 +81,7 @@ main (int argc, char **argv)
g_option_context_parse (context, &argc, &argv, NULL);
if (print_version) {
- g_print ("%s\n", PACKAGE_STRING);
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
g_option_context_free (context);
return EXIT_SUCCESS;
diff --git a/src/tracker-utils/tracker-info.c b/src/tracker-utils/tracker-info.c
index f356b67..c032afe 100644
--- a/src/tracker-utils/tracker-info.c
+++ b/src/tracker-utils/tracker-info.c
@@ -32,6 +32,16 @@
#include <libtracker-client/tracker.h>
#include <libtracker-common/tracker-common.h>
+#define ABOUT \
+ "Tracker " PACKAGE_VERSION "\n"
+
+#define LICENSE \
+ "This program is free software and comes without any warranty.\n" \
+ "It is licensed under version 2 or later of the General Public " \
+ "License which can be viewed at:\n" \
+ "\n" \
+ " http://www.gnu.org/licenses/gpl.txt\n"
+
static gchar **filenames = NULL;
static gboolean print_version;
@@ -97,7 +107,7 @@ main (int argc, char **argv)
g_option_context_parse (context, &argc, &argv, NULL);
if (print_version) {
- g_print ("%s\n", PACKAGE_STRING);
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
g_option_context_free (context);
return EXIT_SUCCESS;
diff --git a/src/tracker-utils/tracker-search.c b/src/tracker-utils/tracker-search.c
index 7933906..69945f6 100644
--- a/src/tracker-utils/tracker-search.c
+++ b/src/tracker-utils/tracker-search.c
@@ -31,6 +31,16 @@
#include <libtracker-client/tracker.h>
#include <libtracker-common/tracker-common.h>
+#define ABOUT \
+ "Tracker " PACKAGE_VERSION "\n"
+
+#define LICENSE \
+ "This program is free software and comes without any warranty.\n" \
+ "It is licensed under version 2 or later of the General Public " \
+ "License which can be viewed at:\n" \
+ "\n" \
+ " http://www.gnu.org/licenses/gpl.txt\n"
+
static gint limit = 512;
static gint offset;
static gchar **terms;
@@ -800,7 +810,7 @@ main (int argc, char **argv)
g_free (summary);
if (print_version) {
- g_print ("%s\n", PACKAGE_STRING);
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
g_option_context_free (context);
return EXIT_SUCCESS;
diff --git a/src/tracker-utils/tracker-sparql.c b/src/tracker-utils/tracker-sparql.c
index 884ae5a..c4491bb 100644
--- a/src/tracker-utils/tracker-sparql.c
+++ b/src/tracker-utils/tracker-sparql.c
@@ -32,6 +32,16 @@
#include <libtracker-client/tracker.h>
#include <libtracker-common/tracker-common.h>
+#define ABOUT \
+ "Tracker " PACKAGE_VERSION "\n"
+
+#define LICENSE \
+ "This program is free software and comes without any warranty.\n" \
+ "It is licensed under version 2 or later of the General Public " \
+ "License which can be viewed at:\n" \
+ "\n" \
+ " http://www.gnu.org/licenses/gpl.txt\n"
+
static gchar *file;
static gchar *query;
static gboolean update;
@@ -167,7 +177,7 @@ main (int argc, char **argv)
g_option_context_parse (context, &argc, &argv, NULL);
if (print_version) {
- g_print ("%s\n", PACKAGE_STRING);
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
g_option_context_free (context);
return EXIT_SUCCESS;
diff --git a/src/tracker-utils/tracker-stats.c b/src/tracker-utils/tracker-stats.c
index 768df8d..2c95be7 100644
--- a/src/tracker-utils/tracker-stats.c
+++ b/src/tracker-utils/tracker-stats.c
@@ -31,6 +31,16 @@
#include <libtracker-client/tracker.h>
+#define ABOUT \
+ "Tracker " PACKAGE_VERSION "\n"
+
+#define LICENSE \
+ "This program is free software and comes without any warranty.\n" \
+ "It is licensed under version 2 or later of the General Public " \
+ "License which can be viewed at:\n" \
+ "\n" \
+ " http://www.gnu.org/licenses/gpl.txt\n"
+
static gboolean print_version;
static GOptionEntry entries[] = {
@@ -82,7 +92,7 @@ main (int argc, char **argv)
g_option_context_parse (context, &argc, &argv, NULL);
if (print_version) {
- g_print ("%s\n", PACKAGE_STRING);
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
g_option_context_free (context);
return EXIT_SUCCESS;
diff --git a/src/tracker-utils/tracker-status.c b/src/tracker-utils/tracker-status.c
index 2b8706f..8a4e4c8 100644
--- a/src/tracker-utils/tracker-status.c
+++ b/src/tracker-utils/tracker-status.c
@@ -38,6 +38,16 @@
#include "tracker-miner-client.h"
+#define ABOUT \
+ "Tracker " PACKAGE_VERSION "\n"
+
+#define LICENSE \
+ "This program is free software and comes without any warranty.\n" \
+ "It is licensed under version 2 or later of the General Public " \
+ "License which can be viewed at:\n" \
+ "\n" \
+ " http://www.gnu.org/licenses/gpl.txt\n"
+
static GMainLoop *main_loop;
static GHashTable *miners_progress;
static GHashTable *miners_status;
@@ -341,7 +351,7 @@ main (gint argc, gchar *argv[])
g_option_context_parse (context, &argc, &argv, NULL);
if (print_version) {
- g_print ("%s\n", PACKAGE_STRING);
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
g_option_context_free (context);
return EXIT_SUCCESS;
diff --git a/src/tracker-utils/tracker-tag.c b/src/tracker-utils/tracker-tag.c
index 57034a4..2a5831f 100644
--- a/src/tracker-utils/tracker-tag.c
+++ b/src/tracker-utils/tracker-tag.c
@@ -31,6 +31,16 @@
#include <libtracker-client/tracker.h>
#include <libtracker-common/tracker-common.h>
+#define ABOUT \
+ "Tracker " PACKAGE_VERSION "\n"
+
+#define LICENSE \
+ "This program is free software and comes without any warranty.\n" \
+ "It is licensed under version 2 or later of the General Public " \
+ "License which can be viewed at:\n" \
+ "\n" \
+ " http://www.gnu.org/licenses/gpl.txt\n"
+
static gint limit = 512;
static gint offset;
static gchar **files;
@@ -635,7 +645,7 @@ main (int argc, char **argv)
g_option_context_parse (context, &argc, &argv, NULL);
if (print_version) {
- g_print ("%s\n", PACKAGE_STRING);
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
g_option_context_free (context);
return EXIT_SUCCESS;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]