Merge lp:~3v1n0/unity/remove-bamf-indicators into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 3000
Proposed branch: lp:~3v1n0/unity/remove-bamf-indicators
Merge into: lp:unity
Diff against target: 105 lines (+0/-44)
5 files modified
launcher/ApplicationLauncherIcon.cpp (+0/-11)
tests/mock-application.h (+0/-1)
unity-shared/ApplicationManager.h (+0/-10)
unity-shared/BamfApplicationManager.cpp (+0/-21)
unity-shared/BamfApplicationManager.h (+0/-1)
To merge this branch: bzr merge lp:~3v1n0/unity/remove-bamf-indicators
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+140519@code.launchpad.net

Commit message

ApplicationManager: remove ApplicationMenu support

Since BamfIndicators are deprecated

Description of the change

This is the work needed to merge lp:~3v1n0/bamf/remove-indicators

Bamf Indicators were used to add quicklist to unity, but this is now completely handled by libunity so we can safely delete this.

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/ApplicationLauncherIcon.cpp'
2--- launcher/ApplicationLauncherIcon.cpp 2012-12-05 10:24:53 +0000
3+++ launcher/ApplicationLauncherIcon.cpp 2012-12-18 18:24:21 +0000
4@@ -662,17 +662,6 @@
5
6 void ApplicationLauncherIcon::UpdateMenus()
7 {
8- for (auto& app_menu : app_->GetRemoteMenus())
9- {
10- // we already have this
11- if (_menu_clients.find(app_menu.path) != _menu_clients.end())
12- continue;
13-
14- glib::Object<DbusmenuClient> client(dbusmenu_client_new(app_menu.remote_address.c_str(),
15- app_menu.path.c_str()));
16- _menu_clients[app_menu.path] = client;
17- }
18-
19 // add dynamic quicklist
20 if (_menuclient_dynamic_quicklist && _menuclient_dynamic_quicklist.IsType(DBUSMENU_TYPE_CLIENT))
21 {
22
23=== modified file 'tests/mock-application.h'
24--- tests/mock-application.h 2012-11-28 09:34:44 +0000
25+++ tests/mock-application.h 2012-12-18 18:24:21 +0000
26@@ -71,7 +71,6 @@
27 virtual bool OwnsWindow(Window window_id) const { return false; }
28
29 virtual std::vector<std::string> GetSupportedMimeTypes() const { return {}; }
30- virtual std::vector<unity::ApplicationMenu> GetRemoteMenus() const { return {}; }
31
32 virtual unity::ApplicationWindowPtr GetFocusableWindow() const { return unity::ApplicationWindowPtr(); }
33 virtual void Focus(bool show_on_visible, int monitor) const {}
34
35=== modified file 'unity-shared/ApplicationManager.h'
36--- unity-shared/ApplicationManager.h 2012-11-28 08:47:23 +0000
37+++ unity-shared/ApplicationManager.h 2012-12-18 18:24:21 +0000
38@@ -67,15 +67,6 @@
39 nux::ROProperty<bool> urgent;
40 };
41
42-// Used for dbus menus, and nicer than a std::pair of strings.
43-struct ApplicationMenu
44-{
45- ApplicationMenu(std::string const& path, std::string const& address)
46- : path(path), remote_address(address) {}
47- std::string path;
48- std::string remote_address;
49-};
50-
51
52 class Application
53 {
54@@ -94,7 +85,6 @@
55 virtual bool OwnsWindow(Window window_id) const = 0;
56
57 virtual std::vector<std::string> GetSupportedMimeTypes() const = 0;
58- virtual std::vector<ApplicationMenu> GetRemoteMenus() const = 0;
59
60 virtual ApplicationWindowPtr GetFocusableWindow() const = 0;
61 virtual void Focus(bool show_on_visible, int monitor) const = 0;
62
63=== modified file 'unity-shared/BamfApplicationManager.cpp'
64--- unity-shared/BamfApplicationManager.cpp 2012-11-28 22:00:12 +0000
65+++ unity-shared/BamfApplicationManager.cpp 2012-12-18 18:24:21 +0000
66@@ -398,27 +398,6 @@
67 return result;
68 }
69
70-std::vector<ApplicationMenu> Application::GetRemoteMenus() const
71-{
72- std::vector<ApplicationMenu> result;
73- std::shared_ptr<GList> children(bamf_view_get_children(bamf_view_), g_list_free);
74- for (GList* l = children.get(); l; l = l->next)
75- {
76- if (!BAMF_IS_INDICATOR(l->data))
77- continue;
78-
79- auto indicator = static_cast<BamfIndicator*>(l->data);
80- const gchar* path = bamf_indicator_get_dbus_menu_path(indicator);
81- const gchar* address = bamf_indicator_get_remote_address(indicator);
82-
83- // It is possible for path or address to be null on error condintions, or if
84- // the remote is not ready.
85- if (path && address)
86- result.push_back(ApplicationMenu(path, address));
87- }
88- return result;
89-}
90-
91 ApplicationWindowPtr Application::GetFocusableWindow() const
92 {
93 glib::Object<BamfView> view(bamf_application_get_focusable_child(bamf_app_),
94
95=== modified file 'unity-shared/BamfApplicationManager.h'
96--- unity-shared/BamfApplicationManager.h 2012-11-28 08:47:23 +0000
97+++ unity-shared/BamfApplicationManager.h 2012-12-18 18:24:21 +0000
98@@ -120,7 +120,6 @@
99 virtual bool OwnsWindow(Window window_id) const;
100
101 virtual std::vector<std::string> GetSupportedMimeTypes() const;
102- virtual std::vector<ApplicationMenu> GetRemoteMenus() const;
103
104 virtual ApplicationWindowPtr GetFocusableWindow() const;
105 virtual void Focus(bool show_on_visible, int monitor) const;