Skip to content

Commit

Permalink
Restore use transtated ISO_639_1 to search artist info.
Browse files Browse the repository at this point in the history
No change model when crop and remove in current playlist.
  • Loading branch information
matiasdelellis committed Sep 15, 2011
1 parent 58fcde7 commit 61aae5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
15 changes: 0 additions & 15 deletions src/current-playlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,10 +1242,6 @@ void remove_current_playlist(GtkAction *action, struct con_win *cwin)
/* Now build iterators from the references and delete
them from the store */

g_object_ref(model);
gtk_widget_set_sensitive(GTK_WIDGET(cwin->current_playlist), FALSE);
gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->current_playlist), NULL);

for (i=list; i != NULL; i = i->next) {
ref = i->data;
path = gtk_tree_row_reference_get_path(ref);
Expand All @@ -1270,9 +1266,6 @@ void remove_current_playlist(GtkAction *action, struct con_win *cwin)
gtk_tree_path_free(path);
gtk_tree_row_reference_free(ref);
}
gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->current_playlist), model);
gtk_widget_set_sensitive(GTK_WIDGET(cwin->current_playlist), TRUE);
g_object_unref(model);

g_list_free(list);
}
Expand Down Expand Up @@ -1320,10 +1313,6 @@ void crop_current_playlist(GtkAction *action, struct con_win *cwin)

/* Delete the referenced nodes */

g_object_ref(model);
gtk_widget_set_sensitive(GTK_WIDGET(cwin->current_playlist), FALSE);
gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->current_playlist), NULL);

for (i=to_delete; i != NULL; i = i->next) {
ref = i->data;
path = gtk_tree_row_reference_get_path(ref);
Expand All @@ -1349,10 +1338,6 @@ void crop_current_playlist(GtkAction *action, struct con_win *cwin)
gtk_tree_row_reference_free(ref);
}

gtk_tree_view_set_model(GTK_TREE_VIEW(cwin->current_playlist), model);
gtk_widget_set_sensitive(GTK_WIDGET(cwin->current_playlist), TRUE);
g_object_unref(model);

g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc) idle_delete_mobj_list, mobj_to_delete, NULL);

requeue_track_refs (cwin);
Expand Down
4 changes: 3 additions & 1 deletion src/glyr-related.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "pragha.h"
#include <pthread.h>

#define ISO_639_1 _("en")

#ifdef HAVE_LIBGLYR
/* Handler for 'Artist info' action in the Tools menu */
void *do_get_artist_info (gpointer data)
Expand Down Expand Up @@ -46,7 +48,7 @@ void *do_get_artist_info (gpointer data)
glyr_opt_type(&q, GLYR_GET_ARTISTBIO);

glyr_opt_artist(&q, cwin->cstate->curr_mobj->tags->artist);
glyr_opt_lang (&q, "auto");
glyr_opt_lang (&q, ISO_639_1);

head = glyr_get(&q, &err, NULL);

Expand Down

0 comments on commit 61aae5e

Please sign in to comment.