[Idle-dev] CVS: idle Bindings.py,1.5,1.6 EditorWindow.py,1.12,1.13 config-extensions.def,1.1,1.2 config-highlight.def,1.3,1.4 config-keys.def,1.2,1.3 configHandler.py,1.8,1.9 SearchBinding.py,1.2,NONE

Stephen M. Gava elguavas@users.sourceforge.net
Thu, 03 Jan 2002 19:06:10 -0800


Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv9763

Modified Files:
	Bindings.py EditorWindow.py config-extensions.def 
	config-highlight.def config-keys.def configHandler.py 
Removed Files:
	SearchBinding.py 
Log Message:
move core functionality of SearchBindings.py into EditorWindow.py proper
adjust configuration sources accordingly
move SearchBindings.py into the attic now


Index: Bindings.py
===================================================================
RCS file: /cvsroot/idlefork/idle/Bindings.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Bindings.py	2001/12/03 00:37:28	1.5
--- Bindings.py	2002/01/04 03:06:08	1.6
***************
*** 42,45 ****
--- 42,52 ----
     ('_Paste', '<<Paste>>'),
     ('Select _All', '<<select-all>>'),
+    None,
+    ('_Find...', '<<find>>'),
+    ('Find a_gain', '<<find-again>>'),
+    ('Find _selection', '<<find-selection>>'),
+    ('Find in Files...', '<<find-in-files>>'),
+    ('R_eplace...', '<<replace>>'),
+    ('Go to _line', '<<goto-line>>'),
    ]),
   ('run',[

Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** EditorWindow.py	2002/01/03 11:51:07	1.12
--- EditorWindow.py	2002/01/04 03:06:08	1.13
***************
*** 17,20 ****
--- 17,23 ----
  import idlever
  import WindowList
+ import SearchDialog
+ import GrepDialog
+ import ReplaceDialog
  #from IdleConf import idleconf
  from configHandler import idleConf
***************
*** 132,135 ****
--- 135,144 ----
          text.bind("<<select-all>>", self.select_all)
          text.bind("<<remove-selection>>", self.remove_selection)
+         text.bind("<<find>>", self.find_event)
+         text.bind("<<find-again>>", self.find_again_event)
+         text.bind("<<find-in-files>>", self.find_in_files_event)
+         text.bind("<<find-selection>>", self.find_selection_event)
+         text.bind("<<replace>>", self.replace_event)
+         text.bind("<<goto-line>>", self.goto_line_event)
          text.bind("<3>", self.right_menu_event)
          if flist:
***************
*** 320,323 ****
--- 329,364 ----
          self.text.tag_remove("sel", "1.0", "end")
          self.text.see("insert")
+ 
+     def find_event(self, event):
+         SearchDialog.find(self.text)
+         return "break"
+ 
+     def find_again_event(self, event):
+         SearchDialog.find_again(self.text)
+         return "break"
+ 
+     def find_selection_event(self, event):
+         SearchDialog.find_selection(self.text)
+         return "break"
+ 
+     def find_in_files_event(self, event):
+         GrepDialog.grep(self.text, self.io, self.flist)
+         return "break"
+ 
+     def replace_event(self, event):
+         ReplaceDialog.replace(self.text)
+         return "break"
+ 
+     def goto_line_event(self, event):
+         text = self.text
+         lineno = tkSimpleDialog.askinteger("Goto",
+                 "Go to line number:",parent=text)
+         if lineno is None:
+             return "break"
+         if lineno <= 0:
+             text.bell()
+             return "break"
+         text.mark_set("insert", "%d.0" % lineno)
+         text.see("insert")
  
      def open_module(self, event=None):

Index: config-extensions.def
===================================================================
RCS file: /cvsroot/idlefork/idle/config-extensions.def,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** config-extensions.def	2001/09/24 09:43:17	1.1
--- config-extensions.def	2002/01/04 03:06:08	1.2
***************
*** 2,8 ****
  # file is the default config file for idle extensions settings.  
  
- [SearchBinding]
- enable=1
- 
  [AutoIndent]
  enable=1
--- 2,5 ----

Index: config-highlight.def
===================================================================
RCS file: /cvsroot/idlefork/idle/config-highlight.def,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** config-highlight.def	2002/01/03 12:00:34	1.3
--- config-highlight.def	2002/01/04 03:06:08	1.4
***************
*** 5,30 ****
  normal-foreground= #000000
  normal-background= #ffffff
- normal-fontStyle= normal
  keyword-foreground= #ff7700
  keyword-background= #ffffff
- keyword-fontStyle= normal
  comment-foreground= #dd0000
  comment-background= #ffffff
- comment-fontStyle= normal
  string-foreground= #00aa00
  string-background= #ffffff
- string-fontStyle= normal
  definition-foreground= #0000ff
  definition-background= #ffffff
- definition-fontStyle= normal
  hilite-foreground= #ffffff
  hilite-background= gray
- hilite-fontStyle= normal
  break-foreground= #ff7777
  break-background= #ffffff
- break-fontStyle= normal
  hit-foreground= #ffffff
  hit-background= #000000
- hit-fontStyle= normal
  error-foreground= #000000
  error-background= #ff7777
--- 5,22 ----
***************
*** 34,70 ****
  stdout-foreground= blue
  stdout-background= #ffffff
- stdout-fontStyle= normal
  stderr-foreground= red
  stderr-background= #ffffff
- stderr-fontStyle= normal
  console-foreground= #770000
  console-background= #ffffff
- console-fontStyle= normal
  
  [IDLE New]
  bold-foreground= #000000
  bold-background= #ffffff
- bold-fontStyle= bold
  keyword-foreground= #ff7700
  keyword-background= #ffffff
- keyword-fontStyle= bold
  comment-foreground= #dd0000
  comment-background= #ffffff
- comment-fontStyle= bold
  string-foreground= #00aa00
  string-background= #ffffff
- string-fontStyle= bold
  definition-foreground= #0000ff
  definition-background= #ffffff
- definition-fontStyle= bold
  hilite-foreground= #ffffff
  hilite-background= gray
- hilite-fontStyle= bold
  break-foreground= #ff7777
  break-background= #ffffff
- break-fontStyle= bold
  hit-foreground= #ffffff
  hit-background= #000000
- hit-fontStyle= bold
  error-foreground= #000000
  error-background= #ff7777
--- 26,51 ----
***************
*** 74,82 ****
  stdout-foreground= blue
  stdout-background= #ffffff
- stdout-fontStyle= bold
  stderr-foreground= red
  stderr-background= #ffffff
- stderr-fontStyle= bold
  console-foreground= #770000
  console-background= #ffffff
- console-fontStyle= bold
--- 55,60 ----

Index: config-keys.def
===================================================================
RCS file: /cvsroot/idlefork/idle/config-keys.def,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** config-keys.def	2001/12/03 00:37:28	1.2
--- config-keys.def	2002/01/04 03:06:08	1.3
***************
*** 6,10 ****
  # single 'emacs style' multi-keystoke binding.
  
! [IDLE CUA-ish]
  Copy=<Control-c> <Control-C>
  Cut=<Control-x> <Control-X>
--- 6,10 ----
  # single 'emacs style' multi-keystoke binding.
  
! [IDLE Classic Windows]
  Copy=<Control-c> <Control-C>
  Cut=<Control-x> <Control-X>
***************
*** 34,39 ****
  toggle-auto-coloring=<Control-slash>
  undo=<Control-z>
  
! [IDLE Emacs-ish]
  Copy=<Alt-w> <Meta-w>
  Cut=<Control-w>
--- 34,45 ----
  toggle-auto-coloring=<Control-slash>
  undo=<Control-z>
+ find=<Control-f>
+ find-again=<Control-g> <F3>
+ find-in-files=<Alt-F3>
+ find-selection=<Control-F3>
+ replace=<Control-h>
+ goto-line=<Alt-g>
  
! [IDLE Classic Unix]
  Copy=<Alt-w> <Meta-w>
  Cut=<Control-w>
***************
*** 63,64 ****
--- 69,76 ----
  toggle-auto-coloring=<Control-slash>
  undo=<Control-z>
+ find=<Control-u><Control-u><Control-s>
+ find-again=<Control-u><Control-s>
+ find-in-files=<Alt-s> <Meta-s>
+ find-selection=<Control-s>
+ replace=<Control-r>
+ goto-line=<Alt-g> <Meta-g>

Index: configHandler.py
===================================================================
RCS file: /cvsroot/idlefork/idle/configHandler.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** configHandler.py	2002/01/03 11:58:35	1.8
--- configHandler.py	2002/01/04 03:06:08	1.9
***************
*** 1,12 ****
  """
  Provides access to stored idle configuration information.
- 
- Throughout this module there is an emphasis on returning useable defaults if
- there is a problem returning a requested configuration value back to idle.
- This is to allow idle to continue to function in spite of errors in the
- retrieval of config information. When a default is returned instead of a 
- requested config value, a message is printed to stderr to aid in 
- configuration problem notification and resolution. 
  """
  import os
  import sys
--- 1,12 ----
  """
  Provides access to stored idle configuration information.
  """
+ # Throughout this module there is an emphasis on returning useable defaults
+ # when a problem occurs in returning a requested configuration value back to
+ # idle. This is to allow idle to continue to function in spite of errors in
+ # the retrieval of config information. When a default is returned instead of
+ # a requested config value, a message is printed to stderr to aid in 
+ # configuration problem notification and resolution. 
+ 
  import os
  import sys
***************
*** 39,50 ****
              #return getVal(section, option, raw, vars)
              return getVal(section, option)
- #         #the following handled in IdleConf.GetOption instead
- #         else: 
- #             warning=('\n Warning: configHandler.py - IdleConfParser.Get -\n'+
- #                        ' problem retrieving configration option '+`option`+'\n'+
- #                        ' from section '+`section`+'.\n'+
- #                        ' returning default value: '+`default`+'\n')
- #             sys.stderr.write(warning)
- #             return default
  
      def GetOptionList(self,section):
--- 39,42 ----

--- SearchBinding.py DELETED ---