Fix #1940 (Setting cover image for mobi file via GUI broken)

This commit is contained in:
Kovid Goyal 2009-02-26 12:55:49 -08:00
parent 786c0c9cae
commit b5e9f19502
2 changed files with 3 additions and 3 deletions

View File

@ -126,7 +126,8 @@ class Config(ResizableDialog, Ui_Dialog):
pix = QPixmap()
pix.loadFromData(cover)
if pix.isNull():
d = error_dialog(self.window, _file + _(" is not a valid picture"))
d = error_dialog(self.window, _('Error reading file'),
_file + _(" is not a valid picture"))
d.exec_()
else:
self.cover_path.setText(_file)

View File

@ -192,7 +192,6 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
def __init__(self, pathtoebook=None):
MainWindow.__init__(self, None)
self.setupUi(self)
self.iterator = None
self.current_page = None
self.pending_search = None
@ -591,7 +590,7 @@ View an ebook.
def main(args=sys.argv):
parser = option_parser()
args = parser.parse_args(args)[-1]
pid = os.fork() if islinux else -1
pid = os.fork() if False and islinux else -1
if pid <= 0:
app = Application(args)
app.setWindowIcon(QIcon(':/images/viewer.svg'))