[latexila] Fix files opening from command line



commit a24d0929e25089696a41b800b7a119e2d1b790d6
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri May 24 22:56:17 2013 +0200

    Fix files opening from command line
    
    Thanks to sigo for the bug report.

 src/latexila.vala |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/latexila.vala b/src/latexila.vala
index 1df2caa..b96cc1e 100644
--- a/src/latexila.vala
+++ b/src/latexila.vala
@@ -21,6 +21,8 @@
 
 public class Latexila : Gtk.Application
 {
+    private bool _first_activate = true;
+
     public Latexila ()
     {
         Object (application_id: "org.gnome.latexila");
@@ -37,7 +39,12 @@ public class Latexila : Gtk.Application
         activate.connect (() =>
         {
             hold ();
-            create_window ();
+
+            if (_first_activate)
+                _first_activate = false;
+            else
+                create_window ();
+
             release ();
         });
 
@@ -110,6 +117,7 @@ public class Latexila : Gtk.Application
 
         AppSettings.get_default ();
         Gtk.AccelMap.load (get_accel_filename ());
+        create_window ();
         release ();
     }
 


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