[latexila] Fix show/hide of main window components at startup



commit 265097996aa498c0fe7f3165a9ba8f58ba98782b
Author: SÃbastien Wilmet <swilmet gnome org>
Date:   Fri Oct 19 22:32:09 2012 +0200

    Fix show/hide of main window components at startup
    
    The visibility of the main and edit toolbars, the side panel and the
    bottom panel was not always set correctly at startup.
    
    Now when a component is by default shown or hide, the corresponding
    value is set to the GtkAction, so when this value is modified later by
    the show_or_hide_widgets() function, if the value is not the same, the
    notify signal is correctly emitted.

 src/main_window.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/main_window.vala b/src/main_window.vala
index 4c2ddf9..112b459 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -336,6 +336,7 @@ public class MainWindow : Window
 
         ToggleAction action =
             _action_group.get_action ("ViewMainToolbar") as ToggleAction;
+        action.active = true;
 
         main_toolbar.bind_property ("visible", action, "active",
             BindingFlags.BIDIRECTIONAL);
@@ -352,6 +353,7 @@ public class MainWindow : Window
 
         ToggleAction action =
             _action_group.get_action ("ViewEditToolbar") as ToggleAction;
+        action.active = true;
 
         edit_toolbar.bind_property ("visible", action, "active",
             BindingFlags.BIDIRECTIONAL);
@@ -366,6 +368,7 @@ public class MainWindow : Window
 
         // Bind the toggle action to show/hide the side panel
         ToggleAction action = _action_group.get_action ("ViewSidePanel") as ToggleAction;
+        action.active = true;
 
         side_panel.bind_property ("visible", action, "active",
             BindingFlags.BIDIRECTIONAL);
@@ -458,6 +461,7 @@ public class MainWindow : Window
         // Bind the toggle action to show/hide the bottom panel
         ToggleAction action =
             _action_group.get_action ("ViewBottomPanel") as ToggleAction;
+        action.active = false;
 
         bottom_panel.bind_property ("visible", action, "active",
             BindingFlags.BIDIRECTIONAL);



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