Merge lp:~submarine/unity-scope-firefoxbookmarks/new-icon into lp:unity-scope-firefoxbookmarks

Proposed by David Callé on 2013-06-07
Status: Merged
Approved by: David Callé on 2013-07-01
Approved revision: 29
Merged at revision: 29
Proposed branch: lp:~submarine/unity-scope-firefoxbookmarks/new-icon
Merge into: lp:unity-scope-firefoxbookmarks
Diff against target: 44 lines (+5/-5)
2 files modified
data/firefoxbookmarks.scope.in (+1/-1)
src/unity_firefoxbookmarks_daemon.py (+4/-4)
To merge this branch: bzr merge lp:~submarine/unity-scope-firefoxbookmarks/new-icon
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve on 2013-07-01
Paweł Stołowski 2013-06-07 Approve on 2013-06-11
Review via email: mp+168081@code.launchpad.net

Commit message

Use the bookmark icon and change Show to Open

Description of the change

Use the bookmarks icon
Change Show to Open (to match other scopes)

To post a comment you must log in.
Paweł Stołowski (stolowski) wrote :

31 if not os.path.exists(icon):
32 - icon = 'gtk-about'
33 + icon = None

Why not DEFAULT_RESULT_ICON?

review: Needs Information
David Callé (davidc3) wrote :

the do_run method takes care of that later in the process.

Paweł Stołowski (stolowski) wrote :

Clarified on IRC. +1.

review: Approve
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/firefoxbookmarks.scope.in'
--- data/firefoxbookmarks.scope.in 2013-05-02 16:27:55 +0000
+++ data/firefoxbookmarks.scope.in 2013-06-07 14:31:39 +0000
@@ -1,7 +1,7 @@
1[Scope]1[Scope]
2DBusName=com.canonical.Unity.Scope.Webhistory.Firefoxbookmarks2DBusName=com.canonical.Unity.Scope.Webhistory.Firefoxbookmarks
3DBusPath=/com/canonical/unity/scope/webhistory/firefoxbookmarks3DBusPath=/com/canonical/unity/scope/webhistory/firefoxbookmarks
4Icon=4Icon=/usr/share/icons/unity-icon-theme/places/svg/group-browserbookmarks.svg
5QueryBinary=firefox5QueryBinary=firefox
6_Keywords=firefoxbookmarks;firefox;web;bookmarks;6_Keywords=firefoxbookmarks;firefox;web;bookmarks;
7RequiredMetadata=7RequiredMetadata=
88
=== modified file 'src/unity_firefoxbookmarks_daemon.py'
--- src/unity_firefoxbookmarks_daemon.py 2013-04-30 22:54:36 +0000
+++ src/unity_firefoxbookmarks_daemon.py 2013-06-07 14:31:39 +0000
@@ -35,8 +35,8 @@
35NO_RESULTS_HINT = _('Sorry, there are no Bookmarks that match your search.')35NO_RESULTS_HINT = _('Sorry, there are no Bookmarks that match your search.')
36PROVIDER_CREDITS = _('')36PROVIDER_CREDITS = _('')
37SVG_DIR = '/usr/share/icons/unity-icon-theme/places/svg/'37SVG_DIR = '/usr/share/icons/unity-icon-theme/places/svg/'
38PROVIDER_ICON = SVG_DIR + 'service-firefoxbookmarks.svg'38PROVIDER_ICON = SVG_DIR + 'group-browserbookmarks.svg'
39DEFAULT_RESULT_ICON = 'gtk-about'39DEFAULT_RESULT_ICON = SVG_DIR + 'group-browserbookmarks.svg'
40DEFAULT_RESULT_MIMETYPE = 'text/html'40DEFAULT_RESULT_MIMETYPE = 'text/html'
41DEFAULT_RESULT_TYPE = Unity.ResultType.DEFAULT41DEFAULT_RESULT_TYPE = Unity.ResultType.DEFAULT
42FIREFOX_EXECUTABLE = '/usr/bin/firefox'42FIREFOX_EXECUTABLE = '/usr/bin/firefox'
@@ -107,7 +107,7 @@
107 path = bookmark[4].replace('places.sqlite', 'thumbnails/')107 path = bookmark[4].replace('places.sqlite', 'thumbnails/')
108 icon = '%s%s.png' % (path, hashlib.md5(bookmark[1].encode()).hexdigest())108 icon = '%s%s.png' % (path, hashlib.md5(bookmark[1].encode()).hexdigest())
109 if not os.path.exists(icon):109 if not os.path.exists(icon):
110 icon = 'gtk-about'110 icon = None
111 results.append({'uri': bookmark[1],111 results.append({'uri': bookmark[1],
112 'icon': icon,112 'icon': icon,
113 'category': 0,113 'category': 0,
@@ -142,7 +142,7 @@
142 preview.props.image_source_uri = 'file://' + self.result.icon_hint142 preview.props.image_source_uri = 'file://' + self.result.icon_hint
143 else:143 else:
144 preview.props.image = Gio.ThemedIcon.new('gtk-about')144 preview.props.image = Gio.ThemedIcon.new('gtk-about')
145 show_action = Unity.PreviewAction.new("show", _("Show"), None)145 show_action = Unity.PreviewAction.new("show", _("Open"), None)
146 preview.add_action(show_action)146 preview.add_action(show_action)
147 return preview147 return preview
148148

Subscribers

People subscribed via source and target branches

to all changes: