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
=== modified file 'po/unity-scope-manpages.pot'
--- po/unity-scope-manpages.pot 2013-02-21 01:00:03 +0000
+++ po/unity-scope-manpages.pot 2013-05-13 16:58:27 +0000
@@ -3,13 +3,13 @@
3# This file is distributed under the same license as the PACKAGE package.3# This file is distributed under the same license as the PACKAGE package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5#5#
6#: ../src/unity_manpages_daemon.py:366#: ../src/unity_manpages_daemon.py:37
7#, fuzzy7#, fuzzy
8msgid ""8msgid ""
9msgstr ""9msgstr ""
10"Project-Id-Version: PACKAGE VERSION\n"10"Project-Id-Version: PACKAGE VERSION\n"
11"Report-Msgid-Bugs-To: \n"11"Report-Msgid-Bugs-To: \n"
12"POT-Creation-Date: 2013-02-21 02:00+0100\n"12"POT-Creation-Date: 2013-05-13 18:42+0200\n"
13"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"13"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"14"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15"Language-Team: LANGUAGE <LL@li.org>\n"15"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,18 +18,22 @@
18"Content-Type: text/plain; charset=CHARSET\n"18"Content-Type: text/plain; charset=CHARSET\n"
19"Content-Transfer-Encoding: 8bit\n"19"Content-Transfer-Encoding: 8bit\n"
2020
21#: ../src/unity_manpages_daemon.py:3421#: ../src/unity_manpages_daemon.py:35
22msgid "Search Manpages"22msgid "Search Manpages"
23msgstr ""23msgstr ""
2424
25#: ../src/unity_manpages_daemon.py:3525#: ../src/unity_manpages_daemon.py:36
26msgid "Sorry, there are no Manpages that match your search."26msgid "Sorry, there are no Manpages that match your search."
27msgstr ""27msgstr ""
2828
29#: ../src/unity_manpages_daemon.py:4429#: ../src/unity_manpages_daemon.py:45
30msgid "Technical Documents"30msgid "Technical Documents"
31msgstr ""31msgstr ""
3232
33#: ../src/unity_manpages_daemon.py:99
34msgid "Show"
35msgstr ""
36
33#: ../data/manpages.scope.in.h:137#: ../data/manpages.scope.in.h:1
34msgid "manpages;"38msgid "manpages;"
35msgstr ""39msgstr ""
@@ -39,7 +43,11 @@
39msgstr ""43msgstr ""
4044
41#: ../data/manpages.scope.in.h:345#: ../data/manpages.scope.in.h:3
42msgid "Find Manpages"46msgid ""
47"This is an Ubuntu search plugin that enables information from local manpages "
48"to be searched and displayed in the Dash underneath the Code header. If you "
49"do not wish to search this content source, you can disable this search "
50"plugin."
43msgstr ""51msgstr ""
4452
45#: ../data/manpages.scope.in.h:453#: ../data/manpages.scope.in.h:4
4654
=== modified file 'src/unity_manpages_daemon.py'
--- src/unity_manpages_daemon.py 2013-03-29 23:02:38 +0000
+++ src/unity_manpages_daemon.py 2013-05-13 16:58:27 +0000
@@ -37,7 +37,7 @@
37PROVIDER_CREDITS = _('')37PROVIDER_CREDITS = _('')
38SVG_DIR = '/usr/share/icons/unity-icon-theme/places/svg/'38SVG_DIR = '/usr/share/icons/unity-icon-theme/places/svg/'
39PROVIDER_ICON = SVG_DIR + 'service-manpages.svg'39PROVIDER_ICON = SVG_DIR + 'service-manpages.svg'
40DEFAULT_RESULT_ICON = SVG_DIR + 'result-help.svg'40DEFAULT_RESULT_ICON = SVG_DIR + 'service-manpages.svg'
41DEFAULT_RESULT_MIMETYPE = 'x-scheme-handler/man'41DEFAULT_RESULT_MIMETYPE = 'x-scheme-handler/man'
42DEFAULT_RESULT_TYPE = Unity.ResultType.DEFAULT42DEFAULT_RESULT_TYPE = Unity.ResultType.DEFAULT
4343
@@ -75,6 +75,8 @@
75 icon_info = icon_theme.lookup_icon(res[0], 128, 0)75 icon_info = icon_theme.lookup_icon(res[0], 128, 0)
76 if icon_info:76 if icon_info:
77 icon_hint = Gio.ThemedIcon.new(res[0]).to_string()77 icon_hint = Gio.ThemedIcon.new(res[0]).to_string()
78 else:
79 icon_hint = None
78 results.append({'uri': uri,80 results.append({'uri': uri,
79 'icon': icon_hint,81 'icon': icon_hint,
80 'category': 0,82 'category': 0,
@@ -88,7 +90,8 @@
88 def do_run(self):90 def do_run(self):
89 preview = Unity.GenericPreview.new(self.result.title, '', None)91 preview = Unity.GenericPreview.new(self.result.title, '', None)
90 preview.props.subtitle = self.result.comment92 preview.props.subtitle = self.result.comment
91 preview.props.image = Gio.ThemedIcon.new(self.result.icon_hint)93 image = Gio.ThemedIcon.new(self.result.icon_hint)
94 preview.props.image = image
92 manpage = subprocess.check_output(['man', self.result.title])95 manpage = subprocess.check_output(['man', self.result.title])
93 match = re.search('NAME', manpage.decode('utf-8'))96 match = re.search('NAME', manpage.decode('utf-8'))
94 description = manpage.decode('utf-8')[match.start():]97 description = manpage.decode('utf-8')[match.start():]
@@ -96,7 +99,8 @@
96 if len(description) > 5000:99 if len(description) > 5000:
97 description = description[:5000] + '…'100 description = description[:5000] + '…'
98 preview.props.description_markup = description101 preview.props.description_markup = description
99 view_action = Unity.PreviewAction.new("show", _("Show"), None)102 icon = Gio.FileIcon.new (Gio.file_new_for_path(PROVIDER_ICON))
103 view_action = Unity.PreviewAction.new("open", _("Open"), icon)
100 preview.add_action(view_action)104 preview.add_action(view_action)
101 return preview105 return preview
102106

Subscribers

People subscribed via source and target branches

to all changes: