Example #1
0
class ZPreviewBlogPostDetailsPanel(ZAbstractDetailsPanel, IZDataStoreListener,
                                   IZUserPreferencesListener):
    def __init__(self, parent):
        self.document = None

        # Get the "use template" param from the user prefs
        appModel = getApplicationModel()
        userProfile = appModel.getUserProfile()
        userPrefs = userProfile.getPreferences()
        self.useTemplateInPreview = userPrefs.getUserPreferenceBool(
            IZBlogAppUserPrefsKeys.POST_PREVIEW_VIEW_USE_TEMPLATE, True)

        ZAbstractDetailsPanel.__init__(self, parent)

        self._registerAsListener()

    # end __init__()

    def _createWidgets(self):
        self.htmlViewer = ZHTMLViewControl(self, wx.ID_ANY)
        self._clearHtmlContent()

    # end _createWidgets()

    def _bindWidgetEvents(self):
        self.Bind(ZEVT_REFRESH, self.onZoundryRefresh, self)

    # end _bindWidgetEvents()

    def _layoutWidgets(self):
        box = wx.BoxSizer(wx.VERTICAL)
        box.Add(self.htmlViewer, 1, wx.EXPAND)
        self.SetAutoLayout(True)
        self.SetSizer(box)
        self.Layout()

    # end _layoutWidgets()

    def onUserPreferenceChange(self, key, newValue):
        if key == IZBlogAppUserPrefsKeys.POST_PREVIEW_VIEW_USE_TEMPLATE:
            self.useTemplateInPreview = newValue
            self._refreshContent()

    # end onUserPreferenceChange()

    # FIXME (EPW) need additional context info - what blog are we looking at?
    def onSelectionChanged(self, document):
        oldDoc = self.document
        self.document = document

        if oldDoc is not None and oldDoc.getId() == document.getId():
            return

        self._refreshContent()

    # end onSelectionChanged()

    def _refreshContent(self):
        document = self.document

        # Clear content if no document is set.
        if document is None:
            self._clearHtmlContent()
            return

        content = document.getContent()
        if content is not None:
            xhtmlDoc = content.getXhtmlDocument()
            blog = getBlogFromDocument(document)
            if blog is not None and self.useTemplateInPreview:
                template = getTemplateFromBlog(blog)
                if template is not None:
                    templatedDoc = applyTemplateToDocument(
                        template, document, APPLY_TEMPLATE_MODE_TITLE_AND_BODY)
                    if templatedDoc is not None:
                        xhtmlDoc = templatedDoc
                    disableTemplatePreviewJavaScript(xhtmlDoc)
                    self.htmlViewer.setXhtmlDocument(xhtmlDoc, False)
                    return

            self.htmlViewer.setXhtmlDocument(xhtmlDoc, True)

    # end _refreshContent()

    def _clearHtmlContent(self):
        self.document = None
        xhtmlDoc = loadXhtmlDocumentFromString(u"")  #$NON-NLS-1$
        self.htmlViewer.setXhtmlDocument(xhtmlDoc, False)

    # end _clearHtmlContent()

    def destroy(self):
        self._unregisterAsListener()

    # end destroy()

    # Document changed event from IZDataStoreListener
    def onDocumentChanged(self, document, metaDataOnly):
        if not metaDataOnly and self.document is not None and self.document.getId(
        ) == document.getId():
            self.document = document
            fireRefreshEvent(self, None)

    # end onDocumentChange()

    def onDocumentDeleted(self, document):
        if self.document is not None and self.document.getId(
        ) == document.getId():
            self.document = None
            fireRefreshEvent(self, None)

    # end onDocumentDeleted()

    def onZoundryRefresh(self, event):
        self._refreshContent()
        event.Skip()

    # end onZoundryRefresh()

    def _registerAsListener(self):
        # Register as a data store listener
        service = getApplicationModel().getService(
            IZBlogAppServiceIDs.DATA_STORE_SERVICE_ID)
        service.addListener(self)

        # Register as a user prefs listener
        appModel = getApplicationModel()
        userProfile = appModel.getUserProfile()
        userPrefs = userProfile.getPreferences()
        userPrefs.addListener(self)

    # end _registerAsListener()

    def _unregisterAsListener(self):
        # Unregister from the data store
        service = getApplicationModel().getService(
            IZBlogAppServiceIDs.DATA_STORE_SERVICE_ID)
        service.removeListener(self)

        # Unregister from the user prefs object
        # Register as a user prefs listener
        appModel = getApplicationModel()
        userProfile = appModel.getUserProfile()
        userPrefs = userProfile.getPreferences()
        userPrefs.removeListener(self)
