diff options
Diffstat (limited to 'include/datetime/menu.h')
-rw-r--r-- | include/datetime/menu.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/include/datetime/menu.h b/include/datetime/menu.h index fcd709f..7b351c3 100644 --- a/include/datetime/menu.h +++ b/include/datetime/menu.h @@ -43,12 +43,12 @@ class Menu public: enum Profile { Desktop, DesktopGreeter, Phone, PhoneGreeter, NUM_PROFILES }; enum Section { Calendar, Appointments, Locations, Settings, NUM_SECTIONS }; - const std::string& name() const { return m_name; } - Profile profile() const { return m_profile; } - GMenuModel* menu_model() { return G_MENU_MODEL(m_menu); } + const std::string& name() const; + Profile profile() const; + GMenuModel* menu_model(); protected: - Menu (Profile profile_in, const std::string& name_in): m_profile(profile_in), m_name(name_in) {} + Menu (Profile profile_in, const std::string& name_in); virtual ~Menu() =default; GMenu* m_menu = nullptr; @@ -70,13 +70,12 @@ private: class MenuFactory { public: - MenuFactory (std::shared_ptr<Actions>& actions, std::shared_ptr<State>& state); + MenuFactory (const std::shared_ptr<Actions>& actions, const std::shared_ptr<const State>& state); std::shared_ptr<Menu> buildMenu(Menu::Profile profile); - std::shared_ptr<State> state() { return m_state; } private: std::shared_ptr<Actions> m_actions; - std::shared_ptr<State> m_state; + std::shared_ptr<const State> m_state; }; } // namespace datetime |