Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 1197 | ||||
Proposed branch: | lp:~ricotz/plank/dbus | ||||
Merge into: | lp:plank | ||||
Diff against target: |
906 lines (+747/-4) 12 files modified
.bzrignore (+4/-0) Makefile.am (+1/-0) configure.ac (+1/-0) docs/Makefile.am (+3/-0) examples/Makefile.am (+48/-0) examples/RemoteClient.vala (+65/-0) lib/DBus/Client.vala (+307/-0) lib/DBus/Interfaces.vala (+73/-0) lib/DBusManager.vala (+220/-0) lib/DockController.vala (+10/-4) lib/Makefile.am (+3/-0) lib/libplank.symbols (+12/-0) |
||||
To merge this branch: | bzr merge lp:~ricotz/plank/dbus | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Docky Core | Pending | ||
Review via email: mp+249177@code.launchpad.net |
Commit message
Description of the change
Provide Client class which discovers and connect to a running dock which provides certain inferfaces to control and manipulate it.
Provide a simple example using the Client class.
- 1182. By Rico Tzschichholz
-
items: Add boolean return-value to public DockContainer/
-Provider methods This will indicate the success or failure of the corresponding operation.
- 1183. By Rico Tzschichholz
-
items: Avoid removal-delay when unpinning an application
Remove an AppDockItem if it doesn't represent a running application and
doesn't have visible remote-info coming via LauncherEntry. - 1184. By Rico Tzschichholz
-
po: Update translations
- 1185. By Rico Tzschichholz
-
items: It is an ApplicationDock
Item, no need to use "as" - 1186. By Rico Tzschichholz
-
renderer: Draw final internal dock-buffer on window-context at (0,0)
- 1187. By Rico Tzschichholz
-
build: Make "distcheck" work independent from originally passed confflags
- 1188. By Rico Tzschichholz
-
dockwindow: Drop hack for menu-position with gtk+ 3.15+
Reverts r1158
- 1189. By Rico Tzschichholz
-
hidemanager: Add window-dodge hide-mode
- 1190. By Rico Tzschichholz
-
po: Update translations
- 1191. By Rico Tzschichholz
-
item: Rename protected arraylist-fields *_items to *_elements
- 1192. By Rico Tzschichholz
-
dockcontainer: Rename property Elements to VisibleElements
- 1193. By Rico Tzschichholz
-
controller: Rename property Items to VisibleItems
- 1194. By Rico Tzschichholz
-
controller: Add Items property
Which actually returns a list of all items regardless their visibility.
- 1195. By Rico Tzschichholz
-
controller: Call update_items while replacing default_provider
- 1196. By Rico Tzschichholz
-
Update symbols
- 1197. By Rico Tzschichholz
-
Add DBusManager to provide some useful remotely accessible actions
Provide "net.launchpad.
plank.Items" interface with "Add", "Remove",
"GetCount", "GetPersistentApplications" and "GetTransientAp plications"
methods.
Preview Diff
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2014-06-02 14:18:48 +0000 | |||
3 | +++ .bzrignore 2015-03-16 17:58:40 +0000 | |||
4 | @@ -33,6 +33,9 @@ | |||
5 | 33 | docs/c-doc | 33 | docs/c-doc |
6 | 34 | docs/vala-doc | 34 | docs/vala-doc |
7 | 35 | docs/web-doc | 35 | docs/web-doc |
8 | 36 | examples/remote-client | ||
9 | 37 | examples/*.c | ||
10 | 38 | examples/*.stamp | ||
11 | 36 | lib/abi* | 39 | lib/abi* |
12 | 37 | lib/*-abi | 40 | lib/*-abi |
13 | 38 | lib/*.c | 41 | lib/*.c |
14 | @@ -41,6 +44,7 @@ | |||
15 | 41 | lib/*.vapi | 44 | lib/*.vapi |
16 | 42 | lib/*.pc | 45 | lib/*.pc |
17 | 43 | lib/*.stamp | 46 | lib/*.stamp |
18 | 47 | lib/DBus/*.c | ||
19 | 44 | lib/Drawing/*.c | 48 | lib/Drawing/*.c |
20 | 45 | lib/Factories/*.c | 49 | lib/Factories/*.c |
21 | 46 | lib/Services/*.c | 50 | lib/Services/*.c |
22 | 47 | 51 | ||
23 | === modified file 'Makefile.am' | |||
24 | --- Makefile.am 2015-03-11 16:25:25 +0000 | |||
25 | +++ Makefile.am 2015-03-16 17:58:40 +0000 | |||
26 | @@ -9,6 +9,7 @@ | |||
27 | 9 | vapi \ | 9 | vapi \ |
28 | 10 | src \ | 10 | src \ |
29 | 11 | tests \ | 11 | tests \ |
30 | 12 | examples \ | ||
31 | 12 | $(NULL) | 13 | $(NULL) |
32 | 13 | 14 | ||
33 | 14 | if HAVE_VALADOC | 15 | if HAVE_VALADOC |
34 | 15 | 16 | ||
35 | === modified file 'configure.ac' | |||
36 | --- configure.ac 2015-01-25 19:35:00 +0000 | |||
37 | +++ configure.ac 2015-03-16 17:58:40 +0000 | |||
38 | @@ -356,6 +356,7 @@ | |||
39 | 356 | docs/Makefile | 356 | docs/Makefile |
40 | 357 | po/Makefile.in | 357 | po/Makefile.in |
41 | 358 | tests/Makefile | 358 | tests/Makefile |
42 | 359 | examples/Makefile | ||
43 | 359 | vapi/Makefile | 360 | vapi/Makefile |
44 | 360 | ]) | 361 | ]) |
45 | 361 | 362 | ||
46 | 362 | 363 | ||
47 | === modified file 'docs/Makefile.am' | |||
48 | --- docs/Makefile.am 2015-03-11 16:25:25 +0000 | |||
49 | +++ docs/Makefile.am 2015-03-16 17:58:40 +0000 | |||
50 | @@ -17,6 +17,7 @@ | |||
51 | 17 | $(NULL) | 17 | $(NULL) |
52 | 18 | 18 | ||
53 | 19 | plank_doc_files = \ | 19 | plank_doc_files = \ |
54 | 20 | $(top_srcdir)/lib/DBusManager.vala \ | ||
55 | 20 | $(top_srcdir)/lib/DockController.vala \ | 21 | $(top_srcdir)/lib/DockController.vala \ |
56 | 21 | $(top_srcdir)/lib/DockPreferences.vala \ | 22 | $(top_srcdir)/lib/DockPreferences.vala \ |
57 | 22 | $(top_srcdir)/lib/DockRenderer.vala \ | 23 | $(top_srcdir)/lib/DockRenderer.vala \ |
58 | @@ -24,6 +25,8 @@ | |||
59 | 24 | $(top_srcdir)/lib/HideManager.vala \ | 25 | $(top_srcdir)/lib/HideManager.vala \ |
60 | 25 | $(top_srcdir)/lib/PositionManager.vala \ | 26 | $(top_srcdir)/lib/PositionManager.vala \ |
61 | 26 | $(top_builddir)/lib/Version.vala \ | 27 | $(top_builddir)/lib/Version.vala \ |
62 | 28 | $(top_srcdir)/lib/DBus/Client.vala \ | ||
63 | 29 | $(top_srcdir)/lib/DBus/Interfaces.vala \ | ||
64 | 27 | $(top_srcdir)/lib/Drawing/AnimatedRenderer.vala \ | 30 | $(top_srcdir)/lib/Drawing/AnimatedRenderer.vala \ |
65 | 28 | $(top_srcdir)/lib/Drawing/Color.vala \ | 31 | $(top_srcdir)/lib/Drawing/Color.vala \ |
66 | 29 | $(top_srcdir)/lib/Drawing/DrawingService.vala \ | 32 | $(top_srcdir)/lib/Drawing/DrawingService.vala \ |
67 | 30 | 33 | ||
68 | === added directory 'examples' | |||
69 | === added file 'examples/Makefile.am' | |||
70 | --- examples/Makefile.am 1970-01-01 00:00:00 +0000 | |||
71 | +++ examples/Makefile.am 2015-03-16 17:58:40 +0000 | |||
72 | @@ -0,0 +1,48 @@ | |||
73 | 1 | include $(top_srcdir)/Makefile.common | ||
74 | 2 | |||
75 | 3 | remote_client_VALAFLAGS = \ | ||
76 | 4 | $(PLANK_CORE_VALAFLAGS) \ | ||
77 | 5 | $(top_builddir)/lib/plank.vapi \ | ||
78 | 6 | --vapidir $(top_srcdir)/vapi \ | ||
79 | 7 | -C \ | ||
80 | 8 | $(NULL) | ||
81 | 9 | |||
82 | 10 | BUILT_SOURCES = remote_client_vala.stamp | ||
83 | 11 | |||
84 | 12 | noinst_PROGRAMS = remote-client | ||
85 | 13 | |||
86 | 14 | remote_client_CFLAGS = \ | ||
87 | 15 | $(PLANK_CORE_CFLAGS) \ | ||
88 | 16 | -include config.h \ | ||
89 | 17 | -w \ | ||
90 | 18 | -I$(top_builddir)/lib \ | ||
91 | 19 | $(NULL) | ||
92 | 20 | |||
93 | 21 | remote_client_LDADD = \ | ||
94 | 22 | $(PLANK_CORE_LIBS) \ | ||
95 | 23 | $(top_builddir)/lib/libplank.la \ | ||
96 | 24 | $(NULL) | ||
97 | 25 | |||
98 | 26 | remote_client_VALASOURCES = \ | ||
99 | 27 | RemoteClient.vala \ | ||
100 | 28 | $(NULL) | ||
101 | 29 | |||
102 | 30 | nodist_remote_client_SOURCES = \ | ||
103 | 31 | remote_client_vala.stamp \ | ||
104 | 32 | $(remote_client_VALASOURCES:.vala=.c) \ | ||
105 | 33 | $(NULL) | ||
106 | 34 | |||
107 | 35 | remote_client_vala.stamp: $(remote_client_VALASOURCES) $(top_builddir)/lib/plank.vapi Makefile | ||
108 | 36 | $(AM_V_VALA)$(VALAC) \ | ||
109 | 37 | $(remote_client_VALAFLAGS) \ | ||
110 | 38 | $(filter %.vala %.c,$^) | ||
111 | 39 | $(AM_V_at)touch $@ | ||
112 | 40 | |||
113 | 41 | CLEANFILES = \ | ||
114 | 42 | $(nodist_remote_client_SOURCES) \ | ||
115 | 43 | $(NULL) | ||
116 | 44 | |||
117 | 45 | EXTRA_DIST = \ | ||
118 | 46 | $(remote_client_VALASOURCES) \ | ||
119 | 47 | $(NULL) | ||
120 | 48 | |||
121 | 0 | 49 | ||
122 | === added file 'examples/RemoteClient.vala' | |||
123 | --- examples/RemoteClient.vala 1970-01-01 00:00:00 +0000 | |||
124 | +++ examples/RemoteClient.vala 2015-03-16 17:58:40 +0000 | |||
125 | @@ -0,0 +1,65 @@ | |||
126 | 1 | // | ||
127 | 2 | // Copyright (C) 2015 Rico Tzschichholz | ||
128 | 3 | // | ||
129 | 4 | // This program is free software: you can redistribute it and/or modify | ||
130 | 5 | // it under the terms of the GNU General Public License as published by | ||
131 | 6 | // the Free Software Foundation, either version 3 of the License, or | ||
132 | 7 | // (at your option) any later version. | ||
133 | 8 | // | ||
134 | 9 | // This program is distributed in the hope that it will be useful, | ||
135 | 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
136 | 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
137 | 12 | // GNU General Public License for more details. | ||
138 | 13 | // | ||
139 | 14 | // You should have received a copy of the GNU General Public License | ||
140 | 15 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
141 | 16 | // | ||
142 | 17 | |||
143 | 18 | using Plank.DBus; | ||
144 | 19 | using Plank.Services; | ||
145 | 20 | |||
146 | 21 | namespace Plank.Examples | ||
147 | 22 | { | ||
148 | 23 | public class RemoteClient : GLib.Application | ||
149 | 24 | { | ||
150 | 25 | construct | ||
151 | 26 | { | ||
152 | 27 | application_id = "net.launchpad.plank.remote-client"; | ||
153 | 28 | flags = ApplicationFlags.FLAGS_NONE; | ||
154 | 29 | |||
155 | 30 | Logger.initialize ("remote-client"); | ||
156 | 31 | Logger.DisplayLevel = LogLevel.DEBUG; | ||
157 | 32 | } | ||
158 | 33 | |||
159 | 34 | public override void activate () | ||
160 | 35 | { | ||
161 | 36 | hold (); | ||
162 | 37 | |||
163 | 38 | var client = Client.get_instance (); | ||
164 | 39 | client.proxy_changed.connect (handle_proxy_changed); | ||
165 | 40 | } | ||
166 | 41 | |||
167 | 42 | void handle_proxy_changed (Client client) | ||
168 | 43 | { | ||
169 | 44 | if (!client.is_connected) | ||
170 | 45 | return; | ||
171 | 46 | |||
172 | 47 | print ("List all persistent applications:\n"); | ||
173 | 48 | foreach (unowned string s in client.get_persistent_applications ()) | ||
174 | 49 | print (" + %s\n", s); | ||
175 | 50 | |||
176 | 51 | print ("List all transient applications:\n"); | ||
177 | 52 | foreach (unowned string s in client.get_transient_applications ()) | ||
178 | 53 | print (" + %s\n", s); | ||
179 | 54 | |||
180 | 55 | print ("\n"); | ||
181 | 56 | } | ||
182 | 57 | |||
183 | 58 | public static int main (string[] args) | ||
184 | 59 | { | ||
185 | 60 | var application = new RemoteClient (); | ||
186 | 61 | return application.run (args); | ||
187 | 62 | } | ||
188 | 63 | |||
189 | 64 | } | ||
190 | 65 | } | ||
191 | 0 | 66 | ||
192 | === added directory 'lib/DBus' | |||
193 | === added file 'lib/DBus/Client.vala' | |||
194 | --- lib/DBus/Client.vala 1970-01-01 00:00:00 +0000 | |||
195 | +++ lib/DBus/Client.vala 2015-03-16 17:58:40 +0000 | |||
196 | @@ -0,0 +1,307 @@ | |||
197 | 1 | // | ||
198 | 2 | // Copyright (C) 2015 Rico Tzschichholz | ||
199 | 3 | // | ||
200 | 4 | // This program is free software: you can redistribute it and/or modify | ||
201 | 5 | // it under the terms of the GNU General Public License as published by | ||
202 | 6 | // the Free Software Foundation, either version 3 of the License, or | ||
203 | 7 | // (at your option) any later version. | ||
204 | 8 | // | ||
205 | 9 | // This program is distributed in the hope that it will be useful, | ||
206 | 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
207 | 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
208 | 12 | // GNU General Public License for more details. | ||
209 | 13 | // | ||
210 | 14 | // You should have received a copy of the GNU General Public License | ||
211 | 15 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
212 | 16 | // | ||
213 | 17 | |||
214 | 18 | namespace Plank.DBus | ||
215 | 19 | { | ||
216 | 20 | /** | ||
217 | 21 | * Connects to a running instance of plank via DBus and | ||
218 | 22 | * provides remote interface to a currently runnning dock. | ||
219 | 23 | */ | ||
220 | 24 | public class Client : GLib.Object | ||
221 | 25 | { | ||
222 | 26 | static Client? instance; | ||
223 | 27 | |||
224 | 28 | /** | ||
225 | 29 | * Get the singleton instance of {@link Plank.DBus.Client} | ||
226 | 30 | */ | ||
227 | 31 | public static unowned Client get_instance () | ||
228 | 32 | { | ||
229 | 33 | if (instance == null) | ||
230 | 34 | instance = new Client (); | ||
231 | 35 | |||
232 | 36 | return instance; | ||
233 | 37 | } | ||
234 | 38 | |||
235 | 39 | /** | ||
236 | 40 | * If the proxy interfaces for the dock are ready to be used | ||
237 | 41 | * or were changed on runtime this signal will be emitted. | ||
238 | 42 | */ | ||
239 | 43 | public signal void proxy_changed (); | ||
240 | 44 | |||
241 | 45 | /** | ||
242 | 46 | * Whether the client is in an operatable state and connected to | ||
243 | 47 | * a running dock | ||
244 | 48 | */ | ||
245 | 49 | public bool is_connected { | ||
246 | 50 | get { | ||
247 | 51 | return (items_proxy != null); | ||
248 | 52 | } | ||
249 | 53 | } | ||
250 | 54 | |||
251 | 55 | DBusConnection? connection = null; | ||
252 | 56 | string? client_object_path; | ||
253 | 57 | |||
254 | 58 | string? dock_bus_owner; | ||
255 | 59 | string? dock_bus_name; | ||
256 | 60 | string? dock_object_path; | ||
257 | 61 | |||
258 | 62 | uint dbus_dock_ping_id = 0; | ||
259 | 63 | uint dbus_name_owner_changed_signal_id = 0; | ||
260 | 64 | |||
261 | 65 | ItemsIface? items_proxy = null; | ||
262 | 66 | int items_count = int.MIN; | ||
263 | 67 | string[]? persistent_apps_list = null; | ||
264 | 68 | string[]? transient_apps_list = null; | ||
265 | 69 | |||
266 | 70 | Client () | ||
267 | 71 | { | ||
268 | 72 | Object (); | ||
269 | 73 | } | ||
270 | 74 | |||
271 | 75 | construct | ||
272 | 76 | { | ||
273 | 77 | unowned Application? application = GLib.Application.get_default (); | ||
274 | 78 | unowned string? object_path = null; | ||
275 | 79 | |||
276 | 80 | if (application != null) { | ||
277 | 81 | connection = application.get_dbus_connection (); | ||
278 | 82 | object_path = application.get_dbus_object_path (); | ||
279 | 83 | } | ||
280 | 84 | |||
281 | 85 | if (connection == null || object_path == null) { | ||
282 | 86 | critical ("Initializing client failed"); | ||
283 | 87 | return; | ||
284 | 88 | } | ||
285 | 89 | |||
286 | 90 | try { | ||
287 | 91 | // Listen for "Ping" signals coming from docks | ||
288 | 92 | dbus_dock_ping_id = connection.signal_subscribe (null, Plank.DBus.DOCK_INTERFACE_NAME, | ||
289 | 93 | Plank.DBus.PING_NAME, null, null, DBusSignalFlags.NONE, handle_dock_ping); | ||
290 | 94 | } catch (IOError e) { | ||
291 | 95 | warning ("Could not subscribe for dock signal (%s)", e.message); | ||
292 | 96 | } | ||
293 | 97 | |||
294 | 98 | dbus_name_owner_changed_signal_id = connection.signal_subscribe ("org.freedesktop.DBus", "org.freedesktop.DBus", | ||
295 | 99 | "NameOwnerChanged", "/org/freedesktop/DBus", null, DBusSignalFlags.NONE, handle_name_owner_changed); | ||
296 | 100 | |||
297 | 101 | client_object_path = object_path; | ||
298 | 102 | |||
299 | 103 | try { | ||
300 | 104 | // Broadcast to inform running docks | ||
301 | 105 | connection.emit_signal (null, client_object_path, Plank.DBus.CLIENT_INTERFACE_NAME, Plank.DBus.PING_NAME, null); | ||
302 | 106 | } catch (Error e) { | ||
303 | 107 | warning ("Could not ping running docks (%s)", e.message); | ||
304 | 108 | } | ||
305 | 109 | } | ||
306 | 110 | |||
307 | 111 | ~Client () | ||
308 | 112 | { | ||
309 | 113 | if (connection != null) { | ||
310 | 114 | if (dbus_dock_ping_id > 0) | ||
311 | 115 | connection.signal_unsubscribe (dbus_dock_ping_id); | ||
312 | 116 | if (dbus_name_owner_changed_signal_id > 0) | ||
313 | 117 | connection.signal_unsubscribe (dbus_name_owner_changed_signal_id); | ||
314 | 118 | } | ||
315 | 119 | } | ||
316 | 120 | |||
317 | 121 | void handle_dock_ping (DBusConnection connection, string sender_name, string object_path, | ||
318 | 122 | string interface_name, string signal_name, Variant parameters) | ||
319 | 123 | { | ||
320 | 124 | if (dock_bus_name == null && dock_bus_name != sender_name) | ||
321 | 125 | connect_proxies (connection, sender_name, object_path); | ||
322 | 126 | } | ||
323 | 127 | |||
324 | 128 | void handle_name_owner_changed (DBusConnection connection, string sender_name, string object_path, | ||
325 | 129 | string interface_name, string signal_name, Variant parameters) | ||
326 | 130 | { | ||
327 | 131 | string name, before, after; | ||
328 | 132 | parameters.get ("(sss)", out name, out before, out after); | ||
329 | 133 | |||
330 | 134 | if (dock_bus_owner != null && dock_bus_owner == after) | ||
331 | 135 | return; | ||
332 | 136 | |||
333 | 137 | if (name != null && name != "" && name != dock_bus_name) | ||
334 | 138 | return; | ||
335 | 139 | |||
336 | 140 | if (after == null || after == "") { | ||
337 | 141 | disconnect_proxies (); | ||
338 | 142 | return; | ||
339 | 143 | } | ||
340 | 144 | |||
341 | 145 | connect_proxies (connection, name, object_path); | ||
342 | 146 | } | ||
343 | 147 | |||
344 | 148 | void connect_proxies (DBusConnection connection, string sender_name, string object_path) | ||
345 | 149 | { | ||
346 | 150 | debug ("Connecting and create proxies for '%s' (%s)", sender_name, object_path); | ||
347 | 151 | |||
348 | 152 | try { | ||
349 | 153 | items_proxy = connection.get_proxy_sync<Plank.DBus.ItemsIface> (sender_name, object_path, DBusProxyFlags.NONE); | ||
350 | 154 | items_proxy.changed.connect (invalidate_items_cache); | ||
351 | 155 | dock_bus_owner = ((DBusProxy) items_proxy).get_name_owner (); | ||
352 | 156 | dock_bus_name = sender_name; | ||
353 | 157 | dock_object_path = object_path; | ||
354 | 158 | } catch (Error e) { | ||
355 | 159 | dock_bus_owner = null; | ||
356 | 160 | dock_bus_name = null; | ||
357 | 161 | dock_object_path = null; | ||
358 | 162 | |||
359 | 163 | items_proxy = null; | ||
360 | 164 | critical ("Failed to create items proxy for '%s' (%s)", sender_name, object_path); | ||
361 | 165 | } | ||
362 | 166 | |||
363 | 167 | proxy_changed (); | ||
364 | 168 | } | ||
365 | 169 | |||
366 | 170 | void disconnect_proxies () | ||
367 | 171 | { | ||
368 | 172 | debug ("Disconnecting from '%s' (%s)", dock_bus_name, dock_object_path); | ||
369 | 173 | |||
370 | 174 | dock_bus_owner = null; | ||
371 | 175 | dock_bus_name = null; | ||
372 | 176 | dock_object_path = null; | ||
373 | 177 | |||
374 | 178 | items_proxy.changed.disconnect (invalidate_items_cache); | ||
375 | 179 | items_proxy = null; | ||
376 | 180 | } | ||
377 | 181 | |||
378 | 182 | |||
379 | 183 | void invalidate_items_cache () | ||
380 | 184 | { | ||
381 | 185 | items_count = int.MIN; | ||
382 | 186 | persistent_apps_list = null; | ||
383 | 187 | transient_apps_list = null; | ||
384 | 188 | } | ||
385 | 189 | |||
386 | 190 | /** | ||
387 | 191 | * Add a new item for the given uri to the dock | ||
388 | 192 | * | ||
389 | 193 | * @param uri an URI | ||
390 | 194 | * @return whether it was successfully added | ||
391 | 195 | */ | ||
392 | 196 | public bool add_item (string uri) | ||
393 | 197 | { | ||
394 | 198 | if (items_proxy == null) { | ||
395 | 199 | warning ("No proxy connected"); | ||
396 | 200 | return false; | ||
397 | 201 | } | ||
398 | 202 | |||
399 | 203 | try { | ||
400 | 204 | return items_proxy.add (uri); | ||
401 | 205 | } catch (IOError e) { | ||
402 | 206 | warning (e.message); | ||
403 | 207 | return false; | ||
404 | 208 | } | ||
405 | 209 | } | ||
406 | 210 | |||
407 | 211 | /** | ||
408 | 212 | * Remove an existing item for the given uri from the dock | ||
409 | 213 | * | ||
410 | 214 | * @param uri an URI | ||
411 | 215 | * @return whether it was successfully removed | ||
412 | 216 | */ | ||
413 | 217 | public bool remove_item (string uri) | ||
414 | 218 | { | ||
415 | 219 | if (items_proxy == null) { | ||
416 | 220 | warning ("No proxy connected"); | ||
417 | 221 | return false; | ||
418 | 222 | } | ||
419 | 223 | |||
420 | 224 | try { | ||
421 | 225 | return items_proxy.remove (uri); | ||
422 | 226 | } catch (IOError e) { | ||
423 | 227 | warning (e.message); | ||
424 | 228 | return false; | ||
425 | 229 | } | ||
426 | 230 | } | ||
427 | 231 | |||
428 | 232 | /** | ||
429 | 233 | * Returns the number of currently visible items on the dock | ||
430 | 234 | * | ||
431 | 235 | * @return the item-count | ||
432 | 236 | */ | ||
433 | 237 | public int get_items_count () | ||
434 | 238 | { | ||
435 | 239 | if (items_proxy == null) { | ||
436 | 240 | warning ("No proxy connected"); | ||
437 | 241 | return -1; | ||
438 | 242 | } | ||
439 | 243 | |||
440 | 244 | try { | ||
441 | 245 | if (items_count == int.MIN) | ||
442 | 246 | items_count = items_proxy.get_count (); | ||
443 | 247 | } catch (IOError e) { | ||
444 | 248 | warning (e.message); | ||
445 | 249 | return -1; | ||
446 | 250 | } | ||
447 | 251 | |||
448 | 252 | return items_count; | ||
449 | 253 | } | ||
450 | 254 | |||
451 | 255 | /** | ||
452 | 256 | * Returns an array of uris of the persistent applications on the dock | ||
453 | 257 | * | ||
454 | 258 | * @return the array of uris | ||
455 | 259 | */ | ||
456 | 260 | public unowned string[]? get_persistent_applications () | ||
457 | 261 | { | ||
458 | 262 | if (items_proxy == null) { | ||
459 | 263 | warning ("No proxy connected"); | ||
460 | 264 | return null; | ||
461 | 265 | } | ||
462 | 266 | |||
463 | 267 | if (persistent_apps_list != null) | ||
464 | 268 | return persistent_apps_list; | ||
465 | 269 | |||
466 | 270 | try { | ||
467 | 271 | if (persistent_apps_list == null) | ||
468 | 272 | persistent_apps_list = items_proxy.get_persistent_applications (); | ||
469 | 273 | return persistent_apps_list; | ||
470 | 274 | } catch (IOError e) { | ||
471 | 275 | warning (e.message); | ||
472 | 276 | } | ||
473 | 277 | |||
474 | 278 | return null; | ||
475 | 279 | } | ||
476 | 280 | |||
477 | 281 | /** | ||
478 | 282 | * Returns an array of uris of the transient applications on the dock | ||
479 | 283 | * | ||
480 | 284 | * @return the array of uris | ||
481 | 285 | */ | ||
482 | 286 | public unowned string[]? get_transient_applications () | ||
483 | 287 | { | ||
484 | 288 | if (items_proxy == null) { | ||
485 | 289 | warning ("No proxy connected"); | ||
486 | 290 | return null; | ||
487 | 291 | } | ||
488 | 292 | |||
489 | 293 | if (transient_apps_list != null) | ||
490 | 294 | return transient_apps_list; | ||
491 | 295 | |||
492 | 296 | try { | ||
493 | 297 | if (transient_apps_list == null) | ||
494 | 298 | transient_apps_list = items_proxy.get_transient_applications (); | ||
495 | 299 | return transient_apps_list; | ||
496 | 300 | } catch (IOError e) { | ||
497 | 301 | warning (e.message); | ||
498 | 302 | } | ||
499 | 303 | |||
500 | 304 | return null; | ||
501 | 305 | } | ||
502 | 306 | } | ||
503 | 307 | } | ||
504 | 0 | 308 | ||
505 | === added file 'lib/DBus/Interfaces.vala' | |||
506 | --- lib/DBus/Interfaces.vala 1970-01-01 00:00:00 +0000 | |||
507 | +++ lib/DBus/Interfaces.vala 2015-03-16 17:58:40 +0000 | |||
508 | @@ -0,0 +1,73 @@ | |||
509 | 1 | // | ||
510 | 2 | // Copyright (C) 2015 Rico Tzschichholz | ||
511 | 3 | // | ||
512 | 4 | // This program is free software: you can redistribute it and/or modify | ||
513 | 5 | // it under the terms of the GNU General Public License as published by | ||
514 | 6 | // the Free Software Foundation, either version 3 of the License, or | ||
515 | 7 | // (at your option) any later version. | ||
516 | 8 | // | ||
517 | 9 | // This program is distributed in the hope that it will be useful, | ||
518 | 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
519 | 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
520 | 12 | // GNU General Public License for more details. | ||
521 | 13 | // | ||
522 | 14 | // You should have received a copy of the GNU General Public License | ||
523 | 15 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
524 | 16 | // | ||
525 | 17 | |||
526 | 18 | namespace Plank.DBus | ||
527 | 19 | { | ||
528 | 20 | const string PING_NAME = "Ping"; | ||
529 | 21 | |||
530 | 22 | const string DOCK_INTERFACE_NAME = "net.launchpad.plank"; | ||
531 | 23 | const string CLIENT_INTERFACE_NAME = "net.launchpad.plank.Client"; | ||
532 | 24 | |||
533 | 25 | /** | ||
534 | 26 | * Provide an interface to manage items of the dock | ||
535 | 27 | */ | ||
536 | 28 | [DBus (name = "net.launchpad.plank.Items")] | ||
537 | 29 | interface ItemsIface : GLib.Object | ||
538 | 30 | { | ||
539 | 31 | /** | ||
540 | 32 | * Emmited when items are changed | ||
541 | 33 | */ | ||
542 | 34 | public signal void changed (); | ||
543 | 35 | |||
544 | 36 | /** | ||
545 | 37 | * Add a new item for the given uri to the dock | ||
546 | 38 | * | ||
547 | 39 | * @param uri an URI | ||
548 | 40 | * @return whether it was successfully added | ||
549 | 41 | */ | ||
550 | 42 | public abstract bool add (string uri) throws GLib.IOError; | ||
551 | 43 | |||
552 | 44 | /** | ||
553 | 45 | * Remove an existing item for the given uri from the dock | ||
554 | 46 | * | ||
555 | 47 | * @param uri an URI | ||
556 | 48 | * @return whether it was successfully removed | ||
557 | 49 | */ | ||
558 | 50 | public abstract bool remove (string uri) throws GLib.IOError; | ||
559 | 51 | |||
560 | 52 | /** | ||
561 | 53 | * Returns the number of currently visible items on the dock | ||
562 | 54 | * | ||
563 | 55 | * @return the item-count | ||
564 | 56 | */ | ||
565 | 57 | public abstract int get_count () throws GLib.IOError; | ||
566 | 58 | |||
567 | 59 | /** | ||
568 | 60 | * Returns an array of uris of the persistent applications on the dock | ||
569 | 61 | * | ||
570 | 62 | * @return the array of uris | ||
571 | 63 | */ | ||
572 | 64 | public abstract string[] get_persistent_applications () throws GLib.IOError; | ||
573 | 65 | |||
574 | 66 | /** | ||
575 | 67 | * Returns an array of uris of the transient applications on the dock | ||
576 | 68 | * | ||
577 | 69 | * @return the array of uris | ||
578 | 70 | */ | ||
579 | 71 | public abstract string[] get_transient_applications () throws GLib.IOError; | ||
580 | 72 | } | ||
581 | 73 | } | ||
582 | 0 | 74 | ||
583 | === added file 'lib/DBusManager.vala' | |||
584 | --- lib/DBusManager.vala 1970-01-01 00:00:00 +0000 | |||
585 | +++ lib/DBusManager.vala 2015-03-16 17:58:40 +0000 | |||
586 | @@ -0,0 +1,220 @@ | |||
587 | 1 | // | ||
588 | 2 | // Copyright (C) 2015 Rico Tzschichholz | ||
589 | 3 | // | ||
590 | 4 | // This program is free software: you can redistribute it and/or modify | ||
591 | 5 | // it under the terms of the GNU General Public License as published by | ||
592 | 6 | // the Free Software Foundation, either version 3 of the License, or | ||
593 | 7 | // (at your option) any later version. | ||
594 | 8 | // | ||
595 | 9 | // This program is distributed in the hope that it will be useful, | ||
596 | 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
597 | 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
598 | 12 | // GNU General Public License for more details. | ||
599 | 13 | // | ||
600 | 14 | // You should have received a copy of the GNU General Public License | ||
601 | 15 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
602 | 16 | // | ||
603 | 17 | |||
604 | 18 | using Plank.Factories; | ||
605 | 19 | using Plank.Items; | ||
606 | 20 | using Plank.Services; | ||
607 | 21 | |||
608 | 22 | namespace Plank | ||
609 | 23 | { | ||
610 | 24 | /** | ||
611 | 25 | * Provide an interface to manage items of the dock | ||
612 | 26 | */ | ||
613 | 27 | class DBusItems : GLib.Object, Plank.DBus.ItemsIface | ||
614 | 28 | { | ||
615 | 29 | DockController controller; | ||
616 | 30 | uint changed_timer = 0; | ||
617 | 31 | |||
618 | 32 | public DBusItems (DockController _controller) | ||
619 | 33 | { | ||
620 | 34 | controller = _controller; | ||
621 | 35 | controller.items_changed.connect (handle_items_changed); | ||
622 | 36 | } | ||
623 | 37 | |||
624 | 38 | ~DBusItems () | ||
625 | 39 | { | ||
626 | 40 | controller.items_changed.disconnect (handle_items_changed); | ||
627 | 41 | |||
628 | 42 | if (changed_timer > 0) { | ||
629 | 43 | GLib.Source.remove (changed_timer); | ||
630 | 44 | changed_timer = 0; | ||
631 | 45 | } | ||
632 | 46 | } | ||
633 | 47 | |||
634 | 48 | void handle_items_changed () | ||
635 | 49 | { | ||
636 | 50 | if (changed_timer > 0) | ||
637 | 51 | return; | ||
638 | 52 | |||
639 | 53 | // Fire updates with a reasonable rate | ||
640 | 54 | changed_timer = Timeout.add (500, () => { | ||
641 | 55 | changed_timer = 0; | ||
642 | 56 | changed (); | ||
643 | 57 | return false; | ||
644 | 58 | }); | ||
645 | 59 | } | ||
646 | 60 | |||
647 | 61 | public bool add (string uri) | ||
648 | 62 | { | ||
649 | 63 | debug ("Try to remotely add '%s'", uri); | ||
650 | 64 | |||
651 | 65 | unowned ApplicationDockItemProvider? provider = controller.default_provider; | ||
652 | 66 | if (provider == null) | ||
653 | 67 | return false; | ||
654 | 68 | |||
655 | 69 | unowned DockItem? item = provider.item_for_uri (uri); | ||
656 | 70 | if (item != null && item is TransientDockItem) { | ||
657 | 71 | ((TransientDockItem) item).pin_launcher (); | ||
658 | 72 | return true; | ||
659 | 73 | } | ||
660 | 74 | |||
661 | 75 | return provider.add_item_with_uri (uri); | ||
662 | 76 | } | ||
663 | 77 | |||
664 | 78 | public bool remove (string uri) | ||
665 | 79 | { | ||
666 | 80 | debug ("Try to remotely remove '%s'", uri); | ||
667 | 81 | |||
668 | 82 | unowned ApplicationDockItemProvider? provider = controller.default_provider; | ||
669 | 83 | if (provider == null) | ||
670 | 84 | return false; | ||
671 | 85 | |||
672 | 86 | unowned DockItem? item = provider.item_for_uri (uri); | ||
673 | 87 | if (item == null) | ||
674 | 88 | return false; | ||
675 | 89 | |||
676 | 90 | if (item is ApplicationDockItem) { | ||
677 | 91 | if (!(item is TransientDockItem)) | ||
678 | 92 | ((ApplicationDockItem) item).pin_launcher (); | ||
679 | 93 | return true; | ||
680 | 94 | } | ||
681 | 95 | |||
682 | 96 | return provider.remove_item (item); | ||
683 | 97 | } | ||
684 | 98 | |||
685 | 99 | public int get_count () | ||
686 | 100 | { | ||
687 | 101 | return controller.VisibleItems.size; | ||
688 | 102 | } | ||
689 | 103 | |||
690 | 104 | public string[] get_persistent_applications () | ||
691 | 105 | { | ||
692 | 106 | Logger.verbose ("Remotely list persistent items"); | ||
693 | 107 | |||
694 | 108 | var items = controller.Items; | ||
695 | 109 | |||
696 | 110 | string[] result = {}; | ||
697 | 111 | unowned string launcher; | ||
698 | 112 | foreach (unowned DockItem item in items) { | ||
699 | 113 | if (item is ApplicationDockItem && !(item is TransientDockItem)) { | ||
700 | 114 | launcher = item.Launcher; | ||
701 | 115 | if (launcher != null && launcher != "") | ||
702 | 116 | result += launcher; | ||
703 | 117 | } | ||
704 | 118 | } | ||
705 | 119 | |||
706 | 120 | return result; | ||
707 | 121 | } | ||
708 | 122 | |||
709 | 123 | public string[] get_transient_applications () | ||
710 | 124 | { | ||
711 | 125 | Logger.verbose ("Remotely list transient items"); | ||
712 | 126 | |||
713 | 127 | var items = controller.Items; | ||
714 | 128 | |||
715 | 129 | string[] result = {}; | ||
716 | 130 | unowned string launcher; | ||
717 | 131 | foreach (unowned DockItem item in items) { | ||
718 | 132 | if (item is TransientDockItem) { | ||
719 | 133 | launcher = item.Launcher; | ||
720 | 134 | if (launcher != null && launcher != "") | ||
721 | 135 | result += launcher; | ||
722 | 136 | } | ||
723 | 137 | } | ||
724 | 138 | |||
725 | 139 | return result; | ||
726 | 140 | } | ||
727 | 141 | } | ||
728 | 142 | |||
729 | 143 | /** | ||
730 | 144 | * Handles all the exported DBus functions of the dock | ||
731 | 145 | */ | ||
732 | 146 | public class DBusManager : GLib.Object | ||
733 | 147 | { | ||
734 | 148 | public DockController controller { private get; construct; } | ||
735 | 149 | |||
736 | 150 | string? dock_object_path; | ||
737 | 151 | |||
738 | 152 | uint dbus_items_id = 0; | ||
739 | 153 | uint dbus_client_ping_id = 0; | ||
740 | 154 | |||
741 | 155 | public DBusManager (DockController controller) | ||
742 | 156 | { | ||
743 | 157 | Object (controller: controller); | ||
744 | 158 | } | ||
745 | 159 | |||
746 | 160 | construct | ||
747 | 161 | { | ||
748 | 162 | unowned Application application = Application.get_default (); | ||
749 | 163 | unowned DBusConnection connection = application.get_dbus_connection (); | ||
750 | 164 | unowned string? object_path = application.get_dbus_object_path (); | ||
751 | 165 | |||
752 | 166 | if (connection == null || object_path == null) { | ||
753 | 167 | critical ("Not able to register our interfaces"); | ||
754 | 168 | return; | ||
755 | 169 | } | ||
756 | 170 | |||
757 | 171 | // Listen for "Ping" signals coming from clients | ||
758 | 172 | try { | ||
759 | 173 | dbus_client_ping_id = connection.signal_subscribe (null, Plank.DBus.CLIENT_INTERFACE_NAME, | ||
760 | 174 | Plank.DBus.PING_NAME, null, null, DBusSignalFlags.NONE, handle_client_ping); | ||
761 | 175 | } catch (IOError e) { | ||
762 | 176 | warning ("Could not subscribe for client signal (%s)", e.message); | ||
763 | 177 | } | ||
764 | 178 | |||
765 | 179 | try { | ||
766 | 180 | var dbus_items = new DBusItems (controller); | ||
767 | 181 | dbus_items_id = connection.register_object<Plank.DBus.ItemsIface> (object_path, dbus_items); | ||
768 | 182 | } catch (IOError e) { | ||
769 | 183 | warning ("Could not register service (%s)", e.message); | ||
770 | 184 | } | ||
771 | 185 | |||
772 | 186 | dock_object_path = object_path; | ||
773 | 187 | |||
774 | 188 | try { | ||
775 | 189 | // Broadcast to inform running clients | ||
776 | 190 | connection.emit_signal (null, dock_object_path, Plank.DBus.DOCK_INTERFACE_NAME, Plank.DBus.PING_NAME, null); | ||
777 | 191 | } catch (Error e) { | ||
778 | 192 | warning ("Could not ping running clients (%s)", e.message); | ||
779 | 193 | } | ||
780 | 194 | } | ||
781 | 195 | |||
782 | 196 | ~DBusManager () | ||
783 | 197 | { | ||
784 | 198 | unowned Application application = Application.get_default (); | ||
785 | 199 | unowned DBusConnection connection = application.get_dbus_connection (); | ||
786 | 200 | |||
787 | 201 | if (connection != null) { | ||
788 | 202 | if (dbus_items_id > 0) | ||
789 | 203 | connection.unregister_object (dbus_items_id); | ||
790 | 204 | if (dbus_client_ping_id > 0) | ||
791 | 205 | connection.signal_unsubscribe (dbus_client_ping_id); | ||
792 | 206 | } | ||
793 | 207 | } | ||
794 | 208 | |||
795 | 209 | void handle_client_ping (DBusConnection connection, string sender_name, string object_path, | ||
796 | 210 | string interface_name, string signal_name, Variant parameters) | ||
797 | 211 | { | ||
798 | 212 | try { | ||
799 | 213 | // Broadcast to inform running clients | ||
800 | 214 | connection.emit_signal (null, dock_object_path, Plank.DBus.DOCK_INTERFACE_NAME, Plank.DBus.PING_NAME, null); | ||
801 | 215 | } catch (Error e) { | ||
802 | 216 | warning ("Could not ping running clients (%s)", e.message); | ||
803 | 217 | } | ||
804 | 218 | } | ||
805 | 219 | } | ||
806 | 220 | } | ||
807 | 0 | 221 | ||
808 | === modified file 'lib/DockController.vala' | |||
809 | --- lib/DockController.vala 2015-03-16 17:44:57 +0000 | |||
810 | +++ lib/DockController.vala 2015-03-16 17:58:40 +0000 | |||
811 | @@ -42,7 +42,9 @@ | |||
812 | 42 | public DockRenderer renderer { get; protected set; } | 42 | public DockRenderer renderer { get; protected set; } |
813 | 43 | public DockWindow window { get; protected set; } | 43 | public DockWindow window { get; protected set; } |
814 | 44 | 44 | ||
816 | 45 | ApplicationDockItemProvider? default_provider; | 45 | public ApplicationDockItemProvider? default_provider { get; private set; } |
817 | 46 | |||
818 | 47 | DBusManager dbus_manager; | ||
819 | 46 | Gee.ArrayList<unowned DockItem> visible_items; | 48 | Gee.ArrayList<unowned DockItem> visible_items; |
820 | 47 | Gee.ArrayList<unowned DockItem> items; | 49 | Gee.ArrayList<unowned DockItem> items; |
821 | 48 | 50 | ||
822 | @@ -90,6 +92,8 @@ | |||
823 | 90 | 92 | ||
824 | 91 | prefs.notify["PinnedOnly"].connect (update_default_provider); | 93 | prefs.notify["PinnedOnly"].connect (update_default_provider); |
825 | 92 | 94 | ||
826 | 95 | dbus_manager = new DBusManager (this); | ||
827 | 96 | |||
828 | 93 | position_manager = new PositionManager (this); | 97 | position_manager = new PositionManager (this); |
829 | 94 | drag_manager = new DragManager (this); | 98 | drag_manager = new DragManager (this); |
830 | 95 | hide_manager = new HideManager (this); | 99 | hide_manager = new HideManager (this); |
831 | @@ -135,12 +139,12 @@ | |||
832 | 135 | return; | 139 | return; |
833 | 136 | 140 | ||
834 | 137 | Logger.verbose ("DockController.add_default_provider ()"); | 141 | Logger.verbose ("DockController.add_default_provider ()"); |
836 | 138 | default_provider = get_default_provider (); | 142 | default_provider = create_default_provider (); |
837 | 139 | 143 | ||
838 | 140 | add_item (default_provider); | 144 | add_item (default_provider); |
839 | 141 | } | 145 | } |
840 | 142 | 146 | ||
842 | 143 | ApplicationDockItemProvider get_default_provider () | 147 | ApplicationDockItemProvider create_default_provider () |
843 | 144 | { | 148 | { |
844 | 145 | ApplicationDockItemProvider provider; | 149 | ApplicationDockItemProvider provider; |
845 | 146 | 150 | ||
846 | @@ -169,7 +173,7 @@ | |||
847 | 169 | return; | 173 | return; |
848 | 170 | 174 | ||
849 | 171 | var old_default_provider = default_provider; | 175 | var old_default_provider = default_provider; |
851 | 172 | default_provider = get_default_provider (); | 176 | default_provider = create_default_provider (); |
852 | 173 | default_provider.prepare (); | 177 | default_provider.prepare (); |
853 | 174 | replace_item (default_provider, old_default_provider); | 178 | replace_item (default_provider, old_default_provider); |
854 | 175 | 179 | ||
855 | @@ -275,6 +279,8 @@ | |||
856 | 275 | position_manager.update_regions (); | 279 | position_manager.update_regions (); |
857 | 276 | } | 280 | } |
858 | 277 | window.update_icon_regions (); | 281 | window.update_icon_regions (); |
859 | 282 | |||
860 | 283 | items_changed (added, removed); | ||
861 | 278 | } | 284 | } |
862 | 279 | 285 | ||
863 | 280 | void handle_item_positions_changed (DockContainer provider, Gee.List<unowned DockElement> moved_items) | 286 | void handle_item_positions_changed (DockContainer provider, Gee.List<unowned DockElement> moved_items) |
864 | 281 | 287 | ||
865 | === modified file 'lib/Makefile.am' | |||
866 | --- lib/Makefile.am 2015-01-22 10:24:51 +0000 | |||
867 | +++ lib/Makefile.am 2015-03-16 17:58:40 +0000 | |||
868 | @@ -61,12 +61,15 @@ | |||
869 | 61 | $(NULL) | 61 | $(NULL) |
870 | 62 | 62 | ||
871 | 63 | libplank_la_VALASOURCES = \ | 63 | libplank_la_VALASOURCES = \ |
872 | 64 | DBusManager.vala \ | ||
873 | 64 | DockController.vala \ | 65 | DockController.vala \ |
874 | 65 | DockPreferences.vala \ | 66 | DockPreferences.vala \ |
875 | 66 | DockRenderer.vala \ | 67 | DockRenderer.vala \ |
876 | 67 | DragManager.vala \ | 68 | DragManager.vala \ |
877 | 68 | HideManager.vala \ | 69 | HideManager.vala \ |
878 | 69 | PositionManager.vala \ | 70 | PositionManager.vala \ |
879 | 71 | DBus/Client.vala \ | ||
880 | 72 | DBus/Interfaces.vala \ | ||
881 | 70 | Drawing/AnimatedRenderer.vala \ | 73 | Drawing/AnimatedRenderer.vala \ |
882 | 71 | Drawing/Color.vala \ | 74 | Drawing/Color.vala \ |
883 | 72 | Drawing/DrawingService.vala \ | 75 | Drawing/DrawingService.vala \ |
884 | 73 | 76 | ||
885 | === modified file 'lib/libplank.symbols' | |||
886 | --- lib/libplank.symbols 2015-03-16 17:47:28 +0000 | |||
887 | +++ lib/libplank.symbols 2015-03-16 17:58:40 +0000 | |||
888 | @@ -1,6 +1,18 @@ | |||
889 | 1 | plank_dbus_client_add_item | ||
890 | 2 | plank_dbus_client_get_instance | ||
891 | 3 | plank_dbus_client_get_is_connected | ||
892 | 4 | plank_dbus_client_get_items_count | ||
893 | 5 | plank_dbus_client_get_persistent_applications | ||
894 | 6 | plank_dbus_client_get_transient_applications | ||
895 | 7 | plank_dbus_client_get_type | ||
896 | 8 | plank_dbus_client_remove_item | ||
897 | 9 | plank_dbus_manager_construct | ||
898 | 10 | plank_dbus_manager_get_type | ||
899 | 11 | plank_dbus_manager_new | ||
900 | 1 | plank_dock_controller_add_default_provider | 12 | plank_dock_controller_add_default_provider |
901 | 2 | plank_dock_controller_construct | 13 | plank_dock_controller_construct |
902 | 3 | plank_dock_controller_get_config_folder | 14 | plank_dock_controller_get_config_folder |
903 | 15 | plank_dock_controller_get_default_provider | ||
904 | 4 | plank_dock_controller_get_drag_manager | 16 | plank_dock_controller_get_drag_manager |
905 | 5 | plank_dock_controller_get_hide_manager | 17 | plank_dock_controller_get_hide_manager |
906 | 6 | plank_dock_controller_get_Items | 18 | plank_dock_controller_get_Items |