! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Don't disable the "New from template" functionality
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Mousepad
Component:
General

Comments

Description alister.hood 2013-11-14 07:33:13 CET
It looks like there is a 'File>New from template' feature, but it is hidden if there are no templates.  If it was not hidden, then the user might go and get some templates, but since it is hidden, how are they supposed to know that the feature exists?  I only know because I was reading the source trying to change something else...
Comment 1 Andre Miranda editbugs 2014-11-20 02:45:42 CET
Created attachment 5761 
Patch

Currently the menu item is not disabled, but hidden. The attached patch just disables the menu item. What do think? Isn't that good enough?
Comment 2 alister.hood 2014-11-20 03:15:31 CET
Yes, that's good.
Comment 3 Andre Miranda editbugs 2014-11-20 03:17:47 CET
Related: Bug 11048
Comment 4 alister.hood 2014-11-20 22:59:30 CET
Oh, it looks like this was fixed in git in July.
Comment 5 Andre Miranda editbugs 2014-11-21 01:29:59 CET
I think you're reffering to this commit:
http://git.xfce.org/apps/mousepad/commit/?id=ab8c81ce300e5ae9bc7c6286cfdd0555612fec9d

The commit adds a subitem telling the user that the Templates folder is empty. The problem is half solved.
The unsolved part(which the patch fixes) is that the "New from template:" item is completely hidden if there's no "~/Templates" folder.
Comment 6 alister.hood 2014-11-21 03:21:23 CET
Oh, right, good spotting.
Comment 7 alister.hood 2014-11-21 03:25:26 CET
In that case the fix for this case should be at least as good as the fix for no templates i.e. it should say that ~/Templates should not exist.
Comment 8 Andre Miranda editbugs 2014-11-21 03:27:04 CET
Yeah, I thought about something like this:
https://bugzilla.xfce.org/show_bug.cgi?id=11048#c4
Comment 9 Theo Linkspfeifer editbugs 2019-11-14 15:37:59 CET
Created attachment 9232 
patch

Here is a patch.
Comment 10 Git Bot editbugs 2019-12-06 05:05:50 CET
Theo Linkspfeifer referenced this bugreport in commit 1aaedc75a9331bbda59d2ba4d941a52c7dd6b763

Show info when Templates directory does not exist (Bug #10486)

https://git.xfce.org/apps/mousepad/commit?id=1aaedc75a9331bbda59d2ba4d941a52c7dd6b763
Comment 11 Andre Miranda editbugs 2019-12-06 05:06:55 CET
Thanks!

Bug #10486

Reported by:
alister.hood
Reported on: 2013-11-14
Last modified on: 2019-12-06

People

Assignee:
Matthew Brush
CC List:
3 users

Version

Target Milestone:
Mousepad 0.4.x

Attachments

Patch (454 bytes, patch)
2014-11-20 02:45 CET , Andre Miranda
no flags
patch (2.75 KB, patch)
2019-11-14 15:37 CET , Theo Linkspfeifer
no flags

Additional information