nautilus-open-any-terminal: 0.4.0 -> 0.5.0

This commit is contained in:
Felix Buehler 2024-01-22 23:08:55 +01:00
parent 55fe94e7cb
commit fb01653b13
2 changed files with 16 additions and 14 deletions

View file

@ -14,13 +14,14 @@
python3.pkgs.buildPythonPackage rec {
pname = "nautilus-open-any-terminal";
version = "0.4.0";
version = "0.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Stunkymonkey";
repo = pname;
rev = version;
sha256 = "sha256-EAI60Mw+OTPfjOS6lkGMul7QvTR7NXyNfevWY2JP1yI=";
hash = "sha256-fcTbt8O/7KEme5+GlDD7hMMcE2RaYqFdfojzJ1KhnA0=";
};
patches = [ ./hardcode-gsettings.patch ];
@ -30,6 +31,7 @@ python3.pkgs.buildPythonPackage rec {
gobject-introspection
pkg-config
wrapGAppsHook
python3.pkgs.setuptools
];
buildInputs = [
@ -43,7 +45,7 @@ python3.pkgs.buildPythonPackage rec {
];
postPatch = ''
substituteInPlace nautilus_open_any_terminal/open_any_terminal_extension.py \
substituteInPlace nautilus_open_any_terminal/nautilus_open_any_terminal.py \
--subst-var-by gsettings_path ${glib.makeSchemaPath "$out" "$name"}
'';

View file

@ -1,22 +1,22 @@
diff --git a/nautilus_open_any_terminal/open_any_terminal_extension.py b/nautilus_open_any_terminal/open_any_terminal_extension.py
diff --git a/nautilus_open_any_terminal/nautilus_open_any_terminal.py b/nautilus_open_any_terminal/nautilus_open_any_terminal.py
index b02a995..a616399 100644
--- a/nautilus_open_any_terminal/open_any_terminal_extension.py
+++ b/nautilus_open_any_terminal/open_any_terminal_extension.py
@@ -205,9 +205,10 @@ def set_terminal_args(*args):
class OpenAnyTerminalShortcutProvider(GObject.GObject, Nautilus.LocationWidgetProvider):
--- a/nautilus_open_any_terminal/nautilus_open_any_terminal.py
+++ b/nautilus_open_any_terminal/nautilus_open_any_terminal.py
@@ -228,9 +228,10 @@ def set_terminal_args(*args):
"""Provide keyboard shortcuts for opening terminals in Nautilus."""
def __init__(self):
- source = Gio.SettingsSchemaSource.get_default()
- if source.lookup(GSETTINGS_PATH, True):
- gsettings_source = Gio.SettingsSchemaSource.get_default()
- if gsettings_source.lookup(GSETTINGS_PATH, True):
- self._gsettings = Gio.Settings.new(GSETTINGS_PATH)
+ source = Gio.SettingsSchemaSource.new_from_directory("@gsettings_path@", Gio.SettingsSchemaSource.get_default(), True)
+ gsettings_source = Gio.SettingsSchemaSource.new_from_directory("@gsettings_path@", Gio.SettingsSchemaSource.get_default(), True)
+ if True:
+ _schema = source.lookup(GSETTINGS_PATH, False)
+ _schema = gsettings_source.lookup(GSETTINGS_PATH, False)
+ self._gsettings = Gio.Settings.new_full(_schema, None, None);
self._gsettings.connect("changed", self._bind_shortcut)
self._create_accel_group()
self._window = None
@@ -232,9 +233,10 @@ class OpenAnyTerminalExtension(GObject.GObject, Nautilus.MenuProvider):
@@ -326,9 +327,10 @@ class OpenAnyTerminalExtension(GObject.GObject, Nautilus.MenuProvider):
return items