Remove fields unused fields from import screen

bzr-revno: 313
This commit is contained in:
Tim Bentley 2009-02-14 08:33:20 +00:00
parent 94c66a12db
commit 17706c663b
4 changed files with 82 additions and 136 deletions

View File

@ -461,7 +461,4 @@ class BiblePlugin(Plugin, PluginUtils):
self.searchresults = None
self.searchresults = self.biblemanager.get_verse_text(bible, book,int(schapter), int(echapter), int(sverse), int(everse))
else:
reply = QtGui.QMessageBox.information(self.MediaManagerItem,"Information",message)
reply = QtGui.QMessageBox.information(self.MediaManagerItem,"Information",message)

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'bibleimportdialog.ui'
#
# Created: Wed Feb 11 16:48:24 2009
# Created: Sat Feb 14 08:25:46 2009
# by: PyQt4 UI code generator 4.4.4
#
# WARNING! All changes made in this file will be lost!
@ -20,7 +20,7 @@ class Ui_BibleImportDialog(object):
self.ImportToolBox.setGeometry(QtCore.QRect(10, 0, 471, 431))
self.ImportToolBox.setObjectName("ImportToolBox")
self.FileImportPage = QtGui.QWidget()
self.FileImportPage.setGeometry(QtCore.QRect(0, 0, 96, 26))
self.FileImportPage.setGeometry(QtCore.QRect(0, 0, 471, 371))
self.FileImportPage.setObjectName("FileImportPage")
self.OSISGroupBox = QtGui.QGroupBox(self.FileImportPage)
self.OSISGroupBox.setGeometry(QtCore.QRect(8, 65, 451, 81))
@ -84,41 +84,23 @@ class Ui_BibleImportDialog(object):
self.WebBibleLayout.setObjectName("WebBibleLayout")
self.OptionsGroupBox = QtGui.QGroupBox(self.WebBiblePage)
self.OptionsGroupBox.setObjectName("OptionsGroupBox")
self.OptionsLayout = QtGui.QFormLayout(self.OptionsGroupBox)
self.OptionsLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
self.OptionsLayout.setLabelAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.OptionsLayout.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.OptionsLayout.setMargin(8)
self.OptionsLayout.setSpacing(8)
self.OptionsLayout.setObjectName("OptionsLayout")
self.LocationLabel = QtGui.QLabel(self.OptionsGroupBox)
self.LocationLabel.setGeometry(QtCore.QRect(11, 27, 54, 16))
self.LocationLabel.setObjectName("LocationLabel")
self.OptionsLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.LocationLabel)
self.LocationComboBox = QtGui.QComboBox(self.OptionsGroupBox)
self.LocationComboBox.setGeometry(QtCore.QRect(71, 27, 371, 21))
self.LocationComboBox.setObjectName("LocationComboBox")
self.LocationComboBox.addItem(QtCore.QString())
self.LocationComboBox.setItemText(0, "")
self.LocationComboBox.addItem(QtCore.QString())
self.OptionsLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.LocationComboBox)
self.TypeLabel = QtGui.QLabel(self.OptionsGroupBox)
self.TypeLabel.setObjectName("TypeLabel")
self.OptionsLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.TypeLabel)
self.TypeComboBox = QtGui.QComboBox(self.OptionsGroupBox)
self.TypeComboBox.setObjectName("TypeComboBox")
self.TypeComboBox.addItem(QtCore.QString())
self.TypeComboBox.setItemText(0, "")
self.TypeComboBox.addItem(QtCore.QString())
self.OptionsLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.TypeComboBox)
self.BibleLabel = QtGui.QLabel(self.OptionsGroupBox)
self.BibleLabel.setGeometry(QtCore.QRect(11, 54, 34, 16))
self.BibleLabel.setObjectName("BibleLabel")
self.OptionsLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.BibleLabel)
self.BibleComboBox = QtGui.QComboBox(self.OptionsGroupBox)
self.BibleComboBox.setGeometry(QtCore.QRect(71, 54, 371, 21))
self.BibleComboBox.setObjectName("BibleComboBox")
self.BibleComboBox.addItem(QtCore.QString())
self.BibleComboBox.setItemText(0, "")
self.BibleComboBox.addItem(QtCore.QString())
self.BibleComboBox.addItem(QtCore.QString())
self.OptionsLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.BibleComboBox)
self.WebBibleLayout.addWidget(self.OptionsGroupBox)
self.ProxyGroupBox = QtGui.QGroupBox(self.WebBiblePage)
self.ProxyGroupBox.setObjectName("ProxyGroupBox")
@ -186,15 +168,16 @@ class Ui_BibleImportDialog(object):
self.ProgressBar.setInvertedAppearance(False)
self.ProgressBar.setObjectName("ProgressBar")
self.gridLayout_3.addWidget(self.ProgressBar, 0, 0, 1, 1)
self.widget = QtGui.QWidget(BibleImportDialog)
self.widget.setGeometry(QtCore.QRect(320, 680, 170, 28))
self.widget.setObjectName("widget")
self.horizontalLayout = QtGui.QHBoxLayout(self.widget)
self.layoutWidget = QtGui.QWidget(BibleImportDialog)
self.layoutWidget.setGeometry(QtCore.QRect(300, 680, 180, 38))
self.layoutWidget.setObjectName("layoutWidget")
self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget)
self.horizontalLayout.setMargin(6)
self.horizontalLayout.setObjectName("horizontalLayout")
self.ImportButton = QtGui.QPushButton(self.widget)
self.ImportButton = QtGui.QPushButton(self.layoutWidget)
self.ImportButton.setObjectName("ImportButton")
self.horizontalLayout.addWidget(self.ImportButton)
self.CancelButton = QtGui.QPushButton(self.widget)
self.CancelButton = QtGui.QPushButton(self.layoutWidget)
self.CancelButton.setObjectName("CancelButton")
self.horizontalLayout.addWidget(self.CancelButton)
@ -208,8 +191,7 @@ class Ui_BibleImportDialog(object):
BibleImportDialog.setTabOrder(self.BooksFileButton, self.VerseLocationEdit)
BibleImportDialog.setTabOrder(self.VerseLocationEdit, self.VersesFileButton)
BibleImportDialog.setTabOrder(self.VersesFileButton, self.LocationComboBox)
BibleImportDialog.setTabOrder(self.LocationComboBox, self.TypeComboBox)
BibleImportDialog.setTabOrder(self.TypeComboBox, self.BibleComboBox)
BibleImportDialog.setTabOrder(self.LocationComboBox, self.BibleComboBox)
BibleImportDialog.setTabOrder(self.BibleComboBox, self.AddressEdit)
BibleImportDialog.setTabOrder(self.AddressEdit, self.UsernameEdit)
BibleImportDialog.setTabOrder(self.UsernameEdit, self.PasswordEdit)
@ -228,9 +210,7 @@ class Ui_BibleImportDialog(object):
self.ImportToolBox.setItemText(self.ImportToolBox.indexOf(self.FileImportPage), QtGui.QApplication.translate("BibleImportDialog", "File Import Page", None, QtGui.QApplication.UnicodeUTF8))
self.OptionsGroupBox.setTitle(QtGui.QApplication.translate("BibleImportDialog", "Download Options", None, QtGui.QApplication.UnicodeUTF8))
self.LocationLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Location:", None, QtGui.QApplication.UnicodeUTF8))
self.LocationComboBox.setItemText(1, QtGui.QApplication.translate("BibleImportDialog", "Crosswalk", None, QtGui.QApplication.UnicodeUTF8))
self.TypeLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Type:", None, QtGui.QApplication.UnicodeUTF8))
self.TypeComboBox.setItemText(1, QtGui.QApplication.translate("BibleImportDialog", "Download As Needed", None, QtGui.QApplication.UnicodeUTF8))
self.LocationComboBox.setItemText(0, QtGui.QApplication.translate("BibleImportDialog", "Crosswalk", None, QtGui.QApplication.UnicodeUTF8))
self.BibleLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Bible:", None, QtGui.QApplication.UnicodeUTF8))
self.BibleComboBox.setItemText(1, QtGui.QApplication.translate("BibleImportDialog", "NIV", None, QtGui.QApplication.UnicodeUTF8))
self.BibleComboBox.setItemText(2, QtGui.QApplication.translate("BibleImportDialog", "KJV", None, QtGui.QApplication.UnicodeUTF8))

