diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-01-22 08:08:44 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-01-22 08:08:44 -0600 |
commit | 6e447b7bdb1273048dbaf9ead0eea629e73042e3 (patch) | |
tree | 407b55a7ee16b325552c5d23d14bab0c4178d7b0 | |
parent | bf30d05fa9220b3369734c74197ac149c3290af7 (diff) | |
download | ayatana-indicator-datetime-6e447b7bdb1273048dbaf9ead0eea629e73042e3.tar.gz ayatana-indicator-datetime-6e447b7bdb1273048dbaf9ead0eea629e73042e3.tar.bz2 ayatana-indicator-datetime-6e447b7bdb1273048dbaf9ead0eea629e73042e3.zip |
plug in the greeter menus
-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_) {} }; /**** |