summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-11-19 14:56:38 +0100
committerWolfgang Ulbrich <[email protected]>2015-12-01 23:13:02 +0100
commitf2c09bf97244ffb387b9a1731767741aee9fad93 (patch)
treea8b7d37a2979563cf8d38ecb3adac3622d6f4f03
parenta08bd0ed2f0959255dc86f7976ec42d512e813b9 (diff)
downloadpluma-f2c09bf97244ffb387b9a1731767741aee9fad93.tar.bz2
pluma-f2c09bf97244ffb387b9a1731767741aee9fad93.tar.xz
Gtk+-3.10: don't use deprecated GTK_STOCK_DIALOG_WARNING/ERROR
-rwxr-xr-xpluma/dialogs/pluma-close-confirmation-dialog.c10
-rw-r--r--pluma/pluma-statusbar.c4
2 files changed, 14 insertions, 0 deletions
diff --git a/pluma/dialogs/pluma-close-confirmation-dialog.c b/pluma/dialogs/pluma-close-confirmation-dialog.c
index 0aee5b6c..45d97713 100755
--- a/pluma/dialogs/pluma-close-confirmation-dialog.c
+++ b/pluma/dialogs/pluma-close-confirmation-dialog.c
@@ -502,8 +502,13 @@ build_single_doc_dialog (PlumaCloseConfirmationDialog *dlg)
doc = PLUMA_DOCUMENT (dlg->priv->unsaved_documents->data);
/* Image */
+#if GTK_CHECK_VERSION (3, 10, 0)
+ image = gtk_image_new_from_icon_name ("dialog-warning",
+ GTK_ICON_SIZE_DIALOG);
+#else
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_DIALOG);
+#endif
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
#else
@@ -699,8 +704,13 @@ build_multiple_docs_dialog (PlumaCloseConfirmationDialog *dlg)
hbox, TRUE, TRUE, 0);
/* Image */
+#if GTK_CHECK_VERSION (3, 10, 0)
+ image = gtk_image_new_from_icon_name ("dialog-warning",
+ GTK_ICON_SIZE_DIALOG);
+#else
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_DIALOG);
+#endif
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
#else
diff --git a/pluma/pluma-statusbar.c b/pluma/pluma-statusbar.c
index 7e1aa07d..7854fd8b 100644
--- a/pluma/pluma-statusbar.c
+++ b/pluma/pluma-statusbar.c
@@ -165,7 +165,11 @@ pluma_statusbar_init (PlumaStatusbar *statusbar)
statusbar->priv->error_frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (statusbar->priv->error_frame), GTK_SHADOW_IN);
+#if GTK_CHECK_VERSION (3, 10, 0)
+ error_image = gtk_image_new_from_icon_name ("dialog-error", GTK_ICON_SIZE_MENU);
+#else
error_image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_MENU);
+#endif
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_margin_start (error_image, 4);
gtk_widget_set_margin_end (error_image, 4);