Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_event_system.c
| Show First 20 Lines • Show All 263 Lines • ▼ Show 20 Lines | for (note = wm->queue.first; note; note = next) { | ||||
| } | } | ||||
| else if (note->data == ND_DATACHANGED) | else if (note->data == ND_DATACHANGED) | ||||
| wm_window_title(wm, win); | wm_window_title(wm, win); | ||||
| } | } | ||||
| if (note->window == win) { | if (note->window == win) { | ||||
| if (note->category == NC_SCREEN) { | if (note->category == NC_SCREEN) { | ||||
| if (note->data == ND_SCREENBROWSE) { | if (note->data == ND_SCREENBROWSE) { | ||||
| /* free popup handlers only [#35434] */ | /* free popup handlers only [#35434] */ | ||||
| UI_remove_popup_handlers_all(C, &win->modalhandlers); | UI_popup_handlers_remove_all(C, &win->modalhandlers); | ||||
| ED_screen_set(C, note->reference); // XXX hrms, think this over! | ED_screen_set(C, note->reference); // XXX hrms, think this over! | ||||
| if (G.debug & G_DEBUG_EVENTS) | if (G.debug & G_DEBUG_EVENTS) | ||||
| printf("%s: screen set %p\n", __func__, note->reference); | printf("%s: screen set %p\n", __func__, note->reference); | ||||
| } | } | ||||
| else if (note->data == ND_SCREENDELETE) { | else if (note->data == ND_SCREENDELETE) { | ||||
| ED_screen_delete(C, note->reference); // XXX hrms, think this over! | ED_screen_delete(C, note->reference); // XXX hrms, think this over! | ||||
| ▲ Show 20 Lines • Show All 335 Lines • ▼ Show 20 Lines | void WM_reportf(const bContext *C, ReportType type, const char *format, ...) | ||||
| BLI_dynstr_free(ds); | BLI_dynstr_free(ds); | ||||
| } | } | ||||
| /* (caller_owns_reports == true) when called from python */ | /* (caller_owns_reports == true) when called from python */ | ||||
| static void wm_operator_reports(bContext *C, wmOperator *op, int retval, bool caller_owns_reports) | static void wm_operator_reports(bContext *C, wmOperator *op, int retval, bool caller_owns_reports) | ||||
| { | { | ||||
| if (caller_owns_reports == false) { /* popup */ | if (caller_owns_reports == false) { /* popup */ | ||||
| if (op->reports->list.first) { | if (op->reports->list.first) { | ||||
| /* FIXME, temp setting window, see other call to uiPupMenuReports for why */ | /* FIXME, temp setting window, see other call to UI_popup_menu_reports for why */ | ||||
| wmWindow *win_prev = CTX_wm_window(C); | wmWindow *win_prev = CTX_wm_window(C); | ||||
| ScrArea *area_prev = CTX_wm_area(C); | ScrArea *area_prev = CTX_wm_area(C); | ||||
| ARegion *ar_prev = CTX_wm_region(C); | ARegion *ar_prev = CTX_wm_region(C); | ||||
| if (win_prev == NULL) | if (win_prev == NULL) | ||||
| CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); | CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); | ||||
| uiPupMenuReports(C, op->reports); | UI_popup_menu_reports(C, op->reports); | ||||
| CTX_wm_window_set(C, win_prev); | CTX_wm_window_set(C, win_prev); | ||||
| CTX_wm_area_set(C, area_prev); | CTX_wm_area_set(C, area_prev); | ||||
| CTX_wm_region_set(C, ar_prev); | CTX_wm_region_set(C, ar_prev); | ||||
| } | } | ||||
| } | } | ||||
| if (retval & OPERATOR_FINISHED) { | if (retval & OPERATOR_FINISHED) { | ||||
| ▲ Show 20 Lines • Show All 1,074 Lines • ▼ Show 20 Lines | case EVT_FILESELECT_EXTERNAL_CANCEL: | ||||
| } | } | ||||
| else { | else { | ||||
| ED_area_prevspace(C, CTX_wm_area(C)); | ED_area_prevspace(C, CTX_wm_area(C)); | ||||
| } | } | ||||
| } | } | ||||
| wm_handler_op_context(C, handler); | wm_handler_op_context(C, handler); | ||||
| /* needed for uiPupMenuReports */ | /* needed for UI_popup_menu_reports */ | ||||
| if (val == EVT_FILESELECT_EXEC) { | if (val == EVT_FILESELECT_EXEC) { | ||||
| int retval; | int retval; | ||||
| if (handler->op->type->flag & OPTYPE_UNDO) | if (handler->op->type->flag & OPTYPE_UNDO) | ||||
| wm->op_undo_depth++; | wm->op_undo_depth++; | ||||
| retval = handler->op->type->exec(C, handler->op); | retval = handler->op->type->exec(C, handler->op); | ||||
| Show All 15 Lines | case EVT_FILESELECT_EXTERNAL_CANCEL: | ||||
| wmWindow *win_prev = CTX_wm_window(C); | wmWindow *win_prev = CTX_wm_window(C); | ||||
| ScrArea *area_prev = CTX_wm_area(C); | ScrArea *area_prev = CTX_wm_area(C); | ||||
| ARegion *ar_prev = CTX_wm_region(C); | ARegion *ar_prev = CTX_wm_region(C); | ||||
| if (win_prev == NULL) | if (win_prev == NULL) | ||||
| CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); | CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); | ||||
| BKE_report_print_level_set(handler->op->reports, RPT_WARNING); | BKE_report_print_level_set(handler->op->reports, RPT_WARNING); | ||||
| uiPupMenuReports(C, handler->op->reports); | UI_popup_menu_reports(C, handler->op->reports); | ||||
| /* XXX - copied from 'wm_operator_finished()' */ | /* XXX - copied from 'wm_operator_finished()' */ | ||||
| /* add reports to the global list, otherwise they are not seen */ | /* add reports to the global list, otherwise they are not seen */ | ||||
| BLI_movelisttolist(&CTX_wm_reports(C)->list, &handler->op->reports->list); | BLI_movelisttolist(&CTX_wm_reports(C)->list, &handler->op->reports->list); | ||||
| CTX_wm_window_set(C, win_prev); | CTX_wm_window_set(C, win_prev); | ||||
| CTX_wm_area_set(C, area_prev); | CTX_wm_area_set(C, area_prev); | ||||
| CTX_wm_region_set(C, ar_prev); | CTX_wm_region_set(C, ar_prev); | ||||
| ▲ Show 20 Lines • Show All 1,721 Lines • Show Last 20 Lines | |||||