[dconf-editor] Make a method protected.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Make a method protected.
- Date: Fri, 11 Jan 2019 13:01:08 +0000 (UTC)
commit 9b9d9ab5f54073b2ce4bf4e697d6ed052c92bea6
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Jan 10 13:43:58 2019 +0100
Make a method protected.
We do not need to make toggle_hamburger_menu virtual.
Instead, rely on a protected toggle_view_menu method.
editor/base-headerbar.vala | 5 ++++-
editor/dconf-headerbar.vala | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/editor/base-headerbar.vala b/editor/base-headerbar.vala
index 2a45a37..4340e5b 100644
--- a/editor/base-headerbar.vala
+++ b/editor/base-headerbar.vala
@@ -121,11 +121,14 @@ private class BaseHeaderBar : NightTimeAwareHeaderBar, AdaptativeWidget
info_button.active = false;
}
- internal virtual void toggle_hamburger_menu ()
+ internal void toggle_hamburger_menu ()
{
if (info_button.visible)
info_button.active = !info_button.active;
+ else
+ toggle_view_menu ();
}
+ protected virtual void toggle_view_menu () {}
/*\
* * modes
diff --git a/editor/dconf-headerbar.vala b/editor/dconf-headerbar.vala
index 8503753..184e731 100644
--- a/editor/dconf-headerbar.vala
+++ b/editor/dconf-headerbar.vala
@@ -166,12 +166,12 @@ private class DConfHeaderBar : BookmarksHeaderBar, AdaptativeWidget
* * hamburger menu
\*/
- internal override void toggle_hamburger_menu ()
+ protected override void toggle_view_menu ()
{
if (modifications_actions_button.visible)
modifications_actions_button.active = !modifications_actions_button.active;
else
- base.toggle_hamburger_menu ();
+ base.toggle_view_menu ();
}
protected override void populate_menu (ref GLib.Menu menu)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]