diff options
| -rw-r--r-- | launcher/ApplicationLauncherIcon.cpp | 11 | ||||
| -rw-r--r-- | tests/mock-application.h | 1 | ||||
| -rw-r--r-- | unity-shared/ApplicationManager.h | 10 | ||||
| -rw-r--r-- | unity-shared/BamfApplicationManager.cpp | 21 | ||||
| -rw-r--r-- | unity-shared/BamfApplicationManager.h | 1 |
5 files changed, 0 insertions, 44 deletions
diff --git a/launcher/ApplicationLauncherIcon.cpp b/launcher/ApplicationLauncherIcon.cpp index cbae24243..9f4d8185e 100644 --- a/launcher/ApplicationLauncherIcon.cpp +++ b/launcher/ApplicationLauncherIcon.cpp @@ -662,17 +662,6 @@ void ApplicationLauncherIcon::UpdateBackgroundColor() void ApplicationLauncherIcon::UpdateMenus() { - for (auto& app_menu : app_->GetRemoteMenus()) - { - // we already have this - if (_menu_clients.find(app_menu.path) != _menu_clients.end()) - continue; - - glib::Object<DbusmenuClient> client(dbusmenu_client_new(app_menu.remote_address.c_str(), - app_menu.path.c_str())); - _menu_clients[app_menu.path] = client; - } - // add dynamic quicklist if (_menuclient_dynamic_quicklist && _menuclient_dynamic_quicklist.IsType(DBUSMENU_TYPE_CLIENT)) { diff --git a/tests/mock-application.h b/tests/mock-application.h index 728942cd8..59b2dad7c 100644 --- a/tests/mock-application.h +++ b/tests/mock-application.h @@ -71,7 +71,6 @@ public: virtual bool OwnsWindow(Window window_id) const { return false; } virtual std::vector<std::string> GetSupportedMimeTypes() const { return {}; } - virtual std::vector<unity::ApplicationMenu> GetRemoteMenus() const { return {}; } virtual unity::ApplicationWindowPtr GetFocusableWindow() const { return unity::ApplicationWindowPtr(); } virtual void Focus(bool show_on_visible, int monitor) const {} diff --git a/unity-shared/ApplicationManager.h b/unity-shared/ApplicationManager.h index 7ff8b0ba1..cf74e0c0a 100644 --- a/unity-shared/ApplicationManager.h +++ b/unity-shared/ApplicationManager.h @@ -67,15 +67,6 @@ public: nux::ROProperty<bool> urgent; }; -// Used for dbus menus, and nicer than a std::pair of strings. -struct ApplicationMenu -{ - ApplicationMenu(std::string const& path, std::string const& address) - : path(path), remote_address(address) {} - std::string path; - std::string remote_address; -}; - class Application { @@ -94,7 +85,6 @@ public: virtual bool OwnsWindow(Window window_id) const = 0; virtual std::vector<std::string> GetSupportedMimeTypes() const = 0; - virtual std::vector<ApplicationMenu> GetRemoteMenus() const = 0; virtual ApplicationWindowPtr GetFocusableWindow() const = 0; virtual void Focus(bool show_on_visible, int monitor) const = 0; diff --git a/unity-shared/BamfApplicationManager.cpp b/unity-shared/BamfApplicationManager.cpp index 5fcccd8da..1b52b92ff 100644 --- a/unity-shared/BamfApplicationManager.cpp +++ b/unity-shared/BamfApplicationManager.cpp @@ -398,27 +398,6 @@ std::vector<std::string> Application::GetSupportedMimeTypes() const return result; } -std::vector<ApplicationMenu> Application::GetRemoteMenus() const -{ - std::vector<ApplicationMenu> result; - std::shared_ptr<GList> children(bamf_view_get_children(bamf_view_), g_list_free); - for (GList* l = children.get(); l; l = l->next) - { - if (!BAMF_IS_INDICATOR(l->data)) - continue; - - auto indicator = static_cast<BamfIndicator*>(l->data); - const gchar* path = bamf_indicator_get_dbus_menu_path(indicator); - const gchar* address = bamf_indicator_get_remote_address(indicator); - - // It is possible for path or address to be null on error condintions, or if - // the remote is not ready. - if (path && address) - result.push_back(ApplicationMenu(path, address)); - } - return result; -} - ApplicationWindowPtr Application::GetFocusableWindow() const { glib::Object<BamfView> view(bamf_application_get_focusable_child(bamf_app_), diff --git a/unity-shared/BamfApplicationManager.h b/unity-shared/BamfApplicationManager.h index 9823c8e2e..3e0fe1090 100644 --- a/unity-shared/BamfApplicationManager.h +++ b/unity-shared/BamfApplicationManager.h @@ -120,7 +120,6 @@ public: virtual bool OwnsWindow(Window window_id) const; virtual std::vector<std::string> GetSupportedMimeTypes() const; - virtual std::vector<ApplicationMenu> GetRemoteMenus() const; virtual ApplicationWindowPtr GetFocusableWindow() const; virtual void Focus(bool show_on_visible, int monitor) const; |
