Merge lp:~submarine/unity-scope-manpages/icon-fixes into lp:unity-scope-manpages

Proposed by David Callé
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 31
Merged at revision: 32
Proposed branch: lp:~submarine/unity-scope-manpages/icon-fixes
Merge into: lp:unity-scope-manpages
Diff against target: 99 lines (+21/-9)
2 files modified
po/unity-scope-manpages.pot (+14/-6)
src/unity_manpages_daemon.py (+7/-3)
To merge this branch: bzr merge lp:~submarine/unity-scope-manpages/icon-fixes
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+163574@code.launchpad.net

Commit message

Kill warning from preview image, add provider icon to the preview, fix wrong results icons

Description of the change

- Kill warning from preview image
- Add provider icon to the preview
- Fix wrong results icons : when an app icon was matched with a manpage, it was used for all subsequent results until the next app icon match
- Update translations

To post a comment you must log in.
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Works fine, just one question:

51 +msgid ""
52 +"This is an Ubuntu search plugin that enables information from local manpages "
53 +"to be searched and displayed in the Dash underneath the Code header. If you "
54 +"do not wish to search this content source, you can disable this search "
55 +"plugin."

I know this is auto-generated, but looks a bit suspicious; is this a correct multi-line msgid?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Callé (davidc3) wrote :

That's a very good question. From what I can see elsewhere (eg http://bazaar.launchpad.net/~ubuntuone-control-tower/software-center/trunk/files/head:/po/ ) this is the correct multi-line syntax.

Revision history for this message
Paweł Stołowski (stolowski) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/unity-scope-manpages.pot'
2--- po/unity-scope-manpages.pot 2013-02-21 01:00:03 +0000
3+++ po/unity-scope-manpages.pot 2013-05-13 16:58:27 +0000
4@@ -3,13 +3,13 @@
5 # This file is distributed under the same license as the PACKAGE package.
6 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
7 #
8-#: ../src/unity_manpages_daemon.py:36
9+#: ../src/unity_manpages_daemon.py:37
10 #, fuzzy
11 msgid ""
12 msgstr ""
13 "Project-Id-Version: PACKAGE VERSION\n"
14 "Report-Msgid-Bugs-To: \n"
15-"POT-Creation-Date: 2013-02-21 02:00+0100\n"
16+"POT-Creation-Date: 2013-05-13 18:42+0200\n"
17 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
18 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
19 "Language-Team: LANGUAGE <LL@li.org>\n"
20@@ -18,18 +18,22 @@
21 "Content-Type: text/plain; charset=CHARSET\n"
22 "Content-Transfer-Encoding: 8bit\n"
23
24-#: ../src/unity_manpages_daemon.py:34
25+#: ../src/unity_manpages_daemon.py:35
26 msgid "Search Manpages"
27 msgstr ""
28
29-#: ../src/unity_manpages_daemon.py:35
30+#: ../src/unity_manpages_daemon.py:36
31 msgid "Sorry, there are no Manpages that match your search."
32 msgstr ""
33
34-#: ../src/unity_manpages_daemon.py:44
35+#: ../src/unity_manpages_daemon.py:45
36 msgid "Technical Documents"
37 msgstr ""
38
39+#: ../src/unity_manpages_daemon.py:99
40+msgid "Show"
41+msgstr ""
42+
43 #: ../data/manpages.scope.in.h:1
44 msgid "manpages;"
45 msgstr ""
46@@ -39,7 +43,11 @@
47 msgstr ""
48
49 #: ../data/manpages.scope.in.h:3
50-msgid "Find Manpages"
51+msgid ""
52+"This is an Ubuntu search plugin that enables information from local manpages "
53+"to be searched and displayed in the Dash underneath the Code header. If you "
54+"do not wish to search this content source, you can disable this search "
55+"plugin."
56 msgstr ""
57
58 #: ../data/manpages.scope.in.h:4
59
60=== modified file 'src/unity_manpages_daemon.py'
61--- src/unity_manpages_daemon.py 2013-03-29 23:02:38 +0000
62+++ src/unity_manpages_daemon.py 2013-05-13 16:58:27 +0000
63@@ -37,7 +37,7 @@
64 PROVIDER_CREDITS = _('')
65 SVG_DIR = '/usr/share/icons/unity-icon-theme/places/svg/'
66 PROVIDER_ICON = SVG_DIR + 'service-manpages.svg'
67-DEFAULT_RESULT_ICON = SVG_DIR + 'result-help.svg'
68+DEFAULT_RESULT_ICON = SVG_DIR + 'service-manpages.svg'
69 DEFAULT_RESULT_MIMETYPE = 'x-scheme-handler/man'
70 DEFAULT_RESULT_TYPE = Unity.ResultType.DEFAULT
71
72@@ -75,6 +75,8 @@
73 icon_info = icon_theme.lookup_icon(res[0], 128, 0)
74 if icon_info:
75 icon_hint = Gio.ThemedIcon.new(res[0]).to_string()
76+ else:
77+ icon_hint = None
78 results.append({'uri': uri,
79 'icon': icon_hint,
80 'category': 0,
81@@ -88,7 +90,8 @@
82 def do_run(self):
83 preview = Unity.GenericPreview.new(self.result.title, '', None)
84 preview.props.subtitle = self.result.comment
85- preview.props.image = Gio.ThemedIcon.new(self.result.icon_hint)
86+ image = Gio.ThemedIcon.new(self.result.icon_hint)
87+ preview.props.image = image
88 manpage = subprocess.check_output(['man', self.result.title])
89 match = re.search('NAME', manpage.decode('utf-8'))
90 description = manpage.decode('utf-8')[match.start():]
91@@ -96,7 +99,8 @@
92 if len(description) > 5000:
93 description = description[:5000] + '…'
94 preview.props.description_markup = description
95- view_action = Unity.PreviewAction.new("show", _("Show"), None)
96+ icon = Gio.FileIcon.new (Gio.file_new_for_path(PROVIDER_ICON))
97+ view_action = Unity.PreviewAction.new("open", _("Open"), icon)
98 preview.add_action(view_action)
99 return preview
100

Subscribers

People subscribed via source and target branches

to all changes: