aboutsummaryrefslogtreecommitdiff
path: root/src/actions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions.cpp')
-rw-r--r--src/actions.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/actions.cpp b/src/actions.cpp
index acf8fd4..d6fa698 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -65,7 +65,7 @@ void on_activate_appointment(GSimpleAction * /*action*/,
g_return_if_fail(uid && *uid);
// find url of the upcoming appointment with this uid
- for (auto& appt : self->state()->planner->upcoming.get())
+ for (const auto& appt : self->state()->planner->upcoming.get())
{
if (appt.uid == uid)
{
@@ -146,7 +146,7 @@ GVariant* create_default_header_state()
GVariant* create_calendar_state(const std::shared_ptr<State>& state)
{
gboolean days[32] = { 0 };
- for(const auto& appt : state->planner->thisMonth.get())
+ for (const auto& appt : state->planner->this_month.get())
days[appt.begin.day_of_month()] = true;
GVariantBuilder day_builder;
@@ -222,7 +222,7 @@ Actions::Actions(const std::shared_ptr<State>& state):
m_state->planner->time.changed().connect([this](const DateTime&){
update_calendar_state();
});
- m_state->planner->thisMonth.changed().connect([this](const std::vector<Appointment>&){
+ m_state->planner->this_month.changed().connect([this](const std::vector<Appointment>&){
update_calendar_state();
});
m_state->settings->show_week_numbers.changed().connect([this](bool){
@@ -249,6 +249,17 @@ void Actions::set_calendar_date(const DateTime& date)
m_state->planner->time.set(date);
}
+GActionGroup* Actions::action_group()
+{
+ return G_ACTION_GROUP(m_actions);
+}
+
+const std::shared_ptr<State> Actions::state() const
+{
+ return m_state;
+}
+
+
} // namespace datetime
} // namespace indicator