X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkscalebutton.c;h=f10bb0308d7787a2ad7e65667520ca9f2e177ff4;hb=HEAD;hp=c56b73e7ef84f92dc5f5bdadcbfe266815d04dbb;hpb=13e8bace970014bb8cc4fde38a81d1af359d9f14;p=~andy%2Fgtk diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c index c56b73e7e..f10bb0308 100644 --- a/gtk/gtkscalebutton.c +++ b/gtk/gtkscalebutton.c @@ -21,9 +21,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ /* @@ -35,6 +33,8 @@ #include "config.h" +#include "gtkscalebutton.h" + #ifndef _WIN32 #define _GNU_SOURCE #endif @@ -42,6 +42,7 @@ #include #include +#include "gtkadjustment.h" #include "gtkbindings.h" #include "gtkframe.h" #include "gtkmain.h" @@ -49,9 +50,8 @@ #include "gtkorientable.h" #include "gtkprivate.h" #include "gtkscale.h" -#include "gtkscalebutton.h" #include "gtkstock.h" -#include "gtkvbox.h" +#include "gtkbox.h" #include "gtkwindow.h" #include "gtktypebuiltins.h" #include "gtkintl.h" @@ -417,6 +417,8 @@ gtk_scale_button_init (GtkScaleButton *button) /* the scale */ priv->scale = gtk_scale_button_scale_new (button); gtk_container_add (GTK_CONTAINER (priv->box), priv->scale); + + gtk_widget_add_events (GTK_WIDGET (button), GDK_SCROLL_MASK); } static GObject * @@ -873,7 +875,7 @@ gtk_scale_button_screen_changed (GtkWidget *widget, GtkScaleButton *button = (GtkScaleButton *) widget; GtkScaleButtonPrivate *priv; GdkScreen *screen; - GValue value = { 0, }; + GValue value = G_VALUE_INIT; if (gtk_widget_has_screen (widget) == FALSE) return; @@ -985,7 +987,7 @@ gtk_scale_popup (GtkWidget *widget, monitor = gdk_screen_get_monitor_at_point (screen, button_event->x_root, button_event->y_root); - gdk_screen_get_monitor_geometry (screen, monitor, &rect); + gdk_screen_get_monitor_workarea (screen, monitor, &rect); if (priv->orientation == GTK_ORIENTATION_VERTICAL) y += button_event->y; @@ -1421,6 +1423,8 @@ static gboolean gtk_scale_button_scale_press (GtkWidget *widget, static gboolean gtk_scale_button_scale_release (GtkWidget *widget, GdkEventButton *event); +GType _gtk_scale_button_scale_get_type (void); + G_DEFINE_TYPE (GtkScaleButtonScale, _gtk_scale_button_scale, GTK_TYPE_SCALE) static void