From 415903f5848363e70deec2e6ee75a9a2028eb941 Mon Sep 17 00:00:00 2001 From: Hari Rana Date: Sun, 11 Aug 2024 21:56:18 -0400 Subject: [PATCH] month-popover: Grab focus to New Event button at popup --- src/gui/views/gcal-month-popover.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/views/gcal-month-popover.c b/src/gui/views/gcal-month-popover.c index 67153a40..d6cf3b3f 100644 --- a/src/gui/views/gcal-month-popover.c +++ b/src/gui/views/gcal-month-popover.c @@ -36,6 +36,7 @@ struct _GcalMonthPopover GtkLabel *day_label; GtkListBox *listbox; GtkWidget *main_box; + GtkButton *new_event_button; GcalContext *context; @@ -393,6 +394,7 @@ gcal_month_popover_class_init (GcalMonthPopoverClass *klass) gtk_widget_class_bind_template_child (widget_class, GcalMonthPopover, day_label); gtk_widget_class_bind_template_child (widget_class, GcalMonthPopover, listbox); gtk_widget_class_bind_template_child (widget_class, GcalMonthPopover, main_box); + gtk_widget_class_bind_template_child (widget_class, GcalMonthPopover, new_event_button); gtk_widget_class_set_css_name (widget_class, "monthpopover"); } @@ -433,6 +435,8 @@ gcal_month_popover_popup (GcalMonthPopover *self) update_event_list (self); + gtk_widget_grab_focus (GTK_WIDGET (self->new_event_button)); + GCAL_EXIT; }