Index: gtk/gtkscalebutton.c
===================================================================
--- gtk/gtkscalebutton.c	(revision 18847)
+++ gtk/gtkscalebutton.c	(working copy)
@@ -78,7 +78,8 @@
   PROP_VALUE,
   PROP_SIZE,
   PROP_ADJUSTMENT,
-  PROP_ICONS
+  PROP_ICONS,
+  PROP_POPUP_VISIBLE
 };
 
 #define GET_PRIVATE(obj)        (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_SCALE_BUTTON, GtkScaleButtonPrivate))
@@ -202,6 +203,14 @@
                                                         GTK_TYPE_ADJUSTMENT,
                                                         GTK_PARAM_READWRITE));
 
+  g_object_class_install_property (gobject_class,
+				   PROP_POPUP_VISIBLE,
+				   g_param_spec_boolean ("popup-visible",
+							 P_("Popup visible"),
+							 P_("Whether the popup scale is visible"),
+							 FALSE,
+							 GTK_PARAM_READWRITE));
+
   /**
    * GtkScaleButton:icons:
    *
@@ -316,6 +325,7 @@
   button->priv = priv = GET_PRIVATE (button);
 
   priv->timeout = FALSE;
+  priv->pop_time = 0;
   priv->click_id = 0;
   priv->click_timeout = CLICK_TIMEOUT;
 
@@ -411,6 +421,12 @@
       gtk_scale_button_set_icons (button, 
                                   (const gchar **)g_value_get_boxed (value));
       break;
+    case PROP_POPUP_VISIBLE:
+      if (g_value_get_boolean (value))
+        gtk_scale_button_popup_from_bindings (GTK_WIDGET (button));
+      else
+        gtk_scale_button_popdown_from_bindings (GTK_WIDGET (button));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -443,6 +459,9 @@
     case PROP_ICONS:
       g_value_set_boxed (value, priv->icon_list);
       break;
+    case PROP_POPUP_VISIBLE:
+      g_value_set_boolean (value, priv->pop_time != 0);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -836,6 +855,8 @@
 
   priv->pop_time = time;
 
+  g_object_notify (G_OBJECT (button), "popup-visible");
+
   return TRUE;
 }
 
@@ -888,6 +909,9 @@
   /* hide again */
   gtk_widget_hide (priv->dock);
   priv->timeout = FALSE;
+  priv->pop_time = 0;
+
+  g_object_notify (G_OBJECT (button), "popup-visible");
 }
 
 /*
@@ -1028,6 +1052,7 @@
   /* hide again */
   gtk_widget_hide (priv->dock);
   priv->timeout = FALSE;
+  priv->pop_time = 0;
 
   e = (GdkEventButton *) gdk_event_copy ((GdkEvent *) event);
   e->window = GTK_WIDGET (button)->window;
@@ -1035,6 +1060,8 @@
   gtk_widget_event (GTK_WIDGET (button), (GdkEvent *) e);
   e->window = event->window;
   gdk_event_free ((GdkEvent *) e);
+
+  g_object_notify (G_OBJECT (button), "popup-visible");
 }
 
 static gboolean
@@ -1072,6 +1099,9 @@
   /* hide again */
   gtk_widget_hide (priv->dock);
   priv->timeout = FALSE;
+  priv->pop_time = 0;
+
+  g_object_notify (G_OBJECT (button), "popup-visible");
 }
 
 static gboolean
@@ -1203,7 +1233,6 @@
       /* if we did a quick click, leave the window open; else, hide it */
       if (event->time > priv->pop_time + priv->click_timeout)
         {
-
 	  gtk_scale_button_release_grab (scale->button, event);
 	  widget_class->button_release_event (widget, event);
 
@@ -1211,6 +1240,7 @@
 	}
 
       priv->timeout = FALSE;
+      priv->pop_time = 0;
     }
 
   res = widget_class->button_release_event (widget, event);
Index: tests/testvolumebutton.c
===================================================================
--- tests/testvolumebutton.c	(revision 18847)
+++ tests/testvolumebutton.c	(working copy)
@@ -28,6 +28,17 @@
 }
 
 static void
+popup_visible_changed (GObject *gobject,
+		       GParamSpec *arg1,
+		       gpointer user_data)
+{
+	gboolean is_popped;
+
+	g_object_get (gobject, "popup-visible", &is_popped, NULL);
+	g_message ("popup-visible is now: %s", is_popped ? "TRUE" : "FALSE");
+}
+
+static void
 response_cb (GtkDialog *dialog,
 	     gint       arg1,
 	     gpointer   user_data)
@@ -68,6 +79,9 @@
 	g_signal_connect (G_OBJECT (button),
 			  "value-changed",
 			  G_CALLBACK (value_changed), NULL);
+	g_signal_connect (G_OBJECT (button),
+			  "notify::popup-visible",
+			  G_CALLBACK (popup_visible_changed), NULL);
 	gtk_container_add (GTK_CONTAINER (window), button);
 
 	gtk_widget_show_all (window);
Index: examples/tree/tree.c
===================================================================
--- examples/tree/tree.c	(revision 18847)
+++ examples/tree/tree.c	(working copy)
@@ -1,6 +1,5 @@
 
 #define GTK_ENABLE_BROKEN
-#include <config.h>
 #include <gtk/gtk.h>
 
 /* for all the GtkItem:: and GtkTreeItem:: signals */
