From d0fb24bf6b07ddb5806c3424f27e6d63a0c4fd53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Sun, 21 Nov 2021 21:12:24 +0100 Subject: [PATCH] Use GDK button constants --- fastiv-browser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastiv-browser.c b/fastiv-browser.c index 955f6a1..5411989 100644 --- a/fastiv-browser.c +++ b/fastiv-browser.c @@ -614,7 +614,7 @@ fastiv_browser_button_press_event(GtkWidget *widget, GdkEventButton *event) FastivBrowser *self = FASTIV_BROWSER(widget); if (event->type != GDK_BUTTON_PRESS || event->state != 0) return FALSE; - if (event->button == 1) + if (event->button == GDK_BUTTON_PRIMARY) gtk_widget_grab_focus(widget); const Entry *entry = entry_at(self, event->x, event->y); @@ -622,11 +622,11 @@ fastiv_browser_button_press_event(GtkWidget *widget, GdkEventButton *event) return FALSE; switch (event->button) { - case 1: + case GDK_BUTTON_PRIMARY: g_signal_emit(widget, browser_signals[ITEM_ACTIVATED], 0, entry->filename, GTK_PLACES_OPEN_NORMAL); return TRUE; - case 2: + case GDK_BUTTON_MIDDLE: g_signal_emit(widget, browser_signals[ITEM_ACTIVATED], 0, entry->filename, GTK_PLACES_OPEN_NEW_WINDOW); return TRUE;