Clean up some confusion about offering a denormalize menu option when a region may...
authorCarl Hetherington <carl@carlh.net>
Wed, 9 Sep 2009 16:39:33 +0000 (16:39 +0000)
committerCarl Hetherington <carl@carlh.net>
Wed, 9 Sep 2009 16:39:33 +0000 (16:39 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@5649 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_ops.cc

index e3fdb84ee8a91587457e7e60da754776aaa3723d..394a4611d3cebe28fdf9dbcdbd72193af43e8931 100644 (file)
@@ -1815,10 +1815,9 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
                        items.push_back (SeparatorElem());
                }
 
-               if (ar->scale_amplitude() != 1.0f) {
-                       items.push_back (MenuElem (_("DeNormalize"), mem_fun(*this, &Editor::denormalize_region)));
-               } else {
-                       items.push_back (MenuElem (_("Normalize"), mem_fun(*this, &Editor::normalize_region)));
+               items.push_back (MenuElem (_("Normalize"), mem_fun(*this, &Editor::normalize_region)));
+               if (ar->scale_amplitude() != 1) {
+                       items.push_back (MenuElem (_("Reset Gain"), mem_fun(*this, &Editor::reset_region_scale_amplitude)));
                }
 
        } else if (mr) {
@@ -1826,7 +1825,7 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
                items.push_back (SeparatorElem());
        }
 
-       items.push_back (MenuElem (_("Strip silence..."), mem_fun (*this, &Editor::strip_region_silence)));
+       items.push_back (MenuElem (_("Strip Silence..."), mem_fun (*this, &Editor::strip_region_silence)));
        items.push_back (MenuElem (_("Reverse"), mem_fun(*this, &Editor::reverse_region)));
        items.push_back (SeparatorElem());
 
index 9f791e59015e56ab4dc4f765e2c63cadf7f7fc71..56a7755051ec605f92caf4c24525ab611e102ccf 100644 (file)
@@ -1079,7 +1079,7 @@ class Editor : public PublicEditor
        void strip_region_silence ();
        void normalize_region ();
        double _last_normalization_value;
-       void denormalize_region ();
+       void reset_region_scale_amplitude ();
        void adjust_region_scale_amplitude (bool up);
        void quantize_region ();
 
index d27727348d9b2397e253e552421fa71a89beb268..d23c83eaf1119bd8d5ccd230cbb119910d9a2bc4 100644 (file)
@@ -4687,7 +4687,7 @@ Editor::normalize_region ()
 
 
 void
-Editor::denormalize_region ()
+Editor::reset_region_scale_amplitude ()
 {
        if (!session) {
                return;
@@ -4701,7 +4701,7 @@ Editor::denormalize_region ()
                return;
        }
 
-       begin_reversible_command ("denormalize");
+       begin_reversible_command ("reset gain");
 
        for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
                AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*r);