Skip to content
Permalink
Browse files

avoid deprecated GtkButton:use-stock

  • Loading branch information...
sc0w authored and raveit65 committed Feb 16, 2018
1 parent 12e54c4 commit 1d82cc7c517fd84e6428ebb7ef29583240176af9
@@ -1140,9 +1140,7 @@ on_confirm_no_trash_cb (PlumaFileBrowserWidget * widget,
result = pluma_file_browser_utils_confirmation_dialog (window,
GTK_MESSAGE_QUESTION,
message,
secondary,
"gtk-delete",
NULL);
secondary);
g_free (secondary);

return result;
@@ -1175,9 +1173,7 @@ on_confirm_delete_cb (PlumaFileBrowserWidget *widget,
result = pluma_file_browser_utils_confirmation_dialog (PLUMA_WINDOW (data->window),
GTK_MESSAGE_QUESTION,
message,
secondary,
"gtk-delete",
NULL);
secondary);

g_free (message);

@@ -22,6 +22,9 @@
#include "pluma-file-browser-utils.h"
#include <pluma/pluma-utils.h>

#include <glib/gi18n.h>


static GdkPixbuf *
process_icon_pixbuf (GdkPixbuf * pixbuf,
gchar const * name,
@@ -148,9 +151,7 @@ gboolean
pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
GtkMessageType type,
gchar const *message,
gchar const *secondary,
gchar const * button_image,
gchar const * button_label)
gchar const *secondary)
{
GtkWidget *dlg;
gint ret;
@@ -167,11 +168,8 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
(GTK_MESSAGE_DIALOG (dlg), "%s", secondary);

/* Add a cancel button */
button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
"label", "gtk-cancel",
"use-stock", TRUE,
"use-underline", TRUE,
NULL));
button = gtk_button_new_with_mnemonic (_("_Cancel"));
gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_BUTTON));

gtk_widget_show (button);

@@ -180,16 +178,9 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
button,
GTK_RESPONSE_CANCEL);

/* Add custom button */
button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
"label", button_image,
"use-stock", TRUE,
"use-underline", TRUE,
NULL));

if (button_label) {
gtk_button_set_label (GTK_BUTTON (button), button_label);
}
/* Add delete button */
button = gtk_button_new_with_mnemonic (_("_Delete"));
gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("edit-delete", GTK_ICON_SIZE_BUTTON));

gtk_widget_show (button);
gtk_widget_set_can_default (button, TRUE);
@@ -18,9 +18,7 @@ gchar * pluma_file_browser_utils_uri_basename (gchar const * uri);
gboolean pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
GtkMessageType type,
gchar const *message,
gchar const *secondary,
gchar const * button_image,
gchar const * button_label);
gchar const *secondary);

#endif /* __PLUMA_FILE_BROWSER_UTILS_H__ */

@@ -416,11 +416,8 @@ pluma_search_dialog_init (PlumaSearchDialog *dlg)
gtk_label_set_mnemonic_widget (GTK_LABEL (dlg->priv->replace_label),
dlg->priv->replace_entry);

dlg->priv->find_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
"label", "gtk-find",
"use-stock", TRUE,
"use-underline", TRUE,
NULL));
dlg->priv->find_button = gtk_button_new_with_mnemonic (_("_Find"));
gtk_button_set_image (GTK_BUTTON (dlg->priv->find_button), gtk_image_new_from_icon_name ("edit-find", GTK_ICON_SIZE_BUTTON));

dlg->priv->replace_all_button = gtk_button_new_with_mnemonic (_("Replace _All"));
dlg->priv->replace_button = pluma_gtk_button_new_with_icon (_("_Replace"),

0 comments on commit 1d82cc7

Please sign in to comment.
You can’t perform that action at this time.