plug leaks, leaker tweaks, lang for effect info, c41 spiffs, wm probe tweaks
authorGood Guy <good1.2guy@gmail.com>
Wed, 16 Aug 2017 21:27:04 +0000 (15:27 -0600)
committerGood Guy <good1.2guy@gmail.com>
Wed, 16 Aug 2017 21:27:04 +0000 (15:27 -0600)
28 files changed:
cinelerra-5.1/cinelerra/awindow.C
cinelerra-5.1/cinelerra/main.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/mwindow.h
cinelerra-5.1/cinelerra/playtransport.C
cinelerra-5.1/cinelerra/renderengine.C
cinelerra-5.1/cinelerra/theme.C
cinelerra-5.1/cinelerra/theme.h
cinelerra-5.1/guicast/bcdisplayinfo.C
cinelerra-5.1/guicast/bcresources.C
cinelerra-5.1/guicast/bcresources.h
cinelerra-5.1/guicast/bctheme.C
cinelerra-5.1/guicast/bctheme.h
cinelerra-5.1/guicast/bcwindowbase.C
cinelerra-5.1/guicast/filesystem.C
cinelerra-5.1/guicast/units.C
cinelerra-5.1/guicast/units.h
cinelerra-5.1/guicast/vframe.C
cinelerra-5.1/plugins/C41/c41.C
cinelerra-5.1/plugins/theme_blond/blondtheme.C
cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C
cinelerra-5.1/plugins/theme_blue/bluetheme.C
cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C
cinelerra-5.1/plugins/theme_bright/brighttheme.C
cinelerra-5.1/plugins/theme_hulk/hulktheme.C
cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C
cinelerra-5.1/plugins/theme_suv/suv.C
cinelerra-5.1/plugins/theme_unflat/unflattheme.C

index bc6ba19375139cce5f0e61c7757498fadd7a4dc1..7e1f56f0d3d29f7f565cfecd7739662214e9e3ab 100644 (file)
@@ -53,6 +53,7 @@ AWindow::~AWindow()
        delete asset_edit;
        delete label_edit;
        delete clip_edit;
+       delete effect_tip;
 }
 
 void AWindow::create_objects()
index 0241780313371c57dc97c304c3f4ebf1646dc07f..e41f0cbe9c9369c28491e70839d9d0264c6c3f0b 100644 (file)
 #include "pluginserver.h"
 #include "preferences.h"
 #include "renderfarmclient.h"
+#include "units.h"
 #include "versioninfo.h"
 
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
 
-#if 0
+#ifdef LEAKER
 #define STRC(v) printf("==new %p from %p sz %jd\n", v, __builtin_return_address(0), n)
 #define STRD(v) printf("==del %p from %p\n", v, __builtin_return_address(0))
 void *operator new(size_t n) { void *vp = malloc(n); STRC(vp); bzero(vp,n); return vp; }
@@ -117,6 +118,7 @@ int main(int argc, char *argv[])
        batch_path[0] = 0;
        deamon_path[0] = 0;
        EDL::id_lock = new Mutex("EDL::id_lock");
+       Units::init();
 
        File::init_cin_path();
        const char *locale_path = File::get_locale_path();
@@ -406,6 +408,7 @@ DISABLE_BUFFER
 
        filenames.remove_all_objects();
        delete EDL::id_lock;  EDL::id_lock = 0;
+       Units::finit();
 
        return 0;
 }
index 6e1ecaa912d094629747dbd28d3c122f03237679..2c0ddff46de8ebc2c648ea7296982172cc6268aa 100644 (file)
@@ -297,6 +297,9 @@ MWindow::~MWindow()
 #endif
        reset_caches();
        dead_plugins->remove_all_objects();
+// must delete theme before destroying plugindb
+//  theme destructor will be deleted by delete_plugins
+       delete theme;           theme = 0;
        delete_plugins();
        finit_error();
        keyframe_threads->remove_all_objects();
@@ -325,7 +328,6 @@ MWindow::~MWindow()
        delete defaults;        defaults = 0;
        delete assets;          assets = 0;
        delete splash_window;   splash_window = 0;
-//     delete theme;           theme = 0;      // deleted by delete_plugins
        if( !edl->Garbage::remove_user() ) edl = 0;
        delete channeldb_buz;
        delete channeldb_v4l2jpeg;
@@ -733,14 +735,14 @@ void MWindow::add_plugins(ArrayList<PluginServer*> &plugins)
        plugins.remove_all();
 }
 
