month-popover: Grab focus to New Event button at popup

This commit is contained in:
Hari Rana
2024-12-16 18:07:04 -03:00
parent 5ed9f469b0
commit 415903f584
+4
View File
@@ -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;
}