예제 #1
0
    def _createRavenInfoPage(self):
        self.infoPanel = wx.Panel(self.notebook, wx.ID_ANY)
        self.infoPanel.SetBackgroundColour(wx.WHITE)

        self.aboutBmp = getResourceRegistry().getBitmap(
            u"images/about/about.png")  #$NON-NLS-1$
        self.aboutImage = ZStaticBitmap(self.infoPanel, self.aboutBmp)

        ver = version.ZVersion()
        verDate = ZSchemaDateTime(ver.getBuildDate())

        self.versionLabelLabel = wx.StaticText(
            self.infoPanel, wx.ID_ANY,
            u"%s: " % _extstr(u"splash.Version"))  #$NON-NLS-1$ #$NON-NLS-2$
        self.versionLabelLabel.SetFont(getDefaultFontBold())
        self.versionLabel = wx.StaticText(self.infoPanel, wx.ID_ANY,
                                          ver.getFullVersionString())
        self.dateLabelLabel = wx.StaticText(
            self.infoPanel, wx.ID_ANY,
            u"%s: " % _extstr(u"splash.BuiltOn"))  #$NON-NLS-1$ #$NON-NLS-2$
        self.dateLabelLabel.SetFont(getDefaultFontBold())
        self.dateLabel = wx.StaticText(self.infoPanel, wx.ID_ANY,
                                       verDate.toString(localTime=True))

        return self.infoPanel
예제 #2
0
    def _createSplashPanel(self, parent):
        ver = version.ZVersion()
        verDate = ZSchemaDateTime(ver.getBuildDate())

        panel = wx.Panel(parent, wx.ID_ANY)
        panel.SetBackgroundColour(wx.WHITE)
        splashFilename = u"splash.png" #$NON-NLS-1$
        if isPortableEnabled():
            splashFilename = u"splash_portable.png" #$NON-NLS-1$
        bitmap = getResourceRegistry().getBitmap(u"images/splash/%s" % splashFilename) #$NON-NLS-1$
        splashImage = ZStaticBitmap(panel, bitmap)
        
        versionLabelLabel = wx.StaticText(panel, wx.ID_ANY, u"%s: " % _extstr(u"splash.Version")) #$NON-NLS-1$ #$NON-NLS-2$
        versionLabelLabel.SetFont(getDefaultFontBold())
        versionLabel = wx.StaticText(panel, wx.ID_ANY, ver.getFullVersionString())
        dateLabelLabel = wx.StaticText(panel, wx.ID_ANY, u"%s: " % _extstr(u"splash.BuiltOn")) #$NON-NLS-1$ #$NON-NLS-2$
        dateLabelLabel.SetFont(getDefaultFontBold())
        dateLabel = wx.StaticText(panel, wx.ID_ANY, verDate.toString(localTime = True))
        
        verAndDateSizer = wx.BoxSizer(wx.HORIZONTAL)
        verAndDateSizer.Add(versionLabelLabel, 0, wx.EXPAND | wx.RIGHT, 2)
        verAndDateSizer.Add(versionLabel, 0, wx.EXPAND | wx.RIGHT, 10)
        verAndDateSizer.Add(dateLabelLabel, 0, wx.EXPAND | wx.RIGHT, 2)
        verAndDateSizer.Add(dateLabel, 0, wx.EXPAND)
        
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(splashImage, 0, wx.EXPAND)
        sizer.AddSizer(verAndDateSizer, 0, wx.EXPAND | wx.ALL, 5)
        
        panel.SetSizer(sizer)
        panel.SetAutoLayout(True)
        
        return panel
예제 #3
0
    def _createHeaderPanel(self, parent):
        panel = wx.Panel(parent, wx.ID_ANY)
        panel.SetBackgroundColour(wx.WHITE)

        self.headerLink = wx.HyperlinkCtrl(panel, wx.ID_ANY,
                                           self._getHeaderTitle(),
                                           self._getHeaderHelpURL())
        self.headerLink.SetFont(getDefaultFontBold())
        self.headerMessage = wx.StaticText(panel, wx.ID_ANY,
                                           self._getHeaderMessage())
        headerImagePath = self._getHeaderImagePath()
        if not headerImagePath:
            headerImagePath = u"images/dialogs/image/header_image.png"  #$NON-NLS-1$
        self.headerIcon = ZStaticBitmap(
            panel,
            getResourceRegistry().getBitmap(headerImagePath))

        linkAndMsgSizer = wx.BoxSizer(wx.VERTICAL)
        linkAndMsgSizer.Add(self.headerLink, 0, wx.ALL, 2)
        linkAndMsgSizer.Add(self.headerMessage, 1, wx.EXPAND | wx.ALL, 2)

        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.AddSizer(linkAndMsgSizer, 1, wx.EXPAND | wx.ALL, 5)
        sizer.Add(self.headerIcon, 0, wx.EXPAND | wx.ALL, 10)

        panel.SetAutoLayout(True)
        panel.SetSizer(sizer)

        return panel
