From 5ffa95088c4556b1a0625eac48ecd7bd2c6ee4b8 Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Sun, 21 Apr 2019 12:11:38 +0300 Subject: [PATCH 1/2] Better default column sizes in "JM Wallet" tab --- scripts/joinmarket-qt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/joinmarket-qt.py b/scripts/joinmarket-qt.py index f4f538e..2e09545 100644 --- a/scripts/joinmarket-qt.py +++ b/scripts/joinmarket-qt.py @@ -1115,6 +1115,8 @@ class JMWalletTab(QWidget): self) self.label1.setAlignment(QtCore.Qt.AlignTop | QtCore.Qt.AlignLeft) v = MyTreeWidget(self, self.create_menu, self.getHeaders()) + v.header().resizeSection(0, 400) # size of "Address" column + v.header().resizeSection(1, 130) # size of "Index" column v.setSelectionMode(QAbstractItemView.ExtendedSelection) v.on_update = self.updateWalletInfo v.hide() From 2cb5df4a3295ce9f750a40ec13e5e388f27f295b Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Sun, 21 Apr 2019 13:07:43 +0300 Subject: [PATCH 2/2] Output full path/file name of lockfile in a case of lock --- jmclient/jmclient/storage.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jmclient/jmclient/storage.py b/jmclient/jmclient/storage.py index 2528290..54d4b43 100644 --- a/jmclient/jmclient/storage.py +++ b/jmclient/jmclient/storage.py @@ -277,15 +277,16 @@ class Storage(object): def _create_lock(self): if self.read_only: return - self._lock_file = '{}.lock'.format(self.path) + lock_filename = '{}.lock'.format(self.path) + self._lock_file = lock_filename if os.path.exists(self._lock_file): with open(self._lock_file, 'r') as f: locked_by_pid = f.read() self._lock_file = None raise StorageError("File is currently in use (locked by pid {}). " "If this is a leftover from a crashed instance " - "you need to remove the lock file manually" . - format(locked_by_pid)) + "you need to remove the lock file `{}` manually." . + format(locked_by_pid, lock_filename)) #FIXME: in python >=3.3 use mode x with open(self._lock_file, 'w') as f: f.write(str(os.getpid()))