aboutsummaryrefslogtreecommitdiff
path: root/src/actions-live.cpp
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-03-26 19:55:23 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-03-26 19:55:23 +0000
commitb39526c27c44302c34fce26163919a0c4c7aecd3 (patch)
treebe0d3759a081f90b73aa90e0cf1b5a2a6a9783f3 /src/actions-live.cpp
parent8dbc66cab4eadfdde3809340d03c4cc10b2032eb (diff)
downloadayatana-indicator-datetime-b39526c27c44302c34fce26163919a0c4c7aecd3.tar.gz
ayatana-indicator-datetime-b39526c27c44302c34fce26163919a0c4c7aecd3.tar.bz2
ayatana-indicator-datetime-b39526c27c44302c34fce26163919a0c4c7aecd3.zip
URL dispatcher support: Build phone code, even if URL dispatcher is unavailable.
Diffstat (limited to 'src/actions-live.cpp')
-rw-r--r--src/actions-live.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/actions-live.cpp b/src/actions-live.cpp
index 994fc3c..9225d30 100644
--- a/src/actions-live.cpp
+++ b/src/actions-live.cpp
@@ -135,10 +135,13 @@ void LiveActions::desktop_open_calendar_app(const DateTime& dt)
****
***/
-#ifdef HAS_URLDISPATCHER
void LiveActions::phone_open_alarm_app()
{
+#ifdef HAS_URLDISPATCHER
dispatch_url("appid://com.ubuntu.clock/clock/current-user-version");
+#else
+ // FIXME: Deal with this, if we build without liburl-dispatcher...
+#endif
}
void LiveActions::phone_open_appointment(const Appointment& appt)
@@ -146,7 +149,11 @@ void LiveActions::phone_open_appointment(const Appointment& appt)
if (!appt.activation_url.empty())
{
+#ifdef HAS_URLDISPATCHER
dispatch_url(appt.activation_url);
+#else
+ // FIXME: Deal with this, if we build without liburl-dispatcher...
+#endif
}
else switch (appt.type)
{
@@ -161,15 +168,22 @@ void LiveActions::phone_open_appointment(const Appointment& appt)
void LiveActions::phone_open_calendar_app(const DateTime&)
{
+#ifdef HAS_URLDISPATCHER
// does calendar app have a mechanism for specifying dates?
dispatch_url("appid://com.ubuntu.calendar/calendar/current-user-version");
+#else
+ // FIXME: Deal with this, if we build without liburl-dispatcher...
+#endif
}
void LiveActions::phone_open_settings_app()
{
+#ifdef HAS_URLDISPATCHER
dispatch_url("settings:///system/time-date");
-}
+#else
+ // FIXME: Deal with this, if we build without liburl-dispatcher...
#endif
+}
/***
****