2.5 MSVC projectfiles update
authorAndrea Weikert <elubie@gmx.net>
Tue, 26 May 2009 18:54:39 +0000 (18:54 +0000)
committerAndrea Weikert <elubie@gmx.net>
Tue, 26 May 2009 18:54:39 +0000 (18:54 +0000)
- file editors/space_image/image_panels.c -> image_buttons.c (renamed)
- file editors/interface/interface_templates.c added

Also added small fix for crash in filebrowser.

projectfiles_vc9/blender/editors/ED_editors.vcproj
source/blender/editors/space_file/file_draw.c

index 7f3cac8df2a69610a57bbbbdb2b810ed739ab83a..3ed0e772d2ff2224aa5a56cbbcc4e33e21e58b6b 100644 (file)
                                RelativePath="..\..\..\source\blender\editors\interface\interface_style.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\interface\interface_templates.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\interface\interface_utils.c"\r
                                >\r
                <Filter\r
                        Name="space_image"\r
                        >\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\space_image\image_buttons.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\space_image\image_draw.c"\r
                                >\r
                                RelativePath="..\..\..\source\blender\editors\space_image\image_ops.c"\r
                                >\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\..\source\blender\editors\space_image\image_panels.c"\r
-                               >\r
-                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\space_image\image_render.c"\r
                                >\r
index 55b2910f769d9194485d64a569c68a8ef83509fa..1db950c8f972f8000fd443bcb86121e0f6a912f2 100644 (file)
@@ -187,7 +187,7 @@ static float shorten_string(char* string, float w, int flag)
                char *s = string;
                BLI_strncpy(temp, "...", 4);
                pad = file_string_width(temp);
-               while (s && (sw+pad>w)) {
+               while (s && *s && (w > 0) && (sw+pad>w)) {
                        s++;
                        sw = file_string_width(s);
                        shortened = 1;
@@ -200,11 +200,13 @@ static float shorten_string(char* string, float w, int flag)
                }
        } else {
                char *s = string;
-               while (sw>w) {
-                       int slen = strlen(string);
-                       string[slen-1] = '\0';
-                       sw = file_string_width(s);
-                       shortened = 1;
+               if (w>0) {
+                       while (sw>w) {
+                               int slen = strlen(string);
+                               string[slen-1] = '\0';
+                               sw = file_string_width(s);
+                               shortened = 1;
+                       }
                }
                if (shortened) {
                        int slen = strlen(string);