Merge lp:~parnold-x/slingshot/fix-1457597 into lp:~elementary-pantheon/slingshot/trunk

Proposed by Djax on 2015-06-03
Status: Rejected
Rejected by: Daniel Fore on 2015-09-13
Proposed branch: lp:~parnold-x/slingshot/fix-1457597
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 308 lines (+139/-123)
2 files modified
po/slingshot.pot (+127/-123)
src/Widgets/SearchView.vala (+12/-0)
To merge this branch: bzr merge lp:~parnold-x/slingshot/fix-1457597
Reviewer Review Type Date Requested Status
elementary Pantheon team 2015-06-03 Pending
Review via email: mp+260997@code.launchpad.net

Commit message

Show switchboard plug .desktop files in a new settings search category

Description of the change

Show switchboard plug .desktop files in a new settings search category.

To post a comment you must log in.
Daniel Fore (danrabbit) wrote :

Maybe instead of looking for a prefix, we should be looking for categories. Most notably "X-PANTHEON-Switchboard-Plugs"

Djax (parnold-x) wrote :

Also possible. But not all have this category. For example the sound plug .desktop file.

We could also add a switchboard plugin that get's the plugs from the api so we don't must manage all those .desktop files?

Daniel Fore (danrabbit) wrote :

Rejecting in favor of the Switchboard API approach https://code.launchpad.net/~parnold-x/slingshot/switchboard-plugin

Unmerged revisions

546. By Djax on 2015-06-03

Show settings in a new search category

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/slingshot.pot'
2--- po/slingshot.pot 2015-05-29 01:01:19 +0000
3+++ po/slingshot.pot 2015-06-03 18:26:54 +0000
4@@ -8,7 +8,7 @@
5 msgstr ""
6 "Project-Id-Version: PACKAGE VERSION\n"
7 "Report-Msgid-Bugs-To: \n"
8-"POT-Creation-Date: 2015-05-28 20:01-0500\n"
9+"POT-Creation-Date: 2015-06-03 20:23+0200\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13@@ -17,6 +17,58 @@
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16
17+#: ../src/Widgets/SearchView.vala:165
18+msgid "Other"
19+msgstr ""
20+
21+#: ../src/Widgets/SearchView.vala:168
22+msgid "Text"
23+msgstr ""
24+
25+#: ../src/Widgets/SearchView.vala:171
26+msgid "Applications"
27+msgstr ""
28+
29+#: ../src/Widgets/SearchView.vala:174
30+msgid "Files"
31+msgstr ""
32+
33+#: ../src/Widgets/SearchView.vala:177
34+msgid "Actions"
35+msgstr ""
36+
37+#: ../src/Widgets/SearchView.vala:180
38+msgid "Search"
39+msgstr ""
40+
41+#: ../src/Widgets/SearchView.vala:183
42+msgid "Contacts"
43+msgstr ""
44+
45+#: ../src/Widgets/SearchView.vala:186
46+msgid "Internet"
47+msgstr ""
48+
49+#: ../src/Widgets/SearchView.vala:189
50+msgid "Settings"
51+msgstr ""
52+
53+#: ../src/Widgets/AppEntry.vala:195
54+msgid "Remove from _Dock"
55+msgstr ""
56+
57+#: ../src/Widgets/AppEntry.vala:197
58+msgid "Add to _Dock"
59+msgstr ""
60+
61+#: ../src/Widgets/CategoryView.vala:27
62+msgid "All Applications"
63+msgstr ""
64+
65+#: ../src/Widgets/CategoryView.vala:28
66+msgid "Create a new Filter"
67+msgstr ""
68+
69 #: ../src/Backend/App.vala:108
70 msgid "Run this command…"
71 msgstr ""
72@@ -33,52 +85,80 @@
73 msgid "Search Apps"
74 msgstr ""
75
76-#: ../src/Widgets/CategoryView.vala:27
77-msgid "All Applications"
78-msgstr ""
79-
80-#: ../src/Widgets/CategoryView.vala:28
81-msgid "Create a new Filter"
82-msgstr ""
83-
84-#: ../src/Widgets/AppEntry.vala:195
85-msgid "Remove from _Dock"
86-msgstr ""
87-
88-#: ../src/Widgets/AppEntry.vala:197
89-msgid "Add to _Dock"
90-msgstr ""
91-
92-#: ../src/Widgets/SearchView.vala:156
93-msgid "Other"
94-msgstr ""
95-
96-#: ../src/Widgets/SearchView.vala:159
97-msgid "Text"
98-msgstr ""
99-
100-#: ../src/Widgets/SearchView.vala:162
101-msgid "Applications"
102-msgstr ""
103-
104-#: ../src/Widgets/SearchView.vala:165
105-msgid "Files"
106-msgstr ""
107-
108-#: ../src/Widgets/SearchView.vala:168
109-msgid "Actions"
110-msgstr ""
111-
112-#: ../src/Widgets/SearchView.vala:171
113-msgid "Search"
114-msgstr ""
115-
116-#: ../src/Widgets/SearchView.vala:174
117-msgid "Contacts"
118-msgstr ""
119-
120-#: ../src/Widgets/SearchView.vala:177
121-msgid "Internet"
122+#: ../lib/synapse-plugins/system-managment.vala:103
123+msgid "Suspend"
124+msgstr ""
125+
126+#: ../lib/synapse-plugins/system-managment.vala:104
127+msgid "Put your computer into suspend mode"
128+msgstr ""
129+
130+#: ../lib/synapse-plugins/system-managment.vala:203
131+msgid "Hibernate"
132+msgstr ""
133+
134+#: ../lib/synapse-plugins/system-managment.vala:204
135+msgid "Put your computer into hibernation mode"
136+msgstr ""
137+
138+#: ../lib/synapse-plugins/system-managment.vala:302
139+msgid "Shut Down"
140+msgstr ""
141+
142+#: ../lib/synapse-plugins/system-managment.vala:303
143+msgid "Turn your computer off"
144+msgstr ""
145+
146+#: ../lib/synapse-plugins/system-managment.vala:386
147+msgid "Restart"
148+msgstr ""
149+
150+#: ../lib/synapse-plugins/system-managment.vala:387
151+msgid "Restart your computer"
152+msgstr ""
153+
154+#: ../lib/synapse-plugins/system-managment.vala:471
155+msgid "Suspend, hibernate, restart or shutdown your computer."
156+msgstr ""
157+
158+#: ../lib/synapse-plugins/system-managment.vala:476
159+msgid "ConsoleKit wasn't found"
160+msgstr ""
161+
162+#: ../lib/synapse-plugins/desktop-file-plugin.vala:94
163+msgid "Search for and run applications on your computer."
164+msgstr ""
165+
166+#: ../lib/synapse-plugins/desktop-file-plugin.vala:283
167+msgid "Open with %s"
168+msgstr ""
169+
170+#: ../lib/synapse-plugins/desktop-file-plugin.vala:285
171+msgid "Opens current selection using %s"
172+msgstr ""
173+
174+#: ../lib/synapse-plugins/command-plugin.vala:56
175+msgid "Execute '%s'"
176+msgstr ""
177+
178+#: ../lib/synapse-plugins/command-plugin.vala:56
179+msgid "Run command"
180+msgstr ""
181+
182+#: ../lib/synapse-plugins/command-plugin.vala:77
183+msgid "Find and execute arbitrary commands."
184+msgstr ""
185+
186+#: ../lib/synapse-plugins/calculator-plugin.vala:63
187+msgid "Calculator"
188+msgstr ""
189+
190+#: ../lib/synapse-plugins/calculator-plugin.vala:64
191+msgid "Calculate basic expressions."
192+msgstr ""
193+
194+#: ../lib/synapse-plugins/calculator-plugin.vala:68
195+msgid "bc is not installed"
196 msgstr ""
197
198 #: ../lib/synapse-core/common-actions.vala:77
199@@ -120,79 +200,3 @@
200 #: ../lib/synapse-core/common-actions.vala:294
201 msgid "Copy selection to clipboard"
202 msgstr ""
203-
204-#: ../lib/synapse-plugins/desktop-file-plugin.vala:94
205-msgid "Search for and run applications on your computer."
206-msgstr ""
207-
208-#: ../lib/synapse-plugins/desktop-file-plugin.vala:283
209-msgid "Open with %s"
210-msgstr ""
211-
212-#: ../lib/synapse-plugins/desktop-file-plugin.vala:285
213-msgid "Opens current selection using %s"
214-msgstr ""
215-
216-#: ../lib/synapse-plugins/command-plugin.vala:56
217-msgid "Execute '%s'"
218-msgstr ""
219-
220-#: ../lib/synapse-plugins/command-plugin.vala:56
221-msgid "Run command"
222-msgstr ""
223-
224-#: ../lib/synapse-plugins/command-plugin.vala:77
225-msgid "Find and execute arbitrary commands."
226-msgstr ""
227-
228-#: ../lib/synapse-plugins/calculator-plugin.vala:63
229-msgid "Calculator"
230-msgstr ""
231-
232-#: ../lib/synapse-plugins/calculator-plugin.vala:64
233-msgid "Calculate basic expressions."
234-msgstr ""
235-
236-#: ../lib/synapse-plugins/calculator-plugin.vala:68
237-msgid "bc is not installed"
238-msgstr ""
239-
240-#: ../lib/synapse-plugins/system-managment.vala:103
241-msgid "Suspend"
242-msgstr ""
243-
244-#: ../lib/synapse-plugins/system-managment.vala:104
245-msgid "Put your computer into suspend mode"
246-msgstr ""
247-
248-#: ../lib/synapse-plugins/system-managment.vala:203
249-msgid "Hibernate"
250-msgstr ""
251-
252-#: ../lib/synapse-plugins/system-managment.vala:204
253-msgid "Put your computer into hibernation mode"
254-msgstr ""
255-
256-#: ../lib/synapse-plugins/system-managment.vala:302
257-msgid "Shut Down"
258-msgstr ""
259-
260-#: ../lib/synapse-plugins/system-managment.vala:303
261-msgid "Turn your computer off"
262-msgstr ""
263-
264-#: ../lib/synapse-plugins/system-managment.vala:386
265-msgid "Restart"
266-msgstr ""
267-
268-#: ../lib/synapse-plugins/system-managment.vala:387
269-msgid "Restart your computer"
270-msgstr ""
271-
272-#: ../lib/synapse-plugins/system-managment.vala:471
273-msgid "Suspend, hibernate, restart or shutdown your computer."
274-msgstr ""
275-
276-#: ../lib/synapse-plugins/system-managment.vala:476
277-msgid "ConsoleKit wasn't found"
278-msgstr ""
279
280=== modified file 'src/Widgets/SearchView.vala'
281--- src/Widgets/SearchView.vala 2015-05-29 00:40:47 +0000
282+++ src/Widgets/SearchView.vala 2015-06-03 18:26:54 +0000
283@@ -128,6 +128,15 @@
284 || uri.has_prefix ("https://"))
285 type = 8;
286 }
287+ // we're cheating again and assign switchboard plugs .desktop files to a separate category.
288+ // We assign 9 as the id for settings results
289+ if (match.get_type ().name () == "SynapseDesktopFilePluginDesktopFileMatch") {
290+ Value val = Value (typeof (string));
291+ match.get_property ("exec", ref val);
292+ if (val.get_string ().has_prefix ("switchboard -o"))
293+ type = 9;
294+ val.unset ();
295+ }
296
297 if ((list = categories.get (type)) == null) {
298 list = new Gee.LinkedList<Synapse.Match> ();
299@@ -176,6 +185,9 @@
300 case 8:
301 label = _("Internet");
302 break;
303+ case 9:
304+ label = _("Settings");
305+ break;
306 }
307
308 var header = new Gtk.Label (label);

Subscribers

People subscribed via source and target branches