Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /newedit/src/, /newedit/src/mixins/, /newedit/src/modules/, /newedit/src/resources/

newedit
Discussion topic

Back to topic list

CVS update: /newedit/src/, /newedit/src/mixins/, /newedit/src/modules/, /newedit/src/resources/

Reply

Author limodou
Full name limodou
Date 2004-05-14 19:20:59 PDT
Message User: limodou
Date: 04/05/14 19:20:59

Modified:
 /newedit/src/
  ChangeLog.txt
 /newedit/src/mixins/
  Editor.py, EditorCtrl.py, OnModified.py, Search.py, Toolbar.py, __init__.py
 /newedit/src/modules/
  FindReplaceDialog.py, Mixin.py, PrefDialog.py
 /newedit/src/resources/
  finddialog.xrc

Log:
 bug fix

File Changes:

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

File [changed]: ChangeLog.txt
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/ChangeLo​g.txt?r1=1.4&r2=​1.5
Delta lines: +4 -0
-------------------
--- ChangeLog.txt 13 May 2004 07:04:49 -0000 1.4
+++ ChangeLog.txt 15 May 2004 02:20:56 -0000 1.5
@@ -1,3 +1,7 @@
+[2004/05/14]
+Search.py Ôö¼Ó²éÕÒ¡¢Ìæ»»¹¦ÄÜ£¬​Ôö¼Ó¹¤¾ßÌõÏÔʾ£¬½«Ñ¡​ÖÐÎı¾Ö±½Ó½øÐвéÕÒ¹¦​ÄÜ
+EditCtrl.py Ôö¼Ó¹Ø±Õ´°¿ÚʱÌáʾ±£´æÎļþ
+
 [2004/05/13]
 OnPosition.py Ôö¼ÓÐС¢ÁÐ×ø±êÏÔʾ
 Lineending.py ÐнáÊøģʽ´¦Àí

Directory: /newedit/src/mixins/
===============================

File [changed]: Editor.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/mixins/E​ditor.py?r1=1.2&​r2=1.3
Delta lines: +10 -0
--------------------
--- Editor.py 13 May 2004 07:04:49 -0000 1.2
+++ Editor.py 15 May 2004 02:20:56 -0000 1.3
@@ -80,6 +80,16 @@
         else:
             return 'Untitled %d' % self.fileid
 
+ def getEOLChar(self):
+ eolmode = self.GetEOLMode()
+ if eolmode == wx.stc.STC_EOL_CR:
+ eolchar = '\r'
+ elif eolmode == wx.stc.STC_EOL_CRLF:
+ eolchar = '\r\n'
+ else:
+ eolchar = '\n'
+ return eolchar
+
 def neweditor(win, filename):
     return Editor(win, filename)
 Mixin.setPlugin('editctrl', 'neweditor', neweditor)

File [changed]: EditorCtrl.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/mixins/E​ditorCtrl.py?r1=1.4​&r2=1.5
Delta lines: +45 -13
---------------------
--- EditorCtrl.py 14 May 2004 05:10:09 -0000 1.4
+++ EditorCtrl.py 15 May 2004 02:20:56 -0000 1.5
@@ -49,9 +49,10 @@
         #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.callplugin('init', self)
+
         self.list = []
         self.new()
 
@@ -106,23 +107,51 @@
             self.mainframe.OnFil​eSaveAs(event)
 
     def switch(self, document):
- self.changeDocument(document)
         index = self.getIndex(document)
+ if index != self.GetSelection():
         self.SetSelection(index)
+ else:
+ self.showPageTitle(document)
+ self.changeDocument(document)
 
- def showTitle(self, ctrl):
+ def getDispTitle(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(ctr​l.getFilename()))
+
+ return pagetitle
+
+ def showPageTitle(self, ctrl):
+ title = os.path.basename(sel​f.getDispTitle(ctrl)​)
+ index = self.getIndex(ctrl)
+ if title != self.GetPageText(index):
+ self.SetPageText(sel​f.getIndex(ctrl), title)
+
+ def showTitle(self, ctrl):
+ title = "%s - [%s]" % (self.app.appname, self.getDispTitle(ctrl))
+ if title != self.mainframe.GetTitle():
         self.mainframe.SetTitle(title)
 
 def neweditctrl(win):
     win.notebook = EditCtrl(win, 0)
 Mixin.setPlugin('mainsubframe', 'init', neweditctrl)
 
+def init(win):
+ wx.EVT_CLOSE(win, win.OnClose)
+Mixin.setPlugin('mainframe', 'init', init)
+
+def OnClose(win, event):
+ if event.CanVeto():
+ k = len(win.editctrl.list)
+ for i in range(k):
+ ctrl = win.editctrl.list[0]
+ r = win.CloseFile(ctrl)
+ if r == wx.ID_CANCEL:
+ return
+ event.Skip()
+Mixin.setMixin('mainframe', 'OnClose', OnClose)
+
 def OnFileNew(win, event):
     win.editctrl.new()
 Mixin.setMixin('mainframe', 'OnFileNew', OnFileNew)
@@ -137,6 +166,8 @@
 
 def OnFileClose(win, event):
     win.CloseFile(win.document)
+ if len(win.editctrl.list) == 0:
+ win.editctrl.new()
 Mixin.setMixin('mainframe', 'OnFileClose', OnFileClose)
 
 def OnFileCloseAll(win, event):
@@ -146,10 +177,13 @@
         r = win.CloseFile(ctrl)
         if r == wx.ID_CANCEL:
             break
+ if len(win.editctrl.list) == 0:
+ win.editctrl.new()
 Mixin.setMixin('mainframe', 'OnFileCloseAll', OnFileCloseAll)
 
 def CloseFile(win, ctrl):
     answer = wx.ID_YES
+ win.editctrl.switch(ctrl)
     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)
@@ -162,11 +196,9 @@
     index = win.editctrl.getIndex(ctrl)
     win.editctrl.DeletePage(index)
     win.editctrl.list.pop(index)
- if len(win.editctrl.list) == 0:
- win.editctrl.new()
- else:
         if index >= len(win.editctrl.list):
             index = len(win.editctrl.list)-1
