From 7bbad129a0c9c9f3a38b178557d68623bef03464 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 9 Dec 2018 20:04:42 +0100 Subject: Gtk/Gio templating of main inkscape application class to allow commandline usage when graphic server is not available --- src/inkscape-main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/inkscape-main.cpp') diff --git a/src/inkscape-main.cpp b/src/inkscape-main.cpp index 52d3e7873..e1c0411e0 100644 --- a/src/inkscape-main.cpp +++ b/src/inkscape-main.cpp @@ -19,9 +19,11 @@ int main(int argc, char *argv[]) { - auto application = InkscapeApplication::create(); - return application->run(argc, argv); + if(gtk_init_check(NULL, NULL)) + return (new ConcreteInkscapeApplication())->run(argc, argv); + else + return (new ConcreteInkscapeApplication())->run(argc, argv); } /* -- cgit v1.2.3