diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5206a6403..c18847b4f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1090,7 +1090,8 @@ static int sp_process_file_list(std::vector<gchar*> fl) static int sp_main_shell(char const* command_name) { int retval = 0; - + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setString("/options/openmethod/value", "shell"); const unsigned int buffer_size = 4096; gchar *command_line = g_strnfill(buffer_size, 0); g_strlcpy(command_line, command_name, buffer_size); @@ -1156,13 +1157,15 @@ static int sp_main_shell(char const* command_name) } while (linedata && (retval == 0)); g_free(command_line); + prefs->setString("/options/openmethod/value", "done"); return retval; } int sp_main_console(int argc, char const **argv) { /* We are started in text mode */ - +Inkscape::Preferences *prefs = Inkscape::Preferences::get(); +prefs->setString("/options/openmethod/value", "shell"); #if !GLIB_CHECK_VERSION(2,36,0) /* Do this g_type_init(), so that we can use Xft/Freetype2 (Pango) * in a non-Gtk environment. Used in libnrtype's @@ -1185,6 +1188,7 @@ int sp_main_console(int argc, char const **argv) #endif // WITH_DBUS ) { g_print("Nothing to do!\n"); + prefs->setString("/options/openmethod/value", "done"); exit(0); } @@ -1193,14 +1197,16 @@ int sp_main_console(int argc, char const **argv) if (sp_shell) { int retVal = sp_main_shell(argv[0]); // Run as interactive shell + prefs->setString("/options/openmethod/value", "done"); exit((retVal < 0) ? 1 : 0); } else { int retVal = sp_process_file_list(fl); // Normal command line invocation if (retVal){ + prefs->setString("/options/openmethod/value", "done"); exit(1); } } - + prefs->setString("/options/openmethod/value", "done"); return 0; } |
