Fixed crossfade editor
authorDoug McLain <doug@nostar.net>
Tue, 3 Jan 2006 16:59:11 +0000 (16:59 +0000)
committerDoug McLain <doug@nostar.net>
Tue, 3 Jan 2006 16:59:11 +0000 (16:59 +0000)
git-svn-id: svn://localhost/trunk/ardour2@232 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour2_ui.rc
gtk2_ardour/crossfade_edit.cc
gtk2_ardour/crossfade_edit.h

index 54a6723fd1edfa6cf740035ea562f31b0f55a579..71f5d56e10e368ef0c9f445ca779ce62ae695815 100644 (file)
@@ -1080,7 +1080,7 @@ widget "*TransportSoloAlert.*" style "flashing_alert"
 widget "*TransportAuditioningAlert" style "flashing_alert"
 widget "*TransportAuditioningAlert.*" style "flashing_alert"
 widget "*Prompter" style "default_base"
-widget "*PrompterLabel" style "larger_bold_text"
+widget "*PrompterLabel" style "default_base"
 widget "*CleanupDialog" style "default_base"
 widget "*CleanupDialog*" style "default_base"
 widget "*FadeCurve" style "medium_bold_entry"
index 521c6b5c686f2c24ff0f6cb42c36680272646eac..5bb70222608fd5b1c1cf93355b27f481a0ab3195 100644 (file)
@@ -72,8 +72,8 @@ CrossfadeEditor::Half::Half ()
 
 CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double mxy)
        : ArdourDialog (_("ardour: x-fade edit")),
-         cancel_button (_("Cancel")),
-         ok_button (_("OK")),
+         //cancel_button (_("Cancel")),
+         //ok_button (_("OK")),
          xfade (xf),
          session (s),
          clear_button (_("Clear")),
@@ -107,6 +107,12 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
        select_out_button.set_mode (false);
        select_in_button.set_mode (false);
 
+       get_action_area()->set_layout(BUTTONBOX_SPREAD);
+       get_action_area()->pack_start(clear_button);
+       get_action_area()->pack_start(revert_button);
+       cancel_button = add_button ("Cancel", RESPONSE_CANCEL);
+       ok_button = add_button ("OK", RESPONSE_ACCEPT);
+
        if (fade_in_presets == 0) {
                build_presets ();
        }
@@ -227,8 +233,8 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
 
        clear_button.set_name ("CrossfadeEditButton");
        revert_button.set_name ("CrossfadeEditButton");
-       ok_button.set_name ("CrossfadeEditButton");
-       cancel_button.set_name ("CrossfadeEditButton");
+       ok_button->set_name ("CrossfadeEditButton");
+       cancel_button->set_name ("CrossfadeEditButton");
        preroll_button.set_name ("CrossfadeEditButton");
        postroll_button.set_name ("CrossfadeEditButton");
        audition_both_button.set_name ("CrossfadeEditAuditionButton");
@@ -245,20 +251,20 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
        audition_left_button.signal_toggled().connect (mem_fun(*this, &CrossfadeEditor::audition_left_toggled));
        audition_left_dry_button.signal_toggled().connect (mem_fun(*this, &CrossfadeEditor::audition_left_dry_toggled));
 
-       action_box.set_border_width (7);
-       action_box.set_spacing (5);
-       action_box.set_homogeneous (false);
-       action_box.pack_end (cancel_button, false, false);
-       action_box.pack_end (ok_button, false, false);
-       action_box.pack_end (revert_button, false, false);
-       action_box.pack_end (clear_button, false, false);
+       //action_box.set_border_width (7);
+       //action_box.set_spacing (5);
+       //action_box.set_homogeneous (false);
+       //action_box.pack_end (*cancel_button, false, false);
+       //action_box.pack_end (*ok_button, false, false);
+       //action_box.pack_end (*revert_button, false, false);
+       //action_box.pack_end (*clear_button, false, false);
 
-       Frame* edit_frame = manage (new Frame (_("Edit")));
-       edit_frame->set_name (X_("CrossfadeEditFrame"));
-       edit_frame->add (action_box);
+       //Frame* edit_frame = manage (new Frame (_("Edit")));
+       //edit_frame->set_name (X_("CrossfadeEditFrame"));
+       //edit_frame->add (action_box);
 
-       Gtk::HBox* action_center_box = manage (new HBox);
-       action_center_box->pack_start (*edit_frame, true, false);
+       //Gtk::HBox* action_center_box = manage (new HBox);
+       //action_center_box->pack_start (*edit_frame, true, false);
 
        roll_box.pack_start (preroll_button, false, false);
        roll_box.pack_start (postroll_button, false, false);
@@ -272,7 +278,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
        vpacker2->set_spacing (7);
        vpacker2->pack_start (*acbox, false, false);
        vpacker2->pack_start (*rcenter_box, false, false);
-       vpacker2->pack_start (*action_center_box, false, false);
+       //vpacker2->pack_start (*action_center_box, false, false);
 
        curve_button_box.set_spacing (7);
        curve_button_box.pack_start (fade_out_table, false, false, 12);
@@ -299,6 +305,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
        xfade.StateChanged.connect (mem_fun(*this, &CrossfadeEditor::xfade_changed));
 
        session.AuditionActive.connect (mem_fun(*this, &CrossfadeEditor::audition_state_changed));
+       show_all_children();
 }
 
 CrossfadeEditor::~CrossfadeEditor()
index d3c509ca4b0246d75ef123831dc91414dcb273c5..3aae980ce49725bd7a87f43bb0fe5f5d5209af0f 100644 (file)
@@ -31,8 +31,8 @@ class CrossfadeEditor : public ArdourDialog
     /* these are public so that a caller/subclass can make them do the right thing.
      */
     
-    Gtk::Button cancel_button;
-    Gtk::Button ok_button;
+    Gtk::Button* cancel_button;
+    Gtk::Button* ok_button;
 
     struct PresetPoint {
        double x;
@@ -106,7 +106,7 @@ class CrossfadeEditor : public ArdourDialog
     vector<Gtk::Button*> fade_out_buttons;
     vector<Gtk::Button*> fade_in_buttons;
 
-    Gtk::HBox action_box;
+    //Gtk::HBox action_box;
 
     Gtk::VBox vpacker2;