Blender
V3.3
|
Go to the source code of this file.
Macros | |
#define | FSMENU_RECENT_MAX 10 |
Functions | |
void | fsmenu_insert_entry (struct FSMenu *fsmenu, enum FSMenuCategory category, const char *path, const char *name, int icon, enum FSMenuInsert flag) |
void | fsmenu_entry_refresh_valid (struct FSMenuEntry *fsentry) |
short | fsmenu_can_save (struct FSMenu *fsmenu, enum FSMenuCategory category, int idx) |
void | fsmenu_remove_entry (struct FSMenu *fsmenu, enum FSMenuCategory category, int idx) |
void | fsmenu_write_file (struct FSMenu *fsmenu, const char *filepath) |
void | fsmenu_read_bookmarks (struct FSMenu *fsmenu, const char *filepath) |
void | fsmenu_read_system (struct FSMenu *fsmenu, int read_bookmarks) |
void | fsmenu_free (void) |
void | fsmenu_refresh_system_category (struct FSMenu *fsmenu) |
void | fsmenu_refresh_bookmarks_status (struct wmWindowManager *wm, struct FSMenu *fsmenu) |
int | fsmenu_get_active_indices (struct FSMenu *fsmenu, enum FSMenuCategory category, const char *dir) |
short fsmenu_can_save | ( | struct FSMenu * | fsmenu, |
enum FSMenuCategory | category, | ||
int | idx | ||
) |
Return whether the entry was created by the user and can be saved and deleted
Definition at line 354 of file fsmenu.c.
References ED_fsmenu_get_category(), FSMenuEntry::next, and FSMenuEntry::save.
void fsmenu_entry_refresh_valid | ( | struct FSMenuEntry * | fsentry | ) |
Refresh 'valid' status of given menu entry
Definition at line 329 of file fsmenu.c.
References BLI_is_dir(), NULL, FSMenuEntry::path, STRCASEEQLEN, and FSMenuEntry::valid.
Referenced by fsmenu_bookmark_validate_job_startjob(), and fsmenu_insert_entry().
Free's all the memory associated with the fsmenu
Definition at line 1082 of file fsmenu.c.
References fsmenu_free_ex(), and g_fsmenu.
Referenced by ED_file_exit(), and ED_file_read_bookmarks().
int fsmenu_get_active_indices | ( | struct FSMenu * | fsmenu, |
enum FSMenuCategory | category, | ||
const char * | dir | ||
) |
Get active index based on given directory.
Definition at line 1125 of file fsmenu.c.
References BLI_path_cmp, ED_fsmenu_get_category(), FSMenuEntry::next, and FSMenuEntry::path.
Referenced by file_refresh().
void fsmenu_insert_entry | ( | struct FSMenu * | fsmenu, |
enum FSMenuCategory | category, | ||
const char * | path, | ||
const char * | name, | ||
int | icon, | ||
enum FSMenuInsert | flag | ||
) |
Inserts a new fsmenu entry with the given path. Duplicate entries are not added.
flag | Options for inserting the entry. |
Definition at line 366 of file fsmenu.c.
References ARRAY_SIZE, BLI_assert, BLI_path_ncmp, BLI_strdup(), BLI_strdupn(), BLI_strncpy(), DATA_, ED_fsmenu_entry_set_icon(), ED_fsmenu_get_category(), ED_fsmenu_set_category(), ELEM, FS_CATEGORY_BOOKMARKS, FS_CATEGORY_OTHER, FS_CATEGORY_RECENT, FS_CATEGORY_SYSTEM, FS_CATEGORY_SYSTEM_BOOKMARKS, FS_INSERT_FIRST, FS_INSERT_NO_VALIDATE, FS_INSERT_SAVE, FS_INSERT_SORTED, fsmenu_entry_refresh_valid(), FSMenuEntry::icon, MEM_mallocN, FSMenuEntry::name, FSMenuEntry::next, FSMenuEntry::path, FSMenuEntry::save, SEP, SEP_STR, STREQ, and FSMenuEntry::valid.
Referenced by bookmark_add_exec(), file_execute(), fsmenu_read_bookmarks(), fsmenu_read_system(), and fsmenu_xdg_insert_entry().
reads the 'bookmarks' from the specified file
Definition at line 559 of file fsmenu.c.
References BLI_exists(), BLI_fopen(), BLI_strncpy(), FILE_MAXDIR, FILE_MAXFILE, FS_CATEGORY_BOOKMARKS, FS_CATEGORY_RECENT, FS_INSERT_SAVE, fsmenu_insert_entry(), len, FSMenuEntry::name, NULL, and STRPREFIX.
Referenced by ED_file_read_bookmarks().
adds system specific directories
Definition at line 631 of file fsmenu.c.
References ARRAY_SIZE, BLI_filelist_dir_contents(), BLI_filelist_free(), BLI_getenv(), BLI_join_dirfile(), BLI_snprintf(), BLI_strncpy_wchar_as_utf8(), BLI_strncpy_wchar_from_utf8(), dirname(), err, FILE_MAX, FILE_MAXDIR, FILE_MAXFILE, FS_CATEGORY_OTHER, FS_CATEGORY_SYSTEM, FS_CATEGORY_SYSTEM_BOOKMARKS, FS_INSERT_LAST, FS_INSERT_NO_VALIDATE, FS_INSERT_SORTED, FS_UDIR_PATH, fsmenu_insert_entry(), fsmenu_xdg_insert_entry(), fsmenu_xdg_user_dirs_free(), fsmenu_xdg_user_dirs_parse(), FSMenuEntry::icon, label, N_, FSMenuEntry::name, NULL, direntry::relname, result, seed, STRPREFIX, type, and UNUSED_VARS.
Referenced by ED_file_read_bookmarks(), and fsmenu_refresh_system_category().
void fsmenu_refresh_bookmarks_status | ( | struct wmWindowManager * | wm, |
struct FSMenu * | fsmenu | ||
) |
Refresh 'valid' status of all menu entries
Definition at line 1229 of file fsmenu.c.
References BLI_assert, ED_fsmenu_get(), fsmenu_bookmark_validate_job_start(), fsmenu_bookmark_validate_job_stop(), and UNUSED_VARS_NDEBUG.
Referenced by bookmark_cleanup_exec(), and file_refresh_exec().
Refresh system directory menu
Definition at line 1056 of file fsmenu.c.
References ED_fsmenu_set_category(), FS_CATEGORY_SYSTEM, FS_CATEGORY_SYSTEM_BOOKMARKS, fsmenu_free_category(), fsmenu_read_system(), and NULL.
Referenced by file_refresh_exec().
void fsmenu_remove_entry | ( | struct FSMenu * | fsmenu, |
enum FSMenuCategory | category, | ||
int | idx | ||
) |
Removes the fsmenu entry at the given index.
Definition at line 489 of file fsmenu.c.
References ED_fsmenu_get_category(), ED_fsmenu_set_category(), MEM_freeN, FSMenuEntry::next, NULL, FSMenuEntry::path, and FSMenuEntry::save.
Referenced by bookmark_cleanup_exec(), bookmark_delete_exec(), and reset_recent_exec().
saves the 'bookmarks' to the specified file
Definition at line 522 of file fsmenu.c.
References BLI_fopen(), ED_fsmenu_get_category(), FILE_MAX, FS_CATEGORY_BOOKMARKS, FS_CATEGORY_RECENT, fsmenu_entry_generate_name(), FSMENU_RECENT_MAX, FSMenuEntry::name, FSMenuEntry::next, NULL, FSMenuEntry::path, FSMenuEntry::save, and STREQ.
Referenced by bookmark_add_exec(), bookmark_cleanup_exec(), bookmark_delete_exec(), bookmark_move_exec(), ED_fsmenu_entry_set_name(), ED_fsmenu_entry_set_path(), file_execute(), and reset_recent_exec().