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 = None
self.searchresults = self.biblemanager.get_verse_text(bible, book,int(schapter), int(echapter), int(sverse), int(everse)) self.searchresults = self.biblemanager.get_verse_text(bible, book,int(schapter), int(echapter), int(sverse), int(everse))
else: 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' # 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 # by: PyQt4 UI code generator 4.4.4
# #
# WARNING! All changes made in this file will be lost! # 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.setGeometry(QtCore.QRect(10, 0, 471, 431))
self.ImportToolBox.setObjectName("ImportToolBox") self.ImportToolBox.setObjectName("ImportToolBox")
self.FileImportPage = QtGui.QWidget() 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.FileImportPage.setObjectName("FileImportPage")
self.OSISGroupBox = QtGui.QGroupBox(self.FileImportPage) self.OSISGroupBox = QtGui.QGroupBox(self.FileImportPage)
self.OSISGroupBox.setGeometry(QtCore.QRect(8, 65, 451, 81)) self.OSISGroupBox.setGeometry(QtCore.QRect(8, 65, 451, 81))
@ -84,41 +84,23 @@ class Ui_BibleImportDialog(object):
self.WebBibleLayout.setObjectName("WebBibleLayout") self.WebBibleLayout.setObjectName("WebBibleLayout")
self.OptionsGroupBox = QtGui.QGroupBox(self.WebBiblePage) self.OptionsGroupBox = QtGui.QGroupBox(self.WebBiblePage)
self.OptionsGroupBox.setObjectName("OptionsGroupBox") 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 = QtGui.QLabel(self.OptionsGroupBox)
self.LocationLabel.setGeometry(QtCore.QRect(11, 27, 54, 16))
self.LocationLabel.setObjectName("LocationLabel") self.LocationLabel.setObjectName("LocationLabel")
self.OptionsLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.LocationLabel)
self.LocationComboBox = QtGui.QComboBox(self.OptionsGroupBox) self.LocationComboBox = QtGui.QComboBox(self.OptionsGroupBox)
self.LocationComboBox.setGeometry(QtCore.QRect(71, 27, 371, 21))
self.LocationComboBox.setObjectName("LocationComboBox") self.LocationComboBox.setObjectName("LocationComboBox")
self.LocationComboBox.addItem(QtCore.QString()) 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 = QtGui.QLabel(self.OptionsGroupBox)
self.BibleLabel.setGeometry(QtCore.QRect(11, 54, 34, 16))
self.BibleLabel.setObjectName("BibleLabel") self.BibleLabel.setObjectName("BibleLabel")
self.OptionsLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.BibleLabel)
self.BibleComboBox = QtGui.QComboBox(self.OptionsGroupBox) self.BibleComboBox = QtGui.QComboBox(self.OptionsGroupBox)
self.BibleComboBox.setGeometry(QtCore.QRect(71, 54, 371, 21))
self.BibleComboBox.setObjectName("BibleComboBox") self.BibleComboBox.setObjectName("BibleComboBox")
self.BibleComboBox.addItem(QtCore.QString()) self.BibleComboBox.addItem(QtCore.QString())
self.BibleComboBox.setItemText(0, "") self.BibleComboBox.setItemText(0, "")
self.BibleComboBox.addItem(QtCore.QString()) self.BibleComboBox.addItem(QtCore.QString())
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.WebBibleLayout.addWidget(self.OptionsGroupBox)
self.ProxyGroupBox = QtGui.QGroupBox(self.WebBiblePage) self.ProxyGroupBox = QtGui.QGroupBox(self.WebBiblePage)
self.ProxyGroupBox.setObjectName("ProxyGroupBox") self.ProxyGroupBox.setObjectName("ProxyGroupBox")
@ -186,15 +168,16 @@ class Ui_BibleImportDialog(object):
self.ProgressBar.setInvertedAppearance(False) self.ProgressBar.setInvertedAppearance(False)
self.ProgressBar.setObjectName("ProgressBar") self.ProgressBar.setObjectName("ProgressBar")
self.gridLayout_3.addWidget(self.ProgressBar, 0, 0, 1, 1) self.gridLayout_3.addWidget(self.ProgressBar, 0, 0, 1, 1)
self.widget = QtGui.QWidget(BibleImportDialog) self.layoutWidget = QtGui.QWidget(BibleImportDialog)
self.widget.setGeometry(QtCore.QRect(320, 680, 170, 28)) self.layoutWidget.setGeometry(QtCore.QRect(300, 680, 180, 38))
self.widget.setObjectName("widget") self.layoutWidget.setObjectName("layoutWidget")
self.horizontalLayout = QtGui.QHBoxLayout(self.widget) self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget)
self.horizontalLayout.setMargin(6)
self.horizontalLayout.setObjectName("horizontalLayout") self.horizontalLayout.setObjectName("horizontalLayout")
self.ImportButton = QtGui.QPushButton(self.widget) self.ImportButton = QtGui.QPushButton(self.layoutWidget)
self.ImportButton.setObjectName("ImportButton") self.ImportButton.setObjectName("ImportButton")
self.horizontalLayout.addWidget(self.ImportButton) self.horizontalLayout.addWidget(self.ImportButton)
self.CancelButton = QtGui.QPushButton(self.widget) self.CancelButton = QtGui.QPushButton(self.layoutWidget)
self.CancelButton.setObjectName("CancelButton") self.CancelButton.setObjectName("CancelButton")
self.horizontalLayout.addWidget(self.CancelButton) self.horizontalLayout.addWidget(self.CancelButton)
@ -208,8 +191,7 @@ class Ui_BibleImportDialog(object):
BibleImportDialog.setTabOrder(self.BooksFileButton, self.VerseLocationEdit) BibleImportDialog.setTabOrder(self.BooksFileButton, self.VerseLocationEdit)
BibleImportDialog.setTabOrder(self.VerseLocationEdit, self.VersesFileButton) BibleImportDialog.setTabOrder(self.VerseLocationEdit, self.VersesFileButton)
BibleImportDialog.setTabOrder(self.VersesFileButton, self.LocationComboBox) BibleImportDialog.setTabOrder(self.VersesFileButton, self.LocationComboBox)
BibleImportDialog.setTabOrder(self.LocationComboBox, self.TypeComboBox) BibleImportDialog.setTabOrder(self.LocationComboBox, self.BibleComboBox)
BibleImportDialog.setTabOrder(self.TypeComboBox, self.BibleComboBox)
BibleImportDialog.setTabOrder(self.BibleComboBox, self.AddressEdit) BibleImportDialog.setTabOrder(self.BibleComboBox, self.AddressEdit)
BibleImportDialog.setTabOrder(self.AddressEdit, self.UsernameEdit) BibleImportDialog.setTabOrder(self.AddressEdit, self.UsernameEdit)
BibleImportDialog.setTabOrder(self.UsernameEdit, self.PasswordEdit) 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.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.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.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.LocationComboBox.setItemText(0, 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.BibleLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Bible:", 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(1, QtGui.QApplication.translate("BibleImportDialog", "NIV", None, QtGui.QApplication.UnicodeUTF8))
self.BibleComboBox.setItemText(2, QtGui.QApplication.translate("BibleImportDialog", "KJV", 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","")) self.PasswordEdit.setText(self.config.get_config("passwordedit",""))
QtCore.QObject.connect(self.LocationComboBox, QtCore.SIGNAL("activated(int)"), self.onLocationComboBox) 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) QtCore.QObject.connect(self.BibleComboBox, QtCore.SIGNAL("activated(int)"), self.onBibleComboBox)
@pyqtSignature("") @pyqtSignature("")
@ -104,15 +103,11 @@ class BibleImportForm(QDialog, Ui_BibleImportDialog, PluginUtils):
def onLocationComboBox(self): def onLocationComboBox(self):
self._checkhttp() self._checkhttp()
def onTypeComboBox(self):
self._checkhttp()
def onBibleComboBox(self): def onBibleComboBox(self):
self._checkhttp() self._checkhttp()
def _checkhttp(self): def _checkhttp(self):
if len(self.LocationComboBox.currentText()) > 0 or \ if len(self.LocationComboBox.currentText()) > 0 or \
len(self.TypeComboBox.currentText()) > 0 or \
len(self.BibleComboBox.currentText()) >0 : len(self.BibleComboBox.currentText()) >0 :
self.setHTTP() self.setHTTP()
else: else:
@ -214,14 +209,12 @@ class BibleImportForm(QDialog, Ui_BibleImportDialog, PluginUtils):
self.bibletype = "HTTP" self.bibletype = "HTTP"
self.LocationComboBox.setEnabled(True) self.LocationComboBox.setEnabled(True)
self.BibleComboBox.setEnabled(True) self.BibleComboBox.setEnabled(True)
self.TypeComboBox.setEnabled(True)
self.blockCSV() self.blockCSV()
self.blockOSIS() self.blockOSIS()
def blockHTTP(self): def blockHTTP(self):
self.LocationComboBox.setEnabled(False) self.LocationComboBox.setEnabled(False)
self.BibleComboBox.setEnabled(False) self.BibleComboBox.setEnabled(False)
self.TypeComboBox.setEnabled(False)
def freeAll(self): def freeAll(self):
if self.bibletype == None: # only reset if no bible type set. 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.OsisFileButton.setEnabled(True)
self.LocationComboBox.setEnabled(True) self.LocationComboBox.setEnabled(True)
self.BibleComboBox.setEnabled(True) self.BibleComboBox.setEnabled(True)
self.TypeComboBox.setEnabled(True)
def resetAll(self): def resetAll(self):
self.BooksLocationEdit.setText("") self.BooksLocationEdit.setText("")
@ -242,4 +234,3 @@ class BibleImportForm(QDialog, Ui_BibleImportDialog, PluginUtils):
self.BibleNameEdit.setText("") self.BibleNameEdit.setText("")
self.LocationComboBox.setCurrentIndex(0) self.LocationComboBox.setCurrentIndex(0)
self.BibleComboBox.setCurrentIndex(0) self.BibleComboBox.setCurrentIndex(0)
self.TypeComboBox.setCurrentIndex(0)

View File

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