diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-26 14:35:06 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-22 15:31:24 -0500 |
commit | bc487bb4b02a9780938d6cf8528c888e59161aa9 (patch) | |
tree | 967703b895cafc301d3a0d4876c343370760fef2 /gtk2_ardour | |
parent | 589f2a1ab83e4498920faa2f0ef37c1632eaf914 (diff) |
replicate the remove-all-trailing whitespace commit(s) in master
Diffstat (limited to 'gtk2_ardour')
27 files changed, 171 insertions, 178 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 72e15f8b60..e27a1a728f 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -430,7 +430,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) } /* Separate windows */ - + WM::Manager::instance().register_window (&key_editor); WM::Manager::instance().register_window (&session_option_editor); WM::Manager::instance().register_window (&speaker_config_window); @@ -592,13 +592,13 @@ ARDOUR_UI::post_engine () if (ARDOUR_COMMAND_LINE::show_key_actions) { - + vector<string> paths; vector<string> labels; vector<string> tooltips; vector<string> keys; vector<Glib::RefPtr<Gtk::Action> > actions; - + Gtkmm2ext::ActionMap::get_all_actions (paths, labels, tooltips, keys, actions); vector<string>::iterator k; @@ -617,7 +617,7 @@ ARDOUR_UI::post_engine () AudioEngine::instance()->stop (); exit (0); } - + /* this being a GUI and all, we want peakfiles */ AudioFileSource::set_build_peakfiles (true); @@ -5130,7 +5130,7 @@ ARDOUR_UI::setup_toplevel_window (Gtk::Window& window, const string& name, void* if (!window_icons.empty()) { window.set_default_icon_list (window_icons); } - + Gtkmm2ext::WindowTitle title (Glib::get_application_name()); if (!name.empty()) { @@ -5164,15 +5164,15 @@ ARDOUR_UI::key_event_handler (GdkEventKey* ev, Gtk::Window* event_window) /* until we get ardour bindings working, we are not handling key * releases yet. */ - + if (ev->type != GDK_KEY_PRESS) { return false; } - + if (event_window == &_main_window) { window = event_window; - + /* find current tab contents */ Gtk::Widget* w = _tabs.get_nth_page (_tabs.get_current_page()); @@ -5184,25 +5184,25 @@ ARDOUR_UI::key_event_handler (GdkEventKey* ev, Gtk::Window* event_window) } DEBUG_TRACE (DEBUG::Accelerators, string_compose ("main window key event, bindings = %1, global = %2\n", bindings, &global_bindings)); - + } else { window = event_window; - + /* see if window uses ardour binding system */ bindings = reinterpret_cast<Gtkmm2ext::Bindings*>(window->get_data ("ardour-bindings")); - } + } /* An empty binding set is treated as if it doesn't exist */ - + if (bindings && bindings->empty()) { bindings = 0; } - + return key_press_focus_accelerator_handler (*window, ev, bindings); } - + bool ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev, Gtkmm2ext::Bindings* bindings) { @@ -5217,14 +5217,14 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey Gtkmm2ext::possibly_translate_mod_to_make_legal_accelerator(modifier); if (focus) { - + /* some widget has keyboard focus */ if (GTK_IS_ENTRY(focus) || Keyboard::some_magic_widget_has_focus()) { /* A particular kind of focusable widget currently has keyboard * focus. All unmodified key events should go to that widget - * first and not be used as an accelerator by default + * first and not be used as an accelerator by default */ special_handling_of_unmodified_accelerators = true; @@ -5271,9 +5271,9 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey all "normal text" accelerators. */ - + if (!special_handling_of_unmodified_accelerators || (ev->state & mask)) { - + /* no special handling or there are modifiers in effect: accelerate first */ DEBUG_TRACE (DEBUG::Accelerators, "\tactivate, then propagate\n"); @@ -5286,7 +5286,7 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey if (bindings) { DEBUG_TRACE (DEBUG::Accelerators, string_compose ("\tusing Ardour bindings %1 for this event\n", bindings)); - + if (bindings->activate (k, Bindings::Press)) { DEBUG_TRACE (DEBUG::Accelerators, "\t\thandled\n"); return true; @@ -5294,47 +5294,47 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey } DEBUG_TRACE (DEBUG::Accelerators, "\tnot yet handled, try global bindings\n"); - + if (global_bindings && global_bindings->activate (k, Bindings::Press)) { DEBUG_TRACE (DEBUG::Accelerators, "\t\thandled\n"); return true; } DEBUG_TRACE (DEBUG::Accelerators, "\tnot accelerated, now propagate\n"); - + if (gtk_window_propagate_key_event (win, ev)) { DEBUG_TRACE (DEBUG::Accelerators, "\tpropagate handled\n"); return true; } } else { - + /* no modifiers, propagate first */ - + DEBUG_TRACE (DEBUG::Accelerators, "\tpropagate, then activate\n"); - + if (gtk_window_propagate_key_event (win, ev)) { DEBUG_TRACE (DEBUG::Accelerators, "\thandled by propagate\n"); return true; } DEBUG_TRACE (DEBUG::Accelerators, "\tpropagation didn't handle, so activate\n"); - KeyboardKey k (ev->state, ev->keyval); + KeyboardKey k (ev->state, ev->keyval); if (bindings) { - + DEBUG_TRACE (DEBUG::Accelerators, "\tusing Ardour bindings for this window\n"); - + if (bindings->activate (k, Bindings::Press)) { DEBUG_TRACE (DEBUG::Accelerators, "\t\thandled\n"); return true; } - - } - + + } + DEBUG_TRACE (DEBUG::Accelerators, "\tnot yet handled, try global bindings\n"); - + if (global_bindings && global_bindings->activate (k, Bindings::Press)) { DEBUG_TRACE (DEBUG::Accelerators, "\t\thandled\n"); return true; diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 180abfdead..407616e062 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -225,7 +225,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr XMLNode* mixer_settings () const; XMLNode* keyboard_settings () const; XMLNode* tearoff_settings (const char*) const; - + void save_ardour_state (); gboolean configure_handler (GdkEventConfigure* conf); @@ -325,7 +325,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr Gtk::Window& main_window () { return _main_window; } void setup_toplevel_window (Gtk::Window&, const std::string& name, void* owner); - + /* called from a static C function */ GtkNotebook* tab_window_root_drop (GtkNotebook* src, @@ -373,14 +373,14 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr bool first_time_engine_run; bool tabs_button_event (GdkEventButton* ev); - + void show_tabbable (Gtkmm2ext::Tabbable*); void hide_tabbable (Gtkmm2ext::Tabbable*); void detach_tabbable (Gtkmm2ext::Tabbable*); void attach_tabbable (Gtkmm2ext::Tabbable*); void tabbable_state_change (Gtkmm2ext::Tabbable&); - + void toggle_meterbridge (); int setup_windows (); @@ -402,7 +402,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr void session_dirty_changed (); void update_title (); - + void map_transport_state (); int32_t do_engine_start (); @@ -652,7 +652,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr RCOptionEditor* rc_option_editor; Gtk::HBox rc_option_editor_placeholder; - + WM::Proxy<SpeakerDialog> speaker_config_window; WM::Proxy<AddRouteDialog> add_route_dialog; WM::Proxy<About> about; @@ -679,7 +679,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr BigClockWindow* create_big_clock_window(); GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType); KeyEditor* create_key_editor (); - + ARDOUR::SystemExec *video_server_process; void handle_locations_change (ARDOUR::Location*); @@ -831,7 +831,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr void tabs_page_removed (Gtk::Widget*, guint page_number); bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev, Gtkmm2ext::Bindings*); bool try_gtk_accel_binding (GtkWindow* win, GdkEventKey* ev, bool translate, GdkModifierType modifier); - + bool main_window_delete_event (GdkEventAny*); bool idle_ask_about_quit (); diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 0fc4c9ea59..3466a98986 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -87,9 +87,9 @@ ARDOUR_UI::tabs_button_event (GdkEventButton* ev) * translate before computing if event is inside the * close button. */ - + close_button->get_toplevel()->translate_coordinates (_tabs, alloc.get_x(), alloc.get_y(), dx, dy); - + if (ev->x >= dx && ev->y >= dy && ev->x < dx + alloc.get_width() && @@ -100,7 +100,7 @@ ARDOUR_UI::tabs_button_event (GdkEventButton* ev) } } } - + return false; } diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index ddeebdef83..e7f46db83d 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -62,13 +62,13 @@ ARDOUR_UI::we_have_dependents () { install_actions (); load_bindings (); - + ProcessorBox::register_actions (); /* Global, editor, mixer, processor box actions are defined now. Link them with any bindings, so that GTK does not get a chance to define the GTK accel map entries first when we ask the GtkUIManager to - create menus/widgets. + create menus/widgets. If GTK adds the actions to its accel map before we do, we lose our freedom to use any keys. More precisely, we can use any keys, but @@ -81,9 +81,9 @@ ARDOUR_UI::we_have_dependents () importantly they don't have menus showing the bindings, so it is less of an issue. */ - + Gtkmm2ext::Bindings::associate_all (); - + editor->setup_tooltips (); editor->UpdateAllTransportClocks.connect (sigc::mem_fun (*this, &ARDOUR_UI::update_transport_clocks)); @@ -92,7 +92,7 @@ ARDOUR_UI::we_have_dependents () tabbable_state_change (*editor); tabbable_state_change (*mixer); tabbable_state_change (*rc_option_editor); - + /* all actions are defined */ ActionManager::load_menus (ARDOUR_COMMAND_LINE::menus_file); @@ -101,7 +101,7 @@ ARDOUR_UI::we_have_dependents () mixer->track_editor_selection (); /* catch up on parameters */ - + boost::function<void (std::string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1)); Config->map_parameters (pc); @@ -171,7 +171,7 @@ ARDOUR_UI::tab_window_root_drop (GtkNotebook* src, win->present (); return nb->gobj(); } - + return 0; /* what was that? */ } @@ -207,9 +207,9 @@ ARDOUR_UI::main_window_delete_event (GdkEventAny* ev) * the window manager/desktop can think we're taking too longer to * handle the "delete" event */ - - Glib::signal_idle().connect (sigc::mem_fun (*this, &ARDOUR_UI::idle_ask_about_quit)); - + + Glib::signal_idle().connect (sigc::mem_fun (*this, &ARDOUR_UI::idle_ask_about_quit)); + return true; } @@ -262,7 +262,7 @@ ARDOUR_UI::setup_windows () } /* order of addition affects order seen in initial window display */ - + rc_option_editor->add_to_notebook (_tabs, _("Preferences")); mixer->add_to_notebook (_tabs, _("Mixer")); editor->add_to_notebook (_tabs, _("Editor")); @@ -292,7 +292,7 @@ ARDOUR_UI::setup_windows () main_vpacker.pack_start (top_packer, false, false); /* now add the transport frame to the top of main window */ - + main_vpacker.pack_start (transport_frame, false, false); main_vpacker.pack_start (_tabs, true, true); @@ -305,7 +305,7 @@ ARDOUR_UI::setup_windows () setup_tooltips (); _main_window.signal_delete_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::main_window_delete_event)); - + /* pack the main vpacker into the main window and show everything */ @@ -327,12 +327,12 @@ ARDOUR_UI::setup_windows () if ((prop = mnode->property (X_("y"))) != 0) { y = atoi (prop->value()); - } + } if ((prop = mnode->property (X_("w"))) != 0) { w = atoi (prop->value()); - } - + } + if ((prop = mnode->property (X_("h"))) != 0) { h = atoi (prop->value()); } @@ -340,17 +340,17 @@ ARDOUR_UI::setup_windows () if (x >= 0 && y >= 0 && w >= 0 && h >= 0) { _main_window.set_position (Gtk::WIN_POS_NONE); } - + if (x >= 0 && y >= 0) { _main_window.move (x, y); } - + if (w > 0 && h > 0) { _main_window.set_default_size (w, h); } std::string current_tab; - + if ((prop = mnode->property (X_("current-tab"))) != 0) { current_tab = prop->value(); } else { @@ -364,10 +364,10 @@ ARDOUR_UI::setup_windows () _tabs.set_current_page (_tabs.page_num (editor->contents())); } } - + _main_window.show_all (); setup_toplevel_window (_main_window, "", this); - + _tabs.signal_switch_page().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_switch)); _tabs.signal_page_removed().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_page_removed)); _tabs.signal_page_added().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_page_added)); diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index b57808e24a..e42c532995 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -322,7 +322,7 @@ ARDOUR_UI::unload_session (bool hide_stuff) update_buffer_load (); update_title (); - + return 0; } @@ -332,7 +332,7 @@ ARDOUR_UI::show_tabbable (Tabbable* t) if (!t) { return; } - + t->make_visible (); } @@ -369,7 +369,7 @@ ARDOUR_UI::tabbable_state_change (Tabbable& t) { std::vector<std::string> insensitive_action_names; std::vector<std::string> sensitive_action_names; - Glib::RefPtr<Action> action; + Glib::RefPtr<Action> action; std::string downcased_name = downcase (t.name()); if (t.tabbed()) { @@ -385,7 +385,7 @@ ARDOUR_UI::tabbable_state_change (Tabbable& t) insensitive_action_names.push_back (string_compose ("hide-%1", downcased_name)); sensitive_action_names.push_back (string_compose ("show-%1", downcased_name)); sensitive_action_names.push_back (string_compose ("detach-%1", downcased_name)); - + } else if (t.window_visible()) { insensitive_action_names.push_back (string_compose ("detach-%1", downcased_name)); @@ -398,7 +398,7 @@ ARDOUR_UI::tabbable_state_change (Tabbable& t) /* not currently visible. allow user to retab it or just make * it visible. */ - + insensitive_action_names.push_back (string_compose ("detach-%1", downcased_name)); insensitive_action_names.push_back (string_compose ("hide-%1", downcased_name)); sensitive_action_names.push_back (string_compose ("show-%1", downcased_name)); diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 57dd0cc935..69a3245fa0 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -229,11 +229,11 @@ ARDOUR_UI::install_actions () global_actions.register_action (common_actions, X_("hide-editor"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), editor)); global_actions.register_action (common_actions, X_("hide-mixer"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), mixer)); global_actions.register_action (common_actions, X_("hide-preferences"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), rc_option_editor)); - + global_actions.register_action (common_actions, X_("attach-editor"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), editor)); global_actions.register_action (common_actions, X_("attach-mixer"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), mixer)); global_actions.register_action (common_actions, X_("attach-preferences"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), rc_option_editor)); - + global_actions.register_action (common_actions, X_("detach-editor"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), editor)); global_actions.register_action (common_actions, X_("detach-mixer"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), mixer)); global_actions.register_action (common_actions, X_("detach-preferences"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), rc_option_editor)); @@ -660,7 +660,7 @@ ARDOUR_UI::save_ardour_state () } main_window_node.add_property (X_("current-tab"), current_tab); - + /* Windows */ WM::Manager::instance().add_state (*window_node); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index ed02d6db9f..52dd108fae 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -745,7 +745,7 @@ Editor::Editor () /* need to show the "contents" widget so that notebook will show if tab is switched to */ - global_hpacker.show (); + global_hpacker.show (); /* register actions now so that set_state() can find them and set toggles/checks etc */ @@ -1258,7 +1258,7 @@ Editor::update_title () if (!own_window()) { return; } - + if (_session) { bool dirty = _session->dirty(); @@ -2183,7 +2183,7 @@ Editor::set_state (const XMLNode& node, int version) set_id (node); Tabbable::set_state (node, version); - + if (_session && (prop = node.property ("playhead"))) { framepos_t pos; sscanf (prop->value().c_str(), "%" PRIi64, &pos); @@ -2414,13 +2414,13 @@ Editor::get_state () node->add_property ("id", buf); node->add_child_nocopy (Tabbable::get_state()); - + snprintf(buf,sizeof(buf), "%d",gtk_paned_get_position (static_cast<Paned*>(&edit_pane)->gobj())); node->add_property("edit-horizontal-pane-pos", string(buf)); node->add_property("notebook-shrunk", _notebook_shrunk ? "1" : "0"); snprintf(buf,sizeof(buf), "%d",gtk_paned_get_position (static_cast<Paned*>(&editor_summary_pane)->gobj())); node->add_property("edit-vertical-pane-pos", string(buf)); - + maybe_add_mixer_strip_width (*node); node->add_property ("zoom-focus", enum_2_string (zoom_focus)); @@ -2885,9 +2885,9 @@ Editor::setup_toolbar () if (!ARDOUR::Profile->get_trx()) { mode_box->pack_start (edit_mode_selector, false, false); } - + mode_box->pack_start (*mouse_mode_box, false, false); - + /* Zoom */ _zoom_box.set_spacing (2); @@ -5607,12 +5607,12 @@ Editor::session_going_away () stop_step_editing (); if (own_window()) { - + /* get rid of any existing editor mixer strip */ - + WindowTitle title(Glib::get_application_name()); title += _("Editor"); - + own_window()->set_title (title.get_string()); } @@ -5851,7 +5851,7 @@ Gtk::Window* Editor::use_own_window (bool and_fill_it) { bool new_window = !own_window(); - + Gtk::Window* win = Tabbable::use_own_window (and_fill_it); if (win && new_window) { @@ -5862,39 +5862,39 @@ Editor::use_own_window (bool and_fill_it) // win->signal_realize().connect (*this, &Editor::on_realize); win->signal_event().connect (sigc::mem_fun (*this, &Editor::generic_event_handler)); win->set_data ("ardour-bindings", bindings); - + update_title (); } DisplaySuspender ds; contents().show_all (); - + /* XXX: this is a bit unfortunate; it would probably be nicer if we could just call show () above rather than needing the show_all () */ - + /* re-hide stuff if necessary */ editor_list_button_toggled (); parameter_changed ("show-summary"); parameter_changed ("show-group-tabs"); parameter_changed ("show-zoom-tools"); - + /* now reset all audio_time_axis heights, because widgets might need to be re-hidden */ - + TimeAxisView *tv; - + for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { tv = (static_cast<TimeAxisView*>(*i)); tv->reset_height (); } - + if (current_mixer_strip) { current_mixer_strip->hide_things (); current_mixer_strip->parameter_changed ("mixer-element-visibility"); } - + return win; } diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 972510f294..7fabef74c1 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -143,7 +143,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD ARDOUR::Session* session() const { return _session; } Gtk::Window* use_own_window (bool and_fill_it); - + void first_idle (); virtual bool have_idled () const { return _have_idled; } diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index de1ff8b4b8..4c632241aa 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -477,7 +477,7 @@ Editor::register_actions () Glib::RefPtr<ActionGroup> mouse_mode_actions = myactions.create_action_group (X_("MouseMode")); RadioAction::Group mouse_mode_group; - act = myactions.register_toggle_action (mouse_mode_actions, "set-mouse-mode-object-range", _("Smart Object Mode"), sigc::mem_fun (*this, &Editor::mouse_mode_object_range_toggled)); + act = myactions.register_toggle_action (mouse_mode_actions, "set-mouse-mode-object-range", _("Smart Object Mode"), sigc::mem_fun (*this, &Editor::mouse_mode_object_range_toggled)); smart_mode_action = Glib::RefPtr<ToggleAction>::cast_static (act); smart_mode_button.set_related_action (smart_mode_action); smart_mode_button.set_text (_("Smart")); @@ -488,27 +488,27 @@ Editor::register_actions () mouse_move_button.set_icon (Gtkmm2ext::ArdourIcon::ToolGrab); mouse_move_button.set_name ("mouse mode button"); - act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange)); + act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange)); mouse_select_button.set_related_action (act); mouse_select_button.set_icon (Gtkmm2ext::ArdourIcon::ToolRange); mouse_select_button.set_name ("mouse mode button"); - act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseDraw)); + act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseDraw)); mouse_draw_button.set_related_action (act); mouse_draw_button.set_icon (Gtkmm2ext::ArdourIcon::ToolDraw); mouse_draw_button.set_name ("mouse mode button"); - act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-audition", _("Audition Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition)); + act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-audition", _("Audition Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition)); mouse_audition_button.set_related_action (act); mouse_audition_button.set_icon (Gtkmm2ext::ArdourIcon::ToolAudition); mouse_audition_button.set_name ("mouse mode button"); - act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX)); + act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX)); mouse_timefx_button.set_related_action (act); mouse_timefx_button.set_icon (Gtkmm2ext::ArdourIcon::ToolStretch); mouse_timefx_button.set_name ("mouse mode button"); - act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Content Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseContent)); + act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Content Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseContent)); mouse_content_button.set_related_action (act); mouse_content_button.set_icon (Gtkmm2ext::ArdourIcon::ToolContent); mouse_content_button.set_name ("mouse mode button"); @@ -742,7 +742,7 @@ Editor::register_actions () Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); tact->set_active (true); - myactions.register_action (editor_actions, X_("toggle-midi-input-active"), _("Toggle MIDI Input Active for Editor-Selected Tracks/Busses"), + myactions.register_action (editor_actions, X_("toggle-midi-input-active"), _("Toggle MIDI Input Active for Editor-Selected Tracks/Busses"), sigc::bind (sigc::mem_fun (*this, &Editor::toggle_midi_input_active), false)); } diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index cd5023916e..2266904178 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -505,7 +505,7 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers) if (!toplevel) { return; } - + if (!UIConfiguration::instance().get_autoscroll_editor () || autoscroll_active ()) { return; } @@ -744,7 +744,7 @@ Editor::autoscroll_canvas () x = min (max ((ArdourCanvas::Coord) x, autoscroll_boundary.x0), autoscroll_boundary.x1); } y = min (max ((ArdourCanvas::Coord) y, autoscroll_boundary.y0), autoscroll_boundary.y1); - + toplevel->translate_coordinates (*_track_canvas_viewport, x, y, cx, cy); ArdourCanvas::Duple d = _track_canvas->window_to_canvas (ArdourCanvas::Duple (cx, cy)); diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc index e95a73af32..95ab7e029b 100644 --- a/gtk2_ardour/keyeditor.cc +++ b/gtk2_ardour/keyeditor.cc @@ -60,9 +60,9 @@ KeyEditor::KeyEditor () last_keyval = 0; notebook.signal_switch_page ().connect (sigc::mem_fun (*this, &KeyEditor::page_change)); - + vpacker.pack_start (notebook, true, true); - + if (!ARDOUR::Profile->get_sae()) { Label* hint = manage (new Label (_("Select an action, then press the key(s) to (re)set its shortcut"))); @@ -126,7 +126,7 @@ KeyEditor::on_key_press_event (GdkEventKey* ev) * keys will be used by GTK to change the selection/treeview cursor * position */ - + return true; } @@ -211,7 +211,7 @@ KeyEditor::Tab::unbind () if (!(*i)[columns.bindable]) { return; } - + bindings->remove (action, Gtkmm2ext::Bindings::Press, true); (*i)[columns.binding] = string (); } @@ -244,7 +244,7 @@ KeyEditor::Tab::bind (GdkEventKey* release_event, guint pressed_key) void KeyEditor::Tab::populate () -{ +{ vector<string> paths; vector<string> labels; vector<string> tooltips; @@ -261,7 +261,7 @@ KeyEditor::Tab::populate () vector<string>::iterator t; vector<string>::iterator l; vector<Glib::RefPtr<Action> >::iterator a; - + model->clear (); for (a = actions.begin(), l = labels.begin(), k = keys.begin(), p = paths.begin(), t = tooltips.begin(); l != labels.end(); ++k, ++p, ++t, ++l, ++a) { @@ -273,7 +273,7 @@ KeyEditor::Tab::populate () string category = parts[1]; string action_name = parts[2]; - + if (action_name.empty()) { continue; } @@ -301,13 +301,13 @@ KeyEditor::Tab::populate () /* now set up the child row that we're about to fill * out with information */ - + row = *(model->append (parent.children())); } else { /* category/group is present, so just add the child row */ - + row = *(model->append ((*r->second)->children())); } @@ -315,7 +315,7 @@ KeyEditor::Tab::populate () /* add this action */ /* use the "visible label" as the action name */ - + if (l->empty ()) { /* no label, try using the tooltip instead */ row[columns.name] = *t; diff --git a/gtk2_ardour/keyeditor.h b/gtk2_ardour/keyeditor.h index 046f8b0715..9ded5d33be 100644 --- a/gtk2_ardour/keyeditor.h +++ b/gtk2_ardour/keyeditor.h @@ -40,7 +40,7 @@ class KeyEditor : public ArdourWindow KeyEditor (); void add_tab (std::string const &name, Gtkmm2ext::Bindings&); - + protected: bool on_key_press_event (GdkEventKey*); bool on_key_release_event (GdkEventKey*); @@ -50,12 +50,12 @@ class KeyEditor : public ArdourWindow { public: Tab (KeyEditor&, std::string const &name, Gtkmm2ext::Bindings*); - + void populate (); void unbind (); void bind (GdkEventKey* release_event, guint pressed_key); void action_selected (); - + struct KeyEditorColumns : public Gtk::TreeModel::ColumnRecord { KeyEditorColumns () { add (name); @@ -70,12 +70,12 @@ class KeyEditor : public ArdourWindow Gtk::TreeModelColumn<bool> bindable; Gtk::TreeModelColumn<Glib::RefPtr<Gtk::Action> > action; }; - + Gtk::VBox vpacker; /* give KeyEditor full access to these. This is just a helper class with no special semantics */ - + KeyEditor& owner; std::string name; Gtkmm2ext::Bindings* bindings; @@ -86,7 +86,7 @@ class KeyEditor : public ArdourWindow }; friend class Tab; - + Gtk::VBox vpacker; Gtk::Notebook notebook; Gtk::Button unbind_button; diff --git a/gtk2_ardour/mixer_actor.cc b/gtk2_ardour/mixer_actor.cc index b2d34040d8..eb62d72c67 100644 --- a/gtk2_ardour/mixer_actor.cc +++ b/gtk2_ardour/mixer_actor.cc @@ -79,7 +79,7 @@ MixerActor::register_actions () myactions.register_action (group, "scroll-left", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &MixerActor::scroll_left)); myactions.register_action (group, "scroll-right", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &MixerActor::scroll_right)); - myactions.register_action (group, "toggle-midi-input-active", _("Toggle MIDI Input Active for Mixer-Selected Tracks/Busses"), + myactions.register_action (group, "toggle-midi-input-active", _("Toggle MIDI Input Active for Mixer-Selected Tracks/Busses"), sigc::bind (sigc::mem_fun (*this, &MixerActor::toggle_midi_input_active), false)); } diff --git a/gtk2_ardour/mixer_actor.h b/gtk2_ardour/mixer_actor.h index ef71554ce4..6e94147604 100644 --- a/gtk2_ardour/mixer_actor.h +++ b/gtk2_ardour/mixer_actor.h @@ -45,7 +45,7 @@ class MixerActor : virtual public sigc::trackable Gtkmm2ext::ActionMap myactions; RouteProcessorSelection _selection; RouteUISelection _route_targets; - + virtual void set_route_targets_for_operation () = 0; void solo_action (); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 11db5211a9..ddce059328 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -108,7 +108,7 @@ Mixer_UI::Mixer_UI () /* bindings was already set in MixerActor constructor */ _content.set_data ("ardour-bindings", bindings); - + scroller.set_can_default (true); // set_default (scroller); @@ -2085,20 +2085,16 @@ Mixer_UI::update_title () n = "*" + n; } - if (own_window()) { - WindowTitle title (n); - title += S_("Window|Mixer"); - title += Glib::get_application_name (); - own_window()->set_title (title.get_string()); - } + WindowTitle title (n); + title += S_("Window|Mixer"); + title += Glib::get_application_name (); + own_window()->set_title (title.get_string()); } else { - if (own_window()) { - WindowTitle title (S_("Window|Mixer")); - title += Glib::get_application_name (); - own_window()->set_title (title.get_string()); - } + WindowTitle title (S_("Window|Mixer")); + title += Glib::get_application_name (); + own_window()->set_title (title.get_string()); } } @@ -2172,11 +2168,8 @@ Mixer_UI::maximise_mixer_space () return; } - Gtk::Window* win = (Gtk::Window*) get_toplevel(); - - if (win) { - win->fullscreen (); - _maximised = true; + if (_maximised) { + return; } _window->fullscreen (); @@ -2190,11 +2183,8 @@ Mixer_UI::restore_mixer_space () return; } - Gtk::Window* win = (Gtk::Window*) get_toplevel(); - - if (win) { - win->unfullscreen(); - _maximised = false; + if (!_maximised) { + return; } own_window()->unfullscreen(); diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index 1d7a0f1114..509143cfe5 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -361,7 +361,10 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p ======= void create_own_window (); +<<<<<<< HEAD >>>>>>> the basics of tabbed +======= +>>>>>>> replicate the remove-all-trailing whitespace commit(s) in master /// true if we are in fullscreen mode bool _maximised; diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc index f17f9feae8..294ef822d4 100644 --- a/gtk2_ardour/monitor_section.cc +++ b/gtk2_ardour/monitor_section.cc @@ -852,7 +852,7 @@ MonitorSection::register_actions () string action_name; string action_descr; Glib::RefPtr<Action> act; - + monitor_actions = myactions.create_action_group (X_("Monitor")); myactions.register_toggle_action (monitor_actions, "monitor-mono", _("Switch monitor to mono"), diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index d351e5efba..81dd347ed3 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -362,11 +362,11 @@ PluginUIWindow::on_key_press_event (GdkEventKey* event) } } return true; - } + } /* for us to be getting key press events, there really MUST be a _pluginui, but just to be safe, check ... */ - + if (_pluginui) { _pluginui->grab_focus(); if (_pluginui->non_gtk_gui()) { @@ -379,7 +379,7 @@ PluginUIWindow::on_key_press_event (GdkEventKey* event) } else { return relay_key_press (event, this); } - } + } return false; } diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index cb2ad7a7e1..a7b2179a8a 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -2835,11 +2835,11 @@ ProcessorBox::register_actions () sigc::ptr_fun (ProcessorBox::rb_copy)); delete_action = processor_box_actions.register_action (popup_act_grp, X_("delete"), _("Delete"), sigc::ptr_fun (ProcessorBox::rb_delete)); - + ActionManager::plugin_selection_sensitive_actions.push_back (cut_action); ActionManager::plugin_selection_sensitive_actions.push_back (copy_action); ActionManager::plugin_selection_sensitive_actions.push_back (delete_action); - + paste_action = processor_box_actions.register_action (popup_act_grp, X_("paste"), _("Paste"), sigc::ptr_fun (ProcessorBox::rb_paste)); rename_action = processor_box_actions.register_action (popup_act_grp, X_("rename"), _("Rename"), diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 7e09b20b3f..1a8bae315a 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -82,27 +82,27 @@ class ProcessorWindowProxy : public WM::ProxyBase public: ProcessorWindowProxy (std::string const &, ProcessorBox *, boost::weak_ptr<ARDOUR::Processor>); ~ProcessorWindowProxy(); - + Gtk::Window* get (bool create = false); - + boost::weak_ptr<ARDOUR::Processor> processor () const { return _processor; } - + ARDOUR::SessionHandlePtr* session_handle(); void show_the_right_window (); void set_custom_ui_mode(bool use_custom) { want_custom = use_custom; } - + int set_state (const XMLNode&, int); XMLNode& get_state (); - + private: ProcessorBox* _processor_box; boost::weak_ptr<ARDOUR::Processor> _processor; bool is_custom; bool want_custom; bool _valid; - + void processor_going_away (); PBD::ScopedConnection going_away_connection; }; diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 5c48d2db78..86a23ec455 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -423,7 +423,7 @@ class PublicEditor : public Gtkmm2ext::Tabbable { PBD::Signal0<void> MouseModeChanged; Gtkmm2ext::Bindings* bindings; - + protected: friend class DisplaySuspender; virtual void suspend_route_redisplay () = 0; diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 5cbe3163fa..9a43ca4761 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -3254,7 +3254,7 @@ Gtk::Window* RCOptionEditor::use_own_window (bool and_fill_it) { bool new_window = !own_window(); - + Gtk::Window* win = Tabbable::use_own_window (and_fill_it); if (win && new_window) { diff --git a/gtk2_ardour/rc_option_editor.h b/gtk2_ardour/rc_option_editor.h index 416563dac5..0252d23478 100644 --- a/gtk2_ardour/rc_option_editor.h +++ b/gtk2_ardour/rc_option_editor.h @@ -42,7 +42,7 @@ public: void populate_sync_options (); Gtk::Window* use_own_window (bool and_fill_it); - + private: void parameter_changed (std::string const &); void ltc_generator_volume_changed (); diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc index 51ccd8b649..a8329ceaab 100644 --- a/gtk2_ardour/step_entry.cc +++ b/gtk2_ardour/step_entry.cc @@ -684,7 +684,7 @@ StepEntry::register_actions () RadioAction::Group dot_group; - + myactions.register_radio_action (group, dot_group, "no-dotted", _("No Dotted Notes"), sigc::mem_fun (*this, &StepEntry::dot_change), 0); myactions.register_radio_action (group, dot_group, "toggle-dotted", _("Toggled Dotted Notes"), sigc::mem_fun (*this, &StepEntry::dot_change), 1); myactions.register_radio_action (group, dot_group, "toggle-double-dotted", _("Toggled Double-Dotted Notes"), sigc::mem_fun (*this, &StepEntry::dot_change), 2); diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index eddae2974e..854b6ef032 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -308,12 +308,12 @@ ARDOUR_UI_UTILS::emulate_key_event (unsigned int keyval) GdkKeymap *keymap = gdk_keymap_get_for_display (display); GdkKeymapKey *keymapkey = NULL; gint n_keys; - + if (!gdk_keymap_get_entries_for_keyval(keymap, keyval, &keymapkey, &n_keys)) return false; if (n_keys !=1) { g_free(keymapkey); return false;} Gtk::Window& main_window (ARDOUR_UI::instance()->main_window()); - + GdkEventKey ev; ev.type = GDK_KEY_PRESS; ev.window = main_window.get_window()->gobj(); diff --git a/gtk2_ardour/window_manager.cc b/gtk2_ardour/window_manager.cc index dd65e956fa..cac4bcd968 100644 --- a/gtk2_ardour/window_manager.cc +++ b/gtk2_ardour/window_manager.cc @@ -196,7 +196,7 @@ ProxyBase::setup () { WindowProxy::setup (); set_session(_session); -} +} /*-----------------------*/ diff --git a/gtk2_ardour/window_manager.h b/gtk2_ardour/window_manager.h index bc4baee18e..37744e5964 100644 --- a/gtk2_ardour/window_manager.h +++ b/gtk2_ardour/window_manager.h @@ -71,37 +71,37 @@ class Manager : public ARDOUR::SessionHandlePtr Windows _windows; Glib::RefPtr<Gtk::ActionGroup> window_actions; Gtk::Window* current_transient_parent; - + Manager(); ~Manager(); static Manager* _instance; }; - + class ProxyBase : public ARDOUR::SessionHandlePtr, public Gtkmm2ext::WindowProxy { public: ProxyBase (const std::string& name, const std::string& menu_name); ProxyBase (const std::string& name, const std::string& menu_name, const XMLNode&); - + virtual ARDOUR::SessionHandlePtr* session_handle () = 0; protected: void setup (); }; - + class ProxyTemporary: public ProxyBase { public: ProxyTemporary (const std::string& name, Gtk::Window* win); ~ProxyTemporary(); - - Gtk::Window* get (bool create = false) { + + Gtk::Window* get (bool create = false) { (void) create; return _window; } - - Gtk::Window* operator->() { + + Gtk::Window* operator->() { return _window; } @@ -114,11 +114,11 @@ class ProxyWithConstructor: public ProxyBase public: ProxyWithConstructor (const std::string& name, const std::string& menu_name, const boost::function<T*()>& c) : ProxyBase (name, menu_name) , creator (c) {} - + ProxyWithConstructor (const std::string& name, const std::string& menu_name, const boost::function<T*()>& c, const XMLNode* node) : ProxyBase (name, menu_name, *node) , creator (c) {} - - Gtk::Window* get (bool create = false) { + + Gtk::Window* get (bool create = false) { if (!_window) { if (!create) { return 0; @@ -128,13 +128,13 @@ class ProxyWithConstructor: public ProxyBase if (_window) { setup (); - } + } } return _window; } - T* operator->() { + T* operator->() { return dynamic_cast<T*> (get (true)); } @@ -165,8 +165,8 @@ class Proxy : public ProxyBase Proxy (const std::string& name, const std::string& menu_name, const XMLNode* node) : ProxyBase (name, menu_name, *node) {} - - Gtk::Window* get (bool create = false) { + + Gtk::Window* get (bool create = false) { if (!_window) { if (!create) { return 0; @@ -176,13 +176,13 @@ class Proxy : public ProxyBase if (_window) { setup (); - } + } } return _window; } - T* operator->() { + T* operator->() { return dynamic_cast<T*> (get(true)); } @@ -190,7 +190,7 @@ class Proxy : public ProxyBase /* may return null */ return dynamic_cast<T*> (_window); } - + void set_session(ARDOUR::Session *s) { SessionHandlePtr::set_session (s); ARDOUR::SessionHandlePtr* sp = session_handle (); @@ -199,7 +199,7 @@ class Proxy : public ProxyBase dynamic_cast<T*>(_window)->set_session(s); } } - + private: boost::function<T*()> creator; }; |