Add a second volume button.

2007-10-04  Matthias Clasen  <mclasen@redhat.com>

        * tests/testvolumebutton.c: Add a second volume button.

        * gtk/gtkscalebutton.c: Doh, don't release grabs we don't hold.
        (#478371, reported by Bill Nottingham)


svn path=/trunk/; revision=18881
This commit is contained in:
Matthias Clasen 2007-10-04 12:52:46 +00:00 committed by Matthias Clasen
parent 618c8de221
commit 0afe895ad2
3 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2007-10-04 Matthias Clasen <mclasen@redhat.com>
* tests/testvolumebutton.c: Add a second volume button.
* gtk/gtkscalebutton.c: Doh, don't release grabs we don't hold.
(#478371, reported by Bill Nottingham)
2007-10-04 Loïc Minier <lool@dooz.org>
* gtk/gtkfilechooserdefault.c: (list_mtime_data_func): Fix warnings

View File

@ -877,6 +877,9 @@ gtk_scale_button_grab_notify (GtkScaleButton *button,
priv = button->priv;
if (!GTK_WIDGET_HAS_GRAB (priv->dock))
return;
if (gtk_widget_is_ancestor (gtk_grab_get_current (), priv->dock))
return;

View File

@ -60,15 +60,22 @@ int main (int argc, char **argv)
{
GtkWidget *window;
GtkWidget *button;
GtkWidget *button2;
GtkWidget *box;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
button = gtk_volume_button_new ();
button2 = gtk_volume_button_new ();
box = gtk_hbox_new (FALSE, 0);
g_signal_connect (G_OBJECT (button),
"value-changed",
G_CALLBACK (value_changed), NULL);
gtk_container_add (GTK_CONTAINER (window), button);
gtk_container_add (GTK_CONTAINER (window), box);
gtk_container_add (GTK_CONTAINER (box), button);
gtk_container_add (GTK_CONTAINER (box), button2);
gtk_widget_show_all (window);
gtk_button_clicked (GTK_BUTTON (button));