Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /newedit/src/images/, /newedit/src/modules/

newedit
Discussion topic

Back to topic list

CVS update: /newedit/src/images/, /newedit/src/modules/

Reply

Author limodou
Full name limodou
Date 2004-05-08 07:25:31 PDT
Message User: limodou
Date: 04/05/08 07:25:31

Added:
 /newedit/src/images/
  copy.gif, cut.gif, find.gif, new.gif, open.gif, paste.gif, redo.gif, save.gif,
  undo.gif
 /newedit/src/modules/
  ComEdit.py, DefaultMenu.py, Editor.py, EditorCtrl.py, MainFrame.py,
  MainSubFrame.py, OnModified.py, Pref.py, StatusBar.py, Toolbar.py,
  __init__.py, icon.py

Log:
 Issue number:
 Obtained from:
 Submitted by:
 Reviewed by:

File Changes:

Directory: /newedit/src/images/
===============================

File [added]: copy.gif
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/images/c​opy.gif?rev=1.1&​content-type=text/vn​d.viewcvs-markup
File [added]: cut.gif
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/images/c​ut.gif?rev=1.1&c​ontent-type=text/vnd​.viewcvs-markup
File [added]: find.gif
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/images/f​ind.gif?rev=1.1&​content-type=text/vn​d.viewcvs-markup
File [added]: new.gif
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/images/n​ew.gif?rev=1.1&c​ontent-type=text/vnd​.viewcvs-markup
File [added]: open.gif
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/images/o​pen.gif?rev=1.1&​content-type=text/vn​d.viewcvs-markup
File [added]: paste.gif
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/images/p​aste.gif?rev=1.1​&content-type=text/v​nd.viewcvs-markup
File [added]: redo.gif
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/images/r​edo.gif?rev=1.1&​content-type=text/vn​d.viewcvs-markup
File [added]: save.gif
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/images/s​ave.gif?rev=1.1&​content-type=text/vn​d.viewcvs-markup
File [added]: undo.gif
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/images/u​ndo.gif?rev=1.1&​content-type=text/vn​d.viewcvs-markup
Directory: /newedit/src/modules/
====================​============

File [added]: ComEdit.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​ComEdit.py?rev=1.1​&content-type=text​/vnd.viewcvs-markup
Added lines: 77
---------------
__doc__ = 'Common edit menu. Redo, Undo, Cut, Paste, Copy'

import Mixin
import wx
import makemenu

popmenulist = [ (0, #parent menu id
    [
        (100, 'IDPM_UNDO', 'Undo\tCtrl+Z', wx.ITEM_NORMAL, 'OnUndo', ''),
        (200, 'IDPM_REDO', 'Redo\tCtrl+Y', wx.ITEM_NORMAL, 'OnRedo', ''),
        (300, '', '-', wx.ITEM_SEPARATOR, None, ''),
        (400, 'IDPM_CUT', 'Cut\tCtrl+X', wx.ITEM_NORMAL, 'OnPopupEdit', ''),
        (500, 'IDPM_COPY', 'Copy\tCtrl+C', wx.ITEM_NORMAL, 'OnPopupEdit', ''),
        (600, 'IDPM_PASTE', 'Paste\tCtrl+V', wx.ITEM_NORMAL, 'OnPopupEdit', ''),
    ]),
]
Mixin.setMixin('editor', 'popmenulist', popmenulist)

def OnUndo(win, event):
    win.Undo()
Mixin.setMixin('editor', 'OnUndo', OnUndo)

def OnRedo(win, event):
    win.Redo()
Mixin.setMixin('editor', 'OnRedo', OnRedo)

def OnPopupEdit(win, event):
    eid = event.GetId()
    if eid == win.IDPM_CUT:
        win.CmdKeyExecute(wx​.stc.STC_CMD_CUT)
    elif eid == win.IDPM_COPY:
        win.CmdKeyExecute(wx​.stc.STC_CMD_COPY)
    elif eid == win.IDPM_PASTE:
        win.CmdKeyExecute(wx​.stc.STC_CMD_PASTE)
Mixin.setMixin('editor', 'OnPopupEdit', OnPopupEdit)

menulist = [ (0, #parent menu id
    [
        (200, 'IDP_EDIT', 'Edit', wx.ITEM_NORMAL, None, ''),
    ]),
    (200, #parent menu id
    [
        (201, 'IDM_EDIT_UNDO', 'Undo\tCtrl+Z', wx.ITEM_NORMAL, 'OnEditUndo', 'Undo last command'),
        (202, 'IDM_EDIT_REDO', 'Redo\tCtrl+Y', wx.ITEM_NORMAL, 'OnEditRedo', 'Redo last command'),
        (203, '', '-', wx.ITEM_SEPARATOR, None, ''),
        (204, 'IDM_EDIT_CUT', 'Cut\tCtrl+X', wx.ITEM_NORMAL, 'DoSTCBuildIn', 'Cut selected text to clipboard'),
        (205, 'IDM_EDIT_COPY', 'Copy\tCtrl+C', wx.ITEM_NORMAL, 'DoSTCBuildIn', 'Copy selected text to clipboard'),
        (206, 'IDM_EDIT_PASTE', 'Paste\tCtrl+V', wx.ITEM_NORMAL, 'DoSTCBuildIn', 'Paste text from clipboard'),
    ]),
]
Mixin.setMixin('mainframe', 'menulist', menulist)

def editorinit(win):
    wx.EVT_RIGHT_DOWN(win, win.OnPopUp)
Mixin.setPlugin('editor', 'init', editorinit)

def OnPopUp(win, event):
    win.PopupMenu(win.popmenu, event.GetPosition())
Mixin.setMixin('editor', 'OnPopUp', OnPopUp)

def OnEditUndo(win, event):
    win.document.Undo()
Mixin.setMixin('mainframe', 'OnEditUndo', OnEditUndo)

def OnEditRedo(win, event):
    win.document.Redo()
Mixin.setMixin('mainframe', 'OnEditRedo', OnEditRedo)

def DoSTCBuildIn(win, event):
    eid = event.GetId()
    if eid == win.IDM_EDIT_CUT:
        win.document.CmdKeyE​xecute(wx.stc.STC_CM​D_CUT)
    elif eid == win.IDM_EDIT_COPY:
        win.document.CmdKeyE​xecute(wx.stc.STC_CM​D_COPY)
    elif eid == win.IDM_EDIT_PASTE:
        win.document.CmdKeyE​xecute(wx.stc.STC_CM​D_PASTE)
Mixin.setMixin('mainframe', 'DoSTCBuildIn', DoSTCBuildIn)

File [added]: DefaultMenu.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​DefaultMenu.py?rev=1​.1&content-type=​text/vnd.viewcvs-mar​kup
Added lines: 22
---------------
#menu

import Mixin
from makemenu import *
from wx import *

menulist = [ (0, #parent menu id
    [
        (100, 'IDM_FILE', 'File', ITEM_NORMAL, None, ''),
        (900, 'IDM_FILE', 'Help', ITEM_NORMAL, None, ''),
    ]),
    (100,
    [
        (119, '', '-', ITEM_SEPARATOR, None, ''),
        (120, 'IDM_FILE_EXIT', 'Exit\tAlt+X', ITEM_NORMAL, 'OnExit', 'Exit Program'),
    ]),
]
Mixin.setMixin('mainframe', 'menulist', menulist)

def OnExit(win, event):
    win.Close()
Mixin.setMixin('mainframe', 'OnExit', OnExit)

File [added]: Editor.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​Editor.py?rev=1.1​&content-type=text/​vnd.viewcvs-markup
Added lines: 45
---------------
import Mixin
import wx
import wx.stc
import makemenu

class Editor(wx.stc.StyledTextCtrl, Mixin.Mixin):

    __mixinname__ = 'editor'
    fid = 1
    popmenulist = []

    def __init__(self, parent, filename=''):
        self.initmixin()

        wx.stc.StyledTextCtr​l.__init__(self, parent, -1)
        self.id = self.GetId()
        self.parent = parent
        self.editctrl = self.parent
        self.mainframe = self.editctrl.mainframe
        self.app = self.mainframe.app
        self.filename = filename
        self.fileid = self.fid
        Editor.fid += 1
        if self.filename:
            text = open(self.filename).read()
            self.SetText(text)
            self.EmptyUndoBuffer()
            self.SetSavePoint()

        #make popup menu
        self.popmenu = makemenu.makepopmenu(self, self.popmenulist)

        #INTERFACE: editor,setevent,win
        self.callplugin('init', self)

    def getFilename(self):
        if self.filename:
            return self.filename
        else:
            return 'Untitled %d' % self.fileid

def neweditor(win, filename):
    return Editor(win, filename)
Mixin.setPlugin('editctrl', 'neweditor', neweditor)


File [added]: EditorCtrl.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​EditorCtrl.py?rev=1.​1&content-type=t​ext/vnd.viewcvs-mark​up
Added lines: 178
----------------
import Mixin
import wx
import os.path
import makemenu

menulist = [ (100,
    [
        (101, 'IDM_FILE_NEW', 'New\tCtrl+N', wx.ITEM_NORMAL, 'OnFileNew', 'New document'),
        (102, 'IDM_FILE_OPEN', 'Open\tCtrl+O', wx.ITEM_NORMAL, 'OnFileOpen', 'Open an exist document'),
        (103, 'IDM_FILE_CLOSE', 'Close', wx.ITEM_NORMAL, 'OnFileClose', 'Close current document'),
        (104, 'IDM_FILE_CLOSE_ALL', 'Close All', wx.ITEM_NORMAL, 'OnFileCloseAll', 'Close all documents'),
        (110, '', '-', wx.ITEM_SEPARATOR, None, ''),
        (111, 'IDM_FILE_SAVE', 'Save\tCtrl+S', wx.ITEM_NORMAL, 'OnFileSave', 'Save current document'),
        (112, 'IDM_FILE_SAVE_ALL', 'Save All', wx.ITEM_NORMAL, 'OnFileSaveAll', 'Save all documents'),
        (113, 'IDM_FILE_SAVE_AS', 'Save As', wx.ITEM_NORMAL, 'OnFileSaveAs', 'Save current document as ...'),
    ]),
]
Mixin.setMixin('mainframe', 'menulist', menulist)

popmenulist = [ (0,
    [
        (100, 'IDPM_FILE_CLOSE', 'Close', wx.ITEM_NORMAL, 'OnPopUpMenu', 'Close current document'),
        (200, 'IDPM_FILE_CLOSE_ALL', 'Close All', wx.ITEM_NORMAL, 'OnPopUpMenu', 'Close all documents'),
        (250, '', '-', wx.ITEM_SEPARATOR, None, ''),
        (300, 'IDPM_FILE_SAVE', 'Save\tCtrl+S', wx.ITEM_NORMAL, 'OnPopUpMenu', 'Save current document'),
        (400, 'IDPM_FILE_SAVE_ALL', 'Save All', wx.ITEM_NORMAL, 'OnPopUpMenu', 'Save all documents'),
        (500, 'IDPM_FILE_SAVE_AS', 'Save As', wx.ITEM_NORMAL, 'OnPopUpMenu', 'Save current document as ...'),
    ]),
]
Mixin.setMixin('editctrl', 'popmenulist', popmenulist)

class EditCtrl(wx.Notebook, Mixin.Mixin):

    __mixinname__ = 'editctrl'
    popmenulist = []

    def __init__(self, parent, flags):
        self.initmixin()

        wx.Notebook.__init__(self, parent, -1, style=flags)
        self.id = self.GetId()

        self.parent = parent
        self.mainframe = self.parent.parent
        self.app = self.mainframe.app
        self.mainframe.editctrl = self

        #make popup menu
        self.popmenu = makemenu.makepopmenu(self, self.popmenulist)
        wx.EVT_RIGHT_DOWN(self, self.OnPopUp)

        wx.EVT_NOTEBOOK_PAGE​_CHANGED(self, self.id, self.OnPageChanged)

        self.list = []
        self.new()

    def new(self, filename=''):
        ctrl = self.execplugin('neweditor', self, filename)
        if ctrl:
            self.list.append(ctrl)
            self.AddPage(ctrl, os.path.basename(ctr​l.getFilename()))
            self.switch(ctrl)

    def switch(self, ctrl):
        index = self.getIndex(ctrl)
        self.SetSelection(index)

    def getIndex(self, ctrl):
        return self.list.index(ctrl)

    def showTitle(self, ctrl):
        if ctrl.GetModify():
            pagetitle = ctrl.getFilename() + ' *'
        else:
            pagetitle = ctrl.getFilename()
        title = '%s - [%s]' % (self.app.appname, pagetitle)
        self.SetPageText(sel​f.getIndex(ctrl), os.path.basename(pagetitle))
        self.mainframe.SetTitle(title)

    def OnPageChanged(self, event):
        document = self.list[event.GetSelection()]
        self.showTitle(document)
        document.SetFocus()
        self.mainframe.document = document
        self.document = document
        event.Skip()

    def OnPopUp(self, event):
        self.PopupMenu(self.popmenu, event.GetPosition())

    def OnPopUpMenu(self, event):
        eid = event.GetId()
        if eid == self.IDPM_FILE_CLOSE:
            self.mainframe.OnFil​eClose(event)
        elif eid == self.IDPM_FILE_CLOSE_ALL:
            self.mainframe.OnFil​eCloseAll(event)
        elif eid == self.IDPM_FILE_SAVE:
            self.mainframe.OnFil​eSave(event)
        elif eid == self.IDPM_FILE_SAVE_ALL:
            self.mainframe.OnFil​eSaveAll(event)
        elif eid == self.IDPM_FILE_SAVE_AS:
            self.mainframe.OnFil​eSaveAs(event)

