Merge lp:~voluntatefaber/slingshot/bug856528 into lp:~elementary-pantheon/slingshot/trunk

Proposed by Andrea Basso
Status: Merged
Merged at revision: 169
Proposed branch: lp:~voluntatefaber/slingshot/bug856528
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 61 lines (+19/-14)
2 files modified
src/Backend/App.vala (+11/-8)
src/Widgets/SearchItem.vala (+8/-6)
To merge this branch: bzr merge lp:~voluntatefaber/slingshot/bug856528
Reviewer Review Type Date Requested Status
Cody Garver (community) Approve
Review via email: mp+103380@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Hi Andrea! Please merge your branches with the latest changes to lp:slingshot before I review them.

168. By Andrea Basso

Merged main branch

Revision history for this message
Andrea Basso (voluntatefaber) wrote :

> Hi Andrea! Please merge your branches with the latest changes to lp:slingshot
> before I review them.

Done :D

Revision history for this message
Cody Garver (codygarver) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Backend/App.vala'
2--- src/Backend/App.vala 2012-02-25 13:14:25 +0000
3+++ src/Backend/App.vala 2012-04-25 12:04:20 +0000
4@@ -69,14 +69,17 @@
5 icon = Slingshot.icon_theme.load_icon (icon_name, Slingshot.settings.icon_size,
6 Gtk.IconLookupFlags.FORCE_SIZE);
7 } catch (Error e) {
8- try {
9- icon = Slingshot.icon_theme.load_icon ("application-default-icon", Slingshot.settings.icon_size,
10- Gtk.IconLookupFlags.FORCE_SIZE);
11- }
12- catch (Error e) {
13- icon = Slingshot.icon_theme.load_icon ("gtk-missing-image", Slingshot.settings.icon_size,
14- Gtk.IconLookupFlags.FORCE_SIZE);
15- }
16+ try {
17+ icon = new Gdk.Pixbuf.from_file_at_scale (icon_name, Slingshot.settings.icon_size, Slingshot.settings.icon_size, false);
18+ } catch (Error e) {
19+ try {
20+ icon = Slingshot.icon_theme.load_icon ("application-default-icon", Slingshot.settings.icon_size,
21+ Gtk.IconLookupFlags.FORCE_SIZE);
22+ } catch (Error e) {
23+ icon = Slingshot.icon_theme.load_icon ("gtk-missing-image", Slingshot.settings.icon_size,
24+ Gtk.IconLookupFlags.FORCE_SIZE);
25+ }
26+ }
27 }
28
29 icon_changed ();
30
31=== modified file 'src/Widgets/SearchItem.vala'
32--- src/Widgets/SearchItem.vala 2012-04-25 02:13:12 +0000
33+++ src/Widgets/SearchItem.vala 2012-04-25 12:04:20 +0000
34@@ -35,11 +35,10 @@
35 get_style_context ().add_class ("app");
36
37 icon = app.icon;
38-
39- var label = @"<b><span size=\"larger\">$(app.name)</span></b>\n" +
40- @"$(Utils.truncate_text (app.description, 200))";
41-
42- app_label = new Label (label.replace ("&", "&amp;"));
43+ var label = "<b><span size=\"larger\">" + fix (app.name) + "</span></b>\n" +
44+ fix (Utils.truncate_text (app.description, 200));
45+
46+ app_label = new Label (label);
47 app_label.use_markup = true;
48 app_label.xalign = 0.0f;
49
50@@ -69,7 +68,10 @@
51 return true;
52
53 }
54-
55+
56+ private string fix (string text) {
57+ return text.replace ("&", "&amp;").replace ("<", "&lt;").replace (">", "&gt;");
58+ }
59 }
60
61 }

Subscribers

People subscribed via source and target branches