Merge lp:~davidc3/unity-scope-texdoc/glib-bindings-crash into lp:unity-scope-texdoc

Proposed by David Callé
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 27
Merged at revision: 27
Proposed branch: lp:~davidc3/unity-scope-texdoc/glib-bindings-crash
Merge into: lp:unity-scope-texdoc
Diff against target: 36 lines (+2/-14)
2 files modified
data/texdoc.scope.in (+1/-1)
src/unity_texdoc_daemon.py (+1/-13)
To merge this branch: bzr merge lp:~davidc3/unity-scope-texdoc/glib-bindings-crash
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+213214@code.launchpad.net

Commit message

Don't crash Unity bindings when building results.

Description of the change

- Don't crash Unity bindings when building results.
- Add tex and latex keywords

Test plan : https://wiki.ubuntu.com/Process/Merges/TestPlan/unity-scope-texdoc

 * Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes) Yes
 * Did you build your software in a clean sbuild/pbuilder chroot or ppa? Yes
 * Has your component "TestPlan” been executed successfully on desktop? Yes
 * If you changed the packaging (debian), did you subscribe a core-dev to this MP? N/A
 * If you changed the UI, did you subscribe the design-reviewers to this MP? N/A
 * What components might get impacted by your changes? None
 * Have you requested review by the teams of these owning components? N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Looking good. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/texdoc.scope.in'
2--- data/texdoc.scope.in 2013-07-08 07:48:09 +0000
3+++ data/texdoc.scope.in 2014-03-28 08:55:18 +0000
4@@ -5,7 +5,7 @@
5 QueryBinary=texdoc
6 Module=texdoc.unity_texdoc_daemon
7 ModuleType=python3
8-_Keywords=texdoc;
9+_Keywords=texdoc;tex;latex;
10 RequiredMetadata=
11 OptionalMetadata=
12 Type=help
13
14=== modified file 'src/unity_texdoc_daemon.py'
15--- src/unity_texdoc_daemon.py 2013-12-16 01:00:56 +0000
16+++ src/unity_texdoc_daemon.py 2014-03-28 08:55:18 +0000
17@@ -195,19 +195,7 @@
18 i['comment'] = ''
19 if not 'dnd_uri' in i or not i['dnd_uri'] or i['dnd_uri'] == '':
20 i['dnd_uri'] = i['uri']
21- i['metadata'] = {}
22- if EXTRA_METADATA:
23- for e in i:
24- for m in EXTRA_METADATA:
25- if m['id'] == e:
26- i['metadata'][e] = i[e]
27- i['metadata']['provider_credits'] = GLib.Variant('s', PROVIDER_CREDITS)
28- result = Unity.ScopeResult.create(str(i['uri']), str(i['icon']),
29- i['category'], i['result_type'],
30- str(i['mimetype']), str(i['title']),
31- str(i['comment']), str(i['dnd_uri']),
32- i['metadata'])
33- result_set.add_result(result)
34+ result_set.add_result(**i)
35 except Exception as error:
36 print(error)
37

Subscribers

People subscribed via source and target branches