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

Proposed by Djax
Status: Rejected
Rejected by: Danielle Foré
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 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.
Revision history for this message
Danielle Foré (danrabbit) wrote :

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

Revision history for this message
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?

Revision history for this message
Danielle Foré (danrabbit) wrote :

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

Unmerged revisions

546. By Djax

Show settings in a new search category

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'po/slingshot.pot'
--- po/slingshot.pot 2015-05-29 01:01:19 +0000
+++ po/slingshot.pot 2015-06-03 18:26:54 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-05-28 20:01-0500\n"11"POT-Creation-Date: 2015-06-03 20:23+0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,6 +17,58 @@
17"Content-Type: text/plain; charset=UTF-8\n"17"Content-Type: text/plain; charset=UTF-8\n"
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
1919
20#: ../src/Widgets/SearchView.vala:165
21msgid "Other"
22msgstr ""
23
24#: ../src/Widgets/SearchView.vala:168
25msgid "Text"
26msgstr ""
27
28#: ../src/Widgets/SearchView.vala:171
29msgid "Applications"
30msgstr ""
31
32#: ../src/Widgets/SearchView.vala:174
33msgid "Files"
34msgstr ""
35
36#: ../src/Widgets/SearchView.vala:177
37msgid "Actions"
38msgstr ""
39
40#: ../src/Widgets/SearchView.vala:180
41msgid "Search"
42msgstr ""
43
44#: ../src/Widgets/SearchView.vala:183
45msgid "Contacts"
46msgstr ""
47
48#: ../src/Widgets/SearchView.vala:186
49msgid "Internet"
50msgstr ""
51
52#: ../src/Widgets/SearchView.vala:189
53msgid "Settings"
54msgstr ""
55
56#: ../src/Widgets/AppEntry.vala:195
57msgid "Remove from _Dock"
58msgstr ""
59
60#: ../src/Widgets/AppEntry.vala:197
61msgid "Add to _Dock"
62msgstr ""
63
64#: ../src/Widgets/CategoryView.vala:27
65msgid "All Applications"
66msgstr ""
67
68#: ../src/Widgets/CategoryView.vala:28
69msgid "Create a new Filter"
70msgstr ""
71
20#: ../src/Backend/App.vala:10872#: ../src/Backend/App.vala:108
21msgid "Run this command…"73msgid "Run this command…"
22msgstr ""74msgstr ""
@@ -33,52 +85,80 @@
33msgid "Search Apps"85msgid "Search Apps"
34msgstr ""86msgstr ""
3587
36#: ../src/Widgets/CategoryView.vala:2788#: ../lib/synapse-plugins/system-managment.vala:103
37msgid "All Applications"89msgid "Suspend"
38msgstr ""90msgstr ""
3991
40#: ../src/Widgets/CategoryView.vala:2892#: ../lib/synapse-plugins/system-managment.vala:104
41msgid "Create a new Filter"93msgid "Put your computer into suspend mode"
42msgstr ""94msgstr ""
4395
44#: ../src/Widgets/AppEntry.vala:19596#: ../lib/synapse-plugins/system-managment.vala:203
45msgid "Remove from _Dock"97msgid "Hibernate"
46msgstr ""98msgstr ""
4799
48#: ../src/Widgets/AppEntry.vala:197100#: ../lib/synapse-plugins/system-managment.vala:204
49msgid "Add to _Dock"101msgid "Put your computer into hibernation mode"
50msgstr ""102msgstr ""
51103
52#: ../src/Widgets/SearchView.vala:156104#: ../lib/synapse-plugins/system-managment.vala:302
53msgid "Other"105msgid "Shut Down"
54msgstr ""106msgstr ""
55107
56#: ../src/Widgets/SearchView.vala:159108#: ../lib/synapse-plugins/system-managment.vala:303
57msgid "Text"109msgid "Turn your computer off"
58msgstr ""110msgstr ""
59111
60#: ../src/Widgets/SearchView.vala:162112#: ../lib/synapse-plugins/system-managment.vala:386
61msgid "Applications"113msgid "Restart"
62msgstr ""114msgstr ""
63115
64#: ../src/Widgets/SearchView.vala:165116#: ../lib/synapse-plugins/system-managment.vala:387
65msgid "Files"117msgid "Restart your computer"
66msgstr ""118msgstr ""
67119
68#: ../src/Widgets/SearchView.vala:168120#: ../lib/synapse-plugins/system-managment.vala:471
69msgid "Actions"121msgid "Suspend, hibernate, restart or shutdown your computer."
70msgstr ""122msgstr ""
71123
72#: ../src/Widgets/SearchView.vala:171124#: ../lib/synapse-plugins/system-managment.vala:476
73msgid "Search"125msgid "ConsoleKit wasn't found"
74msgstr ""126msgstr ""
75127
76#: ../src/Widgets/SearchView.vala:174128#: ../lib/synapse-plugins/desktop-file-plugin.vala:94
77msgid "Contacts"129msgid "Search for and run applications on your computer."
78msgstr ""130msgstr ""
79131
80#: ../src/Widgets/SearchView.vala:177132#: ../lib/synapse-plugins/desktop-file-plugin.vala:283
81msgid "Internet"133msgid "Open with %s"
134msgstr ""
135
136#: ../lib/synapse-plugins/desktop-file-plugin.vala:285
137msgid "Opens current selection using %s"
138msgstr ""
139
140#: ../lib/synapse-plugins/command-plugin.vala:56
141msgid "Execute '%s'"
142msgstr ""
143
144#: ../lib/synapse-plugins/command-plugin.vala:56
145msgid "Run command"
146msgstr ""
147
148#: ../lib/synapse-plugins/command-plugin.vala:77
149msgid "Find and execute arbitrary commands."
150msgstr ""
151
152#: ../lib/synapse-plugins/calculator-plugin.vala:63
153msgid "Calculator"
154msgstr ""
155
156#: ../lib/synapse-plugins/calculator-plugin.vala:64
157msgid "Calculate basic expressions."
158msgstr ""
159
160#: ../lib/synapse-plugins/calculator-plugin.vala:68
161msgid "bc is not installed"
82msgstr ""162msgstr ""
83163
84#: ../lib/synapse-core/common-actions.vala:77164#: ../lib/synapse-core/common-actions.vala:77
@@ -120,79 +200,3 @@
120#: ../lib/synapse-core/common-actions.vala:294200#: ../lib/synapse-core/common-actions.vala:294
121msgid "Copy selection to clipboard"201msgid "Copy selection to clipboard"
122msgstr ""202msgstr ""
123
124#: ../lib/synapse-plugins/desktop-file-plugin.vala:94
125msgid "Search for and run applications on your computer."
126msgstr ""
127
128#: ../lib/synapse-plugins/desktop-file-plugin.vala:283
129msgid "Open with %s"
130msgstr ""
131
132#: ../lib/synapse-plugins/desktop-file-plugin.vala:285
133msgid "Opens current selection using %s"
134msgstr ""
135
136#: ../lib/synapse-plugins/command-plugin.vala:56
137msgid "Execute '%s'"
138msgstr ""
139
140#: ../lib/synapse-plugins/command-plugin.vala:56
141msgid "Run command"
142msgstr ""
143
144#: ../lib/synapse-plugins/command-plugin.vala:77
145msgid "Find and execute arbitrary commands."
146msgstr ""
147
148#: ../lib/synapse-plugins/calculator-plugin.vala:63
149msgid "Calculator"
150msgstr ""
151
152#: ../lib/synapse-plugins/calculator-plugin.vala:64
153msgid "Calculate basic expressions."
154msgstr ""
155
156#: ../lib/synapse-plugins/calculator-plugin.vala:68
157msgid "bc is not installed"
158msgstr ""
159
160#: ../lib/synapse-plugins/system-managment.vala:103
161msgid "Suspend"
162msgstr ""
163
164#: ../lib/synapse-plugins/system-managment.vala:104
165msgid "Put your computer into suspend mode"
166msgstr ""
167
168#: ../lib/synapse-plugins/system-managment.vala:203
169msgid "Hibernate"
170msgstr ""
171
172#: ../lib/synapse-plugins/system-managment.vala:204
173msgid "Put your computer into hibernation mode"
174msgstr ""
175
176#: ../lib/synapse-plugins/system-managment.vala:302
177msgid "Shut Down"
178msgstr ""
179
180#: ../lib/synapse-plugins/system-managment.vala:303
181msgid "Turn your computer off"
182msgstr ""
183
184#: ../lib/synapse-plugins/system-managment.vala:386
185msgid "Restart"
186msgstr ""
187
188#: ../lib/synapse-plugins/system-managment.vala:387
189msgid "Restart your computer"
190msgstr ""
191
192#: ../lib/synapse-plugins/system-managment.vala:471
193msgid "Suspend, hibernate, restart or shutdown your computer."
194msgstr ""
195
196#: ../lib/synapse-plugins/system-managment.vala:476
197msgid "ConsoleKit wasn't found"
198msgstr ""
199203
=== modified file 'src/Widgets/SearchView.vala'
--- src/Widgets/SearchView.vala 2015-05-29 00:40:47 +0000
+++ src/Widgets/SearchView.vala 2015-06-03 18:26:54 +0000
@@ -128,6 +128,15 @@
128 || uri.has_prefix ("https://"))128 || uri.has_prefix ("https://"))
129 type = 8;129 type = 8;
130 }130 }
131 // we're cheating again and assign switchboard plugs .desktop files to a separate category.
132 // We assign 9 as the id for settings results
133 if (match.get_type ().name () == "SynapseDesktopFilePluginDesktopFileMatch") {
134 Value val = Value (typeof (string));
135 match.get_property ("exec", ref val);
136 if (val.get_string ().has_prefix ("switchboard -o"))
137 type = 9;
138 val.unset ();
139 }
131140
132 if ((list = categories.get (type)) == null) {141 if ((list = categories.get (type)) == null) {
133 list = new Gee.LinkedList<Synapse.Match> ();142 list = new Gee.LinkedList<Synapse.Match> ();
@@ -176,6 +185,9 @@
176 case 8:185 case 8:
177 label = _("Internet");186 label = _("Internet");
178 break;187 break;
188 case 9:
189 label = _("Settings");
190 break;
179 }191 }
180192
181 var header = new Gtk.Label (label);193 var header = new Gtk.Label (label);

Subscribers

People subscribed via source and target branches