-void MWindow::init_plugin_tips(ArrayList<PluginServer*> &plugins)
+void MWindow::init_plugin_tips(ArrayList<PluginServer*> &plugins, const char *lang)
 {
        const char *cfg_path = File::get_cindat_path();
        char msg_path[BCTEXTLEN];  int txt = 0;
        FILE *fp = 0;
        if( BC_Resources::language[0] ) {
                snprintf(msg_path, sizeof(msg_path), "%s/info/plugins.%s",
-                       cfg_path, BC_Resources::language);
+                       cfg_path, lang);
                fp = fopen(msg_path, "r");
        }
        if( !fp ) {
@@ -2007,7 +2009,7 @@ void MWindow::create_objects(int want_gui,
        if(debug) PRINT_TRACE
        init_ladspa_plugins(this, preferences);
        if(debug) PRINT_TRACE
-       init_plugin_tips(*plugindb);
+       init_plugin_tips(*plugindb, cin_lang);
        if(splash_window)
                splash_window->operation->update(_("Initializing GUI"));
        if(debug) PRINT_TRACE
index 3de297cac87357cfd67a139f40a37be3667a89d4..0bbcfe2c285cc797474d21b26157180a16c24d80 100644 (file)
@@ -647,7 +647,7 @@ public:
        static void get_plugin_path(char *path, const char *plug_dir, const char *fs_path);
        static int init_plugins(MWindow *mwindow, Preferences *preferences);
        static int init_ladspa_plugins(MWindow *mwindow, Preferences *preferences);
-       static void init_plugin_tips(ArrayList<PluginServer*> &plugins);
+       static void init_plugin_tips(ArrayList<PluginServer*> &plugins, const char *lang);
        static int check_plugin_index(ArrayList<PluginServer*> &plugins,
                const char *plug_dir, const char *plug_path);
        static void init_plugin_index(MWindow *mwindow, Preferences *preferences,
index 0774c8a493d1eeb761af2830517e17d25dbc46ad..38a5725f1cc7333d0979afcd6872f957aa978d7e 100644 (file)
@@ -255,7 +255,6 @@ void PlayTransport::handle_transport(int command,
        int resume = 0;
 //printf("PlayTransport::handle_transport 1 %d\n", command);
        int prev_command = engine->command->command;
-       int prev_direction = engine->command->get_direction();
        int prev_single_frame = engine->command->single_frame();
        int prev_audio = engine->command->audio_toggle ?
                 !prev_single_frame : prev_single_frame;
index 4e8bc7de26d189ca8fc36ebf8c3fd5969b2feee5..8ded04e44d2911a61ea53ada36f52412a49d8178 100644 (file)
@@ -86,6 +86,7 @@ RenderEngine::~RenderEngine()
        delete input_lock;
        delete start_lock;
        delete output_lock;
+       delete render_active;
        delete interrupt_lock;
        delete first_frame_lock;
        delete config;
index 1e2b161dd25fd49e403cf863168d36e57fe448e2..20f8b36b886301020b19243196a03e73e2320308 100644 (file)
@@ -66,8 +66,6 @@ Theme::Theme()
        widget_border = 5;
        this->mwindow = 0;
        theme_title = _(DEFAULT_THEME);
-       data_buffer = 0;
-       contents_buffer = 0;
        last_image = 0;
        mtransport_margin = 0;
        toggle_margin = 0;
@@ -187,11 +185,6 @@ Theme::~Theme()
 
 void Theme::flush_images()
 {
-       if(data_buffer) delete [] data_buffer;
-       if(contents_buffer) delete [] contents_buffer;
-       data_buffer = 0;
-       contents_buffer = 0;
-       contents.remove_all();
 }
 
 void Theme::initialize()
index 7b4070a25f70d642ee1c2d8535900b8f1c9c6226..06cb17a7fbacacdbfcf2ca4b8e1b6d5988150a11 100644 (file)
@@ -362,9 +362,6 @@ public:
        MWindow *mwindow;
 // Compressed images are loaded in here.
        char *data_buffer;
-       char *contents_buffer;
-       ArrayList<char*> contents;
-       ArrayList<int> offsets;
        char path[BCTEXTLEN];
        char *last_image;
        int last_offset;
index a7c01e2ca71775b765646464f16150190ffc264e..724d6c442b87733d061af47c6c325f3bcc1e8655 100644 (file)
@@ -64,16 +64,16 @@ void BC_DisplayInfo::parse_geometry(char *geom, int *x, int *y, int *width, int
 
 static void get_top_coords(Display *display, Window win, int &px,int &py, int &tx,int &ty)
 {
-       Window *pcwin;  unsigned int ncwin;
+       Window *pcwin = 0;  unsigned int ncwin = 0;
        Window cwin = 0, pwin = 0, root = 0;
-       int nx=0, ny=0;
        XQueryTree(display, win, &root, &pwin, &pcwin, &ncwin);
        if( pcwin ) XFree(pcwin);
        XTranslateCoordinates(display, pwin, root, 0,0, &px,&py, &cwin);
 //printf(" win=%lx, px/py=%d/%d\n", win, px,py);
 
+       int nx = px, ny = py;  pwin = win;
        for( int i=5; --i>=0; ) {
-               win = pwin;
+               win = pwin;  root = 0;  pwin = 0;  pcwin = 0;  ncwin = 0;
                XQueryTree(display, win, &root, &pwin, &pcwin, &ncwin);
                if( pcwin ) XFree(pcwin);
                if( pwin == root ) break;
index ba67eeffd1da6d7d5ab37a6d34ed3f6038d9d453..e370cbe7f50832e3ce409a728e9f5e359f1cc6d5 100644 (file)
@@ -144,6 +144,34 @@ void BC_Resources::init_font_defs(double scale)
        set_font(large_font_xft2,  default_font_xft2);
        set_font(big_font_xft2,    default_font_xft2);
 }
+void BC_Resources::finit_font_defs()
+{
+       delete [] small_font;
+       delete [] small_font2;
+       delete [] medium_font;
+       delete [] medium_font2;
+       delete [] large_font;
+       delete [] large_font2;
+       delete [] big_font;
+       delete [] big_font2;
+       delete [] small_fontset;
+       delete [] medium_fontset;
+       delete [] large_fontset;
+       delete [] big_fontset;
+       delete [] small_font_xft;
+       delete [] small_b_font_xft;
+       delete [] medium_font_xft;
+       delete [] medium_b_font_xft;
+       delete [] large_font_xft;
+       delete [] large_b_font_xft;
+       delete [] big_font_xft;
+       delete [] big_b_font_xft;
+
+       delete [] small_font_xft2;
+       delete [] medium_font_xft2;
+       delete [] large_font_xft2;
+       delete [] big_font_xft2;
+}
 
 suffix_to_type_t BC_Resources::suffix_to_type[] =
 {
@@ -205,87 +233,50 @@ int BC_Resources::get_machine_cpus()
        return cpus;
 }
 
-BC_Resources::BC_Resources()
-{
-       synchronous = 0;
-       vframe_shm = 0;
-       double default_scale = 1.0; // display_size/1000.;
-       char *env = getenv("BC_FONT_SCALE");
-       font_scale = env ? atof(env) : default_scale;
-       if( font_scale <= 0 ) font_scale = 1;
-       init_font_defs(font_scale);
-       env = getenv("BC_ICON_SCALE");
-       icon_scale = env ? atof(env) : default_scale;
-       if( icon_scale <= 0 ) icon_scale = 1;
-
-       id_lock = new Mutex("BC_Resources::id_lock");
-       create_window_lock = new Mutex("BC_Resources::create_window_lock", 1);
-       id = 0;
-       machine_cpus = get_machine_cpus();
-
-       for(int i = 0; i < FILEBOX_HISTORY_SIZE; i++)
-               filebox_history[i].path[0] = 0;
-
-#ifdef HAVE_XFT
-       XftInitFtLibrary();
-#endif
-
-       little_endian = (*(const u_int32_t*)"\01\0\0\0") & 1;
-       wide_encoding = little_endian ?  "UTF32LE" : "UTF32BE";
-       use_xvideo = 1;
-
 #include "images/file_folder_png.h"
 #include "images/file_unknown_png.h"
 #include "images/file_film_png.h"
 #include "images/file_sound_png.h"
 #include "images/file_label_png.h"
 #include "images/file_column_png.h"
-       static VFrame* default_type_to_icon[] =
-       {
-               new VFramePng(file_folder_png),
-               new VFramePng(file_unknown_png),
-               new VFramePng(file_film_png),
-               new VFramePng(file_sound_png),
-               new VFramePng(file_label_png),
-               new VFramePng(file_column_png)
-       };
-       type_to_icon = default_type_to_icon;
-
+VFrame *BC_Resources::default_type_to_icon[] = {
+       new VFramePng(file_folder_png),
+       new VFramePng(file_unknown_png),
+       new VFramePng(file_film_png),
+       new VFramePng(file_sound_png),
+       new VFramePng(file_label_png),
+       new VFramePng(file_column_png)
+};
 
 #include "images/bar_png.h"
-       static VFrame* default_bar = new VFramePng(bar_png);
-       bar_data = default_bar;
-
+VFrame *BC_Resources::default_bar = new VFramePng(bar_png);
 
 #include "images/cancel_up_png.h"
 #include "images/cancel_hi_png.h"
 #include "images/cancel_dn_png.h"
-       static VFrame* default_cancel_images[] =
-       {
-               new VFramePng(cancel_up_png),
-               new VFramePng(cancel_hi_png),
-               new VFramePng(cancel_dn_png)
-       };
+VFrame *BC_Resources::default_cancel_images[] = {
+       new VFramePng(cancel_up_png),
+       new VFramePng(cancel_hi_png),
+       new VFramePng(cancel_dn_png)
+};
 
 #include "images/ok_up_png.h"
 #include "images/ok_hi_png.h"
 #include "images/ok_dn_png.h"
-       static VFrame* default_ok_images[] =
-       {
-               new VFramePng(ok_up_png),
-               new VFramePng(ok_hi_png),
-               new VFramePng(ok_dn_png)
-       };
+VFrame *BC_Resources::default_ok_images[] = {
+       new VFramePng(ok_up_png),
+       new VFramePng(ok_hi_png),
+       new VFramePng(ok_dn_png)
+};
 
 #include "images/usethis_up_png.h"
 #include "images/usethis_uphi_png.h"
 #include "images/usethis_dn_png.h"
-       static VFrame* default_usethis_images[] =
-       {
-               new VFramePng(usethis_up_png),
-               new VFramePng(usethis_uphi_png),
-               new VFramePng(usethis_dn_png)
-       };
+VFrame *BC_Resources::default_usethis_images[] = {
+       new VFramePng(usethis_up_png),
+       new VFramePng(usethis_uphi_png),
+       new VFramePng(usethis_dn_png)
+};
 
 #if 0
 #include "images/checkbox_checked_png.h"
@@ -293,42 +284,63 @@ BC_Resources::BC_Resources()
 #include "images/checkbox_checkedhi_png.h"
 #include "images/checkbox_up_png.h"
 #include "images/checkbox_hi_png.h"
-       static VFrame* default_checkbox_images[] =
-       {
-               new VFramePng(checkbox_up_png),
-               new VFramePng(checkbox_hi_png),
-               new VFramePng(checkbox_checked_png),
-               new VFramePng(checkbox_dn_png),
-               new VFramePng(checkbox_checkedhi_png)
-       };
+VFrame *BC_Resources::default_checkbox_images[] = {
+       new VFramePng(checkbox_up_png),
+       new VFramePng(checkbox_hi_png),
+       new VFramePng(checkbox_checked_png),
+       new VFramePng(checkbox_dn_png),
+       new VFramePng(checkbox_checkedhi_png)
+};
 
 #include "images/radial_checked_png.h"
 #include "images/radial_dn_png.h"
 #include "images/radial_checkedhi_png.h"
 #include "images/radial_up_png.h"
 #include "images/radial_hi_png.h"
-       static VFrame* default_radial_images[] =
-       {
-               new VFramePng(radial_up_png),
-               new VFramePng(radial_hi_png),
-               new VFramePng(radial_checked_png),
-               new VFramePng(radial_dn_png),
-               new VFramePng(radial_checkedhi_png)
-       };
-
-       static VFrame* default_label_images[] =
-       {
-               new VFramePng(radial_up_png),
-               new VFramePng(radial_hi_png),
-               new VFramePng(radial_checked_png),
-               new VFramePng(radial_dn_png),
-               new VFramePng(radial_checkedhi_png)
-       };
+VFrame *BC_Resources::default_radial_images[] = {
+       new VFramePng(radial_up_png),
+       new VFramePng(radial_hi_png),
+       new VFramePng(radial_checked_png),
+       new VFramePng(radial_dn_png),
+       new VFramePng(radial_checkedhi_png)
+};
+
+VFrame *BC_Resources::default_label_images[] = {
+       new VFramePng(radial_up_png),
+       new VFramePng(radial_hi_png),
+       new VFramePng(radial_checked_png),
+       new VFramePng(radial_dn_png),
+       new VFramePng(radial_checkedhi_png)
+};
 #endif
 
+#include "images/menuitem_up_png.h"
+#include "images/menuitem_hi_png.h"
+#include "images/menuitem_dn_png.h"
+
+VFrame *BC_Resources::default_menuitem_data[] = {
+       new VFramePng(menuitem_up_png),
+       new VFramePng(menuitem_hi_png),
+       new VFramePng(menuitem_dn_png),
+};
+
+#include "images/menubar_up_png.h"
+#include "images/menubar_hi_png.h"
+#include "images/menubar_dn_png.h"
+VFrame *BC_Resources::default_menubar_data[] = {
+       new VFramePng(menubar_up_png),
+       new VFramePng(menubar_hi_png),
+       new VFramePng(menubar_dn_png),
+};
+
+#include "images/menu_popup_bg_png.h"
+VFrame *BC_Resources::default_menu_popup_bg = new VFramePng(menu_popup_bg_png);
+
+#include "images/menubar_bg_png.h"
+VFrame *BC_Resources::default_menu_bar_bg = new VFramePng(menubar_bg_png);
+
 #include "images/check_png.h"
-       static VFrame* default_check_image = new VFramePng(check_png);
-       check = default_check_image;
+VFrame *BC_Resources::default_check_image = new VFramePng(check_png);
 
 #include "images/file_text_up_png.h"
 #include "images/file_text_hi_png.h"
@@ -351,140 +363,105 @@ BC_Resources::BC_Resources()
 #include "images/file_reload_up_png.h"
 #include "images/file_reload_hi_png.h"
 #include "images/file_reload_dn_png.h"
-       static VFrame* default_filebox_text_images[] =
-       {
-               new VFramePng(file_text_up_png),
-               new VFramePng(file_text_hi_png),
-               new VFramePng(file_text_dn_png)
-       };
-
-       static VFrame* default_filebox_icons_images[] =
-       {
-               new VFramePng(file_icons_up_png),
-               new VFramePng(file_icons_hi_png),
-               new VFramePng(file_icons_dn_png)
-       };
+VFrame *BC_Resources::default_filebox_text_images[] = {
+       new VFramePng(file_text_up_png),
+       new VFramePng(file_text_hi_png),
+       new VFramePng(file_text_dn_png)
+};
 
-       static VFrame* default_filebox_updir_images[] =
-       {
-               new VFramePng(file_updir_up_png),
-               new VFramePng(file_updir_hi_png),
-               new VFramePng(file_updir_dn_png)
-       };
+VFrame *BC_Resources::default_filebox_icons_images[] = {
+       new VFramePng(file_icons_up_png),
+       new VFramePng(file_icons_hi_png),
+       new VFramePng(file_icons_dn_png)
+};
 
-       static VFrame* default_filebox_newfolder_images[] =
-       {
-               new VFramePng(file_newfolder_up_png),
-               new VFramePng(file_newfolder_hi_png),
-               new VFramePng(file_newfolder_dn_png)
-       };
+VFrame *BC_Resources::default_filebox_updir_images[] = {
+       new VFramePng(file_updir_up_png),
+       new VFramePng(file_updir_hi_png),
+       new VFramePng(file_updir_dn_png)
+};
 
+VFrame *BC_Resources::default_filebox_newfolder_images[] = {
+       new VFramePng(file_newfolder_up_png),
+       new VFramePng(file_newfolder_hi_png),
+       new VFramePng(file_newfolder_dn_png)
+};
 
-       static VFrame* default_filebox_rename_images[] =
-       {
-               new VFramePng(file_rename_up_png),
-               new VFramePng(file_rename_hi_png),
-               new VFramePng(file_rename_dn_png)
-       };
+VFrame *BC_Resources::default_filebox_rename_images[] = {
+       new VFramePng(file_rename_up_png),
+       new VFramePng(file_rename_hi_png),
+       new VFramePng(file_rename_dn_png)
+};
 
-       static VFrame* default_filebox_delete_images[] =
-       {
-               new VFramePng(file_delete_up_png),
-               new VFramePng(file_delete_hi_png),
-               new VFramePng(file_delete_dn_png)
-       };
+VFrame *BC_Resources::default_filebox_delete_images[] = {
+       new VFramePng(file_delete_up_png),
+       new VFramePng(file_delete_hi_png),
+       new VFramePng(file_delete_dn_png)
+};
 
-       static VFrame* default_filebox_reload_images[] =
-       {
-               new VFramePng(file_reload_up_png),
-               new VFramePng(file_reload_hi_png),
-               new VFramePng(file_reload_dn_png)
-       };
+VFrame *BC_Resources::default_filebox_reload_images[] = {
+       new VFramePng(file_reload_up_png),
+       new VFramePng(file_reload_hi_png),
+       new VFramePng(file_reload_dn_png)
+};
 
 #include "images/listbox_button_dn_png.h"
 #include "images/listbox_button_hi_png.h"
 #include "images/listbox_button_up_png.h"
 #include "images/listbox_button_disabled_png.h"
-       static VFrame* default_listbox_button[] =
-       {
-               new VFramePng(listbox_button_up_png),
-               new VFramePng(listbox_button_hi_png),
-               new VFramePng(listbox_button_dn_png),
-               new VFramePng(listbox_button_disabled_png)
-       };
-       listbox_button = default_listbox_button;
+VFrame *BC_Resources::default_listbox_button[] = {
+       new VFramePng(listbox_button_up_png),
+       new VFramePng(listbox_button_hi_png),
+       new VFramePng(listbox_button_dn_png),
+       new VFramePng(listbox_button_disabled_png)
+};
 
 #include "images/menu_popup_bg_png.h"
-       static VFrame* default_listbox_bg = 0;
-       listbox_bg = default_listbox_bg;
+VFrame *BC_Resources::default_listbox_bg = 0;
 
 #include "images/listbox_expandchecked_png.h"
 #include "images/listbox_expandcheckedhi_png.h"
 #include "images/listbox_expanddn_png.h"
 #include "images/listbox_expandup_png.h"
 #include "images/listbox_expanduphi_png.h"
-       static VFrame* default_listbox_expand[] =
-       {
-               new VFramePng(listbox_expandup_png),
-               new VFramePng(listbox_expanduphi_png),
-               new VFramePng(listbox_expandchecked_png),
-               new VFramePng(listbox_expanddn_png),
-               new VFramePng(listbox_expandcheckedhi_png),
-       };
-       listbox_expand = default_listbox_expand;
+VFrame *BC_Resources::default_listbox_expand[] = {
+       new VFramePng(listbox_expandup_png),
+       new VFramePng(listbox_expanduphi_png),
+       new VFramePng(listbox_expandchecked_png),
+       new VFramePng(listbox_expanddn_png),
+       new VFramePng(listbox_expandcheckedhi_png),
+};
 
 #include "images/listbox_columnup_png.h"
 #include "images/listbox_columnhi_png.h"
 #include "images/listbox_columndn_png.h"
-       static VFrame* default_listbox_column[] =
-       {
-               new VFramePng(listbox_columnup_png),
-               new VFramePng(listbox_columnhi_png),
-               new VFramePng(listbox_columndn_png)
-       };
-       listbox_column = default_listbox_column;
-
+VFrame *BC_Resources::default_listbox_column[] = {
+       new VFramePng(listbox_columnup_png),
+       new VFramePng(listbox_columnhi_png),
+       new VFramePng(listbox_columndn_png)
+};
 
 #include "images/listbox_up_png.h"
-#include "images/listbox_dn_png.h"
-       listbox_up = new VFramePng(listbox_up_png);
-       listbox_dn = new VFramePng(listbox_dn_png);
-       listbox_title_overlap = 0;
-       listbox_title_margin = 0;
-       listbox_title_color = BLACK;
-       listbox_title_hotspot = 5;
+VFrame *BC_Resources::default_listbox_up = new VFramePng(listbox_up_png);
 
-       listbox_border1 = DKGREY;
-       listbox_border2_hi = RED;
-       listbox_border2 = BLACK;
-       listbox_border3_hi = RED;
-       listbox_border3 = MEGREY;
-       listbox_border4 = WHITE;
-       listbox_selected = BLUE;
-       listbox_highlighted = LTGREY;
-       listbox_inactive = WHITE;
-       listbox_text = BLACK;
+#include "images/listbox_dn_png.h"
+VFrame *BC_Resources::default_listbox_dn = new VFramePng(listbox_dn_png);
 
 #include "images/pot_hi_png.h"
 #include "images/pot_up_png.h"
 #include "images/pot_dn_png.h"
-       static VFrame *default_pot_images[] =
-       {
-               new VFramePng(pot_up_png),
-               new VFramePng(pot_hi_png),
-               new VFramePng(pot_dn_png)
-       };
+VFrame *BC_Resources::default_pot_images[] = {
+       new VFramePng(pot_up_png),
+       new VFramePng(pot_hi_png),
+       new VFramePng(pot_dn_png)
+};
 
 #include "images/progress_up_png.h"
 #include "images/progress_hi_png.h"
-       static VFrame* default_progress_images[] =
-       {
-               new VFramePng(progress_up_png),
-               new VFramePng(progress_hi_png)
-       };
-
-       pan_data = 0;
-       pan_text_color = YELLOW;
+VFrame *BC_Resources::default_progress_images[] = {
+       new VFramePng(progress_up_png),
+       new VFramePng(progress_hi_png)
+};
 
 #include "images/7seg_small/0_png.h"
 #include "images/7seg_small/1_png.h"
@@ -506,29 +483,86 @@ BC_Resources::BC_Resources()
 #include "images/7seg_small/f_png.h"
 #include "images/7seg_small/space_png.h"
 #include "images/7seg_small/dash_png.h"
-       static VFrame* default_medium_7segment[] =
-       {
-               new VFramePng(_0_png),
-               new VFramePng(_1_png),
-               new VFramePng(_2_png),
-               new VFramePng(_3_png),
-               new VFramePng(_4_png),
-               new VFramePng(_5_png),
-               new VFramePng(_6_png),
-               new VFramePng(_7_png),
-               new VFramePng(_8_png),
-               new VFramePng(_9_png),
-               new VFramePng(colon_png),
-               new VFramePng(period_png),
-               new VFramePng(a_png),
-               new VFramePng(b_png),
-               new VFramePng(c_png),
-               new VFramePng(d_png),
-               new VFramePng(e_png),
-               new VFramePng(f_png),
-               new VFramePng(space_png),
-               new VFramePng(dash_png)
-       };
+VFrame *BC_Resources::default_medium_7segment[] = {
+       new VFramePng(_0_png),
+       new VFramePng(_1_png),
+       new VFramePng(_2_png),
+       new VFramePng(_3_png),
+       new VFramePng(_4_png),
+       new VFramePng(_5_png),
+       new VFramePng(_6_png),
+       new VFramePng(_7_png),
+       new VFramePng(_8_png),
+       new VFramePng(_9_png),
+       new VFramePng(colon_png),
+       new VFramePng(period_png),
+       new VFramePng(a_png),
+       new VFramePng(b_png),
+       new VFramePng(c_png),
+       new VFramePng(d_png),
+       new VFramePng(e_png),
+       new VFramePng(f_png),
+       new VFramePng(space_png),
+       new VFramePng(dash_png)
+};
+
+
+BC_Resources::BC_Resources()
+{
+       synchronous = 0;
+       vframe_shm = 0;
+       double default_scale = 1.0; // display_size/1000.;
+       char *env = getenv("BC_FONT_SCALE");
+       font_scale = env ? atof(env) : default_scale;
+       if( font_scale <= 0 ) font_scale = 1;
+       init_font_defs(font_scale);
+       env = getenv("BC_ICON_SCALE");
+       icon_scale = env ? atof(env) : default_scale;
+       if( icon_scale <= 0 ) icon_scale = 1;
+
+       id_lock = new Mutex("BC_Resources::id_lock");
+       create_window_lock = new Mutex("BC_Resources::create_window_lock", 1);
+       id = 0;
+       machine_cpus = get_machine_cpus();
+
+       for(int i = 0; i < FILEBOX_HISTORY_SIZE; i++)
+               filebox_history[i].path[0] = 0;
+
+#ifdef HAVE_XFT
+       XftInitFtLibrary();
+#endif
+
+       little_endian = (*(const u_int32_t*)"\01\0\0\0") & 1;
+       wide_encoding = little_endian ?  "UTF32LE" : "UTF32BE";
+       use_xvideo = 1;
+
+       type_to_icon = default_type_to_icon;
+       bar_data = default_bar;
+       check = default_check_image;
+       listbox_button = default_listbox_button;
+       listbox_bg = default_listbox_bg;
+       listbox_expand = default_listbox_expand;
+       listbox_column = default_listbox_column;
+       listbox_up = default_listbox_up;
+       listbox_dn = default_listbox_dn;
+       listbox_title_overlap = 0;
+       listbox_title_margin = 0;
+       listbox_title_color = BLACK;
+       listbox_title_hotspot = 5;
+
+       listbox_border1 = DKGREY;
+       listbox_border2_hi = RED;
+       listbox_border2 = BLACK;
+       listbox_border3_hi = RED;
+       listbox_border3 = MEGREY;
+       listbox_border4 = WHITE;
+       listbox_selected = BLUE;
+       listbox_highlighted = LTGREY;
+       listbox_inactive = WHITE;
+       listbox_text = BLACK;
+
+       pan_data = 0;
+       pan_text_color = YELLOW;
 
        generic_button_margin = 15;
        draw_clock_background=1;
@@ -575,35 +609,9 @@ BC_Resources::BC_Resources()
        menu_up = MECYAN;
        menu_shadow = DKCYAN;
 
-
-#include "images/menuitem_up_png.h"
-#include "images/menuitem_hi_png.h"
-#include "images/menuitem_dn_png.h"
-#include "images/menubar_up_png.h"
-#include "images/menubar_hi_png.h"
-#include "images/menubar_dn_png.h"
-#include "images/menubar_bg_png.h"
-
-       static VFrame *default_menuitem_data[] =
-       {
-               new VFramePng(menuitem_up_png),
-               new VFramePng(menuitem_hi_png),
-               new VFramePng(menuitem_dn_png),
-       };
-       menu_item_bg = default_menuitem_data;
-
-
-       static VFrame *default_menubar_data[] =
-       {
-               new VFramePng(menubar_up_png),
-               new VFramePng(menubar_hi_png),
-               new VFramePng(menubar_dn_png),
-       };
        menu_title_bg = default_menubar_data;
-
-       menu_popup_bg = new VFramePng(menu_popup_bg_png);
-
-       menu_bar_bg = new VFramePng(menubar_bg_png);
+       menu_popup_bg = default_menu_popup_bg;
+       menu_bar_bg = default_menu_bar_bg;
 
        popupmenu_images = 0;
 
@@ -719,8 +727,51 @@ BC_Resources::BC_Resources()
 
 }
 
+static void del_vframes(VFrame **vframes, int n)
+{
+       while( --n >= 0 ) delete vframes[n];
+}
+
 BC_Resources::~BC_Resources()
 {
+       delete id_lock;
+       delete create_window_lock;
+       del_vframes(default_type_to_icon, 6);
+       delete default_bar;
+       del_vframes(default_cancel_images, 3);
+       del_vframes(default_ok_images, 3);
+       del_vframes(default_usethis_images, 3);
+#if 0
+       del_vframes(default_checkbox_images, 5);
+       del_vframes(default_radial_images, 5);
+       del_vframes(default_label_images, 5);
+#endif
+       del_vframes(default_menuitem_data, 3);
+       del_vframes(default_menubar_data, 3);
+       delete default_menu_popup_bg;
+       delete default_menu_bar_bg;
+       delete default_check_image;
+       del_vframes(default_filebox_text_images, 3);
+       del_vframes(default_filebox_icons_images, 3);
+       del_vframes(default_filebox_updir_images, 3);
+       del_vframes(default_filebox_newfolder_images, 3);
+       del_vframes(default_filebox_rename_images, 3);
+       del_vframes(default_filebox_delete_images, 3);
+       del_vframes(default_filebox_reload_images, 3);
+       del_vframes(default_listbox_button, 4);
+       delete default_listbox_bg;
+       del_vframes(default_listbox_expand, 5);
+       del_vframes(default_listbox_column, 3);
+       delete default_listbox_up;
+       delete default_listbox_dn;
+       del_vframes(default_pot_images, 3);
+       del_vframes(default_progress_images, 2);
+       del_vframes(default_medium_7segment, 20);
+       if( fontlist ) {
+               fontlist->remove_all_objects();
+               delete fontlist;
+       }
+       finit_font_defs();
 }
 
 int BC_Resources::initialize_display(BC_WindowBase *window)
index e88e825b4c401f1de94fd05031c96e5a7ccbbfe2..ce8e2403b407fd78fad19d00d6b160ba8ab123d6 100644 (file)
@@ -330,6 +330,7 @@ public:
        static const char *large_font_xft2;
        static const char *big_font_xft2;
        void init_font_defs(double scale);
+       void finit_font_defs();
 
        VFrame **medium_7segment;
 
@@ -359,6 +360,39 @@ public:
        static int find_font_by_char(FT_ULong char_code, char *path_new, const FT_Face oldface);
        static void dump_fonts(FILE *fp = stdout);
 
+// default images
+       static VFrame *default_type_to_icon[];
+       static VFrame *default_bar;
+       static VFrame *default_cancel_images[];
+       static VFrame *default_ok_images[];
+       static VFrame *default_usethis_images[];
+#if 0
+       static VFrame *default_checkbox_images[];
+       static VFrame *default_radial_images[];
+       static VFrame *default_label_images[];
+#endif
+       static VFrame *default_menuitem_data[];
+       static VFrame *default_menubar_data[];
+       static VFrame *default_menu_popup_bg;
+       static VFrame *default_menu_bar_bg;
+       static VFrame *default_check_image;
+       static VFrame *default_filebox_text_images[];
+       static VFrame *default_filebox_icons_images[];
+       static VFrame *default_filebox_updir_images[];
+       static VFrame *default_filebox_newfolder_images[];
+       static VFrame *default_filebox_rename_images[];
+       static VFrame *default_filebox_delete_images[];
+       static VFrame *default_filebox_reload_images[];
+       static VFrame *default_listbox_button[];
+       static VFrame *default_listbox_bg;
+       static VFrame *default_listbox_expand[];
+       static VFrame *default_listbox_column[];
+       static VFrame *default_listbox_up;
+       static VFrame *default_listbox_dn;
+       static VFrame *default_pot_images[];
+       static VFrame *default_progress_images[];
+       static VFrame *default_medium_7segment[];
+
 // Make VFrame use shm
        int vframe_shm;
        int use_vframe_shm() { return use_shm && vframe_shm ? 1 : 0; }
index 06cbff8d139a65aca6453dda08d1a3211d6f0387..a0c898c0cebaa1afabd1a79a5a95521e1b0d20b4 100644 (file)
@@ -41,6 +41,7 @@ BC_Theme::BC_Theme()
 BC_Theme::~BC_Theme()
 {
        image_sets.remove_all_objects();
+       contents.remove_all();
 }
 
 void BC_Theme::dump()
index d36f1ca26ca02820b0f8340377cccc90b8e48b7a..3f56d40181f365fc50de37fe557aca26379bdfc1 100644 (file)
@@ -50,32 +50,32 @@ public:
                const char *up_path,
                const char *hi_path,
                const char *dn_path,
-               const char *title = 0);
+               const char *title);
        VFrame** new_button4(const char *overlay_path,
                const char *up_path,
                const char *hi_path,
                const char *dn_path,
                const char *disabled_path,
-               const char *title = 0);
+               const char *title);
        VFrame** new_button(const char *overlay_path,
                VFrame *up,
                VFrame *hi,
                VFrame *dn,
-               const char *title = 0);
+               const char *title);
        VFrame** new_toggle(const char *overlay_path,
                const char *up_path,
                const char *hi_path,
                const char *checked_path,
                const char *dn_path,
                const char *checkedhi_path,
-               const char *title = 0);
+               const char *title);
        VFrame** new_toggle(const char *overlay_path,
                VFrame *up,
                VFrame *hi,
                VFrame *checked,
                VFrame *dn,
                VFrame *checkedhi,
-               const char *title = 0);
+               const char *title);
 
 
 // The two main routines for creating images are new_image_set and new_image.
index f851f384de0b916e6bb25faa297e7cb8fd5fe169..006bca30343734bfee60f3d9e7b1828772d7cbcc 100644 (file)
@@ -181,9 +181,10 @@ BC_WindowBase::~BC_WindowBase()
                for( int i=sizeof(xfont)/sizeof(xfont[0]); --i>=0; )
                        XFreeFont(display, this->*xfont[i]);
 
-// bug in X causes XRenderExtensionInfo to be damaged if this is done here
-//  left to be done in XCloseDisplay by Xlib.
-#if defined(HAVE_XFT) && 0
+// past bug in X caused XRenderExtensionInfo to be damaged
+// if this is done here. left to be done in XCloseDisplay by Xlib.
+// works in more modern systems, and needed for leak testing.
+#if defined(HAVE_XFT) && defined(VALGRIND)
                static void *BC_WindowBase::*xft_font[] = {
                         &BC_WindowBase::smallfont_xft,
                         &BC_WindowBase::mediumfont_xft,
index 9beef424e09af374686870fbbe94c7d86aa99a54..c58296964a91e8102962f2b9d87773173da3e147 100644 (file)
@@ -481,6 +481,7 @@ int FileSystem::scan_directory(const char *new_dir)
                                delete new_file;
                }
        }
