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

Rewrite template submenu to preserve hierarchy #2506

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Oct 16, 2024

Fixes #2491

  • More compact code
  • Increased max templates to make it unlikely some will go missing. Do we need a limit in practice?

@jeremypw jeremypw marked this pull request as ready for review December 6, 2024 16:14
Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely works to fix folder hierarchy. I have one small comment, but not gonna block on it.

Regarding the limit, yeah I don't know why that's there either. I'm guessing it's a performance thing?

GLib.FileInfo? info = enumerator.next_file (null);

while (count < MAX_TEMPLATES && (info != null)) {
if (!info.get_attribute_boolean (GLib.FileAttribute.STANDARD_IS_HIDDEN) &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this? I actually have some templates like .editorconfig or .gitignore that I want to show here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Templates folder: In "New >" menu, the hierarchy of templates is flattened
2 participants