def neweditctrl(win):
    win.notebook = EditCtrl(win, wx.NB_FIXEDWIDTH)
Mixin.setPlugin('mainsubframe', 'init', neweditctrl)

def OnFileNew(win, event):
    win.editctrl.new()
Mixin.setMixin('mainframe', 'OnFileNew', OnFileNew)

def OnFileOpen(win, event):
    dlg = wx.FileDialog(win, "Open", "", "", "All files (*.*)|*", wx.OPEN|wx.HIDE_READ​ONLY|wx.MULTIPLE)
    if dlg.ShowModal() == wx.ID_OK:
        for file in dlg.GetPaths():
            win.editctrl.new(file)
Mixin.setMixin('mainframe', 'OnFileOpen', OnFileOpen)

def OnFileClose(win, event):
    win.CloseFile(win.document)
Mixin.setMixin('mainframe', 'OnFileClose', OnFileClose)

def OnFileCloseAll(win, event):
    k = len(win.editctrl.list)
    for i in range(k):
        ctrl = win.editctrl.list[0]
        r = win.CloseFile(ctrl)
        if r == wx.ID_CANCEL:
            break
Mixin.setMixin('mainframe', 'OnFileCloseAll', OnFileCloseAll)

def CloseFile(win, ctrl):
    answer = wx.ID_YES
    if (ctrl.GetModify()):
        d = wx.MessageDialog(win, "Would you like to save %s ?" % win.document.getFilename(), "DrPython", wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION)
        answer = d.ShowModal()
        d.Destroy()
        if (answer == wx.ID_YES):
            win.OnFileSave(None)
        elif (answer == wx.ID_CANCEL):
            return answer
    index = win.editctrl.getIndex(ctrl)
    win.editctrl.DeletePage(index)
    win.editctrl.list.pop(index)
    if len(win.editctrl.list) == 0:
        win.editctrl.new()
    return answer
Mixin.setMixin('mainframe', 'CloseFile', CloseFile)

def OnFileSave(win, event):
    win.SaveFile(win.document)
Mixin.setMixin('mainframe', 'OnFileSave', OnFileSave)

def OnFileSaveAll(win, event):
    for ctrl in win.editctrl.list:
        r = win.SaveFile(ctrl)
Mixin.setMixin('mainframe', 'OnFileSaveAll', OnFileSaveAll)

def OnFileSaveAs(win, event):
        win.SaveFile(win.document, True)
Mixin.setMixin('mainframe', 'OnFileSaveAs', OnFileSaveAs)

def SaveFile(win, ctrl, issaveas=False):
    if issaveas or len(ctrl.filename)<=0:
        dlg = wx.FileDialog(win, "Save File As", "", "", "All files (*.*)|*", wx.SAVE|wx.OVERWRITE_PROMPT)
        if (dlg.ShowModal() == wx.ID_OK):
            old = win.document.filename
            win.document.filename = dlg.GetPath()
        else:
            return False
    cfile = file(ctrl.filename, 'wb')
    cfile.write(ctrl.GetText())
    cfile.close()
    ctrl.SetSavePoint()
    win.editctrl.showTitle(ctrl)
    return True