+       closedir(dirstream);
        return 0;
 }
 
index eed940dca20255a42539c02712093f47d1c98b6a..8e24d3efaed6c8b6bbe9325e9b9f1d80d364f916 100644 (file)
@@ -27,7 +27,6 @@
 #include <string.h>
 #include <ctype.h>
 
-float* DB::topower = 0;
 float* DB::topower_base = 0;
 int* Freq::freqtable = 0;
 
@@ -35,18 +34,11 @@ int* Freq::freqtable = 0;
 DB::DB(float infinitygain)
 {
        this->infinitygain = infinitygain;
-       if(!topower) { // db to power table
-               topower_base = new float[(MAXGAIN - INFINITYGAIN) * 10 + 1];
-               topower = topower_base + -INFINITYGAIN * 10;
-               for(int i = INFINITYGAIN * 10; i <= MAXGAIN * 10; i++) {
-                       topower[i] = pow(10, (float)i / 10 / 20);
-//printf("%f %f\n", (float)i/10, topower[i]);
-               }
-               topower[INFINITYGAIN * 10] = 0;   // infinity gain
-       }
-       db = 0;
+       this->db = 0;
+       this->topower = topower_base + -INFINITYGAIN * 10;
 }
 
+
 float DB::fromdb_table()
 {
        return db = topower[(int)(db*10)];
@@ -85,7 +77,6 @@ float DB::todb(float power)
 
 Freq::Freq()
 {
-       if( !freqtable ) init_table();
        freq = 0;
 }
 
@@ -94,30 +85,9 @@ Freq::Freq(const Freq& oldfreq)
        this->freq = oldfreq.freq;
 }
 
-void Freq::init_table()
-{
-       freqtable = new int[TOTALFREQS + 1];
-// starting frequency
-       double freq1 = 27.5, freq2 = 55;
-// Some number divisable by three.  This depends on the value of TOTALFREQS
-       int scale = 105;
-
-       freqtable[0] = 0;
-       for(int i = 1, j = 0; i <= TOTALFREQS; i++, j++) {
-               freqtable[i] = (int)(freq1 + (freq2 - freq1) / scale * j + 0.5);
-//printf("Freq::init_table %d\n", freqtable[i]);
-               if(j >= scale) {
-                       freq1 = freq2;
-                       freq2 *= 2;
-                       j = 0;
-               }
-       }
-}
-
 int Freq::fromfreq()
 {
        int i = 0;
-       if( !freqtable ) init_table();
        while( i<TOTALFREQS && freqtable[i]<freq ) ++i;
        return i;
 };
@@ -125,14 +95,12 @@ int Freq::fromfreq()
 int Freq::fromfreq(int index)
 {
        int i = 0;
-       if( !freqtable ) init_table();
        while( i<TOTALFREQS && freqtable[i]<index ) ++i;
        return i;
 };
 
 int Freq::tofreq(int index)
 {
-       if( !freqtable ) init_table();
        if(index >= TOTALFREQS) index = TOTALFREQS - 1;
        return freqtable[index];
 }
@@ -157,6 +125,35 @@ int Freq::operator!=(Freq &newfreq) { return freq != newfreq.freq; }
 int Freq::operator==(Freq &newfreq) { return freq == newfreq.freq; }
 int Freq::operator==(int newfreq) { return freq == newfreq; }
 
+
+
+void Units::init()
+{
+       DB::topower_base = new float[(MAXGAIN - INFINITYGAIN) * 10 + 1];
+       float *topower = DB::topower_base + -INFINITYGAIN * 10;
+       for(int i = INFINITYGAIN * 10; i <= MAXGAIN * 10; i++)
+               topower[i] = pow(10, (float)i / 10 / 20);
+       topower[INFINITYGAIN * 10] = 0;   // infinity gain
+
+       Freq::freqtable = new int[TOTALFREQS + 1];
+// starting frequency
+       double freq1 = 27.5, freq2 = 55;
+// Some number divisable by three.  This depends on the value of TOTALFREQS
+       int scale = 105;
+
+       Freq::freqtable[0] = 0;
+       for(int i = 1, j = 0; i <= TOTALFREQS; i++, j++) {
+               Freq::freqtable[i] = (int)(freq1 + (freq2 - freq1) / scale * j + 0.5);
+               if(j < scale) continue;
+               freq1 = freq2;  freq2 *= 2;  j = 0;
+       }
+}
+void Units::finit()
+{
+       delete [] DB::topower_base;  DB::topower_base = 0;
+       delete [] Freq::freqtable;   Freq::freqtable = 0;
+}
+
 // give text representation as time
 char* Units::totext(char *text, double seconds, int time_format,
                        int sample_rate, float frame_rate, float frames_per_foot)
index 7f24d777193a5b5b1a1918f32aff65e93b8f50f0..7456b662de9e5c62a38696fc86af14a5f4fd8fbf 100644 (file)
 #define TIME_MS2 10
 #define TIME_MS2_TEXT _("Minutes:Seconds")
 
+class Units;
+
 class DB
 {
+       friend class Units;
 public:
        DB(float infinitygain = INFINITYGAIN);
        virtual ~DB() {};
@@ -98,16 +101,17 @@ public:
        inline int operator==(DB &newdb) { return db == newdb.db; };
        inline int operator==(int newdb) { return db == newdb; };
 
-       static float *topower, *topower_base;
+       float *topower;
        float db;
        float infinitygain;
  private:
-       static float *allocated;
+       static float *topower_base;
 };
 
 // Third octave frequency table
 class Freq
 {
+       friend class Units;
 public:
        Freq();
        Freq(const Freq& oldfreq);
@@ -143,6 +147,8 @@ class Units
 {
 public:
        Units() {};
+       static void init();
+       static void finit();
 
        static int timeformat_totype(char *tcf);
 
index 25dd05eca6fd90334899ebe46a6024535e8bbe66..fdd24ce02a35f85e8a6b46552961c9272a203057 100644 (file)
@@ -304,6 +304,11 @@ int VFrame::clear_objects(int do_opengl)
                pbuffer = 0;
        }
 
+#ifdef LEAKER
+if( memory_type != VFrame::SHARED )
+  printf("==del %p from %p\n", data, __builtin_return_address(0));
+#endif
+
 // Delete data
        switch(memory_type)
        {
@@ -522,6 +527,9 @@ int VFrame::allocate_data(unsigned char *data, int shmid,
 
                if(!this->data)
                        printf("VFrame::allocate_data %dx%d: memory exhausted.\n", this->w, this->h);
+#ifdef LEAKER
+printf("==new %p from %p sz %d\n", this->data, __builtin_return_address(0), size);
+#endif
 
 //printf("VFrame::allocate_data %d %p data=%p %d %d\n", __LINE__, this, this->data, this->w, this->h);
 //if(size > 1000000) printf("VFrame::allocate_data %d\n", size);
@@ -930,12 +938,9 @@ int VFrame::clear_frame()
 void VFrame::rotate90()
 {
 // Allocate new frame
-       int new_w = h, new_h = w, new_bytes_per_line = bytes_per_pixel * new_w;
-       unsigned char *new_data = new unsigned char[calculate_data_size(new_w, new_h, new_bytes_per_line, color_model)];
-       unsigned char **new_rows = new unsigned char*[new_h];
-       for(int i = 0; i < new_h; i++)
-               new_rows[i] = &new_data[new_bytes_per_line * i];
-
+       int new_w = h, new_h = w;
+       VFrame new_frame(new_w, new_h, color_model);
+       unsigned char **new_rows = new_frame.get_rows();
 // Copy data
        for(int in_y = 0, out_x = new_w - 1; in_y < h; in_y++, out_x--)
        {
@@ -950,23 +955,34 @@ void VFrame::rotate90()
        }
 
 // Swap frames
-       clear_objects(0);
+// swap memory
+       unsigned char *new_data = new_frame.data;
+       new_frame.data = data;
        data = new_data;
+// swap rows
+       new_rows = new_frame.rows;
+       new_frame.rows = rows;
        rows = new_rows;
-       bytes_per_line = new_bytes_per_line;
-       w = new_w;
-       h = new_h;
+// swap shmid
+       int new_shmid = new_frame.shmid;
+       new_frame.shmid = shmid;
+       shmid = new_shmid;
+// swap bytes_per_line
+       int new_bpl = new_frame.bytes_per_line;
+       new_frame.bytes_per_line = bytes_per_line;
+       bytes_per_line = new_bpl;
+       new_frame.clear_objects(0);
+
+       w = new_frame.w;
+       h = new_frame.h;
 }
 
 void VFrame::rotate270()
 {
 // Allocate new frame
-       int new_w = h, new_h = w, new_bytes_per_line = bytes_per_pixel * new_w;
-       unsigned char *new_data = new unsigned char[calculate_data_size(new_w, new_h, new_bytes_per_line, color_model)];
-       unsigned char **new_rows = new unsigned char*[new_h];
-       for(int i = 0; i < new_h; i++)
-               new_rows[i] = &new_data[new_bytes_per_line * i];
-
+       int new_w = h, new_h = w;
+       VFrame new_frame(new_w, new_h, color_model);
+       unsigned char **new_rows = new_frame.get_rows();
 // Copy data
        for(int in_y = 0, out_x = 0; in_y < h; in_y++, out_x++)
        {
@@ -981,12 +997,26 @@ void VFrame::rotate270()
        }
 
 // Swap frames
-       clear_objects(0);
+// swap memory
+       unsigned char *new_data = new_frame.data;
+       new_frame.data = data;
        data = new_data;
+// swap rows
+       new_rows = new_frame.rows;
+       new_frame.rows = rows;
        rows = new_rows;
-       bytes_per_line = new_bytes_per_line;
-       w = new_w;
-       h = new_h;
+// swap shmid
+       int new_shmid = new_frame.shmid;
+       new_frame.shmid = shmid;
+       shmid = new_shmid;
+// swap bytes_per_line
+       int new_bpl = new_frame.bytes_per_line;
+       new_frame.bytes_per_line = bytes_per_line;
+       bytes_per_line = new_bpl;
+       new_frame.clear_objects(0);
+
+       w = new_frame.w;
+       h = new_frame.h;
 }
 
 void VFrame::flip_vert()
index 46276f17bb9db7bbb66de2344232e859ddb4830a..b7160b75c79cdd233c25a7c3c2d3956a8e405844 100644 (file)
@@ -165,7 +165,7 @@ int C41Button::handle_event()
 
 
 C41BoxButton::C41BoxButton(C41Effect *plugin, C41Window *window, int x, int y)
- : BC_GenericButton(x, y, _("Apply box"))
+ : BC_GenericButton(x, y, _("Apply default box"))
 {
        this->plugin = plugin;
        this->window = window;
@@ -267,11 +267,11 @@ C41Window::C41Window(C41Effect *plugin)
        add_subwindow(gamma_b = new BC_Title(x + 80, y, "0.0000"));
        y += 30;
 
-       add_subwindow(new BC_Title(x, y, _("Coef 1:")));
+       add_subwindow(new BC_Title(x, y, _("Contrast:")));
        add_subwindow(coef1 = new BC_Title(x + 80, y, "0.0000"));
        y += 30;
 
-       add_subwindow(new BC_Title(x, y, _("Coef 2:")));
+       add_subwindow(new BC_Title(x, y, _("Brightness:")));
        add_subwindow(coef2 = new BC_Title(x + 80, y, "0.0000"));
        y += 30;
 
@@ -334,12 +334,12 @@ C41Window::C41Window(C41Effect *plugin)
                 &plugin->config.fix_gamma_b, x + 80, y));
        y += 30;
 
-       add_subwindow(new BC_Title(x, y, _("Coef 1:")));
+       add_subwindow(new BC_Title(x, y, _("Contrast:")));
        add_subwindow(fix_coef1 = new C41TextBox(plugin,
                 &plugin->config.fix_coef1, x + 80, y));
        y += 30;
 
-       add_subwindow(new BC_Title(x, y, _("Coef 2:")));
+       add_subwindow(new BC_Title(x, y, _("Brightness:")));
        add_subwindow(fix_coef2 = new C41TextBox(plugin,
                 &plugin->config.fix_coef2, x + 80, y));
        y += 30;
@@ -793,40 +793,44 @@ int C41Effect::process_realtime(VFrame *input, VFrame *output)
        }
 
        if( config.show_box ) {
-               float **rows = (float **)frame->get_rows();
-               if( min_row < max_row - 1 ) {
-                       float *row1 = (float *)rows[min_row];
-                       float *row2 = (float *)rows[max_row - 1];
-
-                       for( int i = 0; i < frame_w; i++ ) {
-                               for( int j = 0; j < 3; j++ ) {
-                                       row1[j] = pix_max - row1[j];
-                                       row2[j] = pix_max - row2[j];
-                               }
-                               if( has_alpha ) {
-                                       row1[3] = pix_max;
-                                       row2[3] = pix_max;
+               EDLSession *session = get_edlsession();
+               int line_w = bmax(session->output_w,session->output_h) / 600 + 1;
+               for( int j=0; j<line_w; ++j ) {
+                       float **rows = (float **)frame->get_rows();
+                       if( min_row < max_row - 1 ) {
+                               float *row1 = (float *)rows[min_row+j];
+                               float *row2 = (float *)rows[max_row-j - 1];
+
+                               for( int i = 0; i < frame_w; i++ ) {
+                                       for( int j = 0; j < 3; j++ ) {
+                                               row1[j] = pix_max - row1[j];
+                                               row2[j] = pix_max - row2[j];
+                                       }
+                                       if( has_alpha ) {
+                                               row1[3] = pix_max;
+                                               row2[3] = pix_max;
+                                       }
+                                       row1 += pix_len;
+                                       row2 += pix_len;
                                }
-                               row1 += pix_len;
-                               row2 += pix_len;
                        }
-               }
 
-               if( min_col < max_col - 1 ) {
-                       int pix1 = pix_len * min_col;
-                       int pix2 = pix_len * (max_col - 1);
-
-                       for( int i = 0; i < frame_h; i++ ) {
-                               float *row1 = rows[i] + pix1;
-                               float *row2 = rows[i] + pix2;
-
-                               for( int j = 0; j < 3; j++ ) {
-                                       row1[j] = pix_max - row1[j];
-                                       row2[j] = pix_max - row2[j];
-                               }
-                               if( has_alpha ) {
-                                       row1[3] = pix_max;
-                                       row2[3] = pix_max;
+                       if( min_col < max_col - 1 ) {
+                               int pix1 = pix_len * min_col+j;
+                               int pix2 = pix_len * (max_col-j - 1);
+
+                               for( int i = 0; i < frame_h; i++ ) {
+                                       float *row1 = rows[i] + pix1;
+                                       float *row2 = rows[i] + pix2;
+
+                                       for( int j = 0; j < 3; j++ ) {
+                                               row1[j] = pix_max - row1[j];
+                                               row2[j] = pix_max - row2[j];
+                                       }
+                                       if( has_alpha ) {
+                                               row1[3] = pix_max;
+                                               row2[3] = pix_max;
+                                       }
                                }
                        }
                }
index e208269add8bcaeb05a8acfaf6fc4c7c6eb3ac5c..a984a92fff43ffb40ea601762fed8cfac3ff4596 100644 (file)
@@ -218,49 +218,58 @@ void BlondTheme::initialize()
        resources->filebox_icons_images = new_button("icons.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_icons");
 
        resources->filebox_text_images = new_button("text.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_text");
 
        resources->filebox_newfolder_images = new_button("folder.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_newfolder");
 
        resources->filebox_rename_images = new_button("rename.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_rename");
 
        resources->filebox_updir_images = new_button("updir.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_updir");
 
        resources->filebox_delete_images = new_button("delete.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_delete");
 
        resources->filebox_reload_images = new_button("reload.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_reload");
 
 
        resources->filebox_descend_images = new_button("openfolder.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "filebox_descend");
 
        resources->usethis_button_images =
                resources->ok_images = new_button("ok.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "ok_button");
 
        new_button("ok.png",
                "new_bigbutton_up.png",
@@ -271,7 +280,8 @@ void BlondTheme::initialize()
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "cancel_button");
 
        new_button("cancel.png",
                "new_bigbutton_up.png",
@@ -359,7 +369,8 @@ void BlondTheme::initialize()
                "editpanel_up.png",
                "editpanel_hi.png",
                "editpanel_dn.png",
-               "editpanel_hi.png");
+               "editpanel_hi.png",
+               "listbox_button");
        resources->listbox_column = new_image_set(3,
                "column_up.png",
                "column_hi.png",
@@ -699,12 +710,12 @@ void BlondTheme::initialize()
        new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
        new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
        new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
-       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
-       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
+       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
+       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
        new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
        new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
        new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
-       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
+       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
        new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
        new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
        new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
index ff4bef774ed38a335cbb25799d59ea81d64f931e..82efb7b4300ec5a443da2472c76ae25c23de014b 100644 (file)
@@ -253,18 +253,13 @@ void BlondCVTheme::initialize()
        resources->ok_images = new_button("ok.png",
                        "generic_up.png",
                        "generic_hi.png",
-                       "generic_dn.png");
+                       "generic_dn.png",
+                       "ok_button");
 
        resources->dirbox_margin = 50;
        resources->filebox_margin = 101;
        resources->file_color = 0x000000;
        resources->directory_color = 0x0000ff;
-       resources->cancel_images = new_button("cancel.png",
-                       "generic_up.png",
-                       "generic_hi.png",
-                       "generic_dn.png");
-
-
 
 // Record windows
        rgui_batch = new_image("recordgui_batch.png");
@@ -276,44 +271,58 @@ void BlondCVTheme::initialize()
        resources->filebox_icons_images = new_button("icons.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_icons");
 
        resources->filebox_text_images = new_button("text.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_text");
 
        resources->filebox_newfolder_images = new_button("folder.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_newfolder");
+
+       resources->filebox_rename_images = new_button("rename.png",
+               "fileboxbutton_up.png",
+               "fileboxbutton_hi.png",
+               "fileboxbutton_dn.png",
+               "filebox_rename");
 
        resources->filebox_updir_images = new_button("updir.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_updir");
 
        resources->filebox_delete_images = new_button("delete.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_delete");
 
        resources->filebox_reload_images = new_button("reload.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_reload");
 
 
        resources->filebox_descend_images = new_button("openfolder.png",
                "generic_up.png",
                "generic_hi.png",
-               "generic_dn.png");
+               "generic_dn.png",
+               "filebox_descend");
 
        resources->usethis_button_images =
                resources->ok_images = new_button("ok.png",
                "generic_up.png",
                "generic_hi.png",
-               "generic_dn.png");
+               "generic_dn.png",
+               "ok_button");
 
        new_button("ok.png",
                "generic_up.png",
@@ -324,7 +333,8 @@ void BlondCVTheme::initialize()
        resources->cancel_images = new_button("cancel.png",
                "generic_up.png",
                "generic_hi.png",
-               "generic_dn.png");
+               "generic_dn.png",
+               "cancel_button");
 
        new_button("cancel.png",
                "generic_up.png",
@@ -672,15 +682,15 @@ void BlondCVTheme::initialize()
        new_button("middle_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "middle_justify");
        new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
        new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
-       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
-       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
+       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
+       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
        new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
        new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
         new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
         new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
        new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
        new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
-       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
+       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
        new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
        new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
        new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
index 254a10b85bd4e2712363125ec8fa53ae6f3a169e..612c7ec2e9db9d7ddedecafa805b7bc375308137 100644 (file)
@@ -218,49 +218,58 @@ void BlueDotTheme::initialize()
        resources->filebox_icons_images = new_button("icons.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_icons");
 
        resources->filebox_text_images = new_button("text.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_text");
 
        resources->filebox_newfolder_images = new_button("folder.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_newfolder");
 
        resources->filebox_rename_images = new_button("rename.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_rename");
 
        resources->filebox_updir_images = new_button("updir.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_updir");
 
        resources->filebox_delete_images = new_button("delete.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_delete");
 
        resources->filebox_reload_images = new_button("reload.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_reload");
 
 
        resources->filebox_descend_images = new_button("openfolder.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "filebox_descend");
 
        resources->usethis_button_images =
                resources->ok_images = new_button("ok.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "ok_button");
 
        new_button("ok.png",
                "new_bigbutton_up.png",
@@ -271,7 +280,8 @@ void BlueDotTheme::initialize()
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "cancel_button");
 
        new_button("cancel.png",
                "new_bigbutton_up.png",
@@ -359,7 +369,8 @@ void BlueDotTheme::initialize()
                "editpanel_up.png",
                "editpanel_hi.png",
                "editpanel_dn.png",
-               "editpanel_hi.png");
+               "editpanel_hi.png",
+               "listbox_button");
        resources->listbox_column = new_image_set(3,
                "column_up.png",
                "column_hi.png",
@@ -699,12 +710,12 @@ void BlueDotTheme::initialize()
        new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
        new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
        new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
-       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
-       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
+       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
+       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
        new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
        new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
        new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
-       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
+       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
        new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
        new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
        new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
index 5d6e3ef21ace264a4b69a0a5365ad21a9ee86e2a..48d4a728d9174a75698599c876a43c6e9ed80e27 100644 (file)
@@ -279,7 +279,8 @@ void BlueDotTheme::initialize()
                resources->ok_images = new_button("ok.png",
                "generic_up.png",
                "generic_hi.png",
-               "generic_dn.png");
+               "generic_dn.png",
+               "ok_button");
 
        new_button("ok.png",
                "generic_up.png",
@@ -290,7 +291,8 @@ void BlueDotTheme::initialize()
        resources->cancel_images = new_button("cancel.png",
                "generic_up.png",
                "generic_hi.png",
-               "generic_dn.png");
+               "generic_dn.png",
+               "cancel_button");
 
        new_button("cancel.png",
                "generic_up.png",
@@ -705,15 +707,15 @@ void BlueDotTheme::initialize()
        new_button("nextlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "nextlabel");
        new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
 //     outdelete_data = new_button("clearoutpoint.png", editpanel_up, editpanel_hi, editpanel_dn);   //Specific to BD
-       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
-       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
+       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
+       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
        new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
        new_button("prevlabel.png", editpanel_up, editpanel_hi, editpanel_dn, "prevlabel");
        new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
        new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
        new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
        new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
-       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
+       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
        new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
        new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
        new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
index 05388641594c6e6c87f9ab2a837a45d1356dccab..f93920353129c622fb5ec057a9f803088dc69727 100644 (file)
@@ -221,53 +221,61 @@ void BrightTheme::initialize()
                "loadmode_nested");
 
 
-
        resources->filebox_icons_images = new_button("icons.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_icons");
 
        resources->filebox_text_images = new_button("text.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_text");
 
        resources->filebox_newfolder_images = new_button("folder.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_newfolder");
 
        resources->filebox_rename_images = new_button("rename.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_rename");
 
        resources->filebox_updir_images = new_button("updir.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_updir");
 
        resources->filebox_delete_images = new_button("delete.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_delete");
 
        resources->filebox_reload_images = new_button("reload.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_reload");
 
 
        resources->filebox_descend_images = new_button("openfolder.png",
                "bigbutton_up.png",
                "bigbutton_hi.png",
-               "bigbutton_dn.png");
+               "bigbutton_dn.png",
+               "filebox_descend");
 
        resources->usethis_button_images =
                resources->ok_images = new_button("ok.png",
                "bigbutton_up.png",
                "bigbutton_hi.png",
-               "bigbutton_dn.png");
+               "bigbutton_dn.png",
+               "ok_button");
 
        new_button("ok.png",
                "bigbutton_up.png",
@@ -278,7 +286,8 @@ void BrightTheme::initialize()
        resources->cancel_images = new_button("cancel.png",
                "bigbutton_up.png",
                "bigbutton_hi.png",
-               "bigbutton_dn.png");
+               "bigbutton_dn.png",
+               "cancel_button");
 
        new_button("cancel.png",
                "bigbutton_up.png",
@@ -362,7 +371,8 @@ void BrightTheme::initialize()
                "editpanel_up.png",
                "editpanel_hi.png",
                "editpanel_dn.png",
-               "editpanel_hi.png");
+               "editpanel_hi.png",
+               "listbox_button");
        resources->listbox_column = new_image_set(3,
                "column_up.png",
                "column_hi.png",
@@ -704,12 +714,12 @@ void BrightTheme::initialize()
        new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
        new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
        new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
-       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
-       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
+       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
+       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
        new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
        new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
        new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
-       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
+       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
        new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
        new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
        new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
index 57ada334709ab0e6095128f7c67d0eeca38870d9..e5b1829c93ef06f09c88a8c6ffd74fd4e0551d75 100644 (file)
@@ -219,49 +219,58 @@ void HULKTHEME::initialize()
        resources->filebox_icons_images = new_button("icons.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_icons");
 
        resources->filebox_text_images = new_button("text.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_text");
 
        resources->filebox_newfolder_images = new_button("folder.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_newfolder");
 
        resources->filebox_rename_images = new_button("rename.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_rename");
 
        resources->filebox_updir_images = new_button("updir.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_updir");
 
        resources->filebox_delete_images = new_button("delete.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_delete");
 
        resources->filebox_reload_images = new_button("reload.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_reload");
 
 
        resources->filebox_descend_images = new_button("openfolder.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "filebox_descend");
 
        resources->usethis_button_images =
                resources->ok_images = new_button("ok.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "ok_button");
 
        new_button("ok.png",
                "new_bigbutton_up.png",
@@ -272,7 +281,8 @@ void HULKTHEME::initialize()
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "cancel_button");
 
        new_button("cancel.png",
                "new_bigbutton_up.png",
@@ -360,7 +370,8 @@ void HULKTHEME::initialize()
                "editpanel_up.png",
                "editpanel_hi.png",
                "editpanel_dn.png",
-               "editpanel_hi.png");
+               "editpanel_hi.png",
+               "listbox_button");
        resources->listbox_column = new_image_set(3,
                "column_up.png",
                "column_hi.png",
@@ -700,12 +711,12 @@ void HULKTHEME::initialize()
        new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
        new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
        new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
-       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
-       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
+       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
+       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
        new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
        new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
        new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
-       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
+       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
        new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
        new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
        new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
index 926b94294dd444e8069e46157e426e436621411b..3b47f7ea36e879da43ca9690df08396f82113f18 100644 (file)
@@ -204,49 +204,58 @@ void PINKLADY::initialize()
        resources->filebox_icons_images = new_button("icons.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_icons");
 
        resources->filebox_text_images = new_button("text.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_text");
 
        resources->filebox_newfolder_images = new_button("folder.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_newfolder");
 
        resources->filebox_rename_images = new_button("rename.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_rename");
 
        resources->filebox_updir_images = new_button("updir.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_updir");
 
        resources->filebox_delete_images = new_button("delete.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_delete");
 
        resources->filebox_reload_images = new_button("reload.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_reload");
 
 
        resources->filebox_descend_images = new_button("openfolder.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "filebox_descend");
 
        resources->usethis_button_images =
                resources->ok_images = new_button("ok.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "ok_button");
 
        new_button("ok.png",
                "new_bigbutton_up.png",
@@ -257,7 +266,8 @@ void PINKLADY::initialize()
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "cancel_button");
 
        new_button("cancel.png",
                "new_bigbutton_up.png",
@@ -345,7 +355,8 @@ void PINKLADY::initialize()
                "editpanel_up.png",
                "editpanel_hi.png",
                "editpanel_dn.png",
-               "editpanel_hi.png");
+               "editpanel_hi.png",
+               "listbox_button");
        resources->listbox_column = new_image_set(3,
                "column_up.png",
                "column_hi.png",
@@ -685,12 +696,12 @@ void PINKLADY::initialize()
        new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
        new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
        new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
-       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
-       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
+       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
+       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
        new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
        new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
        new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
-       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
+       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
        new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
        new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
        new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
index bd7a163fb284c2af2a53a1cc39fe2305f6e93994..8e12ad39ce2cb2a5b2ab9300e5f65e5c7d2f4707 100644 (file)
@@ -213,53 +213,61 @@ void SUV::initialize()
                "loadmode_nested");
 
 
-
        resources->filebox_icons_images = new_button("icons.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_icons");
 
        resources->filebox_text_images = new_button("text.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_text");
 
        resources->filebox_newfolder_images = new_button("folder.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_newfolder");
 
        resources->filebox_rename_images = new_button("rename.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_rename");
 
        resources->filebox_updir_images = new_button("updir.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_updir");
 
        resources->filebox_delete_images = new_button("delete.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_delete");
 
        resources->filebox_reload_images = new_button("reload.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_reload");
 
 
        resources->filebox_descend_images = new_button("openfolder.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "filebox_descend");
 
        resources->usethis_button_images =
                resources->ok_images = new_button("ok.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "ok_button");
 
        new_button("ok.png",
                "new_bigbutton_up.png",
@@ -270,7 +278,8 @@ void SUV::initialize()
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "cancel_button");
 
        new_button("cancel.png",
                "new_bigbutton_up.png",
@@ -358,7 +367,8 @@ void SUV::initialize()
                "editpanel_up.png",
                "editpanel_hi.png",
                "editpanel_dn.png",
-               "editpanel_hi.png");
+               "editpanel_hi.png",
+               "listbox_button");
        resources->listbox_column = new_image_set(3,
                "column_up.png",
                "column_hi.png",
@@ -688,12 +698,12 @@ void SUV::initialize()
        new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
        new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
        new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
-       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
-       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
+       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn, "overbutton");
+       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn, "overwritebutton");
        new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
        new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
        new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
-       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
+       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
        new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
        new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
        new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
index 699ae0b6df986119c97870e19bfcf4e5e9860d31..1f3b5bf58938f0e6b2ab4ef512d9b4ff1d12cfe1 100644 (file)
@@ -213,49 +213,58 @@ void UNFLATTHEME::initialize()
        resources->filebox_icons_images = new_button("icons.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_icons");
 
        resources->filebox_text_images = new_button("text.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_text");
 
        resources->filebox_newfolder_images = new_button("folder.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_newfolder");
 
        resources->filebox_rename_images = new_button("rename.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_rename");
 
        resources->filebox_updir_images = new_button("updir.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_updir");
 
        resources->filebox_delete_images = new_button("delete.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_delete");
 
        resources->filebox_reload_images = new_button("reload.png",
                "fileboxbutton_up.png",
                "fileboxbutton_hi.png",
-               "fileboxbutton_dn.png");
+               "fileboxbutton_dn.png",
+               "filebox_reload");
 
 
        resources->filebox_descend_images = new_button("openfolder.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "filebox_descend");
 
        resources->usethis_button_images =
                resources->ok_images = new_button("ok.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "ok_button");
 
        new_button("ok.png",
                "new_bigbutton_up.png",
@@ -266,7 +275,8 @@ void UNFLATTHEME::initialize()
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
-               "filebox_bigbutton_dn.png");
+               "filebox_bigbutton_dn.png",
+               "cancel_button");
 
        new_button("cancel.png",
                "new_bigbutton_up.png",
@@ -354,7 +364,8 @@ void UNFLATTHEME::initialize()
                "editpanel_up.png",
                "editpanel_hi.png",
                "editpanel_dn.png",
-               "editpanel_hi.png");
+               "editpanel_hi.png",
+               "listbox_button");
        resources->listbox_column = new_image_set(3,
                "column_up.png",
                "column_hi.png",
@@ -694,12 +705,12 @@ void UNFLATTHEME::initialize()
        new_button("nextedit.png", editpanel_up, editpanel_hi, editpanel_dn, "nextedit");
        new_button("prevedit.png", editpanel_up, editpanel_hi, editpanel_dn, "prevedit");
        new_button("outpoint.png", editpanel_up, editpanel_hi, editpanel_dn, "outbutton");
-       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn);
-       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn);
+       over_button = new_button("over.png", editpanel_up, editpanel_hi, editpanel_dn,"overbutton");
+       overwrite_data = new_button("overwrite.png", editpanel_up, editpanel_hi, editpanel_dn,"overwritebutton");
        new_button("paste.png", editpanel_up, editpanel_hi, editpanel_dn, "paste");
        new_button("redo.png", editpanel_up, editpanel_hi, editpanel_dn, "redo");
        new_button("right_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "right_justify");
-       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn);
+       splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn,"splicebutton");
        new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
        new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
        new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");