Bug 407514 - [templates] Custom template folders don't display their name
Summary: [templates] Custom template folders don't display their name
Status: RESOLVED NOT A BUG
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: vanyossi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-14 08:53 UTC by David REVOY
Modified: 2019-07-22 11:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A screenshot of the bug, outlined in red with captions. (195.76 KB, image/jpeg)
2019-05-14 08:53 UTC, David REVOY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2019-05-14 08:53:03 UTC
Created attachment 120055 [details]
A screenshot of the bug, outlined in red with captions.

Hi, 

Custom template folders don't display their name anymore (see the screenshot in attachement for instant understanding.)

To reproduce:
=============
- Create template directories in the user pref folder /home/<user>/.local/share/krita/templates , you can copy/rename a default template folder from the sources /krita/data/templates 
- Open Krita, go to File and Create a new document.

Result:
=======
The custom folders don't display their folder name, but can still be clicked and content is working. So, it is a mostly a cosmetic bug.

Notes: 
======
This is an old bug (introduced on Krita 4.x) on my to-do bug-report since long time. It's really minor as it doesn't affect the way Krita works, and I believe not a lot of user know and use templates.
Comment 1 vanyossi 2019-07-12 20:47:05 UTC
hi!

Im not getting that behaviour, did you create a .directory Desktop file for your Custom templates folder?? Name is taken from that file on master instead of the folder name.

Should we make it so that if no .directory present the folder name should be used?
Comment 2 vanyossi 2019-07-16 21:01:55 UTC
ok after seeing the code:

The only way to get an empty template name is if you have created the template with a ".directory" desktop file with the Name value set to empty.

Probably there was a time in which some languages were missing, including [fr], so the template name get picked up as empty. just delete/rename the ".directory" to make krita use the folder name as the template name.
Comment 3 David REVOY 2019-07-21 17:12:57 UTC
Hey vanyossi,

I investiged your replies (I replied on IRC maybe two days ago but not sure you read it).

In short: you are totally right; I had a .directory file at the root of my directory. Removing this file displays the name now, thank you. This file was auto-created by Dolphin, the filemanager of KDE/plasma (it does that in every folders) and because the file is hidden and general to all my system I couldn't saw it as a source of problem.
Comment 4 vanyossi 2019-07-22 00:40:10 UTC
thanks deevad, I saw the messages but I was unsure if make something to workaround those faulty files or not. I will mark as resolved hoping as this is something of a rare case.
Comment 5 David REVOY 2019-07-22 11:58:29 UTC
Yes, I agree. It affects only KDE/Plasma users visiting their own custom template folder with their file explorer, so not a large audience and I agree to close the bug (Boud told me the template system will get a rewrite at some point, this is Koffice code from the start). 

I'm glad the workaround is documented here. Thanks for your investigation and time Ivan!