This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch to remove local mods and fixup test cases


Hello.

There are still a few local mods in the Tk source that were being
used by a very old version of Source-Navigator. This patch removes
one of them and fixes up a few of the Tk regression tests. This
should have no effect on Insight.

cheers
Mo

2002-07-23  Mo DeJong  <supermo@bayarea.net>

	* generic/tkText.c (ExecSyncCmd):
	Remove -synccommand option from Tk text widget.
	This local modification was used by an very old
	version of Source-Navigator, but is no longer
	needed. Remove ExecSyncCmd function.
	* generic/tkText.h (TkText): Remove SyncCmd member.
	* library/msgbox.tcl (tkMessageBox): Remove unused
	-modal option. This was a local mod to tk.
	* tests/text.test: Add default value for -tabsize.
	This is a local mod to tk.
	* tests/wm.test: Fixup iconwindow error messages.

Index: generic/tkText.c
===================================================================
RCS file: /cvs/src/src/tk/generic/tkText.c,v
retrieving revision 1.2
diff -u -r1.2 tkText.c
--- generic/tkText.c	10 Sep 2001 01:16:51 -0000	1.2
+++ generic/tkText.c	23 Jul 2002 21:46:23 -0000
@@ -139,15 +139,10 @@
     {TK_CONFIG_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
 	DEF_TEXT_YSCROLL_COMMAND, Tk_Offset(TkText, yScrollCmd),
 	TK_CONFIG_NULL_OK},
-	
-    {TK_CONFIG_STRING, "-synccommand", "syncCommand", "SyncCommand",
-	DEF_TEXT_YSCROLL_COMMAND, Tk_Offset(TkText, SyncCmd),
-	TK_CONFIG_NULL_OK},
-	
-	
+    /* Red Hat Local */
     {TK_CONFIG_INT, "-tabsize", "tabSize", "TabSize",
 	DEF_TEXT_TAB_SIZE, Tk_Offset(TkText, tabsize), 0},
-	
+    /* End Red Hat Local */
     {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
 	(char *) NULL, 0, 0}
 };
@@ -438,7 +433,6 @@
     
     /*
      * KHAMIS */
-    textPtr->SyncCmd = NULL;
     textPtr->flags = 0;
 
     /*
@@ -471,54 +465,6 @@
     Tcl_SetResult(interp, Tk_PathName(textPtr->tkwin), TCL_STATIC);
 
     return TCL_OK;
-}
-
-/*
- *--------------------------------------------------------------
- *
- * TextWidgetCmd --
- *
- *	This procedure is invoked to process the Tcl command
- *	that corresponds to a text widget.  See the user
- *	documentation for details on what it does.
- *
- * Results:
- *	A standard Tcl result.
- *
- * Side effects:
- *	See the user documentation.
- *
- *--------------------------------------------------------------
- */
-static int 
-ExecSyncCmd (interp, textPtr, argc, argv)
-     Tcl_Interp *interp;
-     TkText *textPtr;
-     int argc;
-     char *argv[];
-{
-    static int ExecSyncCmdActive=0;
-    int i, ret;
-    Tcl_DString cmd;
-    
-    if (ExecSyncCmdActive)
-    {
-    	return TCL_OK;
-    }
-    ExecSyncCmdActive = 1;
-    
-    Tcl_DStringInit (&cmd);
-    Tcl_DStringAppend (&cmd, textPtr->SyncCmd, -1);
-    for (i=1;i<argc;i++) {
-	Tcl_DStringAppendElement (&cmd, argv[i]);
-    }
-
-    ret = Tcl_Eval (interp, Tcl_DStringValue(&cmd));
-    Tcl_DStringFree (&cmd);
-    
-    ExecSyncCmdActive = 0;
-    
-    return ret;
 }
 
 static void
Index: generic/tkText.h
===================================================================
RCS file: /cvs/src/src/tk/generic/tkText.h,v
retrieving revision 1.2
diff -u -r1.2 tkText.h
--- generic/tkText.h	10 Sep 2001 01:16:51 -0000	1.2
+++ generic/tkText.h	23 Jul 2002 21:46:24 -0000
@@ -628,10 +628,6 @@
 				 * horizontal scrollbar when view changes. */
     char *yScrollCmd;		/* Prefix of command to issue to update
 				 * vertical scrollbar when view changes. */
-    /* KHAMIS */
-    char *SyncCmd;		/* Used to synchronize more than editor with the
-    				 * same file*/
-				 
     int flags;			/* Miscellaneous flags;  see below for
 				 * definitions. */
 } TkText;
Index: library/msgbox.tcl
===================================================================
RCS file: /cvs/src/src/tk/library/msgbox.tcl,v
retrieving revision 1.2
diff -u -r1.2 msgbox.tcl
--- library/msgbox.tcl	10 Sep 2001 01:16:52 -0000	1.2
+++ library/msgbox.tcl	23 Jul 2002 21:46:24 -0000
@@ -146,7 +146,6 @@
 	{-default "" "" ""}
         {-icon "" "" "info"}
         {-message "" "" ""}
-        {-modal "" "" ""}
         {-parent "" "" .}
         {-title "" "" " "}
         {-type "" "" "ok"}
Index: tests/text.test
===================================================================
RCS file: /cvs/src/src/tk/tests/text.test,v
retrieving revision 1.2
diff -u -r1.2 text.test
--- tests/text.test	10 Sep 2001 01:16:54 -0000	1.2
+++ tests/text.test	23 Jul 2002 21:46:25 -0000
@@ -111,7 +111,7 @@
 	lappend result [lindex $i 4]
     }
     set result
-} {blue {} {} 7 watch 0 {} fixed #012 5 #123 #234 0 green 45 100 47 2 3 82 raised #ffff01234567 21 yellow 0 0 0 0 disabled {1i 2i 3i 4i} {any old thing} 73 word {x scroll command} {test command}}
+} {blue {} {} 7 watch 0 {} fixed #012 5 #123 #234 0 green 45 100 47 2 3 82 raised #ffff01234567 21 yellow 0 0 0 0 disabled {1i 2i 3i 4i} {any old thing} 73 word {x scroll command} {test command} 8}
 
 test text-2.1 {Tk_TextCmd procedure} {
     list [catch {text} msg] $msg
Index: tests/wm.test
===================================================================
RCS file: /cvs/src/src/tk/tests/wm.test,v
retrieving revision 1.2
diff -u -r1.2 wm.test
--- tests/wm.test	10 Sep 2001 01:16:54 -0000	1.2
+++ tests/wm.test	23 Jul 2002 21:46:25 -0000
@@ -275,7 +275,7 @@
     toplevel .icon -width 50 -height 50 -bg red
     wm iconwindow .t .icon
     list [catch {wm iconify .icon} msg] $msg
-} {1 {can't iconify .icon: it is an icon for .icon}}
+} {1 {can't iconify .icon: it is an icon for .t}}
 test wm-10.2 {icon windows} {
     catch {destroy .t}
     catch {destroy .icon}
@@ -284,7 +284,7 @@
     toplevel .icon -width 50 -height 50 -bg red
     wm iconwindow .t .icon
     list [catch {wm deiconify .icon} msg] $msg
-} {1 {can't deiconify .icon: it is an icon for .icon}}
+} {1 {can't deiconify .icon: it is an icon for .t}}
 test wm-10.3 {icon windows} {
     catch {destroy .t}
     catch {destroy .icon}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]