aboutsummaryrefslogtreecommitdiff
path: root/tests/test-menus.cpp
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-12-08 10:40:44 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-12-08 10:40:44 +0000
commitf54505942ce2dcc73fcbad79d4f5cdce991bf8cb (patch)
tree9aab8e9b612adfff946a93365cd0d2fea9aeb74c /tests/test-menus.cpp
parent4a6ec712275b179decd1844232dce44bc9f9dc19 (diff)
downloadayatana-indicator-datetime-f54505942ce2dcc73fcbad79d4f5cdce991bf8cb.tar.gz
ayatana-indicator-datetime-f54505942ce2dcc73fcbad79d4f5cdce991bf8cb.tar.bz2
ayatana-indicator-datetime-f54505942ce2dcc73fcbad79d4f5cdce991bf8cb.zip
Make the datetime indicator build on non-Ubuntu systems (which mostly lack url-dispatcher and Ubuntu Touch sound schema files.
Diffstat (limited to 'tests/test-menus.cpp')
-rw-r--r--tests/test-menus.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test-menus.cpp b/tests/test-menus.cpp
index 6e88b7b..f0c5653 100644
--- a/tests/test-menus.cpp
+++ b/tests/test-menus.cpp
@@ -97,8 +97,10 @@ protected:
if (profile == Menu::Desktop)
expected_action = "indicator.desktop.open-calendar-app";
+#ifdef HAS_URLDISPATCHER
else if (profile == Menu::Phone)
expected_action = "indicator.phone.open-calendar-app";
+#endif
else
expected_action = nullptr;
@@ -322,6 +324,7 @@ private:
g_clear_object(&submenu);
}
+#ifdef HAS_URLDISPATCHER
void InspectPhoneAppointments(GMenuModel* menu_model, bool can_open_planner)
{
auto submenu = g_menu_model_get_item_link(menu_model, 0, G_MENU_LINK_SUBMENU);
@@ -354,6 +357,7 @@ private:
// cleanup
g_clear_object(&submenu);
}
+#endif
protected:
@@ -371,6 +375,7 @@ protected:
InspectEmptySection(menu_model, Menu::Appointments);
break;
+#ifdef HAS_URLDISPATCHER
case Menu::Phone:
InspectPhoneAppointments(menu_model, can_open_planner);
break;
@@ -378,6 +383,7 @@ protected:
case Menu::PhoneGreeter:
InspectEmptySection(menu_model, Menu::Appointments);
break;
+#endif
default:
g_warn_if_reached();
@@ -449,8 +455,10 @@ protected:
if (profile == Menu::Desktop)
expected_action = "indicator.desktop.open-settings-app";
+#ifdef HAS_URLDISPATCHER
else if (profile == Menu::Phone)
expected_action = "indicator.phone.open-settings-app";
+#endif
// get the Settings section
auto submenu = g_menu_model_get_item_link(menu_model, 0, G_MENU_LINK_SUBMENU);