summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_regions.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-12-02 13:29:11 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-12-02 13:29:11 +0000
commit21b385e4132c6bb01b67f6ad1b5abeae222d106a (patch)
treebceef304dbaebfeb4635c9c6691281f6d036a654 /gtk2_ardour/editor_regions.cc
parent43b45230684b2e087629d38b2cf3c94892923bac (diff)
add tooltips to editor region list, but so that it doesn't mark carl grimmace
git-svn-id: svn://localhost/ardour2/branches/3.0@10858 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_regions.cc')
-rw-r--r--gtk2_ardour/editor_regions.cc87
1 files changed, 29 insertions, 58 deletions
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc
index ae9c48cc3a..cfc56a3082 100644
--- a/gtk2_ardour/editor_regions.cc
+++ b/gtk2_ardour/editor_regions.cc
@@ -59,6 +59,12 @@ using namespace Glib;
using namespace Editing;
using Gtkmm2ext::Keyboard;
+struct ColumnInfo {
+ int index;
+ const char* label;
+ const char* tooltip;
+};
+
EditorRegions::EditorRegions (Editor* e)
: EditorComponent (e)
, old_focus (0)
@@ -101,64 +107,29 @@ EditorRegions::EditorRegions (Editor* e)
TreeViewColumn* col;
Gtk::Label* l;
- col = _display.get_column (0);
- l = manage (new Label (_("Regions")));
- ARDOUR_UI::instance()->set_tip (*l, _("Region name, with number of channels in []'s"));
- col->set_widget (*l);
- l->show ();
- col = _display.get_column (1);
- l = manage (new Label(_("Position")));
- ARDOUR_UI::instance()->set_tip (*l, _("Length of the region"));
- col->set_widget (*l);
- l->show ();
- col = _display.get_column (2);
- l = manage (new Label(_("End")));
- ARDOUR_UI::instance()->set_tip (*l, _("Length of the region"));
- col->set_widget (*l);
- l->show ();
- col = _display.get_column (3);
- l = manage (new Label(_("End")));
- ARDOUR_UI::instance()->set_tip (*l, _("Length of the region"));
- col->set_widget (*l);
- l->show ();
- col = _display.get_column (4);
- l = manage (new Label(_("Sync")));
- ARDOUR_UI::instance()->set_tip (*l, _("Position of region sync point, relative to start of the region"));
- col->set_widget (*l);
- l->show ();
- col = _display.get_column (5);
- l = manage (new Label(_("Sync")));
- ARDOUR_UI::instance()->set_tip (*l, _("Region fade-in enabled?"));
- col->set_widget (*l);
- l->show ();
- col = _display.get_column (6);
- l = manage (new Label(_("Fade In")));
- ARDOUR_UI::instance()->set_tip (*l, _("Region fade-out enabled?"));
- col->set_widget (*l);
- l->show ();
- col = _display.get_column (7);
- l = manage (new Label(_("L")));
- ARDOUR_UI::instance()->set_tip (*l, _("Region position locked?"));
- col->set_widget (*l);
- l->show ();
- col = _display.get_column (8);
- l = manage (new Label(_("G")));
- ARDOUR_UI::instance()->set_tip (*l, _("Region position glued to Bars|Beats time?"));
- col->set_widget (*l);
- l->show ();
- col = _display.get_column (9);
- l = manage (new Label(_("M")));
- ARDOUR_UI::instance()->set_tip (*l, _("Region muted?"));
- col->set_widget (*l);
- l->show ();
- col = _display.get_column (10);
- l = manage (new Label(_("O")));
- ARDOUR_UI::instance()->set_tip (*l, _("Region opaque (blocks regions below it from being heard)?"));
- col->set_widget (*l);
- l->show ();
-
- // _display.append_column (_("Used"), _columns.used);
- // _display.append_column (_("Path"), _columns.path);
+ ColumnInfo ci[] = {
+ { 0, _("Region"), _("Region name, with number of channels in []'s") },
+ { 1, _("Position"), _("Length of the region") },
+ { 2, _("End"), _("Length of the region") },
+ { 3, _("End"), _("Length of the region") },
+ { 4, _("Sync"), _("Position of region sync point, relative to start of the region") },
+ { 5, _("Sync"), _("Region fade-in enabled?") },
+ { 6, _("Fade In"), _("Region fade-out enabled?") },
+ { 7, _("L"), _("Region position locked?") },
+ { 8, _("G"), _("Region position glued to Bars|Beats time?") },
+ { 9, _("M"), _("Region muted?") },
+ { 10, _("O"), _("Region opaque (blocks regions below it from being heard)?") },
+ { -1, 0, 0 }
+ };
+
+ for (int i = 0; ci[i].index >= 0; ++i) {
+ col = _display.get_column (ci[i].index);
+ l = manage (new Label (ci[i].label));
+ ARDOUR_UI::instance()->set_tip (*l, ci[i].tooltip);
+ col->set_widget (*l);
+ l->show ();
+ }
+
_display.set_headers_visible (true);
//_display.set_grid_lines (TREE_VIEW_GRID_LINES_BOTH);