[gnome-maps] main.c: Use the correct argv/argc
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] main.c: Use the correct argv/argc
- Date: Sun, 24 Aug 2014 17:27:26 +0000 (UTC)
commit b5d536553276bdd00536742babf05d4bf382c957
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Fri Aug 22 08:39:05 2014 +0200
main.c: Use the correct argv/argc
Before this, commandline handling would not work since
we were removing the program-name from the argv array.
With this fix, we will be able to use the standard
GApplication options.
$ gnome-maps --help-gapplication
$ gnome-maps --gapplication-service
etc.
https://bugzilla.gnome.org/show_bug.cgi?id=735215
src/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index cb53558..146e486 100644
--- a/src/main.c
+++ b/src/main.c
@@ -42,7 +42,7 @@ main (int argc, char *argv[])
context = gjs_context_new_with_search_path ((char**) search_path);
if (!gjs_context_define_string_array(context, "ARGV",
- argc - 1, (const char**)argv + 1,
+ argc, (const char**)argv,
&error))
{
g_critical ("Failed to define ARGV: %s", error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]