mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #860
This commit is contained in:
parent
c0f0201399
commit
f45293e1ac
@ -35,6 +35,7 @@ class ConfigDialog(QDialog, Ui_Dialog):
|
|||||||
rn = settings.get('use roman numerals for series number', True)
|
rn = settings.get('use roman numerals for series number', True)
|
||||||
self.timeout.setValue(settings.get('network timeout', 5))
|
self.timeout.setValue(settings.get('network timeout', 5))
|
||||||
self.roman_numerals.setChecked(rn)
|
self.roman_numerals.setChecked(rn)
|
||||||
|
self.new_version_notification.setChecked(settings.get('new version notification', True))
|
||||||
self.directory_list.addItems(dirs)
|
self.directory_list.addItems(dirs)
|
||||||
self.connect(self.add_button, SIGNAL('clicked(bool)'), self.add_dir)
|
self.connect(self.add_button, SIGNAL('clicked(bool)'), self.add_dir)
|
||||||
self.connect(self.remove_button, SIGNAL('clicked(bool)'), self.remove_dir)
|
self.connect(self.remove_button, SIGNAL('clicked(bool)'), self.remove_dir)
|
||||||
@ -88,6 +89,7 @@ class ConfigDialog(QDialog, Ui_Dialog):
|
|||||||
def accept(self):
|
def accept(self):
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
settings.set('use roman numerals for series number', bool(self.roman_numerals.isChecked()))
|
settings.set('use roman numerals for series number', bool(self.roman_numerals.isChecked()))
|
||||||
|
settings.set('new version notification', bool(self.new_version_notification.isChecked()))
|
||||||
settings.set('network timeout', int(self.timeout.value()))
|
settings.set('network timeout', int(self.timeout.value()))
|
||||||
path = qstring_to_unicode(self.location.text())
|
path = qstring_to_unicode(self.location.text())
|
||||||
self.final_columns = [self.columns.item(i).checkState() == Qt.Checked for i in range(self.columns.count())]
|
self.final_columns = [self.columns.item(i).checkState() == Qt.Checked for i in range(self.columns.count())]
|
||||||
|
@ -78,6 +78,14 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="page_3" >
|
<widget class="QWidget" name="page_3" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>595</width>
|
||||||
|
<height>638</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="_2" >
|
<layout class="QVBoxLayout" name="_2" >
|
||||||
@ -124,6 +132,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="new_version_notification" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Show notification when &new version is available</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout_2" >
|
<layout class="QGridLayout" name="gridLayout_2" >
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
|
@ -1209,7 +1209,7 @@ class Main(MainWindow, Ui_MainWindow):
|
|||||||
device=self.device_info)))
|
device=self.device_info)))
|
||||||
self.vanity.update()
|
self.vanity.update()
|
||||||
s = Settings()
|
s = Settings()
|
||||||
if s.get('update to version %s'%version, True):
|
if s.get('new version notification', True) and s.get('update to version %s'%version, True):
|
||||||
d = question_dialog(self, _('Update available'), _('%s has been updated to version %s. See the <a href="http://calibre.kovidgoyal.net/wiki/Changelog">new features</a>. Visit the download page?')%(__appname__, version))
|
d = question_dialog(self, _('Update available'), _('%s has been updated to version %s. See the <a href="http://calibre.kovidgoyal.net/wiki/Changelog">new features</a>. Visit the download page?')%(__appname__, version))
|
||||||
if d.exec_() == QMessageBox.Yes:
|
if d.exec_() == QMessageBox.Yes:
|
||||||
url = 'http://calibre.kovidgoyal.net/download_'+('windows' if iswindows else 'osx' if isosx else 'linux')
|
url = 'http://calibre.kovidgoyal.net/download_'+('windows' if iswindows else 'osx' if isosx else 'linux')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user