Merge lp:~davidc3/unity-scope-manpages/odd-glib-null-crash into lp:unity-scope-manpages

Proposed by David Callé on 2014-03-21
Status: Merged
Approved by: Michal Hruby on 2014-03-24
Approved revision: 40
Merged at revision: 38
Proposed branch: lp:~davidc3/unity-scope-manpages/odd-glib-null-crash
Merge into: lp:unity-scope-manpages
Diff against target: 57 lines (+3/-18)
2 files modified
data/manpages.scope.in (+1/-1)
src/unity_manpages_daemon.py (+2/-17)
To merge this branch: bzr merge lp:~davidc3/unity-scope-manpages/odd-glib-null-crash
Reviewer Review Type Date Requested Status
Michal Hruby (community) 2014-03-21 Approve on 2014-03-24
PS Jenkins bot (community) continuous-integration Approve on 2014-03-21
Review via email: mp+212104@code.launchpad.net

Commit message

- Remove references to provider credits
- Build results properly
- Add "man" keyword

Description of the change

- Remove references to provider credits
- Build results properly
- Add "man" keyword

 * 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? : N/A

To post a comment you must log in.
39. By David Callé on 2014-03-21

Nicer results building

40. By David Callé on 2014-03-21

Add man keyword

Michal Hruby (mhr3) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/manpages.scope.in'
--- data/manpages.scope.in 2013-07-08 07:47:25 +0000
+++ data/manpages.scope.in 2014-03-21 10:40:15 +0000
@@ -2,7 +2,7 @@
2DBusName=com.canonical.Unity.Scope.Development.Manpages2DBusName=com.canonical.Unity.Scope.Development.Manpages
3DBusPath=/com/canonical/unity/scope/development/manpages3DBusPath=/com/canonical/unity/scope/development/manpages
4Icon=/usr/share/icons/unity-icon-theme/places/svg/service-manpages.svg4Icon=/usr/share/icons/unity-icon-theme/places/svg/service-manpages.svg
5_Keywords=manpages;5_Keywords=manpages;man;
6RequiredMetadata=6RequiredMetadata=
7OptionalMetadata=7OptionalMetadata=
8Loader=/usr/share/unity-scopes/manpages/unity_manpages_daemon.py8Loader=/usr/share/unity-scopes/manpages/unity_manpages_daemon.py
99
=== modified file 'src/unity_manpages_daemon.py'
--- src/unity_manpages_daemon.py 2013-05-14 07:36:19 +0000
+++ src/unity_manpages_daemon.py 2014-03-21 10:40:15 +0000
@@ -34,7 +34,6 @@
3434
35SEARCH_HINT = _('Search Manpages')35SEARCH_HINT = _('Search Manpages')
36NO_RESULTS_HINT = _('Sorry, there are no Manpages that match your search.')36NO_RESULTS_HINT = _('Sorry, there are no Manpages that match your search.')
37PROVIDER_CREDITS = _('')
38SVG_DIR = '/usr/share/icons/unity-icon-theme/places/svg/'37SVG_DIR = '/usr/share/icons/unity-icon-theme/places/svg/'
39PROVIDER_ICON = SVG_DIR + 'service-manpages.svg'38PROVIDER_ICON = SVG_DIR + 'service-manpages.svg'
40DEFAULT_RESULT_ICON = SVG_DIR + 'service-manpages.svg'39DEFAULT_RESULT_ICON = SVG_DIR + 'service-manpages.svg'
@@ -136,21 +135,9 @@
136 i['comment'] = ''135 i['comment'] = ''
137 if not 'dnd_uri' in i or not i['dnd_uri'] or i['dnd_uri'] == '':136 if not 'dnd_uri' in i or not i['dnd_uri'] or i['dnd_uri'] == '':
138 i['dnd_uri'] = i['uri']137 i['dnd_uri'] = i['uri']
139 i['metadata'] = {}138 result_set.add_result(**i)
140 if EXTRA_METADATA:
141 for e in i:
142 for m in EXTRA_METADATA:
143 if m['id'] == e:
144 i['metadata'][e] = i[e]
145 i['metadata']['provider_credits'] = GLib.Variant('s', PROVIDER_CREDITS)
146 result = Unity.ScopeResult.create(str(i['uri']), str(i['icon']),
147 i['category'], i['result_type'],
148 str(i['mimetype']), str(i['title']),
149 str(i['comment']), str(i['dnd_uri']),
150 i['metadata'])
151 result_set.add_result(result)
152 except Exception as error:139 except Exception as error:
153 print(error)140 print (error)
154141
155142
156class Scope(Unity.AbstractScope):143class Scope(Unity.AbstractScope):
@@ -168,8 +155,6 @@
168 if EXTRA_METADATA:155 if EXTRA_METADATA:
169 for m in EXTRA_METADATA:156 for m in EXTRA_METADATA:
170 schema.add_field(m['id'], m['type'], m['field'])157 schema.add_field(m['id'], m['type'], m['field'])
171 #FIXME should be REQUIRED for credits
172 schema.add_field('provider_credits', 's', Unity.SchemaFieldType.OPTIONAL)
173 return schema158 return schema
174159
175 def do_get_categories(self):160 def do_get_categories(self):

Subscribers

People subscribed via source and target branches

to all changes: