Skip to content
Myr

xdg: sort application list

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Eklöf · committed by Daniel Eklöf · parent 382e942 · Browse files · 1 file+11 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−0 removed

  • other:+11 added−0 removed

1 file+11 added−0 removed

modified:xdg.c+11 added
307 unmodified lines
308309 closedir(d);310}311312static int313sort_application_by_title(const void *_a, const void *_b)314{315 const struct application *a = _a;316 const struct application *b = _b;317 return strcmp(a->title, b->title);318}319320void321xdg_find_programs(int icon_size, struct application_list *applications)322{323 icon_theme_list_t themes = icon_load_theme("Arc");
25 unmodified lines
349 tll_remove(apps, it);350 }351 tll_free(apps);352353 qsort(applications->v, applications->count, sizeof(applications->v[0]),354 &sort_application_by_title);355356 xdg_data_dirs_destroy(dirs);357 icon_themes_destroy(themes);358}359
61 unmodified lines