Merge lp:~3v1n0/libunity/fix-ftb-wily into lp:libunity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
Approved revision: 316
Merged at revision: 315
Proposed branch: lp:~3v1n0/libunity/fix-ftb-wily
Merge into: lp:libunity
Diff against target: 181 lines (+33/-34)
6 files modified
protocol/protocol-scope-discovery.vala (+4/-3)
src/unity-launcher.vala (+4/-8)
test/vala/test-launcher-integration.vala (+1/-2)
tools/music-track-model-renderer.vala (+5/-7)
tools/preview-renderer.vala (+11/-6)
tools/unity-tool-ui.vala (+8/-8)
To merge this branch: bzr merge lp:~3v1n0/libunity/fix-ftb-wily
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+270824@code.launchpad.net

Commit message

Tools: use proper type prefix to fix FTB

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Azzarone (azzar1) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'protocol/protocol-scope-discovery.vala'
2--- protocol/protocol-scope-discovery.vala 2013-10-01 13:32:26 +0000
3+++ protocol/protocol-scope-discovery.vala 2015-09-11 13:57:34 +0000
4@@ -269,10 +269,11 @@
5
6 internal static void update_hidden_scope_ids ()
7 {
8- unowned string[] schemas = Settings.list_schemas ();
9- if (SCOPE_SCHEMA in schemas)
10+ var schema_src = SettingsSchemaSource.get_default().lookup (SCOPE_SCHEMA, false);
11+
12+ if (schema_src != null)
13 {
14- var settings = new Settings (SCOPE_SCHEMA);
15+ var settings = new Settings.full (schema_src, null, null);
16 hidden_scope_ids = settings.get_strv ("hidden-scopes");
17 }
18 else
19
20=== modified file 'src/unity-launcher.vala'
21--- src/unity-launcher.vala 2012-11-05 21:09:31 +0000
22+++ src/unity-launcher.vala 2015-09-11 13:57:34 +0000
23@@ -361,9 +361,11 @@
24 private LauncherFavorites ()
25 {
26 fav_cache = new HashTable<string,AppInfo?> (str_hash, str_equal);
27- if (schema_exists (LAUNCHER_SCHEMA_NAME))
28+ var schema_src = SettingsSchemaSource.get_default().lookup (LAUNCHER_SCHEMA_NAME, false);
29+
30+ if (schema_src != null)
31 {
32- settings = new Settings (LAUNCHER_SCHEMA_NAME);
33+ var settings = new Settings.full (schema_src, null, null);
34 reset_fav_cache ();
35
36 settings.changed["favorites"].connect (reset_fav_cache);
37@@ -374,12 +376,6 @@
38 }
39 }
40
41- private static bool schema_exists (string schema)
42- {
43- unowned string[] installed_schemas = Settings.list_schemas ();
44- return schema in installed_schemas;
45- }
46-
47 private void reset_fav_cache ()
48 {
49 fav_cache.remove_all ();
50
51=== modified file 'test/vala/test-launcher-integration.vala'
52--- test/vala/test-launcher-integration.vala 2012-11-05 21:09:31 +0000
53+++ test/vala/test-launcher-integration.vala 2015-09-11 13:57:34 +0000
54@@ -29,8 +29,7 @@
55
56 public static bool schema_exists (string schema)
57 {
58- unowned string[] installed_schemas = Settings.list_schemas ();
59- return schema in installed_schemas;
60+ return SettingsSchemaSource.get_default().lookup (schema, false) != null;
61 }
62
63 public static int main (string[] args)
64
65=== modified file 'tools/music-track-model-renderer.vala'
66--- tools/music-track-model-renderer.vala 2013-07-22 12:04:23 +0000
67+++ tools/music-track-model-renderer.vala 2015-09-11 13:57:34 +0000
68@@ -17,8 +17,6 @@
69 *
70 */
71
72-using Gtk;
73-
74 namespace Unity.Tester {
75
76 public class MusicTrackModelRenderer: Object
77@@ -27,13 +25,13 @@
78 private Dee.ModelTag<int> track_model_tag;
79 private int row_counter = 0;
80 private ulong model_sync_sig_id = 0;
81- public ListStore track_view_model { get; construct; }
82+ public Gtk.ListStore track_view_model { get; construct; }
83
84 public signal void track_list_synchronized();
85
86 construct
87 {
88- track_view_model = new ListStore(6, typeof(string), typeof(int), typeof(string), typeof(uint), typeof(uint), typeof(double));
89+ track_view_model = new Gtk.ListStore(6, typeof(string), typeof(int), typeof(string), typeof(uint), typeof(uint), typeof(double));
90 }
91
92 public MusicTrackModelRenderer(Dee.Model track_model)
93@@ -67,8 +65,8 @@
94 var row = model.get_row(iter);
95
96 track_model_tag.set(track_model, iter, row_counter++);
97-
98- TreeIter tm_iter;
99+
100+ Gtk.TreeIter tm_iter;
101 track_view_model.append(out tm_iter);
102 track_view_model.set(tm_iter, 0, row[0].get_string(), 1, row[1].get_int32(), 2, row[2].get_string(), 3, row[3].get_uint32(), 4, row[4].get_uint32(), 5, row[5].get_double(), -1);
103 }
104@@ -76,7 +74,7 @@
105 private void track_changed_cb(Dee.Model model, Dee.ModelIter iter)
106 {
107 int index = track_model_tag.get(track_model, iter);
108- TreeIter tm_iter;
109+ Gtk.TreeIter tm_iter;
110 if (track_view_model.get_iter_first(out tm_iter)) {
111 while (index > 0)
112 {
113
114=== modified file 'tools/preview-renderer.vala'
115--- tools/preview-renderer.vala 2013-07-22 12:04:23 +0000
116+++ tools/preview-renderer.vala 2015-09-11 13:57:34 +0000
117@@ -148,12 +148,17 @@
118 icon_label.set_markup(name);
119 grid.attach(icon_label, 0, row, 1, 1);
120 var themed_icon = Gtk.IconTheme.get_default().lookup_by_gicon(icon, size, 0);
121- var pixbuf = themed_icon.load_icon();
122- Gtk.Image image = new Gtk.Image.from_pixbuf(pixbuf);
123- if (tooltip != null) {
124- image.set_tooltip_text(tooltip);
125- }
126- grid.attach(image, 1, row, 1, 1);
127+ try {
128+ var pixbuf = themed_icon.load_icon();
129+ Gtk.Image image = new Gtk.Image.from_pixbuf(pixbuf);
130+ if (tooltip != null) {
131+ image.set_tooltip_text(tooltip);
132+ }
133+ grid.attach(image, 1, row, 1, 1);
134+ }
135+ catch (GLib.Error e) {
136+ warning(@"Got error while loading pixmap: $(e.message)");
137+ }
138
139 ++row;
140 }
141
142=== modified file 'tools/unity-tool-ui.vala'
143--- tools/unity-tool-ui.vala 2013-09-24 08:57:39 +0000
144+++ tools/unity-tool-ui.vala 2015-09-11 13:57:34 +0000
145@@ -40,9 +40,9 @@
146 window.destroy.connect(Gtk.main_quit);
147 window.show_all();
148
149- uimodel = builder.get_object("results_model") as ListStore;
150- ui_filter_model = builder.get_object("filters_model") as ListStore;
151- ui_cat_model = builder.get_object("categories_model") as ListStore;
152+ uimodel = builder.get_object("results_model") as Gtk.ListStore;
153+ ui_filter_model = builder.get_object("filters_model") as Gtk.ListStore;
154+ ui_cat_model = builder.get_object("categories_model") as Gtk.ListStore;
155
156 notebook = builder.get_object("notebook") as Notebook;
157 search_entry = builder.get_object("search_entry") as Entry;
158@@ -155,7 +155,7 @@
159 builder.add_from_resource("/com/canonical/Unity/unity-tool/dbus-scope-connect.ui");
160 builder.connect_signals(this);
161 scope_discovery_spinner = builder.get_object("scope_discovery_spinner") as Spinner;
162- scope_list_model = builder.get_object("scope_list_model") as ListStore;
163+ scope_list_model = builder.get_object("scope_list_model") as Gtk.ListStore;
164 scope_list_combobox = builder.get_object("scope_list_combobox") as ComboBox;
165 dbus_name_entry = builder.get_object("dbus_name_entry") as Entry;
166 dbus_path_entry = builder.get_object("dbus_path_entry") as Entry;
167@@ -843,10 +843,10 @@
168 private Gtk.Entry dbus_name_entry = null;
169 private Gtk.Entry dbus_path_entry = null;
170 private Gtk.ComboBox scope_list_combobox = null;
171- private ListStore uimodel = null;
172- private ListStore ui_filter_model = null;
173- private ListStore scope_list_model = null;
174- private ListStore ui_cat_model = null;
175+ private Gtk.ListStore uimodel = null;
176+ private Gtk.ListStore ui_filter_model = null;
177+ private Gtk.ListStore scope_list_model = null;
178+ private Gtk.ListStore ui_cat_model = null;
179 private ulong model_sync_sig_id;
180 private Dee.SharedModel? dee_results_model = null;
181 private string current_channel_id = "";

Subscribers

People subscribed via source and target branches