Don
>
> Udo
>
>
>
>
>
>
!ShellNotifyView methodsFor!
basicInitializeNotifyStruct
notifyStruct
uID: 1;
icon: notifyIcon;
message: notifyMessage;
tipText: notifyTipMessage displayString.
! !
!ShellNotifyView categoriesFor:
#basicInitializeNotifyStruct!initializing!private! !
!ShellNotifyView methodsFor!
initializeNotifyStruct
notifyStruct := NOTIFYICONDATA new.
notifyMessage := self class registerMessage: 'Dolphin Shell Notification'.
self basicInitializeNotifyStruct.! !
!ShellNotifyView categoriesFor: #initializeNotifyStruct!initializing!private! !
!ShellNotifyView methodsFor!
modifyNotifyIcon
self basicInitializeNotifyStruct.
^ShellLibrary default shell_NotifyIcon: NIM_MODIFY pnid: notifyStruct.! !
!ShellNotifyView categoriesFor: #modifyNotifyIcon!*-unclassified!private! !
!ShellNotifyView methodsFor!
onViewMinimized: aSizeEvent
"Private - ShellNotifyView handler for window minimize. Hide the window, then
hand off to super."
self hide.
^super onViewMinimized: aSizeEvent! !
!ShellNotifyView categoriesFor: #onViewMinimized:!event handling!private! !
Great! just what I was looking for! But I can't find the original
package anywhere on the newsgroup or web-sites. Could you send this to
me, or point me at the right place to get it?
Thanks,
Marc
Don,
thanks for the extensions. I'll add them to the package.
Udo
Marc,
you can find a package with Dons extensions at
http://www.homeaddress.de/US%20NotifyShell.pac .
Udo
I really, really hope I don't upset either of you with the fact that
I've taken a slightly different approach to TaskbarIcon. I didn't
attach a ShellView to it, since I like the smaller applet approach of
the taskbar icons. I also extended NOTIFYICONDATA to support 2000/XP
based notification balloons and triggers on these. Check out the
following link to see what I mean.
Marc,
sorry if I wrote like I was upset. I'm definitely not. I'll take a look at
your package. Especially the
balloon support is very interesting.
Udo
which is actually smaller since it maps most of the normal messages to
view-like messages.
Still working on the presenter as well. I'd like it to do pop-up menus
by default, but having trouble creating a pop-up that behaves like the
oher taskbar icons.
Marc
"Udo Schneider" <Udo.Sc...@homeaddress.de> wrote in message news:<a67dcn$bfd3h$1...@ID-88021.news.dfncis.de>...
> Hope you liked what you found... I've uploaded another version at
Thanks for posting this, and to Udo and Don for the other versions, it's
saved me a lot of fiddling around. It took me a while to work out how to use
it (perhaps including a short demo might help?) but once I had done so it
works very well.
FYI, the only problem I've seen is that, and I'm not really sure why, the
Taskbar icon in a deployed application is occasionally getting sent WM_USER
messages that it doesn't know how to deal with, which causes a Dolphin VM
error report. Editing TaskbarIcon>>dispatchRegistered: Param:lParam: to
prevent attempts to dispatch messages that it can't handle seems to solve
the problem (so far).
Regards
Ian
Useful feedback. I'll see if I can add a better example in both the
package and class comment. I haven't had much time to work on the
presenter side of TaskbarIcon, since I was toying with popup menus in
taskbars. Still having problems making a popup menu out of the taskbar
behave like other menus there. Are any of you trying to do something
similar?
> FYI, the only problem I've seen is that, and I'm not really sure why, the
> Taskbar icon in a deployed application is occasionally getting sent WM_USER
> messages that it doesn't know how to deal with, which causes a Dolphin VM
> error report. Editing TaskbarIcon>>dispatchRegistered: Param:lParam: to
> prevent attempts to dispatch messages that it can't handle seems to solve
> the problem (so far).
Funky... Looks like the dispatched might get confused on the actual
current focus of the application (or icon) since the icon is actually
a full handle (unlike in Udo's example). I'm assuming that you're not
seeing any adverse side-effects by ignoring unhandled messages? I'll
mod this in the package and upload a new version soon...
Thanks for the feedback,
Marc
> Useful feedback. I'll see if I can add a better example in both the
> package and class comment. I haven't had much time to work on the
> presenter side of TaskbarIcon, since I was toying with popup menus in
> taskbars. Still having problems making a popup menu out of the taskbar
> behave like other menus there. Are any of you trying to do something
> similar?
Not at the moment. I really just need to show/hide a permanantly running
Dolphin application, it hasn't got anything that could usefully be done from
a pop up menu. I'll have a play if I get a chance.
> Funky... Looks like the dispatched might get confused on the actual
> current focus of the application (or icon) since the icon is actually
> a full handle (unlike in Udo's example).
Yes, that sounds very possible. I seem to recall that the walkback often
happened after closing a dialog - where the view with focus was changing.
> I'm assuming that you're not
> seeing any adverse side-effects by ignoring unhandled messages?
I would have said no, now I'm not so sure. In the last couple of days my
system (running XP) has twice performed a full reboot while I was in the
middle of doing something - I can't remember it happening before when I was
running my application using the "normal" task bar. The application in
question wakes up every 15 seconds to do a check so it could possibly be
some timing coincidence between the various views and the taskbar icon that
causes the problem.
It may, of course, be something completely unconnected.
I'll let you know if I come across anything relevant
Ian
I build dynamically a pop-up menu for the tray icon. In general it works fine.
The only problem is that disabled menu items do not display as such; they still
look enabled, even though the behave properly (clicking on a disabled item
makes the "don't do that" sound, and nothing else happens). I hate to admit
it, but I haven't had a chance to look at the differences between your package
and Udo's; once my little app was doing its job, it was time to move on to the
next hugely important major initiative ;-). Anyway, I briefly experimented
with using just a ShellPresenter (instead of NotifyShell) with both a ShellView
and Udo's ShellNotifyView, but, as I recall (a *big* caveat), there was some
problem with popping up the menu in the right location and setting command
targets properly. I didn't spend much time going down that path before
deciding it was simpler to implement the way Udo had originally done it, since
that made it simpler to get the menu to pop up in the right place and to get
command queries to follow the right path. If this sounds like something that
might help with your problem, let me know, and I'll try to give you more
detail.
Don