Merge lp:~davidc3/unity-lens-video/fix-1056814 into lp:unity-lens-video

Proposed by David Callé
Status: Merged
Approved by: Michal Hruby
Approved revision: 97
Merged at revision: 97
Proposed branch: lp:~davidc3/unity-lens-video/fix-1056814
Merge into: lp:unity-lens-video
Diff against target: 24 lines (+3/-3)
1 file modified
src/unity-lens-video (+3/-3)
To merge this branch: bzr merge lp:~davidc3/unity-lens-video/fix-1056814
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Review via email: mp+128073@code.launchpad.net

Commit message

Ensure that local zg results are utf-8 encoded

Description of the change

Ensure that local zg results are utf-8 encoded.

Clearing the model fixes duplicated results when an empty search string is sent multiple times (Zg results were duplicated for each search)

To post a comment you must log in.
Revision history for this message
Michal Hruby (mhr3) wrote :

Looks good. +1

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/unity-lens-video'
2--- src/unity-lens-video 2012-09-22 11:37:13 +0000
3+++ src/unity-lens-video 2012-10-04 17:18:22 +0000
4@@ -482,9 +482,9 @@
5 g_file = Gio.file_new_for_uri(uri)
6 path = g_file.get_path()
7 if self.is_video(path) and not self.is_hidden(path, blacklist):
8- item.append(self.get_name(path))
9+ item.append(self.get_name(path).encode("utf-8"))
10 item.append('')
11- item.append(uri)
12+ item.append(uri.encode("utf-8"))
13 item.append(self.get_icon(path))
14 item.append(CAT_INDEX_MY_VIDEOS)
15 result_list.append(item)
16@@ -499,7 +499,7 @@
17 item.append(event.get_subjects()[0].storage.encode("utf-8"))
18 item.append(CAT_INDEX_ONLINE)
19 result_list.append(item)
20-
21+ search_status.props.results_model.clear ()
22 for i in result_list:
23 title = str(i[0])
24 comment = str(i[1])

Subscribers

People subscribed via source and target branches