+ if index >= 0:
         win.editctrl.switch(​win.editctrl.list[in​dex])
     return answer
 Mixin.setMixin('mainframe', 'CloseFile', CloseFile)

File [changed]: OnModified.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/mixins/O​nModified.py?r1=1.3​&r2=1.4
Delta lines: +2 -2
-------------------
--- OnModified.py 13 May 2004 10:24:44 -0000 1.3
+++ OnModified.py 15 May 2004 02:20:56 -0000 1.4
@@ -7,8 +7,8 @@
 
 def OnModified(win, event):
     if win.GetModify():
- win.mainframe.SetTitle("%s - [%s *]" % (win.app.appname, win.getFilename()))
+ win.editctrl.showTitle(win)
     else:
         win.SetSavePoint()
- win.mainframe.SetTitle("%s - [%s]" % (win.app.appname, win.getFilename()))
+ win.editctrl.showTitle(win)
 Mixin.setMixin('editor', 'OnModified', OnModified)

File [changed]: Search.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/mixins/S​earch.py?r1=1.3&​r2=1.4
Delta lines: +34 -8
--------------------
--- Search.py 14 May 2004 05:10:09 -0000 1.3
+++ Search.py 15 May 2004 02:20:56 -0000 1.4
@@ -11,14 +11,27 @@
     ]),
     (400, #parent menu id
     [
- (301, 'IDM_SEARCH_FIND', 'Find...\tCtrl+F', wx.ITEM_NORMAL, 'OnSearchFind', 'Find text'),
- (302, 'IDM_SEARCH_REPLACE', 'Replace...\tCtrl+H', wx.ITEM_NORMAL, 'OnSearchReplace', 'Find and replace text'),
- (303, 'IDM_SEARCH_FIND_NEXT', 'Find Next\tF3', wx.ITEM_NORMAL, 'OnSearchFindNext', 'Find next occurance of text'),
- (304, 'IDM_SEARCH_FIND_PREVIOUS', 'Find Previous\tCtrl+Shift+F3', wx.ITEM_NORMAL, 'OnSearchFindPrev', 'Find previous occurance of text'),
+ (401, 'IDM_SEARCH_FIND', 'Find...\tCtrl+F', wx.ITEM_NORMAL, 'OnSearchFind', 'Find text'),
+ (402, 'IDM_SEARCH_DIRECTFIND', 'Direct Find\tF4', wx.ITEM_NORMAL, 'OnSearchDirectFind', 'Direct find selected text'),
+ (403, 'IDM_SEARCH_REPLACE', 'Find & Replace...\tCtrl+H', wx.ITEM_NORMAL, 'OnSearchReplace', 'Find and replace text'),
+ (404, 'IDM_SEARCH_FIND_NEXT', 'Find Next\tF3', wx.ITEM_NORMAL, 'OnSearchFindNext', 'Find next occurance of text'),
+ (405, 'IDM_SEARCH_FIND_PREVIOUS', 'Find Previous\tShift+F3', wx.ITEM_NORMAL, 'OnSearchFindPrev', 'Find previous occurance of text'),
     ]),
 ]
 Mixin.setMixin('mainframe', 'menulist', menulist)
 
+toollist = [
+ (220, 'find'),
+ (230, '|'),
+]
+Mixin.setMixin('mainframe', 'toollist', toollist)
+
+toolbaritems = {
+ 'find':('IDM_SEARCH_FIND', 'images/find.gif', 'find', 'Find text', 'OnSearchFind'),
+}
+Mixin.setMixin('mainframe', 'toolbaritems', toolbaritems)
+
+
 findresfile = 'resources/finddialog.xrc'
 Mixin.setMixin('mainframe', 'findresfile', findresfile)
 
@@ -35,13 +48,25 @@
     dlg.Show()
 Mixin.setMixin('mainframe', 'OnSearchFind', OnSearchFind)
 
+def OnSearchDirectFind(win, event):
+ text = win.document.GetSelectedText()
+ if len(text) > 0:
+ win.finder.findtext = text
+ win.finder.find(0)
+Mixin.setMixin('mainframe', 'OnSearchDirectFind', OnSearchDirectFind)
+
+def OnSearchReplace(win, event):
+ dlg = Resource.loadfromres​file(win.findresfile​, win, FindReplaceDialog.Fi​ndReplaceDialog, 'FindReplaceDialog', win.finder)
+ dlg.Show()
+Mixin.setMixin('mainframe', 'OnSearchReplace', OnSearchReplace)
+
 def OnSearchFindNext(win, event):
- win.finder.findNext()
+ win.finder.find(0)
 Mixin.setMixin('mainframe', 'OnSearchFindNext', OnSearchFindNext)
 
-def OnSerachFindPrev(win, event):
- win.finder.findPrev()
-Mixin.setMixin('mainframe', 'OnSerachFindPrev', OnSerachFindPrev)
+def OnSearchFindPrev(win, event):
+ win.finder.find(1)
+Mixin.setMixin('mainframe', 'OnSearchFindPrev', OnSearchFindPrev)
 
 preflist = [
     ('generic', 120, 'num', 'max_findtext_num', 'Max number of saved find text:', None)
@@ -51,5 +76,6 @@
 def pref_init(pref):
     pref.max_findtext_num = 20
     pref.findtexts = []
+ pref.replacetexts = []
 Mixin.setPlugin('preference', 'init', pref_init)
 

File [changed]: Toolbar.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/mixins/T​oolbar.py?r1=1.1​&r2=1.2
Delta lines: +1 -1
-------------------
--- Toolbar.py 12 May 2004 07:04:19 -0000 1.1
+++ Toolbar.py 15 May 2004 02:20:56 -0000 1.2
@@ -17,7 +17,7 @@
     (180, 'undo'),
     (190, 'redo'),
     (200, '|'),
- (210, 'preference'),
+ (400, 'preference'),
     (900, '|'),
 ]
 Mixin.setMixin('mainframe', 'toollist', toollist)

