Skip to content

Commit e40c404

Browse files
committed
js: Use DesktopAppInfo form GioUnix, not Gio
1 parent f5c5926 commit e40c404

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

files/usr/share/cinnamon/cinnamon-settings/modules/cs_default.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,10 @@ def __init__(self):
307307

308308
while self.this_item is not None and count_up < len(apps):
309309
self.this_item = apps[count_up]
310-
cat_val = Gio.DesktopAppInfo.get_categories(self.this_item)
311-
exec_val = Gio.DesktopAppInfo.get_string(self.this_item, "Exec")
312-
name_val = Gio.DesktopAppInfo.get_string(self.this_item, "Name")
313-
icon_val = Gio.DesktopAppInfo.get_string(self.this_item, "Icon")
310+
cat_val = GioUnix.DesktopAppInfo.get_categories(self.this_item)
311+
exec_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Exec")
312+
name_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Name")
313+
icon_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Icon")
314314
# terminals don't have mime types, so we check for "TerminalEmulator" under the "Category" key in desktop files
315315
if cat_val is not None and "TerminalEmulator" in cat_val:
316316
# this crazy if statement makes sure remaining desktop file info is not empty, then prevents root terminals from showing, then prevents repeating terminals from trying to being added which leave a blank space and Gtk-WARNING's
@@ -364,11 +364,11 @@ def __init__(self):
364364

365365
while self.this_item is not None and count_up < len(apps):
366366
self.this_item = apps[count_up]
367-
cat_val = Gio.DesktopAppInfo.get_categories(self.this_item)
368-
exec_val = Gio.DesktopAppInfo.get_string(self.this_item, "Exec")
369-
name_val = Gio.DesktopAppInfo.get_string(self.this_item, "Name")
370-
icon_val = Gio.DesktopAppInfo.get_string(self.this_item, "Icon")
371-
comment_val = Gio.DesktopAppInfo.get_string(self.this_item, "Comment")
367+
cat_val = GioUnix.DesktopAppInfo.get_categories(self.this_item)
368+
exec_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Exec")
369+
name_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Name")
370+
icon_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Icon")
371+
comment_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Comment")
372372
#calculators don't have mime types, so we check for "Calculator" under the "Category" key in desktop files
373373
if (cat_val is not None and "Calculator" in cat_val) or \
374374
(exec_val is not None and "alculator" in exec_val.lower()) or \

js/ui/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878

7979
const Clutter = imports.gi.Clutter;
8080
const Gio = imports.gi.Gio;
81+
const GioUnix = imports.gi.GioUnix;
8182
const GLib = imports.gi.GLib;
8283
const Gtk = imports.gi.Gtk;
8384
const Mainloop = imports.mainloop;
@@ -312,7 +313,7 @@ function start() {
312313
// Chain up async errors reported from C
313314
global.connect('notify-error', function (global, msg, detail) { notifyError(msg, detail); });
314315

315-
Gio.DesktopAppInfo.set_desktop_env('X-Cinnamon');
316+
GioUnix.DesktopAppInfo.set_desktop_env('X-Cinnamon');
316317

317318
Clutter.get_default_backend().set_input_method(new InputMethod.InputMethod());
318319

0 commit comments

Comments
 (0)