Merge lp:~ted/indicator-appmenu/dbusmenu-collector-rename into lp:indicator-appmenu/0.4

Proposed by Ted Gould
Status: Merged
Approved by: Mikkel Kamstrup Erlandsen
Approved revision: 183
Merged at revision: 140
Proposed branch: lp:~ted/indicator-appmenu/dbusmenu-collector-rename
Merge into: lp:indicator-appmenu/0.4
Prerequisite: lp:~ted/indicator-appmenu/hud
Diff against target: 644 lines (+119/-118)
6 files modified
.bzrignore (+2/-1)
po/POTFILES.in (+1/-1)
src/Makefile.am (+2/-2)
src/hud-search.c (+30/-30)
src/menuitem-collector.c (+50/-50)
src/menuitem-collector.h (+34/-34)
To merge this branch: bzr merge lp:~ted/indicator-appmenu/dbusmenu-collector-rename
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+90284@code.launchpad.net

Description of the change

Rename the dbusmenu-collector to menuitem-collector to avoid a potential namespace collision.

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Looks good. And the diffstat can be used as a checksum to validate it #added==#removed+1. And the extra added line is in .bzrignore. So all checks up :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2012-01-26 16:51:25 +0000
3+++ .bzrignore 2012-01-26 16:51:25 +0000
4@@ -125,7 +125,7 @@
5 src/hud_cli-hud-cli.gcno
6 src/hud_dump_application-dump-app-info.gcno
7 src/hud_dump_application-hud-dump-application.gcno
8-src/hud_service-dbusmenu-collector.gcno
9+src/hud_service-menuitem-collector.gcno
10 src/hud_service-distance.gcno
11 src/hud_service-dump-app-info.gcno
12 src/hud_service-hud-dbus.gcno
13@@ -168,3 +168,4 @@
14 tests/test_usage_db_simple-test-usage-db-simple.gcno
15 tests/test_usage_db_testapp-test-usage-db-testapp.gcda
16 tests/test_usage_db_testapp-test-usage-db-testapp.gcno
17+po/indicator-appmenu.pot
18
19=== modified file 'po/POTFILES.in'
20--- po/POTFILES.in 2012-01-26 16:51:25 +0000
21+++ po/POTFILES.in 2012-01-26 16:51:25 +0000
22@@ -4,7 +4,7 @@
23 src/hud-service.c
24 src/indicator-tracker.c
25 src/hud-dbus.c
26-src/dbusmenu-collector.c
27+src/menuitem-collector.c
28 src/usage-tracker.c
29 src/hud.interface.c
30 src/hud-search.c
31
32=== modified file 'src/Makefile.am'
33--- src/Makefile.am 2012-01-26 16:51:25 +0000
34+++ src/Makefile.am 2012-01-26 16:51:25 +0000
35@@ -81,8 +81,8 @@
36 ####################
37
38 hud_service_SOURCES = \
39- dbusmenu-collector.h \
40- dbusmenu-collector.c \
41+ menuitem-collector.h \
42+ menuitem-collector.c \
43 distance.h \
44 distance.c \
45 dump-app-info.h \
46
47=== modified file 'src/hud-search.c'
48--- src/hud-search.c 2012-01-26 16:51:25 +0000
49+++ src/hud-search.c 2012-01-26 16:51:25 +0000
50@@ -29,7 +29,7 @@
51 #include <gio/gdesktopappinfo.h>
52
53 #include "hud-search.h"
54-#include "dbusmenu-collector.h"
55+#include "menuitem-collector.h"
56 #include "indicator-tracker.h"
57 #include "usage-tracker.h"
58 #include "utils.h"
59@@ -41,7 +41,7 @@
60 guint32 active_xid;
61 BamfApplication * active_app;
62
63- DbusmenuCollector * collector;
64+ MenuitemCollector * collector;
65 UsageTracker * usage;
66
67 GDBusProxy * appmenu;
68@@ -111,7 +111,7 @@
69 }
70
71 /* DBusMenu */
72- self->priv->collector = dbusmenu_collector_new();
73+ self->priv->collector = menuitem_collector_new();
74
75 /* Usage Tracker */
76 self->priv->usage = usage_tracker_new();
77@@ -199,7 +199,7 @@
78
79 typedef struct _usage_wrapper_t usage_wrapper_t;
80 struct _usage_wrapper_t {
81- DbusmenuCollectorFound * found;
82+ MenuitemCollectorFound * found;
83 guint count;
84 gfloat percent_usage;
85 gfloat percent_distance;
86@@ -226,7 +226,7 @@
87 usage_wrapper_t * wa = (usage_wrapper_t *)a;
88 usage_wrapper_t * wb = (usage_wrapper_t *)b;
89
90- return dbusmenu_collector_found_get_distance(wa->found) - dbusmenu_collector_found_get_distance(wb->found);
91+ return menuitem_collector_found_get_distance(wa->found) - menuitem_collector_found_get_distance(wb->found);
92 }
93
94 /* Take the found list and put it into the usage array so that
95@@ -241,10 +241,10 @@
96
97 while (found != NULL) {
98 usage_wrapper_t usage;
99- usage.found = (DbusmenuCollectorFound *)found->data;
100+ usage.found = (MenuitemCollectorFound *)found->data;
101 usage.count = 0;
102
103- if (dbusmenu_collector_found_get_distance(usage.found) > max_distance) {
104+ if (menuitem_collector_found_get_distance(usage.found) > max_distance) {
105 continue;
106 }
107
108@@ -308,7 +308,7 @@
109 get_current_window_address(search, &address, &path);
110
111 if (address != NULL && path != NULL) {
112- found_list = dbusmenu_collector_search(search->priv->collector, address, path, NULL, searchstr);
113+ found_list = menuitem_collector_search(search->priv->collector, address, path, NULL, searchstr);
114 }
115
116 g_free(address);
117@@ -325,13 +325,13 @@
118 gchar * icon = desktop_to_icon(desktop_file);
119
120 while (founditem != NULL) {
121- DbusmenuCollectorFound * found = (DbusmenuCollectorFound *)founditem->data;
122+ MenuitemCollectorFound * found = (MenuitemCollectorFound *)founditem->data;
123
124 /* Indicator */
125- dbusmenu_collector_found_set_indicator(found, desktop_file);
126+ menuitem_collector_found_set_indicator(found, desktop_file);
127
128 /* Icon */
129- dbusmenu_collector_found_set_app_icon(found, icon);
130+ menuitem_collector_found_set_app_icon(found, icon);
131
132 founditem = g_list_next(founditem);
133 }
134@@ -364,23 +364,23 @@
135 IndicatorTrackerIndicator * indicator = (IndicatorTrackerIndicator *)lindicator->data;
136
137 /* Search the menu items of the indicator */
138- GList * found_list = dbusmenu_collector_search(search->priv->collector, indicator->dbus_name, indicator->dbus_object, indicator->prefix, searchstr);
139+ GList * found_list = menuitem_collector_search(search->priv->collector, indicator->dbus_name, indicator->dbus_object, indicator->prefix, searchstr);
140
141 /* Increase distance */
142 GList * founditem = found_list;
143 while (founditem != NULL) {
144- DbusmenuCollectorFound * found = (DbusmenuCollectorFound *)founditem->data;
145+ MenuitemCollectorFound * found = (MenuitemCollectorFound *)founditem->data;
146
147 /* Distance */
148- guint distance = dbusmenu_collector_found_get_distance(found);
149+ guint distance = menuitem_collector_found_get_distance(found);
150 distance = distance + ((distance * indicator_penalty) / 100);
151- dbusmenu_collector_found_set_distance(found, distance);
152+ menuitem_collector_found_set_distance(found, distance);
153
154 /* Names */
155- dbusmenu_collector_found_set_indicator(found, indicator->name);
156+ menuitem_collector_found_set_indicator(found, indicator->name);
157
158 /* Icon */
159- dbusmenu_collector_found_set_app_icon(found, indicator->icon);
160+ menuitem_collector_found_set_app_icon(found, indicator->icon);
161
162 founditem = g_list_next(founditem);
163 }
164@@ -422,10 +422,10 @@
165
166 const gchar * desktopfile = NULL;
167
168- desktopfile = dbusmenu_collector_found_get_indicator(usage->found);
169+ desktopfile = menuitem_collector_found_get_indicator(usage->found);
170
171 if (desktopfile != NULL) {
172- usage->count = usage_tracker_get_usage(search->priv->usage, desktopfile, dbusmenu_collector_found_get_db(usage->found));
173+ usage->count = usage_tracker_get_usage(search->priv->usage, desktopfile, menuitem_collector_found_get_db(usage->found));
174 } else {
175 usage->count = 0;
176 }
177@@ -437,7 +437,7 @@
178 for (count = 0; count < usagedata->len; count++) {
179 usage_wrapper_t * usage = &g_array_index(usagedata, usage_wrapper_t, count);
180 overall_usage += usage->count;
181- overall_distance += dbusmenu_collector_found_get_distance(usage->found);
182+ overall_distance += menuitem_collector_found_get_distance(usage->found);
183 }
184
185
186@@ -451,7 +451,7 @@
187 usage->percent_usage = 1.0;
188 }
189
190- usage->percent_distance = (gfloat)dbusmenu_collector_found_get_distance(usage->found)/(gfloat)overall_distance;
191+ usage->percent_distance = (gfloat)menuitem_collector_found_get_distance(usage->found)/(gfloat)overall_distance;
192 }
193
194 /* Sort based on aggregate */
195@@ -508,19 +508,19 @@
196 for (count = 0; count < 5 && count < usagedata->len; count++) {
197 usage_wrapper_t * usage = &g_array_index(usagedata, usage_wrapper_t, count);
198
199- const gchar * desktopfile = dbusmenu_collector_found_get_indicator(usage->found);
200+ const gchar * desktopfile = menuitem_collector_found_get_indicator(usage->found);
201 if (desktopfile == NULL) {
202 desktopfile = appdesktopfile;
203 }
204
205 HudSearchSuggest * suggest = hud_search_suggest_new(desktopfile,
206- dbusmenu_collector_found_get_app_icon(usage->found),
207- dbusmenu_collector_found_get_display(usage->found),
208- dbusmenu_collector_found_get_db(usage->found),
209+ menuitem_collector_found_get_app_icon(usage->found),
210+ menuitem_collector_found_get_display(usage->found),
211+ menuitem_collector_found_get_db(usage->found),
212 "none",
213- dbusmenu_collector_found_get_dbus_addr(usage->found),
214- dbusmenu_collector_found_get_dbus_path(usage->found),
215- dbusmenu_collector_found_get_dbus_id(usage->found)
216+ menuitem_collector_found_get_dbus_addr(usage->found),
217+ menuitem_collector_found_get_dbus_path(usage->found),
218+ menuitem_collector_found_get_dbus_id(usage->found)
219 );
220
221 retval = g_list_prepend(retval, suggest);
222@@ -530,7 +530,7 @@
223
224 /* Free the interim arrays of data */
225 g_array_free(usagedata, TRUE);
226- dbusmenu_collector_found_list_free(found_list);
227+ menuitem_collector_found_list_free(found_list);
228
229 return retval;
230 }
231@@ -557,7 +557,7 @@
232 }
233
234 if (app != NULL && dbstring != NULL && address != NULL && path != NULL && id != 0) {
235- dbusmenu_collector_execute(search->priv->collector, address, path, id, timestamp);
236+ menuitem_collector_execute(search->priv->collector, address, path, id, timestamp);
237 usage_tracker_mark_usage(search->priv->usage, app, dbstring);
238 }
239
240
241=== renamed file 'src/dbusmenu-collector.c' => 'src/menuitem-collector.c'
242--- src/dbusmenu-collector.c 2012-01-26 16:51:25 +0000
243+++ src/menuitem-collector.c 2012-01-26 16:51:25 +0000
244@@ -30,23 +30,23 @@
245
246 #include <libdbusmenu-glib/client.h>
247
248-#include "dbusmenu-collector.h"
249+#include "menuitem-collector.h"
250 #include "distance.h"
251 #include "shared-values.h"
252 #include "utils.h"
253
254 #define GENERIC_ICON "dbusmenu-lens-panel"
255
256-typedef struct _DbusmenuCollectorPrivate DbusmenuCollectorPrivate;
257+typedef struct _MenuitemCollectorPrivate MenuitemCollectorPrivate;
258
259-struct _DbusmenuCollectorPrivate {
260+struct _MenuitemCollectorPrivate {
261 GDBusConnection * bus;
262 guint signal;
263 GHashTable * hash;
264 GSettings * search_settings;
265 };
266
267-struct _DbusmenuCollectorFound {
268+struct _MenuitemCollectorFound {
269 gchar * dbus_addr;
270 gchar * dbus_path;
271 gint dbus_id;
272@@ -73,35 +73,35 @@
273 guint distance;
274 };
275
276-static void dbusmenu_collector_class_init (DbusmenuCollectorClass *klass);
277-static void dbusmenu_collector_init (DbusmenuCollector *self);
278-static void dbusmenu_collector_dispose (GObject *object);
279-static void dbusmenu_collector_finalize (GObject *object);
280+static void menuitem_collector_class_init (MenuitemCollectorClass *klass);
281+static void menuitem_collector_init (MenuitemCollector *self);
282+static void menuitem_collector_dispose (GObject *object);
283+static void menuitem_collector_finalize (GObject *object);
284 static void update_layout_cb (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * signal, GVariant * params, gpointer user_data);
285 static guint menu_hash_func (gconstpointer key);
286 static gboolean menu_equal_func (gconstpointer a, gconstpointer b);
287 static void menu_key_destroy (gpointer key);
288-static DbusmenuCollectorFound * dbusmenu_collector_found_new (DbusmenuClient * client, DbusmenuMenuitem * item, GStrv strings, guint distance, GStrv usedstrings, const gchar * indicator_name);
289+static MenuitemCollectorFound * menuitem_collector_found_new (DbusmenuClient * client, DbusmenuMenuitem * item, GStrv strings, guint distance, GStrv usedstrings, const gchar * indicator_name);
290
291-G_DEFINE_TYPE (DbusmenuCollector, dbusmenu_collector, G_TYPE_OBJECT);
292+G_DEFINE_TYPE (MenuitemCollector, menuitem_collector, G_TYPE_OBJECT);
293
294 static void
295-dbusmenu_collector_class_init (DbusmenuCollectorClass *klass)
296+menuitem_collector_class_init (MenuitemCollectorClass *klass)
297 {
298 GObjectClass *object_class = G_OBJECT_CLASS (klass);
299
300- g_type_class_add_private (klass, sizeof (DbusmenuCollectorPrivate));
301+ g_type_class_add_private (klass, sizeof (MenuitemCollectorPrivate));
302
303- object_class->dispose = dbusmenu_collector_dispose;
304- object_class->finalize = dbusmenu_collector_finalize;
305+ object_class->dispose = menuitem_collector_dispose;
306+ object_class->finalize = menuitem_collector_finalize;
307
308 return;
309 }
310
311 static void
312-dbusmenu_collector_init (DbusmenuCollector *self)
313+menuitem_collector_init (MenuitemCollector *self)
314 {
315- self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), DBUSMENU_COLLECTOR_TYPE, DbusmenuCollectorPrivate);
316+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), MENUITEM_COLLECTOR_TYPE, MenuitemCollectorPrivate);
317
318 self->priv->bus = NULL;
319 self->priv->signal = 0;
320@@ -144,9 +144,9 @@
321 }
322
323 static void
324-dbusmenu_collector_dispose (GObject *object)
325+menuitem_collector_dispose (GObject *object)
326 {
327- DbusmenuCollector * collector = DBUSMENU_COLLECTOR(object);
328+ MenuitemCollector * collector = MENUITEM_COLLECTOR(object);
329
330 if (collector->priv->signal != 0) {
331 g_dbus_connection_signal_unsubscribe(collector->priv->bus, collector->priv->signal);
332@@ -163,29 +163,29 @@
333 collector->priv->search_settings = NULL;
334 }
335
336- G_OBJECT_CLASS (dbusmenu_collector_parent_class)->dispose (object);
337+ G_OBJECT_CLASS (menuitem_collector_parent_class)->dispose (object);
338 return;
339 }
340
341 static void
342-dbusmenu_collector_finalize (GObject *object)
343+menuitem_collector_finalize (GObject *object)
344 {
345
346- G_OBJECT_CLASS (dbusmenu_collector_parent_class)->finalize (object);
347+ G_OBJECT_CLASS (menuitem_collector_parent_class)->finalize (object);
348 return;
349 }
350
351-DbusmenuCollector *
352-dbusmenu_collector_new (void)
353+MenuitemCollector *
354+menuitem_collector_new (void)
355 {
356- return DBUSMENU_COLLECTOR(g_object_new(DBUSMENU_COLLECTOR_TYPE, NULL));
357+ return MENUITEM_COLLECTOR(g_object_new(MENUITEM_COLLECTOR_TYPE, NULL));
358 }
359
360 static void
361 update_layout_cb (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * signal, GVariant * params, gpointer user_data)
362 {
363 g_debug("Client updating %s:%s", sender, path);
364- DbusmenuCollector * collector = DBUSMENU_COLLECTOR(user_data);
365+ MenuitemCollector * collector = MENUITEM_COLLECTOR(user_data);
366 g_return_if_fail(collector != NULL);
367
368 menu_key_t search_key = {
369@@ -376,7 +376,7 @@
370 guint distance = calculate_distance(search, newstr, &used_strings);
371 if (distance < G_MAXUINT) {
372 // g_debug("Distance %d for '%s' in \"'%s'\" using \"'%s'\"", distance, search, g_strjoinv("' '", newstr), g_strjoinv("' '", used_strings));
373- results = g_list_prepend(results, dbusmenu_collector_found_new(client, rootitem, newstr, distance, used_strings, indicator_name));
374+ results = g_list_prepend(results, menuitem_collector_found_new(client, rootitem, newstr, distance, used_strings, indicator_name));
375 }
376 g_strfreev(used_strings);
377 }
378@@ -399,7 +399,7 @@
379 }
380
381 static GList *
382-process_client (DbusmenuCollector * collector, DbusmenuClient * client, const gchar * search, GList * results, const gchar * indicator_name, GStrv prefix)
383+process_client (MenuitemCollector * collector, DbusmenuClient * client, const gchar * search, GList * results, const gchar * indicator_name, GStrv prefix)
384 {
385 /* Handle the case where there are no search terms */
386 if (search == NULL || search[0] == '\0') {
387@@ -418,7 +418,7 @@
388 array[0] = label;
389 array[1] = NULL;
390
391- results = g_list_prepend(results, dbusmenu_collector_found_new(client, item, (GStrv)array, calculate_distance(NULL, (GStrv)array, NULL), NULL, indicator_name));
392+ results = g_list_prepend(results, menuitem_collector_found_new(client, item, (GStrv)array, calculate_distance(NULL, (GStrv)array, NULL), NULL, indicator_name));
393 }
394
395 return results;
396@@ -439,9 +439,9 @@
397 }
398
399 static GList *
400-just_do_it (DbusmenuCollector * collector, const gchar * dbus_addr, const gchar * dbus_path, const gchar * search, GList * results, const gchar * indicator_name, GStrv prefix)
401+just_do_it (MenuitemCollector * collector, const gchar * dbus_addr, const gchar * dbus_path, const gchar * search, GList * results, const gchar * indicator_name, GStrv prefix)
402 {
403- g_return_val_if_fail(IS_DBUSMENU_COLLECTOR(collector), results);
404+ g_return_val_if_fail(IS_MENUITEM_COLLECTOR(collector), results);
405
406 menu_key_t search_key = {
407 sender: (gchar *)dbus_addr,
408@@ -462,7 +462,7 @@
409 }
410
411 GList *
412-dbusmenu_collector_search (DbusmenuCollector * collector, const gchar * dbus_addr, const gchar * dbus_path, const gchar * prefix, const gchar * search)
413+menuitem_collector_search (MenuitemCollector * collector, const gchar * dbus_addr, const gchar * dbus_path, const gchar * prefix, const gchar * search)
414 {
415 GList * items = NULL;
416 GStrv prefixarray = NULL;
417@@ -483,9 +483,9 @@
418 }
419
420 void
421-dbusmenu_collector_execute (DbusmenuCollector * collector, const gchar * dbus_addr, const gchar * dbus_path, gint id, guint timestamp)
422+menuitem_collector_execute (MenuitemCollector * collector, const gchar * dbus_addr, const gchar * dbus_path, gint id, guint timestamp)
423 {
424- g_return_if_fail(IS_DBUSMENU_COLLECTOR(collector));
425+ g_return_if_fail(IS_MENUITEM_COLLECTOR(collector));
426
427 menu_key_t search_key = {
428 sender: (gchar *)dbus_addr,
429@@ -517,14 +517,14 @@
430 }
431
432 guint
433-dbusmenu_collector_found_get_distance (DbusmenuCollectorFound * found)
434+menuitem_collector_found_get_distance (MenuitemCollectorFound * found)
435 {
436 g_return_val_if_fail(found != NULL, G_MAXUINT);
437 return found->distance;
438 }
439
440 void
441-dbusmenu_collector_found_set_distance (DbusmenuCollectorFound * found, guint distance)
442+menuitem_collector_found_set_distance (MenuitemCollectorFound * found, guint distance)
443 {
444 g_return_if_fail(found != NULL);
445 found->distance = distance;
446@@ -532,31 +532,31 @@
447 }
448
449 const gchar *
450-dbusmenu_collector_found_get_display (DbusmenuCollectorFound * found)
451+menuitem_collector_found_get_display (MenuitemCollectorFound * found)
452 {
453 g_return_val_if_fail(found != NULL, NULL);
454 return found->display_string;
455 }
456
457 const gchar *
458-dbusmenu_collector_found_get_db (DbusmenuCollectorFound * found)
459+menuitem_collector_found_get_db (MenuitemCollectorFound * found)
460 {
461 g_return_val_if_fail(found != NULL, NULL);
462 return found->db_string;
463 }
464
465 void
466-dbusmenu_collector_found_list_free (GList * found_list)
467+menuitem_collector_found_list_free (GList * found_list)
468 {
469- g_list_free_full(found_list, (GDestroyNotify)dbusmenu_collector_found_free);
470+ g_list_free_full(found_list, (GDestroyNotify)menuitem_collector_found_free);
471 return;
472 }
473
474-static DbusmenuCollectorFound *
475-dbusmenu_collector_found_new (DbusmenuClient * client, DbusmenuMenuitem * item, GStrv strings, guint distance, GStrv usedstrings, const gchar * indicator_name)
476+static MenuitemCollectorFound *
477+menuitem_collector_found_new (DbusmenuClient * client, DbusmenuMenuitem * item, GStrv strings, guint distance, GStrv usedstrings, const gchar * indicator_name)
478 {
479 // g_debug("New Found: '%s', %d, '%s'", string, distance, indicator_name);
480- DbusmenuCollectorFound * found = g_new0(DbusmenuCollectorFound, 1);
481+ MenuitemCollectorFound * found = g_new0(MenuitemCollectorFound, 1);
482
483 g_object_get(client,
484 DBUSMENU_CLIENT_PROP_DBUS_NAME, &found->dbus_addr,
485@@ -631,7 +631,7 @@
486 }
487
488 void
489-dbusmenu_collector_found_free (DbusmenuCollectorFound * found)
490+menuitem_collector_found_free (MenuitemCollectorFound * found)
491 {
492 g_return_if_fail(found != NULL);
493 g_free(found->dbus_addr);
494@@ -646,7 +646,7 @@
495 }
496
497 const gchar *
498-dbusmenu_collector_found_get_indicator (DbusmenuCollectorFound * found)
499+menuitem_collector_found_get_indicator (MenuitemCollectorFound * found)
500 {
501 // g_debug("Getting indicator for found '%s', indicator: '%s'", found->display_string, found->indicator);
502 g_return_val_if_fail(found != NULL, NULL);
503@@ -654,7 +654,7 @@
504 }
505
506 void
507-dbusmenu_collector_found_set_indicator (DbusmenuCollectorFound * found, const gchar * indicator)
508+menuitem_collector_found_set_indicator (MenuitemCollectorFound * found, const gchar * indicator)
509 {
510 g_return_if_fail(found != NULL);
511 g_free(found->indicator);
512@@ -663,35 +663,35 @@
513 }
514
515 const gchar *
516-dbusmenu_collector_found_get_dbus_addr (DbusmenuCollectorFound * found)
517+menuitem_collector_found_get_dbus_addr (MenuitemCollectorFound * found)
518 {
519 g_return_val_if_fail(found != NULL, NULL);
520 return found->dbus_addr;
521 }
522
523 const gchar *
524-dbusmenu_collector_found_get_dbus_path (DbusmenuCollectorFound * found)
525+menuitem_collector_found_get_dbus_path (MenuitemCollectorFound * found)
526 {
527 g_return_val_if_fail(found != NULL, NULL);
528 return found->dbus_path;
529 }
530
531 gint
532-dbusmenu_collector_found_get_dbus_id (DbusmenuCollectorFound * found)
533+menuitem_collector_found_get_dbus_id (MenuitemCollectorFound * found)
534 {
535 g_return_val_if_fail(found != NULL, -1);
536 return found->dbus_id;
537 }
538
539 const gchar *
540-dbusmenu_collector_found_get_app_icon (DbusmenuCollectorFound * found)
541+menuitem_collector_found_get_app_icon (MenuitemCollectorFound * found)
542 {
543 g_return_val_if_fail(found != NULL, NULL);
544 return found->app_icon;
545 }
546
547 void
548-dbusmenu_collector_found_set_app_icon (DbusmenuCollectorFound * found, const gchar * app_icon)
549+menuitem_collector_found_set_app_icon (MenuitemCollectorFound * found, const gchar * app_icon)
550 {
551 g_return_if_fail(found != NULL);
552 g_free(found->app_icon);
553
554=== renamed file 'src/dbusmenu-collector.h' => 'src/menuitem-collector.h'
555--- src/dbusmenu-collector.h 2012-01-26 16:51:25 +0000
556+++ src/menuitem-collector.h 2012-01-26 16:51:25 +0000
557@@ -20,54 +20,54 @@
558 with this program. If not, see <http://www.gnu.org/licenses/>.
559 */
560
561-#ifndef __DBUSMENU_COLLECTOR_H__
562-#define __DBUSMENU_COLLECTOR_H__
563+#ifndef __MENUITEM_COLLECTOR_H__
564+#define __MENUITEM_COLLECTOR_H__
565
566 #include <glib.h>
567 #include <glib-object.h>
568
569 G_BEGIN_DECLS
570
571-#define DBUSMENU_COLLECTOR_TYPE (dbusmenu_collector_get_type ())
572-#define DBUSMENU_COLLECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUSMENU_COLLECTOR_TYPE, DbusmenuCollector))
573-#define DBUSMENU_COLLECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUSMENU_COLLECTOR_TYPE, DbusmenuCollectorClass))
574-#define IS_DBUSMENU_COLLECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUSMENU_COLLECTOR_TYPE))
575-#define IS_DBUSMENU_COLLECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_COLLECTOR_TYPE))
576-#define DBUSMENU_COLLECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_COLLECTOR_TYPE, DbusmenuCollectorClass))
577-
578-typedef struct _DbusmenuCollector DbusmenuCollector;
579-typedef struct _DbusmenuCollectorClass DbusmenuCollectorClass;
580-typedef struct _DbusmenuCollectorPrivate DbusmenuCollectorPrivate;
581-typedef struct _DbusmenuCollectorFound DbusmenuCollectorFound;
582-
583-struct _DbusmenuCollectorClass {
584+#define MENUITEM_COLLECTOR_TYPE (menuitem_collector_get_type ())
585+#define MENUITEM_COLLECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MENUITEM_COLLECTOR_TYPE, MenuitemCollector))
586+#define MENUITEM_COLLECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MENUITEM_COLLECTOR_TYPE, MenuitemCollectorClass))
587+#define IS_MENUITEM_COLLECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MENUITEM_COLLECTOR_TYPE))
588+#define IS_MENUITEM_COLLECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MENUITEM_COLLECTOR_TYPE))
589+#define MENUITEM_COLLECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MENUITEM_COLLECTOR_TYPE, MenuitemCollectorClass))
590+
591+typedef struct _MenuitemCollector MenuitemCollector;
592+typedef struct _MenuitemCollectorClass MenuitemCollectorClass;
593+typedef struct _MenuitemCollectorPrivate MenuitemCollectorPrivate;
594+typedef struct _MenuitemCollectorFound MenuitemCollectorFound;
595+
596+struct _MenuitemCollectorClass {
597 GObjectClass parent_class;
598 };
599
600-struct _DbusmenuCollector {
601+struct _MenuitemCollector {
602 GObject parent;
603
604- DbusmenuCollectorPrivate * priv;
605+ MenuitemCollectorPrivate * priv;
606 };
607
608-GType dbusmenu_collector_get_type (void);
609-DbusmenuCollector * dbusmenu_collector_new (void);
610-GList * dbusmenu_collector_search (DbusmenuCollector * collector, const gchar * dbus_addr, const gchar * dbus_path, const gchar * prefix, const gchar * search);
611-void dbusmenu_collector_execute (DbusmenuCollector * collector, const gchar * dbus_addr, const gchar * dbus_path, gint id, guint timestamp);
612+GType menuitem_collector_get_type (void);
613+MenuitemCollector * menuitem_collector_new (void);
614+GList * menuitem_collector_search (MenuitemCollector * collector, const gchar * dbus_addr, const gchar * dbus_path, const gchar * prefix, const gchar * search);
615+void menuitem_collector_execute (MenuitemCollector * collector, const gchar * dbus_addr, const gchar * dbus_path, gint id, guint timestamp);
616
617-guint dbusmenu_collector_found_get_distance (DbusmenuCollectorFound * found);
618-void dbusmenu_collector_found_set_distance (DbusmenuCollectorFound * found, guint distance);
619-const gchar * dbusmenu_collector_found_get_display (DbusmenuCollectorFound * found);
620-const gchar * dbusmenu_collector_found_get_db (DbusmenuCollectorFound * found);
621-void dbusmenu_collector_found_free (DbusmenuCollectorFound * found);
622-void dbusmenu_collector_found_list_free (GList * found_list);
623-const gchar * dbusmenu_collector_found_get_indicator (DbusmenuCollectorFound * found);
624-void dbusmenu_collector_found_set_indicator (DbusmenuCollectorFound * found, const gchar * indicator);
625-const gchar * dbusmenu_collector_found_get_dbus_addr (DbusmenuCollectorFound * found);
626-const gchar * dbusmenu_collector_found_get_dbus_path (DbusmenuCollectorFound * found);
627-gint dbusmenu_collector_found_get_dbus_id (DbusmenuCollectorFound * found);
628-const gchar * dbusmenu_collector_found_get_app_icon (DbusmenuCollectorFound * found);
629-void dbusmenu_collector_found_set_app_icon (DbusmenuCollectorFound * found, const gchar * app_icon);
630+guint menuitem_collector_found_get_distance (MenuitemCollectorFound * found);
631+void menuitem_collector_found_set_distance (MenuitemCollectorFound * found, guint distance);
632+const gchar * menuitem_collector_found_get_display (MenuitemCollectorFound * found);
633+const gchar * menuitem_collector_found_get_db (MenuitemCollectorFound * found);
634+void menuitem_collector_found_free (MenuitemCollectorFound * found);
635+void menuitem_collector_found_list_free (GList * found_list);
636+const gchar * menuitem_collector_found_get_indicator (MenuitemCollectorFound * found);
637+void menuitem_collector_found_set_indicator (MenuitemCollectorFound * found, const gchar * indicator);
638+const gchar * menuitem_collector_found_get_dbus_addr (MenuitemCollectorFound * found);
639+const gchar * menuitem_collector_found_get_dbus_path (MenuitemCollectorFound * found);
640+gint menuitem_collector_found_get_dbus_id (MenuitemCollectorFound * found);
641+const gchar * menuitem_collector_found_get_app_icon (MenuitemCollectorFound * found);
642+void menuitem_collector_found_set_app_icon (MenuitemCollectorFound * found, const gchar * app_icon);
643
644 G_END_DECLS
645

Subscribers

People subscribed via source and target branches