Merge lp:~zartan/cairo-dock-plug-ins/wikipedia into lp:~cairo-dock-team/cairo-dock-plug-ins/plug-ins
- wikipedia
- Merge into plug-ins
Status: | Needs review |
---|---|
Proposed branch: | lp:~zartan/cairo-dock-plug-ins/wikipedia |
Merge into: | lp:~cairo-dock-team/cairo-dock-plug-ins/plug-ins |
Diff against target: |
2142 lines (+2047/-0) 17 files modified
wikipedia/Makefile.am (+3/-0) wikipedia/configure.ac (+34/-0) wikipedia/data/Gnome-dictionary.svg (+296/-0) wikipedia/data/Makefile.am (+15/-0) wikipedia/data/langues.dat (+267/-0) wikipedia/data/loading.html (+2/-0) wikipedia/data/wikipedia.conf.in (+140/-0) wikipedia/src/Makefile.am (+43/-0) wikipedia/src/applet-config.c (+91/-0) wikipedia/src/applet-config.h (+30/-0) wikipedia/src/applet-init.c (+104/-0) wikipedia/src/applet-init.h (+31/-0) wikipedia/src/applet-notifications.c (+47/-0) wikipedia/src/applet-notifications.h (+34/-0) wikipedia/src/applet-struct.h (+75/-0) wikipedia/src/applet-wikipedia.c (+791/-0) wikipedia/src/applet-wikipedia.h (+44/-0) |
To merge this branch: | bzr merge lp:~zartan/cairo-dock-plug-ins/wikipedia |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Cairo-Dock Devs | Pending | ||
Review via email: mp+16195@code.launchpad.net |
Commit message
Description of the change
- 1449. By Fabounet (Fabrice Rey) - http://cairo-dock.org
-
start to use CD_APPLET_ENTER and CD_APPLET_LEAVE
- 1450. By Fabounet (Fabrice Rey) - http://cairo-dock.org
-
show-desktop : added the ability to change the screen resolution + use the debug macro i some applets + Network-Monitor : added the netspeed default backend (in progress)
- 1451. By Matth <mbaerts@Matth>
-
mtasaka: patch needed to enable showDesklets | Added RssReader in copyright
- 1452. By Fabounet (Fabrice Rey) - http://cairo-dock.org
-
wifi : fix to retrieve the ESSID and Access Point
- 1453. By Fabounet (Fabrice Rey) - http://cairo-dock.org
-
merged wifi and netspeed, scroll on the icon switches from one to the other
- 1454. By Matth <mbaerts@Matth>
-
ShowDesktop : little correction in config panel + updated the version
- 1455. By Matth <mbaerts@Matth>
-
DND2SHARE : added a 'Paste' button + icons for 'Clean History'
- 1456. By Fabounet (Fabrice Rey) - http://cairo-dock.org
-
got SSID and the list of access point
- 1457. By Matth <mbaerts@Matth>
-
Updated translations : Thanks to all contributors !
- 1458. By Fabounet (Fabrice Rey) - http://cairo-dock.org
-
I'm back :-)
- 1459. By Fabounet (Fabrice Rey) - http://cairo-dock.org
-
fixed the internet caracters that appeared with some crazy sites
- 1460. By Fabounet (Fabrice Rey) - http://cairo-dock.org
-
smoother cube rotation
- 1461. By Fabounet (Fabrice Rey) - http://cairo-dock.org
-
weather : decreased the connection timeout
- 1462. By zartan
-
corrections
- 1463. By zartan
-
corections bugs
- 1464. By zartan
-
ctrl F9
- 1465. By zartan
-
corections bugs
- 1466. By zartan
-
shortkey ctrl-F9 par defaut
Preview Diff
1 | === added directory 'wikipedia' | |||
2 | === added file 'wikipedia/Makefile.am' | |||
3 | --- wikipedia/Makefile.am 1970-01-01 00:00:00 +0000 | |||
4 | +++ wikipedia/Makefile.am 2010-01-02 11:50:25 +0000 | |||
5 | @@ -0,0 +1,3 @@ | |||
6 | 1 | #dnl Process this file with automake to produce Makefile.in | ||
7 | 2 | |||
8 | 3 | SUBDIRS = . src data | ||
9 | 0 | 4 | ||
10 | === added file 'wikipedia/configure.ac' | |||
11 | --- wikipedia/configure.ac 1970-01-01 00:00:00 +0000 | |||
12 | +++ wikipedia/configure.ac 2010-01-02 11:50:25 +0000 | |||
13 | @@ -0,0 +1,34 @@ | |||
14 | 1 | # -*- Autoconf -*- | ||
15 | 2 | # Process this file with autoconf to produce a configure script. | ||
16 | 3 | |||
17 | 4 | AC_PREREQ(2.59) | ||
18 | 5 | AC_INIT([cd-wikipedia],[0.0.18],[zartan (alain.laclef@free.fr)]) | ||
19 | 6 | AC_CONFIG_SRCDIR([config.h.in]) | ||
20 | 7 | AC_CONFIG_HEADER([config.h]) | ||
21 | 8 | |||
22 | 9 | AM_INIT_AUTOMAKE([foreign]) | ||
23 | 10 | AC_DISABLE_STATIC | ||
24 | 11 | AC_PROG_LIBTOOL | ||
25 | 12 | |||
26 | 13 | |||
27 | 14 | AC_SUBST(VERSION_WIKIPEDIA, "$VERSION") | ||
28 | 15 | AC_SUBST(PACKAGE_WIKIPEDIA, "$PACKAGE") | ||
29 | 16 | |||
30 | 17 | wikipediauserdirname="wikipedia" | ||
31 | 18 | AC_SUBST(wikipediauserdirname) | ||
32 | 19 | wikipediadatadir=[`pkg-config cairo-dock --variable=pluginsdatadir`/wikipedia] | ||
33 | 20 | AC_SUBST(wikipediadatadir) | ||
34 | 21 | libdir=[`pkg-config cairo-dock --variable=pluginsdir`] | ||
35 | 22 | AC_SUBST(libdir) | ||
36 | 23 | |||
37 | 24 | PKG_CHECK_MODULES(PACKAGE, cairo-dock) | ||
38 | 25 | |||
39 | 26 | PKG_CHECK_MODULES(WEBKIT,webkit-1.0, [webkit_detected=true], [ webkit_detected=false; AC_MSG_ERROR(Could not find webkit-1.0; Wikipedia plugin requires webkit to be installed.) ]) | ||
40 | 27 | AC_SUBST(WEBKIT_CFLAGS) | ||
41 | 28 | AC_SUBST(WEBKIT_LIBS) | ||
42 | 29 | |||
43 | 30 | AC_CONFIG_FILES([Makefile | ||
44 | 31 | src/Makefile | ||
45 | 32 | data/Makefile | ||
46 | 33 | data/wikipedia.conf]) | ||
47 | 34 | AC_OUTPUT | ||
48 | 0 | 35 | ||
49 | === added directory 'wikipedia/data' | |||
50 | === added file 'wikipedia/data/Gnome-dictionary.svg' | |||
51 | --- wikipedia/data/Gnome-dictionary.svg 1970-01-01 00:00:00 +0000 | |||
52 | +++ wikipedia/data/Gnome-dictionary.svg 2010-01-02 11:50:25 +0000 | |||
53 | @@ -0,0 +1,296 @@ | |||
54 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
55 | 2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
56 | 3 | <svg | ||
57 | 4 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
58 | 5 | xmlns:cc="http://web.resource.org/cc/" | ||
59 | 6 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
60 | 7 | xmlns:svg="http://www.w3.org/2000/svg" | ||
61 | 8 | xmlns="http://www.w3.org/2000/svg" | ||
62 | 9 | xmlns:xlink="http://www.w3.org/1999/xlink" | ||
63 | 10 | xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" | ||
64 | 11 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
65 | 12 | width="48px" | ||
66 | 13 | height="48px" | ||
67 | 14 | id="svg1307" | ||
68 | 15 | sodipodi:version="0.32" | ||
69 | 16 | inkscape:version="0.43" | ||
70 | 17 | sodipodi:docname="gnome-dictionary.svg" | ||
71 | 18 | inkscape:export-xdpi="90" | ||
72 | 19 | inkscape:export-ydpi="90"> | ||
73 | 20 | <defs | ||
74 | 21 | id="defs1309"> | ||
75 | 22 | <linearGradient | ||
76 | 23 | inkscape:collect="always" | ||
77 | 24 | id="linearGradient15424"> | ||
78 | 25 | <stop | ||
79 | 26 | style="stop-color:#729fcf;stop-opacity:1;" | ||
80 | 27 | offset="0" | ||
81 | 28 | id="stop15426" /> | ||
82 | 29 | <stop | ||
83 | 30 | style="stop-color:#729fcf;stop-opacity:0;" | ||
84 | 31 | offset="1" | ||
85 | 32 | id="stop15428" /> | ||
86 | 33 | </linearGradient> | ||
87 | 34 | <linearGradient | ||
88 | 35 | id="linearGradient11002"> | ||
89 | 36 | <stop | ||
90 | 37 | style="stop-color:#eeeeee;stop-opacity:1;" | ||
91 | 38 | offset="0" | ||
92 | 39 | id="stop11004" /> | ||
93 | 40 | <stop | ||
94 | 41 | style="stop-color:#d3d7cf;stop-opacity:1;" | ||
95 | 42 | offset="1" | ||
96 | 43 | id="stop11006" /> | ||
97 | 44 | </linearGradient> | ||
98 | 45 | <linearGradient | ||
99 | 46 | id="linearGradient7492"> | ||
100 | 47 | <stop | ||
101 | 48 | style="stop-color:#a40000;stop-opacity:1;" | ||
102 | 49 | offset="0" | ||
103 | 50 | id="stop7494" /> | ||
104 | 51 | <stop | ||
105 | 52 | style="stop-color:#cc0000;stop-opacity:0.74509805;" | ||
106 | 53 | offset="1" | ||
107 | 54 | id="stop7496" /> | ||
108 | 55 | </linearGradient> | ||
109 | 56 | <linearGradient | ||
110 | 57 | id="linearGradient7484"> | ||
111 | 58 | <stop | ||
112 | 59 | style="stop-color:#cc0000;stop-opacity:1;" | ||
113 | 60 | offset="0" | ||
114 | 61 | id="stop7486" /> | ||
115 | 62 | <stop | ||
116 | 63 | style="stop-color:#cc0000;stop-opacity:1;" | ||
117 | 64 | offset="1" | ||
118 | 65 | id="stop7488" /> | ||
119 | 66 | </linearGradient> | ||
120 | 67 | <linearGradient | ||
121 | 68 | inkscape:collect="always" | ||
122 | 69 | id="linearGradient5722"> | ||
123 | 70 | <stop | ||
124 | 71 | style="stop-color:#729fcf;stop-opacity:1;" | ||
125 | 72 | offset="0" | ||
126 | 73 | id="stop5724" /> | ||
127 | 74 | <stop | ||
128 | 75 | style="stop-color:#729fcf;stop-opacity:0;" | ||
129 | 76 | offset="1" | ||
130 | 77 | id="stop5726" /> | ||
131 | 78 | </linearGradient> | ||
132 | 79 | <linearGradient | ||
133 | 80 | id="linearGradient3077"> | ||
134 | 81 | <stop | ||
135 | 82 | style="stop-color:#3465a4;stop-opacity:1;" | ||
136 | 83 | offset="0" | ||
137 | 84 | id="stop3079" /> | ||
138 | 85 | <stop | ||
139 | 86 | style="stop-color:#3465a4;stop-opacity:0;" | ||
140 | 87 | offset="1" | ||
141 | 88 | id="stop3081" /> | ||
142 | 89 | </linearGradient> | ||
143 | 90 | <linearGradient | ||
144 | 91 | inkscape:collect="always" | ||
145 | 92 | xlink:href="#linearGradient5722" | ||
146 | 93 | id="linearGradient5728" | ||
147 | 94 | x1="45" | ||
148 | 95 | y1="34.184055" | ||
149 | 96 | x2="7.8263865" | ||
150 | 97 | y2="5.1271901" | ||
151 | 98 | gradientUnits="userSpaceOnUse" | ||
152 | 99 | gradientTransform="matrix(1,0,0,0.963894,0,1.234246)" /> | ||
153 | 100 | <linearGradient | ||
154 | 101 | inkscape:collect="always" | ||
155 | 102 | xlink:href="#linearGradient7492" | ||
156 | 103 | id="linearGradient7498" | ||
157 | 104 | x1="45.402073" | ||
158 | 105 | y1="32.607113" | ||
159 | 106 | x2="8.1801958" | ||
160 | 107 | y2="7" | ||
161 | 108 | gradientUnits="userSpaceOnUse" | ||
162 | 109 | gradientTransform="matrix(0.92971,0,0,1,2.031898,1)" /> | ||
163 | 110 | <linearGradient | ||
164 | 111 | inkscape:collect="always" | ||
165 | 112 | xlink:href="#linearGradient11002" | ||
166 | 113 | id="linearGradient12780" | ||
167 | 114 | gradientUnits="userSpaceOnUse" | ||
168 | 115 | gradientTransform="matrix(1,0,0,0.800658,-1.049033e-8,7.880118)" | ||
169 | 116 | x1="3.6162441" | ||
170 | 117 | y1="43.778091" | ||
171 | 118 | x2="43.494923" | ||
172 | 119 | y2="35.142323" /> | ||
173 | 120 | <linearGradient | ||
174 | 121 | inkscape:collect="always" | ||
175 | 122 | xlink:href="#linearGradient15424" | ||
176 | 123 | id="linearGradient15430" | ||
177 | 124 | x1="42.706234" | ||
178 | 125 | y1="32.362251" | ||
179 | 126 | x2="3.0072398" | ||
180 | 127 | y2="2.8657963" | ||
181 | 128 | gradientUnits="userSpaceOnUse" /> | ||
182 | 129 | <linearGradient | ||
183 | 130 | inkscape:collect="always" | ||
184 | 131 | xlink:href="#linearGradient11002" | ||
185 | 132 | id="linearGradient15455" | ||
186 | 133 | gradientUnits="userSpaceOnUse" | ||
187 | 134 | gradientTransform="matrix(1,0,0,0.800658,-1.049033e-8,7.880118)" | ||
188 | 135 | x1="3.6162441" | ||
189 | 136 | y1="43.778091" | ||
190 | 137 | x2="43.494923" | ||
191 | 138 | y2="35.142323" /> | ||
192 | 139 | <linearGradient | ||
193 | 140 | inkscape:collect="always" | ||
194 | 141 | xlink:href="#linearGradient15424" | ||
195 | 142 | id="linearGradient15457" | ||
196 | 143 | gradientUnits="userSpaceOnUse" | ||
197 | 144 | x1="42.706234" | ||
198 | 145 | y1="32.362251" | ||
199 | 146 | x2="3.0072398" | ||
200 | 147 | y2="2.8657963" /> | ||
201 | 148 | <linearGradient | ||
202 | 149 | inkscape:collect="always" | ||
203 | 150 | xlink:href="#linearGradient5722" | ||
204 | 151 | id="linearGradient15459" | ||
205 | 152 | gradientUnits="userSpaceOnUse" | ||
206 | 153 | gradientTransform="matrix(1,0,0,0.963894,3.261281e-16,1.234246)" | ||
207 | 154 | x1="45" | ||
208 | 155 | y1="34.184055" | ||
209 | 156 | x2="7.8263865" | ||
210 | 157 | y2="5.1271901" /> | ||
211 | 158 | <linearGradient | ||
212 | 159 | inkscape:collect="always" | ||
213 | 160 | xlink:href="#linearGradient7492" | ||
214 | 161 | id="linearGradient15461" | ||
215 | 162 | gradientUnits="userSpaceOnUse" | ||
216 | 163 | gradientTransform="matrix(0.92971,0,0,1,2.031898,1)" | ||
217 | 164 | x1="45.402073" | ||
218 | 165 | y1="32.607113" | ||
219 | 166 | x2="8.1801958" | ||
220 | 167 | y2="7" /> | ||
221 | 168 | </defs> | ||
222 | 169 | <sodipodi:namedview | ||
223 | 170 | id="base" | ||
224 | 171 | pagecolor="#ffffff" | ||
225 | 172 | bordercolor="#666666" | ||
226 | 173 | borderopacity="1.0" | ||
227 | 174 | inkscape:pageopacity="0.0" | ||
228 | 175 | inkscape:pageshadow="2" | ||
229 | 176 | inkscape:zoom="9.8994949" | ||
230 | 177 | inkscape:cx="24.295867" | ||
231 | 178 | inkscape:cy="23.945596" | ||
232 | 179 | inkscape:current-layer="layer5" | ||
233 | 180 | showgrid="true" | ||
234 | 181 | inkscape:grid-bbox="true" | ||
235 | 182 | inkscape:document-units="px" | ||
236 | 183 | fill="#d3d7cf" | ||
237 | 184 | inkscape:window-width="1014" | ||
238 | 185 | inkscape:window-height="668" | ||
239 | 186 | inkscape:window-x="0" | ||
240 | 187 | inkscape:window-y="25" /> | ||
241 | 188 | <metadata | ||
242 | 189 | id="metadata1312"> | ||
243 | 190 | <rdf:RDF> | ||
244 | 191 | <cc:Work | ||
245 | 192 | rdf:about=""> | ||
246 | 193 | <dc:format>image/svg+xml</dc:format> | ||
247 | 194 | <dc:type | ||
248 | 195 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
249 | 196 | </cc:Work> | ||
250 | 197 | </rdf:RDF> | ||
251 | 198 | </metadata> | ||
252 | 199 | <g | ||
253 | 200 | id="layer1" | ||
254 | 201 | inkscape:label="back-cover" | ||
255 | 202 | inkscape:groupmode="layer" | ||
256 | 203 | style="display:inline" /> | ||
257 | 204 | <g | ||
258 | 205 | inkscape:groupmode="layer" | ||
259 | 206 | id="layer6" | ||
260 | 207 | inkscape:label="pages" /> | ||
261 | 208 | <g | ||
262 | 209 | inkscape:groupmode="layer" | ||
263 | 210 | id="layer7" | ||
264 | 211 | inkscape:label="spine" /> | ||
265 | 212 | <g | ||
266 | 213 | inkscape:groupmode="layer" | ||
267 | 214 | id="layer2" | ||
268 | 215 | inkscape:label="front-cover" | ||
269 | 216 | style="display:inline" /> | ||
270 | 217 | <g | ||
271 | 218 | inkscape:groupmode="layer" | ||
272 | 219 | id="layer8" | ||
273 | 220 | inkscape:label="highlight" | ||
274 | 221 | style="display:inline" /> | ||
275 | 222 | <g | ||
276 | 223 | inkscape:groupmode="layer" | ||
277 | 224 | id="layer3" | ||
278 | 225 | inkscape:label="glow" | ||
279 | 226 | style="display:inline" /> | ||
280 | 227 | <g | ||
281 | 228 | inkscape:groupmode="layer" | ||
282 | 229 | id="layer4" | ||
283 | 230 | inkscape:label="title-1" | ||
284 | 231 | style="display:inline" /> | ||
285 | 232 | <g | ||
286 | 233 | inkscape:groupmode="layer" | ||
287 | 234 | id="layer5" | ||
288 | 235 | inkscape:label="title-2" | ||
289 | 236 | style="display:inline"> | ||
290 | 237 | <g | ||
291 | 238 | id="g15442" | ||
292 | 239 | transform="matrix(0.931943,0,0,0.949698,2.176413,0.278207)"> | ||
293 | 240 | <path | ||
294 | 241 | sodipodi:nodetypes="ccccccccc" | ||
295 | 242 | id="rect1315" | ||
296 | 243 | d="M 7.8124859,4.4639581 L 40.133422,4.4639581 C 40.500078,4.4639581 40.795256,4.7537407 40.795256,5.113695 L 45.428097,43.832455 C 45.428097,44.192408 45.13292,44.482191 44.766264,44.482191 L 3.1796434,44.482191 C 2.8129871,44.482191 2.5178087,44.192408 2.5178087,43.832455 L 7.1506509,5.113695 C 7.1506509,4.7537407 7.4458289,4.4639581 7.8124859,4.4639581 z " | ||
297 | 244 | style="fill:#204a87;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03561747;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;display:inline" /> | ||
298 | 245 | <path | ||
299 | 246 | sodipodi:nodetypes="ccccccssc" | ||
300 | 247 | id="rect7505" | ||
301 | 248 | d="M 3.1303047,34.301823 L 43.422336,34.301823 C 43.742362,34.301823 44,34.505877 44,34.759343 L 44,42.65154 C 44,42.905005 43.641347,43.614135 43.321321,43.614135 L 3.0292894,43.715151 C 2.7092638,43.715151 2.1246122,43.8866 1.9465496,42.5723 C 1.5635805,39.745563 1.1606217,37.880413 2.1485801,34.860358 C 2.580254,33.54079 2.8102791,34.301823 3.1303047,34.301823 z " | ||
302 | 249 | style="fill:url(#linearGradient15455);fill-opacity:1;fill-rule:evenodd;stroke:#babdb6;stroke-width:0.73400003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> | ||
303 | 250 | <path | ||
304 | 251 | sodipodi:nodetypes="czzcc" | ||
305 | 252 | id="path8381" | ||
306 | 253 | d="M 2.5,34.5 C 2.5,34.5 1.75,35.712694 1.5,37.429953 C 1.25,39.147212 1.25,39.869037 1.5,41.369037 C 1.75,42.869037 2.5,43.935029 2.5,43.935029 L 2.8030458,44.440105" | ||
307 | 254 | style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> | ||
308 | 255 | <path | ||
309 | 256 | sodipodi:nodetypes="czzcc" | ||
310 | 257 | id="path11030" | ||
311 | 258 | d="M 7.4707316,4.5027374 C 7.4707316,4.5027374 6.5990531,5.7220707 6.3084936,7.4487313 C 6.0179341,9.175392 6.0179341,9.9011689 6.3084936,11.409381 C 6.5990531,12.917593 7.4707316,13.989421 7.4707316,13.989421 L 7.822942,14.497263" | ||
312 | 259 | style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.08101857;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> | ||
313 | 260 | <path | ||
314 | 261 | id="path11032" | ||
315 | 262 | d="M 1.5,37.5 L 6.3529412,6.6997504 L 6.3529412,7.1285302 L 6.3529412,7.1285302" | ||
316 | 263 | style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> | ||
317 | 264 | <path | ||
318 | 265 | sodipodi:nodetypes="ccccccccc" | ||
319 | 266 | id="path2195" | ||
320 | 267 | d="M 7.7443838,4.4497066 L 40.065319,4.4497066 C 40.431975,4.4497066 40.727153,4.6682776 40.727153,4.9397756 L 45.359994,34.143693 C 45.359994,34.41519 45.064817,34.633762 44.698161,34.633762 L 3.1115412,34.633762 C 2.744885,34.633762 2.4497066,34.41519 2.4497066,34.143693 L 7.0825488,4.9397756 C 7.0825488,4.6682776 7.3777268,4.4497066 7.7443838,4.4497066 z " | ||
321 | 268 | style="fill:#3465a4;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.89941311;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;display:inline" /> | ||
322 | 269 | <path | ||
323 | 270 | sodipodi:nodetypes="ccccccccc" | ||
324 | 271 | id="path12801" | ||
325 | 272 | d="M 7.7443838,4.3662384 L 40.065319,4.3662384 C 40.431975,4.3662384 40.727153,4.5848094 40.727153,4.8563074 L 45.359994,34.060224 C 45.359994,34.331721 45.064817,34.550293 44.698161,34.550293 L 3.1115412,34.550293 C 2.744885,34.550293 2.4497066,34.331721 2.4497066,34.060224 L 7.0825488,4.8563074 C 7.0825488,4.5848094 7.3777268,4.3662384 7.7443838,4.3662384 z " | ||
326 | 273 | style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#729fcf;stroke-width:0.89941311;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;display:inline" /> | ||
327 | 274 | <path | ||
328 | 275 | sodipodi:nodetypes="ccccccccc" | ||
329 | 276 | id="path13676" | ||
330 | 277 | d="M 8.5112104,5.4251519 L 39.492597,5.4251519 C 39.844057,5.4251519 40.127001,5.6323999 40.127001,5.8898331 L 44.567833,33.580854 C 44.567833,33.838287 44.284889,34.045536 43.93343,34.045536 L 4.0703777,34.045536 C 3.7189179,34.045536 3.4359725,33.838287 3.4359725,33.580854 L 7.8768053,5.8898331 C 7.8768053,5.6323999 8.1597495,5.4251519 8.5112104,5.4251519 z " | ||
331 | 278 | style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient15457);stroke-width:0.85746539;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.74509804;display:inline" /> | ||
332 | 279 | <path | ||
333 | 280 | sodipodi:nodetypes="czcccccccc" | ||
334 | 281 | id="path3092" | ||
335 | 282 | d="M 5.2529148,23.677326 C 5.2529148,23.677326 12.909199,18.7359 24.000001,18.61419 C 34.989788,18.49248 40.827798,14.135261 40.827798,14.135261 C 41.186676,14.135261 41.778638,13.953136 41.778638,14.206161 L 45,33.72733 C 45,33.980354 44.711085,34.184055 44.352207,34.184055 L 3.647794,34.184055 C 3.2889162,34.184055 3,33.980354 3,33.72733 L 4.6051198,24.134051 C 4.6051198,23.881026 4.8940359,23.677326 5.2529148,23.677326 z " | ||
336 | 283 | style="fill:url(#linearGradient15459);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.89941311;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;display:inline" /> | ||
337 | 284 | <path | ||
338 | 285 | sodipodi:nodetypes="ccccc" | ||
339 | 286 | id="path7500" | ||
340 | 287 | d="M 9.3745694,7.0981816 C 9.3745694,7.0981816 32.719444,7 39.12471,7 L 40,13.901819 L 8.5050763,14 L 9.3745694,7.0981816 z " | ||
341 | 288 | style="fill:#d3d7cf;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;display:inline" /> | ||
342 | 289 | <path | ||
343 | 290 | sodipodi:nodetypes="ccccc" | ||
344 | 291 | id="path6609" | ||
345 | 292 | d="M 9.5794982,8 C 9.5794982,8 32.641961,8 38.919858,8 L 39.595939,13 L 9,13 L 9.5794982,8 z " | ||
346 | 293 | style="fill:url(#linearGradient15461);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;display:inline" /> | ||
347 | 294 | </g> | ||
348 | 295 | </g> | ||
349 | 296 | </svg> | ||
350 | 0 | 297 | ||
351 | === added file 'wikipedia/data/Makefile.am' | |||
352 | --- wikipedia/data/Makefile.am 1970-01-01 00:00:00 +0000 | |||
353 | +++ wikipedia/data/Makefile.am 2010-01-02 11:50:25 +0000 | |||
354 | @@ -0,0 +1,15 @@ | |||
355 | 1 | |||
356 | 2 | SUBDIRS = . | ||
357 | 3 | |||
358 | 4 | moduledir = $(wikipediadatadir) | ||
359 | 5 | |||
360 | 6 | module_DATA = \ | ||
361 | 7 | wikipedia.conf\ | ||
362 | 8 | preview.jpg\ | ||
363 | 9 | langues.dat\ | ||
364 | 10 | loading.html\ | ||
365 | 11 | loading.gif\ | ||
366 | 12 | Gnome-dictionary.svg\ | ||
367 | 13 | icon.png | ||
368 | 14 | |||
369 | 15 | EXTRA_DIST = $(module_DATA) | ||
370 | 0 | 16 | ||
371 | === added file 'wikipedia/data/icon.png' | |||
372 | 1 | Binary files wikipedia/data/icon.png 1970-01-01 00:00:00 +0000 and wikipedia/data/icon.png 2010-01-02 11:50:25 +0000 differ | 17 | Binary files wikipedia/data/icon.png 1970-01-01 00:00:00 +0000 and wikipedia/data/icon.png 2010-01-02 11:50:25 +0000 differ |
373 | === added file 'wikipedia/data/icone_dictionnaire1.gif' | |||
374 | 2 | Binary files wikipedia/data/icone_dictionnaire1.gif 1970-01-01 00:00:00 +0000 and wikipedia/data/icone_dictionnaire1.gif 2010-01-02 11:50:25 +0000 differ | 18 | Binary files wikipedia/data/icone_dictionnaire1.gif 1970-01-01 00:00:00 +0000 and wikipedia/data/icone_dictionnaire1.gif 2010-01-02 11:50:25 +0000 differ |
375 | === added file 'wikipedia/data/langues.dat' | |||
376 | --- wikipedia/data/langues.dat 1970-01-01 00:00:00 +0000 | |||
377 | +++ wikipedia/data/langues.dat 2010-01-02 11:50:25 +0000 | |||
378 | @@ -0,0 +1,267 @@ | |||
379 | 1 | 0,Acèh,ace,ace,ace,ace,ace,ace,ace,, | ||
380 | 2 | 1,Afrikaans,af,af,af,af,af,af,af,, | ||
381 | 3 | 0,Akan,ak,ak,ak,ak,ak,ak,ak,, | ||
382 | 4 | 0,Alemannisch,als,als,als,als,als,als,als,, | ||
383 | 5 | 0,Anglo-Saxon,ang,ang,ang,ang,ang,ang,ang,, | ||
384 | 6 | 0,Aragonés,an,an,an,an,an,an,an,, | ||
385 | 7 | 0,Armãneashce,roa-rup,roa-rup,roa-rup,roa-rup,roa-rup,roa-rup,roa-rup,, | ||
386 | 8 | 0,Arpetan,frp,frp,frp,frp,frp,frp,frp,, | ||
387 | 9 | 0,Asturianu,ast,ast,ast,ast,ast,ast,ast,, | ||
388 | 10 | 0,Avañe'ẽ,gn,gn,gn,gn,gn,gn,gn,, | ||
389 | 11 | 0,Aymar,aru,ay,ay,ay,ay,ay,ay,ay, | ||
390 | 12 | 0,Azərbaycan,az,az,az,az,az,az,az,, | ||
391 | 13 | 1,Bahasa,Indonesia,id,id,id,id,id,id,id, | ||
392 | 14 | 1,Bahasa,Melayu,ms,ms,ms,ms,ms,ms,ms, | ||
393 | 15 | 0,Bamanankan,bm,bm,bm,bm,bm,bm,bm,, | ||
394 | 16 | 0,Bân-lâm-gú,nan,nan,nan,nan,nan,nan,nan,, | ||
395 | 17 | 0,Bân-lâm-gú,zh-min-nan,zh-min-nan,zh-min-nan,zh-min-nan,zh-min-nan,zh-min-nan,zh-min-nan,, | ||
396 | 18 | 0,Basa,Jawa,jv,jv,jv,jv,jv,jv,jv, | ||
397 | 19 | 0,Basa,Banyumasan,map-bms,map-bms,map-bms,map-bms,map-bms,map-bms,map-bms, | ||
398 | 20 | 0,Basa,Sunda,su,su,su,su,su,su,su, | ||
399 | 21 | Bikol,Central,bcl,bcl,bcl,bcl,bcl,bcl,bcl, | ||
400 | 22 | 0,Bislama,bi,bi,bi,bi,bi,bi,bi,, | ||
401 | 23 | 0,Boarisch,bar,bar,bar,bar,bar,bar,bar,, | ||
402 | 24 | 0,Bosanski,bs,bs,bs,bs,bs,bs,bs,, | ||
403 | 25 | 0,Brezhoneg,br,br,br,br,br,br,br,, | ||
404 | 26 | 1,Català,ca,ca,ca,ca,ca,ca,ca,, | ||
405 | 27 | 0,Cebuano,ceb,ceb,ceb,ceb,ceb,ceb,ceb,, | ||
406 | 28 | 1,Česky,cs,cs,cs,cs,cs,cs,cs,, | ||
407 | 29 | 0,Chamoru,ch,ch,ch,ch,ch,ch,ch,, | ||
408 | 30 | 0,Chavacano,de,Zamboanga,cbk-zam,cbk-zam,cbk-zam,cbk-zam,cbk-zam,cbk-zam,cbk-zam | ||
409 | 31 | 0,Chi-Chewa,ny,ny,ny,ny,ny,ny,ny,, | ||
410 | 32 | 0,chiShona,sn,sn,sn,sn,sn,sn,sn,, | ||
411 | 33 | 0,chiTumbuka,tum,tum,tum,tum,tum,tum,tum,, | ||
412 | 34 | 0,Choctaw,cho,cho,cho,cho,cho,cho,cho,, | ||
413 | 35 | 0,Corsu,co,co,co,co,co,co,co,, | ||
414 | 36 | 1,Cymraeg,cy,cy,cy,cy,cy,cy,cy,, | ||
415 | 37 | 0,cz,cz,cz,cz,cz,cz,cz,,, | ||
416 | 38 | 1,Dansk,da,da,da,da,da,da,da,, | ||
417 | 39 | 0,Deitsch,pdc,pdc,pdc,pdc,pdc,pdc,pdc,, | ||
418 | 40 | 1,Deutsch,de,de,de,de,de,de,de,, | ||
419 | 41 | 0,Diné,bizaad,nv,nv,nv,nv,nv,nv,nv, | ||
420 | 42 | 0,Dolnoserbski,dsb,dsb,dsb,dsb,dsb,dsb,dsb,, | ||
421 | 43 | 0,Dorerin,Naoero,na,na,na,na,na,na,na, | ||
422 | 44 | 0,Ebon,mh,mh,mh,mh,mh,mh,mh,, | ||
423 | 45 | 1,Eesti,et,et,et,et,et,et,et,, | ||
424 | 46 | 0,Emiliàn,eml,rumagnòl,eml,eml,eml,eml,eml,eml,eml | ||
425 | 47 | 1,English,en,en,en,en,en,en,en,, | ||
426 | 48 | 0,epo,epo,epo,epo,epo,epo,epo,,, | ||
427 | 49 | 1,Español,es,es,es,es,es,es,es,, | ||
428 | 50 | 0,Esperanto,eo,eo,eo,eo,eo,eo,eo,, | ||
429 | 51 | 0,Estremeñu,ext,ext,ext,ext,ext,ext,ext,, | ||
430 | 52 | 0,Euskara,eu,eu,eu,eu,eu,eu,eu,, | ||
431 | 53 | 0,Eʋegbe,ee,ee,ee,ee,ee,ee,ee,, | ||
432 | 54 | 0,Fiji,Hindi,hif,hif,hif,hif,hif,hif,hif, | ||
433 | 55 | 0,Føroyskt,fo,fo,fo,fo,fo,fo,fo,, | ||
434 | 56 | 1,Français,fr,fr,fr,fr,fr,fr,fr,, | ||
435 | 57 | 0,Frysk,fy,fy,fy,fy,fy,fy,fy,, | ||
436 | 58 | 0,Fulfulde,ff,ff,ff,ff,ff,ff,ff,, | ||
437 | 59 | 0,Furlan,fur,fur,fur,fur,fur,fur,fur,, | ||
438 | 60 | 1,Gaeilge,ga,ga,ga,ga,ga,ga,ga,, | ||
439 | 61 | 0,Gaelg,gv,gv,gv,gv,gv,gv,gv,, | ||
440 | 62 | 0,Gagana,Samoa,sm,sm,sm,sm,sm,sm,sm, | ||
441 | 63 | 0,Gàidhlig,gd,gd,gd,gd,gd,gd,gd,, | ||
442 | 64 | 1,Galego,gl,gl,gl,gl,gl,gl,gl,, | ||
443 | 65 | 0,Gĩkũyũ,ki,ki,ki,ki,ki,ki,ki,, | ||
444 | 66 | 0,Hak-kâ-fa,hak,hak,hak,hak,hak,hak,hak,, | ||
445 | 67 | 0,Hawai`i,haw,haw,haw,haw,haw,haw,haw,, | ||
446 | 68 | 0,Hiri,Motu,ho,ho,ho,ho,ho,ho,ho, | ||
447 | 69 | 0,Hornjoserbsce,hsb,hsb,hsb,hsb,hsb,hsb,hsb,, | ||
448 | 70 | 1,Hrvatski,hr,hr,hr,hr,hr,hr,hr,, | ||
449 | 71 | 0,Ido,io,io,io,io,io,io,io,, | ||
450 | 72 | 0,Igbo,ig,ig,ig,ig,ig,ig,ig,, | ||
451 | 73 | 0,Ilokano,ilo,ilo,ilo,ilo,ilo,ilo,ilo,, | ||
452 | 74 | 0,Interlingua,ia,ia,ia,ia,ia,ia,ia,, | ||
453 | 75 | 0,Interlingue,ie,ie,ie,ie,ie,ie,ie,, | ||
454 | 76 | 0,Iñupiak,ik,ik,ik,ik,ik,ik,ik,, | ||
455 | 77 | 0,isiXhosa,xh,xh,xh,xh,xh,xh,xh,, | ||
456 | 78 | 0,isiZulu,zu,zu,zu,zu,zu,zu,zu,, | ||
457 | 79 | 1,Íslenska,is,is,is,is,is,is,is,, | ||
458 | 80 | 1,Italiano,it,it,it,it,it,it,it,, | ||
459 | 81 | 0,jp,jp,jp,jp,jp,jp,jp,,, | ||
460 | 82 | 0,Kalaallisut,kl,kl,kl,kl,kl,kl,kl,, | ||
461 | 83 | 0,Kanuri,kr,kr,kr,kr,kr,kr,kr,, | ||
462 | 84 | 0,Kapampangan,pam,pam,pam,pam,pam,pam,pam,, | ||
463 | 85 | 0,Kaszëbsczi,csb,csb,csb,csb,csb,csb,csb,, | ||
464 | 86 | 0,Kernowek,kw,kw,kw,kw,kw,kw,kw,, | ||
465 | 87 | 0,Kinyarwanda,rw,rw,rw,rw,rw,rw,rw,, | ||
466 | 88 | 0,Kirundi,rn,rn,rn,rn,rn,rn,rn,, | ||
467 | 89 | 1,Kiswahili,sw,sw,sw,sw,sw,sw,sw,, | ||
468 | 90 | 0,Kongo,kg,kg,kg,kg,kg,kg,kg,, | ||
469 | 91 | 0,Kreyòl,ayisyen,ht,ht,ht,ht,ht,ht,ht, | ||
470 | 92 | 0,Kurdî,ku,كوردی,ku,ku,ku,ku,ku,ku,ku | ||
471 | 93 | 0,Kwanyama,kj,kj,kj,kj,kj,kj,kj,, | ||
472 | 94 | 0,Ladino,lad,lad,lad,lad,lad,lad,lad,, | ||
473 | 95 | 0,Latina,la,la,la,la,la,la,la,, | ||
474 | 96 | 1,Latviešu,lv,lv,lv,lv,lv,lv,lv,, | ||
475 | 97 | 0,lea,faka-Tonga,to,to,to,to,to,to,to, | ||
476 | 98 | 0,Lëtzebuergesch,lb,lb,lb,lb,lb,lb,lb,, | ||
477 | 99 | 1,Lietuvių,lt,lt,lt,lt,lt,lt,lt,, | ||
478 | 100 | 0,Líguru,lij,lij,lij,lij,lij,lij,lij,, | ||
479 | 101 | 0,Limburgs,li,li,li,li,li,li,li,, | ||
480 | 102 | 0,Lingála,ln,ln,ln,ln,ln,ln,ln,, | ||
481 | 103 | 0,Lojban,jbo,jbo,jbo,jbo,jbo,jbo,jbo,, | ||
482 | 104 | 0,Luganda,lg,lg,lg,lg,lg,lg,lg,, | ||
483 | 105 | 0,Lumbaart,lmo,lmo,lmo,lmo,lmo,lmo,lmo,, | ||
484 | 106 | 1,Magyar,hu,hu,hu,hu,hu,hu,hu,, | ||
485 | 107 | 0,Malagasy,mg,mg,mg,mg,mg,mg,mg,, | ||
486 | 108 | 1,Malti,mt,mt,mt,mt,mt,mt,mt,, | ||
487 | 109 | 0,Māori,mi,mi,mi,mi,mi,mi,mi,, | ||
488 | 110 | 0,Mìng-dĕ̤ng-ngṳ̄,cdo,cdo,cdo,cdo,cdo,cdo,cdo,, | ||
489 | 111 | 0,minnan,minnan,minnan,minnan,minnan,minnan,minnan,,, | ||
490 | 112 | 0,Mirandés,mwl,mwl,mwl,mwl,mwl,mwl,mwl,, | ||
491 | 113 | 0,Mvskoke,mus,mus,mus,mus,mus,mus,mus,, | ||
492 | 114 | 0,Na,Vosa,Vakaviti,fj,fj,fj,fj,fj,fj,fj | ||
493 | 115 | 0,Nāhuatl,nah,nah,nah,nah,nah,nah,nah,, | ||
494 | 116 | 1,Nederlands,nl,nl,nl,nl,nl,nl,nl,, | ||
495 | 117 | 0,Nedersaksisch,nds-nl,nds-nl,nds-nl,nds-nl,nds-nl,nds-nl,nds-nl,, | ||
496 | 118 | 0,Nnapulitano,nap,nap,nap,nap,nap,nap,nap,, | ||
497 | 119 | 0,nomcom,nomcom,nomcom,nomcom,nomcom,nomcom,nomcom,,, | ||
498 | 120 | 0,Norsk,(bokmål),nb,nb,nb,nb,nb,nb,nb, | ||
499 | 121 | 0,Norsk,(nynorsk),nn,nn,nn,nn,nn,nn,nn, | ||
500 | 122 | 1,Norsk,(bokmål),no,no,no,no,no,no,no, | ||
501 | 123 | 0,Nouormand,nrm,nrm,nrm,nrm,nrm,nrm,nrm,, | ||
502 | 124 | 0,Novial,nov,nov,nov,nov,nov,nov,nov,, | ||
503 | 125 | 0,O'zbek,uz,uz,uz,uz,uz,uz,uz,, | ||
504 | 126 | 0,Occitan,oc,oc,oc,oc,oc,oc,oc,, | ||
505 | 127 | 0,Oromoo,om,om,om,om,om,om,om,, | ||
506 | 128 | 0,Oshiwambo,ng,ng,ng,ng,ng,ng,ng,, | ||
507 | 129 | 0,Otsiherero,hz,hz,hz,hz,hz,hz,hz,, | ||
508 | 130 | 0,Pangasinan,pag,pag,pag,pag,pag,pag,pag,, | ||
509 | 131 | 0,Papiamentu,pap,pap,pap,pap,pap,pap,pap,, | ||
510 | 132 | 0,Piemontèis,pms,pms,pms,pms,pms,pms,pms,, | ||
511 | 133 | 0,Plattdüütsch,nds,nds,nds,nds,nds,nds,nds,, | ||
512 | 134 | 1,Polski,pl,pl,pl,pl,pl,pl,pl,, | ||
513 | 135 | 1,Português,pt,pt,pt,pt,pt,pt,pt,, | ||
514 | 136 | 0,Qafár,af,aa,aa,aa,aa,aa,aa,aa, | ||
515 | 137 | 0,Qaraqalpaqsha,kaa,kaa,kaa,kaa,kaa,kaa,kaa,, | ||
516 | 138 | 0,Qırımtatarca,crh,crh,crh,crh,crh,crh,crh,, | ||
517 | 139 | 0,Reo,Mā`ohi,ty,ty,ty,ty,ty,ty,ty, | ||
518 | 140 | 0,Ripoarisch,ksh,ksh,ksh,ksh,ksh,ksh,ksh,, | ||
519 | 141 | 1,Română,ro,ro,ro,ro,ro,ro,ro,, | ||
520 | 142 | 0,Romani,rmy,rmy,rmy,rmy,rmy,rmy,rmy,, | ||
521 | 143 | 0,Rumantsch,rm,rm,rm,rm,rm,rm,rm,, | ||
522 | 144 | 0,Runa,Simi,qu,qu,qu,qu,qu,qu,qu, | ||
523 | 145 | 0,Sámegiella,se,se,se,se,se,se,se,, | ||
524 | 146 | 0,Sängö,sg,sg,sg,sg,sg,sg,sg,, | ||
525 | 147 | 0,Sardu,sc,sc,sc,sc,sc,sc,sc,, | ||
526 | 148 | 0,Scots,sco,sco,sco,sco,sco,sco,sco,, | ||
527 | 149 | 0,Seeltersk,stq,stq,stq,stq,stq,stq,stq,, | ||
528 | 150 | 0,Sesotho,st,st,st,st,st,st,st,, | ||
529 | 151 | 0,Setswana,tn,tn,tn,tn,tn,tn,tn,, | ||
530 | 152 | 1,Shqip,sq,sq,sq,sq,sq,sq,sq,, | ||
531 | 153 | 0,Sicilianu,scn,scn,scn,scn,scn,scn,scn,, | ||
532 | 154 | 0,Simple,English,simple,simple,simple,simple,simple,simple,simple, | ||
533 | 155 | 0,SiSwati,ss,ss,ss,ss,ss,ss,ss,, | ||
534 | 156 | 1,Slovenčina,sk,sk,sk,sk,sk,sk,sk,, | ||
535 | 157 | 1,Slovenščina,sl,sl,sl,sl,sl,sl,sl,, | ||
536 | 158 | 0,Ślůnski,szl,szl,szl,szl,szl,szl,szl,, | ||
537 | 159 | 0,Soomaaliga,so,so,so,so,so,so,so,, | ||
538 | 160 | 0,Sranantongo,srn,srn,srn,srn,srn,srn,srn,, | ||
539 | 161 | 1,Suomi,fi,fi,fi,fi,fi,fi,fi,, | ||
540 | 162 | 1,Svenska,sv,sv,sv,sv,sv,sv,sv,, | ||
541 | 163 | 0,Tagalog,tl,tl,tl,tl,tl,tl,tl,, | ||
542 | 164 | 0,Taqbaylit,kab,kab,kab,kab,kab,kab,kab,, | ||
543 | 165 | 0,Tarandíne,roa-tara,roa-tara,roa-tara,roa-tara,roa-tara,roa-tara,roa-tara,, | ||
544 | 166 | 0,Tetun,tet,tet,tet,tet,tet,tet,tet,, | ||
545 | 167 | 1,Tiếng,Việt,vi,vi,vi,vi,vi,vi,vi, | ||
546 | 168 | 0,Tok,Pisin,tpi,tpi,tpi,tpi,tpi,tpi,tpi, | ||
547 | 169 | 0,Toki,Pona,tokipona,tokipona,tokipona,tokipona,tokipona,tokipona,tokipona, | ||
548 | 170 | 0,Toki,Pona,(deprecated:tokipona),tp,tp,tp,tp,tp,tp,tp | ||
549 | 171 | 0,Tsetsêhestâhese,chy,chy,chy,chy,chy,chy,chy,, | ||
550 | 172 | 0,Tshivenda,ve,ve,ve,ve,ve,ve,ve,, | ||
551 | 173 | 1,Türkçe,tr,tr,tr,tr,tr,tr,tr,, | ||
552 | 174 | 0,Türkmençe,tk,tk,tk,tk,tk,tk,tk,, | ||
553 | 175 | 0,Twi,tw,tw,tw,tw,tw,tw,tw,, | ||
554 | 176 | 0,Vahcuengh,za,za,za,za,za,za,za,, | ||
555 | 177 | 0,Vèneto,vec,vec,vec,vec,vec,vec,vec,, | ||
556 | 178 | 0,Volapük,vo,vo,vo,vo,vo,vo,vo,, | ||
557 | 179 | 0,Võro,fiu-vro,fiu-vro,fiu-vro,fiu-vro,fiu-vro,fiu-vro,fiu-vro,, | ||
558 | 180 | 0,Walon,wa,wa,wa,wa,wa,wa,wa,, | ||
559 | 181 | 0,West-Vlams,vls,vls,vls,vls,vls,vls,vls,, | ||
560 | 182 | 0,Winaray,war,war,war,war,war,war,war,, | ||
561 | 183 | 0,Wolof,wo,wo,wo,wo,wo,wo,wo,, | ||
562 | 184 | 0,Xitsonga,ts,ts,ts,ts,ts,ts,ts,, | ||
563 | 185 | 0,Yorùbá,yo,yo,yo,yo,yo,yo,yo,, | ||
564 | 186 | 0,Zazaki,diq,diq,diq,diq,diq,diq,diq,, | ||
565 | 187 | 0,Zeêuws,zea,zea,zea,zea,zea,zea,zea,, | ||
566 | 188 | 0,Žemaitėška,bat-smg,bat-smg,bat-smg,bat-smg,bat-smg,bat-smg,bat-smg,, | ||
567 | 189 | 0,zh-cfr,zh-cfr,zh-cfr,zh-cfr,zh-cfr,zh-cfr,zh-cfr,,, | ||
568 | 190 | 1,Ελληνικά,el,el,el,el,el,el,el,, | ||
569 | 191 | 0,Ποντιακά,pnt,pnt,pnt,pnt,pnt,pnt,pnt,, | ||
570 | 192 | 0,Авар,av,av,av,av,av,av,av,, | ||
571 | 193 | 0,Аҧсуа,ab,ab,ab,ab,ab,ab,ab,, | ||
572 | 194 | 0,Башҡорт,ba,ba,ba,ba,ba,ba,ba,, | ||
573 | 195 | 1,Беларуская,be,be,be,be,be,be,be,, | ||
574 | 196 | 0,Буряад,bxr,bxr,bxr,bxr,bxr,bxr,bxr,, | ||
575 | 197 | 1,Български,bg,bg,bg,bg,bg,bg,bg,, | ||
576 | 198 | 0,Иронау,os,os,os,os,os,os,os,, | ||
577 | 199 | 0,Коми,kv,kv,kv,kv,kv,kv,kv,, | ||
578 | 200 | 0,Кыргызча,ky,ky,ky,ky,ky,ky,ky,, | ||
579 | 201 | 0,Қазақша,kk,kk,kk,kk,kk,kk,kk,, | ||
580 | 202 | 0,Лакку,lbe,lbe,lbe,lbe,lbe,lbe,lbe,, | ||
581 | 203 | 1,Македонски,mk,mk,mk,mk,mk,mk,mk,, | ||
582 | 204 | 0,Мокшень,mdf,mdf,mdf,mdf,mdf,mdf,mdf,, | ||
583 | 205 | 0,Молдовеняскэ,mo,mo,mo,mo,mo,mo,mo,, | ||
584 | 206 | 0,Монгол,mn,mn,mn,mn,mn,mn,mn,, | ||
585 | 207 | 0,Нохчийн,ce,ce,ce,ce,ce,ce,ce,, | ||
586 | 208 | 0,Олык,Марий,mhr,mhr,mhr,mhr,mhr,mhr,mhr, | ||
587 | 209 | 1,Русский,ru,ru,ru,ru,ru,ru,ru,, | ||
588 | 210 | 0,Саха,тыла,sah,sah,sah,sah,sah,sah,sah, | ||
589 | 211 | 0,Словѣ́ньскъ,cu,cu,cu,cu,cu,cu,cu,, | ||
590 | 212 | 1,Српски,sr,Srpski,sr,sr,sr,sr,sr,sr,sr | ||
591 | 213 | 0,Татарча/Tatarça,tt,tt,tt,tt,tt,tt,tt,, | ||
592 | 214 | 0,Тоҷикӣ,tg,tg,tg,tg,tg,tg,tg,, | ||
593 | 215 | 0,Удмурт,udm,udm,udm,udm,udm,udm,udm,, | ||
594 | 216 | 1,Українська,uk,uk,uk,uk,uk,uk,uk,, | ||
595 | 217 | 0,Хальмг,xal,xal,xal,xal,xal,xal,xal,, | ||
596 | 218 | 0,Чӑвашла,cv,cv,cv,cv,cv,cv,cv,, | ||
597 | 219 | 0,Эрзянь,myv,myv,myv,myv,myv,myv,myv,, | ||
598 | 220 | 0,ქართული,ka,ka,ka,ka,ka,ka,ka,, | ||
599 | 221 | 0,Հայերեն,hy,hy,hy,hy,hy,hy,hy,, | ||
600 | 222 | 1,ייִדיש,yi,yi,yi,yi,yi,yi,yi,, | ||
601 | 223 | 1,עברית,he,he,he,he,he,he,he,, | ||
602 | 224 | 0,اردو,ur,ur,ur,ur,ur,ur,ur,, | ||
603 | 225 | 1,العربية,ar,ar,ar,ar,ar,ar,ar,, | ||
604 | 226 | 0,پښتو,ps,ps,ps,ps,ps,ps,ps,, | ||
605 | 227 | 0,پنجابی,pnb,pnb,pnb,pnb,pnb,pnb,pnb,, | ||
606 | 228 | 0,سنڌي,sd,sd,sd,sd,sd,sd,sd,, | ||
607 | 229 | 1,فارسی,fa,fa,fa,fa,fa,fa,fa,, | ||
608 | 230 | 0,گیلکی,glk,glk,glk,glk,glk,glk,glk,, | ||
609 | 231 | 0,مَزِروني,mzn,mzn,mzn,mzn,mzn,mzn,mzn,, | ||
610 | 232 | 0,مصرى,arz,arz,arz,arz,arz,arz,arz,, | ||
611 | 233 | 0,هَوُسَ,ha,ha,ha,ha,ha,ha,ha,, | ||
612 | 234 | 0,ܐܪܡܝܐ,arc,arc,arc,arc,arc,arc,arc,, | ||
613 | 235 | 0,ދިވެހިބަސް,dv,dv,dv,dv,dv,dv,dv,, | ||
614 | 236 | 1,ትግርኛ,ti,ti,ti,ti,ti,ti,ti,, | ||
615 | 237 | 0,አማርኛ,am,am,am,am,am,am,am,, | ||
616 | 238 | 0,कश्मीरी,ks,ks,ks,ks,ks,ks,ks,, | ||
617 | 239 | 0,नेपाल,भाषा,new,new,new,new,new,new,new, | ||
618 | 240 | 0,नेपाली,ne,ne,ne,ne,ne,ne,ne,, | ||
619 | 241 | 0,पािऴ,pi,pi,pi,pi,pi,pi,pi,, | ||
620 | 242 | 0,भोजपुरी,bh,bh,bh,bh,bh,bh,bh,, | ||
621 | 243 | 0,मराठी,mr,mr,mr,mr,mr,mr,mr,, | ||
622 | 244 | 0,संस्कृत,sa,sa,sa,sa,sa,sa,sa,, | ||
623 | 245 | 1,हिन्दी,hi,hi,hi,hi,hi,hi,hi,, | ||
624 | 246 | 0,অসমীয়া,as,as,as,as,as,as,as,, | ||
625 | 247 | 0,ইমার,bpy,bpy,bpy,bpy,bpy,bpy,bpy,, | ||
626 | 248 | 0,বাংলা,bn,bn,bn,bn,bn,bn,bn,, | ||
627 | 249 | 0,ਪੰਜਾਬੀ,pa,pa,pa,pa,pa,pa,pa,, | ||
628 | 250 | 0,ગુજરાતી,gu,gu,gu,gu,gu,gu,gu,, | ||
629 | 251 | 0,ଓଡ଼ିଆ,or,or,or,or,or,or,or,, | ||
630 | 252 | 0,தமிழ்,ta,ta,ta,ta,ta,ta,ta,, | ||
631 | 253 | 0,తెలుగు,te,te,te,te,te,te,te,, | ||
632 | 254 | 0,ಕನ್ನಡ,kn,kn,kn,kn,kn,kn,kn,, | ||
633 | 255 | 0,മലയാളം,ml,ml,ml,ml,ml,ml,ml,, | ||
634 | 256 | 0,සිංහල,si,si,si,si,si,si,si,, | ||
635 | 257 | 1,ไทย,th,th,th,th,th,th,th,, | ||
636 | 258 | 0,ລາວ,lo,lo,lo,lo,lo,lo,lo,, | ||
637 | 259 | 0,ᏣᎳᎩ,chr,chr,chr,chr,chr,chr,chr,, | ||
638 | 260 | 0,ᐃᓄᒃᑎᑐᑦ/inuktitut,iu,iu,iu,iu,iu,iu,iu,, | ||
639 | 261 | 1,한국어,ko,ko,ko,ko,ko,ko,ko,, | ||
640 | 262 | 0,𐌲𐌿𐍄𐌹𐍃𐌺,got,got,got,got,got,got,got,, | ||
641 | 263 | 1,中文,zh,zh,zh,zh,zh,zh,zh,, | ||
642 | 264 | 0,吴语,wuu,wuu,wuu,wuu,wuu,wuu,wuu,, | ||
643 | 265 | 1,日本語,ja,ja,ja,ja,ja,ja,ja,, | ||
644 | 266 | 0,粵語,zh-yue,zh-yue,zh-yue,zh-yue,zh-yue,zh-yue,zh-yue,, | ||
645 | 267 | 0,贛語,gan,gan,gan,gan,gan,gan,gan,, | ||
646 | 0 | 268 | ||
647 | === added file 'wikipedia/data/loading.gif' | |||
648 | 1 | Binary files wikipedia/data/loading.gif 1970-01-01 00:00:00 +0000 and wikipedia/data/loading.gif 2010-01-02 11:50:25 +0000 differ | 269 | Binary files wikipedia/data/loading.gif 1970-01-01 00:00:00 +0000 and wikipedia/data/loading.gif 2010-01-02 11:50:25 +0000 differ |
649 | === added file 'wikipedia/data/loading.html' | |||
650 | --- wikipedia/data/loading.html 1970-01-01 00:00:00 +0000 | |||
651 | +++ wikipedia/data/loading.html 2010-01-02 11:50:25 +0000 | |||
652 | @@ -0,0 +1,2 @@ | |||
653 | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
654 | 2 | <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Loading .....</title></head><body><img style="width: 204px; height: 204px;" alt="" src="loading.gif"></body></html> | ||
655 | 0 | 3 | ||
656 | === added file 'wikipedia/data/preview.jpg' | |||
657 | 1 | Binary files wikipedia/data/preview.jpg 1970-01-01 00:00:00 +0000 and wikipedia/data/preview.jpg 2010-01-02 11:50:25 +0000 differ | 4 | Binary files wikipedia/data/preview.jpg 1970-01-01 00:00:00 +0000 and wikipedia/data/preview.jpg 2010-01-02 11:50:25 +0000 differ |
658 | === added file 'wikipedia/data/wikipedia.conf.in' | |||
659 | --- wikipedia/data/wikipedia.conf.in 1970-01-01 00:00:00 +0000 | |||
660 | +++ wikipedia/data/wikipedia.conf.in 2010-01-02 11:50:25 +0000 | |||
661 | @@ -0,0 +1,140 @@ | |||
662 | 1 | #!en;@VERSION_WIKIPEDIA@ | ||
663 | 2 | |||
664 | 3 | #[gtk-about] | ||
665 | 4 | [Icon] | ||
666 | 5 | |||
667 | 6 | #j[0;128] Desired icon size for this applet | ||
668 | 7 | #{Set to 0 to use the default applet size} | ||
669 | 8 | icon size = 0;0 | ||
670 | 9 | |||
671 | 10 | #s Name of the icon as it will appear in its label in the dock : | ||
672 | 11 | name = wikipedia | ||
673 | 12 | |||
674 | 13 | #S+ Image's filename : | ||
675 | 14 | #{Let empty to use the default one.} | ||
676 | 15 | icon = | ||
677 | 16 | |||
678 | 17 | #d Name of the dock it belongs to: | ||
679 | 18 | dock name = | ||
680 | 19 | |||
681 | 20 | order= | ||
682 | 21 | |||
683 | 22 | #[gtk-convert] | ||
684 | 23 | [Desklet] | ||
685 | 24 | |||
686 | 25 | #X[Position] | ||
687 | 26 | frame_pos = | ||
688 | 27 | |||
689 | 28 | #b Lock position ? | ||
690 | 29 | #{If locked, the desklet can't be moved by simply dragging it with the left mouse button. Of course you can still move it with ALT + left_click.} | ||
691 | 30 | locked = false | ||
692 | 31 | |||
693 | 32 | #j+[48;512] Desklet's dimension (width x height) : | ||
694 | 33 | #{Depending on your WindowManager, you can resize it with ALT + middle_click or ALT + left_click for exemple.} | ||
695 | 34 | size = 96;96 | ||
696 | 35 | |||
697 | 36 | #i[-2048;2048] Desklet's position (x ; y) : | ||
698 | 37 | #{Depending on your WindowManager, you can move it with ALT + left_click} | ||
699 | 38 | x position=0 | ||
700 | 39 | #i[-2048;2048] ... | ||
701 | 40 | y position=0 | ||
702 | 41 | |||
703 | 42 | #I[-180;180] Rotation : | ||
704 | 43 | #{You can quickly rotate the desklet with the mouse, by dragging the little buttons on its left and top sides.} | ||
705 | 44 | rotation = 0 | ||
706 | 45 | |||
707 | 46 | #X[Visibility] | ||
708 | 47 | frame_visi = | ||
709 | 48 | |||
710 | 49 | #b Is detached from the dock ? | ||
711 | 50 | initially detached=false | ||
712 | 51 | #l[Normal;Keep above;Keep below;On Widget Layer;Reserve space] Visibility : | ||
713 | 52 | #{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)} | ||
714 | 53 | accessibility=0 | ||
715 | 54 | #b Should be visible on all desktops ? | ||
716 | 55 | sticky=true | ||
717 | 56 | |||
718 | 57 | |||
719 | 58 | |||
720 | 59 | #use size=true | ||
721 | 60 | |||
722 | 61 | #F[Decorations;gtk-orientation-portrait] | ||
723 | 62 | frame_deco= | ||
724 | 63 | |||
725 | 64 | #o+ Choose a decoration theme for this desklet : | ||
726 | 65 | #{Choose 'Custom decorations' to define your own decorations below.} | ||
727 | 66 | decorations = default | ||
728 | 67 | |||
729 | 68 | #v | ||
730 | 69 | sep_deco = | ||
731 | 70 | |||
732 | 71 | #S+ Background image : | ||
733 | 72 | #{It's an image that will be displayed below the drawings, like a frame for exemple. Let empty to not use any.} | ||
734 | 73 | bg desklet = | ||
735 | 74 | #e+[0;1] Background tansparency : | ||
736 | 75 | bg alpha = 1 | ||
737 | 76 | #i+[0;256] Left offset : | ||
738 | 77 | #{in pixels. Use this to adjust the left position of the drawings.} | ||
739 | 78 | left offset = 0 | ||
740 | 79 | #i+[0;256] Top offset : | ||
741 | 80 | #{in pixels. Use this to adjust the top position of the drawings.} | ||
742 | 81 | top offset = 0 | ||
743 | 82 | #i+[0;256] Right offset : | ||
744 | 83 | #{in pixels. Use this to adjust the right position of the drawings.} | ||
745 | 84 | right offset = 0 | ||
746 | 85 | #i+[0;256] Bottom offset : | ||
747 | 86 | #{in pixels. Use this to adjust the bottom position of the drawings.} | ||
748 | 87 | bottom offset = 0 | ||
749 | 88 | #S+ Foreground image : | ||
750 | 89 | #{It's an image that will be displayed above the drawings, like a reflect for exemple. Let empty to not use any.} | ||
751 | 90 | fg desklet = | ||
752 | 91 | #e+[0;1] Foreground tansparency : | ||
753 | 92 | fg alpha = 1 | ||
754 | 93 | |||
755 | 94 | |||
756 | 95 | #[gtk-preferences] | ||
757 | 96 | [Configuration] | ||
758 | 97 | |||
759 | 98 | #s specific browser : | ||
760 | 99 | #{If you use a specific browser} | ||
761 | 100 | specific_web_browser = | ||
762 | 101 | |||
763 | 102 | #s langues_favorites | ||
764 | 103 | #{Sasir le code international des langues favorites séparés par des virgules} | ||
765 | 104 | langues_favorites= | ||
766 | 105 | |||
767 | 106 | #s traduction : langue source par défaut : | ||
768 | 107 | #{Sasir le code international de la langue} | ||
769 | 108 | langue_src= | ||
770 | 109 | |||
771 | 110 | #s traduction : langue destination par défaut : | ||
772 | 111 | #{Sasir le code international de la langue} | ||
773 | 112 | langue_dst= | ||
774 | 113 | |||
775 | 114 | #b Ouverture du navigateur ? | ||
776 | 115 | #{Affichage dans un navigateur ou dans boite de dialogue} | ||
777 | 116 | open_browser = false | ||
778 | 117 | |||
779 | 118 | #b Show scrollbars ? | ||
780 | 119 | show_scrollbars = true | ||
781 | 120 | |||
782 | 121 | #i Position of horizontal scrollbar | ||
783 | 122 | #{Horizontal scroll of the browser in pixel} | ||
784 | 123 | scroll x = 0 | ||
785 | 124 | #i Position of vertical scrollbar in pixel | ||
786 | 125 | #{Vertical scroll of the browser in pixel} | ||
787 | 126 | scroll y = 0 | ||
788 | 127 | |||
789 | 128 | #j+[100;2048] Desklet's dimension (width x height) : | ||
790 | 129 | #{Depending on your WindowManager, you can resize it with ALT + middle_click or ALT + left_click for exemple.} | ||
791 | 130 | size2 = 600;442 | ||
792 | 131 | |||
793 | 132 | #i[-2048;2048] Desklet's position (x ; y) : | ||
794 | 133 | #{Depending on your WindowManager, you can move it with ALT + left_click} | ||
795 | 134 | x position2=0 | ||
796 | 135 | #i[-2048;2048] ... | ||
797 | 136 | y position2=0 | ||
798 | 137 | |||
799 | 138 | #k Shortkey to show/hide the sound control dialog : | ||
800 | 139 | shortkey = <Control>F9 | ||
801 | 140 | |||
802 | 0 | 141 | ||
803 | === added directory 'wikipedia/src' | |||
804 | === added file 'wikipedia/src/Makefile.am' | |||
805 | --- wikipedia/src/Makefile.am 1970-01-01 00:00:00 +0000 | |||
806 | +++ wikipedia/src/Makefile.am 2010-01-02 11:50:25 +0000 | |||
807 | @@ -0,0 +1,43 @@ | |||
808 | 1 | #dnl Process this file with automake to produce Makefile.in | ||
809 | 2 | |||
810 | 3 | lib_LTLIBRARIES = \ | ||
811 | 4 | libcd-wikipedia.la | ||
812 | 5 | |||
813 | 6 | |||
814 | 7 | libcd_wikipedia_la_SOURCES = \ | ||
815 | 8 | applet-init.c\ | ||
816 | 9 | applet-init.h\ | ||
817 | 10 | applet-config.c\ | ||
818 | 11 | applet-config.h\ | ||
819 | 12 | applet-notifications.c\ | ||
820 | 13 | applet-notifications.h\ | ||
821 | 14 | applet-wikipedia.c\ | ||
822 | 15 | applet-wikipedia.h\ | ||
823 | 16 | applet-struct.h | ||
824 | 17 | |||
825 | 18 | |||
826 | 19 | dock_version = `pkg-config --modversion cairo-dock` | ||
827 | 20 | |||
828 | 21 | libcd_wikipedia_la_CFLAGS = \ | ||
829 | 22 | -I$(top_srcdir)/src\ | ||
830 | 23 | $(PACKAGE_CFLAGS) $(WEBKIT_CFLAGS)\ | ||
831 | 24 | -DMY_APPLET_SHARE_DATA_DIR=\""$(wikipediadatadir)"\"\ | ||
832 | 25 | -DMY_APPLET_PREVIEW_FILE=\""preview.jpg"\"\ | ||
833 | 26 | -DMY_APPLET_CONF_FILE=\""wikipedia.conf"\"\ | ||
834 | 27 | -DMY_APPLET_USER_DATA_DIR=\""wikipedia"\"\ | ||
835 | 28 | -DMY_APPLET_VERSION=\""$(VERSION_WIKIPEDIA)"\"\ | ||
836 | 29 | -DMY_APPLET_GETTEXT_DOMAIN=\""$(GETTEXT_WIKIPEDIA)"\"\ | ||
837 | 30 | -DMY_APPLET_DOCK_VERSION=\""$(dock_version)"\"\ | ||
838 | 31 | -DMY_APPLET_ICON_FILE=\""icon.png"\"\ | ||
839 | 32 | -std=c99\ | ||
840 | 33 | -Werror-implicit-function-declaration\ | ||
841 | 34 | -O3 | ||
842 | 35 | # -g -ggdb -W -Wall | ||
843 | 36 | |||
844 | 37 | |||
845 | 38 | libcd_wikipedia_la_LIBADD = \ | ||
846 | 39 | $(PACKAGE_LIBS) $(WEBKIT_LIBS) -lm | ||
847 | 40 | |||
848 | 41 | |||
849 | 42 | libcd_wikipedia_la_LDFLAGS =\ | ||
850 | 43 | -avoid-version -module | ||
851 | 0 | 44 | ||
852 | === added file 'wikipedia/src/applet-config.c' | |||
853 | --- wikipedia/src/applet-config.c 1970-01-01 00:00:00 +0000 | |||
854 | +++ wikipedia/src/applet-config.c 2010-01-02 11:50:25 +0000 | |||
855 | @@ -0,0 +1,91 @@ | |||
856 | 1 | /** | ||
857 | 2 | * This file is a part of the Cairo-Dock project | ||
858 | 3 | * | ||
859 | 4 | * Copyright : (C) see the 'copyright' file. | ||
860 | 5 | * E-mail : see the 'copyright' file. | ||
861 | 6 | * | ||
862 | 7 | * This program is free software; you can redistribute it and/or | ||
863 | 8 | * modify it under the terms of the GNU General Public License | ||
864 | 9 | * as published by the Free Software Foundation; either version 3 | ||
865 | 10 | * of the License, or (at your option) any later version. | ||
866 | 11 | * | ||
867 | 12 | * This program is distributed in the hope that it will be useful, | ||
868 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
869 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
870 | 15 | * GNU General Public License for more details. | ||
871 | 16 | * You should have received a copy of the GNU General Public License | ||
872 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
873 | 18 | */ | ||
874 | 19 | |||
875 | 20 | //\________________ Add your name in the copyright file (and / or modify your name here) | ||
876 | 21 | |||
877 | 22 | #include <string.h> | ||
878 | 23 | #include <cairo-dock.h> | ||
879 | 24 | |||
880 | 25 | #include "applet-struct.h" | ||
881 | 26 | #include "applet-config.h" | ||
882 | 27 | #include "applet-wikipedia.h" | ||
883 | 28 | #include <gtk/gtk.h> | ||
884 | 29 | //\_________________ Here you have to get all your parameters from the conf file. Use the macros CD_CONFIG_GET_BOOLEAN, CD_CONFIG_GET_INTEGER, CD_CONFIG_GET_STRING, etc. myConfig has been reseted to 0 at this point. This function is called at the beginning of init and reload. | ||
885 | 30 | CD_APPLET_GET_CONFIG_BEGIN | ||
886 | 31 | //printf("%s\n","++++++++config+++++++"); | ||
887 | 32 | gchar **langue_system; | ||
888 | 33 | |||
889 | 34 | myConfig.specific_web_browser = CD_CONFIG_GET_STRING ("Configuration", "specific_web_browser"); // si NULL, on ouvrira l'URL avec les fonctions du dock, xdg-open est loin d'etre installe partout. | ||
890 | 35 | myConfig.langues_favorites = CD_CONFIG_GET_STRING ("Configuration", "langues_favorites"); | ||
891 | 36 | |||
892 | 37 | if (myConfig.langues_favorites == NULL)//initialise les langues par défaut | ||
893 | 38 | { | ||
894 | 39 | const gchar* const * cMyLang = g_get_language_names (); //récupère le code langue | ||
895 | 40 | myConfig.langues_favorites = strtok(cMyLang[1],"_"); | ||
896 | 41 | strcat(myConfig.langues_favorites,",ru,ar"); | ||
897 | 42 | cairo_dock_update_conf_file (CD_APPLET_MY_CONF_FILE,G_TYPE_STRING,"Configuration","langues_favorites",myConfig.langues_favorites,G_TYPE_INVALID); | ||
898 | 43 | } | ||
899 | 44 | myConfig.langue_src = CD_CONFIG_GET_STRING ("Configuration", "langue_src"); | ||
900 | 45 | if (myConfig.langue_src == NULL)//initialise la langue de traduction par défaut | ||
901 | 46 | { | ||
902 | 47 | // myConfig.langue_src = langue_system; | ||
903 | 48 | const gchar* const * cMyLang = g_get_language_names (); //récupère le code langue | ||
904 | 49 | myConfig.langue_src = strtok(cMyLang[1],"_"); | ||
905 | 50 | cairo_dock_update_conf_file (CD_APPLET_MY_CONF_FILE,G_TYPE_STRING,"Configuration","langue_src",myConfig.langue_src,G_TYPE_INVALID); | ||
906 | 51 | } | ||
907 | 52 | myConfig.langue_dst = CD_CONFIG_GET_STRING ("Configuration", "langue_dst"); | ||
908 | 53 | if (myConfig.langue_dst == NULL)//initialise la langue de traduction par défaut | ||
909 | 54 | { | ||
910 | 55 | // myConfig.langue_dst = langue_system; | ||
911 | 56 | const gchar* const * cMyLang = g_get_language_names (); //récupère le code langue | ||
912 | 57 | myConfig.langue_dst = strtok(cMyLang[1],"_"); | ||
913 | 58 | cairo_dock_update_conf_file (CD_APPLET_MY_CONF_FILE,G_TYPE_STRING,"Configuration","langue_dst",myConfig.langue_dst,G_TYPE_INVALID); | ||
914 | 59 | } | ||
915 | 60 | myConfig.open_browser = CD_CONFIG_GET_BOOLEAN ("Configuration", "open_browser"); | ||
916 | 61 | myConfig.bShowScrollbars = CD_CONFIG_GET_BOOLEAN ("Configuration", "show_scrollbars"); | ||
917 | 62 | myConfig.iPosScrollX = CD_CONFIG_GET_INTEGER ("Configuration", "scroll x"); | ||
918 | 63 | myConfig.iPosScrollY = CD_CONFIG_GET_INTEGER ("Configuration", "scroll y"); | ||
919 | 64 | CD_CONFIG_GET_INTEGER_LIST ("Configuration", "size2",2,myData.size2); | ||
920 | 65 | myConfig.cShortCut = CD_CONFIG_GET_STRING ("Configuration", "shortkey"); | ||
921 | 66 | cd_keybinder_bind (myConfig.cShortCut, (CDBindkeyHandler)cd_wikipedia_on_keybinding_pull, (gpointer)NULL); | ||
922 | 67 | CD_APPLET_GET_CONFIG_END | ||
923 | 68 | |||
924 | 69 | //\_________________ Here you have to free all ressources allocated for myConfig. This one will be reseted to 0 at the end of this function. This function is called right before you get the applet's config, and when your applet is stopped, in the end. | ||
925 | 70 | CD_APPLET_RESET_CONFIG_BEGIN | ||
926 | 71 | //g_free (myConfig.cSomeStringValue); | ||
927 | 72 | if (myConfig.cShortCut) | ||
928 | 73 | { | ||
929 | 74 | cd_keybinder_unbind(myConfig.cShortCut, (CDBindkeyHandler)cd_wikipedia_on_keybinding_pull); | ||
930 | 75 | g_free (myConfig.cShortCut); | ||
931 | 76 | } | ||
932 | 77 | CD_APPLET_RESET_CONFIG_END | ||
933 | 78 | |||
934 | 79 | |||
935 | 80 | //\_________________ Here you have to free all ressources allocated for myData. This one will be reseted to 0 at the end of this function. This function is called when your applet is stopped, in the very end. | ||
936 | 81 | CD_APPLET_RESET_DATA_BEGIN | ||
937 | 82 | g_free(myData.pQuickLaunchDialog); | ||
938 | 83 | //g_free(myData.is_window_load); | ||
939 | 84 | g_free(myData.code_nom_langues); | ||
940 | 85 | g_free(myData.pointeur_sav); | ||
941 | 86 | //g_free(myData.flip_flop); | ||
942 | 87 | g_free(myData.moteurs); | ||
943 | 88 | g_free(myData.langues_traduites); | ||
944 | 89 | //g_free(myData.langues_dst); | ||
945 | 90 | |||
946 | 91 | CD_APPLET_RESET_DATA_END | ||
947 | 0 | 92 | ||
948 | === added file 'wikipedia/src/applet-config.h' | |||
949 | --- wikipedia/src/applet-config.h 1970-01-01 00:00:00 +0000 | |||
950 | +++ wikipedia/src/applet-config.h 2010-01-02 11:50:25 +0000 | |||
951 | @@ -0,0 +1,30 @@ | |||
952 | 1 | /** | ||
953 | 2 | * This file is a part of the Cairo-Dock project | ||
954 | 3 | * | ||
955 | 4 | * Copyright : (C) see the 'copyright' file. | ||
956 | 5 | * E-mail : see the 'copyright' file. | ||
957 | 6 | * | ||
958 | 7 | * This program is free software; you can redistribute it and/or | ||
959 | 8 | * modify it under the terms of the GNU General Public License | ||
960 | 9 | * as published by the Free Software Foundation; either version 3 | ||
961 | 10 | * of the License, or (at your option) any later version. | ||
962 | 11 | * | ||
963 | 12 | * This program is distributed in the hope that it will be useful, | ||
964 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
965 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
966 | 15 | * GNU General Public License for more details. | ||
967 | 16 | * You should have received a copy of the GNU General Public License | ||
968 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
969 | 18 | */ | ||
970 | 19 | |||
971 | 20 | |||
972 | 21 | #ifndef __APPLET_CONFIG__ | ||
973 | 22 | #define __APPLET_CONFIG__ | ||
974 | 23 | |||
975 | 24 | #include <cairo-dock.h> | ||
976 | 25 | |||
977 | 26 | |||
978 | 27 | CD_APPLET_CONFIG_H | ||
979 | 28 | |||
980 | 29 | |||
981 | 30 | #endif | ||
982 | 0 | 31 | ||
983 | === added file 'wikipedia/src/applet-init.c' | |||
984 | --- wikipedia/src/applet-init.c 1970-01-01 00:00:00 +0000 | |||
985 | +++ wikipedia/src/applet-init.c 2010-01-02 11:50:25 +0000 | |||
986 | @@ -0,0 +1,104 @@ | |||
987 | 1 | /** | ||
988 | 2 | * This file is a part of the Cairo-Dock project | ||
989 | 3 | * | ||
990 | 4 | * Copyright : (C) see the 'copyright' file. | ||
991 | 5 | * E-mail : see the 'copyright' file. | ||
992 | 6 | * | ||
993 | 7 | * This program is free software; you can redistribute it and/or | ||
994 | 8 | * modify it under the terms of the GNU General Public License | ||
995 | 9 | * as published by the Free Software Foundation; either version 3 | ||
996 | 10 | * of the License, or (at your option) any later version. | ||
997 | 11 | * | ||
998 | 12 | * This program is distributed in the hope that it will be useful, | ||
999 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1000 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1001 | 15 | * GNU General Public License for more details. | ||
1002 | 16 | * You should have received a copy of the GNU General Public License | ||
1003 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1004 | 18 | */ | ||
1005 | 19 | |||
1006 | 20 | //\________________ Add your name in the copyright file (and / or modify your name here) | ||
1007 | 21 | |||
1008 | 22 | #include "stdlib.h" | ||
1009 | 23 | |||
1010 | 24 | #include "applet-config.h" | ||
1011 | 25 | #include "applet-notifications.h" | ||
1012 | 26 | #include "applet-struct.h" | ||
1013 | 27 | #include "applet-init.h" | ||
1014 | 28 | #include "applet-wikipedia.h" | ||
1015 | 29 | #include <glib/gprintf.h> | ||
1016 | 30 | //#include <gtk/gtk.h> | ||
1017 | 31 | |||
1018 | 32 | |||
1019 | 33 | |||
1020 | 34 | |||
1021 | 35 | CD_APPLET_DEFINITION (N_("wikipedia"), | ||
1022 | 36 | 2, 0, 0, | ||
1023 | 37 | CAIRO_DOCK_CATEGORY_ACCESSORY, | ||
1024 | 38 | N_("Useful description\n" | ||
1025 | 39 | "and manual"), | ||
1026 | 40 | "zartan") | ||
1027 | 41 | |||
1028 | 42 | |||
1029 | 43 | //\___________ Here is where you initiate your applet. myConfig is already set at this point, and also myIcon, myContainer, myDock, myDesklet (and myDrawContext if you're in dock mode). The macro CD_APPLET_MY_CONF_FILE and CD_APPLET_MY_KEY_FILE can give you access to the applet's conf-file and its corresponding key-file (also available during reload). If you're in desklet mode, myDrawContext is still NULL, and myIcon's buffers has not been filled, because you may not need them then (idem when reloading). | ||
1030 | 44 | CD_APPLET_INIT_BEGIN | ||
1031 | 45 | if (myDesklet) | ||
1032 | 46 | { | ||
1033 | 47 | CD_APPLET_SET_DESKLET_RENDERER ("Simple"); // set a desklet renderer. | ||
1034 | 48 | cd_wikipedia_update_my_icon (myApplet); | ||
1035 | 49 | } | ||
1036 | 50 | |||
1037 | 51 | if (myIcon->cFileName == NULL) // set a default icon if none is specified. | ||
1038 | 52 | { | ||
1039 | 53 | CD_APPLET_SET_LOCAL_IMAGE_ON_MY_ICON (MY_APPLET_ICON_FILE); | ||
1040 | 54 | } | ||
1041 | 55 | |||
1042 | 56 | /// To be continued ... | ||
1043 | 57 | cd_wikipedia_load_moteurs(); | ||
1044 | 58 | cd_wikipedia_load_langues(); | ||
1045 | 59 | cd_wikipedia_update_my_icon (myApplet); | ||
1046 | 60 | /// fin mes modifs | ||
1047 | 61 | // if (myDesklet) | ||
1048 | 62 | { | ||
1049 | 63 | |||
1050 | 64 | } | ||
1051 | 65 | |||
1052 | 66 | |||
1053 | 67 | |||
1054 | 68 | CD_APPLET_REGISTER_FOR_CLICK_EVENT; | ||
1055 | 69 | CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT; | ||
1056 | 70 | CD_APPLET_INIT_END | ||
1057 | 71 | |||
1058 | 72 | |||
1059 | 73 | //\___________ Here is where you stop your applet. myConfig and myData are still valid, but will be reseted to 0 at the end of the function. In the end, your applet will go back to its original state, as if it had never been activated. | ||
1060 | 74 | CD_APPLET_STOP_BEGIN | ||
1061 | 75 | CD_APPLET_UNREGISTER_FOR_CLICK_EVENT; | ||
1062 | 76 | CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT; | ||
1063 | 77 | |||
1064 | 78 | /// To be continued ... | ||
1065 | 79 | |||
1066 | 80 | |||
1067 | 81 | CD_APPLET_STOP_END | ||
1068 | 82 | |||
1069 | 83 | |||
1070 | 84 | //\___________ The reload occurs in 2 occasions : when the user changes the applet's config, and when the user reload the cairo-dock's config or modify the desklet's size. The macro CD_APPLET_MY_CONFIG_CHANGED can tell you this. myConfig has already been reloaded at this point if you're in the first case, myData is untouched. You also have the macro CD_APPLET_MY_CONTAINER_TYPE_CHANGED that can tell you if you switched from dock/desklet to desklet/dock mode. | ||
1071 | 85 | CD_APPLET_RELOAD_BEGIN | ||
1072 | 86 | cd_wikipedia_update_my_icon (myApplet); | ||
1073 | 87 | |||
1074 | 88 | if (myDesklet) | ||
1075 | 89 | { | ||
1076 | 90 | CD_APPLET_SET_DESKLET_RENDERER ("Simple"); // set a desklet renderer. | ||
1077 | 91 | } | ||
1078 | 92 | |||
1079 | 93 | if (CD_APPLET_MY_CONFIG_CHANGED) | ||
1080 | 94 | { | ||
1081 | 95 | if (myIcon->cFileName == NULL) | ||
1082 | 96 | { | ||
1083 | 97 | CD_APPLET_SET_LOCAL_IMAGE_ON_MY_ICON (MY_APPLET_ICON_FILE); // set a default icon if none is specified. | ||
1084 | 98 | } | ||
1085 | 99 | |||
1086 | 100 | /// To be continued ... | ||
1087 | 101 | |||
1088 | 102 | } | ||
1089 | 103 | CD_APPLET_RELOAD_END | ||
1090 | 104 | |||
1091 | 0 | 105 | ||
1092 | === added file 'wikipedia/src/applet-init.h' | |||
1093 | --- wikipedia/src/applet-init.h 1970-01-01 00:00:00 +0000 | |||
1094 | +++ wikipedia/src/applet-init.h 2010-01-02 11:50:25 +0000 | |||
1095 | @@ -0,0 +1,31 @@ | |||
1096 | 1 | /** | ||
1097 | 2 | * This file is a part of the Cairo-Dock project | ||
1098 | 3 | * | ||
1099 | 4 | * Copyright : (C) see the 'copyright' file. | ||
1100 | 5 | * E-mail : see the 'copyright' file. | ||
1101 | 6 | * | ||
1102 | 7 | * This program is free software; you can redistribute it and/or | ||
1103 | 8 | * modify it under the terms of the GNU General Public License | ||
1104 | 9 | * as published by the Free Software Foundation; either version 3 | ||
1105 | 10 | * of the License, or (at your option) any later version. | ||
1106 | 11 | * | ||
1107 | 12 | * This program is distributed in the hope that it will be useful, | ||
1108 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1109 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1110 | 15 | * GNU General Public License for more details. | ||
1111 | 16 | * You should have received a copy of the GNU General Public License | ||
1112 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1113 | 18 | */ | ||
1114 | 19 | |||
1115 | 20 | |||
1116 | 21 | #ifndef __APPLET_INIT__ | ||
1117 | 22 | #define __APPLET_INIT__ | ||
1118 | 23 | |||
1119 | 24 | |||
1120 | 25 | #include <cairo-dock.h> | ||
1121 | 26 | |||
1122 | 27 | |||
1123 | 28 | CD_APPLET_H | ||
1124 | 29 | |||
1125 | 30 | |||
1126 | 31 | #endif | ||
1127 | 0 | 32 | ||
1128 | === added file 'wikipedia/src/applet-notifications.c' | |||
1129 | --- wikipedia/src/applet-notifications.c 1970-01-01 00:00:00 +0000 | |||
1130 | +++ wikipedia/src/applet-notifications.c 2010-01-02 11:50:25 +0000 | |||
1131 | @@ -0,0 +1,47 @@ | |||
1132 | 1 | /** | ||
1133 | 2 | * This file is a part of the Cairo-Dock project | ||
1134 | 3 | * | ||
1135 | 4 | * Copyright : (C) see the 'copyright' file. | ||
1136 | 5 | * E-mail : see the 'copyright' file. | ||
1137 | 6 | * | ||
1138 | 7 | * This program is free software; you can redistribute it and/or | ||
1139 | 8 | * modify it under the terms of the GNU General Public License | ||
1140 | 9 | * as published by the Free Software Foundation; either version 3 | ||
1141 | 10 | * of the License, or (at your option) any later version. | ||
1142 | 11 | * | ||
1143 | 12 | * This program is distributed in the hope that it will be useful, | ||
1144 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1145 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1146 | 15 | * GNU General Public License for more details. | ||
1147 | 16 | * You should have received a copy of the GNU General Public License | ||
1148 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1149 | 18 | */ | ||
1150 | 19 | |||
1151 | 20 | //\________________ Add your name in the copyright file (and / or modify your name here) | ||
1152 | 21 | |||
1153 | 22 | #include <stdlib.h> | ||
1154 | 23 | #include <string.h> | ||
1155 | 24 | |||
1156 | 25 | #include "applet-struct.h" | ||
1157 | 26 | #include "applet-notifications.h" | ||
1158 | 27 | #include "applet-wikipedia.h" | ||
1159 | 28 | |||
1160 | 29 | |||
1161 | 30 | |||
1162 | 31 | //\___________ Define here the action to be taken when the user left-clicks on your icon or on its subdock or your desklet. The icon and the container that were clicked are available through the macros CD_APPLET_CLICKED_ICON and CD_APPLET_CLICKED_CONTAINER. CD_APPLET_CLICKED_ICON may be NULL if the user clicked in the container but out of icons. | ||
1163 | 32 | CD_APPLET_ON_CLICK_BEGIN | ||
1164 | 33 | //printf("%s","je clique !!!!!!!!!!!!!!!!!!!!!!!!!"); | ||
1165 | 34 | cd_wikipedia_on_clic_icon(); | ||
1166 | 35 | //cd_wikipedia_show_hide_saisie(); | ||
1167 | 36 | CD_APPLET_ON_CLICK_END | ||
1168 | 37 | |||
1169 | 38 | |||
1170 | 39 | //\___________ Define here the entries you want to add to the menu when the user right-clicks on your icon or on its subdock or your desklet. The icon and the container that were clicked are available through the macros CD_APPLET_CLICKED_ICON and CD_APPLET_CLICKED_CONTAINER. CD_APPLET_CLICKED_ICON may be NULL if the user clicked in the container but out of icons. The menu where you can add your entries is available throught the macro CD_APPLET_MY_MENU; you can add sub-menu to it if you want. | ||
1171 | 40 | CD_APPLET_ON_BUILD_MENU_BEGIN | ||
1172 | 41 | |||
1173 | 42 | GtkWidget *pSubMenu = CD_APPLET_CREATE_MY_SUB_MENU (); | ||
1174 | 43 | CD_APPLET_ADD_ABOUT_IN_MENU (pSubMenu); | ||
1175 | 44 | //CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Open with your web browser"), GTK_STOCK_EXECUTE, cd_wikipedia_start_browser, CD_APPLET_MY_MENU); | ||
1176 | 45 | |||
1177 | 46 | CD_APPLET_ON_BUILD_MENU_END | ||
1178 | 47 | |||
1179 | 0 | 48 | ||
1180 | === added file 'wikipedia/src/applet-notifications.h' | |||
1181 | --- wikipedia/src/applet-notifications.h 1970-01-01 00:00:00 +0000 | |||
1182 | +++ wikipedia/src/applet-notifications.h 2010-01-02 11:50:25 +0000 | |||
1183 | @@ -0,0 +1,34 @@ | |||
1184 | 1 | /** | ||
1185 | 2 | * This file is a part of the Cairo-Dock project | ||
1186 | 3 | * | ||
1187 | 4 | * Copyright : (C) see the 'copyright' file. | ||
1188 | 5 | * E-mail : see the 'copyright' file. | ||
1189 | 6 | * | ||
1190 | 7 | * This program is free software; you can redistribute it and/or | ||
1191 | 8 | * modify it under the terms of the GNU General Public License | ||
1192 | 9 | * as published by the Free Software Foundation; either version 3 | ||
1193 | 10 | * of the License, or (at your option) any later version. | ||
1194 | 11 | * | ||
1195 | 12 | * This program is distributed in the hope that it will be useful, | ||
1196 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1197 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1198 | 15 | * GNU General Public License for more details. | ||
1199 | 16 | * You should have received a copy of the GNU General Public License | ||
1200 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1201 | 18 | */ | ||
1202 | 19 | |||
1203 | 20 | |||
1204 | 21 | #ifndef __APPLET_NOTIFICATIONS__ | ||
1205 | 22 | #define __APPLET_NOTIFICATIONS__ | ||
1206 | 23 | |||
1207 | 24 | |||
1208 | 25 | #include <cairo-dock.h> | ||
1209 | 26 | |||
1210 | 27 | |||
1211 | 28 | |||
1212 | 29 | CD_APPLET_ON_CLICK_H | ||
1213 | 30 | |||
1214 | 31 | CD_APPLET_ON_BUILD_MENU_H | ||
1215 | 32 | |||
1216 | 33 | void cd_wikipedia_on_clic_icon(void); | ||
1217 | 34 | #endif | ||
1218 | 0 | 35 | ||
1219 | === added file 'wikipedia/src/applet-struct.h' | |||
1220 | --- wikipedia/src/applet-struct.h 1970-01-01 00:00:00 +0000 | |||
1221 | +++ wikipedia/src/applet-struct.h 2010-01-02 11:50:25 +0000 | |||
1222 | @@ -0,0 +1,75 @@ | |||
1223 | 1 | /** | ||
1224 | 2 | * This file is a part of the Cairo-Dock project | ||
1225 | 3 | * | ||
1226 | 4 | * Copyright : (C) see the 'copyright' file. | ||
1227 | 5 | * E-mail : see the 'copyright' file. | ||
1228 | 6 | * | ||
1229 | 7 | * This program is free software; you can redistribute it and/or | ||
1230 | 8 | * modify it under the terms of the GNU General Public License | ||
1231 | 9 | * as published by the Free Software Foundation; either version 3 | ||
1232 | 10 | * of the License, or (at your option) any later version. | ||
1233 | 11 | * | ||
1234 | 12 | * This program is distributed in the hope that it will be useful, | ||
1235 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1236 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1237 | 15 | * GNU General Public License for more details. | ||
1238 | 16 | * You should have received a copy of the GNU General Public License | ||
1239 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1240 | 18 | */ | ||
1241 | 19 | |||
1242 | 20 | |||
1243 | 21 | #ifndef __CD_APPLET_STRUCT__ | ||
1244 | 22 | #define __CD_APPLET_STRUCT__ | ||
1245 | 23 | |||
1246 | 24 | #include <cairo-dock.h> | ||
1247 | 25 | #include <glib.h> | ||
1248 | 26 | #include <webkit/webkit.h> | ||
1249 | 27 | //\___________ structure containing the applet's configuration parameters. | ||
1250 | 28 | struct _AppletConfig { | ||
1251 | 29 | // comportement | ||
1252 | 30 | gchar *langues_favorites; | ||
1253 | 31 | gchar *specific_web_browser; | ||
1254 | 32 | gchar *langue_src; | ||
1255 | 33 | gchar *langue_dst; | ||
1256 | 34 | gboolean open_browser; | ||
1257 | 35 | gchar *cShortCut; | ||
1258 | 36 | gboolean bShowScrollbars; | ||
1259 | 37 | |||
1260 | 38 | //window_size = | ||
1261 | 39 | //gint window_x_position; | ||
1262 | 40 | //gint window_y_position; | ||
1263 | 41 | gint iPosScrollX; | ||
1264 | 42 | gint iPosScrollY; | ||
1265 | 43 | // guint iReloadTimeout; | ||
1266 | 44 | // gchar **cListURI; | ||
1267 | 45 | gint iRightMargin; | ||
1268 | 46 | } ; | ||
1269 | 47 | |||
1270 | 48 | //\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc. | ||
1271 | 49 | struct _AppletData { | ||
1272 | 50 | //CairoDialog *pdialog; | ||
1273 | 51 | CairoDialog *pDialog2; | ||
1274 | 52 | CairoDockTask *pTask; // tache pour recuperer le flux. | ||
1275 | 53 | gchar *cTaskBridge; | ||
1276 | 54 | CairoDialog *pQuickLaunchDialog; | ||
1277 | 55 | gint is_window_load; | ||
1278 | 56 | GList* code_nom_langues; | ||
1279 | 57 | GList* moteurs; | ||
1280 | 58 | GList*langues_traduites; | ||
1281 | 59 | //GList*langues_dst; | ||
1282 | 60 | gint *pointeur_sav; | ||
1283 | 61 | gint flip_flop; | ||
1284 | 62 | gint indice_defaut_langues_dst; | ||
1285 | 63 | gint indice_defaut_langues_src; | ||
1286 | 64 | //GList* nom_langues; | ||
1287 | 65 | GtkWidget *pGtkMozEmbed; | ||
1288 | 66 | WebKitWebView *pWebKitView; | ||
1289 | 67 | CairoDockTask *pRefreshTimer; | ||
1290 | 68 | gchar *cUrl; | ||
1291 | 69 | gchar *cCommand; | ||
1292 | 70 | gint size2[2]; | ||
1293 | 71 | //gchar *pDialog2; | ||
1294 | 72 | } ; | ||
1295 | 73 | |||
1296 | 74 | |||
1297 | 75 | #endif | ||
1298 | 0 | 76 | ||
1299 | === added file 'wikipedia/src/applet-wikipedia.c' | |||
1300 | --- wikipedia/src/applet-wikipedia.c 1970-01-01 00:00:00 +0000 | |||
1301 | +++ wikipedia/src/applet-wikipedia.c 2010-01-02 11:50:25 +0000 | |||
1302 | @@ -0,0 +1,791 @@ | |||
1303 | 1 | /** | ||
1304 | 2 | * This file is a part of the Cairo-Dock project | ||
1305 | 3 | * | ||
1306 | 4 | * Copyright : (C) see the 'copyright' file. | ||
1307 | 5 | * E-mail : see the 'copyright' file. | ||
1308 | 6 | * | ||
1309 | 7 | * This program is free software; you can redistribute it and/or | ||
1310 | 8 | * modify it under the terms of the GNU General Public License | ||
1311 | 9 | * as published by the Free Software Foundation; either version 3 | ||
1312 | 10 | * of the License, or (at your option) any later version. | ||
1313 | 11 | * | ||
1314 | 12 | * This program is distributed in the hope that it will be useful, | ||
1315 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1316 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1317 | 15 | * GNU General Public License for more details. | ||
1318 | 16 | * You should have received a copy of the GNU General Public License | ||
1319 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1320 | 18 | */ | ||
1321 | 19 | |||
1322 | 20 | //\________________ Add your name in the copyright file (and / or modify your name here) | ||
1323 | 21 | // | ||
1324 | 22 | #include <stdio.h> | ||
1325 | 23 | #include <math.h> | ||
1326 | 24 | #include <string.h> | ||
1327 | 25 | #include <stdlib.h> | ||
1328 | 26 | #include <applet-wikipedia.h> | ||
1329 | 27 | #include <glib.h> | ||
1330 | 28 | #include <glib/gi18n.h> | ||
1331 | 29 | |||
1332 | 30 | #include <glib/gprintf.h> | ||
1333 | 31 | #include "applet-struct.h" | ||
1334 | 32 | //#define GTK_STOCK_FIND "gtk-find" | ||
1335 | 33 | |||
1336 | 34 | /* | ||
1337 | 35 | * La structure concue poru contenir toutes les donnees de | ||
1338 | 36 | * l'element courant de notre GtkComboBox d'apres le model | ||
1339 | 37 | * que nous lui avons cree. | ||
1340 | 38 | */ | ||
1341 | 39 | typedef struct | ||
1342 | 40 | { | ||
1343 | 41 | gchar * p_text0; //colonne 1 | ||
1344 | 42 | gchar * p_text1; //colonne 2 | ||
1345 | 43 | gchar * texte_recherche ; | ||
1346 | 44 | gchar * moteur; | ||
1347 | 45 | // gchar * texte_translate; | ||
1348 | 46 | gchar * code_langue_src; | ||
1349 | 47 | gchar * code_langue_dst; | ||
1350 | 48 | gchar * nom_langue_src; | ||
1351 | 49 | gchar * nom_langue_dst; | ||
1352 | 50 | } | ||
1353 | 51 | combo_data_st; | ||
1354 | 52 | |||
1355 | 53 | GtkWidget * p_win = NULL; | ||
1356 | 54 | GtkWidget * pDialog = NULL; | ||
1357 | 55 | GtkWidget * p_vbox = NULL; | ||
1358 | 56 | GtkWidget * p_hbox = NULL; | ||
1359 | 57 | GtkWidget * p_button[2]; | ||
1360 | 58 | GtkWidget * p_combo = NULL; | ||
1361 | 59 | GtkWidget * p_combo_langues_src = NULL; | ||
1362 | 60 | GtkWidget * p_combo_langues_dst = NULL; | ||
1363 | 61 | GtkWidget * p_combo_moteurs = NULL; | ||
1364 | 62 | GtkWidget * p_entry = NULL; | ||
1365 | 63 | // GtkWidget * p_entry_translate = NULL; | ||
1366 | 64 | GtkWidget * p_fixed; | ||
1367 | 65 | GtkWidget * p_table; | ||
1368 | 66 | GtkListStore * p_model = NULL; | ||
1369 | 67 | GtkCellRenderer * p_cell = NULL; | ||
1370 | 68 | GtkListStore * p_model_langues_src = NULL; | ||
1371 | 69 | GtkCellRenderer * p_cell_langues_src = NULL; | ||
1372 | 70 | GtkListStore * p_model_langues_dst = NULL; | ||
1373 | 71 | GtkCellRenderer * p_cell_langues_dst = NULL; | ||
1374 | 72 | GtkListStore * p_model_moteurs = NULL; | ||
1375 | 73 | GtkCellRenderer * p_cell_moteurs = NULL; | ||
1376 | 74 | GtkTreeIter iter; | ||
1377 | 75 | GtkTreeIter iter_moteurs; | ||
1378 | 76 | GtkTreeIter iter_langues_src; | ||
1379 | 77 | GtkTreeIter iter_langues_dst; | ||
1380 | 78 | |||
1381 | 79 | void cd_wikipedia_on_keybinding_pull (const char *keystring, gpointer user_data) | ||
1382 | 80 | { | ||
1383 | 81 | if (myData.is_window_load==1) | ||
1384 | 82 | { | ||
1385 | 83 | // cd_wikipedia_gtk_main_quit(); | ||
1386 | 84 | return; | ||
1387 | 85 | } | ||
1388 | 86 | else | ||
1389 | 87 | { | ||
1390 | 88 | cd_wikipedia_on_clic_icon(); | ||
1391 | 89 | myData.is_window_load=1; | ||
1392 | 90 | } | ||
1393 | 91 | return; | ||
1394 | 92 | } | ||
1395 | 93 | |||
1396 | 94 | |||
1397 | 95 | ////////////////////////////////////////////////////////////////////////// | ||
1398 | 96 | void cd_wikipedia_load_moteurs() | ||
1399 | 97 | ////////////////////////////////////////////////////////////////////////// | ||
1400 | 98 | { | ||
1401 | 99 | myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google", 0)); | ||
1402 | 100 | myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("wikipedia", 1)); | ||
1403 | 101 | // myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("", 2)); | ||
1404 | 102 | myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google translate", 2)); | ||
1405 | 103 | myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google images", 3)); | ||
1406 | 104 | myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google videos", 4)); | ||
1407 | 105 | myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google maps", 5)); | ||
1408 | 106 | myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("sytadin", 6)); | ||
1409 | 107 | //myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google", 6)); | ||
1410 | 108 | //myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google", 7)); | ||
1411 | 109 | } | ||
1412 | 110 | |||
1413 | 111 | ////////////////////////////////////////////////////////////////////////// | ||
1414 | 112 | void cd_wikipedia_update_my_icon (CairoDockModuleInstance *myApplet) | ||
1415 | 113 | ////////////////////////////////////////////////////////////////////////// | ||
1416 | 114 | { | ||
1417 | 115 | printf("%s\n","++++++++++++++++++++++++++++++++++++++++++"); | ||
1418 | 116 | printf("%s\n","cd_wikipedia_update_my_icon"); | ||
1419 | 117 | |||
1420 | 118 | //if (myDesklet) | ||
1421 | 119 | { | ||
1422 | 120 | // taille de la texture. | ||
1423 | 121 | int iWidth, iHeight; | ||
1424 | 122 | CD_APPLET_GET_MY_ICON_EXTENT (&iWidth, &iHeight); | ||
1425 | 123 | |||
1426 | 124 | cd_wikipedia_draw_my_desklet (myApplet, iWidth, iHeight); | ||
1427 | 125 | |||
1428 | 126 | CD_APPLET_REDRAW_MY_ICON; | ||
1429 | 127 | } | ||
1430 | 128 | } | ||
1431 | 129 | /* | ||
1432 | 130 | * Fonction qui recupere les donnees de l'element courant affiche. | ||
1433 | 131 | */ | ||
1434 | 132 | ////////////////////////////////////////////////////////////////////////// | ||
1435 | 133 | static combo_data_st get_active_data (GtkComboBox * p_combo) | ||
1436 | 134 | ////////////////////////////////////////////////////////////////////////// | ||
1437 | 135 | { | ||
1438 | 136 | GtkTreeModel * p_model = NULL; | ||
1439 | 137 | GtkTreeIter iter; | ||
1440 | 138 | combo_data_st p_st; | ||
1441 | 139 | |||
1442 | 140 | |||
1443 | 141 | /* On recupere le model qu'on a cree. */ | ||
1444 | 142 | p_model = gtk_combo_box_get_model (p_combo); | ||
1445 | 143 | |||
1446 | 144 | /* On recupere le GtkTreeIter de l'element courant. */ | ||
1447 | 145 | if (gtk_combo_box_get_active_iter (p_combo, & iter)) | ||
1448 | 146 | { | ||
1449 | 147 | gtk_tree_model_get (p_model,& iter,0, & p_st.p_text0,1, & p_st.p_text1,-1); | ||
1450 | 148 | } | ||
1451 | 149 | if (gtk_combo_box_get_active_iter (p_combo_moteurs, & iter_moteurs)) | ||
1452 | 150 | { | ||
1453 | 151 | gtk_tree_model_get (p_model_moteurs,& iter_moteurs,0, & p_st.moteur,-1); | ||
1454 | 152 | } | ||
1455 | 153 | if (gtk_combo_box_get_active_iter (p_combo_langues_src, & iter_langues_src)) | ||
1456 | 154 | { | ||
1457 | 155 | gtk_tree_model_get (p_model_langues_src,& iter_langues_src,0,& p_st.nom_langue_src,1,& p_st.code_langue_src,-1); | ||
1458 | 156 | } | ||
1459 | 157 | if (gtk_combo_box_get_active_iter (p_combo_langues_dst, & iter_langues_dst)) | ||
1460 | 158 | { | ||
1461 | 159 | gtk_tree_model_get (p_model_langues_dst,& iter_langues_dst,0,& p_st.nom_langue_dst,1,& p_st.code_langue_dst,-1); | ||
1462 | 160 | } | ||
1463 | 161 | /* Recuperation du texte contenu dans le GtkEntry */ | ||
1464 | 162 | p_st.texte_recherche = gtk_entry_get_text(GTK_ENTRY(p_entry)); | ||
1465 | 163 | // p_st.texte_translate = gtk_entry_get_text(GTK_ENTRY(p_entry_translate)); | ||
1466 | 164 | return p_st; | ||
1467 | 165 | } | ||
1468 | 166 | |||
1469 | 167 | |||
1470 | 168 | /* | ||
1471 | 169 | * Fonction qui supprime l'element courant du GtkComboBox. | ||
1472 | 170 | */ | ||
1473 | 171 | ////////////////////////////////////////////////////////////////////////// | ||
1474 | 172 | static void remove_active_item (GtkComboBox * p_combo) | ||
1475 | 173 | ////////////////////////////////////////////////////////////////////////// | ||
1476 | 174 | { | ||
1477 | 175 | GtkTreeModel * p_model = NULL; | ||
1478 | 176 | GtkTreeIter iter; | ||
1479 | 177 | |||
1480 | 178 | |||
1481 | 179 | /* On recupere le model qu'on a cree. */ | ||
1482 | 180 | p_model = gtk_combo_box_get_model (p_combo); | ||
1483 | 181 | |||
1484 | 182 | |||
1485 | 183 | /* On recupere le GtkTreeIter de l'element courant. */ | ||
1486 | 184 | if (gtk_combo_box_get_active_iter (p_combo, & iter)) | ||
1487 | 185 | { | ||
1488 | 186 | /* On supprime l'element courant. */ | ||
1489 | 187 | gtk_list_store_remove (GTK_LIST_STORE (p_model), & iter); | ||
1490 | 188 | } | ||
1491 | 189 | } | ||
1492 | 190 | ////////////////////////////////////////////////////////////////////////// | ||
1493 | 191 | void cd_wikipedia_load_langues() //on charge les tables des langues; | ||
1494 | 192 | ////////////////////////////////////////////////////////////////////////// | ||
1495 | 193 | |||
1496 | 194 | { | ||
1497 | 195 | //return; | ||
1498 | 196 | char sep_underscore[] ="_"; | ||
1499 | 197 | char sep_virgule[] =","; | ||
1500 | 198 | char *langue_par_defaut; | ||
1501 | 199 | char src[FILENAME_MAX]; | ||
1502 | 200 | char pBuffer[100]; | ||
1503 | 201 | //char sep_virgule[] =","; | ||
1504 | 202 | //char *ptr char FileLangueName[100]; | ||
1505 | 203 | char *langue_favorite; | ||
1506 | 204 | gint i,j,k,l; | ||
1507 | 205 | char *nom_langue; | ||
1508 | 206 | char * top_translate; | ||
1509 | 207 | char *code_langue; | ||
1510 | 208 | char *wcode_langue; | ||
1511 | 209 | char FileLangueName[100]; | ||
1512 | 210 | FILE * flangue; | ||
1513 | 211 | strcpy(FileLangueName,MY_APPLET_SHARE_DATA_DIR); | ||
1514 | 212 | strcat(FileLangueName,"/langues.dat"); | ||
1515 | 213 | flangue = fopen(FileLangueName, "r"); | ||
1516 | 214 | //printf("%s\n","*************************************************"); | ||
1517 | 215 | if (flangue == NULL) | ||
1518 | 216 | { | ||
1519 | 217 | //printf("%s\n","++++++++++++++++++++++++++++++++++++++++++++++"); | ||
1520 | 218 | printf("%s\n","erreur ouverture"); | ||
1521 | 219 | perror("configuration"); | ||
1522 | 220 | } | ||
1523 | 221 | //printf("%s\n",myConfig.langues_favorites); | ||
1524 | 222 | |||
1525 | 223 | gchar **tab_str; | ||
1526 | 224 | tab_str = g_strsplit (myConfig.langues_favorites,",",10 ); | ||
1527 | 225 | i=0; | ||
1528 | 226 | j=0; | ||
1529 | 227 | k=0; | ||
1530 | 228 | l=0; | ||
1531 | 229 | while (fgets(pBuffer, 100, flangue ) != NULL)// on boucle sur les langues | ||
1532 | 230 | { | ||
1533 | 231 | gchar **extract_buffer; | ||
1534 | 232 | extract_buffer=g_strsplit (pBuffer,",",4 ); | ||
1535 | 233 | top_translate = extract_buffer[0]; | ||
1536 | 234 | nom_langue = extract_buffer[1]; | ||
1537 | 235 | code_langue = extract_buffer[2]; | ||
1538 | 236 | i=0; | ||
1539 | 237 | while (tab_str[i] !=NULL) // on boucle sur les langues favorites | ||
1540 | 238 | { | ||
1541 | 239 | if (strcmp(tab_str[i],code_langue) == 0) //on alimente la table des langues favorites | ||
1542 | 240 | { | ||
1543 | 241 | myData.code_nom_langues = g_list_append(myData.code_nom_langues , g_strdup_printf(nom_langue, j)); | ||
1544 | 242 | myData.code_nom_langues = g_list_append(myData.code_nom_langues , g_strdup_printf(code_langue, j+1)); | ||
1545 | 243 | j=j+2; | ||
1546 | 244 | } | ||
1547 | 245 | i++; | ||
1548 | 246 | } | ||
1549 | 247 | // printf("%s",top_translate); | ||
1550 | 248 | // printf("%s%s\n","---------------",nom_langue); | ||
1551 | 249 | if (strcmp(top_translate,"1") == 0) //on alimente la table des langues traduites par google | ||
1552 | 250 | { | ||
1553 | 251 | // printf("%s%s\n","+++++++++++++++++",nom_langue); | ||
1554 | 252 | myData.langues_traduites = g_list_append(myData.langues_traduites , g_strdup_printf(nom_langue, k)); | ||
1555 | 253 | myData.langues_traduites = g_list_append(myData.langues_traduites , g_strdup_printf(code_langue, k+1)); | ||
1556 | 254 | l=k/2;//on mémorise l'item de la table | ||
1557 | 255 | k=k+2; | ||
1558 | 256 | } | ||
1559 | 257 | //on recherche les valeurs par défaut | ||
1560 | 258 | if (strcmp(code_langue,myConfig.langue_src)==0) | ||
1561 | 259 | { | ||
1562 | 260 | myData.indice_defaut_langues_src=l; | ||
1563 | 261 | } | ||
1564 | 262 | if (strcmp(code_langue,myConfig.langue_dst)==0) | ||
1565 | 263 | { | ||
1566 | 264 | myData.indice_defaut_langues_dst=l; | ||
1567 | 265 | } | ||
1568 | 266 | l++; | ||
1569 | 267 | } | ||
1570 | 268 | } | ||
1571 | 269 | ////////////////////////////////////////////////////////////////////////// | ||
1572 | 270 | void cd_wikipedia_create_url () | ||
1573 | 271 | ////////////////////////////////////////////////////////////////////////// | ||
1574 | 272 | { | ||
1575 | 273 | // GtkComboBox * p_combo = p_data; | ||
1576 | 274 | combo_data_st p_st; | ||
1577 | 275 | //mon code | ||
1578 | 276 | // char cUrl[1024]; | ||
1579 | 277 | char sep_recherche[] =" ,|>"; | ||
1580 | 278 | char sep_underscore[] ="_"; | ||
1581 | 279 | char *ptr; | ||
1582 | 280 | int cpt_mot = 1; | ||
1583 | 281 | p_st = get_active_data (p_combo); | ||
1584 | 282 | |||
1585 | 283 | // on reconstitue l'url | ||
1586 | 284 | // strcpy(myData.cUrl,"http://"); | ||
1587 | 285 | myData.cUrl=g_strdup_printf("%s","http://") ; | ||
1588 | 286 | // switch(p_st.moteur) | ||
1589 | 287 | printf("%s\n","444444444444444444444444444444"); | ||
1590 | 288 | // { | ||
1591 | 289 | if (myConfig.open_browser) | ||
1592 | 290 | { | ||
1593 | 291 | } | ||
1594 | 292 | else | ||
1595 | 293 | { | ||
1596 | 294 | cd_wikipedia_build_and_show (myApplet); | ||
1597 | 295 | |||
1598 | 296 | } | ||
1599 | 297 | if (strcmp(p_st.moteur, "wikipedia") ==0) | ||
1600 | 298 | { | ||
1601 | 299 | strcat(myData.cUrl,p_st.p_text1); //code langue | ||
1602 | 300 | strcat(myData.cUrl,".wikipedia.org/w/index.php?title=Sp%C3%A9cial%3ARecherche&search="); | ||
1603 | 301 | ptr = NULL; | ||
1604 | 302 | cpt_mot=1; | ||
1605 | 303 | gchar ** extr_recherche; | ||
1606 | 304 | gint i= 0; | ||
1607 | 305 | extr_recherche = g_strsplit (p_st.texte_recherche,",",10 ); | ||
1608 | 306 | //ptr = strtok(p_st.texte_recherche," ");// boucle pour traiter les demandes de plusieurs mots | ||
1609 | 307 | while ( extr_recherche[cpt_mot - 1] != NULL ) | ||
1610 | 308 | { | ||
1611 | 309 | if (cpt_mot != 1) | ||
1612 | 310 | strcat(myData.cUrl,"+"); | ||
1613 | 311 | ; | ||
1614 | 312 | strcat(myData.cUrl,extr_recherche[cpt_mot - 1]); | ||
1615 | 313 | cpt_mot++; | ||
1616 | 314 | // printf("token: %s\n", ptr); | ||
1617 | 315 | // ptr = strtok(NULL, sep_recherche); | ||
1618 | 316 | } | ||
1619 | 317 | strcat(myData.cUrl,"&go=Lire"); //fin de l'url | ||
1620 | 318 | } | ||
1621 | 319 | if (strcmp(p_st.moteur, "google") ==0) | ||
1622 | 320 | { | ||
1623 | 321 | printf("%s\n","++++++++++++++++++++++++++"); | ||
1624 | 322 | printf("%s\n","11111111111111111111111111"); | ||
1625 | 323 | printf("%s\n","++++++++++++++++++++++++++"); //http://www.google.com/search?hl=fr&source=hp&q=aaa+bbbbbbbb+cccccccc&btnG=Recherche+Google&meta=&aq=f&oq= | ||
1626 | 324 | strcat(myData.cUrl,"www.google.com/search?hl="); | ||
1627 | 325 | strcat(myData.cUrl,p_st.p_text1); //code langue | ||
1628 | 326 | strcat(myData.cUrl,"&source=hp&q="); | ||
1629 | 327 | ptr = NULL; | ||
1630 | 328 | cpt_mot=1; | ||
1631 | 329 | gchar ** extr_recherche; | ||
1632 | 330 | gint i= 0; | ||
1633 | 331 | extr_recherche = g_strsplit (p_st.texte_recherche,",",10 ); | ||
1634 | 332 | //ptr = strtok(p_st.texte_recherche," ");// boucle pour traiter les demandes de plusieurs mots | ||
1635 | 333 | while ( extr_recherche[cpt_mot - 1] != NULL ) | ||
1636 | 334 | { | ||
1637 | 335 | if (cpt_mot != 1) | ||
1638 | 336 | strcat(myData.cUrl,"+"); | ||
1639 | 337 | ; | ||
1640 | 338 | strcat(myData.cUrl,extr_recherche[cpt_mot - 1]); | ||
1641 | 339 | cpt_mot++; | ||
1642 | 340 | // printf("token: %s\n", ptr); | ||
1643 | 341 | // ptr = strtok(NULL, sep_recherche); | ||
1644 | 342 | } | ||
1645 | 343 | strcat(myData.cUrl,""); //fin de l'url | ||
1646 | 344 | } | ||
1647 | 345 | if (strcmp(p_st.moteur, "google images") ==0) | ||
1648 | 346 | { | ||
1649 | 347 | //http://images.google.com/images?hl=fr&source=hp&q=dddddddd | ||
1650 | 348 | strcat(myData.cUrl,"images.google.com/images?hl="); | ||
1651 | 349 | strcat(myData.cUrl,p_st.p_text1); //code langue | ||
1652 | 350 | strcat(myData.cUrl,"&source=hp&q="); | ||
1653 | 351 | ptr = NULL; | ||
1654 | 352 | cpt_mot=1; | ||
1655 | 353 | gchar ** extr_recherche; | ||
1656 | 354 | gint i= 0; | ||
1657 | 355 | extr_recherche = g_strsplit (p_st.texte_recherche,",",10 ); | ||
1658 | 356 | //ptr = strtok(p_st.texte_recherche," ");// boucle pour traiter les demandes de plusieurs mots | ||
1659 | 357 | while ( extr_recherche[cpt_mot - 1] != NULL ) | ||
1660 | 358 | { | ||
1661 | 359 | if (cpt_mot != 1) | ||
1662 | 360 | strcat(myData.cUrl,"+"); | ||
1663 | 361 | ; | ||
1664 | 362 | strcat(myData.cUrl,extr_recherche[cpt_mot - 1]); | ||
1665 | 363 | cpt_mot++; | ||
1666 | 364 | // printf("token: %s\n", ptr); | ||
1667 | 365 | // ptr = strtok(NULL, sep_recherche); | ||
1668 | 366 | } | ||
1669 | 367 | strcat(myData.cUrl,""); //fin de l'url | ||
1670 | 368 | } | ||
1671 | 369 | if (strcmp(p_st.moteur, "google videos") ==0) | ||
1672 | 370 | { | ||
1673 | 371 | //http://video.google.com/videosearch?hl=fr&num=100&q=ded%20qsqsq&um=1&ie=UTF-8&sa=N&tab=wv#emb=0&hl=fr&q=aaaaaaaaa+bbbbbbbbbbb&view=3 | ||
1674 | 372 | strcat(myData.cUrl,"video.google.com/videosearch?hl="); | ||
1675 | 373 | strcat(myData.cUrl,p_st.p_text1); //code langue | ||
1676 | 374 | strcat(myData.cUrl,"&num=100&q=ded%20qsqsq&um=1&ie=UTF-8&sa=N&tab=wv#emb=0&hl=fr&q="); | ||
1677 | 375 | ptr = NULL; | ||
1678 | 376 | cpt_mot=1; | ||
1679 | 377 | gchar ** extr_recherche; | ||
1680 | 378 | gint i= 0; | ||
1681 | 379 | extr_recherche = g_strsplit (p_st.texte_recherche,",",10 ); | ||
1682 | 380 | //ptr = strtok(p_st.texte_recherche," ");// boucle pour traiter les demandes de plusieurs mots | ||
1683 | 381 | while ( extr_recherche[cpt_mot - 1] != NULL ) | ||
1684 | 382 | { | ||
1685 | 383 | if (cpt_mot != 1) | ||
1686 | 384 | strcat(myData.cUrl,"+"); | ||
1687 | 385 | ; | ||
1688 | 386 | strcat(myData.cUrl,extr_recherche[cpt_mot - 1]); | ||
1689 | 387 | cpt_mot++; | ||
1690 | 388 | // printf("token: %s\n", ptr); | ||
1691 | 389 | // ptr = strtok(NULL, sep_recherche); | ||
1692 | 390 | } | ||
1693 | 391 | strcat(myData.cUrl,""); //fin de l'url | ||
1694 | 392 | } | ||
1695 | 393 | if (strcmp(p_st.moteur, "google translate") ==0) | ||
1696 | 394 | { | ||
1697 | 395 | strcat(myData.cUrl,"translate.google.com/?hl="); | ||
1698 | 396 | strcat(myData.cUrl,p_st.p_text1); | ||
1699 | 397 | strcat(myData.cUrl,"&tab=wT#"); | ||
1700 | 398 | strcat(myData.cUrl,p_st.code_langue_src); | ||
1701 | 399 | strcat(myData.cUrl,"|"); | ||
1702 | 400 | strcat(myData.cUrl,p_st.code_langue_dst); | ||
1703 | 401 | strcat(myData.cUrl,"|"); | ||
1704 | 402 | strcat(myData.cUrl,p_st.texte_recherche); | ||
1705 | 403 | ptr = NULL; | ||
1706 | 404 | cpt_mot=1; | ||
1707 | 405 | gchar ** extr_recherche; | ||
1708 | 406 | gint i= 0; | ||
1709 | 407 | extr_recherche = g_strsplit (p_st.texte_recherche,",",10 ); | ||
1710 | 408 | //ptr = strtok(p_st.texte_recherche," ");// boucle pour traiter les demandes de plusieurs mots | ||
1711 | 409 | while ( extr_recherche[cpt_mot - 1] != NULL ) | ||
1712 | 410 | { | ||
1713 | 411 | if (cpt_mot != 1) | ||
1714 | 412 | strcat(myData.cUrl,"+"); | ||
1715 | 413 | ; | ||
1716 | 414 | strcat(myData.cUrl,extr_recherche[cpt_mot - 1]); | ||
1717 | 415 | cpt_mot++; | ||
1718 | 416 | // printf("token: %s\n", ptr); | ||
1719 | 417 | // ptr = strtok(NULL, sep_recherche); | ||
1720 | 418 | } | ||
1721 | 419 | strcat(myData.cUrl,""); //fin de l'url | ||
1722 | 420 | } | ||
1723 | 421 | if (strcmp(p_st.moteur, "google maps") ==0) | ||
1724 | 422 | { | ||
1725 | 423 | //http://maps.google.com/maps?q=paris%20concorde&hl=fr | ||
1726 | 424 | strcat(myData.cUrl,"maps.google.com/maps?q="); | ||
1727 | 425 | |||
1728 | 426 | // strcat(myData.cUrl,"&source=hp&q="); | ||
1729 | 427 | ptr = NULL; | ||
1730 | 428 | cpt_mot=1; | ||
1731 | 429 | gchar ** extr_recherche; | ||
1732 | 430 | gint i= 0; | ||
1733 | 431 | extr_recherche = g_strsplit (p_st.texte_recherche,",",10 ); | ||
1734 | 432 | while ( extr_recherche[cpt_mot - 1] != NULL ) | ||
1735 | 433 | { | ||
1736 | 434 | if (cpt_mot != 1) | ||
1737 | 435 | strcat(myData.cUrl,"+"); | ||
1738 | 436 | ; | ||
1739 | 437 | strcat(myData.cUrl,extr_recherche[cpt_mot - 1]); | ||
1740 | 438 | cpt_mot++; | ||
1741 | 439 | } | ||
1742 | 440 | strcat(myData.cUrl,"&hl="); //fin de l'url | ||
1743 | 441 | strcat(myData.cUrl,p_st.p_text1); //code langue | ||
1744 | 442 | |||
1745 | 443 | } | ||
1746 | 444 | if (strcmp(p_st.moteur, "sytadin") ==0) | ||
1747 | 445 | { | ||
1748 | 446 | strcat(myData.cUrl,"www.sytadin.fr/opencms/sites/sytadin/sys/raster.jsp.html_470577407.html"); | ||
1749 | 447 | } | ||
1750 | 448 | |||
1751 | 449 | if (myConfig.open_browser) | ||
1752 | 450 | { | ||
1753 | 451 | cd_wikipedia_launch_browser(); | ||
1754 | 452 | } | ||
1755 | 453 | else//sinon on affiche par webkit | ||
1756 | 454 | { | ||
1757 | 455 | printf("%s\n","webkit+++++++++++++++++++++++++++++++++++++++"); | ||
1758 | 456 | gchar tmp[100]; | ||
1759 | 457 | // strcpy(tmp,'file://'); | ||
1760 | 458 | // strcat(tmp,MY_APPLET_SHARE_DATA_DIR); | ||
1761 | 459 | strcpy(tmp,MY_APPLET_SHARE_DATA_DIR); | ||
1762 | 460 | strcat(tmp,"/loading.html"); | ||
1763 | 461 | webkit_web_view_open(WEBKIT_WEB_VIEW(myData.pWebKitView),tmp); | ||
1764 | 462 | // gchar *cCommand = g_strdup_printf ("curl -s --connect-timeout 3 \"%s\"", myData.cUrl); | ||
1765 | 463 | // myData.cTaskBridge = cairo_dock_launch_command_sync (cCommand); | ||
1766 | 464 | // char FiletmpName[100]; | ||
1767 | 465 | // strcpy(FiletmpName,g_cCairoDockDataDir); | ||
1768 | 466 | // strcat(FiletmpName,"/tmp.html"); | ||
1769 | 467 | // FILE * ftmp; | ||
1770 | 468 | // ftmp = fopen(FiletmpName, "w"); | ||
1771 | 469 | //fwrite(myData.cTaskBridge, sizeof myData.cTaskBridge, 1, ftmp); | ||
1772 | 470 | // fprintf(ftmp,myData.cTaskBridge); | ||
1773 | 471 | // fclose(ftmp); | ||
1774 | 472 | webkit_web_view_load_uri(WEBKIT_WEB_VIEW(myData.pWebKitView), myData.cUrl); | ||
1775 | 473 | //webkit_web_view_load_uri(WEBKIT_WEB_VIEW(myData.pWebKitView), FiletmpName); | ||
1776 | 474 | } | ||
1777 | 475 | |||
1778 | 476 | return; | ||
1779 | 477 | } | ||
1780 | 478 | ////////////////////////////////////////////////////////////////////////// | ||
1781 | 479 | void cd_wikipedia_launch_browser () | ||
1782 | 480 | ////////////////////////////////////////////////////////////////////////// | ||
1783 | 481 | { | ||
1784 | 482 | if (myConfig.specific_web_browser != NULL) // on lance le navigateur | ||
1785 | 483 | { | ||
1786 | 484 | cairo_dock_launch_command_printf ("%s %s", NULL, myConfig.specific_web_browser, myData.cUrl); | ||
1787 | 485 | } | ||
1788 | 486 | else // sinon on utilise la commande par defaut. | ||
1789 | 487 | { | ||
1790 | 488 | cairo_dock_fm_launch_uri (myData.cUrl); | ||
1791 | 489 | } | ||
1792 | 490 | return; | ||
1793 | 491 | |||
1794 | 492 | } | ||
1795 | 493 | ////////////////////////////////////////////////////////////////////////// | ||
1796 | 494 | static void cd_wikipedia_gtk_main_quit() | ||
1797 | 495 | ////////////////////////////////////////////////////////////////////////// | ||
1798 | 496 | { | ||
1799 | 497 | myData.is_window_load=0; | ||
1800 | 498 | //gtk_main_quit(); | ||
1801 | 499 | } | ||
1802 | 500 | ////////////////////////////////////////////////////////////////////////// | ||
1803 | 501 | static void cb_remove (GtkWidget * p_wid, gpointer p_data) | ||
1804 | 502 | ////////////////////////////////////////////////////////////////////////// | ||
1805 | 503 | { | ||
1806 | 504 | GtkComboBox * p_combo = p_data; | ||
1807 | 505 | |||
1808 | 506 | |||
1809 | 507 | remove_active_item (p_combo); | ||
1810 | 508 | (void) p_wid; | ||
1811 | 509 | } | ||
1812 | 510 | ////////////////////////////////////////////////////////////////////////// | ||
1813 | 511 | GdkPixbuf *cd_wikipedia_create_pixbuf(void) | ||
1814 | 512 | ////////////////////////////////////////////////////////////////////////// | ||
1815 | 513 | { | ||
1816 | 514 | GdkPixbuf *pixbuf; | ||
1817 | 515 | GError *error = NULL; | ||
1818 | 516 | pixbuf = gdk_pixbuf_new_from_file(MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE, &error); | ||
1819 | 517 | if(!pixbuf) { | ||
1820 | 518 | fprintf(stderr, "%s\n", error->message); | ||
1821 | 519 | g_error_free(error); | ||
1822 | 520 | } | ||
1823 | 521 | |||
1824 | 522 | return pixbuf; | ||
1825 | 523 | } | ||
1826 | 524 | ////////////////////////////////////////////////////////////////////////// | ||
1827 | 525 | GdkPixbuf *cd_wikipedia_create_pixbuf_dict(void) | ||
1828 | 526 | ////////////////////////////////////////////////////////////////////////// | ||
1829 | 527 | { | ||
1830 | 528 | GdkPixbuf *pixbuf; | ||
1831 | 529 | GError *error = NULL; | ||
1832 | 530 | pixbuf = gdk_pixbuf_new_from_file(MY_APPLET_SHARE_DATA_DIR"/icone_dictionnaire1.gif", &error); | ||
1833 | 531 | if(!pixbuf) { | ||
1834 | 532 | fprintf(stderr, "%s\n", error->message); | ||
1835 | 533 | g_error_free(error); | ||
1836 | 534 | } | ||
1837 | 535 | |||
1838 | 536 | return pixbuf; | ||
1839 | 537 | } | ||
1840 | 538 | ////////////////////////////////////////////////////////////////////////// | ||
1841 | 539 | void cd_wikipedia_alim_combo(item, dummy) | ||
1842 | 540 | ////////////////////////////////////////////////////////////////////////// | ||
1843 | 541 | { | ||
1844 | 542 | // gtk_list_store_append (p_model, & iter); | ||
1845 | 543 | // gtk_list_store_set (p_model, & iter,0,item,1,item,-1); | ||
1846 | 544 | // return; | ||
1847 | 545 | //printf("%d\n",myData.flip_flop); | ||
1848 | 546 | if (myData.flip_flop == 0) | ||
1849 | 547 | { | ||
1850 | 548 | //printf("%s\n","***0***"); | ||
1851 | 549 | myData.flip_flop =1; | ||
1852 | 550 | myData.pointeur_sav=item; | ||
1853 | 551 | gtk_list_store_append (p_model, & iter); | ||
1854 | 552 | |||
1855 | 553 | } | ||
1856 | 554 | else | ||
1857 | 555 | { | ||
1858 | 556 | //printf("%s\n","***1***"); | ||
1859 | 557 | myData.flip_flop =0; | ||
1860 | 558 | gtk_list_store_set (p_model, & iter,0,myData.pointeur_sav,1,item,-1); | ||
1861 | 559 | } | ||
1862 | 560 | // gtk_list_store_append (p_model, & iter); | ||
1863 | 561 | // gtk_list_store_set (p_model, & iter,0,item,1,item2,-1); | ||
1864 | 562 | |||
1865 | 563 | } | ||
1866 | 564 | ////////////////////////////////////////////////////////////////////////// | ||
1867 | 565 | void cd_wikipedia_alim_combo_langues_src_dst(item, dummy) | ||
1868 | 566 | ////////////////////////////////////////////////////////////////////////// | ||
1869 | 567 | { | ||
1870 | 568 | if (myData.flip_flop == 0) | ||
1871 | 569 | { | ||
1872 | 570 | // printf("%s\n","***0***"); | ||
1873 | 571 | myData.flip_flop =1; | ||
1874 | 572 | myData.pointeur_sav=item; | ||
1875 | 573 | gtk_list_store_append (p_model_langues_src, & iter_langues_src); | ||
1876 | 574 | gtk_list_store_append (p_model_langues_dst, & iter_langues_dst); | ||
1877 | 575 | |||
1878 | 576 | } | ||
1879 | 577 | else | ||
1880 | 578 | { | ||
1881 | 579 | // printf("%s\n","***1***"); | ||
1882 | 580 | myData.flip_flop =0; | ||
1883 | 581 | gtk_list_store_set (p_model_langues_src, & iter_langues_src,0,myData.pointeur_sav,1,item,-1); | ||
1884 | 582 | gtk_list_store_set (p_model_langues_dst, & iter_langues_dst,0,myData.pointeur_sav,1,item,-1); | ||
1885 | 583 | } | ||
1886 | 584 | } | ||
1887 | 585 | ////////////////////////////////////////////////////////////////////////// | ||
1888 | 586 | void cd_wikipedia_alim_combo_moteurs(item, dummy) | ||
1889 | 587 | ////////////////////////////////////////////////////////////////////////// | ||
1890 | 588 | { | ||
1891 | 589 | gtk_list_store_append (p_model_moteurs, & iter_moteurs); | ||
1892 | 590 | gtk_list_store_set (p_model_moteurs, & iter_moteurs,0,item,-1); | ||
1893 | 591 | } | ||
1894 | 592 | ////////////////////////////////////////////////////////////////////////// | ||
1895 | 593 | void cd_wikipedia_on_clic_icon() | ||
1896 | 594 | ////////////////////////////////////////////////////////////////////////// | ||
1897 | 595 | { if (myData.is_window_load==1) | ||
1898 | 596 | { | ||
1899 | 597 | // cd_wikipedia_gtk_main_quit(); | ||
1900 | 598 | return; | ||
1901 | 599 | } | ||
1902 | 600 | else | ||
1903 | 601 | { | ||
1904 | 602 | cd_wikipedia_update_my_icon (myApplet); | ||
1905 | 603 | |||
1906 | 604 | //printf("%s\n","++++++++++++++++++++++++++++++++++++++++++"); | ||
1907 | 605 | //printf("%s\n","cd_wikipedia_on_clic_icon()"); | ||
1908 | 606 | pDialog = cairo_dock_show_dialog_full ("SuperSearch", // titre | ||
1909 | 607 | myIcon, myContainer, | ||
1910 | 608 | 0, // durée infinie | ||
1911 | 609 | MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE, // image à côté du titre, identique à celle de l'icône | ||
1912 | 610 | p_table, | ||
1913 | 611 | cd_wikipedia_action_on_click, myApplet, NULL); | ||
1914 | 612 | myData.is_window_load=1; | ||
1915 | 613 | } | ||
1916 | 614 | |||
1917 | 615 | } | ||
1918 | 616 | //dessin | ||
1919 | 617 | ////////////////////////////////////////////////////////////////////////// | ||
1920 | 618 | void cd_wikipedia_draw_my_desklet (CairoDockModuleInstance *myApplet, int iWidth, int iHeight) | ||
1921 | 619 | ////////////////////////////////////////////////////////////////////////// | ||
1922 | 620 | { | ||
1923 | 621 | int c; | ||
1924 | 622 | //Creation de la fenetre principale. | ||
1925 | 623 | //p_win = gtk_window_new (GTK_WINDOW_TOPLEVEL); | ||
1926 | 624 | //gtk_window_set_title (GTK_WINDOW (p_win), "multisearch"); | ||
1927 | 625 | //gtk_window_set_icon (GTK_WINDOW(p_win), cd_wikipedia_create_pixbuf()); | ||
1928 | 626 | //gtk_window_set_default_size (GTK_WINDOW (p_win), 300, 300); | ||
1929 | 627 | //gtk_container_set_border_width (GTK_CONTAINER (p_win), 5); | ||
1930 | 628 | //gtk_window_set_position (GTK_WINDOW (p_win), GTK_WIN_POS_CENTER); | ||
1931 | 629 | // gtk_window_move (GTK_WINDOW (p_win),myConfig.window_x_position ,myConfig.window_y_position); | ||
1932 | 630 | |||
1933 | 631 | //gtk_window_set_resizable (GTK_WINDOW(p_win), FALSE); | ||
1934 | 632 | /* Ajout du conteneur principal et des boutons. */ | ||
1935 | 633 | p_table=gtk_table_new(3,40,TRUE); | ||
1936 | 634 | // gtk_container_add(GTK_CONTAINER(p_win), GTK_WIDGET(p_table)); | ||
1937 | 635 | p_entry = gtk_entry_new(); | ||
1938 | 636 | // p_entry_translate = gtk_entry_new(); | ||
1939 | 637 | // gtk_box_pack_start(GTK_BOX(p_hbox), p_entry, TRUE, FALSE, 0); | ||
1940 | 638 | p_button[0] = gtk_button_new(); | ||
1941 | 639 | gtk_button_set_image(GTK_BUTTON(p_button[0]),gtk_image_new_from_pixbuf(cd_wikipedia_create_pixbuf_dict())); | ||
1942 | 640 | // GTK_WIDGET_SET_FLAGS (p_button[0], GTK_CAN_DEFAULT); | ||
1943 | 641 | // gtk_widget_grab_default(p_button[0]); | ||
1944 | 642 | // gtk_box_pack_start (GTK_BOX (p_hbox), p_button[0], FALSE, TRUE, 2); | ||
1945 | 643 | |||
1946 | 644 | //gtk_fixed_put(GTK_FIXED(p_fixed), p_button[0], 150, 50); | ||
1947 | 645 | //gtk_widget_set_size_request(p_button[0], 80, 35); | ||
1948 | 646 | //gtk_widget_set_size_request(p_button[0], 70, 30); | ||
1949 | 647 | //*Creation d'un GtkComboBox avec un GtkTreeModel personnalise. | ||
1950 | 648 | |||
1951 | 649 | gint i = 0; | ||
1952 | 650 | //Creation d'un model pour le GtkComboBox. | ||
1953 | 651 | p_model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); | ||
1954 | 652 | p_model_langues_src = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); | ||
1955 | 653 | p_model_langues_dst = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); | ||
1956 | 654 | p_model_moteurs = gtk_list_store_new (1, G_TYPE_STRING); | ||
1957 | 655 | // Creation d'un GtkComboBox avec son model. | ||
1958 | 656 | p_combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (p_model)); | ||
1959 | 657 | p_combo_moteurs = gtk_combo_box_new_with_model (GTK_TREE_MODEL (p_model_moteurs)); | ||
1960 | 658 | p_combo_langues_src = gtk_combo_box_new_with_model (GTK_TREE_MODEL (p_model_langues_src)); | ||
1961 | 659 | p_combo_langues_dst = gtk_combo_box_new_with_model (GTK_TREE_MODEL (p_model_langues_dst)); | ||
1962 | 660 | |||
1963 | 661 | // rendu des cellules | ||
1964 | 662 | p_cell_langues_src = gtk_cell_renderer_text_new (); | ||
1965 | 663 | gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo_langues_src), p_cell_langues_src, FALSE); | ||
1966 | 664 | gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo_langues_src),p_cell_langues_src, "text", 0,NULL); | ||
1967 | 665 | p_cell_langues_src = gtk_cell_renderer_text_new (); | ||
1968 | 666 | gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo_langues_src), p_cell_langues_src, FALSE); | ||
1969 | 667 | gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo_langues_src),p_cell_langues_src, "text", 1,NULL); | ||
1970 | 668 | |||
1971 | 669 | p_cell_langues_dst = gtk_cell_renderer_text_new (); | ||
1972 | 670 | gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo_langues_dst), p_cell_langues_dst, FALSE); | ||
1973 | 671 | gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo_langues_dst),p_cell_langues_dst, "text", 0,NULL); | ||
1974 | 672 | p_cell_langues_dst = gtk_cell_renderer_text_new (); | ||
1975 | 673 | gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo_langues_dst), p_cell_langues_dst, FALSE); | ||
1976 | 674 | gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo_langues_dst),p_cell_langues_dst, "text", 1,NULL); | ||
1977 | 675 | |||
1978 | 676 | p_cell = gtk_cell_renderer_text_new (); | ||
1979 | 677 | gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo), p_cell, FALSE); | ||
1980 | 678 | gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo),p_cell, "text", 0,NULL); | ||
1981 | 679 | p_cell = gtk_cell_renderer_text_new (); | ||
1982 | 680 | gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo), p_cell, FALSE); | ||
1983 | 681 | gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo),p_cell, "text", 1,NULL); | ||
1984 | 682 | |||
1985 | 683 | p_cell_moteurs = gtk_cell_renderer_text_new (); | ||
1986 | 684 | gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo_moteurs), p_cell_moteurs, FALSE); | ||
1987 | 685 | gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo_moteurs),p_cell_moteurs, "text", 0,NULL); | ||
1988 | 686 | |||
1989 | 687 | //alim de la combo | ||
1990 | 688 | myData.flip_flop=0; | ||
1991 | 689 | g_list_foreach(myData.code_nom_langues,cd_wikipedia_alim_combo,NULL); | ||
1992 | 690 | //gtk_combo_set_popdown_strings( GTK_COMBO(p_combo), myData.code_code_nom_langues) ; // met la liste dans la conbo box | ||
1993 | 691 | gtk_combo_box_set_active (GTK_COMBO_BOX (p_combo), 0); //On affiche un element par defaut. L'index commence à zero. | ||
1994 | 692 | g_list_foreach(myData.moteurs,cd_wikipedia_alim_combo_moteurs,NULL); | ||
1995 | 693 | gtk_combo_box_set_active (GTK_COMBO_BOX (p_combo_moteurs), 0); //On affiche un element par defaut. L'index commence à zero. | ||
1996 | 694 | myData.flip_flop = 0; | ||
1997 | 695 | g_list_foreach(myData.langues_traduites,cd_wikipedia_alim_combo_langues_src_dst,NULL); | ||
1998 | 696 | gtk_combo_box_set_active (GTK_COMBO_BOX (p_combo_langues_src), myData.indice_defaut_langues_src); //On affiche un element par defaut. L'index commence à zero. | ||
1999 | 697 | // g_list_foreach(myData.langues_traduites,cd_wikipedia_alim_combo_langues_dst,NULL); | ||
2000 | 698 | gtk_combo_box_set_active (GTK_COMBO_BOX (p_combo_langues_dst), myData.indice_defaut_langues_dst); //On affiche un element par defaut. L'index commence à zero. | ||
2001 | 699 | //g_signal_connect (G_OBJECT (p_win), "destroy", G_CALLBACK (cd_wikipedia_gtk_main_quit), NULL); | ||
2002 | 700 | |||
2003 | 701 | // on dessine la grille | ||
2004 | 702 | gtk_table_attach(GTK_TABLE(p_table), p_entry, 0,35,0,1,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0); | ||
2005 | 703 | gtk_table_attach(GTK_TABLE(p_table), p_button[0], 36,40,0,1,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0); | ||
2006 | 704 | gtk_table_attach(GTK_TABLE(p_table), p_combo, 0,19,1,2,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0); | ||
2007 | 705 | gtk_table_attach(GTK_TABLE(p_table), p_combo_moteurs, 20,40,1,2,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0); | ||
2008 | 706 | // gtk_table_attach(GTK_TABLE(p_table), p_entry_translate, 0,2,3,4,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0); | ||
2009 | 707 | gtk_table_attach(GTK_TABLE(p_table), p_combo_langues_src,0,19,2,3,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0); | ||
2010 | 708 | gtk_table_attach(GTK_TABLE(p_table), p_combo_langues_dst,20,40,2,3,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0); | ||
2011 | 709 | //gtk_widget_show_all (p_win); | ||
2012 | 710 | //gtk_main (); | ||
2013 | 711 | return ; | ||
2014 | 712 | } | ||
2015 | 713 | ////////////////////////////////////////////////////////////////////////// | ||
2016 | 714 | void cd_wikipedia_action_on_click (int iNumButton, GtkWidget *pInteractiveWidget, CairoDockModuleInstance *myApplet, CairoDialog *pDialog) | ||
2017 | 715 | ////////////////////////////////////////////////////////////////////////// | ||
2018 | 716 | { | ||
2019 | 717 | printf("%s\n","++++++++++++++++++++++++++++++++++++++++++"); | ||
2020 | 718 | printf("%s\n","cd_wikipedia_action_on_clic()"); | ||
2021 | 719 | |||
2022 | 720 | if (iNumButton == 0 || iNumButton == -1) // clic sur OK ou appui sur Entree | ||
2023 | 721 | { | ||
2024 | 722 | printf("%s\n","444444444444444444444444444444"); | ||
2025 | 723 | cd_wikipedia_create_url(); | ||
2026 | 724 | } | ||
2027 | 725 | //cairo_dock_dialog_unreference (pDialog); | ||
2028 | 726 | myData.is_window_load=0; | ||
2029 | 727 | } | ||
2030 | 728 | ////////////////////////////////////////////////////////////////////////// | ||
2031 | 729 | void cd_wikipedia_action_on_click2 (int iNumButton, GtkWidget *pInteractiveWidget, CairoDockModuleInstance *myApplet, CairoDialog *pDialog2) | ||
2032 | 730 | //void cd_wikipedia_action_on_click (int iNumButton, GtkWidget *pInteractiveWidget, CairoDockModuleInstance *myApplet, CairoDialog *pDialog) | ||
2033 | 731 | ////////////////////////////////////////////////////////////////////////// | ||
2034 | 732 | |||
2035 | 733 | { | ||
2036 | 734 | // cairo_dock_remove_dialog_if_any (myIcon); | ||
2037 | 735 | if (iNumButton == 0 || iNumButton == -1) // clic sur OK ou appui sur Entree | ||
2038 | 736 | { | ||
2039 | 737 | cd_wikipedia_launch_browser(); | ||
2040 | 738 | //cd_wikipedia_launch_browser(); | ||
2041 | 739 | } | ||
2042 | 740 | |||
2043 | 741 | // myData.is_window_load=0; | ||
2044 | 742 | // cairo_dock_dialog_unreference (myData.pDialog2); | ||
2045 | 743 | return; | ||
2046 | 744 | } | ||
2047 | 745 | ///////////////////////////////////////////////////////// | ||
2048 | 746 | void cd_wikipedia_build_and_show (CairoDockModuleInstance *myApplet) | ||
2049 | 747 | ///////////////////////////////////////////////////////// | ||
2050 | 748 | { | ||
2051 | 749 | printf("%s\n","cd_wikipedia_build_and_show"); | ||
2052 | 750 | // cairo_dock_remove_dialog_if_any (myIcon); | ||
2053 | 751 | myData.pGtkMozEmbed = gtk_scrolled_window_new (NULL, NULL); | ||
2054 | 752 | gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (myData.pGtkMozEmbed), myConfig.bShowScrollbars?GTK_POLICY_AUTOMATIC:GTK_POLICY_NEVER, myConfig.bShowScrollbars?GTK_POLICY_AUTOMATIC:GTK_POLICY_NEVER); | ||
2055 | 753 | printf("%s\n","1111111111111111111111111111111&"); | ||
2056 | 754 | myData.pWebKitView = WEBKIT_WEB_VIEW (webkit_web_view_new ()); | ||
2057 | 755 | //myData.cUrl="http://www.cairo-dock.org"; | ||
2058 | 756 | |||
2059 | 757 | |||
2060 | 758 | // webkit_web_view_load_uri(WEBKIT_WEB_VIEW(myData.pWebKitView),tmp); | ||
2061 | 759 | printf("%s\n","*************************************************"); | ||
2062 | 760 | |||
2063 | 761 | //printf("%s\n",myData.cUrl); | ||
2064 | 762 | |||
2065 | 763 | // webkit_web_view_set_transparent(myData.pWebKitView, TRUE); | ||
2066 | 764 | |||
2067 | 765 | gtk_container_add (GTK_CONTAINER (myData.pGtkMozEmbed), GTK_WIDGET (myData.pWebKitView)); | ||
2068 | 766 | // gtk_signal_connect(GTK_OBJECT(myData.pWebKitView), | ||
2069 | 767 | // "load_finished", | ||
2070 | 768 | // GTK_SIGNAL_FUNC(cd_wikipedia_load_finished_cb), | ||
2071 | 769 | // myApplet); | ||
2072 | 770 | // gtk_widget_show_all (myData.pGtkMozEmbed); | ||
2073 | 771 | printf("%s\n","++++++++++++++++++++dialog2"); | ||
2074 | 772 | gtk_widget_set (GTK_WIDGET (myData.pWebKitView), "width-request", myData.size2[0], "height-request", myData.size2[1], NULL); | ||
2075 | 773 | myData.pDialog2 = cairo_dock_show_dialog_full ("SuperSearch", // titre | ||
2076 | 774 | myIcon, myContainer, | ||
2077 | 775 | 0, // durée infinie | ||
2078 | 776 | MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE, // image à côté du titre, identique à celle de l'icône | ||
2079 | 777 | myData.pGtkMozEmbed, | ||
2080 | 778 | cd_wikipedia_action_on_click2, myApplet, NULL); | ||
2081 | 779 | // webkit_web_view_load_uri(WEBKIT_WEB_VIEW(myData.pWebKitView), tmp); | ||
2082 | 780 | |||
2083 | 781 | // webkit_web_view_load_uri(WEBKIT_WEB_VIEW(myData.pWebKitView), myData.cUrl); | ||
2084 | 782 | // myData.is_window_load=1; | ||
2085 | 783 | |||
2086 | 784 | |||
2087 | 785 | |||
2088 | 786 | return; | ||
2089 | 787 | } | ||
2090 | 788 | |||
2091 | 789 | |||
2092 | 790 | |||
2093 | 791 | |||
2094 | 0 | 792 | ||
2095 | === added file 'wikipedia/src/applet-wikipedia.h' | |||
2096 | --- wikipedia/src/applet-wikipedia.h 1970-01-01 00:00:00 +0000 | |||
2097 | +++ wikipedia/src/applet-wikipedia.h 2010-01-02 11:50:25 +0000 | |||
2098 | @@ -0,0 +1,44 @@ | |||
2099 | 1 | /** | ||
2100 | 2 | * This file is a part of the Cairo-Dock project | ||
2101 | 3 | * | ||
2102 | 4 | * Copyright : (C) see the 'copyright' file. | ||
2103 | 5 | * E-mail : see the 'copyright' file. | ||
2104 | 6 | * | ||
2105 | 7 | * This program is free software; you can redistribute it and/or | ||
2106 | 8 | * modify it under the terms of the GNU General Public License | ||
2107 | 9 | * as published by the Free Software Foundation; either version 3 | ||
2108 | 10 | * of the License, or (at your option) any later version. | ||
2109 | 11 | * | ||
2110 | 12 | * This program is distributed in the hope that it will be useful, | ||
2111 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2112 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2113 | 15 | * GNU General Public License for more details. | ||
2114 | 16 | * You should have received a copy of the GNU General Public License | ||
2115 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2116 | 18 | */ | ||
2117 | 19 | |||
2118 | 20 | |||
2119 | 21 | #ifndef __APPLET_WIKIPEDIA__ | ||
2120 | 22 | #define __APPLET_WIKIPEDIA__ | ||
2121 | 23 | |||
2122 | 24 | #include <cairo-dock.h> | ||
2123 | 25 | #include "applet-struct.h" | ||
2124 | 26 | #include <stdio.h> | ||
2125 | 27 | #include <gtk/gtk.h> | ||
2126 | 28 | #include <webkit/webkit.h> | ||
2127 | 29 | void cd_wikipedia_on_clic_icon(); | ||
2128 | 30 | void cd_wikipedia_load_moteurs(); | ||
2129 | 31 | void cd_wikipedia_load_langues(); | ||
2130 | 32 | void cd_wikipedia_action_on_click (int iNumButton, GtkWidget *pInteractiveWidget, CairoDockModuleInstance *myApplet, CairoDialog *pDialog); | ||
2131 | 33 | void cd_wikipedia_action_on_click2 (int iNumButton, GtkWidget *pInteractiveWidget, CairoDockModuleInstance *myApplet, CairoDialog *pDialog); | ||
2132 | 34 | //void cd_wikipedia_action_on_click2 (void); | ||
2133 | 35 | void cd_wikipedia_draw_my_desklet (CairoDockModuleInstance *myApplet, int iWidth, int iHeight); | ||
2134 | 36 | void cd_wikipedia_update_my_icon (CairoDockModuleInstance *myApplet); | ||
2135 | 37 | //void cd_wikipedia_on_clic_icon(void); | ||
2136 | 38 | void cd_wikipedia_build_and_show (CairoDockModuleInstance *myApplet); | ||
2137 | 39 | void cd_wikipedia_create_url (); | ||
2138 | 40 | void cd_wikipedia_launch_browser (); | ||
2139 | 41 | void cd_wikipedia_on_keybinding_pull(const char *keystring, gpointer user_data); | ||
2140 | 42 | #endif | ||
2141 | 43 | |||
2142 | 44 |
mise à dispo pour test