[Bf-blender-cvs] [f6b9cad] asset-experiments: Cleanup: get rid of unused stuff!
Bastien Montagne
noreply at git.blender.org
Sun Feb 1 21:03:05 CET 2015
Commit: f6b9cad064e709acbe7ad96f5ef2cd2a865b9113
Author: Bastien Montagne
Date: Sun Feb 1 20:49:45 2015 +0100
Branches: asset-experiments
https://developer.blender.org/rBf6b9cad064e709acbe7ad96f5ef2cd2a865b9113
Cleanup: get rid of unused stuff!
===================================================================
M source/blender/editors/include/ED_fileselect.h
M source/blender/editors/space_file/file_ops.c
M source/blender/editors/space_file/filelist.c
M source/blender/editors/space_file/fsmenu.c
===================================================================
diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h
index bcbdb1a..21ce0e3 100644
--- a/source/blender/editors/include/ED_fileselect.h
+++ b/source/blender/editors/include/ED_fileselect.h
@@ -136,15 +136,9 @@ int fsmenu_get_nentries(struct FSMenu *fsmenu, FSMenuCategory category);
struct FSMenuEntry *fsmenu_get_entry(struct FSMenu *fsmenu, FSMenuCategory category, int index);
-/** Returns the fsmenu entry (path) at \a index (or NULL if a bad index) or a separator.
- */
char *fsmenu_entry_get_path(struct FSMenuEntry *fsentry);
-char *fsmenu_get_entry_path(struct FSMenu *fsmenu, FSMenuCategory category, int index);
void fsmenu_entry_set_path(struct FSMenuEntry *fsentry, const char *path);
-/** Returns the fsmenu name at \a index (or NULL if a bad index) or a separator.
- */
-char *fsmenu_get_entry_name(struct FSMenu *fsmenu, FSMenuCategory category, int index);
char *fsmenu_entry_get_name(struct FSMenuEntry *fsentry);
void fsmenu_entry_set_name(struct FSMenuEntry *fsentry, const char *name);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index b82cb47..085ed60 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -713,7 +713,7 @@ static int reset_recent_exec(bContext *C, wmOperator *UNUSED(op))
char name[FILE_MAX];
struct FSMenu *fsmenu = fsmenu_get();
- while (fsmenu_get_entry_path(fsmenu, FS_CATEGORY_RECENT, 0) != NULL) {
+ while (fsmenu_get_entry(fsmenu, FS_CATEGORY_RECENT, 0) != NULL) {
fsmenu_remove_entry(fsmenu, FS_CATEGORY_RECENT, 0);
}
BLI_make_file_string("/", name, BKE_appdir_folder_id_create(BLENDER_USER_CONFIG, NULL), BLENDER_BOOKMARK_FILE);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 395e873..8fc549f 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -290,16 +290,6 @@ static void filelist_filter_clear(FileList *filelist);
/* ********** Sort helpers ********** */
-static bool compare_is_directory(const struct direntry *entry)
-{
- /* for library browse .blend files may be treated as directories, but
- * for sorting purposes they should be considered regular files */
- if (S_ISDIR(entry->type))
- return !(entry->flags & (FILE_TYPE_BLENDER | FILE_TYPE_BLENDER_BACKUP));
-
- return false;
-}
-
static int compare_direntry_generic(const struct direntry *entry1, const struct direntry *entry2)
{
/* type is equal to stat.st_mode */
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index b891d27..4188b9a 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -151,13 +151,6 @@ char *fsmenu_entry_get_path(struct FSMenuEntry *fsentry)
return fsentry->path;
}
-char *fsmenu_get_entry_path(struct FSMenu *fsmenu, FSMenuCategory category, int idx)
-{
- FSMenuEntry *fsm = fsmenu_get_entry(fsmenu, category, idx);
-
- return fsmenu_entry_get_path(fsm);
-}
-
void fsmenu_entry_set_path(struct FSMenuEntry *fsentry, const char *path)
{
MEM_SAFE_FREE(fsentry->path);
@@ -211,13 +204,6 @@ void fsmenu_entry_set_name(struct FSMenuEntry *fsentry, const char *name)
}
}
-char *fsmenu_get_entry_name(struct FSMenu *fsmenu, FSMenuCategory category, int idx)
-{
- FSMenuEntry *fsm = fsmenu_get_entry(fsmenu, category, idx);
-
- return fsm ? fsmenu_entry_get_name(fsm) : NULL;
-}
-
short fsmenu_can_save(struct FSMenu *fsmenu, FSMenuCategory category, int idx)
{
FSMenuEntry *fsm_iter;
More information about the Bf-blender-cvs
mailing list