pidgin: c10aded8: The left/right scroll, and close buttons..

qulogic at pidgin.im qulogic at pidgin.im
Sat Nov 27 03:46:12 EST 2010


----------------------------------------------------------------------
Revision: c10aded8a9d9668a087b1d011a92161f1684c0fd
Parent:   3aed0cc8ca0bf1d5c7b132bf4081d51d72a78546
Author:   qulogic at pidgin.im
Date:     11/27/10 02:11:48
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/c10aded8a9d9668a087b1d011a92161f1684c0fd

Changelog: 

The left/right scroll, and close buttons in a PidginScrollBook should
only react to single button presses. This addresses an issue I saw in
the minidialog where "extra" authorization requests were closed if I
clicked them too fast.

Changes against parent 3aed0cc8ca0bf1d5c7b132bf4081d51d72a78546

  patched  pidgin/gtkscrollbook.c

-------------- next part --------------
============================================================
--- pidgin/gtkscrollbook.c	3ae843a1563e6d9278b7014206d75054f38d3af2
+++ pidgin/gtkscrollbook.c	f6d476c69c02736cb622870a8531a05204d8c4ad
@@ -65,9 +65,13 @@ static gboolean
 }
 
 static gboolean
-scroll_left_cb(PidginScrollBook *scroll_book)
+scroll_left_cb(PidginScrollBook *scroll_book, GdkEventButton *event)
 {
 	int index;
+
+	if (event->type != GDK_BUTTON_PRESS)
+		return FALSE;
+
 	index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook));
 
 	if (index > 0)
@@ -76,9 +80,13 @@ static gboolean
 }
 
 static gboolean
-scroll_right_cb(PidginScrollBook *scroll_book)
+scroll_right_cb(PidginScrollBook *scroll_book, GdkEventButton *event)
 {
 	int index, count;
+
+	if (event->type != GDK_BUTTON_PRESS)
+		return FALSE;
+
 	index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook));
 	count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook));
 
@@ -131,9 +139,10 @@ static gboolean
 }
 
 static gboolean
-scroll_close_cb(PidginScrollBook *scroll_book)
+scroll_close_cb(PidginScrollBook *scroll_book, GdkEventButton *event)
 {
-	gtk_widget_destroy(gtk_notebook_get_nth_page(GTK_NOTEBOOK(scroll_book->notebook), gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook))));
+	if (event->type == GDK_BUTTON_PRESS)	
+		gtk_widget_destroy(gtk_notebook_get_nth_page(GTK_NOTEBOOK(scroll_book->notebook), gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook))));
 	return FALSE;
 }
 


More information about the Commits mailing list