ocarina: Use yes / no images for banning songs

I think this makes more sense than using the GTK_STOCK_DIALOG_ERROR for
both states.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-05-18 12:17:45 -04:00
parent dea787d576
commit 0e6632ce45
1 changed files with 5 additions and 1 deletions

View File

@ -66,6 +66,10 @@ static GtkWidget *make_tag_labels()
static void on_ban(GtkWidget *w, gpointer d)
{
bool banned = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ban));
if (banned)
change_button_image(ban, GTK_STOCK_NO);
else
change_button_image(ban, GTK_STOCK_YES);
if (current->get_banned() == banned)
return;
@ -78,7 +82,7 @@ static void on_ban(GtkWidget *w, gpointer d)
static GtkWidget *make_buttons()
{
GtkWidget *box = gtk_vbox_new(FALSE, 0);
ban = make_toggle_button(GTK_STOCK_DIALOG_ERROR, on_ban, true);
ban = make_toggle_button(GTK_STOCK_YES, on_ban, true);
gtk_box_pack_start(GTK_BOX(box), ban, FALSE, FALSE, 0);