本文整理汇总了Python中modules.Mixin类的典型用法代码示例。如果您正苦于以下问题:Python Mixin类的具体用法?Python Mixin怎么用?Python Mixin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mixin类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: on_first_char
def on_first_char(win, event):
global _impact_mode, buf
if _impact_mode:
key = event.GetKeyCode()
if key < 127:
buf.append(chr(key))
showinfo(' '.join(buf))
Mixin.reload_obj(Commands)
commandar = Commands.getinstance()
s = commandar.impact_search(''.join(buf))
if len(s) == 1: #find a cmd
showinfo(' '.join(buf + ['('+s[0][0]+')']))
cmd_id = s[0][-1]
commandar.run(cmd_id)
buf = []
elif len(s) == 0:
buf = []
return True
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:18,代码来源:mCommands.py
示例2: init
def init(self, showSplash=True, load=True):
#add modules path to sys.path
self.workpath = workpath
self.confpath = confpath
self.curpath = curpath
self.i18n = i18n
self.processCommandLineArguments()
if self.psycoflag:
try:
import psyco
psyco.full()
except:
pass
#change workpath
self.userpath = self.workpath
if self.multiuser:
self.userpath = common.getHomeDir()
#set globals variable
Globals.userpath = self.userpath
self.CheckPluginDir()
Mixin.ENABLE = True
try:
import plugins
except:
Debug.error.traceback()
common.showerror(None, tr('There was something wrong with importing plugins.'))
#before running gui
self.callplugin("beforegui", self)
Mixin.ENABLE = False
#-----------------------------------------------------------------------------
if Debug.DEBUG:
Mixin.printMixin()
return self.execplugin('getmainframe', self, self.files)
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:44,代码来源:UliPad.py
示例3: mainframe_init
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: mClassBrowser.py 154 2005-11-07 04:48:15Z limodou $
import wx
import os
from modules import common, Mixin
def mainframe_init(win):
win.memo_win = None
Mixin.setPlugin('mainframe', 'init', mainframe_init)
def pref_init(pref):
pref.easy_memo_lastpos = 0
Mixin.setPlugin('preference', 'init', pref_init)
def add_mainframe_menu(menulist):
menulist.extend([('IDM_TOOL', #parent menu id
[
(140, '-', '', wx.ITEM_SEPARATOR, '', ''),
(150, 'IDM_TOOL_MEMO', tr('Easy Memo') + u'\tF12', wx.ITEM_CHECK, 'OnToolMemo', tr('Shows the window Easy Memo for writing notes.')),
]),
])
Mixin.setPlugin('mainframe', 'add_menu', add_mainframe_menu)
def OnToolMemo(win, event):
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:31,代码来源:mPad.py
示例4: GPL
# Distributed under the terms of the GPL (GNU Public License)
#
# UliPad is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: mIcon.py 1457 2006-08-23 02:12:12Z limodou $
import wx
from modules import Mixin
from modules import common
def init(win):
icon = wx.EmptyIcon()
iconfile = common.uni_work_file('ulipad.ico')
# icon.LoadFile(iconfile, wx.BITMAP_TYPE_ICO)
bmp = common.getpngimage(iconfile)
# win.SetIcon(icon.CopyFromBitmap(bmp))
win.SetIcon(wx.Icon(iconfile, wx.BITMAP_TYPE_ICO))
Mixin.setPlugin('mainframe', 'init', init)
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:30,代码来源:mIcon.py
示例5: add_mainframe_menu
# $Id: mFtp.py 2120 2007-07-11 02:56:11Z limodou $
__doc__ = 'ftp manage'
import wx
from modules import Mixin
from modules.Debug import error
from modules import common
def add_mainframe_menu(menulist):
menulist.extend([ ('IDM_WINDOW',
[
(160, 'IDM_WINDOW_FTP', tr('FTP Window'), wx.ITEM_CHECK, 'OnWindowFtp', tr('Shows the FTP pane.')),
]),
])
Mixin.setPlugin('mainframe', 'add_menu', add_mainframe_menu)
def afterinit(win):
win.ftp_imagelist = {
'close': 'images/folderclose.gif',
'document': 'images/file.gif',
'parentfold': 'images/parentfold.gif',
}
win.ftp_resfile = common.uni_work_file('resources/ftpmanagedialog.xrc')
win.ftp = None
Mixin.setPlugin('mainframe', 'afterinit', afterinit)
def on_mainframe_updateui(win, event):
eid = event.GetId()
if eid == win.IDM_WINDOW_FTP:
event.Check(bool(win.panel.getPage('FTP')) and win.panel.BottomIsVisible)
开发者ID:LinYuanLab,项目名称:ulipad,代码行数:31,代码来源:mFtp.py
示例6: PythonFiletype
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: mPythonFileType.py 1566 2006-10-09 04:44:08Z limodou $
import wx
import FiletypeBase
from modules import Mixin
class PythonFiletype(FiletypeBase.FiletypeBase):
__mixinname__ = 'pythonfiletype'
menulist = [ (None,
[
(890, 'IDM_PYTHON', 'Python', wx.ITEM_NORMAL, None, ''),
]),
]
toollist = [] #your should not use supperclass's var
toolbaritems= {}
def add_filetypes(filetypes):
filetypes.extend([('python', PythonFiletype)])
Mixin.setPlugin('changefiletype', 'add_filetypes', add_filetypes)
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:30,代码来源:mPythonFileType.py
示例7: add_mainframe_menu
from modules import Mixin
from modules import Globals
from modules import common
def add_mainframe_menu(menulist):
menulist.extend([
# ('IDM_TOOL',
# [
# (125, 'IDM_WINDOW_CODESNIPPET', tr('Code Snippets'), wx.ITEM_NORMAL, 'OnWindowCodeSnippet', tr('Opens code snippet window.'))
# ]),
('IDM_WINDOW',
[
(151, 'IDM_WINDOW_CODESNIPPET', tr('Code Snippets Window'), wx.ITEM_CHECK, 'OnWindowCodeSnippet', tr('Opens code snippets window.'))
]),
])
Mixin.setPlugin('mainframe', 'add_menu', add_mainframe_menu)
def add_notebook_menu(popmenulist):
popmenulist.extend([(None,
[
(135, 'IDPM_CODESNIPPETWINDOW', tr('Code Snippets Window'), wx.ITEM_CHECK, 'OnCodeSnippetWindow', tr('Opens code snippet window.')),
]),
])
Mixin.setPlugin('notebook', 'add_menu', add_notebook_menu)
def add_images(images):
images.update({
'close': 'images/folderclose.gif',
'open': 'images/folderopen.gif',
'item': 'images/file.gif',
})
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:31,代码来源:mCodeSnippet.py
示例8: tr
]),
('IDPM_SELECTION',
[
(100, 'IDPM_SELECTION_SELECT_WORD', tr('Select Word') + '\tCtrl+W', wx.ITEM_NORMAL, 'OnSelectionWord', tr('Selects the current word.')),
(200, 'IDPM_SELECTION_SELECT_WORD_EXTEND', tr('Select Extended Word') + '\tCtrl+Shift+W', wx.ITEM_NORMAL, 'OnSelectionWordExtend', tr('Selects the current word, including the dot.')),
(300, 'IDPM_SELECTION_SELECT_PHRASE', tr('Match Select (Left First)') + '\tCtrl+E', wx.ITEM_NORMAL, 'OnSelectionMatchLeft', tr('Selects the text enclosed by () [] {} <> "" \'\', matching left first.')),
(400, 'IDPM_SELECTION_SELECT_PHRASE_RIGHT', tr('Match Select (Right First)') + '\tCtrl+Shift+E', wx.ITEM_NORMAL, 'OnSelectionMatchRight', tr('Selects the text enclosed by () [] {} <> "" \'\', matching right first.')),
(500, 'IDPM_SELECTION_SELECT_ENLARGE', tr('Enlarge Selection') + '\tCtrl+Alt+E', wx.ITEM_NORMAL, 'OnSelectionEnlarge', tr('Enlarges the selection.')),
(600, 'IDPM_SELECTION_SELECT_LINE', tr('Select Line') + '\tCtrl+R', wx.ITEM_NORMAL, 'OnSelectionLine', tr('Selects the current phrase.')),
(700, 'IDPM_SELECTION_SELECTALL', tr('Select All') + '\tCtrl+A', wx.ITEM_NORMAL, 'OnPopupEdit', tr('Selects the entire document.')),
(800, 'IDPM_SELECTION_BEGIN', tr('Set Start Of Selection'), wx.ITEM_NORMAL, 'OnSelectionBegin', tr('Sets selection beginning.')),
(900, 'IDPM_SELECTION_END', tr('Set End Of Selection'), wx.ITEM_NORMAL, 'OnSelectionEnd', tr('Sets selection end.')),
]),
])
Mixin.setPlugin('editor', 'add_menu', add_editor_menu)
def add_editor_menu_image_list(imagelist):
imagelist.update({
'IDPM_UNDO':'images/undo.gif',
'IDPM_REDO':'images/redo.gif',
'IDPM_CUT':'images/cut.gif',
'IDPM_COPY':'images/copy.gif',
'IDPM_PASTE':'images/paste.gif',
})
Mixin.setPlugin('editor', 'add_menu_image_list', add_editor_menu_image_list)
def OnPopupEdit(win, event):
eid = event.GetId()
if eid == win.IDPM_UNDO:
win.Undo()
开发者ID:barry963,项目名称:Robot_project,代码行数:30,代码来源:mComEdit.py
示例9: dynamic_menu
if dynamic_menu(editor):
menus.extend([(None, #parent menu id
[
(30, 'IDPM_WEB2PY_PROJECT', tr('&Web2py'), wx.ITEM_NORMAL, '', ''),
(35, 'IDPM_WEB2PY_PROJECT_CONTROLLERS_VIEW', dynamic_menu(editor), wx.ITEM_NORMAL, 'OnWeb2pyProjectFunc', tr('Create a view or open view.')),
(38, 'IDPM_WEB2PY_PROJECT_CONTROLLERS_WEB', dynamic_menu(editor, 'web'), wx.ITEM_NORMAL, 'OnWeb2pyProjectFunc', tr('visit web site')),
(40, '', '-', wx.ITEM_SEPARATOR, None, ''),
]),
('IDPM_WEB2PY_PROJECT',
[
## (100, 'IDPM_WEB2PY_PROJECT_CONTROLLERS_VIEW', dynamic_menu(editor), wx.ITEM_NORMAL, 'OnWeb2pyProjectFunc', tr('Create a view or open view.')),
(110, '', '-', wx.ITEM_SEPARATOR, None, ''),
]),
])
Mixin.setPlugin('editor', 'other_popup_menu', other_popup_menu)
def OnWeb2pyProjectFunc(win, event):
_id = event.GetId()
try:
if _id == win.IDPM_WEB2PY_PROJECT_CONTROLLERS_VIEW:
OnWeb2pyProjectControllersView(win)
elif _id == win.IDPM_WEB2PY_PROJECT_CONTROLLERS_WEB:
OnWeb2pyProjectControllersWeb(win)
except:
error.traceback()
common.showerror(win, tr("There is some wrong as executing the menu."))
Mixin.setMixin('editor', 'OnWeb2pyProjectFunc', OnWeb2pyProjectFunc)
开发者ID:LinYuanLab,项目名称:ulipad,代码行数:30,代码来源:editor_ext.py
示例10: RestFiletype
from modules.Debug import error
class RestFiletype(FiletypeBase.FiletypeBase):
__mixinname__ = 'restfiletype'
menulist = [ (None,
[
(890, 'IDM_REST', 'ReST', wx.ITEM_NORMAL, None, ''),
]),
]
toollist = [] #your should not use supperclass's var
toolbaritems= {}
def add_filetypes(filetypes):
filetypes.extend([('rst', RestFiletype)])
Mixin.setPlugin('changefiletype', 'add_filetypes', add_filetypes)
def add_rest_menu(menulist):
menulist.extend([('IDM_REST', #parent menu id
[
(100, 'IDM_REST_VIEW_IN_LEFT', tr('View HTML Result In Left Pane'), wx.ITEM_NORMAL, 'OnRestViewHtmlInLeft', tr('Views HTML result in left pane.')),
(110, 'IDM_REST_VIEW_IN_BOTTOM', tr('View HTML Result In Bottom Pane'), wx.ITEM_NORMAL, 'OnRestViewHtmlInBottom', tr('Views HTML result in bottom pane.')),
]),
])
Mixin.setPlugin('restfiletype', 'add_menu', add_rest_menu)
def OnRestViewHtmlInLeft(win, event):
dispname = win.createRestHtmlViewWindow('left', Globals.mainframe.editctrl.getCurDoc())
if dispname:
win.panel.showPage(dispname)
Mixin.setMixin('mainframe', 'OnRestViewHtmlInLeft', OnRestViewHtmlInLeft)
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:31,代码来源:mRestFileType.py
示例11: RubyFiletype
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
import wx
from modules import Mixin
from mixins import FiletypeBase
class RubyFiletype(FiletypeBase.FiletypeBase):
__mixinname__ = 'rubyfiletype'
menulist = [ (None,
[
(890, 'IDM_RUBY', 'Ruby', wx.ITEM_NORMAL, None, ''),
]),
]
toollist = [] #your should not use supperclass's var
toolbaritems= {}
filetype = [('ruby', RubyFiletype)]
Mixin.setMixin('changefiletype', 'filetypes', filetype)
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:30,代码来源:mRubyFileType.py
示例12: GPL
# Programmer: limodou
# E-mail: [email protected]
#
# Copyleft 2006 limodou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# UliPad is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
from modules import Mixin
def add_pref(preflist):
preflist.extend([
('Config.ini', 100, 'check', '_config_default_debug', tr('Enable debug mode'), None)
])
Mixin.setPlugin('preference', 'add_pref', add_pref)
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:30,代码来源:mConfig.py
示例13: tr
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
from modules import Mixin
import wx
import images
from modules import Globals
import os
popmenulist = [ ('IDPM_ADD',
[
(100, 'IDPM_ADD_RSSREADER', tr('RSS Reader'), wx.ITEM_NORMAL, 'OnAddRssReader', ''),
]),
]
Mixin.setMixin('sharewin', 'popmenulist', popmenulist)
def add_process_class(type, win, proc_dict):
if type == 'rss':
from RssReader import RssReader
proc_dict['rss'] = RssReader(win)
Mixin.setPlugin('sharewin', 'add_process_class', add_process_class)
def add_images(images):
s = [
('RSS_ROOT_IMAGE', 'rss.gif'),
('RSS_CATEGORY_IMAGE', 'category.gif'),
('RSS_FEED_IMAGE', 'feed.gif'),
('RSS_RUN1', 'run1.gif'),
('RSS_RUN2', 'run2.gif'),
('RSS_RUN3', 'run3.gif'),
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:31,代码来源:__init__.py
示例14: mode
import wx
from modules import Mixin
from modules import common
eolmess = [tr(r"Unix mode (\n)"), tr(r"DOS/Windows mode (\r\n)"), tr(r"Mac mode (\r)")]
def beforeinit(win):
win.lineendingsaremixed = False
win.eolmode = win.pref.default_eol_mode
win.eols = {0:wx.stc.STC_EOL_LF, 1:wx.stc.STC_EOL_CRLF, 2:wx.stc.STC_EOL_CR}
# win.eolstr = {0:'Unix', 1:'Win', 2:'Mac'}
win.eolstr = {0:r'\n', 1:r'\r\n', 2:r'\r'}
win.eolstring = {0:'\n', 1:'\r\n', 2:'\r'}
win.eolmess = eolmess
win.SetEOLMode(win.eols[win.eolmode])
Mixin.setPlugin('editor', 'init', beforeinit)
def add_pref(preflist):
preflist.extend([
(tr('Document'), 140, 'choice', 'default_eol_mode', tr('Default line ending used in the document:'), eolmess)
])
Mixin.setPlugin('preference', 'add_pref', add_pref)
def pref_init(pref):
if wx.Platform == '__WXMSW__':
pref.default_eol_mode = 1
else:
pref.default_eol_mode = 0
Mixin.setPlugin('preference', 'init', pref_init)
def add_mainframe_menu(menulist):
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:31,代码来源:mLineending.py
示例15: other_popup_menu
# $Id$
import wx
import re
from modules import Mixin
from modules import common
from modules import Globals
def other_popup_menu(win, menus):
menus.extend([(None, #parent menu id
[
(190, '', '-', wx.ITEM_SEPARATOR, None, ''),
(200, 'IDPM_GOTO', tr('Goto error line'), wx.ITEM_NORMAL, 'OnGoto', tr('Goto the line that occurs the error.')),
]),
])
Mixin.setPlugin('messagewindow', 'other_popup_menu', other_popup_menu)
r = re.compile('File\s+"(.*?)",\s+line\s+(\d+)')
def OnGoto(win, event):
line = win.GetCurLine()[0]
b = r.search(common.encode_string(line, common.defaultfilesystemencoding))
if b:
filename, lineno = b.groups()
Globals.mainframe.editctrl.new(filename)
wx.CallAfter(Globals.mainframe.document.goto, int(lineno))
Mixin.setMixin('messagewindow', 'OnGoto', OnGoto)
def messagewindow_init(win):
wx.EVT_LEFT_DCLICK(win, win.OnGoto)
Mixin.setPlugin('messagewindow', 'init', messagewindow_init)
开发者ID:barry963,项目名称:Robot_project,代码行数:30,代码来源:mMessageWindow.py
示例16: GetValue
box.auto_fit(2)
if values:
box.SetValue(values)
def GetValue(self):
return self.sizer.GetValue()
def add_mainframe_menu(menulist):
menulist.extend([
('IDM_EDIT_FORMAT',
[
(126, 'IDM_EDIT_FORMAT_WRAP', tr('Wrap Text...')+'\tCtrl+Shift+T', wx.ITEM_NORMAL, 'OnEditFormatWrap', tr('Wraps selected text.')),
]),
])
Mixin.setPlugin('mainframe', 'add_menu', add_mainframe_menu)
def add_editor_menu(popmenulist):
popmenulist.extend([
('IDPM_FORMAT',
[
(126, 'IDPM_FORMAT_WRAP', tr('Wrap Text...')+'\tE=Ctrl+Shift+T', wx.ITEM_NORMAL, 'OnFormatWrap', tr('Wraps selected text.')),
]),
])
Mixin.setPlugin('editor', 'add_menu', add_editor_menu)
def OnEditFormatWrap(win, event):
OnFormatWrap(win.document, event)
Mixin.setMixin('mainframe', 'OnEditFormatWrap', OnEditFormatWrap)
def pref_init(pref):
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:31,代码来源:mWrapText.py
示例17: editor_init
#
# UliPad is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: mFormat.py 1457 2006-08-23 02:12:12Z limodou $
import wx.stc
from modules import Mixin
def editor_init(win):
wx.stc.EVT_STC_STYLENEEDED(win, win.GetId(), win.OnStyleNeeded)
# wx.EVT_PAINT(win, win.OnStyleNeeded)
Mixin.setPlugin('editor', 'init', editor_init)
def OnStyleNeeded(win, event):
lexer = getattr(win, 'lexer', None)
if lexer:
if lexer.syntaxtype == wx.stc.STC_LEX_CONTAINER:
lexer.styleneeded(win, event.GetPosition())
Mixin.setMixin('editor', 'OnStyleNeeded', OnStyleNeeded)
开发者ID:LinYuanLab,项目名称:ulipad,代码行数:31,代码来源:mCustomLexer.py
示例18: other_popup_menu
from modules import Globals
def other_popup_menu(dirwin, projectname, menus):
item = dirwin.tree.GetSelection()
if not item.IsOk(): return
if 'web2py' in projectname:
dir = common.getCurrentDir(dirwin.get_node_filename(item))
basedir = os.path.basename(os.path.dirname(dir))
if os.path.isdir(dir) and basedir == 'applications':
menus.extend([ (None,
[
(500, '', '-', wx.ITEM_SEPARATOR, None, ''),
(520, 'IDPM_WEB2PY_SHELL', tr('Start web2py Shell'), wx.ITEM_NORMAL, 'OnWeb2pyShell', ''),
]),
])
Mixin.setPlugin('dirbrowser', 'other_popup_menu', other_popup_menu)
project_names = ['web2py']
Mixin.setMixin('dirbrowser', 'project_names', project_names)
def set_project(ini, projectnames):
if 'web2py' in projectnames:
common.set_acp_highlight(ini, '.html', ['html.acp', 'web2py_html.acp'], 'web2pyview')
common.set_acp_highlight(ini, '.py', ['web2py_py.acp'], 'python')
Mixin.setPlugin('dirbrowser', 'set_project', set_project)
def remove_project(ini, projectnames):
if 'web2py' in projectnames:
common.remove_acp_highlight(ini, '.html', ['html.acp', 'web2py_html.acp'], 'web2pyview')
common.remove_acp_highlight(ini, '.py', ['web2py_py.acp'], 'python')
Mixin.setPlugin('dirbrowser', 'remove_project', remove_project)
开发者ID:LinYuanLab,项目名称:ulipad,代码行数:31,代码来源:dirbrowser_ext.py
示例19: tr
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: mSnippets.py,v 1.8 2004/11/27 15:52:08 limodou Exp $
from modules import Mixin
import wx
import images
menulist = [
('IDM_WINDOW',
[
(190, 'IDM_WINDOW_WIZARD', tr('Wizard Window'), wx.ITEM_CHECK, 'OnWindowWizard', tr('Opens wizard window.'))
]),
]
Mixin.setMixin('mainframe', 'menulist', menulist)
popmenulist = [ (None,
[
(140, 'IDPM_WIZARDWINDOW', tr('Wizard Window'), wx.ITEM_CHECK, 'OnWizardWindow', tr('Opens wizard window.')),
]),
]
Mixin.setMixin('notebook', 'popmenulist', popmenulist)
toollist = [
(550, 'wizard'),
]
Mixin.setMixin('mainframe', 'toollist', toollist)
_wizard_pagename = tr('Wizard')
开发者ID:LaoMa3953,项目名称:ulipad,代码行数:30,代码来源:mWizard.py
示例20: RunCommand
wx.EVT_KEY_DOWN(win, win.OnKeyDown)
wx.EVT_KEY_UP(win, win.OnKeyUp)
wx.EVT_UPDATE_UI(win, win.GetId(), win.RunCheck)
win.MAX_PROMPT_COMMANDS = 25
win.process = None
win.pid = -1
win.CommandArray = []
win.CommandArrayPos = -1
win.editpoint = 0
win.writeposition = 0
win.callback = None
Mixin.setPlugin('messagewindow', 'init', message_init)
#patameters:
# (redirect=True, hide=False, input_decorator=None, callback=None)
def RunCommand(win, command, redirect=True, hide=False, input_decorator=None,
callback=None):
"""replace $file = current document filename"""
global input_appendtext
#test if there is already a running process
if hasattr(win, 'messagewindow') and win.messagewindow and win.messagewindow.process:
common.showmessage(win, tr("The last process didn't stop yet. Please stop it and try again."))
return
if input_decorator:
input_appendtext = input_decorator(appendtext)
else:
开发者ID:LinYuanLab,项目名称:ulipad,代码行数:31,代码来源:mRun.py
注:本文中的modules.Mixin类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论