diff --git a/src/calibre/devices/prs500/books.py b/src/calibre/devices/prs500/books.py
index 5308a7dcc7..db25e7d14c 100644
--- a/src/calibre/devices/prs500/books.py
+++ b/src/calibre/devices/prs500/books.py
@@ -155,6 +155,7 @@ class BookList(_BookList):
src = src.decode('latin1')
except UnicodeDecodeError:
src = src.decode('cp1252')
+ src = src.replace('
')%(__appname__, __appname__)
+ self.vanity_template += _('%s: %s by Kovid Goyal %%(version)s
%%(device)s
The database of books on the reader is corrupted. Try the following: @@ -701,10 +717,6 @@ class Main(MainWindow, Ui_MainWindow): warning_dialog(self, 'Could not convert some books', msg).exec_() - - - - def set_conversion_defaults(self, checked): d = LRFSingleDialog(self, None, None) d.exec_() @@ -1057,13 +1069,18 @@ def main(args=sys.argv): app = QApplication(args) QCoreApplication.setOrganizationName(ORG_NAME) QCoreApplication.setApplicationName(APP_UID) - if not singleinstance('mainGUI'): + single_instance = None if SingleApplication is None else SingleApplication('calibre GUI') + if not singleinstance('calibre GUI'): + if single_instance is not None and single_instance.is_running() and \ + single_instance.send_message('launched:'+''.join(sys.argv)): + return 0 + QMessageBox.critical(None, 'Cannot Start '+__appname__, '
%s is already running.
'%__appname__) return 1 initialize_file_icon_provider() try: - main = Main() + main = Main(single_instance) except DatabaseLocked, err: QMessageBox.critical(None, 'Cannot Start '+__appname__, 'Another program is using the database.
Perhaps %s is already running?
If not try deleting the file %s'%(__appname__, err.lock_file_path))