X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/2d504956e1c3612ed62f16a05fd504b5998e6759..33288048f694a84b9c40653f0b72b4ce44a94ab1:/disobedience/control.c diff --git a/disobedience/control.c b/disobedience/control.c index d3c4e18..1468168 100644 --- a/disobedience/control.c +++ b/disobedience/control.c @@ -113,20 +113,20 @@ static struct icon icons[] = { { "pause.png", /* icon */ "Pause playing track", /* tip */ - 0, /* menuitem */ + "/Control/Playing", /* menuitem */ update_pause, /* update */ disorder_eclient_pause, /* action */ - ICON_INACTIVE, /* flags */ + ICON_ACTIVE, /* flags */ 0, /* button */ 0 /* item */ }, { "play.png", /* icon */ "Resume playing track", /* tip */ - 0, /* menuitem */ + "/Control/Playing", /* menuitem */ update_play, /* update */ disorder_eclient_resume, /* action */ - ICON_ACTIVE, /* flags */ + ICON_INACTIVE, /* flags */ 0, /* button */ 0 /* item */ }, @@ -183,7 +183,7 @@ static struct icon icons[] = { { "speaker.png", /* icon */ "Play network stream", /* tip */ - 0, /* menuitem */ + "/Control/Network player", /* menuitem */ update_rtp, /* update */ enable_rtp, /* action */ ICON_INACTIVE, /* flags */ @@ -193,7 +193,7 @@ static struct icon icons[] = { { "speakercross.png", /* icon */ "Stop playing network stream", /* tip */ - 0, /* menuitem */ + "/Control/Network player", /* menuitem */ update_nortp, /* update */ disable_rtp, /* action */ ICON_ACTIVE, /* flags */ @@ -220,8 +220,6 @@ void control_monitor(void attribute((unused)) *u) { /** @brief Create the control bar */ GtkWidget *control_widget(void) { GtkWidget *hbox = gtk_hbox_new(FALSE, 1), *vbox; - GtkWidget *content; - GdkPixbuf *pb; GtkWidget *v, *b; int n; @@ -230,16 +228,7 @@ GtkWidget *control_widget(void) { assert(mainmenufactory); /* ordering must be right */ for(n = 0; n < NICONS; ++n) { NW(button); - icons[n].button = gtk_button_new(); - if((pb = find_image(icons[n].icon))) { - NW(image); - content = gtk_image_new_from_pixbuf(pb); - } else { - NW(label); - content = gtk_label_new(icons[n].icon); - } - gtk_container_add(GTK_CONTAINER(icons[n].button), content); - gtk_tooltips_set_tip(tips, icons[n].button, icons[n].tip, ""); + icons[n].button = iconbutton(icons[n].icon, icons[n].tip); g_signal_connect(G_OBJECT(icons[n].button), "clicked", G_CALLBACK(clicked_icon), &icons[n]); /* pop the icon in a vbox so it doesn't get vertically stretch if there are @@ -279,6 +268,8 @@ GtkWidget *control_widget(void) { v = gtk_hscale_new(volume_adj); NW(hscale); b = gtk_hscale_new(balance_adj); + gtk_widget_set_style(v, tool_style); + gtk_widget_set_style(b, tool_style); gtk_scale_set_digits(GTK_SCALE(v), 10); gtk_scale_set_digits(GTK_SCALE(b), 10); gtk_widget_set_size_request(v, 192, -1);