def run(self): if debug: time.sleep(5) try: self.hardware = smolt.Hardware() try: smolt.getPubUUID() self.emit(SIGNAL('smoltPageStatus(PyQt_PyObject)'), True) except: self.emit(SIGNAL('smoltPageStatus(PyQt_PyObject)'), False) self.emit(SIGNAL('profile_ready()')) except smolt.SystemBusError, e: self.error_message = e.msg self.emit(SIGNAL('system_bus_error()'))
def run(self): if debug: time.sleep(5) try: self.hardware = smolt.Hardware() try: smolt.getPubUUID() self.emit(SIGNAL('smoltPageStatus(PyQt_PyObject)'), True) except: self.emit(SIGNAL('smoltPageStatus(PyQt_PyObject)'), False) self.emit(SIGNAL('profile_ready()')) except smolt.SystemBusError, e: self.error_message = e.message self.emit(SIGNAL('system_bus_error()'))
def on_submission_completed(self): url = smolt.get_profile_link(smolt.smoonURL, smolt.getPubUUID()) window = self.builder.get_object('window_main') message = ('<b>Your profile was sent successfully!</b>\n' 'Your profile is available at <a href="%(url)s">this</a> link.\n' 'Your profile admin password is:\n' '<i>%(password)s</i>' % {'url':url, 'password':self.admin}) dialog = gtk.MessageDialog(window, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, message) dialog.set_property('use-markup', True) dialog.run() dialog.destroy()
def openSmoltPage(self): ''' Open My Smolt Page ''' url = smolt.get_profile_link(smolt.smoonURL, smolt.getPubUUID()) QDesktopServices.openUrl(QUrl(url))
def on_action_mypage_activate(self, widget, data=None): url = smolt.get_profile_link(smolt.smoonURL, smolt.getPubUUID()) webbrowser.open(url)
def openSmoltPage(self): global server_url ''' Open My Smolt Page ''' url = smolt.get_profile_link(server_url, smolt.getPubUUID()) QDesktopServices.openUrl(QUrl(url))