Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Weikert <elubie@gmx.net>2012-10-21 18:47:16 +0400
committerAndrea Weikert <elubie@gmx.net>2012-10-21 18:47:16 +0400
commit1e21c0a32452f2a1343367e782c1e8bfeb4f377d (patch)
treeee6738ae81208f68a02a92c81311d27df9c4e7d3 /source/blender/editors/space_file/file_panels.c
parent26d0492653d310d05bdbbea8a51d3b4f62ccd0c6 (diff)
== filebrowser ==
* Separated bookmarks managed by the OS (System Bookmarks) and bookmarks managed by Blender (Bookmarks). * Added user pref to hide (or show) system bookmarks to allow users doing a video tutorial for example to hide their private system bookmarks This feature should help especially MAC users who reported excessively long list of bookmarks which were added to Blender.
Diffstat (limited to 'source/blender/editors/space_file/file_panels.c')
-rw-r--r--source/blender/editors/space_file/file_panels.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index a7054909aaa..fb5210380b3 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -135,6 +135,16 @@ static void file_panel_system(const bContext *C, Panel *pa)
file_panel_category(C, pa, FS_CATEGORY_SYSTEM, &sfile->systemnr, ICON_DISK_DRIVE, 0);
}
+static void file_panel_system_bookmarks(const bContext *C, Panel *pa)
+{
+ SpaceFile *sfile = CTX_wm_space_file(C);
+
+ if (sfile && !(U.uiflag & USER_HIDE_SYSTEM_BOOKMARKS) ) {
+ file_panel_category(C, pa, FS_CATEGORY_SYSTEM_BOOKMARKS, &sfile->systemnr, ICON_BOOKMARKS, 0);
+ }
+
+}
+
static void file_panel_bookmarks(const bContext *C, Panel *pa)
{
SpaceFile *sfile = CTX_wm_space_file(C);
@@ -212,6 +222,12 @@ void file_panels_register(ARegionType *art)
pt->draw = file_panel_system;
BLI_addtail(&art->paneltypes, pt);
+ pt = MEM_callocN(sizeof(PanelType), "spacetype file system bookmarks");
+ strcpy(pt->idname, "FILE_PT_system_bookmarks");
+ strcpy(pt->label, N_("System Bookmarks"));
+ pt->draw = file_panel_system_bookmarks;
+ BLI_addtail(&art->paneltypes, pt);
+
pt = MEM_callocN(sizeof(PanelType), "spacetype file bookmarks");
strcpy(pt->idname, "FILE_PT_bookmarks");
strcpy(pt->label, N_("Bookmarks"));