Merge lp:~zartan/cairo-dock-plug-ins/wikipedia into lp:~cairo-dock-team/cairo-dock-plug-ins/plug-ins

Proposed by zartan on 2009-12-15
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
Reviewer Review Type Date Requested Status
Cairo-Dock Devs 2009-12-15 Pending
Review via email: mp+16195@code.launchpad.net
To post a comment you must log in.
zartan (zartan) wrote :

mise à dispo pour test

1449. By Fabounet (Fabrice Rey) - http://cairo-dock.org on 2009-12-17

start to use CD_APPLET_ENTER and CD_APPLET_LEAVE

1450. By Fabounet (Fabrice Rey) - http://cairo-dock.org on 2009-12-19

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> on 2009-12-19

mtasaka: patch needed to enable showDesklets | Added RssReader in copyright

1452. By Fabounet (Fabrice Rey) - http://cairo-dock.org on 2009-12-19

wifi : fix to retrieve the ESSID and Access Point

1453. By Fabounet (Fabrice Rey) - http://cairo-dock.org on 2009-12-19

merged wifi and netspeed, scroll on the icon switches from one to the other

1454. By Matth <mbaerts@Matth> on 2009-12-21

ShowDesktop : little correction in config panel + updated the version

1455. By Matth <mbaerts@Matth> on 2009-12-22

DND2SHARE : added a 'Paste' button + icons for 'Clean History'

1456. By Fabounet (Fabrice Rey) - http://cairo-dock.org on 2009-12-22

got SSID and the list of access point

1457. By Matth <mbaerts@Matth> on 2009-12-23

Updated translations : Thanks to all contributors !

1458. By Fabounet (Fabrice Rey) - http://cairo-dock.org on 2009-12-28

I'm back :-)

1459. By Fabounet (Fabrice Rey) - http://cairo-dock.org on 2009-12-28

fixed the internet caracters that appeared with some crazy sites

1460. By Fabounet (Fabrice Rey) - http://cairo-dock.org on 2009-12-29

smoother cube rotation

1461. By Fabounet (Fabrice Rey) - http://cairo-dock.org on 2009-12-30

weather : decreased the connection timeout

1462. By zartan on 2010-01-01

corrections

1463. By zartan on 2010-01-01

corections bugs

1464. By zartan on 2010-01-02

ctrl F9

1465. By zartan on 2010-01-02

corections bugs

1466. By zartan on 2010-01-02

shortkey ctrl-F9 par defaut

Unmerged revisions

1466. By zartan on 2010-01-02

shortkey ctrl-F9 par defaut

1465. By zartan on 2010-01-02

corections bugs

1464. By zartan on 2010-01-02

ctrl F9

1463. By zartan on 2010-01-01

corections bugs

1462. By zartan on 2010-01-01

