[shotwell/wip/gtk4: 20/88] Fix commandline arguments
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/wip/gtk4: 20/88] Fix commandline arguments
- Date: Mon, 30 May 2022 17:34:42 +0000 (UTC)
commit f061253c90ef196a07d75dc558ad5f980a3e4432
Author: Jens Georg <mail jensge org>
Date: Mon Apr 4 17:23:15 2022 +0200
Fix commandline arguments
src/main.vala | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/main.vala b/src/main.vala
index 74a10f01..9c25cf34 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -382,11 +382,12 @@ void main(string[] args) {
"/data/gsettings", true);
}
- // init GTK (valac has already called g_threads_init())
+ Gtk.init();
try {
- Gtk.init (); //_with_args(ref args, _("[FILE]"), CommandlineOptions.entries,
- // TODO Resources.APP_GETTEXT_PACKAGE);
-
+ // TODO: Let GApplication handle the arguments
+ var context = new GLib.OptionContext("");
+ context.add_main_entries (CommandlineOptions.entries, Resources.APP_GETTEXT_PACKAGE);
+ context.parse(ref args);
} catch (Error e) {
print(e.message + "\n");
print(_("Run “%s --help” to see a full list of available command line options.\n"), args[0]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]