Merge pull request #194097 from Stunkymonkey/nautilus-open-any-terminal-0.4.0

nautilus-open-any-terminal: 0.3.0 -> 0.4.0
This commit is contained in:
Jan Tojnar 2022-10-03 17:29:55 +02:00 committed by GitHub
commit 6eec0e86a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 17 deletions

View File

@ -15,13 +15,13 @@
python3.pkgs.buildPythonPackage rec {
pname = "nautilus-open-any-terminal";
version = "0.3.0";
version = "0.4.0";
src = fetchFromGitHub {
owner = "Stunkymonkey";
repo = pname;
rev = version;
sha256 = "sha256-PF6DVpiAPL9NG4jK6wDqdqYw+26Nks/bGEbbaV/5aIs=";
sha256 = "sha256-EAI60Mw+OTPfjOS6lkGMul7QvTR7NXyNfevWY2JP1yI=";
};
patches = [ ./hardcode-gsettings.patch ];

View File

@ -2,20 +2,20 @@ diff --git a/nautilus_open_any_terminal/open_any_terminal_extension.py b/nautilu
index b02a995..a616399 100644
--- a/nautilus_open_any_terminal/open_any_terminal_extension.py
+++ b/nautilus_open_any_terminal/open_any_terminal_extension.py
@@ -125,9 +125,10 @@ def set_terminal_args(*args):
@@ -205,9 +205,10 @@ def set_terminal_args(*args):
class OpenAnyTerminalShortcutProvider(GObject.GObject, Nautilus.LocationWidgetProvider):
def __init__(self):
- source = Gio.SettingsSchemaSource.get_default()
- if 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)
+ if True:
+ _schema = 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
class OpenAnyTerminalShortcutProvider(GObject.GObject, Nautilus.LocationWidgetProvider):
def __init__(self):
- source = Gio.SettingsSchemaSource.get_default()
- if 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)
+ if True:
+ _schema = 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):
return items
@ -28,5 +28,4 @@ index b02a995..a616399 100644
+ _schema = source.lookup(GSETTINGS_PATH, False)
+ _gsettings = Gio.Settings.new_full(_schema, None, None);
_gsettings.connect("changed", set_terminal_args)
value = _gsettings.get_string(GSETTINGS_TERMINAL)
if value in TERM_PARAMS:
set_terminal_args()