3
0
Fork 0
forked from mirrors/nixpkgs

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 { python3.pkgs.buildPythonPackage rec {
pname = "nautilus-open-any-terminal"; pname = "nautilus-open-any-terminal";
version = "0.4.0"; version = "0.5.0";
pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Stunkymonkey"; owner = "Stunkymonkey";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "sha256-EAI60Mw+OTPfjOS6lkGMul7QvTR7NXyNfevWY2JP1yI="; hash = "sha256-fcTbt8O/7KEme5+GlDD7hMMcE2RaYqFdfojzJ1KhnA0=";
}; };
patches = [ ./hardcode-gsettings.patch ]; patches = [ ./hardcode-gsettings.patch ];
@ -30,6 +31,7 @@ python3.pkgs.buildPythonPackage rec {
gobject-introspection gobject-introspection
pkg-config pkg-config
wrapGAppsHook wrapGAppsHook
python3.pkgs.setuptools
]; ];
buildInputs = [ buildInputs = [
@ -43,7 +45,7 @@ python3.pkgs.buildPythonPackage rec {
]; ];
postPatch = '' 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"} --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 index b02a995..a616399 100644
--- a/nautilus_open_any_terminal/open_any_terminal_extension.py --- a/nautilus_open_any_terminal/nautilus_open_any_terminal.py
+++ b/nautilus_open_any_terminal/open_any_terminal_extension.py +++ b/nautilus_open_any_terminal/nautilus_open_any_terminal.py
@@ -205,9 +205,10 @@ def set_terminal_args(*args): @@ -228,9 +228,10 @@ def set_terminal_args(*args):
"""Provide keyboard shortcuts for opening terminals in Nautilus."""
class OpenAnyTerminalShortcutProvider(GObject.GObject, Nautilus.LocationWidgetProvider):
def __init__(self): def __init__(self):
- source = Gio.SettingsSchemaSource.get_default() - gsettings_source = Gio.SettingsSchemaSource.get_default()
- if source.lookup(GSETTINGS_PATH, True): - if gsettings_source.lookup(GSETTINGS_PATH, True):
- self._gsettings = Gio.Settings.new(GSETTINGS_PATH) - 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: + 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 = Gio.Settings.new_full(_schema, None, None);
self._gsettings.connect("changed", self._bind_shortcut) self._gsettings.connect("changed", self._bind_shortcut)
self._create_accel_group() self._create_accel_group()
self._window = None 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 return items