Example #1
0
 def login(self):
     if not config.username or not config.password:
         login = Login(self)
         ret = login.exec_()
         if ret != 0:
             self.fill()
         else:
             sys.exit()
     else:
         self.fill()
Example #2
0
 def __init__(self, parent=None):
     """
     Constructor
     """
     QMainWindow.__init__(self, parent)
     self.setupUi(self)
     if not config.username or not config.password:
         login = Login(self)
         login.setModal(True)
         login.show()
     self.setWindowTitle("Delicious bookmarks : %s : save a bookmark" % config.username)
     clipboard = unicode(QApplication.clipboard().text())
     log.debug(" detecting clipboard : %s", clipboard)
     if clipboard.startswith("http://"):
         self.url.setText(clipboard)
         self.url.setDisabled(True)
         self.show_url.setEnabled(True)
         self.title.setText(get_title(clipboard))
         self.tags.setFocus()