Created
February 21, 2016 23:07
-
-
Save craigcabrey/b4c4b1c7cb1607489f0d to your computer and use it in GitHub Desktop.
Quick program for g_app_info_get_display_name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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