From: Daniel A. S. <st...@ic...> - 2006-01-21 04:15:49
|
David, On 20/01/2006, at 1:47, David Zolli wrote: > I have 3 questions about OS X Dock: > > 1) Is it possible to add or remove entries in Dock's contextual > menu with Tk? you should be able to setup a static custom dock menu by editing Info.plist and adding a .nib file as described here: http://developer.apple.com/documentation/Carbon/Conceptual/ customizing_docktile/tasks/chapter_3_section_2.html to handle item selection in that menu it'll be easiest to setup a HICommand carbon event handler, e.g. via Ffidl as in my HotKey sample if you need a dynamic menu created at runtime you'll need to use the dock tile menu API, which will be more difficult from Tcl: http://developer.apple.com/documentation/Carbon/Conceptual/ customizing_docktile/tasks/chapter_3_section_3.html http://developer.apple.com/documentation/Carbon/Conceptual/ customizing_docktile/tasks/chapter_3_section_4.html > 2) Is it possible to prevent/remove windows list at the top of this > contextual menu? AFAICT with a static custom dock menu you automatically don't get the windows list anymore, e.g. as in Xcode's dock menu, but I'm not certain about that. > 3) If (2) is not possible, what could I use to know the window the > user clicks? (I tried > to bind <Activate> but it doesn't work if the same windows was > clicked two consecutive > times). I'm not sure I understand this question, you want to be notified of all clicks in a window whether the window is active or not ? Cheers, Daniel -- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |