[gnome-text-editor] app: handle --new-window even when files are not present



commit 3170a54c40cc529e4e0eb63e2319bcddb2b0f63a
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jun 19 14:20:04 2022 -0700

    app: handle --new-window even when files are not present
    
    This option was added to ensure that files passed to the command line
    would show up in a new window.
    
    However, we can trivially support using it to open a new window with a
    draft as well.
    
    Fixes #409

 src/editor-application.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/editor-application.c b/src/editor-application.c
index 88e7633..a89ff86 100644
--- a/src/editor-application.c
+++ b/src/editor-application.c
@@ -486,6 +486,8 @@ editor_application_command_line (GApplication            *app,
                         (GFile **)(gpointer)files->pdata,
                         files->len,
                         hint);
+  else if (g_strcmp0 (hint, "new-window") == 0)
+    editor_session_create_window (self->session);
   else
     g_application_activate (app);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]