diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2018-07-06 10:13:07 +0300 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2021-08-15 16:28:20 +0100 |
commit | e4fbaeff6d2e59a5ef963bf30be6f2dfeafa5c0c (patch) | |
tree | 57c812c722b477cf619a851101f64abc68691e16 | |
parent | a67b7e95437e3d63351df3def5220c78a94f778e (diff) | |
download | nautilus-e4fbaeff6d2e59a5ef963bf30be6f2dfeafa5c0c.tar.gz |
batch-rename-dialog: Don't use gtk_widget_get_preferred_height()
The functions for getting the width and height separately are gone
in GTK4. When not using them for height-for-width/width-for-height
measurements, they can be trivially replaced with get_preferred_size().
Rebased and ammended by António Fernandes <antoniof@gnome.org>
-rw-r--r-- | src/nautilus-batch-rename-dialog.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/nautilus-batch-rename-dialog.c b/src/nautilus-batch-rename-dialog.c index 84897eae3..b223f4e64 100644 --- a/src/nautilus-batch-rename-dialog.c +++ b/src/nautilus-batch-rename-dialog.c @@ -512,7 +512,7 @@ static void update_rows_height (NautilusBatchRenameDialog *dialog) { GList *l; - gint current_row_natural_height; + GtkRequisition current_row_natural_size; gint maximum_height; maximum_height = -1; @@ -520,37 +520,37 @@ update_rows_height (NautilusBatchRenameDialog *dialog) /* check if maximum height has changed */ for (l = dialog->listbox_labels_new; l != NULL; l = l->next) { - gtk_widget_get_preferred_height (GTK_WIDGET (l->data), - NULL, - ¤t_row_natural_height); + gtk_widget_get_preferred_size (GTK_WIDGET (l->data), + NULL, + ¤t_row_natural_size); - if (current_row_natural_height > maximum_height) + if (current_row_natural_size.height > maximum_height) { - maximum_height = current_row_natural_height; + maximum_height = current_row_natural_size.height; } } for (l = dialog->listbox_labels_old; l != NULL; l = l->next) { - gtk_widget_get_preferred_height (GTK_WIDGET (l->data), - NULL, - ¤t_row_natural_height); + gtk_widget_get_preferred_size (GTK_WIDGET (l->data), + NULL, + ¤t_row_natural_size); - if (current_row_natural_height > maximum_height) + if (current_row_natural_size.height > maximum_height) { - maximum_height = current_row_natural_height; + maximum_height = current_row_natural_size.height; } } for (l = dialog->listbox_icons; l != NULL; l = l->next) { - gtk_widget_get_preferred_height (GTK_WIDGET (l->data), - NULL, - ¤t_row_natural_height); + gtk_widget_get_preferred_size (GTK_WIDGET (l->data), + NULL, + ¤t_row_natural_size); - if (current_row_natural_height > maximum_height) + if (current_row_natural_size.height > maximum_height) { - maximum_height = current_row_natural_height; + maximum_height = current_row_natural_size.height; } } |