Favorite on the file window toolbar - does not go away if favorite goes away

Started by ubacher, April 08, 2022, 07:43:56 AM

Previous topic - Next topic

ubacher

I have the case where I placed a favorite on the file window toolbar.
I moved the db from laptop to desktop and the favorite in question is gone. (Understandably, it was a link to a batch file)

The icon on the toolbar, however, is still there.  No way to remove it - is there?

Mario

Remove the favorite on the laptop, then move the database?
Did you also move the settings database?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

I did not move the settings db.
I did a lot of work since i transferred - do not want to repeat it all by copying again.

It might also be caused by changing db.
Anyway- it looks like when the imatch decides on its own to remove a favorite it forgets to
remove the toolbar icon.

Mario

IMatch does not remove favorites all by itself, unless it refers to database objects which no longer exists (category favorites, folder favorites etc.)
A favorite for an external batch file that not exists is not removed. IMatch does not validate that and the favorite will just fail when you try to run it.
Maybe the favorite is in a set not currently visible on your other computer?

I have confirmed that IMatch does not delete Favorites for external applications. Not even when the executable or script does not exist. The Favorite just does nothing.
So this seems not to be a bug.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

QuoteSo this seems not to be a bug.

But that a toolbar icon exists even though the favorite does not is a bug.
(Although this happens only in unusual/uncommon circumstances.)

Mario

IMatch produces the buttons by iterating over the existing favorites.
This is a fully dynamic process, so the favorite seems to exist somewhere. Have you made visible all sets?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

I have looked for the favorites without luck.
Doing so I found one favorite which has a matching toolbar icon but in the favorites
properties Add to file windows toolbar is set to NO.
I then set it and it added the toolbar icon a second time.
Turning it off removed the second icon. Deleting the favorite did not delete the
other icon (which still works)

ubacher

I just closed Imatch and got a message informing me of logged errors:

04.08 12:54:20+  234 [2880] 01  W>   Failed to load shell link C:\Users\ubach\Desktop\Photoshop.exe - Shortcut.lnk with error 80070002  'V:\develop\IMatch5\src\imlib\PTFileSystemLink.cpp(206)'
04.08 12:54:20+   16 [2880] 01  W>   Failed to load shell link C:\Users\ubach\Desktop\copy foto cache to G MIR.bat - Shortcut.lnk with error 80070002  'V:\develop\IMatch5\src\imlib\PTFileSystemLink.cpp(206)'
04.08 12:54:20+   94 [2880] 00  E>   ...  'V:\develop\IMatch5\src\IMatchNG\ViewWndDatabase.cpp(1448)'
04.08 12:54:20+    0 [2880] 00  E>   ...  'V:\develop\IMatch5\src\IMatchNG\ViewWndDatabase.cpp(1666)'
04.08 12:54:20+   15 [2880] 00  E>   ...  'V:\develop\IMatch5\src\IMatchNG\IMWorkspace.cpp(425)'


I attach the whole log file in case needed.

Mario

Failed to load shell link C:\Users\ubach\Desktop\copy foto cache to G MIR.bat - Shortcut.lnk with error 80070002  'V:\develop\IMatch5\src\imlib\PTFileSystemLink.cpp(206)'

This warning is logged when IMatch tries to get the associated icon for a link from Windows and Windows returns an error.
The Favorite is still loaded, but shows no icon anymore. The FW toolbar button should also show, but without an icon. I need to test this when I have some time.

Is this Favorite with the broken shell link (or the other with the same problem) the Favorite you have configured to show as a button in the FW toolbar?

The other errors are crashes in File Window or the entire IMatch workspace. What did you do to this IMatch installation or at least in this session?
Did you copy older settings databases over newer? Did you copy together files from different IMatch versions?
I recommend you run a full repair installation.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I have tested this.
Created a Favorite from a shortcut and added it to the FW toolbar.
Closed IMatch.
Deleted the shortcut.
Restarted IMatch.
I get the same warning in the log file, but the Favorite still shows in both the Fav Panel and the toolbar - just without an icon.
Clicking the Fav brings up an error message about a missing link.

What did you do, exactly, to produce the problem you are seeing.

I have now spent time two times trying to reproduce this but I could not. You must have done something special or different.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

What did I do? Afterwards it is difficult to recall the exact steps but I did move two dbs from laptop
to desktop. I recall it did not work on first try as expected - I also did a P&G recover.

Another thing that happened was that at first it showed only tow icons on the toolbar and after I
added another one two previously hidden icons appeared also.

Maybe a diagnostic check could fix this problem?

