Merge lp:~mhr3/libunity/floating-fixes into lp:libunity

Proposed by Michal Hruby
Status: Merged
Approved by: James Henstridge
Approved revision: 236
Merged at revision: 236
Proposed branch: lp:~mhr3/libunity/floating-fixes
Merge into: lp:libunity
Diff against target: 55 lines (+16/-8)
1 file modified
src/unity-previews.vala (+16/-8)
To merge this branch: bzr merge lp:~mhr3/libunity/floating-fixes
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
James Henstridge Approve
Matt Fischer (community) Approve
Review via email: mp+170421@code.launchpad.net

Commit message

Deal correctly with InitiallyUnowned classes.

Description of the change

Deal correctly with InitiallyUnowned classes.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Matt Fischer (mfisch) wrote :

This solves the issue I had with the openclipart demo scope (lp:ubuntu-sdk-tutorials).

review: Approve
Revision history for this message
James Henstridge (jamesh) wrote :

Looks good.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/unity-previews.vala'
2--- src/unity-previews.vala 2013-03-22 12:55:21 +0000
3+++ src/unity-previews.vala 2013-06-19 19:00:35 +0000
4@@ -43,6 +43,13 @@
5 get { return _raw.description; }
6 set { _raw.description = value; }
7 }
8+ /**
9+ * Source for the image.
10+ *
11+ * URI to the source which can be used to generate a thumbnail. (for example
12+ * a .pdf file, .webm etc). If a thumbnail in appropriate resolution
13+ * is already available use the "image" property instead.
14+ */
15 public string image_source_uri
16 {
17 get { return _raw.image_source_uri; }
18@@ -85,9 +92,10 @@
19
20 public void add_info (InfoHint info_hint)
21 {
22- info_hint.ref_sink ();
23- _raw.add_info_hint (info_hint.id, info_hint.display_name,
24- info_hint.icon_hint, info_hint.data);
25+ // unlike Vala, C will likely pass floating ref
26+ var sunk = info_hint.ref_sink () as InfoHint;
27+ _raw.add_info_hint (sunk.id, sunk.display_name,
28+ sunk.icon_hint, sunk.data);
29 }
30
31 internal unowned GenericArray<PreviewAction> get_actions ()
32@@ -531,10 +539,8 @@
33 set { _raw.sender = value; }
34 }
35
36- public SocialPreview (string sender,
37- string subtitle,
38- string content,
39- Icon? avatar)
40+ public SocialPreview (string sender, string subtitle,
41+ string content, Icon? avatar)
42 {
43 Object (title: sender, subtitle: subtitle, content: content,
44 avatar: avatar);
45@@ -550,7 +556,9 @@
46
47 public void add_comment (Comment comment)
48 {
49- _raw.add_comment (comment.id, comment.name, comment.text, comment.time);
50+ // unlike Vala, C will likely pass floating ref
51+ var sunk = comment.ref_sink () as Comment;
52+ _raw.add_comment (sunk.id, sunk.name, sunk.text, sunk.time);
53 }
54
55 }

Subscribers

People subscribed via source and target branches