def __init__(self, aBg, title, caption, options, defOption) : """Initialize the defaults for the input boxes""" # build the resource which describes this particular preferences window self.options = options aDialogRsrc = self.buildChooserResource(title, caption, options, defOption) CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg
def __init__(self, aBg, title, description, links) : """Initialize the defaults for the input boxes.""" self.links = links # build the resource which describes this particular preferences window aDialogRsrc = self.buildAboutResource(title, description, links) CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg
def __init__(self, aBg, title = "", preferences = []) : """Initialize the defaults for the input boxes""" # build the resource which describes this particular preferences window self.prefs = preferences aDialogRsrc = self.buildPrefsResource(title, preferences) CustomDialog.__init__(self, aBg, aDialogRsrc) self.values = {} self.parent = aBg
def __init__(self, aBg, links=None): path = os.path.join(aBg.application.applicationDirectory, 'helpAbout') aDialogRsrc = resource.ResourceFile( model.internationalResourceName(path)).getResource() CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg # links is a 3-element list giving the HTML files to use for the About, Author # and License buttons if links is None: links = ['about.html', 'author.html', 'license.html'] self.links = links self.components.HtmlWindow.text = self.links[0]
def __init__(self, aBg, currentVersion): path = os.path.join(aBg.application.applicationDirectory, 'versionDialog') aDialogRsrc = resource.ResourceFile( model.internationalResourceName(path)).getResource() CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg vstring = string.split(currentVersion, '.') self.components.majorVersion.value = int(vstring[0]) self.components.minorVersion.value = int(vstring[1]) self.components.fixLevel.value = int(vstring[2]) + 1
def __init__(self, aBg, title, prefs, text) : """Initialize the defaults for the input boxes.""" self.reading = 0 self.location = 0 self.text = text self.delay = ("textScrollerDelay" in prefs) and prefs["textScrollerDelay"] or 0.3 self.words = ("textScrollerWords" in prefs) and prefs["textScrollerWords"] or 1 self.font = ("textScrollerFont" in prefs) and prefs["textScrollerFont"] or \ "{'style': 'bold', 'faceName': 'helvetica', 'family': 'sansSerif', 'size': 24}" # build the resource which describes this particular preferences window aDialogRsrc = self.buildSpeedReaderResource(title, prefs) CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg
def __init__(self, aBg, name, text, tree) : """Initialize the defaults for the input boxes.""" # build the resource which describes this particular preferences window aDialogRsrc = self.buildResource(name, text) CustomDialog.__init__(self, aBg, aDialogRsrc) #populate our tree with a copy of the tree passed in self.copyTree(tree, self.components.tree) self.parent = aBg self.accepted = False self.showModal() self.destroy()
def __init__(self, aBg): baseResourceName = 'newProjectWizard' path = os.path.join(aBg.application.applicationDirectory, baseResourceName) aDialogRsrc = resource.ResourceFile( model.internationalResourceName(path)).getResource() CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg self.addWizardPage(baseResourceName, 'Page1') self.addWizardPage(baseResourceName, 'Page2') self.addWizardPage(baseResourceName, 'Page3') self.addWizardPage(baseResourceName, 'Page4') self.maxPages = 4 self.pgCnt = 0 self.accepted = False self.setPage(self.pgCnt)
def __init__(self, aBg, name, text, items, parliamentInstance) : """Initialize the defaults for the input boxes.""" self.p = parliamentInstance # build the resource which describes this particular preferences window aDialogRsrc = self.buildResource(name, text) CustomDialog.__init__(self, aBg, aDialogRsrc) #populate our tree with a copy of the tree passed in #print `dir(self.components.tree.GetRootItem())` self.populateList(items, self.components.list) self.parent = aBg self.accepted = False self.showModal() self.destroy()
def __init__(self, aBg): path = os.path.join(aBg.application.applicationDirectory, 'propertiesDialog') aDialogRsrc = resource.ResourceFile( model.internationalResourceName(path)).getResource() CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg #try: self.components.buildPath.text = self.parent.pathJoin( self.parent.project.get('Project', 'buildfilespath')) self.components.distPath.text = self.parent.pathJoin( self.parent.project.get('Project', 'distfilespath')) self.components.pixmapsPath.text = self.parent.pathJoin( self.parent.project.get('Project', 'pixmapspath')) self.components.tarballPath.text = self.parent.pathJoin( self.parent.project.get('Project', 'tarballspath')) self.components.appPublisher.text = self.parent.project.get( 'Project', 'publisher') self.components.appURL.text = self.parent.project.get( 'Project', 'appurl') self.components.appLicence.text = self.parent.pathJoin( self.parent.project.get('Project', 'applicence')) self.components.asciiChk.checked = self.parent.project.getboolean( 'Project', 'ascii') self.components.striplibsChk.checked = self.parent.project.getboolean( 'Project', 'striplib') self.components.consoleChk.checked = self.parent.project.getboolean( 'Project', 'console') # best to have a coonsole for new projects! self.components.optimizeChk.checked = self.parent.project.getboolean( 'Project', 'optimize') self.components.compressChk.checked = self.parent.project.getboolean( 'Project', 'compress') self.components.debugChk.checked = self.parent.project.getboolean( 'Project', 'debug') if self.parent.project.getboolean('Project', 'onedir'): self.components.buildType.stringSelection = 'Single directory' else: self.components.buildType.stringSelection = 'Single file'
def __init__(self, aBg, cfgfile): path = os.path.join(aBg.application.applicationDirectory, 'prefsDialog') aDialogRsrc = resource.ResourceFile( model.internationalResourceName(path)).getResource() CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg self.CONFIG_FILE = cfgfile #if sys.platform.startswith('win'): self.fitToComponents(10,10) self.components.resEditPath.text = self.parent.cfg.get( 'ConfigData', 'reseditor') self.components.srcEditPath.text = self.parent.cfg.get( 'ConfigData', 'codeeditor') self.components.txtEditPath.text = self.parent.cfg.get( 'ConfigData', 'texteditor') self.components.pixmapEditPath.text = self.parent.cfg.get( 'ConfigData', 'pixmapeditor') self.components.installerPath.text = self.parent.cfg.get( 'ConfigData', 'installerpath') self.components.buildTool.stringSelection = self.parent.cfg.get( 'ConfigData', 'buildtool') if self.components.buildTool.stringSelection == 'py2exe': self.components.installerPath.enabled = False self.components.installerPathBtn.enabled = False self.components.installerPathHelpBtn.enabled = False else: self.components.installerPath.enabled = True self.components.installerPathBtn.enabled = True self.components.installerPathHelpBtn.enabled = True self.components.compilerPath.text = self.parent.cfg.get( 'ConfigData', 'compilerpath') self.components.appPublisher.text = self.parent.cfg.get( 'ConfigData', 'publisher') self.components.projectsPath.text = self.parent.cfg.get( 'ConfigData', 'projects')
def __init__(self, aBg, section='Defaults'): path = os.path.join(aBg.application.applicationDirectory, 'prefsDialog') aDialogRsrc = resource.ResourceFile( model.internationalResourceName(path)).getResource() CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg self.section = section # retrieve the right section from the config file self.components.sessionName.text = self.section if self.section == 'Defaults': self.components.portNumber.text = self.parent.cfg.get( self.section, 'port') self.components.userName.text = self.parent.cfg.get( self.section, 'user') self.components.identityFile.text = self.parent.cfg.get( self.section, 'identityfile') self.components.connectCmd.text = self.parent.cfg.get( self.section, 'command') self.components.sessionName.editable = 0 self.components.StaticText4.enabled = 0 self.components.hostName.enabled = 0 else: if self.section != 'NewSession': self.components.hostName.text = self.parent.cfg.get( self.section, 'hostname') self.components.portNumber.text = self.parent.cfg.get( self.section, 'port') self.components.userName.text = self.parent.cfg.get( self.section, 'user') self.components.identityFile.text = self.parent.cfg.get( self.section, 'identityfile') self.components.connectCmd.text = self.parent.cfg.get( self.section, 'command')