Mixin.setMixin('mainframe', 'SaveFile', SaveFile)


File [added]: MainFrame.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​MainFrame.py?rev=1.1​&content-type=te​xt/vnd.viewcvs-marku​p
Added lines: 34
---------------
from Debug import debugput
import Mixin
import wx
import makemenu
import Accelerator

class NewEditFrame(wx.Frame, Mixin.Mixin):

    __mixinname__ = 'mainframe'
    menulist = []
    accellist = []

    def __init__(self, app):
        self.initmixin()
        self.app = app

        wx.Frame.__init__(self, None, -1, self.app.appname, size=wx.Size(600, 400))

        self.id = self.GetId()
        self.menuBar=makemen​u.makemenu(self, self.menulist, NewEditFrame.accellist)
        self.SetMenuBar(self.menuBar)
        Accelerator.initacce​lerator(self, NewEditFrame.accellist)

        self.callplugin('init', self)

def init(app):
    app.frame = NewEditFrame(app)
    if app.frame:
        app.frame.Show(True)
        app.SetTopWindow(app.frame)
        return True
    else:
        return False
Mixin.setPlugin('app', 'init', init)

File [added]: MainSubFrame.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​MainSubFrame.py?rev=​1.1&content-type​=text/vnd.viewcvs-ma​rkup
Added lines: 54
---------------
import Mixin
from wx import *

class MainSubFrame(SashLayoutWindow, Mixin.Mixin):

    __mixinname__ = 'mainsubframe'

    def __init__(self, parent, size, orient, align, sash, sashvisible=True):
        self.initmixin()

        SashLayoutWindow.__init__(self, parent, -1, DefaultPosition, Size(10, 10), style = NO_BORDER|SW_3D)
        self.parent = parent
        self.parent.mainsubframe = self
        self.id = self.GetId()

        EVT_SASH_DRAGGED(self.parent, self.id, self.parent.OnSashDrag)
        EVT_SIZE(self.parent, self.parent.OnSize)

        self.SetDefaultSize(size)
        self.SetOrientation(orient)
        self.SetAlignment(align)
        self.SetBackgroundCo​lour(Colour(0, 0, 0))
        self.SetSashVisible(sash, sashvisible)

        self.callplugin('init', self)

def OnSashDrag(self, event):
    if event.GetDragStatus() == SASH_STATUS_OUT_OF_RANGE:
        return

    eID = event.GetId()
    self.callplugin('ons​ashdrag_plugin', self, event)
    
    LayoutAlgorithm().La​youtWindow(self, self.mainsubframe)
Mixin.setMixin('mainframe', 'OnSashDrag', OnSashDrag)

def OnSize(self, event):
    self.callplugin('ons​ize_plugin', self, event)
    LayoutAlgorithm().La​youtWindow(self, self.mainsubframe)
Mixin.setMixin('mainframe', 'OnSize', OnSize)

def onsashdrag_plugin(win, event):
    if event.GetId() == win.mainsubframe.id:
        width, height = win.GetSizeTuple()
        win.mainsubframe.Set​DefaultSize(Size(wid​th, event.GetDragRect().height))
Mixin.setPlugin('mainframe', 'onsashdrag_plugin', onsashdrag_plugin)

def onsize_plugin(win, event):
    pass
Mixin.setPlugin('mainframe', 'onsize_plugin', onsize_plugin)

def newsubmainframe(parent):
    return MainSubFrame(parent, Size(10, 10), LAYOUT_HORIZONTAL, LAYOUT_TOP, SASH_BOTTOM, False)
Mixin.setPlugin('mainframe', 'init', newsubmainframe)

File [added]: OnModified.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​OnModified.py?rev=1.​1&content-type=t​ext/vnd.viewcvs-mark​up
Added lines: 16
---------------
import Mixin
import os.path
from wx import *
from wx.stc import *

def init(win):
    EVT_STC_MODIFIED(win, win.id, win.OnModified)
Mixin.setPlugin('editor', 'init', init)

def OnModified(win, event):
    if (win.GetModify()):
        win.editctrl.showTitle(win)
    else:
        win.SetSavePoint()
        win.editctrl.showTitle(win)
Mixin.setMixin('editor', 'OnModified', OnModified)

