Merge lp:~unity-team/libunity/libunity.urgent into lp:libunity

Proposed by Jason Smith on 2011-04-01
Status: Merged
Merged at revision: 54
Proposed branch: lp:~unity-team/libunity/libunity.urgent
Merge into: lp:libunity
Diff against target: 96 lines (+10/-23) 2 files modified
To merge this branch: bzr merge lp:~unity-team/libunity/libunity.urgent
Reviewer Review Type Date Requested Status
Jay Taoko (community) 2011-04-01 Approve on 2011-04-07
Review via email: mp+56005@code.launchpad.net
To post a comment you must log in.
Jay Taoko (jaytaoko) :
review: Approve

Preview Diff

1=== modified file 'src/unity-launcher.vala'
2--- src/unity-launcher.vala 2011-03-02 09:36:15 +0000
3+++ src/unity-launcher.vala 2011-04-01 20:53:47 +0000
4@@ -66,8 +66,6 @@
5 props.insert ("count-visible", owner.count_visible);
6 props.insert ("progress", owner.progress);
7 props.insert ("progress-visible", owner.progress_visible);
8- props.insert ("emblem", owner.emblem == null ? "" : owner.emblem);
9- props.insert ("emblem-visible", owner.emblem_visible);
10
11 if (owner.quicklist != null)
12 props.insert ("quicklist", owner._object_path);
13@@ -101,8 +99,7 @@
14 public double progress { get; set; default = 0.0; }
15 public bool progress_visible { get; set; default = false; }
16
17- public Icon? emblem { get; set; default = null; }
18- public bool emblem_visible { get; set; default = false; }
19+ public bool urgent { get; set; default = false; }
20
21 private Dbusmenu.Menuitem? _quicklist;
22 public Dbusmenu.Menuitem? quicklist {
23@@ -233,12 +230,9 @@
24 if (props.lookup("progress-visible", "b", out visible))
25 self.progress_visible = visible;
26
27- string emblem;
28- if (props.lookup("emblem", "s", out emblem))
29- self.emblem = new ThemedIcon (emblem);
30-
31- if (props.lookup("emblem-visible", "b", out visible))
32- self.emblem_visible = visible;
33+ bool urgent;
34+ if (props.lookup("urgent", "b", out urgent))
35+ self.urgent = urgent;
36
37 string quicklist_path;
38 if (props.lookup("quicklist", "s", out quicklist_path))
39@@ -269,11 +263,8 @@
40 case "progress-visible":
41 v = this.progress_visible;
42 break;
43- case "emblem":
44- v = this.emblem != null ? this.emblem.to_string () : "";
45- break;
46- case "emblem-visible":
47- v = this.emblem_visible;
48+ case "urgent":
49+ v = this.urgent;
50 break;
51 case "quicklist":
52 if (_quicklist_server != null)
53@@ -346,8 +337,7 @@
54 props.insert ("count-visible", l.count_visible);
55 props.insert ("progress", l.progress);
56 props.insert ("progress-visible", l.progress_visible);
57- props.insert ("emblem", l.emblem == null ? "" : l.emblem.to_string ());
58- props.insert ("emblem-visible", l.emblem_visible);
59+ props.insert ("urgent", l.urgent);
60
61 if (l.quicklist != null)
62 props.insert ("quicklist", l._object_path);
63
64=== modified file 'test/vala/test-launcher.vala'
65--- test/vala/test-launcher.vala 2011-03-02 09:03:45 +0000
66+++ test/vala/test-launcher.vala 2011-04-01 20:53:47 +0000
67@@ -45,8 +45,7 @@
68 assert (l.progress == 0.0);
69 assert (l.progress_visible == false);
70
71- assert (l.emblem == null);
72- assert (l.emblem_visible == false);
73+ assert (l.urgent == false);
74
75 assert (l.quicklist == null);
76 }
77@@ -70,8 +69,7 @@
78 orig.count_visible = true;
79 orig.progress = 1.0;
80 orig.progress_visible = true;
81- orig.emblem = new ThemedIcon ("emblem-important");
82- orig.emblem_visible = true;
83+ orig.urgent = true;
84
85 Variant data = orig.externalize ();
86
87@@ -82,8 +80,7 @@
88 assert (orig.progress > copy.progress - 0.01 &&
89 orig.progress < copy.progress + 0.01);
90 assert (orig.progress_visible == copy.progress_visible);
91- assert (orig.emblem.to_string() == copy.emblem.to_string());
92- assert (orig.emblem_visible == copy.emblem_visible);
93+ assert (orig.urgent == copy.urgent);
94
95 // FIXME: We're not testing the quicklist here, that's a bit tricky
96 }

Subscribers

People subscribed via source and target branches