TextSweep

Check-in [c5726998aa]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update for 4.1
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c5726998aa10f0ff63047333ddfc35586a15a24a
User & Date: kevin 2018-02-19 21:13:17
Context
2018-02-19
21:21
Update Windows build check-in: 46b0051315 user: kevin tags: trunk
21:13
Update for 4.1 check-in: c5726998aa user: kevin tags: trunk
2017-12-29
13:15
Final release for macOS 4.0 check-in: 5fa494e0a1 user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Info-cbk.plist.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleExecutable</key>
	<string>TextSweep</string>
	<key>CFBundleGetInfoString</key>
	<string>TextSweep 4.0.0] (c) 2018 WordTech Communications LLC</string>
        <key>NSPrincipalClass</key>
        <string>NSApplication</string>
<key>NSHighResolutionCapable</key>
	<true/>
	<key>NSAppleScriptEnabled</key>
	<true/>
	<key>OSAScriptingDefinition</key>
................................................................................
	<key>CFBundleDisplayName</key>
	<string>TextSweep</string>
	<key>CFBundleIdentifier</key>
	<string>com.codebykevin.com.textsweep-cbk</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>4.0.0]</string>
	<key>CFBundleVersion</key>
	<string>4.0.0]</string>
	<key>LSMinimumSystemVersion</key>
	<string>10.13</string>
	<key>LSRequiresCarbon</key>
	<true/>	
	<key>NSSupportsAutomaticTermination</key>
	<string>YES</string>
	<key>NSSupportsSuddenTermination</key>
	<string>YES</string>
  <key>SUFeedURL</key>
	<string>http://www.codebykevin.com/textsweep.xml</string>
</dict>
</plist>







|







 







|

|












3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleExecutable</key>
	<string>TextSweep</string>
	<key>CFBundleGetInfoString</key>
	<string>TextSweep 4.1.0 (c) 2018 WordTech Communications LLC</string>
        <key>NSPrincipalClass</key>
        <string>NSApplication</string>
<key>NSHighResolutionCapable</key>
	<true/>
	<key>NSAppleScriptEnabled</key>
	<true/>
	<key>OSAScriptingDefinition</key>
................................................................................
	<key>CFBundleDisplayName</key>
	<string>TextSweep</string>
	<key>CFBundleIdentifier</key>
	<string>com.codebykevin.com.textsweep-cbk</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>4.1.0</string>
	<key>CFBundleVersion</key>
	<string>4.1.0</string>
	<key>LSMinimumSystemVersion</key>
	<string>10.13</string>
	<key>LSRequiresCarbon</key>
	<true/>	
	<key>NSSupportsAutomaticTermination</key>
	<string>YES</string>
	<key>NSSupportsSuddenTermination</key>
	<string>YES</string>
  <key>SUFeedURL</key>
	<string>http://www.codebykevin.com/textsweep.xml</string>
</dict>
</plist>

Changes to scriptlibs/machelp/help.txt.

116
117
118
119
120
121
122




123
124
125
126
127
128
129
 * Help viewer by Keith Vetter: [http://wiki.tcl.tk/19649].
 * TkDND for drag and drop. Website and license: [http://sourceforge.net/projects/tkdnd/].

-------------------
title: TextSweep Version History
alias: History





'''4.0 (January 1, 2018):'''
 * New scripting API for Mac and Windows.
 * UI enhancements. 

'''3.2 (May 1, 2017):'''
 * Improved scrolling performance, security support on macOS.
 * Improved security support on Windows.







>
>
>
>







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
 * Help viewer by Keith Vetter: [http://wiki.tcl.tk/19649].
 * TkDND for drag and drop. Website and license: [http://sourceforge.net/projects/tkdnd/].

-------------------
title: TextSweep Version History
alias: History

'''4.1 (February 20, 2018):'''
 * Improved resizing of main window for efficient UI.
 * Removal of console on Windows.

'''4.0 (January 1, 2018):'''
 * New scripting API for Mac and Windows.
 * UI enhancements. 

'''3.2 (May 1, 2017):'''
 * Improved scrolling performance, security support on macOS.
 * Improved security support on Windows.

Changes to scriptlibs/textsweep/pkgIndex.tcl.

1
2
3

  package ifneeded textsweep 4.0 [list source [file join $dir textsweep.tcl]]


|

1
2
3

  package ifneeded textsweep 4.1 [list source [file join $dir textsweep.tcl]]

Changes to scriptlibs/textsweep/textsweep-main.tcl.

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
...
287
288
289
290
291
292
293
294



295
296
297
298
299
300
301

302



303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
...
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
set filelist {}


#handle errors in Tk
proc bgerror {args} {

    global cachedir
    puts "TextSweep: An error occurred: $args"  
}

#make images for buttons et. al from files
proc makeImage {} {

    global  runsearch 
    global folder_documents 
................................................................................
#"about application" command
proc tkAboutDialog {} {
    aboutWindow
}

proc aboutWindow {} {

   tk_messageBox -parent . -icon info -title "About TextSweep" -message "TextSweep: Search and Replace Tool" -detail "Version 4.0\n(c) 2018 WordTech Communications LLC"


}

#check file list to ensure existence
proc checkfilelist {} {

................................................................................
    
    pack .f.foldersearch.folder .f.foldersearch.foldervar .f.foldersearch.pattern .f.foldersearch.patternvar .f.foldersearch.search .f.foldersearch.searchvar  .f.foldersearch.replace .f.foldersearch.replacevar -side left -fill x -expand no
    
    
    ttk::separator .f.topsep -orient vertical
    pack .f.topsep -side top -fill both -expand no
    
    ttk::frame .f.text
    pack .f.text -side top -fill both -expand yes
    
    ttk::frame .f.text.list
    pack .f.text.list -side left -fill both -expand no
    
    ttk::frame .f.text.display
    pack .f.text.display -side right -fill both -expand no
    
    #main data display
    tablelist::tablelist .f.text.list.listbox -columns {0 "File" }  -width 40 -yscrollcommand [list .f.text.list.scrollframe.scroll set] -selectbackground   RoyalBlue1 -selectforeground   white -stretch all -stripebackground white -relief flat -border 0 -showseparators yes -takefocus 0 -setfocus 1 -activestyle none -exportselection 0
    
    pack  .f.text.list.listbox -side left -fill both -expand yes
    
    bind .f.text.list.listbox <<ListboxSelect>> highlightText
................................................................................
    
    ttk::frame .f.text.list.scrollframe
    pack .f.text.list.scrollframe -fill y -expand no -side right
    
    ttk::scrollbar .f.text.list.scrollframe.scroll -command [list .f.text.list.listbox yview]
    
    pack .f.text.list.scrollframe.scroll -fill y -expand no -side right
    



    text .f.text.t -yscrollcommand [list .f.text.scrollframe.scroll set]  -borderwidth 0 -highlightthickness 3 -background white  -highlightcolor SlateGray3 -state disabled
    pack .f.text.t -fill both -side left -expand yes
    
    ttk::frame .f.text.scrollframe
    pack .f.text.scrollframe -fill y -side right -expand no
    
    ttk::scrollbar .f.text.scrollframe.scroll -command [list .f.text.t yview]

    pack .f.text.scrollframe.scroll -side right -fill y -expand no



    
    ttk::separator .f.bottomsep -orient vertical
    pack .f.bottomsep -side top -fill both -expand no
    
    ttk::frame .f.bottom -padding 5
    pack .f.bottom -fill both -expand no -side top
    
    ttk::button .f.bottom.replaceall -text "Replace in All Files" -command  batchReplace 
    ttk::button .f.bottom.undo -text "Undo" -command batchUndo
    
    pack  .f.bottom.replaceall .f.bottom.undo -side right -fill x -expand no

    bind .f.text.t <Button-1> {focus .f.text.t} 
    
    bind all <[xplat::controlkey]-Q> exit
    bind all <[xplat::controlkey]-q> exit
    bind all <[xplat::controlkey]-Z> batchUndo
    bind all <[xplat::controlkey]-z> batchUndo
    
    focus -force .f.foldersearch.foldervar
................................................................................
#initialize the app
proc startUp {} {
    global appname
    global appversion
    global datadir
    global cachedir
    
    appname::setAppName TextSweep 4.0
    
    set datadir [xplat::appconfig TextSweep]


    makeImage
    softwareupdate::setVersion $appname::name $appname::version
    machelp::setAppName $appname::name $appname::version







|







 







|







 







|


|
<
<

<







 







|
>
>
>
|
|

|
|

<
>
|
>
>
>












|







 







|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
262
263
264
265
266
267
268
269
270
271
272


273

274
275
276
277
278
279
280
...
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300

301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
...
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
set filelist {}


#handle errors in Tk
proc bgerror {args} {

    global cachedir
    puts "TextSweep: An error occurred: $args\n"
}

#make images for buttons et. al from files
proc makeImage {} {

    global  runsearch 
    global folder_documents 
................................................................................
#"about application" command
proc tkAboutDialog {} {
    aboutWindow
}

proc aboutWindow {} {

   tk_messageBox -parent . -icon info -title "About TextSweep" -message "TextSweep: Search and Replace Tool" -detail "Version 4.1\n(c) 2018 WordTech Communications LLC"


}

#check file list to ensure existence
proc checkfilelist {} {

................................................................................
    
    pack .f.foldersearch.folder .f.foldersearch.foldervar .f.foldersearch.pattern .f.foldersearch.patternvar .f.foldersearch.search .f.foldersearch.searchvar  .f.foldersearch.replace .f.foldersearch.replacevar -side left -fill x -expand no
    
    
    ttk::separator .f.topsep -orient vertical
    pack .f.topsep -side top -fill both -expand no
    
    ttk::panedwindow .f.text -orient horizontal
    pack .f.text -side top -fill both -expand yes
    
    ttk::frame .f.text.list   


    ttk::frame .f.text.display

    
    #main data display
    tablelist::tablelist .f.text.list.listbox -columns {0 "File" }  -width 40 -yscrollcommand [list .f.text.list.scrollframe.scroll set] -selectbackground   RoyalBlue1 -selectforeground   white -stretch all -stripebackground white -relief flat -border 0 -showseparators yes -takefocus 0 -setfocus 1 -activestyle none -exportselection 0
    
    pack  .f.text.list.listbox -side left -fill both -expand yes
    
    bind .f.text.list.listbox <<ListboxSelect>> highlightText
................................................................................
    
    ttk::frame .f.text.list.scrollframe
    pack .f.text.list.scrollframe -fill y -expand no -side right
    
    ttk::scrollbar .f.text.list.scrollframe.scroll -command [list .f.text.list.listbox yview]
    
    pack .f.text.list.scrollframe.scroll -fill y -expand no -side right

    ttk::frame .f.text.frame
    pack .f.text.frame -fill both -expand yes
    
    text .f.text.frame.t -yscrollcommand [list .f.text.frame.scrollframe.scroll set]  -borderwidth 0 -highlightthickness 3 -background white  -highlightcolor SlateGray3 -state disabled
    pack .f.text.frame.t -fill both -side left -expand yes
    
    ttk::frame .f.text.frame.scrollframe
   pack .f.text.frame.scrollframe -fill y -side right -expand no
    

    ttk::scrollbar .f.text.frame.scrollframe.scroll -command [list .f.text.frame.t yview]
    pack .f.text.frame.scrollframe.scroll -side right -fill y -expand no

    .f.text add .f.text.list
    .f.text add .f.text.frame
    
    ttk::separator .f.bottomsep -orient vertical
    pack .f.bottomsep -side top -fill both -expand no
    
    ttk::frame .f.bottom -padding 5
    pack .f.bottom -fill both -expand no -side top
    
    ttk::button .f.bottom.replaceall -text "Replace in All Files" -command  batchReplace 
    ttk::button .f.bottom.undo -text "Undo" -command batchUndo
    
    pack  .f.bottom.replaceall .f.bottom.undo -side right -fill x -expand no

    bind .f.text.frame.t <Button-1> {focus .f.text.frame.t} 
    
    bind all <[xplat::controlkey]-Q> exit
    bind all <[xplat::controlkey]-q> exit
    bind all <[xplat::controlkey]-Z> batchUndo
    bind all <[xplat::controlkey]-z> batchUndo
    
    focus -force .f.foldersearch.foldervar
................................................................................
#initialize the app
proc startUp {} {
    global appname
    global appversion
    global datadir
    global cachedir
    
    appname::setAppName TextSweep 4.1
    
    set datadir [xplat::appconfig TextSweep]


    makeImage
    softwareupdate::setVersion $appname::name $appname::version
    machelp::setAppName $appname::name $appname::version

Changes to scriptlibs/textsweep/textsweep.tcl.

1
2
3
4
package provide textsweep 4.0

source [file join [file dirname [info script]] textsweep-main.tcl]

|



1
2
3
4
package provide textsweep 4.1

source [file join [file dirname [info script]] textsweep-main.tcl]

Changes to textsweep-changes.tcl.

1
2
* New scripting API for Mac and Windows.
* UI enhancements. 
|
|
1
2
* Improved resizing of main window for efficient UI.
* Removal of console on Windows.

Changes to textsweep-version.tcl.

1
4.0
|
1
4.1