diff options
-rw-r--r-- | gtk2_ardour/ardour-sae.menus | 4 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 15 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 6 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui2.cc | 39 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 9 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 26 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 4 | ||||
-rw-r--r-- | gtk2_ardour/engine_dialog.cc | 37 | ||||
-rw-r--r-- | gtk2_ardour/gain_meter.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/public_editor.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/sfdb_ui.cc | 32 | ||||
-rw-r--r-- | libs/ardour/SConscript | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/audiosource.h | 4 | ||||
-rw-r--r-- | libs/ardour/auditioner.cc | 1 | ||||
-rw-r--r-- | libs/ardour/source_factory.cc | 12 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtk_ui.cc | 24 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 3 | ||||
-rw-r--r-- | libs/gtkmm2ext/pixfader.cc | 4 | ||||
-rwxr-xr-x | tools/osx_packaging/osx_build | 2 |
19 files changed, 177 insertions, 50 deletions
diff --git a/gtk2_ardour/ardour-sae.menus b/gtk2_ardour/ardour-sae.menus index 06a5dde056..8383054019 100644 --- a/gtk2_ardour/ardour-sae.menus +++ b/gtk2_ardour/ardour-sae.menus @@ -13,14 +13,10 @@ <separator/> <menuitem action='AddTrackBus'/> <separator/> - <menuitem action='addExistingAudioFiles'/> - <separator/> <menu name='Cleanup' action='Cleanup'> <menuitem action='CleanupUnused'/> <menuitem action='FlushWastebasket'/> </menu> - <separator/> - <menuitem action='Quit'/> </menu> <menu name='Files' action='Files'> <menu action='addExistingAudioFiles'> diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 3c48980694..9c612eb220 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -97,7 +97,7 @@ sigc::signal<void,nframes_t, bool, nframes_t> ARDOUR_UI::Clock; ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[]) : Gtkmm2ext::UI (X_("Ardour"), argcp, argvp), - + primary_clock (X_("primary"), false, X_("TransportClockDisplay"), true, false, true), secondary_clock (X_("secondary"), false, X_("SecondaryClockDisplay"), true, false, true), preroll_clock (X_("preroll"), false, X_("PreRollClock"), true, true), @@ -148,12 +148,17 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[]) auditioning_alert_button (_("AUDITION")), solo_alert_button (_("SOLO")), - shown_flag (false) + shown_flag (false), + error_log_button (_("Errors")) { using namespace Gtk::Menu_Helpers; Gtkmm2ext::init(); +#ifdef TOP_MENUBAR + _auto_display_errors = false; +#endif + if (getenv ("ARDOUR_DEBUG_UPDATES")) { gdk_window_set_debug_updates (true); } @@ -325,8 +330,10 @@ ARDOUR_UI::post_engine () /* start the time-of-day-clock */ +#ifndef GTKOSX update_wall_clock (); Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::update_wall_clock), 60000); +#endif update_disk_space (); update_cpu_load (); @@ -819,7 +826,7 @@ ARDOUR_UI::ask_about_saving_session (const string & what) return -1; } -gint +int ARDOUR_UI::every_second () { update_cpu_load (); @@ -839,6 +846,8 @@ ARDOUR_UI::every_point_one_seconds () gint ARDOUR_UI::every_point_zero_one_seconds () { + // august 2007: actual update frequency: 40Hz, not 100Hz + SuperRapidScreenUpdate(); /* EMIT_SIGNAL */ return TRUE; } diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index f28d960186..507c253155 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -50,6 +50,7 @@ #include <gtkmm/togglebutton.h> #include <gtkmm/treeview.h> #include <gtkmm/menubar.h> +#include <gtkmm/textbuffer.h> #include <gtkmm/adjustment.h> #include <gtkmm2ext/gtk_ui.h> #include <gtkmm2ext/click_box.h> @@ -730,6 +731,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI void check_memory_locking (); void audioengine_setup (); + + void display_message (const char *prefix, gint prefix_len, + Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag, const char *msg); + Gtk::Label status_bar_label; + Gtk::ToggleButton error_log_button; }; #endif /* __ardour_gui_h__ */ diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index ad181653b5..190b7a2fff 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -78,7 +78,20 @@ ARDOUR_UI::setup_windows () theme_manager->signal_unmap().connect (bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleThemeManager"))); +#ifdef TOP_MENUBAR + HBox* status_bar_packer = manage (new HBox); + + status_bar_label.set_size_request (300, -1); + status_bar_packer->pack_start (status_bar_label, true, true, 6); + status_bar_packer->pack_start (error_log_button, false, false); + + error_log_button.signal_clicked().connect (mem_fun (*this, &UI::toggle_errors)); + + editor->get_status_bar_packer().pack_start (*status_bar_packer, true, true); + editor->get_status_bar_packer().pack_start (menu_bar_base, false, false, 6); +#else top_packer.pack_start (menu_bar_base, false, false); +#endif top_packer.pack_start (transport_frame, false, false); editor->add_toplevel_controls (top_packer); @@ -87,6 +100,32 @@ ARDOUR_UI::setup_windows () } void +ARDOUR_UI::display_message (const char *prefix, gint prefix_len, RefPtr<TextBuffer::Tag> ptag, RefPtr<TextBuffer::Tag> mtag, const char *msg) +{ + ustring text; + + UI::display_message (prefix, prefix_len, ptag, mtag, msg); +#ifdef TOP_MENUBAR + + if (strcmp (prefix, _("[ERROR]: ")) == 0) { + text = "<span color=\"red\" weight=\"bold\">"; + } else if (strcmp (prefix, _("[WARNING]: ")) == 0) { + text = "<span color=\"yellow\" weight=\"bold\">"; + } else if (strcmp (prefix, _("[INFO]: ")) == 0) { + text = "<span color=\"green\" weight=\"bold\">"; + } else { + text = "<span color=\"blue\" weight=\"bold\">???"; + } + + text += prefix; + text += "</span>"; + text += msg; + + status_bar_label.set_markup (text); +#endif +} + +void ARDOUR_UI::transport_stopped () { stop_button.set_visual_state (1); diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 3026355012..a8124fde4f 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -756,19 +756,20 @@ ARDOUR_UI::build_menu_bar () #ifndef TOP_MENUBAR menu_hbox.pack_start (*menu_bar, true, true); +#else + use_menubar_as_top_menubar (); #endif if (!Profile->get_small_screen()) { +#ifndef GTKOSX + // OSX provides its own wallclock, thank you very much menu_hbox.pack_end (wall_clock_box, false, false, 2); +#endif menu_hbox.pack_end (disk_space_box, false, false, 4); } menu_hbox.pack_end (cpu_load_box, false, false, 4); menu_hbox.pack_end (buffer_load_box, false, false, 4); menu_hbox.pack_end (sample_rate_box, false, false, 4); -#ifdef TOP_MENUBAR - use_menubar_as_top_menubar (); -#endif - menu_bar_base.set_name ("MainMenuBar"); menu_bar_base.add (menu_hbox); } diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 2abeabb021..403542f44d 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -17,6 +17,7 @@ */ +#include <sys/time.h> #include <unistd.h> #include <cstdlib> #include <cmath> @@ -349,7 +350,7 @@ Editor::Editor () edit_controls_vbox.set_spacing (0); horizontal_adjustment.signal_value_changed().connect (mem_fun(*this, &Editor::canvas_horizontally_scrolled)); - vertical_adjustment.signal_value_changed().connect (mem_fun(*this, &Editor::tie_vertical_scrolling)); + vertical_adjustment.signal_value_changed().connect (mem_fun(*this, &Editor::tie_vertical_scrolling), true); track_canvas.set_hadjustment (horizontal_adjustment); track_canvas.set_vadjustment (vertical_adjustment); @@ -682,6 +683,9 @@ Editor::Editor () set_name ("EditorWindow"); add_accel_group (ActionManager::ui_manager->get_accel_group()); + status_bar_hpacker.show (); + + vpacker.pack_end (status_bar_hpacker, false, false); vpacker.pack_end (global_hpacker, true, true); /* register actions now so that set_state() can find them and set toggles/checks etc */ @@ -845,9 +849,24 @@ void Editor::tie_vertical_scrolling () { double y1 = vertical_adjustment.get_value(); + + playhead_cursor->set_y_axis (y1); + edit_cursor->set_y_axis (y1); + controls_layout.get_vadjustment()->set_value (y1); - playhead_cursor->set_y_axis(y1); - edit_cursor->set_y_axis(y1); + +#ifdef GTKOSX + /* the way idle updates and immediate window flushing work on GTK-Quartz + requires that we force an immediate redraw right here. The controls + layout will do the same all by itself, as does the canvas widget, but + most of the time, the canvas itself hasn't updated itself because its + idle handler hasn't run. consequently, the call that its layout makes + to gdk_window_process_updates() finds nothing to do. here, we force + the update to happen, then request a flush of the new window state. + */ + track_canvas.update_now (); + gdk_window_process_updates (GTK_LAYOUT(track_canvas.gobj())->bin_window, true); +#endif } void @@ -3952,3 +3971,4 @@ Editor::set_punch_range (nframes_t start, nframes_t end, string cmd) commit_reversible_command (); } + diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 8e86282569..f2a2b94f8e 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -244,8 +244,8 @@ class Editor : public PublicEditor void export_session(); void export_selection(); - void add_toplevel_controls (Gtk::Container&); + Gtk::HBox& get_status_bar_packer() { return status_bar_hpacker; } void set_zoom_focus (Editing::ZoomFocus); Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; } @@ -1898,6 +1898,8 @@ class Editor : public PublicEditor void history_changed (); void color_handler (); + + Gtk::HBox status_bar_hpacker; }; #endif /* __ardour_editor_h__ */ diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index c8f4ec2550..2d6e05edbf 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -186,6 +186,10 @@ EngineControl::EngineControl () row++; #endif + interface_combo.set_size_request (125, -1); + input_device_combo.set_size_request (125, -1); + output_device_combo.set_size_request (125, -1); + /* if (engine_running()) { @@ -210,6 +214,11 @@ EngineControl::EngineControl () options_packer.attach (realtime_button, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0); ++row; + + realtime_button.signal_toggled().connect (mem_fun (*this, &EngineControl::realtime_changed)); + realtime_changed (); + +#ifndef __APPLE__ label = manage (new Label (_("Realtime Priority"))); label->set_alignment (1.0, 0.5); options_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0); @@ -217,10 +226,6 @@ EngineControl::EngineControl () ++row; priority_spinner.set_value (60); - realtime_button.signal_toggled().connect (mem_fun (*this, &EngineControl::realtime_changed)); - realtime_changed (); - -#ifndef __APPLE__ options_packer.attach (no_memory_lock_button, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0); ++row; options_packer.attach (unlock_memory_button, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0); @@ -533,13 +538,13 @@ EngineControl::start_engine () return -1; } - cerr << "will execute ...\n"; + // cerr << "will execute ...\n"; for (vector<string>::iterator i = args.begin(); i != args.end(); ++i) { jackdrc << (*i) << ' '; - cerr << (*i) << ' '; + // cerr << (*i) << ' '; } jackdrc << endl; - cerr << endl; + // cerr << endl; jackdrc.close (); _used = true; @@ -568,7 +573,9 @@ EngineControl::stop_engine () void EngineControl::realtime_changed () { +#ifndef __APPLE__ priority_spinner.set_sensitive (realtime_button.get_active()); +#endif } void @@ -626,8 +633,11 @@ EngineControl::enumerate_coreaudio_devices () if (err == noErr) { // Look for the CoreAudio device name... char coreDeviceName[256]; - size_t nameSize = sizeof (coreDeviceName); + size_t nameSize; for (int i = 0; i < numCoreDevices; i++) { + + nameSize = sizeof (coreDeviceName); + err = AudioDeviceGetPropertyInfo(coreDeviceIDs[i], 0, true, kAudioDevicePropertyDeviceName, &outSize, &isWritable); @@ -636,7 +646,6 @@ EngineControl::enumerate_coreaudio_devices () 0, true, kAudioDevicePropertyDeviceName, &nameSize, (void *) coreDeviceName); if (err == noErr) { - char drivername[128]; // this returns the unique id for the device @@ -763,11 +772,6 @@ EngineControl::driver_changed () set_popdown_strings (input_device_combo, strings); set_popdown_strings (output_device_combo, strings); - const guint32 FUDGE = 18; // Combo's are stupid - they steal space from the entry for the button interface_combo - set_size_request_to_display_given_text (interface_combo, strings[maxindex].c_str(), 5+FUDGE, 5); - set_size_request_to_display_given_text (input_device_combo, strings[maxindex].c_str(), 5+FUDGE, 5); - set_size_request_to_display_given_text (output_device_combo, strings[maxindex].c_str(), 5+FUDGE, 5); - if (!strings.empty()) { interface_combo.set_active_text (strings.front()); input_device_combo.set_active_text (strings.front()); @@ -853,11 +857,10 @@ EngineControl::find_jack_servers (vector<string>& strings) cerr << "Found jack in " << path << endl; } - if (ARDOUR::Profile->get_single_package()) { + if (getenv ("ARDOUR_WITH_JACK")) { /* no other options - only use the JACK we supply */ if (strings.empty()) { - // cerr << "OOPS!\n"; - // fatal << _("JACK appears to be missing from the Ardour bundle") << endmsg; + fatal << _("JACK appears to be missing from the Ardour bundle") << endmsg; /*NOTREACHED*/ } return; diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 05acf08663..7b576228cc 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -631,7 +631,7 @@ void GainMeter::effective_gain_display () { gfloat value = gain_to_slider_position (_io->effective_gain()); - + if (gain_adjustment.get_value() != value) { ignore_toggle = true; gain_adjustment.set_value (value); diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index d201669be0..55103840d6 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -26,6 +26,7 @@ #include <glib.h> #include <gdk/gdktypes.h> #include <gtkmm/window.h> +#include <gtkmm/box.h> #include <gtkmm/actiongroup.h> #include <jack/types.h> #include <sigc++/signal.h> @@ -121,6 +122,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway virtual void export_range_markers() = 0; virtual void register_actions() = 0; virtual void add_toplevel_controls (Gtk::Container&) = 0; + virtual Gtk::HBox& get_status_bar_packer() = 0; virtual void set_zoom_focus (Editing::ZoomFocus) = 0; virtual Editing::ZoomFocus get_zoom_focus () const = 0; virtual gdouble get_current_zoom () = 0; diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 1e3887ab6b..5767cf12d1 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -64,6 +64,8 @@ using Glib::ustring; ustring SoundFileBrowser::persistent_folder; +static int reset_depth = 0; + SoundFileBox::SoundFileBox () : _session(0), table (6, 2), @@ -274,7 +276,12 @@ SoundFileBox::audition () boost::shared_ptr<Region> r; SourceList srclist; boost::shared_ptr<AudioFileSource> afs; - + bool old_sbp = AudioSource::get_build_peakfiles (); + + /* don't even think of building peakfiles for these files */ + + AudioSource::set_build_peakfiles (false); + for (int n = 0; n < sf_info.channels; ++n) { try { afs = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createReadable (*_session, path, n, AudioFileSource::Flag (0), false)); @@ -283,9 +290,12 @@ SoundFileBox::audition () } catch (failed_constructor& err) { error << _("Could not access soundfile: ") << path << endmsg; + AudioSource::set_build_peakfiles (old_sbp); return; } } + + AudioSource::set_build_peakfiles (old_sbp); if (srclist.empty()) { return; @@ -516,6 +526,8 @@ SoundFileBrowser::update_preview () void SoundFileBrowser::found_list_view_selected () { + cerr << "file selected\n"; + if (!reset_options ()) { set_response_sensitive (RESPONSE_OK, false); } else { @@ -607,6 +619,14 @@ SoundFileOmega::reset_options () { vector<ustring> paths = get_paths (); + reset_depth++; + + if (reset_depth > 4) { + abort (); + } + + cerr << "got " << paths.size() << " paths at depth = " << reset_depth << endl; + if (paths.empty()) { channel_combo.set_sensitive (false); @@ -614,6 +634,7 @@ SoundFileOmega::reset_options () where_combo.set_sensitive (false); copy_files_btn.set_sensitive (false); + reset_depth--; return false; } else { @@ -633,6 +654,7 @@ SoundFileOmega::reset_options () if (check_info (paths, same_size, src_needed, selection_includes_multichannel)) { Glib::signal_idle().connect (mem_fun (*this, &SoundFileOmega::bad_file_message)); + reset_depth--; return false; } @@ -668,13 +690,14 @@ SoundFileOmega::reset_options () action_strings.push_back (_("to the region list")); action_strings.push_back (_("as new tape tracks")); + resetting_ourselves = true; + existing_choice = action_combo.get_active_text(); set_popdown_strings (action_combo, action_strings); /* preserve any existing choice, if possible */ - resetting_ourselves = true; if (existing_choice.length()) { vector<string>::iterator x; @@ -769,7 +792,8 @@ SoundFileOmega::reset_options () copy_files_btn.set_sensitive (false); } } - + + reset_depth--; return true; } @@ -1115,6 +1139,8 @@ SoundFileOmega::file_selection_changed () return; } + cerr << "file selection changed\n"; + if (!reset_options ()) { set_response_sensitive (RESPONSE_OK, false); } else { diff --git a/libs/ardour/SConscript b/libs/ardour/SConscript index 309357cb1b..6cceed03a0 100644 --- a/libs/ardour/SConscript +++ b/libs/ardour/SConscript @@ -246,7 +246,6 @@ if ardour['COREAUDIO']: if env['CONFIG_ARCH'] == 'apple': # this next line avoids issues with circular dependencies between libardour and libardour_cp. - # it is based on the (entirely reasonable) assumption that a system with CoreAudio is OS X # ardour.Append(LINKFLAGS='-undefined suppress -flat_namespace') diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index b31fa99cd6..7b22528bd1 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -104,6 +104,10 @@ const nframes_t frames_per_peak = 256; _build_peakfiles = yn; } + static bool get_build_peakfiles () { + return _build_peakfiles; + } + virtual int setup_peakfile () { return 0; } int prepare_for_peakfile_writes (); diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index f30bea2f40..c1fef40151 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -117,6 +117,7 @@ void Auditioner::audition_region (boost::shared_ptr<Region> region) { if (g_atomic_int_get (&_active)) { + cerr << "re-audition while still active!\n"; /* don't go via session for this, because we are going to remain active. */ diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc index 5f140f706d..ddd2f8e95e 100644 --- a/libs/ardour/source_factory.cc +++ b/libs/ardour/source_factory.cc @@ -29,7 +29,9 @@ #include <ardour/silentfilesource.h> #include <ardour/configuration.h> -#ifdef HAVE_COREAUDIO +#undef USE_COREAUDIO_FOR_FILES + +#ifdef USE_COREAUDIO_FOR_FILES #include <ardour/coreaudiosource.h> #endif @@ -118,7 +120,7 @@ SourceFactory::createSilent (Session& s, const XMLNode& node, nframes_t nframes, return ret; } -#ifdef HAVE_COREAUDIO +#ifdef USE_COREAUDIO_FOR_FILES boost::shared_ptr<Source> SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks) { @@ -170,9 +172,9 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks) return ret; } -#endif // HAVE_COREAUDIO +#endif // USE_COREAUDIO_FOR_FILES -#ifdef HAVE_COREAUDIO +#ifdef USE_COREAUDIO_FOR_FILES boost::shared_ptr<Source> SourceFactory::createReadable (Session& s, string path, int chn, AudioFileSource::Flag flags, bool announce, bool defer_peaks) { @@ -244,7 +246,7 @@ SourceFactory::createReadable (Session& s, string path, int chn, AudioFileSource return ret; } -#endif // HAVE_COREAUDIO +#endif // USE_COREAUDIO_FOR_FILES boost::shared_ptr<Source> SourceFactory::createWritable (Session& s, std::string path, bool destructive, nframes_t rate, bool announce, bool defer_peaks) diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index e8c1a4d64a..8622aae9b4 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -68,6 +68,7 @@ UI::UI (string namestr, int *argc, char ***argv) tips = new Tooltips; _active = false; + _auto_display_errors = true; if (!theGtkUI) { theGtkUI = this; @@ -482,8 +483,8 @@ UI::process_error_message (Transmitter::Channel chn, const char *str) display_message (prefix, prefix_len, ptag, mtag, str); - if (!errors->is_visible()) { - toggle_errors(); + if (_auto_display_errors) { + show_error_log (); } } @@ -491,13 +492,26 @@ UI::process_error_message (Transmitter::Channel chn, const char *str) } void +UI::show_error_log () +{ + errors->set_position (WIN_POS_CENTER); + errors->show_all (); + errors->present (); +} + +void +UI::hide_error_log () +{ + errors->hide (); +} + +void UI::toggle_errors () { if (!errors->is_visible()) { - errors->set_position (WIN_POS_MOUSE); - errors->show (); + show_error_log (); } else { - errors->hide (); + hide_error_log (); } } diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index 0c2ff0d798..dbc6e6d611 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -139,11 +139,14 @@ class UI : public Receiver, public AbstractUI<UIRequest> static pthread_t the_gui_thread() { return gui_thread; } protected: + bool _auto_display_errors; virtual void handle_fatal (const char *); virtual void display_message (const char *prefix, gint prefix_len, Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag, const char *msg); + void show_error_log (); + void hide_error_log (); private: static UI *theGtkUI; diff --git a/libs/gtkmm2ext/pixfader.cc b/libs/gtkmm2ext/pixfader.cc index f3a40ffc69..217fe50d03 100644 --- a/libs/gtkmm2ext/pixfader.cc +++ b/libs/gtkmm2ext/pixfader.cc @@ -68,7 +68,7 @@ PixFader::on_expose_event (GdkEventExpose* ev) intersection.width, intersection.height, Gdk::RGB_DITHER_NONE, 0, 0); - get_window()->draw_line (get_style()->get_bg_gc(STATE_ACTIVE), 0, 0, view.width - 1, 0); /* top */ + get_window()->draw_line (get_style()->get_bg_gc(STATE_ACTIVE), 0, 0, view.width - 1, 0); /* top */ get_window()->draw_line (get_style()->get_bg_gc(STATE_ACTIVE), 0, 0, 0, view.height - 1); /* left */ get_window()->draw_line (get_style()->get_bg_gc(STATE_NORMAL), view.width - 1, 0, view.width - 1, view.height - 1); /* right */ get_window()->draw_line (get_style()->get_bg_gc(STATE_NORMAL), 0, view.height - 1, view.width - 1, view.height - 1); /* bottom */ @@ -238,7 +238,7 @@ PixFader::adjustment_changed () { if (display_height() != last_drawn) { queue_draw (); - } + } } int diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index 00189c748e..0b9ad8891c 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -51,7 +51,7 @@ if test x$WITH_JACK != x ; then fi if test "x$env" != x ; then - env="<key>LSEnvironment</key><dict>$env</dict>" + env="<key>LSEnvironment</key><dict><key>ARDOUR_BUNDLED</key><string>true</string>$env</dict>" fi # edit plist |