From 688a141df6d374ace6dc87eacfbd973c0650d1d0 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Nov 08 2023 21:15:56 +0000 Subject: Update to 1.9.6 --- diff --git a/.gitignore b/.gitignore index 4647769..eb61d19 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ /tilix-1.9.3.tar.gz /tilix-1.9.4.tar.gz /tilix-1.9.5.tar.gz -/undeaD-1.1.8.tar.gz +/tilix-1.9.6.tar.gz diff --git a/2115.patch b/2115.patch deleted file mode 100644 index f23aacc..0000000 --- a/2115.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 5c28f1e5757409a44f5d22e706151c8a3846b2fe Mon Sep 17 00:00:00 2001 -From: Jeremy Bicha -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 -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/sources b/sources index 8dc95b7..417364f 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (tilix-1.9.5.tar.gz) = c44872f68f27f4001e145da7a18109131fb681f3c73118d3c89a7a4ffe3279d7fed6d1304bdc090a4ea21e70bbe6ec3ad2c1da8f5b2f3be94ba6fbf0431fc404 -SHA512 (undeaD-1.1.8.tar.gz) = c122d968ff89e3ddf84af4bbab418ed4e98a75863ea4f0f58661aa06145232718c7e43bc5db5cd0d5e1cf56ce5ebb6be8ef8e595b69cdde8f3387d2f3203bbaa +SHA512 (tilix-1.9.6.tar.gz) = 2d51e8c0203863573e52c7bf68a66ba4ec58f929ecebf90bb68bae3f15d9f745f956fc524b7dd23d1804d5130dd0bf39ff834d262042375448e53714021338f6 diff --git a/tilix.spec b/tilix.spec index f37b1f1..967b92e 100644 --- a/tilix.spec +++ b/tilix.spec @@ -9,8 +9,8 @@ %undefine _hardened_build Name: tilix -Version: 1.9.5 -Release: 12%{?dist} +Version: 1.9.6 +Release: 1%{?dist} Summary: Tiling terminal emulator # The tilix source code is MPL-2.0, @@ -24,16 +24,6 @@ Summary: Tiling terminal emulator License: MPL-2.0 AND GPL-2.0-or-later AND LGPL-3.0-or-later AND LGPL-3.0-only AND GPL-3.0-or-later AND (LGPL-3.0-or-later OR CC-BY-SA-3.0) URL: https://github.com/gnunn1/tilix Source0: https://github.com/gnunn1/tilix/archive/%{version}/%{name}-%{version}.tar.gz -%global bundled_undeaD_version 1.1.8 -Source1: https://github.com/dlang/undeaD/archive/refs/tags/v%{bundled_undeaD_version}/undeaD-%{bundled_undeaD_version}.tar.gz - -# Fix compatibility with Nautilus 43 -# https://github.com/gnunn1/tilix/pull/2115 -Patch: 2115.patch -# Fix the build with ldc 1.31+ that removed xml from std -# https://github.com/gnunn1/tilix/issues/2151 -# Patch from https://github.com/archlinux/svntogit-community/tree/master/tilix/trunk -Patch: undeaD-xml.patch ExclusiveArch: %{ldc_arches} @@ -62,8 +52,6 @@ Requires: gtkd%{?_isa} >= %{gtkd_version} Obsoletes: terminix < 1.5.4 Provides: terminix = %{version}-%{release} -Provides: bundled(undeaD) = %{bundled_undeaD_version} - %description Tilix is a tiling terminal emulator with the following features: @@ -100,7 +88,6 @@ option to the right-click context menu in Nautilus. %prep %autosetup -p1 -%autosetup -p1 -D -a 1 %if 0%{?flatpak} sed -i -e "/^Exec=/ s|/usr/bin|%{_bindir}|" data/dbus/com.gexperts.Tilix.service @@ -159,6 +146,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/com.gexperts.Tilix %changelog +* Wed Nov 08 2023 Kalev Lember - 1.9.6-1 +- Update to 1.9.6 + * Tue Oct 17 2023 Kalev Lember - 1.9.5-12 - Rebuilt for ldc 1.35 diff --git a/undeaD-xml.patch b/undeaD-xml.patch deleted file mode 100644 index 4ab262b..0000000 --- a/undeaD-xml.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/meson.build b/meson.build -index 79981a96..c7e9cc34 100644 ---- a/meson.build -+++ b/meson.build -@@ -7,7 +7,7 @@ project( - - compiler = meson.get_compiler('d') - if compiler.get_id() == 'llvm' -- d_extra_args = ['-vcolumns'] -+ d_extra_args = ['-vcolumns', '-I=../undeaD-1.1.8/src'] - d_link_args = [] - else - d_extra_args = [] -@@ -29,6 +29,7 @@ iconsdir = datadir / 'icons' / 'hicolor' - appdir = datadir / 'applications' - - tilix_sources = [ -+ 'undeaD-1.1.8/src/undead/xml.d', - 'source/gx/gtk/actions.d', - 'source/gx/gtk/cairo.d', - 'source/gx/gtk/clipboard.d', -diff --git a/source/gx/tilix/prefeditor/prefdialog.d b/source/gx/tilix/prefeditor/prefdialog.d -index a5c3ce37..9b94042f 100644 ---- a/source/gx/tilix/prefeditor/prefdialog.d -+++ b/source/gx/tilix/prefeditor/prefdialog.d -@@ -957,7 +957,7 @@ private: - return; - } - -- import std.xml: DocumentParser, ElementParser, Element, XMLException; -+ import undead.xml: DocumentParser, ElementParser, Element, XMLException; - - try { - DocumentParser parser = new DocumentParser(ui);