changeset 4803:6f04901ef729

[gaim-migrate @ 5123] Fixed the arrow buttons on the conversation notebook. Also fixed other possible minor bugs. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 17 Mar 2003 01:57:37 +0000
parents 5b24e8e52e4a
children 9810ce8e7a96
files src/gtkconv.c
diffstat 1 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Sun Mar 16 22:34:43 2003 +0000
+++ b/src/gtkconv.c	Mon Mar 17 01:57:37 2003 +0000
@@ -316,9 +316,9 @@
 	struct gaim_conversation *conv;
 	struct gaim_gtk_conversation *gtkconv;
 
-	conv    = gaim_window_get_active_conversation(win);
-
-	if(!conv)
+	conv = gaim_window_get_active_conversation(win);
+
+	if (!conv)
 		return;
 
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
@@ -1313,9 +1313,11 @@
 
 	/* Grab the pointer */
 	gtk_grab_add(gtkwin->notebook);
-	gdk_pointer_grab(gtkwin->notebook->window, FALSE,
-					 GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
-					 NULL, cursor, GDK_CURRENT_TIME);
+
+	if (!gdk_pointer_is_grabbed())
+		gdk_pointer_grab(gtkwin->notebook->window, FALSE,
+						 GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
+						 NULL, cursor, GDK_CURRENT_TIME);
 }
 
 static gboolean
@@ -1495,8 +1497,8 @@
 
 	if (gtkwin->in_drag) {
 		debug_printf("Already in the middle of a window "
-				"drag at tab_press_cb\n");
-		return FALSE;
+					 "drag at tab_press_cb\n");
+		return TRUE;
 	}
 
 	/* 
@@ -1590,9 +1592,8 @@
 
 	gtkwin = GAIM_GTK_WINDOW(win);
 
-	if (!gtkwin->in_predrag && !gtkwin->in_drag) {
-		return TRUE;
-	}
+	if (!gtkwin->in_predrag && !gtkwin->in_drag)
+		return FALSE;
 
 	/* Disconnect the motion signal. */
 	if (gtkwin->drag_motion_signal) {
@@ -1619,9 +1620,8 @@
 
 	/* If we're not in drag...        */
 	/* We're perfectly normal people! */
-	if (!gtkwin->in_drag) {
+	if (!gtkwin->in_drag)
 		return FALSE;
-	}
 
 	gtkwin->in_drag = FALSE;