[Github-comments] [geany/geany] Add features for sorting editor tabs (#1144)

Colomban Wendling notifications at xxxxx
Sat Jul 30 14:31:00 UTC 2016


> @@ -754,6 +779,314 @@ void notebook_remove_page(gint page_num)
>  }
>  
>  
> +/* Copied from sidebar.c.  We can place this in one place like utils.c. */
> +static gboolean utils_filename_has_prefix(const gchar *str, const gchar *prefix)
> +{
> +	gchar *head = g_strndup(str, strlen(prefix));
> +	gboolean ret = utils_filenamecmp(head, prefix) == 0;
> +
> +	g_free(head);
> +	return ret;
> +}
> +
> +
> +/* Copied from sidebar.c.  We can place this in one place like utils.c,
> + * with a more formal naming convention. */
> +static gchar *get_doc_folder(const gchar *path)

why use this so convoluted way of sorting?  what would be wrong with sorting just by full path?
In the sidebar we want to avoid showing a long path is we have something else and meaningful to show, but here it's not shown but only for sorting.
Is it that important that the order be the very same as the sidebar -- even project-relative?

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1144/files/c064984ff29744294b7c25d2987c5b51f3c24405#r72888549
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160730/b4e61d9c/attachment.html>


More information about the Github-comments mailing list