bsd compatibility mods
[goodguy/history.git] / cinelerra-5.1 / guicast / bcresources.C
index 521b7740bc087a2560c497b69f25bc07e3cbcd30..e340060099810ba20429b593bceaca7ab9bd80e7 100644 (file)
@@ -242,7 +242,6 @@ suffix_to_type_t BC_Resources::suffix_to_type[] =
     { "mkv", ICON_FILM },
     { "mov", ICON_FILM },
     { "mp4", ICON_FILM },
-    { "m4p", ICON_FILM },
     { "mpe", ICON_FILM },
     { "mpeg", ICON_FILM },
     { "mpg", ICON_FILM },
@@ -348,6 +347,7 @@ VFrame *BC_Resources::default_filebox_newfolder_images[3] = { 0, };
 VFrame *BC_Resources::default_filebox_rename_images[3] = { 0, };
 VFrame *BC_Resources::default_filebox_delete_images[3] = { 0, };
 VFrame *BC_Resources::default_filebox_reload_images[3] = { 0, };
+VFrame *BC_Resources::default_filebox_szfmt_images[12] = { 0, };
 VFrame *BC_Resources::default_listbox_button[4] = { 0, };
 VFrame *BC_Resources::default_listbox_bg = 0;
 VFrame *BC_Resources::default_listbox_expand[5] = { 0, };
@@ -491,59 +491,85 @@ new_vframes(3,default_menubar_data,
 #include "images/file_text_up_png.h"
 #include "images/file_text_hi_png.h"
 #include "images/file_text_dn_png.h"
-#include "images/file_icons_up_png.h"
-#include "images/file_icons_hi_png.h"
-#include "images/file_icons_dn_png.h"
-#include "images/file_newfolder_up_png.h"
-#include "images/file_newfolder_hi_png.h"
-#include "images/file_newfolder_dn_png.h"
-#include "images/file_rename_up_png.h"
-#include "images/file_rename_hi_png.h"
-#include "images/file_rename_dn_png.h"
-#include "images/file_updir_up_png.h"
-#include "images/file_updir_hi_png.h"
-#include "images/file_updir_dn_png.h"
-#include "images/file_delete_up_png.h"
-#include "images/file_delete_hi_png.h"
-#include "images/file_delete_dn_png.h"
-#include "images/file_reload_up_png.h"
-#include "images/file_reload_hi_png.h"
-#include "images/file_reload_dn_png.h"
 new_vframes(3,default_filebox_text_images,
        new VFramePng(file_text_up_png),
        new VFramePng(file_text_hi_png),
        new VFramePng(file_text_dn_png));
 
+#include "images/file_icons_up_png.h"
+#include "images/file_icons_hi_png.h"
+#include "images/file_icons_dn_png.h"
 new_vframes(3,default_filebox_icons_images,
        new VFramePng(file_icons_up_png),
        new VFramePng(file_icons_hi_png),
        new VFramePng(file_icons_dn_png));
 
+#include "images/file_updir_up_png.h"
+#include "images/file_updir_hi_png.h"
+#include "images/file_updir_dn_png.h"
 new_vframes(3,default_filebox_updir_images,
        new VFramePng(file_updir_up_png),
        new VFramePng(file_updir_hi_png),
        new VFramePng(file_updir_dn_png));
 
+#include "images/file_newfolder_up_png.h"
+#include "images/file_newfolder_hi_png.h"
+#include "images/file_newfolder_dn_png.h"
 new_vframes(3,default_filebox_newfolder_images,
        new VFramePng(file_newfolder_up_png),
        new VFramePng(file_newfolder_hi_png),
        new VFramePng(file_newfolder_dn_png));
 
+#include "images/file_rename_up_png.h"
+#include "images/file_rename_hi_png.h"
+#include "images/file_rename_dn_png.h"
 new_vframes(3,default_filebox_rename_images,
        new VFramePng(file_rename_up_png),
        new VFramePng(file_rename_hi_png),
        new VFramePng(file_rename_dn_png));
 
+#include "images/file_delete_up_png.h"
+#include "images/file_delete_hi_png.h"
+#include "images/file_delete_dn_png.h"
 new_vframes(3,default_filebox_delete_images,
        new VFramePng(file_delete_up_png),
        new VFramePng(file_delete_hi_png),
        new VFramePng(file_delete_dn_png));
 
+#include "images/file_reload_up_png.h"
+#include "images/file_reload_hi_png.h"
+#include "images/file_reload_dn_png.h"
 new_vframes(3,default_filebox_reload_images,
        new VFramePng(file_reload_up_png),
        new VFramePng(file_reload_hi_png),
        new VFramePng(file_reload_dn_png));
 
+#include "images/file_size_capb_up_png.h"
+#include "images/file_size_capb_hi_png.h"
+#include "images/file_size_capb_dn_png.h"
+#include "images/file_size_lwrb_up_png.h"
+#include "images/file_size_lwrb_hi_png.h"
+#include "images/file_size_lwrb_dn_png.h"
+#include "images/file_size_semi_up_png.h"
+#include "images/file_size_semi_hi_png.h"
+#include "images/file_size_semi_dn_png.h"
+#include "images/file_size_zero_up_png.h"
+#include "images/file_size_zero_hi_png.h"
+#include "images/file_size_zero_dn_png.h"
+new_vframes(12,default_filebox_szfmt_images,
+       new VFramePng(file_size_zero_up_png),
+       new VFramePng(file_size_zero_hi_png),
+       new VFramePng(file_size_zero_dn_png),
+       new VFramePng(file_size_lwrb_up_png),
+       new VFramePng(file_size_lwrb_hi_png),
+       new VFramePng(file_size_lwrb_dn_png),
+       new VFramePng(file_size_capb_up_png),
+       new VFramePng(file_size_capb_hi_png),
+       new VFramePng(file_size_capb_dn_png),
+       new VFramePng(file_size_semi_up_png),
+       new VFramePng(file_size_semi_hi_png),
+       new VFramePng(file_size_semi_dn_png));
+
 #include "images/listbox_button_dn_png.h"
 #include "images/listbox_button_hi_png.h"
 #include "images/listbox_button_up_png.h"
@@ -733,6 +759,7 @@ new_vframes(20,default_medium_7segment,
        text_default = BLACK;
        highlight_inverse = WHITE ^ BLUE;
        text_background = WHITE;
+       text_background_disarmed = 0xc08080;
        text_background_hi = LTYELLOW;
        text_background_noborder_hi = LTGREY;
        text_background_noborder = -1;
@@ -784,6 +811,8 @@ new_vframes(20,default_medium_7segment,
        filebox_rename_images = default_filebox_rename_images;
        filebox_delete_images = default_filebox_delete_images;
        filebox_reload_images = default_filebox_reload_images;
+       filebox_szfmt_images = default_filebox_szfmt_images;
+       filebox_size_format = FILEBOX_SIZE_RAW;
        directory_color = BLUE;
        file_color = BLACK;
 
@@ -860,6 +889,7 @@ BC_Resources::~BC_Resources()
        del_vframes(default_filebox_rename_images, 3);
        del_vframes(default_filebox_delete_images, 3);
        del_vframes(default_filebox_reload_images, 3);
+       del_vframes(default_filebox_szfmt_images, 12);
        del_vframes(default_listbox_button, 4);
        delete default_listbox_bg;
        del_vframes(default_listbox_expand, 5);
@@ -1346,7 +1376,7 @@ int BC_Resources::init_fontconfig(const char *search_path)
                entry->registry = cstrdup("utf");
                entry->encoding = cstrdup("8");
 
-               if(!FcPatternGetString(font, FC_STYLE, 0, &style) == FcResultMatch)
+               if( FcPatternGetString(font, FC_STYLE, 0, &style) != FcResultMatch )
                        force_style = 0;
 
                // If font has a style unmanaged by titler plugin, force style to be displayed on name