This is an automated email from the git hooks/post-receive script.

gottcode pushed a 
commit to branch 
master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 591c7c3b08cd6f7741dfac6d87cd8f5ba8198018
Author: Graeme Gott <gra...@gottcode.org>
Date:   Sun Jan 26 08:32:14 2020 -0500

    Add icons to buttons of confirmation dialog.
---
 panel-plugin/command.cpp | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/panel-plugin/command.cpp b/panel-plugin/command.cpp
index a34c870..24cd206 100644
--- a/panel-plugin/command.cpp
+++ b/panel-plugin/command.cpp
@@ -242,17 +242,22 @@ bool Command::confirm()
        gtk_window_set_skip_taskbar_hint(window, true);
        gtk_window_set_title(window, m_text);
 
-       // Add icon
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-       GtkWidget* image = gtk_image_new_from_icon_name(m_icon, 
GTK_ICON_SIZE_DIALOG);
-       gtk_widget_show(image);
-       gtk_message_dialog_set_image(GTK_MESSAGE_DIALOG(dialog), image);
-G_GNUC_END_IGNORE_DEPRECATIONS
-
        // Create accept button
-       gtk_dialog_add_button(dialog, m_mnemonic, GTK_RESPONSE_ACCEPT);
+       GtkWidget* button = gtk_dialog_add_button(dialog, m_mnemonic, 
GTK_RESPONSE_ACCEPT);
+       GtkWidget* image = gtk_image_new_from_icon_name(m_icon, 
GTK_ICON_SIZE_DIALOG);
+       gtk_button_set_image(GTK_BUTTON(button), image);
+       gtk_button_set_image_position(GTK_BUTTON(button), GTK_POS_TOP);
        gtk_dialog_set_default_response(dialog, GTK_RESPONSE_ACCEPT);
 
+       // Add icon to cancel button
+       button = gtk_dialog_get_widget_for_response(dialog, 
GTK_RESPONSE_CANCEL);
+       if (GTK_IS_BUTTON(button))
+       {
+               image = gtk_image_new_from_icon_name("gtk-cancel", 
GTK_ICON_SIZE_DIALOG);
+               gtk_button_set_image(GTK_BUTTON(button), image);
+               gtk_button_set_image_position(GTK_BUTTON(button), GTK_POS_TOP);
+       }
+
        // Run dialog
        m_timeout_details.time_left = 60;
        guint timeout_id = g_timeout_add(1000, &Command::confirm_countdown, 
&m_timeout_details);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to