Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_templates.c
| Show First 20 Lines • Show All 6,755 Lines • ▼ Show 20 Lines | |||||
| int uiTemplateRecentFiles(uiLayout *layout, int rows) | int uiTemplateRecentFiles(uiLayout *layout, int rows) | ||||
| { | { | ||||
| const RecentFile *recent; | const RecentFile *recent; | ||||
| int i; | int i; | ||||
| for (recent = G.recent_files.first, i = 0; (i < rows) && (recent); recent = recent->next, i++) { | for (recent = G.recent_files.first, i = 0; (i < rows) && (recent); recent = recent->next, i++) { | ||||
| const char *filename = BLI_path_basename(recent->filepath); | const char *filename = BLI_path_basename(recent->filepath); | ||||
| uiItemStringO(layout, | PointerRNA ptr; | ||||
| uiItemFullO(layout, | |||||
| "WM_OT_open_mainfile", | |||||
| filename, | filename, | ||||
| BLO_has_bfile_extension(filename) ? ICON_FILE_BLEND : ICON_FILE_BACKUP, | BLO_has_bfile_extension(filename) ? ICON_FILE_BLEND : ICON_FILE_BACKUP, | ||||
| "WM_OT_open_mainfile", | NULL, | ||||
| "filepath", | WM_OP_INVOKE_DEFAULT, | ||||
| recent->filepath); | 0, | ||||
| &ptr); | |||||
| RNA_string_set(&ptr, "filepath", recent->filepath); | |||||
| RNA_boolean_set(&ptr, "display_file_selector", false); | |||||
| } | } | ||||
| return i; | return i; | ||||
| } | } | ||||