Browse Source

Merge #345: Minor UI/UX tweaks

2cb5df4 Output full path/file name of lockfile in a case of lock (Kristaps Kaupe)
5ffa950 Better default column sizes in "JM Wallet" tab (Kristaps Kaupe)
master
AdamISZ 7 years ago
parent
commit
81dbca7a69
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 7
      jmclient/jmclient/storage.py
  2. 2
      scripts/joinmarket-qt.py

7
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()))

2
scripts/joinmarket-qt.py

@ -1135,6 +1135,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()

Loading…
Cancel
Save