summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2006-06-20 11:48:21 +0000
committerCarlos Garnacho <carlosg@src.gnome.org>2006-06-20 11:48:21 +0000
commit1cd8afc8ada0064a22a6d57e5272e877fdf1a3ca (patch)
treeef1da23c75a93f2448253615491572da08415e1a
parent847d09cc9f0de72e8b24c41cf2f34de1a3a5a85f (diff)
downloadgdk-pixbuf-1cd8afc8ada0064a22a6d57e5272e877fdf1a3ca.tar.gz
unset the pressed button here. (gtk_notebook_grab_notify): stop reorder
2006-06-20 Carlos Garnacho <carlosg@gnome.org> * gtk/gtknotebook.c (gtk_notebook_stop_reorder): unset the pressed button here. (gtk_notebook_grab_notify): stop reorder when the widget becomes shadowed. Fixes bug #335873
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-2-107
-rw-r--r--gtk/gtknotebook.c16
3 files changed, 23 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3833cbc98..9d8ecb7b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-06-20 Carlos Garnacho <carlosg@gnome.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_stop_reorder): unset the pressed
+ button here.
+ (gtk_notebook_grab_notify): stop reorder when the widget becomes
+ shadowed. Fixes bug #335873
+
2006-06-18 Christian Persch <chpe@cvs.gnome.org>
* gtk/gtkdialog.c: (gtk_dialog_class_init): Set default action area
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 3833cbc98..9d8ecb7b7 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,10 @@
+2006-06-20 Carlos Garnacho <carlosg@gnome.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_stop_reorder): unset the pressed
+ button here.
+ (gtk_notebook_grab_notify): stop reorder when the widget becomes
+ shadowed. Fixes bug #335873
+
2006-06-18 Christian Persch <chpe@cvs.gnome.org>
* gtk/gtkdialog.c: (gtk_dialog_class_init): Set default action area
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 68a672ea8..a846aa29d 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2592,6 +2592,8 @@ gtk_notebook_stop_reorder (GtkNotebook *notebook)
if (!page)
return;
+ priv->pressed_button = -1;
+
if (page->reorderable || page->detachable)
{
if (!priv->during_detach)
@@ -2646,10 +2648,7 @@ gtk_notebook_button_release (GtkWidget *widget,
if (!priv->during_detach &&
page->reorderable &&
event->button == priv->pressed_button)
- {
- priv->pressed_button = -1;
- gtk_notebook_stop_reorder (notebook);
- }
+ gtk_notebook_stop_reorder (notebook);
if (event->button == notebook->button)
{
@@ -2834,7 +2833,6 @@ gtk_notebook_motion_notify (GtkWidget *widget,
if (!(event->state & GDK_BUTTON1_MASK) &&
priv->pressed_button != -1)
{
- priv->pressed_button = -1;
gtk_notebook_stop_reorder (notebook);
stop_scrolling (notebook);
}
@@ -2920,8 +2918,13 @@ static void
gtk_notebook_grab_notify (GtkWidget *widget,
gboolean was_grabbed)
{
+ GtkNotebook *notebook = GTK_NOTEBOOK (widget);
+
if (!was_grabbed)
- stop_scrolling (GTK_NOTEBOOK (widget));
+ {
+ gtk_notebook_stop_reorder (notebook);
+ stop_scrolling (notebook);
+ }
}
static void
@@ -3073,7 +3076,6 @@ gtk_notebook_drag_end (GtkWidget *widget,
{
GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (widget);
- priv->pressed_button = -1;
gtk_notebook_stop_reorder (GTK_NOTEBOOK (widget));
GTK_BIN (priv->dnd_window)->child = NULL;