From 05e194cbe01bfcd38a9cb2fc5a27aeda15a3f82f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 20 Feb 2009 14:37:34 +0000 Subject: [PATCH] fix up indentation caused by lack of .emacs git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4646 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/add_route_dialog.cc | 122 ++++++++++++++++---------------- gtk2_ardour/route_ui.cc | 60 ++++++++-------- libs/ardour/io.cc | 24 +++---- libs/ardour/route.cc | 14 ++-- libs/ardour/vst_plugin.cc | 24 +++---- 5 files changed, 122 insertions(+), 122 deletions(-) diff --git a/gtk2_ardour/add_route_dialog.cc b/gtk2_ardour/add_route_dialog.cc index 20da63689f..d37ec11593 100644 --- a/gtk2_ardour/add_route_dialog.cc +++ b/gtk2_ardour/add_route_dialog.cc @@ -1,19 +1,19 @@ /* - Copyright (C) 2003 Paul Davis + Copyright (C) 2003 Paul Davis - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ @@ -146,9 +146,9 @@ AddRouteDialog::AddRouteDialog () /* we need more control over the visibility of these boxes */ /* - hbox3->set_no_show_all (true); - hbox9->set_no_show_all (true); - hbox4->set_no_show_all (true); + hbox3->set_no_show_all (true); + hbox9->set_no_show_all (true); + hbox4->set_no_show_all (true); */ /* track/bus choice & modes */ @@ -182,7 +182,7 @@ AddRouteDialog::AddRouteDialog () vbox1->pack_start (*frame1, PACK_SHRINK); if (!ARDOUR::Profile->get_sae()) { - vbox1->pack_start (*frame2, PACK_SHRINK); + vbox1->pack_start (*frame2, PACK_SHRINK); } get_vbox()->set_spacing (6); @@ -213,19 +213,19 @@ AddRouteDialog::~AddRouteDialog () void AddRouteDialog::track_type_chosen () { - if (template_button.get_active()) { - track_mode_combo.set_sensitive (false); - channel_combo.set_sensitive (false); - track_template_combo.set_sensitive (true); - } else { - track_template_combo.set_sensitive (false); - channel_combo.set_sensitive (true); - if (track_button.get_active()) { - track_mode_combo.set_sensitive (true); - } else { - track_mode_combo.set_sensitive (false); - } - } + if (template_button.get_active()) { + track_mode_combo.set_sensitive (false); + channel_combo.set_sensitive (false); + track_template_combo.set_sensitive (true); + } else { + track_template_combo.set_sensitive (false); + channel_combo.set_sensitive (true); + if (track_button.get_active()) { + track_mode_combo.set_sensitive (true); + } else { + track_mode_combo.set_sensitive (false); + } + } } bool @@ -287,56 +287,56 @@ AddRouteDialog::channels () string AddRouteDialog::track_template () { - if (!template_button.get_active()) { - return string (); - } + if (!template_button.get_active()) { + return string (); + } - string str = track_template_combo.get_active_text(); + string str = track_template_combo.get_active_text(); - for (vector::iterator x = route_templates.begin(); x != route_templates.end(); ++x) { - if ((*x).name == str) { - return (*x).path; - } - } + for (vector::iterator x = route_templates.begin(); x != route_templates.end(); ++x) { + if ((*x).name == str) { + return (*x).path; + } + } - return string(); + return string(); } void AddRouteDialog::on_show () { - refill_track_templates (); - Dialog::on_show (); + refill_track_templates (); + Dialog::on_show (); } void AddRouteDialog::refill_track_templates () { - route_templates.clear (); - Session::get_route_templates (route_templates); + route_templates.clear (); + Session::get_route_templates (route_templates); - if (!route_templates.empty()) { - vector v; - for (vector::iterator x = route_templates.begin(); x != route_templates.end(); ++x) { - v.push_back ((*x).name); - } - set_popdown_strings (track_template_combo, v); - track_template_combo.set_active_text (v.front()); - } + if (!route_templates.empty()) { + vector v; + for (vector::iterator x = route_templates.begin(); x != route_templates.end(); ++x) { + v.push_back ((*x).name); + } + set_popdown_strings (track_template_combo, v); + track_template_combo.set_active_text (v.front()); + } - reset_template_option_visibility (); + reset_template_option_visibility (); } void AddRouteDialog::reset_template_option_visibility () { - if (route_templates.empty()) { - hbox3->hide (); - hbox9->hide (); - hbox4->hide (); - } else { - hbox3->show_all (); - hbox9->show_all (); - hbox4->show_all (); - } + if (route_templates.empty()) { + hbox3->hide (); + hbox9->hide (); + hbox4->hide (); + } else { + hbox3->show_all (); + hbox9->show_all (); + hbox4->show_all (); + } } diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index bb0f40ddd6..c45aed5c6c 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -1175,35 +1175,35 @@ RouteUI::map_frozen () void RouteUI::save_as_template () { - Glib::ustring path; - Glib::ustring safe_name; - std::string name; - - path = Session::route_template_dir(); - - if (g_mkdir_with_parents (path.c_str(), 0755)) { - error << string_compose (_("Cannot create route template directory %1"), path) << endmsg; - return; - } - - Prompter p (true); // modal - - p.set_prompt (_("Template name:")); - switch (p.run()) { - case RESPONSE_ACCEPT: - break; - default: - return; - } - - p.hide (); - p.get_result (name, true); - - safe_name = legalize_for_path (name); - safe_name += Session::template_suffix (); - - path = Glib::build_filename (path, safe_name); - - _route->save_as_template (path, name); + Glib::ustring path; + Glib::ustring safe_name; + std::string name; + + path = Session::route_template_dir(); + + if (g_mkdir_with_parents (path.c_str(), 0755)) { + error << string_compose (_("Cannot create route template directory %1"), path) << endmsg; + return; + } + + Prompter p (true); // modal + + p.set_prompt (_("Template name:")); + switch (p.run()) { + case RESPONSE_ACCEPT: + break; + default: + return; + } + + p.hide (); + p.get_result (name, true); + + safe_name = legalize_for_path (name); + safe_name += Session::template_suffix (); + + path = Glib::build_filename (path, safe_name); + + _route->save_as_template (path, name); } diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index b258dff78c..4a993cae11 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -2809,21 +2809,21 @@ IO::set_active (bool yn) string IO::name_from_state (const XMLNode& node) { - const XMLProperty* prop; - - if ((prop = node.property ("name")) != 0) { - return prop->value(); - } - - return string(); + const XMLProperty* prop; + + if ((prop = node.property ("name")) != 0) { + return prop->value(); + } + + return string(); } void IO::set_name_in_state (XMLNode& node, const string& new_name) { - const XMLProperty* prop; - - if ((prop = node.property ("name")) != 0) { - node.add_property ("name", new_name); - } + const XMLProperty* prop; + + if ((prop = node.property ("name")) != 0) { + node.add_property ("name", new_name); + } } diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 04f3f39380..50f03854fb 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2668,11 +2668,11 @@ Route::shift (nframes64_t pos, nframes64_t frames) int Route::save_as_template (const string& path, const string& name) { - XMLNode& node (state (false)); - XMLTree tree; - - IO::set_name_in_state (*node.children().front(), name); - - tree.set_root (&node); - return tree.write (path.c_str()); + XMLNode& node (state (false)); + XMLTree tree; + + IO::set_name_in_state (*node.children().front(), name); + + tree.set_root (&node); + return tree.write (path.c_str()); } diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 7db67cdfbb..feafb29bc9 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -1,19 +1,19 @@ /* - Copyright (C) 2004 Paul Davis + Copyright (C) 2004 Paul Davis - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */