[dconf-editor] Move things in construct when possible.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Move things in construct when possible.
- Date: Tue, 12 Dec 2017 14:57:07 +0000 (UTC)
commit 09e86bf84858f6d7bf4c53116de8f9f237464bb0
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue Dec 12 15:04:38 2017 +0100
Move things in construct when possible.
editor/key-list-box-row.vala | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/editor/key-list-box-row.vala b/editor/key-list-box-row.vala
index 9697e20..841e336 100644
--- a/editor/key-list-box-row.vala
+++ b/editor/key-list-box-row.vala
@@ -292,10 +292,8 @@ private class KeyListBoxRowEditableNoSchema : KeyListBoxRow
public DConfKey key { get; construct; }
private override Key abstract_key { get { return (Key) key; }}
- public KeyListBoxRowEditableNoSchema (DConfKey _key, bool search_result_mode=false)
+ construct
{
- Object (key: _key, search_result_mode : search_result_mode);
-
if (boolean_switch != null)
((!) boolean_switch).notify ["active"].connect (() => key.value = new Variant.boolean (((!)
boolean_switch).get_active ()));
@@ -303,6 +301,11 @@ private class KeyListBoxRowEditableNoSchema : KeyListBoxRow
key_info_label.set_label (_("No Schema Found"));
}
+ public KeyListBoxRowEditableNoSchema (DConfKey _key, bool search_result_mode = false)
+ {
+ Object (key: _key, search_result_mode: search_result_mode);
+ }
+
protected override void update ()
{
if (key.is_ghost)
@@ -413,10 +416,8 @@ private class KeyListBoxRowEditable : KeyListBoxRow
private override Key abstract_key { get { return (Key) key; }}
private ulong boolean_switch_toggled_handler = 0;
- public KeyListBoxRowEditable (GSettingsKey _key, bool search_result_mode=false)
+ construct
{
- Object (key: _key, search_result_mode : search_result_mode);
-
if (boolean_switch != null)
boolean_switch_toggled_handler = ((!) boolean_switch).notify ["active"].connect (() => {
bool boolean = ((!) boolean_switch).get_active ();
@@ -435,6 +436,11 @@ private class KeyListBoxRowEditable : KeyListBoxRow
}
}
+ public KeyListBoxRowEditable (GSettingsKey _key, bool search_result_mode = false)
+ {
+ Object (key: _key, search_result_mode: search_result_mode);
+ }
+
protected override void update ()
{
if (boolean_switch != null)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]