corrections

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'wikipedia'
=== added file 'wikipedia/Makefile.am'
--- wikipedia/Makefile.am 1970-01-01 00:00:00 +0000
+++ wikipedia/Makefile.am 2010-01-02 11:50:25 +0000
@@ -0,0 +1,3 @@
1#dnl Process this file with automake to produce Makefile.in
2
3SUBDIRS = . src data
04
=== added file 'wikipedia/configure.ac'
--- wikipedia/configure.ac 1970-01-01 00:00:00 +0000
+++ wikipedia/configure.ac 2010-01-02 11:50:25 +0000
@@ -0,0 +1,34 @@
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
5AC_INIT([cd-wikipedia],[0.0.18],[zartan (alain.laclef@free.fr)])
6AC_CONFIG_SRCDIR([config.h.in])
7AC_CONFIG_HEADER([config.h])
8
9AM_INIT_AUTOMAKE([foreign])
10AC_DISABLE_STATIC
11AC_PROG_LIBTOOL
12
13
14AC_SUBST(VERSION_WIKIPEDIA, "$VERSION")
15AC_SUBST(PACKAGE_WIKIPEDIA, "$PACKAGE")
16
17wikipediauserdirname="wikipedia"
18AC_SUBST(wikipediauserdirname)
19wikipediadatadir=[`pkg-config cairo-dock --variable=pluginsdatadir`/wikipedia]
20AC_SUBST(wikipediadatadir)
21libdir=[`pkg-config cairo-dock --variable=pluginsdir`]
22AC_SUBST(libdir)
23
24PKG_CHECK_MODULES(PACKAGE, cairo-dock)
25
26PKG_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.) ])
27AC_SUBST(WEBKIT_CFLAGS)
28AC_SUBST(WEBKIT_LIBS)
29
30AC_CONFIG_FILES([Makefile
31 src/Makefile
32 data/Makefile
33 data/wikipedia.conf])
34AC_OUTPUT
035
=== added directory 'wikipedia/data'
=== added file 'wikipedia/data/Gnome-dictionary.svg'
--- wikipedia/data/Gnome-dictionary.svg 1970-01-01 00:00:00 +0000
+++ wikipedia/data/Gnome-dictionary.svg 2010-01-02 11:50:25 +0000
@@ -0,0 +1,296 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3<svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://web.resource.org/cc/"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:xlink="http://www.w3.org/1999/xlink"
10 xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="48px"
13 height="48px"
14 id="svg1307"
15 sodipodi:version="0.32"
16 inkscape:version="0.43"
17 sodipodi:docname="gnome-dictionary.svg"
18 inkscape:export-xdpi="90"
19 inkscape:export-ydpi="90">
20 <defs
21 id="defs1309">
22 <linearGradient
23 inkscape:collect="always"
24 id="linearGradient15424">
25 <stop
26 style="stop-color:#729fcf;stop-opacity:1;"
27 offset="0"
28 id="stop15426" />
29 <stop
30 style="stop-color:#729fcf;stop-opacity:0;"
31 offset="1"
32 id="stop15428" />
33 </linearGradient>
34 <linearGradient
35 id="linearGradient11002">
36 <stop
37 style="stop-color:#eeeeee;stop-opacity:1;"
38 offset="0"
39 id="stop11004" />
40 <stop
41 style="stop-color:#d3d7cf;stop-opacity:1;"
42 offset="1"
43 id="stop11006" />
44 </linearGradient>
45 <linearGradient
46 id="linearGradient7492">
47 <stop
48 style="stop-color:#a40000;stop-opacity:1;"
49 offset="0"
50 id="stop7494" />
51 <stop
52 style="stop-color:#cc0000;stop-opacity:0.74509805;"
53 offset="1"
54 id="stop7496" />
55 </linearGradient>
56 <linearGradient
57 id="linearGradient7484">
58 <stop
59 style="stop-color:#cc0000;stop-opacity:1;"
60 offset="0"
61 id="stop7486" />
62 <stop
63 style="stop-color:#cc0000;stop-opacity:1;"
64 offset="1"
65 id="stop7488" />
66 </linearGradient>
67 <linearGradient
68 inkscape:collect="always"
69 id="linearGradient5722">
70 <stop
71 style="stop-color:#729fcf;stop-opacity:1;"
72 offset="0"
73 id="stop5724" />
74 <stop
75 style="stop-color:#729fcf;stop-opacity:0;"
76 offset="1"
77 id="stop5726" />
78 </linearGradient>
79 <linearGradient
80 id="linearGradient3077">
81 <stop
82 style="stop-color:#3465a4;stop-opacity:1;"
83 offset="0"
84 id="stop3079" />
85 <stop
86 style="stop-color:#3465a4;stop-opacity:0;"
87 offset="1"
88 id="stop3081" />
89 </linearGradient>
90 <linearGradient
91 inkscape:collect="always"
92 xlink:href="#linearGradient5722"
93 id="linearGradient5728"
94 x1="45"
95 y1="34.184055"
96 x2="7.8263865"
97 y2="5.1271901"
98 gradientUnits="userSpaceOnUse"
99 gradientTransform="matrix(1,0,0,0.963894,0,1.234246)" />
100 <linearGradient
101 inkscape:collect="always"
102 xlink:href="#linearGradient7492"
103 id="linearGradient7498"
104 x1="45.402073"
105 y1="32.607113"
106 x2="8.1801958"
107 y2="7"
108 gradientUnits="userSpaceOnUse"
109 gradientTransform="matrix(0.92971,0,0,1,2.031898,1)" />
110 <linearGradient
111 inkscape:collect="always"
112 xlink:href="#linearGradient11002"
113 id="linearGradient12780"
114 gradientUnits="userSpaceOnUse"
115 gradientTransform="matrix(1,0,0,0.800658,-1.049033e-8,7.880118)"
116 x1="3.6162441"
117 y1="43.778091"
118 x2="43.494923"
119 y2="35.142323" />
120 <linearGradient
121 inkscape:collect="always"
122 xlink:href="#linearGradient15424"
123 id="linearGradient15430"
124 x1="42.706234"
125 y1="32.362251"
126 x2="3.0072398"
127 y2="2.8657963"
128 gradientUnits="userSpaceOnUse" />
129 <linearGradient
130 inkscape:collect="always"
131 xlink:href="#linearGradient11002"
132 id="linearGradient15455"
133 gradientUnits="userSpaceOnUse"
134 gradientTransform="matrix(1,0,0,0.800658,-1.049033e-8,7.880118)"
135 x1="3.6162441"
136 y1="43.778091"
137 x2="43.494923"
138 y2="35.142323" />
139 <linearGradient
140 inkscape:collect="always"
141 xlink:href="#linearGradient15424"
142 id="linearGradient15457"
143 gradientUnits="userSpaceOnUse"
144 x1="42.706234"
145 y1="32.362251"
146 x2="3.0072398"
147 y2="2.8657963" />
148 <linearGradient
149 inkscape:collect="always"
150 xlink:href="#linearGradient5722"
151 id="linearGradient15459"
152 gradientUnits="userSpaceOnUse"
153 gradientTransform="matrix(1,0,0,0.963894,3.261281e-16,1.234246)"
154 x1="45"
155 y1="34.184055"
156 x2="7.8263865"
157 y2="5.1271901" />
158 <linearGradient
159 inkscape:collect="always"
160 xlink:href="#linearGradient7492"
161 id="linearGradient15461"
162 gradientUnits="userSpaceOnUse"
163 gradientTransform="matrix(0.92971,0,0,1,2.031898,1)"
164 x1="45.402073"
165 y1="32.607113"
166 x2="8.1801958"
167 y2="7" />
168 </defs>
169 <sodipodi:namedview
170 id="base"
171 pagecolor="#ffffff"
172 bordercolor="#666666"
173 borderopacity="1.0"
174 inkscape:pageopacity="0.0"
175 inkscape:pageshadow="2"
176 inkscape:zoom="9.8994949"
177 inkscape:cx="24.295867"
178 inkscape:cy="23.945596"
179 inkscape:current-layer="layer5"
180 showgrid="true"
181 inkscape:grid-bbox="true"
182 inkscape:document-units="px"
183 fill="#d3d7cf"
184 inkscape:window-width="1014"
185 inkscape:window-height="668"
186 inkscape:window-x="0"
187 inkscape:window-y="25" />
188 <metadata
189 id="metadata1312">
190 <rdf:RDF>
191 <cc:Work
192 rdf:about="">
193 <dc:format>image/svg+xml</dc:format>
194 <dc:type
195 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
196 </cc:Work>
197 </rdf:RDF>
198 </metadata>
199 <g
200 id="layer1"
201 inkscape:label="back-cover"
202 inkscape:groupmode="layer"
203 style="display:inline" />
204 <g
205 inkscape:groupmode="layer"
206 id="layer6"
207 inkscape:label="pages" />
208 <g
209 inkscape:groupmode="layer"
210 id="layer7"
211 inkscape:label="spine" />
212 <g
213 inkscape:groupmode="layer"
214 id="layer2"
215 inkscape:label="front-cover"
216 style="display:inline" />
217 <g
218 inkscape:groupmode="layer"
219 id="layer8"
220 inkscape:label="highlight"
221 style="display:inline" />
222 <g
223 inkscape:groupmode="layer"
224 id="layer3"
225 inkscape:label="glow"
226 style="display:inline" />
227 <g
228 inkscape:groupmode="layer"
229 id="layer4"
230 inkscape:label="title-1"
231 style="display:inline" />
232 <g
233 inkscape:groupmode="layer"
234 id="layer5"
235 inkscape:label="title-2"
236 style="display:inline">
237 <g
238 id="g15442"
239 transform="matrix(0.931943,0,0,0.949698,2.176413,0.278207)">
240 <path
241 sodipodi:nodetypes="ccccccccc"
242 id="rect1315"
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 "
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" />
245 <path
246 sodipodi:nodetypes="ccccccssc"
247 id="rect7505"
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 "
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" />
250 <path
251 sodipodi:nodetypes="czzcc"
252 id="path8381"
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"
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" />
255 <path
256 sodipodi:nodetypes="czzcc"
257 id="path11030"
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"
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" />
260 <path
261 id="path11032"
262 d="M 1.5,37.5 L 6.3529412,6.6997504 L 6.3529412,7.1285302 L 6.3529412,7.1285302"
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" />
264 <path
265 sodipodi:nodetypes="ccccccccc"
266 id="path2195"
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 "
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" />
269 <path
270 sodipodi:nodetypes="ccccccccc"
271 id="path12801"
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 "
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" />
274 <path
275 sodipodi:nodetypes="ccccccccc"
276 id="path13676"
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 "
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" />
279 <path
280 sodipodi:nodetypes="czcccccccc"
281 id="path3092"
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 "
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" />
284 <path
285 sodipodi:nodetypes="ccccc"
286 id="path7500"
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 "
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" />
289 <path
290 sodipodi:nodetypes="ccccc"
291 id="path6609"
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 "
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" />
294 </g>
295 </g>
296</svg>
0297
=== added file 'wikipedia/data/Makefile.am'
--- wikipedia/data/Makefile.am 1970-01-01 00:00:00 +0000
+++ wikipedia/data/Makefile.am 2010-01-02 11:50:25 +0000
@@ -0,0 +1,15 @@
1
2SUBDIRS = .
3
4moduledir = $(wikipediadatadir)
5
6module_DATA = \
7 wikipedia.conf\
8 preview.jpg\
9 langues.dat\
10 loading.html\
11 loading.gif\
12 Gnome-dictionary.svg\
13 icon.png
14
15EXTRA_DIST = $(module_DATA)
016
=== added file 'wikipedia/data/icon.png'
1Binary files wikipedia/data/icon.png 1970-01-01 00:00:00 +0000 and wikipedia/data/icon.png 2010-01-02 11:50:25 +0000 differ17Binary 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
=== added file 'wikipedia/data/icone_dictionnaire1.gif'
2Binary 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 differ18Binary 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
=== added file 'wikipedia/data/langues.dat'
--- wikipedia/data/langues.dat 1970-01-01 00:00:00 +0000
+++ wikipedia/data/langues.dat 2010-01-02 11:50:25 +0000
@@ -0,0 +1,267 @@
10,Acèh,ace,ace,ace,ace,ace,ace,ace,,
21,Afrikaans,af,af,af,af,af,af,af,,
30,Akan,ak,ak,ak,ak,ak,ak,ak,,
40,Alemannisch,als,als,als,als,als,als,als,,
50,Anglo-Saxon,ang,ang,ang,ang,ang,ang,ang,,
60,Aragonés,an,an,an,an,an,an,an,,
70,Armãneashce,roa-rup,roa-rup,roa-rup,roa-rup,roa-rup,roa-rup,roa-rup,,
80,Arpetan,frp,frp,frp,frp,frp,frp,frp,,
90,Asturianu,ast,ast,ast,ast,ast,ast,ast,,
100,Avañe'ẽ,gn,gn,gn,gn,gn,gn,gn,,
110,Aymar,aru,ay,ay,ay,ay,ay,ay,ay,
120,Azərbaycan,az,az,az,az,az,az,az,,
131,Bahasa,Indonesia,id,id,id,id,id,id,id,
141,Bahasa,Melayu,ms,ms,ms,ms,ms,ms,ms,
150,Bamanankan,bm,bm,bm,bm,bm,bm,bm,,
160,Bân-lâm-gú,nan,nan,nan,nan,nan,nan,nan,,
170,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,,
180,Basa,Jawa,jv,jv,jv,jv,jv,jv,jv,
190,Basa,Banyumasan,map-bms,map-bms,map-bms,map-bms,map-bms,map-bms,map-bms,
200,Basa,Sunda,su,su,su,su,su,su,su,
21Bikol,Central,bcl,bcl,bcl,bcl,bcl,bcl,bcl,
220,Bislama,bi,bi,bi,bi,bi,bi,bi,,
230,Boarisch,bar,bar,bar,bar,bar,bar,bar,,
240,Bosanski,bs,bs,bs,bs,bs,bs,bs,,
250,Brezhoneg,br,br,br,br,br,br,br,,
261,Català,ca,ca,ca,ca,ca,ca,ca,,
270,Cebuano,ceb,ceb,ceb,ceb,ceb,ceb,ceb,,
281,Česky,cs,cs,cs,cs,cs,cs,cs,,
290,Chamoru,ch,ch,ch,ch,ch,ch,ch,,
300,Chavacano,de,Zamboanga,cbk-zam,cbk-zam,cbk-zam,cbk-zam,cbk-zam,cbk-zam,cbk-zam
310,Chi-Chewa,ny,ny,ny,ny,ny,ny,ny,,
320,chiShona,sn,sn,sn,sn,sn,sn,sn,,
330,chiTumbuka,tum,tum,tum,tum,tum,tum,tum,,
340,Choctaw,cho,cho,cho,cho,cho,cho,cho,,
350,Corsu,co,co,co,co,co,co,co,,
361,Cymraeg,cy,cy,cy,cy,cy,cy,cy,,
370,cz,cz,cz,cz,cz,cz,cz,,,
381,Dansk,da,da,da,da,da,da,da,,
390,Deitsch,pdc,pdc,pdc,pdc,pdc,pdc,pdc,,
401,Deutsch,de,de,de,de,de,de,de,,
410,Diné,bizaad,nv,nv,nv,nv,nv,nv,nv,
420,Dolnoserbski,dsb,dsb,dsb,dsb,dsb,dsb,dsb,,
430,Dorerin,Naoero,na,na,na,na,na,na,na,
440,Ebon,mh,mh,mh,mh,mh,mh,mh,,
451,Eesti,et,et,et,et,et,et,et,,
460,Emiliàn,eml,rumagnòl,eml,eml,eml,eml,eml,eml,eml
471,English,en,en,en,en,en,en,en,,
480,epo,epo,epo,epo,epo,epo,epo,,,
491,Español,es,es,es,es,es,es,es,,
500,Esperanto,eo,eo,eo,eo,eo,eo,eo,,
510,Estremeñu,ext,ext,ext,ext,ext,ext,ext,,
520,Euskara,eu,eu,eu,eu,eu,eu,eu,,
530,Eʋegbe,ee,ee,ee,ee,ee,ee,ee,,
540,Fiji,Hindi,hif,hif,hif,hif,hif,hif,hif,
550,Føroyskt,fo,fo,fo,fo,fo,fo,fo,,
561,Français,fr,fr,fr,fr,fr,fr,fr,,
570,Frysk,fy,fy,fy,fy,fy,fy,fy,,
580,Fulfulde,ff,ff,ff,ff,ff,ff,ff,,
590,Furlan,fur,fur,fur,fur,fur,fur,fur,,
601,Gaeilge,ga,ga,ga,ga,ga,ga,ga,,
610,Gaelg,gv,gv,gv,gv,gv,gv,gv,,
620,Gagana,Samoa,sm,sm,sm,sm,sm,sm,sm,
630,Gàidhlig,gd,gd,gd,gd,gd,gd,gd,,
641,Galego,gl,gl,gl,gl,gl,gl,gl,,
650,Gĩkũyũ,ki,ki,ki,ki,ki,ki,ki,,
660,Hak-kâ-fa,hak,hak,hak,hak,hak,hak,hak,,
670,Hawai`i,haw,haw,haw,haw,haw,haw,haw,,
680,Hiri,Motu,ho,ho,ho,ho,ho,ho,ho,
690,Hornjoserbsce,hsb,hsb,hsb,hsb,hsb,hsb,hsb,,
701,Hrvatski,hr,hr,hr,hr,hr,hr,hr,,
710,Ido,io,io,io,io,io,io,io,,
720,Igbo,ig,ig,ig,ig,ig,ig,ig,,
730,Ilokano,ilo,ilo,ilo,ilo,ilo,ilo,ilo,,
740,Interlingua,ia,ia,ia,ia,ia,ia,ia,,
750,Interlingue,ie,ie,ie,ie,ie,ie,ie,,
760,Iñupiak,ik,ik,ik,ik,ik,ik,ik,,
770,isiXhosa,xh,xh,xh,xh,xh,xh,xh,,
780,isiZulu,zu,zu,zu,zu,zu,zu,zu,,
791,Íslenska,is,is,is,is,is,is,is,,
801,Italiano,it,it,it,it,it,it,it,,
810,jp,jp,jp,jp,jp,jp,jp,,,
820,Kalaallisut,kl,kl,kl,kl,kl,kl,kl,,
830,Kanuri,kr,kr,kr,kr,kr,kr,kr,,
840,Kapampangan,pam,pam,pam,pam,pam,pam,pam,,
850,Kaszëbsczi,csb,csb,csb,csb,csb,csb,csb,,
860,Kernowek,kw,kw,kw,kw,kw,kw,kw,,
870,Kinyarwanda,rw,rw,rw,rw,rw,rw,rw,,
880,Kirundi,rn,rn,rn,rn,rn,rn,rn,,
891,Kiswahili,sw,sw,sw,sw,sw,sw,sw,,
900,Kongo,kg,kg,kg,kg,kg,kg,kg,,
910,Kreyòl,ayisyen,ht,ht,ht,ht,ht,ht,ht,
920,Kurdî,ku,كوردی,ku,ku,ku,ku,ku,ku,ku
930,Kwanyama,kj,kj,kj,kj,kj,kj,kj,,
940,Ladino,lad,lad,lad,lad,lad,lad,lad,,
950,Latina,la,la,la,la,la,la,la,,
961,Latviešu,lv,lv,lv,lv,lv,lv,lv,,
970,lea,faka-Tonga,to,to,to,to,to,to,to,
980,Lëtzebuergesch,lb,lb,lb,lb,lb,lb,lb,,
991,Lietuvių,lt,lt,lt,lt,lt,lt,lt,,
1000,Líguru,lij,lij,lij,lij,lij,lij,lij,,
1010,Limburgs,li,li,li,li,li,li,li,,
1020,Lingála,ln,ln,ln,ln,ln,ln,ln,,
1030,Lojban,jbo,jbo,jbo,jbo,jbo,jbo,jbo,,
1040,Luganda,lg,lg,lg,lg,lg,lg,lg,,
1050,Lumbaart,lmo,lmo,lmo,lmo,lmo,lmo,lmo,,
1061,Magyar,hu,hu,hu,hu,hu,hu,hu,,
1070,Malagasy,mg,mg,mg,mg,mg,mg,mg,,
1081,Malti,mt,mt,mt,mt,mt,mt,mt,,
1090,Māori,mi,mi,mi,mi,mi,mi,mi,,
1100,Mìng-dĕ̤ng-ngṳ̄,cdo,cdo,cdo,cdo,cdo,cdo,cdo,,
1110,minnan,minnan,minnan,minnan,minnan,minnan,minnan,,,
1120,Mirandés,mwl,mwl,mwl,mwl,mwl,mwl,mwl,,
1130,Mvskoke,mus,mus,mus,mus,mus,mus,mus,,
1140,Na,Vosa,Vakaviti,fj,fj,fj,fj,fj,fj,fj
1150,Nāhuatl,nah,nah,nah,nah,nah,nah,nah,,
1161,Nederlands,nl,nl,nl,nl,nl,nl,nl,,
1170,Nedersaksisch,nds-nl,nds-nl,nds-nl,nds-nl,nds-nl,nds-nl,nds-nl,,
1180,Nnapulitano,nap,nap,nap,nap,nap,nap,nap,,
1190,nomcom,nomcom,nomcom,nomcom,nomcom,nomcom,nomcom,,,
1200,‪Norsk,(bokmål)‬,nb,nb,nb,nb,nb,nb,nb,
1210,‪Norsk,(nynorsk)‬,nn,nn,nn,nn,nn,nn,nn,
122‪1,Norsk,(bokmål)‬,no,no,no,no,no,no,no,
1230,Nouormand,nrm,nrm,nrm,nrm,nrm,nrm,nrm,,
1240,Novial,nov,nov,nov,nov,nov,nov,nov,,
1250,O'zbek,uz,uz,uz,uz,uz,uz,uz,,
1260,Occitan,oc,oc,oc,oc,oc,oc,oc,,
1270,Oromoo,om,om,om,om,om,om,om,,
1280,Oshiwambo,ng,ng,ng,ng,ng,ng,ng,,
1290,Otsiherero,hz,hz,hz,hz,hz,hz,hz,,
1300,Pangasinan,pag,pag,pag,pag,pag,pag,pag,,
1310,Papiamentu,pap,pap,pap,pap,pap,pap,pap,,
1320,Piemontèis,pms,pms,pms,pms,pms,pms,pms,,
1330,Plattdüütsch,nds,nds,nds,nds,nds,nds,nds,,
1341,Polski,pl,pl,pl,pl,pl,pl,pl,,
1351,Português,pt,pt,pt,pt,pt,pt,pt,,
1360,Qafár,af,aa,aa,aa,aa,aa,aa,aa,
1370,Qaraqalpaqsha,kaa,kaa,kaa,kaa,kaa,kaa,kaa,,
1380,Qırımtatarca,crh,crh,crh,crh,crh,crh,crh,,
1390,Reo,Mā`ohi,ty,ty,ty,ty,ty,ty,ty,
1400,Ripoarisch,ksh,ksh,ksh,ksh,ksh,ksh,ksh,,
1411,Română,ro,ro,ro,ro,ro,ro,ro,,
1420,Romani,rmy,rmy,rmy,rmy,rmy,rmy,rmy,,
1430,Rumantsch,rm,rm,rm,rm,rm,rm,rm,,
1440,Runa,Simi,qu,qu,qu,qu,qu,qu,qu,
1450,Sámegiella,se,se,se,se,se,se,se,,
1460,Sängö,sg,sg,sg,sg,sg,sg,sg,,
1470,Sardu,sc,sc,sc,sc,sc,sc,sc,,
1480,Scots,sco,sco,sco,sco,sco,sco,sco,,
1490,Seeltersk,stq,stq,stq,stq,stq,stq,stq,,
1500,Sesotho,st,st,st,st,st,st,st,,
1510,Setswana,tn,tn,tn,tn,tn,tn,tn,,
1521,Shqip,sq,sq,sq,sq,sq,sq,sq,,
1530,Sicilianu,scn,scn,scn,scn,scn,scn,scn,,
1540,Simple,English,simple,simple,simple,simple,simple,simple,simple,
1550,SiSwati,ss,ss,ss,ss,ss,ss,ss,,
1561,Slovenčina,sk,sk,sk,sk,sk,sk,sk,,
1571,Slovenščina,sl,sl,sl,sl,sl,sl,sl,,
1580,Ślůnski,szl,szl,szl,szl,szl,szl,szl,,
1590,Soomaaliga,so,so,so,so,so,so,so,,
1600,Sranantongo,srn,srn,srn,srn,srn,srn,srn,,
1611,Suomi,fi,fi,fi,fi,fi,fi,fi,,
1621,Svenska,sv,sv,sv,sv,sv,sv,sv,,
1630,Tagalog,tl,tl,tl,tl,tl,tl,tl,,
1640,Taqbaylit,kab,kab,kab,kab,kab,kab,kab,,
1650,Tarandíne,roa-tara,roa-tara,roa-tara,roa-tara,roa-tara,roa-tara,roa-tara,,
1660,Tetun,tet,tet,tet,tet,tet,tet,tet,,
1671,Tiếng,Việt,vi,vi,vi,vi,vi,vi,vi,
1680,Tok,Pisin,tpi,tpi,tpi,tpi,tpi,tpi,tpi,
1690,Toki,Pona,tokipona,tokipona,tokipona,tokipona,tokipona,tokipona,tokipona,
1700,Toki,Pona,(deprecated:tokipona),tp,tp,tp,tp,tp,tp,tp
1710,Tsetsêhestâhese,chy,chy,chy,chy,chy,chy,chy,,
1720,Tshivenda,ve,ve,ve,ve,ve,ve,ve,,
1731,Türkçe,tr,tr,tr,tr,tr,tr,tr,,
1740,Türkmençe,tk,tk,tk,tk,tk,tk,tk,,
1750,Twi,tw,tw,tw,tw,tw,tw,tw,,
1760,Vahcuengh,za,za,za,za,za,za,za,,
1770,Vèneto,vec,vec,vec,vec,vec,vec,vec,,
1780,Volapük,vo,vo,vo,vo,vo,vo,vo,,
1790,Võro,fiu-vro,fiu-vro,fiu-vro,fiu-vro,fiu-vro,fiu-vro,fiu-vro,,
1800,Walon,wa,wa,wa,wa,wa,wa,wa,,
1810,West-Vlams,vls,vls,vls,vls,vls,vls,vls,,
1820,Winaray,war,war,war,war,war,war,war,,
1830,Wolof,wo,wo,wo,wo,wo,wo,wo,,
1840,Xitsonga,ts,ts,ts,ts,ts,ts,ts,,
1850,Yorùbá,yo,yo,yo,yo,yo,yo,yo,,
1860,Zazaki,diq,diq,diq,diq,diq,diq,diq,,
1870,Zeêuws,zea,zea,zea,zea,zea,zea,zea,,
1880,Žemaitėška,bat-smg,bat-smg,bat-smg,bat-smg,bat-smg,bat-smg,bat-smg,,
1890,zh-cfr,zh-cfr,zh-cfr,zh-cfr,zh-cfr,zh-cfr,zh-cfr,,,
1901,Ελληνικά,el,el,el,el,el,el,el,,
1910,Ποντιακά,pnt,pnt,pnt,pnt,pnt,pnt,pnt,,
1920,Авар,av,av,av,av,av,av,av,,
1930,Аҧсуа,ab,ab,ab,ab,ab,ab,ab,,
1940,Башҡорт,ba,ba,ba,ba,ba,ba,ba,,
1951,Беларуская,be,be,be,be,be,be,be,,
1960,Буряад,bxr,bxr,bxr,bxr,bxr,bxr,bxr,,
1971,Български,bg,bg,bg,bg,bg,bg,bg,,
1980,Иронау,os,os,os,os,os,os,os,,
1990,Коми,kv,kv,kv,kv,kv,kv,kv,,
2000,Кыргызча,ky,ky,ky,ky,ky,ky,ky,,
2010,Қазақша,kk,kk,kk,kk,kk,kk,kk,,
2020,Лакку,lbe,lbe,lbe,lbe,lbe,lbe,lbe,,
2031,Македонски,mk,mk,mk,mk,mk,mk,mk,,
2040,Мокшень,mdf,mdf,mdf,mdf,mdf,mdf,mdf,,
2050,Молдовеняскэ,mo,mo,mo,mo,mo,mo,mo,,
2060,Монгол,mn,mn,mn,mn,mn,mn,mn,,
2070,Нохчийн,ce,ce,ce,ce,ce,ce,ce,,
2080,Олык,Марий,mhr,mhr,mhr,mhr,mhr,mhr,mhr,
2091,Русский,ru,ru,ru,ru,ru,ru,ru,,
2100,Саха,тыла,sah,sah,sah,sah,sah,sah,sah,
2110,Словѣ́ньскъ,cu,cu,cu,cu,cu,cu,cu,,
2121,Српски,sr,Srpski,sr,sr,sr,sr,sr,sr,sr
2130,Татарча/Tatarça,tt,tt,tt,tt,tt,tt,tt,,
2140,Тоҷикӣ,tg,tg,tg,tg,tg,tg,tg,,
2150,Удмурт,udm,udm,udm,udm,udm,udm,udm,,
2161,Українська,uk,uk,uk,uk,uk,uk,uk,,
2170,Хальмг,xal,xal,xal,xal,xal,xal,xal,,
2180,Чӑвашла,cv,cv,cv,cv,cv,cv,cv,,
2190,Эрзянь,myv,myv,myv,myv,myv,myv,myv,,
2200,ქართული,ka,ka,ka,ka,ka,ka,ka,,
2210,Հայերեն,hy,hy,hy,hy,hy,hy,hy,,
2221,ייִדיש,yi,yi,yi,yi,yi,yi,yi,,
2231,עברית,he,he,he,he,he,he,he,,
2240,اردو,ur,ur,ur,ur,ur,ur,ur,,
2251,العربية,ar,ar,ar,ar,ar,ar,ar,,
2260,پښتو,ps,ps,ps,ps,ps,ps,ps,,
2270,پنجابی,pnb,pnb,pnb,pnb,pnb,pnb,pnb,,
2280,سنڌي,sd,sd,sd,sd,sd,sd,sd,,
2291,فارسی,fa,fa,fa,fa,fa,fa,fa,,
2300,گیلکی,glk,glk,glk,glk,glk,glk,glk,,
2310,مَزِروني,mzn,mzn,mzn,mzn,mzn,mzn,mzn,,
2320,مصرى,arz,arz,arz,arz,arz,arz,arz,,
2330,هَوُسَ,ha,ha,ha,ha,ha,ha,ha,,
2340,ܐܪܡܝܐ,arc,arc,arc,arc,arc,arc,arc,,
2350,ދިވެހިބަސް,dv,dv,dv,dv,dv,dv,dv,,
2361,ትግርኛ,ti,ti,ti,ti,ti,ti,ti,,
2370,አማርኛ,am,am,am,am,am,am,am,,
2380,कश्मीरी,ks,ks,ks,ks,ks,ks,ks,,
2390,नेपाल,भाषा,new,new,new,new,new,new,new,
2400,नेपाली,ne,ne,ne,ne,ne,ne,ne,,
2410,पािऴ,pi,pi,pi,pi,pi,pi,pi,,
2420,भोजपुरी,bh,bh,bh,bh,bh,bh,bh,,
2430,मराठी,mr,mr,mr,mr,mr,mr,mr,,
2440,संस्कृत,sa,sa,sa,sa,sa,sa,sa,,
2451,हिन्दी,hi,hi,hi,hi,hi,hi,hi,,
2460,অসমীয়া,as,as,as,as,as,as,as,,
2470,ইমার,bpy,bpy,bpy,bpy,bpy,bpy,bpy,,
2480,বাংলা,bn,bn,bn,bn,bn,bn,bn,,
2490,ਪੰਜਾਬੀ,pa,pa,pa,pa,pa,pa,pa,,
2500,ગુજરાતી,gu,gu,gu,gu,gu,gu,gu,,
2510,ଓଡ଼ିଆ,or,or,or,or,or,or,or,,
2520,தமிழ்,ta,ta,ta,ta,ta,ta,ta,,
2530,తెలుగు,te,te,te,te,te,te,te,,
2540,ಕನ್ನಡ,kn,kn,kn,kn,kn,kn,kn,,
2550,മലയാളം,ml,ml,ml,ml,ml,ml,ml,,
2560,සිංහල,si,si,si,si,si,si,si,,
2571,ไทย,th,th,th,th,th,th,th,,
2580,ລາວ,lo,lo,lo,lo,lo,lo,lo,,
2590,ᏣᎳᎩ,chr,chr,chr,chr,chr,chr,chr,,
2600,ᐃᓄᒃᑎᑐᑦ/inuktitut,iu,iu,iu,iu,iu,iu,iu,,
2611,한국어,ko,ko,ko,ko,ko,ko,ko,,
2620,𐌲𐌿𐍄𐌹𐍃𐌺,got,got,got,got,got,got,got,,
2631,中文,zh,zh,zh,zh,zh,zh,zh,,
2640,吴语,wuu,wuu,wuu,wuu,wuu,wuu,wuu,,
2651,日本語,ja,ja,ja,ja,ja,ja,ja,,
2660,粵語,zh-yue,zh-yue,zh-yue,zh-yue,zh-yue,zh-yue,zh-yue,,
2670,贛語,gan,gan,gan,gan,gan,gan,gan,,
0268
=== added file 'wikipedia/data/loading.gif'
1Binary files wikipedia/data/loading.gif 1970-01-01 00:00:00 +0000 and wikipedia/data/loading.gif 2010-01-02 11:50:25 +0000 differ269Binary 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
=== added file 'wikipedia/data/loading.html'
--- wikipedia/data/loading.html 1970-01-01 00:00:00 +0000
+++ wikipedia/data/loading.html 2010-01-02 11:50:25 +0000
@@ -0,0 +1,2 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
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>
03
=== added file 'wikipedia/data/preview.jpg'
1Binary files wikipedia/data/preview.jpg 1970-01-01 00:00:00 +0000 and wikipedia/data/preview.jpg 2010-01-02 11:50:25 +0000 differ4Binary 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
=== added file 'wikipedia/data/wikipedia.conf.in'
--- wikipedia/data/wikipedia.conf.in 1970-01-01 00:00:00 +0000
+++ wikipedia/data/wikipedia.conf.in 2010-01-02 11:50:25 +0000
@@ -0,0 +1,140 @@
1#!en;@VERSION_WIKIPEDIA@
2
3#[gtk-about]
4[Icon]
5
6#j[0;128] Desired icon size for this applet
7#{Set to 0 to use the default applet size}
8icon size = 0;0
9
10#s Name of the icon as it will appear in its label in the dock :
11name = wikipedia
12
13#S+ Image's filename :
14#{Let empty to use the default one.}
15icon =
16
17#d Name of the dock it belongs to:
18dock name =
19
20order=
21
22#[gtk-convert]
23[Desklet]
24
25#X[Position]
26frame_pos =
27
28#b Lock position ?
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.}
30locked = false
31
32#j+[48;512] Desklet's dimension (width x height) :
33#{Depending on your WindowManager, you can resize it with ALT + middle_click or ALT + left_click for exemple.}
34size = 96;96
35
36#i[-2048;2048] Desklet's position (x ; y) :
37#{Depending on your WindowManager, you can move it with ALT + left_click}
38x position=0
39#i[-2048;2048] ...
40y position=0
41
42#I[-180;180] Rotation :
43#{You can quickly rotate the desklet with the mouse, by dragging the little buttons on its left and top sides.}
44rotation = 0
45
46#X[Visibility]
47frame_visi =
48
49#b Is detached from the dock ?
50initially detached=false
51#l[Normal;Keep above;Keep below;On Widget Layer;Reserve space] Visibility :
52#{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)}
53accessibility=0
54#b Should be visible on all desktops ?
55sticky=true
56
57
58
59#use size=true
60
61#F[Decorations;gtk-orientation-portrait]
62frame_deco=
63
64#o+ Choose a decoration theme for this desklet :
65#{Choose 'Custom decorations' to define your own decorations below.}
66decorations = default
67
68#v
69sep_deco =
70
71#S+ Background image :
72#{It's an image that will be displayed below the drawings, like a frame for exemple. Let empty to not use any.}
73bg desklet =
74#e+[0;1] Background tansparency :
75bg alpha = 1
76#i+[0;256] Left offset :
77#{in pixels. Use this to adjust the left position of the drawings.}
78left offset = 0
79#i+[0;256] Top offset :
80#{in pixels. Use this to adjust the top position of the drawings.}
81top offset = 0
82#i+[0;256] Right offset :
83#{in pixels. Use this to adjust the right position of the drawings.}
84right offset = 0
85#i+[0;256] Bottom offset :
86#{in pixels. Use this to adjust the bottom position of the drawings.}
87bottom offset = 0
88#S+ Foreground image :
89#{It's an image that will be displayed above the drawings, like a reflect for exemple. Let empty to not use any.}
90fg desklet =
91#e+[0;1] Foreground tansparency :
92fg alpha = 1
93
94
95#[gtk-preferences]
96[Configuration]
97
98#s specific browser :
99#{If you use a specific browser}
100specific_web_browser =
101
102#s langues_favorites
103#{Sasir le code international des langues favorites séparés par des virgules}
104langues_favorites=
105
106#s traduction : langue source par défaut :
107#{Sasir le code international de la langue}
108langue_src=
109
110#s traduction : langue destination par défaut :
111#{Sasir le code international de la langue}
112langue_dst=
113
114#b Ouverture du navigateur ?
115#{Affichage dans un navigateur ou dans boite de dialogue}
116open_browser = false
117
118#b Show scrollbars ?
119show_scrollbars = true
120
121#i Position of horizontal scrollbar
122#{Horizontal scroll of the browser in pixel}
123scroll x = 0
124#i Position of vertical scrollbar in pixel
125#{Vertical scroll of the browser in pixel}
126scroll y = 0
127
128#j+[100;2048] Desklet's dimension (width x height) :
129#{Depending on your WindowManager, you can resize it with ALT + middle_click or ALT + left_click for exemple.}
130size2 = 600;442
131
132#i[-2048;2048] Desklet's position (x ; y) :
133#{Depending on your WindowManager, you can move it with ALT + left_click}
134x position2=0
135#i[-2048;2048] ...
136y position2=0
137
138#k Shortkey to show/hide the sound control dialog :
139shortkey = <Control>F9
140
0141
=== added directory 'wikipedia/src'
=== added file 'wikipedia/src/Makefile.am'
--- wikipedia/src/Makefile.am 1970-01-01 00:00:00 +0000
+++ wikipedia/src/Makefile.am 2010-01-02 11:50:25 +0000
@@ -0,0 +1,43 @@
1 #dnl Process this file with automake to produce Makefile.in
2
3lib_LTLIBRARIES = \
4 libcd-wikipedia.la
5
6
7libcd_wikipedia_la_SOURCES = \
8 applet-init.c\
9 applet-init.h\
10 applet-config.c\
11 applet-config.h\
12 applet-notifications.c\
13 applet-notifications.h\
14 applet-wikipedia.c\
15 applet-wikipedia.h\
16 applet-struct.h
17
18
19dock_version = `pkg-config --modversion cairo-dock`
20
21libcd_wikipedia_la_CFLAGS = \
22 -I$(top_srcdir)/src\
23 $(PACKAGE_CFLAGS) $(WEBKIT_CFLAGS)\
24 -DMY_APPLET_SHARE_DATA_DIR=\""$(wikipediadatadir)"\"\
25 -DMY_APPLET_PREVIEW_FILE=\""preview.jpg"\"\
26 -DMY_APPLET_CONF_FILE=\""wikipedia.conf"\"\
27 -DMY_APPLET_USER_DATA_DIR=\""wikipedia"\"\
28 -DMY_APPLET_VERSION=\""$(VERSION_WIKIPEDIA)"\"\
29 -DMY_APPLET_GETTEXT_DOMAIN=\""$(GETTEXT_WIKIPEDIA)"\"\
30 -DMY_APPLET_DOCK_VERSION=\""$(dock_version)"\"\
31 -DMY_APPLET_ICON_FILE=\""icon.png"\"\
32 -std=c99\
33 -Werror-implicit-function-declaration\
34 -O3
35# -g -ggdb -W -Wall
36
37
38libcd_wikipedia_la_LIBADD = \
39 $(PACKAGE_LIBS) $(WEBKIT_LIBS) -lm
40
41
42libcd_wikipedia_la_LDFLAGS =\
43 -avoid-version -module
044
=== added file 'wikipedia/src/applet-config.c'
--- wikipedia/src/applet-config.c 1970-01-01 00:00:00 +0000
+++ wikipedia/src/applet-config.c 2010-01-02 11:50:25 +0000
@@ -0,0 +1,91 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
7* This program is free software; you can redistribute it and/or
8* modify it under the terms of the GNU General Public License
9* as published by the Free Software Foundation; either version 3
10* of the License, or (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20//\________________ Add your name in the copyright file (and / or modify your name here)
21
22#include <string.h>
23#include <cairo-dock.h>
24
25#include "applet-struct.h"
26#include "applet-config.h"
27#include "applet-wikipedia.h"
28#include <gtk/gtk.h>
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.
30CD_APPLET_GET_CONFIG_BEGIN
31 //printf("%s\n","++++++++config+++++++");
32 gchar **langue_system;
33
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.
35 myConfig.langues_favorites = CD_CONFIG_GET_STRING ("Configuration", "langues_favorites");
36
37 if (myConfig.langues_favorites == NULL)//initialise les langues par défaut
38 {
39 const gchar* const * cMyLang = g_get_language_names (); //récupère le code langue
40 myConfig.langues_favorites = strtok(cMyLang[1],"_");
41 strcat(myConfig.langues_favorites,",ru,ar");
42 cairo_dock_update_conf_file (CD_APPLET_MY_CONF_FILE,G_TYPE_STRING,"Configuration","langues_favorites",myConfig.langues_favorites,G_TYPE_INVALID);
43 }
44 myConfig.langue_src = CD_CONFIG_GET_STRING ("Configuration", "langue_src");
45 if (myConfig.langue_src == NULL)//initialise la langue de traduction par défaut
46 {
47// myConfig.langue_src = langue_system;
48 const gchar* const * cMyLang = g_get_language_names (); //récupère le code langue
49 myConfig.langue_src = strtok(cMyLang[1],"_");
50 cairo_dock_update_conf_file (CD_APPLET_MY_CONF_FILE,G_TYPE_STRING,"Configuration","langue_src",myConfig.langue_src,G_TYPE_INVALID);
51 }
52 myConfig.langue_dst = CD_CONFIG_GET_STRING ("Configuration", "langue_dst");
53 if (myConfig.langue_dst == NULL)//initialise la langue de traduction par défaut
54 {
55// myConfig.langue_dst = langue_system;
56 const gchar* const * cMyLang = g_get_language_names (); //récupère le code langue
57 myConfig.langue_dst = strtok(cMyLang[1],"_");
58 cairo_dock_update_conf_file (CD_APPLET_MY_CONF_FILE,G_TYPE_STRING,"Configuration","langue_dst",myConfig.langue_dst,G_TYPE_INVALID);
59 }
60 myConfig.open_browser = CD_CONFIG_GET_BOOLEAN ("Configuration", "open_browser");
61 myConfig.bShowScrollbars = CD_CONFIG_GET_BOOLEAN ("Configuration", "show_scrollbars");
62 myConfig.iPosScrollX = CD_CONFIG_GET_INTEGER ("Configuration", "scroll x");
63 myConfig.iPosScrollY = CD_CONFIG_GET_INTEGER ("Configuration", "scroll y");
64 CD_CONFIG_GET_INTEGER_LIST ("Configuration", "size2",2,myData.size2);
65 myConfig.cShortCut = CD_CONFIG_GET_STRING ("Configuration", "shortkey");
66 cd_keybinder_bind (myConfig.cShortCut, (CDBindkeyHandler)cd_wikipedia_on_keybinding_pull, (gpointer)NULL);
67CD_APPLET_GET_CONFIG_END
68
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.
70CD_APPLET_RESET_CONFIG_BEGIN
71//g_free (myConfig.cSomeStringValue);
72 if (myConfig.cShortCut)
73 {
74 cd_keybinder_unbind(myConfig.cShortCut, (CDBindkeyHandler)cd_wikipedia_on_keybinding_pull);
75 g_free (myConfig.cShortCut);
76 }
77CD_APPLET_RESET_CONFIG_END
78
79
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.
81CD_APPLET_RESET_DATA_BEGIN
82g_free(myData.pQuickLaunchDialog);
83//g_free(myData.is_window_load);
84g_free(myData.code_nom_langues);
85g_free(myData.pointeur_sav);
86//g_free(myData.flip_flop);
87g_free(myData.moteurs);
88g_free(myData.langues_traduites);
89//g_free(myData.langues_dst);
90
91CD_APPLET_RESET_DATA_END
092
=== added file 'wikipedia/src/applet-config.h'
--- wikipedia/src/applet-config.h 1970-01-01 00:00:00 +0000
+++ wikipedia/src/applet-config.h 2010-01-02 11:50:25 +0000
@@ -0,0 +1,30 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
7* This program is free software; you can redistribute it and/or
8* modify it under the terms of the GNU General Public License
9* as published by the Free Software Foundation; either version 3
10* of the License, or (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20
21#ifndef __APPLET_CONFIG__
22#define __APPLET_CONFIG__
23
24#include <cairo-dock.h>
25
26
27CD_APPLET_CONFIG_H
28
29
30#endif
031
=== added file 'wikipedia/src/applet-init.c'
--- wikipedia/src/applet-init.c 1970-01-01 00:00:00 +0000
+++ wikipedia/src/applet-init.c 2010-01-02 11:50:25 +0000
@@ -0,0 +1,104 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
7* This program is free software; you can redistribute it and/or
8* modify it under the terms of the GNU General Public License
9* as published by the Free Software Foundation; either version 3
10* of the License, or (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20//\________________ Add your name in the copyright file (and / or modify your name here)
21
22#include "stdlib.h"
23
24#include "applet-config.h"
25#include "applet-notifications.h"
26#include "applet-struct.h"
27#include "applet-init.h"
28#include "applet-wikipedia.h"
29#include <glib/gprintf.h>
30//#include <gtk/gtk.h>
31
32
33
34
35CD_APPLET_DEFINITION (N_("wikipedia"),
36 2, 0, 0,
37 CAIRO_DOCK_CATEGORY_ACCESSORY,
38 N_("Useful description\n"
39 "and manual"),
40 "zartan")
41
42
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).
44CD_APPLET_INIT_BEGIN
45 if (myDesklet)
46 {
47 CD_APPLET_SET_DESKLET_RENDERER ("Simple"); // set a desklet renderer.
48 cd_wikipedia_update_my_icon (myApplet);
49 }
50
51 if (myIcon->cFileName == NULL) // set a default icon if none is specified.
52 {
53 CD_APPLET_SET_LOCAL_IMAGE_ON_MY_ICON (MY_APPLET_ICON_FILE);
54 }
55
56 /// To be continued ...
57 cd_wikipedia_load_moteurs();
58 cd_wikipedia_load_langues();
59 cd_wikipedia_update_my_icon (myApplet);
60 /// fin mes modifs
61// if (myDesklet)
62 {
63
64 }
65
66
67
68 CD_APPLET_REGISTER_FOR_CLICK_EVENT;
69 CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT;
70CD_APPLET_INIT_END
71
72
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.
74CD_APPLET_STOP_BEGIN
75 CD_APPLET_UNREGISTER_FOR_CLICK_EVENT;
76 CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT;
77
78 /// To be continued ...
79
80
81CD_APPLET_STOP_END
82
83
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.
85CD_APPLET_RELOAD_BEGIN
86 cd_wikipedia_update_my_icon (myApplet);
87
88 if (myDesklet)
89 {
90 CD_APPLET_SET_DESKLET_RENDERER ("Simple"); // set a desklet renderer.
91 }
92
93 if (CD_APPLET_MY_CONFIG_CHANGED)
94 {
95 if (myIcon->cFileName == NULL)
96 {
97 CD_APPLET_SET_LOCAL_IMAGE_ON_MY_ICON (MY_APPLET_ICON_FILE); // set a default icon if none is specified.
98 }
99
100 /// To be continued ...
101
102 }
103CD_APPLET_RELOAD_END
104
0105
=== added file 'wikipedia/src/applet-init.h'
--- wikipedia/src/applet-init.h 1970-01-01 00:00:00 +0000
+++ wikipedia/src/applet-init.h 2010-01-02 11:50:25 +0000
@@ -0,0 +1,31 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
7* This program is free software; you can redistribute it and/or
8* modify it under the terms of the GNU General Public License
9* as published by the Free Software Foundation; either version 3
10* of the License, or (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20
21#ifndef __APPLET_INIT__
22#define __APPLET_INIT__
23
24
25#include <cairo-dock.h>
26
27
28CD_APPLET_H
29
30
31#endif
032
=== added file 'wikipedia/src/applet-notifications.c'
--- wikipedia/src/applet-notifications.c 1970-01-01 00:00:00 +0000
+++ wikipedia/src/applet-notifications.c 2010-01-02 11:50:25 +0000
@@ -0,0 +1,47 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
7* This program is free software; you can redistribute it and/or
8* modify it under the terms of the GNU General Public License
9* as published by the Free Software Foundation; either version 3
10* of the License, or (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20//\________________ Add your name in the copyright file (and / or modify your name here)
21
22#include <stdlib.h>
23#include <string.h>
24
25#include "applet-struct.h"
26#include "applet-notifications.h"
27#include "applet-wikipedia.h"
28
29
30
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.
32CD_APPLET_ON_CLICK_BEGIN
33//printf("%s","je clique !!!!!!!!!!!!!!!!!!!!!!!!!");
34cd_wikipedia_on_clic_icon();
35//cd_wikipedia_show_hide_saisie();
36CD_APPLET_ON_CLICK_END
37
38
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.
40CD_APPLET_ON_BUILD_MENU_BEGIN
41
42 GtkWidget *pSubMenu = CD_APPLET_CREATE_MY_SUB_MENU ();
43 CD_APPLET_ADD_ABOUT_IN_MENU (pSubMenu);
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);
45
46CD_APPLET_ON_BUILD_MENU_END
47
048
=== added file 'wikipedia/src/applet-notifications.h'
--- wikipedia/src/applet-notifications.h 1970-01-01 00:00:00 +0000
+++ wikipedia/src/applet-notifications.h 2010-01-02 11:50:25 +0000
@@ -0,0 +1,34 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
7* This program is free software; you can redistribute it and/or
8* modify it under the terms of the GNU General Public License
9* as published by the Free Software Foundation; either version 3
10* of the License, or (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20
21#ifndef __APPLET_NOTIFICATIONS__
22#define __APPLET_NOTIFICATIONS__
23
24
25#include <cairo-dock.h>
26
27
28
29CD_APPLET_ON_CLICK_H
30
31CD_APPLET_ON_BUILD_MENU_H
32
33void cd_wikipedia_on_clic_icon(void);
34#endif
035
=== added file 'wikipedia/src/applet-struct.h'
--- wikipedia/src/applet-struct.h 1970-01-01 00:00:00 +0000
+++ wikipedia/src/applet-struct.h 2010-01-02 11:50:25 +0000
@@ -0,0 +1,75 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
7* This program is free software; you can redistribute it and/or
8* modify it under the terms of the GNU General Public License
9* as published by the Free Software Foundation; either version 3
10* of the License, or (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20
21#ifndef __CD_APPLET_STRUCT__
22#define __CD_APPLET_STRUCT__
23
24#include <cairo-dock.h>
25#include <glib.h>
26#include <webkit/webkit.h>
27//\___________ structure containing the applet's configuration parameters.
28struct _AppletConfig {
29 // comportement
30gchar *langues_favorites;
31gchar *specific_web_browser;
32gchar *langue_src;
33gchar *langue_dst;
34gboolean open_browser;
35gchar *cShortCut;
36gboolean bShowScrollbars;
37
38//window_size =
39//gint window_x_position;
40//gint window_y_position;
41 gint iPosScrollX;
42 gint iPosScrollY;
43// guint iReloadTimeout;
44// gchar **cListURI;
45 gint iRightMargin;
46} ;
47
48//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc.
49struct _AppletData {
50//CairoDialog *pdialog;
51CairoDialog *pDialog2;
52CairoDockTask *pTask; // tache pour recuperer le flux.
53gchar *cTaskBridge;
54CairoDialog *pQuickLaunchDialog;
55gint is_window_load;
56GList* code_nom_langues;
57GList* moteurs;
58GList*langues_traduites;
59//GList*langues_dst;
60gint *pointeur_sav;
61gint flip_flop;
62gint indice_defaut_langues_dst;
63gint indice_defaut_langues_src;
64//GList* nom_langues;
65GtkWidget *pGtkMozEmbed;
66WebKitWebView *pWebKitView;
67CairoDockTask *pRefreshTimer;
68gchar *cUrl;
69gchar *cCommand;
70gint size2[2];
71//gchar *pDialog2;
72} ;
73
74
75#endif
076
=== added file 'wikipedia/src/applet-wikipedia.c'
--- wikipedia/src/applet-wikipedia.c 1970-01-01 00:00:00 +0000
+++ wikipedia/src/applet-wikipedia.c 2010-01-02 11:50:25 +0000
@@ -0,0 +1,791 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
7* This program is free software; you can redistribute it and/or
8* modify it under the terms of the GNU General Public License
9* as published by the Free Software Foundation; either version 3
10* of the License, or (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20//\________________ Add your name in the copyright file (and / or modify your name here)
21//
22#include <stdio.h>
23#include <math.h>
24#include <string.h>
25#include <stdlib.h>
26#include <applet-wikipedia.h>
27#include <glib.h>
28#include <glib/gi18n.h>
29
30#include <glib/gprintf.h>
31#include "applet-struct.h"
32//#define GTK_STOCK_FIND "gtk-find"
33
34/*
35 * La structure concue poru contenir toutes les donnees de
36 * l'element courant de notre GtkComboBox d'apres le model
37 * que nous lui avons cree.
38 */
39typedef struct
40{
41 gchar * p_text0; //colonne 1
42 gchar * p_text1; //colonne 2
43 gchar * texte_recherche ;
44 gchar * moteur;
45// gchar * texte_translate;
46 gchar * code_langue_src;
47 gchar * code_langue_dst;
48 gchar * nom_langue_src;
49 gchar * nom_langue_dst;
50}
51combo_data_st;
52
53 GtkWidget * p_win = NULL;
54 GtkWidget * pDialog = NULL;
55 GtkWidget * p_vbox = NULL;
56 GtkWidget * p_hbox = NULL;
57 GtkWidget * p_button[2];
58 GtkWidget * p_combo = NULL;
59 GtkWidget * p_combo_langues_src = NULL;
60 GtkWidget * p_combo_langues_dst = NULL;
61 GtkWidget * p_combo_moteurs = NULL;
62 GtkWidget * p_entry = NULL;
63// GtkWidget * p_entry_translate = NULL;
64 GtkWidget * p_fixed;
65 GtkWidget * p_table;
66 GtkListStore * p_model = NULL;
67 GtkCellRenderer * p_cell = NULL;
68 GtkListStore * p_model_langues_src = NULL;
69 GtkCellRenderer * p_cell_langues_src = NULL;
70 GtkListStore * p_model_langues_dst = NULL;
71 GtkCellRenderer * p_cell_langues_dst = NULL;
72 GtkListStore * p_model_moteurs = NULL;
73 GtkCellRenderer * p_cell_moteurs = NULL;
74 GtkTreeIter iter;
75 GtkTreeIter iter_moteurs;
76 GtkTreeIter iter_langues_src;
77 GtkTreeIter iter_langues_dst;
78
79void cd_wikipedia_on_keybinding_pull (const char *keystring, gpointer user_data)
80{
81 if (myData.is_window_load==1)
82 {
83// cd_wikipedia_gtk_main_quit();
84 return;
85 }
86 else
87 {
88 cd_wikipedia_on_clic_icon();
89 myData.is_window_load=1;
90 }
91 return;
92}
93
94
95//////////////////////////////////////////////////////////////////////////
96void cd_wikipedia_load_moteurs()
97//////////////////////////////////////////////////////////////////////////
98{
99 myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google", 0));
100 myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("wikipedia", 1));
101// myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("", 2));
102 myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google translate", 2));
103 myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google images", 3));
104 myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google videos", 4));
105 myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google maps", 5));
106 myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("sytadin", 6));
107 //myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google", 6));
108 //myData.moteurs = g_list_append(myData.moteurs , g_strdup_printf("google", 7));
109}
110
111//////////////////////////////////////////////////////////////////////////
112void cd_wikipedia_update_my_icon (CairoDockModuleInstance *myApplet)
113//////////////////////////////////////////////////////////////////////////
114{
115 printf("%s\n","++++++++++++++++++++++++++++++++++++++++++");
116 printf("%s\n","cd_wikipedia_update_my_icon");
117
118 //if (myDesklet)
119 {
120 // taille de la texture.
121 int iWidth, iHeight;
122 CD_APPLET_GET_MY_ICON_EXTENT (&iWidth, &iHeight);
123
124 cd_wikipedia_draw_my_desklet (myApplet, iWidth, iHeight);
125
126 CD_APPLET_REDRAW_MY_ICON;
127 }
128}
129/*
130 * Fonction qui recupere les donnees de l'element courant affiche.
131 */
132//////////////////////////////////////////////////////////////////////////
133static combo_data_st get_active_data (GtkComboBox * p_combo)
134//////////////////////////////////////////////////////////////////////////
135{
136 GtkTreeModel * p_model = NULL;
137 GtkTreeIter iter;
138 combo_data_st p_st;
139
140
141 /* On recupere le model qu'on a cree. */
142 p_model = gtk_combo_box_get_model (p_combo);
143
144 /* On recupere le GtkTreeIter de l'element courant. */
145 if (gtk_combo_box_get_active_iter (p_combo, & iter))
146 {
147 gtk_tree_model_get (p_model,& iter,0, & p_st.p_text0,1, & p_st.p_text1,-1);
148 }
149 if (gtk_combo_box_get_active_iter (p_combo_moteurs, & iter_moteurs))
150 {
151 gtk_tree_model_get (p_model_moteurs,& iter_moteurs,0, & p_st.moteur,-1);
152 }
153 if (gtk_combo_box_get_active_iter (p_combo_langues_src, & iter_langues_src))
154 {
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);
156 }
157 if (gtk_combo_box_get_active_iter (p_combo_langues_dst, & iter_langues_dst))
158 {
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);
160 }
161 /* Recuperation du texte contenu dans le GtkEntry */
162 p_st.texte_recherche = gtk_entry_get_text(GTK_ENTRY(p_entry));
163// p_st.texte_translate = gtk_entry_get_text(GTK_ENTRY(p_entry_translate));
164 return p_st;
165}
166
167
168/*
169 * Fonction qui supprime l'element courant du GtkComboBox.
170 */
171//////////////////////////////////////////////////////////////////////////
172static void remove_active_item (GtkComboBox * p_combo)
173//////////////////////////////////////////////////////////////////////////
174{
175 GtkTreeModel * p_model = NULL;
176 GtkTreeIter iter;
177
178
179 /* On recupere le model qu'on a cree. */
180 p_model = gtk_combo_box_get_model (p_combo);
181
182
183 /* On recupere le GtkTreeIter de l'element courant. */
184 if (gtk_combo_box_get_active_iter (p_combo, & iter))
185 {
186 /* On supprime l'element courant. */
187 gtk_list_store_remove (GTK_LIST_STORE (p_model), & iter);
188 }
189}
190//////////////////////////////////////////////////////////////////////////
191void cd_wikipedia_load_langues() //on charge les tables des langues;
192//////////////////////////////////////////////////////////////////////////
193
194{
195 //return;
196 char sep_underscore[] ="_";
197 char sep_virgule[] =",";
198 char *langue_par_defaut;
199 char src[FILENAME_MAX];
200 char pBuffer[100];
201 //char sep_virgule[] =",";
202 //char *ptr char FileLangueName[100];
203 char *langue_favorite;
204 gint i,j,k,l;
205 char *nom_langue;
206 char * top_translate;
207 char *code_langue;
208 char *wcode_langue;
209 char FileLangueName[100];
210 FILE * flangue;
211 strcpy(FileLangueName,MY_APPLET_SHARE_DATA_DIR);
212 strcat(FileLangueName,"/langues.dat");
213 flangue = fopen(FileLangueName, "r");
214 //printf("%s\n","*************************************************");
215 if (flangue == NULL)
216 {
217 //printf("%s\n","++++++++++++++++++++++++++++++++++++++++++++++");
218 printf("%s\n","erreur ouverture");
219 perror("configuration");
220 }
221 //printf("%s\n",myConfig.langues_favorites);
222
223 gchar **tab_str;
224 tab_str = g_strsplit (myConfig.langues_favorites,",",10 );
225 i=0;
226 j=0;
227 k=0;
228 l=0;
229 while (fgets(pBuffer, 100, flangue ) != NULL)// on boucle sur les langues
230 {
231 gchar **extract_buffer;
232 extract_buffer=g_strsplit (pBuffer,",",4 );
233 top_translate = extract_buffer[0];
234 nom_langue = extract_buffer[1];
235 code_langue = extract_buffer[2];
236 i=0;
237 while (tab_str[i] !=NULL) // on boucle sur les langues favorites
238 {
239 if (strcmp(tab_str[i],code_langue) == 0) //on alimente la table des langues favorites
240 {
241 myData.code_nom_langues = g_list_append(myData.code_nom_langues , g_strdup_printf(nom_langue, j));
242 myData.code_nom_langues = g_list_append(myData.code_nom_langues , g_strdup_printf(code_langue, j+1));
243 j=j+2;
244 }
245 i++;
246 }
247// printf("%s",top_translate);
248// printf("%s%s\n","---------------",nom_langue);
249 if (strcmp(top_translate,"1") == 0) //on alimente la table des langues traduites par google
250 {
251// printf("%s%s\n","+++++++++++++++++",nom_langue);
252 myData.langues_traduites = g_list_append(myData.langues_traduites , g_strdup_printf(nom_langue, k));
253 myData.langues_traduites = g_list_append(myData.langues_traduites , g_strdup_printf(code_langue, k+1));
254 l=k/2;//on mémorise l'item de la table
255 k=k+2;
256 }
257 //on recherche les valeurs par défaut
258 if (strcmp(code_langue,myConfig.langue_src)==0)
259 {
260 myData.indice_defaut_langues_src=l;
261 }
262 if (strcmp(code_langue,myConfig.langue_dst)==0)
263 {
264 myData.indice_defaut_langues_dst=l;
265 }
266 l++;
267 }
268}
269//////////////////////////////////////////////////////////////////////////
270void cd_wikipedia_create_url ()
271//////////////////////////////////////////////////////////////////////////
272{
273 // GtkComboBox * p_combo = p_data;
274 combo_data_st p_st;
275//mon code
276// char cUrl[1024];
277 char sep_recherche[] =" ,|>";
278 char sep_underscore[] ="_";
279 char *ptr;
280 int cpt_mot = 1;
281 p_st = get_active_data (p_combo);
282
283 // on reconstitue l'url
284// strcpy(myData.cUrl,"http://");
285 myData.cUrl=g_strdup_printf("%s","http://") ;
286// switch(p_st.moteur)
287 printf("%s\n","444444444444444444444444444444");
288// {
289 if (myConfig.open_browser)
290 {
291 }
292 else
293 {
294 cd_wikipedia_build_and_show (myApplet);
295
296 }
297 if (strcmp(p_st.moteur, "wikipedia") ==0)
298 {
299 strcat(myData.cUrl,p_st.p_text1); //code langue
300 strcat(myData.cUrl,".wikipedia.org/w/index.php?title=Sp%C3%A9cial%3ARecherche&search=");
301 ptr = NULL;
302 cpt_mot=1;
303 gchar ** extr_recherche;
304 gint i= 0;
305 extr_recherche = g_strsplit (p_st.texte_recherche,",",10 );
306 //ptr = strtok(p_st.texte_recherche," ");// boucle pour traiter les demandes de plusieurs mots
307 while ( extr_recherche[cpt_mot - 1] != NULL )
308 {
309 if (cpt_mot != 1)
310 strcat(myData.cUrl,"+");
311 ;
312 strcat(myData.cUrl,extr_recherche[cpt_mot - 1]);
313 cpt_mot++;
314// printf("token: %s\n", ptr);
315// ptr = strtok(NULL, sep_recherche);
316 }
317 strcat(myData.cUrl,"&go=Lire"); //fin de l'url
318 }
319 if (strcmp(p_st.moteur, "google") ==0)
320 {
321 printf("%s\n","++++++++++++++++++++++++++");
322 printf("%s\n","11111111111111111111111111");
323 printf("%s\n","++++++++++++++++++++++++++"); //http://www.google.com/search?hl=fr&source=hp&q=aaa+bbbbbbbb+cccccccc&btnG=Recherche+Google&meta=&aq=f&oq=
324 strcat(myData.cUrl,"www.google.com/search?hl=");
325 strcat(myData.cUrl,p_st.p_text1); //code langue
326 strcat(myData.cUrl,"&source=hp&q=");
327 ptr = NULL;
328 cpt_mot=1;
329 gchar ** extr_recherche;
330 gint i= 0;
331 extr_recherche = g_strsplit (p_st.texte_recherche,",",10 );
332 //ptr = strtok(p_st.texte_recherche," ");// boucle pour traiter les demandes de plusieurs mots
333 while ( extr_recherche[cpt_mot - 1] != NULL )
334 {
335 if (cpt_mot != 1)
336 strcat(myData.cUrl,"+");
337 ;
338 strcat(myData.cUrl,extr_recherche[cpt_mot - 1]);
339 cpt_mot++;
340// printf("token: %s\n", ptr);
341// ptr = strtok(NULL, sep_recherche);
342 }
343 strcat(myData.cUrl,""); //fin de l'url
344 }
345 if (strcmp(p_st.moteur, "google images") ==0)
346 {
347 //http://images.google.com/images?hl=fr&source=hp&q=dddddddd
348 strcat(myData.cUrl,"images.google.com/images?hl=");
349 strcat(myData.cUrl,p_st.p_text1); //code langue
350 strcat(myData.cUrl,"&source=hp&q=");
351 ptr = NULL;
352 cpt_mot=1;
353 gchar ** extr_recherche;
354 gint i= 0;
355 extr_recherche = g_strsplit (p_st.texte_recherche,",",10 );
356 //ptr = strtok(p_st.texte_recherche," ");// boucle pour traiter les demandes de plusieurs mots
357 while ( extr_recherche[cpt_mot - 1] != NULL )
358 {
359 if (cpt_mot != 1)
360 strcat(myData.cUrl,"+");
361 ;
362 strcat(myData.cUrl,extr_recherche[cpt_mot - 1]);
363 cpt_mot++;
364// printf("token: %s\n", ptr);
365// ptr = strtok(NULL, sep_recherche);
366 }
367 strcat(myData.cUrl,""); //fin de l'url
368 }
369 if (strcmp(p_st.moteur, "google videos") ==0)
370 {
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
372 strcat(myData.cUrl,"video.google.com/videosearch?hl=");
373 strcat(myData.cUrl,p_st.p_text1); //code langue
374 strcat(myData.cUrl,"&num=100&q=ded%20qsqsq&um=1&ie=UTF-8&sa=N&tab=wv#emb=0&hl=fr&q=");
375 ptr = NULL;
376 cpt_mot=1;
377 gchar ** extr_recherche;
378 gint i= 0;
379 extr_recherche = g_strsplit (p_st.texte_recherche,",",10 );
380 //ptr = strtok(p_st.texte_recherche," ");// boucle pour traiter les demandes de plusieurs mots
381 while ( extr_recherche[cpt_mot - 1] != NULL )
382 {
383 if (cpt_mot != 1)
384 strcat(myData.cUrl,"+");
385 ;
386 strcat(myData.cUrl,extr_recherche[cpt_mot - 1]);
387 cpt_mot++;
388// printf("token: %s\n", ptr);
389// ptr = strtok(NULL, sep_recherche);
390 }
391 strcat(myData.cUrl,""); //fin de l'url
392 }
393 if (strcmp(p_st.moteur, "google translate") ==0)
394 {
395 strcat(myData.cUrl,"translate.google.com/?hl=");
396 strcat(myData.cUrl,p_st.p_text1);
397 strcat(myData.cUrl,"&tab=wT#");
398 strcat(myData.cUrl,p_st.code_langue_src);
399 strcat(myData.cUrl,"|");
400 strcat(myData.cUrl,p_st.code_langue_dst);
401 strcat(myData.cUrl,"|");
402 strcat(myData.cUrl,p_st.texte_recherche);
403 ptr = NULL;
404 cpt_mot=1;
405 gchar ** extr_recherche;
406 gint i= 0;
407 extr_recherche = g_strsplit (p_st.texte_recherche,",",10 );
408 //ptr = strtok(p_st.texte_recherche," ");// boucle pour traiter les demandes de plusieurs mots
409 while ( extr_recherche[cpt_mot - 1] != NULL )
410 {
411 if (cpt_mot != 1)
412 strcat(myData.cUrl,"+");
413 ;
414 strcat(myData.cUrl,extr_recherche[cpt_mot - 1]);
415 cpt_mot++;
416// printf("token: %s\n", ptr);
417// ptr = strtok(NULL, sep_recherche);
418 }
419 strcat(myData.cUrl,""); //fin de l'url
420 }
421 if (strcmp(p_st.moteur, "google maps") ==0)
422 {
423 //http://maps.google.com/maps?q=paris%20concorde&hl=fr
424 strcat(myData.cUrl,"maps.google.com/maps?q=");
425
426// strcat(myData.cUrl,"&source=hp&q=");
427 ptr = NULL;
428 cpt_mot=1;
429 gchar ** extr_recherche;
430 gint i= 0;
431 extr_recherche = g_strsplit (p_st.texte_recherche,",",10 );
432 while ( extr_recherche[cpt_mot - 1] != NULL )
433 {
434 if (cpt_mot != 1)
435 strcat(myData.cUrl,"+");
436 ;
437 strcat(myData.cUrl,extr_recherche[cpt_mot - 1]);
438 cpt_mot++;
439 }
440 strcat(myData.cUrl,"&hl="); //fin de l'url
441 strcat(myData.cUrl,p_st.p_text1); //code langue
442
443 }
444 if (strcmp(p_st.moteur, "sytadin") ==0)
445 {
446 strcat(myData.cUrl,"www.sytadin.fr/opencms/sites/sytadin/sys/raster.jsp.html_470577407.html");
447 }
448
449 if (myConfig.open_browser)
450 {
451 cd_wikipedia_launch_browser();
452 }
453 else//sinon on affiche par webkit
454 {
455 printf("%s\n","webkit+++++++++++++++++++++++++++++++++++++++");
456 gchar tmp[100];
457// strcpy(tmp,'file://');
458// strcat(tmp,MY_APPLET_SHARE_DATA_DIR);
459 strcpy(tmp,MY_APPLET_SHARE_DATA_DIR);
460 strcat(tmp,"/loading.html");
461 webkit_web_view_open(WEBKIT_WEB_VIEW(myData.pWebKitView),tmp);
462// gchar *cCommand = g_strdup_printf ("curl -s --connect-timeout 3 \"%s\"", myData.cUrl);
463// myData.cTaskBridge = cairo_dock_launch_command_sync (cCommand);
464// char FiletmpName[100];
465// strcpy(FiletmpName,g_cCairoDockDataDir);
466// strcat(FiletmpName,"/tmp.html");
467// FILE * ftmp;
468// ftmp = fopen(FiletmpName, "w");
469 //fwrite(myData.cTaskBridge, sizeof myData.cTaskBridge, 1, ftmp);
470// fprintf(ftmp,myData.cTaskBridge);
471// fclose(ftmp);
472 webkit_web_view_load_uri(WEBKIT_WEB_VIEW(myData.pWebKitView), myData.cUrl);
473 //webkit_web_view_load_uri(WEBKIT_WEB_VIEW(myData.pWebKitView), FiletmpName);
474 }
475
476 return;
477}
478//////////////////////////////////////////////////////////////////////////
479void cd_wikipedia_launch_browser ()
480//////////////////////////////////////////////////////////////////////////
481{
482 if (myConfig.specific_web_browser != NULL) // on lance le navigateur
483 {
484 cairo_dock_launch_command_printf ("%s %s", NULL, myConfig.specific_web_browser, myData.cUrl);
485 }
486 else // sinon on utilise la commande par defaut.
487 {
488 cairo_dock_fm_launch_uri (myData.cUrl);
489 }
490 return;
491
492}
493//////////////////////////////////////////////////////////////////////////
494static void cd_wikipedia_gtk_main_quit()
495//////////////////////////////////////////////////////////////////////////
496{
497 myData.is_window_load=0;
498 //gtk_main_quit();
499}
500//////////////////////////////////////////////////////////////////////////
501static void cb_remove (GtkWidget * p_wid, gpointer p_data)
502//////////////////////////////////////////////////////////////////////////
503{
504 GtkComboBox * p_combo = p_data;
505
506
507 remove_active_item (p_combo);
508 (void) p_wid;
509}
510//////////////////////////////////////////////////////////////////////////
511GdkPixbuf *cd_wikipedia_create_pixbuf(void)
512//////////////////////////////////////////////////////////////////////////
513{
514 GdkPixbuf *pixbuf;
515 GError *error = NULL;
516 pixbuf = gdk_pixbuf_new_from_file(MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE, &error);
517 if(!pixbuf) {
518 fprintf(stderr, "%s\n", error->message);
519 g_error_free(error);
520 }
521
522 return pixbuf;
523}
524//////////////////////////////////////////////////////////////////////////
525GdkPixbuf *cd_wikipedia_create_pixbuf_dict(void)
526//////////////////////////////////////////////////////////////////////////
527{
528 GdkPixbuf *pixbuf;
529 GError *error = NULL;
530 pixbuf = gdk_pixbuf_new_from_file(MY_APPLET_SHARE_DATA_DIR"/icone_dictionnaire1.gif", &error);
531 if(!pixbuf) {
532 fprintf(stderr, "%s\n", error->message);
533 g_error_free(error);
534 }
535
536 return pixbuf;
537}
538//////////////////////////////////////////////////////////////////////////
539void cd_wikipedia_alim_combo(item, dummy)
540//////////////////////////////////////////////////////////////////////////
541{
542// gtk_list_store_append (p_model, & iter);
543// gtk_list_store_set (p_model, & iter,0,item,1,item,-1);
544// return;
545//printf("%d\n",myData.flip_flop);
546 if (myData.flip_flop == 0)
547 {
548 //printf("%s\n","***0***");
549 myData.flip_flop =1;
550 myData.pointeur_sav=item;
551 gtk_list_store_append (p_model, & iter);
552
553 }
554 else
555 {
556 //printf("%s\n","***1***");
557 myData.flip_flop =0;
558 gtk_list_store_set (p_model, & iter,0,myData.pointeur_sav,1,item,-1);
559 }
560 // gtk_list_store_append (p_model, & iter);
561 // gtk_list_store_set (p_model, & iter,0,item,1,item2,-1);
562
563 }
564//////////////////////////////////////////////////////////////////////////
565void cd_wikipedia_alim_combo_langues_src_dst(item, dummy)
566//////////////////////////////////////////////////////////////////////////
567 {
568 if (myData.flip_flop == 0)
569 {
570 // printf("%s\n","***0***");
571 myData.flip_flop =1;
572 myData.pointeur_sav=item;
573 gtk_list_store_append (p_model_langues_src, & iter_langues_src);
574 gtk_list_store_append (p_model_langues_dst, & iter_langues_dst);
575
576 }
577 else
578 {
579 // printf("%s\n","***1***");
580 myData.flip_flop =0;
581 gtk_list_store_set (p_model_langues_src, & iter_langues_src,0,myData.pointeur_sav,1,item,-1);
582 gtk_list_store_set (p_model_langues_dst, & iter_langues_dst,0,myData.pointeur_sav,1,item,-1);
583 }
584 }
585//////////////////////////////////////////////////////////////////////////
586void cd_wikipedia_alim_combo_moteurs(item, dummy)
587//////////////////////////////////////////////////////////////////////////
588 {
589 gtk_list_store_append (p_model_moteurs, & iter_moteurs);
590 gtk_list_store_set (p_model_moteurs, & iter_moteurs,0,item,-1);
591 }
592//////////////////////////////////////////////////////////////////////////
593void cd_wikipedia_on_clic_icon()
594//////////////////////////////////////////////////////////////////////////
595{ if (myData.is_window_load==1)
596 {
597// cd_wikipedia_gtk_main_quit();
598 return;
599 }
600 else
601 {
602 cd_wikipedia_update_my_icon (myApplet);
603
604 //printf("%s\n","++++++++++++++++++++++++++++++++++++++++++");
605 //printf("%s\n","cd_wikipedia_on_clic_icon()");
606 pDialog = cairo_dock_show_dialog_full ("SuperSearch", // titre
607 myIcon, myContainer,
608 0, // durée infinie
609 MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE, // image à côté du titre, identique à celle de l'icône
610 p_table,
611 cd_wikipedia_action_on_click, myApplet, NULL);
612 myData.is_window_load=1;
613 }
614
615}
616//dessin
617//////////////////////////////////////////////////////////////////////////
618void cd_wikipedia_draw_my_desklet (CairoDockModuleInstance *myApplet, int iWidth, int iHeight)
619//////////////////////////////////////////////////////////////////////////
620 {
621 int c;
622 //Creation de la fenetre principale.
623 //p_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
624 //gtk_window_set_title (GTK_WINDOW (p_win), "multisearch");
625 //gtk_window_set_icon (GTK_WINDOW(p_win), cd_wikipedia_create_pixbuf());
626 //gtk_window_set_default_size (GTK_WINDOW (p_win), 300, 300);
627 //gtk_container_set_border_width (GTK_CONTAINER (p_win), 5);
628 //gtk_window_set_position (GTK_WINDOW (p_win), GTK_WIN_POS_CENTER);
629 // gtk_window_move (GTK_WINDOW (p_win),myConfig.window_x_position ,myConfig.window_y_position);
630
631 //gtk_window_set_resizable (GTK_WINDOW(p_win), FALSE);
632 /* Ajout du conteneur principal et des boutons. */
633 p_table=gtk_table_new(3,40,TRUE);
634 // gtk_container_add(GTK_CONTAINER(p_win), GTK_WIDGET(p_table));
635 p_entry = gtk_entry_new();
636 // p_entry_translate = gtk_entry_new();
637 // gtk_box_pack_start(GTK_BOX(p_hbox), p_entry, TRUE, FALSE, 0);
638 p_button[0] = gtk_button_new();
639 gtk_button_set_image(GTK_BUTTON(p_button[0]),gtk_image_new_from_pixbuf(cd_wikipedia_create_pixbuf_dict()));
640 // GTK_WIDGET_SET_FLAGS (p_button[0], GTK_CAN_DEFAULT);
641 // gtk_widget_grab_default(p_button[0]);
642 // gtk_box_pack_start (GTK_BOX (p_hbox), p_button[0], FALSE, TRUE, 2);
643
644 //gtk_fixed_put(GTK_FIXED(p_fixed), p_button[0], 150, 50);
645 //gtk_widget_set_size_request(p_button[0], 80, 35);
646 //gtk_widget_set_size_request(p_button[0], 70, 30);
647 //*Creation d'un GtkComboBox avec un GtkTreeModel personnalise.
648
649 gint i = 0;
650 //Creation d'un model pour le GtkComboBox.
651 p_model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
652 p_model_langues_src = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
653 p_model_langues_dst = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
654 p_model_moteurs = gtk_list_store_new (1, G_TYPE_STRING);
655 // Creation d'un GtkComboBox avec son model.
656 p_combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (p_model));
657 p_combo_moteurs = gtk_combo_box_new_with_model (GTK_TREE_MODEL (p_model_moteurs));
658 p_combo_langues_src = gtk_combo_box_new_with_model (GTK_TREE_MODEL (p_model_langues_src));
659 p_combo_langues_dst = gtk_combo_box_new_with_model (GTK_TREE_MODEL (p_model_langues_dst));
660
661 // rendu des cellules
662 p_cell_langues_src = gtk_cell_renderer_text_new ();
663 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo_langues_src), p_cell_langues_src, FALSE);
664 gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo_langues_src),p_cell_langues_src, "text", 0,NULL);
665 p_cell_langues_src = gtk_cell_renderer_text_new ();
666 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo_langues_src), p_cell_langues_src, FALSE);
667 gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo_langues_src),p_cell_langues_src, "text", 1,NULL);
668
669 p_cell_langues_dst = gtk_cell_renderer_text_new ();
670 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo_langues_dst), p_cell_langues_dst, FALSE);
671 gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo_langues_dst),p_cell_langues_dst, "text", 0,NULL);
672 p_cell_langues_dst = gtk_cell_renderer_text_new ();
673 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo_langues_dst), p_cell_langues_dst, FALSE);
674 gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo_langues_dst),p_cell_langues_dst, "text", 1,NULL);
675
676 p_cell = gtk_cell_renderer_text_new ();
677 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo), p_cell, FALSE);
678 gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo),p_cell, "text", 0,NULL);
679 p_cell = gtk_cell_renderer_text_new ();
680 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo), p_cell, FALSE);
681 gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo),p_cell, "text", 1,NULL);
682
683 p_cell_moteurs = gtk_cell_renderer_text_new ();
684 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (p_combo_moteurs), p_cell_moteurs, FALSE);
685 gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (p_combo_moteurs),p_cell_moteurs, "text", 0,NULL);
686
687 //alim de la combo
688 myData.flip_flop=0;
689 g_list_foreach(myData.code_nom_langues,cd_wikipedia_alim_combo,NULL);
690 //gtk_combo_set_popdown_strings( GTK_COMBO(p_combo), myData.code_code_nom_langues) ; // met la liste dans la conbo box
691 gtk_combo_box_set_active (GTK_COMBO_BOX (p_combo), 0); //On affiche un element par defaut. L'index commence à zero.
692 g_list_foreach(myData.moteurs,cd_wikipedia_alim_combo_moteurs,NULL);
693 gtk_combo_box_set_active (GTK_COMBO_BOX (p_combo_moteurs), 0); //On affiche un element par defaut. L'index commence à zero.
694 myData.flip_flop = 0;
695 g_list_foreach(myData.langues_traduites,cd_wikipedia_alim_combo_langues_src_dst,NULL);
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.
697 // g_list_foreach(myData.langues_traduites,cd_wikipedia_alim_combo_langues_dst,NULL);
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.
699 //g_signal_connect (G_OBJECT (p_win), "destroy", G_CALLBACK (cd_wikipedia_gtk_main_quit), NULL);
700
701 // on dessine la grille
702 gtk_table_attach(GTK_TABLE(p_table), p_entry, 0,35,0,1,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0);
703 gtk_table_attach(GTK_TABLE(p_table), p_button[0], 36,40,0,1,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0);
704 gtk_table_attach(GTK_TABLE(p_table), p_combo, 0,19,1,2,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0);
705 gtk_table_attach(GTK_TABLE(p_table), p_combo_moteurs, 20,40,1,2,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0);
706// gtk_table_attach(GTK_TABLE(p_table), p_entry_translate, 0,2,3,4,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0);
707 gtk_table_attach(GTK_TABLE(p_table), p_combo_langues_src,0,19,2,3,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0);
708 gtk_table_attach(GTK_TABLE(p_table), p_combo_langues_dst,20,40,2,3,GTK_EXPAND | GTK_FILL, GTK_EXPAND,0,0);
709 //gtk_widget_show_all (p_win);
710 //gtk_main ();
711 return ;
712 }
713//////////////////////////////////////////////////////////////////////////
714void cd_wikipedia_action_on_click (int iNumButton, GtkWidget *pInteractiveWidget, CairoDockModuleInstance *myApplet, CairoDialog *pDialog)
715//////////////////////////////////////////////////////////////////////////
716{
717 printf("%s\n","++++++++++++++++++++++++++++++++++++++++++");
718 printf("%s\n","cd_wikipedia_action_on_clic()");
719
720if (iNumButton == 0 || iNumButton == -1) // clic sur OK ou appui sur Entree
721{
722 printf("%s\n","444444444444444444444444444444");
723 cd_wikipedia_create_url();
724}
725 //cairo_dock_dialog_unreference (pDialog);
726 myData.is_window_load=0;
727}
728 //////////////////////////////////////////////////////////////////////////
729 void cd_wikipedia_action_on_click2 (int iNumButton, GtkWidget *pInteractiveWidget, CairoDockModuleInstance *myApplet, CairoDialog *pDialog2)
730 //void cd_wikipedia_action_on_click (int iNumButton, GtkWidget *pInteractiveWidget, CairoDockModuleInstance *myApplet, CairoDialog *pDialog)
731 //////////////////////////////////////////////////////////////////////////
732
733 {
734 // cairo_dock_remove_dialog_if_any (myIcon);
735 if (iNumButton == 0 || iNumButton == -1) // clic sur OK ou appui sur Entree
736 {
737 cd_wikipedia_launch_browser();
738 //cd_wikipedia_launch_browser();
739 }
740
741 // myData.is_window_load=0;
742 // cairo_dock_dialog_unreference (myData.pDialog2);
743 return;
744 }
745/////////////////////////////////////////////////////////
746void cd_wikipedia_build_and_show (CairoDockModuleInstance *myApplet)
747/////////////////////////////////////////////////////////
748{
749 printf("%s\n","cd_wikipedia_build_and_show");
750// cairo_dock_remove_dialog_if_any (myIcon);
751 myData.pGtkMozEmbed = gtk_scrolled_window_new (NULL, NULL);
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);
753 printf("%s\n","1111111111111111111111111111111&");
754 myData.pWebKitView = WEBKIT_WEB_VIEW (webkit_web_view_new ());
755 //myData.cUrl="http://www.cairo-dock.org";
756
757
758// webkit_web_view_load_uri(WEBKIT_WEB_VIEW(myData.pWebKitView),tmp);
759 printf("%s\n","*************************************************");
760
761 //printf("%s\n",myData.cUrl);
762
763// webkit_web_view_set_transparent(myData.pWebKitView, TRUE);
764
765 gtk_container_add (GTK_CONTAINER (myData.pGtkMozEmbed), GTK_WIDGET (myData.pWebKitView));
766// gtk_signal_connect(GTK_OBJECT(myData.pWebKitView),
767// "load_finished",
768// GTK_SIGNAL_FUNC(cd_wikipedia_load_finished_cb),
769// myApplet);
770// gtk_widget_show_all (myData.pGtkMozEmbed);
771 printf("%s\n","++++++++++++++++++++dialog2");
772 gtk_widget_set (GTK_WIDGET (myData.pWebKitView), "width-request", myData.size2[0], "height-request", myData.size2[1], NULL);
773 myData.pDialog2 = cairo_dock_show_dialog_full ("SuperSearch", // titre
774 myIcon, myContainer,
775 0, // durée infinie
776 MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE, // image à côté du titre, identique à celle de l'icône
777 myData.pGtkMozEmbed,
778 cd_wikipedia_action_on_click2, myApplet, NULL);
779// webkit_web_view_load_uri(WEBKIT_WEB_VIEW(myData.pWebKitView), tmp);
780
781// webkit_web_view_load_uri(WEBKIT_WEB_VIEW(myData.pWebKitView), myData.cUrl);
782// myData.is_window_load=1;
783
784
785
786return;
787}
788
789
790
791
0792
=== added file 'wikipedia/src/applet-wikipedia.h'
--- wikipedia/src/applet-wikipedia.h 1970-01-01 00:00:00 +0000
+++ wikipedia/src/applet-wikipedia.h 2010-01-02 11:50:25 +0000
@@ -0,0 +1,44 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
7* This program is free software; you can redistribute it and/or
8* modify it under the terms of the GNU General Public License
9* as published by the Free Software Foundation; either version 3
10* of the License, or (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20
21#ifndef __APPLET_WIKIPEDIA__
22#define __APPLET_WIKIPEDIA__
23
24#include <cairo-dock.h>
25#include "applet-struct.h"
26#include <stdio.h>
27#include <gtk/gtk.h>
28#include <webkit/webkit.h>
29void cd_wikipedia_on_clic_icon();
30void cd_wikipedia_load_moteurs();
31void cd_wikipedia_load_langues();
32void cd_wikipedia_action_on_click (int iNumButton, GtkWidget *pInteractiveWidget, CairoDockModuleInstance *myApplet, CairoDialog *pDialog);
33void cd_wikipedia_action_on_click2 (int iNumButton, GtkWidget *pInteractiveWidget, CairoDockModuleInstance *myApplet, CairoDialog *pDialog);
34//void cd_wikipedia_action_on_click2 (void);
35void cd_wikipedia_draw_my_desklet (CairoDockModuleInstance *myApplet, int iWidth, int iHeight);
36void cd_wikipedia_update_my_icon (CairoDockModuleInstance *myApplet);
37//void cd_wikipedia_on_clic_icon(void);
38void cd_wikipedia_build_and_show (CairoDockModuleInstance *myApplet);
39void cd_wikipedia_create_url ();
40void cd_wikipedia_launch_browser ();
41void cd_wikipedia_on_keybinding_pull(const char *keystring, gpointer user_data);
42#endif
43
44

Subscribers

People subscribed via source and target branches