[Bf-blender-cvs] [2f6831e6914] filebrowser_redesign: Changed Displaytype to Vertical List and Horizontal List

Brian Meisenheimer noreply at git.blender.org
Fri Jul 26 01:26:09 CEST 2019


Commit: 2f6831e69149dbbea86e5a91e8930845c46d428d
Author: Brian Meisenheimer
Date:   Thu Jul 25 14:13:05 2019 +0200
Branches: filebrowser_redesign
https://developer.blender.org/rB2f6831e69149dbbea86e5a91e8930845c46d428d

Changed Displaytype to Vertical List and Horizontal List

===================================================================

M	release/datafiles/locale
M	source/blender/editors/space_file/file_draw.c
M	source/blender/editors/space_file/filesel.c
M	source/blender/editors/space_file/space_file.c
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/makesrna/intern/rna_space.c
M	source/blender/windowmanager/intern/wm_files.c
M	source/blender/windowmanager/intern/wm_operator_props.c
M	source/tools

===================================================================

diff --git a/release/datafiles/locale b/release/datafiles/locale
index 6625026f62f..2b81e2acc01 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit 6625026f62f492dd677f5f29c68b9d70c96fb34b
+Subproject commit 2b81e2acc011a8b79232a18dad3c00b8e654ceee
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index fdd70a7d6e5..588c9df5714 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -862,7 +862,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
   eFontStyle_Align align;
   bool do_drag;
   unsigned char text_col[4];
-  const bool draw_columnheader = (params->display == FILE_SHORTDISPLAY);
+  const bool draw_columnheader = (params->display == FILE_VERTICALDISPLAY);
   const float thumb_icon_aspect = sqrtf(64.0f / (float)(params->thumbnail_size));
 
   numfiles = filelist_files_ensure(files);
@@ -948,7 +948,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
         int colorid = (file_selflag & FILE_SEL_SELECTED) ? TH_HILITE : TH_BACK;
         int shade = (params->highlight_file == i) || (file_selflag & FILE_SEL_HIGHLIGHTED) ? 35 :
                                                                                              0;
-        const short width = ELEM(params->display, FILE_SHORTDISPLAY, FILE_LONGDISPLAY) ?
+        const short width = ELEM(params->display, FILE_VERTICALDISPLAY, FILE_HORIZONTALDISPLAY) ?
                                 layout->tile_w - (2 * padx) :
                                 layout->tile_w;
 
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index cfa662834f3..ed824745134 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -270,11 +270,11 @@ short ED_fileselect_set_params(SpaceFile *sfile)
             params->display = FILE_IMGDISPLAY;
           }
           else {
-            params->display = FILE_SHORTDISPLAY;
+            params->display = FILE_VERTICALDISPLAY;
           }
         }
         else {
-          params->display = FILE_SHORTDISPLAY;
+          params->display = FILE_VERTICALDISPLAY;
         }
       }
       else {
@@ -295,7 +295,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
     params->type = FILE_UNIX;
     params->flag |= FILE_HIDE_DOT;
     params->flag &= ~FILE_DIRSEL_ONLY;
-    params->display = FILE_SHORTDISPLAY;
+    params->display = FILE_VERTICALDISPLAY;
     params->display_previous = FILE_DEFAULTDISPLAY;
     params->sort = FILE_SORT_ALPHA;
     params->filter = 0;
@@ -697,7 +697,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar)
                      layout->tile_border_y * 2 - layout->offset_top;
     layout->flag = FILE_LAYOUT_VER;
   }
-  else if (params->display == FILE_SHORTDISPLAY) {
+  else if (params->display == FILE_VERTICALDISPLAY) {
     int rowcount;
 
     layout->prv_w = ((float)params->thumbnail_size / 20.0f) * UI_UNIT_X;
@@ -724,7 +724,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar)
                      layout->tile_border_y * 2 + layout->offset_top;
     layout->flag = FILE_LAYOUT_VER;
   }
