mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Workaround bug in PyQt4.4.2, should fix crashed on some versions of Vista
This commit is contained in:
parent
c00ea9ab8e
commit
36484b906d
@ -2,7 +2,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
import os
|
||||
|
||||
from PyQt4.QtGui import QDialog, QMessageBox, QListWidgetItem
|
||||
from PyQt4.QtGui import QDialog, QMessageBox, QListWidgetItem, QIcon
|
||||
from PyQt4.QtCore import QVariant, SIGNAL, QStringList, QTimer, Qt, QSize
|
||||
|
||||
from calibre import islinux, Settings
|
||||
@ -19,7 +19,8 @@ class ConfigDialog(QDialog, Ui_Dialog):
|
||||
Ui_Dialog.__init__(self)
|
||||
self.ICON_SIZES = {0:QSize(48, 48), 1:QSize(32,32), 2:QSize(24,24)}
|
||||
self.setupUi(self)
|
||||
|
||||
self.item1 = QListWidgetItem(QIcon(':/images/metadata.svg'), _('Basic'), self.category_list)
|
||||
self.item2 = QListWidgetItem(QIcon(':/images/view.svg'), _('Advanced'), self.category_list)
|
||||
self.db = db
|
||||
self.current_cols = columns
|
||||
settings = Settings()
|
||||
|
@ -20,7 +20,7 @@
|
||||
<item row="0" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget" >
|
||||
<widget class="QListWidget" name="category_list" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Minimum" >
|
||||
<horstretch>0</horstretch>
|
||||
@ -69,26 +69,6 @@
|
||||
<property name="currentRow" >
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Basic</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="../images.qrc" >
|
||||
<normaloff>:/images/metadata.svg</normaloff>
|
||||
<normalon>:/images/metadata.svg</normalon>:/images/metadata.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Advanced</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="../images.qrc" >
|
||||
<normaloff>:/images/view.svg</normaloff>
|
||||
<normalon>:/images/view.svg</normalon>:/images/view.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -504,7 +484,7 @@
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>listWidget</sender>
|
||||
<sender>category_list</sender>
|
||||
<signal>currentRowChanged(int)</signal>
|
||||
<receiver>stackedWidget</receiver>
|
||||
<slot>setCurrentIndex(int)</slot>
|
||||
|
@ -4,7 +4,7 @@ import os, cPickle, codecs
|
||||
|
||||
from PyQt4.QtCore import QObject, SIGNAL, Qt, QVariant, QByteArray
|
||||
from PyQt4.QtGui import QAbstractSpinBox, QLineEdit, QCheckBox, QDialog, \
|
||||
QPixmap, QTextEdit
|
||||
QPixmap, QTextEdit, QListWidgetItem, QIcon
|
||||
|
||||
from calibre.gui2.dialogs.lrf_single_ui import Ui_LRFSingleDialog
|
||||
from calibre.gui2.dialogs.choose_format import ChooseFormatDialog
|
||||
@ -52,6 +52,10 @@ class LRFSingleDialog(QDialog, Ui_LRFSingleDialog):
|
||||
QDialog.__init__(self, window)
|
||||
Ui_LRFSingleDialog.__init__(self)
|
||||
self.setupUi(self)
|
||||
self.item1 = QListWidgetItem(QIcon(':/images/dialog_information.svg'), _("Metadata"), self.categoryList)
|
||||
self.item2 = QListWidgetItem(QIcon(':/images/lookfeel.svg'), _('Look & Feel'), self.categoryList)
|
||||
self.item3 = QListWidgetItem(QIcon(':/images/page.svg'), _('Page Setup'), self.categoryList)
|
||||
self.item4 = QListWidgetItem(QIcon(':/images/chapters.svg'), _('Chapter Detection'), self.categoryList)
|
||||
self.categoryList.setCurrentRow(0)
|
||||
QObject.connect(self.categoryList, SIGNAL('itemEntered(QListWidgetItem *)'),
|
||||
self.show_category_help)
|
||||
|
@ -91,48 +91,9 @@
|
||||
<property name="currentRow" >
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Metadata</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="../images.qrc" >
|
||||
<normaloff>:/images/metadata.svg</normaloff>
|
||||
<normalon>:/images/dialog_information.svg</normalon>:/images/metadata.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Look & Feel</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="../images.qrc" >
|
||||
<normaloff>:/images/lookfeel.svg</normaloff>
|
||||
<normalon>:/images/chapters.svg</normalon>:/images/lookfeel.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Page Setup</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="../images.qrc" >
|
||||
<normaloff>:/images/page.svg</normaloff>:/images/page.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Chapter Detection</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="../images.qrc" >
|
||||
<normaloff>:/images/chapters.svg</normaloff>:/images/chapters.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>categoryList</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user