diff src/ui_misc.c @ 448:a73cc0fa14d0

Use explicit names for mouse buttons instead of numbers. MOUSE_BUTTON_LEFT = 1 MOUSE_BUTTON_MIDDLE = 2 MOUSE_BUTTON_RIGHT = 3 It makes the code easier to read.
author zas_
date Sun, 20 Apr 2008 21:30:36 +0000
parents 4b2d7f9af171
children 48c8e49b571c
line wrap: on
line diff
--- a/src/ui_misc.c	Sun Apr 20 20:35:26 2008 +0000
+++ b/src/ui_misc.c	Sun Apr 20 21:30:36 2008 +0000
@@ -21,6 +21,7 @@
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
+#include "main.h"
 #include "ui_misc.h"
 
 #include "ui_bookmark.h"
@@ -1249,7 +1250,7 @@
 {
 	SizerData *sd = data;
 
-	if (bevent->button != 1) return FALSE;
+	if (bevent->button != MOUSE_BUTTON_LEFT) return FALSE;
 
 	sd->in_drag = TRUE;
 	sd->press_x = bevent->x_root;
@@ -1270,7 +1271,7 @@
 {
 	SizerData *sd = data;
 
-	if (bevent->button != 1) return FALSE;
+	if (bevent->button != MOUSE_BUTTON_LEFT) return FALSE;
 
 	if (gdk_pointer_is_grabbed() && GTK_WIDGET_HAS_GRAB(sd->sizer))
 		{