Exemplo n.º 1
0
 def OnManage(self, event):
     filename = i18n.makefilename(self.mainframe.blog_resfile,
                                  self.mainframe.app.i18n.lang)
     dlg = Resource.loadfromresfile(filename, self.mainframe,
                                    BlogSiteManageDialog,
                                    'BlogSiteManageDialog', self.mainframe)
     dlg.ShowModal()
     self.load()
Exemplo n.º 2
0
def OnDocumentSyntaxPreference(win, event):
    from modules import i18n
    from modules import Resource
    import SyntaxDialog

    syntax_resfile = common.uni_work_file('resources/syntaxdialog.xrc')
    filename = i18n.makefilename(syntax_resfile, win.app.i18n.lang)
    if hasattr(win.document, 'languagename'):
        name = win.document.languagename
    else:
        name = ''
    Resource.loadfromresfile(filename, win, SyntaxDialog.SyntaxDialog, 'SyntaxDialog', win, win.lexers, name).ShowModal()
Exemplo n.º 3
0
def OnEditFormatUnquote(win, event):
    from modules import Resource
    import QuoteDialog
    from modules import i18n

    text = win.document.GetSelectedText()
    if len(text) > 0:
        filename = i18n.makefilename(win.quoteresfile, win.app.i18n.lang)
        dlg = Resource.loadfromresfile(filename, win, QuoteDialog.MyQuoteDialog, 'QuoteDialog', win)
        answer = dlg.ShowModal()
        dlg.Destroy()
        if answer == wx.ID_OK:
            if win.quote_user:
                start = win.quote_start
                end = win.quote_end
            else:
                start, end = QuoteDialog.quote_string[win.quote_index]
            win.document.BeginUndoAction()
            win.document.ReplaceSelection(text[len(start):-len(end)])
            win.document.EndUndoAction()
Exemplo n.º 4
0
 def OnManage(self, event):
     filename = i18n.makefilename(self.mainframe.blog_resfile, self.mainframe.app.i18n.lang)
     dlg = Resource.loadfromresfile(filename, self.mainframe, BlogSiteManageDialog, 'BlogSiteManageDialog', self.mainframe)
     dlg.ShowModal()
     self.load()