File [added]: Pref.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​Pref.py?rev=1.1&​content-type=text/vn​d.viewcvs-markup
Added lines: 19
---------------
import Mixin
import wx
import PrefDialog

menulist = [ (0,
    [
        (400, 'IDM_OPTION', 'Option', wx.ITEM_NORMAL, None, ''),
    ]),
    (400,
    [
        (401, 'IDM_OPTION_PREFERENCE', 'Preference...', wx.ITEM_NORMAL, 'OnOptionPreference', 'Setup program preferences'),
    ]),
]
Mixin.setMixin('mainframe', 'menulist', menulist)

def OnOptionPreference(win, event):
    dlg = PrefDialog.PrefDialog(win)
    dlg.ShowModal()
Mixin.setMixin('mainframe', 'OnOptionPreference', OnOptionPreference)

File [added]: StatusBar.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​StatusBar.py?rev=1.1​&content-type=te​xt/vnd.viewcvs-marku​p
Added lines: 7
--------------
import Mixin
import wx

def init(win):
    win.statusbar = win.CreateStatusBar(3, style=wx.ST_SIZEGRIP, id=-1)
    win.SetStatusWidths([-1, 60, 60])
Mixin.setPlugin('mainframe', 'init', init)

File [added]: Toolbar.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​Toolbar.py?rev=1.1​&content-type=text​/vnd.viewcvs-markup
Added lines: 39
---------------
import Mixin
import wx
import Id
from Debug import *
import os.path
import maketoolbar

toollist = [
    (100, 'new'),
    (110, 'open'),
    (120, 'save'),
    (130, '|'),
    (140, 'cut'),
    (150, 'copy'),
    (160, 'paste'),
    (170, '|'),
    (180, 'undo'),
    (190, 'redo'),
    (900, '|'),
]
Mixin.setMixin('mainframe', 'toollist', toollist)

#order, IDname, imagefile, short text, long text, func
toolbaritems = {
    'new':('IDM_FILE_NEW', 'images/new.gif', 'new', 'New document', 'OnFileNew'),
    'open':('IDM_FILE_OPEN', 'images/open.gif', 'open', 'Open document', 'OnFileOpen'),
    'save':('IDM_FILE_SAVE', 'images/save.gif', 'save', 'Save document', 'OnFileSave'),
    'cut':('IDM_EDIT_CUT', 'images/cut.gif', 'cut', 'Cut selected text to clipboard', 'DoSTCBuildIn'),
    'copy':('IDM_EDIT_COPY', 'images/copy.gif', 'copy', 'Copy selected text clipboard', 'DoSTCBuildIn'),
    'paste':('IDM_EDIT_PASTE', 'images/paste.gif', 'paste', 'Paste text from clipboard', 'DoSTCBuildIn'),
    'undo':('IDM_EDIT_UNDO', 'images/undo.gif', 'undo', 'Undo last command', 'OnEditUndo'),
    'redo':('IDM_EDIT_REDO', 'images/redo.gif', 'redo', 'Redo last command', 'OnEditRedo'),
}
Mixin.setMixin('mainframe', 'toolbaritems', toolbaritems)

def inittoolbar(win):
    wx.InitAllImageHandlers()
    maketoolbar.maketoolbar(win, win.toollist, win.toolbaritems)
Mixin.setPlugin('mainframe', 'init', inittoolbar)

File [added]: __init__.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​__init__.py?rev=1.1​&content-type=tex​t/vnd.viewcvs-markup​
Added lines: 13
---------------
__all__ = [
    'MainFrame',
    'EditorCtrl',
    'DefaultMenu',
    'StatusBar',
    'MainSubFrame',
    'Editor',
    'OnModified',
    'ComEdit',
    'Toolbar',
    'icon',
    'Pref',
]

File [added]: icon.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​icon.py?rev=1.1&​content-type=text/vn​d.viewcvs-markup
Added lines: 8
--------------
import wx
import Mixin

def init(win):
    icon = wx.EmptyIcon()
    icon.LoadFile('py.ico', wx.BITMAP_TYPE_ICO)
    win.SetIcon(icon)
Mixin.setPlugin('mainframe', 'init', init)




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@newe​dit.tigris.org
For additional commands, e-mail: cvs-help at newedit dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /newedit/src/images/, /newedit/src/modules/ limodou limodou 2004-05-08 07:25:31 PDT
Messages per page: