summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-02-23 14:52:20 +0100
committerPablo Barciela <[email protected]>2018-02-24 17:41:07 +0100
commitab30e57aab746b24b614a088309a62d902c9bb5f (patch)
tree8bdb57dc3460da5bb30ce04c8043b0dd1178eb4a /libcaja-private
parente313685f58549d3b98dc42a10b58f830e5b934e9 (diff)
downloadcaja-ab30e57aab746b24b614a088309a62d902c9bb5f.tar.bz2
caja-ab30e57aab746b24b614a088309a62d902c9bb5f.tar.xz
caja-file-conflict-dialog: avoid gtk_dialog_add_buttons with stock id
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-file-conflict-dialog.c33
1 files changed, 27 insertions, 6 deletions
diff --git a/libcaja-private/caja-file-conflict-dialog.c b/libcaja-private/caja-file-conflict-dialog.c
index 2a231e8f..db9369be 100644
--- a/libcaja-private/caja-file-conflict-dialog.c
+++ b/libcaja-private/caja-file-conflict-dialog.c
@@ -555,6 +555,24 @@ diff_button_clicked_cb (GtkButton *w,
}
static void
+mate_dialog_add_button (GtkDialog *dialog,
+ const gchar *button_text,
+ const gchar *icon_name,
+ gint response_id)
+{
+ GtkWidget *button;
+
+ button = gtk_button_new_with_mnemonic (button_text);
+ gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON));
+
+ gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
+ gtk_style_context_add_class (gtk_widget_get_style_context (button), "text-button");
+ gtk_widget_set_can_default (button, TRUE);
+ gtk_widget_show (button);
+ gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, response_id);
+}
+
+static void
caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd)
{
GtkWidget *hbox, *vbox, *vbox2;
@@ -650,12 +668,15 @@ caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd)
G_CALLBACK (checkbox_toggled_cb), dialog);
/* Add buttons */
- gtk_dialog_add_buttons (dialog,
- "gtk-cancel",
- GTK_RESPONSE_CANCEL,
- _("_Skip"),
- CONFLICT_RESPONSE_SKIP,
- NULL);
+ mate_dialog_add_button (dialog,
+ _("_Cancel"),
+ "process-stop",
+ GTK_RESPONSE_CANCEL);
+
+ gtk_dialog_add_button (dialog,
+ _("_Skip"),
+ CONFLICT_RESPONSE_SKIP);
+
details->rename_button =
gtk_dialog_add_button (dialog,
_("Re_name"),