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