예제 #4
0
    def _createPanelWidgets(self):
        self.titleText = wx.StaticText(self, wx.ID_ANY, self.task.getName())
        self.titleText.SetFont(getDefaultFontBold())

        startTime = u"    %s %s" % (_extstr(u"bgtaskpanel.StartedOn"), self.task.getStartTime().toString(u"%c", True)) #$NON-NLS-2$ #$NON-NLS-1$ #$NON-NLS-3$
        self.startTimeText = wx.StaticText(self, wx.ID_ANY, startTime)

        errorBmp = getResourceRegistry().getBitmap(u"images/dialogs/bgtasks/manager/error-glyph.png") #$NON-NLS-1$
        self.errorGlyph = ZImageButton(self, errorBmp, True)
        infoBmp = getResourceRegistry().getBitmap(u"images/dialogs/bgtasks/manager/info-glyph.png") #$NON-NLS-1$
        self.infoGlyph = ZImageButton(self, infoBmp, True)
        stopBmp = getResourceRegistry().getBitmap(u"images/dialogs/bgtasks/manager/stop-glyph.png") #$NON-NLS-1$
        self.stopGlyph = ZImageButton(self, stopBmp, True)

        # Progress widgets - only visible while task is running.
        self.progressGauge = wx.Gauge(self, wx.ID_ANY, self.task.getNumWorkUnits())
        self.progressGauge.SetSizeHints(-1, 14)
        self.progressText = wx.StaticText(self, wx.ID_ANY, u"") #$NON-NLS-1$
        self.statusText = wx.StaticText(self, wx.ID_ANY, u"") #$NON-NLS-1$

        self.cancelButton = ZImageButton(self, getResourceRegistry().getBitmap(u"images/dialogs/bgtasks/manager/cancel.png")) #$NON-NLS-1$
        self.cancelButton.SetToolTipString(_extstr(u"bgtaskpanel.CancelTask")) #$NON-NLS-1$
        self.pauseButton = ZImageButton(self, getResourceRegistry().getBitmap(u"images/dialogs/bgtasks/manager/pause.png")) #$NON-NLS-1$
        self.pauseButton.SetToolTipString(_extstr(u"bgtaskpanel.PauseTask")) #$NON-NLS-1$

        # Widgets that are only shown when the task is complete
        self.endTimeText = wx.StaticText(self, wx.ID_ANY, u"") #$NON-NLS-1$

        self.removeButton = ZImageButton(self, getResourceRegistry().getBitmap(u"images/dialogs/bgtasks/manager/remove.png")) #$NON-NLS-1$
        self.removeButton.SetToolTipString(_extstr(u"bgtaskpanel.RemoveTask")) #$NON-NLS-1$

        self.staticLine = wx.StaticLine(self)
예제 #5
0
 def _buildMenu(self):
     for menuNode in self._getMenuNodes():
         if self.contentProvider.isSeparator(menuNode):
             menuItem = ZMenuSeparator(menuNode, self)
             menuItemId = self.AppendItem(menuItem).GetId()
             self.idToMenuItemMap[menuItemId] = menuItem
         elif self.contentProvider.isMenuGroup(menuNode):
             if self.contentProvider.isVisible(menuNode):
                 submenu = ZMenu(self.parent, menuNode, self.contentProvider, self.eventHandler)
                 name = self.contentProvider.getMenuNodeName(menuNode)
                 helpStr = self.contentProvider.getMenuNodeDescription(menuNode)
                 menuItem = self.AppendMenu(wx.NewId(), name, submenu, helpStr)
                 menuItemId = menuItem.GetId()
                 self.idToMenuItemMap[menuItemId] = submenu
                 self.Enable(menuItemId, self.contentProvider.isEnabled(menuNode))
         else:
             if self.contentProvider.isVisible(menuNode):
                 menuItem = ZMenuItem(self, menuNode, self.contentProvider, self.eventHandler)
                 if self.contentProvider.isBold(menuNode):
                     menuItem.SetFont(getDefaultFontBold())
                 menuItemId = self.AppendItem(menuItem).GetId()
                 self.idToMenuItemMap[menuItemId] = menuItem
                 self._bindMenuItem(menuItem)
                 self.Enable(menuItemId, self.contentProvider.isEnabled(menuNode))
                 if self.contentProvider.isChecked(menuNode):
                     self.Check(menuItemId, True)
