Mercurial > geeqie
diff src/pan-view.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 | ddabc4873a3f |
children | 115db540bd0c |
line wrap: on
line diff
--- a/src/pan-view.c Sun Apr 20 20:35:26 2008 +0000 +++ b/src/pan-view.c Sun Apr 20 21:30:36 2008 +0000 @@ -2026,7 +2026,7 @@ } pi = pan_item_find_by_coord(pw, PAN_ITEM_BOX, rx, ry, "info"); - if (pi && event->button == 1) + if (pi && event->button == MOUSE_BUTTON_LEFT) { pan_info_update(pw, NULL); return; @@ -2037,7 +2037,7 @@ switch (event->button) { - case 1: + case MOUSE_BUTTON_LEFT: pan_info_update(pw, pi); if (!pi && pw->layout == PAN_LAYOUT_CALENDAR) @@ -2046,9 +2046,9 @@ pan_calendar_update(pw, pi); } break; - case 2: + case MOUSE_BUTTON_MIDDLE: break; - case 3: + case MOUSE_BUTTON_RIGHT: pan_info_update(pw, pi); menu = pan_popup_menu(pw); gtk_menu_popup (GTK_MENU(menu), NULL, NULL, NULL, NULL, 3, event->time);