summaryrefslogtreecommitdiff
path: root/src/sj-main.c
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2011-10-20 12:00:36 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2012-09-06 19:58:38 +0200
commit36887a1bd8c2de8daa7045a37a7f1d92e8599340 (patch)
tree6ca345a2de09b3a3de34bf550675fad03309cc81 /src/sj-main.c
parent0632a28a942843c33f542441c64bb78524ae9aba (diff)
Unset track composer/artist sortname/id if edited
We cannot set the sortname or id of artists or composers automatically so if the names are edited we just clear the other fields. https://bugzilla.gnome.org/show_bug.cgi?id=661646
Diffstat (limited to 'src/sj-main.c')
-rw-r--r--src/sj-main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sj-main.c b/src/sj-main.c
index 10e8ca1..a00ebd4 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -1512,11 +1512,23 @@ static void on_cell_edited (GtkCellRendererText *renderer,
g_free (track->artist);
track->artist = g_strdup (string);
gtk_list_store_set (track_store, &iter, COLUMN_ARTIST, track->artist, -1);
+ if (track->artist_sortname) {
+ g_free (track->artist_sortname);
+ track->artist_sortname = NULL;
+ }
+ if (track->artist_id) {
+ g_free (track->artist_id);
+ track->artist_id = NULL;
+ }
break;
case COLUMN_COMPOSER:
g_free (track->composer);
track->composer = g_strdup (string);
gtk_list_store_set (track_store, &iter, COLUMN_COMPOSER, track->composer, -1);
+ if (track->composer_sortname) {
+ g_free (track->composer_sortname);
+ track->composer_sortname = NULL;
+ }
break;
default:
g_warning (_("Unknown column %d was edited"), column);