Fix fallback for getting the current working directory
This fixes a regression introduced in 40ba659f6d
This commit is contained in:
parent
d6bb7bec97
commit
ff521c6117
|
@ -28,7 +28,7 @@ def get_default_cwd():
|
||||||
return(cwd)
|
return(cwd)
|
||||||
|
|
||||||
def get_pid_cwd():
|
def get_pid_cwd():
|
||||||
"""Determine an appropriate cwd function for the OS we are running on"""
|
"""Determine the cwd of the current process"""
|
||||||
return psutil.Process().as_dict()['cwd']
|
return psutil.Process().as_dict()['cwd']
|
||||||
|
|
||||||
# vim: set expandtab ts=4 sw=4:
|
# vim: set expandtab ts=4 sw=4:
|
||||||
|
|
|
@ -223,7 +223,7 @@ class Terminal(Gtk.VBox):
|
||||||
return(GLib.filename_from_uri(vte_cwd)[0])
|
return(GLib.filename_from_uri(vte_cwd)[0])
|
||||||
else:
|
else:
|
||||||
# Fall back to old gtk2 method
|
# Fall back to old gtk2 method
|
||||||
return(self.terminator.pid_cwd(self.pid))
|
return(self.terminator.pid_cwd())
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
"""Close ourselves"""
|
"""Close ourselves"""
|
||||||
|
|
|
@ -99,7 +99,7 @@ class Terminator(Borg):
|
||||||
if not self.doing_layout:
|
if not self.doing_layout:
|
||||||
self.doing_layout = False
|
self.doing_layout = False
|
||||||
if not self.pid_cwd:
|
if not self.pid_cwd:
|
||||||
self.pid_cwd = get_pid_cwd()
|
self.pid_cwd = get_pid_cwd
|
||||||
if self.gnome_client is None:
|
if self.gnome_client is None:
|
||||||
self.attempt_gnome_client()
|
self.attempt_gnome_client()
|
||||||
self.connect_signals()
|
self.connect_signals()
|
||||||
|
|
Loading…
Reference in New Issue