projects
/
hvgrip.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move application data files to data folder
[hvgrip.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
fb886ab
..
ba35a4b
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-42,6
+42,7
@@
static int force_small=FALSE;
static int local_mode=FALSE;
static int no_redirect=FALSE;
static int verbose=FALSE;
static int local_mode=FALSE;
static int no_redirect=FALSE;
static int verbose=FALSE;
+static int version=FALSE;
struct poptOption options[] = {
{
struct poptOption options[] = {
{
@@
-116,6
+117,15
@@
struct poptOption options[] = {
N_("Run in verbose (debug) mode"),
NULL
},
N_("Run in verbose (debug) mode"),
NULL
},
+ {
+ "version",
+ '\0',
+ POPT_ARG_NONE,
+ &version,
+ 0,
+ N_("Print version number"),
+ NULL
+ },
POPT_AUTOHELP
{
NULL,
POPT_AUTOHELP
{
NULL,
@@
-156,8
+166,8
@@
int Cmain(int argc, char* argv[])
/* setup locale, i18n */
gtk_set_locale();
/* setup locale, i18n */
gtk_set_locale();
- bindtextdomain(
GETTEXT_PACKAGE,GNOME
LOCALEDIR);
- textdomain(
GETTEXT_PACKAG
E);
+ bindtextdomain(
PACKAGE_TARNAME,
LOCALEDIR);
+ textdomain(
PACKAGE_TARNAM
E);
gtk_init(&argc, &argv);
context = poptGetContext(NULL, argc, (const char **) argv, options, 0);
gtk_init(&argc, &argv);
context = poptGetContext(NULL, argc, (const char **) argv, options, 0);
@@
-173,7
+183,12
@@
int Cmain(int argc, char* argv[])
exit(1);
}
exit(1);
}
- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF8");
+ if (version) {
+ printf("%s\n", PACKAGE_VERSION);
+ exit(0);
+ }
+
+ bind_textdomain_codeset(PACKAGE_TARNAME, "UTF8");
setenv("CHARSET","UTF-8",1);
do_debug=verbose;
setenv("CHARSET","UTF-8",1);
do_debug=verbose;