Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <mail@jlucke.com>2019-05-14 15:13:02 +0300
committerJacques Lucke <mail@jlucke.com>2019-05-14 15:21:17 +0300
commit687385b963f4389b3d714fed264bb0ff24bc43f5 (patch)
treeb45b5c6492361425533230e4267e848d7c383715 /source/blender/windowmanager/WM_api.h
parent37f87ae81bc31134cf985277d877afb7b922dbbc (diff)
UI: Confirm dialog when closing an unsaved file
The complexity in this patch comes from the fact that the current operator system does not support multi-step user interactions well. More specifically, for this to work, we need to show a confirm dialog and a file browser afterwards. We decided that it is easier to keep everything in a single operator, instead of creating separate operators that invoke each other. So, now the `WM_OT_open_mainfile` operator invokes itself in different states. It implements a simple finite state machine to manage the states. The dialog itself is expected to be improved in a future commit. See D4829 for more details. Reviewers: brecht Differential Revision: https://developer.blender.org/D4829
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r--source/blender/windowmanager/WM_api.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index f1037dadf85..780add8eb88 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -373,7 +373,8 @@ int WM_operator_confirm_message_ex(struct bContext *C,
struct wmOperator *op,
const char *title,
const int icon,
- const char *message);
+ const char *message,
+ const short opcontext);
int WM_operator_confirm_message(struct bContext *C, struct wmOperator *op, const char *message);
/* operator api */