# HG changeset patch
# User nenolod
# Date 1137453701 28800
# Node ID dd84f79979b4e3f0f39a9a2cf5dbe1f176ea0293
# Parent bf803441d49ea84be2399bf561c62587f4dc9073
[svn] Dissect the pango markup using scanf and various string delimiter hacks.
This could be done in a much better way, but I'd rather not sit down and
figure out why GTK is not behaving the way I want it to right now.
diff -r bf803441d49e -r dd84f79979b4 audacious/skinwin.c
--- a/audacious/skinwin.c Mon Jan 16 14:37:05 2006 -0800
+++ b/audacious/skinwin.c Mon Jan 16 15:21:41 2006 -0800
@@ -319,14 +319,22 @@
GtkTreeIter iter;
GList *node;
- gchar *name;
+ gchar *sel, name[512], desc[512], *tmp;
gchar *comp = NULL;
selection = gtk_tree_view_get_selection(treeview);
if (!gtk_tree_selection_get_selected(selection, &model, &iter))
return;
- gtk_tree_model_get(model, &iter, SKIN_VIEW_COL_NAME, &name, -1);
+ gtk_tree_model_get(model, &iter, SKIN_VIEW_COL_NAME, &sel, -1);
+
+ /* XXX: This is icky hack because we do not store the skin name
+ * in the skinlist. My attempts at doing that cause a blank skin
+ * window. Must be doing something wrong.
+ */
+ sscanf(sel, "%s\n%s", name, desc);
+ tmp = strchr(name, '<');
+ *tmp = '\0';
/* FIXME: store name in skinlist */
for (node = skinlist; node; node = g_list_next(node)) {
@@ -335,7 +343,7 @@
break;
}
- g_free(name);
+ g_free(sel);
bmp_active_skin_load(comp);
}