Example #2
0
class ZAboutDialog(ZBaseDialog):
    def __init__(self, parent):
        ZBaseDialog.__init__(self, parent, wx.ID_ANY,
                             _extstr(u"aboutdialog.AboutRaven"))  #$NON-NLS-1$

        size = self.GetBestSize()
        self.SetSize(size)

    # end __init__()

    def _createContentWidgets(self):
        self.notebook = fnb.FlatNotebook(
            self,
            wx.ID_ANY,
            style=fnb.FNB_BOTTOM | fnb.FNB_NO_NAV_BUTTONS | fnb.FNB_NO_X_BUTTON
            | fnb.FNB_NODRAG)
        self.notebook.AddPage(self._createRavenInfoPage(),
                              _extstr(u"aboutdialog.Info"), True,
                              -1)  #$NON-NLS-1$
        self.notebook.AddPage(self._createCreditsPage(),
                              _extstr(u"aboutdialog.Credits"), False,
                              -1)  #$NON-NLS-1$

        self.staticLine = wx.StaticLine(self, wx.HORIZONTAL)

    # end _createContentWidgets()

    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

    # end _createRavenInfoPage()

    def _createCreditsPage(self):
        self.creditsPanel = wx.Panel(self.notebook, wx.ID_ANY)
        self.creditsPanel.SetBackgroundColour(wx.WHITE)

        self.htmlWidget = ZHTMLViewControl(self.creditsPanel)

        return self.creditsPanel

    # end _createCreditsPage()

    def _populateContentWidgets(self):
        xhtmlDoc = loadXhtmlDocumentFromFile(
            getResourceRegistry().getResourcePath(
                u"html/about/credits.html"))  #$NON-NLS-1$
        self.htmlWidget.setXhtmlDocument(xhtmlDoc)

    # end _populateContentWidgets()

    def _layoutContentWidgets(self):
        sizer = wx.BoxSizer(wx.VERTICAL)

        self._layoutInfoPanel()
        self._layoutCreditsPanel()

        sizer.Add(self.notebook, 1, wx.EXPAND)
        sizer.Add(self.staticLine, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 2)

        return sizer

    # end _layoutContentWidgets()

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

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

        self.infoPanel.SetSizer(sizer)
        self.infoPanel.SetAutoLayout(True)

    # end _layoutInfoPanel()

    def _layoutCreditsPanel(self):
        sizer = wx.BoxSizer(wx.VERTICAL)

        sizer.Add(self.htmlWidget, 1, wx.EXPAND)

        self.creditsPanel.SetSizer(sizer)
        self.creditsPanel.SetAutoLayout(True)

    # end _layoutCreditsPanel()

    def _bindWidgetEvents(self):
        pass

    # end _bindWidgetEvents()

    def _getButtonTypes(self):
        return ZBaseDialog.OK_BUTTON
