Index: libs/manpower/manpower-main.tcl ================================================================== --- libs/manpower/manpower-main.tcl +++ libs/manpower/manpower-main.tcl @@ -200,11 +200,11 @@ } ttk::style element create ImgEntry.icon image book \ -sticky "" -padding [list 20 0 0 0] - #entry field for specific man page with image + #entry field for searching man page with image ttk::style layout SearchEntry { Entry.field -children { SearchEntry.icon -side left Entry.padding -children { Entry.textarea @@ -229,17 +229,17 @@ bind .tool.toolbar.frame.entry checkEntrySelection ttk::separator .bottomsep1 -orient vertical pack .bottomsep1 -side bottom -fill both -expand no -side bottom - tclservices::registerservicewidget .tool.toolbar.frame.entry + tclservices::registerservicewidget .tool.toolbar.frame.browser + bind .tool.toolbar.frame.browser checkManSelection #additional bindings bind .tool.toolbar.frame.browser {singleManPage} bind .tool.toolbar.frame.entry {manSearch; writeState} - bind .tool.toolbar.frame.entry checkEntrySelection ttk::frame .bottom pack .bottom -side bottom -fill both -expand no ttk::separator .bottomsep -orient vertical @@ -1311,10 +1311,20 @@ 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