Exemple #1
0
 def accept(self):
     if self.checkOpen.isChecked():
         if self.targetList.has_key(unicode(self.comboOpen.currentText())):
             self.parent.settings.set("URL Dialog", "target", unicode(self.comboOpen.currentText()))
     else:
         if self.parent.settings.has_option("URL Dialog", "target"):
             self.parent.settings.remove_option("URL Dialog", "target")
         
     UrlDialog.accept(self)
Exemple #2
0
    def __init__(self, parent=None, name=None, modal=0, fl=0):
        UrlDialog.__init__(self, parent, name, modal, fl)
        # Hide these two until we've figured out how
        # to deal with them
        self.comboClass.hide()
        self.labelClass.hide()

        self.editUrl.setFocus()
        self.targetList['in new window'] = '_blank'
        self.targetList['in same window'] = '_top'
        self.targetList['in same frame'] = '_self'
        for key in self.targetList.keys():
            self.comboOpen.insertItem(key)
Exemple #3
0
 def __init__(self, parent = None, name = None, modal = 0, fl = 0):
     UrlDialog.__init__(self, parent, name, modal, fl)
     # Hide these two until we've figured out how
     # to deal with them
     self.parent = parent
     self.comboClass.hide()
     self.labelClass.hide()
     
     self.editUrl.setFocus()
     self.targetList['in new window'] = '_blank'
     self.targetList['in same window'] = '_top'
     self.targetList['in same frame'] = '_self'
     for key in self.targetList.keys():
         self.comboOpen.insertItem(key)
     target = unicode(self.parent.settings.get("URL Dialog", "target"))
     if self.parent.settings.has_option("URL Dialog", "target"):
         target = unicode(self.parent.settings.get("URL Dialog", "target"))
         self.checkOpen.setChecked(True)
         for counter in range(0, self.comboOpen.count()):
             if self.comboOpen.text(counter) == target:
                 self.comboOpen.setCurrentItem( counter )
                 break