예제 #6
0
 def _createWidgets(self):
     self.description1 = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(u"mediastoragewizard.WelcomeMessage"))  #$NON-NLS-1$
     self.description1.SetFont(getDefaultFontBold())
     self.description2 = wx.StaticText(
         self,
         wx.ID_ANY,
         _extstr(u"mediastoragewizard.WizardDescription"),
         size=wx.Size(-1, 80))  #$NON-NLS-1$
     self.siteLabel = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(u"mediastoragewizard.MediaStorageType"))  #$NON-NLS-1$
     comboValidator = ZNonEmptySelectionValidator(
         _extstr(u"mediastoragewizard.EmptyStoreTypeSelectionError")
     )  #$NON-NLS-1$
     self.siteCombo = ZValidatingBitmapComboBox(comboValidator,
                                                self,
                                                wx.ID_ANY,
                                                style=wx.CB_READONLY)
     self.siteCombo.SetToolTipString(
         _extstr(u"mediastoragewizard.StoreTypeComboTooltip"))  #$NON-NLS-1$
     self.nameLabel = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(u"mediastoragewizard.MediaStorageName"))  #$NON-NLS-1$
     nameValidator = ZMediaStorageNameValidator(self._getModel())
     self.nameText = ZValidatingTextCtrl(nameValidator, self, wx.ID_ANY)
     self.nameText.SetToolTipString(
         _extstr(
             u"mediastoragewizard.MediaStorageNameTooltip"))  #$NON-NLS-1$
     self.clickHereHyperlink = wx.HyperlinkCtrl(
         self, wx.ID_ANY, _extstr(u"mediastoragewizard.NoStorageLink"),
         u"http://picasaweb.google.com/?ref=ZoundryRaven"
     )  #$NON-NLS-2$ #$NON-NLS-1$
예제 #7
0
    def _createWidgets(self):
        self.description1 = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.ApiInfo")) #$NON-NLS-1$
        self.description1.SetFont(getDefaultFontBold())
        self.description2 = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.ApiInfoDescription"), size = wx.Size(-1, 40)) #$NON-NLS-1$

        self.accLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.AccountNameLabel")) #$NON-NLS-1$
        accNameValidator = ZPublisherAccountNameValidator( self._getModel() )
        self.accText = ZValidatingTextCtrl(accNameValidator, self, wx.ID_ANY)
        self.accText.SetToolTipString(_extstr(u"publishersitewizard.AccountNameTooltip")) #$NON-NLS-1$

        self.siteLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.SiteTypeLabel")) #$NON-NLS-1$
        comboValidator = ZNonEmptySelectionValidator(_extstr(u"publishersitewizard.EmptySiteTypeSelectionError")) #$NON-NLS-1$
        self.siteCombo = ZValidatingBitmapComboBox(comboValidator, self, wx.ID_ANY, style = wx.CB_READONLY)
        self.siteCombo.SetToolTipString(_extstr(u"publishersitewizard.SiteTypeTooltip")) #$NON-NLS-1$
        self.Bind(wx.EVT_COMBOBOX, self.onComboEvent, self.siteCombo.widget)

        self.autodiscoveryHint = wx.StaticText(self, wx.ID_ANY, u"") #$NON-NLS-1$

        self.usernameLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.UsernameLabel")) #$NON-NLS-1$
        usernameValidator = ZNonEmptySelectionValidator(_extstr(u"publishersitewizard.EmptyUsername")) #$NON-NLS-1$
        self.usernameText = ZValidatingTextCtrl(usernameValidator, self, wx.ID_ANY)
        self.usernameText.SetToolTipString(_extstr(u"publishersitewizard.UsernameTooltip")) #$NON-NLS-1$

        self.passwordLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.PasswordLabel")) #$NON-NLS-1$
        passwordValidator = ZNonEmptySelectionValidator(_extstr(u"publishersitewizard.EmptyPassword")) #$NON-NLS-1$
        self.passwordText = ZValidatingTextCtrl(passwordValidator, self, wx.ID_ANY, style=wx.TE_PASSWORD )
        self.passwordText.SetToolTipString(_extstr(u"publishersitewizard.PasswordTooltip")) #$NON-NLS-1$

        self.apiUrlLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.ApiUrlLabel")) #$NON-NLS-1$
        apiUrlValidator = ZUrlSelectionValidator(_extstr(u"publishersitewizard.ApiUrlInvalid")) #$NON-NLS-1$
        self.apiUrlText = ZValidatingTextCtrl(apiUrlValidator, self, wx.ID_ANY)
        self.apiUrlText.SetToolTipString(_extstr(u"publishersitewizard.ApiUrlTooltip")) #$NON-NLS-1$
        self.apiUrlHint = wx.StaticText(self, wx.ID_ANY, u"Api Url hints") #$NON-NLS-1$
        self.animateControl = ZProgressLabelCtrl(self)
예제 #8
0
 def _createWidgets(self):
     self.description1 = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(u"publishersitewizard.Confirm"))  #$NON-NLS-1$
     self.description1.SetFont(getDefaultFontBold())
     self.description2 = wx.StaticText(
         self,
         wx.ID_ANY,
         _extstr(u"publishersitewizard.ConfirmDescription"),
         size=wx.Size(-1, 40))  #$NON-NLS-1$
     self.staticBox = wx.StaticBox(
         self, wx.ID_ANY, _extstr(u"accountblogs.BlogList"))  #$NON-NLS-1$
     self.blogListControl = ZCheckBoxListViewWithButtons(
         self.blogListProvider, self)
     self.mediaUploadLabel = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(
             u"publishersitewizard.MediaUploadMethodLabel"))  #$NON-NLS-1$
     comboValidator = ZNullControlValidator()
     self.mediaUploadCombo = ZValidatingBitmapComboBox(comboValidator,
                                                       self,
                                                       wx.ID_ANY,
                                                       style=wx.CB_READONLY)
     self.mediaUploadCombo.SetToolTipString(
         _extstr(
             u"publishersitewizard.MediaUploadMethodTooltip"))  #$NON-NLS-1$
     self.mediaWizardButton = wx.Button(
         self, wx.ID_ANY,
         _extstr(
             u"publishersitewizard.CreateNewMediaStorage"))  #$NON-NLS-1$
