![]() |
2010-05-30
, 22:12
|
Posts: 200 |
Thanked: 44 times |
Joined on Jan 2010
|
#1
|
![]() |
2010-05-30
, 23:52
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#2
|
/* gcc pimp.c $(pkg-config --cflags --libs glib-2.0) */
#include <glib.h>
int main (void)
{
gchar *link_dest, *themedirname;
gchar *index_filename;
gchar *theme_name;
GKeyFile *keyfile;
link_dest = g_file_read_link ("/etc/hildon/theme", NULL);
g_assert (link_dest);
themedirname = g_path_get_basename (link_dest);
g_print ("Theme dirname: %s\n", themedirname);
g_free (themedirname);
g_free (link_dest);
index_filename = g_build_filename (G_DIR_SEPARATOR_S "etc", "hildon", "theme", "index.theme", NULL);
keyfile = g_key_file_new ();
g_assert (g_key_file_load_from_file (keyfile, index_filename, G_KEY_FILE_NONE, NULL));
theme_name = g_key_file_get_string (keyfile, "Desktop Entry", "Name", NULL);
g_print ("Theme name: %s\n", theme_name ? theme_name : "bollocks");
g_free (theme_name);
g_key_file_free (keyfile);
return 0;
}
The Following User Says Thank You to qwerty12 For This Useful Post: | ||
![]() |
2010-05-31
, 00:24
|
Posts: 200 |
Thanked: 44 times |
Joined on Jan 2010
|
#3
|
The Following User Says Thank You to jamie721 For This Useful Post: | ||