View File

@ -42,7 +42,6 @@ class BibleImportForm(QDialog, Ui_BibleImportDialog, PluginUtils):
self.PasswordEdit.setText(self.config.get_config("passwordedit",""))
QtCore.QObject.connect(self.LocationComboBox, QtCore.SIGNAL("activated(int)"), self.onLocationComboBox)
QtCore.QObject.connect(self.TypeComboBox, QtCore.SIGNAL("activated(int)"), self.onTypeComboBox)
QtCore.QObject.connect(self.BibleComboBox, QtCore.SIGNAL("activated(int)"), self.onBibleComboBox)
@pyqtSignature("")
@ -104,15 +103,11 @@ class BibleImportForm(QDialog, Ui_BibleImportDialog, PluginUtils):
def onLocationComboBox(self):
self._checkhttp()
def onTypeComboBox(self):
self._checkhttp()
def onBibleComboBox(self):
self._checkhttp()
def _checkhttp(self):
if len(self.LocationComboBox.currentText()) > 0 or \
len(self.TypeComboBox.currentText()) > 0 or \
len(self.BibleComboBox.currentText()) >0 :
self.setHTTP()
else:
@ -214,14 +209,12 @@ class BibleImportForm(QDialog, Ui_BibleImportDialog, PluginUtils):
self.bibletype = "HTTP"
self.LocationComboBox.setEnabled(True)
self.BibleComboBox.setEnabled(True)
self.TypeComboBox.setEnabled(True)
self.blockCSV()
self.blockOSIS()
def blockHTTP(self):
self.LocationComboBox.setEnabled(False)
self.BibleComboBox.setEnabled(False)
self.TypeComboBox.setEnabled(False)
def freeAll(self):
if self.bibletype == None: # only reset if no bible type set.
@ -233,7 +226,6 @@ class BibleImportForm(QDialog, Ui_BibleImportDialog, PluginUtils):
self.OsisFileButton.setEnabled(True)
self.LocationComboBox.setEnabled(True)
self.BibleComboBox.setEnabled(True)
self.TypeComboBox.setEnabled(True)
def resetAll(self):
self.BooksLocationEdit.setText("")
@ -242,4 +234,3 @@ class BibleImportForm(QDialog, Ui_BibleImportDialog, PluginUtils):
self.BibleNameEdit.setText("")
self.LocationComboBox.setCurrentIndex(0)
self.BibleComboBox.setCurrentIndex(0)
self.TypeComboBox.setCurrentIndex(0)