Example #3
0
class ZPreviewBlogPostDetailsPanel(ZAbstractDetailsPanel, IZDataStoreListener, IZUserPreferencesListener):

    def __init__(self, parent):
        self.document = None

        # Get the "use template" param from the user prefs
        appModel = getApplicationModel()
        userProfile = appModel.getUserProfile()
        userPrefs = userProfile.getPreferences()
        self.useTemplateInPreview = userPrefs.getUserPreferenceBool(IZBlogAppUserPrefsKeys.POST_PREVIEW_VIEW_USE_TEMPLATE, True)

        ZAbstractDetailsPanel.__init__(self, parent)

        self._registerAsListener()
    # end __init__()

    def _createWidgets(self):
        self.htmlViewer = ZHTMLViewControl(self, wx.ID_ANY)
        self._clearHtmlContent()
    # end _createWidgets()

    def _bindWidgetEvents(self):
        self.Bind(ZEVT_REFRESH, self.onZoundryRefresh, self)
    # end _bindWidgetEvents()

    def _layoutWidgets(self):
        box = wx.BoxSizer(wx.VERTICAL)
        box.Add(self.htmlViewer, 1, wx.EXPAND)
        self.SetAutoLayout(True)
        self.SetSizer(box)
        self.Layout()
    # end _layoutWidgets()

    def onUserPreferenceChange(self, key, newValue):
        if key == IZBlogAppUserPrefsKeys.POST_PREVIEW_VIEW_USE_TEMPLATE:
            self.useTemplateInPreview = newValue
            self._refreshContent()
    # end onUserPreferenceChange()

    # FIXME (EPW) need additional context info - what blog are we looking at?
    def onSelectionChanged(self, document):
        oldDoc = self.document
        self.document = document

        if oldDoc is not None and oldDoc.getId() == document.getId():
            return

        self._refreshContent()
    # end onSelectionChanged()

    def _refreshContent(self):
        document = self.document

        # Clear content if no document is set.
        if document is None:
            self._clearHtmlContent()
            return

        content = document.getContent()
        if content is not None:
            xhtmlDoc = content.getXhtmlDocument()
            blog = getBlogFromDocument(document)
            if blog is not None and self.useTemplateInPreview:
                template = getTemplateFromBlog(blog)
                if template is not None:
                    templatedDoc = applyTemplateToDocument(template, document, APPLY_TEMPLATE_MODE_TITLE_AND_BODY)
                    if templatedDoc is not None:
                        xhtmlDoc = templatedDoc
                    disableTemplatePreviewJavaScript(xhtmlDoc)
                    self.htmlViewer.setXhtmlDocument(xhtmlDoc, False)
                    return

            self.htmlViewer.setXhtmlDocument( xhtmlDoc, True )
    # end _refreshContent()

    def _clearHtmlContent(self):
        self.document = None
        xhtmlDoc = loadXhtmlDocumentFromString(u"") #$NON-NLS-1$
        self.htmlViewer.setXhtmlDocument(xhtmlDoc, False)
    # end _clearHtmlContent()

    def destroy(self):
        self._unregisterAsListener()
    # end destroy()

    # Document changed event from IZDataStoreListener
    def onDocumentChanged(self, document, metaDataOnly):
        if not metaDataOnly and self.document is not None and self.document.getId() == document.getId():
            self.document = document
            fireRefreshEvent(self, None)
    # end onDocumentChange()

    def onDocumentDeleted(self, document):
        if self.document is not None and self.document.getId() == document.getId():
            self.document = None
            fireRefreshEvent(self, None)
    # end onDocumentDeleted()

    def onZoundryRefresh(self, event):
        self._refreshContent()
        event.Skip()
    # end onZoundryRefresh()

    def _registerAsListener(self):
        # Register as a data store listener
        service = getApplicationModel().getService(IZBlogAppServiceIDs.DATA_STORE_SERVICE_ID)
        service.addListener(self)

        # Register as a user prefs listener
        appModel = getApplicationModel()
        userProfile = appModel.getUserProfile()
        userPrefs = userProfile.getPreferences()
        userPrefs.addListener(self)
    # end _registerAsListener()

    def _unregisterAsListener(self):
        # Unregister from the data store
        service = getApplicationModel().getService(IZBlogAppServiceIDs.DATA_STORE_SERVICE_ID)
        service.removeListener(self)
        
        # Unregister from the user prefs object
        # Register as a user prefs listener
        appModel = getApplicationModel()
        userProfile = appModel.getUserProfile()
        userPrefs = userProfile.getPreferences()
        userPrefs.removeListener(self)
