cbklib

Check-in [a75134832a]
Login

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

Overview
Comment:Minor updates
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a75134832a523be9962f5996dcb64b86ceb35214
User & Date: admin 2015-09-20 05:07:08
Context
2015-10-09
02:06
Updates of various libs check-in: 7360c31fb1 user: admin tags: trunk
2015-09-20
05:07
Minor updates check-in: a75134832a user: admin tags: trunk
02:09
tweak softwareupdate check-in: 2dd7444328 user: admin tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to regproc/regproc.tcl.

98
99
100
101
102
103
104


105
106
107
108
109
110
111
	variable appname
	variable appstore

	toplevel .purchase
	wm title .purchase "Purchase $appname"
	wm resizable .purchase 0 0



	wm withdraw .purchase
	wm transient .purchase .

	wm protocol .purchase WM_DELETE_WINDOW {}

	ttk::frame .purchase.top -padding 10
	pack .purchase.top -side top -fill both -expand yes







>
>







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
	variable appname
	variable appstore

	toplevel .purchase
	wm title .purchase "Purchase $appname"
	wm resizable .purchase 0 0

	regproc::makeModal .purchase

	wm withdraw .purchase
	wm transient .purchase .

	wm protocol .purchase WM_DELETE_WINDOW {}

	ttk::frame .purchase.top -padding 10
	pack .purchase.top -side top -fill both -expand yes
146
147
148
149
150
151
152


153
154
155
156
157
158
159
	variable appname
	variable appstore
	variable expired

	toplevel .expired
	wm title .expired "Purchase $appname"
	wm resizable .expired 0 0



	wm withdraw .expired
	wm transient .expired .

	wm protocol .expired WM_DELETE_WINDOW {}

	ttk::frame .expired.top -padding 10







>
>







148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
	variable appname
	variable appstore
	variable expired

	toplevel .expired
	wm title .expired "Purchase $appname"
	wm resizable .expired 0 0

	regproc::makeModal .expired

	wm withdraw .expired
	wm transient .expired .

	wm protocol .expired WM_DELETE_WINDOW {}

	ttk::frame .expired.top -padding 10
354
355
356
357
358
359
360












361
362
363
364
365
366

    proc exitIfExpired {} {

	variable expired
	if {$expired == 1} {
	    exit
	} 













    }

    namespace export *
}








>
>
>
>
>
>
>
>
>
>
>
>






358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382

    proc exitIfExpired {} {

	variable expired
	if {$expired == 1} {
	    exit
	} 

    }

    proc makeModal {w} {

	if {[tk windowingsystem] eq "aqua" } {
	    tk::unsupported::MacWindowStyle style $w  modal
	}
	if {[tk windowingsystem] eq "win32"} {
	    raise $w
	    grab -global $w
	}

    }

    namespace export *
}

Changes to softwareupdate/softwareupdate.tcl.

97
98
99
100
101
102
103

