diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-13 17:00:19 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-03-13 17:00:19 -0500 |
commit | 01dca64fc75b6bff4494f1886f2397f6fd0ad8d1 (patch) | |
tree | 647e61f1e1fafefc86dc5f8e9c5efa04d8c7c8c1 /src | |
parent | 379aeeed3dc02c1088f2a50f1ec3ec880d7d4b76 (diff) | |
download | ayatana-indicator-datetime-01dca64fc75b6bff4494f1886f2397f6fd0ad8d1.tar.gz ayatana-indicator-datetime-01dca64fc75b6bff4494f1886f2397f6fd0ad8d1.tar.bz2 ayatana-indicator-datetime-01dca64fc75b6bff4494f1886f2397f6fd0ad8d1.zip |
test for evolution with g_app_info_get_id() rather than g_app_info_get_name()
Diffstat (limited to 'src')
-rw-r--r-- | src/actions-live.cpp | 12 |
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() |