aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actions-live.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/actions-live.cpp b/src/actions-live.cpp
index f8ef4e8..51d96c6 100644
--- a/src/actions-live.cpp
+++ b/src/actions-live.cpp
@@ -76,26 +76,26 @@ void LiveActions::open_desktop_settings()
bool LiveActions::can_open_planner() const
{
- bool inited = false;
- bool have_evolution = false;
+ static bool inited = false;
+ static bool have_calendar = false;
if (G_UNLIKELY(!inited))
{
inited = true;
auto all = g_app_info_get_all_for_type ("text/calendar");
- for(auto l=all; !have_evolution && l!=nullptr; l=l->next)
+ for(auto l=all; !have_calendar && l!=nullptr; l=l->next)
{
auto app_info = static_cast<GAppInfo*>(l->data);
- if (!g_strcmp0("evolution", g_app_info_get_executable(app_info)))
- have_evolution = true;
+ if (!g_strcmp0("evolution.desktop", g_app_info_get_id(app_info)))
+ have_calendar = true;
}
g_list_free_full(all, (GDestroyNotify)g_object_unref);
}
- return have_evolution;
+ return have_calendar;
}
void LiveActions::open_planner()