Make GUI not exit when device is busy. Version bump.

This commit is contained in:
Kovid Goyal 2007-01-09 01:07:57 +00:00
parent 3f4f7e7b0b
commit 9cad32e207
2 changed files with 6 additions and 5 deletions

View File

@ -37,6 +37,6 @@ the following rule in C{/etc/udev/rules.d/90-local.rules} ::
You may have to adjust the GROUP and the location of the rules file to
suit your distribution.
"""
__version__ = "0.3.0b4"
__version__ = "0.3.0b5"
__docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"

View File

@ -520,7 +520,8 @@ class Main(QObject, Ui_MainWindow):
try:
info = self.dev.get_device_information(end_session=False)
except DeviceBusy, err:
qFatal(str(err))
Error("Device is in use by another application", None)
self.status("Device busy")
except DeviceError, err:
self.dev.reconnect()
self.thread().msleep(100)
@ -533,13 +534,13 @@ class Main(QObject, Ui_MainWindow):
.arg(info[1]).arg(info[2]))
self.update_availabe_space(end_session=False)
self.card = self.dev.card()
self.is_connected = True
if self.card: self.device_tree.hide_card(False)
else: self.device_tree.hide_card(True)
self.device_tree.hide_reader(False)
self.status("Loading media list from SONY Reader")
self.reader_model.set_data(self.dev.books(end_session=False))
if self.card: self.status("Loading media list from Storage Card")
if self.card:
self.status("Loading media list from Storage Card")
self.card_model.set_data(self.dev.books(oncard=True))
self.progress(100)
self.window.setCursor(Qt.ArrowCursor)