search fixes, preset fixes, ladspa icon logging, igor pref theme, drag btn rollover
[goodguy/history.git] / cinelerra-5.1 / cinelerra / preferences.C
index c4252072995a531900fd9da4af24874eb30decfe..257a12ab1ef2896a41e2843b44c7652c619c5bf9 100644 (file)
@@ -69,6 +69,7 @@ Preferences::Preferences()
        trap_sigintr = 1;
        theme[0] = 0;
        plugin_icons[0] = 0;
+       strcpy(snapshot_path, "/tmp");
        use_renderfarm = 0;
        force_uniprocessor = 0;
        renderfarm_port = DEAMON_PORT;
@@ -84,8 +85,11 @@ Preferences::Preferences()
        warn_version = 1;
        bd_warn_root = 1;
        popupmenu_btnup = 1;
+       grab_input_focus = 1;
        textbox_focus_policy = 0;
+       forward_render_displacement = 0;
        dvd_yuv420p_interlace = 0;
+       highlight_inverse = 0xffffff;
 
 // Default brender asset
        brender_asset = new Asset;
@@ -174,6 +178,7 @@ void Preferences::copy_from(Preferences *that)
        keyframe_reticle = that->keyframe_reticle;
        strcpy(theme, that->theme);
        strcpy(plugin_icons, that->plugin_icons);
+       strcpy(snapshot_path, that->snapshot_path);
 
        use_tipwindow = that->use_tipwindow;
        scan_commercials = that->scan_commercials;
@@ -198,8 +203,11 @@ void Preferences::copy_from(Preferences *that)
        warn_version = that->warn_version;
        bd_warn_root = that->bd_warn_root;
        popupmenu_btnup = that->popupmenu_btnup;
+       grab_input_focus = that->grab_input_focus;
        textbox_focus_policy = that->textbox_focus_policy;
+       forward_render_displacement = that->forward_render_displacement;
        dvd_yuv420p_interlace = that->dvd_yuv420p_interlace;
+       highlight_inverse = that->highlight_inverse;
        renderfarm_nodes.remove_all_objects();
        renderfarm_ports.remove_all();
        renderfarm_enabled.remove_all();
@@ -314,10 +322,12 @@ int Preferences::load_defaults(BC_Hash *defaults)
        trap_sigsegv = defaults->get("TRAP_SIGSEGV", trap_sigsegv);
        trap_sigintr = defaults->get("TRAP_SIGINTR", trap_sigintr);
 
-       strcpy(theme, DEFAULT_THEME);
+       strcpy(theme, _(DEFAULT_THEME));
        strcpy(plugin_icons, DEFAULT_PICON);
        defaults->get("THEME", theme);
        defaults->get("PLUGIN_ICONS", plugin_icons);
+       strcpy(snapshot_path, "/tmp");
+       defaults->get("SNAPSHOT_PATH", snapshot_path);
 
        for(int i = 0; i < MAXCHANNELS; i++)
        {
@@ -351,8 +361,11 @@ int Preferences::load_defaults(BC_Hash *defaults)
        warn_version = defaults->get("WARN_VERSION", warn_version);
        bd_warn_root = defaults->get("BD_WARN_ROOT", bd_warn_root);
        popupmenu_btnup = defaults->get("POPUPMENU_BTNUP", popupmenu_btnup);
+       grab_input_focus = defaults->get("GRAB_FOCUS", grab_input_focus);
        textbox_focus_policy = defaults->get("TEXTBOX_FOCUS_POLICY", textbox_focus_policy);
+       forward_render_displacement = defaults->get("FORWARD_RENDER_DISPLACEMENT", forward_render_displacement);
        dvd_yuv420p_interlace = defaults->get("DVD_YUV420P_INTERLACE", dvd_yuv420p_interlace);
+       highlight_inverse = defaults->get("HIGHLIGHT_INVERSE", highlight_inverse);
        use_brender = defaults->get("USE_BRENDER", use_brender);
        brender_fragment = defaults->get("BRENDER_FRAGMENT", brender_fragment);
        cache_size = defaults->get("CACHE_SIZE", cache_size);
@@ -400,6 +413,7 @@ int Preferences::load_defaults(BC_Hash *defaults)
                shbtn_prefs.append(new ShBtnPref(_("Online Help"), "$CIN_BROWSER https://cinelerra-cv.org/docs.php", 0));
                shbtn_prefs.append(new ShBtnPref(_("Original Manual"), "$CIN_BROWSER file://$CIN_DAT/doc/cinelerra.html", 0));
                shbtn_prefs.append(new ShBtnPref(_("Setting Shell Commands"), "$CIN_BROWSER file://$CIN_DAT/doc/ShellCmds.html", 0));
+               shbtn_prefs.append(new ShBtnPref(_("Shortcuts"), "$CIN_BROWSER file://$CIN_DAT/doc/shortcuts.html", 0));
                shbtns_total = 0;
        }
        for( int i=0; i<shbtns_total; ++i ) {
@@ -462,7 +476,7 @@ int Preferences::save_defaults(BC_Hash *defaults)
        defaults->update("TRAP_SIGINTR", trap_sigintr);
        defaults->update("THEME", theme);
        defaults->update("PLUGIN_ICONS", plugin_icons);
-
+       defaults->update("SNAPSHOT_PATH", snapshot_path);
 
        for(int i = 0; i < MAXCHANNELS; i++)
        {
@@ -479,8 +493,11 @@ int Preferences::save_defaults(BC_Hash *defaults)
        defaults->update("WARN_VERSION", warn_version);
        defaults->update("BD_WARN_ROOT", bd_warn_root);
        defaults->update("POPUPMENU_BTNUP", popupmenu_btnup);
+       defaults->update("GRAB_FOCUS", grab_input_focus);
        defaults->update("TEXTBOX_FOCUS_POLICY", textbox_focus_policy);
+       defaults->update("FORWARD_RENDER_DISPLACEMENT", forward_render_displacement);
        defaults->update("DVD_YUV420P_INTERLACE", dvd_yuv420p_interlace);
+       defaults->update("HIGHLIGHT_INVERSE", highlight_inverse);
        brender_asset->save_defaults(defaults, "BRENDER_", 1, 1, 1, 0, 0);
        defaults->update("USE_BRENDER", use_brender);
        defaults->update("BRENDER_FRAGMENT", brender_fragment);