[dconf-editor] Fix toggling boolean on swall window.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Fix toggling boolean on swall window.
- Date: Wed, 14 Nov 2018 13:49:08 +0000 (UTC)
commit 380af6c18d83d0409a374010de98fa520f3948ac
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Oct 22 17:29:39 2018 +0200
Fix toggling boolean on swall window.
editor/dconf-window.vala | 4 ++++
editor/key-list-box-row.vala | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index 55d0f94..7c056c6 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -1205,6 +1205,8 @@ private class DConfWindow : ApplicationWindow
{
if (headerbar.has_popover ())
return;
+ if (browser_view.in_window_bookmarks)
+ return;
browser_view.discard_row_popover ();
browser_view.toggle_boolean_key ();
@@ -1214,6 +1216,8 @@ private class DConfWindow : ApplicationWindow
{
if (headerbar.has_popover ())
return;
+ if (browser_view.in_window_bookmarks)
+ return;
if (revealer.dismiss_selected_modification ())
{
diff --git a/editor/key-list-box-row.vala b/editor/key-list-box-row.vala
index 6877b82..b210949 100644
--- a/editor/key-list-box-row.vala
+++ b/editor/key-list-box-row.vala
@@ -292,9 +292,12 @@ private class KeyListBoxRow : ClickableListBoxRow
internal void toggle_boolean_key ()
{
+ if (type_string != "b")
+ return;
if (boolean_switch == null)
return;
- ((!) boolean_switch).activate ();
+ bool state = ((!) boolean_switch).get_active ();
+ ((!) boolean_switch).set_active (!state);
}
internal void change_dismissed ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]