mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
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>
This commit is contained in:
parent
33ff2defe4
commit
bc2cb5e15b
1 changed files with 16 additions and 16 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue