UI: Improved Operator Confirmations #104670

Merged
Harley Acheson merged 23 commits from Harley/blender:ConfirmDialogs into main 2024-01-04 18:42:34 +01:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit 5794e66ba4 - Show all commits

View File

@ -2282,6 +2282,7 @@ static int wm_homefile_write_exec(bContext *C, wmOperator *op)
static void save_homefile_warning(bContext * /*C*/, wmOperator * /*op*/, wmWarningDetails *warning)
{
STRNCPY(warning->confirm_button, IFACE_("Save"));
warning->icon = ALERT_ICON_BLENDER;
warning->size = WM_WARNING_SIZE_LARGE;
warning->position = WM_WARNING_POSITION_CENTER;
}
@ -2681,18 +2682,19 @@ static void read_factory_warning(bContext *C, wmOperator * /*op*/, wmWarningDeta
if (wm_file_or_session_data_has_unsaved_changes(CTX_data_main(C), CTX_wm_manager(C))) {
STRNCPY(warning->message,
IFACE_("WARNING: Your file is unsaved. Proceeding will abandon your changes"));
warning->icon = ALERT_ICON_WARNING;
warning->confirm_default = false;
warning->cancel_default = true;
}
else {
STRNCPY(warning->message,
IFACE_("To make changes to preferences permanent, use \"Save Preferences\""));
warning->icon = ALERT_ICON_BLENDER;
warning->confirm_default = true;
warning->cancel_default = false;
}
STRNCPY(warning->confirm_button, IFACE_("Load"));
warning->icon = ALERT_ICON_BLENDER;
warning->size = WM_WARNING_SIZE_LARGE;
warning->position = WM_WARNING_POSITION_CENTER;
}