Example #4
0
class ZTemplateManagerWindow(ZBaseWindow, ZPersistentDialogMixin, IZTemplateServiceListener):

    def __init__(self, parent):
        self.model = ZTemplateManagerModel()
        self.selectedTemplate = None

        style = wx.DEFAULT_FRAME_STYLE | wx.FULL_REPAINT_ON_RESIZE | wx.CLIP_CHILDREN
        ZBaseWindow.__init__(self, parent, _extstr(u"templatemanager.BlogTemplateManager"), name = u"ZTemplateManager", style = style) #$NON-NLS-2$ #$NON-NLS-1$
        ZPersistentDialogMixin.__init__(self, IZBlogAppUserPrefsKeys.TEMPLATE_WINDOW)
        self.Layout()

        self._installListener()
    # end __init__()

    def getModel(self):
        return self.model
    # end getModel()

    def _createWindowWidgets(self, parent):
        self.headerPanel = self._createHeaderPanel(parent)
        self.headerStaticLine = wx.StaticLine(parent, wx.ID_ANY)

        self.splitterWindow = ZSplitterWindow(parent)
        self.splitterWindow.SetSizeHints(700, 600)

        self.topPanel = ZTransparentPanel(self.splitterWindow, wx.ID_ANY)
        self.topStaticBox = wx.StaticBox(self.topPanel, wx.ID_ANY, _extstr(u"templatemanager.Templates")) #$NON-NLS-1$

        provider = ZTemplateListProvider(self.model)
        self.templateList = ZListViewEx(provider, self.topPanel)

        self.addButton = wx.Button(self.topPanel, wx.ID_ANY, _extstr(u"templatemanager.Add")) #$NON-NLS-1$
        self.removeButton = wx.Button(self.topPanel, wx.ID_ANY, _extstr(u"templatemanager.Remove")) #$NON-NLS-1$
        self.removeButton.Enable(False)

        self.preview = ZHTMLViewControl(self.splitterWindow, wx.ID_ANY, style = wx.NO_FULL_REPAINT_ON_RESIZE | wx.SIMPLE_BORDER)

        self.splitterWindow.SetSashSize(10)
        self.splitterWindow.SplitHorizontally(self.topPanel, self.preview, 150)
        self.splitterWindow.SetMinimumPaneSize(100)

        self.statusBar = self._createStatusBar()
        self.SetStatusBar(self.statusBar)
    # end _createWindowWidgets()

    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
    # end _createHeaderPanel()

    def _createStatusBar(self):
        self.statusBarModel = ZStatusBarModel()
        self.statusBarModel.addPane(u"name") #$NON-NLS-1$
        self.statusBarModel.setPaneWidth(u"name", 1) #$NON-NLS-1$
        self.statusBarModel.setPaneText(u"name", u"") #$NON-NLS-1$ #$NON-NLS-2$
        provider = ZStatusBarModelBasedContentProvider(self.statusBarModel)
        statusBar = ZStatusBar(self, provider)
        return statusBar
    # end _createStatusBar()

    def _populateWindowWidgets(self):
        self.SetIcons(getResourceRegistry().getIconBundle(ICON_IMAGES))
        self.refresh()
    # end _populateWindowWidgets()

    def _layoutWindowWidgets(self):
        staticBoxSizer = wx.StaticBoxSizer(self.topStaticBox, wx.VERTICAL)
        staticBoxSizer.Add(self.templateList, 1, wx.ALL | wx.EXPAND, 3)
        buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
        buttonSizer.Add(self.addButton, 0, wx.ALL | wx.EXPAND, 2)
        buttonSizer.Add(self.removeButton, 0, wx.ALL | wx.EXPAND, 2)
        staticBoxSizer.AddSizer(buttonSizer, 0, wx.ALL | wx.EXPAND, 2)

        self.topPanel.SetSizer(staticBoxSizer)
        self.topPanel.SetAutoLayout(True)

        sizer = wx.BoxSizer(wx.VERTICAL)

        sizer.Add(self.headerPanel, 0, wx.EXPAND | wx.ALL, 0)
        sizer.Add(self.headerStaticLine, 0, wx.EXPAND | wx.ALL, 0)
        sizer.Add(self.splitterWindow, 1, wx.EXPAND | wx.ALL, 5)

        return sizer
    # end _layoutWindowWidgets()

    def _bindWidgetEvents(self):
        self.Bind(wx.EVT_BUTTON, self.onAdd, self.addButton)
        self.Bind(wx.EVT_BUTTON, self.onRemove, self.removeButton)
        self.Bind(wx.EVT_CLOSE, self.onClose, self)
        self.Bind(ZEVT_REFRESH, self.onRefresh, self)
        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.onTemplateSelected, self.templateList)
        self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.onTemplateRightClick, self.templateList)
    # end _bindWidgetEvents()

    def onRefresh(self, event):
        self.templateList.Refresh()
        event.Skip()
    # end onRefresh()

    def onAdd(self, event):
        action = ZAddTemplateFromBlogAction()
        action.runAction(ZTemplateManagerActionContext(self, self.selectedTemplate))
        event.Skip()
    # end onAdd()

    def onRemove(self, event):
        action = ZRemoveTemplateAction()
        action.runAction(ZTemplateManagerActionContext(self, self.selectedTemplate))
        event.Skip()
    # end onRemove()

    def onTemplateSelected(self, event):
        self.selectedTemplate = self.model.getTemplates()[event.GetItem().GetId()]
        self.removeButton.Enable(True)
        self.refresh()
        event.Skip()
    # end onTemplateSelected()

    def onTemplateRightClick(self, event):
        event.Skip()
    # end onTemplateRightClick()

    def _setInitialFocus(self):
        pass
    # end _setInitialFocus()

    def refresh(self):
        self.templateList.refresh()
        self.statusBar.refresh()
        if self.selectedTemplate is not None:
            document = self.model.getSampleDocument()
            xhtmlDoc = applyTemplateToDocument(self.selectedTemplate, document, APPLY_TEMPLATE_MODE_FULL)
            disableTemplatePreviewJavaScript(xhtmlDoc)
        else:
            xhtmlDoc = loadXhtmlDocumentFromString(u"Select a template to view a preview of it.") #$NON-NLS-1$
        self.preview.setXhtmlDocument(xhtmlDoc, False)
    # end refresh()

    def _getHeaderTitle(self):
        return _extstr(u"templatemanager.BlogTemplateManager") #$NON-NLS-1$
    # end _getHeaderTitle()

    def _getHeaderMessage(self):
        return _extstr(u"templatemanager.BlogTemplateManagerDescription") #$NON-NLS-1$
    # end _getHeaderMessage()

    def _getHeaderImagePath(self):
        return u"images/dialogs/template/manager/header_image.png" #$NON-NLS-1$
    # end _getHeaderImagePath()

    def _getHeaderHelpURL(self):
        return u"http://www.zoundry.com" #$NON-NLS-1$
    # end _getHeaderHelpUrl()

    def onClose(self, event):
        global TEMPLATE_MANAGER_WINDOW
        TEMPLATE_MANAGER_WINDOW = None

        self._uninstallListener()

        event.Skip()
    # end onClose()

    def _installListener(self):
        self.model.getService().addListener(self)
    # end _installListener()

    def _uninstallListener(self):
        self.model.getService().removeListener(self)
    # end _uninstallListener()

    def onTemplateCreated(self, template): #@UnusedVariable
        fireUIExecEvent(ZMethodRunnable(self.refresh), self)
    # end onTemplateCreated()

    def onTemplateDeleted(self, template):
        if self.selectedTemplate.getId() == template.getId():
            self.selectedTemplate = None

        self.refresh()
        self.templateList.deselectAll()
        self.removeButton.Enable(False)
    # end onTemplateDeleted()

    def onTemplateModified(self, template): #@UnusedVariable
        fireUIExecEvent(ZMethodRunnable(self.refresh), self)
