Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in gnome-extra/cinnamon/files: cinnamon2d-screensaver.desktop fix-control-center-check.patch background.patch idle-dim.patch remove_GC.patch cinnamon-1.7.8-settings-lspci.patch screensaver.patch cinnamon-screensaver.desktop bluetooth_obex_transfer.patch keyboard_applet.patch menu_editor.patch
Date: Sun, 01 Sep 2013 08:49:53
Message-Id: 20130901084947.4055C2004C@flycatcher.gentoo.org
1 pacho 13/09/01 08:49:47
2
3 Added: cinnamon2d-screensaver.desktop
4 fix-control-center-check.patch background.patch
5 idle-dim.patch remove_GC.patch
6 cinnamon-1.7.8-settings-lspci.patch
7 screensaver.patch cinnamon-screensaver.desktop
8 bluetooth_obex_transfer.patch keyboard_applet.patch
9 menu_editor.patch
10 Log:
11 Version bump
12
13 (Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
14
15 Revision Changes Path
16 1.1 gnome-extra/cinnamon/files/cinnamon2d-screensaver.desktop
17
18 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/cinnamon2d-screensaver.desktop?rev=1.1&view=markup
19 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/cinnamon2d-screensaver.desktop?rev=1.1&content-type=text/plain
20
21 Index: cinnamon2d-screensaver.desktop
22 ===================================================================
23 [Desktop Entry]
24 Type=Application
25 Name=Cinnamon2d Screensaver
26 Comment=Launch screensaver and locker program
27 Icon=preferences-desktop-screensaver
28 Exec=gnome-screensaver
29 OnlyShowIn=GNOME;
30 AutostartCondition=GNOME3 if-session cinnamon2d
31 NoDisplay=true
32 X-GNOME-Autostart-Phase=Application
33 X-GNOME-Autostart-Notify=true
34 X-GNOME-Bugzilla-Bugzilla=GNOME
35 X-GNOME-Bugzilla-Product=gnome-screensaver
36 X-GNOME-Bugzilla-Component=general
37 X-GNOME-Bugzilla-Version=3.6.0
38
39
40
41 1.1 gnome-extra/cinnamon/files/fix-control-center-check.patch
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/fix-control-center-check.patch?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/fix-control-center-check.patch?rev=1.1&content-type=text/plain
45
46 Index: fix-control-center-check.patch
47 ===================================================================
48 diff -Naur cinnamon-1.7.1.orig/files/usr/bin/cinnamon-settings cinnamon-1.7.1/files/usr/bin/cinnamon-settings
49 --- cinnamon-1.7.1.orig/files/usr/bin/cinnamon-settings 2013-02-21 17:23:45.000000000 +0100
50 +++ cinnamon-1.7.1/files/usr/bin/cinnamon-settings 2013-03-03 03:03:24.151209998 +0100
51 @@ -7,7 +7,7 @@
52 if os.path.exists("/usr/lib/cinnamon-settings/modules/cs_%s.py" % module):
53 print "Python module"
54 os.execvp("/usr/lib/cinnamon-settings/cinnamon-settings.py", ("",) + tuple(sys.argv[1:]))
55 - elif os.path.exists("/usr/bin/cinnamon-control-center"):
56 + elif os.path.exists("/usr/lib/cinnamon-control-center-1/panels"):
57 print "Unknown module %s, using cinnamon-control-center" % module
58 os.execvp("/usr/lib/cinnamon-settings/cinnamon-settings.py", ("",) + tuple(sys.argv[1:]))
59 elif os.path.exists("/usr/bin/gnome-control-center"):
60
61
62 1.1 gnome-extra/cinnamon/files/background.patch
63
64 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/background.patch?rev=1.1&view=markup
65 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/background.patch?rev=1.1&content-type=text/plain
66
67 Index: background.patch
68 ===================================================================
69 --- a/files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py
70 +++ b/files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py
71 @@ -334,10 +334,9 @@ class BackgroundWallpaperPane (Gtk.VBox)
72
73 def update_icon_view(self):
74 pictures_list = []
75 - if os.path.exists("/usr/share/cinnamon-background-properties"):
76 - for i in os.listdir("/usr/share/cinnamon-background-properties"):
77 - if i.endswith(".xml"):
78 - pictures_list += self.parse_xml_backgrounds_list(os.path.join("/usr/share/cinnamon-background-properties", i))
79 + for i in os.listdir("/usr/share/gnome-background-properties"):
80 + if i.endswith(".xml"):
81 + pictures_list += self.parse_xml_backgrounds_list(os.path.join("/usr/share/gnome-background-properties", i))
82
83 path = os.path.join(os.getenv("HOME"), ".cinnamon", "backgrounds")
84 if os.path.exists(path):
85
86
87
88 1.1 gnome-extra/cinnamon/files/idle-dim.patch
89
90 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/idle-dim.patch?rev=1.1&view=markup
91 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/idle-dim.patch?rev=1.1&content-type=text/plain
92
93 Index: idle-dim.patch
94 ===================================================================
95 diff -Naur linuxmint-Cinnamon-a464dc9.orig/files/usr/share/cinnamon/applets/brightness@××××××××.org/applet.js linuxmint-Cinnamon-a464dc9/files/usr/share/cinnamon/applets/brightness@××××××××.org/applet.js
96 --- linuxmint-Cinnamon-a464dc9.orig/files/usr/share/cinnamon/applets/brightness@××××××××.org/applet.js 2013-04-30 18:01:56.000000000 +0200
97 +++ linuxmint-Cinnamon-a464dc9/files/usr/share/cinnamon/applets/brightness@××××××××.org/applet.js 2013-05-02 19:32:12.934254811 +0200
98 @@ -8,8 +8,7 @@
99
100 /* constants */
101 const DimSettingsSchema = "org.gnome.settings-daemon.plugins.power";
102 -const DimSettingsAc = "idle-dim-ac";
103 -const DimSettingsBattery = "idle-dim-battery";
104 +const DimSettings = "idle-dim";
105 const PowerBusName = 'org.gnome.SettingsDaemon';
106 const PowerObjectPath = '/org/gnome/SettingsDaemon/Power';
107
108 @@ -116,10 +115,8 @@
109
110 this._settingsMenu = new PopupMenu.PopupSubMenuMenuItem(_("Dimming settings"));
111
112 - let dimSwitchAc = this._buildItem(_("Dim screen on AC power"), DimSettingsSchema, DimSettingsAc);
113 - this._settingsMenu.menu.addMenuItem(dimSwitchAc);
114 - let dimSwitchBattery = this._buildItem(_("Dim screen on battery"), DimSettingsSchema, DimSettingsBattery);
115 - this._settingsMenu.menu.addMenuItem(dimSwitchBattery);
116 + let dimSwitch = this._buildItem(_("Dim screen"), DimSettingsSchema, DimSettings);
117 + this._settingsMenu.menu.addMenuItem(dimSwitch);
118
119 //initial update.
120 //We have to wait until dbus calls back to decide whether to display brightness controls.
121 @@ -146,7 +146,7 @@
122 this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
123 }
124
125 - this.menu.addSettingsAction(_("Settings"), "screen");
126 + this.menu.addSettingsAction(_("Settings"), "screensaver");
127 }));
128 }
129 catch (e) {
130
131
132
133 1.1 gnome-extra/cinnamon/files/remove_GC.patch
134
135 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/remove_GC.patch?rev=1.1&view=markup
136 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/remove_GC.patch?rev=1.1&content-type=text/plain
137
138 Index: remove_GC.patch
139 ===================================================================
140 --- a/src/cinnamon-global.c
141 +++ b/src/cinnamon-global.c
142 @@ -1399,35 +1399,6 @@ cinnamon_global_reexec_self (CinnamonGlo
143 g_ptr_array_free (arr, TRUE);
144 }
145
146 -/**
147 - * cinnamon_global_gc:
148 - * @global: A #CinnamonGlobal
149 - *
150 - * Start a garbage collection process. For more information, see
151 - * https://developer.mozilla.org/En/JS_GC
152 - */
153 -void
154 -cinnamon_global_gc (CinnamonGlobal *global)
155 -{
156 - JSContext *context = gjs_context_get_native_context (global->js_context);
157 -
158 - JS_GC (context);
159 -}
160 -
161 -/**
162 - * cinnamon_global_maybe_gc:
163 - * @global: A #CinnamonGlobal
164 - *
165 - * Start a garbage collection process when it would free up enough memory
166 - * to be worth the amount of time it would take
167 - * https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_MaybeGC
168 - */
169 -void
170 -cinnamon_global_maybe_gc (CinnamonGlobal *global)
171 -{
172 - gjs_context_maybe_gc (global->js_context);
173 -}
174 -
175 static void
176 cinnamon_global_on_gc (GjsContext *context,
177 CinnamonGlobal *global)
178 @@ -1768,13 +1768,6 @@ run_leisure_functions (gpointer data)
179 if (global->work_count > 0)
180 return FALSE;
181
182 - /* Previously we called gjs_maybe_gc(). However, it simply doesn't
183 - * trigger often enough. Garbage collection is very fast here, so
184 - * let's just aggressively GC. This will help avoid both heap
185 - * fragmentation, and the GC kicking in when we don't want it to.
186 - */
187 - gjs_context_gc (global->js_context);
188 -
189 /* No leisure closures, so we are done */
190 if (global->leisure_closures == NULL)
191 return FALSE;
192 --- a/src/cinnamon-global.h
193 +++ b/src/cinnamon-global.h
194 @@ -88,10 +88,6 @@ void cinnamon_global_set_pointer
195 int y);
196
197
198 -/* JavaScript utilities */
199 -void cinnamon_global_gc (CinnamonGlobal *global);
200 -void cinnamon_global_maybe_gc (CinnamonGlobal *global);
201 -
202 typedef struct {
203 guint glibc_uordblks;
204
205
206
207 --- a/js/perf/core.js
208 +++ b/js/perf/core.js
209 @@ -1,5 +1,7 @@
210 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
211
212 +const System = imports.system;
213 +
214 const Main = imports.ui.main;
215 const Scripting = imports.ui.scripting;
216
217 @@ -99,7 +101,7 @@ function run() {
218 Main.overview.hide();
219 yield Scripting.waitLeisure();
220
221 - global.gc();
222 + System.gc();
223 yield Scripting.sleep(1000);
224 Scripting.collectStatistics();
225 Scripting.scriptEvent('afterShowHide');
226 --- a/js/ui/lookingGlass.js
227 +++ b/js/ui/lookingGlass.js
228 @@ -11,6 +11,7 @@ const St = imports.gi.St;
229 const Cinnamon = imports.gi.Cinnamon;
230 const Signals = imports.signals;
231 const Lang = imports.lang;
232 +const System = imports.system;
233
234 const History = imports.misc.history;
235 const Extension = imports.ui.extension;
236 @@ -680,7 +681,7 @@ Memory.prototype = {
237
238 this._gcbutton = new St.Button({ label: 'Full GC',
239 style_class: 'lg-obj-inspector-button' });
240 - this._gcbutton.connect('clicked', Lang.bind(this, function () { global.gc(); this._renderText(); }));
241 + this._gcbutton.connect('clicked', Lang.bind(this, function () { System.gc(); this._renderText(); }));
242 this.actor.add(this._gcbutton, { x_align: St.Align.START,
243 x_fill: false });
244
245 --- a/js/ui/lookingGlassDBus.js
246 +++ b/js/ui/lookingGlassDBus.js
247 @@ -1,5 +1,7 @@
248 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
249
250 +const System = imports.system;
251 +
252 const Gio = imports.gi.Gio;
253 const Main = imports.ui.main;
254 const Extension = imports.ui.extension;
255 @@ -99,7 +101,7 @@ CinnamonLookingGlass.prototype = {
256 },
257
258 FullGc: function() {
259 - global.gc();
260 + System.gc();
261 },
262
263 Inspect: function(path) {
264
265
266
267 1.1 gnome-extra/cinnamon/files/cinnamon-1.7.8-settings-lspci.patch
268
269 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/cinnamon-1.7.8-settings-lspci.patch?rev=1.1&view=markup
270 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/cinnamon-1.7.8-settings-lspci.patch?rev=1.1&content-type=text/plain
271
272 Index: cinnamon-1.7.8-settings-lspci.patch
273 ===================================================================
274 diff -urN a/files/usr/lib/cinnamon-settings/modules/cs_info.py b/files/usr/lib/cinnamon-settings/modules/cs_info.py
275 --- a/files/usr/lib/cinnamon-settings/modules/cs_info.py 2013-04-30 18:01:56.000000000 +0200
276 +++ b/files/usr/lib/cinnamon-settings/modules/cs_info.py 2013-05-01 22:30:03.725733012 +0200
277 @@ -27,7 +27,7 @@
278 "T": 1024*1024*1024*1024,
279 }
280 count = 0
281 - for card in getProcessOut(("lspci")):
282 + for card in getProcessOut(("/usr/sbin/lspci")):
283 if not "VGA" in card:
284 continue
285 cardId = card.split()[0]
286 @@ -35,7 +35,7 @@
287 cardUnitName = ""
288 cardName = None
289 cardSize = 0
290 - for line in getProcessOut(("lspci", "-v", "-s", cardId)):
291 + for line in getProcessOut(("/usr/sbin/lspci", "-v", "-s", cardId)):
292 if line.startswith(cardId):
293 cardName = (line.split(":")[2].split("(rev")[0].strip())
294 else:
295
296
297
298 1.1 gnome-extra/cinnamon/files/screensaver.patch
299
300 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/screensaver.patch?rev=1.1&view=markup
301 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/screensaver.patch?rev=1.1&content-type=text/plain
302
303 Index: screensaver.patch
304 ===================================================================
305 --- a/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.py
306 +++ b/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.py
307 @@ -57,9 +57,9 @@ class MainWindow:
308 def lock_screen(self, data):
309 message = self.entry.get_text()
310 if (message != ""):
311 - os.system("cinnamon-screensaver-command --lock --away-message \"%s\" &" % self.entry.get_text())
312 + os.system("gnome-screensaver-command --lock --away-message \"%s\" &" % self.entry.get_text())
313 else:
314 - os.system("cinnamon-screensaver-command --lock &")
315 + os.system("gnome-screensaver-command --lock &")
316 gtk.main_quit()
317
318 if __name__ == "__main__":
319 --- a/files/usr/lib/cinnamon-settings/modules/cs_screensaver.py
320 +++ b/files/usr/lib/cinnamon-settings/modules/cs_screensaver.py
321 @@ -5,15 +5,15 @@ from SettingsWidgets import *
322
323 class Module:
324 def __init__(self, content_box):
325 - keywords = _("screensaver, brightness, lock, password, away, message")
326 + keywords = _("screensaver, brightness, lock, password, user, switching")
327 advanced = False
328 sidePage = SidePage(_("Screensaver & Lock Settings"), "screensaver.svg", keywords, advanced, content_box)
329 self.sidePage = sidePage
330 self.name = "screensaver"
331 self.category = "prefs"
332 - if os.path.exists("/usr/bin/cinnamon-screensaver-command"):
333 - sidePage.add_widget(GSettingsCheckButton(_("Ask for an away message when locking the screen from the menu"), "org.cinnamon.screensaver", "ask-for-away-message", None))
334 - sidePage.add_widget(GSettingsEntry(_("Default away message"), "org.cinnamon.screensaver", "default-message", None))
335 + if os.path.exists("/usr/bin/gnome-screensaver-command"):
336 + self.sidePage.add_widget(GSettingsCheckButton(_("Ask for password when unlocking"), "org.gnome.desktop.screensaver", "lock-enabled", None))
337 + self.sidePage.add_widget(GSettingsCheckButton(_("Enable user switching"), "org.gnome.desktop.screensaver", "user-switch-enabled", None))
338
339 widget = content_box.c_manager.get_c_widget("screen")
340 if widget is not None:
341
342
343
344 1.1 gnome-extra/cinnamon/files/cinnamon-screensaver.desktop
345
346 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/cinnamon-screensaver.desktop?rev=1.1&view=markup
347 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/cinnamon-screensaver.desktop?rev=1.1&content-type=text/plain
348
349 Index: cinnamon-screensaver.desktop
350 ===================================================================
351 [Desktop Entry]
352 Type=Application
353 Name=Cinnamon Screensaver
354 Comment=Launch screensaver and locker program
355 Icon=preferences-desktop-screensaver
356 Exec=gnome-screensaver
357 OnlyShowIn=GNOME;
358 AutostartCondition=GNOME3 if-session cinnamon
359 NoDisplay=true
360 X-GNOME-Autostart-Phase=Application
361 X-GNOME-Autostart-Notify=true
362 X-GNOME-Bugzilla-Bugzilla=GNOME
363 X-GNOME-Bugzilla-Product=gnome-screensaver
364 X-GNOME-Bugzilla-Component=general
365 X-GNOME-Bugzilla-Version=3.6.0
366
367
368
369 1.1 gnome-extra/cinnamon/files/bluetooth_obex_transfer.patch
370
371 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/bluetooth_obex_transfer.patch?rev=1.1&view=markup
372 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/bluetooth_obex_transfer.patch?rev=1.1&content-type=text/plain
373
374 Index: bluetooth_obex_transfer.patch
375 ===================================================================
376 --- a/files/usr/share/cinnamon/applets/bluetooth@××××××××.org/applet.js
377 +++ b/files/usr/share/cinnamon/applets/bluetooth@××××××××.org/applet.js
378 @@ -455,22 +455,6 @@ MyApplet.prototype = {
379 this._applet.send_to_address(device.bdaddr, device.alias);
380 }));
381 }
382 - if (device.capabilities & GnomeBluetoothApplet.Capabilities.OBEX_FILE_TRANSFER) {
383 - item.menu.addAction(_("Browse Files..."), Lang.bind(this, function(event) {
384 - this._applet.browse_address(device.bdaddr, event.get_time(),
385 - Lang.bind(this, function(applet, result) {
386 - try {
387 - applet.browse_address_finish(result);
388 - } catch (e) {
389 - this._ensureSource();
390 - this._source.notify(new MessageTray.Notification(this._source,
391 - _("Bluetooth"),
392 - _("Error browsing device"),
393 - { body: _("The requested device cannot be browsed, error is '%s'").format(e) }));
394 - }
395 - }));
396 - }));
397 - }
398
399 switch (device.type) {
400 case GnomeBluetoothApplet.Type.KEYBOARD:
401
402
403
404 1.1 gnome-extra/cinnamon/files/keyboard_applet.patch
405
406 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/keyboard_applet.patch?rev=1.1&view=markup
407 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/keyboard_applet.patch?rev=1.1&content-type=text/plain
408
409 Index: keyboard_applet.patch
410 ===================================================================
411 diff --git a/applet.js b/applet.js
412 --- a/files/usr/share/cinnamon/applets/keyboard@××××××××.org/applet.js
413 +++ b/files/usr/share/cinnamon/applets/keyboard@××××××××.org/applet.js
414 @@ -1,9 +1,10 @@
415 const Applet = imports.ui.applet;
416 -const Gkbd = imports.gi.Gkbd;
417 const Lang = imports.lang;
418 -const Cinnamon = imports.gi.Cinnamon;
419 +const Gio = imports.gi.Gio;
420 +const GLib = imports.gi.GLib;
421 const St = imports.gi.St;
422 const Gtk = imports.gi.Gtk;
423 +const GnomeDesktop = imports.gi.GnomeDesktop;
424 const Main = imports.ui.main;
425 const PopupMenu = imports.ui.popupMenu;
426 const Util = imports.misc.util;
427 @@ -15,11 +16,12 @@
428 LayoutMenuItem.prototype = {
429 __proto__: PopupMenu.PopupBaseMenuItem.prototype,
430
431 - _init: function(config, id, indicator, long_name) {
432 + _init: function(ipsettings, id, index, indicator, long_name) {
433 PopupMenu.PopupBaseMenuItem.prototype._init.call(this);
434
435 - this._config = config;
436 + this._ipsettings = ipsettings;
437 this._id = id;
438 + this._index = index;
439 this.label = new St.Label({ text: long_name });
440 this.indicator = indicator;
441 this.addActor(this.label);
442 @@ -28,7 +30,7 @@
443
444 activate: function(event) {
445 PopupMenu.PopupBaseMenuItem.prototype.activate.call(this);
446 - this._config.lock_group(this._id);
447 + this._ipsettings.set_value('current', GLib.Variant.new_uint32(this._index));
448 }
449 };
450
451 @@ -54,18 +56,18 @@
452 this._layoutItems = [ ];
453
454 this._showFlags = global.settings.get_boolean("keyboard-applet-use-flags");
455 - this._config = Gkbd.Configuration.get();
456 - this._config.connect('changed', Lang.bind(this, this._syncConfig));
457 - this._config.connect('group-changed', Lang.bind(this, this._syncGroup));
458 + this._xkbInfo = new GnomeDesktop.XkbInfo();
459 + this._ipsettings = new Gio.Settings({ schema: 'org.gnome.desktop.input-sources' });
460 + this._ipsettings.connect('changed::sources', Lang.bind(this, this._syncConfig));
461 + this._ipsettings.connect('changed::current', Lang.bind(this, this._syncGroup));
462 global.settings.connect('changed::keyboard-applet-use-flags', Lang.bind(this, this._reload_settings));
463 - this._config.start_listen();
464
465 this._syncConfig();
466
467 this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
468 this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
469 Main.overview.hide();
470 - Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
471 + Util.spawn(['gkbd-keyboard-display', '-l', this._selectedLayout._id]);
472 }));
473 this.menu.addAction(_("Show Character Table"), Lang.bind(this, function() {
474 Main.overview.hide();
475 @@ -98,7 +100,6 @@
476 },
477
478 _reload_settings: function() {
479 - this._showFlags = global.settings.get_boolean("keyboard-applet-use-flags");
480 this._syncConfig();
481 },
482
483 @@ -127,8 +128,8 @@
484 _syncConfig: function() {
485 this._showFlags = global.settings.get_boolean("keyboard-applet-use-flags");
486
487 - let groups = this._config.get_group_names();
488 - if (groups.length > 1) {
489 + let sources = this._ipsettings.get_value('sources');
490 + if (sources.n_children() > 1) {
491 this.actor.show();
492 } else {
493 this.menu.close();
494 @@ -141,25 +142,29 @@
495 for (let i = 0; i < this._labelActors.length; i++)
496 this._labelActors[i].destroy();
497
498 - let short_names = this._adjustGroupNames(this._config.get_short_group_names());
499 -
500 this._selectedLayout = null;
501 this._layoutItems = [ ];
502 this._labelActors = [ ];
503 - for (let i = 0; i < groups.length; i++) {
504 - let icon_name = this._config.get_group_name(i);
505 + for (let i = 0; i < sources.n_children(); i++) {
506 + let [type, id] = sources.get_child_value(i).deep_unpack();
507 + let displayName = id;
508 + let shortName = id;
509 + let xkbLayout = id;
510 + if (type == 'xkb') {
511 + [_exists, displayName, shortName, xkbLayout, _xkbVariant] = this._xkbInfo.get_layout_info(id);
512 + } // TODO: errorhandling, handle 'ibus'
513 + let icon_name = xkbLayout; // FIXME: Really?
514 let actor;
515 if (this._showFlags)
516 actor = new St.Icon({ icon_name: icon_name, icon_type: St.IconType.FULLCOLOR, style_class: 'popup-menu-icon' });
517 else
518 - actor = new St.Label({ text: short_names[i] });
519 - let item = new LayoutMenuItem(this._config, i, actor, groups[i]);
520 - item._short_group_name = short_names[i];
521 + actor = new St.Label({ text: shortName });
522 + let item = new LayoutMenuItem(this._ipsettings, id, i, actor, displayName);
523 item._icon_name = icon_name;
524 this._layoutItems.push(item);
525 this.menu.addMenuItem(item, i);
526
527 - let shortLabel = new St.Label({ text: short_names[i] });
528 + let shortLabel = new St.Label({ text: shortName });
529 this._labelActors.push(shortLabel);
530 }
531
532 @@ -167,17 +172,17 @@
533 },
534
535 _syncGroup: function() {
536 - let selected = this._config.get_current_group();
537 + let current = this._ipsettings.get_uint('current');
538
539 if (this._selectedLayout) {
540 this._selectedLayout.setShowDot(false);
541 this._selectedLayout = null;
542 }
543
544 - let item = this._layoutItems[selected];
545 + let item = this._layoutItems[current];
546 item.setShowDot(true);
547
548 - let selectedLabel = this._labelActors[selected];
549 + let selectedLabel = this._labelActors[current];
550
551 if (this._showFlags) {
552 this.set_applet_icon_name(item._icon_name);
553
554
555
556 1.1 gnome-extra/cinnamon/files/menu_editor.patch
557
558 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/menu_editor.patch?rev=1.1&view=markup
559 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/cinnamon/files/menu_editor.patch?rev=1.1&content-type=text/plain
560
561 Index: menu_editor.patch
562 ===================================================================
563 diff --git a/files/usr/bin/cinnamon-launcher-creator b/files/usr/bin/cinnamon-launcher-creator
564 new file mode 100755
565 index 0000000..6f51401
566 --- /dev/null
567 +++ b/files/usr/bin/cinnamon-launcher-creator
568 @@ -0,0 +1,21 @@
569 +#! /usr/bin/python -OOt
570 +
571 +import sys
572 +sys.path.insert(0,'/usr/lib/cinnamon-menu-editor')
573 +from cme import ItemEditor, MenuEditor
574 +
575 +def main():
576 + try:
577 + from MenuEditor import config
578 + datadir = config.pkgdatadir
579 + version = config.VERSION
580 + except:
581 + datadir = '.'
582 + version = '0.9'
583 + if len(sys.argv) > 1:
584 + app = ItemEditor.DesktopLauncherCreator(sys.argv[1])
585 + else:
586 + print "Missing path argument for launcher location"
587 +
588 +if __name__ == '__main__':
589 + main()
590 diff --git a/files/usr/lib/cinnamon-menu-editor/cme/ItemEditor.py b/files/usr/lib/cinnamon-menu-editor/cme/ItemEditor.py
591 new file mode 100644
592 index 0000000..80c2acd
593 --- /dev/null
594 +++ b/files/usr/lib/cinnamon-menu-editor/cme/ItemEditor.py
595 @@ -0,0 +1,247 @@
596 +# -*- coding: utf-8 -*-
597 +# Alacarte Menu Editor - Simple fd.o Compliant Menu Editor
598 +# Copyright (C) 2013 Red Hat, Inc.
599 +#
600 +# This library is free software; you can redistribute it and/or
601 +# modify it under the terms of the GNU Library General Public
602 +# License as published by the Free Software Foundation; either
603 +# version 2 of the License, or (at your option) any later version.
604 +#
605 +# This library is distributed in the hope that it will be useful,
606 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
607 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
608 +# Library General Public License for more details.
609 +#
610 +# You should have received a copy of the GNU Library General Public
611 +# License along with this library; if not, write to the Free Software
612 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
613 +
614 +import gettext
615 +import os
616 +import gi
617 +from gi.repository import GLib, Gtk
618 +from cme import config, util
619 +
620 +_ = gettext.gettext
621 +
622 +EXTENSIONS = (".png", ".xpm", ".svg")
623 +
624 +def try_icon_name(filename):
625 + # Detect if the user picked an icon, and make
626 + # it into an icon name.
627 + if not filename.endswith(EXTENSIONS):
628 + return filename
629 +
630 + filename = filename[:-4]
631 +
632 + theme = Gtk.IconTheme.get_default()
633 + resolved_path = None
634 + for path in theme.get_search_path():
635 + if filename.startswith(path):
636 + resolved_path = filename[len(path):].lstrip(os.sep)
637 + break
638 +
639 + if resolved_path is None:
640 + return filename
641 +
642 + parts = resolved_path.split(os.sep)
643 + # icon-theme/size/category/icon
644 + if len(parts) != 4:
645 + return filename
646 +
647 + return parts[3]
648 +
649 +def get_icon_string(image):
650 + filename = image.props.file
651 + if filename is not None:
652 + return try_icon_name(filename)
653 +
654 + return image.props.icon_name
655 +
656 +def strip_extensions(icon):
657 + if icon.endswith(EXTENSIONS):
658 + return icon[:-4]
659 + else:
660 + return icon
661 +
662 +def set_icon_string(image, icon):
663 + if GLib.path_is_absolute(icon):
664 + image.props.file = icon
665 + else:
666 + image.props.icon_name = strip_extensions(icon)
667 +
668 +DESKTOP_GROUP = GLib.KEY_FILE_DESKTOP_GROUP
669 +
670 +# XXX - replace with a better UI eventually
671 +class IconPicker(object):
672 + def __init__(self, dialog, button, image):
673 + self.dialog = dialog
674 + self.button = button
675 + self.button.connect('clicked', self.pick_icon)
676 + self.image = image
677 +
678 + def pick_icon(self, button):
679 + chooser = Gtk.FileChooserDialog(title=_("Choose an icon"),
680 + parent=self.dialog,
681 + buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT,
682 + Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT))
683 + response = chooser.run()
684 + if response == Gtk.ResponseType.ACCEPT:
685 + self.image.props.file = chooser.get_filename()
686 + chooser.destroy()
687 +
688 +class ItemEditor(object):
689 + ui_file = None
690 +
691 + def __init__(self, item_path, parent=None):
692 + self.builder = Gtk.Builder()
693 + self.builder.add_from_file(self.ui_file)
694 +
695 + self.dialog = self.builder.get_object('editor')
696 + if parent:
697 + self.dialog.set_transient_for(parent)
698 + self.dialog.connect('response', self.on_response)
699 +
700 + self.build_ui()
701 +
702 + self.item_path = item_path
703 + self.load()
704 + self.resync_validity()
705 +
706 + def build_ui(self):
707 + raise NotImplementedError()
708 +
709 + def get_keyfile_edits(self):
710 + raise NotImplementedError()
711 +
712 + def set_text(self, ctl, name):
713 + try:
714 + val = self.keyfile.get_string(DESKTOP_GROUP, name)
715 + except GLib.GError:
716 + pass
717 + else:
718 + self.builder.get_object(ctl).set_text(val)
719 +
720 + def set_check(self, ctl, name):
721 + try:
722 + val = self.keyfile.get_boolean(DESKTOP_GROUP, name)
723 + except GLib.GError:
724 + pass
725 + else:
726 + self.builder.get_object(ctl).set_active(val)
727 +
728 + def set_icon(self, ctl, name):
729 + try:
730 + val = self.keyfile.get_string(DESKTOP_GROUP, name)
731 + except GLib.GError:
732 + pass
733 + else:
734 + set_icon_string(self.builder.get_object(ctl), val)
735 +
736 + def load(self):
737 + self.keyfile = GLib.KeyFile()
738 + try:
739 + self.keyfile.load_from_file(self.item_path, util.KEY_FILE_FLAGS)
740 + except GLib.GError:
741 + pass
742 +
743 + def save(self):
744 + util.fillKeyFile(self.keyfile, self.get_keyfile_edits())
745 + contents, length = self.keyfile.to_data()
746 + need_exec = False
747 + if ".desktop" not in self.item_path and ".directory" not in self.item_path:
748 + need_exec = True
749 + self.item_path = os.path.join(self.item_path, (self.builder.get_object('name-entry').get_text() + ".desktop"))
750 + with open(self.item_path, 'w') as f:
751 + f.write(contents)
752 + if need_exec:
753 + os.system("chmod a+x " + self.item_path)
754 +
755 +
756 + def run(self):
757 + self.dialog.present()
758 +
759 + def on_response(self, dialog, response):
760 + if response == Gtk.ResponseType.OK:
761 + self.save()
762 + self.dialog.destroy()
763 +
764 +class LauncherEditor(ItemEditor):
765 + ui_file = '/usr/lib/cinnamon-menu-editor/launcher-editor.ui'
766 +
767 + def build_ui(self):
768 + self.icon_picker = IconPicker(self.dialog,
769 + self.builder.get_object('icon-button'),
770 + self.builder.get_object('icon-image'))
771 +
772 + self.builder.get_object('exec-browse').connect('clicked', self.pick_exec)
773 +
774 + self.builder.get_object('name-entry').connect('changed', self.resync_validity)
775 + self.builder.get_object('exec-entry').connect('changed', self.resync_validity)
776 +
777 + def resync_validity(self, *args):
778 + name_text = self.builder.get_object('name-entry').get_text()
779 + exec_text = self.builder.get_object('exec-entry').get_text()
780 + valid = (name_text is not None and exec_text is not None)
781 + self.builder.get_object('ok').set_sensitive(valid)
782 +
783 + def load(self):
784 + super(LauncherEditor, self).load()
785 + self.set_text('name-entry', "Name")
786 + self.set_text('exec-entry', "Exec")
787 + self.set_text('comment-entry', "Comment")
788 + self.set_check('terminal-check', "Terminal")
789 + self.set_icon('icon-image', "Icon")
790 +
791 + def get_keyfile_edits(self):
792 + return dict(Name=self.builder.get_object('name-entry').get_text(),
793 + Exec=self.builder.get_object('exec-entry').get_text(),
794 + Comment=self.builder.get_object('comment-entry').get_text(),
795 + Terminal=self.builder.get_object('terminal-check').get_active(),
796 + Icon=get_icon_string(self.builder.get_object('icon-image')),
797 + Type="Application")
798 +
799 + def pick_exec(self, button):
800 + chooser = Gtk.FileChooserDialog(title=_("Choose a command"),
801 + parent=self.dialog,
802 + buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT,
803 + Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT))
804 + response = chooser.run()
805 + if response == Gtk.ResponseType.ACCEPT:
806 + self.builder.get_object('exec-entry').set_text(chooser.get_filename())
807 + chooser.destroy()
808 +
809 +class DirectoryEditor(ItemEditor):
810 + ui_file = '/usr/lib/cinnamon-menu-editor/directory-editor.ui'
811 +
812 + def build_ui(self):
813 + self.icon_picker = IconPicker(self.dialog,
814 + self.builder.get_object('icon-button'),
815 + self.builder.get_object('icon-image'))
816 +
817 + self.builder.get_object('name-entry').connect('changed', self.resync_validity)
818 +
819 + def resync_validity(self, *args):
820 + name_text = self.builder.get_object('name-entry').get_text()
821 + valid = (name_text is not None)
822 + self.builder.get_object('ok').set_sensitive(valid)
823 +
824 + def load(self):
825 + super(DirectoryEditor, self).load()
826 + self.set_text('name-entry', "Name")
827 + self.set_text('comment-entry', "Comment")
828 + self.set_icon('icon-image', "Icon")
829 +
830 + def get_keyfile_edits(self):
831 + return dict(Name=self.builder.get_object('name-entry').get_text(),
832 + Comment=self.builder.get_object('comment-entry').get_text(),
833 + Icon=get_icon_string(self.builder.get_object('icon-image')),
834 + Type="Directory")
835 +
836 +def DesktopLauncherCreator(path):
837 + Gtk.Window.set_default_icon_name('alacarte')
838 + editor = LauncherEditor(path, None)
839 + editor.dialog.connect('destroy', Gtk.main_quit)
840 + editor.dialog.show_all()
841 + Gtk.main()
842 +
843 diff --git a/files/usr/lib/cinnamon-menu-editor/cme/MainWindow.py b/files/usr/lib/cinnamon-menu-editor/cme/MainWindow.py
844 index 33106a9..735d420 100644
845 --- a/files/usr/lib/cinnamon-menu-editor/cme/MainWindow.py
846 +++ b/files/usr/lib/cinnamon-menu-editor/cme/MainWindow.py
847 @@ -22,6 +22,7 @@ import cgi
848 import os
849 import gettext
850 import subprocess
851 +import shutil
852
853 from cme import config
854 gettext.bindtextdomain(config.GETTEXT_PACKAGE, config.localedir)
855 @@ -29,6 +30,7 @@ gettext.textdomain(config.GETTEXT_PACKAGE)
856
857 _ = gettext.gettext
858 from cme.MenuEditor import MenuEditor
859 +from cme.ItemEditor import LauncherEditor, DirectoryEditor
860 from cme import util
861
862 class MainWindow(object):
863 @@ -58,6 +60,7 @@ class MainWindow(object):
864 self.cut_copy_buffer = None
865 self.file_id = None
866 self.last_tree = None
867 + self.main_window = self.tree.get_object('mainwindow')
868
869 def run(self):
870 self.loadMenus()
871 @@ -261,8 +264,8 @@ class MainWindow(object):
872 else:
873 parent = menus[iter][3]
874 file_path = os.path.join(util.getUserDirectoryPath(), util.getUniqueFileId('alacarte-made', '.directory'))
875 - process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
876 - GObject.timeout_add(100, self.waitForNewMenuProcess, process, parent.get_menu_id(), file_path)
877 + editor = DirectoryEditor(file_path, self.main_window)
878 + editor.run()
879
880 def on_new_item_button_clicked(self, button):
881 menu_tree = self.tree.get_object('menu_tree')
882 @@ -274,8 +277,8 @@ class MainWindow(object):
883 else:
884 parent = menus[iter][3]
885 file_path = os.path.join(util.getUserItemPath(), util.getUniqueFileId('alacarte-made', '.desktop'))
886 - process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
887 - GObject.timeout_add(100, self.waitForNewItemProcess, process, parent.get_menu_id(), file_path)
888 + editor = LauncherEditor(file_path, self.main_window)
889 + editor.run()
890
891 def on_edit_delete_activate(self, menu):
892 item_tree = self.tree.get_object('item_tree')
893 @@ -302,18 +305,17 @@ class MainWindow(object):
894 if isinstance(item, GMenu.TreeEntry):
895 file_path = os.path.join(util.getUserItemPath(), item.get_desktop_file_id())
896 file_type = 'Item'
897 + Editor = LauncherEditor
898 elif isinstance(item, GMenu.TreeDirectory):
899 file_path = os.path.join(util.getUserDirectoryPath(), os.path.split(item.get_desktop_file_path())[1])
900 file_type = 'Menu'
901 + Editor = DirectoryEditor
902
903 if not os.path.isfile(file_path):
904 - data = open(item.get_desktop_file_path()).read()
905 - open(file_path, 'w').write(data)
906 + shutil.copy(item.get_desktop_file_path(), file_path)
907
908 - if file_path not in self.edit_pool:
909 - self.edit_pool.append(file_path)
910 - process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
911 - GObject.timeout_add(100, self.waitForEditProcess, process, file_path)
912 + editor = Editor(file_path, self.main_window)
913 + editor.run()
914
915 def on_edit_cut_activate(self, menu):
916 item_tree = self.tree.get_object('item_tree')
917 diff --git a/files/usr/lib/cinnamon-menu-editor/cme/util.py b/files/usr/lib/cinnamon-menu-editor/cme/util.py
918 index 237f03b..459c222 100644
919 --- a/files/usr/lib/cinnamon-menu-editor/cme/util.py
920 +++ b/files/usr/lib/cinnamon-menu-editor/cme/util.py
921 @@ -32,10 +32,10 @@ def fillKeyFile(keyfile, items):
922
923 if isinstance(item, bool):
924 keyfile.set_boolean(DESKTOP_GROUP, key, item)
925 - elif isinstance(item, Sequence):
926 - keyfile.set_string_list(DESKTOP_GROUP, key, item)
927 elif isinstance(item, basestring):
928 keyfile.set_string(DESKTOP_GROUP, key, item)
929 + elif isinstance(item, Sequence):
930 + keyfile.set_string_list(DESKTOP_GROUP, key, item)
931
932 def getNameFromKeyFile(keyfile):
933 return keyfile.get_string(DESKTOP_GROUP, "Name")
934 diff --git a/files/usr/lib/cinnamon-menu-editor/directory-editor.ui b/files/usr/lib/cinnamon-menu-editor/directory-editor.ui
935 new file mode 100644
936 index 0000000..9228c49
937 --- /dev/null
938 +++ b/files/usr/lib/cinnamon-menu-editor/directory-editor.ui
939 @@ -0,0 +1,178 @@
940 +<?xml version="1.0" encoding="UTF-8"?>
941 +<interface>
942 + <!-- interface-requires gtk+ 3.0 -->
943 + <object class="GtkDialog" id="editor">
944 + <property name="can_focus">False</property>
945 + <property name="border_width">4</property>
946 + <property name="title" translatable="yes">Directory Properties</property>
947 + <property name="modal">True</property>
948 + <property name="type_hint">dialog</property>
949 + <child internal-child="vbox">
950 + <object class="GtkBox" id="dialog-box">
951 + <property name="can_focus">False</property>
952 + <property name="orientation">vertical</property>
953 + <property name="spacing">4</property>
954 + <child internal-child="action_area">
955 + <object class="GtkButtonBox" id="dialog-action_area">
956 + <property name="can_focus">False</property>
957 + <property name="layout_style">end</property>
958 + <child>
959 + <object class="GtkButton" id="cancel">
960 + <property name="label">gtk-cancel</property>
961 + <property name="visible">True</property>
962 + <property name="can_focus">True</property>
963 + <property name="receives_default">True</property>
964 + <property name="use_stock">True</property>
965 + </object>
966 + <packing>
967 + <property name="expand">False</property>
968 + <property name="fill">True</property>
969 + <property name="position">0</property>
970 + </packing>
971 + </child>
972 + <child>
973 + <object class="GtkButton" id="ok">
974 + <property name="label">gtk-ok</property>
975 + <property name="visible">True</property>
976 + <property name="can_focus">True</property>
977 + <property name="receives_default">True</property>
978 + <property name="use_stock">True</property>
979 + </object>
980 + <packing>
981 + <property name="expand">False</property>
982 + <property name="fill">True</property>
983 + <property name="position">1</property>
984 + </packing>
985 + </child>
986 + </object>
987 + <packing>
988 + <property name="expand">False</property>
989 + <property name="fill">True</property>
990 + <property name="pack_type">end</property>
991 + <property name="position">0</property>
992 + </packing>
993 + </child>
994 + <child>
995 + <object class="GtkBox" id="hbox">
996 + <property name="visible">True</property>
997 + <property name="can_focus">False</property>
998 + <property name="spacing">10</property>
999 + <child>
1000 + <object class="GtkAlignment" id="alignment1">
1001 + <property name="visible">True</property>
1002 + <property name="can_focus">False</property>
1003 + <property name="xalign">1</property>
1004 + <property name="yalign">0</property>
1005 + <property name="yscale">0</property>
1006 + <child>
1007 + <object class="GtkButton" id="icon-button">
1008 + <property name="visible">True</property>
1009 + <property name="can_focus">True</property>
1010 + <property name="receives_default">True</property>
1011 + <child>
1012 + <object class="GtkImage" id="icon-image">
1013 + <property name="visible">True</property>
1014 + <property name="can_focus">False</property>
1015 + <property name="pixel_size">64</property>
1016 + <property name="icon_name">folder</property>
1017 + </object>
1018 + </child>
1019 + </object>
1020 + </child>
1021 + </object>
1022 + <packing>
1023 + <property name="expand">False</property>
1024 + <property name="fill">True</property>
1025 + <property name="position">0</property>
1026 + </packing>
1027 + </child>
1028 + <child>
1029 + <object class="GtkGrid" id="grid1">
1030 + <property name="visible">True</property>
1031 + <property name="can_focus">False</property>
1032 + <property name="row_spacing">6</property>
1033 + <property name="column_spacing">10</property>
1034 + <child>
1035 + <object class="GtkLabel" id="label2">
1036 + <property name="visible">True</property>
1037 + <property name="can_focus">False</property>
1038 + <property name="xalign">1</property>
1039 + <property name="label" translatable="yes">Name:</property>
1040 + <attributes>
1041 + <attribute name="weight" value="bold"/>
1042 + </attributes>
1043 + </object>
1044 + <packing>
1045 + <property name="left_attach">0</property>
1046 + <property name="top_attach">0</property>
1047 + <property name="width">1</property>
1048 + <property name="height">1</property>
1049 + </packing>
1050 + </child>
1051 + <child>
1052 + <object class="GtkLabel" id="label4">
1053 + <property name="visible">True</property>
1054 + <property name="can_focus">False</property>
1055 + <property name="xalign">1</property>
1056 + <property name="label" translatable="yes">Comment:</property>
1057 + <attributes>
1058 + <attribute name="weight" value="bold"/>
1059 + </attributes>
1060 + </object>
1061 + <packing>
1062 + <property name="left_attach">0</property>
1063 + <property name="top_attach">1</property>
1064 + <property name="width">1</property>
1065 + <property name="height">1</property>
1066 + </packing>
1067 + </child>
1068 + <child>
1069 + <object class="GtkEntry" id="name-entry">
1070 + <property name="visible">True</property>
1071 + <property name="can_focus">True</property>
1072 + <property name="has_focus">True</property>
1073 + <property name="invisible_char">●</property>
1074 + </object>
1075 + <packing>
1076 + <property name="left_attach">1</property>
1077 + <property name="top_attach">0</property>
1078 + <property name="width">1</property>
1079 + <property name="height">1</property>
1080 + </packing>
1081 + </child>
1082 + <child>
1083 + <object class="GtkEntry" id="comment-entry">
1084 + <property name="visible">True</property>
1085 + <property name="can_focus">True</property>
1086 + <property name="invisible_char">●</property>
1087 + </object>
1088 + <packing>
1089 + <property name="left_attach">1</property>
1090 + <property name="top_attach">1</property>
1091 + <property name="width">1</property>
1092 + <property name="height">1</property>
1093 + </packing>
1094 + </child>
1095 + </object>
1096 + <packing>
1097 + <property name="expand">True</property>
1098 + <property name="fill">True</property>
1099 + <property name="pack_type">end</property>
1100 + <property name="position">1</property>
1101 + </packing>
1102 + </child>
1103 + </object>
1104 + <packing>
1105 + <property name="expand">True</property>
1106 + <property name="fill">True</property>
1107 + <property name="position">1</property>
1108 + </packing>
1109 + </child>
1110 + </object>
1111 + </child>
1112 + <action-widgets>
1113 + <action-widget response="-6">cancel</action-widget>
1114 + <action-widget response="-5">ok</action-widget>
1115 + </action-widgets>
1116 + </object>
1117 +</interface>
1118 \ No newline at end of file
1119 diff --git a/files/usr/lib/cinnamon-menu-editor/launcher-editor.ui b/files/usr/lib/cinnamon-menu-editor/launcher-editor.ui
1120 new file mode 100644
1121 index 0000000..a643c63
1122 --- /dev/null
1123 +++ b/files/usr/lib/cinnamon-menu-editor/launcher-editor.ui
1124 @@ -0,0 +1,252 @@
1125 +<?xml version="1.0" encoding="UTF-8"?>
1126 +<interface>
1127 + <!-- interface-requires gtk+ 3.0 -->
1128 + <object class="GtkDialog" id="editor">
1129 + <property name="can_focus">False</property>
1130 + <property name="border_width">4</property>
1131 + <property name="title" translatable="yes">Launcher Properties</property>
1132 + <property name="modal">True</property>
1133 + <property name="type_hint">dialog</property>
1134 + <child internal-child="vbox">
1135 + <object class="GtkBox" id="dialog-box">
1136 + <property name="can_focus">False</property>
1137 + <property name="orientation">vertical</property>
1138 + <property name="spacing">4</property>
1139 + <child internal-child="action_area">
1140 + <object class="GtkButtonBox" id="dialog-action_area">
1141 + <property name="can_focus">False</property>
1142 + <property name="layout_style">end</property>
1143 + <child>
1144 + <object class="GtkButton" id="cancel">
1145 + <property name="label">gtk-cancel</property>
1146 + <property name="visible">True</property>
1147 + <property name="can_focus">True</property>
1148 + <property name="receives_default">True</property>
1149 + <property name="use_stock">True</property>
1150 + </object>
1151 + <packing>
1152 + <property name="expand">False</property>
1153 + <property name="fill">True</property>
1154 + <property name="position">0</property>
1155 + </packing>
1156 + </child>
1157 + <child>
1158 + <object class="GtkButton" id="ok">
1159 + <property name="label">gtk-ok</property>
1160 + <property name="visible">True</property>
1161 + <property name="can_focus">True</property>
1162 + <property name="receives_default">True</property>
1163 + <property name="use_stock">True</property>
1164 + </object>
1165 + <packing>
1166 + <property name="expand">False</property>
1167 + <property name="fill">True</property>
1168 + <property name="position">1</property>
1169 + </packing>
1170 + </child>
1171 + </object>
1172 + <packing>
1173 + <property name="expand">False</property>
1174 + <property name="fill">True</property>
1175 + <property name="pack_type">end</property>
1176 + <property name="position">0</property>
1177 + </packing>
1178 + </child>
1179 + <child>
1180 + <object class="GtkBox" id="hbox">
1181 + <property name="visible">True</property>
1182 + <property name="can_focus">False</property>
1183 + <property name="spacing">10</property>
1184 + <child>
1185 + <object class="GtkAlignment" id="alignment1">
1186 + <property name="visible">True</property>
1187 + <property name="can_focus">False</property>
1188 + <property name="xalign">1</property>
1189 + <property name="yalign">0</property>
1190 + <property name="yscale">0</property>
1191 + <child>
1192 + <object class="GtkButton" id="icon-button">
1193 + <property name="visible">True</property>
1194 + <property name="can_focus">True</property>
1195 + <property name="receives_default">True</property>
1196 + <child>
1197 + <object class="GtkImage" id="icon-image">
1198 + <property name="visible">True</property>
1199 + <property name="can_focus">False</property>
1200 + <property name="pixel_size">64</property>
1201 + <property name="icon_name">gnome-panel-launcher</property>
1202 + </object>
1203 + </child>
1204 + </object>
1205 + </child>
1206 + </object>
1207 + <packing>
1208 + <property name="expand">False</property>
1209 + <property name="fill">True</property>
1210 + <property name="position">0</property>
1211 + </packing>
1212 + </child>
1213 + <child>
1214 + <object class="GtkGrid" id="grid1">
1215 + <property name="visible">True</property>
1216 + <property name="can_focus">False</property>
1217 + <property name="row_spacing">6</property>
1218 + <property name="column_spacing">10</property>
1219 + <child>
1220 + <object class="GtkLabel" id="label2">
1221 + <property name="visible">True</property>
1222 + <property name="can_focus">False</property>
1223 + <property name="xalign">1</property>
1224 + <property name="label" translatable="yes">Name:</property>
1225 + <attributes>
1226 + <attribute name="weight" value="bold"/>
1227 + </attributes>
1228 + </object>
1229 + <packing>
1230 + <property name="left_attach">0</property>
1231 + <property name="top_attach">0</property>
1232 + <property name="width">1</property>
1233 + <property name="height">1</property>
1234 + </packing>
1235 + </child>
1236 + <child>
1237 + <object class="GtkLabel" id="label3">
1238 + <property name="visible">True</property>
1239 + <property name="can_focus">False</property>
1240 + <property name="xalign">1</property>
1241 + <property name="label" translatable="yes">Command:</property>
1242 + <attributes>
1243 + <attribute name="weight" value="bold"/>
1244 + </attributes>
1245 + </object>
1246 + <packing>
1247 + <property name="left_attach">0</property>
1248 + <property name="top_attach">1</property>
1249 + <property name="width">1</property>
1250 + <property name="height">1</property>
1251 + </packing>
1252 + </child>
1253 + <child>
1254 + <object class="GtkLabel" id="label4">
1255 + <property name="visible">True</property>
1256 + <property name="can_focus">False</property>
1257 + <property name="xalign">1</property>
1258 + <property name="label" translatable="yes">Comment:</property>
1259 + <attributes>
1260 + <attribute name="weight" value="bold"/>
1261 + </attributes>
1262 + </object>
1263 + <packing>
1264 + <property name="left_attach">0</property>
1265 + <property name="top_attach">2</property>
1266 + <property name="width">1</property>
1267 + <property name="height">1</property>
1268 + </packing>
1269 + </child>
1270 + <child>
1271 + <object class="GtkEntry" id="name-entry">
1272 + <property name="visible">True</property>
1273 + <property name="can_focus">True</property>
1274 + <property name="has_focus">True</property>
1275 + <property name="invisible_char">●</property>
1276 + </object>
1277 + <packing>
1278 + <property name="left_attach">1</property>
1279 + <property name="top_attach">0</property>
1280 + <property name="width">1</property>
1281 + <property name="height">1</property>
1282 + </packing>
1283 + </child>
1284 + <child>
1285 + <object class="GtkBox" id="command-box">
1286 + <property name="visible">True</property>
1287 + <property name="can_focus">False</property>
1288 + <property name="spacing">10</property>
1289 + <child>
1290 + <object class="GtkEntry" id="exec-entry">
1291 + <property name="visible">True</property>
1292 + <property name="can_focus">True</property>
1293 + <property name="invisible_char">●</property>
1294 + </object>
1295 + <packing>
1296 + <property name="expand">True</property>
1297 + <property name="fill">True</property>
1298 + <property name="position">0</property>
1299 + </packing>
1300 + </child>
1301 + <child>
1302 + <object class="GtkButton" id="exec-browse">
1303 + <property name="label" translatable="yes">Browse</property>
1304 + <property name="visible">True</property>
1305 + <property name="can_focus">True</property>
1306 + <property name="receives_default">True</property>
1307 + </object>
1308 + <packing>
1309 + <property name="expand">False</property>
1310 + <property name="fill">True</property>
1311 + <property name="position">1</property>
1312 + </packing>
1313 + </child>
1314 + </object>
1315 + <packing>
1316 + <property name="left_attach">1</property>
1317 + <property name="top_attach">1</property>
1318 + <property name="width">1</property>
1319 + <property name="height">1</property>
1320 + </packing>
1321 + </child>
1322 + <child>
1323 + <object class="GtkEntry" id="comment-entry">
1324 + <property name="visible">True</property>
1325 + <property name="can_focus">True</property>
1326 + <property name="invisible_char">●</property>
1327 + </object>
1328 + <packing>
1329 + <property name="left_attach">1</property>
1330 + <property name="top_attach">2</property>
1331 + <property name="width">1</property>
1332 + <property name="height">1</property>
1333 + </packing>
1334 + </child>
1335 + <child>
1336 + <object class="GtkCheckButton" id="terminal-check">
1337 + <property name="label" translatable="yes">Launch in Terminal?</property>
1338 + <property name="visible">True</property>
1339 + <property name="can_focus">True</property>
1340 + <property name="receives_default">False</property>
1341 + <property name="xalign">0</property>
1342 + <property name="draw_indicator">True</property>
1343 + </object>
1344 + <packing>
1345 + <property name="left_attach">1</property>
1346 + <property name="top_attach">3</property>
1347 + <property name="width">1</property>
1348 + <property name="height">1</property>
1349 + </packing>
1350 + </child>
1351 + <child>
1352 + <placeholder/>
1353 + </child>
1354 + </object>
1355 + <packing>
1356 + <property name="expand">True</property>
1357 + <property name="fill">True</property>
1358 + <property name="pack_type">end</property>
1359 + <property name="position">1</property>
1360 + </packing>
1361 + </child>
1362 + </object>
1363 + <packing>
1364 + <property name="expand">True</property>
1365 + <property name="fill">True</property>
1366 + <property name="position">1</property>
1367 + </packing>
1368 + </child>
1369 + </object>
1370 + </child>
1371 + <action-widgets>
1372 + <action-widget response="-6">cancel</action-widget>
1373 + <action-widget response="-5">ok</action-widget>
1374 + </action-widgets>
1375 + </object>
1376 +</interface>
1377 \ No newline at end of file