mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Welcome wizard: Fix Next button being grayed out on OS X
This commit is contained in:
parent
e67c0db8cf
commit
fed31aa220
@ -468,6 +468,11 @@ class LibraryPage(QWizardPage, LibraryUI):
|
|||||||
self.init_languages()
|
self.init_languages()
|
||||||
self.connect(self.language, SIGNAL('currentIndexChanged(int)'),
|
self.connect(self.language, SIGNAL('currentIndexChanged(int)'),
|
||||||
self.change_language)
|
self.change_language)
|
||||||
|
self.connect(self.location, SIGNAL('textChanged(QString)'),
|
||||||
|
self.location_text_changed)
|
||||||
|
|
||||||
|
def location_text_changed(self, newtext):
|
||||||
|
self.emit(SIGNAL('completeChanged()'))
|
||||||
|
|
||||||
def init_languages(self):
|
def init_languages(self):
|
||||||
self.language.blockSignals(True)
|
self.language.blockSignals(True)
|
||||||
@ -525,9 +530,13 @@ class LibraryPage(QWizardPage, LibraryUI):
|
|||||||
self.location.setText(lp)
|
self.location.setText(lp)
|
||||||
|
|
||||||
def isComplete(self):
|
def isComplete(self):
|
||||||
lp = unicode(self.location.text())
|
try:
|
||||||
return lp and os.path.exists(lp) and os.path.isdir(lp) and os.access(lp,
|
lp = unicode(self.location.text())
|
||||||
os.W_OK)
|
ans = bool(lp) and os.path.exists(lp) and os.path.isdir(lp) and os.access(lp,
|
||||||
|
os.W_OK)
|
||||||
|
except:
|
||||||
|
ans = False
|
||||||
|
return ans
|
||||||
|
|
||||||
def commit(self, completed):
|
def commit(self, completed):
|
||||||
oldloc = prefs['library_path']
|
oldloc = prefs['library_path']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user