Example #5
0
class ZAboutDialog(ZBaseDialog):

    def __init__(self, parent):
        ZBaseDialog.__init__(self, parent, wx.ID_ANY, _extstr(u"aboutdialog.AboutRaven")) #$NON-NLS-1$

        size = self.GetBestSize()
        self.SetSize(size)
    # end __init__()

    def _createContentWidgets(self):
        self.notebook = fnb.FlatNotebook(self, wx.ID_ANY, style = fnb.FNB_BOTTOM | fnb.FNB_NO_NAV_BUTTONS | fnb.FNB_NO_X_BUTTON | fnb.FNB_NODRAG)
        self.notebook.AddPage(self._createRavenInfoPage(), _extstr(u"aboutdialog.Info"), True, -1) #$NON-NLS-1$
        self.notebook.AddPage(self._createCreditsPage(), _extstr(u"aboutdialog.Credits"), False, -1) #$NON-NLS-1$

        self.staticLine = wx.StaticLine(self, wx.HORIZONTAL)
    # end _createContentWidgets()

    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
    # end _createRavenInfoPage()

    def _createCreditsPage(self):
        self.creditsPanel = wx.Panel(self.notebook, wx.ID_ANY)
        self.creditsPanel.SetBackgroundColour(wx.WHITE)

        self.htmlWidget = ZHTMLViewControl(self.creditsPanel)

        return self.creditsPanel
    # end _createCreditsPage()

    def _populateContentWidgets(self):
        xhtmlDoc = loadXhtmlDocumentFromFile(getResourceRegistry().getResourcePath(u"html/about/credits.html")) #$NON-NLS-1$
        self.htmlWidget.setXhtmlDocument(xhtmlDoc)
    # end _populateContentWidgets()

    def _layoutContentWidgets(self):
        sizer = wx.BoxSizer(wx.VERTICAL)

        self._layoutInfoPanel()
        self._layoutCreditsPanel()

        sizer.Add(self.notebook, 1, wx.EXPAND)
        sizer.Add(self.staticLine, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 2)

        return sizer
    # end _layoutContentWidgets()

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

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

        self.infoPanel.SetSizer(sizer)
        self.infoPanel.SetAutoLayout(True)
    # end _layoutInfoPanel()

    def _layoutCreditsPanel(self):
        sizer = wx.BoxSizer(wx.VERTICAL)

        sizer.Add(self.htmlWidget, 1, wx.EXPAND)

        self.creditsPanel.SetSizer(sizer)
        self.creditsPanel.SetAutoLayout(True)
    # end _layoutCreditsPanel()

    def _bindWidgetEvents(self):
        pass
    # end _bindWidgetEvents()

    def _getButtonTypes(self):
        return ZBaseDialog.OK_BUTTON