예제 #9
0
    def _createRavenInfoPage(self):
        self.infoPanel = wx.Panel(self.notebook, wx.ID_ANY)
        self.infoPanel.SetBackgroundColour(wx.WHITE)

        self.aboutBmp = getResourceRegistry().getBitmap(u"images/about/about.png") #$NON-NLS-1$
        self.aboutImage = ZStaticBitmap(self.infoPanel, self.aboutBmp)

        ver = version.ZVersion()
        verDate = ZSchemaDateTime(ver.getBuildDate())

        self.versionLabelLabel = wx.StaticText(self.infoPanel, wx.ID_ANY, u"%s: " % _extstr(u"splash.Version")) #$NON-NLS-1$ #$NON-NLS-2$
        self.versionLabelLabel.SetFont(getDefaultFontBold())
        self.versionLabel = wx.StaticText(self.infoPanel, wx.ID_ANY, ver.getFullVersionString())
        self.dateLabelLabel = wx.StaticText(self.infoPanel, wx.ID_ANY, u"%s: " % _extstr(u"splash.BuiltOn")) #$NON-NLS-1$ #$NON-NLS-2$
        self.dateLabelLabel.SetFont(getDefaultFontBold())
        self.dateLabel = wx.StaticText(self.infoPanel, wx.ID_ANY, verDate.toString(localTime = True))

        return self.infoPanel
예제 #10
0
 def createWidgets(self):
     self.localeDetailsStaticBox = wx.StaticBox(self, wx.ID_ANY)
     self.defaultLocaleLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"localeprefpage.DefaultLocale")) #$NON-NLS-1$
     self.defaultLocaleLabel.SetFont(getDefaultFontBold())
     self.defaultLocale = wx.StaticText(self, wx.ID_ANY, u"") #$NON-NLS-1$
     self.defaultLocaleBitmap = wx.StaticBitmap(self, wx.ID_ANY, wx.NullBitmap)
     self.overrideCB = wx.CheckBox(self, wx.ID_ANY, _extstr(u"localeprefpage.OverrideDefaultLocale")) #$NON-NLS-1$
     provider = self._createLocaleListProvider()
     self.localeList = ZListView(provider, self, style = wx.LC_VIRTUAL | wx.LC_REPORT | wx.LC_SINGLE_SEL)
예제 #11
0
 def createWidgets(self):
     self.warningMsg = wx.StaticText(self, wx.ID_ANY, _extstr(u"personaldictprefpage.SpellCheckingMustBeEnabled")) #$NON-NLS-1$
     self.warningMsg.SetFont(getDefaultFontBold())
     self.staticBox = wx.StaticBox(self, wx.ID_ANY)
     provider = ZPersonalDictionaryContentProvider(self.model)
     self.personalDictionaryListView = ZListViewEx(provider, self)
     self.addButton = wx.Button(self, wx.ID_ANY, _extstr(u"personaldictprefpage.Add")) #$NON-NLS-1$
     self.removeButton = wx.Button(self, wx.ID_ANY, _extstr(u"personaldictprefpage.Remove")) #$NON-NLS-1$
     self.clearButton = wx.Button(self, wx.ID_ANY, _extstr(u"personaldictprefpage.Clear")) #$NON-NLS-1$
예제 #12
0
 def _createWidgets(self):
     self.description1 = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.WelcomeMessage")) #$NON-NLS-1$
     self.description1.SetFont(getDefaultFontBold())
     self.description2 = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.WizardDescription"), size = wx.Size(-1, 80)) #$NON-NLS-1$
     self.urlLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.BlogUrlLabel")) #$NON-NLS-1$
     urlValidator = ZUrlSelectionValidator(_extstr(u"publishersitewizard.BlogUrlInvalid"), nonEmpty=False) #$NON-NLS-1$
     self.urlText = ZValidatingTextCtrl(urlValidator, self, wx.ID_ANY)
     self.urlText.SetToolTipString(_extstr(u"publishersitewizard.BlogUrlTooltip")) #$NON-NLS-1$
     self.animateControl = ZProgressLabelCtrl(self)
     self.clickHereHyperlink = wx.HyperlinkCtrl(self, wx.ID_ANY, _extstr(u"publishersitewizard.NoBlogYet"), u"http://www.blogger.com/?ref=ZoundryRaven") #$NON-NLS-2$ #$NON-NLS-1$
