Merge lp:~julien-spautz/slingshot/fix-1200223 into lp:~elementary-pantheon/slingshot/trunk

Proposed by Julien Spautz
Status: Merged
Approved by: David Gomes
Approved revision: 371
Merged at revision: 371
Proposed branch: lp:~julien-spautz/slingshot/fix-1200223
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 50 lines (+3/-17)
1 file modified
src/Utils.vala (+3/-17)
To merge this branch: bzr merge lp:~julien-spautz/slingshot/fix-1200223
Reviewer Review Type Date Requested Status
David Gomes (community) Approve
Review via email: mp+180317@code.launchpad.net

Commit message

Fixed bug #1200223 and Slingshot now orders accented-name apps too.

Description of the change

fix bug #1200223

also removed some whitespace and removed "using" statements

To post a comment you must log in.
Revision history for this message
David Gomes (davidgomes) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Utils.vala'
2--- src/Utils.vala 2012-08-21 17:02:33 +0000
3+++ src/Utils.vala 2013-08-15 11:24:25 +0000
4@@ -16,43 +16,29 @@
5 // along with this program. If not, see <http://www.gnu.org/licenses/>.
6 //
7
8-using GLib;
9-using Gtk;
10-using Cairo;
11-
12 namespace Slingshot {
13
14 class Utils : GLib.Object {
15
16- public static Widget set_padding (Gtk.Widget widget, int top,
17- int right, int bottom, int left) {
18-
19+ public static Gtk.Widget set_padding (Gtk.Widget widget, int top,
20+ int right, int bottom, int left) {
21 widget.set_margin_top (top);
22 widget.set_margin_right (right);
23 widget.set_margin_bottom (bottom);
24 widget.set_margin_left (left);
25 return widget;
26-
27 }
28
29 public static int sort_apps_by_popularity (Backend.App a, Backend.App b) {
30-
31 return (int) (b.popularity*1000 - a.popularity*1000);
32-
33 }
34
35 public static int sort_apps_by_name (Backend.App a, Backend.App b) {
36-
37- return GLib.strcmp (a.name.down (), b.name.down ());
38-
39+ return a.name.collate (b.name);
40 }
41
42 public static int sort_apps_by_relevancy (Backend.App a, Backend.App b) {
43-
44 return (int) (a.relevancy*1000 - b.relevancy*1000);
45-
46 }
47-
48 }
49-
50 }

Subscribers

People subscribed via source and target branches