mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
use show() over exec_() due to osx bugs
This commit is contained in:
parent
74e5122717
commit
ec8f7d3856
1 changed files with 4 additions and 1 deletions
|
@ -175,7 +175,8 @@ class Preferences(QDialog):
|
|||
d.setFileMode(QFileDialog.Directory)
|
||||
d.setOption(QFileDialog.ShowDirsOnly, True)
|
||||
d.setDirectory(self.config['documentDir'])
|
||||
if d.exec_():
|
||||
d.show()
|
||||
def accept():
|
||||
dir = unicode(list(d.selectedFiles())[0])
|
||||
# make sure we can write into it
|
||||
try:
|
||||
|
@ -183,5 +184,7 @@ class Preferences(QDialog):
|
|||
open(f, "w").write("test")
|
||||
os.unlink(f)
|
||||
except (OSError, IOError):
|
||||
showWarning(_("Can't write to folder."))
|
||||
return
|
||||
self.config['documentDir'] = dir
|
||||
d.connect(d, SIGNAL("accepted()"), accept)
|
||||
|
|
Loading…
Reference in a new issue