summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-05-06 22:00:38 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-05-06 22:00:38 +0200
commit39cd7d5f5d9d7a1f83ac9647fa40f6b6c3c8bc2e (patch)
tree5f3d80d7aae7406e6af44c1bf41f5c3683dd55fa
parent202492913cdbe8e16100bd90e20e763e308c9ed5 (diff)
don't trigger confirmation dialog if user edited metadata, but there were no modifications
-rw-r--r--plugins/gtkui/trkproperties.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/gtkui/trkproperties.c b/plugins/gtkui/trkproperties.c
index 4e534d5b..332f88fa 100644
--- a/plugins/gtkui/trkproperties.c
+++ b/plugins/gtkui/trkproperties.c
@@ -100,8 +100,13 @@ on_metadata_edited (GtkCellRendererText *renderer, gchar *path, gchar *new_text,
GtkTreeIter iter;
gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, treepath);
gtk_tree_path_free (treepath);
- gtk_list_store_set (store, &iter, 1, new_text, -1);
- trkproperties_modified = 1;
+ GValue value = {0,};
+ gtk_tree_model_get_value (GTK_TREE_MODEL (store), &iter, 1, &value);
+ const char *svalue = g_value_get_string (&value);
+ if (strcmp (svalue, new_text)) {
+ gtk_list_store_set (store, &iter, 1, new_text, -1);
+ trkproperties_modified = 1;
+ }
}
// full metadata