--- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -57,6 +57,7 @@ #include "io_selector.h" #include "utils.h" #include "gui_thread.h" +#include "opts.h" #include "i18n.h" @@ -213,10 +214,11 @@ group_label.set_name ("MixerGroupButtonLabel"); - comment_button.set_name ("MixerCommentButton"); + if (!ARDOUR_COMMAND_LINE::ardourino) { + comment_button.set_name ("MixerCommentButton"); + comment_button.signal_clicked().connect (mem_fun(*this, &MixerStrip::comment_button_clicked)); + } - comment_button.signal_clicked().connect (mem_fun(*this, &MixerStrip::comment_button_clicked)); - global_vpacker.set_border_width (0); global_vpacker.set_spacing (0); @@ -244,10 +246,16 @@ global_vpacker.pack_start (middle_button_table,Gtk::PACK_SHRINK); global_vpacker.pack_start (*gain_meter_alignment,Gtk::PACK_SHRINK); global_vpacker.pack_start (bottom_button_table,Gtk::PACK_SHRINK); - global_vpacker.pack_start (post_redirect_box, true, true); - global_vpacker.pack_start (panners, Gtk::PACK_SHRINK); + if (!ARDOUR_COMMAND_LINE::ardourino) { + global_vpacker.pack_start (post_redirect_box, true, true); + } + if (!ARDOUR_COMMAND_LINE::ardourino) { + global_vpacker.pack_start (panners, Gtk::PACK_SHRINK); + } global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK); - global_vpacker.pack_start (comment_button, Gtk::PACK_SHRINK); + if (!ARDOUR_COMMAND_LINE::ardourino) { + global_vpacker.pack_start (comment_button, Gtk::PACK_SHRINK); + } global_frame.add (global_vpacker); global_frame.set_shadow_type (Gtk::SHADOW_IN); @@ -435,7 +443,10 @@ /* now force an update of all the various elements */ pre_redirect_box.update(); - post_redirect_box.update(); + if (!ARDOUR_COMMAND_LINE::ardourino) { + post_redirect_box.update(); + } + mute_changed (0); solo_changed (0); name_changed (0); @@ -444,7 +455,9 @@ connect_to_pan (); - panners.setup_pan (); + if (!ARDOUR_COMMAND_LINE::ardourino) { + panners.setup_pan (); + } if (is_audio_track()) { speed_changed (); @@ -486,10 +499,13 @@ /* always set the gpm width again, things may be hidden */ gpm.set_width (w); - panners.set_width (w); + if (!ARDOUR_COMMAND_LINE::ardourino) { + panners.set_width (w); + } pre_redirect_box.set_width (w); - post_redirect_box.set_width (w); - + if (!ARDOUR_COMMAND_LINE::ardourino) { + post_redirect_box.set_width (w); + } _width_owner = owner; ensure_xml_node (); @@ -509,18 +525,21 @@ ((Gtk::Label*)mute_button->get_child())->set_text (_("Mute")); ((Gtk::Label*)solo_button->get_child())->set_text (_("Solo")); - if (_route->comment() == "") { - comment_button.unset_bg (STATE_NORMAL); - ((Gtk::Label*)comment_button.get_child())->set_text (_("Comments")); - } else { - comment_button.modify_bg (STATE_NORMAL, color()); - ((Gtk::Label*)comment_button.get_child())->set_text (_("*Comments*")); + if (!ARDOUR_COMMAND_LINE::ardourino) { + if (_route->comment() == "") { + comment_button.unset_bg (STATE_NORMAL); + ((Gtk::Label*)comment_button.get_child())->set_text (_("Comments")); + } else { + comment_button.modify_bg (STATE_NORMAL, color()); + ((Gtk::Label*)comment_button.get_child())->set_text (_("*Comments*")); + } } - ((Gtk::Label*)gpm.gain_automation_style_button.get_child())->set_text (gpm.astyle_string(_route->gain_automation_curve().automation_style())); ((Gtk::Label*)gpm.gain_automation_state_button.get_child())->set_text (gpm.astate_string(_route->gain_automation_curve().automation_state())); - ((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (panners.astyle_string(_route->panner().automation_style())); - ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (panners.astate_string(_route->panner().automation_state())); + if (!ARDOUR_COMMAND_LINE::ardourino) { + ((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (panners.astyle_string(_route->panner().automation_style())); + ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (panners.astate_string(_route->panner().automation_state())); + } Gtkmm2ext::set_size_request_to_display_given_text (name_button, "long", 2, 2); set_size_request (-1, -1); break; @@ -532,18 +551,21 @@ ((Gtk::Label*)mute_button->get_child())->set_text (_("M")); ((Gtk::Label*)solo_button->get_child())->set_text (_("S")); - if (_route->comment() == "") { - comment_button.unset_bg (STATE_NORMAL); - ((Gtk::Label*)comment_button.get_child())->set_text (_("Cmt")); - } else { - comment_button.modify_bg (STATE_NORMAL, color()); - ((Gtk::Label*)comment_button.get_child())->set_text (_("*Cmt*")); + if (!ARDOUR_COMMAND_LINE::ardourino) { + if (_route->comment() == "") { + comment_button.unset_bg (STATE_NORMAL); + ((Gtk::Label*)comment_button.get_child())->set_text (_("Cmt")); + } else { + comment_button.modify_bg (STATE_NORMAL, color()); + ((Gtk::Label*)comment_button.get_child())->set_text (_("*Cmt*")); + } } - ((Gtk::Label*)gpm.gain_automation_style_button.get_child())->set_text (gpm.short_astyle_string(_route->gain_automation_curve().automation_style())); ((Gtk::Label*)gpm.gain_automation_state_button.get_child())->set_text (gpm.short_astate_string(_route->gain_automation_curve().automation_state())); - ((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (panners.short_astyle_string(_route->panner().automation_style())); - ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (panners.short_astate_string(_route->panner().automation_state())); + if (!ARDOUR_COMMAND_LINE::ardourino) { + ((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (panners.short_astyle_string(_route->panner().automation_style())); + ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (panners.short_astate_string(_route->panner().automation_state())); + } Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2); set_size_request (max (50, gpm.get_gm_width()), -1); break; @@ -1010,7 +1032,9 @@ { update_io_button (_route, _width, false); gpm.setup_meters (); - panners.setup_pan (); + if (!ARDOUR_COMMAND_LINE::ardourino) { + panners.setup_pan (); + } } void @@ -1406,13 +1430,17 @@ if (at) { switch (at->freeze_state()) { case AudioTrack::Frozen: - pre_redirect_box.set_sensitive (false); - post_redirect_box.set_sensitive (false); + pre_redirect_box.set_sensitive (false); + if (!ARDOUR_COMMAND_LINE::ardourino) { + post_redirect_box.set_sensitive (false); + } speed_spinner.set_sensitive (false); break; default: - pre_redirect_box.set_sensitive (true); - post_redirect_box.set_sensitive (true); + pre_redirect_box.set_sensitive (true); + if (!ARDOUR_COMMAND_LINE::ardourino) { + post_redirect_box.set_sensitive (true); + } speed_spinner.set_sensitive (true); // XXX need some way, maybe, to retoggle redirect editors break; --- a/gtk2_ardour/opts.cc +++ b/gtk2_ardour/opts.cc @@ -41,6 +41,7 @@ Glib::ustring ARDOUR_COMMAND_LINE::keybindings_path = ""; /* empty means use builtin default */ Glib::ustring ARDOUR_COMMAND_LINE::menus_file = "ardour.menus"; bool ARDOUR_COMMAND_LINE::finder_invoked_ardour = false; +bool ARDOUR_COMMAND_LINE::ardourino = false; using namespace ARDOUR_COMMAND_LINE; @@ -64,6 +65,7 @@ << _(" [session-name] Name of session to load\n") << _(" -C, --curvetest filename Curve algorithm debugger\n") << _(" -k, --keybindings filename Name of key bindings to load (default is ~/.ardour2/ardour.bindings)\n") + << _(" -a, --ardourino Fit on screens with 800x600 resolution\n") ; return 1; @@ -99,6 +101,7 @@ { "sync", 0, 0, 'S' }, { "curvetest", 1, 0, 'C' }, { "sillyAppleUndocumentedFinderFeature", 1, 0, 'p' }, + { "ardourino", 0, 0, 'a' }, { 0, 0, 0, 0 } }; @@ -177,6 +180,10 @@ keybindings_path = optarg; break; + case 'a': + ardourino = true; + break; + default: return print_help(execname); } --- a/gtk2_ardour/opts.h +++ b/gtk2_ardour/opts.h @@ -36,6 +36,7 @@ extern bool try_hw_optimization; extern bool use_gtk_theme; extern Glib::ustring keybindings_path; +extern bool ardourino; extern Glib::ustring menus_file; extern bool finder_invoked_ardour; --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -53,6 +53,7 @@ #include "editing.h" #include "utils.h" #include "gain_meter.h" +#include "opts.h" #ifdef FREESOUND #include "sfdb_freesound_mootcher.h" @@ -426,7 +427,9 @@ chooser.add_filter (custom_filter); chooser.add_filter (matchall_filter); chooser.set_select_multiple (true); - chooser.signal_update_preview().connect(mem_fun(*this, &SoundFileBrowser::update_preview)); + if (!ARDOUR_COMMAND_LINE::ardourino) { + chooser.signal_update_preview().connect(mem_fun(*this, &SoundFileBrowser::update_preview)); + } chooser.signal_file_activated().connect (mem_fun (*this, &SoundFileBrowser::chooser_file_activated)); #ifdef GTKOSX /* some broken redraw behaviour - this is a bandaid */ @@ -441,7 +444,9 @@ hpacker.set_spacing (6); hpacker.pack_start (notebook, true, true); - hpacker.pack_start (preview, false, false); + if (!ARDOUR_COMMAND_LINE::ardourino) { + hpacker.pack_start (preview, false, false); + } get_vbox()->pack_start (hpacker, true, true); @@ -577,7 +582,9 @@ SoundFileBrowser::set_session (Session* s) { ArdourDialog::set_session (s); - preview.set_session (s); + if (!ARDOUR_COMMAND_LINE::ardourino) { + preview.set_session (s); + } if (s) { add_gain_meter (); } else { @@ -642,6 +649,9 @@ void SoundFileBrowser::update_preview () { + if (ARDOUR_COMMAND_LINE::ardourino) { + return; + } if (preview.setup_labels (chooser.get_filename())) { if (preview.autoplay()) { Glib::signal_idle().connect (mem_fun (preview, &SoundFileBox::audition_oneshot)); @@ -668,7 +678,9 @@ set_response_sensitive (RESPONSE_OK, false); } - preview.setup_labels (file); + if (!ARDOUR_COMMAND_LINE::ardourino) { + preview.setup_labels (file); + } } } @@ -691,7 +703,9 @@ set_response_sensitive (RESPONSE_OK, false); } - preview.setup_labels (file); + if (!ARDOUR_COMMAND_LINE::ardourino) { + preview.setup_labels (file); + } } } @@ -1248,29 +1262,30 @@ channel_combo.set_active_text (str.front()); channel_combo.set_sensitive (false); - l = manage (new Label); - l->set_text (_("Conversion Quality:")); - - hbox = manage (new HBox); - hbox->set_border_width (12); - hbox->set_spacing (6); - hbox->pack_start (*l, false, false); - hbox->pack_start (src_combo, false, false); - vbox = manage (new VBox); - vbox->pack_start (*hbox, false, false); - options.pack_start (*vbox, false, false); - - str.clear (); - str.push_back (_("Best")); - str.push_back (_("Good")); - str.push_back (_("Quick")); - str.push_back (_("Fast")); - str.push_back (_("Fastest")); - - set_popdown_strings (src_combo, str); - src_combo.set_active_text (str.front()); - src_combo.set_sensitive (false); - + if (!ARDOUR_COMMAND_LINE::ardourino) { + l = manage (new Label); + l->set_text (_("Conversion Quality:")); + + hbox = manage (new HBox); + hbox->set_border_width (12); + hbox->set_spacing (6); + hbox->pack_start (*l, false, false); + hbox->pack_start (src_combo, false, false); + vbox = manage (new VBox); + vbox->pack_start (*hbox, false, false); + options.pack_start (*vbox, false, false); + + str.clear (); + str.push_back (_("Best")); + str.push_back (_("Good")); + str.push_back (_("Quick")); + str.push_back (_("Fast")); + str.push_back (_("Fastest")); + + set_popdown_strings (src_combo, str); + src_combo.set_active_text (str.front()); + src_combo.set_sensitive (false); + } reset_options (); action_combo.signal_changed().connect (mem_fun (*this, &SoundFileOmega::reset_options_noret));