104
105
106
107
108
109
110
	
	if {[expr $currentversion < $versionnumber]} {
	    softwareupdate::updatePitch
	} else {
	    softwareupdate::upToDate
	}
    }

    
    #define the current version of the software
    proc setVersion {app number} {
	variable currentversion
	variable appname
	set currentversion $number
	set appname $app







>







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
	
	if {[expr $currentversion < $versionnumber]} {
	    softwareupdate::updatePitch
	} else {
	    softwareupdate::upToDate
	}
    }
}
    
    #define the current version of the software
    proc setVersion {app number} {
	variable currentversion
	variable appname
	set currentversion $number
	set appname $app
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228

	wm withdraw .updateprogress
	update idletasks

	ttk::frame .updateprogress.f -padding 5
	pack .updateprogress.f -fill both -expand yes

	label .updateprogress.f.l -bg gray95 -image $icon -bd 0 -relief flat -highlightthickness 0
	pack .updateprogress.f.l -side left -fill both -expand yes

	frame .updateprogress.f.r -bg gray95 -bd 0 -highlightcolor gray95
	pack .updateprogress.f.r -side right -fill both -expand yes
	
	
	ttk::label .updateprogress.f.r.t -text "Checking for updates..." -padding 5







|







215
216
217
218
219
220
221
222
223
224
225
226
227
228
229

	wm withdraw .updateprogress
	update idletasks

	ttk::frame .updateprogress.f -padding 5
	pack .updateprogress.f -fill both -expand yes

    label .updateprogress.f.l -bg gray95 -image $icon -bd 0 -relief flat -highlightthickness 0 -width [image width $icon] -height [image height $icon]
	pack .updateprogress.f.l -side left -fill both -expand yes

	frame .updateprogress.f.r -bg gray95 -bd 0 -highlightcolor gray95
	pack .updateprogress.f.r -side right -fill both -expand yes
	
	
	ttk::label .updateprogress.f.r.t -text "Checking for updates..." -padding 5
262
263
264
265
266
267
268

269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
    }

    #show progress of installation
    proc progressDialog {} {

	variable appname
	variable status


	catch {destroy .downloadprogress}

	toplevel .downloadprogress
	wm title .downloadprogress "Updating $appname"

	wm transient .downloadprogress .

	label .downloadprogress.label -bitmap myicon   -anchor w -bg gray95 -highlightthickness 0

	pack .downloadprogress.label -side left -fill both -expand yes


	ttk::frame .downloadprogress.frame -padding 5
	pack .downloadprogress.frame -side right -fill both -expand yes








>








|







263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
    }

    #show progress of installation
    proc progressDialog {} {

	variable appname
	variable status
    variable icon

	catch {destroy .downloadprogress}

	toplevel .downloadprogress
	wm title .downloadprogress "Updating $appname"

	wm transient .downloadprogress .

    label .downloadprogress.label -image $icon  -anchor w -bg gray95 -highlightthickness 0

	pack .downloadprogress.label -side left -fill both -expand yes


	ttk::frame .downloadprogress.frame -padding 5
	pack .downloadprogress.frame -side right -fill both -expand yes

Changes to xplat/xplat.tcl.

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
43
44

	switch [tk windowingsystem] {

	    "x11" {
		exec lpr [list $filename]
	    }
	    "win32" {
		auto_execok start  /min notepad /p [list $filename]
	    }
	    
	    "aqua" {
		package require cocoaprint
		cocoaprint::cocoaprint [list $filename] .
	    }
	}
    }


    #launch file with system default application
    proc launch {filename} {
	switch [tk windowingsystem] {

	    "x11" {
		exec xdg-open [list $filename]
	    }
	    "win32" {
		auto_execok start {} [list $filename]
	    }
	    
	    "aqua" {
		exec open $filename
	    }
	}
    }







|


















|







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
43
44

	switch [tk windowingsystem] {

	    "x11" {
		exec lpr [list $filename]
	    }
	    "win32" {
		eval exec [auto_execok start]  /min notepad /p [list $filename]
	    }
	    
	    "aqua" {
		package require cocoaprint
		cocoaprint::cocoaprint [list $filename] .
	    }
	}
    }


    #launch file with system default application
    proc launch {filename} {
	switch [tk windowingsystem] {

	    "x11" {
		exec xdg-open [list $filename]
	    }
	    "win32" {
		eval exec [auto_execok start] [list $filename]
	    }
	    
	    "aqua" {
		exec open $filename
	    }
	}
    }
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    proc appconfig {appname} {
	switch [tk windowingsystem] {

	    "x11" {
		return [file join $::env(HOME) "." [string tolower  "$appname"]]
	    }
	    "win32" {
		return [file join $::env(APPDATA) "CodebyKevin" "$appname"_config]
	    } 
	    
	    "aqua" {
		return [file join $::env(HOME) "Library" "Application Support" "$appname" "Preferences"]
	    }   
	}
    }







|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    proc appconfig {appname} {
	switch [tk windowingsystem] {

	    "x11" {
		return [file join $::env(HOME) "." [string tolower  "$appname"]]
	    }
	    "win32" {
		return [file join $::env(APPDATA) "$appname"]
	    } 
	    
	    "aqua" {
		return [file join $::env(HOME) "Library" "Application Support" "$appname" "Preferences"]
	    }   
	}
    }