summaryrefslogtreecommitdiff
path: root/plugins/gtkui
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-10-17 21:31:18 +0200
committerGravatar waker <wakeroid@gmail.com>2010-10-17 21:31:18 +0200
commitae914fe8fd6f2784bf16fb636d65fd3883f61951 (patch)
tree329ef2269b7e872f6ffd9064e415d271ad3b05e9 /plugins/gtkui
parent5fca2669511fa055ca59b5e5e01a9f2c63427d5c (diff)
fixed metadata editing in non-english locale
Diffstat (limited to 'plugins/gtkui')
-rw-r--r--plugins/gtkui/trkproperties.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/gtkui/trkproperties.c b/plugins/gtkui/trkproperties.c
index d3c897fc..f60a7b0b 100644
--- a/plugins/gtkui/trkproperties.c
+++ b/plugins/gtkui/trkproperties.c
@@ -156,7 +156,7 @@ trkproperties_fill_metadata (void) {
if (!value) {
value = "";
}
- gtk_list_store_set (store, &iter, 0, _(types[i+1]), 1, value, -1);
+ gtk_list_store_set (store, &iter, 0, _(types[i+1]), 1, value, 2, types[i], -1);
i += 2;
}
deadbeef->pl_unlock ();
@@ -238,7 +238,7 @@ show_track_properties_dlg (DB_playItem_t *it) {
// metadata tree
tree = GTK_TREE_VIEW (lookup_widget (trackproperties, "metalist"));
- store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
+ store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
gtk_tree_view_set_model (tree, GTK_TREE_MODEL (store));
GtkCellRenderer *rend_text = gtk_cell_renderer_text_new ();
rend_text2 = GTK_CELL_RENDERER (ddb_cell_renderer_text_multiline_new ());//gtk_cell_renderer_text_new ();
@@ -300,15 +300,14 @@ show_track_properties_dlg (DB_playItem_t *it) {
static gboolean
set_metadata_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) {
GValue key = {0,}, value = {0,};
- gtk_tree_model_get_value (model, iter, 0, &key);
+ gtk_tree_model_get_value (model, iter, 2, &key);
gtk_tree_model_get_value (model, iter, 1, &value);
const char *skey = g_value_get_string (&key);
const char *svalue = g_value_get_string (&value);
for (int i = 0; types[i]; i += 2) {
- if (!strcmp (skey, types[i+1])) {
- trace ("setting %s = %s\n", types[i], svalue);
+ if (!strcmp (skey, types[i])) {
deadbeef->pl_replace_meta (DB_PLAYITEM (data), types[i], svalue);
}
}