From 997e59ac61d0565f2aad340408f20e183bba5846 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 19 May 2015 16:51:23 +0200 Subject: [PATCH] Gtk+3: Replace deprecated gtk_cell_renderer_get_size with gtk_cell_renderer_get_preferred_width --- src/ui/gui/psppire-data-sheet.c | 5 +++-- src/ui/gui/psppire-var-sheet.c | 5 +++-- src/ui/gui/text-data-import-dialog.c | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ui/gui/psppire-data-sheet.c b/src/ui/gui/psppire-data-sheet.c index c7cced23af..183c268764 100644 --- a/src/ui/gui/psppire-data-sheet.c +++ b/src/ui/gui/psppire-data-sheet.c @@ -291,8 +291,9 @@ get_string_width (PsppSheetView *treeview, GtkCellRenderer *renderer, { gint width; g_object_set (G_OBJECT (renderer), "text", string, (void *) NULL); - gtk_cell_renderer_get_size (renderer, GTK_WIDGET (treeview), - NULL, NULL, NULL, &width, NULL); + gtk_cell_renderer_get_preferred_width (renderer, GTK_WIDGET (treeview), + NULL, &width); + return width; } diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index a06db0b7cd..53e5f459e8 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -588,8 +588,9 @@ get_string_width (PsppSheetView *treeview, GtkCellRenderer *renderer, g_object_set (G_OBJECT (renderer), PSPPIRE_IS_CELL_RENDERER_BUTTON (renderer) ? "label" : "text", string, (void *) NULL); - gtk_cell_renderer_get_size (renderer, GTK_WIDGET (treeview), - NULL, NULL, NULL, &width, NULL); + + gtk_cell_renderer_get_preferred_width (renderer, GTK_WIDGET (treeview), NULL, &width); + return width; } diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index cfdbd62811..9a8dc7e2d3 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -575,8 +575,8 @@ get_string_width (PsppSheetView *treeview, GtkCellRenderer *renderer, { gint width; g_object_set (G_OBJECT (renderer), "text", string, (void *) NULL); - gtk_cell_renderer_get_size (renderer, GTK_WIDGET (treeview), - NULL, NULL, NULL, &width, NULL); + gtk_cell_renderer_get_preferred_width (renderer, GTK_WIDGET (treeview), + NULL, &width); return width; } -- 2.30.2