Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Tue, 17 Feb 2015 15:40:35 UTC Commit: db9465995ec9be3ac4a345c598e564b651cc787b https://github.com/geany/geany-plugins/commit/db9465995ec9be3ac4a345c598e564...
Log Message: ----------- projectorganizer: When sorting tree, use case-insensitive comparison
Similarly to Documents and Files tabs.
Modified Paths: -------------- projectorganizer/src/prjorg-project.c projectorganizer/src/prjorg-sidebar.c
Modified: projectorganizer/src/prjorg-project.c 12 lines changed, 3 insertions(+), 9 deletions(-) =================================================================== @@ -369,16 +369,10 @@ static void close_root(PrjOrgRoot *root, gpointer user_data) }
-static gint root_comparator(PrjOrgRoot *a, PrjOrgRoot *b) -{ - return g_strcmp0(a->base_dir, b->base_dir); -} - - void prjorg_project_add_external_dir(const gchar *dirname) { PrjOrgRoot *new_root = create_root(dirname); - if (g_slist_find_custom (prj_org->roots, new_root, (GCompareFunc)root_comparator) != NULL) + if (g_slist_find_custom (prj_org->roots, new_root, (GCompareFunc)g_strcmp0) != NULL) { close_root(new_root, NULL); return; @@ -386,7 +380,7 @@ void prjorg_project_add_external_dir(const gchar *dirname) GSList *lst = prj_org->roots->next; lst = g_slist_prepend(lst, new_root); - lst = g_slist_sort(lst, (GCompareFunc)root_comparator); + lst = g_slist_sort(lst, (GCompareFunc)utils_str_casecmp); prj_org->roots->next = lst; prjorg_project_rescan(); @@ -396,7 +390,7 @@ void prjorg_project_add_external_dir(const gchar *dirname) void prjorg_project_remove_external_dir(const gchar *dirname) { PrjOrgRoot *test_root = create_root(dirname); - GSList *found = g_slist_find_custom (prj_org->roots, test_root, (GCompareFunc)root_comparator); + GSList *found = g_slist_find_custom (prj_org->roots, test_root, (GCompareFunc)g_strcmp0); if (found != NULL) { PrjOrgRoot *found_root = found->data;
Modified: projectorganizer/src/prjorg-sidebar.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1008,7 +1008,7 @@ static void load_project_root(PrjOrgRoot *root, GtkTreeIter *parent, GSList *hea gchar *path = get_file_relative_path(root->base_dir, key); lst = g_slist_prepend(lst, path); } - lst = g_slist_sort(lst, (GCompareFunc) strcmp); + lst = g_slist_sort(lst, (GCompareFunc) utils_str_casecmp);
foreach_slist (elem, lst) {
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).