Mario

I have no idea where to look for this.

The FW toolbar icons are not "stored" anywhere. They are created from the loaded Favorites.
If there is no favorite, there can be no button.
Favorites are stored in the database.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

QuoteIf there is no favorite, there can be no button.

Then the problem are favorites which exist but do not show anywhere.

Mario

Do you use multiple sets? Have you loaded all sets?
I have asked that above, but I don't see an answer.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

I have all sets visible except the history ones. And I did not find the favorite which has
the icon in the toolbar.

PS: The orphan icon points to a batch file. I have recreated the (shortcut to) missing file
and at least the icon works now. So I don't have an unusable icon in the toolbar.
For now I can perfectly live with this.

Mario

"points to a batch file" means what?
Did you create it by dropping a shell link into the Favorite Panel? Or is this an external application favorite running the batch file?

There is no difference regarding File Window toolbar buttons.

When I delete the shell link / shortcut for one of my Favorites, the next time IMatch starts the shortcut has no icon anymore (in the Fav panel and the FW toolbar). And I get an error when I try to run it.
No hidden favorites or anything.

I have tried to reproduce whatever you did by copying databases and using Pack & Go to restore whatever you have restored.
P&G should not impact anything, because Favorites are stored in the database.
The loaded Workspace controls which if the Favorite Panel is visible and which Favorite Sets are loaded.
IMatch only removes category/folder Favorites when they become invalid, because the categories/folders they reference no longer exist.
It does not validate application favorites.

I have no idea how to reproduce the situation you have created by your particular workflow.
Let me know if you find a way to reproduce it. If I can reproduce it, I can fix it.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

Quote"points to a batch file" means what?

I was dropping a shell link into the Favorite Panel.

As I said: I can live with the problem - lets forget about it until other users report
the same or similar problem.

Ger

The thread is rather old, but I stumbled upon it when searching the forum. And i have see the same problem after moving IMatch to a new computer.

The favorites in the File Window show as white squares. The programs added to the favorites sets are drag-and-dropped (desktop shortcuts).

When running database diagnostics, the log file shows 'Checking Favorites: Completed.'

I noticed one thing that might be interesting for analysis, though. In the Favorites windows, you can organize the individual favorites up and down (ctrl-up, dtrl-down). I have four favorites and when moving one of them, they do not always immediately move up or down when asked, but they do on the second or third click. So it might be that there are favorites left in a queue in the database that are not visible for the end user in the favorites window.

Not an urgent problem at all, though

Mario

I'm not sure I understand.

"White square" means that IMatch cannot get the application icon from Windows. This would indicate that the corresponding software is not installed on your new PC.

Does the application favorite still exist (maybe in a Favorite group that is currently hidden?)
It will also be invalid but removing it will also remove the Favorite button from the toolbar.

IMatch does not remove invalid application favorites by itself, but it will log warning to the log file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ger

hi Mario,

Quote"White square" means that IMatch cannot get the application icon from Windows. This would indicate that the corresponding software is not installed on your new PC.

Correct, it's new pc and the target programs have not been installed.

QuoteDoes the application favorite still exist (maybe in a Favorite group that is currently hidden?)

That's what I think, but when checking on 'Choose which favorites sets to show', in the pop-up all available sets are checked.

QuoteIMatch does not remove invalid application favorites by itself, but it will log warning to the log file.

Yes, saw the warning about non-existing files: Failed to load shell link c:\ProgramData... with error 80070002



Mario

Figured it out. Yay!

Some Favorites are computer- and/or user-specific. The Favorite Panel and the File Window toolbar check for that and hide this kind of Favorites when it does not match the current computer / user.

Application Favorites are computer-specific because the linked application may not exist on another computer.
The File Window code that builds the toolbar from Favorites had a glitch that caused it to not always detect machine-specific Favorites correctly. This is why you still see the buttons for the hidden favorites.

I have fixed that for the IMatch 2023 code base and will do a back-port if I decide to ship another IMatch 2021 update.

If this bothers you and your system is not in a Corporate Domain, you could change the computer name to the name of the old computer, start IMatch, delete the application favorites which no longer work, and then change the computer name back.

Note that this might have side effects, depending on your other software, especially with software using per-machine licensing or similar.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ger

Thanks, Mario.

No, i am not planning to change the computer name; not worth it. IMatch 2023 is ok for me.

ger

Ger

Hi Mario,
The white boxes for favorites in the File Window did not disappear automatically after upgrading; but when deleting the existing favorites, they disappeared as well.

Solved.

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook