diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 5ef5670696..da62ce2062 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -548,7 +548,6 @@ private: ArdourWidgets::ArdourButton error_alert_button; ArdourWidgets::ArdourButton action_script_call_btn[MAX_LUA_ACTION_BUTTONS]; - Gtk::Table action_script_table; Gtk::VBox alert_box; Gtk::Table editor_meter_table; diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index d2e18d15a2..f8d1435dd1 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -480,6 +480,10 @@ ARDOUR_UI::setup_transport () button_height_size_group->add_widget (monitor_disk_button); button_height_size_group->add_widget (auto_input_button); + for (int i = 0; i < MAX_LUA_ACTION_BUTTONS; ++i) { + button_height_size_group->add_widget (action_script_call_btn[i]); + } + Glib::RefPtr clock1_size_group = SizeGroup::create (SIZE_GROUP_HORIZONTAL); clock1_size_group->add_widget (*primary_clock->left_btn()); clock1_size_group->add_widget (*primary_clock->right_btn()); @@ -583,8 +587,12 @@ ARDOUR_UI::setup_transport () ++col; /* lua script action buttons */ - transport_table.attach (action_script_table, TCOL, 0, 2, SHRINK, EXPAND|FILL, 1, 0); - ++col; + for (int i = 0; i < MAX_LUA_ACTION_BUTTONS; ++i) { + const int r = i % 2; + const int c = col + i / 2; + transport_table.attach (action_script_call_btn[i], c, c + 1, r, r + 1, FILL, SHRINK, 1, vpadding); + } + col += MAX_LUA_ACTION_BUTTONS / 2; transport_table.attach (editor_visibility_button, TCOL, 0, 1 , FILL, SHRINK, hpadding, vpadding); transport_table.attach (mixer_visibility_button, TCOL, 1, 2 , FILL, SHRINK, hpadding, vpadding); diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 7ff9281a70..2edef6bce3 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -303,7 +303,7 @@ ARDOUR_UI::setup_windows () std::string const a = string_compose (X_("script-action-%1"), i + 1); Glib::RefPtr act = ActionManager::get_action(X_("LuaAction"), a.c_str()); assert (act); - action_script_call_btn[i].set_text (string_compose ("%1", i+1)); + action_script_call_btn[i].set_text (string_compose ("%1%2", std::hex, i+1)); action_script_call_btn[i].set_related_action (act); action_script_call_btn[i].signal_button_press_event().connect (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::bind_lua_action_script), i), false); if (act->get_sensitive ()) { @@ -311,12 +311,9 @@ ARDOUR_UI::setup_windows () } else { action_script_call_btn[i].set_visual_state (Gtkmm2ext::VisualState (action_script_call_btn[i].visual_state() | Gtkmm2ext::Insensitive)); } - const int row = i % 2; - const int col = i / 2; - action_script_table.attach (action_script_call_btn[i], col, col + 1, row, row + 1, EXPAND, EXPAND, 1, 0); + action_script_call_btn[i].set_sizing_text ("|||"); action_script_call_btn[i].set_no_show_all (); } - action_script_table.show (); setup_transport(); build_menu_bar ();