diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-08-22 20:54:56 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-08-22 20:54:56 +0000 |
commit | fdf8b6ad48a22ee7bb1bbc56df1df59f9a420e0a (patch) | |
tree | 9d2df48bf9eabd0adc42ab22cafb0b43a39c99a2 | |
parent | 9781a708af4e687e9de3a38f83dfc2593c959cf8 (diff) |
remove GTKOSX_PREFIX from scons; MIDI/MMC fix from Chris G; fix crash when starting without ALSA sequencer loaded in kernel
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2340 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | SConstruct | 1 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 20 | ||||
-rw-r--r-- | gtk2_ardour/main.cc | 15 | ||||
-rw-r--r-- | gtk2_ardour/option_editor.cc | 6 | ||||
-rw-r--r-- | libs/ardour/globals.cc | 16 |
5 files changed, 26 insertions, 32 deletions
diff --git a/SConstruct b/SConstruct index 4ec56fa1e1..6ecae96403 100644 --- a/SConstruct +++ b/SConstruct @@ -30,7 +30,6 @@ opts.AddOptions( BoolOption('AUDIOUNITS', 'Compile with Apple\'s AudioUnit library. (experimental)', 0), BoolOption('COREAUDIO', 'Compile with Apple\'s CoreAudio library', 0), BoolOption('GTKOSX', 'Compile for use with GTK-OSX, not GTK-X11', 0), - PathOption('GTKOSX_PREFIX', 'Configure-style prefix used to install GTK-Quartz', "/opt/gtk"), BoolOption('DEBUG', 'Set to build with debugging information and no optimizations', 0), PathOption('DESTDIR', 'Set the intermediate install "prefix"', '/'), EnumOption('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'tiger', 'panther', 'none' ), ignorecase=2), diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 3c6c766092..806872f0b2 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -562,20 +562,20 @@ Please consider the possibilities, and perhaps (re)start JACK.")); void ARDOUR_UI::startup () { - using namespace ARDOUR_COMMAND_LINE; string name, path; bool isnew; new_session_dialog = new NewSessionDialog(); /* If no session name is given: we're not loading a session yet, nor creating a new one */ - - if (session_name.length()) { + + if (ARDOUR_COMMAND_LINE::session_name.length()) { /* Load session or start the new session dialog */ - if (Session::find_session (session_name, path, name, isnew)) { - error << string_compose(_("could not load command line session \"%1\""), session_name) << endmsg; + if (Session::find_session (ARDOUR_COMMAND_LINE::session_name, path, name, isnew)) { + error << string_compose(_("could not load command line session \"%1\""), + ARDOUR_COMMAND_LINE::session_name) << endmsg; return; } @@ -606,7 +606,7 @@ ARDOUR_UI::startup () /* backend audio is working */ - if (session_name.empty() || ARDOUR_COMMAND_LINE::new_session) { + if (ARDOUR_COMMAND_LINE::session_name.empty() || ARDOUR_COMMAND_LINE::new_session) { /* need NSD to get session name and other info */ need_nsd = true; } else { @@ -628,7 +628,7 @@ ARDOUR_UI::startup () if (need_nsd) { - if (!get_session_parameters (session_name, have_backend, ARDOUR_COMMAND_LINE::new_session)) { + if (!get_session_parameters (ARDOUR_COMMAND_LINE::session_name, have_backend, ARDOUR_COMMAND_LINE::new_session)) { return; } @@ -640,7 +640,7 @@ ARDOUR_UI::startup () create_engine (); if (load_needed) { - if (load_session (session_name, name)) { + if (load_session (ARDOUR_COMMAND_LINE::session_name, name)) { return; } } @@ -2042,6 +2042,10 @@ ARDOUR_UI::get_session_parameters (Glib::ustring predetermined_path, bool have_e continue; } + if (new_session_dialog->get_current_page() == 0 && ARDOUR_COMMAND_LINE::session_name.empty()) { + should_be_new = true; + } + /* handle what appear to be paths rather than just a name */ if (session_name[0] == '/' || diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index c04ffe9969..b207135b5b 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -83,7 +83,6 @@ fixup_bundle_environment () _NSGetExecutablePath (execpath, &pathsz); - cerr << "EXEC PATH = " << execpath << endl; Glib::ustring exec_path (execpath); Glib::ustring dir_path = Glib::path_get_dirname (exec_path); Glib::ustring path; @@ -96,7 +95,6 @@ fixup_bundle_environment () path += "/../Resources/Panners"; setenv ("ARDOUR_MODULE_PATH", path.c_str(), 1); - cerr << "ARDOUR_MODULE_PATH = " << path << endl; path = dir_path; path += "/../Resources/icons:"; @@ -111,8 +109,6 @@ fixup_bundle_environment () setenv ("ARDOUR_CONFIG_PATH", path.c_str(), 1); setenv ("ARDOUR_DATA_PATH", path.c_str(), 1); - cerr << "ARDOUR_PATH, DATA+CONFIG = " << path << endl; - path = dir_path; path += "/../Frameworks/clearlooks"; @@ -169,9 +165,8 @@ fixup_bundle_environment () extern "C" { int ardour_main (int argc, char *argv[]) #else - int main (int argc, char* argv[], char* envp[]) +int main (int argc, char* argv[]) #endif - { vector<Glib::ustring> null_file_list; @@ -179,14 +174,6 @@ int ardour_main (int argc, char *argv[]) fixup_bundle_environment (); #endif - for (int xx = 0; xx < argc; ++xx) { - cerr << "argv[" << xx << "] = " << argv[xx] << endl; - } - - for (int xx = 0; envp && envp[xx]; ++xx) { - cerr << "envp[" << xx << "] = " << envp[xx] << endl; - } - Glib::thread_init(); gtk_set_locale (); diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index 2ef7c43d4f..dec3402e2f 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -378,7 +378,9 @@ OptionEditor::setup_midi_options () label = (manage (new Label (_("Inbound MMC Device ID")))); hbox->pack_start (mmc_receive_device_id_spinner, false, false); hbox->pack_start (*label, false, false); - midi_packer.pack_start (*hbox, false, false); + midi_packer.pack_start (*hbox, false, false); + + mmc_receive_device_id_spinner.set_value(Config->get_mmc_receive_device_id ()); hbox = manage (new HBox); hbox->set_border_width (6); @@ -388,6 +390,8 @@ OptionEditor::setup_midi_options () hbox->pack_start (*label, false, false); midi_packer.pack_start (*hbox, false, false); + mmc_send_device_id_spinner.set_value(Config->get_mmc_send_device_id ()); + add_midi_port_button.signal_clicked().connect (mem_fun (*this, &OptionEditor::add_midi_port)); } diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index c7b1b92cb8..199d69d42a 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -110,9 +110,8 @@ static int setup_midi () { std::map<string,Configuration::MidiPortDescriptor*>::iterator i; - int nports; - - if ((nports = Config->midi_ports.size()) == 0) { + + if (Config->midi_ports.size() == 0) { warning << _("no MIDI ports specified: no MMC or MTC control possible") << endmsg; return 0; } @@ -133,15 +132,14 @@ setup_midi () } MIDI::Manager::instance()->add_port (request); - - nports++; } MIDI::Port* first; const MIDI::Manager::PortMap& ports = MIDI::Manager::instance()->get_midi_ports(); - first = ports.begin()->second; - if (nports > 1) { + if (ports.size() > 1) { + + first = ports.begin()->second; /* More than one port, so try using specific names for each port */ @@ -173,7 +171,9 @@ setup_midi () default_midi_port = first; } - } else { + } else if (ports.size() == 1) { + + first = ports.begin()->second; /* Only one port described, so use it for both MTC and MMC */ |