build system tweaks for coreaudio/waves-coreaudio
[ardour.git] / gtk2_ardour / step_entry.cc
index 8c26e1d20ee98c4ea35f4665c6b5164a0c1e1341..ace02c0c68d50678ba6e53fc278d701ab62c4ee9 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <iostream>
 
-#include "pbd/filesystem.h"
 #include "pbd/file_utils.h"
 
 #include "gtkmm2ext/keyboard.h"
@@ -43,6 +42,7 @@ using namespace Glib;
 using namespace Gtkmm2ext;
 using namespace PBD;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 static void
 _note_off_event_handler (GtkWidget* /*widget*/, int note, gpointer arg)
@@ -57,7 +57,7 @@ _rest_event_handler (GtkWidget* /*widget*/, gpointer arg)
 }
 
 StepEntry::StepEntry (StepEditor& seditor)
-       : ArdourDialog (string_compose (_("Step Entry: %1"), seditor.name()))
+       : ArdourWindow (string_compose (_("Step Entry: %1"), seditor.name()))
         , _current_note_length (1.0)
         , _current_note_velocity (64)
        , triplet_button ("3")
@@ -279,8 +279,8 @@ StepEntry::StepEntry (StepEditor& seditor)
        ARDOUR_UI::instance()->set_tip (&velocity_mp_button, _("Set volume (velocity) to mezzo-piano"), "");
        ARDOUR_UI::instance()->set_tip (&velocity_mf_button, _("Set volume (velocity) to mezzo-forte"), "");
        ARDOUR_UI::instance()->set_tip (&velocity_f_button, _("Set volume (velocity) to forte"), "");
-       ARDOUR_UI::instance()->set_tip (&velocity_ff_button, _("Set volume (velocity) to forteissimo"), "");
-       ARDOUR_UI::instance()->set_tip (&velocity_fff_button, _("Set volume (velocity) to forteississimo"), "");
+       ARDOUR_UI::instance()->set_tip (&velocity_ff_button, _("Set volume (velocity) to fortissimo"), "");
+       ARDOUR_UI::instance()->set_tip (&velocity_fff_button, _("Set volume (velocity) to fortississimo"), "");
 
        note_velocity_box.pack_start (velocity_ppp_button, false, false);
        note_velocity_box.pack_start (velocity_pp_button, false, false);
@@ -458,7 +458,7 @@ StepEntry::StepEntry (StepEditor& seditor)
        packer.pack_start (*piano, false, false);
        packer.show_all ();
 
-       get_vbox()->add (packer);
+       add (packer);
 
        /* initial settings: quarter note and mezzo forte */
 
@@ -526,13 +526,13 @@ StepEntry::on_key_release_event (GdkEventKey* ev)
 void
 StepEntry::rest_event_handler ()
 {
-       se->step_edit_rest (0.0);
+       se->step_edit_rest (Evoral::Beats());
 }
 
-Evoral::MusicalTime
+Evoral::Beats
 StepEntry::note_length ()
 {
-        Evoral::MusicalTime base_time = 4.0 / (Evoral::MusicalTime) length_divisor_adjustment.get_value();
+        double base_time = 4.0 / (double) length_divisor_adjustment.get_value();
 
         RefPtr<Action> act = myactions.find_action ("StepEditing/toggle-triplet");
         RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
@@ -549,13 +549,13 @@ StepEntry::note_length ()
                 base_time *= 1 + ((dots - 1.0)/dots);
         }
 
-        return base_time;
+        return Evoral::Beats(base_time);
 }
 
 uint8_t
 StepEntry::note_velocity () const
 {
-        return (Evoral::MusicalTime) velocity_adjustment.get_value();
+       return velocity_adjustment.get_value();
 }
 
 uint8_t
@@ -574,7 +574,7 @@ StepEntry::note_off_event_handler (int note)
 void
 StepEntry::on_show ()
 {
-       ArdourDialog::on_show ();
+       ArdourWindow::on_show ();
        //piano->grab_focus ();
 }
 
@@ -708,11 +708,10 @@ StepEntry::load_bindings ()
 
         bindings.set_action_map (myactions);
 
-       sys::path binding_file;
-       SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
+       std::string binding_file;
 
-       if (find_file_in_search_path (spath, "step_editing.bindings", binding_file)) {
-                bindings.load (binding_file.to_string());
+       if (find_file (ardour_config_search_path(), "step_editing.bindings", binding_file)) {
+                bindings.load (binding_file);
         }
 }
 
@@ -796,7 +795,7 @@ StepEntry::insert_rest ()
 void
 StepEntry::insert_grid_rest ()
 {
-       se->step_edit_rest (0.0);
+       se->step_edit_rest (Evoral::Beats());
 }
 
 void