Tweak spacing.
[ardour.git] / gtk2_ardour / patch_change_dialog.cc
index e4efdc25329696811eae15bbaa57eefa9e12eefa..475ae1f6a47e130e3bc393bb604d285a0aeaab4b 100644 (file)
 #include <gtkmm/table.h>
 #include "ardour/beats_frames_converter.h"
 #include "patch_change_dialog.h"
+#include "i18n.h"
 
 using namespace Gtk;
 
-/** @param tc If non-0, a time converter for this patch change.  If 0, time and channel controls will be desensitized */
+/** @param tc If non-0, a time converter for this patch change.  If 0, time control will be desensitized */
 PatchChangeDialog::PatchChangeDialog (
        const ARDOUR::BeatsFramesConverter* tc,
        ARDOUR::Session* session,
@@ -40,36 +41,37 @@ PatchChangeDialog::PatchChangeDialog (
        , _bank (*manage (new Adjustment (1, 1, 16384, 1, 64)))
 {
        Table* t = manage (new Table (4, 2));
+       Label* l;
        t->set_spacings (6);
        int r = 0;
 
        if (_time_converter) {
-
-               Label* l = manage (new Label (_("Time")));
+               
+               l = manage (new Label (_("Time")));
                l->set_alignment (0, 0.5);
                t->attach (*l, 0, 1, r, r + 1);
                t->attach (_time, 1, 2, r, r + 1);
                ++r;
-               
+
                _time.set_session (session);
                _time.set_mode (AudioClock::BBT);
                _time.set (_time_converter->to (patch.time ()), true);
-               
-               l = manage (new Label (_("Channel")));
-               l->set_alignment (0, 0.5);
-               t->attach (*l, 0, 1, r, r + 1);
-               t->attach (_channel, 1, 2, r, r + 1);
-               ++r;
-               
-               _channel.set_value (patch.channel() + 1);
        }
+
+       l = manage (new Label (_("Channel")));
+       l->set_alignment (0, 0.5);
+       t->attach (*l, 0, 1, r, r + 1);
+       t->attach (_channel, 1, 2, r, r + 1);
+       ++r;
        
-       Label* l = manage (new Label (_("Program")));
+       _channel.set_value (patch.channel() + 1);
+
+       l = manage (new Label (_("Program")));
        l->set_alignment (0, 0.5);
        t->attach (*l, 0, 1, r, r + 1);
        t->attach (_program, 1, 2, r, r + 1);
        ++r;
-       
+
        _program.set_value (patch.program () + 1);
 
        l = manage (new Label (_("Bank")));
@@ -77,9 +79,9 @@ PatchChangeDialog::PatchChangeDialog (
        t->attach (*l, 0, 1, r, r + 1);
        t->attach (_bank, 1, 2, r, r + 1);
        ++r;
-       
+
        _bank.set_value (patch.bank() + 1);
-       
+
        get_vbox()->add (*t);
 
        add_button (Stock::CANCEL, RESPONSE_CANCEL);
@@ -93,10 +95,11 @@ Evoral::PatchChange<Evoral::MusicalTime>
 PatchChangeDialog::patch () const
 {
        Evoral::MusicalTime t = 0;
+
        if (_time_converter) {
                t = _time_converter->from (_time.current_time ());
        }
-       
+
        return Evoral::PatchChange<Evoral::MusicalTime> (
                t,
                _channel.get_value_as_int() - 1,