Skip to content

Instantly share code, notes, and snippets.

@craigcabrey
Created February 21, 2016 23:07
Show Gist options
  • Save craigcabrey/b4c4b1c7cb1607489f0d to your computer and use it in GitHub Desktop.
Save craigcabrey/b4c4b1c7cb1607489f0d to your computer and use it in GitHub Desktop.
Quick program for g_app_info_get_display_name
#include <gio/gdesktopappinfo.h>
#include <stdio.h>
// Compile with:
// gcc $(pkg-config --cflags gio-unix-2.0) $(pkg-config --libs gio-unix-2.0) test.c -o test
int main()
{
GList *list;
GAppInfo *app;
list = g_app_info_get_all();
while (list->next != NULL)
{
app = list->data;
list = list->next;
printf("%s\n", g_app_info_get_display_name(app));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment