[libadwaita/wip/exalm/tabs: 2/3] tab-view: Don't beep when using shortcuts with a single tab
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/tabs: 2/3] tab-view: Don't beep when using shortcuts with a single tab
- Date: Thu, 21 Jul 2022 01:31:19 +0000 (UTC)
commit 89e154e364cdad431c008f818779fd194965d872
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Jul 21 05:29:08 2022 +0400
tab-view: Don't beep when using shortcuts with a single tab
Currently we propagate those shortcuts, but _still_ beep. That's not great.
src/adw-tab-view.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/adw-tab-view.c b/src/adw-tab-view.c
index 367e7450..525a0283 100644
--- a/src/adw-tab-view.c
+++ b/src/adw-tab-view.c
@@ -1014,6 +1014,9 @@ select_page_cb (GtkWidget *widget,
if (!adw_tab_view_get_selected_page (self))
return GDK_EVENT_PROPAGATE;
+ if (self->n_pages <= 1)
+ return GDK_EVENT_PROPAGATE;
+
g_variant_get (args, "(hhbb)", &mask, &direction, &last, &loop);
if (!(self->shortcuts & mask))
@@ -1091,6 +1094,9 @@ reorder_page_cb (GtkWidget *widget,
if (!page)
return GDK_EVENT_PROPAGATE;
+ if (self->n_pages <= 1)
+ return GDK_EVENT_PROPAGATE;
+
g_variant_get (args, "(hhb)", &mask, &direction, &last);
if (!(self->shortcuts & mask))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]