Merge lp:~3v1n0/synapse-project/gwibber-plugin into lp:synapse-project
- gwibber-plugin
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~3v1n0/synapse-project/gwibber-plugin |
Merge into: | lp:synapse-project |
Diff against target: |
1324 lines (+387/-445) 5 files modified
po/POTFILES.in (+1/-0) po/synapse.pot (+0/-445) src/plugins/Makefile.am (+1/-0) src/plugins/gwibber-plugin.vala (+384/-0) src/synapse-main.vala (+1/-0) |
To merge this branch: | bzr merge lp:~3v1n0/synapse-project/gwibber-plugin |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michal Hruby | Needs Fixing | ||
Review via email: mp+42777@code.launchpad.net |
This proposal has been superseded by a proposal from 2010-12-05.
Commit message
Description of the change
Added new Gwibber plugin which allows to control the gwibber service (starting, stopping or reloading its data) and to send messages to the enabled social networks.
The message can be sent both writing any valid text (<= 140 chars) in synapse or selecting a gwibber binary and then writing it as a query.
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
> Could you please fix the pot file issue?
I don't know why but bzr doesn't allow me to do that... If I remove the file, it asks me to re-add it to stay synced with upstream, if reset it with the original one, it gives me out this output... :/
Michal Hruby (mhr3) wrote : | # |
The problem seems to be that you removed the pot file in r216, the only way to fix this will be probably to create a new branch... :/
- 224. By Marco Trevisan (Treviño)
-
fixed the pot merging issue
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
> The problem seems to be that you removed the pot file in r216, the only way to
> fix this will be probably to create a new branch... :/
Please, check if latest revision fixes the issue... Thanks.
Michal Hruby (mhr3) wrote : | # |
Nope...
- 225. By Marco Trevisan (Treviño)
-
merge with Head
- 226. By Marco Trevisan (Treviño)
-
reverted old synapse.pot
- 227. By Marco Trevisan (Treviño)
-
Updated pot file again
Unmerged revisions
- 227. By Marco Trevisan (Treviño)
-
Updated pot file again
- 226. By Marco Trevisan (Treviño)
-
reverted old synapse.pot
- 225. By Marco Trevisan (Treviño)
-
merge with Head
- 224. By Marco Trevisan (Treviño)
-
fixed the pot merging issue
- 223. By Marco Trevisan (Treviño)
-
Merging with head (again..)
- 222. By Marco Trevisan (Treviño)
-
gwibber: Added to translations potfiles
- 221. By Marco Trevisan (Treviño)
-
Merge with head branch
- 220. By Marco Trevisan (Treviño)
-
gwibber: adding GwibberQueryAction wrapping class.
This class allows to perform actions for matching queries, not just based
on the action name. For example, you can match the gwibber binary (or
desktop file), and then write your message... This will be parsed and
then, eventually, sent to gwibber. - 219. By Marco Trevisan (Treviño)
-
gwibber: added SendMessage feature
Actually it works for every written string with length <= 140 chars.
- 218. By Marco Trevisan (Treviño)
-
Merge with master branch
Preview Diff
1 | === modified file 'po/POTFILES.in' |
2 | --- po/POTFILES.in 2010-12-05 14:27:47 +0000 |
3 | +++ po/POTFILES.in 2010-12-05 16:00:13 +0000 |
4 | @@ -14,6 +14,7 @@ |
5 | src/plugins/directory-plugin.c |
6 | src/plugins/gnome-session-plugin.c |
7 | src/plugins/gnome-screensaver-plugin.c |
8 | +src/plugins/gwibber-plugin.c |
9 | src/plugins/hybrid-search-plugin.c |
10 | src/plugins/locate-plugin.c |
11 | src/plugins/rhythmbox-plugin.c |
12 | |
13 | === added file 'po/synapse.pot' |
14 | --- po/synapse.pot 1970-01-01 00:00:00 +0000 |
15 | +++ po/synapse.pot 2010-12-05 16:00:13 +0000 |
16 | @@ -0,0 +1,445 @@ |
17 | +# SOME DESCRIPTIVE TITLE. |
18 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
19 | +# This file is distributed under the same license as the PACKAGE package. |
20 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
21 | +# |
22 | +#, fuzzy |
23 | +msgid "" |
24 | +msgstr "" |
25 | +"Project-Id-Version: PACKAGE VERSION\n" |
26 | +"Report-Msgid-Bugs-To: \n" |
27 | +"POT-Creation-Date: 2010-12-05 00:43+0100\n" |
28 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
29 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
30 | +"Language-Team: LANGUAGE <LL@li.org>\n" |
31 | +"MIME-Version: 1.0\n" |
32 | +"Content-Type: text/plain; charset=CHARSET\n" |
33 | +"Content-Transfer-Encoding: 8bit\n" |
34 | + |
35 | +#: ../data/synapse.desktop.in.h:1 |
36 | +msgid "Search everything you do." |
37 | +msgstr "" |
38 | + |
39 | +#: ../data/synapse.desktop.in.h:2 |
40 | +msgid "Synapse" |
41 | +msgstr "" |
42 | + |
43 | +#: ../src/ui-cairo-gtk-base.c:1048 |
44 | +msgid "Actions" |
45 | +msgstr "" |
46 | + |
47 | +#: ../src/ui-cairo-gtk-base.c:1050 |
48 | +msgid "Audio" |
49 | +msgstr "" |
50 | + |
51 | +#: ../src/ui-cairo-gtk-base.c:1052 |
52 | +msgid "Applications" |
53 | +msgstr "" |
54 | + |
55 | +#: ../src/ui-cairo-gtk-base.c:1054 |
56 | +msgid "All" |
57 | +msgstr "" |
58 | + |
59 | +#: ../src/ui-cairo-gtk-base.c:1056 |
60 | +msgid "Documents" |
61 | +msgstr "" |
62 | + |
63 | +#: ../src/ui-cairo-gtk-base.c:1058 |
64 | +msgid "Images" |
65 | +msgstr "" |
66 | + |
67 | +#: ../src/ui-cairo-gtk-base.c:1060 |
68 | +msgid "Video" |
69 | +msgstr "" |
70 | + |
71 | +#: ../src/ui-cairo-gtk-base.c:1062 |
72 | +msgid "Internet" |
73 | +msgstr "" |
74 | + |
75 | +#: ../src/ui-cairo-gtk-virgilio.c:1036 ../src/ui-cairo-gtk-virgilio.c:1091 |
76 | +#: ../src/ui-widgets.c:2660 |
77 | +#, c-format |
78 | +msgid "<b>%d of %d</b>" |
79 | +msgstr "" |
80 | + |
81 | +#: ../src/ui-cairo-gtk-virgilio.c:1146 ../src/ui-widgets.c:2605 |
82 | +msgid "Home" |
83 | +msgstr "" |
84 | + |
85 | +#: ../src/ui-cairo-gtk-virgilio.c:1158 ../src/ui-cairo-gtk-virgilio.c:1216 |
86 | +#: ../src/ui-widgets.c:2637 |
87 | +#, c-format |
88 | +msgid "<b>1 of %d</b>" |
89 | +msgstr "" |
90 | + |
91 | +#: ../src/ui-interface.c:588 |
92 | +msgid "...or press down key to browse recent activities" |
93 | +msgstr "" |
94 | + |
95 | +#: ../src/ui-interface.c:1358 |
96 | +msgid "Searching..." |
97 | +msgstr "" |
98 | + |
99 | +#: ../src/ui-interface.c:1363 |
100 | +msgid "No results found." |
101 | +msgstr "" |
102 | + |
103 | +#: ../src/ui-interface.c:1368 |
104 | +msgid "No recent activities found." |
105 | +msgstr "" |
106 | + |
107 | +#: ../src/ui-interface.c:1373 |
108 | +msgid "Type to search..." |
109 | +msgstr "" |
110 | + |
111 | +#: ../src/ui-settings.c:325 |
112 | +msgid "Synapse - Settings" |
113 | +msgstr "" |
114 | + |
115 | +#: ../src/ui-settings.c:379 |
116 | +msgid "Default" |
117 | +msgstr "" |
118 | + |
119 | +#: ../src/ui-settings.c:385 |
120 | +msgid "Mini" |
121 | +msgstr "" |
122 | + |
123 | +#: ../src/ui-settings.c:391 |
124 | +msgid "Dual" |
125 | +msgstr "" |
126 | + |
127 | +#: ../src/ui-settings.c:397 |
128 | +msgid "Virgilio" |
129 | +msgstr "" |
130 | + |
131 | +#: ../src/ui-settings.c:800 |
132 | +msgid "General" |
133 | +msgstr "" |
134 | + |
135 | +#: ../src/ui-settings.c:805 |
136 | +msgid "Plugins" |
137 | +msgstr "" |
138 | + |
139 | +#: ../src/ui-settings.c:815 |
140 | +msgid "Behavior & Look" |
141 | +msgstr "" |
142 | + |
143 | +#: ../src/ui-settings.c:831 |
144 | +msgid "Theme:" |
145 | +msgstr "" |
146 | + |
147 | +#: ../src/ui-settings.c:839 |
148 | +msgid "Startup on login" |
149 | +msgstr "" |
150 | + |
151 | +#: ../src/ui-settings.c:852 |
152 | +msgid "Shortcuts" |
153 | +msgstr "" |
154 | + |
155 | +#: ../src/ui-settings.c:887 |
156 | +msgid "Action" |
157 | +msgstr "" |
158 | + |
159 | +#: ../src/ui-settings.c:901 |
160 | +msgid "Shortcut" |
161 | +msgstr "" |
162 | + |
163 | +#: ../src/ui-settings.c:909 |
164 | +msgid "Activate" |
165 | +msgstr "" |
166 | + |
167 | +#: ../src/ui-settings.c:916 |
168 | +msgid "Click the shortcut you wish to change and press the new shortcut." |
169 | +msgstr "" |
170 | + |
171 | +#: ../src/ui-settings.c:990 ../src/ui-settings.c:1268 |
172 | +msgid "Disabled" |
173 | +msgstr "" |
174 | + |
175 | +#: ../src/ui-settings.c:1276 |
176 | +msgid "Enabled" |
177 | +msgstr "" |
178 | + |
179 | +#: ../src/ui-settings.c:1360 |
180 | +msgid "Status" |
181 | +msgstr "" |
182 | + |
183 | +#: ../src/ui-settings.c:1362 |
184 | +msgid "Enable this plugin" |
185 | +msgstr "" |
186 | + |
187 | +#: ../src/ui-settings.c:1364 |
188 | +msgid "Disable this plugin" |
189 | +msgstr "" |
190 | + |
191 | +#: ../src/ui-widgets.c:2554 ../src/ui-widgets.c:2627 |
192 | +msgid "No results." |
193 | +msgstr "" |
194 | + |
195 | +#: ../src/ui-widgets.c:4704 |
196 | +msgid "Settings" |
197 | +msgstr "" |
198 | + |
199 | +#: ../src/ui-widgets.c:4711 |
200 | +msgid "About" |
201 | +msgstr "" |
202 | + |
203 | +#: ../src/ui-widgets.c:4723 |
204 | +msgid "Quit" |
205 | +msgstr "" |
206 | + |
207 | +#: ../src/core/common-actions.c:958 |
208 | +msgid "Run" |
209 | +msgstr "" |
210 | + |
211 | +#: ../src/core/common-actions.c:959 |
212 | +msgid "Run an application, action or script" |
213 | +msgstr "" |
214 | + |
215 | +#: ../src/core/common-actions.c:1107 |
216 | +msgid "Run in Terminal" |
217 | +msgstr "" |
218 | + |
219 | +#: ../src/core/common-actions.c:1108 |
220 | +msgid "Run application or command in terminal" |
221 | +msgstr "" |
222 | + |
223 | +#: ../src/core/common-actions.c:1261 |
224 | +msgid "Open" |
225 | +msgstr "" |
226 | + |
227 | +#: ../src/core/common-actions.c:1262 |
228 | +msgid "Open using default application" |
229 | +msgstr "" |
230 | + |
231 | +#: ../src/core/common-actions.c:1396 |
232 | +msgid "Open folder" |
233 | +msgstr "" |
234 | + |
235 | +#: ../src/core/common-actions.c:1397 |
236 | +msgid "Open folder containing this file" |
237 | +msgstr "" |
238 | + |
239 | +#: ../src/plugins/banshee-plugin.c:2676 |
240 | +msgid "Control Banshee and add items to playlists." |
241 | +msgstr "" |
242 | + |
243 | +#: ../src/plugins/banshee-plugin.c:2679 |
244 | +msgid "Banshee is not installed" |
245 | +msgstr "" |
246 | + |
247 | +#: ../src/plugins/banshee-plugin.c:3704 ../src/plugins/rhythmbox-plugin.c:3489 |
248 | +msgid "Play" |
249 | +msgstr "" |
250 | + |
251 | +#: ../src/plugins/banshee-plugin.c:3705 |
252 | +msgid "Start playback in Banshee" |
253 | +msgstr "" |
254 | + |
255 | +#: ../src/plugins/banshee-plugin.c:3805 ../src/plugins/rhythmbox-plugin.c:3687 |
256 | +msgid "Pause" |
257 | +msgstr "" |
258 | + |
259 | +#: ../src/plugins/banshee-plugin.c:3806 |
260 | +msgid "Pause playback in Banshee" |
261 | +msgstr "" |
262 | + |
263 | +#: ../src/plugins/banshee-plugin.c:3896 ../src/plugins/rhythmbox-plugin.c:3741 |
264 | +msgid "Next" |
265 | +msgstr "" |
266 | + |
267 | +#: ../src/plugins/banshee-plugin.c:3897 |
268 | +msgid "Plays the next song in Banshee's playlist" |
269 | +msgstr "" |
270 | + |
271 | +#: ../src/plugins/banshee-plugin.c:3987 ../src/plugins/rhythmbox-plugin.c:3832 |
272 | +msgid "Previous" |
273 | +msgstr "" |
274 | + |
275 | +#: ../src/plugins/banshee-plugin.c:3988 |
276 | +msgid "Plays the previous song in Banshee's playlist" |
277 | +msgstr "" |
278 | + |
279 | +#: ../src/plugins/banshee-plugin.c:4078 |
280 | +msgid "Enqueue in Banshee" |
281 | +msgstr "" |
282 | + |
283 | +#: ../src/plugins/banshee-plugin.c:4079 |
284 | +msgid "Add the song to Banshee playlist" |
285 | +msgstr "" |
286 | + |
287 | +#: ../src/plugins/banshee-plugin.c:4232 |
288 | +msgid "Play in Banshee" |
289 | +msgstr "" |
290 | + |
291 | +#: ../src/plugins/banshee-plugin.c:4233 ../src/plugins/rhythmbox-plugin.c:4127 |
292 | +msgid "Clears the current playlist and plays the song" |
293 | +msgstr "" |
294 | + |
295 | +#: ../src/plugins/command-plugin.c:210 |
296 | +msgid "Find and execute arbitrary commands." |
297 | +msgstr "" |
298 | + |
299 | +#: ../src/plugins/command-plugin.c:602 |
300 | +msgid "Run command" |
301 | +msgstr "" |
302 | + |
303 | +#: ../src/plugins/desktop-file-plugin.c:284 |
304 | +msgid "Search for and run applications on your computer." |
305 | +msgstr "" |
306 | + |
307 | +#: ../src/plugins/desktop-file-plugin.c:1561 |
308 | +#, c-format |
309 | +msgid "Open with %s" |
310 | +msgstr "" |
311 | + |
312 | +#: ../src/plugins/desktop-file-plugin.c:1569 |
313 | +#, c-format |
314 | +msgid "Opens current selection using %s" |
315 | +msgstr "" |
316 | + |
317 | +#: ../src/plugins/devhelp-search.c:150 |
318 | +msgid "Search documentation using Devhelp." |
319 | +msgstr "" |
320 | + |
321 | +#: ../src/plugins/devhelp-search.c:153 |
322 | +msgid "Devhelp is not installed" |
323 | +msgstr "" |
324 | + |
325 | +#: ../src/plugins/devhelp-search.c:373 |
326 | +msgid "Search in Devhelp" |
327 | +msgstr "" |
328 | + |
329 | +#: ../src/plugins/devhelp-search.c:374 |
330 | +msgid "Search documentation for this symbol" |
331 | +msgstr "" |
332 | + |
333 | +#: ../src/plugins/dictionary.c:148 |
334 | +msgid "Look up definitions of words." |
335 | +msgstr "" |
336 | + |
337 | +#: ../src/plugins/dictionary.c:151 |
338 | +msgid "Gnome Dictionary is not installed" |
339 | +msgstr "" |
340 | + |
341 | +#: ../src/plugins/dictionary.c:336 |
342 | +msgid "Define" |
343 | +msgstr "" |
344 | + |
345 | +#: ../src/plugins/dictionary.c:337 |
346 | +msgid "Look up definition in dictionary" |
347 | +msgstr "" |
348 | + |
349 | +#: ../src/plugins/directory-plugin.c:371 |
350 | +msgid "Open commonly used directories." |
351 | +msgstr "" |
352 | + |
353 | +#: ../src/plugins/gnome-session-plugin.c:1561 |
354 | +msgid "Log out from your session, restart or shutdown your computer." |
355 | +msgstr "" |
356 | + |
357 | +#: ../src/plugins/gnome-session-plugin.c:1565 |
358 | +msgid "Gnome Session Manager wan't found" |
359 | +msgstr "" |
360 | + |
361 | +#: ../src/plugins/gnome-session-plugin.c:1815 |
362 | +msgid "Shut Down" |
363 | +msgstr "" |
364 | + |
365 | +#: ../src/plugins/gnome-session-plugin.c:1816 |
366 | +msgid "Turn your computer off" |
367 | +msgstr "" |
368 | + |
369 | +#: ../src/plugins/gnome-session-plugin.c:2134 |
370 | +msgid "Restart" |
371 | +msgstr "" |
372 | + |
373 | +#: ../src/plugins/gnome-session-plugin.c:2135 |
374 | +msgid "Restart your computer" |
375 | +msgstr "" |
376 | + |
377 | +#: ../src/plugins/gnome-session-plugin.c:2453 |
378 | +msgid "Log Out" |
379 | +msgstr "" |
380 | + |
381 | +#: ../src/plugins/gnome-session-plugin.c:2454 |
382 | +msgid "Close your session and return to the login screen" |
383 | +msgstr "" |
384 | + |
385 | +#: ../src/plugins/hybrid-search-plugin.c:659 |
386 | +msgid "" |
387 | +"Improve results returned by the Zeitgeist plugin by looking for similar " |
388 | +"files on the filesystem." |
389 | +msgstr "" |
390 | + |
391 | +#: ../src/plugins/locate-plugin.c:376 |
392 | +msgid "Runs locate command to find files on the filesystem." |
393 | +msgstr "" |
394 | + |
395 | +#: ../src/plugins/rhythmbox-plugin.c:2461 |
396 | +msgid "Control Rhythmbox and add items to playlists." |
397 | +msgstr "" |
398 | + |
399 | +#: ../src/plugins/rhythmbox-plugin.c:2464 |
400 | +msgid "Rhythmbox is not installed" |
401 | +msgstr "" |
402 | + |
403 | +#: ../src/plugins/rhythmbox-plugin.c:3490 |
404 | +msgid "Start playback in Rhythmbox" |
405 | +msgstr "" |
406 | + |
407 | +#: ../src/plugins/rhythmbox-plugin.c:3688 |
408 | +msgid "Pause playback in Rhythmbox" |
409 | +msgstr "" |
410 | + |
411 | +#: ../src/plugins/rhythmbox-plugin.c:3742 |
412 | +msgid "Plays the next song in Rhythmbox's playlist" |
413 | +msgstr "" |
414 | + |
415 | +#: ../src/plugins/rhythmbox-plugin.c:3833 |
416 | +msgid "Plays the previous song in Rhythmbox's playlist" |
417 | +msgstr "" |
418 | + |
419 | +#: ../src/plugins/rhythmbox-plugin.c:3936 |
420 | +msgid "Enqueue in Rhythmbox" |
421 | +msgstr "" |
422 | + |
423 | +#: ../src/plugins/rhythmbox-plugin.c:3937 |
424 | +msgid "Add the song to Rhythmbox playlist" |
425 | +msgstr "" |
426 | + |
427 | +#: ../src/plugins/rhythmbox-plugin.c:4126 |
428 | +msgid "Play in Rhythmbox" |
429 | +msgstr "" |
430 | + |
431 | +#: ../src/plugins/upower-plugin.c:1691 |
432 | +msgid "Suspend or hibernate your computer." |
433 | +msgstr "" |
434 | + |
435 | +#: ../src/plugins/upower-plugin.c:1695 |
436 | +msgid "UPower wasn't found" |
437 | +msgstr "" |
438 | + |
439 | +#: ../src/plugins/upower-plugin.c:2208 |
440 | +msgid "Suspend" |
441 | +msgstr "" |
442 | + |
443 | +#: ../src/plugins/upower-plugin.c:2209 |
444 | +msgid "Put your computer into suspend mode" |
445 | +msgstr "" |
446 | + |
447 | +#: ../src/plugins/upower-plugin.c:2435 |
448 | +msgid "Hibernate" |
449 | +msgstr "" |
450 | + |
451 | +#: ../src/plugins/upower-plugin.c:2436 |
452 | +msgid "Put your computer into hibernation mode" |
453 | +msgstr "" |
454 | + |
455 | +#: ../src/plugins/zeitgeist-plugin.c:409 |
456 | +msgid "Search various items logged by Zeitgeist." |
457 | +msgstr "" |
458 | + |
459 | +#: ../src/plugins/zeitgeist-plugin.c:413 |
460 | +msgid "Zeitgeist is not installed" |
461 | +msgstr "" |
462 | |
463 | === removed file 'po/synapse.pot' |
464 | --- po/synapse.pot 2010-12-04 23:44:45 +0000 |
465 | +++ po/synapse.pot 1970-01-01 00:00:00 +0000 |
466 | @@ -1,445 +0,0 @@ |
467 | -# SOME DESCRIPTIVE TITLE. |
468 | -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
469 | -# This file is distributed under the same license as the PACKAGE package. |
470 | -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
471 | -# |
472 | -#, fuzzy |
473 | -msgid "" |
474 | -msgstr "" |
475 | -"Project-Id-Version: PACKAGE VERSION\n" |
476 | -"Report-Msgid-Bugs-To: \n" |
477 | -"POT-Creation-Date: 2010-12-05 00:43+0100\n" |
478 | -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
479 | -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
480 | -"Language-Team: LANGUAGE <LL@li.org>\n" |
481 | -"MIME-Version: 1.0\n" |
482 | -"Content-Type: text/plain; charset=CHARSET\n" |
483 | -"Content-Transfer-Encoding: 8bit\n" |
484 | - |
485 | -#: ../data/synapse.desktop.in.h:1 |
486 | -msgid "Search everything you do." |
487 | -msgstr "" |
488 | - |
489 | -#: ../data/synapse.desktop.in.h:2 |
490 | -msgid "Synapse" |
491 | -msgstr "" |
492 | - |
493 | -#: ../src/ui-cairo-gtk-base.c:1048 |
494 | -msgid "Actions" |
495 | -msgstr "" |
496 | - |
497 | -#: ../src/ui-cairo-gtk-base.c:1050 |
498 | -msgid "Audio" |
499 | -msgstr "" |
500 | - |
501 | -#: ../src/ui-cairo-gtk-base.c:1052 |
502 | -msgid "Applications" |
503 | -msgstr "" |
504 | - |
505 | -#: ../src/ui-cairo-gtk-base.c:1054 |
506 | -msgid "All" |
507 | -msgstr "" |
508 | - |
509 | -#: ../src/ui-cairo-gtk-base.c:1056 |
510 | -msgid "Documents" |
511 | -msgstr "" |
512 | - |
513 | -#: ../src/ui-cairo-gtk-base.c:1058 |
514 | -msgid "Images" |
515 | -msgstr "" |
516 | - |
517 | -#: ../src/ui-cairo-gtk-base.c:1060 |
518 | -msgid "Video" |
519 | -msgstr "" |
520 | - |
521 | -#: ../src/ui-cairo-gtk-base.c:1062 |
522 | -msgid "Internet" |
523 | -msgstr "" |
524 | - |
525 | -#: ../src/ui-cairo-gtk-virgilio.c:1036 ../src/ui-cairo-gtk-virgilio.c:1091 |
526 | -#: ../src/ui-widgets.c:2660 |
527 | -#, c-format |
528 | -msgid "<b>%d of %d</b>" |
529 | -msgstr "" |
530 | - |
531 | -#: ../src/ui-cairo-gtk-virgilio.c:1146 ../src/ui-widgets.c:2605 |
532 | -msgid "Home" |
533 | -msgstr "" |
534 | - |
535 | -#: ../src/ui-cairo-gtk-virgilio.c:1158 ../src/ui-cairo-gtk-virgilio.c:1216 |
536 | -#: ../src/ui-widgets.c:2637 |
537 | -#, c-format |
538 | -msgid "<b>1 of %d</b>" |
539 | -msgstr "" |
540 | - |
541 | -#: ../src/ui-interface.c:588 |
542 | -msgid "...or press down key to browse recent activities" |
543 | -msgstr "" |
544 | - |
545 | -#: ../src/ui-interface.c:1358 |
546 | -msgid "Searching..." |
547 | -msgstr "" |
548 | - |
549 | -#: ../src/ui-interface.c:1363 |
550 | -msgid "No results found." |
551 | -msgstr "" |
552 | - |
553 | -#: ../src/ui-interface.c:1368 |
554 | -msgid "No recent activities found." |
555 | -msgstr "" |
556 | - |
557 | -#: ../src/ui-interface.c:1373 |
558 | -msgid "Type to search..." |
559 | -msgstr "" |
560 | - |
561 | -#: ../src/ui-settings.c:325 |
562 | -msgid "Synapse - Settings" |
563 | -msgstr "" |
564 | - |
565 | -#: ../src/ui-settings.c:379 |
566 | -msgid "Default" |
567 | -msgstr "" |
568 | - |
569 | -#: ../src/ui-settings.c:385 |
570 | -msgid "Mini" |
571 | -msgstr "" |
572 | - |
573 | -#: ../src/ui-settings.c:391 |
574 | -msgid "Dual" |
575 | -msgstr "" |
576 | - |
577 | -#: ../src/ui-settings.c:397 |
578 | -msgid "Virgilio" |
579 | -msgstr "" |
580 | - |
581 | -#: ../src/ui-settings.c:800 |
582 | -msgid "General" |
583 | -msgstr "" |
584 | - |
585 | -#: ../src/ui-settings.c:805 |
586 | -msgid "Plugins" |
587 | -msgstr "" |
588 | - |
589 | -#: ../src/ui-settings.c:815 |
590 | -msgid "Behavior & Look" |
591 | -msgstr "" |
592 | - |
593 | -#: ../src/ui-settings.c:831 |
594 | -msgid "Theme:" |
595 | -msgstr "" |
596 | - |
597 | -#: ../src/ui-settings.c:839 |
598 | -msgid "Startup on login" |
599 | -msgstr "" |
600 | - |
601 | -#: ../src/ui-settings.c:852 |
602 | -msgid "Shortcuts" |
603 | -msgstr "" |
604 | - |
605 | -#: ../src/ui-settings.c:887 |
606 | -msgid "Action" |
607 | -msgstr "" |
608 | - |
609 | -#: ../src/ui-settings.c:901 |
610 | -msgid "Shortcut" |
611 | -msgstr "" |
612 | - |
613 | -#: ../src/ui-settings.c:909 |
614 | -msgid "Activate" |
615 | -msgstr "" |
616 | - |
617 | -#: ../src/ui-settings.c:916 |
618 | -msgid "Click the shortcut you wish to change and press the new shortcut." |
619 | -msgstr "" |
620 | - |
621 | -#: ../src/ui-settings.c:990 ../src/ui-settings.c:1268 |
622 | -msgid "Disabled" |
623 | -msgstr "" |
624 | - |
625 | -#: ../src/ui-settings.c:1276 |
626 | -msgid "Enabled" |
627 | -msgstr "" |
628 | - |
629 | -#: ../src/ui-settings.c:1360 |
630 | -msgid "Status" |
631 | -msgstr "" |
632 | - |
633 | -#: ../src/ui-settings.c:1362 |
634 | -msgid "Enable this plugin" |
635 | -msgstr "" |
636 | - |
637 | -#: ../src/ui-settings.c:1364 |
638 | -msgid "Disable this plugin" |
639 | -msgstr "" |
640 | - |
641 | -#: ../src/ui-widgets.c:2554 ../src/ui-widgets.c:2627 |
642 | -msgid "No results." |
643 | -msgstr "" |
644 | - |
645 | -#: ../src/ui-widgets.c:4704 |
646 | -msgid "Settings" |
647 | -msgstr "" |
648 | - |
649 | -#: ../src/ui-widgets.c:4711 |
650 | -msgid "About" |
651 | -msgstr "" |
652 | - |
653 | -#: ../src/ui-widgets.c:4723 |
654 | -msgid "Quit" |
655 | -msgstr "" |
656 | - |
657 | -#: ../src/core/common-actions.c:958 |
658 | -msgid "Run" |
659 | -msgstr "" |
660 | - |
661 | -#: ../src/core/common-actions.c:959 |
662 | -msgid "Run an application, action or script" |
663 | -msgstr "" |
664 | - |
665 | -#: ../src/core/common-actions.c:1107 |
666 | -msgid "Run in Terminal" |
667 | -msgstr "" |
668 | - |
669 | -#: ../src/core/common-actions.c:1108 |
670 | -msgid "Run application or command in terminal" |
671 | -msgstr "" |
672 | - |
673 | -#: ../src/core/common-actions.c:1261 |
674 | -msgid "Open" |
675 | -msgstr "" |
676 | - |
677 | -#: ../src/core/common-actions.c:1262 |
678 | -msgid "Open using default application" |
679 | -msgstr "" |
680 | - |
681 | -#: ../src/core/common-actions.c:1396 |
682 | -msgid "Open folder" |
683 | -msgstr "" |
684 | - |
685 | -#: ../src/core/common-actions.c:1397 |
686 | -msgid "Open folder containing this file" |
687 | -msgstr "" |
688 | - |
689 | -#: ../src/plugins/banshee-plugin.c:2676 |
690 | -msgid "Control Banshee and add items to playlists." |
691 | -msgstr "" |
692 | - |
693 | -#: ../src/plugins/banshee-plugin.c:2679 |
694 | -msgid "Banshee is not installed" |
695 | -msgstr "" |
696 | - |
697 | -#: ../src/plugins/banshee-plugin.c:3704 ../src/plugins/rhythmbox-plugin.c:3489 |
698 | -msgid "Play" |
699 | -msgstr "" |
700 | - |
701 | -#: ../src/plugins/banshee-plugin.c:3705 |
702 | -msgid "Start playback in Banshee" |
703 | -msgstr "" |
704 | - |
705 | -#: ../src/plugins/banshee-plugin.c:3805 ../src/plugins/rhythmbox-plugin.c:3687 |
706 | -msgid "Pause" |
707 | -msgstr "" |
708 | - |
709 | -#: ../src/plugins/banshee-plugin.c:3806 |
710 | -msgid "Pause playback in Banshee" |
711 | -msgstr "" |
712 | - |
713 | -#: ../src/plugins/banshee-plugin.c:3896 ../src/plugins/rhythmbox-plugin.c:3741 |
714 | -msgid "Next" |
715 | -msgstr "" |
716 | - |
717 | -#: ../src/plugins/banshee-plugin.c:3897 |
718 | -msgid "Plays the next song in Banshee's playlist" |
719 | -msgstr "" |
720 | - |
721 | -#: ../src/plugins/banshee-plugin.c:3987 ../src/plugins/rhythmbox-plugin.c:3832 |
722 | -msgid "Previous" |
723 | -msgstr "" |
724 | - |
725 | -#: ../src/plugins/banshee-plugin.c:3988 |
726 | -msgid "Plays the previous song in Banshee's playlist" |
727 | -msgstr "" |
728 | - |
729 | -#: ../src/plugins/banshee-plugin.c:4078 |
730 | -msgid "Enqueue in Banshee" |
731 | -msgstr "" |
732 | - |
733 | -#: ../src/plugins/banshee-plugin.c:4079 |
734 | -msgid "Add the song to Banshee playlist" |
735 | -msgstr "" |
736 | - |
737 | -#: ../src/plugins/banshee-plugin.c:4232 |
738 | -msgid "Play in Banshee" |
739 | -msgstr "" |
740 | - |
741 | -#: ../src/plugins/banshee-plugin.c:4233 ../src/plugins/rhythmbox-plugin.c:4127 |
742 | -msgid "Clears the current playlist and plays the song" |
743 | -msgstr "" |
744 | - |
745 | -#: ../src/plugins/command-plugin.c:210 |
746 | -msgid "Find and execute arbitrary commands." |
747 | -msgstr "" |
748 | - |
749 | -#: ../src/plugins/command-plugin.c:602 |
750 | -msgid "Run command" |
751 | -msgstr "" |
752 | - |
753 | -#: ../src/plugins/desktop-file-plugin.c:284 |
754 | -msgid "Search for and run applications on your computer." |
755 | -msgstr "" |
756 | - |
757 | -#: ../src/plugins/desktop-file-plugin.c:1561 |
758 | -#, c-format |
759 | -msgid "Open with %s" |
760 | -msgstr "" |
761 | - |
762 | -#: ../src/plugins/desktop-file-plugin.c:1569 |
763 | -#, c-format |
764 | -msgid "Opens current selection using %s" |
765 | -msgstr "" |
766 | - |
767 | -#: ../src/plugins/devhelp-search.c:150 |
768 | -msgid "Search documentation using Devhelp." |
769 | -msgstr "" |
770 | - |
771 | -#: ../src/plugins/devhelp-search.c:153 |
772 | -msgid "Devhelp is not installed" |
773 | -msgstr "" |
774 | - |
775 | -#: ../src/plugins/devhelp-search.c:373 |
776 | -msgid "Search in Devhelp" |
777 | -msgstr "" |
778 | - |
779 | -#: ../src/plugins/devhelp-search.c:374 |
780 | -msgid "Search documentation for this symbol" |
781 | -msgstr "" |
782 | - |
783 | -#: ../src/plugins/dictionary.c:148 |
784 | -msgid "Look up definitions of words." |
785 | -msgstr "" |
786 | - |
787 | -#: ../src/plugins/dictionary.c:151 |
788 | -msgid "Gnome Dictionary is not installed" |
789 | -msgstr "" |
790 | - |
791 | -#: ../src/plugins/dictionary.c:336 |
792 | -msgid "Define" |
793 | -msgstr "" |
794 | - |
795 | -#: ../src/plugins/dictionary.c:337 |
796 | -msgid "Look up definition in dictionary" |
797 | -msgstr "" |
798 | - |
799 | -#: ../src/plugins/directory-plugin.c:371 |
800 | -msgid "Open commonly used directories." |
801 | -msgstr "" |
802 | - |
803 | -#: ../src/plugins/gnome-session-plugin.c:1561 |
804 | -msgid "Log out from your session, restart or shutdown your computer." |
805 | -msgstr "" |
806 | - |
807 | -#: ../src/plugins/gnome-session-plugin.c:1565 |
808 | -msgid "Gnome Session Manager wan't found" |
809 | -msgstr "" |
810 | - |
811 | -#: ../src/plugins/gnome-session-plugin.c:1815 |
812 | -msgid "Shut Down" |
813 | -msgstr "" |
814 | - |
815 | -#: ../src/plugins/gnome-session-plugin.c:1816 |
816 | -msgid "Turn your computer off" |
817 | -msgstr "" |
818 | - |
819 | -#: ../src/plugins/gnome-session-plugin.c:2134 |
820 | -msgid "Restart" |
821 | -msgstr "" |
822 | - |
823 | -#: ../src/plugins/gnome-session-plugin.c:2135 |
824 | -msgid "Restart your computer" |
825 | -msgstr "" |
826 | - |
827 | -#: ../src/plugins/gnome-session-plugin.c:2453 |
828 | -msgid "Log Out" |
829 | -msgstr "" |
830 | - |
831 | -#: ../src/plugins/gnome-session-plugin.c:2454 |
832 | -msgid "Close your session and return to the login screen" |
833 | -msgstr "" |
834 | - |
835 | -#: ../src/plugins/hybrid-search-plugin.c:659 |
836 | -msgid "" |
837 | -"Improve results returned by the Zeitgeist plugin by looking for similar " |
838 | -"files on the filesystem." |
839 | -msgstr "" |
840 | - |
841 | -#: ../src/plugins/locate-plugin.c:376 |
842 | -msgid "Runs locate command to find files on the filesystem." |
843 | -msgstr "" |
844 | - |
845 | -#: ../src/plugins/rhythmbox-plugin.c:2461 |
846 | -msgid "Control Rhythmbox and add items to playlists." |
847 | -msgstr "" |
848 | - |
849 | -#: ../src/plugins/rhythmbox-plugin.c:2464 |
850 | -msgid "Rhythmbox is not installed" |
851 | -msgstr "" |
852 | - |
853 | -#: ../src/plugins/rhythmbox-plugin.c:3490 |
854 | -msgid "Start playback in Rhythmbox" |
855 | -msgstr "" |
856 | - |
857 | -#: ../src/plugins/rhythmbox-plugin.c:3688 |
858 | -msgid "Pause playback in Rhythmbox" |
859 | -msgstr "" |
860 | - |
861 | -#: ../src/plugins/rhythmbox-plugin.c:3742 |
862 | -msgid "Plays the next song in Rhythmbox's playlist" |
863 | -msgstr "" |
864 | - |
865 | -#: ../src/plugins/rhythmbox-plugin.c:3833 |
866 | -msgid "Plays the previous song in Rhythmbox's playlist" |
867 | -msgstr "" |
868 | - |
869 | -#: ../src/plugins/rhythmbox-plugin.c:3936 |
870 | -msgid "Enqueue in Rhythmbox" |
871 | -msgstr "" |
872 | - |
873 | -#: ../src/plugins/rhythmbox-plugin.c:3937 |
874 | -msgid "Add the song to Rhythmbox playlist" |
875 | -msgstr "" |
876 | - |
877 | -#: ../src/plugins/rhythmbox-plugin.c:4126 |
878 | -msgid "Play in Rhythmbox" |
879 | -msgstr "" |
880 | - |
881 | -#: ../src/plugins/upower-plugin.c:1691 |
882 | -msgid "Suspend or hibernate your computer." |
883 | -msgstr "" |
884 | - |
885 | -#: ../src/plugins/upower-plugin.c:1695 |
886 | -msgid "UPower wasn't found" |
887 | -msgstr "" |
888 | - |
889 | -#: ../src/plugins/upower-plugin.c:2208 |
890 | -msgid "Suspend" |
891 | -msgstr "" |
892 | - |
893 | -#: ../src/plugins/upower-plugin.c:2209 |
894 | -msgid "Put your computer into suspend mode" |
895 | -msgstr "" |
896 | - |
897 | -#: ../src/plugins/upower-plugin.c:2435 |
898 | -msgid "Hibernate" |
899 | -msgstr "" |
900 | - |
901 | -#: ../src/plugins/upower-plugin.c:2436 |
902 | -msgid "Put your computer into hibernation mode" |
903 | -msgstr "" |
904 | - |
905 | -#: ../src/plugins/zeitgeist-plugin.c:409 |
906 | -msgid "Search various items logged by Zeitgeist." |
907 | -msgstr "" |
908 | - |
909 | -#: ../src/plugins/zeitgeist-plugin.c:413 |
910 | -msgid "Zeitgeist is not installed" |
911 | -msgstr "" |
912 | |
913 | === modified file 'src/plugins/Makefile.am' |
914 | --- src/plugins/Makefile.am 2010-12-05 14:15:45 +0000 |
915 | +++ src/plugins/Makefile.am 2010-12-05 16:00:13 +0000 |
916 | @@ -32,6 +32,7 @@ |
917 | directory-plugin.vala \ |
918 | gnome-session-plugin.vala \ |
919 | gnome-screensaver-plugin.vala \ |
920 | + gwibber-plugin.vala \ |
921 | hybrid-search-plugin.vala \ |
922 | locate-plugin.vala \ |
923 | rhythmbox-plugin.vala \ |
924 | |
925 | === added file 'src/plugins/gwibber-plugin.vala' |
926 | --- src/plugins/gwibber-plugin.vala 1970-01-01 00:00:00 +0000 |
927 | +++ src/plugins/gwibber-plugin.vala 2010-12-05 16:00:13 +0000 |
928 | @@ -0,0 +1,384 @@ |
929 | +/* |
930 | + * Copyright (C) 2010 Marco Trevisan (Treviño) <mail@3v1n0.net> |
931 | + * |
932 | + * This program is free software; you can redistribute it and/or modify |
933 | + * it under the terms of the GNU General Public License as published by |
934 | + * the Free Software Foundation; either version 2 of the License, or |
935 | + * (at your option) any later version. |
936 | + * |
937 | + * This program is distributed in the hope that it will be useful, |
938 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
939 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
940 | + * GNU General Public License for more details. |
941 | + * |
942 | + * You should have received a copy of the GNU General Public License |
943 | + * along with this program; if not, write to the Free Software |
944 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
945 | + * |
946 | + */ |
947 | + |
948 | +namespace Synapse |
949 | +{ |
950 | + const string APP_BIN = "gwibber"; |
951 | + const string SERVICE_BIN = "gwibber-service"; |
952 | + |
953 | + [DBus (name = "com.Gwibber.Service")] |
954 | + interface GwibberService : Object { |
955 | + public const string UNIQUE_NAME = "com.Gwibber.Service"; |
956 | + public const string OBJECT_PATH = "/com/gwibber/Service"; |
957 | + public const string INTERFACE_NAME = "com.Gwibber.Service"; |
958 | + |
959 | + public abstract async void Start() throws DBus.Error; |
960 | + public abstract async void Refresh() throws DBus.Error; |
961 | + public abstract async void Quit() throws DBus.Error; |
962 | + public abstract async void SendMessage(string msg) throws DBus.Error; |
963 | + } |
964 | + |
965 | + [DBus (name = "com.Gwibber.Accounts")] |
966 | + interface GwibberAccounts : Object { |
967 | + public const string UNIQUE_NAME = "com.Gwibber.Accounts"; |
968 | + public const string OBJECT_PATH = "/com/gwibber/Accounts"; |
969 | + public const string INTERFACE_NAME = "com.Gwibber.Accounts"; |
970 | + |
971 | + public abstract async string? SendEnabled(string id) throws DBus.Error; |
972 | + public abstract async string? Get(string id) throws DBus.Error; |
973 | + public abstract async string? List() throws DBus.Error; |
974 | + public abstract async string? Query(string query) throws DBus.Error; |
975 | + } |
976 | + |
977 | + public class GwibberPlugin : ActionPlugin |
978 | + { |
979 | + private Gee.List<GwibberAction> actions; |
980 | + |
981 | + static void register_plugin() |
982 | + { |
983 | + DataSink.PluginRegistry.get_default().register_plugin( |
984 | + typeof (GwibberPlugin), |
985 | + "Gwibber", |
986 | + _ ("Allows you to post to micro-blogging services via Gwibber."), |
987 | + "gwibber", |
988 | + register_plugin, |
989 | + Environment.find_program_in_path("gwibber-service") != null, |
990 | + _ ("Gwibber is not installed") |
991 | + ); |
992 | + } |
993 | + |
994 | + construct |
995 | + { |
996 | + actions = new Gee.ArrayList<GwibberAction>(); |
997 | + |
998 | + actions.add(new Start()); |
999 | + actions.add(new Stop()); |
1000 | + actions.add(new Refresh()); |
1001 | + actions.add(new SendMessage()); |
1002 | + } |
1003 | + |
1004 | + public override bool handles_unknown() |
1005 | + { |
1006 | + return is_gwibber_running(); |
1007 | + } |
1008 | + |
1009 | + private static bool is_gwibber_running() { |
1010 | + return DBusNameCache.get_default().name_has_owner(GwibberService.UNIQUE_NAME); |
1011 | + } |
1012 | + |
1013 | + static construct |
1014 | + { |
1015 | + register_plugin(); |
1016 | + } |
1017 | + |
1018 | + private abstract class GwibberAction : Object, Match |
1019 | + { |
1020 | + // from Match interface |
1021 | + public string title { get; construct set; } |
1022 | + public string description { get; set; } |
1023 | + public string icon_name { get; construct set; } |
1024 | + public bool has_thumbnail { get; construct set; } |
1025 | + public string thumbnail_path { get; construct set; } |
1026 | + public MatchType match_type { get; construct set; } |
1027 | + public int default_relevancy { get; set; } |
1028 | + |
1029 | + public abstract bool valid_for_match(Match match); |
1030 | + |
1031 | + public virtual bool valid_for_query(string query) |
1032 | + { |
1033 | + return false; |
1034 | + } |
1035 | + |
1036 | + // stupid Vala... |
1037 | + protected async abstract void execute_internal(Match? match); |
1038 | + public void execute (Match? match) |
1039 | + { |
1040 | + execute_internal.begin(match); |
1041 | + } |
1042 | + |
1043 | + public virtual int get_relevancy() |
1044 | + { |
1045 | + return is_gwibber_running() ? default_relevancy + 20 : default_relevancy; |
1046 | + } |
1047 | + } |
1048 | + |
1049 | + private abstract class GwibberBinAction : GwibberAction |
1050 | + { |
1051 | + protected static string service_path = Environment.find_program_in_path(SERVICE_BIN); |
1052 | + protected static string app_path = Environment.find_program_in_path(APP_BIN); |
1053 | + |
1054 | + // Stupid vala... |
1055 | + protected async abstract void execute_internal_bin(Match? match); |
1056 | + public override async void execute_internal(Match? match) |
1057 | + { |
1058 | + execute_internal_bin(match); |
1059 | + } |
1060 | + |
1061 | + public override bool valid_for_match(Match match) |
1062 | + { |
1063 | + if (match.match_type == MatchType.APPLICATION) |
1064 | + { |
1065 | + ApplicationMatch? am = match as ApplicationMatch; |
1066 | + |
1067 | + AppInfo app = am.app_info ?? |
1068 | + new DesktopAppInfo.from_filename(am.filename); |
1069 | + |
1070 | + var exe = Environment.find_program_in_path(app.get_executable()); |
1071 | + if (exe == service_path || exe == app_path) |
1072 | + return true; |
1073 | + } |
1074 | + |
1075 | + return false; |
1076 | + } |
1077 | + } |
1078 | + |
1079 | + private class GwibberQueryAction : GwibberAction |
1080 | + { |
1081 | + private string query; |
1082 | + private GwibberAction action; |
1083 | + |
1084 | + public GwibberQueryAction(string query, GwibberAction action) { |
1085 | + Object (title: action.title, |
1086 | + description: action.description, |
1087 | + icon_name: action.icon_name, has_thumbnail: action.has_thumbnail, |
1088 | + match_type: action.match_type, |
1089 | + default_relevancy: action.default_relevancy); |
1090 | + |
1091 | + this.query = query; |
1092 | + this.action = action; |
1093 | + } |
1094 | + |
1095 | + public override bool valid_for_match(Match match) |
1096 | + { |
1097 | + return this.action.valid_for_match(match); |
1098 | + } |
1099 | + |
1100 | + public override bool valid_for_query(string query) |
1101 | + { |
1102 | + return this.action.valid_for_query(query); |
1103 | + } |
1104 | + |
1105 | + protected override async void execute_internal(Match? match) { |
1106 | + var nm = new DefaultMatch(this.query); |
1107 | + nm.match_type = MatchType.UNKNOWN; |
1108 | + |
1109 | + this.action.execute_internal(nm); |
1110 | + } |
1111 | + |
1112 | + public override int get_relevancy() |
1113 | + { |
1114 | + return this.action.get_relevancy(); |
1115 | + } |
1116 | + } |
1117 | + |
1118 | + private class Start : GwibberBinAction |
1119 | + { |
1120 | + public Start() |
1121 | + { |
1122 | + Object (title: _ ("Start"), |
1123 | + description: _ ("Start Gwibber Service"), |
1124 | + icon_name: "gtk-apply", has_thumbnail: false, |
1125 | + match_type: MatchType.ACTION, |
1126 | + default_relevancy: 150); |
1127 | + } |
1128 | + |
1129 | + public async override void execute_internal_bin(Match? match) |
1130 | + { |
1131 | + if (is_gwibber_running()) |
1132 | + return; |
1133 | + |
1134 | + try { |
1135 | + var conn = DBus.Bus.get(DBus.BusType.SESSION); |
1136 | + var service = (GwibberService)conn.get_object(GwibberService.UNIQUE_NAME, |
1137 | + GwibberService.OBJECT_PATH, |
1138 | + GwibberService.INTERFACE_NAME); |
1139 | + yield service.Start(); |
1140 | + } catch (DBus.Error e) { |
1141 | + stderr.printf ("Gwibber is not available.\n%s", e.message); |
1142 | + } |
1143 | + } |
1144 | + |
1145 | + public override bool valid_for_match(Match match) |
1146 | + { |
1147 | + if (is_gwibber_running()) |
1148 | + return false; |
1149 | + |
1150 | + return base.valid_for_match(match); |
1151 | + } |
1152 | + } |
1153 | + |
1154 | + private class Stop : GwibberBinAction |
1155 | + { |
1156 | + public Stop() |
1157 | + { |
1158 | + Object (title: _ ("Stop"), |
1159 | + description: _ ("Stop Gwibber Service"), |
1160 | + icon_name: "gtk-close", has_thumbnail: false, |
1161 | + match_type: MatchType.ACTION, |
1162 | + default_relevancy: 150); |
1163 | + } |
1164 | + |
1165 | + public override async void execute_internal_bin(Match? match) |
1166 | + { |
1167 | + if (!is_gwibber_running()) |
1168 | + return; |
1169 | + |
1170 | + try { |
1171 | + var conn = DBus.Bus.get(DBus.BusType.SESSION); |
1172 | + var service = (GwibberService)conn.get_object(GwibberService.UNIQUE_NAME, |
1173 | + GwibberService.OBJECT_PATH, |
1174 | + GwibberService.INTERFACE_NAME); |
1175 | + yield service.Quit(); |
1176 | + } catch (DBus.Error e) { |
1177 | + stderr.printf ("Gwibber is not available.\n%s", e.message); |
1178 | + } |
1179 | + } |
1180 | + |
1181 | + public override bool valid_for_match(Match match) |
1182 | + { |
1183 | + if (!is_gwibber_running()) |
1184 | + return false; |
1185 | + |
1186 | + return base.valid_for_match(match); |
1187 | + } |
1188 | + } |
1189 | + |
1190 | + private class Refresh : GwibberBinAction |
1191 | + { |
1192 | + public Refresh() |
1193 | + { |
1194 | + Object (title: _ ("Refresh"), |
1195 | + description: _ ("Refresh Gwibber Accounts"), |
1196 | + icon_name: "gtk-refresh", has_thumbnail: false, |
1197 | + match_type: MatchType.ACTION, |
1198 | + default_relevancy: 150); |
1199 | + } |
1200 | + |
1201 | + public override async void execute_internal_bin(Match? match) |
1202 | + { |
1203 | + if (!is_gwibber_running()) |
1204 | + return; |
1205 | + |
1206 | + try { |
1207 | + var conn = DBus.Bus.get(DBus.BusType.SESSION); |
1208 | + var service = (GwibberService)conn.get_object(GwibberService.UNIQUE_NAME, |
1209 | + GwibberService.OBJECT_PATH, |
1210 | + GwibberService.INTERFACE_NAME); |
1211 | + yield service.Refresh(); |
1212 | + } catch (DBus.Error e) { |
1213 | + stderr.printf ("Gwibber is not available.\n%s", e.message); |
1214 | + } |
1215 | + } |
1216 | + |
1217 | + public override bool valid_for_match(Match match) |
1218 | + { |
1219 | + if (!is_gwibber_running()) |
1220 | + return false; |
1221 | + |
1222 | + return base.valid_for_match(match); |
1223 | + } |
1224 | + } |
1225 | + |
1226 | + private class SendMessage : GwibberBinAction |
1227 | + { |
1228 | + public SendMessage() |
1229 | + { |
1230 | + Object (title: _ ("Send to Gwibber"), |
1231 | + description: _ ("Send Message to Gwibber enabled accounts"), |
1232 | + icon_name: "gwibber", has_thumbnail: false, |
1233 | + match_type: MatchType.ACTION, |
1234 | + default_relevancy: 100); |
1235 | + } |
1236 | + |
1237 | + public override async void execute_internal_bin(Match? match) |
1238 | + { |
1239 | + |
1240 | + if (!is_gwibber_running() || match.match_type != MatchType.UNKNOWN) |
1241 | + return; |
1242 | + |
1243 | + try { |
1244 | + var conn = DBus.Bus.get(DBus.BusType.SESSION); |
1245 | + var service = (GwibberService)conn.get_object(GwibberService.UNIQUE_NAME, |
1246 | + GwibberService.OBJECT_PATH, |
1247 | + GwibberService.INTERFACE_NAME); |
1248 | + yield service.SendMessage(match.title); |
1249 | + } catch (DBus.Error e) { |
1250 | + stderr.printf ("Gwibber is not available.\n%s", e.message); |
1251 | + } |
1252 | + } |
1253 | + |
1254 | + public override bool valid_for_match(Match match) |
1255 | + { |
1256 | + if (!is_gwibber_running() || match.title.length > 140) |
1257 | + return false; |
1258 | + |
1259 | + return (match.match_type == MatchType.UNKNOWN || base.valid_for_match(match)); |
1260 | + } |
1261 | + |
1262 | + public override bool valid_for_query(string query) |
1263 | + { |
1264 | + if (query.length <= 140) |
1265 | + return true; |
1266 | + |
1267 | + return false; |
1268 | + } |
1269 | + } |
1270 | + |
1271 | + public override ResultSet? find_for_match (Query query, Match match) |
1272 | + { |
1273 | + bool query_empty = query.query_string == ""; |
1274 | + var results = new ResultSet(); |
1275 | + |
1276 | + if (query_empty) |
1277 | + { |
1278 | + foreach (var action in actions) |
1279 | + { |
1280 | + if (action.valid_for_match(match)) |
1281 | + { |
1282 | + results.add(action, action.get_relevancy()); |
1283 | + } |
1284 | + } |
1285 | + } |
1286 | + else |
1287 | + { |
1288 | + var matchers = Query.get_matchers_for_query(query.query_string, 0, |
1289 | + RegexCompileFlags.OPTIMIZE | RegexCompileFlags.CASELESS); |
1290 | + foreach (var action in actions) |
1291 | + { |
1292 | + if (!action.valid_for_match(match)) continue; |
1293 | + foreach (var matcher in matchers) |
1294 | + { |
1295 | + if (action.valid_for_query(query.query_string)) |
1296 | + { |
1297 | + results.add(new GwibberQueryAction(query.query_string, action), matcher.value); |
1298 | + break; |
1299 | + } |
1300 | + else if (matcher.key.match(action.title)) |
1301 | + { |
1302 | + results.add(action, matcher.value); |
1303 | + break; |
1304 | + } |
1305 | + } |
1306 | + } |
1307 | + } |
1308 | + |
1309 | + return results; |
1310 | + } |
1311 | + } |
1312 | +} |
1313 | |
1314 | === modified file 'src/synapse-main.vala' |
1315 | --- src/synapse-main.vala 2010-12-05 14:20:09 +0000 |
1316 | +++ src/synapse-main.vala 2010-12-05 16:00:13 +0000 |
1317 | @@ -116,6 +116,7 @@ |
1318 | typeof (ZeitgeistPlugin), |
1319 | typeof (HybridSearchPlugin), |
1320 | //typeof (LocatePlugin), |
1321 | + typeof (GwibberPlugin), |
1322 | typeof (GnomeSessionPlugin), |
1323 | typeof (GnomeScreenSaverPlugin), |
1324 | typeof (UPowerPlugin), |
Could you please fix the pot file issue?