diff options
-rw-r--r-- | src/exporter.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 3 | ||||
-rw-r--r-- | src/menu.cpp | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/exporter.cpp b/src/exporter.cpp index aa021f3..8103b5b 100644 --- a/src/exporter.cpp +++ b/src/exporter.cpp @@ -85,13 +85,15 @@ Exporter::on_bus_acquired(GDBusConnection* connection, const gchar* /*name*/) { const auto path = std::string(BUS_PATH) + "/" + menu->name(); const auto id = g_dbus_connection_export_menu_model(m_dbus_connection, path.c_str(), menu->menu_model(), &error); +g_message ("path %s id %d", path.c_str(), (int)id); if (id) { m_exported_menu_ids.insert(id); } else { - g_warning("cannot export %s menu: %s", menu->name().c_str(), error->message); + if (error != nullptr) + g_warning("cannot export %s menu: %s", menu->name().c_str(), error->message); g_clear_error(&error); } } diff --git a/src/main.cpp b/src/main.cpp index 50d5241..2c4f160 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -54,7 +54,8 @@ main(int /*argc*/, char** /*argv*/) // create the menus std::vector<std::shared_ptr<Menu>> menus; - menus.push_back(factory.buildMenu(Menu::Desktop)); + for(int i=0, n=Menu::NUM_PROFILES; i<n; i++) + menus.push_back(factory.buildMenu(Menu::Profile(i))); // export them & run until we lose the busname auto loop = g_main_loop_new(nullptr, false); diff --git a/src/menu.cpp b/src/menu.cpp index c81f185..43e07ae 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -395,7 +395,7 @@ class DesktopGreeterMenu: public DesktopBaseMenu { public: DesktopGreeterMenu(std::shared_ptr<State>& state_, std::shared_ptr<Actions>& actions_): - DesktopBaseMenu(DesktopGreeter,"desktop-greeter", state_, actions_) {} + DesktopBaseMenu(DesktopGreeter,"desktop_greeter", state_, actions_) {} }; class PhoneBaseMenu: public MenuImpl @@ -454,7 +454,7 @@ class PhoneGreeterMenu: public PhoneBaseMenu public: PhoneGreeterMenu(std::shared_ptr<State>& state_, std::shared_ptr<Actions>& actions_): - PhoneBaseMenu(PhoneGreeter, "phone-greeter", state_, actions_) {} + PhoneBaseMenu(PhoneGreeter, "phone_greeter", state_, actions_) {} }; /**** |