View File

@ -34,8 +34,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>96</width>
<height>26</height>
<width>471</width>
<height>371</height>
</rect>
</property>
<attribute name="label">
@ -194,97 +194,73 @@
<property name="title">
<string>Download Options</string>
</property>
<layout class="QFormLayout" name="OptionsLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
<widget class="QLabel" name="LocationLabel">
<property name="geometry">
<rect>
<x>11</x>
<y>27</y>
<width>54</width>
<height>16</height>
</rect>
</property>
<property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<property name="text">
<string>Location:</string>
</property>
<property name="formAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</widget>
<widget class="QComboBox" name="LocationComboBox">
<property name="geometry">
<rect>
<x>71</x>
<y>27</y>
<width>371</width>
<height>21</height>
</rect>
</property>
<property name="horizontalSpacing">
<number>8</number>
<item>
<property name="text">
<string>Crosswalk</string>
</property>
</item>
</widget>
<widget class="QLabel" name="BibleLabel">
<property name="geometry">
<rect>
<x>11</x>
<y>54</y>
<width>34</width>
<height>16</height>
</rect>
</property>
<property name="verticalSpacing">
<number>8</number>
<property name="text">
<string>Bible:</string>
</property>
<property name="margin">
<number>8</number>
</widget>
<widget class="QComboBox" name="BibleComboBox">
<property name="geometry">
<rect>
<x>71</x>
<y>54</y>
<width>371</width>
<height>21</height>
</rect>
</property>
<item row="0" column="0">
<widget class="QLabel" name="LocationLabel">
<property name="text">
<string>Location:</string>
</property>
</widget>
<item>
<property name="text">
<string/>
</property>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="LocationComboBox">
<item>
<property name="text">
<string/>
</property>
</item>
<item>
<property name="text">
<string>Crosswalk</string>
</property>
</item>
</widget>
<item>
<property name="text">
<string>NIV</string>
</property>
</item>
<item row="1" column="0">
<widget class="QLabel" name="TypeLabel">
<property name="text">
<string>Type:</string>
</property>
</widget>
<item>
<property name="text">
<string>KJV</string>
</property>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="TypeComboBox">
<item>
<property name="text">
<string/>
</property>
</item>
<item>
<property name="text">
<string>Download As Needed</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="BibleLabel">
<property name="text">
<string>Bible:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="BibleComboBox">
<item>
<property name="text">
<string/>
</property>
</item>
<item>
<property name="text">
<string>NIV</string>
</property>
</item>
<item>
<property name="text">
<string>KJV</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<zorder>BibleComboBox</zorder>
<zorder>TypeComboBox</zorder>
<zorder>TypeLabel</zorder>
<zorder>LocationLabel</zorder>
<zorder>BibleLabel</zorder>
<zorder>LocationComboBox</zorder>
@ -442,16 +418,19 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>320</x>
<x>300</x>
<y>680</y>
<width>170</width>
<height>28</height>
<width>180</width>
<height>38</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="ImportButton">
<property name="text">
@ -478,7 +457,6 @@
<tabstop>VerseLocationEdit</tabstop>
<tabstop>VersesFileButton</tabstop>
<tabstop>LocationComboBox</tabstop>
<tabstop>TypeComboBox</tabstop>
<tabstop>BibleComboBox</tabstop>
<tabstop>AddressEdit</tabstop>
<tabstop>UsernameEdit</tabstop>