add size numeric format in bcfilebox
[goodguy/history.git] / cinelerra-5.1 / guicast / bcwindowbase.C
index a3719e59b1fab9160bf3da3a98a9e7bd652ebabe..b429da4ca13f1d5b28d7c6a877b03dd5b9159c58 100644 (file)
@@ -2338,6 +2338,9 @@ void BC_WindowBase::init_xft()
 {
 #ifdef HAVE_XFT
        if( !get_resources()->use_xft ) return;
+// apparently, xft is not reentrant, more than this is needed
+static Mutex xft_init_lock("BC_WindowBase::xft_init_lock", 0);
+xft_init_lock.lock("BC_WindowBase::init_xft");
        if(!(smallfont_xft =
                (resources.small_font_xft[0] == '-' ?
                        XftFontOpenXlfd(display, screen, resources.small_font_xft) :
@@ -2407,6 +2410,7 @@ void BC_WindowBase::init_xft()
        }
 // _XftDisplayInfo needs a lock.
        XftDefaultHasRender(display);
+xft_init_lock.unlock();
 #endif // HAVE_XFT
 }
 
@@ -3357,6 +3361,14 @@ int BC_WindowBase::ungrab(BC_WindowBase *window)
        this->grab_active = 0;
        return 1;
 }
+int BC_WindowBase::grab_event_count()
+{
+       int result = 0;
+#ifndef SINGLE_THREAD
+       result = grab_active->get_event_count();
+#endif
+       return result;
+}
 int BC_WindowBase::grab_buttons()
 {
        XSync(top_level->display, False);
@@ -4244,6 +4256,7 @@ int BC_WindowBase::load_defaults(BC_Hash *defaults)
        resources->filebox_columnwidth[1] = defaults->get("FILEBOX_WIDTH1", resources->filebox_columnwidth[1]);
        resources->filebox_columnwidth[2] = defaults->get("FILEBOX_WIDTH2", resources->filebox_columnwidth[2]);
        resources->filebox_columnwidth[3] = defaults->get("FILEBOX_WIDTH3", resources->filebox_columnwidth[3]);
+       resources->filebox_size_format = defaults->get("FILEBOX_SIZE_FORMAT", get_resources()->filebox_size_format);
        defaults->get("FILEBOX_FILTER", resources->filebox_filter);
        return 0;
 }
@@ -4271,6 +4284,7 @@ int BC_WindowBase::save_defaults(BC_Hash *defaults)
        defaults->update("FILEBOX_WIDTH2", resources->filebox_columnwidth[2]);
        defaults->update("FILEBOX_WIDTH3", resources->filebox_columnwidth[3]);
        defaults->update("FILEBOX_FILTER", resources->filebox_filter);
+       defaults->update("FILEBOX_SIZE_FORMAT", get_resources()->filebox_size_format);
        return 0;
 }