From 46b0585ab47b44071040000bbbb78fbfe21cd492 Mon Sep 17 00:00:00 2001 From: elimat <> Date: Nov 09 2023 20:49:21 +0000 Subject: Update tilix to version 1.9.6 / rev 28 via SR 1124435 https://build.opensuse.org/request/show/1124435 by user elimat + anag+factory --- diff --git a/.files b/.files index eb473cb..834235b 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index 6ea36f9..5559981 100644 --- a/.rev +++ b/.rev @@ -282,4 +282,12 @@ <comment></comment> <requestid>1082707</requestid> </revision> + <revision rev="28" vrev="1"> + <srcmd5>9b0f8d4fd1497bd3fc915b2396119892</srcmd5> + <version>1.9.6</version> + <time>1699562162</time> + <user>anag+factory</user> + <comment></comment> + <requestid>1124435</requestid> + </revision> </revisionlist> diff --git a/b027797.patch b/b027797.patch deleted file mode 100644 index f429bb5..0000000 --- a/b027797.patch +++ /dev/null @@ -1,117 +0,0 @@ -From b02779737997a02b98b690e6f8478d28d5e931a5 Mon Sep 17 00:00:00 2001 -From: Matthias Klumpp <matthias@tenstral.net> -Date: Thu, 20 Apr 2023 02:09:36 +0200 -Subject: [PATCH] Replace std.xml with GMarkup-based parser - -This is quite ugly, but using GMarkup avoids us introducing another -hard-to-maintain dependency for a tiny task. - -(It would either be a better D XML parsing library or undeaD to -resurrect the removed standard-library module, both options are pretty -unattractive. GMarkup will not go away anytime soon) - -Resolves: #2151 ---- - source/gx/tilix/prefeditor/prefdialog.d | 73 +++++++++++++++++++------ - 1 file changed, 55 insertions(+), 18 deletions(-) - -diff --git a/source/gx/tilix/prefeditor/prefdialog.d b/source/gx/tilix/prefeditor/prefdialog.d -index a5c3ce37..505096ec 100644 ---- a/source/gx/tilix/prefeditor/prefdialog.d -+++ b/source/gx/tilix/prefeditor/prefdialog.d -@@ -947,9 +947,10 @@ private: - * pre GTK 3.20 - */ - void loadLocalizedShortcutLabels() { -- //Clear associative arrays since clear method isn't compatible with LDC -- labels = null; -- prefixes = null; -+ import glib.SimpleXML : SimpleXML; -+ import glib.c.types : GMarkupParser, GMarkupParseContext, GMarkupParseFlags; -+ import std.string : fromStringz; -+ import std.array : empty; - - string ui = getResource(SHORTCUT_UI_RESOURCE); - if (ui.length == 0) { -@@ -957,22 +958,58 @@ private: - return; - } - -- import std.xml: DocumentParser, ElementParser, Element, XMLException; -+ struct ParseHelper { -+ string currentId = ""; -+ bool addNextText = false; -+ string[string] labels; -+ } - -- try { -- DocumentParser parser = new DocumentParser(ui); -- parser.onStartTag["object"] = (ElementParser xml) { -- if (xml.tag.attr["class"] == "GtkShortcutsShortcut") { -- string id = xml.tag.attr["id"]; -- xml.onEndTag["property"] = (in Element e) { -- if (e.tag.attr["name"] == "title") { -- labels[id] = C_(SHORTCUT_LOCALIZATION_CONTEXT, e.text); -- } -- }; -- xml.parse(); -+ GMarkupParser parseConfig; -+ parseConfig.startElement = function void(GMarkupParseContext* context, -+ const(char)* elementNameC, -+ char** attributeNames, -+ char** attributeValues, -+ void* userData, -+ GError** err) { -+ auto helper = cast(ParseHelper*)userData; -+ const elementName = elementNameC.fromStringz; -+ if (elementName == "object") { -+ string[string] attrs; -+ for (uint i = 0; attributeNames[i] != null; i++) -+ attrs[attributeNames[i].fromStringz.to!string] = attributeValues[i].fromStringz.to!string; -+ -+ if (attrs.get("class", "") == "GtkShortcutsShortcut") -+ helper.currentId = attrs["id"]; -+ -+ } else if (elementName == "property" && !helper.currentId.empty) { -+ for (uint i = 0; attributeNames[i] != null; i++) { -+ if (attributeNames[i].fromStringz == "name" && attributeValues[i].fromStringz == "title") { -+ helper.addNextText = true; -+ break; -+ } - } -- }; -- parser.parse(); -+ } -+ }; -+ parseConfig.text = function void(GMarkupParseContext* context, -+ const(char)* text, -+ size_t textLen, -+ void* userData, -+ GError** err) { -+ auto helper = cast(ParseHelper*)userData; -+ if (!helper.addNextText) -+ return; -+ -+ helper.labels[helper.currentId] = C_(SHORTCUT_LOCALIZATION_CONTEXT, text.fromStringz.to!string); -+ helper.currentId = null; -+ helper.addNextText = false; -+ }; -+ -+ try { -+ ParseHelper helper; -+ auto parser = new SimpleXML(&parseConfig, GMarkupParseFlags.PREFIX_ERROR_POSITION, &helper, null); -+ parser.parse(ui, ui.length); -+ labels = helper.labels; -+ - // While you could use sections to get prefixes, not all sections are there - // and it's not inutituve from a localization perspective. Just add them manually - prefixes[ACTION_PREFIX_WIN] = C_(SHORTCUT_LOCALIZATION_CONTEXT, "Window"); -@@ -980,7 +1017,7 @@ private: - prefixes[ACTION_PREFIX_TERMINAL] = C_(SHORTCUT_LOCALIZATION_CONTEXT, "Terminal"); - prefixes[ACTION_PREFIX_SESSION] = C_(SHORTCUT_LOCALIZATION_CONTEXT, "Session"); - prefixes[ACTION_PREFIX_NAUTILUS] = C_(SHORTCUT_LOCALIZATION_CONTEXT, "Nautilus"); -- } catch (XMLException e) { -+ } catch (Exception e) { - error("Failed to parse shortcuts.ui", e); - } - } diff --git a/tilix-1.9.5.tar.gz b/tilix-1.9.5.tar.gz deleted file mode 120000 index 60bff59..0000000 --- a/tilix-1.9.5.tar.gz +++ /dev/null @@ -1 +0,0 @@ -/ipfs/bafybeibq4njxgxeaqsnlluj4k3cowmp7m5h3wyhkpdjpfav2geov6evwum \ No newline at end of file diff --git a/tilix-1.9.6.tar.gz b/tilix-1.9.6.tar.gz new file mode 120000 index 0000000..2e288a2 --- /dev/null +++ b/tilix-1.9.6.tar.gz @@ -0,0 +1 @@ +/ipfs/bafybeicksqtkn6ru5lhmygbjyulk24eoeoyurx653hi3abwfttnqmcvbza \ No newline at end of file diff --git a/tilix-nautilus-43-compat.patch b/tilix-nautilus-43-compat.patch deleted file mode 100644 index 31c94d9..0000000 --- a/tilix-nautilus-43-compat.patch +++ /dev/null @@ -1,162 +0,0 @@ -From 5c28f1e5757409a44f5d22e706151c8a3846b2fe Mon Sep 17 00:00:00 2001 -From: Jeremy Bicha <jeremy.bicha@canonical.com> -Date: Thu, 1 Sep 2022 10:05:28 -0400 -Subject: [PATCH 1/2] nautilus: Don't import a specific version - -This isn't needed since -https://gitlab.gnome.org/GNOME/nautilus-python/-/commit/8c88de8da42 - -And interferes with being able to use this extension -on Nautilus 43+ ---- - data/nautilus/open-tilix.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/data/nautilus/open-tilix.py b/data/nautilus/open-tilix.py -index 16a9b97c..21a1223d 100644 ---- a/data/nautilus/open-tilix.py -+++ b/data/nautilus/open-tilix.py -@@ -14,7 +14,6 @@ - - from gi import require_version - require_version('Gtk', '3.0') --require_version('Nautilus', '3.0') - from gi.repository import Gio, GObject, Gtk, Nautilus - - - -From dd68daaa8b7fdeae1b1a0b7dde337dca4e9d2e2b Mon Sep 17 00:00:00 2001 -From: Jeremy Bicha <jeremy.bicha@canonical.com> -Date: Fri, 9 Sep 2022 21:51:05 -0400 -Subject: [PATCH 2/2] nautilus: Add compatibility with Nautilus 43 - -Nautilus 43 and nautilus-python 4 have made major changes to the API - -Nautilus.LocationWidgetProvider has been dropped from the API -without a replacement - -https://gnome.pages.gitlab.gnome.org/nautilus-python/nautilus-python-migrating-to-4.html ---- - data/nautilus/open-tilix.py | 85 ++++++++++++++++++++----------------- - 1 file changed, 45 insertions(+), 40 deletions(-) - -diff --git a/data/nautilus/open-tilix.py b/data/nautilus/open-tilix.py -index 21a1223d..ac7c53c5 100644 ---- a/data/nautilus/open-tilix.py -+++ b/data/nautilus/open-tilix.py -@@ -12,9 +12,11 @@ - from urllib.parse import unquote, urlparse - - -+from gi.repository import Gio, GObject, Nautilus - from gi import require_version --require_version('Gtk', '3.0') --from gi.repository import Gio, GObject, Gtk, Nautilus -+if hasattr(Nautilus, "LocationWidgetProvider"): -+ require_version('Gtk', '3.0') -+ from gi.repository import Gtk - - - TERMINAL = "tilix" -@@ -34,43 +36,44 @@ def open_terminal_in_file(filename): - else: - call("{0} &".format(TERMINAL), shell=True) - -+# Nautilus 43 doesn't offer the LocationWidgetProvider any more -+if hasattr(Nautilus, "LocationWidgetProvider"): -+ class OpenTilixShortcutProvider(GObject.GObject, -+ Nautilus.LocationWidgetProvider): -+ -+ def __init__(self): -+ source = Gio.SettingsSchemaSource.get_default() -+ if source.lookup(TILIX_KEYBINDINGS, True): -+ self._gsettings = Gio.Settings.new(TILIX_KEYBINDINGS) -+ self._gsettings.connect("changed", self._bind_shortcut) -+ self._create_accel_group() -+ self._window = None -+ self._uri = None -+ -+ def _create_accel_group(self): -+ self._accel_group = Gtk.AccelGroup() -+ shortcut = self._gsettings.get_string(GSETTINGS_OPEN_TERMINAL) -+ key, mod = Gtk.accelerator_parse(shortcut) -+ self._accel_group.connect(key, mod, Gtk.AccelFlags.VISIBLE, -+ self._open_terminal) -+ -+ def _bind_shortcut(self, gsettings, key): -+ if key == GSETTINGS_OPEN_TERMINAL: -+ self._accel_group.disconnect(self._open_terminal) -+ self._create_accel_group() -+ -+ def _open_terminal(self, *args): -+ filename = unquote(self._uri[7:]) -+ open_terminal_in_file(filename) - --class OpenTilixShortcutProvider(GObject.GObject, -- Nautilus.LocationWidgetProvider): -- -- def __init__(self): -- source = Gio.SettingsSchemaSource.get_default() -- if source.lookup(TILIX_KEYBINDINGS, True): -- self._gsettings = Gio.Settings.new(TILIX_KEYBINDINGS) -- self._gsettings.connect("changed", self._bind_shortcut) -- self._create_accel_group() -- self._window = None -- self._uri = None -- -- def _create_accel_group(self): -- self._accel_group = Gtk.AccelGroup() -- shortcut = self._gsettings.get_string(GSETTINGS_OPEN_TERMINAL) -- key, mod = Gtk.accelerator_parse(shortcut) -- self._accel_group.connect(key, mod, Gtk.AccelFlags.VISIBLE, -- self._open_terminal) -- -- def _bind_shortcut(self, gsettings, key): -- if key == GSETTINGS_OPEN_TERMINAL: -- self._accel_group.disconnect(self._open_terminal) -- self._create_accel_group() -- -- def _open_terminal(self, *args): -- filename = unquote(self._uri[7:]) -- open_terminal_in_file(filename) -- -- def get_widget(self, uri, window): -- self._uri = uri -- if self._window: -- self._window.remove_accel_group(self._accel_group) -- if self._gsettings: -- window.add_accel_group(self._accel_group) -- self._window = window -- return None -+ def get_widget(self, uri, window): -+ self._uri = uri -+ if self._window: -+ self._window.remove_accel_group(self._accel_group) -+ if self._gsettings: -+ window.add_accel_group(self._accel_group) -+ self._window = window -+ return None - - - class OpenTilixExtension(GObject.GObject, Nautilus.MenuProvider): -@@ -99,7 +102,8 @@ def _menu_activate_cb(self, menu, file_): - def _menu_background_activate_cb(self, menu, file_): - self._open_terminal(file_) - -- def get_file_items(self, window, files): -+ def get_file_items(self, *args): -+ files = args[-1] - if len(files) != 1: - return - items = [] -@@ -124,7 +128,8 @@ def get_file_items(self, window, files): - - return items - -- def get_background_items(self, window, file_): -+ def get_background_items(self, *args): -+ file_ = args[-1] - items = [] - if file_.get_uri_scheme() in REMOTE_URI_SCHEME: - item = Nautilus.MenuItem(name='NautilusPython::open_bg_remote_item', - diff --git a/tilix.changes b/tilix.changes index 48d92a6..eb3b4b9 100644 --- a/tilix.changes +++ b/tilix.changes @@ -1,4 +1,31 @@ ------------------------------------------------------------------- +Thu Nov 9 10:14:33 UTC 2023 - Emiliano Langella <emiliano.langella@suse.com> + +- Update to version 1.9.6 + Features: + * Add close button to search box + * Replace variables in custom link commands + * Follow system color-scheme for default theme-variant + Bugfixes: + * nautilus: Don't import a specific version + * nautilus: Add compatibility with Nautilus 43 + * nautilus: Avoid shell injection in open-tilix plugin + * Drop manpage country names + * Replace std.xml with GMarkup-based parser + * icon: Fix up prompt pictogram alignment + * Fix GLib critical warnings on startup + Miscellaneous: + * Change Gnome to GNOME + * Replaced icon with more proportional one + * Update to GtkD 3.10.0 + * ci: Run Ubuntu builds in container as well + * Change label of "view shortcuts" action + * Clarify tooltip of "reset to default" button for keyboard shortcuts +- drop patches fixed in release: + * tilix-nautilus-43-compat.patch + * b027797.patch + +------------------------------------------------------------------- Tue Apr 25 07:35:16 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com> - Add b027797.patch: Replace std.xml with GMarkup-based parser. diff --git a/tilix.spec b/tilix.spec index a4d651b..225c0fc 100644 --- a/tilix.spec +++ b/tilix.spec @@ -19,7 +19,7 @@ # %define _lto_cflags %{nil} Name: tilix -Version: 1.9.5 +Version: 1.9.6 Release: 0 Summary: A tiling terminal emulator based on GTK+ 3 License: LGPL-3.0-only AND MPL-2.0 @@ -34,10 +34,6 @@ Patch0: gnome-ssh-agent.patch # PATCH-FIX-OPENSUSE 0001-Don-t-generate-appstream-meta-data-on-older-versions.patch -- Provide appdata.xml instead of generating one since we have to old version of appstream in Leap releases Patch1: 0001-Don-t-generate-appstream-meta-data-on-older-versions.patch %endif -# PATCH-FIX-UPSTREAM tilix-nautilus-43-compat.patch gh#gnunn1/tilix#2115 badshah400@gmail.com -- nautilus: Add compatibility with Nautilus 43 -Patch2: tilix-nautilus-43-compat.patch -# PATCH-FIX-UPSTREAM b027797.patch -- Replace std.xml with GMarkup-based parser -Patch3: %{url}/commit/b027797.patch BuildRequires: AppStream BuildRequires: appstream-glib BuildRequires: desktop-file-utils @@ -108,7 +104,8 @@ install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/metainfo/com.gexperts.Tilix.ap %find_lang %{name} %{?no_lang_C} --with-man # Some localized man directories are not provided by filesystem package yet -for locale in uk en_GB hr nb_NO oc pt_PT ro sr tr zh_Hant; do +#for locale in uk en_GB hr nb_NO oc pt_PT ro sr tr zh_Hant; do +for locale in uk hr oc ro sr tr zh_Hant; do echo "%%dir %{_mandir}/${locale}" >> %{name}.lang echo "%%dir %{_mandir}/${locale}/man1" >> %{name}.lang done