예제 #13
0
    def _createWidgets(self):
        self.staticBox = wx.StaticBox(self, wx.ID_ANY, _extstr(u"infodetailswidgets.Summary")) #$NON-NLS-1$

        boldFont = getDefaultFontBold()

        self.fileSizeLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"infodetailswidgets.FileSize")) #$NON-NLS-1$
        self.fileSizeLabel.SetFont(boldFont)
        self.fileSize = wx.StaticText(self, wx.ID_ANY, u"") #$NON-NLS-1$
        self.linkTypeLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"infodetailswidgets.LinkType")) #$NON-NLS-1$
        self.linkTypeLabel.SetFont(boldFont)
        self.linkType = wx.StaticText(self, wx.ID_ANY, u"") #$NON-NLS-1$
예제 #14
0
 def _createWidgets(self):
     self.description1 = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.Confirm")) #$NON-NLS-1$
     self.description1.SetFont(getDefaultFontBold())
     self.description2 = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.ConfirmDescription"), size = wx.Size(-1, 40)) #$NON-NLS-1$
     self.staticBox = wx.StaticBox(self, wx.ID_ANY, _extstr(u"accountblogs.BlogList")) #$NON-NLS-1$
     self.blogListControl = ZCheckBoxListViewWithButtons(self.blogListProvider, self)
     self.mediaUploadLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"publishersitewizard.MediaUploadMethodLabel")) #$NON-NLS-1$
     comboValidator = ZNullControlValidator()
     self.mediaUploadCombo = ZValidatingBitmapComboBox(comboValidator, self, wx.ID_ANY, style = wx.CB_READONLY)
     self.mediaUploadCombo.SetToolTipString(_extstr(u"publishersitewizard.MediaUploadMethodTooltip")) #$NON-NLS-1$
     self.mediaWizardButton = wx.Button(self, wx.ID_ANY, _extstr(u"publishersitewizard.CreateNewMediaStorage")) #$NON-NLS-1$
예제 #15
0
 def _createWidgets(self):
     self.titleLabel = wx.StaticText(self, wx.ID_ANY, u"")  #$NON-NLS-1$
     self.titleLabel.SetFont(getDefaultFontBold())
     self.progressMeter = wx.Gauge(self,
                                   wx.ID_ANY,
                                   100,
                                   size=wx.Size(-1, 12))
     self.progressText = wx.StaticText(self, wx.ID_ANY, u"")  #$NON-NLS-1$
     self.cancelButton = wx.Button(
         self, wx.ID_ANY,
         _extstr(u"dictdownloadpanel.Cancel"))  #$NON-NLS-1$
예제 #16
0
파일: splash.py 프로젝트: mpm2050/Raven
    def _createSplashPanel(self, parent):
        ver = version.ZVersion()
        verDate = ZSchemaDateTime(ver.getBuildDate())

        panel = wx.Panel(parent, wx.ID_ANY)
        panel.SetBackgroundColour(wx.WHITE)
        splashFilename = u"splash.png"  #$NON-NLS-1$
        if isPortableEnabled():
            splashFilename = u"splash_portable.png"  #$NON-NLS-1$
        bitmap = getResourceRegistry().getBitmap(u"images/splash/%s" %
                                                 splashFilename)  #$NON-NLS-1$
        splashImage = ZStaticBitmap(panel, bitmap)

        versionLabelLabel = wx.StaticText(
            panel, wx.ID_ANY,
            u"%s: " % _extstr(u"splash.Version"))  #$NON-NLS-1$ #$NON-NLS-2$
        versionLabelLabel.SetFont(getDefaultFontBold())
        versionLabel = wx.StaticText(panel, wx.ID_ANY,
                                     ver.getFullVersionString())
        dateLabelLabel = wx.StaticText(
            panel, wx.ID_ANY,
            u"%s: " % _extstr(u"splash.BuiltOn"))  #$NON-NLS-1$ #$NON-NLS-2$
        dateLabelLabel.SetFont(getDefaultFontBold())
        dateLabel = wx.StaticText(panel, wx.ID_ANY,
                                  verDate.toString(localTime=True))

        verAndDateSizer = wx.BoxSizer(wx.HORIZONTAL)
        verAndDateSizer.Add(versionLabelLabel, 0, wx.EXPAND | wx.RIGHT, 2)
        verAndDateSizer.Add(versionLabel, 0, wx.EXPAND | wx.RIGHT, 10)
        verAndDateSizer.Add(dateLabelLabel, 0, wx.EXPAND | wx.RIGHT, 2)
        verAndDateSizer.Add(dateLabel, 0, wx.EXPAND)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(splashImage, 0, wx.EXPAND)
        sizer.AddSizer(verAndDateSizer, 0, wx.EXPAND | wx.ALL, 5)

        panel.SetSizer(sizer)
        panel.SetAutoLayout(True)

        return panel
