mirror of
https://github.com/bkerler/mtkclient.git
synced 2024-11-14 19:25:05 -05:00
Fix issue with filedialog
This commit is contained in:
parent
c86971d042
commit
4c7e621459
2 changed files with 3 additions and 10 deletions
|
@ -1171,7 +1171,7 @@ hwconfig = {
|
|||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x40001000, #
|
||||
gcpu_base=0x10210000,
|
||||
gcpu_base=0x101E32A0,
|
||||
sej_base=0x1000A000,
|
||||
# no dxcc
|
||||
cqdma_base=0x10212C00,
|
||||
|
|
|
@ -123,11 +123,8 @@ class FDialog():
|
|||
fname = os.path.join(self.lastpath, filename)
|
||||
self.fdialog.setDirectory(self.lastpath)
|
||||
self.fdialog.selectFile(fname)
|
||||
options = QFileDialog.Options()
|
||||
#options |= QFileDialog.DontUseNativeDialog
|
||||
options |= QFileDialog.DontUseCustomDirectoryIcons
|
||||
ret = self.fdialog.getSaveFileName(self.parent, self.parent.tr("Select output file"), fname,
|
||||
"Binary dump (*.bin)",options=options)
|
||||
"Binary dump (*.bin)")
|
||||
if ret:
|
||||
fname = ret[0]
|
||||
if fname != "":
|
||||
|
@ -136,15 +133,11 @@ class FDialog():
|
|||
return None
|
||||
|
||||
def open(self, filename=""):
|
||||
options = QFileDialog.Options()
|
||||
if sys.platform.startswith('freebsd') or sys.platform.startswith('linux'):
|
||||
options |= QFileDialog.DontUseNativeDialog
|
||||
options |= QFileDialog.DontUseCustomDirectoryIcons
|
||||
fname = os.path.join(self.lastpath, filename)
|
||||
self.fdialog.setDirectory(self.lastpath)
|
||||
self.fdialog.selectFile(fname)
|
||||
ret = self.fdialog.getOpenFileName(self.parent, self.parent.tr("Select input file"),
|
||||
fname, "Binary dump (*.bin)",options=options)
|
||||
fname, "Binary dump (*.bin)")
|
||||
ret = os.path.normpath(ret) # fixes backslash problem on windows
|
||||
if ret:
|
||||
fname = ret[0]
|
||||
|
|
Loading…
Reference in a new issue