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