From b38a494111e028fdd6c70ebcd616e8b22978c0ea Mon Sep 17 00:00:00 2001 From: Md Arif <111168803+sabamdarif@users.noreply.github.com> Date: Thu, 2 Oct 2025 11:47:44 +0530 Subject: [PATCH] fix(x11/cinnamon): use-desktopappinfo-from-giounix-not-gio From:- https://github.com/linuxmint/cinnamon/pull/13091 this fixes #26742 --- ...-desktopappinfo-from-giounix-not-gio.patch | 57 +++++++++++++++++++ x11-packages/cinnamon/build.sh | 1 + 2 files changed, 58 insertions(+) create mode 100644 x11-packages/cinnamon/0016-use-desktopappinfo-from-giounix-not-gio.patch diff --git a/x11-packages/cinnamon/0016-use-desktopappinfo-from-giounix-not-gio.patch b/x11-packages/cinnamon/0016-use-desktopappinfo-from-giounix-not-gio.patch new file mode 100644 index 00000000000000..e2e7f7ec69132b --- /dev/null +++ b/x11-packages/cinnamon/0016-use-desktopappinfo-from-giounix-not-gio.patch @@ -0,0 +1,57 @@ +From:- https://github.com/linuxmint/cinnamon/pull/13091 + +--- 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 b487c161b..ef48da955 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()); + diff --git a/x11-packages/cinnamon/build.sh b/x11-packages/cinnamon/build.sh index 6b49a146385e60..c49ae547da6a85 100644 --- a/x11-packages/cinnamon/build.sh +++ b/x11-packages/cinnamon/build.sh @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Cinnamon shell" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION="6.4.13" +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL="https://github.com/linuxmint/cinnamon/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz" TERMUX_PKG_SHA256=32de89ebd195ea27d9a220715e70c65664058d3e89a380f83addc07c81692d2d TERMUX_PKG_AUTO_UPDATE=true