From ea61efe679d59d3809ebeeef7a4869622c6cd4b5 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sun, 21 May 2023 15:11:23 +0200 Subject: [PATCH] app: remove gtk_container_set_focus_chain(), it's deprecated and our use cases were overengineering anyway. --- app/dialogs/print-size-dialog.c | 9 --------- app/dialogs/tips-dialog.c | 2 -- app/widgets/gimpmessagebox.c | 6 ------ app/widgets/gimptemplateeditor.c | 11 ----------- 4 files changed, 28 deletions(-) diff --git a/app/dialogs/print-size-dialog.c b/app/dialogs/print-size-dialog.c index 8d4417ae47..77d6868cc3 100644 --- a/app/dialogs/print-size-dialog.c +++ b/app/dialogs/print-size-dialog.c @@ -100,7 +100,6 @@ print_size_dialog_new (GimpImage *image, GtkWidget *hbox; GtkWidget *chain; GtkAdjustment *adj; - GList *focus_chain = NULL; g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL); @@ -277,14 +276,6 @@ print_size_dialog_new (GimpImage *image, private->chain = GIMP_CHAIN_BUTTON (chain); - focus_chain = g_list_prepend (focus_chain, gimp_size_entry_get_unit_combo (GIMP_SIZE_ENTRY (entry))); - focus_chain = g_list_prepend (focus_chain, chain); - focus_chain = g_list_prepend (focus_chain, height); - focus_chain = g_list_prepend (focus_chain, width); - - gtk_container_set_focus_chain (GTK_CONTAINER (entry), focus_chain); - g_list_free (focus_chain); - g_signal_connect (private->size_entry, "value-changed", G_CALLBACK (print_size_dialog_size_changed), private); diff --git a/app/dialogs/tips-dialog.c b/app/dialogs/tips-dialog.c index d24bb10072..26378560cc 100644 --- a/app/dialogs/tips-dialog.c +++ b/app/dialogs/tips-dialog.c @@ -175,8 +175,6 @@ tips_dialog_create (Gimp *gimp) gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); gtk_widget_show (image); - gtk_container_set_focus_chain (GTK_CONTAINER (hbox), NULL); - tip_label = gtk_label_new (NULL); gtk_label_set_selectable (GTK_LABEL (tip_label), TRUE); gtk_label_set_justify (GTK_LABEL (tip_label), GTK_JUSTIFY_LEFT); diff --git a/app/widgets/gimpmessagebox.c b/app/widgets/gimpmessagebox.c index 5142a39ae6..0cf129a1ba 100644 --- a/app/widgets/gimpmessagebox.c +++ b/app/widgets/gimpmessagebox.c @@ -136,12 +136,6 @@ gimp_message_box_init (GimpMessageBox *box) gtk_box_set_spacing (GTK_BOX (box), 12); gtk_container_set_border_width (GTK_CONTAINER (box), 12); - /* Unset the focus chain to keep the labels from being in the focus - * chain. Users of GimpMessageBox that add focusable widgets should - * either unset the focus chain or (better) explicitly set one. - */ - gtk_container_set_focus_chain (GTK_CONTAINER (box), NULL); - for (i = 0; i < 2; i++) { GtkWidget *label = g_object_new (GTK_TYPE_LABEL, diff --git a/app/widgets/gimptemplateeditor.c b/app/widgets/gimptemplateeditor.c index 3aa43eaf9a..1c25c3d7a7 100644 --- a/app/widgets/gimptemplateeditor.c +++ b/app/widgets/gimptemplateeditor.c @@ -173,7 +173,6 @@ gimp_template_editor_constructed (GObject *object) GtkWidget *text_view; GtkTextBuffer *text_buffer; GtkListStore *store; - GList *focus_chain = NULL; gchar *text; gint row; @@ -395,16 +394,6 @@ gimp_template_editor_constructed (GObject *object) private->resolution_se, private->chain_button, 1.0, 1.0); - focus_chain = g_list_prepend (focus_chain, - gimp_size_entry_get_unit_combo (GIMP_SIZE_ENTRY (private->resolution_se))); - focus_chain = g_list_prepend (focus_chain, private->chain_button); - focus_chain = g_list_prepend (focus_chain, yres); - focus_chain = g_list_prepend (focus_chain, xres); - - gtk_container_set_focus_chain (GTK_CONTAINER (private->resolution_se), - focus_chain); - g_list_free (focus_chain); - row = 2; combo = gimp_prop_enum_combo_box_new (G_OBJECT (template),