예제 #17
0
 def _createWidgets(self):
     self.description1 = wx.StaticText(self, wx.ID_ANY, _extstr(u"mediastoragewizard.WelcomeMessage")) #$NON-NLS-1$
     self.description1.SetFont(getDefaultFontBold())
     self.description2 = wx.StaticText(self, wx.ID_ANY, _extstr(u"mediastoragewizard.WizardDescription"), size = wx.Size(-1, 80)) #$NON-NLS-1$
     self.siteLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"mediastoragewizard.MediaStorageType")) #$NON-NLS-1$
     comboValidator = ZNonEmptySelectionValidator(_extstr(u"mediastoragewizard.EmptyStoreTypeSelectionError")) #$NON-NLS-1$
     self.siteCombo = ZValidatingBitmapComboBox(comboValidator, self, wx.ID_ANY, style = wx.CB_READONLY)
     self.siteCombo.SetToolTipString(_extstr(u"mediastoragewizard.StoreTypeComboTooltip")) #$NON-NLS-1$
     self.nameLabel = wx.StaticText(self, wx.ID_ANY, _extstr(u"mediastoragewizard.MediaStorageName")) #$NON-NLS-1$
     nameValidator = ZMediaStorageNameValidator(self._getModel())
     self.nameText = ZValidatingTextCtrl(nameValidator, self, wx.ID_ANY)
     self.nameText.SetToolTipString(_extstr(u"mediastoragewizard.MediaStorageNameTooltip")) #$NON-NLS-1$
     self.clickHereHyperlink = wx.HyperlinkCtrl(self, wx.ID_ANY, _extstr(u"mediastoragewizard.NoStorageLink"), u"http://picasaweb.google.com/?ref=ZoundryRaven") #$NON-NLS-2$ #$NON-NLS-1$
예제 #18
0
    def _createPanelWidgets(self):
        self.titleText = wx.StaticText(self, wx.ID_ANY, self.task.getName())
        self.titleText.SetFont(getDefaultFontBold())

        startTime = u"    %s %s" % (_extstr(u"bgtaskpanel.StartedOn"),
                                    self.task.getStartTime().toString(
                                        u"%c", True)
                                    )  #$NON-NLS-2$ #$NON-NLS-1$ #$NON-NLS-3$
        self.startTimeText = wx.StaticText(self, wx.ID_ANY, startTime)

        errorBmp = getResourceRegistry().getBitmap(
            u"images/dialogs/bgtasks/manager/error-glyph.png")  #$NON-NLS-1$
        self.errorGlyph = ZImageButton(self, errorBmp, True)
        infoBmp = getResourceRegistry().getBitmap(
            u"images/dialogs/bgtasks/manager/info-glyph.png")  #$NON-NLS-1$
        self.infoGlyph = ZImageButton(self, infoBmp, True)
        stopBmp = getResourceRegistry().getBitmap(
            u"images/dialogs/bgtasks/manager/stop-glyph.png")  #$NON-NLS-1$
        self.stopGlyph = ZImageButton(self, stopBmp, True)

        # Progress widgets - only visible while task is running.
        self.progressGauge = wx.Gauge(self, wx.ID_ANY,
                                      self.task.getNumWorkUnits())
        self.progressGauge.SetSizeHints(-1, 14)
        self.progressText = wx.StaticText(self, wx.ID_ANY, u"")  #$NON-NLS-1$
        self.statusText = wx.StaticText(self, wx.ID_ANY, u"")  #$NON-NLS-1$

        self.cancelButton = ZImageButton(
            self,
            getResourceRegistry().getBitmap(
                u"images/dialogs/bgtasks/manager/cancel.png"))  #$NON-NLS-1$
        self.cancelButton.SetToolTipString(
            _extstr(u"bgtaskpanel.CancelTask"))  #$NON-NLS-1$
        self.pauseButton = ZImageButton(
            self,
            getResourceRegistry().getBitmap(
                u"images/dialogs/bgtasks/manager/pause.png"))  #$NON-NLS-1$
        self.pauseButton.SetToolTipString(
            _extstr(u"bgtaskpanel.PauseTask"))  #$NON-NLS-1$

        # Widgets that are only shown when the task is complete
        self.endTimeText = wx.StaticText(self, wx.ID_ANY, u"")  #$NON-NLS-1$

        self.removeButton = ZImageButton(
            self,
            getResourceRegistry().getBitmap(
                u"images/dialogs/bgtasks/manager/remove.png"))  #$NON-NLS-1$
        self.removeButton.SetToolTipString(
            _extstr(u"bgtaskpanel.RemoveTask"))  #$NON-NLS-1$

        self.staticLine = wx.StaticLine(self)
예제 #19
0
    def __init__(self, parent, model):
        self.model = model
        self.blog = None

        wx.combo.ComboCtrl.__init__(self, parent, style=wx.CB_READONLY)

        self.SetFont(getDefaultFontBold())
        self.UseAltPopupWindow(True)
        self.popupCtrl = self._createPopupControl()
        self.SetPopupControl(self.popupCtrl)
        self.SetPopupMaxHeight(min(self.popupCtrl.getPreferredHeight(), 250))
        self.SetValue(u"")  #$NON-NLS-1$

        self.Bind(ZEVT_BLOG_SELECTOR_COMBO, self.onSelection, self)
