[planner: 20/32] Port away from deprecated gtk_widget_size_request




commit a49e7e8d584700cdef97d9439f7042c68c339b57
Author: Mart Raudsepp <leio gentoo org>
Date:   Mon May 31 13:29:46 2021 +0300

    Port away from deprecated gtk_widget_size_request

 src/planner-gantt-view.c   | 2 +-
 src/planner-popup-button.c | 2 +-
 src/planner-popup-entry.c  | 2 +-
 src/planner-usage-view.c   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/planner-gantt-view.c b/src/planner-gantt-view.c
index 927489a3..ed18710c 100644
--- a/src/planner-gantt-view.c
+++ b/src/planner-gantt-view.c
@@ -961,7 +961,7 @@ gantt_view_update_row_height (PlannerGanttView *view)
        for (l = cols; l; l = l->next) {
                col = l->data;
 
-               gtk_widget_size_request (gtk_tree_view_column_get_button (col), &req);
+               gtk_widget_get_preferred_size (gtk_tree_view_column_get_button (col), &req, NULL);
                header_height = MAX (header_height, req.height);
 
                gtk_tree_view_column_cell_get_size (col,
diff --git a/src/planner-popup-button.c b/src/planner-popup-button.c
index f589fea4..80ec38a1 100644
--- a/src/planner-popup-button.c
+++ b/src/planner-popup-button.c
@@ -211,7 +211,7 @@ popup_button_position (PlannerPopupButton *button,
        *y += allocation.height;
        *x += allocation.width;
 
-       gtk_widget_size_request (priv->popup_widget, &popup_req);
+       gtk_widget_get_preferred_size (priv->popup_widget, &popup_req, NULL);
 
        *x -= popup_req.width;
 
diff --git a/src/planner-popup-entry.c b/src/planner-popup-entry.c
index 2d70df0c..da5b0baf 100644
--- a/src/planner-popup-entry.c
+++ b/src/planner-popup-entry.c
@@ -253,7 +253,7 @@ planner_popup_get_button_width (void)
        gtk_window_move (GTK_WINDOW (window), -500, -500);
        gtk_widget_show (window);
 
-       gtk_widget_size_request (window, &req);
+       gtk_widget_get_preferred_size (window, &req, NULL);
 
        width = req.width;
 
diff --git a/src/planner-usage-view.c b/src/planner-usage-view.c
index 7cf70d26..899ac2f4 100644
--- a/src/planner-usage-view.c
+++ b/src/planner-usage-view.c
@@ -537,7 +537,7 @@ usage_view_update_row_and_header_height (PlannerView *view)
        for (l = cols; l; l = l->next) {
                col = l->data;
 
-               gtk_widget_size_request (gtk_tree_view_column_get_button (col), &req);
+               gtk_widget_get_preferred_size (gtk_tree_view_column_get_button (col), &req, NULL);
                header_height = MAX (header_height, req.height);
 
                gtk_tree_view_column_cell_get_size (col,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]