[dconf-editor] Restrict access to adaptative_children.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Restrict access to adaptative_children.
- Date: Wed, 19 Dec 2018 17:18:31 +0000 (UTC)
commit 77748a13907370b3f32e37fee1fbb50ced1a7b03
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Dec 5 21:04:18 2018 +0100
Restrict access to adaptative_children.
editor/adaptative-window.vala | 7 ++++++-
editor/browser-window.vala | 8 ++++----
editor/dconf-window.vala | 2 +-
3 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/editor/adaptative-window.vala b/editor/adaptative-window.vala
index cab86be..402b38e 100644
--- a/editor/adaptative-window.vala
+++ b/editor/adaptative-window.vala
@@ -123,7 +123,12 @@ private class AdaptativeWindow : ApplicationWindow
\*/
protected AdaptativeWidget.WindowSize window_size = AdaptativeWidget.WindowSize.START_SIZE;
- protected List<AdaptativeWidget> adaptative_children = new List<AdaptativeWidget> ();
+
+ private List<AdaptativeWidget> adaptative_children = new List<AdaptativeWidget> ();
+ protected void add_adaptative_child (AdaptativeWidget child)
+ {
+ adaptative_children.append (child);
+ }
private void update_adaptative_children (ref int width, ref int height)
{
diff --git a/editor/browser-window.vala b/editor/browser-window.vala
index 8231276..48825fb 100644
--- a/editor/browser-window.vala
+++ b/editor/browser-window.vala
@@ -40,10 +40,10 @@ private abstract class BrowserWindow : AdaptativeWindow, AdaptativeWidget
init_night_mode ();
bind_mouse_config ();
- adaptative_children.append (headerbar);
- adaptative_children.append (browser_view);
- adaptative_children.append (notifications_revealer);
- adaptative_children.append (this);
+ add_adaptative_child (headerbar);
+ add_adaptative_child (browser_view);
+ add_adaptative_child (notifications_revealer);
+ add_adaptative_child (this);
}
/*\
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index 35efa74..20a5486 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -318,7 +318,7 @@ private class DConfWindow : BrowserWindow
revealer = new ModificationsRevealer ();
revealer.visible = true;
main_grid.add (revealer);
- adaptative_children.append (revealer);
+ add_adaptative_child (revealer);
}
/*\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]