From ac3ebe71041af17f99a5cce3433c4533622396ef Mon Sep 17 00:00:00 2001 From: raveit65 Date: Wed, 22 Jul 2015 15:32:18 +0200 Subject: GTK3: replace deprecated gtk_widget_size_request --- src/themes/standard/theme.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/themes/standard') diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c index 9a69e61..52a6474 100644 --- a/src/themes/standard/theme.c +++ b/src/themes/standard/theme.c @@ -882,13 +882,21 @@ void set_notification_text(GtkWindow* nw, const char* summary, const char* body) if (body != NULL && *body != '\0') { +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_get_preferred_size (windata->iconbox, NULL, &req); +#else gtk_widget_size_request(windata->iconbox, &req); +#endif /* -1: border width for * -6: spacing for hbox */ gtk_widget_set_size_request(windata->body_label, WIDTH - (1 * 2) - (10 * 2) - req.width - 6, -1); } - gtk_widget_size_request(windata->close_button, &req); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_get_preferred_size (windata->close_button, NULL, &req); +#else + gtk_widget_size_request(windata->close_button, &req); +#endif /* -1: main_vbox border width * -10: vbox border width * -6: spacing for hbox */ -- cgit v1.2.1