- ArdourCanvas::Widget* w1 = new ArdourCanvas::Widget (&canvas, *make_transport_button ("Transport/Roll", ArdourIcon::TransportPlay));
- CANVAS_DEBUG_NAME (w1, "w1");
- grid->place (w1, 0, 0);
- ArdourCanvas::Widget* w2 = new ArdourCanvas::Widget (&canvas, *make_transport_button ("Transport/Stop", ArdourIcon::TransportStop));
- CANVAS_DEBUG_NAME (w2, "w2");
- grid->place (w2, 1, 0);
- ArdourCanvas::Widget* w3 = new ArdourCanvas::Widget (&canvas, *make_transport_button ("Transport/Record", ArdourIcon::RecButton));
- CANVAS_DEBUG_NAME (w3, "w3");
- grid->place (w3, 2, 0);
- ArdourCanvas::Widget* w4 = new ArdourCanvas::Widget (&canvas, *make_transport_button ("Transport/Loop", ArdourIcon::TransportLoop));
- CANVAS_DEBUG_NAME (w4, "w4");
- grid->place (w4, 3, 0);
+ std::ifstream toolbar_spec;
+ double col = 0;
+ double row = 0;
+
+ toolbar_spec.open ("/tmp/t1", ios::in);
+
+ if (!toolbar_spec) {
+ return;
+ }
+
+ while (toolbar_spec) {
+ string action;
+ string icon;
+ string theme_name;
+
+ toolbar_spec >> action;
+ if (action.empty()) {
+ break;
+ }
+ toolbar_spec >> icon;
+ if (icon.empty()) {
+ break;
+ }
+
+ toolbar_spec >> theme_name;
+ if (theme_name.empty()) {
+ break;
+ }
+
+ Gtkmm2ext::ArdourIcon::Icon i = (ArdourIcon::Icon) string_2_enum (string ("ArdourIcon::") + icon, i);
+
+ ArdourCanvas::Widget* w = new ArdourCanvas::Widget
+ (&canvas, *make_action_button (action, i, theme_name));
+ grid->place (w, col, row);
+ col++;
+ }
+
+ toolbar_spec.close ();