summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-08-03 18:25:15 +0200
committerraveit65 <[email protected]>2016-08-03 18:25:15 +0200
commit77c8138001b15c7f2a7f5e07eb43e49c5b21f91b (patch)
treee4189cc34336031ef0136cdcb3c18ae012c41c2f /mate-session
parentfef87863850cf75837aa8fcedad60b7698d8da81 (diff)
downloadmate-session-manager-77c8138001b15c7f2a7f5e07eb43e49c5b21f91b.tar.bz2
mate-session-manager-77c8138001b15c7f2a7f5e07eb43e49c5b21f91b.tar.xz
Fix Gtk-CRITICAL error caused by deprecated code
It removes the code related to the old dialog icon which is not displayed anymore. The Gtk-CRITICAL error was caused by gtk_message_dialog_get_image returning NULL as it is now deprecated in GTK 3. taken from: linuxmint/cinnamon-session#71
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/gsm-logout-dialog.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mate-session/gsm-logout-dialog.c b/mate-session/gsm-logout-dialog.c
index f53c197..3111437 100644
--- a/mate-session/gsm-logout-dialog.c
+++ b/mate-session/gsm-logout-dialog.c
@@ -441,7 +441,9 @@ gsm_get_dialog (GsmDialogLogoutType type,
guint32 activate_time)
{
GsmLogoutDialog *logout_dialog;
+#if !GTK_CHECK_VERSION (3, 0, 0)
GtkWidget *dialog_image;
+#endif
GtkWidget *hbox;
const char *primary_text;
const char *icon_name;
@@ -520,8 +522,9 @@ gsm_get_dialog (GsmDialogLogoutType type,
default:
g_assert_not_reached ();
}
-
+#if !GTK_CHECK_VERSION (3, 0, 0)
dialog_image = gtk_message_dialog_get_image (GTK_MESSAGE_DIALOG (logout_dialog));
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -539,8 +542,10 @@ gsm_get_dialog (GsmDialogLogoutType type,
gtk_widget_show_all (hbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (logout_dialog))), hbox);
+#if !GTK_CHECK_VERSION (3, 0, 0)
gtk_image_set_from_icon_name (GTK_IMAGE (dialog_image),
icon_name, GTK_ICON_SIZE_DIALOG);
+#endif
gtk_window_set_icon_name (GTK_WINDOW (logout_dialog), icon_name);
gtk_window_set_position (GTK_WINDOW (logout_dialog), GTK_WIN_POS_CENTER_ALWAYS);
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (logout_dialog), primary_text);