[connections/add-cmdline-option-to-open-in-fullscreen] application: Add cmdline option to launch connection in fullscreen




commit 18df81ff0f45787611864cfab146e3c6a48585ee
Author: Felipe Borges <felipeborges gnome org>
Date:   Wed Jul 28 16:51:07 2021 +0200

    application: Add cmdline option to launch connection in fullscreen
    
    An user could automate launching a connection to a specific address
    in fullscreen, mocking a real desktop session.
    
    This is also useful for OpenQA tests over remote connections.
    See #5.
    
    Fixes #33

 src/application.vala | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/application.vala b/src/application.vala
index ebccd0a..15c79e7 100644
--- a/src/application.vala
+++ b/src/application.vala
@@ -222,16 +222,19 @@ namespace Connections {
             quit ();
         }
 
+        static bool opt_fullscreen;
         static string[] opt_uris;
         static string opt_file_import_uri;
         const OptionEntry[] options = {
             { "", 0, 0, GLib.OptionArg.STRING_ARRAY, ref opt_uris, N_ ("URL to connect"), null },
             { "file", 'F', 0, GLib.OptionArg.FILENAME, ref opt_file_import_uri, N_ ("Open .vnc or .rdp file 
at the given PATH"), "PATH" },
+            { "fullscreen", 'f', 0, GLib.OptionArg.NONE, ref opt_fullscreen, N_("Open in full screen"), null 
},
             { null }
         };
         public override int command_line (GLib.ApplicationCommandLine cmdline) {
             opt_uris = null;
             opt_file_import_uri = null;
+            opt_fullscreen = false;
 
             var parameter_string = _("A remote desktop client for the GNOME desktop environment");
             var opt_context = new OptionContext ("— " + parameter_string);
@@ -265,6 +268,8 @@ namespace Connections {
                 add_connection_from_file (opt_file_import_uri);
             }
 
+            main_window.fullscreened = opt_fullscreen;
+
             return 0;
         }
     }


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