-  else if (params->display == FILE_LONGDISPLAY) {
+  else if (params->display == FILE_HORIZONTALDISPLAY) {
     int column_space = 0.6f * UI_UNIT_X;
     int column_icon_space = 0.2f * UI_UNIT_X;
 
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 1f90d09b697..992ffd3f461 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -414,7 +414,7 @@ static void file_main_region_draw(const bContext *C, ARegion *ar)
     v2d->keepofs &= ~V2D_LOCKOFS_Y;
     v2d->keepofs |= V2D_LOCKOFS_X;
   }
-  else if (params->display == FILE_SHORTDISPLAY) {
+  else if (params->display == FILE_VERTICALDISPLAY) {
     v2d->scroll = V2D_SCROLL_RIGHT;
     v2d->keepofs &= ~V2D_LOCKOFS_Y;
     v2d->keepofs |= V2D_LOCKOFS_X;
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 5e780d06df0..ed9ea61d255 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -731,8 +731,8 @@ typedef struct SpaceFile {
 /* FileSelectParams.display */
 enum eFileDisplayType {
   FILE_DEFAULTDISPLAY = 0,
-  FILE_SHORTDISPLAY = 1,
-  FILE_LONGDISPLAY = 2,
+  FILE_VERTICALDISPLAY = 1,
+  FILE_HORIZONTALDISPLAY = 2,
   FILE_IMGDISPLAY = 3,
 };
 
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 327158de50d..898c3d107fe 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -5142,16 +5142,16 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
   PropertyRNA *prop;
 
   static const EnumPropertyItem file_display_items[] = {
-      {FILE_SHORTDISPLAY,
-       "LIST_SHORT",
-       ICON_SHORTDISPLAY,
-       "Short List",
-       "Display files as short list"},
-      {FILE_LONGDISPLAY,
-       "LIST_LONG",
-       ICON_LONGDISPLAY,
-       "Long List",
-       "Display files as a detailed list"},
+      {FILE_VERTICALDISPLAY,
+       "LIST_VERTICAL",
+       ICON_SHORTDISPLAY, // * Name of deprecated Short List*
+       "Vertical List",
+       "Display files as a vertical list"},
+      {FILE_HORIZONTALDISPLAY,
+       "LIST_HORIZONTAL",
+       ICON_LONGDISPLAY, // * Name of deprecated Long List*
+       "Horizontal List",
+       "Display files as a horizontal list"},
       {FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
       {0, NULL, 0, NULL, NULL},
   };
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index fd3e7a2d3fc..95b277e0ef4 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -2490,7 +2490,7 @@ void WM_OT_recover_auto_save(wmOperatorType *ot)
                                  FILE_BLENDER,
                                  FILE_OPENFILE,
                                  WM_FILESEL_FILEPATH,
-                                 FILE_LONGDISPLAY,
+                                 FILE_HORIZONTALDISPLAY,
                                  FILE_SORT_TIME);
 }
 
diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c
index c471cb6f922..63886f91471 100644
--- a/source/blender/windowmanager/intern/wm_operator_props.c
+++ b/source/blender/windowmanager/intern/wm_operator_props.c
@@ -65,14 +65,14 @@ void WM_operator_properties_filesel(wmOperatorType *ot,
        0,
        "Default",
        "Automatically determine display type for files"},
-      {FILE_SHORTDISPLAY,
-       "LIST_SHORT",
-       ICON_SHORTDISPLAY,
+      {FILE_VERTICALDISPLAY,
+       "LIST_VERTICAL",
+       ICON_SHORTDISPLAY, // * Name of deprecated Short List*
        "Short List",
        "Display files as short list"},
-      {FILE_LONGDISPLAY,
-       "LIST_LONG",
-       ICON_LONGDISPLAY,
+      {FILE_HORIZONTALDISPLAY,
+       "LIST_HORIZONTAL",
+       ICON_LONGDISPLAY, // * Name of deprecated Long List*
        "Long List",
        "Display files as a detailed list"},
       {FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
diff --git a/source/tools b/source/tools
index aa9cc18913a..4fad0d8ffc9 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit aa9cc18913aca559e932d5b7894e3c222ccffae4
+Subproject commit 4fad0d8ffc9a90e4c6660b3f7512f23cb4a086a7



More information about the Bf-blender-cvs mailing list