def cant_start( msg=_('If you are sure it is not running') + ', ', det_msg=_('Timed out waiting for response from running calibre'), listener_failed=False): base = '<p>%s</p><p>%s %s' where = __appname__ + ' ' + _( 'may be running in the system tray, in the') + ' ' if isosx: where += _('upper right region of the screen.') else: where += _('lower right region of the screen.') if iswindows or islinux: what = _('try rebooting your computer.') else: if listener_failed: path = gui_socket_address() else: from calibre.utils.lock import singleinstance_path path = singleinstance_path(singleinstance_name) what = _('try deleting the file: "%s"') % path info = base % (where, msg, what) error_dialog(None, _('Cannot start ') + __appname__, '<p>' + (_('%s is already running.') % __appname__) + '</p>' + info, det_msg=det_msg, show=True) raise SystemExit(1)
def cant_start(msg=_('If you are sure it is not running')+', ', det_msg=_('Timed out waiting for response from running calibre'), listener_failed=False): base = '<p>%s</p><p>%s %s' where = __appname__ + ' '+_('may be running in the system tray, in the')+' ' if isosx: where += _('upper right region of the screen.') else: where += _('lower right region of the screen.') if iswindows or islinux: what = _('try rebooting your computer.') else: if listener_failed: path = gui_socket_address() else: from calibre.utils.lock import singleinstance_path path = singleinstance_path(singleinstance_name) what = _('try deleting the file: "%s"') % path info = base%(where, msg, what) error_dialog(None, _('Cannot Start ')+__appname__, '<p>'+(_('%s is already running.')%__appname__)+'</p>'+info, det_msg=det_msg, show=True) raise SystemExit(1)