Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
avoid eel_create_question_dialog with stock ids
  • Loading branch information
sc0w committed Mar 1, 2018
1 parent f0ab0d4 commit 7763ec9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
14 changes: 13 additions & 1 deletion eel/eel-stock-dialogs.c
Expand Up @@ -586,6 +586,18 @@ eel_create_question_dialog (const char *primary_text,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_NONE,
parent);
gtk_dialog_add_buttons (dialog, answer_1, response_1, answer_2, response_2, NULL);

if (g_strcmp0 (answer_1, "process-stop") == 0)
mate_dialog_add_button (dialog, _("_Cancel"), answer_1, response_1);
else
gtk_dialog_add_button (dialog, answer_1, response_1);

if (g_strcmp0 (answer_2, "gtk-ok") == 0)
mate_dialog_add_button (dialog, _("_OK"), answer_2, response_2);
else if (g_strcmp0 (answer_2, "edit-clear") == 0)
mate_dialog_add_button (dialog, _("_Clear"), answer_2, response_2);
else
gtk_dialog_add_button (dialog, answer_2, response_2);

return dialog;
}
4 changes: 2 additions & 2 deletions libcaja-private/caja-mime-actions.c
Expand Up @@ -741,7 +741,7 @@ report_broken_symbolic_link (GtkWindow *parent_window, CajaFile *file)
goto out;
}

dialog = eel_show_yes_no_dialog (prompt, detail, _("Mo_ve to Trash"), "gtk-cancel",
dialog = eel_show_yes_no_dialog (prompt, detail, _("Mo_ve to Trash"), "process-stop",
parent_window);

gtk_dialog_set_default_response (dialog, GTK_RESPONSE_CANCEL);
Expand Down Expand Up @@ -1179,7 +1179,7 @@ confirm_multiple_windows (GtkWindow *parent_window,
"This will open %d separate windows.", count), count);
}
dialog = eel_show_yes_no_dialog (prompt, detail,
"gtk-ok", "gtk-cancel",
"gtk-ok", "process-stop",
parent_window);
g_free (detail);

Expand Down
9 changes: 5 additions & 4 deletions libcaja-private/caja-program-choosing.c
Expand Up @@ -91,10 +91,11 @@ application_cannot_open_location (GAppInfo *application,
}

message_dialog = eel_show_yes_no_dialog (prompt,
message,
GTK_STOCK_OK,
GTK_STOCK_CANCEL,
parent_window);
message,
"gtk-ok",
"process-stop",
parent_window);

response = gtk_dialog_run (message_dialog);
gtk_widget_destroy (GTK_WIDGET (message_dialog));

Expand Down
4 changes: 2 additions & 2 deletions src/caja-navigation-window-menus.c
Expand Up @@ -131,8 +131,8 @@ forget_history_if_confirmed (CajaWindow *window)
dialog = eel_create_question_dialog (_("Are you sure you want to clear the list "
"of locations you have visited?"),
NULL,
"gtk-cancel", GTK_RESPONSE_CANCEL,
"gtk-clear", RESPONSE_FORGET,
"process-stop", GTK_RESPONSE_CANCEL,
"edit-clear", RESPONSE_FORGET,
GTK_WINDOW (window));

gtk_widget_show (GTK_WIDGET (dialog));
Expand Down
2 changes: 1 addition & 1 deletion src/caja-window-bookmarks.c
Expand Up @@ -84,7 +84,7 @@ show_bogus_bookmark_window (CajaWindow *window,

dialog = eel_show_yes_no_dialog (prompt, detail,
_("Bookmark for Nonexistent Location"),
"gtk-cancel",
"process-stop",
GTK_WINDOW (window));

g_signal_connect (dialog, "response",
Expand Down
2 changes: 1 addition & 1 deletion src/file-manager/fm-directory-view.c
Expand Up @@ -659,7 +659,7 @@ fm_directory_view_confirm_multiple (GtkWindow *parent_window,
"This will open %'d separate windows.", count), count);
}
dialog = eel_show_yes_no_dialog (prompt, detail,
"gtk-ok", "gtk-cancel",
"gtk-ok", "process-stop",
parent_window);
g_free (detail);

Expand Down

0 comments on commit 7763ec9

Please sign in to comment.