예제 #20
0
    def __init__(self, parent, model):
        self.model = model
        self.blog = None

        wx.combo.ComboCtrl.__init__(self, parent, style = wx.CB_READONLY)

        self.SetFont(getDefaultFontBold())
        self.UseAltPopupWindow(True)
        self.popupCtrl = self._createPopupControl()
        self.SetPopupControl(self.popupCtrl)
        self.SetPopupMaxHeight(min(self.popupCtrl.getPreferredHeight(), 250))
        self.SetValue(u"") #$NON-NLS-1$

        self.Bind(ZEVT_BLOG_SELECTOR_COMBO, self.onSelection, self)
예제 #21
0
    def _createWidgets(self):
        self.staticBox = wx.StaticBox(
            self, wx.ID_ANY,
            _extstr(u"infodetailswidgets.Summary"))  #$NON-NLS-1$

        boldFont = getDefaultFontBold()

        self.fileSizeLabel = wx.StaticText(
            self, wx.ID_ANY,
            _extstr(u"infodetailswidgets.FileSize"))  #$NON-NLS-1$
        self.fileSizeLabel.SetFont(boldFont)
        self.fileSize = wx.StaticText(self, wx.ID_ANY, u"")  #$NON-NLS-1$
        self.linkTypeLabel = wx.StaticText(
            self, wx.ID_ANY,
            _extstr(u"infodetailswidgets.LinkType"))  #$NON-NLS-1$
        self.linkTypeLabel.SetFont(boldFont)
        self.linkType = wx.StaticText(self, wx.ID_ANY, u"")  #$NON-NLS-1$
예제 #22
0
 def createWidgets(self):
     self.warningMsg = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(u"personaldictprefpage.SpellCheckingMustBeEnabled"
                 ))  #$NON-NLS-1$
     self.warningMsg.SetFont(getDefaultFontBold())
     self.staticBox = wx.StaticBox(self, wx.ID_ANY)
     provider = ZPersonalDictionaryContentProvider(self.model)
     self.personalDictionaryListView = ZListViewEx(provider, self)
     self.addButton = wx.Button(
         self, wx.ID_ANY,
         _extstr(u"personaldictprefpage.Add"))  #$NON-NLS-1$
     self.removeButton = wx.Button(
         self, wx.ID_ANY,
         _extstr(u"personaldictprefpage.Remove"))  #$NON-NLS-1$
     self.clearButton = wx.Button(
         self, wx.ID_ANY,
         _extstr(u"personaldictprefpage.Clear"))  #$NON-NLS-1$
예제 #23
0
    def _createHeaderPanel(self, parent):
        panel = wx.Panel(parent, wx.ID_ANY)
        panel.SetBackgroundColour(wx.WHITE)

        self.headerLink = wx.HyperlinkCtrl(panel, wx.ID_ANY, self._getHeaderTitle(), self._getHeaderHelpURL())
        self.headerLink.SetFont(getDefaultFontBold())
        self.headerMessage = wx.StaticText(panel, wx.ID_ANY, self._getHeaderMessage())
        headerImagePath = self._getHeaderImagePath()
        if not headerImagePath:
            headerImagePath = u"images/dialogs/image/header_image.png" #$NON-NLS-1$
        self.headerIcon = ZStaticBitmap(panel, getResourceRegistry().getBitmap(headerImagePath))

        linkAndMsgSizer = wx.BoxSizer(wx.VERTICAL)
        linkAndMsgSizer.Add(self.headerLink, 0, wx.ALL, 2)
        linkAndMsgSizer.Add(self.headerMessage, 1, wx.EXPAND | wx.ALL, 2)

        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.AddSizer(linkAndMsgSizer, 1, wx.EXPAND | wx.ALL, 5)
        sizer.Add(self.headerIcon, 0, wx.EXPAND | wx.ALL, 10)

        panel.SetAutoLayout(True)
        panel.SetSizer(sizer)

        return panel
예제 #24
0
 def _createWidgets(self):
     self.description1 = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(u"publishersitewizard.WelcomeMessage"))  #$NON-NLS-1$
     self.description1.SetFont(getDefaultFontBold())
     self.description2 = wx.StaticText(
         self,
         wx.ID_ANY,
         _extstr(u"publishersitewizard.WizardDescription"),
         size=wx.Size(-1, 80))  #$NON-NLS-1$
     self.urlLabel = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(u"publishersitewizard.BlogUrlLabel"))  #$NON-NLS-1$
     urlValidator = ZUrlSelectionValidator(
         _extstr(u"publishersitewizard.BlogUrlInvalid"),
         nonEmpty=False)  #$NON-NLS-1$
     self.urlText = ZValidatingTextCtrl(urlValidator, self, wx.ID_ANY)
     self.urlText.SetToolTipString(
         _extstr(u"publishersitewizard.BlogUrlTooltip"))  #$NON-NLS-1$
     self.animateControl = ZProgressLabelCtrl(self)
     self.clickHereHyperlink = wx.HyperlinkCtrl(
         self, wx.ID_ANY, _extstr(u"publishersitewizard.NoBlogYet"),
         u"http://www.blogger.com/?ref=ZoundryRaven"
     )  #$NON-NLS-2$ #$NON-NLS-1$
