summaryrefslogtreecommitdiff
path: root/gtk2_ardour/rc_option_editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-10-20 11:34:26 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-10-20 16:34:52 -0400
commitb85ca20123647fbff6eac6405019fd4873f6764e (patch)
tree8475d07ef77029535484ac3bf934c1bd6b8fc84f /gtk2_ardour/rc_option_editor.cc
parent12c558f62e67974ca84fc517f21397bdfa1f9737 (diff)
GUI tweaks for MIDI port options
Diffstat (limited to 'gtk2_ardour/rc_option_editor.cc')
-rw-r--r--gtk2_ardour/rc_option_editor.cc51
1 files changed, 33 insertions, 18 deletions
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc
index e8350b0167..f5a378b3cd 100644
--- a/gtk2_ardour/rc_option_editor.cc
+++ b/gtk2_ardour/rc_option_editor.cc
@@ -41,6 +41,7 @@
#include "pbd/fpu.h"
#include "pbd/cpus.h"
+#include "pbd/i18n.h"
#include "ardour/audio_backend.h"
#include "ardour/audioengine.h"
@@ -54,20 +55,20 @@
#include "canvas/wave_view.h"
-#include "ardour_window.h"
#include "ardour_dialog.h"
#include "ardour_ui.h"
+#include "ardour_window.h"
#include "color_theme_manager.h"
#include "gui_thread.h"
+#include "keyboard.h"
#include "meter_patterns.h"
#include "midi_tracer.h"
#include "rc_option_editor.h"
-#include "utils.h"
#include "sfdb_ui.h"
-#include "keyboard.h"
#include "theme_manager.h"
+#include "tooltips.h"
#include "ui_config.h"
-#include "pbd/i18n.h"
+#include "utils.h"
using namespace std;
using namespace Gtk;
@@ -1914,6 +1915,7 @@ class MidiPortOptions : public OptionEditorBox, public sigc::trackable
add (control_data);
add (selection);
add (name);
+ add (filler);
}
Gtk::TreeModelColumn<std::string> pretty_name;
@@ -1922,6 +1924,7 @@ class MidiPortOptions : public OptionEditorBox, public sigc::trackable
Gtk::TreeModelColumn<bool> control_data;
Gtk::TreeModelColumn<bool> selection;
Gtk::TreeModelColumn<std::string> name;
+ Gtk::TreeModelColumn<std::string> filler;
};
MidiPortColumns midi_port_columns;
@@ -1948,34 +1951,46 @@ MidiPortOptions::setup_midi_port_view (Gtk::TreeView& view, bool with_selection)
int control_column;
int selection_column;
TreeViewColumn* col;
+ Gtk::Label* l;
pretty_name_column = view.append_column_editable (_("Name (click to edit)"), midi_port_columns.pretty_name) - 1;
- col = manage (new TreeViewColumn (_("Use"), midi_port_columns.in_use));
- col->set_fixed_width (150);
- col->set_sizing (TREE_VIEW_COLUMN_FIXED);
- col->set_alignment (ALIGN_START);
+ col = manage (new TreeViewColumn ("", midi_port_columns.in_use));
+ col->set_alignment (ALIGN_CENTER);
+ l = manage (new Label (_("Use")));
+ set_tooltip (*l, string_compose (_("If ticked, %1 will use this port.\n\nOtherwise, the port will be ignored."), PROGRAM_NAME));
+ col->set_widget (*l);
+ l->show ();
use_column = view.append_column (*col) - 1;
- col = manage (new TreeViewColumn (_("Music Data"), midi_port_columns.music_data));
- col->set_fixed_width (150);
- col->set_sizing (TREE_VIEW_COLUMN_FIXED);
- col->set_alignment (ALIGN_START);
+ col = manage (new TreeViewColumn ("", midi_port_columns.music_data));
+ col->set_alignment (ALIGN_CENTER);
+ l = manage (new Label (_("Music Data")));
+ set_tooltip (*l, string_compose (_("If ticked, %1 will consider this port to be a source of music performance data."), PROGRAM_NAME));
+ col->set_widget (*l);
+ l->show ();
music_column = view.append_column (*col) - 1;
- col = manage (new TreeViewColumn (_("Control Data"), midi_port_columns.control_data));
- col->set_fixed_width (150);
- col->set_sizing (TREE_VIEW_COLUMN_FIXED);
- col->set_alignment (ALIGN_START);
+ col = manage (new TreeViewColumn ("", midi_port_columns.control_data));
+ col->set_alignment (ALIGN_CENTER);
+ l = manage (new Label (_("Control Data")));
+ set_tooltip (*l, string_compose (_("If ticked, %1 will consider this port to be a source of control data."), PROGRAM_NAME));
+ col->set_widget (*l);
+ l->show ();
control_column = view.append_column (*col) - 1;
if (with_selection) {
col = manage (new TreeViewColumn (_("Follow Selection"), midi_port_columns.selection));
- col->set_fixed_width (150);
- col->set_sizing (TREE_VIEW_COLUMN_FIXED);
selection_column = view.append_column (*col) - 1;
+ l = manage (new Label (_("Follow Selection")));
+ set_tooltip (*l, string_compose (_("If ticked, and \"MIDI input follows selection\" is enabled,\n%1 will automatically connect the first selected MIDI track to this port.\n"), PROGRAM_NAME));
+ col->set_widget (*l);
+ l->show ();
}
+ /* filler column so that the last real column doesn't expand */
+ view.append_column ("", midi_port_columns.filler);
+
CellRendererText* pretty_name_cell = dynamic_cast<CellRendererText*> (view.get_column_cell_renderer (pretty_name_column));
pretty_name_cell->property_editable() = true;
pretty_name_cell->signal_edited().connect (sigc::bind (sigc::mem_fun (*this, &MidiPortOptions::pretty_name_edit), &view));