aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-21 21:12:24 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-21 21:22:14 +0100
commitd0fb24bf6b07ddb5806c3424f27e6d63a0c4fd53 (patch)
treec17c23e797cc4960e595a821d94dba3f428a0eb3
parent2571bf15a90462defc5ebc8be05d3f8c5bbf8d43 (diff)
downloadfiv-d0fb24bf6b07ddb5806c3424f27e6d63a0c4fd53.tar.gz
fiv-d0fb24bf6b07ddb5806c3424f27e6d63a0c4fd53.tar.xz
fiv-d0fb24bf6b07ddb5806c3424f27e6d63a0c4fd53.zip
Use GDK button constants
-rw-r--r--fastiv-browser.c6
1 files 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;