예제 #25
0
 def _createWidgets(self):
     self.titleLabel = wx.StaticText(self, wx.ID_ANY, u"") #$NON-NLS-1$
     self.titleLabel.SetFont(getDefaultFontBold())
     self.progressMeter = wx.Gauge(self, wx.ID_ANY, 100, size = wx.Size(-1, 12))
     self.progressText = wx.StaticText(self, wx.ID_ANY, u"") #$NON-NLS-1$
     self.cancelButton = wx.Button(self, wx.ID_ANY, _extstr(u"dictdownloadpanel.Cancel")) #$NON-NLS-1$
예제 #26
0
    def _createWidgets(self):
        self.description1 = wx.StaticText(
            self, wx.ID_ANY,
            _extstr(u"publishersitewizard.ApiInfo"))  #$NON-NLS-1$
        self.description1.SetFont(getDefaultFontBold())
        self.description2 = wx.StaticText(
            self,
            wx.ID_ANY,
            _extstr(u"publishersitewizard.ApiInfoDescription"),
            size=wx.Size(-1, 40))  #$NON-NLS-1$

        self.accLabel = wx.StaticText(
            self, wx.ID_ANY,
            _extstr(u"publishersitewizard.AccountNameLabel"))  #$NON-NLS-1$
        accNameValidator = ZPublisherAccountNameValidator(self._getModel())
        self.accText = ZValidatingTextCtrl(accNameValidator, self, wx.ID_ANY)
        self.accText.SetToolTipString(
            _extstr(u"publishersitewizard.AccountNameTooltip"))  #$NON-NLS-1$

        self.siteLabel = wx.StaticText(
            self, wx.ID_ANY,
            _extstr(u"publishersitewizard.SiteTypeLabel"))  #$NON-NLS-1$
        comboValidator = ZNonEmptySelectionValidator(
            _extstr(u"publishersitewizard.EmptySiteTypeSelectionError")
        )  #$NON-NLS-1$
        self.siteCombo = ZValidatingBitmapComboBox(comboValidator,
                                                   self,
                                                   wx.ID_ANY,
                                                   style=wx.CB_READONLY)
        self.siteCombo.SetToolTipString(
            _extstr(u"publishersitewizard.SiteTypeTooltip"))  #$NON-NLS-1$
        self.Bind(wx.EVT_COMBOBOX, self.onComboEvent, self.siteCombo.widget)

        self.autodiscoveryHint = wx.StaticText(self, wx.ID_ANY,
                                               u"")  #$NON-NLS-1$

        self.usernameLabel = wx.StaticText(
            self, wx.ID_ANY,
            _extstr(u"publishersitewizard.UsernameLabel"))  #$NON-NLS-1$
        usernameValidator = ZNonEmptySelectionValidator(
            _extstr(u"publishersitewizard.EmptyUsername"))  #$NON-NLS-1$
        self.usernameText = ZValidatingTextCtrl(usernameValidator, self,
                                                wx.ID_ANY)
        self.usernameText.SetToolTipString(
            _extstr(u"publishersitewizard.UsernameTooltip"))  #$NON-NLS-1$

        self.passwordLabel = wx.StaticText(
            self, wx.ID_ANY,
            _extstr(u"publishersitewizard.PasswordLabel"))  #$NON-NLS-1$
        passwordValidator = ZNonEmptySelectionValidator(
            _extstr(u"publishersitewizard.EmptyPassword"))  #$NON-NLS-1$
        self.passwordText = ZValidatingTextCtrl(passwordValidator,
                                                self,
                                                wx.ID_ANY,
                                                style=wx.TE_PASSWORD)
        self.passwordText.SetToolTipString(
            _extstr(u"publishersitewizard.PasswordTooltip"))  #$NON-NLS-1$

        self.apiUrlLabel = wx.StaticText(
            self, wx.ID_ANY,
            _extstr(u"publishersitewizard.ApiUrlLabel"))  #$NON-NLS-1$
        apiUrlValidator = ZUrlSelectionValidator(
            _extstr(u"publishersitewizard.ApiUrlInvalid"))  #$NON-NLS-1$
        self.apiUrlText = ZValidatingTextCtrl(apiUrlValidator, self, wx.ID_ANY)
        self.apiUrlText.SetToolTipString(
            _extstr(u"publishersitewizard.ApiUrlTooltip"))  #$NON-NLS-1$
        self.apiUrlHint = wx.StaticText(self, wx.ID_ANY,
                                        u"Api Url hints")  #$NON-NLS-1$
        self.animateControl = ZProgressLabelCtrl(self)
예제 #27
0
 def _createLabelFromProperty(self, siteProp):
     label = siteProp.getDisplayName()
     label = label + u":"  #$NON-NLS-1$
     textCtrl = wx.StaticText(self, wx.ID_ANY, label)
     textCtrl.SetFont(getDefaultFontBold())
     return textCtrl
예제 #28
0
 def _createLabelFromProperty(self, siteProp):
     label = siteProp.getDisplayName()
     label = label + u":" #$NON-NLS-1$
     textCtrl = wx.StaticText(self, wx.ID_ANY, label)
     textCtrl.SetFont(getDefaultFontBold())
     return textCtrl