[fractal/fractal-args: 1/2] Revert "gtk: Implement version command line"



commit f3180e86606b830188c630e13bb9642e0c1bc577
Author: Daniel GarcĂ­a Moreno <dani danigm net>
Date:   Wed Jun 24 09:41:20 2020 +0200

    Revert "gtk: Implement version command line"
    
    This reverts commit 72dd8902ec02a5899ddbc98103a30d347d2b0ab2.

 fractal-gtk/src/main.rs | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)
---
diff --git a/fractal-gtk/src/main.rs b/fractal-gtk/src/main.rs
index a49d4d32..ccc7307a 100644
--- a/fractal-gtk/src/main.rs
+++ b/fractal-gtk/src/main.rs
@@ -56,10 +56,7 @@ fn main() -> Result<(), Box<dyn Error>> {
     gst::init()?;
 
     // Create a Application with default flags
-    let application = gtk::Application::new(
-        Some(config::APP_ID),
-        gio::ApplicationFlags::HANDLES_COMMAND_LINE,
-    )?;
+    let application = gtk::Application::new(Some(config::APP_ID), gio::ApplicationFlags::empty())?;
 
     application.set_resource_base_path(Some("/org/gnome/Fractal"));
 
@@ -67,20 +64,6 @@ fn main() -> Result<(), Box<dyn Error>> {
         App::on_startup(application);
     });
 
-    application.connect_command_line(|app, command| {
-        for arg in command.get_arguments() {
-            match arg.to_str() {
-                Some("-V") | Some("--version") => {
-                    println!("{}", config::VERSION);
-                    app.quit();
-                }
-                _ => {}
-            };
-        }
-
-        0
-    });
-
     application.run(&args().collect::<Vec<_>>());
 
     Ok(())


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