Merge lp:~mefrio-g/slingshot/fix-923060 into lp:~elementary-pantheon/slingshot/trunk

Proposed by Mario Guerriero
Status: Merged
Approved by: Cody Garver
Approved revision: 164
Merged at revision: 164
Proposed branch: lp:~mefrio-g/slingshot/fix-923060
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 243 lines (+141/-14)
4 files modified
po/it.po (+40/-0)
po/slingshot.pot (+52/-8)
src/Widgets/CategoryView.vala (+47/-4)
src/Widgets/Sidebar.vala (+2/-2)
To merge this branch: bzr merge lp:~mefrio-g/slingshot/fix-923060
Reviewer Review Type Date Requested Status
Cody Garver (community) Approve
Review via email: mp+103113@code.launchpad.net
To post a comment you must log in.
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 'po/it.po'
2--- po/it.po 2012-03-01 04:39:08 +0000
3+++ po/it.po 2012-04-23 14:48:20 +0000
4@@ -29,6 +29,46 @@
5 msgid "This Category is Empty"
6 msgstr "Questa categoria รจ vuota"
7
8+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:74
9+msgid "Accessories"
10+msgstr "Accessori"
11+
12+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:77
13+msgid "Universal Access"
14+msgstr "Accesso universale"
15+
16+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:80
17+msgid "Graphics"
18+msgstr "Grafica"
19+
20+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:83
21+msgid "Development"
22+msgstr "Sviluppo"
23+
24+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:86
25+msgid "Other"
26+msgstr "Altro"
27+
28+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:89
29+msgid "Internet"
30+msgstr "Internet"
31+
32+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:92
33+msgid "System"
34+msgstr "Sistema"
35+
36+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:95
37+msgid "Multimedia"
38+msgstr "Multimedia"
39+
40+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:98
41+msgid "Games"
42+msgstr "Giochi"
43+
44+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:101
45+msgid "Office"
46+msgstr "Ufficio"
47+
48 #: /home/random/Projects/slingshot/po/../src/Widgets/Sidebar.vala:82
49 msgid "<b>Bookmarks</b>"
50 msgstr "<b>Segnalibri</b>"
51
52=== modified file 'po/slingshot.pot'
53--- po/slingshot.pot 2011-10-27 20:19:38 +0000
54+++ po/slingshot.pot 2012-04-23 14:48:20 +0000
55@@ -8,7 +8,7 @@
56 msgstr ""
57 "Project-Id-Version: PACKAGE VERSION\n"
58 "Report-Msgid-Bugs-To: \n"
59-"POT-Creation-Date: 2011-10-27 22:16+0200\n"
60+"POT-Creation-Date: 2012-04-23 11:56+0200\n"
61 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
62 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
63 "Language-Team: LANGUAGE <LL@li.org>\n"
64@@ -17,30 +17,74 @@
65 "Content-Type: text/plain; charset=CHARSET\n"
66 "Content-Transfer-Encoding: 8bit\n"
67
68-#: /home/random/Projects/slingshot/po/../src/Widgets/CategoryView.vala:38
69+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:39
70 msgid "All Applications"
71 msgstr ""
72
73-#: /home/random/Projects/slingshot/po/../src/Widgets/CategoryView.vala:39
74+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:40
75 msgid "Most Used Apps"
76 msgstr ""
77
78-#: /home/random/Projects/slingshot/po/../src/Widgets/CategoryView.vala:60
79+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:41
80+msgid "Create a new Filter"
81+msgstr ""
82+
83+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:63
84 msgid "This Category is Empty"
85 msgstr ""
86
87-#: /home/random/Projects/slingshot/po/../src/Widgets/Sidebar.vala:82
88+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:74
89+msgid "Accessories"
90+msgstr ""
91+
92+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:77
93+msgid "Universal Access"
94+msgstr ""
95+
96+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:80
97+msgid "Graphics"
98+msgstr ""
99+
100+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:83
101+msgid "Development"
102+msgstr ""
103+
104+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:86
105+msgid "Other"
106+msgstr ""
107+
108+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:89
109+msgid "Internet"
110+msgstr ""
111+
112+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:92
113+msgid "System"
114+msgstr ""
115+
116+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:95
117+msgid "Multimedia"
118+msgstr ""
119+
120+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:98
121+msgid "Games"
122+msgstr ""
123+
124+#: /home/mario/elementary/slingshot/po/../src/Widgets/CategoryView.vala:101
125+msgid "Office"
126+msgstr ""
127+
128+#: /home/mario/elementary/slingshot/po/../src/Widgets/Sidebar.vala:82
129 msgid "<b>Bookmarks</b>"
130 msgstr ""
131
132-#: /home/random/Projects/slingshot/po/../src/Widgets/Sidebar.vala:85
133+#: /home/mario/elementary/slingshot/po/../src/Widgets/Sidebar.vala:85
134 msgid "<b>Categories</b>"
135 msgstr ""
136
137-#: /home/random/Projects/slingshot/po/../src/Backend/App.vala:53
138+#: /home/mario/elementary/slingshot/po/../src/Backend/App.vala:55
139 msgid "Run this command..."
140 msgstr ""
141
142-#: /home/random/Projects/slingshot/po/../src/SlingshotView.vala:128
143+#: /home/mario/elementary/slingshot/po/../src/SlingshotView.vala:123
144 msgid "Search Apps..."
145 msgstr ""
146
147=== modified file 'src/Widgets/CategoryView.vala'
148--- src/Widgets/CategoryView.vala 2012-04-23 01:25:57 +0000
149+++ src/Widgets/CategoryView.vala 2012-04-23 14:48:20 +0000
150@@ -41,7 +41,9 @@
151 private const string NEW_FILTER = _("Create a new Filter");
152 private int current_position = 0;
153 private bool from_category = false;
154-
155+
156+ private HashMap<int, string> category_ids = new HashMap<int, string> ();
157+
158 public CategoryView (SlingshotView parent) {
159
160 view = parent;
161@@ -68,8 +70,44 @@
162 category_switcher.can_focus = false;
163
164 // Fill the sidebar
165+ int n = 0;
166+
167 foreach (string cat_name in view.apps.keys) {
168- category_switcher.add_category (cat_name);
169+ category_ids.set (n, cat_name);
170+
171+ switch (cat_name) {
172+ case "Accessories":
173+ category_switcher.add_category (_("Accessories"));
174+ break;
175+ case "Universal Access":
176+ category_switcher.add_category (_("Universal Access"));
177+ break;
178+ case "Graphics":
179+ category_switcher.add_category (_("Graphics"));
180+ break;
181+ case "Development":
182+ category_switcher.add_category (_("Development"));
183+ break;
184+ case "Other":
185+ category_switcher.add_category (_("Other"));
186+ break;
187+ case "Internet":
188+ category_switcher.add_category (_("Internet"));
189+ break;
190+ case "System":
191+ category_switcher.add_category (_("System"));
192+ break;
193+ case "Multimedia":
194+ category_switcher.add_category (_("Multimedia"));
195+ break;
196+ case "Games":
197+ category_switcher.add_category (_("Games"));
198+ break;
199+ case "Office":
200+ category_switcher.add_category (_("Office"));
201+ break;
202+ }
203+ n++;
204 }
205
206 category_switcher.add_bookmark (MOST_USED_APPS);
207@@ -102,8 +140,13 @@
208
209 private void connect_events () {
210
211- category_switcher.selection_changed.connect ((category) => {
212-
213+ category_switcher.selection_changed.connect ((name, nth) => {
214+
215+ string category = category_ids.get (nth);
216+
217+ if (name == MOST_USED_APPS)
218+ category = name;
219+
220 if (category == ALL_APPLICATIONS)
221 show_all_apps ();
222 else
223
224=== modified file 'src/Widgets/Sidebar.vala'
225--- src/Widgets/Sidebar.vala 2011-11-01 12:02:58 +0000
226+++ src/Widgets/Sidebar.vala 2012-04-23 14:48:20 +0000
227@@ -58,7 +58,7 @@
228 N_COLUMNS
229 }
230
231- public signal void selection_changed (string entry_name);
232+ public signal void selection_changed (string entry_name, int nth);
233
234 public Sidebar () {
235
236@@ -124,7 +124,7 @@
237 selected = _selected;
238 } else {
239 _selected = nth;
240- selection_changed (name);
241+ selection_changed (name, nth);
242 }
243 }
244

Subscribers

People subscribed via source and target branches