Use new externally_connected API
[ardour.git] / libs / surfaces / push2 / scale.cc
index 005efca3c1834411d843d202ed79d2ce54cef0f8..e5f04604d4b68b6982cc7d67a6ebeea3db3596b0 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "gtkmm2ext/gui_thread.h"
 
-#include "canvas/colors.h"
+#include "gtkmm2ext/colors.h"
 #include "canvas/rectangle.h"
 #include "canvas/text.h"
 
 #include "push2.h"
 #include "scale.h"
 
+#ifdef __APPLE__
+#define Rect ArdourCanvas::Rect
+#endif
+
 using namespace ARDOUR;
 using namespace std;
 using namespace PBD;
 using namespace Glib;
 using namespace ArdourSurface;
+using namespace Gtkmm2ext;
 using namespace ArdourCanvas;
 
 static double unselected_root_alpha = 0.5;
@@ -48,7 +53,7 @@ ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name)
 
        /* background */
 
-       bg = new Rectangle (this);
+       bg = new ArdourCanvas::Rectangle (this);
        bg->set (Rect (0, 0, display_width(), display_height()));
        bg->set_fill_color (p2.get_color (Push2::DarkBackground));
 
@@ -180,7 +185,7 @@ ScaleLayout::button_upper (uint32_t n)
                return;
        }
 
-       int root;
+       int root = 0;
 
        switch (n) {
        case 1:
@@ -223,7 +228,7 @@ ScaleLayout::button_lower (uint32_t n)
                return;
        }
 
-       int root;
+       int root = 0;
 
        switch (n) {
        case 1:
@@ -379,19 +384,18 @@ ScaleLayout::build_scale_menu ()
 
        v.push_back ("Dorian");
        v.push_back ("Ionian (Major)");
-       v.push_back ("Minor");
+       v.push_back ("Aeolian (Minor)");
        v.push_back ("Harmonic Minor");
        v.push_back ("MelodicMinor Asc.");
        v.push_back ("MelodicMinor Desc.");
        v.push_back ("Phrygian");
        v.push_back ("Lydian");
        v.push_back ("Mixolydian");
-       v.push_back ("Aeolian");
        v.push_back ("Locrian");
        v.push_back ("Pentatonic Major");
        v.push_back ("Pentatonic Minor");
        v.push_back ("Chromatic");
-       v.push_back ("BluesScale");
+       v.push_back ("Blues Scale");
        v.push_back ("Neapolitan Minor");
        v.push_back ("Neapolitan Major");
        v.push_back ("Oriental");
@@ -457,9 +461,9 @@ ScaleLayout::show_root_state ()
        Pango::FontDescription fd ("Sans 10");
 
        uint32_t highlight_text = 0;
-       vector<Text*>* none_text_array;
-       vector<Text*>* one_text_array;
-       Push2::ButtonID bid;
+       vector<Text*>* none_text_array = 0;
+       vector<Text*>* one_text_array = 0;
+       Push2::ButtonID bid = Push2::Upper2; /* keep compilers quiet */
 
        switch (p2.scale_root()) {
        case 0:
@@ -534,6 +538,8 @@ ScaleLayout::show_root_state ()
                one_text_array = &upper_text;
                bid = Push2::Upper7;
                break;
+       default:
+               return;
        }
 
        if (none_text_array) {