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)
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