cleanup post-rebase-against-master messes

This commit is contained in:
Paul Davis 2016-01-11 21:36:44 -05:00
parent e268a9d2aa
commit c932c56233
6 changed files with 36 additions and 154 deletions

View File

@ -226,12 +226,7 @@ libxml_structured_error_func (void* /* parsing_context*/,
ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
<<<<<<< HEAD
: Gtkmm2ext::UI (PROGRAM_NAME, X_("gui"), argcp, argvp)
=======
: Gtkmm2ext::UI (PROGRAM_NAME, argcp, argvp)
>>>>>>> first compilable version of tabbable design.
, session_loaded (false)
, gui_object_state (new GUIObjectState)
, primary_clock (new MainClock (X_("primary"), X_("transport"), true ))
@ -2928,8 +2923,6 @@ ARDOUR_UI::load_from_application_api (const std::string& path)
if (get_session_parameters (true, false)) {
exit (1);
}
goto_editor_window ();
}
}

View File

@ -138,13 +138,13 @@ ARDOUR_UI::install_actions ()
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::write_sensitive_actions.push_back (act);
act = Actions.register_action (main_actions, X_("duplicate-routes"), _("Duplicate Tracks/Busses..."),
act = global_actions.register_action (main_actions, X_("duplicate-routes"), _("Duplicate Tracks/Busses..."),
sigc::mem_fun(*this, &ARDOUR_UI::start_duplicate_routes));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::write_sensitive_actions.push_back (act);
ActionManager::track_selection_sensitive_actions.push_back (act);
act = Actions.register_action (main_actions, X_("cancel-solo"), _("Cancel Solo"), sigc::mem_fun(*this, &ARDOUR_UI::cancel_solo));
act = global_actions.register_action (main_actions, X_("cancel-solo"), _("Cancel Solo"), sigc::mem_fun(*this, &ARDOUR_UI::cancel_solo));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::write_sensitive_actions.push_back (act);
@ -263,14 +263,15 @@ ARDOUR_UI::install_actions ()
global_actions.register_toggle_action (common_actions, X_("ToggleMaximalMixer"), _("Maximise Mixer Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_space));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (common_actions, X_("ToggleMixerList"), _("Toggle Mixer List"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_list));
act = global_actions.register_toggle_action (common_actions, X_("ToggleMixerList"), _("Toggle Mixer List"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_list));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (common_actions, X_("ToggleMonitorSection"), _("Toggle Monitor Section Visibility"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_monitor_section_visibility));
act = global_actions.register_toggle_action (common_actions, X_("ToggleMonitorSection"), _("Toggle Monitor Section Visibility"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_monitor_section_visibility));
act->set_sensitive (false);
if (Profile->get_mixbus())
global_actions.register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
if (Profile->get_mixbus()) {
global_actions.register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
}
global_actions.register_action (common_actions, X_("toggle-meterbridge"), S_("Window|Meterbridge"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_meterbridge));

View File

@ -305,7 +305,6 @@ Mixer_UI::track_editor_selection ()
PublicEditor::instance().get_selection().TracksChanged.connect (sigc::mem_fun (*this, &Mixer_UI::follow_editor_selection));
}
void
Gtk::Window*
Mixer_UI::use_own_window (bool and_fill_it)
{
@ -325,70 +324,29 @@ Mixer_UI::use_own_window (bool and_fill_it)
return win;
}
void
Mixer_UI::show_window ()
{
if (_parent_window) {
_parent_window->present ();
}
Tabbable::show_window ();
if (!_visible) { /* was hidden, update status */
/* show/hide group tabs as required */
parameter_changed ("show-group-tabs");
set_window_pos_and_size ();
/* now reset each strips width so the right widgets are shown */
MixerStrip* ms;
/* show/hide group tabs as required */
parameter_changed ("show-group-tabs");
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator ri;
/* now reset each strips width so the right widgets are shown */
MixerStrip* ms;
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator ri;
for (ri = rows.begin(); ri != rows.end(); ++ri) {
ms = (*ri)[track_columns.strip];
ms->set_width_enum (ms->get_width_enum (), ms->width_owner());
/* Fix visibility of mixer strip stuff */
ms->parameter_changed (X_("mixer-element-visibility"));
}
}
if (!_parent_window) {
/* not in its own window, just switch main tabs to show mixer */
int pagenum = ARDOUR_UI::instance()->tabs().page_num (*this);
ARDOUR_UI::instance()->tabs().set_current_page (pagenum);
for (ri = rows.begin(); ri != rows.end(); ++ri) {
ms = (*ri)[track_columns.strip];
ms->set_width_enum (ms->get_width_enum (), ms->width_owner());
/* Fix visibility of mixer strip stuff */
ms->parameter_changed (X_("mixer-element-visibility"));
}
/* force focus into main area */
scroller_base.grab_focus ();
_visible = true;
}
bool
Mixer_UI::hide_window (GdkEventAny *ev)
{
if (_parent_window) {
/* unpack Mixer_UI from parent, put it back in the main tabbed
* notebook
*/
get_window_pos_and_size ();
get_parent()->remove (*this);
ARDOUR_UI::instance()->tabs().insert_page (*this, _("Mixer"), 1);
ARDOUR_UI::instance()->tabs().set_tab_detachable (*this);
ARDOUR_UI::instance()->tabs().set_current_page (0);
show_all ();
delete_when_idle (_parent_window);
_parent_window = 0;
}
ARDOUR_UI::instance()->tabs().set_current_page (0);
_visible = false;
return true;
}
void
@ -1001,31 +959,6 @@ Mixer_UI::fast_update_strips ()
}
}
void
Mixer_UI::show_window ()
{
Tabbable::show_window ();
/* show/hide group tabs as required */
parameter_changed ("show-group-tabs");
/* now reset each strips width so the right widgets are shown */
MixerStrip* ms;
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator ri;
for (ri = rows.begin(); ri != rows.end(); ++ri) {
ms = (*ri)[track_columns.strip];
ms->set_width_enum (ms->get_width_enum (), ms->width_owner());
/* Fix visibility of mixer strip stuff */
ms->parameter_changed (X_("mixer-element-visibility"));
}
/* force focus into main area */
scroller_base.grab_focus ();
}
void
Mixer_UI::set_all_strips_visibility (bool yn)
{
@ -1351,7 +1284,7 @@ Mixer_UI::strip_property_changed (const PropertyChange& what_changed, MixerStrip
}
}
x error << _("track display list item for renamed strip not found!") << endmsg;
error << _("track display list item for renamed strip not found!") << endmsg;
}
bool
@ -1723,54 +1656,8 @@ int
Mixer_UI::set_state (const XMLNode& node, int version)
{
const XMLProperty* prop;
XMLNode* geometry;
m_width = default_width;
m_height = default_height;
m_root_x = 1;
m_root_y = 1;
if ((geometry = find_named_node (node, "geometry")) != 0) {
/* if there's a geometry node, we have our own window */
create_own_window ();
Gtk::Notebook* notebook = (Gtk::Notebook*) _parent_window->get_child();
Gtk::Widget* parent = get_parent();
if (parent) {
((Gtk::Container*)parent)->remove (*this);
}
notebook->append_page (*this, _("Mixer"));
XMLProperty* prop;
if ((prop = geometry->property("x_size")) == 0) {
prop = geometry->property ("x-size");
}
if (prop) {
m_width = atoi(prop->value());
}
if ((prop = geometry->property("y_size")) == 0) {
prop = geometry->property ("y-size");
}
if (prop) {
m_height = atoi(prop->value());
}
if ((prop = geometry->property ("x_pos")) == 0) {
prop = geometry->property ("x-pos");
}
if (prop) {
m_root_x = atoi (prop->value());
}
if ((prop = geometry->property ("y_pos")) == 0) {
prop = geometry->property ("y-pos");
}
if (prop) {
m_root_y = atoi (prop->value());
}
}
Tabbable::set_state (node, version);
if ((prop = node.property ("narrow-strips"))) {
if (string_is_affirmative (prop->value())) {

View File

@ -43,7 +43,6 @@
#include "ardour/plugin_manager.h"
#include "gtkmm2ext/visibility_tracker.h"
#include "gtkmm2ext/dndtreeview.h"
#include "gtkmm2ext/treeutils.h"
@ -75,7 +74,7 @@ protected:
virtual bool row_drop_possible_vfunc (const Gtk::TreeModel::Path&, const Gtk::SelectionData&) const;
};
class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor, public Gtkmm2ext::VisibilityTracker
class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor
{
public:
static Mixer_UI* instance();

View File

@ -3206,10 +3206,10 @@ void RCOptionEditor::clear_au_blacklist () {
void RCOptionEditor::edit_lxvst_path () {
Glib::RefPtr<Gdk::Window> win = get_parent_window ();
Gtkmm2ext::PathsDialog *pd = new Gtkmm2ext::PathsDialog (
*this, _("Set Linux VST Search Path"),
_rc_config->get_plugin_path_lxvst(),
PluginManager::instance().get_default_lxvst_path()
);
*current_toplevel(), _("Set Linux VST Search Path"),
_rc_config->get_plugin_path_lxvst(),
PluginManager::instance().get_default_lxvst_path()
);
ResponseType r = (ResponseType) pd->run ();
pd->hide();
if (r == RESPONSE_ACCEPT) {
@ -3220,10 +3220,10 @@ void RCOptionEditor::edit_lxvst_path () {
void RCOptionEditor::edit_vst_path () {
Gtkmm2ext::PathsDialog *pd = new Gtkmm2ext::PathsDialog (
*this, _("Set Windows VST Search Path"),
_rc_config->get_plugin_path_vst(),
PluginManager::instance().get_default_windows_vst_path()
);
*current_toplevel(), _("Set Windows VST Search Path"),
_rc_config->get_plugin_path_vst(),
PluginManager::instance().get_default_windows_vst_path()
);
ResponseType r = (ResponseType) pd->run ();
pd->hide();
if (r == RESPONSE_ACCEPT) {

View File

@ -25,7 +25,7 @@
#include "pbd/strsplit.h"
#include "pbd/file_utils.h"
#include "gtkmm2ext/actions.h"
#include "gtkmm2ext/bindings.h"
#include "gtkmm2ext/gtk_ui.h"
#include "gtkmm2ext/gui_thread.h"
#include "gtkmm2ext/utils.h"
@ -357,12 +357,14 @@ FPGUI::build_available_action_menu ()
vector<string> labels;
vector<string> tooltips;
vector<string> keys;
vector<AccelKey> bindings;
vector<Glib::RefPtr<Gtk::Action> > actions;
Gtkmm2ext::ActionMap::get_all_actions (paths, labels, tooltips, keys, actions);
typedef std::map<string,TreeIter> NodeMap;
NodeMap nodes;
NodeMap::iterator r;
ActionManager::get_all_actions (labels, paths, tooltips, keys, bindings);
vector<string>::iterator k;
vector<string>::iterator p;