Merge branch 'safety-dialog-focus' into 'main'
Fix focus in safety dialog See merge request World/bazaar!1987
This commit is contained in:
commit
2b51cf4d26
2 changed files with 18 additions and 0 deletions
|
|
@ -208,6 +208,16 @@ on_dialog_map (BzSafetyDialog *self)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_height_animation_done (AdwAnimation *animation,
|
||||
gpointer user_data)
|
||||
{
|
||||
BzSafetyDialog *self = BZ_SAFETY_DIALOG (user_data);
|
||||
|
||||
gtk_widget_child_focus (gtk_widget_get_last_child (GTK_WIDGET (self->carousel)),
|
||||
GTK_DIR_TAB_FORWARD);
|
||||
}
|
||||
|
||||
static void
|
||||
next_page (BzSafetyDialog *self,
|
||||
GtkButton *button)
|
||||
|
|
@ -222,6 +232,11 @@ next_page (BzSafetyDialog *self,
|
|||
|
||||
adw_carousel_scroll_to (self->carousel, page, TRUE);
|
||||
animate_to_page (self, 1);
|
||||
|
||||
if (self->height_animation != NULL)
|
||||
g_signal_connect_object (self->height_animation, "done",
|
||||
G_CALLBACK (on_height_animation_done), self,
|
||||
G_CONNECT_DEFAULT);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
|
|
@ -347,6 +347,9 @@ action_escape (GtkWidget *widget,
|
|||
GListModel *stack = NULL;
|
||||
guint n_pages = 0;
|
||||
|
||||
if (adw_application_window_get_visible_dialog (ADW_APPLICATION_WINDOW (self)) != NULL)
|
||||
return;
|
||||
|
||||
if (self->screenshot_page != NULL)
|
||||
{
|
||||
if (!bz_screenshot_page_is_closing (self->screenshot_page))
|
||||
|
|
|
|||
Loading…
Reference in a new issue