[latexila] Build tools: bind properties correctly
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Build tools: bind properties correctly
- Date: Fri, 29 Jul 2016 14:11:42 +0000 (UTC)
commit ee86bc35f22232fb4b6bfedaf6c09ed6c2731c43
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Jul 29 16:05:17 2016 +0200
Build tools: bind properties correctly
The SYNC_CREATE flag was missing at some places. So if the
show-build-warnings or show-build-badboxes setting was FALSE, it was not
correctly initialized in the BuildView.
src/main_window_build_tools.vala | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/main_window_build_tools.vala b/src/main_window_build_tools.vala
index 419386c..bb2831c 100644
--- a/src/main_window_build_tools.vala
+++ b/src/main_window_build_tools.vala
@@ -413,33 +413,33 @@ public class MainWindowBuildTools
ToggleAction action_details =
_static_action_group.get_action ("BuildShowDetails") as ToggleAction;
+ action_details.active = false;
+
action_details.bind_property ("active", _build_view, "show-details",
- BindingFlags.DEFAULT);
+ BindingFlags.DEFAULT | BindingFlags.SYNC_CREATE);
_build_view.bind_property ("has-details", action_details, "sensitive",
- BindingFlags.SYNC_CREATE);
-
- action_details.active = false;
+ BindingFlags.DEFAULT | BindingFlags.SYNC_CREATE);
/* Show warnings */
ToggleAction action_warnings =
_static_action_group.get_action ("BuildShowWarnings") as ToggleAction;
- _build_view.bind_property ("show-warnings", action_warnings, "active",
- BindingFlags.BIDIRECTIONAL);
-
action_warnings.active = settings.get_boolean ("show-build-warnings");
+ action_warnings.bind_property ("active", _build_view, "show-warnings",
+ BindingFlags.BIDIRECTIONAL | BindingFlags.SYNC_CREATE);
+
/* Show badboxes */
ToggleAction action_badboxes =
_static_action_group.get_action ("BuildShowBadBoxes") as ToggleAction;
- _build_view.bind_property ("show-badboxes", action_badboxes, "active",
- BindingFlags.BIDIRECTIONAL);
-
action_badboxes.active = settings.get_boolean ("show-build-badboxes");
+
+ action_badboxes.bind_property ("active", _build_view, "show-badboxes",
+ BindingFlags.BIDIRECTIONAL | BindingFlags.SYNC_CREATE);
}
/* Gtk.Action callbacks */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]