[latexila] Revert "Fix the "New Window" action in gnome-shell"



commit 7c6a84eb528d5e545bd6ec719974932874a50c1e
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat May 25 14:22:31 2013 +0200

    Revert "Fix the "New Window" action in gnome-shell"
    
    This reverts commit 3e2f1bf48f80d769c50641600225eb4a310075dd.
    
    The commit 3e2f1b introduced bugs with the command line options.

 src/latexila.vala |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/latexila.vala b/src/latexila.vala
index 1df2caa..9704adc 100644
--- a/src/latexila.vala
+++ b/src/latexila.vala
@@ -37,7 +37,7 @@ public class Latexila : Gtk.Application
         activate.connect (() =>
         {
             hold ();
-            create_window ();
+            active_window.present ();
             release ();
         });
 
@@ -109,6 +109,8 @@ public class Latexila : Gtk.Application
         new StockIcons ();
 
         AppSettings.get_default ();
+        create_window ();
+        reopen_files ();
         Gtk.AccelMap.load (get_accel_filename ());
         release ();
     }
@@ -187,9 +189,7 @@ public class Latexila : Gtk.Application
 
     public MainWindow create_window ()
     {
-        bool first_window = active_window == null;
-
-        if (! first_window)
+        if (active_window != null)
         {
             MainWindow window = active_window as MainWindow;
             window.save_state ();
@@ -199,9 +199,6 @@ public class Latexila : Gtk.Application
         add_window (new_window);
         new_window.show ();
 
-        if (first_window)
-            reopen_files ();
-
         return new_window;
     }
 


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