Esempio n. 1
0
    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]
Esempio n. 2
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
Esempio n. 3
0
 def setResourceFile(self):
     self.components.popComponentNames.items = []
     self.components.popComponentEvents.items = []
     try:
         self.resourceFilename = getResourceFilename(self.documentPath)
         self.rsrc = resource.ResourceFile(self.resourceFilename).getResource()
         self.rsrcComponents = {}
         if hasattr(self.rsrc, 'application'):
             components = self.rsrc.application.backgrounds[0].components
         else:
             # CustomDialog
             components = self.rsrc.components
         for c in components:
             self.rsrcComponents[c.name] = c.type
         items = self.rsrcComponents.keys()
         items.sort()
         self.components.popComponentNames.items = items
     except:
         pass
Esempio n. 4
0
    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)
Esempio n. 5
0
    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'
Esempio n. 6
0
    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')
Esempio n. 7
0
    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')