File [changed]: __init__.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/mixins/_​_init__.py?r1=1.4​&r2=1.5
Delta lines: +1 -0
-------------------
--- __init__.py 13 May 2004 12:40:05 -0000 1.4
+++ __init__.py 15 May 2004 02:20:56 -0000 1.5
@@ -15,4 +15,5 @@
     'Search',
     'OnPosition',
     'Lineending',
+ 'DClickCloseFile',
 ]

Directory: /newedit/src/modules/
====================​============

File [changed]: FindReplaceDialog.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​FindReplaceDialog.py​?r1=1.4&r2=1.5
Delta lines: +188 -440
-----------------------
--- FindReplaceDialog.py 14 May 2004 05:10:09 -0000 1.4
+++ FindReplaceDialog.py 15 May 2004 02:20:57 -0000 1.5
@@ -7,15 +7,14 @@
 
 class Finder:
     def __init__(self):
- self.findtext = ""
+ self.findtext = ''
         self.regular = False
         self.rewind = True
         self.matchcase = False
         self.wholeword = False
         self.inselection = False
- self.fromcursor = True
-
- self.found = False
+ self.direction = 0
+ self.replacetext = ''
 
     def getFlags(self):
         flags = 0
@@ -31,445 +30,155 @@
     def setWindow(self, win):
         self.win = win
 
- def beginFind(self, direction=0):
- """win is a STC window"""
-
- self.found = False
- if not self.fromcursor:
- self.start = 0
- else:
- self.start = self.win.GetCurrentPos()
- self.lastpos = self.start
-
     def find(self, direction=0):
         if direction == 0: #forwards
- if self.regular:
- self.findReNext()
- else:
- self.findNext()
+ r = self.findNext()
         else:
- self.findPrev()
+ r = self.findPrev()
+
+ if r:
+ self.setSelection(*r)
 
     def findNext(self):
+ length = len(self.findtext)
+ if length == 0:
+ return None
+ if self.regular:
+ return self.findReNext()
+ start = self.win.GetCurrentPos()
         end = self.win.GetLength()
- pos = self.win.FindText(self.lastpos, end, self.findtext, self.getFlags())
+ pos = self.win.FindText(start, end, self.findtext, self.getFlags())
         if pos == -1: #not found
             if self.rewind:
- pos = self.win.FindText(0, self.lastpos, self.findtext, self.getFlags())
+ pos = self.win.FindText(0, start, self.findtext, self.getFlags())
             if pos == -1:
- wx.MessageDialog(self.win, "Cann't find the text [%s]" % self.findtext, "Find result", wx.OK).ShowModal()
- return
- self.lastpos = pos + len(self.findtext)
- self.win.GotoPos(pos + len(self.findtext))
- self.win.EnsureCaretVisible()
- self.win.SetSelectionStart(pos)
- self.win.SetSelectionEnd(pos + len(self.findtext))
+ message = "Cann't find the text !"
+ self.showMessage(message)
+ return None
+
+ return (pos, pos + length)
 
     def findPrev(self):
- pos = self.win.FindText(self.lastpos, 0, self.findtext, self.getFlags())
+ length = len(self.findtext)
+ if length == 0:
+ return None
+ start = self.win.GetCurrentPos()
+ text = self.win.GetSelectedText()
+ if text == self.findtext:
+ start -= len(text)+1
+ start = max ([start, 0])
+ pos = self.win.FindText(start, 0, self.findtext, self.getFlags())
         if pos == -1: #not found
             if self.rewind:
- print 'rewind'
- pos = self.win.FindText(se​lf.win.GetLength(), self.lastpos, self.findtext, self.getFlags())
- print 'dddd'
+ pos = self.win.FindText(se​lf.win.GetLength(), start, self.findtext, self.getFlags())
             if pos == -1:
- wx.MessageDialog(self.win, "Cann't find the text [%s]" % self.findtext, "Find result", wx.OK).ShowModal()
- return
- self.lastpos = pos
- self.win.GotoPos(pos)
- self.win.EnsureCaretVisible()
- self.win.SetSelectionStart(pos)
- self.win.SetSelectionEnd(pos + len(self.findtext))
+ message = "Cann't find the text !"
+ self.showMessage(message)
+ return None
+
+ return (pos, pos + length)
+
+ def showMessage(self, message):
+ wx.MessageDialog(self.win, message, "Find result", wx.OK).ShowModal()
 
     def findReNext(self):
- doclength = self.win.GetLength()
+ length = len(self.findtext)
+ if length == 0:
+ return None
         
- prev = self.lastpos
+ start = self.win.GetCurrentPos()
+ end = self.win.GetLength()
         
- case = 0
- if (not self.matchcase):
- case = re.IGNORECASE
+ result = self.regularSearch(start, end)
+ if result == None:
+ if self.rewind:
+ result = self.regularSearch(0, start)
+ if result == None:
+ message = "Cann't find the text !"
+ self.showMessage(message)
+ return None
         
- regularexpression = re.compile(self.findtext, case | re.MULTILINE)
+ return result
                 
- endpos = self.targetEnd
- if (self.lastpos >= doclength) or (self.lastpos < 0):
- self.lastpos = 0
-
- matchedtext = regularexpression.se​arch(self.win.GetTex​t()[self.lastpos:end​pos])
-
- if matchedtext is None:
- if (prev > self.targetStart):
- self.lastpos = self.targetStart
- d = wx.lib.dialogs.Scrol​ledMessageDialog(sel​f.parent, ("End of document reached."), "DrPython Find")
- d.ShowModal()
- d.Destroy()
- return
- d = wx.lib.dialogs.Scrol​ledMessageDialog(sel​f.parent, ("Regular expression \"" + findtext + "\" not found"), "DrPython Find")
- d.ShowModal()
- d.Destroy()
- return
-
- oldpos = self.lastpos
- self.lastpos = oldpos + matchedtext.start()
- endpos = oldpos + matchedtext.end()
-
-
- self.parent.txtDocum​ent.GotoPos(self.las​tpos)
- self.parent.txtDocum​ent.EnsureCaretVisib​le()
- self.parent.txtDocum​ent.SetSelectionStar​t(self.lastpos)
- self.parent.txtDocum​ent.SetSelectionEnd(​endpos)
-
- self.lastpos = endpos
-
- def DoFindNext(self):
- if (not self.RE):
- self.DoFind(self.findtext, self.findflags, self.backwards)
- return
- self.DoREFind(self.findtext, self.findflags)
-
- def DoFindPrevious(self):
- if (not self.RE):
- pback = self.backwards
- self.DoFind(self.findtext, self.findflags, not self.backwards)
- self.DoFindNext()
- self.backwards = pback
-
- def GetFindPos(self):
- return self.lastpos
-
- def GetFindText(self):
- return self.findtext
-
- def ReplaceAll(self, findtext, replacetext, flags, prompt = 0):
- p = self.parent.txtDocum​ent.FindText(self.ta​rgetStart, self.targetEnd, findtext, flags)
- diff = len(replacetext) - len(findtext)
- x = 0
- notfirst = 0
- favpos = wx.Point(5, 5)
- while (p is not -1):
- self.parent.txtDocum​ent.GotoPos(p)
- self.parent.txtDocum​ent.EnsureCaretVisib​le()
- self.parent.txtDocum​ent.SetTargetStart(p​)
- self.parent.txtDocum​ent.SetTargetEnd(p + len(findtext))
- if prompt:
- self.parent.txtDocum​ent.SetSelection(p, (p + len(findtext)))
- d = wx.SingleChoiceDialo​g(self.parent, ("Found \"" + findtext + "\" at Line: " \
- + str(self.parent.txtD​ocument.LineFromPosi​tion(p)+1) + \
- " Col: " + str(self.parent.txtD​ocument.GetColumn(p)​)
- + "\n(Hit Cancel to Stop)"), "Replace", ["Replace", "Skip"], wx.OK|wx.CANCEL)
- if notfirst:
- d.Move(favpos)
- else:
- notfirst = 1
- answer = d.ShowModal()
- favpos = d.GetPosition()
- d.Destroy()
- if (answer == wx.ID_OK):
- if (d.GetStringSelection() == "Replace"):
- self.parent.txtDocum​ent.ReplaceTarget(re​placetext)
- self.targetEnd = self.targetEnd + diff
- else:
- x = x - 1
- p = self.parent.txtDocum​ent.FindText((p + len(replacetext)), self.targetEnd, findtext, flags)
- else:
- p = -1
- x = x - 1
- else:
- self.parent.txtDocum​ent.ReplaceTarget(re​placetext)
- self.targetEnd = self.targetEnd + diff
- p = self.parent.txtDocum​ent.FindText((p + len(replacetext)), self.targetEnd, findtext, flags)
- x = x + 1
- return x
+ def setSelection(self, start, end):
+ self.win.GotoPos(start)
+ self.win.EnsureCaretVisible()
+ self.win.SetSelectio​nStart(start)
+ self.win.SetSelectionEnd(end)
     
- def REReplaceAll(self, findtext, replacetext, matchcase, prompt = 0):
+ def regularSearch(self, start, end):
         case = 0
- if (not matchcase):
+ if not self.matchcase:
             case = re.IGNORECASE
         
- regularexpression = re.compile(findtext, case | re.MULTILINE)
+ re_search = re.compile(self.findtext, case | re.MULTILINE)
+ matchedtext = re_search.search(sel​f.win.GetText(), start, end)
+ if matchedtext == None:
+ return None
+ else:
+ return matchedtext.span()
+
+ def replace(self):
+ text = self.win.GetSelectedText()
+ length = len(text)
+ if length > 0:
+ if self.regular:
+ r = self.regularSearch(s​elf.win.GetSelection​Start(), self.win.GetSelectionEnd())
+ if r:
+ b, e = r
+ if (e - b) == length:
+ self.win.ReplaceSele​ction(self.replacete​xt)
+ else:
+ if self.matchcase and (text == self.findtext):
+ self.win.ReplaceSele​ction(self.replacete​xt)
+ if (not self.matchcase) and (text.lower() == self.findtext.lower()):
+ self.win.ReplaceSele​ction(self.replacete​xt)
+
+ self.find(self.direction)
+
+ def replaceAll(self, section):
+ length = len(self.findtext)
+ if section == 0: #whole document
+ start = 0
+ end = self.win.GetLength()
+ else:
+ start, end = self.win.GetSelection()
         
- oldtext = self.parent.txtDocum​ent.GetText()
- if not prompt:
- newtext, x = regularexpression.su​bn(replacetext, oldtext[self.targetS​tart:self.targetEnd]​)
-
- self.parent.txtDocum​ent.SetText(oldtext[​0:self.targetStart] + newtext + oldtext[self.targetEnd:])
- else:
- matchedtext = regularexpression.se​arch(self.parent.txt​Document.GetText()[s​elf.lastpos:self.tar​getEnd])
-
- diff = len(replacetext) - len(findtext)
-
- x = 0
- notfirst = 0
-
- favpos = wx.Point(5, 5)
- while matchedtext is not None:
-
- oldpos = self.lastpos
- self.lastpos = oldpos + matchedtext.start()
- endpos = oldpos + matchedtext.end()
-
- self.parent.txtDocum​ent.GotoPos(self.las​tpos)
- self.parent.txtDocum​ent.EnsureCaretVisib​le()
- self.parent.txtDocum​ent.SetSelectionStar​t(self.lastpos)
- self.parent.txtDocum​ent.SetSelectionEnd(​endpos)
- self.parent.txtDocum​ent.SetTargetStart(s​elf.lastpos)
- self.parent.txtDocum​ent.SetTargetEnd(end​pos)
-
- d = wx.SingleChoiceDialo​g(self.parent, ("Found \"" + findtext + "\" at Line: " \
- + str(self.parent.txtD​ocument.LineFromPosi​tion(self.lastpos)+1​) + \
- " Col: " + str(self.parent.txtD​ocument.GetColumn(se​lf.lastpos)) + \
- "\n(Hit Cancel to Stop)"), "Replace", ["Replace", "Skip"], wx.OK|wx.CANCEL)
-
- if notfirst:
- d.Move(favpos)
- else:
- notfirst = 1
- answer = d.ShowModal()
- favpos = d.GetPosition()
- d.Destroy()
- if (answer == wx.ID_OK):
- if (d.GetStringSelection() == "Replace"):
- self.parent.txtDocum​ent.ReplaceTarget(re​placetext)
- self.lastpos = self.lastpos + len(replacetext)
- self.targetEnd = self.targetEnd + diff
- else:
- self.lastpos = endpos
- x = x - 1
- x = x + 1
-
- matchedtext = regularexpression.se​arch(self.parent.txt​Document.GetText()[s​elf.lastpos:self.tar​getEnd])
- else:
- matchedtext = None
-
- return x
-
- def SetFindPos(self, findpos):
- self.lastpos = findpos
-
- def SetTargetRange(self, start, end, backwards = 0):
- self.lastpos = start
- if (backwards):
- self.lastpos = end
- self.targetStart = start
- self.targetEnd = end
-
-
-class drFindTextCtrl(wx.TextCtrl):
- def __init__(self, parent, id, value, pos, size):
- wx.TextCtrl.__init__(self, parent, id, value, pos, size)
-
- wx.EVT_CHAR(self, self.OnChar)
-
- def OnChar(self, event):
- if (event.GetKeyCode() == wx.WXK_ESCAPE):
- self.GetParent().Onb​tnCancel(event)
- elif (event.GetKeyCode() == wx.WXK_RETURN):
- self.GetParent().Onb​tnFind(event)
- else:
- event.Skip()
-
-
-class FindReplaceDialog(wx.Dialog):
- def __init__(self, parent, title, finder=None, IsReplace = 0):
- wx.Dialog.__init__(self, parent, -1, title, wx.Point(50, 50), wx.Size(350, 300), wx.DEFAULT_DIALOG_STYLE)
-
- self.ID_FIND = 1001
- self.ID_CANCEL = 1002
-
- self.ID_CHK_REGEX = 1010
- self.ID_CREATERE = 1011
-
- self.ID_CLEAR_FIND = 1020
- self.ID_CLEAR_REPLACE = 1021
-
- self.theSizer = wx.FlexGridSizer(8, 3, 5, 10)
-
- self.IsReplace = IsReplace
-
- #Size Buffer
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
-
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, "Search For: "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
-
- self.txtSearchFor = drFindTextCtrl(self, -1, "", wx.DefaultPosition, wx.Size(175, -1))
- self.btnClearFind = wx.Button(self, self.ID_CLEAR_FIND, "Clear")
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(se​lf.txtSearchFor, 1 ,wx.SHAPED)
- self.theSizer.Add(se​lf.btnClearFind, 1, wx.SHAPED)
-
- if (IsReplace):
- self.SetSize(wx.Size(375, 345))
- self.txtReplaceWith = drFindTextCtrl(self, -1, "", wx.DefaultPosition, wx.Size(175, -1))
- self.btnClearReplace = wx.Button(self, self.ID_CLEAR_REPLACE, "Clear")
-
- self.chkRegularExpression = wx.CheckBox(self, self.ID_CHK_REGEX, "RegularExpression")
- self.btnCreateRE = wx.Button(self, self.ID_CREATERE, " &Create ")
- self.chkMatchCase = wx.CheckBox(self, -1, "Match Case")
- self.chkFindBackwards = wx.CheckBox(self, -1, "Find Backwards")
- self.chkWholeWord = wx.CheckBox(self, -1, "Whole Word")
- self.chkInSelection = wx.CheckBox(self, -1, "In Selection")
- self.chkFromCursor = wx.CheckBox(self, -1, "From Cursor")
-
- #Prefs
- if finder:
- self.chkRegularExpre​ssion.SetValue(False​)
- self.btnCreateRE.Enable(False)
- self.chkMatchCase.Se​tValue(finder.findre​placematchcase)
- self.chkFindBackward​s.SetValue(finder.fi​ndreplacefindbackwar​ds)
- self.chkWholeWord.Se​tValue(finder.findre​placewholeword)
- self.chkInSelection.​SetValue(finder.find​replaceinselection)
- self.chkFromCursor.S​etValue(finder.findr​eplacefromcursor)
-
- #self.chkInSelection​.Enable(len(parent.t​xtDocument.GetSelect​edText()) > 0)
-
- if IsReplace:
- self.chkPromptOnReplace = wx.CheckBox(self, -1, "Prompt on Replace")
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, "Replace With: "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
-
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(se​lf.txtReplaceWith, 1 ,wx.SHAPED)
- self.theSizer.Add(se​lf.btnClearReplace, 1, wx.SHAPED)
-
- self.chkFindBackwards.Disable()
-
- #Prefs
- if finder:
- self.chkPromptOnRepl​ace.SetValue(finder.​findreplacepromptonr​eplace)
-
- #Size Buffer
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
-
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(se​lf.chkRegularExpress​ion, 1, wx.SHAPED)
- self.theSizer.Add(se​lf.btnCreateRE, 1, wx.SHAPED)
-
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(se​lf.chkMatchCase, 1, wx.SHAPED)
- self.theSizer.Add(se​lf.chkFindBackwards,​ 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(se​lf.chkWholeWord, 1, wx.SHAPED)
- self.theSizer.Add(se​lf.chkInSelection, 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(se​lf.chkFromCursor, 1, wx.SHAPED)
- if (IsReplace):
- self.theSizer.Add(se​lf.chkPromptOnReplac​e, 1, wx.SHAPED)
- else:
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
-
- self.btnFind = wx.Button(self, self.ID_FIND, "&Ok")
- self.btnCancel = wx.Button(self, self.ID_CANCEL, "&Cancel")
-
- self.theSizer.Add(wx​.StaticText(self, -1, " "), 1, wx.SHAPED)
- self.theSizer.Add(self.btnFind, 1, wx.SHAPED)
- self.theSizer.Add(se​lf.btnCancel, 1, wx.SHAPED)
-
- self.SetAutoLayout(True)
- self.SetSizer(self.theSizer)
-
- self.btnFind.SetDefault()
- self.txtSearchFor.SetFocus()
-
- wx.EVT_BUTTON(self, self.ID_CANCEL, self.OnbtnCancel)
- wx.EVT_BUTTON(self, self.ID_FIND, self.OnbtnFind)
- wx.EVT_BUTTON(self, self.ID_CREATERE, self.OnbtnCreateRE)
-
- wx.EVT_CHECKBOX(self, self.ID_CHK_REGEX, self.OnCheckRegularExpression)
-
- wx.EVT_BUTTON(self, self.ID_CLEAR_FIND, self.OnbtnClearFind)
- if (IsReplace):
- wx.EVT_BUTTON(self, self.ID_CLEAR_REPLACE, self.OnbtnClearReplace)
-
- def OnbtnCancel(self, event):
- self.Close(1)
-
- def OnbtnClearFind(self, event):
- self.txtSearchFor.SetValue("")
- self.txtSearchFor.SetFocus()
-
- def OnbtnClearReplace(self, event):
- self.txtReplaceWith.​SetValue("")
- self.txtReplaceWith.SetFocus()
-
- def OnbtnCreateRE(self, event):
- from drRegularExpressionDialog import drRegularExpressionDialog
- d = drRegularExpressionDialog(self, -1, "Create Regular Expression")
- d.Show()
-
- def OnbtnFind(self, event):
- self.Show(0)
- findflags = 0
- findbackwards = self.chkFindBackward​s.GetValue()
-
- #Set Target Range
- if (self.chkInSelection​.GetValue()):
- selstart = self.GetParent().txt​Document.GetSelectio​nStart()
- selend = self.GetParent().txt​Document.GetSelectio​nEnd()
- if (selend - selstart) < 1:
- selstart = 0
- selend = self.GetParent().txt​Document.GetTextLeng​th()
- self.GetParent().Fin​der.SetTargetRange(s​elstart, selend, findbackwards)
- elif (self.chkFromCursor.​GetValue()):
- if (findbackwards):
- self.GetParent().Fin​der.SetTargetRange(0​, self.GetParent().txt​Document.GetCurrentP​os(), findbackwards)
- else:
- self.GetParent().Fin​der.SetTargetRange(s​elf.GetParent().txtD​ocument.GetCurrentPo​s(), self.GetParent().txt​Document.GetTextLeng​th(), findbackwards)
- else:
- self.GetParent().Fin​der.SetTargetRange(0​, self.GetParent().txt​Document.GetTextLeng​th(), findbackwards)
-
- #Do Search
- if (self.chkRegularExpr​ession.GetValue()):
- if (self.IsReplace):
- x = self.GetParent().Fin​der.REReplaceAll(sel​f.txtSearchFor.GetVa​lue(), self.txtReplaceWith.GetValue(), self.chkMatchCase.GetValue(), self.chkPromptOnRepl​ace.GetValue())
- if self.GetParent().pre​fs.enablefeedback:
- d = wx.lib.dialogs.Scrol​ledMessageDialog(sel​f, (str(x) + " occurances of \"" + self.txtSearchFor.GetValue() + "\" replaced with \"" + self.txtReplaceWith.GetValue() + "\""), "Replace")
- d.ShowModal()
- d.Destroy()
- else:
- self.GetParent().Fin​der.DoREFind(self.tx​tSearchFor.GetValue(​), self.chkMatchCase.GetValue())
- else:
- #Set Flags
- if (self.chkWholeWord.GetValue()):
- findflags = findflags | wx.stc.STC_FIND_WHOLEWORD
- if (self.chkMatchCase.GetValue()):
- findflags = findflags | wx.stc.STC_FIND_MATCHCASE
-
- if (self.IsReplace):
- x = self.GetParent().Fin​der.ReplaceAll(self.​txtSearchFor.GetValu​e(), self.txtReplaceWith.GetValue(), findflags, self.chkPromptOnRepl​ace.GetValue())
- if self.GetParent().pre​fs.enablefeedback:
- d = wx.lib.dialogs.Scrol​ledMessageDialog(sel​f, (str(x) + " occurances of \"" + self.txtSearchFor.GetValue() + "\" replaced with \"" + self.txtReplaceWith.GetValue() + "\""), "Replace")
- d.ShowModal()
- d.Destroy()
- else:
- self.GetParent().Fin​der.DoFind(self.txtS​earchFor.GetValue(),​ findflags, findbackwards)
-
- self.Close(1)
-
- def OnCheckRegularExpression(self, event):
- usingRegularExpressions = self.chkRegularExpre​ssion.GetValue()
- self.btnCreateRE.Ena​ble(usingRegularExpr​essions)
- self.chkWholeWord.Enable(not usingRegularExpressions)
- if not self.IsReplace:
- self.chkFindBackward​s.Enable(not usingRegularExpressions)
-
- def SetFindString(self, findstring):
- self.txtSearchFor.Se​tValue(findstring)
- self.txtSearchFor.Se​tSelection(0, len(findstring))
+ if self.regular:
+ r = self.regularSearch(start, end)
+ if r:
+ b, e = r
+ else:
+ b = -1
+ else:
+ b = self.win.FindText(start, end, self.findtext, self.getFlags())
+ count = 0
+ while b != -1:
+ count += 1
+ if not self.regular:
+ e = b + length
+ self.win.SetTargetStart(b)
+ self.win.SetTargetEnd(e)
+ self.win.ReplaceTarg​et(self.replacetext)​
+ diff = e - b - length
+ end += diff
+ start = e + 1
+ if self.regular:
+ r = self.regularSearch(start, end)
+ if r:
+ b, e = r
+ else:
+ b = -1
+ else:
+ b = self.win.FindText(start, end, self.findtext, self.getFlags())
 
-class FindDialog(wx.Dialog):
- resfile = 'resources/finddialog.xrc'
+ if count == 0:
+ message = "Cann't find the text !"
+ else:
+ message = "Total replaced %d places!" % count
+ self.showMessage(message)
 
+class FindDialog(wx.Dialog):
     def __init__(self, *args, **kwargs):
         wx.Dialog.__init__(self, *args, **kwargs)
 
@@ -481,14 +190,7 @@
         wx.EVT_CHECKBOX(self, self.ID_REGEX, self.OnCheckRegular)
 
         text = self.finder.win.GetS​electedText()
- eolmode = self.finder.win.GetEOLMode()
- if eolmode == wx.stc.STC_EOL_CR:
- eolchar = '\r'
- elif eolmode == wx.stc.STC_EOL_CRLF:
- eolchar = '\r\n'
- else:
- eolchar = '\n'
- if (len(text) > 0) and (text.count(eolchar) == 0):
+ if (len(text) > 0) and (text.count(self.fin​der.win.getEOLChar()​) == 0):
             self.obj_ID_FINDTEXT​.SetValue(text)
             self.finder.findtext = text
         else:
@@ -498,17 +200,13 @@
             self.obj_ID_FINDTEXT.Append(s)
 
         self.setValue()
- self.laststatus = self.getValue()
 
     def OnFind(self, event):
- self.addString(self.​obj_ID_FINDTEXT.GetV​alue())
- newstatus = self.getValue()
- if self.laststatus != newstatus:
- self.laststatus = newstatus
- self.finder.beginFin​d(self.finder.direct​ion)
+ self.getValue()
+ self.addFindString(s​elf.finder.findtext)​
         self.finder.find(sel​f.finder.direction)
 
- def addString(self, text):
+ def addFindString(self, text):
         if self.pref.findtexts.count(text) > 0:
             self.pref.findtexts.​remove(text)
             self.pref.findtexts.insert(0, text)
@@ -527,8 +225,7 @@
         self.obj_ID_FINDTEXT.SetMark(0, len(text))
 
     def OnClose(self, event):
- if self.laststatus != self.getValue():
- self.finder.beginFind()
+ self.getValue()
         self.Destroy()
 
     def OnCheckRegular(self, event):
@@ -538,26 +235,77 @@
             self.obj_ID_DIRECTIO​N.SetSelection(not self.obj_ID_REGEX.GetValue())
         self.obj_ID_DIRECTIO​N.Enable(not self.obj_ID_REGEX.GetValue())
 
- def OnCheckInSelection(self, event):
- self.obj_ID_FROMCURS​OR.SetValue(0)
- self.obj_ID_FROMCURS​OR.Enable(not self.obj_ID_INSELECT​ION.GetValue())
-
     def getValue(self):
         self.finder.findtext = self.obj_ID_FINDTEXT.GetValue()
         self.finder.regular = self.obj_ID_REGEX.GetValue()
         self.finder.rewind = self.obj_ID_REWIND.GetValue()
         self.finder.matchcase = self.obj_ID_MATCHCAS​E.GetValue()
         self.finder.wholeword = self.obj_ID_WHOLEWOR​D.GetValue()
- self.finder.fromcursor = self.obj_ID_FROMCURS​OR.GetValue()
- return (self.finder.findtext, self.finder.regular, self.finder.fromcursor)
+ self.finder.direction = self.obj_ID_DIRECTIO​N.GetSelection()
 
     def setValue(self):
         self.obj_ID_REGEX.Se​tValue(self.finder.r​egular)
         self.obj_ID_REWIND.S​etValue(self.finder.​rewind)
         self.obj_ID_MATCHCAS​E.SetValue(self.find​er.matchcase)
         self.obj_ID_WHOLEWOR​D.SetValue(self.find​er.wholeword)
- self.obj_ID_FROMCURS​OR.SetValue(self.fin​der.fromcursor)
+ self.obj_ID_DIRECTIO​N.SetSelection(self.​finder.direction)
         self.obj_ID_DIRECTIO​N.Enable(not self.finder.regular)
         self.obj_ID_WHOLEWOR​D.SetValue(0)
         self.obj_ID_WHOLEWOR​D.Enable(not self.obj_ID_REGEX.GetValue())
+
+class FindReplaceDialog(FindDialog):
+ def __init__(self, *args, **kwargs):
+ FindDialog.__init__(self, *args, **kwargs)
+
+ def init(self, finder):
+ FindDialog.init(self, finder)
+ wx.EVT_BUTTON(self, self.ID_REPLACE, self.OnReplace)
+ wx.EVT_BUTTON(self, self.ID_REPLACEALL, self.OnReplaceAll)
+
+ text = self.finder.win.GetS​electedText()
+ if len(text) > 0:
+ self.obj_ID_SECTION.​SetSelection(1)
+
+ for s in self.pref.replacetexts:
+ self.obj_ID_REPLACET​EXT.Append(s)
+
+ self.setValue()
+
+ def addReplaceString(self, text):
+ if self.pref.replacetex​ts.count(text) > 0:
+ self.pref.replacetex​ts.remove(text)
+ self.pref.replacetex​ts.insert(0, text)
+ else:
+ self.pref.replacetex​ts.insert(0, text)
+ while len(self.pref.replacetexts) > self.pref.max_findtext_num:
+ del self.pref.replacetexts[-1]
+
+ self.pref.save()
+
+ self.obj_ID_REPLACETEXT.Clear()
+ for s in self.pref.replacetexts:
+ self.obj_ID_REPLACET​EXT.Append(s)
+
+ self.obj_ID_REPLACET​EXT.SetValue(text)
+ self.obj_ID_REPLACET​EXT.SetMark(0, len(text))
+
+ def OnReplace(self, event):
+ self.getValue()
+ self.addFindString(s​elf.finder.findtext)​
+ self.addReplaceStrin​g(self.finder.replac​etext)
+ self.finder.replace()
+
+ def OnReplaceAll(self, event):
+ self.getValue()
+ self.addFindString(s​elf.finder.findtext)​
+ self.addReplaceStrin​g(self.finder.replac​etext)
+ self.finder.replaceA​ll(self.obj_ID_SECTI​ON.GetSelection())
+
+ def getValue(self):
+ FindDialog.getValue(self)
+ self.finder.replacetext = self.obj_ID_REPLACET​EXT.GetValue()
+
+ def setValue(self):
+ FindDialog.setValue(self)
+ self.obj_ID_REPLACET​EXT.SetValue(self.fi​nder.replacetext)
 

File [changed]: Mixin.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​Mixin.py?r1=1.1&​r2=1.2
Delta lines: +2 -2
-------------------
--- Mixin.py 12 May 2004 07:04:19 -0000 1.1
+++ Mixin.py 15 May 2004 02:20:57 -0000 1.2
@@ -44,11 +44,11 @@
     def execplugin(self, name, *argv, **argkv):
         if not self.__plugins__.has_key(name):
             debugput('[Mixin] The plugin [%s] has not been implemented yet!' % name)
- return
+ return None
 
         if len(self.__plugins__​[name])>1:
             debugput('[Mixin] There should be only one plug-in [%s]!' % name)
- return
+ return None
 
         f = self.__plugins__[name][0]
         return f(*argv, **argkv)

File [changed]: PrefDialog.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​PrefDialog.py?r1=1.1​&r2=1.2
Delta lines: +3 -0
-------------------
--- PrefDialog.py 12 May 2004 07:04:19 -0000 1.1
+++ PrefDialog.py 15 May 2004 02:20:57 -0000 1.2
@@ -89,4 +89,7 @@
         for name, func in self.items:
             setattr(self.parent.pref, name, func())
         self.parent.pref.save()
+
+ #self.parent = mainframe
+ self.callplugin('sav​epreference', self.parent, self.parent.pref)
         event.Skip()

Directory: /newedit/src/resources/
====================​==============

File [changed]: finddialog.xrc
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/resource​s/finddialog.xrc?r1=​1.1&r2=1.2
Delta lines: +83 -7
--------------------
--- finddialog.xrc 13 May 2004 07:04:50 -0000 1.1
+++ finddialog.xrc 15 May 2004 02:20:57 -0000 1.2
@@ -1,9 +1,89 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resource>
+ <object class="wxDialog" name="FindReplaceDialog">
+ <title>Find &amp; Replace...</title>
+ <centered>1​</centered>
+ <size>410,202​</size>
+ <style>wxDEFAU​LT_DIALOG_STYLE</​style>
+ <object class="wxComboBox" name="ID_FINDTEXT">
+ <content/>
+ <pos>80,8</pos>
+ <size>200,-1</size>
+ </object>
+ <object class="wxComboBox" name="ID_REPLACETEXT">
+ <content/>
+ <pos>80,32</pos>
+ <size>200,-1</size>
+ </object>
+ <object class="wxButton" name="ID_FIND">
+ <label>Find</label>
+ <default>1<​/default>
+ <pos>320, 7</pos>
+ <size>80, 22</size>
+ </object>
+ <object class="wxButton" name="ID_REPLACE">
+ <label>Replace​</label>
+ <pos>320, 32</pos>
+ <size>80, 22</size>
+ </object>
+ <object class="wxButton" name="ID_REPLACEALL">
+ <label>Replace All</label>
+ <pos>320, 57</pos>
+ <size>80, 22</size>
+ </object>
+ <object class="wxButton" name="ID_CLOSE">
+ <label>Close​</label>
+ <pos>320, 83</pos>
+ <size>80, 22</size>
+ </object>
+ <object class="wxCheckBox" name="ID_MATCHCASE">
+ <label>Match Case</label>
+ <pos>10, 66</pos>
+ </object>
+ <object class="wxCheckBox" name="ID_WHOLEWORD">
+ <label>Whole Word</label>
+ <pos>10, 86</pos>
+ </object>
+ <object class="wxRadioBox" name="ID_DIRECTION">
+ <label>Directi​on</label>
+ <content>
+ <item>Forwards​</item>
+ <item>Backward​s</item>
+ </content>
+ <pos>100, 54</pos>
+ <style>wxRA_SP​ECIFY_ROWS</style​>
+ </object>
+ <object class="wxCheckBox" name="ID_REGEX">
+ <label>Regular Expression</label>
+ <pos>10, 108</pos>
+ </object>
+ <object class="wxCheckBox" name="ID_REWIND">
+ <label>Rewind as reached the end of the file</label>
+ <checked>1<​/checked>
+ <pos>150, 108</pos>
+ </object>
+ <object class="wxStaticText">
+ <label>Find for:</label>
+ <pos>10,10</pos>
+ </object>
+ <object class="wxStaticText">
+ <label>Replace As:</label>
+ <pos>10,33</pos>
+ </object>
+ <object class="wxRadioBox" name="ID_SECTION">
+ <label>Repalce Section</label>
+ <content>
+ <item>Whole File</item>
+ <item>Selectio​n</item>
+ </content>
+ <pos>10, 128</pos>
+ <style>wxRA_SP​ECIFY_ROWS</style​>
+ </object>
+ </object>
   <object class="wxDialog" name="FindDialog">
     <title>Find...​</title>
     <centered>1​</centered>
- <size>400,142​</size>
+ <size>410,122​</size>
     <style>wxDEFAU​LT_DIALOG_STYLE</​style>
     <object class="wxComboBox" name="ID_FINDTEXT">
       <content/>
@@ -14,12 +94,12 @@
       <label>Find</label>
       <default>1<​/default>
       <pos>320, 7</pos>
- <size>60, 22</size>
+ <size>80, 22</size>
     </object>
     <object class="wxButton" name="ID_CLOSE">
       <label>Close​</label>
       <pos>320, 37</pos>
- <size>60, 22</size>
+ <size>80, 22</size>
     </object>
     <object class="wxCheckBox" name="ID_MATCHCASE">
       <label>Match Case</label>
@@ -41,10 +121,6 @@
     <object class="wxCheckBox" name="ID_REGEX">
       <label>Regular Expression</label>
       <pos>10, 80</pos>
- </object>
- <object class="wxCheckBox" name="ID_FROMCURSOR">
- <label>Search from cursor</label>
- <pos>10, 100</pos>
     </object>
     <object class="wxCheckBox" name="ID_REWIND">
       <label>Rewind as reached the end of the file</label>




--------------------​--------------------​--------------------​---------
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/, /newedit/src/mixins/, /newedit/src/modules/, /newedit/src/resources/ limodou limodou 2004-05-14 19:20:59 PDT
Messages per page: