Merge lp:~sao/ubuntu/saucy/diodon/new_ext_api_plugins into lp:ubuntu/saucy/diodon
- Saucy (13.10)
- new_ext_api_plugins
- Merge into saucy
Proposed by
Oliver Sauder
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 4 | ||||||||
Proposed branch: | lp:~sao/ubuntu/saucy/diodon/new_ext_api_plugins | ||||||||
Merge into: | lp:ubuntu/saucy/diodon | ||||||||
Diff against target: |
653 lines (+496/-23) 13 files modified
.pc/01_port-to-zeitgeist-2.0.patch/plugins/zeitgeist/wscript_build (+25/-0) .pc/01_port-to-zeitgeist-2.0.patch/plugins/zeitgeist/zeitgeist-plugin.vala (+177/-0) .pc/01_port-to-zeitgeist-2.0.patch/wscript (+169/-0) .pc/applied-patches (+1/-0) debian/changelog (+9/-0) debian/control (+3/-4) debian/diodon-plugins.install (+0/-2) debian/patches/01_port-to-zeitgeist-2.0.patch (+91/-0) debian/patches/series (+1/-0) debian/rules (+1/-1) plugins/zeitgeist/wscript_build (+1/-1) plugins/zeitgeist/zeitgeist-plugin.vala (+17/-14) wscript (+1/-1) |
||||||||
To merge this branch: | bzr merge lp:~sao/ubuntu/saucy/diodon/new_ext_api_plugins | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeremy Bícha | Approve | ||
Ubuntu branches | Pending | ||
Review via email: mp+173332@code.launchpad.net |
Commit message
Description of the change
* This merge request currently disables the unity-lens to fix #1189154 so it compiles again. This is because of the scope api not 100& stable yet, but also due to the fact that upstream where there is quite a bit of changes going on which will affect the Lens resp. Scope as well. So this will be included in future releases again.
* This merge request also fixes #1197569 resp. ports zeitgeist to version 2.0.
* Valac dependency is now set to valac instead of valac-0.16
Sorry for the many changes in on merge request, just thought is the easiest to have all changes in one version and one go.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added directory '.pc/01_port-to-zeitgeist-2.0.patch' |
2 | === added file '.pc/01_port-to-zeitgeist-2.0.patch/.timestamp' |
3 | === added directory '.pc/01_port-to-zeitgeist-2.0.patch/plugins' |
4 | === added directory '.pc/01_port-to-zeitgeist-2.0.patch/plugins/zeitgeist' |
5 | === added file '.pc/01_port-to-zeitgeist-2.0.patch/plugins/zeitgeist/wscript_build' |
6 | --- .pc/01_port-to-zeitgeist-2.0.patch/plugins/zeitgeist/wscript_build 1970-01-01 00:00:00 +0000 |
7 | +++ .pc/01_port-to-zeitgeist-2.0.patch/plugins/zeitgeist/wscript_build 2013-07-06 21:39:24 +0000 |
8 | @@ -0,0 +1,25 @@ |
9 | +#! /usr/bin/env python |
10 | +# encoding: utf-8 |
11 | +# Oliver Sauder, 2012 |
12 | + |
13 | +import os |
14 | + |
15 | +lib = bld.shlib ( |
16 | + features = 'c cshlib', |
17 | + target = 'zeitgeist', |
18 | + vapi_dirs = '../../vapi ../../libdiodon', |
19 | + uselib = 'ZEITGEIST PEAS X11 GDKX', |
20 | + use = 'libdiodon', |
21 | + cflags = ['-include', 'config.h'], |
22 | + install_binding = False, |
23 | + packages = 'zeitgeist-1.0 libpeas-1.0 x11 gdk-x11-3.0', |
24 | + source = bld.path.ant_glob (incl='**/*.vala')) |
25 | + |
26 | +lib.install_path = os.path.join(bld.env['PLUGINS_DIR'], lib.target) |
27 | + |
28 | +bld.new_task_gen ( |
29 | + features = 'intltool_in', |
30 | + podir = '../../po', |
31 | + source = 'zeitgeist.plugin.in', |
32 | + flags = ["-d", "-q", "-u", "-c"], |
33 | + install_path = lib.install_path) |
34 | |
35 | === added file '.pc/01_port-to-zeitgeist-2.0.patch/plugins/zeitgeist/zeitgeist-plugin.vala' |
36 | --- .pc/01_port-to-zeitgeist-2.0.patch/plugins/zeitgeist/zeitgeist-plugin.vala 1970-01-01 00:00:00 +0000 |
37 | +++ .pc/01_port-to-zeitgeist-2.0.patch/plugins/zeitgeist/zeitgeist-plugin.vala 2013-07-06 21:39:24 +0000 |
38 | @@ -0,0 +1,177 @@ |
39 | +/* |
40 | + * Diodon - GTK+ clipboard manager. |
41 | + * Copyright (C) 2012 Diodon Team <diodon-team@lists.launchpad.net> |
42 | + * |
43 | + * This program is free software: you can redistribute it and/or modify |
44 | + * it under the terms of the GNU General Public License as published |
45 | + * by the Free Software Foundation, either version 2 of the License, or (at |
46 | + * your option) any later version. |
47 | + * |
48 | + * This program is distributed in the hope that it will be useful, but |
49 | + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
50 | + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
51 | + * License for more details. |
52 | + * |
53 | + * You should have received a copy of the GNU General Public License |
54 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
55 | + */ |
56 | + |
57 | +namespace Diodon.Plugins |
58 | +{ |
59 | + /** |
60 | + * A Zeitgeist data provider for diodon |
61 | + * |
62 | + * @author Oliver Sauder <os@esite.ch> |
63 | + */ |
64 | + public class ZeitgeistPlugin : Peas.ExtensionBase, Peas.Activatable |
65 | + { |
66 | + private Zeitgeist.Log log; |
67 | + public Object object { get; construct; } |
68 | + |
69 | + public ZeitgeistPlugin() |
70 | + { |
71 | + Object(); |
72 | + } |
73 | + |
74 | + public void activate() |
75 | + { |
76 | + Controller controller = object as Controller; |
77 | + |
78 | + if(log == null) { |
79 | + log = new Zeitgeist.Log(); |
80 | + } |
81 | + |
82 | + controller.on_add_item.connect(add_clipboard_item); |
83 | + } |
84 | + |
85 | + public void deactivate() |
86 | + { |
87 | + Controller controller = object as Controller; |
88 | + |
89 | + controller.on_add_item.disconnect(add_clipboard_item); |
90 | + } |
91 | + |
92 | + public void update_state() |
93 | + { |
94 | + } |
95 | + |
96 | + private void add_clipboard_item(IClipboardItem item) |
97 | + { |
98 | + string interpretation = Zeitgeist.NFO_PLAIN_TEXT_DOCUMENT; |
99 | + if(item is FileClipboardItem) { |
100 | + interpretation = Zeitgeist.NFO_FILE_DATA_OBJECT; |
101 | + } |
102 | + else if (item is ImageClipboardItem) { |
103 | + interpretation = Zeitgeist.NFO_IMAGE; |
104 | + } |
105 | + |
106 | + string? origin = get_path_of_active_application(); |
107 | + |
108 | + Zeitgeist.Subject subject = new Zeitgeist.Subject(); |
109 | + |
110 | + subject.set_uri("clipboard://" + item.get_checksum()); |
111 | + subject.set_interpretation(interpretation); |
112 | + subject.set_manifestation(Zeitgeist.NFO_DATA_CONTAINER); |
113 | + subject.set_mimetype(item.get_mime_type()); |
114 | + if(origin != null) { |
115 | + subject.set_origin(origin); |
116 | + } |
117 | + subject.set_text(item.get_label()); |
118 | + //subject.set_storage(""); |
119 | + |
120 | + Zeitgeist.Event event = new Zeitgeist.Event(); |
121 | + //event.set_id( |
122 | + event.set_interpretation(Zeitgeist.ZG_CREATE_EVENT); |
123 | + event.set_manifestation(Zeitgeist.ZG_USER_ACTIVITY); |
124 | + event.set_actor("application://diodon.desktop"); |
125 | + event.add_subject(subject); |
126 | + // content should be added, however ignored as currently |
127 | + // data is not being read |
128 | + //event.set_payload(); |
129 | + |
130 | + TimeVal cur_time = TimeVal(); |
131 | + int64 timestamp = Zeitgeist.Timestamp.from_timeval(cur_time); |
132 | + event.set_timestamp(timestamp); |
133 | + |
134 | + log.insert_events_no_reply(event, null); |
135 | + } |
136 | + |
137 | + private string? get_path_of_active_application() |
138 | + { |
139 | + X.Window window = get_active_window(); |
140 | + if(window != X.None) { |
141 | + ulong pid = get_pid(window); |
142 | + |
143 | + if(pid != 0) { |
144 | + File file = File.new_for_path("/proc/" + pid.to_string() + "/exe"); |
145 | + try { |
146 | + FileInfo info = file.query_info(FileAttribute.STANDARD_SYMLINK_TARGET, |
147 | + FileQueryInfoFlags.NOFOLLOW_SYMLINKS); |
148 | + if(info != null) { |
149 | + string path = info.get_attribute_as_string( |
150 | + FileAttribute.STANDARD_SYMLINK_TARGET); |
151 | + debug("Path is %s", path); |
152 | + return path; |
153 | + } |
154 | + } |
155 | + catch(GLib.Error e) { |
156 | + debug("Error occured while reading %s: %s", |
157 | + file.get_path(), e.message); |
158 | + } |
159 | + } |
160 | + } |
161 | + |
162 | + return null; |
163 | + } |
164 | + |
165 | + private X.Window get_active_window() |
166 | + { |
167 | + unowned Gdk.Screen screen = Gdk.Screen.get_default(); |
168 | + Gdk.Window active_window = screen.get_active_window(); |
169 | + if(active_window != null) { |
170 | + X.Window xactive_window = Gdk.X11Window.get_xid(active_window); |
171 | + debug("Active window %#x", (int)xactive_window); |
172 | + return xactive_window; |
173 | + } |
174 | + |
175 | + return X.None; |
176 | + } |
177 | + |
178 | + private ulong get_pid(X.Window window) |
179 | + { |
180 | + unowned X.Display display = Gdk.x11_get_default_xdisplay(); |
181 | + X.Atom wm_pid = display.intern_atom("_NET_WM_PID", false); |
182 | + |
183 | + if(wm_pid != X.None) { |
184 | + X.Atom actual_type_return; |
185 | + int actual_format_return; |
186 | + ulong nitems_return; |
187 | + ulong bytes_after_return; |
188 | + void* prop_return = null; |
189 | + |
190 | + int status = display.get_window_property(window, wm_pid, 0, |
191 | + long.MAX, false, 0, out actual_type_return, out actual_format_return, |
192 | + out nitems_return, out bytes_after_return, out prop_return); |
193 | + |
194 | + if(status == X.Success) { |
195 | + if(prop_return != null) { |
196 | + ulong pid = *((ulong*)prop_return); |
197 | + debug("Copied by process with pid %lu", pid); |
198 | + return pid; |
199 | + } |
200 | + } |
201 | + } |
202 | + |
203 | + return 0; |
204 | + } |
205 | + } |
206 | +} |
207 | + |
208 | +[ModuleInit] |
209 | +public void peas_register_types (GLib.TypeModule module) |
210 | +{ |
211 | + Peas.ObjectModule objmodule = module as Peas.ObjectModule; |
212 | + objmodule.register_extension_type (typeof (Peas.Activatable), |
213 | + typeof (Diodon.Plugins.ZeitgeistPlugin)); |
214 | +} |
215 | + |
216 | |
217 | === added file '.pc/01_port-to-zeitgeist-2.0.patch/wscript' |
218 | --- .pc/01_port-to-zeitgeist-2.0.patch/wscript 1970-01-01 00:00:00 +0000 |
219 | +++ .pc/01_port-to-zeitgeist-2.0.patch/wscript 2013-07-06 21:39:24 +0000 |
220 | @@ -0,0 +1,169 @@ |
221 | +#! /usr/bin/env python |
222 | +# encoding: utf-8 |
223 | +# Oliver Sauder, 2010 |
224 | + |
225 | +import subprocess, os, traceback, waflib |
226 | +import Options, Logs |
227 | +from waflib.Tools import waf_unit_test |
228 | + |
229 | +NAME = 'Diodon' |
230 | +VERSION = '1.0.2' |
231 | +APPNAME = 'diodon' |
232 | +WEBSITE = 'https://launchpad.net/diodon' |
233 | +COPYRIGHT = 'Copyright \xc2\xa9 2010 Diodon Team' |
234 | +BUSNAME = 'net.launchpad.Diodon' |
235 | +BUSOBJECTPATH = '/net/launchpad/diodon' |
236 | + |
237 | +VERSION_MAJOR_MINOR = '.'.join (VERSION.split ('.')[0:2]) |
238 | +VERSION_MAJOR = '.'.join (VERSION.split ('.')[0:1]) |
239 | +top = '.' |
240 | +out = '_build_' |
241 | + |
242 | +def options(opt): |
243 | + opt.tool_options('compiler_c') |
244 | + opt.tool_options('waf_unit_test') |
245 | + opt.tool_options('vala') |
246 | + opt.tool_options('gnu_dirs') |
247 | + opt.tool_options('intltool') |
248 | + opt.tool_options('glib2') |
249 | + opt.add_option('--update-po', action='store_true', default=False, dest='update_po', help='Update localization files') |
250 | + opt.add_option('--debug', action='store_true', default=False, dest='debug', help='Debug mode') |
251 | + opt.add_option('--disable-indicator-plugin', action='store_true', default=False, dest='disable_indicator', help='Disable build of indicator plugin') |
252 | + opt.add_option('--enable-unitylens-plugin', action='store_true', default=False, dest='enable_unitylens', help='Enable build of unity lens plugin') |
253 | + opt.add_option('--enable-zeitgeist-plugin', action='store_true', default=False, dest='enable_zeitgeist', help='Enable build of zeitgeist plugin') |
254 | + opt.add_option('--build-doc', action='store_true', default=False, dest='doc', help='Build the api documentation') |
255 | + opt.add_option('--skiptests', action='store_true', default=False, dest='skiptests', help='Skip unit tests') |
256 | + |
257 | +def configure(conf): |
258 | + conf.load('compiler_c intltool gnu_dirs glib2 waf_unit_test') |
259 | + if Options.options.doc: |
260 | + conf.load('valadoc') |
261 | + |
262 | + conf.load('vala', funs='') |
263 | + conf.check_vala(min_version=(0,16,0)) |
264 | + |
265 | + conf.check_cfg(package='gdk-3.0', uselib_store='GDK', atleast_version='3.0.8', mandatory=1, args='--cflags --libs') |
266 | + conf.check_cfg(package='gdk-x11-3.0', uselib_store='GDKX', atleast_version='3.0.8', mandatory=1, args='--cflags --libs') |
267 | + conf.check_cfg(package='gee-1.0', uselib_store='GEE', atleast_version='0.5.0', mandatory=1, args='--cflags --libs') |
268 | + conf.check_cfg(package='libpeas-1.0', uselib_store='PEAS', atleast_version='1.1.0', mandatory=1, args='--cflags --libs') |
269 | + conf.check_cfg(package='libpeas-gtk-1.0', uselib_store='PEASGTK', atleast_version='1.1.0', mandatory=1, args='--cflags --libs') |
270 | + conf.check_cfg(package='gio-2.0', uselib_store='GIO', atleast_version='2.32.0', mandatory=1, args='--cflags --libs') |
271 | + conf.check_cfg(package='gio-unix-2.0', uselib_store='GIOUNIX', atleast_version='2.32.0', mandatory=1, args='--cflags --libs') |
272 | + conf.check_cfg(package='glib-2.0', uselib_store='GLIB', atleast_version='2.32.0', mandatory=1, args='--cflags --libs') |
273 | + conf.check_cfg(package='gtk+-3.0', uselib_store='GTK', atleast_version='3.0.8', mandatory=1, args='--cflags --libs') |
274 | + conf.check_cfg(package='libxml-2.0', uselib_store='XML', atleast_version='2.7.6', mandatory=1, args='--cflags --libs') |
275 | + conf.check_cfg(package='unique-3.0', uselib_store='UNIQUE', atleast_version='3.0.0', mandatory=1, args='--cflags --libs') |
276 | + conf.check_cfg(package='x11', uselib_store='X11', atleast_version='1.3.2', mandatory=1, args='--cflags --libs') |
277 | + conf.check_cfg(package='xtst', uselib_store='XTST', atleast_version='1.2.0', mandatory=1, args='--cflags --libs') |
278 | + |
279 | + # FIXME: waf throws up when assigning an empty string |
280 | + # we need a better way of configuring plugins which are enabled |
281 | + # by default anyway |
282 | + ACTIVE_PLUGINS = ' ' |
283 | + # check if indicator plugin should be built |
284 | + conf.env['INDICATOR'] = not(Options.options.disable_indicator) |
285 | + if not(Options.options.disable_indicator): |
286 | + conf.check_cfg(package='appindicator3-0.1', uselib_store='APPINDICATOR', atleast_version='0.3.0', mandatory=1, args='--cflags --libs') |
287 | + ACTIVE_PLUGINS = "'indicator'" |
288 | + |
289 | + # check if unity lens plugin should be built |
290 | + conf.env['UNITYLENS'] = Options.options.enable_unitylens |
291 | + if Options.options.enable_unitylens: |
292 | + conf.check_cfg(package='unity', uselib_store='UNITY', atleast_version='5.8.0', mandatory=1, args='--cflags --libs') |
293 | + conf.check_cfg(package='dee-1.0', uselib_store='DEE', atleast_version='0.5.18', mandatory=1, args='--cflags --libs') |
294 | + |
295 | + conf.env['ZEITGEIST'] = Options.options.enable_zeitgeist |
296 | + if Options.options.enable_zeitgeist: |
297 | + conf.check_cfg(package='zeitgeist-1.0', uselib_store='ZEITGEIST', atleast_version='0.3.12', mandatory=1, args='--cflags --libs') |
298 | + |
299 | + # FIXME: conf.env and conf.define should not both be needed? |
300 | + conf.define('PACKAGE_NAME', APPNAME) |
301 | + conf.env['PACKAGE_NAME'] = APPNAME |
302 | + conf.define('ACTIVE_PLUGINS', ACTIVE_PLUGINS) |
303 | + conf.env['ACTIVE_PLUGINS'] = ACTIVE_PLUGINS |
304 | + conf.define('GETTEXT_PACKAGE', APPNAME) |
305 | + conf.env['GETTEXT_PACKAGE'] = APPNAME |
306 | + conf.define('VERSION', VERSION) |
307 | + conf.env['VERSION'] = VERSION |
308 | + conf.define('COPYRIGHT', COPYRIGHT) |
309 | + conf.define('WEBSITE', WEBSITE) |
310 | + conf.define('APPNAME', NAME) |
311 | + conf.define('BUSNAME', BUSNAME) |
312 | + conf.env['BUSNAME'] = BUSNAME |
313 | + conf.define('BUSOBJECTPATH', BUSOBJECTPATH) |
314 | + conf.env['BUSOBJECTPATH'] = BUSOBJECTPATH |
315 | + conf.define('SHAREDIR', os.path.join(conf.env['DATADIR'], APPNAME)) |
316 | + conf.define('LIBDIR', os.path.join(conf.env['LIBDIR'], APPNAME)) |
317 | + conf.define('PLUGINS_DIR', os.path.join(conf.env['LIBDIR'], APPNAME, 'plugins')) |
318 | + conf.env['PLUGINS_DIR'] = os.path.join(conf.env['LIBDIR'], APPNAME, 'plugins') |
319 | + conf.define('PLUGINS_DATA_DIR', os.path.join(conf.env['DATADIR'], APPNAME, 'plugins')) |
320 | + |
321 | + # set 'default' variant |
322 | + conf.define ('DEBUG', 0) |
323 | + conf.env['CFLAGS']=['-O2'] |
324 | + conf.env['VALAFLAGS'] = ['--disable-assert'] |
325 | + |
326 | + # set some debug relevant config values |
327 | + if Options.options.debug: |
328 | + conf.define ('DEBUG', 1) |
329 | + conf.env['CFLAGS'] = ['-O0', '-g3'] |
330 | + conf.env['VALAFLAGS'] = ['-g', '-v', '--enable-checking'] |
331 | + |
332 | + conf.write_config_header ('config.h', remove=False) |
333 | + |
334 | +def build(ctx): |
335 | + ctx.add_subdirs('po data libdiodon plugins diodon') |
336 | + |
337 | + if not Options.options.skiptests: |
338 | + ctx.add_subdirs('tests') |
339 | + |
340 | + if ctx.env['VALADOC']: |
341 | + ctx.add_subdirs('doc') |
342 | + ctx.add_post_fun(post) |
343 | + |
344 | + # to execute all tests: |
345 | + # $ waf --alltests |
346 | + # to set this behaviour permanenly: |
347 | + ctx.options.all_tests = True |
348 | + |
349 | +def post(ctx): |
350 | + waf_unit_test.summary(ctx) |
351 | + |
352 | + # Tests have to pass |
353 | + lst = getattr(ctx, 'utest_results', []) |
354 | + if lst: |
355 | + tfail = len([x for x in lst if x[1]]) |
356 | + if tfail: |
357 | + ctx.fatal("Some test failed.") |
358 | + |
359 | + if ctx.cmd == 'install': |
360 | + ctx.exec_command('/sbin/ldconfig') |
361 | + |
362 | +def dist(ctx): |
363 | + # set the compression type to gzip (default is bz2) |
364 | + ctx.algo = "tar.gz" |
365 | + |
366 | +def shutdown(self): |
367 | + if Options.options.update_po: |
368 | + os.chdir('./po') |
369 | + try: |
370 | + try: |
371 | + size_old = os.stat (APPNAME + '.pot').st_size |
372 | + except: |
373 | + size_old = 0 |
374 | + subprocess.call (['intltool-update', '-p', '-g', APPNAME]) |
375 | + size_new = os.stat (APPNAME + '.pot').st_size |
376 | + if size_new <> size_old: |
377 | + Logs.info("Updated po template.") |
378 | + try: |
379 | + command = 'intltool-update -r -g %s' % APPNAME |
380 | + self.exec_command (command) |
381 | + Logs.info("Updated translations.") |
382 | + except: |
383 | + Logs.error("Failed to update translations.") |
384 | + except: |
385 | + traceback.print_exc(file=open("errlog.txt","a")) |
386 | + Logs.error("Failed to generate po template.") |
387 | + Logs.errors("Make sure intltool is installed.") |
388 | + os.chdir ('..') |
389 | + |
390 | |
391 | === modified file '.pc/applied-patches' |
392 | --- .pc/applied-patches 2013-01-04 23:54:44 +0000 |
393 | +++ .pc/applied-patches 2013-07-06 21:39:24 +0000 |
394 | @@ -0,0 +1,1 @@ |
395 | +01_port-to-zeitgeist-2.0.patch |
396 | |
397 | === modified file 'debian/changelog' |
398 | --- debian/changelog 2013-02-19 22:41:39 +0000 |
399 | +++ debian/changelog 2013-07-06 21:39:24 +0000 |
400 | @@ -1,3 +1,12 @@ |
401 | +diodon (1.0.2-0ubuntu2) saucy; urgency=low |
402 | + |
403 | + * Deactivate unitylens-plugin (LP: #1189154) |
404 | + * debian/patches/01_port-to-zeitgeist-2.0.patch |
405 | + - Port to zeitgeist-2.0 (LP: #1197569) |
406 | + * Using valac dependency instead of valac-0.16 |
407 | + |
408 | + -- Oliver Sauder <os@esite.ch> Sat, 06 Jul 2013 14:58:19 +0300 |
409 | + |
410 | diodon (1.0.2-0ubuntu1) raring; urgency=low |
411 | |
412 | * New upstream release. |
413 | |
414 | === modified file 'debian/control' |
415 | --- debian/control 2013-01-04 23:54:44 +0000 |
416 | +++ debian/control 2013-07-06 21:39:24 +0000 |
417 | @@ -14,13 +14,12 @@ |
418 | libgtk-3-dev (>=3.0.8), |
419 | libpeas-dev (>=1.1.1), |
420 | libunique-3.0-dev (>=3.0.0), |
421 | - libunity-dev (>= 5.8.0), |
422 | libx11-dev (>= 1.3.2), |
423 | libxml2-dev (>= 2.7.6), |
424 | libxtst-dev (>= 1.2.0), |
425 | - libzeitgeist-dev (>= 0.3.12), |
426 | + libzeitgeist-2.0-dev (>= 0.9.14), |
427 | python, |
428 | - valac-0.16 (>=0.16.0) |
429 | + valac (>=0.16.0) |
430 | Standards-Version: 3.9.4 |
431 | Homepage: https://launchpad.net/diodon |
432 | |
433 | @@ -103,4 +102,4 @@ |
434 | Diodon is also extensible through its plugin system. |
435 | . |
436 | This package contains following additional plugins: |
437 | - * Unity Lens |
438 | + Zeitgeist Data-Source |
439 | |
440 | === modified file 'debian/diodon-plugins.install' |
441 | --- debian/diodon-plugins.install 2013-01-04 23:54:44 +0000 |
442 | +++ debian/diodon-plugins.install 2013-07-06 21:39:24 +0000 |
443 | @@ -1,3 +1,1 @@ |
444 | -usr/lib/*/diodon/plugins/unitylens |
445 | usr/lib/*/diodon/plugins/zeitgeist |
446 | -usr/share/unity |
447 | |
448 | === added directory 'debian/patches' |
449 | === added file 'debian/patches/01_port-to-zeitgeist-2.0.patch' |
450 | --- debian/patches/01_port-to-zeitgeist-2.0.patch 1970-01-01 00:00:00 +0000 |
451 | +++ debian/patches/01_port-to-zeitgeist-2.0.patch 2013-07-06 21:39:24 +0000 |
452 | @@ -0,0 +1,91 @@ |
453 | +Index: new_ext_api_plugins/wscript |
454 | +=================================================================== |
455 | +--- new_ext_api_plugins.orig/wscript 2013-07-06 22:50:14.616516000 +0300 |
456 | ++++ new_ext_api_plugins/wscript 2013-07-06 22:52:34.836653606 +0300 |
457 | +@@ -74,7 +74,7 @@ |
458 | + |
459 | + conf.env['ZEITGEIST'] = Options.options.enable_zeitgeist |
460 | + if Options.options.enable_zeitgeist: |
461 | +- conf.check_cfg(package='zeitgeist-1.0', uselib_store='ZEITGEIST', atleast_version='0.3.12', mandatory=1, args='--cflags --libs') |
462 | ++ conf.check_cfg(package='zeitgeist-2.0', uselib_store='ZEITGEIST', atleast_version='0.9.14', mandatory=1, args='--cflags --libs') |
463 | + |
464 | + # FIXME: conf.env and conf.define should not both be needed? |
465 | + conf.define('PACKAGE_NAME', APPNAME) |
466 | +Index: new_ext_api_plugins/plugins/zeitgeist/wscript_build |
467 | +=================================================================== |
468 | +--- new_ext_api_plugins.orig/plugins/zeitgeist/wscript_build 2013-07-06 22:50:14.616516000 +0300 |
469 | ++++ new_ext_api_plugins/plugins/zeitgeist/wscript_build 2013-07-07 00:19:52.708792613 +0300 |
470 | +@@ -12,7 +12,7 @@ |
471 | + use = 'libdiodon', |
472 | + cflags = ['-include', 'config.h'], |
473 | + install_binding = False, |
474 | +- packages = 'zeitgeist-1.0 libpeas-1.0 x11 gdk-x11-3.0', |
475 | ++ packages = 'zeitgeist-2.0 libpeas-1.0 x11 gdk-x11-3.0', |
476 | + source = bld.path.ant_glob (incl='**/*.vala')) |
477 | + |
478 | + lib.install_path = os.path.join(bld.env['PLUGINS_DIR'], lib.target) |
479 | +Index: new_ext_api_plugins/plugins/zeitgeist/zeitgeist-plugin.vala |
480 | +=================================================================== |
481 | +--- new_ext_api_plugins.orig/plugins/zeitgeist/zeitgeist-plugin.vala 2013-07-06 23:53:02.556749881 +0300 |
482 | ++++ new_ext_api_plugins/plugins/zeitgeist/zeitgeist-plugin.vala 2013-07-07 00:20:14.784793199 +0300 |
483 | +@@ -57,33 +57,33 @@ |
484 | + |
485 | + private void add_clipboard_item(IClipboardItem item) |
486 | + { |
487 | +- string interpretation = Zeitgeist.NFO_PLAIN_TEXT_DOCUMENT; |
488 | ++ string interpretation = Zeitgeist.NFO.PLAIN_TEXT_DOCUMENT; |
489 | + if(item is FileClipboardItem) { |
490 | +- interpretation = Zeitgeist.NFO_FILE_DATA_OBJECT; |
491 | ++ interpretation = Zeitgeist.NFO.FILE_DATA_OBJECT; |
492 | + } |
493 | + else if (item is ImageClipboardItem) { |
494 | +- interpretation = Zeitgeist.NFO_IMAGE; |
495 | ++ interpretation = Zeitgeist.NFO.IMAGE; |
496 | + } |
497 | + |
498 | + string? origin = get_path_of_active_application(); |
499 | + |
500 | + Zeitgeist.Subject subject = new Zeitgeist.Subject(); |
501 | + |
502 | +- subject.set_uri("clipboard://" + item.get_checksum()); |
503 | +- subject.set_interpretation(interpretation); |
504 | +- subject.set_manifestation(Zeitgeist.NFO_DATA_CONTAINER); |
505 | +- subject.set_mimetype(item.get_mime_type()); |
506 | ++ subject.uri = "clipboard://" + item.get_checksum(); |
507 | ++ subject.interpretation = interpretation; |
508 | ++ subject.manifestation = Zeitgeist.NFO.DATA_CONTAINER; |
509 | ++ subject.mimetype = item.get_mime_type(); |
510 | + if(origin != null) { |
511 | +- subject.set_origin(origin); |
512 | ++ subject.origin = origin; |
513 | + } |
514 | +- subject.set_text(item.get_label()); |
515 | ++ subject.text = item.get_label(); |
516 | + //subject.set_storage(""); |
517 | + |
518 | + Zeitgeist.Event event = new Zeitgeist.Event(); |
519 | + //event.set_id( |
520 | +- event.set_interpretation(Zeitgeist.ZG_CREATE_EVENT); |
521 | +- event.set_manifestation(Zeitgeist.ZG_USER_ACTIVITY); |
522 | +- event.set_actor("application://diodon.desktop"); |
523 | ++ event.interpretation = Zeitgeist.ZG.CREATE_EVENT; |
524 | ++ event.manifestation = Zeitgeist.ZG.USER_ACTIVITY; |
525 | ++ event.actor = "application://diodon.desktop"; |
526 | + event.add_subject(subject); |
527 | + // content should be added, however ignored as currently |
528 | + // data is not being read |
529 | +@@ -91,9 +91,12 @@ |
530 | + |
531 | + TimeVal cur_time = TimeVal(); |
532 | + int64 timestamp = Zeitgeist.Timestamp.from_timeval(cur_time); |
533 | +- event.set_timestamp(timestamp); |
534 | ++ event.timestamp = timestamp; |
535 | + |
536 | +- log.insert_events_no_reply(event, null); |
537 | ++ GenericArray<Zeitgeist.Event> events = new GenericArray<Zeitgeist.Event>(); |
538 | ++ events.add(event); |
539 | ++ |
540 | ++ log.insert_events_no_reply(events); |
541 | + } |
542 | + |
543 | + private string? get_path_of_active_application() |
544 | |
545 | === added file 'debian/patches/series' |
546 | --- debian/patches/series 1970-01-01 00:00:00 +0000 |
547 | +++ debian/patches/series 2013-07-06 21:39:24 +0000 |
548 | @@ -0,0 +1,1 @@ |
549 | +01_port-to-zeitgeist-2.0.patch |
550 | |
551 | === modified file 'debian/rules' |
552 | --- debian/rules 2013-02-19 22:41:39 +0000 |
553 | +++ debian/rules 2013-07-06 21:39:24 +0000 |
554 | @@ -5,7 +5,7 @@ |
555 | include /usr/share/cdbs/1/rules/debhelper.mk |
556 | include /usr/share/cdbs/1/class/waf.mk |
557 | |
558 | -DEB_WAF_CONFIGURE_OPTIONS_ALL = --sysconfdir /etc --enable-unitylens-plugin --enable-zeitgeist-plugin --libdir /usr/lib/$(DEB_HOST_MULTIARCH) |
559 | +DEB_WAF_CONFIGURE_OPTIONS_ALL = --sysconfdir /etc --enable-zeitgeist-plugin --libdir /usr/lib/$(DEB_HOST_MULTIARCH) |
560 | |
561 | # remove pyc files created by waf while building |
562 | clean:: |
563 | |
564 | === modified file 'plugins/zeitgeist/wscript_build' |
565 | --- plugins/zeitgeist/wscript_build 2013-01-04 23:54:44 +0000 |
566 | +++ plugins/zeitgeist/wscript_build 2013-07-06 21:39:24 +0000 |
567 | @@ -12,7 +12,7 @@ |
568 | use = 'libdiodon', |
569 | cflags = ['-include', 'config.h'], |
570 | install_binding = False, |
571 | - packages = 'zeitgeist-1.0 libpeas-1.0 x11 gdk-x11-3.0', |
572 | + packages = 'zeitgeist-2.0 libpeas-1.0 x11 gdk-x11-3.0', |
573 | source = bld.path.ant_glob (incl='**/*.vala')) |
574 | |
575 | lib.install_path = os.path.join(bld.env['PLUGINS_DIR'], lib.target) |
576 | |
577 | === modified file 'plugins/zeitgeist/zeitgeist-plugin.vala' |
578 | --- plugins/zeitgeist/zeitgeist-plugin.vala 2013-01-04 23:54:44 +0000 |
579 | +++ plugins/zeitgeist/zeitgeist-plugin.vala 2013-07-06 21:39:24 +0000 |
580 | @@ -57,33 +57,33 @@ |
581 | |
582 | private void add_clipboard_item(IClipboardItem item) |
583 | { |
584 | - string interpretation = Zeitgeist.NFO_PLAIN_TEXT_DOCUMENT; |
585 | + string interpretation = Zeitgeist.NFO.PLAIN_TEXT_DOCUMENT; |
586 | if(item is FileClipboardItem) { |
587 | - interpretation = Zeitgeist.NFO_FILE_DATA_OBJECT; |
588 | + interpretation = Zeitgeist.NFO.FILE_DATA_OBJECT; |
589 | } |
590 | else if (item is ImageClipboardItem) { |
591 | - interpretation = Zeitgeist.NFO_IMAGE; |
592 | + interpretation = Zeitgeist.NFO.IMAGE; |
593 | } |
594 | |
595 | string? origin = get_path_of_active_application(); |
596 | |
597 | Zeitgeist.Subject subject = new Zeitgeist.Subject(); |
598 | |
599 | - subject.set_uri("clipboard://" + item.get_checksum()); |
600 | - subject.set_interpretation(interpretation); |
601 | - subject.set_manifestation(Zeitgeist.NFO_DATA_CONTAINER); |
602 | - subject.set_mimetype(item.get_mime_type()); |
603 | + subject.uri = "clipboard://" + item.get_checksum(); |
604 | + subject.interpretation = interpretation; |
605 | + subject.manifestation = Zeitgeist.NFO.DATA_CONTAINER; |
606 | + subject.mimetype = item.get_mime_type(); |
607 | if(origin != null) { |
608 | - subject.set_origin(origin); |
609 | + subject.origin = origin; |
610 | } |
611 | - subject.set_text(item.get_label()); |
612 | + subject.text = item.get_label(); |
613 | //subject.set_storage(""); |
614 | |
615 | Zeitgeist.Event event = new Zeitgeist.Event(); |
616 | //event.set_id( |
617 | - event.set_interpretation(Zeitgeist.ZG_CREATE_EVENT); |
618 | - event.set_manifestation(Zeitgeist.ZG_USER_ACTIVITY); |
619 | - event.set_actor("application://diodon.desktop"); |
620 | + event.interpretation = Zeitgeist.ZG.CREATE_EVENT; |
621 | + event.manifestation = Zeitgeist.ZG.USER_ACTIVITY; |
622 | + event.actor = "application://diodon.desktop"; |
623 | event.add_subject(subject); |
624 | // content should be added, however ignored as currently |
625 | // data is not being read |
626 | @@ -91,9 +91,12 @@ |
627 | |
628 | TimeVal cur_time = TimeVal(); |
629 | int64 timestamp = Zeitgeist.Timestamp.from_timeval(cur_time); |
630 | - event.set_timestamp(timestamp); |
631 | + event.timestamp = timestamp; |
632 | |
633 | - log.insert_events_no_reply(event, null); |
634 | + GenericArray<Zeitgeist.Event> events = new GenericArray<Zeitgeist.Event>(); |
635 | + events.add(event); |
636 | + |
637 | + log.insert_events_no_reply(events); |
638 | } |
639 | |
640 | private string? get_path_of_active_application() |
641 | |
642 | === modified file 'wscript' |
643 | --- wscript 2013-02-19 22:41:39 +0000 |
644 | +++ wscript 2013-07-06 21:39:24 +0000 |
645 | @@ -74,7 +74,7 @@ |
646 | |
647 | conf.env['ZEITGEIST'] = Options.options.enable_zeitgeist |
648 | if Options.options.enable_zeitgeist: |
649 | - conf.check_cfg(package='zeitgeist-1.0', uselib_store='ZEITGEIST', atleast_version='0.3.12', mandatory=1, args='--cflags --libs') |
650 | + conf.check_cfg(package='zeitgeist-2.0', uselib_store='ZEITGEIST', atleast_version='0.9.14', mandatory=1, args='--cflags --libs') |
651 | |
652 | # FIXME: conf.env and conf.define should not both be needed? |
653 | conf.define('PACKAGE_NAME', APPNAME) |
Thanks!