Page 2 of 2

Re: A few small problems

Posted: Mon Sep 20, 2010 6:40 pm
by Harteex
I think the following would be a good enough solution.

If all of these properties hold:
* Tuniac is started without command line arguments
* Tuniac is running
* Tuniac is in tray (don't know how to detect this, I don't have very much experience in WINAPI yet)

Then do the equivalent of "tuniac -restore".

The only "problem" with this is that tuniac starts flashing in the taskbar, it would be better if it would simply be brought in focus on the taskbar aswell (this is on XP, not on Win7 right now).

EDIT: yea flashes on Win7 aswell.

EDIT2: Found another small issue :P
If you select and try to delete multiple playlists at once, only one is actually deleted

Re: A few small problems

Posted: Mon Sep 20, 2010 11:47 pm
by Brett
Tuniac doesnt get started again once it is already started for pinned items. I think it just does a WM_SIZE with maybe a WM_RESTORE. But I didnt see the WM_RESTORE come through last night. I'll test again tonight. I was trying to do -restore for various messages I thought would trigger, but well it was late and nothing was working.

You cant steal focus in Windows anymore AFAIK. It will only flash, but when restoring from the pinned icon it should get focus.

I'll fix multi playlist delete tonight. I would have broken it in the past few builds also. I did mention weirdness right :p

Re: A few small problems

Posted: Tue Sep 21, 2010 8:53 am
by Brett
I cant reproduce multiple playlist deletion bug. Seems to work fine for me. What steps to reproduce?

Edit: Also im back to restoring from pinned requires some form of msdn documentation of how it is suppose to work. I just cant see how you are suppose to know if someone has clicked the pinned button when the app is already open.

Re: A few small problems

Posted: Tue Sep 21, 2010 5:09 pm
by Harteex
When Tuniac is in tray I think the pinned button believes it's not started any more, and will launch the application. When Tuniac starts it finds another instance of Tuniac and directly quits.
I pinned a shortcut to tuniacapp -restore and it seemed to work.

I was thinking maybe Tuniac explicitily does the flashing on -restore, I haven't looked through the code that much yet.
(Because when you double click the tray icon it doesn't flash)



About the playlist problems. I looked into it a bit more, and found more problems. Steps to reproduce this specific problem:
Click a playlist, then click another playlist while holding CTRL so that 2 playlists are selected. Press the DEL key on the keyboard, and after chosing yes, only one is actually deleted.

If you press the delete button in tuniac, it works as intended.

Another problem is that if you selected the playlists by using the mouse to create a selection area (hold and drag), you can't use the DEL key at all. And when you select playlists this way, and you release the mousebutton, the Media Library always gets selected aswell.

EDIT: If click on a playlist, and then select other playlists with the selection area, then the one you clicked on will be selected even if you not included it in the selection area. And the DEL key will in this case work (but it still only deletes one if you press it).

Re: A few small problems

Posted: Wed Sep 22, 2010 1:07 pm
by Brett
Tuniac tries to get focus when "-restore" is used.
Windows no longer supports an application bringing itself to the foreground and instead just flashes in the taskbar when it attempts to set itself to focus.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

It is true that Windows considers the app closed and relaunches if an app is only in the systray and you click it's pinned item. This is why I wasn't seeing any decent Windows messages coming through in debug. Tuniac then see's itself open, passing the command line to the existing Tuniac window and auto closes.

It's upto Windows, if it flashes or brings to foreground.

http://www.wasteofcash.com/Tuniac/

100922
-Tuniac now will use"-restore" as a command line given to an existing Tuniac window if no other command lines were given. If you give any command line "-restore" will not automatically happen.
-fix auto selecting visible playlist on mouse region selection
-fix del key for multiple playlist deletion
-changes, bug fixes, speed improvements in other bits of code.

The del key not working on mouse region selection would be related to the ML being the previous visible and getting auto selected in error, then del key trying to remove only the first playlist and the first selected was the ML that can not be deleted. If that makes sense to you ;)

Re: A few small problems

Posted: Thu Sep 23, 2010 8:41 pm
by Harteex
Cool, thanks :)

While checking out the code a while back I noticed that there's an old project page at google code. Maybe it would be a good idea to put up a link to sourceforge or something instead, to avoid confusion (even though I prefer google code myself ;))

Re: A few small problems

Posted: Thu Sep 23, 2010 11:51 pm
by Brett
The Google Code project was started by Tony Million as a place for Tuniac 17 or whatever rewrite that hasn't got off the ground we are up to. It has the start of a Tuniac for Mac that is nothing like Tuniac 1.x on Windows :p

I think I only have file manager and commit rights, I can't change the project details. Perhaps I could ask Tony :)