GNOME Bugzilla – Bug 361534
Don't notify the user of song changes when focused.
Last modified: 2006-12-08 18:42:19 UTC
1. Maximize Banshee 2. Play a song, then hit next. 3. Banshee spits out a notification to libnotify which then reminds me that I just changed the song. What should happen: The application is focused, I don't need to be notified that the song changed, since I just initiated the change. The same thing happens in minimode.
Created attachment 75982 [details] [review] Patch Here's a patch that mostly fixes this (though it needs some changes in the minimode plugin, too). The one issue with it is the MoveResize function that is called on the MainWindow when the notification icon is clicked - why is this done, Aaron? If I remove the call to it, it still seems to have the window positioned/sized correctly when it shows it, some of the time.
Aaron, also, is there any big objection to making Interfaces.MainWindow mutable?
(In reply to comment #2) > Aaron, also, is there any big objection to making Interfaces.MainWindow > mutable? > As far as I remember, this is something we wanted to do, no more hacks to hide the UI, just one main entry point. So the answer is: no. But I could be wrong, double check with Aaron!
The whole MoveResize thing needs to be generalized and moved into Banshee.Base somewhere. I guess we can make that property mutable too, but I'd like to see a clean up of all the geometry code between the tray icon, minimode and the main interface. I'm not sure why the tray needs to actually call MoveResize, you'll have to ask Sebastian about that (CCing).
It's needed there because just doing Show() on the window won't restore it's previous size and position, especially not whether the window was maximized or not.
Committed a slightly modified version of the above patch. Instead of hiding the window I minimize it and set the taskbar hint to false. Works like a charm. Also committed a change to minimode so it will work just as well as the main window.
The only problem I see with this is that the minimize animation is shown. This leads the user to believe that the task went into the window list (where it's not, it's in the system tray). Am I nitpicking or is this a usability regression?
IMHO the latter. How is this handled by other applications?
I would call it a regression as well. RB does minimize too, but the animation shows it minimizing to the notification area and not the tray.
Gabriel: please attach the patch you committed as well.
I just committed a fixed up version that doesn't use minimize. RB is using some ugly X/WM hacks that I don't think we can even do to make minimizing to the tray look right. The reason I changed this part of the code at all was b/c it was broken for Minimode. The version I just committed saves the size/position of InterfaceElements.MainWindow before hiding it, then restores that size/position before presenting it. You can see the changes here: http://cvs.gnome.org/viewcvs/banshee/src/Banshee.Plugins/NotificationAreaIcon/NotificationAreaIconPlugin.cs?r1=1.15&r2=1.13&makepatch=1&diff_format=h Sorry for the regression.
Marking as fixed.