[gimp/gimp-2-8] Bug 688305 - drag and drop for guides broken if 'gtk-enable-tooltips = 0' is set
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 688305 - drag and drop for guides broken if 'gtk-enable-tooltips = 0' is set
- Date: Sun, 18 Nov 2012 19:07:12 +0000 (UTC)
commit 43a1daa5e1ed71687de013499c79bab1edee999f
Author: Michael Natterer <mitch gimp org>
Date: Sun Nov 18 20:02:51 2012 +0100
Bug 688305 - drag and drop for guides broken if 'gtk-enable-tooltips = 0' is set
Fix GimpSpinScale too: add the needed events ourselves, and handle
motion hints (which the parent classes add) in motion().
(cherry picked from commit 85a099f988ef007348c905b2f8780e032735cdea)
app/widgets/gimpspinscale.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpspinscale.c b/app/widgets/gimpspinscale.c
index 5c2aded..3ae89f7 100644
--- a/app/widgets/gimpspinscale.c
+++ b/app/widgets/gimpspinscale.c
@@ -134,6 +134,13 @@ gimp_spin_scale_class_init (GimpSpinScaleClass *klass)
static void
gimp_spin_scale_init (GimpSpinScale *scale)
{
+ gtk_widget_add_events (GTK_WIDGET (scale),
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_POINTER_MOTION_MASK |
+ GDK_BUTTON1_MOTION_MASK |
+ GDK_LEAVE_NOTIFY_MASK);
+
gtk_entry_set_alignment (GTK_ENTRY (scale), 1.0);
gtk_entry_set_has_frame (GTK_ENTRY (scale), FALSE);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale), TRUE);
@@ -531,6 +538,8 @@ gimp_spin_scale_motion_notify (GtkWidget *widget,
{
GimpSpinScalePrivate *private = GET_PRIVATE (widget);
+ gdk_event_request_motions (event);
+
if (private->changing_value)
{
gimp_spin_scale_change_value (widget, event->x);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]