Awn

Merge lp:~malept/awn/0.4-libdesktop-agnostic into lp:~awn-core/awn/trunk-rewrite

Proposed by Mark Lee
Status: Merged
Approved by: Mark Lee
Approved revision: 847
Merged at revision: 1200
Proposed branch: lp:~malept/awn/0.4-libdesktop-agnostic
Merge into: lp:~awn-core/awn/trunk-rewrite
Diff against target: None lines
To merge this branch: bzr merge lp:~malept/awn/0.4-libdesktop-agnostic
Reviewer Review Type Date Requested Status
moonbeam Approve
Review via email: mp+9798@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mark Lee (malept) wrote :

84 files changed, 2253 insertions(+), 7731 deletions(-)

Revision history for this message
moonbeam (rcryderman) wrote :

ok... Huge merge. I haven't reviewed it as such. I say let's just go for it and hope for the best. Anything that breaks will get fixed.

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 2009-07-15 17:12:11 +0000
3+++ .bzrignore 2009-07-27 18:28:46 +0000
4@@ -45,7 +45,6 @@
5 libawn/*awn-enum-types.*
6 libawn/*libawnmarshal.*
7 libawn/libawn-marshal.*
8-libawn/egg/*egg-enum-types.*
9 bindings/python/awn.c
10 awn-manager/awnDefs.py
11 awn-manager/awnManager.py
12@@ -77,11 +76,11 @@
13 doc/reference/tmpl/*.sgml
14 doc/reference/tmpl/*.sgml.bak
15 doc/reference/*-scan.c
16-data/awn.schemas*
17+data/avant-window-navigator.schemas*
18 config.h.in
19 test/vala-test
20 awn-manager/awn-launcher-editor
21-data/awn.schema-ini
22+data/avant-window-navigator.schema-ini
23 src/awn
24 src/awn-app-glue.h
25 src/awn-panel-glue.h
26@@ -93,8 +92,7 @@
27 tests/test-themed-icon
28 tests/test-awn-icon-box
29 ./tests/test-taskmanager
30-applets/taskmanager/taskmanager.schemas
31-applets/taskmanager/taskmanager.schemas.in
32+applets/taskmanager/awn-applet-taskmanager.schemas*
33 tests/test-awn-effects
34 awn-manager/awnManagerMini.py
35 m4/gtk-doc.m4
36
37=== modified file 'ChangeLog'
38--- ChangeLog 2009-08-06 06:57:04 +0000
39+++ ChangeLog 2009-08-06 20:35:34 +0000
40@@ -1,3 +1,27 @@
41+2009-08-06 Mark Lee <avant-wn@lazymalevolence.com>
42+
43+ * bindings/python/Makefile.am:
44+ * bindings/python/awn.defs:
45+ * bindings/python/awn.override:
46+ * configure.in:
47+ Add/fix Python bindings with regards to functions which depend on the
48+ libdesktop-agnostic Python bindings.
49+
50+2009-08-06 Mark Lee <avant-wn@lazymalevolence.com>
51+
52+ * applets/taskmanager/task-launcher.c:
53+ * applets/taskmanager/task-manager.c:
54+ * applets/taskmanager/util.c:
55+ * applets/taskmanager/util.h:
56+ * awn-applet-activation/main.c:
57+ Update due to naming changes in the libdesktop-agnostic desktop
58+ entry API.
59+
60+2009-08-06 Mark Lee <avant-wn@lazymalevolence.com>
61+
62+ * applets/taskmanager/task-settings.c (cfg_load_int):
63+ Update due to a change in the libdesktop-agnostic config API.
64+
65 2009-08-06 Michal Hruby <michal.mhr@gmail.com>
66
67 * libawn/awn-cairo-utils.c:
68@@ -25,6 +49,23 @@
69 On TaskIcon click... Better to check if active (and then do a minimize)
70 first instead of checking if minimized (and then do a restore).
71
72+2009-08-05 Mark Lee <avant-wn@lazymalevolence.com>
73+
74+ * Makefile.schemas:
75+ * configure.in:
76+ * data/Makefile.am:
77+ * data/awn-schema-to-gconf (removed):
78+ * debian/awn-settings-trunk.install:
79+ * debian/control:
80+ Replace awn-schema-to-gconf with the equivalent program packaged
81+ with libdesktop-agnostic.
82+
83+2009-08-04 Mark Lee <avant-wn@lazymalevolence.com>
84+
85+ * applets/taskmanager/task-manager.c:
86+ Convert the launcher_paths member to a GValueArray, to avoid
87+ converting to and from GSList.
88+
89 2009-08-04 Rodney Cryderman <rcryderman@gmail.com>
90
91 * applets/taskmanager/task-icon.c:
92@@ -374,6 +415,13 @@
93 Close dialog on icon click if it is open.
94 Add some comments to the clicked signal handler.
95
96+2009-07-27 Mark Lee <avant-wn@lazymalevolence.com>
97+
98+ * doc/reference/libawn-docs.sgml:
99+ Add the awn-config page to the documentation.
100+ * libawn/awn-config.c:
101+ Fix the gtk-doc documentation.
102+
103 2009-07-27 Rodney Cryderman <rcryderman@gmail.com>
104
105 * applets/taskmanager/task-icon.c:
106@@ -525,6 +573,11 @@
107 Looks for a desktop file to associate with windows that are not
108 already associated with a TaskLauncher.
109
110+2009-07-24 Mark Lee <avant-wn@lazymalevolence.com>
111+
112+ * libawn/awn-dialog.c (awn_dialog_constructed):
113+ Fix typo.
114+
115 2009-07-24 Michal Hruby <michal.mhr@gmail.com>
116
117 * awn-settings/awn-settings.xml:
118@@ -641,6 +694,11 @@
119 * applets/taskmanager/task-launcher.c:
120 Small style cleanup.
121
122+2009-07-21 Mark Lee <avant-wn@lazymalevolence.com>
123+
124+ * libawn/awn-utils.h (awn_utils_gslist_to_gvaluearray):
125+ Fix gtk-doc.
126+
127 2009-07-21 Michal Hruby <michal.mhr@gmail.com>
128
129 * data/awn.schema-ini.in:
130@@ -657,6 +715,29 @@
131
132 2009-07-20 Mark Lee <avant-wn@lazymalevolence.com>
133
134+ * libawn/awn-overlay-text.c (awn_overlay_text_constructed,
135+ awn_overlay_text_class_init):
136+ * libawn/awn-tooltip.c (awn_tooltip_get_property,
137+ awn_tooltip_set_property, awn_tooltip_finalize,
138+ awn_tooltip_class_init, ensure_tooltip, awn_tooltip_set_font_color,
139+ awn_tooltip_set_background_color):
140+ * libawn/awn-tooltip.h:
141+ Fix/convert color-related code.
142+
143+2009-07-20 Mark Lee <avant-wn@lazymalevolence.com>
144+
145+ * src/awn-applet-manager.c (awn_applet_manager_constructed,
146+ set_list_property, awn_applet_manager_set_property):
147+ Fix typo.
148+ Fix setting list properties.
149+
150+2009-07-20 Mark Lee <avant-wn@lazymalevolence.com>
151+
152+ * applets/taskmanager/awn-applet-taskmanager.schema-ini:
153+ Fix schema type names.
154+
155+2009-07-20 Mark Lee <avant-wn@lazymalevolence.com>
156+
157 * applets/taskmanager/taskmanager.schema-ini:
158 Fix the match_strength default so that it's a valid value.
159
160@@ -687,6 +768,29 @@
161 * src/awn-monitor.c:
162 Auto-config when using multiple monitors now really works.
163
164+2009-07-18 Mark Lee <avant-wn@lazymalevolence.com>
165+
166+ * src/awn-applet-manager.c (awn_applet_manager_get_property,
167+ awn_applet_manager_set_property, awn_applet_manager_class_init):
168+ * src/awn-background.c (awn_background_set_property,
169+ awn_background_class_init):
170+ * src/awn-monitor.c (awn_monitor_get_property,
171+ awn_monitor_set_property, awn_monitor_class_init):
172+ * src/awn-panel.c (awn_panel_get_property, awn_panel_set_property,
173+ awn_panel_class_init):
174+ Fix property types.
175+
176+2009-07-18 Mark Lee <avant-wn@lazymalevolence.com>
177+
178+ * libawn/awn-utils.h:
179+ Fix gtk-doc.
180+
181+2009-07-18 Mark Lee <avant-wn@lazymalevolence.com>
182+
183+ * applets/taskmanager/task-launcher.c:
184+ * awn-applet-activation/main.c:
185+ Update due to the VFS API change in libdesktop-agnostic.
186+
187 2009-07-17 Mark Lee <avant-wn@lazymalevolence.com>
188
189 * Makefile.marshal:
190@@ -704,6 +808,20 @@
191 * doc/reference/libawn.types:
192 Update the doc templates.
193
194+2009-07-17 Mark Lee <avant-wn@lazymalevolence.com>
195+
196+ * doc/reference/libawn-sections.txt:
197+ * libawn/awn-utils.c (awn_utils_ensure_transparent_bg,
198+ awn_utils_gslist_to_gvaluearray):
199+ * libawn/awn-utils.h:
200+ Add awn_utils_gslist_to_gvaluearray(), to make converting between the two
201+ structures easier.
202+ * src/awn-applet-manager.c (awn_applet_manager_get_property,
203+ awn_ua_add_applet):
204+ Convert to use the new function.
205+ * src/awn-ua-alignment.c (awn_ua_alignment_plug_removed):
206+ Convert to use the libdesktop-agnostic API.
207+
208 2009-07-17 Rodney Cryderman <rcryderman@gmail.com>
209
210 * src/awn-ua-alignment.c:
211@@ -771,6 +889,26 @@
212 Improved the task matching. Please test with a match strength
213 of 99. Especially interested in false positives.
214
215+2009-07-15 Mark Lee <avant-wn@lazymalevolence.com>
216+
217+ * applets/taskmanager/task-icon.c (task_icon_dest_drag_data_received):
218+ * awn-applet-activation/main.c (main):
219+ * libawn/awn-utils.c (awn_vfs_init):
220+ * src/awn-main.c (main):
221+ Update to use the new libdesktop-agnostic VFS convenience API.
222+
223+2009-07-15 Mark Lee <avant-wn@lazymalevolence.com>
224+
225+ * applets/taskmanager/task-icon.c (task_icon_dispose,
226+ task_icon_finalize, do_bind_property,
227+ task_icon_constructed):
228+ Convert to use the libdesktop-agnostic config API.
229+
230+2009-07-15 Mark Lee <avant-wn@lazymalevolence.com>
231+
232+ * data/avant-window-navigator.schema-ini.in:
233+ Fix keys that should be labeled as colors.
234+
235 2009-07-15 Rodney Cryderman <rcryderman@gmail.com>
236
237 * applets/taskmanager/task-icon.c:
238@@ -799,6 +937,19 @@
239 * applets/taskmanager/task-icon.c:
240 awn_icon_set_indicator_count() deals with values >3 intelligently.
241
242+2009-07-14 Mark Lee <avant-wn@lazymalevolence.com>
243+
244+ * libawn/awn-label.c (do_bind_property, awn_label_constructed,
245+ awn_label_get_property, awn_label_set_property,
246+ awn_label_class_init):
247+ Convert to use the libdesktop-agnostic config API.
248+
249+2009-07-14 Mark Lee <avant-wn@lazymalevolence.com>
250+
251+ * bindings/python/awnmodule.c:
252+ * src/awn-main.c (main):
253+ Remove obsolete usage of preprocessor variable.
254+
255 2009-07-14 Rodney Cryderman <rcryderman@gmail.com>
256
257 * applets/taskmanager/task-icon.c:
258@@ -887,6 +1038,39 @@
259 * bindings/python/Makefile.am:
260 Shave-ify the Python bindings generator command.
261
262+2009-07-13 Mark Lee <avant-wn@lazymalevolence.com>
263+
264+ * applets/taskmanager/task-manager.c (task_manager_class_init,
265+ task_manager_size_changed, task_manager_dispose):
266+ * libawn/awn-dialog.c (awn_dialog_set_property, awn_dialog_finalize):
267+ * libawn/awn-icon.c (awn_icon_set_property, awn_icon_dispose):
268+ * libawn/awn-overlay-text.c (awn_overlay_text_set_property,
269+ awn_overlay_text_dispose):
270+ * libawn/awn-tooltip.c (awn_tooltip_set_property, awn_tooltip_dispose):
271+ * src/awn-applet-manager.c (awn_applet_manager_dispose):
272+ * src/awn-background.c (awn_background_finalize):
273+ * src/awn-monitor.c (awn_monitor_dispose, awn_monitor_class_init):
274+ * src/awn-panel.c (awn_panel_dispose):
275+ Clean up the config key <-> property bindings when the object is garbage
276+ collected.
277+
278+2009-07-13 Mark Lee <avant-wn@lazymalevolence.com>
279+
280+ * applets/taskmanager/task-icon.c:
281+ * applets/taskmanager/task-launcher.c:
282+ * awn-applet-activation/main.c:
283+ * libawn/awn-config.h:
284+ * libawn/awn-utils.c:
285+ * src/awn-main.c:
286+ * src/awn-monitor.h:
287+ * src/awn-panel.h:
288+ Update #includes due to libdesktop-agnostic changes.
289+
290+2009-07-12 Mark Lee <avant-wn@lazymalevolence.com>
291+
292+ * libawn/awn-defines.h (AWN_PANEL_ID_DEFAULT):
293+ Fix gtk-doc.
294+
295 2009-07-12 Rodney Cryderman <rcryderman@gmail.com>
296
297 * libawn/awn-themed-icon.c:
298@@ -1003,6 +1187,11 @@
299 awn-applet-activation -> awn-applet.
300 Attempt to rename the process was removed.
301
302+2009-07-08 Mark Lee <avant-wn@lazymalevolence.com>
303+
304+ * libawn/awn-config.c:
305+ Handle single-instance applets when the mode is denoted in the UID.
306+
307 2009-07-08 Michal Hruby <michal.mhr@gmail.com>
308
309 * libawn/awn-applet.c:
310@@ -1017,6 +1206,26 @@
311 A couple of changes to get proper shape mask support.
312 Started the workaround for D&D deadzone.
313
314+2009-07-08 Mark Lee <avant-wn@lazymalevolence.com>
315+
316+ * data/avant-window-navigator.schema-ini.in:
317+ Fix shared config option types.
318+
319+2009-07-07 Mark Lee <avant-wn@lazymalevolence.com>
320+
321+ * awn.pc.in:
322+ Remove obsolete variable from pkgconfig file.
323+
324+2009-07-07 Mark Lee <avant-wn@lazymalevolence.com>
325+
326+ * applets/taskmanager/task-settings.c (cfg_notify_int):
327+ Update due to API change in libdesktop-agnostic.
328+
329+2009-07-06 Mark Lee <avant-wn@lazymalevolence.com>
330+
331+ * applets/taskmanager/task-manager.c:
332+ Launchers work again.
333+
334 2009-07-06 Mark Lee <avant-wn@lazymalevolence.com>
335
336 * doc/reference/libawn-sections.txt:
337@@ -1033,6 +1242,24 @@
338
339 2009-07-06 Mark Lee <avant-wn@lazymalevolence.com>
340
341+ * data/awn-schema-to-gconf (main):
342+ The third argument is now mandatory.
343+ Applets are no longer nested in the avant-window-navigator directory.
344+
345+2009-07-06 Mark Lee <avant-wn@lazymalevolence.com>
346+
347+ * Makefile.marshal:
348+ * Makefile.schemas:
349+ * Makefile.shave:
350+ * applets/taskmanager/Makefile.am:
351+ * data/Makefile.am:
352+ * src/Makefile.am:
353+ Modularize the shave-related variables into its own Makefile.
354+ Modularize the schema-related variables/rules into its own Makefile.
355+ Use shave when generating the GConf schemas.
356+
357+2009-07-06 Mark Lee <avant-wn@lazymalevolence.com>
358+
359 * .bzrignore:
360 * data/Makefile.am:
361 * data/awn.schema-ini.in:
362@@ -1041,6 +1268,24 @@
363
364 2009-07-06 Mark Lee <avant-wn@lazymalevolence.com>
365
366+ * data/awn-schema-to-gconf:
367+ Make sure types are converted properly.
368+
369+2009-07-06 Mark Lee <avant-wn@lazymalevolence.com>
370+
371+ * data/avant-window-navigator.schema-ini.in:
372+ Fix types.
373+
374+2009-07-06 Mark Lee <avant-wn@lazymalevolence.com>
375+
376+ * applets/taskmanager/Makefile.am:
377+ * configure.in:
378+ * data/Makefile.am:
379+ Only install the schema files if requested.
380+ Make the schema config conversion rule more generic.
381+
382+2009-07-06 Mark Lee <avant-wn@lazymalevolence.com>
383+
384 * applets/expander/Makefile.am:
385 Remove unnecessary linking.
386
387@@ -1102,6 +1347,29 @@
388 * tests/test-effects.py:
389 Various fixes.
390
391+2009-07-05 Mark Lee <avant-wn@lazymalevolence.com>
392+
393+ * .bzrignore:
394+ * applets/taskmanager/Makefile.am:
395+ * applets/taskmanager/awn-applet-taskmanager.schema-ini:
396+ Rename schema file.
397+ * applets/taskmanager/task-manager.c (task_manager_get_property,
398+ task_manager_set_property, task_manager_constructed):
399+ Continue converting taskmanager to use the libdesktop-agnostic config
400+ API.
401+
402+2009-07-04 Mark Lee <avant-wn@lazymalevolence.com>
403+
404+ * libawn/awn-config.c (awn_config_get_default,
405+ awn_config_get_default_for_applet,
406+ awn_config_get_default_for_applet_by_info):
407+ Implement the convenience methods for creating applet config objects.
408+ Fix potential crasher.
409+
410+2009-07-04 Mark Lee <avant-wn@lazymalevolence.com>
411+
412+ * libawn/awn-dialog.c:
413+ Convert color properties to be of type DesktopAgnosticColor*.
414 2009-07-04 Mark Lee <avant-wn@lazymalevolence.com>
415
416 * applets/taskmanager/task-item.c (task_item_init):
417@@ -1113,6 +1381,88 @@
418 Fix typo.
419 Make sure taskmanager defines the canonical-name property.
420
421+2009-07-04 Mark Lee <avant-wn@lazymalevolence.com>
422+
423+ * libawn/awn-config.c:
424+ * libawn/awn-config.h:
425+ Added.
426+
427+ * libawn/awn-config-bridge.c:
428+ * libawn/awn-config-bridge.h:
429+ * libawn/awn-config-client-gconf.c:
430+ * libawn/awn-config-client-gkeyfile.c:
431+ * libawn/awn-config-client-shared.c:
432+ * libawn/awn-config-client.h:
433+ * tests/test-config-client.c:
434+ * tests/test-config-client.py:
435+ Removed.
436+
437+ * bindings/python/awn.defs:
438+ * bindings/python/awn.override:
439+ Remove bindings.
440+
441+ * data/Makefile.am:
442+ * data/avant-window-navigator.schema-ini.in:
443+ Rename schema files.
444+
445+ * doc/reference/libawn-docs.sgml:
446+ * doc/reference/libawn-sections.txt:
447+ * doc/reference/libawn.types:
448+ Update documentation templates.
449+
450+ * libawn/awn-defines.h (AWN_PANEL_ID_DEFAULT):
451+ Add default panel ID constant.
452+
453+ * .bzrignore:
454+ * applets/taskmanager/Makefile.am:
455+ * applets/taskmanager/task-manager.c (task_manager_constructed,
456+ _drag_source_end):
457+ * applets/taskmanager/task-settings.c (cfg_notify_int, cfg_load_int,
458+ task_settings_get_default):
459+ * configure.in:
460+ * libawn/Makefile.am:
461+ * libawn/awn-dialog.c (awn_dialog_constructed, awn_dialog_get_property,
462+ awn_dialog_set_property, awn_dialog_finalize):
463+ * libawn/awn-effects.c:
464+ * libawn/awn-effects.h:
465+ * libawn/awn-icon.c (awn_icon_constructed, awn_icon_set_property,
466+ awn_icon_dispose):
467+ * libawn/awn-overlay-text.c (awn_overlay_text_set_property,
468+ awn_overlay_text_dispose, awn_overlay_text_init):
469+ * libawn/awn-tooltip.c (awn_tooltip_constructed, awn_tooltip_set_property,
470+ awn_tooltip_init):
471+ * libawn/libawn.h:
472+ * src/awn-app.c (awn_app_finalize, awn_app_init):
473+ * src/awn-applet-manager.c (awn_applet_manager_constructed,
474+ awn_applet_manager_get_property, awn_applet_manager_set_property,
475+ awn_applet_manager_class_init, awn_applet_manager_new_from_config,
476+ free_list):
477+ * src/awn-applet-manager.h:
478+ * src/awn-applet-proxy.h:
479+ * src/awn-background-3d.c (awn_background_3d_new):
480+ * src/awn-background-3d.h:
481+ * src/awn-background-curves.c (awn_background_curves_new):
482+ * src/awn-background-curves.h:
483+ * src/awn-background-edgy.c (awn_background_edgy_new):
484+ * src/awn-background-edgy.h:
485+ * src/awn-background-flat.c (awn_background_flat_new):
486+ * src/awn-background-flat.h:
487+ * src/awn-background.c (awn_background_constructed,
488+ awn_background_get_property, awn_background_set_property,
489+ awn_background_class_init, set_cfg_from_theme,
490+ load_colours_from_widget):
491+ * src/awn-background.h:
492+ * src/awn-monitor.c (awn_monitor_constructed, awn_monitor_class_init,
493+ awn_monitor_new_from_config):
494+ * src/awn-monitor.h (geometry_changed):
495+ * src/awn-panel.c (awn_panel_constructed, awn_panel_class_init,
496+ awn_panel_new_from_config):
497+ * src/awn-panel.h:
498+ * tests/Makefile.am:
499+ The first part of converting Awn to use the libdesktop-agnostic
500+ configuration API. The applet convenience methods still need to be
501+ implemented.
502+
503 2009-07-04 Michal Hruby <michal.mhr@gmail.com>
504
505 * libawn/awn-dialog.c:
506@@ -1341,6 +1691,14 @@
507 * doc/reference/libawn-sections.txt:
508 Update the gtk-doc generated sections file.
509
510+2009-06-27 Mark Lee <avant-wn@lazymalevolence.com>
511+
512+ * doc/reference/libawn-sections.txt:
513+ * libawn/awn-cairo-utils.c:
514+ * libawn/awn-cairo-utils.h:
515+ Update the cairo color convenience functions to use the libdesktop-agnostic
516+ cairo color convenience API.
517+
518 2009-06-27 Julien Lavergne <julien.lavergne@gmail.com>
519
520 * awn-settings/awn-settings.xml:
521@@ -1826,6 +2184,18 @@
522
523 2009-06-19 Mark Lee <avant-wn@lazymalevolence.com>
524
525+ * .bzrignore:
526+ * configure.in:
527+ * doc/reference/Makefile.am:
528+ Remove remnants of the old libawn/egg directory.
529+
530+2009-06-19 Mark Lee <avant-wn@lazymalevolence.com>
531+
532+ * applets/taskmanager/task-launcher.c:
533+ Remove unused variable.
534+
535+2009-06-19 Mark Lee <avant-wn@lazymalevolence.com>
536+
537 * bindings/python/awn.override:
538 * libawn/libawn.h:
539 Clean up headers.
540@@ -2524,6 +2894,11 @@
541
542 2009-06-07 Mark Lee <avant-wn@lazymalevolence.com>
543
544+ * awn-applet-activation/main.c:
545+ Fix typo.
546+
547+2009-06-07 Mark Lee <avant-wn@lazymalevolence.com>
548+
549 * doc/reference/libawn-docs.sgml:
550 Update/reorganize the table of contents.
551
552@@ -2554,6 +2929,12 @@
553
554 2009-06-07 Mark Lee <avant-wn@lazymalevolence.com>
555
556+ * doc/reference/libawn-sections.txt:
557+ * doc/reference/libawn.types:
558+ Update, given the libdesktop-agnostic-related changes.
559+
560+2009-06-07 Mark Lee <avant-wn@lazymalevolence.com>
561+
562 * doc/reference/tmpl/awn-applet-dialog.sgml:
563 * doc/reference/tmpl/awn-applet-simple.sgml:
564 * doc/reference/tmpl/awn-applet.sgml:
565@@ -2867,6 +3248,13 @@
566 * libawn/awn-dialog.c:
567 Fix issue with titlebar spacing.
568
569+2009-05-30 Mark Lee <avant-wn@lazymalevolence.com>
570+
571+ * applets/taskmanager/task-launcher.c:
572+ * awn-applet-activation/main.c:
573+ * libawn/awn-config-client-gkeyfile.c:
574+ Use the updated libdesktop-agnostic API.
575+
576 2009-05-30 Michal Hruby <michal.mhr@gmail.com>
577
578 * libawn/awn-cairo-utils.c:
579@@ -2914,6 +3302,29 @@
580
581 2009-05-22 Mark Lee <avant-wn@lazymalevolence.com>
582
583+ * bindings/python/awn.defs:
584+ * libawn/awn-utils.c:
585+ * libawn/awn-utils.h:
586+ Re-add awn_vfs_init () until one can access libdesktop-agnostic
587+ from Python.
588+
589+2009-05-22 Mark Lee <avant-wn@lazymalevolence.com>
590+
591+ * applets/taskmanager/task-launcher.c:
592+ * awn-applet-activation/main.c:
593+ * bindings/python/awn.defs:
594+ * bindings/python/awn.override:
595+ * configure.in:
596+ * libawn/Makefile.am:
597+ * libawn/awn-desktop-item.h:
598+ * libawn/awn-desktop-item-egg.c:
599+ * libawn/egg/:
600+ * libawn/libawn.h:
601+ Replace AwnDesktopItem/EggDesktopFile with the equivalent API in
602+ libdesktop-agnostic.
603+
604+2009-05-22 Mark Lee <avant-wn@lazymalevolence.com>
605+
606 * INSTALL:
607 Update.
608
609@@ -2940,6 +3351,18 @@
610
611 2009-05-12 Mark Lee <avant-wn@lazymalevolence.com>
612
613+ * libawn/awn-vfs.c:
614+ * libawn/awn-vfs.h:
615+ Removed (obsoleted by libdesktop-agnostic).
616+
617+ * bindings/python/awn.override:
618+ * configure.in:
619+ * libawn/Makefile.am:
620+ * libawn/libawn.h:
621+ Remove references of the removed files and their dependencies.
622+
623+2009-05-12 Mark Lee <avant-wn@lazymalevolence.com>
624+
625 * src/awn-background.c:
626 Fix the default values of the color properties to use the
627 libdesktop-agnostic syntax.
628@@ -3003,6 +3426,25 @@
629 2009-04-25 Mark Lee <avant-wn@lazymalevolence.com>
630
631 * applets/taskmanager/task-icon.c:
632+ * awn-applet-activation/main.c:
633+ * libawn/awn-cairo-utils.h:
634+ * libawn/awn-config-client-gkeyfile.c:
635+ * libawn/awn-dialog.c:
636+ * libawn/awn-tooltip.c:
637+ * src/awn-background.c:
638+ * src/awn-background.h:
639+ * src/awn-main.c:
640+ The libdesktop-agnostic headers have been consolidated into a single
641+ header; use that instead.
642+
643+2009-04-25 Mark Lee <avant-wn@lazymalevolence.com>
644+
645+ * debian/control:
646+ Add libdesktop-agnostic dependencies.
647+
648+2009-04-25 Mark Lee <avant-wn@lazymalevolence.com>
649+
650+ * applets/taskmanager/task-icon.c:
651 * libawn/Makefile.am:
652 * libawn/awn-applet.c:
653 * libawn/awn-dialog.c:
654@@ -3020,6 +3462,28 @@
655 * libawn/awn-cairo-utils.c:
656 Fix variable shadowing errors.
657
658+2009-04-21 Mark Lee <avant-wn@lazymalevolence.com>
659+
660+ * libawn/awn-config-client-gkeyfile.c:
661+ Convert to use the libdesktop-agnostic VFS implementation. Only tested
662+ to see if it compiled correctly.
663+
664+2009-04-21 Mark Lee <avant-wn@lazymalevolence.com>
665+
666+ * src/awn-main.c:
667+ Convert to use the libdesktop-agnostic VFS implementation (currently
668+ used only if the gkeyfile config backend is used).
669+
670+2009-04-21 Mark Lee <avant-wn@lazymalevolence.com>
671+
672+ * applets/taskmanager/task-icon.c:
673+ Convert to use the libdesktop-agnostic VFS implementation.
674+
675+2009-04-21 Mark Lee <avant-wn@lazymalevolence.com>
676+
677+ * awn-applet-activation/main.c:
678+ Convert to use the libdesktop-agnostic VFS implementation.
679+
680 2009-04-20 Mark Lee <avant-wn@lazymalevolence.com>
681
682 reviewed by: R. Cryderman <rcryderman@gmail.com>
683@@ -5021,7 +5485,6 @@
684 * libawn/awn-icons.h:
685 Added awn_icons_get_icon_at_height() to awn-icons.
686
687->>>>>>> MERGE-SOURCE
688 2008-07-13 Rodney Cryderman <rcryderman@gmail.com>
689
690 * libawn/awn-icons.c:
691
692=== added file 'Makefile.schemas'
693--- Makefile.schemas 1970-01-01 00:00:00 +0000
694+++ Makefile.schemas 2009-08-05 07:18:27 +0000
695@@ -0,0 +1,25 @@
696+# requires Makefile.shave
697+
698+# Usage
699+# -----
700+# 1. Set the schema_DATA variable to the schema-ini file(s) to install.
701+# 2. Add install-gconf-schemas to the install-data-local rule dependencies.
702+
703+if GCONF_SCHEMAS_INSTALL
704+schemasdir = @GCONF_SCHEMA_FILE_DIR@
705+schemas_in_files = $(schema_DATA:.schema-ini=.schemas.in)
706+schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
707+
708+%.schemas.in: %.schema-ini
709+ $(QUIET_GEN)$(LDA_BINDIR)/lda-schema-to-gconf $< $@
710+
711+@INTLTOOL_SCHEMAS_RULE@
712+
713+install-gconf-schemas: $(schemas_DATA)
714+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schemas_DATA)
715+else
716+install-gconf-schemas:
717+endif
718+
719+schemadir = $(pkgdatadir)/schemas
720+# vim: set ft=automake noet ts=8 sts=8 sw=8 :
721
722=== added file 'Makefile.shave'
723--- Makefile.shave 1970-01-01 00:00:00 +0000
724+++ Makefile.shave 2009-07-06 23:38:20 +0000
725@@ -0,0 +1,4 @@
726+# shave-related
727+V = @
728+Q = $(V:1=)
729+QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
730
731=== removed file 'Makefile.shave'
732--- Makefile.shave 2009-07-18 07:00:32 +0000
733+++ Makefile.shave 1970-01-01 00:00:00 +0000
734@@ -1,4 +0,0 @@
735-# shave-related
736-V = @
737-Q = $(V:1=)
738-QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
739
740=== modified file 'applets/taskmanager/Makefile.am'
741--- applets/taskmanager/Makefile.am 2009-07-28 01:24:31 +0000
742+++ applets/taskmanager/Makefile.am 2009-07-31 18:34:39 +0000
743@@ -1,6 +1,7 @@
744 include $(top_srcdir)/Makefile.shave
745 MARSHAL_PREFIX = taskmanager
746 include $(top_srcdir)/Makefile.marshal
747+include $(top_srcdir)/Makefile.schemas
748
749 AM_CPPFLAGS = \
750 $(STANDARD_CPPFLAGS) \
751@@ -58,27 +59,7 @@
752 desktop_DATA = taskmanager.desktop
753 @INTLTOOL_DESKTOP_RULE@
754
755-if USE_GCONF
756-schemasdir = @GCONF_SCHEMA_FILE_DIR@
757-schemas_in_files = taskmanager.schemas.in
758-schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
759-
760-taskmanager.schemas.in: taskmanager.schema-ini
761- $(top_srcdir)/data/awn-schema-to-gconf $< $@ "taskmanager"
762-
763-@INTLTOOL_SCHEMAS_RULE@
764-
765-if GCONF_SCHEMAS_INSTALL
766-install-gconf-schemas: $(schemas_DATA)
767- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schemas_DATA)
768-else
769-install-gconf-schemas:
770-endif
771-else
772-install-gconf-schemas:
773-endif
774-schemadir = $(pkgdatadir)/schemas
775-schema_DATA = taskmanager.schema-ini
776+schema_DATA = awn-applet-taskmanager.schema-ini
777
778 install-data-local: install-gconf-schemas
779
780@@ -89,4 +70,4 @@
781 $(NULL)
782
783 EXTRA_DIST = $(desktop_DATA).in.in $(schema_DATA)
784-CLEANFILES = $(desktop_DATA) $(shemas_in_files) $(schemas_DATA) $(BUILT_SOURCES)
785+CLEANFILES = $(desktop_DATA) $(schemas_in_files) $(schemas_DATA) $(BUILT_SOURCES)
786
787=== renamed file 'applets/taskmanager/taskmanager.schema-ini' => 'applets/taskmanager/awn-applet-taskmanager.schema-ini'
788--- applets/taskmanager/taskmanager.schema-ini 2009-08-03 04:06:27 +0000
789+++ applets/taskmanager/awn-applet-taskmanager.schema-ini 2009-08-05 04:06:09 +0000
790@@ -1,10 +1,18 @@
791+# Task Manager configuration schema
792+# ---------------------------------
793+
794+# schema metadata
795+[DEFAULT]
796+single_instance = false
797+
798+# configuration options
799 [DEFAULT/only_show_launchers]
800-type = bool
801+type = boolean
802 default = false
803 description = Only show and manager launcher windows
804
805 [DEFAULT/show_all_windows]
806-type = bool
807+type = boolean
808 default = true
809 description = Show windows from all workspaces
810
811@@ -14,31 +22,33 @@
812 description = a list of paths to .desktop files from which the taskmanager should create it's launchers
813
814 [DEFAULT/drag_and_drop]
815-type = bool
816+type = boolean
817 default = true
818 description = Enable reordering of windows by drag and drop
819
820 [DEFAULT/grouping]
821-type = bool
822+type = boolean
823 default = true
824 description = Enabling group of tasks.
825
826 [DEFAULT/match_strength]
827-type = int
828+type = integer
829 default = 99
830 description = How radical matching is applied for grouping items. The value should be between 0 and 99. 0 is as good as no grouping. 99 will match almost everything.
831
832 [DEFAULT/max_indicators]
833-type = int
834+type = integer
835 default = 3
836 description = Maximum number of task indicators to show under icons. Valid range is 0..3.
837
838 [DEFAULT/txt_indicator_threshold]
839-type = int
840+type = integer
841 default = 4
842 description = The threshold at which text count begins to be displayed. valid range 1..
843
844 [DEFAULT/enable_long_press]
845-type = bool
846+type = boolean
847 default = true
848 description = Enable long press to open Dialog.
849+
850+# vim: set ft=dosini :
851
852=== modified file 'applets/taskmanager/task-icon.c'
853--- applets/taskmanager/task-icon.c 2009-08-06 04:16:03 +0000
854+++ applets/taskmanager/task-icon.c 2009-08-06 19:16:07 +0000
855@@ -28,6 +28,7 @@
856
857 #include <libwnck/libwnck.h>
858
859+#include <libdesktop-agnostic/vfs.h>
860 #include "libawn/gseal-transition.h"
861
862 #include "taskmanager-marshal.h"
863@@ -68,8 +69,8 @@
864 //An overlay for showing number of items
865 AwnOverlayText *overlay_text;
866
867- //A Config client
868- AwnConfigClient * client;
869+ // Config client
870+ DesktopAgnosticConfigClient *client;
871
872 GdkPixbuf *icon;
873 AwnApplet *applet;
874@@ -288,6 +289,9 @@
875 task_icon_dispose (GObject *object)
876 {
877 TaskIconPrivate *priv = TASK_ICON_GET_PRIVATE (object);
878+
879+ desktop_agnostic_config_client_unbind_all_for_object (priv->client, object,
880+ NULL);
881
882 /*this needs to be done in dispose, not finalize, due to idiosyncracies of
883 AwnDialog*/
884@@ -296,11 +300,6 @@
885 gtk_widget_destroy (priv->dialog);
886 priv->dialog = NULL;
887 }
888- if (priv->client)
889- {
890- awn_config_client_free(priv->client);
891- priv->client = NULL;
892- }
893 if (priv->overlay_text)
894 {
895 g_object_unref (priv->overlay_text);
896@@ -331,12 +330,34 @@
897 G_OBJECT_CLASS (task_icon_parent_class)->finalize (object);
898 }
899
900+static gboolean
901+do_bind_property (DesktopAgnosticConfigClient *client, const gchar *key,
902+ GObject *object, const gchar *property)
903+{
904+ GError *error = NULL;
905+
906+ desktop_agnostic_config_client_bind (client,
907+ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT,
908+ key, object, property, TRUE,
909+ DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
910+ &error);
911+ if (error)
912+ {
913+ g_warning ("Could not bind property '%s' to key '%s': %s", property, key,
914+ error->message);
915+ g_error_free (error);
916+ return FALSE;
917+ }
918+
919+ return TRUE;
920+}
921+
922 static void
923 task_icon_constructed (GObject *object)
924 {
925- AwnConfigBridge *bridge;
926 TaskIconPrivate *priv = TASK_ICON (object)->priv;
927 GtkWidget *widget = GTK_WIDGET(object);
928+ GError *error = NULL;
929
930 if ( G_OBJECT_CLASS (task_icon_parent_class)->constructed)
931 {
932@@ -355,20 +376,33 @@
933 //update geometry of icon every second.
934 priv->update_geometry_id = g_timeout_add_seconds (1, (GSourceFunc)_update_geometry, widget);
935
936- priv->client = awn_config_client_new_for_applet ("taskmanager", NULL);
937- bridge = awn_config_bridge_get_default ();
938+ priv->client = awn_config_get_default_for_applet (priv->applet, &error);
939+
940+ if (error)
941+ {
942+ g_warning ("Could not get the applet's configuration object: %s",
943+ error->message);
944+ g_error_free (error);
945+ return;
946+ }
947
948- awn_config_bridge_bind (bridge, priv->client,
949- AWN_CONFIG_CLIENT_DEFAULT_GROUP, "max_indicators",
950- object, "max_indicators");
951-
952- awn_config_bridge_bind (bridge, priv->client,
953- AWN_CONFIG_CLIENT_DEFAULT_GROUP, "txt_indicator_threshold",
954- object, "txt_indicator_threshold");
955-
956- awn_config_bridge_bind (bridge, priv->client,
957- AWN_CONFIG_CLIENT_DEFAULT_GROUP, "enable_long_press",
958- object, "enable_long_press");
959+ if (!do_bind_property (priv->client, "max_indicators", object,
960+ "max_indicators"))
961+ {
962+ return;
963+ }
964+
965+ if (!do_bind_property (priv->client, "txt_indicator_threshold", object,
966+ "txt_indicator_threshold"))
967+ {
968+ return;
969+ }
970+
971+ if (!do_bind_property (priv->client, "enable_long_press", object,
972+ "enable_long_press"))
973+ {
974+ return;
975+ }
976 }
977
978 /**
979@@ -2137,7 +2171,8 @@
980 //}
981
982 error = NULL;
983- list = awn_vfs_get_pathlist_from_string (sdata_data, &error);
984+
985+ list = desktop_agnostic_vfs_files_from_uri_list (sdata_data, &error);
986 if (error)
987 {
988 g_warning ("Unable to handle drop: %s", error->message);
989
990=== modified file 'applets/taskmanager/task-launcher.c'
991--- applets/taskmanager/task-launcher.c 2009-08-03 18:30:37 +0000
992+++ applets/taskmanager/task-launcher.c 2009-08-06 19:54:39 +0000
993@@ -27,6 +27,7 @@
994 #include <libwnck/libwnck.h>
995 #include <glib/gi18n.h>
996
997+#include <libdesktop-agnostic/fdo.h>
998 #undef G_DISABLE_SINGLE_INCLUDES
999 #include <glibtop/procargs.h>
1000 #include <glibtop/procuid.h>
1001@@ -48,13 +49,13 @@
1002
1003 struct _TaskLauncherPrivate
1004 {
1005- gchar *path;
1006- AwnDesktopItem *item;
1007+ gchar *path;
1008+ DesktopAgnosticFDODesktopEntry *entry;
1009
1010- gchar *name;
1011- gchar *exec;
1012- gchar *icon_name;
1013- gint pid;
1014+ const gchar *name;
1015+ const gchar *exec;
1016+ const gchar *icon_name;
1017+ GPid pid;
1018 glong timestamp;
1019
1020 GtkWidget *menu;
1021@@ -184,7 +185,7 @@
1022 priv = launcher->priv = TASK_LAUNCHER_GET_PRIVATE (launcher);
1023
1024 priv->path = NULL;
1025- priv->item = NULL;
1026+ priv->entry = NULL;
1027 }
1028
1029 TaskItem *
1030@@ -214,43 +215,53 @@
1031 task_launcher_set_desktop_file (TaskLauncher *launcher, const gchar *path)
1032 {
1033 TaskLauncherPrivate *priv;
1034- TaskSettings * s = task_settings_get_default ();
1035+ DesktopAgnosticVFSFile *file;
1036+ GError *error = NULL;
1037 GdkPixbuf *pixbuf;
1038- gchar * exec_key = NULL;
1039- gchar * needle = NULL;
1040
1041 g_return_if_fail (TASK_IS_LAUNCHER (launcher));
1042 priv = launcher->priv;
1043
1044 priv->path = g_strdup (path);
1045
1046- priv->item = awn_desktop_item_new (path);
1047-
1048- if (priv->item == NULL)
1049- return;
1050-
1051- priv->special_id = get_special_id_from_desktop(priv->item);
1052- priv->name = awn_desktop_item_get_name (priv->item);
1053-
1054- exec_key = g_strstrip (awn_desktop_item_get_exec (priv->item) );
1055+ file = desktop_agnostic_vfs_file_new_for_path (path, &error);
1056+
1057+ if (error)
1058+ {
1059+ g_critical ("Error when trying to load the launcher: %s", error->message);
1060+ g_error_free (error);
1061+ return;
1062+ }
1063+
1064+ if (file == NULL || !desktop_agnostic_vfs_file_exists (file))
1065+ {
1066+ g_critical ("File not found: '%s'", path);
1067+ return;
1068+ }
1069+
1070+ priv->entry = desktop_agnostic_fdo_desktop_entry_new_for_file (file, &error);
1071+
1072+ if (error)
1073+ {
1074+ g_critical ("Error when trying to load the launcher: %s", error->message);
1075+ g_error_free (error);
1076+ return;
1077+ }
1078+
1079+ if (priv->entry == NULL)
1080+ {
1081+ return;
1082+ }
1083+
1084+ priv->special_id = get_special_id_from_desktop(priv->entry);
1085+ priv->name = desktop_agnostic_fdo_desktop_entry_get_name (priv->entry);
1086+
1087+ priv->exec = g_strstrip (desktop_agnostic_fdo_desktop_entry_get_string (priv->entry, "Exec"));
1088
1089- /*do we have have any % chars? if so... then find the first one ,
1090- and truncate
1091-
1092- There is an open question if we should remove any of other command line
1093- args... for now leaving things alone as long as their is no %
1094- */
1095- needle = strchr (exec_key,'%');
1096- if (needle)
1097- {
1098- *needle = '\0';
1099- g_strstrip (exec_key);
1100- }
1101- priv->exec = exec_key;
1102- priv->icon_name = awn_desktop_item_get_icon_name (priv->item);
1103+ priv->icon_name = desktop_agnostic_fdo_desktop_entry_get_icon (priv->entry);
1104
1105 task_item_emit_name_changed (TASK_ITEM (launcher), priv->name);
1106- pixbuf = awn_desktop_item_get_icon (priv->item, s->panel_size);
1107+ pixbuf = _get_icon (TASK_ITEM (launcher));
1108 task_item_emit_icon_changed (TASK_ITEM (launcher), pixbuf);
1109 g_object_unref (pixbuf);
1110 task_item_emit_visible_changed (TASK_ITEM (launcher), TRUE);
1111@@ -271,9 +282,32 @@
1112 static GdkPixbuf *
1113 _get_icon (TaskItem *item)
1114 {
1115+ TaskLauncherPrivate *priv = TASK_LAUNCHER (item)->priv;
1116 TaskSettings *s = task_settings_get_default ();
1117-
1118- return awn_desktop_item_get_icon (TASK_LAUNCHER (item)->priv->item, s->panel_size);
1119+ GError *error = NULL;
1120+ GdkPixbuf *pixbuf = NULL;
1121+
1122+ if (g_path_is_absolute (priv->icon_name))
1123+ {
1124+ pixbuf = gdk_pixbuf_new_from_file_at_scale (priv->icon_name,
1125+ s->panel_size, s->panel_size,
1126+ TRUE, &error);
1127+ }
1128+ else
1129+ {
1130+ GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
1131+
1132+ pixbuf = gtk_icon_theme_load_icon (icon_theme, priv->icon_name,
1133+ s->panel_size, 0, &error);
1134+ }
1135+ if (error)
1136+ {
1137+ g_warning ("The launcher '%s' could not load the icon '%s': %s",
1138+ priv->path, priv->icon_name, error->message);
1139+ g_error_free (error);
1140+ return NULL;
1141+ }
1142+ return pixbuf;
1143 }
1144
1145 static gboolean
1146@@ -467,7 +501,7 @@
1147 /* is the launcher pid set?*/
1148 if (priv->pid)
1149 {
1150- gchar * name = awn_desktop_item_get_name (priv->item);
1151+ gchar *name = desktop_agnostic_fdo_desktop_entry_get_name (priv->entry);
1152 GStrv tokens = g_strsplit (name, " ",-1);
1153 if (tokens && tokens[0] && (strlen (tokens[0])>5) )
1154 {
1155@@ -513,10 +547,12 @@
1156 launcher = TASK_LAUNCHER (item);
1157 priv = launcher->priv;
1158
1159- priv->pid = awn_desktop_item_launch (priv->item, NULL, &error);
1160+ priv->pid =
1161+ desktop_agnostic_fdo_desktop_entry_launch (priv->entry,
1162+ 0, NULL, &error);
1163 g_get_current_time (&timeval);
1164 priv->timestamp = timeval.tv_sec;
1165-
1166+
1167 #ifdef DEBUG
1168 g_debug ("%s: current time = %ld",__func__,timeval.tv_sec);
1169 g_debug ("%s: launch pid = %d",__func__,priv->pid);
1170@@ -579,7 +615,8 @@
1171 launcher = TASK_LAUNCHER (item);
1172 priv = launcher->priv;
1173
1174- priv->pid = awn_desktop_item_launch (priv->item, NULL, &error);
1175+ priv->pid = desktop_agnostic_fdo_desktop_entry_launch (priv->entry, 0,
1176+ NULL, &error);
1177
1178 if (error)
1179 {
1180@@ -601,8 +638,9 @@
1181
1182 g_return_if_fail (TASK_IS_LAUNCHER (launcher));
1183
1184- launcher->priv->pid = awn_desktop_item_launch (launcher->priv->item,
1185- list, &error);
1186+ launcher->priv->pid =
1187+ desktop_agnostic_fdo_desktop_entry_launch (launcher->priv->entry,
1188+ 0, list, &error);
1189
1190 if (error)
1191 {
1192
1193=== modified file 'applets/taskmanager/task-manager.c'
1194--- applets/taskmanager/task-manager.c 2009-08-05 17:08:03 +0000
1195+++ applets/taskmanager/task-manager.c 2009-08-06 19:54:39 +0000
1196@@ -56,7 +56,7 @@
1197
1198 struct _TaskManagerPrivate
1199 {
1200- AwnConfigClient *client;
1201+ DesktopAgnosticConfigClient *client;
1202 TaskSettings *settings;
1203 WnckScreen *screen;
1204
1205@@ -72,12 +72,12 @@
1206 GHashTable *win_table;
1207
1208 /* Properties */
1209- GSList *launcher_paths;
1210- gboolean show_all_windows;
1211- gboolean only_show_launchers;
1212- gboolean drag_and_drop;
1213- gboolean grouping;
1214- gint match_strength;
1215+ GValueArray *launcher_paths;
1216+ gboolean show_all_windows;
1217+ gboolean only_show_launchers;
1218+ gboolean drag_and_drop;
1219+ gboolean grouping;
1220+ gint match_strength;
1221 };
1222
1223 enum
1224@@ -111,7 +111,7 @@
1225 static void task_manager_set_show_only_launchers (TaskManager *manager,
1226 gboolean show_only);
1227 static void task_manager_refresh_launcher_paths (TaskManager *manager,
1228- GSList *list);
1229+ GValueArray *list);
1230 static void task_manager_set_drag_and_drop (TaskManager *manager,
1231 gboolean drag_and_drop);
1232
1233@@ -126,6 +126,8 @@
1234 static void task_manager_size_changed (AwnApplet *applet,
1235 gint size);
1236
1237+static void task_manager_dispose (GObject *object);
1238+
1239 typedef enum
1240 {
1241 TASK_MANAGER_ERROR_UNSUPPORTED_WINDOW_TYPE,
1242@@ -175,9 +177,8 @@
1243 break;
1244
1245 case PROP_LAUNCHER_PATHS:
1246- g_value_set_pointer (value, manager->priv->launcher_paths);
1247+ g_value_set_boxed (value, manager->priv->launcher_paths);
1248 break;
1249-
1250 case PROP_DRAG_AND_DROP:
1251 g_value_set_boolean (value, manager->priv->drag_and_drop);
1252 break;
1253@@ -215,10 +216,15 @@
1254 break;
1255
1256 case PROP_LAUNCHER_PATHS:
1257- task_manager_refresh_launcher_paths (manager,
1258- g_value_get_pointer (value));
1259+ if (manager->priv->launcher_paths)
1260+ {
1261+ g_value_array_free (manager->priv->launcher_paths);
1262+ manager->priv->launcher_paths = NULL;
1263+ }
1264+ manager->priv->launcher_paths = (GValueArray*)g_value_dup_boxed (value);
1265+ task_manager_refresh_launcher_paths (manager,
1266+ manager->priv->launcher_paths);
1267 break;
1268-
1269 case PROP_DRAG_AND_DROP:
1270 task_manager_set_drag_and_drop (manager,
1271 g_value_get_boolean (value));
1272@@ -243,9 +249,7 @@
1273 task_manager_constructed (GObject *object)
1274 {
1275 TaskManagerPrivate *priv;
1276- AwnConfigBridge *bridge;
1277 GtkWidget *widget;
1278- gchar *uid = NULL;
1279
1280 G_OBJECT_CLASS (task_manager_parent_class)->constructed (object);
1281
1282@@ -253,35 +257,46 @@
1283 widget = GTK_WIDGET (object);
1284
1285 priv->settings = task_settings_get_default ();
1286- /* Load the uid */
1287- /* FIXME: AwnConfigClient needs to associate the default schema when uid is
1288- * used
1289- */
1290- g_object_get (object, "uid", &uid, NULL);
1291- priv->client = awn_config_client_new_for_applet ("taskmanager", NULL);
1292- g_free (uid);
1293+
1294+ priv->client = awn_config_get_default_for_applet (AWN_APPLET (object), NULL);
1295
1296 /* Connect up the important bits */
1297- bridge = awn_config_bridge_get_default ();
1298- awn_config_bridge_bind (bridge, priv->client,
1299- AWN_CONFIG_CLIENT_DEFAULT_GROUP, "show_all_windows",
1300- object, "show_all_windows");
1301- awn_config_bridge_bind (bridge, priv->client,
1302- AWN_CONFIG_CLIENT_DEFAULT_GROUP, "only_show_launchers",
1303- object, "only_show_launchers");
1304- awn_config_bridge_bind_list (bridge, priv->client,
1305- AWN_CONFIG_CLIENT_DEFAULT_GROUP, "launcher_paths",
1306- AWN_CONFIG_CLIENT_LIST_TYPE_STRING,
1307- object, "launcher_paths");
1308- awn_config_bridge_bind (bridge, priv->client,
1309- AWN_CONFIG_CLIENT_DEFAULT_GROUP, "drag_and_drop",
1310- object, "drag_and_drop");
1311- awn_config_bridge_bind (bridge, priv->client,
1312- AWN_CONFIG_CLIENT_DEFAULT_GROUP, "grouping",
1313- object, "grouping");
1314- awn_config_bridge_bind (bridge, priv->client,
1315- AWN_CONFIG_CLIENT_DEFAULT_GROUP, "match_strength",
1316- object, "match_strength");
1317+ desktop_agnostic_config_client_bind (priv->client,
1318+ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT,
1319+ "show_all_windows",
1320+ object, "show_all_windows", TRUE,
1321+ DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
1322+ NULL);
1323+ desktop_agnostic_config_client_bind (priv->client,
1324+ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT,
1325+ "only_show_launchers",
1326+ object, "only_show_launchers", TRUE,
1327+ DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
1328+ NULL);
1329+ desktop_agnostic_config_client_bind (priv->client,
1330+ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT,
1331+ "launcher_paths",
1332+ object, "launcher_paths", FALSE,
1333+ DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
1334+ NULL);
1335+ desktop_agnostic_config_client_bind (priv->client,
1336+ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT,
1337+ "drag_and_drop",
1338+ object, "drag_and_drop", TRUE,
1339+ DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
1340+ NULL);
1341+ desktop_agnostic_config_client_bind (priv->client,
1342+ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT,
1343+ "grouping",
1344+ object, "grouping", TRUE,
1345+ DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
1346+ NULL);
1347+ desktop_agnostic_config_client_bind (priv->client,
1348+ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT,
1349+ "match_strength",
1350+ object, "match_strength", TRUE,
1351+ DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
1352+ NULL);
1353 }
1354
1355 static void
1356@@ -294,6 +309,7 @@
1357 obj_class->constructed = task_manager_constructed;
1358 obj_class->set_property = task_manager_set_property;
1359 obj_class->get_property = task_manager_get_property;
1360+ obj_class->dispose = task_manager_dispose;
1361
1362 app_class->orient_changed = task_manager_orient_changed;
1363 app_class->size_changed = task_manager_size_changed;
1364@@ -313,10 +329,11 @@
1365 G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
1366 g_object_class_install_property (obj_class, PROP_ONLY_SHOW_LAUNCHERS, pspec);
1367
1368- pspec = g_param_spec_pointer ("launcher_paths",
1369- "launcher-paths",
1370- "List of paths to launcher desktop files",
1371- G_PARAM_READWRITE);
1372+ pspec = g_param_spec_boxed ("launcher-paths",
1373+ "launcher paths",
1374+ "List of paths to launcher desktop files",
1375+ G_TYPE_VALUE_ARRAY,
1376+ G_PARAM_READWRITE);
1377 g_object_class_install_property (obj_class, PROP_LAUNCHER_PATHS, pspec);
1378
1379 pspec = g_param_spec_boolean ("drag_and_drop",
1380@@ -446,6 +463,20 @@
1381 task_drag_indicator_refresh (priv->drag_indicator);
1382 }
1383
1384+static void
1385+task_manager_dispose (GObject *object)
1386+{
1387+ TaskManagerPrivate *priv;
1388+
1389+ priv = TASK_MANAGER_GET_PRIVATE (object);
1390+
1391+ desktop_agnostic_config_client_unbind_all_for_object (priv->client,
1392+ object,
1393+ NULL);
1394+
1395+ G_OBJECT_CLASS (task_manager_parent_class)->dispose (object);
1396+}
1397+
1398 /*
1399 * WNCK_SCREEN CALLBACKS
1400 */
1401@@ -803,11 +834,13 @@
1402 #ifdef DEBUG
1403 g_debug ("%s: regex matched full path = %s",__func__,full_path);
1404 #endif
1405- AwnDesktopItem * desktop = awn_desktop_item_new (full_path);
1406+ // TODO handle GErrors
1407+ DesktopAgnosticVFSFile *file = desktop_agnostic_vfs_file_new_for_path (full_path, NULL);
1408+ DesktopAgnosticFDODesktopEntry * desktop = desktop_agnostic_fdo_desktop_entry_new_for_file (file, NULL);
1409 if (desktop)
1410 {
1411- gchar * exec = awn_desktop_item_get_exec (desktop);
1412- awn_desktop_item_free (desktop);
1413+ gchar * exec = desktop_agnostic_fdo_desktop_entry_get_string (desktop, "Exec");
1414+ g_object_unref (desktop);
1415 #ifdef DEBUG
1416 g_debug ("%s: exec = %s",__func__,exec);
1417 g_debug ("%s: cmd = %s",__func__,cmd);
1418@@ -832,7 +865,8 @@
1419 }
1420 g_free (exec);
1421 }
1422- }
1423+ }
1424+ g_object_unref (file);
1425 g_free (full_path);
1426 }
1427 }
1428@@ -1181,27 +1215,20 @@
1429 task_manager_append_launcher(TaskManager *manager, const gchar * launcher_path)
1430 {
1431 TaskManagerPrivate *priv;
1432- GSList * launcher_paths;
1433+ GValueArray *launcher_paths;
1434+ GValue val = {0,};
1435
1436 g_return_if_fail (TASK_IS_MANAGER (manager));
1437 priv = manager->priv;
1438
1439- /*
1440- directly editing priv->launcher_paths does not work... so retrieve,
1441- modify, and set
1442- TODO once lda is merged have another look.
1443- */
1444- launcher_paths = awn_config_client_get_list (priv->client,
1445- AWN_CONFIG_CLIENT_DEFAULT_GROUP,
1446- "launcher_paths",
1447- AWN_CONFIG_CLIENT_LIST_TYPE_STRING,
1448- NULL);
1449- launcher_paths = g_slist_append (launcher_paths,g_strdup(launcher_path));
1450- awn_config_client_set_list (priv->client,AWN_CONFIG_CLIENT_DEFAULT_GROUP,
1451- "launcher_paths",AWN_CONFIG_CLIENT_LIST_TYPE_STRING,
1452- launcher_paths,NULL);
1453- task_manager_refresh_launcher_paths (manager,launcher_paths);
1454-
1455+ g_object_get (G_OBJECT (manager), "launcher_paths", &launcher_paths, NULL);
1456+ g_value_init (&val, G_TYPE_STRING);
1457+ g_value_set_string (&val, launcher_path);
1458+ launcher_paths = g_value_array_append (launcher_paths, &val);
1459+ g_object_set (G_OBJECT (manager), "launcher_paths", launcher_paths, NULL);
1460+ g_value_unset (&val);
1461+ task_manager_refresh_launcher_paths (manager, launcher_paths);
1462+ g_value_array_free (launcher_paths);
1463 }
1464
1465 /**
1466@@ -1210,93 +1237,111 @@
1467 * that aren't already on the bar.
1468 * State: partial - TODO: refresh of a list
1469 */
1470-static void
1471+static void
1472 task_manager_refresh_launcher_paths (TaskManager *manager,
1473- GSList *list)
1474+ GValueArray *list)
1475 {
1476 TaskManagerPrivate *priv;
1477- GSList *d;
1478- GSList *i;
1479
1480 g_return_if_fail (TASK_IS_MANAGER (manager));
1481 priv = manager->priv;
1482-
1483+
1484 /* FIXME: I guess we should add something to check whether the user has
1485- * removed a launcher. Make sure we don't remove a launcher which has a
1486+ * removed a launcher. Make sure we don't remove a launcher which has a
1487 * window set, wait till the window is closed
1488 *
1489 * FIXME: This approach just is not going to work..
1490- * IMO we should do something similar to
1491+ * IMO we should do something similar to
1492 * awn_applet_manager_refresh_applets() in awn-applet-manager.c
1493 */
1494-
1495- for (d = list; d; d = d->next)
1496- {
1497+
1498+ for (guint idx = 0; idx < list->n_values; idx++)
1499+ {
1500+ gchar *path;
1501 gboolean found;
1502+
1503+ path = g_value_dup_string (g_value_array_get_nth (list, idx));
1504 found = FALSE;
1505- for (i = priv->icons; i ;i = i->next)
1506+
1507+ for (GSList *icon_iter = priv->icons;
1508+ icon_iter != NULL;
1509+ icon_iter = icon_iter->next)
1510 {
1511- TaskIcon * icon = i->data;
1512- GSList * items = task_icon_get_items (icon);
1513- GSList * item_iter;
1514- for (item_iter = items; item_iter; item_iter = item_iter->next)
1515+ GSList *items = task_icon_get_items (TASK_ICON (icon_iter->data));
1516+
1517+ for (GSList *item_iter = items;
1518+ item_iter != NULL;
1519+ item_iter = item_iter->next)
1520 {
1521- TaskItem * item = item_iter->data;
1522-
1523- if ( TASK_IS_LAUNCHER (item) )
1524+ TaskItem *item = item_iter->data;
1525+
1526+ if (TASK_IS_LAUNCHER (item) &&
1527+ g_strcmp0 (task_launcher_get_desktop_path (TASK_LAUNCHER (item)),
1528+ path) == 0)
1529 {
1530- if (g_strcmp0 (task_launcher_get_desktop_path(TASK_LAUNCHER(item)),d->data)==0)
1531- {
1532- found = TRUE;
1533- }
1534+ found = TRUE;
1535+ break;
1536 }
1537 }
1538+ if (found)
1539+ {
1540+ break;
1541+ }
1542 }
1543 if (!found)
1544 {
1545- TaskItem *launcher = NULL;
1546- GtkWidget *icon;
1547-
1548- launcher = task_launcher_new_for_desktop_file (d->data);
1549+ TaskItem *launcher = NULL;
1550+ GtkWidget *icon;
1551+
1552+ launcher = task_launcher_new_for_desktop_file (path);
1553 if (launcher)
1554 {
1555 icon = task_icon_new (AWN_APPLET (manager));
1556 task_icon_append_item (TASK_ICON (icon), launcher);
1557 gtk_container_add (GTK_CONTAINER (priv->box), icon);
1558- gtk_box_reorder_child (GTK_BOX (priv->box), icon, g_slist_position (list,d));
1559- priv->icons = g_slist_insert (priv->icons, icon, g_slist_position (list,d));
1560+ gtk_box_reorder_child (GTK_BOX (priv->box), icon, idx);
1561+ priv->icons = g_slist_insert (priv->icons, icon, idx);
1562
1563 g_object_weak_ref (G_OBJECT (icon), (GWeakNotify)icon_closed, manager);
1564- g_signal_connect_swapped (icon,
1565+ g_signal_connect_swapped (icon,
1566 "visible-changed",
1567- G_CALLBACK (on_icon_visible_changed),
1568+ G_CALLBACK (on_icon_visible_changed),
1569 manager);
1570- g_signal_connect_swapped (awn_overlayable_get_effects (AWN_OVERLAYABLE (icon)),
1571- "animation-end",
1572- G_CALLBACK (on_icon_effects_ends),
1573+ g_signal_connect_swapped (awn_overlayable_get_effects (AWN_OVERLAYABLE (icon)),
1574+ "animation-end",
1575+ G_CALLBACK (on_icon_effects_ends),
1576 icon);
1577-
1578+
1579 update_icon_visible (manager, TASK_ICON (icon));
1580
1581 /* reordening through D&D */
1582- if(priv->drag_and_drop)
1583- _drag_add_signals(manager, icon);
1584+ if (priv->drag_and_drop)
1585+ {
1586+ _drag_add_signals(manager, icon);
1587+ }
1588 }
1589 else
1590 {
1591- g_debug ("%s: Bad desktop file '%s'",__func__,(gchar *)d->data);
1592+ g_debug ("%s: Bad desktop file '%s'", __func__, path);
1593 }
1594 }
1595+ g_free (path);
1596 }
1597 #if 0
1598- for (d = list; d; d = d->next)
1599+ for (guint idx = 0; idx < list->n_values; idx++)
1600 {
1601- GtkWidget *icon;
1602- TaskItem *launcher = NULL;
1603-
1604- launcher = task_launcher_new_for_desktop_file (d->data);
1605-
1606- if (!launcher) continue;
1607+ gchar *path;
1608+ TaskItem *launcher = NULL;
1609+ GtkWidget *icon;
1610+
1611+ path = g_value_dup_string (g_value_array_get_nth (list, idx));
1612+
1613+ launcher = task_launcher_new_for_desktop_file (path);
1614+
1615+ if (!launcher)
1616+ {
1617+ continue;
1618+ }
1619 /*Nasty... but can't just disable yet*/
1620 icon = task_icon_new (AWN_APPLET (manager));
1621 task_icon_append_item (TASK_ICON (icon), launcher);
1622@@ -1317,13 +1362,12 @@
1623 update_icon_visible (manager, TASK_ICON (icon));
1624
1625 /* reordening through D&D */
1626- if(priv->drag_and_drop)
1627+ if (priv->drag_and_drop)
1628+ {
1629 _drag_add_signals(manager, icon);
1630+ }
1631 }
1632-#endif
1633- for (d = list; d; d = d->next)
1634- g_free (d->data);
1635- g_slist_free (list);
1636+#endif
1637 }
1638
1639 static void
1640@@ -1822,12 +1866,18 @@
1641 }
1642 launchers = g_slist_reverse(launchers);
1643
1644- awn_config_client_set_list (priv->client,
1645- AWN_CONFIG_CLIENT_DEFAULT_GROUP,
1646- "launcher_paths",
1647- AWN_CONFIG_CLIENT_LIST_TYPE_STRING,
1648- launchers,
1649- &err);
1650+ GValue *val;
1651+
1652+ val = g_value_init (val, G_TYPE_BOXED);
1653+ g_value_set_boxed (val, launchers);
1654+
1655+ desktop_agnostic_config_client_set_value (priv->client,
1656+ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT,
1657+ "launcher_paths",
1658+ val, &err);
1659+
1660+ g_value_unset (val);
1661+
1662 for (d = launchers; d; d = d->next)
1663 g_free (d->data);
1664 g_slist_free (launchers);
1665
1666=== modified file 'applets/taskmanager/task-settings.c'
1667--- applets/taskmanager/task-settings.c 2009-04-18 08:54:34 +0000
1668+++ applets/taskmanager/task-settings.c 2009-08-06 19:36:12 +0000
1669@@ -17,153 +17,61 @@
1670 *
1671 */
1672
1673-#include <assert.h>
1674+#ifdef HAVE_CONFIG_H
1675+#include "config.h"
1676+#endif
1677+
1678 #include "task-settings.h"
1679
1680-#include "config.h"
1681-
1682-/* globals */
1683-static TaskSettings *settings = NULL;
1684-static AwnConfigClient *client = NULL;
1685-
1686 /* prototypes */
1687
1688-/*
1689-static void awn_load_bool (AwnConfigClient *lclient,
1690- const gchar *group,
1691- const gchar *key,
1692- gboolean *data,
1693- gboolean def);
1694-static void awn_load_float (AwnConfigClient *lclient,
1695- const gchar *group,
1696- const gchar *key,
1697- gfloat *data,
1698- gfloat def);
1699- */
1700-static void awn_load_int (AwnConfigClient *lclient,
1701- const gchar *group,
1702- const gchar *key,
1703- gint *data,
1704- gint def);
1705-
1706-/*
1707-static void awn_notify_bool (AwnConfigClientNotifyEntry *entry,
1708- gboolean *data);
1709-static void awn_notify_float (AwnConfigClientNotifyEntry *entry,
1710- gfloat *data);
1711- */
1712-static void awn_notify_int (AwnConfigClientNotifyEntry *entry,
1713- gint *data);
1714-
1715+static void
1716+cfg_notify_int (const gchar *group, const gchar *key, const GValue *value,
1717+ gpointer user_data)
1718+{
1719+ gint* int_value = (gint*)user_data;
1720+ *int_value = g_value_get_int (value);
1721+}
1722+
1723+static void
1724+cfg_load_int (DesktopAgnosticConfigClient *cfg,
1725+ const gchar *group,
1726+ const gchar *key,
1727+ gint *data)
1728+{
1729+ /* FIXME handle errors */
1730+ *data = desktop_agnostic_config_client_get_int (cfg, group, key, NULL);
1731+ desktop_agnostic_config_client_notify_add (cfg, group, key,
1732+ cfg_notify_int, data, NULL);
1733+}
1734+
1735+/**
1736+ * task_settings_get_default:
1737+ *
1738+ * Returns: A singleton
1739+ *
1740+ * Retrieves a structure that holds various values from the panel useful
1741+ * for the applet.
1742+ */
1743 TaskSettings *
1744 task_settings_get_default (void)
1745 {
1746- TaskSettings *s;
1747-
1748- if (settings)
1749- return settings;
1750-
1751- s = g_new (TaskSettings, 1);
1752-
1753- settings = s;
1754-
1755- client = awn_config_client_new();
1756-
1757- /* Bar settings */
1758- awn_config_client_ensure_group(client, "panel");
1759-
1760- awn_load_int(client, "panel", "size", &s->panel_size, 48);
1761- awn_load_int(client, "panel", "orient", &s->orient, 0);
1762- awn_load_int(client, "panel", "offset", &s->offset, 0);
1763-
1764- return s;
1765-}
1766-
1767-/*
1768-static void
1769-awn_notify_bool (AwnConfigClientNotifyEntry *entry, gboolean* data)
1770-{
1771- *data = entry->value.bool_val;
1772-}
1773-
1774-static void
1775-awn_notify_float (AwnConfigClientNotifyEntry *entry, gfloat* data)
1776-{
1777- *data = entry->value.float_val;
1778-}
1779-*/
1780-static void
1781-awn_notify_int (AwnConfigClientNotifyEntry *entry, gint* data)
1782-{
1783- *data = entry->value.int_val;
1784-}
1785-
1786-/*
1787-static void
1788-awn_load_bool (AwnConfigClient *lclient,
1789- const gchar *group,
1790- const gchar *key,
1791- gboolean *data,
1792- gboolean def)
1793-{
1794- if (awn_config_client_entry_exists(lclient, group, key))
1795- {
1796- *data = awn_config_client_get_bool(lclient, group, key, NULL);
1797- }
1798- else
1799- {
1800- g_print("%s unset, setting now\n", key);
1801- awn_config_client_set_bool(lclient, group, key, def, NULL);
1802- *data = def;
1803- }
1804-
1805- awn_config_client_notify_add(lclient, group, key,
1806- (AwnConfigClientNotifyFunc)awn_notify_bool,
1807- data);
1808-}
1809-
1810-static void
1811-awn_load_float (AwnConfigClient *lclient,
1812- const gchar *group,
1813- const gchar *key,
1814- gfloat *data,
1815- gfloat def)
1816-{
1817- if (awn_config_client_entry_exists(lclient, group, key))
1818- {
1819- *data = awn_config_client_get_float(lclient, group, key, NULL);
1820- }
1821- else
1822- {
1823- g_print("%s unset, setting now\n", key);
1824- awn_config_client_set_float(lclient, group, key, def, NULL);
1825- *data = def;
1826- }
1827-
1828- awn_config_client_notify_add (lclient, group, key,
1829- (AwnConfigClientNotifyFunc)awn_notify_float,
1830- data);
1831-}
1832-*/
1833-static void
1834-awn_load_int (AwnConfigClient *lclient,
1835- const gchar *group,
1836- const gchar *key,
1837- gint *data,
1838- gint def)
1839-{
1840- if (awn_config_client_entry_exists(lclient, group, key))
1841- {
1842- *data = awn_config_client_get_int(lclient, group, key, NULL);
1843- }
1844- else
1845- {
1846- g_print("%s unset, setting now\n", key);
1847- awn_config_client_set_int(lclient, group, key, def, NULL);
1848- *data = def;
1849- }
1850-
1851- awn_config_client_notify_add (lclient, group, key,
1852- (AwnConfigClientNotifyFunc)awn_notify_int,
1853- data);
1854+ static TaskSettings *settings = NULL;
1855+ static DesktopAgnosticConfigClient *client = NULL;
1856+
1857+ if (!settings)
1858+ {
1859+ settings = g_new (TaskSettings, 1);
1860+
1861+ /* FIXME handle error */
1862+ client = awn_config_get_default (AWN_PANEL_ID_DEFAULT, NULL);
1863+
1864+ /* Bar settings */
1865+
1866+ cfg_load_int(client, "panel", "size", &(settings->panel_size));
1867+ cfg_load_int(client, "panel", "orient", &(settings->orient));
1868+ cfg_load_int(client, "panel", "offset", &(settings->offset));
1869+ }
1870+
1871+ return settings;
1872 }
1873
1874=== modified file 'applets/taskmanager/util.c'
1875--- applets/taskmanager/util.c 2009-08-06 04:36:35 +0000
1876+++ applets/taskmanager/util.c 2009-08-06 19:54:39 +0000
1877@@ -112,7 +112,7 @@
1878 Other matching algororithms are NOT used if something is special cased.
1879 */
1880 gchar *
1881-get_special_id_from_desktop (AwnDesktopItem * item)
1882+get_special_id_from_desktop (DesktopAgnosticFDODesktopEntry * entry)
1883 {
1884 /*
1885 Exec,Name,filename, special_id. If all in the first 3 match then the
1886@@ -128,7 +128,7 @@
1887 gboolean match = TRUE;
1888 if (iter->exec)
1889 {
1890- gchar * exec = awn_desktop_item_get_exec (item);
1891+ gchar * exec = desktop_agnostic_fdo_desktop_entry_get_string (entry, "Exec");
1892 match = g_regex_match_simple(iter->exec, exec,0,0);
1893 g_free (exec);
1894 if (!match)
1895@@ -136,7 +136,7 @@
1896 }
1897 if (iter->name)
1898 {
1899- gchar * name = awn_desktop_item_get_name (item);
1900+ gchar * name = desktop_agnostic_fdo_desktop_entry_get_name (entry);
1901 match = g_regex_match_simple(iter->name, name,0,0);
1902 g_free (name);
1903 if (!match)
1904@@ -144,8 +144,10 @@
1905 }
1906 if (iter->filename)
1907 {
1908- const gchar * filename = awn_desktop_item_get_filename (item);
1909+ DesktopAgnosticVFSFile *file = desktop_agnostic_fdo_desktop_entry_get_file (entry);
1910+ gchar *filename = desktop_agnostic_vfs_file_get_path (file);
1911 match = g_regex_match_simple(iter->filename, filename,0,0);
1912+ g_free (filename);
1913 if (!match)
1914 continue;
1915 }
1916@@ -277,4 +279,4 @@
1917 }
1918 g_strfreev (cmd_argv);
1919 return full_cmd;
1920-}
1921\ No newline at end of file
1922+}
1923
1924=== modified file 'applets/taskmanager/util.h'
1925--- applets/taskmanager/util.h 2009-07-29 01:38:12 +0000
1926+++ applets/taskmanager/util.h 2009-08-06 19:54:39 +0000
1927@@ -18,8 +18,9 @@
1928 #define __TASK_MANAGER_UTIL_H__
1929
1930 #include <libawn/libawn.h>
1931+#include <libdesktop-agnostic/fdo.h>
1932
1933-gchar * get_special_id_from_desktop (AwnDesktopItem * item);
1934+gchar * get_special_id_from_desktop (DesktopAgnosticFDODesktopEntry *entry);
1935
1936 gchar * get_special_id_from_window_data (gchar * cmd, gchar *res_name,
1937 gchar * class_name,const gchar *title);
1938
1939=== modified file 'awn-applet-activation/main.c'
1940--- awn-applet-activation/main.c 2009-07-08 21:17:59 +0000
1941+++ awn-applet-activation/main.c 2009-08-06 19:54:39 +0000
1942@@ -26,9 +26,8 @@
1943 #include <errno.h>
1944
1945 #include <libawn/awn-defines.h>
1946-#include <libawn/awn-desktop-item.h>
1947 #include <libawn/awn-applet.h>
1948-#include <libawn/awn-vfs.h>
1949+#include <libdesktop-agnostic/fdo.h>
1950
1951 /* Forwards */
1952 GtkWidget *
1953@@ -99,7 +98,8 @@
1954 {
1955 GError *error = NULL;
1956 GOptionContext *context;
1957- AwnDesktopItem *item = NULL;
1958+ DesktopAgnosticVFSFile *desktop_file = NULL;
1959+ DesktopAgnosticFDODesktopEntry *entry = NULL;
1960 GtkWidget *applet = NULL;
1961 const gchar *exec;
1962 const gchar *name;
1963@@ -121,7 +121,13 @@
1964
1965 if (!g_thread_supported()) g_thread_init(NULL);
1966
1967- awn_vfs_init();
1968+ desktop_agnostic_vfs_init (&error);
1969+ if (error)
1970+ {
1971+ g_critical ("Error initializing VFS subsystem: %s", error->message);
1972+ g_error_free (error);
1973+ return EXIT_FAILURE;
1974+ }
1975
1976 gtk_init(&argc, &argv);
1977
1978@@ -132,48 +138,62 @@
1979 }
1980
1981 /* Try and load the desktop file */
1982- item = awn_desktop_item_new(path);
1983-
1984- if (item == NULL)
1985- {
1986- g_warning("This desktop file does not exist %s\n", path);
1987+ desktop_file = desktop_agnostic_vfs_file_new_for_path (path, &error);
1988+
1989+ if (error)
1990+ {
1991+ g_critical ("Error: %s", error->message);
1992+ g_error_free (error);
1993+ return 1;
1994+ }
1995+
1996+ if (desktop_file == NULL || !desktop_agnostic_vfs_file_exists (desktop_file))
1997+ {
1998+ g_warning ("This desktop file '%s' does not exist.", path);
1999+ return 1;
2000+ }
2001+
2002+ entry = desktop_agnostic_fdo_desktop_entry_new_for_file (desktop_file, &error);
2003+
2004+ if (error)
2005+ {
2006+ g_critical ("Error: %s", error->message);
2007+ g_error_free (error);
2008+ return 1;
2009+ }
2010+
2011+ if (entry == NULL)
2012+ {
2013+ g_warning ("This desktop file '%s' does not exist.", path);
2014 return 1;
2015 }
2016
2017 /* Now we have the file, lets see if we can
2018 a) load the dynamic library it points to
2019 b) Find the correct function within that library */
2020- exec = awn_desktop_item_get_exec(item);
2021+ exec = desktop_agnostic_fdo_desktop_entry_get_string (entry, "Exec");
2022
2023 if (exec == NULL)
2024 {
2025- g_warning("No exec path found in desktop file %s\n", path);
2026+ g_warning ("No Exec key found in desktop file '%s', exiting.", path);
2027 return 1;
2028 }
2029
2030- name = awn_desktop_item_get_name(item);
2031+ name = desktop_agnostic_fdo_desktop_entry_get_name (entry);
2032
2033 /* Check if this is a Python applet */
2034- type = awn_desktop_item_get_string(item, "X-AWN-AppletType");
2035+ type = desktop_agnostic_fdo_desktop_entry_get_string (entry, "X-AWN-AppletType");
2036
2037 if (!type)
2038 {
2039- /* FIXME we'll maintain this for a bit until the .desktop files are fixed */
2040- type = awn_desktop_item_get_item_type(item);
2041-
2042- if (type)
2043- {
2044- g_warning("Please inform the developer(s) of the applet '%s' that the .desktop file associated with their applet need to be updated per the Applet Development Guidelines on the AWN Wiki.", name);
2045- }
2046+ g_warning ("No X-AWN-AppletType key found in desktop file '%s', exiting.", path);
2047+ return 1;
2048 }
2049
2050- if (type)
2051+ if (strcmp(type, "Python") == 0)
2052 {
2053- if (strcmp(type, "Python") == 0)
2054- {
2055- launch_python(path, exec, uid, window, panel_id);
2056- return 0;
2057- }
2058+ launch_python(path, exec, uid, window, panel_id);
2059+ return 0;
2060 }
2061
2062 /* Extract canonical-name from exec */
2063@@ -195,7 +215,6 @@
2064 g_warning ("Could not create applet\n");
2065 return 1;
2066 }
2067- name = awn_desktop_item_get_name (item);
2068
2069 if (name != NULL)
2070 {
2071@@ -214,6 +233,14 @@
2072
2073 gtk_main();
2074
2075+ desktop_agnostic_vfs_shutdown (&error);
2076+ if (error)
2077+ {
2078+ g_critical ("Error shutting down VFS subsystem: %s", error->message);
2079+ g_error_free (error);
2080+ return EXIT_FAILURE;
2081+ }
2082+
2083 return 0;
2084 }
2085
2086
2087=== modified file 'awn.pc.in'
2088--- awn.pc.in 2008-08-11 20:29:13 +0000
2089+++ awn.pc.in 2009-07-08 01:07:01 +0000
2090@@ -2,7 +2,6 @@
2091 exec_prefix=${prefix}
2092 libdir=${exec_prefix}/lib
2093 includedir=${prefix}/include
2094-config_backend=@CFG_BACKEND_NAME@
2095 vapidir=@datarootdir@/vala/vapi
2096
2097 Name: libawn
2098
2099=== modified file 'bindings/python/Makefile.am'
2100--- bindings/python/Makefile.am 2009-07-13 19:27:22 +0000
2101+++ bindings/python/Makefile.am 2009-08-06 20:35:34 +0000
2102@@ -38,6 +38,7 @@
2103 $(PYTHON_EXTRA_LDFLAGS) \
2104 $(PYGTK_LIBS) \
2105 $(PYCAIRO_LIBS) \
2106+ $(AWN_LIBS) \
2107 $(top_builddir)/libawn/libawn.la \
2108 $(NULL)
2109
2110@@ -54,6 +55,8 @@
2111 --py_ssize_t-clean \
2112 --register $(PYGTK_DEFSDIR)/gdk-types.defs \
2113 --register $(PYGTK_DEFSDIR)/gtk-types.defs \
2114+ --register $(LDA_DEFSDIR)/desktopagnostic.defs \
2115+ --register $(LDA_DEFSDIR)/desktopagnostic_config.defs \
2116 --override $(srcdir)/$*.override \
2117 --prefix py$* $<) > gen-$*.c \
2118 && cp -f gen-$*.c $*.c \
2119
2120=== modified file 'bindings/python/awn.defs'
2121--- bindings/python/awn.defs 2009-07-14 20:40:48 +0000
2122+++ bindings/python/awn.defs 2009-08-06 20:35:34 +0000
2123@@ -129,21 +129,6 @@
2124 (gtype-id "AWN_TYPE_TOOLTIP")
2125 )
2126
2127-;; Boxed types ...
2128-(define-boxed Config
2129- (in-module "Awn")
2130- (c-name "AwnConfigClient")
2131- (gtype-id "AWN_TYPE_CONFIG_CLIENT")
2132-)
2133-
2134-(define-boxed DesktopItem
2135- (in-module "Awn")
2136- (c-name "AwnDesktopItem")
2137- (gtype-id "AWN_TYPE_DESKTOP_ITEM")
2138- (copy-func "awn_desktop_item_copy")
2139- (release-func "awn_desktop_item_free")
2140-)
2141-
2142 ;; Enumerations and flags ...
2143
2144 (define-flags CairoRoundCorners
2145@@ -215,35 +200,6 @@
2146 )
2147 )
2148
2149-(define-enum ConfigListType
2150- (in-module "Awn")
2151- (c-name "AwnConfigListType")
2152- (gtype-id "AWN_TYPE_CONFIG_LIST_TYPE")
2153- (values
2154- '("boolean" "AWN_CONFIG_LIST_TYPE_BOOL")
2155- '("float" "AWN_CONFIG_LIST_TYPE_FLOAT")
2156- '("integer" "AWN_CONFIG_LIST_TYPE_INT")
2157- '("string" "AWN_CONFIG_LIST_TYPE_STRING")
2158- )
2159-)
2160-
2161-(define-enum ConfigValueType
2162- (in-module "Awn")
2163- (c-name "AwnConfigValueType")
2164- (gtype-id "AWN_TYPE_CONFIG_VALUE_TYPE")
2165- (values
2166- '("null" "AWN_CONFIG_VALUE_TYPE_NULL")
2167- '("boolean" "AWN_CONFIG_VALUE_TYPE_BOOL")
2168- '("float" "AWN_CONFIG_VALUE_TYPE_FLOAT")
2169- '("integer" "AWN_CONFIG_VALUE_TYPE_INT")
2170- '("string" "AWN_CONFIG_VALUE_TYPE_STRING")
2171- '("list_boolean" "AWN_CONFIG_VALUE_TYPE_LIST_BOOL")
2172- '("list_float" "AWN_CONFIG_VALUE_TYPE_LIST_FLOAT")
2173- '("list_integer" "AWN_CONFIG_VALUE_TYPE_LIST_INT")
2174- '("list_string" "AWN_CONFIG_VALUE_TYPE_LIST_STRING")
2175- )
2176-)
2177-
2178 ;; From awn-dialog.h
2179
2180 (define-function dialog_new
2181@@ -256,209 +212,6 @@
2182 )
2183 )
2184
2185-;; From awn-config-client.h
2186-
2187-(define-function config_client_new
2188- (c-name "awn_config_client_new")
2189- (is-constructor-of "AwnConfigClient")
2190- (return-type "AwnConfigClient*")
2191-)
2192-
2193-(define-method clear
2194- (of-object "AwnConfigClient")
2195- (c-name "awn_config_client_clear")
2196- (return-type "none")
2197- (parameters
2198- '("GError**" "opt_error")
2199- )
2200-)
2201-
2202-(define-method ensure_group
2203- (of-object "AwnConfigClient")
2204- (c-name "awn_config_client_ensure_group")
2205- (return-type "none")
2206- (parameters
2207- '("const-gchar*" "group")
2208- )
2209-)
2210-
2211-(define-method notify_add
2212- (of-object "AwnConfigClient")
2213- (c-name "awn_config_client_notify_add")
2214- (return-type "none")
2215- (parameters
2216- '("const-gchar*" "group")
2217- '("const-gchar*" "key")
2218- '("AwnConfigClientNotifyFunc" "callback")
2219- '("gpointer" "data")
2220- )
2221-)
2222-
2223-(define-method exists
2224- (of-object "AwnConfigClient")
2225- (c-name "awn_config_client_entry_exists")
2226- (return-type "gboolean")
2227- (parameters
2228- '("const-gchar*" "group")
2229- '("const-gchar*" "key")
2230- )
2231-)
2232-
2233-(define-method get_value_type
2234- (of-object "AwnConfigClient")
2235- (c-name "awn_config_client_get_value_type")
2236- (return-type "AwnConfigValueType")
2237- (parameters
2238- '("const-gchar*" "group")
2239- '("const-gchar*" "key")
2240- '("GError**" "opt_error")
2241- )
2242-)
2243-
2244-(define-method set_bool
2245- (of-object "AwnConfigClient")
2246- (c-name "awn_config_client_set_bool")
2247- (return-type "none")
2248- (parameters
2249- '("const-gchar*" "group")
2250- '("const-gchar*" "key")
2251- '("gboolean" "the_bool")
2252- '("GError**" "opt_error")
2253- )
2254-)
2255-
2256-(define-method set_int
2257- (of-object "AwnConfigClient")
2258- (c-name "awn_config_client_set_int")
2259- (return-type "none")
2260- (parameters
2261- '("const-gchar*" "group")
2262- '("const-gchar*" "key")
2263- '("gint" "the_int")
2264- '("GError**" "opt_error")
2265- )
2266-)
2267-
2268-(define-method set_string
2269- (of-object "AwnConfigClient")
2270- (c-name "awn_config_client_set_string")
2271- (return-type "none")
2272- (parameters
2273- '("const-gchar*" "group")
2274- '("const-gchar*" "key")
2275- '("const-gchar*" "the_string")
2276- '("GError**" "opt_error")
2277- )
2278-)
2279-
2280-(define-method set_float
2281- (of-object "AwnConfigClient")
2282- (c-name "awn_config_client_set_float")
2283- (return-type "none")
2284- (parameters
2285- '("const-gchar*" "group")
2286- '("const-gchar*" "key")
2287- '("gdouble" "the_float")
2288- '("GError**" "opt_error")
2289- )
2290-)
2291-
2292-(define-method set_list
2293- (of-object "AwnConfigClient")
2294- (c-name "awn_config_client_set_list")
2295- (return-type "none")
2296- (parameters
2297- '("const-gchar*" "group")
2298- '("const-gchar*" "key")
2299- '("GConfValueType" "list_type")
2300- '("GSList*" "list")
2301- '("GError**" "opt_error")
2302- )
2303-)
2304-
2305-(define-method get_bool
2306- (of-object "AwnConfigClient")
2307- (c-name "awn_config_client_get_bool")
2308- (return-type "gboolean")
2309- (parameters
2310- '("const-gchar*" "group")
2311- '("const-gchar*" "key")
2312- '("GError**" "opt_error")
2313- )
2314-)
2315-
2316-(define-method get_int
2317- (of-object "AwnConfigClient")
2318- (c-name "awn_config_client_get_int")
2319- (return-type "gint")
2320- (parameters
2321- '("const-gchar*" "group")
2322- '("const-gchar*" "key")
2323- '("GError**" "opt_error")
2324- )
2325-)
2326-
2327-(define-method get_string
2328- (of-object "AwnConfigClient")
2329- (c-name "awn_config_client_get_string")
2330- (return-type "gchar*")
2331- (parameters
2332- '("const-gchar*" "group")
2333- '("const-gchar*" "key")
2334- '("GError**" "opt_error")
2335- )
2336-)
2337-
2338-(define-method get_float
2339- (of-object "AwnConfigClient")
2340- (c-name "awn_config_client_get_float")
2341- (return-type "gfloat")
2342- (parameters
2343- '("const-gchar*" "group")
2344- '("const-gchar*" "key")
2345- '("GError**" "opt_error")
2346- )
2347-)
2348-
2349-(define-method get_list
2350- (of-object "AwnConfigClient")
2351- (c-name "awn_config_client_get_list")
2352- (return-type "GSList*")
2353- (parameters
2354- '("const-gchar*" "group")
2355- '("const-gchar*" "key")
2356- '("AwnConfigListType" "list_type")
2357- '("GError**" "opt_error")
2358- )
2359-)
2360-
2361-(define-function config_key_lock_open
2362- (c-name "awn_config_client_key_lock_open")
2363- (return-type "int")
2364- (parameters
2365- '("const-gchar*" "group")
2366- '("const-gchar*" "key")
2367- )
2368-)
2369-
2370-(define-function config_key_lock
2371- (c-name "awn_config_client_key_lock")
2372- (return-type "none")
2373- (parameters
2374- '("int" "fd")
2375- '("int" "operation")
2376- )
2377-)
2378-
2379-(define-function config_key_lock_close
2380- (c-name "awn_config_client_key_lock_close")
2381- (return-type "none")
2382- (parameters
2383- '("int" "fd")
2384- )
2385-)
2386-
2387-
2388 ;; From awn-alignment.h
2389
2390 (define-function awn_alignment_new_for_applet
2391@@ -776,162 +529,73 @@
2392 )
2393 )
2394
2395+(define-function awn_cairo_set_source_color
2396+ (c-name "awn_cairo_set_source_color")
2397+ (return-type "none")
2398+ (parameters
2399+ '("cairo_t*" "cr")
2400+ '("DesktopAgnosticColor*" "color")
2401+ )
2402+)
2403+
2404+(define-function awn_cairo_set_source_color_with_alpha_multiplier
2405+ (c-name "awn_cairo_set_source_color_with_alpha_multiplier")
2406+ (return-type "none")
2407+ (parameters
2408+ '("cairo_t*" "cr")
2409+ '("DesktopAgnosticColor*" "color")
2410+ '("gdouble" "multiplier")
2411+ )
2412+)
2413+
2414+(define-function awn_cairo_set_source_color_with_multipliers
2415+ (c-name "awn_cairo_set_source_color_with_multipliers")
2416+ (return-type "none")
2417+ (parameters
2418+ '("cairo_t*" "cr")
2419+ '("DesktopAgnosticColor*" "color")
2420+ '("gdouble" "color_multiplier")
2421+ '("gdouble" "alpha_multiplier")
2422+ )
2423+)
2424+
2425+
2426+;; From awn-config.h
2427+
2428+(define-function awn_config_get_default
2429+ (c-name "awn_config_get_default")
2430+ (return-type "DesktopAgnosticConfigClient*")
2431+ (parameters
2432+ '("gint" "panel_id")
2433+ '("GError**" "error")
2434+ )
2435+)
2436+
2437+(define-function awn_config_get_default_for_applet
2438+ (c-name "awn_config_get_default_for_applet")
2439+ (return-type "DesktopAgnosticConfigClient*")
2440+ (parameters
2441+ '("AwnApplet*" "applet")
2442+ '("GError**" "error")
2443+ )
2444+)
2445+
2446+(define-function awn_config_get_default_for_applet_by_info
2447+ (c-name "awn_config_get_default_for_applet_by_info")
2448+ (return-type "DesktopAgnosticConfigClient*")
2449+ (parameters
2450+ '("const-gchar*" "name")
2451+ '("const-gchar*" "uid")
2452+ '("GError**" "error")
2453+ )
2454+)
2455+
2456
2457
2458 ;; From awn-defines.h
2459
2460
2461
2462-;; From awn-desktop-item.h
2463-
2464-(define-function awn_desktop_item_get_type
2465- (c-name "awn_desktop_item_get_type")
2466- (return-type "GType")
2467-)
2468-
2469-(define-function awn_desktop_item_new
2470- (c-name "awn_desktop_item_new")
2471- (is-constructor-of "AwnDesktopItem")
2472- (return-type "AwnDesktopItem*")
2473- (parameters
2474- '("gchar*" "filename")
2475- )
2476-)
2477-
2478-(define-method get_filename
2479- (c-name "awn_desktop_item_get_filename")
2480- (of-object "AwnDesktopItem")
2481- (return-type "const-gchar*")
2482-)
2483-
2484-(define-method get_item_type
2485- (c-name "awn_desktop_item_get_item_type")
2486- (of-object "AwnDesktopItem")
2487- (return-type "gchar*")
2488-)
2489-
2490-(define-method set_item_type
2491- (c-name "awn_desktop_item_set_item_type")
2492- (of-object "AwnDesktopItem")
2493- (return-type "none")
2494- (parameters
2495- '("gchar*" "item_type")
2496- )
2497-)
2498-
2499-(define-method get_icon
2500- (c-name "awn_desktop_item_get_icon")
2501- (of-object "AwnDesktopItem")
2502- (return-type "GdkPixbuf*")
2503- (parameters
2504- '("guint" "size")
2505- )
2506-)
2507-
2508-(define-method set_icon
2509- (c-name "awn_desktop_item_set_icon_name")
2510- (of-object "AwnDesktopItem")
2511- (return-type "none")
2512- (parameters
2513- '("gchar*" "icon")
2514- )
2515-)
2516-
2517-(define-method get_name
2518- (c-name "awn_desktop_item_get_name")
2519- (of-object "AwnDesktopItem")
2520- (return-type "gchar*")
2521-)
2522-
2523-(define-method set_name
2524- (c-name "awn_desktop_item_set_name")
2525- (of-object "AwnDesktopItem")
2526- (return-type "none")
2527- (parameters
2528- '("gchar*" "name")
2529- )
2530-)
2531-
2532-(define-method get_exec
2533- (c-name "awn_desktop_item_get_exec")
2534- (of-object "AwnDesktopItem")
2535- (return-type "gchar*")
2536-)
2537-
2538-(define-method set_exec
2539- (c-name "awn_desktop_item_set_exec")
2540- (of-object "AwnDesktopItem")
2541- (return-type "none")
2542- (parameters
2543- '("gchar*" "exec")
2544- )
2545-)
2546-
2547-(define-method get_string
2548- (c-name "awn_desktop_item_get_string")
2549- (of-object "AwnDesktopItem")
2550- (return-type "gchar*")
2551- (parameters
2552- '("gchar*" "key")
2553- )
2554-)
2555-
2556-(define-method set_string
2557- (c-name "awn_desktop_item_set_string")
2558- (of-object "AwnDesktopItem")
2559- (return-type "none")
2560- (parameters
2561- '("gchar*" "key")
2562- '("gchar*" "value")
2563- )
2564-)
2565-
2566-(define-method get_localestring
2567- (c-name "awn_desktop_item_get_localestring")
2568- (of-object "AwnDesktopItem")
2569- (return-type "gchar*")
2570- (parameters
2571- '("gchar*" "key")
2572- )
2573-)
2574-
2575-(define-method set_localestring
2576- (c-name "awn_desktop_item_set_localestring")
2577- (of-object "AwnDesktopItem")
2578- (return-type "none")
2579- (parameters
2580- '("gchar*" "key")
2581- '("gchar*" "locale")
2582- '("gchar*" "value")
2583- )
2584-)
2585-
2586-(define-method exists
2587- (c-name "awn_desktop_item_exists")
2588- (of-object "AwnDesktopItem")
2589- (return-type "gboolean")
2590-)
2591-
2592-(define-method launch
2593- (c-name "awn_desktop_item_launch")
2594- (of-object "AwnDesktopItem")
2595- (return-type "gint")
2596- (parameters
2597- '("GSList*" "documents")
2598- '("GError**" "err")
2599- )
2600-)
2601-
2602-(define-method save
2603- (c-name "awn_desktop_item_save")
2604- (of-object "AwnDesktopItem")
2605- (return-type "none")
2606- (parameters
2607- '("gchar*" "new_filename")
2608- '("GError**" "err")
2609- )
2610-)
2611-
2612 ;; From awn-effects.h
2613
2614 (define-function awn_effects_get_type
2615@@ -1401,7 +1065,7 @@
2616 (c-name "awn_tooltip_set_font_color")
2617 (return-type "none")
2618 (parameters
2619- '("const-gchar*" "font_color")
2620+ '("DesktopAgnosticColor*" "font_color")
2621 )
2622 )
2623
2624@@ -1410,7 +1074,7 @@
2625 (c-name "awn_tooltip_set_background_color")
2626 (return-type "none")
2627 (parameters
2628- '("const-gchar*" "bg_color")
2629+ '("DesktopAgnosticColor*" "bg_color")
2630 )
2631 )
2632
2633@@ -1572,8 +1236,6 @@
2634 )
2635 )
2636
2637-;; From awn-vfs.h
2638-
2639 (define-function vfs_init
2640 (c-name "awn_vfs_init")
2641 (return-type "none")
2642
2643=== modified file 'bindings/python/awn.override'
2644--- bindings/python/awn.override 2009-07-14 20:40:48 +0000
2645+++ bindings/python/awn.override 2009-08-06 20:35:34 +0000
2646@@ -6,82 +6,27 @@
2647 #include <pygobject.h>
2648 #include <pycairo.h>
2649 #include <pygtk/pygtk.h>
2650-#ifdef USE_GCONF
2651-#include <gconf/gconf-value.h>
2652-#endif
2653 #include <libawn/awn-enum-types.h>
2654 #include <libawn/libawn.h>
2655
2656 extern Pycairo_CAPI_t *Pycairo_CAPI;
2657
2658-static GSList *
2659-_pysequence_to_gslist (PyObject *seq, AwnConfigListType list_type)
2660+/* Some hacking to get GdkRegion to work. */
2661+#ifndef PYGDK_TYPE_REGION
2662+GType pygdk_region_get_type (void) G_GNUC_CONST;
2663+#define PYGDK_TYPE_REGION (pygdk_region_get_type ())
2664+GType
2665+pygdk_region_get_type (void)
2666 {
2667- GSList *list = NULL;
2668-
2669- int i;
2670- int len = PySequence_Length (seq);
2671- for (i = 0; i < len; i++) {
2672- PyObject *item = PySequence_GetItem (seq, i);
2673- Py_DECREF(item);
2674- switch (list_type) {
2675- case AWN_CONFIG_CLIENT_LIST_TYPE_BOOL: {
2676- gboolean *data = g_malloc (sizeof (gboolean));
2677- *data = (gboolean)PyInt_AsLong (item);
2678- list = g_slist_append (list, data);
2679- break;
2680- } case AWN_CONFIG_CLIENT_LIST_TYPE_FLOAT: {
2681- gdouble *data = g_malloc (sizeof (gdouble));
2682- *data = (gdouble)PyFloat_AsDouble (item);
2683- list = g_slist_append (list, data);
2684- break;
2685- } case AWN_CONFIG_CLIENT_LIST_TYPE_INT: {
2686- gint *data = g_malloc (sizeof (gint));
2687- *data = (gint)PyInt_AsLong (item);
2688- list = g_slist_append (list, data);
2689- break;
2690- } case AWN_CONFIG_CLIENT_LIST_TYPE_STRING: {
2691- gchar *data = g_strdup (PyString_AsString (item));
2692- list = g_slist_append (list, data);
2693- break;
2694- }
2695- }
2696- }
2697- return list;
2698-}
2699-static PyObject *
2700-_gslist_to_pylist (GSList *list, AwnConfigListType list_type) {
2701- PyObject *py_list;
2702- guint i;
2703- gsize slist_len = g_slist_length (list);
2704- py_list = PyList_New ((Py_ssize_t)slist_len);
2705-
2706- for (i = 0; i < slist_len; i++) {
2707- PyObject *py_data = NULL;
2708- gpointer data = g_slist_nth_data (list, i);
2709- if (data) {
2710- switch (list_type) {
2711- case AWN_CONFIG_CLIENT_LIST_TYPE_BOOL:
2712- py_data = PyBool_FromLong (*((gboolean*)data));
2713- break;
2714- case AWN_CONFIG_CLIENT_LIST_TYPE_FLOAT:
2715- py_data = PyFloat_FromDouble (*((gdouble*)data));
2716- break;
2717- case AWN_CONFIG_CLIENT_LIST_TYPE_INT:
2718- py_data = PyInt_FromLong (*((gint*)data));
2719- break;
2720- case AWN_CONFIG_CLIENT_LIST_TYPE_STRING:
2721- py_data = PyString_FromString ((gchar*)data);
2722- break;
2723- }
2724- if (PyList_SetItem (py_list, i, py_data) == -1) {
2725- PyErr_SetString (PyExc_ValueError, "Could not populate the list with the configuration value.");
2726- return NULL;
2727- }
2728- }
2729- }
2730- return py_list;
2731-}
2732+ static GType our_type = 0;
2733+
2734+ if (our_type == 0)
2735+ /* GdkRegion is already taken by pygtk in its boxing of GdkRegion. */
2736+ our_type = g_type_from_name("GdkRegion");
2737+ return our_type;
2738+}
2739+#endif /* GDK_TYPE_REGION */
2740+
2741 static gchar**
2742 _pysequence_to_gchar_array (PyObject *py_seq)
2743 {
2744@@ -118,6 +63,7 @@
2745 modulename awn
2746 %%
2747 import gobject.GObject as PyGObject_Type
2748+import desktopagnostic.Color as PyDesktopAgnosticColor_Type
2749 import gtk.Alignment as PyGtkAlignment_Type
2750 import gtk.Dialog as PyGtkDialog_Type
2751 import gtk.EventBox as PyGtkEventBox_Type
2752@@ -137,101 +83,6 @@
2753 ignore-glob
2754 *_get_type
2755 %%
2756-override awn_config_client_new kwargs
2757-static int
2758-_wrap_awn_config_client_new (PyGBoxed *self, PyObject *args, PyObject *kwargs)
2759-{
2760- static char *kwlist[] = { "name", "uid", NULL };
2761- gchar *name = NULL;
2762- PyObject *py_uid = NULL;
2763- gchar *uid = NULL;
2764-
2765- if (!PyArg_ParseTupleAndKeywords (args, kwargs,"|sO:AwnConfigClient.__init__", kwlist, &name, &py_uid)) {
2766- return -1;
2767- }
2768- self->gtype = AWN_TYPE_CONFIG_CLIENT;
2769- self->free_on_dealloc = FALSE;
2770- if (name) {
2771- if (!py_uid) {
2772- PyErr_SetString (PyExc_ValueError, "The uid argument needs to be defined if the name argument is defined");
2773- return -1;
2774- }
2775- if (PyString_Check (py_uid)) {
2776- uid = PyString_AsString (py_uid);
2777- } else if (py_uid != Py_None) {
2778- PyErr_SetString (PyExc_TypeError, "The uid argument must be either a string or None");
2779- return -1;
2780- }
2781- self->boxed = awn_config_client_new_for_applet (name, uid);
2782- } else {
2783- self->boxed = awn_config_client_new ();
2784- }
2785-
2786- if (!self->boxed) {
2787- PyErr_SetString (PyExc_RuntimeError, "could not create AwnConfigClient object");
2788- return -1;
2789- }
2790- self->free_on_dealloc = TRUE;
2791- return 0;
2792-}
2793-%%
2794-override awn_config_client_get_list kwargs
2795-static PyObject *
2796-_wrap_awn_config_client_get_list (PyGBoxed *self, PyObject *args, PyObject *kwargs)
2797-{
2798- static char *kwlist[] = { "group", "key", "list_type", NULL };
2799- char *group, *key;
2800- AwnConfigListType list_type;
2801- GSList *ret = NULL;
2802- GError *opt_error = NULL;
2803-
2804- if (!PyArg_ParseTupleAndKeywords (args, kwargs, "ssi:AwnConfigClient.get_list", kwlist, &group, &key, &list_type)) {
2805- return NULL;
2806- }
2807-
2808- ret = awn_config_client_get_list (pyg_boxed_get (self, AwnConfigClient), group, key, list_type, &opt_error);
2809-
2810- if (pyg_error_check (&opt_error)) {
2811- return NULL;
2812- }
2813-
2814- return _gslist_to_pylist (ret, list_type);
2815-}
2816-%%
2817-override awn_config_client_set_list kwargs
2818-static PyObject *
2819-_wrap_awn_config_client_set_list (PyGBoxed *self, PyObject *args, PyObject *kwargs)
2820-{
2821- static char *kwlist[] = { "group", "key", "list_type", "value", NULL };
2822- char *group, *key;
2823- AwnConfigListType list_type;
2824- PyObject *py_list;
2825- GSList *the_list = NULL;
2826- GError *opt_error = NULL;
2827-
2828- if (!PyArg_ParseTupleAndKeywords (args, kwargs, "ssiO:AwnConfigClient.set_list", kwlist, &group, &key, &list_type, &py_list)) {
2829- return NULL;
2830- }
2831-
2832- if (!PyList_Check (py_list) && !PyTuple_Check (py_list)) {
2833- PyErr_SetString (PyExc_TypeError, "Fourth argument not a tuple or list");
2834- return NULL;
2835- }
2836- the_list = _pysequence_to_gslist (py_list, list_type);
2837-
2838- awn_config_client_set_list (pyg_boxed_get (self, AwnConfigClient), group, key, list_type, the_list, &opt_error);
2839-
2840- g_slist_foreach (the_list, (GFunc)g_free, NULL);
2841- g_slist_free (the_list);
2842-
2843- if (pyg_error_check (&opt_error)) {
2844- return NULL;
2845- }
2846-
2847- Py_INCREF (Py_None);
2848- return Py_None;
2849-}
2850-%%
2851 override awn_applet_simple_set_temp_icon kwargs
2852 static PyObject *
2853 _wrap_awn_applet_simple_set_temp_icon (PyGObject *self, PyObject *args, PyObject *kwargs)
2854@@ -239,207 +90,6 @@
2855 return _wrap_awn_applet_simple_set_icon (self, args, kwargs);
2856 }
2857 %%
2858-override awn_config_client_notify_add kwargs
2859-/* Borrowed from gnome-python/trunk/gconf/gconf.override, r585 */
2860-void
2861-pyawn_config_client_notify_add (AwnConfigClientNotifyEntry *entry, PyObject *tuple)
2862-{
2863- PyObject *func;
2864- PyObject *userdata = NULL;
2865- PyObject *notify_entry;
2866- PyObject *value;
2867- PyObject *ret;
2868- PyGILState_STATE state;
2869-
2870- state = pyg_gil_state_ensure ();
2871-
2872- g_assert (PyTuple_Check (tuple));
2873- func = PyTuple_GetItem (tuple, 0);
2874- userdata = PyTuple_GetItem (tuple, 1);
2875-
2876- /* build the AwnConfigClientNotifyEntry python equivalent manually, as a dictionary */
2877- notify_entry = PyDict_New ();
2878- PyDict_SetItemString (notify_entry, "client", pyg_boxed_new (AWN_TYPE_CONFIG_CLIENT, entry->client, TRUE, TRUE));
2879- PyDict_SetItemString (notify_entry, "group", PyString_FromString (entry->group));
2880- PyDict_SetItemString (notify_entry, "key", PyString_FromString (entry->key));
2881- switch (awn_config_client_get_value_type (entry->client, entry->group, entry->key, NULL)) {
2882- case AWN_CONFIG_VALUE_TYPE_BOOL:
2883- value = PyBool_FromLong (entry->value.bool_val);
2884- break;
2885- case AWN_CONFIG_VALUE_TYPE_FLOAT:
2886- value = PyFloat_FromDouble (entry->value.float_val);
2887- break;
2888- case AWN_CONFIG_VALUE_TYPE_INT:
2889- value = PyInt_FromLong (entry->value.int_val);
2890- break;
2891- case AWN_CONFIG_VALUE_TYPE_STRING:
2892- value = PyString_FromString (entry->value.str_val);
2893- break;
2894- case AWN_CONFIG_VALUE_TYPE_LIST_BOOL:
2895- value = _gslist_to_pylist (entry->value.list_val, AWN_CONFIG_CLIENT_LIST_TYPE_BOOL);
2896- break;
2897- case AWN_CONFIG_VALUE_TYPE_LIST_FLOAT:
2898- value = _gslist_to_pylist (entry->value.list_val, AWN_CONFIG_CLIENT_LIST_TYPE_FLOAT);
2899- break;
2900- case AWN_CONFIG_VALUE_TYPE_LIST_INT:
2901- value = _gslist_to_pylist (entry->value.list_val, AWN_CONFIG_CLIENT_LIST_TYPE_INT);
2902- break;
2903- case AWN_CONFIG_VALUE_TYPE_LIST_STRING:
2904- value = _gslist_to_pylist (entry->value.list_val, AWN_CONFIG_CLIENT_LIST_TYPE_STRING);
2905- break;
2906- default:
2907- PyErr_Format (PyExc_ValueError, "Could not determine the value type of the configuration key '[%s]%s'.", entry->group, entry->key);
2908- return;
2909- break;
2910- }
2911- PyDict_SetItemString (notify_entry, "value", value);
2912-
2913- if (!userdata) {
2914- ret = PyObject_CallFunction (func, "N", notify_entry);
2915- } else {
2916- ret = PyObject_CallFunction (func, "NO", notify_entry, userdata);
2917- }
2918-
2919- if (ret == NULL) {
2920- PyErr_Print ();
2921- } else {
2922- Py_DECREF (ret);
2923- }
2924-
2925- pyg_gil_state_release (state);
2926-}
2927-
2928-static PyObject *
2929-_wrap_awn_config_client_notify_add (PyGBoxed *self, PyObject *args, PyObject *kwargs)
2930-{
2931- static char *kwlist[] = { "group", "key", "func", "user_data", NULL };
2932- gchar *group;
2933- gchar *key;
2934- PyObject *callback;
2935- PyObject *extra = NULL;
2936- PyObject *data;
2937-
2938- if (!PyArg_ParseTupleAndKeywords (args, kwargs,
2939- "ssO|O:AwnConfigClient.notify_add",
2940- kwlist, &group, &key,
2941- &callback, &extra)) {
2942- return NULL;
2943- }
2944-
2945- if (!PyCallable_Check (callback)) {
2946- PyErr_SetString (PyExc_TypeError, "Third argument not callable");
2947- return NULL;
2948- }
2949-
2950- if (extra) {
2951- Py_INCREF (extra);
2952- } else {
2953- extra = PyTuple_New (0);
2954- }
2955-
2956- data = Py_BuildValue ("(ON)", callback, extra);
2957-
2958- awn_config_client_notify_add (pyg_boxed_get(self, AwnConfigClient),
2959- group, key,
2960- (AwnConfigClientNotifyFunc)pyawn_config_client_notify_add,
2961- data);
2962-
2963- Py_INCREF (Py_None);
2964- return Py_None;
2965-}
2966-%%
2967-override awn_desktop_item_launch kwargs
2968-static PyObject *
2969-_wrap_awn_desktop_item_launch (PyGBoxed *self, PyObject *args, PyObject *kwargs)
2970-{
2971- static char *kwlist[] = { "documents", NULL };
2972- PyObject *py_documents = NULL;
2973- GSList *documents = NULL;
2974- GError *opt_error = NULL;
2975- gint pid;
2976-
2977- if (!PyArg_ParseTupleAndKeywords (args, kwargs, "|O:AwnDesktopItem.launch", kwlist, &py_documents)) {
2978- return NULL;
2979- }
2980-
2981- if (py_documents) {
2982- if (PyList_Check (py_documents) || PyTuple_Check (py_documents)) {
2983- /* abuse the utility function */
2984- documents = _pysequence_to_gslist (py_documents, AWN_CONFIG_CLIENT_LIST_TYPE_STRING);
2985- } else if (PyString_Check (py_documents)) {
2986- /* only one argument */
2987- documents = g_slist_append (documents, PyString_AsString (py_documents));
2988- } else {
2989- PyErr_SetString (PyExc_TypeError, "Argument is not a sequence");
2990- return NULL;
2991- }
2992- }
2993-
2994- pid = awn_desktop_item_launch (pyg_boxed_get (self, AwnDesktopItem), documents, &opt_error);
2995-
2996- if (pyg_error_check (&opt_error)) {
2997- return NULL;
2998- }
2999-
3000- return PyInt_FromLong (pid);
3001-}
3002-%%
3003-override awn_config_client_key_lock_open kwargs
3004-static PyObject *
3005-_wrap_awn_config_client_key_lock_open(PyObject *self, PyObject *args, PyObject *kwargs)
3006-{
3007- static char *kwlist[] = { "group", "key", NULL };
3008- char *group, *key;
3009- int ret;
3010-
3011- if (!PyArg_ParseTupleAndKeywords (args, kwargs,"ss:AwnConfigClient.lock_open", kwlist, &group, &key))
3012- return NULL;
3013-
3014- ret = awn_config_client_key_lock_open (group, key);
3015-
3016- return PyInt_FromLong (ret);
3017-}
3018-%%
3019-override awn_config_client_key_lock kwargs
3020-static PyObject *
3021-_wrap_awn_config_client_key_lock (PyObject *self, PyObject *args, PyObject *kwargs)
3022-{
3023- static char *kwlist[] = { "fd", "operation", NULL };
3024- int fd, operation, ret;
3025-
3026- if (!PyArg_ParseTupleAndKeywords (args, kwargs,"ii:AwnConfigClient.lock", kwlist, &fd, &operation))
3027- return NULL;
3028-
3029- ret = awn_config_client_key_lock (fd, operation);
3030-
3031- if (ret != 0) {
3032- return PyErr_SetFromErrno(PyExc_IOError);
3033- }
3034-
3035- Py_INCREF(Py_None);
3036- return Py_None;
3037-}
3038-%%
3039-override awn_config_client_key_lock_close kwargs
3040-static PyObject *
3041-_wrap_awn_config_client_key_lock_close (PyObject *self, PyObject *args, PyObject *kwargs)
3042-{
3043- static char *kwlist[] = { "fd", NULL };
3044- int fd, ret;
3045-
3046- if (!PyArg_ParseTupleAndKeywords (args, kwargs,"i:AwnConfigClient.lock_close", kwlist, &fd))
3047- return NULL;
3048-
3049- ret = awn_config_client_key_lock_close (fd);
3050-
3051- if (ret != 0) {
3052- return PyErr_SetFromErrno(PyExc_IOError);
3053- }
3054-
3055- Py_INCREF(Py_None);
3056- return Py_None;
3057-}
3058-%%
3059 override awn_applet_simple_set_awn_icons kwargs
3060 static PyObject *
3061 _wrap_awn_applet_simple_set_awn_icons (PyObject *self, PyObject *args, PyObject *kwargs)
3062
3063=== modified file 'bindings/python/awnmodule.c'
3064--- bindings/python/awnmodule.c 2009-06-23 15:09:15 +0000
3065+++ bindings/python/awnmodule.c 2009-07-15 01:05:32 +0000
3066@@ -24,11 +24,6 @@
3067 #include <pygobject.h>
3068 #include <cairo/cairo.h>
3069 #include <pycairo.h>
3070-#ifdef USE_GCONF
3071-#include <gconf/gconf.h>
3072-#include <gconf/gconf-client.h>
3073-#include <gconf/gconf-value.h>
3074-#endif
3075 #include <gtk/gtk.h>
3076 #include <libawn/awn-applet.h>
3077 #include <libawn/awn-applet-simple.h>
3078
3079=== modified file 'configure.in'
3080--- configure.in 2009-07-16 15:04:17 +0000
3081+++ configure.in 2009-08-06 20:35:34 +0000
3082@@ -16,7 +16,7 @@
3083 m4_define(pycairo_required_version, 1.0.2) dnl or 1.1.7
3084 m4_define(pygtk_required_version, 2.12.0)
3085
3086-AM_INIT_AUTOMAKE([1.8])
3087+AM_INIT_AUTOMAKE([1.8 -Wno-portability])
3088 AM_MAINTAINER_MODE
3089
3090 AC_SUBST([ACLOCAL_AMFLAGS], ["\${ACLOCAL_FLAGS}"])
3091@@ -57,6 +57,11 @@
3092 AC_SUBST(PYGTK_DEFSDIR)
3093 AC_MSG_RESULT($PYGTK_DEFSDIR)
3094
3095+AC_MSG_CHECKING(for libdesktop-agnostic Python definitions directory)
3096+LDA_DEFSDIR=`$PKG_CONFIG --variable=defsdir desktop-agnostic`
3097+AC_SUBST(LDA_DEFSDIR)
3098+AC_MSG_RESULT($LDA_DEFSDIR)
3099+
3100 PKG_CHECK_MODULES(PYCAIRO, pycairo >= pycairo_required_version)
3101 AC_SUBST(PYCAIRO_CFLAGS)
3102 AC_SUBST(PYCAIRO_LIBS)
3103@@ -131,35 +136,7 @@
3104
3105 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal, glib-genmarshal)
3106
3107-dnl ==============================================
3108-dnl Configuration backend
3109-dnl ==============================================
3110-AC_MSG_CHECKING([for config backend support])
3111-AC_ARG_WITH(gconf,
3112- AS_HELP_STRING([--with-gconf],
3113- [Use GConf to store configuration information]),
3114- [if test "$with_gconf" == "no"; then
3115- # use Glib's GKeyFile - it's already pulled in.
3116- CFG_MODULE=""
3117- CFG_BACKEND_NAME="GKeyFile"
3118- GCONF_SCHEMA_INSTALL_SOURCE="/dev/null"
3119- GCONF_SCHEMA_FILE_DIR="/dev/null"
3120- AC_MSG_RESULT([GKeyFile (part of Glib)])
3121- fi])
3122-if test "$with_gconf" != "no"; then
3123- CFG_MODULE="gconf-2.0"
3124- CFG_BACKEND_NAME="GConf"
3125- AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
3126- if test x"$GCONFTOOL" = xno; then
3127- AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
3128- fi
3129- AC_DEFINE([USE_GCONF], 1, [Use GConf to store configuration information])
3130- AC_MSG_RESULT([GConf])
3131-fi
3132-AC_SUBST(CFG_BACKEND_NAME)
3133-AM_CONDITIONAL(USE_GCONF, test "$with_gconf" != "no")
3134-
3135-LIBRARY_MODULES="glib-2.0 >= $MIN_GLIB_VERSION gthread-2.0 gobject-2.0 gtk+-2.0 >= $MIN_GTK_VERSION gdk-2.0 >= $MIN_GTK_VERSION dbus-glib-1 gio-2.0 $CFG_MODULE desktop-agnostic"
3136+LIBRARY_MODULES="glib-2.0 >= $MIN_GLIB_VERSION gthread-2.0 gobject-2.0 gtk+-2.0 >= $MIN_GTK_VERSION gdk-2.0 >= $MIN_GTK_VERSION dbus-glib-1 desktop-agnostic"
3137 DOCK_MODULES="x11 xproto xcomposite xrender"
3138 TASKMANAGER_MODULES="libwnck-1.0 >= $MIN_WNCK_VERSION x11 libgtop-2.0"
3139 AC_SUBST(LIBRARY_MODULES)
3140@@ -168,14 +145,8 @@
3141 PKG_CHECK_MODULES(DOCK, [$DOCK_MODULES])
3142 PKG_CHECK_MODULES(TASKMANAGER, [$LIBRARY_MODULES $TASKMANAGER_MODULES])
3143
3144-dnl =============================================
3145-dnl Startup notification check (eggdesktopfile)
3146-dnl =============================================
3147-
3148-old_LIBS="$LIBS"
3149-LIBS="$LIBS $AWN_LIBS"
3150-AC_CHECK_FUNCS(gdk_x11_display_broadcast_startup_message)
3151-LIBS="$old_LIBS"
3152+LDA_BINDIR="`$PKG_CONFIG --variable=exec_prefix desktop-agnostic`/bin"
3153+AC_SUBST(LDA_BINDIR)
3154
3155 dnl ==============================================
3156 dnl DBus
3157@@ -188,6 +159,12 @@
3158 dnl GConf
3159 dnl ==============================================
3160 AM_GCONF_SOURCE_2
3161+if test "$enable_schemas_install" != "no"; then
3162+ AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
3163+ if test x"$GCONFTOOL" = xno; then
3164+ AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
3165+ fi
3166+fi
3167
3168 dnl ==============================================
3169 dnl Miscellaneous
3170@@ -233,12 +210,11 @@
3171 data/Makefile
3172 data/active/Makefile
3173 data/avant-window-navigator.desktop.in
3174-data/awn.schema-ini
3175+data/avant-window-navigator.schema-ini
3176 doc/Makefile
3177 doc/reference/Makefile
3178 libawn/Makefile
3179 libawn/anims/Makefile
3180-libawn/egg/Makefile
3181 po/Makefile.in
3182 shave/shave
3183 shave/shave-libtool
3184@@ -255,8 +231,6 @@
3185 echo ""
3186 echo " prefix: ${prefix}"
3187 echo ""
3188-echo " Configuration Backend: $CFG_BACKEND_NAME"
3189-echo ""
3190 echo " Vala Support: ${with_vala}"
3191 echo ""
3192 echo " Documentation: ${enable_gtk_doc}"
3193
3194=== modified file 'data/Makefile.am'
3195--- data/Makefile.am 2009-07-06 22:12:25 +0000
3196+++ data/Makefile.am 2009-08-05 07:18:27 +0000
3197@@ -2,6 +2,8 @@
3198
3199 APP_ICON_NAME = avant-window-navigator
3200 include $(top_srcdir)/Makefile.app-icons
3201+include $(top_srcdir)/Makefile.shave
3202+include $(top_srcdir)/Makefile.schemas
3203
3204 # desktop file
3205
3206@@ -39,29 +41,9 @@
3207
3208 # config-related
3209
3210-if USE_GCONF
3211-schemasdir = @GCONF_SCHEMA_FILE_DIR@
3212-schemas_in_files = awn.schemas.in
3213-schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
3214-
3215-awn.schemas.in: awn.schema-ini
3216- $(top_srcdir)/data/awn-schema-to-gconf $< $@
3217-
3218-@INTLTOOL_SCHEMAS_RULE@
3219-
3220-if GCONF_SCHEMAS_INSTALL
3221-install-gconf-schemas: $(schemas_DATA)
3222- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schemas_DATA)
3223-else
3224-install-gconf-schemas:
3225-endif
3226-else
3227-install-gconf-schemas:
3228-endif
3229-schemadir = $(pkgdatadir)/schemas
3230-schema_DATA = awn.schema-ini
3231-
3232-dist_bin_SCRIPTS = awn-schema-to-gconf awn-applets-migration
3233+schema_DATA = avant-window-navigator.schema-ini
3234+
3235+dist_bin_SCRIPTS = awn-applets-migration
3236
3237 # global
3238
3239@@ -71,6 +53,6 @@
3240 rm -f $(DESTDIR)$(datadir)/icons/hicolor/24x24/apps/avant-window-navigator.png
3241 rm -f $(DESTDIR)$(datadir)/icons/hicolor/32x32/apps/avant-window-navigator.png
3242
3243-EXTRA_DIST += $(icons) $(text_DATA) $(desktop_DATA).in.in awn.schema-ini awn-themed-icon-ui.glade
3244+EXTRA_DIST += $(icons) $(text_DATA) $(desktop_DATA).in.in avant-window-navigator.schema-ini awn-themed-icon-ui.glade
3245
3246-CLEANFILES = $(desktop_DATA) $(desktop_DATA).in awn.schemas awn.schemas.in
3247+CLEANFILES = $(desktop_DATA) $(desktop_DATA).in avant-window-navigator.schemas avant-window-navigator.schemas.in
3248
3249=== renamed file 'data/awn.schema-ini.in' => 'data/avant-window-navigator.schema-ini.in'
3250--- data/awn.schema-ini.in 2009-07-27 19:35:05 +0000
3251+++ data/avant-window-navigator.schema-ini.in 2009-07-31 18:34:39 +0000
3252@@ -1,30 +1,37 @@
3253+# Avant Window Navigator configuration schema
3254+# -------------------------------------------
3255+# schema metadata
3256+[DEFAULT]
3257+single_instance = false
3258+
3259+# configuration options
3260 [panel/panel_mode]
3261-type = bool
3262-default = False
3263-description = If True, maximised windows will not cover the panel.
3264+type = boolean
3265+default = false
3266+description = If true, maximised windows will not cover the panel.
3267
3268 [panel/expand]
3269-type = bool
3270-default = False
3271-description = If True, the panel will expand to full monitor width/height.
3272+type = boolean
3273+default = false
3274+description = If true, the panel will expand to full monitor width/height.
3275
3276 [panel/orient]
3277-type = int
3278+type = integer
3279 default = 2
3280 description = Orientation of Awn. (top=0, right=1, bottom=2 and left=3)
3281
3282 [panel/offset]
3283-type = int
3284+type = integer
3285 default = 10
3286 description = Offset of the icons from window border.
3287
3288 [panel/dialog_offset]
3289-type = int
3290+type = integer
3291 default = 15
3292 description = Offset between the icons and their dialog.
3293
3294 [panel/size]
3295-type = int
3296+type = integer
3297 default = 48
3298 description = The user-visible size of Awn.
3299
3300@@ -44,22 +51,22 @@
3301 description = The active list UA Screenlets for this panel.
3302
3303 [panel/monitor_force]
3304-type = bool
3305-default = False
3306+type = boolean
3307+default = false
3308 description = Force monitor geometry.
3309
3310 [panel/monitor_width]
3311-type = int
3312+type = integer
3313 default = 1024
3314-description = The forced monitor width. Only used if monitor_force is True.
3315+description = The forced monitor width. Only used if monitor_force is true.
3316
3317 [panel/monitor_height]
3318-type = int
3319+type = integer
3320 default = 768
3321-description = The forced monitor height. Only used if monitor_force is True.
3322+description = The forced monitor height. Only used if monitor_force is true.
3323
3324 [panel/monitor_offset]
3325-type = int
3326+type = integer
3327 default = 0
3328 description = An optional offset when you have more than 1 monitors.
3329
3330@@ -69,17 +76,17 @@
3331 description = Alignment of a non-expanded panel on the monitor edge.
3332
3333 [panel/autohide]
3334-type = int
3335+type = integer
3336 default = 0
3337 description = Auto hides the dock when the cursor is not on the dock (shouldn't be used together with panel_mode). (none=0, keep below=1, fade out=2, see through=3)
3338
3339 [panel/style]
3340-type = int
3341+type = integer
3342 default = 1
3343 description = The style of the bar. (none=0, flat bar=1, 3d bar=2, curved bar=3, edgy=4)
3344
3345 [panel/clickthrough]
3346-type = int
3347+type = integer
3348 default = 1
3349 description = Provides possibility to click on windows behind the panel. (0 - never click through, 1 - click through when holding CTRL, 2 - always click through and interact with panel only when holding CTRL)
3350
3351@@ -89,47 +96,47 @@
3352 description = The list of panels.
3353
3354 [theme/gstep1]
3355-type = string
3356+type = color
3357 default = #454545C8
3358 description = First gradient step color.
3359
3360 [theme/gstep2]
3361-type = string
3362+type = color
3363 default = #010101BE
3364 description = Second gradient step color.
3365
3366 [theme/ghistep1]
3367-type = string
3368+type = color
3369 default = #FFFFFF0B
3370 description = First highlight gradient step color.
3371
3372 [theme/ghistep2]
3373-type = string
3374+type = color
3375 default = #FFFFFF0A
3376 description = Second highlight gradient step color.
3377
3378 [theme/dialog_bg]
3379-type = string
3380+type = color
3381 default = #AAAAAAEE
3382 description = Background color for AwnDialog.
3383
3384 [theme/dialog_title_bg]
3385-type = string
3386+type = color
3387 default = #FFFFFFFF
3388 description = Background color for AwnDialog's title.
3389
3390 [theme/icon_text_color]
3391-type = string
3392+type = color
3393 default =
3394 description = Icon text color. Leave empty to use gtk theme color.
3395
3396 [theme/icon_text_outline_color]
3397-type = string
3398+type = color
3399 default =
3400 description = Icon text outline color. Leave empty to use gtk theme color.
3401
3402 [theme/icon_font_mode]
3403-type = int
3404+type = integer
3405 default = 0
3406 description = 0 - solid, 1 - outline, 2 - outline, reversed.
3407
3408@@ -139,28 +146,28 @@
3409 description = width of icon text outline if outline mode is enabled. Suggested values 1.0 - 5.0.
3410
3411 [theme/border]
3412-type = string
3413+type = color
3414 default = #000000CC
3415 description = Main border color.
3416
3417 [theme/hilight]
3418-type = string
3419+type = color
3420 default = #FFFFFF11
3421 description = Internal border color.
3422
3423 [theme/show_sep]
3424-type = bool
3425-default = True
3426+type = boolean
3427+default = true
3428 description = Draw separators.
3429
3430 [theme/sep_color]
3431-type = string
3432+type = color
3433 default = #FFFFFF00
3434 description = Separator color.
3435
3436 [theme/draw_pattern]
3437-type = bool
3438-default = False
3439+type = boolean
3440+default = false
3441 description = Enable drawing of a pattern.
3442
3443 [theme/pattern_alpha]
3444@@ -174,8 +181,8 @@
3445 description = The location of the pattern to draw.
3446
3447 [theme/gtk_theme_mode]
3448-type = bool
3449-default = TRUE
3450+type = boolean
3451+default = true
3452 description = Whether to use colors from the current Gtk theme.
3453
3454 [theme/corner_radius]
3455@@ -204,12 +211,12 @@
3456 description = Font name of the tooltip
3457
3458 [theme/tooltip_font_color]
3459-type = string
3460+type = color
3461 default = #FFFFFFFF
3462 description = Font color of the tooltip
3463
3464 [theme/tooltip_bg_color]
3465-type = string
3466+type = color
3467 default = #000000B3
3468 description = Background color of the tooltip
3469
3470@@ -219,12 +226,12 @@
3471 description = Path to the current desktop file theme.
3472
3473 [effects/reflection_offset]
3474-type = int
3475+type = integer
3476 default = 0
3477 description = The offset between the icon and it's reflection
3478
3479 [effects/icon_effect]
3480-type = int
3481+type = integer
3482 default = 0
3483 description = A bitmask which stores the type of effect for each event
3484
3485@@ -239,8 +246,8 @@
3486 description = Reflection alpha as a multiple of the current alpha of the icon.
3487
3488 [effects/show_shadows]
3489-type = bool
3490-default = FALSE
3491+type = boolean
3492+default = false
3493 description = Show shadows for icons.
3494
3495 [effects/arrow_icon]
3496@@ -249,17 +256,17 @@
3497 description = Path to the png containing the arrow icon.
3498
3499 [shared/dialog_focus_loss_behavior]
3500-type = bool
3501+type = boolean
3502 default = true
3503 description = Whether to close dialogs on loss of focus.
3504
3505 [shared/allow_generic_config_edit]
3506-type = bool
3507-default = False
3508+type = boolean
3509+default = false
3510 description = Determines if generic configuration editor is allowed for applets that do not have a customized preferences dialog.
3511
3512 [shared/long_press_timeout]
3513-type = int
3514+type = integer
3515 default = 750
3516 description = Time in ms after which AwnIcon will emit long-press signal.
3517
3518
3519=== removed file 'data/awn-schema-to-gconf'
3520--- data/awn-schema-to-gconf 2008-04-13 00:03:43 +0000
3521+++ data/awn-schema-to-gconf 1970-01-01 00:00:00 +0000
3522@@ -1,92 +0,0 @@
3523-#!/usr/bin/env python
3524-#
3525-# Copyright (C) 2007 Mark Lee <avant-wn@lazymalevolence.com>
3526-#
3527-# This program is free software; you can redistribute it and/or modify
3528-# it under the terms of the GNU General Public License as published by
3529-# the Free Software Foundation; either version 2 of the License, or
3530-# (at your option) any later version.
3531-#
3532-# This program is distributed in the hope that it will be useful,
3533-# but WITHOUT ANY WARRANTY; without even the implied warranty of
3534-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3535-# GNU General Public License for more details.
3536-#
3537-# You should have received a copy of the GNU General Public License
3538-# along with this program; if not, write to the Free Software
3539-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3540-#
3541-# Author : Mark Lee <avant-wn@lazymalevolence.com>
3542-
3543-import sys
3544-from ConfigParser import SafeConfigParser as ConfigParser
3545-try:
3546- # >=dev-lang/python-2.5 cElementTree
3547- from xml.etree import cElementTree as ET
3548-except ImportError:
3549- try:
3550- # >=dev-lang/python-2.5 ElementTree
3551- from xml.etree import ElementTree as ET
3552- except ImportError:
3553- try:
3554- # dev-python/lxml
3555- import lxml.etree as ET
3556- except ImportError:
3557- try:
3558- # dev-python/celementtree
3559- import cElementTree as ET
3560- except:
3561- # dev-python/elementtree
3562- from elementtree import ElementTree as ET
3563-
3564-def main(argv):
3565- if len(argv) < 2:
3566- sys.stderr.write('Usage: %s [input file] [output file] ([key prefix])\n')
3567- sys.exit(1)
3568- else:
3569- in_schema = ConfigParser()
3570- in_fp = file(argv[0], 'r')
3571- in_schema.readfp(in_fp, argv[0])
3572- in_fp.close()
3573- out_schema = ET.ElementTree(ET.Element('gconfschemafile'))
3574- schemalist = ET.SubElement(out_schema.getroot(), 'schemalist')
3575- for key in in_schema.sections():
3576- if key.startswith('DEFAULT/'):
3577- real_key = key[8:]
3578- else:
3579- real_key = key
3580- if len(argv) == 3:
3581- full_key = '/apps/avant-window-navigator/applets/%s/%s' % (argv[2], real_key)
3582- else:
3583- full_key = '/apps/avant-window-navigator/%s' % real_key
3584- schema_key = '/schemas' + full_key
3585- schema_element = ET.SubElement(schemalist, 'schema')
3586- ET.SubElement(schema_element, 'key').text = schema_key
3587- ET.SubElement(schema_element, 'applyto').text = full_key
3588- ET.SubElement(schema_element, 'owner').text = 'avant-window-navigator'
3589- key_type = in_schema.get(key, 'type')
3590- element_type = ET.SubElement(schema_element, 'type')
3591- value = in_schema.get(key, 'default')
3592- if key_type.startswith('list-'):
3593- element_type.text = 'list'
3594- ET.SubElement(schema_element, 'list_type').text = key_type[5:]
3595- value = '[%s]' % value.replace(';', ',')
3596- else:
3597- element_type.text = key_type
3598- ET.SubElement(schema_element, 'default').text = value
3599- locale = ET.SubElement(schema_element, 'locale')
3600- locale.set('name', 'C')
3601- ET.SubElement(locale, 'short')
3602- ET.SubElement(locale, 'long').text = in_schema.get(key, 'description')
3603- for lang in [x[12:-1] for x in in_schema.options(key) if x.startswith('description[')]:
3604- locale = ET.SubElement(schema_element, 'locale')
3605- locale.set('name', lang)
3606- ET.SubElement(locale, 'short')
3607- ET.SubElement(locale, 'long').text = in_schema.get(key, 'description[%s]' % lang)
3608-
3609- out_schema.write(argv[1], encoding='utf-8')
3610-
3611-if __name__ == '__main__':
3612- main(sys.argv[1:])
3613-
3614-# vim: set ft=python et sw=4 ts=4 sts=4
3615
3616=== modified file 'debian/awn-settings-trunk.install'
3617--- debian/awn-settings-trunk.install 2009-07-25 14:48:33 +0000
3618+++ debian/awn-settings-trunk.install 2009-08-05 07:18:27 +0000
3619@@ -2,6 +2,5 @@
3620 usr/share/icons/hicolor/*/apps/awn-settings.*
3621 usr/share/icons/hicolor/*/apps/awn-plugins.*
3622 usr/bin/awn-launcher-editor
3623-usr/bin/awn-schema-to-gconf
3624 usr/bin/awn-settings
3625 usr/share/applications/awn-settings.desktop
3626
3627=== modified file 'debian/control'
3628--- debian/control 2009-06-21 22:56:41 +0000
3629+++ debian/control 2009-08-05 07:18:27 +0000
3630@@ -20,8 +20,8 @@
3631 gtk-doc-tools,
3632 doc-base,
3633 valac (>= 0.5.4),
3634- python2.5 | python-lxml | python-celementtree | python-elementtree,
3635- automake
3636+ automake,
3637+ libdesktop-agnostic-dev,
3638 Standards-Version: 3.7.3
3639 Homepage: https://launchpad.net/avant-window-navigator/
3640 XS-Python-Version: >= 2.4
3641@@ -33,6 +33,7 @@
3642 ${misc:Depends},
3643 avant-window-navigator-data-trunk (>= ${source:Version}),
3644 python-awn-trunk (>= ${source:Version}),
3645+ libdesktop-agnostic-vfs,
3646 dbus-x11 | dbus
3647 Recommends: awn-settings-trunk (>= 0.2),
3648 Suggests: metacity (>= 2.21.5) | xcompmgr | compiz | xfwm4 (>= 4.2)
3649@@ -58,7 +59,8 @@
3650 Section: libs
3651 Architecture: any
3652 Depends: ${shlibs:Depends},
3653- ${misc:Depends}
3654+ ${misc:Depends},
3655+ libdesktop-agnostic0,
3656 Suggests: metacity (>= 2.21.5) | xcompmgr | compiz | xfwm4 (>= 4.2)
3657 Conflicts: libawn0-bzr, libawn-bzr, libawn, libawn0, libawn0-testing
3658 Replaces: libawn0-bzr, libawn-bzr, libawn, libawn0, libawn0-testing
3659@@ -83,7 +85,8 @@
3660 ${shlibs:Depends},
3661 ${misc:Depends},
3662 libgnome2-dev,
3663- libgtk2.0-dev
3664+ libgtk2.0-dev,
3665+ libdesktop-agnostic-dev,
3666 Conflicts: libawn-dev-bzr, libawn-dev, libawn-testing-dev
3667 Replaces: libawn-dev-bzr, libawn-dev, libawn-testing-dev
3668 Description: library for avant-window-navigator - development files
3669
3670=== modified file 'doc/reference/Makefile.am'
3671--- doc/reference/Makefile.am 2009-07-18 07:00:32 +0000
3672+++ doc/reference/Makefile.am 2009-07-18 07:24:08 +0000
3673@@ -54,7 +54,6 @@
3674 IGNORE_HFILES = \
3675 $(DOC_SOURCE_DIR)/gseal-transition.h \
3676 $(DOC_SOURCE_DIR)/stamp-awn-enum-types.h \
3677- $(DOC_SOURCE_DIR)/egg/stamp-egg-enum-types.h \
3678 $(DOC_SOURCE_DIR)/libawn.h \
3679 $(NULL)
3680
3681
3682=== modified file 'doc/reference/libawn-docs.sgml'
3683--- doc/reference/libawn-docs.sgml 2009-06-23 09:05:41 +0000
3684+++ doc/reference/libawn-docs.sgml 2009-07-27 18:33:46 +0000
3685@@ -15,8 +15,7 @@
3686 </chapter>
3687 <chapter>
3688 <title>Base Components</title>
3689- <xi:include href="xml/awn-config-bridge.xml"/>
3690- <xi:include href="xml/awn-config-client.xml"/>
3691+ <xi:include href="xml/awn-config.xml"/>
3692 <xi:include href="xml/awn-dialog.xml"/>
3693 <xi:include href="xml/awn-effects.xml"/>
3694 <xi:include href="xml/awn-tooltip.xml"/>
3695
3696=== modified file 'doc/reference/libawn-sections.txt'
3697--- doc/reference/libawn-sections.txt 2009-07-18 06:39:39 +0000
3698+++ doc/reference/libawn-sections.txt 2009-07-27 07:19:38 +0000
3699@@ -321,24 +321,6 @@
3700 </SECTION>
3701
3702 <SECTION>
3703-<FILE>awn-config-bridge</FILE>
3704-AwnConfigBridgePrivate
3705-<TITLE>AwnConfigBridge</TITLE>
3706-AwnConfigBridge
3707-awn_config_bridge_get_default
3708-awn_config_bridge_bind
3709-awn_config_bridge_bind_list
3710-<SUBSECTION Standard>
3711-AWN_CONFIG_BRIDGE
3712-AWN_IS_CONFIG_BRIDGE
3713-AWN_TYPE_CONFIG_BRIDGE
3714-awn_config_bridge_get_type
3715-AWN_CONFIG_BRIDGE_CLASS
3716-AWN_IS_CONFIG_BRIDGE_CLASS
3717-AWN_CONFIG_BRIDGE_GET_CLASS
3718-</SECTION>
3719-
3720-<SECTION>
3721 <FILE>awn-overlay-progress-circle</FILE>
3722 <TITLE>AwnOverlayProgressCircle</TITLE>
3723 AwnOverlayProgressCircle
3724@@ -443,10 +425,6 @@
3725 </SECTION>
3726
3727 <SECTION>
3728-<FILE>stamp-egg-enum-types</FILE>
3729-</SECTION>
3730-
3731-<SECTION>
3732 <FILE>libawn</FILE>
3733 </SECTION>
3734
3735@@ -459,55 +437,6 @@
3736 </SECTION>
3737
3738 <SECTION>
3739-<FILE>awn-vfs</FILE>
3740-AwnVfsMonitor
3741-AwnVfsMonitorEvent
3742-AwnVfsMonitorType
3743-AwnVfsMonitorFunc
3744-awn_vfs_monitor_add
3745-awn_vfs_monitor_emit
3746-awn_vfs_monitor_remove
3747-awn_vfs_init
3748-awn_vfs_get_pathlist_from_string
3749-</SECTION>
3750-
3751-<SECTION>
3752-<FILE>awn-config-client</FILE>
3753-AwnConfigClient
3754-AWN_TYPE_CONFIG_CLIENT
3755-AWN_CONFIG_CLIENT
3756-AwnConfigClientNotifyFunc
3757-AWN_CONFIG_CLIENT_DEFAULT_GROUP
3758-AwnConfigValueType
3759-AwnConfigListType
3760-AwnConfigBackend
3761-awn_config_client_get_type
3762-awn_config_client_new
3763-awn_config_client_new_for_applet
3764-awn_config_client_query_backend
3765-awn_config_client_clear
3766-awn_config_client_ensure_group
3767-awn_config_client_notify_add
3768-awn_config_client_entry_exists
3769-awn_config_client_load_defaults_from_schema
3770-awn_config_client_key_lock_open
3771-awn_config_client_key_lock
3772-awn_config_client_key_lock_close
3773-awn_config_client_get_value_type
3774-awn_config_client_get_bool
3775-awn_config_client_set_bool
3776-awn_config_client_get_float
3777-awn_config_client_set_float
3778-awn_config_client_get_int
3779-awn_config_client_set_int
3780-awn_config_client_get_string
3781-awn_config_client_set_string
3782-awn_config_client_get_list
3783-awn_config_client_set_list
3784-awn_config_client_free
3785-</SECTION>
3786-
3787-<SECTION>
3788 <FILE>awn-enum-types</FILE>
3789 awn_orientation_get_type
3790 AWN_TYPE_ORIENTATION
3791@@ -519,20 +448,10 @@
3792 AWN_TYPE_PATH_TYPE
3793 awn_cairo_round_corners_get_type
3794 AWN_TYPE_CAIRO_ROUND_CORNERS
3795-awn_config_value_type_get_type
3796-AWN_TYPE_CONFIG_VALUE_TYPE
3797-awn_config_list_type_get_type
3798-AWN_TYPE_CONFIG_LIST_TYPE
3799-awn_config_backend_get_type
3800-AWN_TYPE_CONFIG_BACKEND
3801 awn_effect_get_type
3802 AWN_TYPE_EFFECT
3803 awn_overlay_align_get_type
3804 AWN_TYPE_OVERLAY_ALIGN
3805-awn_vfs_monitor_event_get_type
3806-AWN_TYPE_VFS_MONITOR_EVENT
3807-awn_vfs_monitor_type_get_type
3808-AWN_TYPE_VFS_MONITOR_TYPE
3809 </SECTION>
3810
3811 <SECTION>
3812@@ -563,14 +482,13 @@
3813
3814 <SECTION>
3815 <FILE>awn-defines</FILE>
3816-AWN_GCONF_PATH
3817-AWN_APPLET_GCONF_PATH
3818 AWN_MAX_HEIGHT
3819 AWN_MIN_HEIGHT
3820 AwnOrientation
3821 AwnAppletFlags
3822 AwnAppletLicense
3823 AwnPathType
3824+AWN_PANEL_ID_DEFAULT
3825 AWN_FONT_SIZE_EXTRA_SMALL
3826 AWN_FONT_SIZE_SMALL
3827 AWN_FONT_SIZE_MEDIUM
3828@@ -579,31 +497,11 @@
3829 </SECTION>
3830
3831 <SECTION>
3832-<FILE>awn-desktop-item</FILE>
3833-AwnDesktopItem
3834-AWN_TYPE_DESKTOP_ITEM
3835-AWN_DESKTOP_ITEM
3836-awn_desktop_item_get_type
3837-awn_desktop_item_new
3838-awn_desktop_item_copy
3839-awn_desktop_item_get_filename
3840-awn_desktop_item_get_item_type
3841-awn_desktop_item_set_item_type
3842-awn_desktop_item_get_icon_name
3843-awn_desktop_item_set_icon_name
3844-awn_desktop_item_get_icon
3845-awn_desktop_item_get_name
3846-awn_desktop_item_set_name
3847-awn_desktop_item_get_exec
3848-awn_desktop_item_set_exec
3849-awn_desktop_item_get_string
3850-awn_desktop_item_set_string
3851-awn_desktop_item_get_localestring
3852-awn_desktop_item_set_localestring
3853-awn_desktop_item_exists
3854-awn_desktop_item_launch
3855-awn_desktop_item_save
3856-awn_desktop_item_free
3857+<FILE>awn-config</FILE>
3858+awn_config_get_default
3859+awn_config_get_default_for_applet
3860+awn_config_get_default_for_applet_by_info
3861+awn_config_free
3862 </SECTION>
3863
3864 <SECTION>
3865@@ -616,6 +514,8 @@
3866 awn_utils_ensure_transparent_bg
3867 awn_utils_make_transparent_bg
3868 awn_utils_get_offset_modifier_by_path_type
3869+awn_utils_gslist_to_gvaluearray
3870+awn_vfs_init
3871 </SECTION>
3872
3873 <SECTION>
3874@@ -638,7 +538,6 @@
3875 AwnCairoRoundCorners
3876 awn_cairo_rounded_rect
3877 awn_cairo_rounded_rect_shadow
3878-AWN_RGBA_SCALE_FACTOR
3879 awn_cairo_set_source_color
3880 awn_cairo_set_source_color_with_alpha_multiplier
3881 awn_cairo_set_source_color_with_multipliers
3882@@ -647,71 +546,6 @@
3883 </SECTION>
3884
3885 <SECTION>
3886-<FILE>eggdesktopfile</FILE>
3887-EggDesktopFileType
3888-EggDesktopFile
3889-egg_desktop_file_get_type
3890-EGG_TYPE_DESKTOP_FILE
3891-EGG_DESKTOP_FILE
3892-egg_desktop_file_new
3893-egg_desktop_file_new_from_data_dirs
3894-egg_desktop_file_new_from_key_file
3895-egg_desktop_file_copy
3896-egg_desktop_file_free
3897-egg_desktop_file_get_key_file
3898-egg_desktop_file_get_source
3899-egg_desktop_file_get_desktop_file_type
3900-egg_desktop_file_get_name
3901-egg_desktop_file_get_icon
3902-egg_desktop_file_can_launch
3903-egg_desktop_file_accepts_documents
3904-egg_desktop_file_accepts_multiple
3905-egg_desktop_file_accepts_uris
3906-egg_desktop_file_parse_exec
3907-egg_desktop_file_launch
3908-EggDesktopFileLaunchOption
3909-EGG_DESKTOP_FILE_GROUP
3910-EGG_DESKTOP_FILE_KEY_TYPE
3911-EGG_DESKTOP_FILE_KEY_VERSION
3912-EGG_DESKTOP_FILE_KEY_NAME
3913-EGG_DESKTOP_FILE_KEY_GENERIC_NAME
3914-EGG_DESKTOP_FILE_KEY_NO_DISPLAY
3915-EGG_DESKTOP_FILE_KEY_COMMENT
3916-EGG_DESKTOP_FILE_KEY_ICON
3917-EGG_DESKTOP_FILE_KEY_HIDDEN
3918-EGG_DESKTOP_FILE_KEY_ONLY_SHOW_IN
3919-EGG_DESKTOP_FILE_KEY_NOT_SHOW_IN
3920-EGG_DESKTOP_FILE_KEY_TRY_EXEC
3921-EGG_DESKTOP_FILE_KEY_EXEC
3922-EGG_DESKTOP_FILE_KEY_PATH
3923-EGG_DESKTOP_FILE_KEY_TERMINAL
3924-EGG_DESKTOP_FILE_KEY_MIME_TYPE
3925-EGG_DESKTOP_FILE_KEY_CATEGORIES
3926-EGG_DESKTOP_FILE_KEY_STARTUP_NOTIFY
3927-EGG_DESKTOP_FILE_KEY_STARTUP_WM_CLASS
3928-EGG_DESKTOP_FILE_KEY_URL
3929-EGG_DESKTOP_FILE_ERROR
3930-egg_desktop_file_error_quark
3931-EggDesktopFileError
3932-egg_set_desktop_file
3933-egg_get_desktop_file
3934-</SECTION>
3935-
3936-<SECTION>
3937-<FILE>egg-enum-types</FILE>
3938-egg_desktop_file_type_get_type
3939-EGG_TYPE_DESKTOP_FILE_TYPE
3940-egg_desktop_file_launch_option_get_type
3941-EGG_TYPE_DESKTOP_FILE_LAUNCH_OPTION
3942-egg_desktop_file_error_get_type
3943-EGG_TYPE_DESKTOP_FILE_ERROR
3944-</SECTION>
3945-
3946-<SECTION>
3947-<FILE>stamp-egg-enum-types</FILE>
3948-</SECTION>
3949-
3950-<SECTION>
3951 <FILE>awn-effect-turn</FILE>
3952 turn_hover_effect
3953 turn_effect
3954
3955=== modified file 'doc/reference/libawn.types'
3956--- doc/reference/libawn.types 2009-07-18 06:39:39 +0000
3957+++ doc/reference/libawn.types 2009-07-27 07:19:38 +0000
3958@@ -6,34 +6,22 @@
3959 awn_icon_get_type
3960 awn_applet_simple_get_type
3961 awn_overlay_pixbuf_get_type
3962-awn_config_client_get_type
3963 awn_orientation_get_type
3964 awn_applet_flags_get_type
3965 awn_applet_license_get_type
3966 awn_path_type_get_type
3967 awn_cairo_round_corners_get_type
3968-awn_config_value_type_get_type
3969-awn_config_list_type_get_type
3970-awn_config_backend_get_type
3971 awn_effect_get_type
3972 awn_overlay_align_get_type
3973-awn_vfs_monitor_event_get_type
3974-awn_vfs_monitor_type_get_type
3975 awn_overlay_progress_get_type
3976-awn_desktop_item_get_type
3977 awn_themed_icon_get_type
3978 awn_overlay_throbber_get_type
3979 awn_applet_get_type
3980 awn_effects_get_type
3981 awn_alignment_get_type
3982-awn_config_bridge_get_type
3983 awn_overlay_progress_circle_get_type
3984 awn_icon_box_get_type
3985 awn_overlay_pixbuf_file_get_type
3986 awn_overlayable_get_type
3987 awn_image_get_type
3988 awn_overlay_get_type
3989-egg_desktop_file_get_type
3990-egg_desktop_file_type_get_type
3991-egg_desktop_file_launch_option_get_type
3992-egg_desktop_file_error_get_type
3993
3994=== modified file 'libawn/Makefile.am'
3995--- libawn/Makefile.am 2009-07-18 07:00:32 +0000
3996+++ libawn/Makefile.am 2009-07-27 18:28:46 +0000
3997@@ -1,4 +1,4 @@
3998-SUBDIRS = egg anims
3999+SUBDIRS = anims
4000
4001 include $(top_srcdir)/Makefile.shave
4002 MARSHAL_PREFIX = libawn
4003@@ -33,9 +33,7 @@
4004 awn-applet.h \
4005 awn-applet-simple.h \
4006 awn-cairo-utils.h \
4007- awn-config-bridge.h \
4008- awn-config-client.h \
4009- awn-desktop-item.h \
4010+ awn-config.h \
4011 awn-dialog.h \
4012 awn-effects.h \
4013 awn-icon.h \
4014@@ -54,7 +52,6 @@
4015 awn-themed-icon.h \
4016 awn-tooltip.h \
4017 awn-utils.h \
4018- awn-vfs.h \
4019 libawn.h
4020 $(NULL)
4021
4022@@ -71,7 +68,7 @@
4023 awn-applet.c \
4024 awn-applet-simple.c \
4025 awn-cairo-utils.c \
4026- awn-config-bridge.c \
4027+ awn-config.c \
4028 awn-dialog.c \
4029 awn-effects.c \
4030 awn-effects-ops-new.c \
4031@@ -92,17 +89,8 @@
4032 awn-themed-icon.c \
4033 awn-tooltip.c \
4034 awn-utils.c \
4035- awn-vfs.c \
4036 $(NULL)
4037
4038-source_c += awn-desktop-item-egg.c
4039-
4040-if USE_GCONF
4041-source_c += awn-config-client-gconf.c
4042-else
4043-source_c += awn-config-client-gkeyfile.c
4044-endif
4045-
4046 libawninc_HEADERS = \
4047 $(public_headers) \
4048 $(NULL)
4049@@ -116,7 +104,6 @@
4050 libawn_la_LDFLAGS = -version-info 0:1:0
4051
4052 libawn_la_LIBADD += \
4053- $(top_builddir)/libawn/egg/libeggdesktopfile.la \
4054 $(top_builddir)/libawn/anims/libawn-effects-anims.la \
4055 $(NULL)
4056
4057@@ -141,6 +128,4 @@
4058
4059 CLEANFILES = $(STAMPFILES) $(BUILT_SOURCES)
4060
4061-EXTRA_DIST=awn-config-client-shared.c
4062-
4063 # vim: set ts=8 sts=8 sw=8 :
4064
4065=== modified file 'libawn/awn-cairo-utils.c'
4066--- libawn/awn-cairo-utils.c 2009-08-06 06:57:04 +0000
4067+++ libawn/awn-cairo-utils.c 2009-08-06 19:16:07 +0000
4068@@ -237,11 +237,11 @@
4069 {
4070 g_return_if_fail (color);
4071
4072- cairo_set_source_rgba (cr,
4073- desktop_agnostic_color_get_red (color) / AWN_RGBA_SCALE_FACTOR,
4074- desktop_agnostic_color_get_green (color) / AWN_RGBA_SCALE_FACTOR,
4075- desktop_agnostic_color_get_blue (color) / AWN_RGBA_SCALE_FACTOR,
4076- desktop_agnostic_color_get_alpha (color) / AWN_RGBA_SCALE_FACTOR);
4077+ double red, green, blue, alpha;
4078+
4079+ desktop_agnostic_color_get_cairo_color (color, &red, &green, &blue, &alpha);
4080+
4081+ cairo_set_source_rgba (cr, red, green, blue, alpha);
4082 }
4083
4084 void
4085@@ -252,11 +252,11 @@
4086 g_return_if_fail (color);
4087 g_return_if_fail (multiplier >= 0 && multiplier <= 1.0);
4088
4089- cairo_set_source_rgba (cr,
4090- desktop_agnostic_color_get_red (color) / AWN_RGBA_SCALE_FACTOR,
4091- desktop_agnostic_color_get_green (color) / AWN_RGBA_SCALE_FACTOR,
4092- desktop_agnostic_color_get_blue (color) / AWN_RGBA_SCALE_FACTOR,
4093- desktop_agnostic_color_get_alpha (color) / AWN_RGBA_SCALE_FACTOR * multiplier);
4094+ double red, green, blue, alpha;
4095+
4096+ desktop_agnostic_color_get_cairo_color (color, &red, &green, &blue, &alpha);
4097+
4098+ cairo_set_source_rgba (cr, red, green, blue, alpha * multiplier);
4099 }
4100
4101 void
4102@@ -267,11 +267,12 @@
4103 {
4104 g_return_if_fail (color);
4105
4106- cairo_set_source_rgba (cr,
4107- desktop_agnostic_color_get_red (color) / AWN_RGBA_SCALE_FACTOR * color_multiplier,
4108- desktop_agnostic_color_get_green (color) / AWN_RGBA_SCALE_FACTOR * color_multiplier,
4109- desktop_agnostic_color_get_blue (color) / AWN_RGBA_SCALE_FACTOR * color_multiplier,
4110- desktop_agnostic_color_get_alpha (color) / AWN_RGBA_SCALE_FACTOR * alpha_multiplier);
4111+ double red, green, blue, alpha;
4112+
4113+ desktop_agnostic_color_get_cairo_color (color, &red, &green, &blue, &alpha);
4114+
4115+ cairo_set_source_rgba (cr, red * color_multiplier, green * color_multiplier,
4116+ blue * color_multiplier, alpha * alpha_multiplier);
4117 }
4118
4119 void
4120@@ -281,11 +282,11 @@
4121 {
4122 g_return_if_fail (color);
4123
4124- cairo_pattern_add_color_stop_rgba (pattern, offset,
4125- desktop_agnostic_color_get_red (color) / AWN_RGBA_SCALE_FACTOR,
4126- desktop_agnostic_color_get_green (color) / AWN_RGBA_SCALE_FACTOR,
4127- desktop_agnostic_color_get_blue (color) / AWN_RGBA_SCALE_FACTOR,
4128- desktop_agnostic_color_get_alpha (color) / AWN_RGBA_SCALE_FACTOR);
4129+ double red, green, blue, alpha;
4130+
4131+ desktop_agnostic_color_get_cairo_color (color, &red, &green, &blue, &alpha);
4132+
4133+ cairo_pattern_add_color_stop_rgba (pattern, offset, red, green, blue, alpha);
4134 }
4135
4136 void
4137@@ -297,11 +298,12 @@
4138 g_return_if_fail (color);
4139 g_return_if_fail (multiplier >= 0 && multiplier <= 1.0);
4140
4141- cairo_pattern_add_color_stop_rgba (pattern, offset,
4142- desktop_agnostic_color_get_red (color) / AWN_RGBA_SCALE_FACTOR,
4143- desktop_agnostic_color_get_green (color) / AWN_RGBA_SCALE_FACTOR,
4144- desktop_agnostic_color_get_blue (color) / AWN_RGBA_SCALE_FACTOR,
4145- desktop_agnostic_color_get_alpha (color) / AWN_RGBA_SCALE_FACTOR * multiplier);
4146+ double red, green, blue, alpha;
4147+
4148+ desktop_agnostic_color_get_cairo_color (color, &red, &green, &blue, &alpha);
4149+
4150+ cairo_pattern_add_color_stop_rgba (pattern, offset, red, green, blue,
4151+ alpha * multiplier);
4152 }
4153
4154 /* vim: set et ts=2 sts=2 sw=2 ai cindent : */
4155
4156=== modified file 'libawn/awn-cairo-utils.h'
4157--- libawn/awn-cairo-utils.h 2009-08-01 03:51:13 +0000
4158+++ libawn/awn-cairo-utils.h 2009-08-05 04:06:09 +0000
4159@@ -58,8 +58,6 @@
4160 double radius, AwnCairoRoundCorners state,
4161 double shadow_radius, double shadow_alpha);
4162
4163-#define AWN_RGBA_SCALE_FACTOR (double)(G_MAXUSHORT)
4164-
4165 void
4166 awn_cairo_set_source_color (cairo_t *cr,
4167 DesktopAgnosticColor *color);
4168
4169=== removed file 'libawn/awn-config-bridge.c'
4170--- libawn/awn-config-bridge.c 2008-12-24 23:54:53 +0000
4171+++ libawn/awn-config-bridge.c 1970-01-01 00:00:00 +0000
4172@@ -1,317 +0,0 @@
4173-/*
4174- * Copyright (C) 2008 Neil Jagdish Patel <njpatel@gmail.com>
4175- *
4176- * This program is free software; you can redistribute it and/or modify
4177- * it under the terms of the GNU General Public License as published by
4178- * the Free Software Foundation; either version 2 of the License, or
4179- * (at your option) any later version.
4180- *
4181- * This program is distributed in the hope that it will be useful,
4182- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4183- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4184- * GNU General Public License for more details.
4185- *
4186- * You should have received a copy of the GNU General Public License
4187- * along with this program; if not, write to the Free Software
4188- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4189- *
4190- * Author : Neil Jagdish Patel <njpatel@gmail.com>
4191- *
4192- */
4193-
4194-#include "config.h"
4195-
4196-#include "awn-config-bridge.h"
4197-
4198-G_DEFINE_TYPE (AwnConfigBridge, awn_config_bridge, G_TYPE_OBJECT)
4199-
4200-#define AWN_CONFIG_BRIDGE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE (obj, \
4201- AWN_TYPE_CONFIG_BRIDGE, AwnConfigBridgePrivate))
4202-
4203-struct _AwnConfigBridgePrivate
4204-{
4205- GList *binds;
4206-};
4207-
4208-typedef struct
4209-{
4210- GObject *object;
4211- gchar *property_name;
4212- AwnConfigListType type;
4213-
4214-} AwnConfigBind;
4215-
4216-/*
4217- * FORWARDS
4218- */
4219-static void on_boolean_key_changed (AwnConfigClientNotifyEntry *entry,
4220- gpointer data);
4221-static void on_float_key_changed (AwnConfigClientNotifyEntry *entry,
4222- gpointer data);
4223-static void on_int_key_changed (AwnConfigClientNotifyEntry *entry,
4224- gpointer data);
4225-static void on_string_key_changed (AwnConfigClientNotifyEntry *entry,
4226- gpointer data);
4227-static void on_list_key_changed (AwnConfigClientNotifyEntry *entry,
4228- gpointer data);
4229-
4230-static void
4231-awn_config_bridge_dispose (GObject *object)
4232-{
4233- AwnConfigBridgePrivate *priv = AWN_CONFIG_BRIDGE_GET_PRIVATE (object);
4234- GList *b;
4235-
4236- for (b = priv->binds; b; b = b->next)
4237- {
4238- AwnConfigBind *bind = b->data;
4239-
4240- g_free (bind->property_name);
4241- g_slice_free (AwnConfigBind, bind);
4242- }
4243- g_list_free (priv->binds);
4244-
4245- G_OBJECT_CLASS (awn_config_bridge_parent_class)->dispose (object);
4246-}
4247-
4248-static void
4249-awn_config_bridge_class_init (AwnConfigBridgeClass *klass)
4250-{
4251- GObjectClass *obj_class = G_OBJECT_CLASS (klass);
4252-
4253- obj_class->dispose = awn_config_bridge_dispose;
4254-
4255- g_type_class_add_private (obj_class, sizeof (AwnConfigBridgePrivate));
4256-}
4257-
4258-
4259-static void
4260-awn_config_bridge_init (AwnConfigBridge *bridge)
4261-{
4262- AwnConfigBridgePrivate *priv;
4263-
4264- priv = bridge->priv = AWN_CONFIG_BRIDGE_GET_PRIVATE (bridge);
4265-
4266- priv->binds = NULL;
4267-}
4268-
4269-AwnConfigBridge *
4270-awn_config_bridge_get_default (void)
4271-{
4272- AwnConfigBridge *bridge = NULL;
4273-
4274- if (!bridge)
4275- bridge = g_object_new (AWN_TYPE_CONFIG_BRIDGE, NULL);
4276-
4277- return bridge;
4278-}
4279-
4280-/*
4281- * Binding function for most types
4282- */
4283-void
4284-awn_config_bridge_bind (AwnConfigBridge *bridge,
4285- AwnConfigClient *client,
4286- const gchar *group,
4287- const gchar *key,
4288- GObject *object,
4289- const gchar *property_name)
4290-{
4291- AwnConfigBridgePrivate *priv;
4292- AwnConfigBind *bind;
4293- GParamSpec *spec;
4294- gchar *string;
4295- GError *error;
4296- gboolean key_exists;
4297-
4298- g_return_if_fail (AWN_IS_CONFIG_BRIDGE (bridge));
4299- g_return_if_fail (client);
4300- g_return_if_fail (group);
4301- g_return_if_fail (key);
4302- g_return_if_fail (G_IS_OBJECT (object));
4303- g_return_if_fail (property_name);
4304- priv = bridge->priv;
4305-
4306- error = NULL;
4307-
4308- bind = g_slice_new0 (AwnConfigBind);
4309- bind->object = object;
4310- bind->property_name = g_strdup (property_name);
4311-
4312- spec = g_object_class_find_property (G_OBJECT_GET_CLASS (object),
4313- property_name);
4314-
4315- key_exists = awn_config_client_entry_exists(client, group, key);
4316-
4317- switch (G_PARAM_SPEC_VALUE_TYPE (spec))
4318- {
4319- case G_TYPE_BOOLEAN:
4320- if (key_exists) {
4321- g_object_set (object, property_name,
4322- awn_config_client_get_bool (client, group, key, &error),
4323- NULL);
4324- }
4325- awn_config_client_notify_add (client, group, key,
4326- on_boolean_key_changed, bind);
4327- break;
4328-
4329- case G_TYPE_FLOAT:
4330- case G_TYPE_DOUBLE:
4331- if (key_exists) {
4332- g_object_set (object, property_name,
4333- awn_config_client_get_float (client, group, key, &error),
4334- NULL);
4335- }
4336- awn_config_client_notify_add (client, group, key,
4337- on_float_key_changed, bind);
4338- break;
4339-
4340- case G_TYPE_INT:
4341- case G_TYPE_UINT:
4342- if (key_exists) {
4343- g_object_set (object, property_name,
4344- awn_config_client_get_int (client, group, key, &error),
4345- NULL);
4346- }
4347- awn_config_client_notify_add (client, group, key,
4348- on_int_key_changed, bind);
4349- break;
4350-
4351- case G_TYPE_STRING:
4352- string = awn_config_client_get_string (client, group, key, &error);
4353- if (key_exists) {
4354- g_object_set (object, property_name,
4355- string,
4356- NULL);
4357- }
4358- awn_config_client_notify_add (client, group, key,
4359- on_string_key_changed, bind);
4360- if (string) g_free (string);
4361- break;
4362-
4363- default:
4364- g_print ("Unable to handle type for %s\n", property_name);
4365- g_free (bind->property_name);
4366- g_slice_free (AwnConfigBind, bind);
4367- return;
4368- }
4369-
4370- if (error)
4371- {
4372- g_warning ("Error binding ConfigClient: %s\n", error->message);
4373- g_error_free (error);
4374- }
4375-
4376- priv->binds = g_list_append (priv->binds, bind);
4377-}
4378-
4379-void
4380-awn_config_bridge_bind_list (AwnConfigBridge *bridge,
4381- AwnConfigClient *client,
4382- const gchar *group,
4383- const gchar *key,
4384- AwnConfigListType list_type,
4385- GObject *object,
4386- const gchar *property_name)
4387-{
4388- AwnConfigBridgePrivate *priv;
4389- AwnConfigBind *bind;
4390- GParamSpec *spec;
4391- GSList *list;
4392-
4393-
4394- g_return_if_fail (AWN_IS_CONFIG_BRIDGE (bridge));
4395- g_return_if_fail (client);
4396- g_return_if_fail (group);
4397- g_return_if_fail (key);
4398- g_return_if_fail (G_IS_OBJECT (object));
4399- g_return_if_fail (property_name);
4400- priv = bridge->priv;
4401-
4402- bind = g_slice_new0 (AwnConfigBind);
4403- bind->object = object;
4404- bind->property_name = g_strdup (property_name);
4405- bind->type = list_type;
4406-
4407- spec = g_object_class_find_property (G_OBJECT_GET_CLASS (object),
4408- property_name);
4409-
4410- if (G_PARAM_SPEC_VALUE_TYPE (spec) != G_TYPE_POINTER)
4411- {
4412- g_warning ("Unable to bridge between lists and anything != G_TYPE_POINTER");
4413- g_free (bind->property_name);
4414- g_slice_free (AwnConfigBind, bind);
4415- return;
4416- }
4417-
4418- list = awn_config_client_get_list (client, group, key, list_type, NULL);
4419- g_object_set (object, property_name, list, NULL);
4420-
4421- awn_config_client_notify_add (client, group, key, on_list_key_changed, bind);
4422-
4423- priv->binds = g_list_append (priv->binds, bind);
4424-}
4425-
4426-static void
4427-on_boolean_key_changed (AwnConfigClientNotifyEntry *entry,
4428- gpointer data)
4429-{
4430- AwnConfigBind *bind = (AwnConfigBind*)data;
4431-
4432- g_return_if_fail (bind);
4433-
4434- g_object_set (bind->object,
4435- bind->property_name, entry->value.bool_val,
4436- NULL);
4437-}
4438-
4439-static void
4440-on_float_key_changed (AwnConfigClientNotifyEntry *entry,
4441- gpointer data)
4442-{
4443- AwnConfigBind *bind = (AwnConfigBind*)data;
4444-
4445- g_return_if_fail (bind);
4446-
4447- g_object_set (bind->object,
4448- bind->property_name, entry->value.float_val,
4449- NULL);
4450-}
4451-
4452-static void
4453-on_int_key_changed (AwnConfigClientNotifyEntry *entry,
4454- gpointer data)
4455-{
4456- AwnConfigBind *bind = (AwnConfigBind*)data;
4457-
4458- g_return_if_fail (bind);
4459-
4460- g_object_set (bind->object,
4461- bind->property_name, entry->value.int_val,
4462- NULL);
4463-}
4464-
4465-static void
4466-on_string_key_changed (AwnConfigClientNotifyEntry *entry,
4467- gpointer data)
4468-{
4469- AwnConfigBind *bind = (AwnConfigBind*)data;
4470-
4471- g_return_if_fail (bind);
4472-
4473- g_object_set (bind->object,
4474- bind->property_name, entry->value.str_val,
4475- NULL);
4476-}
4477-
4478-static void
4479-on_list_key_changed (AwnConfigClientNotifyEntry *entry,
4480- gpointer data)
4481-{
4482- AwnConfigBind *bind = (AwnConfigBind*)data;
4483-
4484- g_return_if_fail (bind);
4485-
4486- g_object_set (bind->object,
4487- bind->property_name, entry->value.list_val,
4488- NULL);
4489-}
4490
4491=== removed file 'libawn/awn-config-bridge.h'
4492--- libawn/awn-config-bridge.h 2008-09-27 18:44:29 +0000
4493+++ libawn/awn-config-bridge.h 1970-01-01 00:00:00 +0000
4494@@ -1,86 +0,0 @@
4495-/*
4496- * Copyright (C) 2008 Neil Jagdish Patel <njpatel@gmail.com>
4497- *
4498- * This program is free software; you can redistribute it and/or modify
4499- * it under the terms of the GNU General Public License as published by
4500- * the Free Software Foundation; either version 2 of the License, or
4501- * (at your option) any later version.
4502- *
4503- * This program is distributed in the hope that it will be useful,
4504- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4505- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4506- * GNU General Public License for more details.
4507- *
4508- * You should have received a copy of the GNU General Public License
4509- * along with this program; if not, write to the Free Software
4510- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4511- *
4512- * Author : Neil Jagdish Patel <njpatel@gmail.com>
4513-*/
4514-
4515-#ifndef _AWN_CONFIG_BRIDGE_H
4516-#define _AWN_CONFIG_BRIDGE_H
4517-
4518-#include <glib.h>
4519-#include <glib-object.h>
4520-
4521-#include <libawn/awn-config-client.h>
4522-
4523-G_BEGIN_DECLS
4524-
4525-#define AWN_TYPE_CONFIG_BRIDGE (awn_config_bridge_get_type())
4526-
4527-#define AWN_CONFIG_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AWN_TYPE_CONFIG_BRIDGE, \
4528- AwnConfigBridge))
4529-
4530-#define AWN_CONFIG_BRIDGE_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), AWN_TYPE_CONFIG_BRIDGE, \
4531- AwnConfigBridgeClass))
4532-
4533-#define AWN_IS_CONFIG_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AWN_TYPE_CONFIG_BRIDGE))
4534-
4535-#define AWN_IS_CONFIG_BRIDGE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), \
4536- AWN_TYPE_CONFIG_BRIDGE))
4537-
4538-#define AWN_CONFIG_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
4539- AWN_TYPE_CONFIG_BRIDGE, AwnConfigBridgeClass))
4540-
4541-typedef struct _AwnConfigBridge AwnConfigBridge;
4542-typedef struct _AwnConfigBridgeClass AwnConfigBridgeClass;
4543-typedef struct _AwnConfigBridgePrivate AwnConfigBridgePrivate;
4544-
4545-struct _AwnConfigBridge
4546-{
4547- GObject parent;
4548-
4549- AwnConfigBridgePrivate *priv;
4550-};
4551-
4552-struct _AwnConfigBridgeClass
4553-{
4554- GObjectClass parent_class;
4555-};
4556-
4557-GType awn_config_bridge_get_type (void) G_GNUC_CONST;
4558-
4559-AwnConfigBridge * awn_config_bridge_get_default (void);
4560-
4561-void awn_config_bridge_bind (AwnConfigBridge *bridge,
4562- AwnConfigClient *client,
4563- const gchar *group,
4564- const gchar *key,
4565- GObject *object,
4566- const gchar *prop_name);
4567-
4568-void awn_config_bridge_bind_list (AwnConfigBridge *bridge,
4569- AwnConfigClient *client,
4570- const gchar *group,
4571- const gchar *key,
4572- AwnConfigListType list_type,
4573- GObject *object,
4574- const gchar *prop_name);
4575-
4576-
4577-G_END_DECLS
4578-
4579-#endif /* _AWN_CONFIG_BRIDGE_H */
4580-
4581
4582=== removed file 'libawn/awn-config-client-gconf.c'
4583--- libawn/awn-config-client-gconf.c 2009-05-25 02:12:33 +0000
4584+++ libawn/awn-config-client-gconf.c 1970-01-01 00:00:00 +0000
4585@@ -1,509 +0,0 @@
4586-/*
4587- * Copyright (C) 2007, 2008 Mark Lee <avant-wn@lazymalevolence.com>
4588- *
4589- * This library is free software; you can redistribute it and/or
4590- * modify it under the terms of the GNU Lesser General Public
4591- * License as published by the Free Software Foundation; either
4592- * version 2 of the License, or (at your option) any later version.
4593- *
4594- * This library is distributed in the hope that it will be useful,
4595- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4596- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4597- * Lesser General Public License for more details.
4598- *
4599- * You should have received a copy of the GNU Lesser General Public
4600- * License along with this library; if not, write to the
4601- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
4602- * Boston, MA 02111-1307, USA.
4603- *
4604- * Author : Mark Lee <avant-wn@lazymalevolence.com>
4605- */
4606-
4607-#ifdef HAVE_CONFIG_H
4608-#include <config.h>
4609-#endif
4610-
4611-#include <glib.h>
4612-#ifdef HAVE_UNISTD_H
4613-#include <unistd.h>
4614-#endif
4615-
4616-#include <gconf/gconf-client.h>
4617-
4618-#include "libawn/awn-config-client.h"
4619-#include "libawn/awn-defines.h"
4620-#include "awn-config-client-shared.c"
4621-
4622-struct _AwnConfigClient
4623-{
4624- GConfClient *client;
4625- gchar *path; /* key prefix */
4626-};
4627-
4628-typedef struct
4629-{
4630- AwnConfigClient *client;
4631- AwnConfigClientNotifyFunc callback;
4632- gpointer data;
4633-} AwnConfigClientNotifyData;
4634-
4635-/* returns a newly allocated string */
4636-static gchar *
4637-awn_config_client_generate_key (AwnConfigClient *client,
4638- const gchar *group,
4639- const gchar *key)
4640-{
4641- if (key == NULL)
4642- {
4643- if (strcmp (group, AWN_CONFIG_CLIENT_DEFAULT_GROUP) == 0) {
4644- return g_strdup (client->path);
4645- }
4646- else
4647- {
4648- return g_strconcat (client->path, "/", group, NULL);
4649- }
4650- }
4651- else
4652- {
4653- if (strcmp (group, AWN_CONFIG_CLIENT_DEFAULT_GROUP) == 0)
4654- {
4655- return g_strconcat (client->path, "/", key, NULL);
4656- }
4657- else
4658- {
4659- return g_strconcat (client->path, "/", group, "/", key, NULL);
4660- }
4661- }
4662-}
4663-
4664-static void
4665-awn_config_client_notify_proxy (GConfClient *client,
4666- guint cid,
4667- GConfEntry *entry,
4668- AwnConfigClientNotifyData *notify)
4669-{
4670- AwnConfigClientNotifyEntry *awn_entry = g_new (AwnConfigClientNotifyEntry, 1);
4671- GConfValue *value = NULL;
4672- value = gconf_entry_get_value (entry);
4673-
4674- if (value)
4675- {
4676- gchar **exploded = g_strsplit (gconf_entry_get_key (entry), "/", 0);
4677- guint exploded_len = g_strv_length (exploded);
4678- gchar **base_exploded = g_strsplit (notify->client->path, "/", 0);
4679- guint base_exploded_len = g_strv_length (base_exploded);
4680- g_strfreev (base_exploded);
4681- g_return_if_fail (exploded_len >= 2);
4682- awn_entry->client = notify->client;
4683-
4684- if (exploded_len - base_exploded_len == 1)
4685- {
4686- /* special case: top-level dock/applet keys */
4687- awn_entry->group = g_strdup (AWN_CONFIG_CLIENT_DEFAULT_GROUP);
4688- }
4689- else
4690- {
4691- awn_entry->group = g_strdup (exploded[exploded_len - 2]);
4692- }
4693- awn_entry->key = g_strdup (exploded[exploded_len - 1]);
4694- g_strfreev (exploded);
4695-
4696- switch (value->type)
4697- {
4698- case GCONF_VALUE_BOOL:
4699- awn_entry->value.bool_val = gconf_value_get_bool (value);
4700- break;
4701- case GCONF_VALUE_FLOAT:
4702- awn_entry->value.float_val = (gfloat)gconf_value_get_float (value);
4703- break;
4704- case GCONF_VALUE_INT:
4705- awn_entry->value.int_val = gconf_value_get_int (value);
4706- break;
4707- case GCONF_VALUE_LIST:
4708- awn_entry->value.list_val = gconf_client_get_list (client, entry->key, gconf_value_get_list_type (value), NULL);
4709- break;
4710- case GCONF_VALUE_STRING:
4711- awn_entry->value.str_val = (gchar*)gconf_value_get_string (value);
4712- break;
4713- default:
4714- /* FIXME do an error? */
4715- g_warning ("Invalid GConf value type!");
4716- break;
4717- }
4718- (notify->callback) (awn_entry, notify->data);
4719- g_free (awn_entry->group);
4720- g_free (awn_entry->key);
4721- }
4722- g_free (awn_entry);
4723-}
4724-
4725-static AwnConfigClient *
4726-awn_config_client_new_with_path (const gchar *path, const gchar *name)
4727-{
4728- AwnConfigClient *client = g_new (AwnConfigClient, 1);
4729- client->path = g_strdup (path);
4730- client->client = gconf_client_get_default ();
4731-
4732- if (!gconf_client_dir_exists (client->client, client->path, NULL))
4733- {
4734- GError *err = NULL;
4735- awn_config_client_load_defaults_from_schema (client, &err);
4736- if (err)
4737- {
4738- g_error ("Error loading the schema: '%s'", err->message);
4739- g_error_free (err);
4740- }
4741- }
4742- gconf_client_add_dir (client->client, AWN_GCONF_PATH, GCONF_CLIENT_PRELOAD_NONE, NULL);
4743- return client;
4744-}
4745-
4746-AwnConfigClient *
4747-awn_config_client_new ()
4748-{
4749- static AwnConfigClient *awn_dock_config = NULL;
4750- if (!awn_dock_config)
4751- {
4752- awn_dock_config = awn_config_client_new_with_path (AWN_GCONF_PATH, NULL);
4753- }
4754- return awn_dock_config;
4755-}
4756-
4757-static void
4758-_associate_schemas_in_dir (GConfClient *client,
4759- const gchar *prefs_key,
4760- const gchar *schema_dir,
4761- GError **error)
4762-{
4763- GSList *list, *l;
4764-
4765- list = gconf_client_all_entries (client, schema_dir, error);
4766-
4767- if (error)
4768- {
4769- g_return_if_fail (*error == NULL);
4770- }
4771-
4772- for (l = list; l; l = l->next)
4773- {
4774- GConfEntry *entry = l->data;
4775- gchar *key;
4776- gchar *tmp;
4777-
4778- tmp = g_path_get_basename (gconf_entry_get_key (entry));
4779-
4780- if (strchr (tmp, '-'))
4781- g_warning ("Applet key '%s' contains a hyphen. Please "
4782- "use underscores in gconf keys\n", tmp);
4783-
4784- key = g_strdup_printf ("%s/%s", prefs_key, tmp);
4785-
4786- g_free (tmp);
4787-
4788- gconf_engine_associate_schema (
4789- client->engine, key, gconf_entry_get_key (entry), error);
4790-
4791- g_free (key);
4792-
4793- gconf_entry_free (entry);
4794-
4795- if (error && *error)
4796- {
4797- g_slist_free (list);
4798- return;
4799- }
4800- }
4801-
4802- g_slist_free (list);
4803-
4804- list = gconf_client_all_dirs (client, schema_dir, error);
4805-
4806- for (l = list; l; l = l->next)
4807- {
4808- gchar *subdir = l->data;
4809- gchar *prefs_subdir;
4810- gchar *schema_subdir;
4811- gchar *tmp;
4812-
4813- tmp = g_path_get_basename (subdir);
4814-
4815- prefs_subdir = g_strdup_printf ("%s/%s", prefs_key, tmp);
4816- schema_subdir = g_strdup_printf ("%s/%s", schema_dir, tmp);
4817-
4818- _associate_schemas_in_dir (
4819- client, prefs_subdir, schema_subdir, error);
4820-
4821- g_free (prefs_subdir);
4822- g_free (schema_subdir);
4823- g_free (subdir);
4824- g_free (tmp);
4825-
4826- if (error && *error)
4827- {
4828- g_slist_free (list);
4829- return;
4830- }
4831- }
4832-
4833- g_slist_free (list);
4834-}
4835-
4836-AwnConfigClient *
4837-awn_config_client_new_for_applet (const gchar *name, const gchar *uid)
4838-{
4839- AwnConfigClient *client;
4840- gchar *gconf_key = NULL;
4841-
4842- g_return_val_if_fail (name, NULL);
4843-
4844- if (uid)
4845- {
4846- GConfClient *c;
4847-
4848- gconf_key = g_strconcat (AWN_GCONF_PATH, "/applets/", uid, NULL);
4849-
4850- /* Check if the dir exists, and if not, apply the applet schema to it */
4851- c = gconf_client_get_default ();
4852- if (!gconf_client_dir_exists (c, gconf_key, NULL))
4853- {
4854- gchar *schema_key = g_strconcat (AWN_GCONF_PATH, "/applets/", name,NULL);
4855- _associate_schemas_in_dir (c, gconf_key, schema_key, NULL);
4856- g_free (schema_key);
4857- }
4858- g_object_unref (c);
4859- }
4860- else
4861- {
4862- gconf_key = g_strconcat (AWN_GCONF_PATH, "/applets/", name, NULL);
4863- }
4864-
4865- client = awn_config_client_new_with_path (gconf_key, name);
4866- g_free (gconf_key);
4867-
4868- return client;
4869-}
4870-
4871-/**
4872- * awn_config_client_query_backend :
4873- *
4874- * Returns: An enum value indicating the backend in use.
4875- */
4876-AwnConfigBackend awn_config_client_query_backend (void)
4877-{
4878- return AWN_CONFIG_CLIENT_GKEYFILE;
4879-}
4880-
4881-
4882-void awn_config_client_clear (AwnConfigClient *client, GError **err)
4883-{
4884- /* only do it for applets on gconf */
4885- if (strcmp (AWN_GCONF_PATH, client->path) != 0) {
4886- gconf_client_remove_dir (client->client, client->path, err);
4887- }
4888-}
4889-
4890-void awn_config_client_ensure_group (AwnConfigClient *client, const gchar *group)
4891-{
4892- gchar *gconf_key = awn_config_client_generate_key (client, group, NULL);
4893- if (!gconf_client_dir_exists (client->client, gconf_key, NULL)) {
4894- gconf_client_add_dir (client->client, gconf_key, GCONF_CLIENT_PRELOAD_NONE, NULL);
4895- }
4896- g_free (gconf_key);
4897-}
4898-
4899-void awn_config_client_notify_add (AwnConfigClient *client, const gchar *group,
4900- const gchar *key, AwnConfigClientNotifyFunc callback,
4901- gpointer user_data)
4902-{
4903- AwnConfigClientNotifyData *notify = g_new0 (AwnConfigClientNotifyData, 1);
4904- notify->callback = callback;
4905- notify->data = user_data;
4906- gchar *full_key = awn_config_client_generate_key (client, group, key);
4907- notify->client = client;
4908- GError *err = NULL;
4909- guint notify_id = gconf_client_notify_add (client->client, full_key, (GConfClientNotifyFunc)awn_config_client_notify_proxy, notify, NULL, &err);
4910- if (notify_id == 0 || err) {
4911- g_warning ("Something went wrong when we tried to add a notification callback: %s", err->message);
4912- g_error_free (err);
4913- }
4914- g_free (full_key);
4915-}
4916-
4917-gboolean awn_config_client_entry_exists (AwnConfigClient *client, const gchar *group, const gchar *key)
4918-{
4919- GConfValue *value = NULL;
4920- gchar *gconf_key = awn_config_client_generate_key (client, group, key);
4921- value = gconf_client_get (client->client, gconf_key, NULL);
4922- g_free (gconf_key);
4923- return value != NULL;
4924-}
4925-
4926-void awn_config_client_load_defaults_from_schema (AwnConfigClient *client, GError **err)
4927-{
4928- (void)g_spawn_command_line_async ("killall -HUP gconfd-2", err);
4929-}
4930-
4931-AwnConfigValueType awn_config_client_get_value_type (AwnConfigClient *client, const gchar *group, const gchar *key, GError **err)
4932-{
4933- AwnConfigValueType value_type;
4934- gchar *gconf_key = awn_config_client_generate_key (client, group, key);
4935- GConfValue *value = gconf_client_get (client->client, gconf_key, err);
4936- if (value) {
4937- switch (value->type) {
4938- case GCONF_VALUE_BOOL:
4939- value_type = AWN_CONFIG_VALUE_TYPE_BOOL;
4940- break;
4941- case GCONF_VALUE_FLOAT:
4942- value_type = AWN_CONFIG_VALUE_TYPE_FLOAT;
4943- break;
4944- case GCONF_VALUE_INT:
4945- value_type = AWN_CONFIG_VALUE_TYPE_INT;
4946- break;
4947- case GCONF_VALUE_STRING:
4948- value_type = AWN_CONFIG_VALUE_TYPE_STRING;
4949- break;
4950- case GCONF_VALUE_LIST: {
4951- switch (gconf_value_get_list_type (value)) {
4952- case GCONF_VALUE_BOOL:
4953- value_type = AWN_CONFIG_VALUE_TYPE_LIST_BOOL;
4954- break;
4955- case GCONF_VALUE_FLOAT:
4956- value_type = AWN_CONFIG_VALUE_TYPE_LIST_FLOAT;
4957- break;
4958- case GCONF_VALUE_INT:
4959- value_type = AWN_CONFIG_CLIENT_LIST_TYPE_INT;
4960- break;
4961- case GCONF_VALUE_STRING:
4962- value_type = AWN_CONFIG_VALUE_TYPE_LIST_STRING;
4963- break;
4964- default:
4965- value_type = AWN_CONFIG_VALUE_TYPE_NULL;
4966- break;
4967- }
4968- break;
4969- } default:
4970- value_type = AWN_CONFIG_VALUE_TYPE_NULL;
4971- break;
4972- }
4973- } else {
4974- value_type = AWN_CONFIG_VALUE_TYPE_NULL;
4975- }
4976- g_free (gconf_key);
4977- return value_type;
4978-}
4979-
4980-gboolean awn_config_client_get_bool (AwnConfigClient *client, const gchar *group, const gchar *key, GError **err)
4981-{
4982- gchar *gconf_key = awn_config_client_generate_key (client, group, key);
4983- gboolean value = gconf_client_get_bool (client->client, gconf_key, err);
4984- g_free (gconf_key);
4985- return value;
4986-}
4987-
4988-void awn_config_client_set_bool (AwnConfigClient *client, const gchar *group, const gchar *key, gboolean value, GError **err)
4989-{
4990- gchar *full_key = awn_config_client_generate_key (client, group, key);
4991- gconf_client_set_bool (client->client, full_key, value, err);
4992- g_free (full_key);
4993-}
4994-
4995-gfloat awn_config_client_get_float (AwnConfigClient *client, const gchar *group, const gchar *key, GError **err)
4996-{
4997- gchar *gconf_key = awn_config_client_generate_key (client, group, key);
4998- gfloat value = gconf_client_get_float (client->client, gconf_key, err);
4999- g_free (gconf_key);
5000- return value;
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: