TextSweep

Check-in [517b267867]
Login

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

Overview
Comment:More revisions
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:517b267867cb95a1d0f56b2588c983e3389fea2d
User & Date: kevin 2019-11-29 02:14:14
Context
2019-11-29
14:12
Good progress to new release check-in: be8a5ee097 user: kevin tags: trunk
02:14
More revisions check-in: 517b267867 user: kevin tags: trunk
2019-11-23
18:42
add bitmaps check-in: 51fb5ee597 user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added scriptlibs/darkaqua/darkaqua.tcl.





















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#MIT license



package provide darkaqua 1.0

namespace eval darkaqua {
    
    proc changeImagesDark {} {
	
	foreach item [image names]  {
	    if {[image type $item] eq "bitmap"} {
		$item configure -foreground white
	    }
	}
    }
    
    proc changeImagesLight {} {
	
	foreach item [image names]  {
	    if {[image type $item] eq "bitmap"} {
		$item configure -foreground black
	    }
	}
    }
    
    proc checkDarkMode {} {
	set mode [catch {exec defaults read -g AppleInterfaceStyle} msg]
	if {$msg eq "Dark"} {
	    event generate . <<DarkAqua>>
	} else {
	    event generate . <<LightAqua>>
	}
    }
    
    
    bind all <<LightAqua>> {changeImagesLight}
    bind all <<DarkAqua>> {changeImagesDark}
    
    namespace export *
    
}

Added scriptlibs/darkaqua/pkgIndex.tcl.























>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.
 
package ifneeded darkaqua 1.0 [list source [file join $dir darkaqua.tcl]]

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

23
24
25
26
27
28
29


30
31
32
33
34
35
36
..
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
...
174
175
176
177
178
179
180
181


182
183
184
185
186
187
188
...
355
356
357
358
359
360
361

362
363
364
365
366
367
368
    R0lGODlhDgAOAJEAANnZ2YCAgPz8/P///yH5BAEAAAAALAAAAAAOAA4AAAInhI+
    py+1I4ocQ/IgDEYIPgYJICUCE4F+YIBolEoKPEJKZmVJK6ZACADs=}
image create photo noArrow -height 14 -width 14


if {[tk windowingsystem] eq "aqua"} {
    package require cocoaprint


   }

if {[tk windowingsystem] eq "win32"} {
    package require dde
    dde servername TextSweep
}

................................................................................
	    raise .
	} else {
	    wm deiconify .
	    raise .
	}
    }

proc changeImagesDark {} {

    foreach item [image names]  {
	if {[image type $item] eq "bitmap"} {
	    $item configure -foreground white
	}
    }
}

proc changeImagesLight {} {

    foreach item [image names]  {
	if {[image type $item] eq "bitmap"} {
	    $item configure -foreground black
	}
    }
}

proc checkDarkMode {} {
    set mode [catch {exec defaults read -g AppleInterfaceStyle} msg]
    if {$msg eq "Dark"} {
	event generate . <<DarkAqua>>
    } else {
	event generate . <<LightAqua>>
    }
}

#handle program shutdown via command-q
proc  ::tk::mac::Quit {} {
    regproc::makePitch
}

}
................................................................................
    global appname
    global cachedir
    global datadir
    

    wm title . "TextSweep"
    
    if {[tk windowingsystem] ne "aqua"} {


	wm iconphoto . -default icon-32
    }
    
    . configure -height 700 -width 700
    
    set patternvar *

................................................................................
    
    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


}

#clear text contents
proc clearText  {} {
    .f.text.frame.t configure -state normal
    .f.text.frame.t delete 1.0 end







>
>







 







<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
>
>







 







>







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
..
96
97
98
99
100
101
102

103
























104
105
106
107
108
109
110
...
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
...
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
    R0lGODlhDgAOAJEAANnZ2YCAgPz8/P///yH5BAEAAAAALAAAAAAOAA4AAAInhI+
    py+1I4ocQ/IgDEYIPgYJICUCE4F+YIBolEoKPEJKZmVJK6ZACADs=}
image create photo noArrow -height 14 -width 14


if {[tk windowingsystem] eq "aqua"} {
    package require cocoaprint
    package require darkaqua
    darkaqua::checkDarkMode
   }

if {[tk windowingsystem] eq "win32"} {
    package require dde
    dde servername TextSweep
}

................................................................................
	    raise .
	} else {
	    wm deiconify .
	    raise .
	}
    }




























#handle program shutdown via command-q
proc  ::tk::mac::Quit {} {
    regproc::makePitch
}

}
................................................................................
    global appname
    global cachedir
    global datadir
    

    wm title . "TextSweep"
    
    if {[tk windowingsystem] eq "aqua"} {
	wm iconphoto . -default icon-main
    } else {
	wm iconphoto . -default icon-32
    }
    
    . configure -height 700 -width 700
    
    set patternvar *

................................................................................
    
    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


}

#clear text contents
proc clearText  {} {
    .f.text.frame.t configure -state normal
    .f.text.frame.t delete 1.0 end