summaryrefslogtreecommitdiff
path: root/src/themes
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2015-07-22 15:32:18 +0200
committerraveit65 <[email protected]>2015-07-22 15:32:18 +0200
commitac3ebe71041af17f99a5cce3433c4533622396ef (patch)
tree1ab550f22ead513c076c03c99dc66a78ade2115f /src/themes
parent3e222bb72fd8ee2b33a6a3b9e9ee0f0fed983959 (diff)
downloadmate-notification-daemon-ac3ebe71041af17f99a5cce3433c4533622396ef.tar.bz2
mate-notification-daemon-ac3ebe71041af17f99a5cce3433c4533622396ef.tar.xz
GTK3: replace deprecated gtk_widget_size_request
Diffstat (limited to 'src/themes')
-rw-r--r--src/themes/slider/theme.c4
-rw-r--r--src/themes/standard/theme.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/src/themes/slider/theme.c b/src/themes/slider/theme.c
index 16012a4..eb54509 100644
--- a/src/themes/slider/theme.c
+++ b/src/themes/slider/theme.c
@@ -807,7 +807,11 @@ void set_notification_text(GtkWindow* nw, const char* summary, const char* body)
update_content_hbox_visibility(windata);
+#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 */
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 */