Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_files.c
| Show First 20 Lines • Show All 1,840 Lines • ▼ Show 20 Lines | wm_homefile_read(C, | ||||
| app_template, | app_template, | ||||
| NULL); | NULL); | ||||
| if (use_splash) { | if (use_splash) { | ||||
| WM_init_splash(C); | WM_init_splash(C); | ||||
| } | } | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| static int wm_homefile_read_invoke(bContext *C, | static int wm_homefile_read_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | ||||
| wmOperator *UNUSED(op), | |||||
| const wmEvent *UNUSED(event)) | |||||
| { | { | ||||
| /* Draw menu which includes default startup and application templates. */ | return wm_homefile_read_exec(C, op); | ||||
| uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("New File"), ICON_FILE_NEW); | |||||
| uiLayout *layout = UI_popup_menu_layout(pup); | |||||
| MenuType *mt = WM_menutype_find("TOPBAR_MT_file_new", false); | |||||
| if (mt) { | |||||
| UI_menutype_draw(C, mt, layout); | |||||
| } | |||||
| UI_popup_menu_end(C, pup); | |||||
| return OPERATOR_INTERFACE; | |||||
| } | } | ||||
campbellbarton: The invoke function can be removed in this case. | |||||
| void WM_OT_read_homefile(wmOperatorType *ot) | void WM_OT_read_homefile(wmOperatorType *ot) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ot->name = "Reload Start-Up File"; | ot->name = "Reload Start-Up File"; | ||||
| ot->idname = "WM_OT_read_homefile"; | ot->idname = "WM_OT_read_homefile"; | ||||
| ot->description = "Open the default file (doesn't save the current file)"; | ot->description = "Open the default file (doesn't save the current file)"; | ||||
| ▲ Show 20 Lines • Show All 770 Lines • Show Last 20 Lines | |||||
The invoke function can be removed in this case.