Tk Text Edit

Check-in [ae06678230]
Login

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

Overview
Comment:Delimiters in speedbuttonbar
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ae06678230b8d66d620b227b548d1b398e1278c3
User & Date: dennis2 2002-06-17 16:33:26
Context
2002-11-14
20:08
Changed textsh default font to Courier check-in: 46249b3e76 user: dennis2 tags: trunk
2002-06-17
16:33
Delimiters in speedbuttonbar check-in: ae06678230 user: dennis2 tags: trunk
16:17
Cleanup check-in: b3204e5606 user: dennis2 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to CHANGES.





1
2
3
4
5
6
7




Version 0.9.10 released 01-03-03

* Moved helpfiles to separate directory
* Removed (Bad KDE support)
* Add "Insert Special char" dialog
* Add posibility to delete files in filelist window.
* Add new common dialog window.
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
Version 0.9.11 released <tbd>

* Delimiters in speedbuttonbar

Version 0.9.10 released 01-03-03

* Moved helpfiles to separate directory
* Removed (Bad KDE support)
* Add "Insert Special char" dialog
* Add posibility to delete files in filelist window.
* Add new common dialog window.

Changes to lib/cfg.tcl.

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{recent4}		  {}
{recent5}		  {}
{recent6}		  {}
{flist}                   {1}
{flist-width}		  {100}
{textshell}		  {0}
{textshell-height}	  {5}
{speed}                   {Open New Save Close SpecChar}
{tearoff}		  {0}
{key-macromgr}          {Control-F11}
{key-paste}		{Shift-Insert}
{key-copy}		{Control-Insert}
{key-copycut}		{Control-Delete}
{key-delline}		{Control-y|Control-Y}
{key-texteval}		{Control-e|Control-E}







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{recent4}		  {}
{recent5}		  {}
{recent6}		  {}
{flist}                   {1}
{flist-width}		  {100}
{textshell}		  {0}
{textshell-height}	  {5}
{speed}                   {Open New Save Close | SpecChar |}
{tearoff}		  {0}
{key-macromgr}          {Control-F11}
{key-paste}		{Shift-Insert}
{key-copy}		{Control-Insert}
{key-copycut}		{Control-Delete}
{key-delline}		{Control-y|Control-Y}
{key-texteval}		{Control-e|Control-E}

Changes to lib/speed.tcl.

61
62
63
64
65
66
67















68
69
70
71
72
73
74
...
109
110
111
112
113
114
115

116
117
118
119
120
121
122
...
136
137
138
139
140
141
142


143
144
145
146
147
148
149
150
151
152
153
154






155
156
157
158
159
160
161
		set n [expr $current_button - 1]
		set c(speed) [ lreplace $c(speed) $n $n $name ]
	}

	speed::Update
	.mnu unpost
}
















proc selIcon {} {
	global current_button c

	set file [tk_getOpenFile -title "Select Icon" -filetypes "{{Gif file} {.gif}} {{All Files} {*}}"  ]

	if {($current_button!=-1) && ($file!="")}  {
................................................................................
	destroy $menu
	xmenu $menu 
	xmenu $menu.macros

	$menu add command -label "Never mind" -command "$menu unpost"
	$menu add command -label "Remove this." -command "speed::Remove"
	$menu add command -label "Edit this." -command "speed::Edit"

	$menu add cascade -label "Icon" -menu $menu.icon
	$menu add cascade -label "Assign" -menu $menu.list
	xmenu $menu.icon
	$menu.icon add command -label "Select icon..." -command "speed::selIcon"
	$menu.icon add command -label "Remove icon" -command {
		speed::removeIcon
		speed::Update
................................................................................
	foreach n [winfo children .wl] {
		destroy $n
	}

	#Add all relevant buttons to frame
	set i 1
	foreach n $c(speed) {


		set ni [lsearch $c(speed-icon) $n]
		if {$ni==-1} {
			xbutton  .wl.t$i -text "$n" -command "macro::play {$n}"
		} else {
			image create photo "icon.$n" -file [lindex $c(speed-icon) [expr $ni+1]]
			xbutton  .wl.t$i -image "icon.$n" -command "macro::play {$n}"
		}

		pack .wl.t$i -side left
		bind .wl.t$i <Button-3> "speed::Button $i"
		bind .wl.t$i <Enter> ".status.filler config -text $n"
		bind .wl.t$i <Leave> {.status.filler config -text ""}







		incr i
	}

	if {[llength $c(speed)]==0} {
		label .wl.t -text "Right click here to add macro buttons" 
		pack .wl.t







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







 







>







 







>
>
|
|
|
|
|
|
|

|
|
|
|
>
>
>
>
>
>







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
...
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
		set n [expr $current_button - 1]
		set c(speed) [ lreplace $c(speed) $n $n $name ]
	}

	speed::Update
	.mnu unpost
}

proc InsertDelim {} {
	global current_button c

	if {$current_button==-1} {
		set c(speed) "$c(speed) |"
	} else {
		set c(speed) [linsert $c(speed) $current_button "|"]
	}

	speed::Update
	.mnu unpost

}


proc selIcon {} {
	global current_button c

	set file [tk_getOpenFile -title "Select Icon" -filetypes "{{Gif file} {.gif}} {{All Files} {*}}"  ]

	if {($current_button!=-1) && ($file!="")}  {
................................................................................
	destroy $menu
	xmenu $menu 
	xmenu $menu.macros

	$menu add command -label "Never mind" -command "$menu unpost"
	$menu add command -label "Remove this." -command "speed::Remove"
	$menu add command -label "Edit this." -command "speed::Edit"
	$menu add command -label "Insert delimiter" -command "speed::InsertDelim"
	$menu add cascade -label "Icon" -menu $menu.icon
	$menu add cascade -label "Assign" -menu $menu.list
	xmenu $menu.icon
	$menu.icon add command -label "Select icon..." -command "speed::selIcon"
	$menu.icon add command -label "Remove icon" -command {
		speed::removeIcon
		speed::Update
................................................................................
	foreach n [winfo children .wl] {
		destroy $n
	}

	#Add all relevant buttons to frame
	set i 1
	foreach n $c(speed) {

		if {$n!="|"} {
			set ni [lsearch $c(speed-icon) $n]
			if {$ni==-1} {
				xbutton  .wl.t$i -text "$n" -command "macro::play {$n}"
			} else {
				image create photo "icon.$n" -file [lindex $c(speed-icon) [expr $ni+1]]
				xbutton  .wl.t$i -image "icon.$n" -command "macro::play {$n}"
			}

			pack .wl.t$i -side left
			bind .wl.t$i <Button-3> "speed::Button $i"
			bind .wl.t$i <Enter> ".status.filler config -text $n"
			bind .wl.t$i <Leave> {.status.filler config -text ""}
		} else {
			frame .wl.t$i -width 10 -height 20
			pack .wl.t$i -side left
			bind .wl.t$i <Button-3> "speed::Button $i"
		}


		incr i
	}

	if {[llength $c(speed)]==0} {
		label .wl.t -text "Right click here to add macro buttons" 
		pack .wl.t