This commit is contained in:
Kovid Goyal 2008-07-08 11:13:31 -07:00
parent c0f0201399
commit f45293e1ac
3 changed files with 18 additions and 1 deletions

View File

@ -35,6 +35,7 @@ class ConfigDialog(QDialog, Ui_Dialog):
rn = settings.get('use roman numerals for series number', True)
self.timeout.setValue(settings.get('network timeout', 5))
self.roman_numerals.setChecked(rn)
self.new_version_notification.setChecked(settings.get('new version notification', True))
self.directory_list.addItems(dirs)
self.connect(self.add_button, SIGNAL('clicked(bool)'), self.add_dir)
self.connect(self.remove_button, SIGNAL('clicked(bool)'), self.remove_dir)
@ -88,6 +89,7 @@ class ConfigDialog(QDialog, Ui_Dialog):
def accept(self):
settings = Settings()
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()))
path = qstring_to_unicode(self.location.text())
self.final_columns = [self.columns.item(i).checkState() == Qt.Checked for i in range(self.columns.count())]

View File

@ -78,6 +78,14 @@
<number>0</number>
</property>
<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" >
<item>
<layout class="QVBoxLayout" name="_2" >
@ -124,6 +132,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="new_version_notification" >
<property name="text" >
<string>Show notification when &amp;new version is available</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" >

View File

@ -1209,7 +1209,7 @@ class Main(MainWindow, Ui_MainWindow):
device=self.device_info)))
self.vanity.update()
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))
if d.exec_() == QMessageBox.Yes:
url = 'http://calibre.kovidgoyal.net/download_'+('windows' if iswindows else 'osx' if isosx else 'linux')