Fix: Reverse-engineered GUI changes.
This commit is contained in:
parent
6095ad7ded
commit
1ac03a2e3b
@ -352,6 +352,7 @@ class MainWindowReader(QtGui.QMainWindow, Ui_MainWindowReader):
|
|||||||
self.setWindowTitle(u'Yomichan - {0} ({1})'.format(os.path.split(filename)[1], encoding))
|
self.setWindowTitle(u'Yomichan - {0} ({1})'.format(os.path.split(filename)[1], encoding))
|
||||||
|
|
||||||
def openFileByExtension(self, filename):
|
def openFileByExtension(self, filename):
|
||||||
|
self.clearArchiveFiles()
|
||||||
if tarfile.is_tarfile(filename):
|
if tarfile.is_tarfile(filename):
|
||||||
# opening an empty tar file raises ReadError
|
# opening an empty tar file raises ReadError
|
||||||
with tarfile.open(filename, 'r:*') as tp:
|
with tarfile.open(filename, 'r:*') as tp:
|
||||||
@ -530,8 +531,6 @@ class MainWindowReader(QtGui.QMainWindow, Ui_MainWindowReader):
|
|||||||
|
|
||||||
|
|
||||||
def updateArchiveFiles(self, filename, names):
|
def updateArchiveFiles(self, filename, names):
|
||||||
self.clearArchiveFiles()
|
|
||||||
|
|
||||||
self.menuOpenArchive.setEnabled(True)
|
self.menuOpenArchive.setEnabled(True)
|
||||||
for name in self.formatQStringList(names):
|
for name in self.formatQStringList(names):
|
||||||
(index, ok) = self.getItemIndex(name)
|
(index, ok) = self.getItemIndex(name)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'dev/reader.ui'
|
# Form implementation generated from reading ui file 'dev/reader.ui'
|
||||||
#
|
#
|
||||||
# Created: Fri Oct 7 08:55:15 2011
|
# Created: Mon Nov 14 19:35:11 2011
|
||||||
# by: PyQt4 UI code generator 4.8.5
|
# by: PyQt4 UI code generator 4.8.5
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@ -40,9 +40,9 @@ class Ui_MainWindowReader(object):
|
|||||||
self.menuFile.setTitle(QtGui.QApplication.translate("MainWindowReader", "&File", None, QtGui.QApplication.UnicodeUTF8))
|
self.menuFile.setTitle(QtGui.QApplication.translate("MainWindowReader", "&File", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.menuFile.setObjectName(_fromUtf8("menuFile"))
|
self.menuFile.setObjectName(_fromUtf8("menuFile"))
|
||||||
self.menuOpenArchive = QtGui.QMenu(self.menuFile)
|
self.menuOpenArchive = QtGui.QMenu(self.menuFile)
|
||||||
|
self.menuOpenArchive.setEnabled(False)
|
||||||
self.menuOpenArchive.setTitle(QtGui.QApplication.translate("MainWindowReader", "Open from &archive", None, QtGui.QApplication.UnicodeUTF8))
|
self.menuOpenArchive.setTitle(QtGui.QApplication.translate("MainWindowReader", "Open from &archive", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.menuOpenArchive.setObjectName(_fromUtf8("menuOpenArchive"))
|
self.menuOpenArchive.setObjectName(_fromUtf8("menuOpenArchive"))
|
||||||
self.menuOpenArchive.setEnabled(False)
|
|
||||||
self.menuOpenRecent = QtGui.QMenu(self.menuFile)
|
self.menuOpenRecent = QtGui.QMenu(self.menuFile)
|
||||||
self.menuOpenRecent.setTitle(QtGui.QApplication.translate("MainWindowReader", "Open &recent", None, QtGui.QApplication.UnicodeUTF8))
|
self.menuOpenRecent.setTitle(QtGui.QApplication.translate("MainWindowReader", "Open &recent", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.menuOpenRecent.setObjectName(_fromUtf8("menuOpenRecent"))
|
self.menuOpenRecent.setObjectName(_fromUtf8("menuOpenRecent"))
|
||||||
|
@ -47,12 +47,21 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&File</string>
|
<string>&File</string>
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="QMenu" name="menuOpenArchive">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Open from &archive</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
<widget class="QMenu" name="menuOpenRecent">
|
<widget class="QMenu" name="menuOpenRecent">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Open &recent</string>
|
<string>Open &recent</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="actionOpen"/>
|
<addaction name="actionOpen"/>
|
||||||
|
<addaction name="menuOpenArchive" />
|
||||||
<addaction name="menuOpenRecent"/>
|
<addaction name="menuOpenRecent"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionQuit"/>
|
<addaction name="actionQuit"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user