1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
Date: Fri, 12 Sep 2025 01:01:27 +0200
Subject: js: Use DesktopAppInfo form GioUnix, not Gio
Origin: https://github.com/linuxmint/cinnamon/pull/13091
---
.../cinnamon/cinnamon-settings/modules/cs_default.py | 18 +++++++++---------
js/ui/main.js | 3 ++-
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_default.py b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_default.py
index 4c69191..511edb4 100755
--- a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_default.py
+++ b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_default.py
@@ -307,10 +307,10 @@ class DefaultTerminalButton(Gtk.AppChooserButton):
while self.this_item is not None and count_up < len(apps):
self.this_item = apps[count_up]
- cat_val = Gio.DesktopAppInfo.get_categories(self.this_item)
- exec_val = Gio.DesktopAppInfo.get_string(self.this_item, "Exec")
- name_val = Gio.DesktopAppInfo.get_string(self.this_item, "Name")
- icon_val = Gio.DesktopAppInfo.get_string(self.this_item, "Icon")
+ cat_val = GioUnix.DesktopAppInfo.get_categories(self.this_item)
+ exec_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Exec")
+ name_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Name")
+ icon_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Icon")
# terminals don't have mime types, so we check for "TerminalEmulator" under the "Category" key in desktop files
if cat_val is not None and "TerminalEmulator" in cat_val:
# 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 @@ class DefaultCalculatorButton(Gtk.AppChooserButton):
while self.this_item is not None and count_up < len(apps):
self.this_item = apps[count_up]
- cat_val = Gio.DesktopAppInfo.get_categories(self.this_item)
- exec_val = Gio.DesktopAppInfo.get_string(self.this_item, "Exec")
- name_val = Gio.DesktopAppInfo.get_string(self.this_item, "Name")
- icon_val = Gio.DesktopAppInfo.get_string(self.this_item, "Icon")
- comment_val = Gio.DesktopAppInfo.get_string(self.this_item, "Comment")
+ cat_val = GioUnix.DesktopAppInfo.get_categories(self.this_item)
+ exec_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Exec")
+ name_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Name")
+ icon_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Icon")
+ comment_val = GioUnix.DesktopAppInfo.get_string(self.this_item, "Comment")
#calculators don't have mime types, so we check for "Calculator" under the "Category" key in desktop files
if (cat_val is not None and "Calculator" in cat_val) or \
(exec_val is not None and "alculator" in exec_val.lower()) or \
diff --git a/js/ui/main.js b/js/ui/main.js
index b487c16..ef48da9 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -78,6 +78,7 @@
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;
+const GioUnix = imports.gi.GioUnix;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Mainloop = imports.mainloop;
@@ -312,7 +313,7 @@ function start() {
// Chain up async errors reported from C
global.connect('notify-error', function (global, msg, detail) { notifyError(msg, detail); });
- Gio.DesktopAppInfo.set_desktop_env('X-Cinnamon');
+ GioUnix.DesktopAppInfo.set_desktop_env('X-Cinnamon');
Clutter.get_default_backend().set_input_method(new InputMethod.InputMethod());
|