summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-11-05 14:45:05 +0100
committerWolfgang Ulbrich <[email protected]>2015-11-05 14:45:05 +0100
commitfed38d6cf6f8141a8639723c6c5ccd5267fc5cc6 (patch)
treebab8326ed086fbc33b0959e9569d225fdcc2a4a9
parent743dcd2ce95eb00c4713588338eba4feb0ae2e9f (diff)
downloadmate-notification-daemon-fed38d6cf6f8141a8639723c6c5ccd5267fc5cc6.tar.bz2
mate-notification-daemon-fed38d6cf6f8141a8639723c6c5ccd5267fc5cc6.tar.xz
GTK3 themes: fix deprecated usage of GTK_STOCK_CLOSE
taken from: https://git.gnome.org/browse/notification-daemon/commit/?id=9d38817
-rw-r--r--src/themes/nodoka/nodoka-theme.c4
-rw-r--r--src/themes/slider/theme.c4
-rw-r--r--src/themes/standard/theme.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/themes/nodoka/nodoka-theme.c b/src/themes/nodoka/nodoka-theme.c
index 2adea4d..6276ad8 100644
--- a/src/themes/nodoka/nodoka-theme.c
+++ b/src/themes/nodoka/nodoka-theme.c
@@ -943,7 +943,11 @@ create_notification(UrlClickedCb url_clicked)
atk_object_set_name(atkobj, "");
atk_object_set_description(atkobj, "Closes the notification.");
+#if GTK_CHECK_VERSION (3, 10, 0)
+ image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_MENU);
+#else
image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
+#endif
gtk_widget_show(image);
gtk_container_add(GTK_CONTAINER(close_button), image);
diff --git a/src/themes/slider/theme.c b/src/themes/slider/theme.c
index f8cf40c..f0a1d81 100644
--- a/src/themes/slider/theme.c
+++ b/src/themes/slider/theme.c
@@ -723,7 +723,11 @@ GtkWindow* create_notification(UrlClickedCb url_clicked)
atk_object_set_name(atkobj, "");
atk_object_set_description(atkobj, "Closes the notification.");
+#if GTK_CHECK_VERSION (3, 10, 0)
+ image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_MENU);
+#else
image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
+#endif
gtk_widget_show(image);
gtk_container_add(GTK_CONTAINER(close_button), image);
diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c
index 36b947d..feabb71 100644
--- a/src/themes/standard/theme.c
+++ b/src/themes/standard/theme.c
@@ -779,7 +779,11 @@ GtkWindow* create_notification(UrlClickedCb url_clicked)
atk_object_set_name(atkobj, "");
atk_object_set_description(atkobj, "Closes the notification.");
+#if GTK_CHECK_VERSION (3, 10, 0)
+ image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_MENU);
+#else
image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
+#endif
gtk_widget_show(image);
gtk_container_add(GTK_CONTAINER(close_button), image);