Manpower

Check-in [c1d549749d]
Login

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

Overview
Comment:Minor fix to services
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c1d549749d3dc02c5d5aea3436d48449ca6bf308
User & Date: kevin 2017-12-09 04:51:06
Context
2017-12-09
05:27
Further tweak of services api check-in: 9950b08b34 user: kevin tags: trunk
04:51
Minor fix to services check-in: c1d549749d user: kevin tags: trunk
2017-12-08
13:50
Rev bump check-in: a697eb5bcd user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to libs/manpower/manpower-main.tcl.

198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
...
227
228
229
230
231
232
233
234

235
236
237
238
239
240
241
242
243
244
245
246
247
....
1309
1310
1311
1312
1313
1314
1315










1316
1317
1318
1319
1320
1321
1322
	    }
	}
    }

    ttk::style element create ImgEntry.icon image book \
	-sticky "" -padding [list 20 0 0 0]

    #entry field for specific man page with image
    ttk::style layout SearchEntry {
	Entry.field -children {
	    SearchEntry.icon -side left
	    Entry.padding -children {
		Entry.textarea
	    }
	}
................................................................................

    tclservices::registerservicewidget .tool.toolbar.frame.entry 
    bind .tool.toolbar.frame.entry <ButtonRelease-1>  checkEntrySelection

    ttk::separator .bottomsep1 -orient vertical 
    pack .bottomsep1 -side bottom -fill both -expand no -side bottom

    tclservices::registerservicewidget .tool.toolbar.frame.entry



    #additional bindings
    bind .tool.toolbar.frame.browser <Return> {singleManPage}
    bind .tool.toolbar.frame.entry <Return> {manSearch; writeState}
    bind .tool.toolbar.frame.entry <ButtonRelease-1>  checkEntrySelection
    
    ttk::frame .bottom
    pack .bottom -side bottom -fill both -expand no

    ttk::separator .bottomsep -orient vertical 
    pack .bottomsep -side bottom -fill both -expand no -side bottom

................................................................................

    if {[.tool.toolbar.frame.entry  selection present]} {
	updateClipboard [ttk::entry::EntrySelection .tool.toolbar.frame.entry ] 
    } else {
	return
    }
}











##write selected text to clipboard
proc updateClipboard {selection} {

    clipboard clear
    clipboard append $selection








|







 







|
>





<







 







>
>
>
>
>
>
>
>
>
>







198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
...
227
228
229
230
231
232
233
234
235
236
237
238
239
240

241
242
243
244
245
246
247
....
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
	    }
	}
    }

    ttk::style element create ImgEntry.icon image book \
	-sticky "" -padding [list 20 0 0 0]

    #entry field for searching man page with image
    ttk::style layout SearchEntry {
	Entry.field -children {
	    SearchEntry.icon -side left
	    Entry.padding -children {
		Entry.textarea
	    }
	}
................................................................................

    tclservices::registerservicewidget .tool.toolbar.frame.entry 
    bind .tool.toolbar.frame.entry <ButtonRelease-1>  checkEntrySelection

    ttk::separator .bottomsep1 -orient vertical 
    pack .bottomsep1 -side bottom -fill both -expand no -side bottom

    tclservices::registerservicewidget .tool.toolbar.frame.browser
    bind .tool.toolbar.frame.browser <ButtonRelease-1>  checkManSelection


    #additional bindings
    bind .tool.toolbar.frame.browser <Return> {singleManPage}
    bind .tool.toolbar.frame.entry <Return> {manSearch; writeState}

    
    ttk::frame .bottom
    pack .bottom -side bottom -fill both -expand no

    ttk::separator .bottomsep -orient vertical 
    pack .bottomsep -side bottom -fill both -expand no -side bottom

................................................................................

    if {[.tool.toolbar.frame.entry  selection present]} {
	updateClipboard [ttk::entry::EntrySelection .tool.toolbar.frame.entry ] 
    } else {
	return
    }
}

#check for selection in entry widget
proc checkManSelection {} {

    if {[.tool.toolbar.frame.browser  selection present]} {
	updateClipboard [ttk::entry::EntrySelection .tool.toolbar.frame.browser ] 
    } else {
	return
    }
}

##write selected text to clipboard
proc updateClipboard {selection} {

    clipboard clear
    clipboard append $selection