add transition caching with pref, rev read frame caching, cache lock tweaks, fix...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / preferences.C
index 4e739e85d8d4feb854ca767195ee51d90c1a9e37..9800fceec14100454dca4b53eb2fe72522c4ef4f 100644 (file)
@@ -59,6 +59,7 @@ Preferences::Preferences()
        if( strlen(index_directory) )
                fs.complete_path(index_directory);
        cache_size = 0x10000000;
+       cache_transitions = 1;
        index_size = 0x400000;
        index_count = 500;
        use_thumbnails = 1;
@@ -74,6 +75,7 @@ Preferences::Preferences()
        vicon_size = 50;
        vicon_color_mode = VICON_COLOR_MODE_LOW;
        theme[0] = 0;
+       strcpy(locale, DEFAULT_LOCALE);
        plugin_icons[0] = 0;
        strcpy(snapshot_path, DEFAULT_SNAPSHOT_PATH);
        use_renderfarm = 0;
@@ -96,7 +98,7 @@ Preferences::Preferences()
        bd_warn_root = 1;
        popupmenu_btnup = 1;
        grab_input_focus = 1;
-       textbox_focus_policy = 0;
+       textbox_focus_policy = CLICK_ACTIVATE | CLICK_DEACTIVATE;
        auto_rotate = 1;
        forward_render_displacement = 0;
        dvd_yuv420p_interlace = 0;
@@ -104,7 +106,7 @@ Preferences::Preferences()
        yuv_color_space = BC_COLORS_BT601;
        yuv_color_range = BC_COLORS_JPEG;
        autocolor_assets = 0;
-       ctrl_toggle = 0;
+       ctrl_toggle = 1;
        rectify_audio = 0;
 
 // Default brender asset
@@ -189,6 +191,7 @@ void Preferences::copy_from(Preferences *that)
        vicon_size = that->vicon_size;
        vicon_color_mode = that->vicon_color_mode;
        strcpy(theme, that->theme);
+       strcpy(locale, that->locale);
        strcpy(plugin_icons, that->plugin_icons);
        strcpy(snapshot_path, that->snapshot_path);
 
@@ -204,6 +207,7 @@ void Preferences::copy_from(Preferences *that)
        for( int i=0; i<that->file_probes.size(); ++i )
                this->file_probes.append(new ProbePref(*that->file_probes[i]));
        cache_size = that->cache_size;
+       cache_transitions = that->cache_transitions;
        project_smp = that->project_smp;
        force_uniprocessor = that->force_uniprocessor;
        strcpy(lv2_path, that->lv2_path);
@@ -344,8 +348,10 @@ int Preferences::load_defaults(BC_Hash *defaults)
        vicon_size = defaults->get("VICON_SIZE",vicon_size);
        vicon_color_mode = defaults->get("VICON_COLOR_MODE",vicon_color_mode);
        strcpy(theme, _(DEFAULT_THEME));
+       strcpy(locale, DEFAULT_LOCALE);
        strcpy(plugin_icons, DEFAULT_PICON);
        defaults->get("THEME", theme);
+       defaults->get("LOCALE", locale);
        defaults->get("PLUGIN_ICONS", plugin_icons);
        strcpy(snapshot_path, DEFAULT_SNAPSHOT_PATH);
        defaults->get("SNAPSHOT_PATH", snapshot_path);
@@ -383,6 +389,7 @@ int Preferences::load_defaults(BC_Hash *defaults)
        use_brender = defaults->get("USE_BRENDER", use_brender);
        brender_fragment = defaults->get("BRENDER_FRAGMENT", brender_fragment);
        cache_size = defaults->get("CACHE_SIZE", cache_size);
+       cache_transitions = defaults->get("CACHE_TRANSITIONS", cache_transitions);
        local_rate = defaults->get("LOCAL_RATE", local_rate);
        use_renderfarm = defaults->get("USE_RENDERFARM", use_renderfarm);
        renderfarm_port = defaults->get("RENDERFARM_PORT", renderfarm_port);
@@ -481,6 +488,7 @@ int Preferences::save_defaults(BC_Hash *defaults)
        defaults->update("ANDROID_PORT", android_port);
 
        defaults->update("CACHE_SIZE", cache_size);
+       defaults->update("CACHE_TRANSITIONS", cache_transitions);
        defaults->update("INDEX_DIRECTORY", index_directory);
        defaults->update("INDEX_SIZE", index_size);
        defaults->update("INDEX_COUNT", index_count);
@@ -497,6 +505,7 @@ int Preferences::save_defaults(BC_Hash *defaults)
        defaults->update("VICON_SIZE",vicon_size);
        defaults->update("VICON_COLOR_MODE",vicon_color_mode);
        defaults->update("THEME", theme);
+       defaults->update("LOCALE", locale);
        defaults->update("PLUGIN_ICONS", plugin_icons);
        defaults->update("SNAPSHOT_PATH", snapshot_path);