Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The icons associated with the template groups do not match those in the records linked to them #88

Open
ltraveler opened this issue Feb 29, 2024 · 3 comments
Labels

Comments

@ltraveler
Copy link

I have several template groups, each featuring its own custom icons.

For example:
image

After clicking the 'Set Template Parent' button, this is what I observed in the record I wanted to associate with the template:

image

As you can see, the icons displayed do not match the ones I set in the 'Template Group'

@mitchcapper
Copy link
Owner

Correct. Set template parent does not modify an entry beyond associating it with the parent. If when you create a new entry you use the drop down arrow next to the key in the toolbar and select it, it should have the right icon.

I am working on a large revision and will put it in discussions before implementing. This icon idea was on it. It is not 100% obvious the best behavior though. If you hit set template parent should it always take the template icon? What if it already has a custom icon? Before Set template parent was basically non-destructive/changing here if say we only set the icon if it is default on the entry if you set the entry to one parent then changed to another it wouldnt take the second icon as it already had an icon from the first. Before we de-parent an entry should we check if is icon = the current parent and then remove it?

@ltraveler
Copy link
Author

ltraveler commented Feb 29, 2024

Of course, overwriting the default category icon with the icon from the Group Template is not a good idea. What I'm trying to say is that the list of templates and their icons, after clicking on "Select Parent Template Entry," is somewhat messy and can be confusing. It's not a major issue, but it does go against logic and appears to be a bug. Perhaps there could be an option to choose the priority between the Category Icons and the Parent Template Icons, provided it doesn't undermine the original purpose of the plugin. The plugin shouldn't inject anything that could interfere with the operation of other KeePass clients that don't support plugins.

@mitchcapper
Copy link
Owner

What I'm trying to say is that the list of templates and their icons, after clicking on "Select Parent Template Entry," is somewhat messy and can be confusing

So sorry I misread your initial message! You are 100% right and that is quite freaky. I see they have custom icons but not the right ones.

https://github.com/mitchcapper/KPEntryTemplates/blob/master/KPEntryTemplates/EntryTemplateManager.cs#L157-L167
is the section of code that does it, I do some reflective things with getting the forms but the icon code I don't see an immediate issue with. I will have to dig into the current KeePass code to see what I might be doing wrong.

Do you have any idea where those icons came from? Also if you set the template parent icon to a built in icon does that show up properly?

Thanks!

@mitchcapper mitchcapper added the bug label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants