provide control over waveform image cache size from GUI
[ardour.git] / gtk2_ardour / rc_option_editor.cc
index a12fa90f4c4cc5f2f7252a369316764ead6534db..0fdaaae902a60a0660be12ee3002ba7e33650a2d 100644 (file)
@@ -605,7 +605,7 @@ public:
                        }
                }
 
-               l = manage (left_aligned_label (_("Snap to absolute using:")));
+               l = manage (left_aligned_label (_("Snap relatively using:")));
                l->set_name ("OptionsLabel");
 
                t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
@@ -2697,6 +2697,22 @@ RCOptionEditor::RCOptionEditor ()
                            sigc::mem_fun (*_ui_config, &UIConfiguration::set_super_rapid_clock_update)
                            ));
 
+
+       /* Image cache size */
+
+       Gtk::Adjustment *ics = manage (new Gtk::Adjustment(0, 1, 1024, 10)); /* 1 MB to 1GB in steps of 10MB */
+       HSliderOption *sics = new HSliderOption("waveform-cache-size",
+                                               _("Waveform image cache size (megabytes)"),
+                                               ics,
+                                               sigc::mem_fun (*ARDOUR_UI::config(), &UIConfiguration::get_waveform_cache_size),
+                                               sigc::mem_fun (*ARDOUR_UI::config(), &UIConfiguration::set_waveform_cache_size)
+                       );
+       sics->scale().set_digits (0);
+       Gtkmm2ext::UI::instance()->set_tip
+               (sics->tip_widget(),
+                _("Larger values lead to using more memory to store images of waveforms, which can improve graphical performance."));
+       add_option (S_("Preferences|GUI"), sics);
+       
        /* Lock GUI timeout */
 
        Gtk::Adjustment *lts = manage (new Gtk::Adjustment(0, 0, 1000, 1, 10));