summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/about.cc5
-rw-r--r--gtk2_ardour/ardour_ui.cc28
-rw-r--r--gtk2_ardour/ardour_ui.h2
-rw-r--r--gtk2_ardour/ardour_ui_dialogs.cc4
-rw-r--r--gtk2_ardour/audio_region_editor.cc30
-rw-r--r--gtk2_ardour/audio_region_editor.h10
-rw-r--r--gtk2_ardour/audio_region_view.h4
-rw-r--r--gtk2_ardour/audio_time_axis.cc4
-rw-r--r--gtk2_ardour/automation_time_axis.cc12
-rw-r--r--gtk2_ardour/bundle_manager.cc2
-rw-r--r--gtk2_ardour/canvas-waveview.c2
-rw-r--r--gtk2_ardour/editor_export_audio.cc6
-rw-r--r--gtk2_ardour/editor_markers.cc4
-rw-r--r--gtk2_ardour/editor_rulers.cc8
-rw-r--r--gtk2_ardour/editor_timefx.cc5
-rw-r--r--gtk2_ardour/editor_videotimeline.cc4
-rw-r--r--gtk2_ardour/export_channel_selector.h4
-rw-r--r--gtk2_ardour/export_dialog.cc2
-rw-r--r--gtk2_ardour/export_format_dialog.h4
-rw-r--r--gtk2_ardour/export_timespan_selector.h5
-rw-r--r--gtk2_ardour/export_video_dialog.cc16
-rw-r--r--gtk2_ardour/export_video_infobox.cc3
-rw-r--r--gtk2_ardour/generic_pluginui.cc2
-rw-r--r--gtk2_ardour/global_port_matrix.cc10
-rw-r--r--gtk2_ardour/global_port_matrix.h4
-rw-r--r--gtk2_ardour/keyboard.cc4
-rw-r--r--gtk2_ardour/main.cc41
-rw-r--r--gtk2_ardour/main_clock.cc2
-rw-r--r--gtk2_ardour/marker.cc2
-rw-r--r--gtk2_ardour/midi_channel_selector.cc8
-rw-r--r--gtk2_ardour/midi_region_view.h4
-rw-r--r--gtk2_ardour/midi_time_axis.cc15
-rw-r--r--gtk2_ardour/midi_tracer.cc3
-rw-r--r--gtk2_ardour/missing_file_dialog.cc17
-rw-r--r--gtk2_ardour/mixer_actor.cc4
-rw-r--r--gtk2_ardour/mixer_strip.cc4
-rw-r--r--gtk2_ardour/panner2d.cc12
-rw-r--r--gtk2_ardour/panner_ui.cc2
-rw-r--r--gtk2_ardour/patch_change_dialog.cc2
-rw-r--r--gtk2_ardour/pingback.cc6
-rw-r--r--gtk2_ardour/plugin_selector.cc1
-rw-r--r--gtk2_ardour/plugin_ui.cc2
-rw-r--r--gtk2_ardour/port_matrix.cc2
-rw-r--r--gtk2_ardour/processor_box.cc2
-rw-r--r--gtk2_ardour/region_gain_line.h4
-rw-r--r--gtk2_ardour/region_view.h4
-rw-r--r--gtk2_ardour/route_time_axis.cc6
-rw-r--r--gtk2_ardour/route_ui.cc24
-rw-r--r--gtk2_ardour/session_metadata_dialog.h6
-rw-r--r--gtk2_ardour/sfdb_ui.cc8
-rw-r--r--gtk2_ardour/step_entry.cc4
-rw-r--r--gtk2_ardour/transcode_ffmpeg.cc10
-rw-r--r--gtk2_ardour/transcode_video_dialog.cc6
-rw-r--r--gtk2_ardour/ui_config.cc2
-rw-r--r--gtk2_ardour/utils.cc8
-rw-r--r--gtk2_ardour/utils_videotl.cc2
-rw-r--r--gtk2_ardour/video_image_frame.cc4
-rw-r--r--gtk2_ardour/video_monitor.cc4
-rw-r--r--gtk2_ardour/video_server_dialog.cc8
-rw-r--r--gtk2_ardour/wscript8
60 files changed, 288 insertions, 133 deletions
diff --git a/gtk2_ardour/about.cc b/gtk2_ardour/about.cc
index 280f72a8dc..b2dac67379 100644
--- a/gtk2_ardour/about.cc
+++ b/gtk2_ardour/about.cc
@@ -20,7 +20,6 @@
#include <algorithm>
#include <unistd.h>
#include <sys/types.h>
-#include <sys/wait.h>
#include <cstdio>
#include <ctime>
#include <cstdlib>
@@ -41,6 +40,10 @@
#include "i18n.h"
+#ifdef SearchPath
+#undef SearchPath
+#endif
+
using namespace Gtk;
using namespace Gdk;
using namespace std;
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 6a000d2981..6de90c15c2 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -27,15 +27,18 @@
#include <cerrno>
#include <fstream>
+#ifndef WIN32
+#include <sys/resource.h>
+#endif
+
#include <stdint.h>
#include <fcntl.h>
#include <signal.h>
#include <unistd.h>
#include <time.h>
-#include <sys/resource.h>
-#include <sys/types.h>
-#include <sys/sysctl.h>
+#include <glib.h>
+#include <glib/gstdio.h>
#include <gtkmm/messagedialog.h>
#include <gtkmm/accelmap.h>
@@ -48,6 +51,7 @@
#include "pbd/memento_command.h"
#include "pbd/openuri.h"
#include "pbd/file_utils.h"
+#include "pbd/localtime_r.h"
#include "gtkmm2ext/application.h"
#include "gtkmm2ext/bindings.h"
@@ -285,7 +289,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
/* and ambiguous files */
- ARDOUR::FileSource::AmbiguousFileName.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::ambiguous_file, this, _1, _2, _3));
+ ARDOUR::FileSource::AmbiguousFileName.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::ambiguous_file, this, _1, _2));
/* lets get this party started */
@@ -778,7 +782,7 @@ ARDOUR_UI::no_memory_warning ()
void
ARDOUR_UI::check_memory_locking ()
{
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(WIN32)
/* OS X doesn't support mlockall(2), and so testing for memory locking capability there is pointless */
return;
#else // !__APPLE__
@@ -3405,15 +3409,23 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg)
if (icsd_docroot.empty()) {icsd_docroot = X_("/");}
struct stat sb;
- if (!lstat (icsd_docroot.c_str(), &sb) == 0 || !S_ISDIR(sb.st_mode)) {
+ if (!g_lstat (icsd_docroot.c_str(), &sb) == 0 || !S_ISDIR(sb.st_mode)) {
warning << _("Specified docroot is not an existing directory.") << endmsg;
continue;
}
- if ( (!lstat (icsd_exec.c_str(), &sb) == 0)
+#ifndef WIN32
+ if ( (!g_lstat (icsd_exec.c_str(), &sb) == 0)
|| (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0 ) {
warning << _("Given Video Server is not an executable file.") << endmsg;
continue;
}
+#else
+ if ( (!g_lstat (icsd_exec.c_str(), &sb) == 0)
+ || (sb.st_mode & (S_IXUSR)) == 0 ) {
+ warning << _("Given Video Server is not an executable file.") << endmsg;
+ continue;
+ }
+#endif
char **argp;
argp=(char**) calloc(9,sizeof(char*));
@@ -4057,7 +4069,7 @@ ARDOUR_UI::missing_file (Session*s, std::string str, DataType type)
}
int
-ARDOUR_UI::ambiguous_file (std::string file, std::string /*path*/, std::vector<std::string> hits)
+ARDOUR_UI::ambiguous_file (std::string file, std::vector<std::string> hits)
{
AmbiguousFileDialog dialog (file, hits);
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 61b229454d..e2eae36977 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -720,7 +720,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void fontconfig_dialog ();
int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
- int ambiguous_file (std::string file, std::string path, std::vector<std::string> hits);
+ int ambiguous_file (std::string file, std::vector<std::string> hits);
bool click_button_clicked (GdkEventButton *);
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc
index 96d5de60de..f5fc16651a 100644
--- a/gtk2_ardour/ardour_ui_dialogs.cc
+++ b/gtk2_ardour/ardour_ui_dialogs.cc
@@ -27,6 +27,10 @@
#include "ardour/audioengine.h"
#include "ardour/automation_watch.h"
+#ifdef interface
+#undef interface
+#endif
+
#include "actions.h"
#include "add_route_dialog.h"
#include "add_video_dialog.h"
diff --git a/gtk2_ardour/audio_region_editor.cc b/gtk2_ardour/audio_region_editor.cc
index 2aeb2dbe60..03d3e47264 100644
--- a/gtk2_ardour/audio_region_editor.cc
+++ b/gtk2_ardour/audio_region_editor.cc
@@ -54,7 +54,9 @@ AudioRegionEditor::AudioRegionEditor (Session* s, boost::shared_ptr<AudioRegion>
: RegionEditor (s, r)
, _audio_region (r)
, gain_adjustment(accurate_coefficient_to_dB(_audio_region->scale_amplitude()), -40.0, +40.0, 0.1, 1.0, 0)
+#ifndef WIN32
, _peak_channel (false)
+#endif
{
Gtk::HBox* b = Gtk::manage (new Gtk::HBox);
@@ -91,7 +93,7 @@ AudioRegionEditor::AudioRegionEditor (Session* s, boost::shared_ptr<AudioRegion>
PeakAmplitudeFound.connect (_peak_amplitude_connection, invalidator (*this), boost::bind (&AudioRegionEditor::peak_amplitude_found, this, _1), gui_context ());
pthread_create_and_store (X_("peak-amplitude"), &_peak_amplitude_thread_handle, _peak_amplitude_thread, this);
- _peak_channel.deliver ('c');
+ signal_peak_thread ();
}
AudioRegionEditor::~AudioRegionEditor ()
@@ -112,7 +114,7 @@ AudioRegionEditor::region_changed (const PBD::PropertyChange& what_changed)
if (what_changed.contains (ARDOUR::Properties::start) || what_changed.contains (ARDOUR::Properties::length)) {
/* ask the peak thread to run again */
- _peak_channel.deliver ('c');
+ signal_peak_thread ();
}
}
void
@@ -134,12 +136,32 @@ AudioRegionEditor::gain_adjustment_changed ()
}
void
+AudioRegionEditor::signal_peak_thread ()
+{
+#ifdef WIN32
+ m_peak_sem.post ();
+#else
+ _peak_channel.deliver ('c');
+#endif
+}
+
+void
+AudioRegionEditor::wait_for_signal ()
+{
+#ifdef WIN32
+ m_peak_sem.wait ();
+#else
+ char msg;
+ _peak_channel.receive (msg);
+#endif
+}
+
+void
AudioRegionEditor::peak_amplitude_thread ()
{
while (1) {
/* await instructions to run */
- char msg;
- _peak_channel.receive (msg);
+ wait_for_signal ();
/* compute peak amplitude and signal the fact */
PeakAmplitudeFound (accurate_coefficient_to_dB (_audio_region->maximum_amplitude ())); /* EMIT SIGNAL */
diff --git a/gtk2_ardour/audio_region_editor.h b/gtk2_ardour/audio_region_editor.h
index dd65a3fb31..0d9292b483 100644
--- a/gtk2_ardour/audio_region_editor.h
+++ b/gtk2_ardour/audio_region_editor.h
@@ -37,7 +37,11 @@
#include <libgnomecanvas/libgnomecanvas.h>
#include "pbd/signals.h"
+#ifdef WIN32
+#include "pbd/glib_semaphore.h"
+#else
#include "pbd/crossthread.h"
+#endif
#include "audio_clock.h"
#include "ardour_dialog.h"
@@ -74,11 +78,17 @@ class AudioRegionEditor : public RegionEditor
Gtk::Label _peak_amplitude_label;
Gtk::Entry _peak_amplitude;
+ void signal_peak_thread ();
+ void wait_for_signal ();
pthread_t _peak_amplitude_thread_handle;
void peak_amplitude_found (double);
PBD::Signal1<void, double> PeakAmplitudeFound;
PBD::ScopedConnection _peak_amplitude_connection;
+#ifdef WIN32
+ PBD::GlibSemaphore m_peak_sem;
+#else
CrossThreadChannel _peak_channel;
+#endif
};
#endif /* __gtk_ardour_audio_region_edit_h__ */
diff --git a/gtk2_ardour/audio_region_view.h b/gtk2_ardour/audio_region_view.h
index 10159d0cfb..7c6d6b88f2 100644
--- a/gtk2_ardour/audio_region_view.h
+++ b/gtk2_ardour/audio_region_view.h
@@ -19,6 +19,10 @@
#ifndef __gtk_ardour_audio_region_view_h__
#define __gtk_ardour_audio_region_view_h__
+#ifdef interface
+#undef interface
+#endif
+
#include <vector>
#include <libgnomecanvasmm.h>
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index bf980690aa..994f167014 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -387,14 +387,14 @@ AudioTimeAxisView::build_automation_action_menu (bool for_selection)
MenuList& automation_items = automation_action_menu->items ();
automation_items.push_back (CheckMenuElem (_("Fader"), sigc::mem_fun (*this, &AudioTimeAxisView::update_gain_track_visibility)));
- gain_automation_item = dynamic_cast<CheckMenuItem*> (&automation_items.back ());
+ gain_automation_item = dynamic_cast<Gtk::CheckMenuItem*> (&automation_items.back ());
gain_automation_item->set_active ((!for_selection || _editor.get_selection().tracks.size() == 1) &&
(gain_track && string_is_affirmative (gain_track->gui_property ("visible"))));
_main_automation_menu_map[Evoral::Parameter(GainAutomation)] = gain_automation_item;
automation_items.push_back (CheckMenuElem (_("Pan"), sigc::mem_fun (*this, &AudioTimeAxisView::update_pan_track_visibility)));
- pan_automation_item = dynamic_cast<CheckMenuItem*> (&automation_items.back ());
+ pan_automation_item = dynamic_cast<Gtk::CheckMenuItem*> (&automation_items.back ());
pan_automation_item->set_active ((!for_selection || _editor.get_selection().tracks.size() == 1) &&
(!pan_tracks.empty() && string_is_affirmative (pan_tracks.front()->gui_property ("visible"))));
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 848298c8b8..1621697335 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -496,22 +496,22 @@ AutomationTimeAxisView::build_display_menu ()
as_items.push_back (CheckMenuElem (S_("Automation|Manual"), sigc::bind (
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
(AutoState) ARDOUR::Off)));
- auto_off_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
+ auto_off_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
as_items.push_back (CheckMenuElem (_("Play"), sigc::bind (
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
(AutoState) Play)));
- auto_play_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
+ auto_play_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
as_items.push_back (CheckMenuElem (_("Write"), sigc::bind (
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
(AutoState) Write)));
- auto_write_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
+ auto_write_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
as_items.push_back (CheckMenuElem (_("Touch"), sigc::bind (
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
(AutoState) Touch)));
- auto_touch_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
+ auto_touch_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
items.push_back (MenuElem (_("State"), *auto_state_menu));
@@ -531,13 +531,13 @@ AutomationTimeAxisView::build_display_menu ()
am_items.push_back (RadioMenuElem (group, _("Discrete"), sigc::bind (
sigc::mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
AutomationList::Discrete)));
- mode_discrete_item = dynamic_cast<CheckMenuItem*>(&am_items.back());
+ mode_discrete_item = dynamic_cast<Gtk::CheckMenuItem*>(&am_items.back());
mode_discrete_item->set_active (s == AutomationList::Discrete);
am_items.push_back (RadioMenuElem (group, _("Linear"), sigc::bind (
sigc::mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
AutomationList::Linear)));
- mode_line_item = dynamic_cast<CheckMenuItem*>(&am_items.back());
+ mode_line_item = dynamic_cast<Gtk::CheckMenuItem*>(&am_items.back());
mode_line_item->set_active (s == AutomationList::Linear);
items.push_back (MenuElem (_("Mode"), *auto_mode_menu));
diff --git a/gtk2_ardour/bundle_manager.cc b/gtk2_ardour/bundle_manager.cc
index c7754f69cc..035046c10b 100644
--- a/gtk2_ardour/bundle_manager.cc
+++ b/gtk2_ardour/bundle_manager.cc
@@ -286,7 +286,7 @@ BundleManager::BundleManager (Session* session)
edit_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::EDIT, Gtk::ICON_SIZE_BUTTON)));
edit_button.signal_clicked().connect (sigc::mem_fun (*this, &BundleManager::edit_clicked));
buttons->pack_start (edit_button, false, false);
- delete_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::DELETE, Gtk::ICON_SIZE_BUTTON)));
+ delete_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::StockID(GTK_STOCK_DELETE), Gtk::ICON_SIZE_BUTTON)));
delete_button.signal_clicked().connect (sigc::mem_fun (*this, &BundleManager::delete_clicked));
buttons->pack_start (delete_button, false, false);
diff --git a/gtk2_ardour/canvas-waveview.c b/gtk2_ardour/canvas-waveview.c
index 2080b208d8..51384c0fad 100644
--- a/gtk2_ardour/canvas-waveview.c
+++ b/gtk2_ardour/canvas-waveview.c
@@ -35,7 +35,7 @@
/* POSIX guarantees casting between void* and function pointers, ISO C doesn't
* We can work around warnings by going one step deeper in our casts
*/
-#ifdef _POSIX_VERSION
+#if defined(_POSIX_VERSION) || defined(__MINGW32__)
#define POSIX_FUNC_PTR_CAST(type, object) *((type*) &(object))
#endif // _POSIX_VERSION
diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc
index 877a39e773..e40030d671 100644
--- a/gtk2_ardour/editor_export_audio.cc
+++ b/gtk2_ardour/editor_export_audio.cc
@@ -25,6 +25,8 @@
#include <gtkmm/messagedialog.h>
+#include <glib/gstdio.h>
+
#include "gtkmm2ext/choice.h"
#include "pbd/pthread_utils.h"
@@ -158,11 +160,11 @@ Editor::export_region ()
switch (ret) {
case Gtk::RESPONSE_ACCEPT:
- /* force unlink because the backend code will
+ /* force ::g_unlink because the backend code will
go wrong if it tries to open an existing
file for writing.
*/
- ::unlink (path.c_str());
+ ::g_unlink (path.c_str());
break;
default:
return;
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index 3bca0ad935..6dee565287 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -858,14 +858,14 @@ Editor::build_marker_menu (Location* loc)
items.push_back (MenuElem (_("Rename..."), sigc::mem_fun(*this, &Editor::marker_menu_rename)));
items.push_back (CheckMenuElem (_("Lock")));
- CheckMenuItem* lock_item = static_cast<CheckMenuItem*> (&items.back());
+ Gtk::CheckMenuItem* lock_item = static_cast<Gtk::CheckMenuItem*> (&items.back());
if (loc->locked ()) {
lock_item->set_active ();
}
lock_item->signal_activate().connect (sigc::mem_fun (*this, &Editor::toggle_marker_menu_lock));
items.push_back (CheckMenuElem (_("Glue to Bars and Beats")));
- CheckMenuItem* glue_item = static_cast<CheckMenuItem*> (&items.back());
+ Gtk::CheckMenuItem* glue_item = static_cast<Gtk::CheckMenuItem*> (&items.back());
if (loc->position_lock_style() == MusicTime) {
glue_item->set_active ();
}
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index 2752f96553..a7883674cd 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -373,11 +373,11 @@ Editor::popup_ruler_menu (framepos_t where, ItemType t)
ruler_items.push_back (MenuElem (_("Timeline height")));
static_cast<MenuItem*>(&ruler_items.back())->set_sensitive(false);
ruler_items.push_back (CheckMenuElem (_("Large"), sigc::bind ( sigc::mem_fun(*this, &Editor::set_video_timeline_height), 6)));
- if (videotl_bar_height == 6) { static_cast<CheckMenuItem*>(&ruler_items.back())->set_active(true);}
+ if (videotl_bar_height == 6) { static_cast<Gtk::CheckMenuItem*>(&ruler_items.back())->set_active(true);}
ruler_items.push_back (CheckMenuElem (_("Normal"), sigc::bind ( sigc::mem_fun(*this, &Editor::set_video_timeline_height), 4)));
- if (videotl_bar_height == 4) { static_cast<CheckMenuItem*>(&ruler_items.back())->set_active(true);}
+ if (videotl_bar_height == 4) { static_cast<Gtk::CheckMenuItem*>(&ruler_items.back())->set_active(true);}
ruler_items.push_back (CheckMenuElem (_("Small"), sigc::bind ( sigc::mem_fun(*this, &Editor::set_video_timeline_height), 3)));
- if (videotl_bar_height == 3) { static_cast<CheckMenuItem*>(&ruler_items.back())->set_active(true);}
+ if (videotl_bar_height == 3) { static_cast<Gtk::CheckMenuItem*>(&ruler_items.back())->set_active(true);}
ruler_items.push_back (SeparatorElem ());
ruler_items.push_back (MenuElem (_("Align Video Track")));
@@ -385,7 +385,7 @@ Editor::popup_ruler_menu (framepos_t where, ItemType t)
ruler_items.push_back (CheckMenuElem (_("Lock")));
{
- CheckMenuItem* vtl_lock = static_cast<CheckMenuItem*>(&ruler_items.back());
+ Gtk::CheckMenuItem* vtl_lock = static_cast<Gtk::CheckMenuItem*>(&ruler_items.back());
vtl_lock->set_active(is_video_timeline_locked());
vtl_lock->signal_activate().connect (sigc::mem_fun(*this, &Editor::toggle_video_timeline_locked));
}
diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc
index 2f0b09ed17..e43dae9e2b 100644
--- a/gtk2_ardour/editor_timefx.cc
+++ b/gtk2_ardour/editor_timefx.cc
@@ -402,9 +402,12 @@ Editor::timefx_thread (void *arg)
by the GUI ...
*/
+#ifdef WIN32
+ Sleep(2000);
+#else
struct timespec t = { 2, 0 };
nanosleep (&t, 0);
-
+#endif
return 0;
}
diff --git a/gtk2_ardour/editor_videotimeline.cc b/gtk2_ardour/editor_videotimeline.cc
index 0a516fb748..e9360d9d09 100644
--- a/gtk2_ardour/editor_videotimeline.cc
+++ b/gtk2_ardour/editor_videotimeline.cc
@@ -20,6 +20,8 @@
#include <jack/types.h>
+#include <glib/gstdio.h>
+
#include "ardour/profile.h"
#include "ardour/rc_configuration.h"
#include "ardour/audio_track.h"
@@ -118,7 +120,7 @@ Editor::embed_audio_from_video (std::string path, framepos_t n)
import_status.all_done = true;
#endif
- unlink(path.c_str());
+ ::g_unlink(path.c_str());
}
void
diff --git a/gtk2_ardour/export_channel_selector.h b/gtk2_ardour/export_channel_selector.h
index 984026a748..bc165273c7 100644
--- a/gtk2_ardour/export_channel_selector.h
+++ b/gtk2_ardour/export_channel_selector.h
@@ -25,6 +25,10 @@
#include "ardour/export_profile_manager.h"
+#ifdef interface
+#undef interface
+#endif
+
#include <gtkmm.h>
#include <sigc++/signal.h>
#include <boost/shared_ptr.hpp>
diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc
index a64acd1680..8916806a15 100644
--- a/gtk2_ardour/export_dialog.cc
+++ b/gtk2_ardour/export_dialog.cc
@@ -328,7 +328,7 @@ ExportDialog::show_progress ()
if (gtk_events_pending()) {
gtk_main_iteration ();
} else {
- usleep (10000);
+ Glib::usleep (10000);
}
}
diff --git a/gtk2_ardour/export_format_dialog.h b/gtk2_ardour/export_format_dialog.h
index 8d37ded2cd..3e38cf09d6 100644
--- a/gtk2_ardour/export_format_dialog.h
+++ b/gtk2_ardour/export_format_dialog.h
@@ -32,6 +32,10 @@
#include "ardour_dialog.h"
#include "audio_clock.h"
+#ifdef interface
+#undef interface
+#endif
+
#include <gtkmm.h>
class ExportFormatDialog : public ArdourDialog, public PBD::ScopedConnectionList {
diff --git a/gtk2_ardour/export_timespan_selector.h b/gtk2_ardour/export_timespan_selector.h
index 2118a57b83..5556f5f676 100644
--- a/gtk2_ardour/export_timespan_selector.h
+++ b/gtk2_ardour/export_timespan_selector.h
@@ -25,9 +25,14 @@
#include <list>
+#ifdef interface
+#undef interface
+#endif
+
#include <gtkmm.h>
#include <boost/shared_ptr.hpp>
+
#include "ardour/types.h"
#include "ardour/session_handle.h"
#include "ardour/export_profile_manager.h"
diff --git a/gtk2_ardour/export_video_dialog.cc b/gtk2_ardour/export_video_dialog.cc
index 5ccfa172ea..fafdd7a50d 100644
--- a/gtk2_ardour/export_video_dialog.cc
+++ b/gtk2_ardour/export_video_dialog.cc
@@ -30,6 +30,8 @@
#include <sigc++/bind.h>
#include <libgen.h>
+#include <glib/gstdio.h>
+
#include "pbd/error.h"
#include "pbd/convert.h"
#include "gtkmm2ext/utils.h"
@@ -405,8 +407,8 @@ void
ExportVideoDialog::finished ()
{
if (aborted) {
- unlink(outfn_path_entry.get_text().c_str());
- unlink (insnd.c_str());
+ ::g_unlink(outfn_path_entry.get_text().c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
} else if (twopass && firstpass) {
firstpass = false;
@@ -416,9 +418,9 @@ ExportVideoDialog::finished ()
if (twopass_checkbox.get_active()) {
std::string outfn = outfn_path_entry.get_text();
std::string p2log = Glib::path_get_dirname (outfn) + G_DIR_SEPARATOR + "ffmpeg2pass";
- unlink (p2log.c_str());
+ ::g_unlink (p2log.c_str());
}
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_ACCEPT);
}
}
@@ -554,7 +556,7 @@ ExportVideoDialog::launch_export ()
audio_progress_connection.disconnect();
status->finish ();
if (status->aborted()) {
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
@@ -571,14 +573,14 @@ ExportVideoDialog::encode_pass (int pass)
transcoder = new TranscodeFfmpeg(invid);
if (!transcoder->ffexec_ok()) {
/* ffmpeg binary was not found. TranscodeFfmpeg prints a warning */
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
if (!transcoder->probe_ok()) {
/* video input file can not be read */
warning << _("Export Video: Video input file cannot be read.") << endmsg;
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
diff --git a/gtk2_ardour/export_video_infobox.cc b/gtk2_ardour/export_video_infobox.cc
index fbe28bd821..a3e356decc 100644
--- a/gtk2_ardour/export_video_infobox.cc
+++ b/gtk2_ardour/export_video_infobox.cc
@@ -18,6 +18,9 @@
*/
#include "ardour/session.h"
+#ifdef interface
+#undef interface
+#endif
#include "export_video_infobox.h"
#include "i18n.h"
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc
index 971dfc0e9b..6cea8f3c0b 100644
--- a/gtk2_ardour/generic_pluginui.cc
+++ b/gtk2_ardour/generic_pluginui.cc
@@ -43,8 +43,6 @@
#include "ardour/plugin_insert.h"
#include "ardour/session.h"
-#include <lrdf.h>
-
#include "ardour_ui.h"
#include "prompter.h"
#include "plugin_ui.h"
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc
index 8c1fde3082..e1bdfb199e 100644
--- a/gtk2_ardour/global_port_matrix.cc
+++ b/gtk2_ardour/global_port_matrix.cc
@@ -47,7 +47,7 @@ GlobalPortMatrix::setup_ports (int dim)
}
_ports[dim].suspend_signals ();
- _ports[dim].gather (_session, type(), dim == IN, false, show_only_bundles ());
+ _ports[dim].gather (_session, type(), dim == FLOW_IN, false, show_only_bundles ());
_ports[dim].resume_signals ();
}
@@ -58,8 +58,8 @@ GlobalPortMatrix::set_state (BundleChannel c[2], bool s)
return;
}
- Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel);
- Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel);
+ Bundle::PortList const & in_ports = c[FLOW_IN].bundle->channel_ports (c[FLOW_IN].channel);
+ Bundle::PortList const & out_ports = c[FLOW_OUT].bundle->channel_ports (c[FLOW_OUT].channel);
for (Bundle::PortList::const_iterator i = in_ports.begin(); i != in_ports.end(); ++i) {
for (Bundle::PortList::const_iterator j = out_ports.begin(); j != out_ports.end(); ++j) {
@@ -102,8 +102,8 @@ GlobalPortMatrix::get_state (BundleChannel c[2]) const
return PortMatrixNode::NOT_ASSOCIATED;
}
- Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel);
- Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel);
+ Bundle::PortList const & in_ports = c[FLOW_IN].bundle->channel_ports (c[FLOW_IN].channel);
+ Bundle::PortList const & out_ports = c[FLOW_OUT].bundle->channel_ports (c[FLOW_OUT].channel);
if (in_ports.empty() || out_ports.empty()) {
/* we're looking at a bundle with no parts associated with this channel,
so nothing to connect */
diff --git a/gtk2_ardour/global_port_matrix.h b/gtk2_ardour/global_port_matrix.h
index d45a639093..3def23a6a3 100644
--- a/gtk2_ardour/global_port_matrix.h
+++ b/gtk2_ardour/global_port_matrix.h
@@ -46,8 +46,8 @@ public:
private:
/* see PortMatrix: signal flow from 0 to 1 (out to in) */
enum {
- OUT = 0,
- IN = 1,
+ FLOW_OUT = 0,
+ FLOW_IN = 1,
};
};
diff --git a/gtk2_ardour/keyboard.cc b/gtk2_ardour/keyboard.cc
index 98ffab1160..75a96ec98b 100644
--- a/gtk2_ardour/keyboard.cc
+++ b/gtk2_ardour/keyboard.cc
@@ -28,6 +28,10 @@
#include "i18n.h"
+#ifdef SearchPath
+#undef SearchPath
+#endif
+
using namespace std;
using namespace Gtk;
using namespace PBD;
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc
index 21e5343979..ef96423fb5 100644
--- a/gtk2_ardour/main.cc
+++ b/gtk2_ardour/main.cc
@@ -31,6 +31,7 @@
#include "pbd/file_utils.h"
#include "pbd/textreceiver.h"
#include "pbd/failed_constructor.h"
+#include "pbd/pathexpand.h"
#include "pbd/pthread_utils.h"
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
#include "pbd/boost_debug.h"
@@ -110,7 +111,7 @@ Please consider the possibilities, and perhaps (re)start JACK."), PROGRAM_NAME))
static void export_search_path (const string& base_dir, const char* varname, const char* dir)
{
string path;
- const char * cstr = getenv (varname);
+ const char * cstr = g_getenv (varname);
if (cstr) {
path = cstr;
@@ -121,7 +122,7 @@ static void export_search_path (const string& base_dir, const char* varname, con
path += base_dir;
path += dir;
- setenv (varname, path.c_str(), 1);
+ g_setenv (varname, path.c_str(), 1);
}
#ifdef __APPLE__
@@ -134,7 +135,7 @@ extern void set_language_preference (); // cocoacarbon.mm
void
fixup_bundle_environment (int, char* [])
{
- if (!getenv ("ARDOUR_BUNDLED")) {
+ if (!g_getenv ("ARDOUR_BUNDLED")) {
return;
}
@@ -184,12 +185,12 @@ fixup_bundle_environment (int, char* [])
export_search_path (bundle_dir, "SUIL_MODULE_DIR", "/lib");
export_search_path (bundle_dir, "GTK_PATH", "/lib/gtkengines");
- setenv ("PATH", (bundle_dir + "/MacOS:" + std::string(getenv ("PATH"))).c_str(), 1);
+ g_setenv ("PATH", (bundle_dir + "/MacOS:" + std::string(getenv ("PATH"))).c_str(), 1);
/* unset GTK_RC_FILES so that we only load the RC files that we define
*/
- unsetenv ("GTK_RC_FILES");
+ g_unsetenv ("GTK_RC_FILES");
/* write a pango.rc file and tell pango to use it. we'd love
to put this into the PROGRAM_NAME.app bundle and leave it there,
@@ -214,13 +215,13 @@ fixup_bundle_environment (int, char* [])
<< endl;
pangorc.close ();
- setenv ("PANGO_RC_FILE", path.c_str(), 1);
+ g_setenv ("PANGO_RC_FILE", path.c_str(), 1);
}
}
- setenv ("CHARSETALIASDIR", bundle_dir.c_str(), 1);
- setenv ("FONTCONFIG_FILE", Glib::build_filename (bundle_dir, "Resources/fonts.conf").c_str(), 1);
- setenv ("GDK_PIXBUF_MODULE_FILE", Glib::build_filename (bundle_dir, "Resources/gdk-pixbuf.loaders").c_str(), 1);
+ g_setenv ("CHARSETALIASDIR", bundle_dir.c_str(), 1);
+ g_setenv ("FONTCONFIG_FILE", Glib::build_filename (bundle_dir, "Resources/fonts.conf").c_str(), 1);
+ g_setenv ("GDK_PIXBUF_MODULE_FILE", Glib::build_filename (bundle_dir, "Resources/gdk-pixbuf.loaders").c_str(), 1);
}
static void load_custom_fonts() {
@@ -258,7 +259,7 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
* acceptable to build paths directly using '/'.
*/
- if (!getenv ("ARDOUR_BUNDLED")) {
+ if (!g_getenv ("ARDOUR_BUNDLED")) {
return;
}
@@ -277,7 +278,7 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
lpath.push_back (dir_path);
lpath.push_back ("share");
lpath.push_back ("locale");
- localedir = realpath (Glib::build_filename (lpath).c_str(), NULL);
+ localedir = canonical_path (Glib::build_filename (lpath)).c_str();
}
#endif
@@ -294,20 +295,20 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
export_search_path (dir_path, "SUIL_MODULE_DIR", "/lib");
export_search_path (dir_path, "GTK_PATH", "/lib/gtkengines");
- setenv ("PATH", (dir_path + "/bin:" + std::string(getenv ("PATH"))).c_str(), 1);
+ g_setenv ("PATH", (dir_path + "/bin:" + std::string(getenv ("PATH"))).c_str(), 1);
/* unset GTK_RC_FILES so that we only load the RC files that we define
*/
- unsetenv ("GTK_RC_FILES");
+ g_unsetenv ("GTK_RC_FILES");
/* Tell fontconfig where to find fonts.conf. Use the system version
if it exists, otherwise use the stuff we included in the bundle
*/
if (Glib::file_test ("/etc/fonts/fonts.conf", Glib::FILE_TEST_EXISTS)) {
- setenv ("FONTCONFIG_FILE", "/etc/fonts/fonts.conf", 1);
- setenv ("FONTCONFIG_PATH", "/etc/fonts", 1);
+ g_setenv ("FONTCONFIG_FILE", "/etc/fonts/fonts.conf", 1);
+ g_setenv ("FONTCONFIG_PATH", "/etc/fonts", 1);
} else {
error << _("No fontconfig file found on your system. Things may looked very odd or ugly") << endmsg;
}
@@ -336,19 +337,19 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
pangorc.close ();
}
- setenv ("PANGO_RC_FILE", path.c_str(), 1);
+ g_setenv ("PANGO_RC_FILE", path.c_str(), 1);
/* similar for GDK pixbuf loaders, but there's no RC file required
to specify where it lives.
*/
- setenv ("GDK_PIXBUF_MODULE_FILE", Glib::build_filename (userconfigdir, "gdk-pixbuf.loaders").c_str(), 1);
+ g_setenv ("GDK_PIXBUF_MODULE_FILE", Glib::build_filename (userconfigdir, "gdk-pixbuf.loaders").c_str(), 1);
}
/* this doesn't do much but setting it should prevent various parts of the GTK/GNU stack
from looking outside the bundle to find the charset.alias file.
*/
- setenv ("CHARSETALIASDIR", dir_path.c_str(), 1);
+ g_setenv ("CHARSETALIASDIR", dir_path.c_str(), 1);
}
@@ -473,7 +474,7 @@ int main (int argc, char *argv[])
text_receiver.listen_to (warning);
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
- if (getenv ("BOOST_DEBUG")) {
+ if (g_getenv ("BOOST_DEBUG")) {
boost_debug_shared_ptr_show_live_debugging (true);
}
#endif
@@ -515,9 +516,11 @@ int main (int argc, char *argv[])
PBD::ID::init ();
+#ifndef WIN32
if (::signal (SIGPIPE, sigpipe_handler)) {
cerr << _("Cannot xinstall SIGPIPE error handler") << endl;
}
+#endif
try {
ui = new ARDOUR_UI (&argc, &argv, localedir);
diff --git a/gtk2_ardour/main_clock.cc b/gtk2_ardour/main_clock.cc
index c9361f6091..36b398ee44 100644
--- a/gtk2_ardour/main_clock.cc
+++ b/gtk2_ardour/main_clock.cc
@@ -49,7 +49,7 @@ MainClock::build_ops_menu ()
MenuList& ops_items = ops_menu->items();
ops_items.push_back (SeparatorElem ());
ops_items.push_back (CheckMenuElem (_("Display delta to edit cursor"), sigc::mem_fun (*this, &MainClock::display_delta_to_edit_cursor)));
- CheckMenuItem* c = dynamic_cast<CheckMenuItem *> (&ops_items.back());
+ Gtk::CheckMenuItem* c = dynamic_cast<Gtk::CheckMenuItem *> (&ops_items.back());
if (_primary) {
if (ARDOUR::Config->get_primary_clock_delta_edit_cursor ()) {
ARDOUR::Config->set_primary_clock_delta_edit_cursor (false);
diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc
index 27fa9f5d42..2492d1a348 100644
--- a/gtk2_ardour/marker.cc
+++ b/gtk2_ardour/marker.cc
@@ -242,7 +242,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
/* adjust to properly locate the tip */
- mark = new Polygon (*group);
+ mark = new ArdourCanvas::Polygon (*group);
mark->property_points() = *points;
set_color_rgba (rgba);
mark->property_width_pixels() = 1;
diff --git a/gtk2_ardour/midi_channel_selector.cc b/gtk2_ardour/midi_channel_selector.cc
index 2f5ca729a6..b51584aef5 100644
--- a/gtk2_ardour/midi_channel_selector.cc
+++ b/gtk2_ardour/midi_channel_selector.cc
@@ -516,7 +516,7 @@ MidiChannelSelectorWindow::set_playback_selected_channels (uint16_t mask)
case ForceChannel:
/* only set the lowest set channel in the mask as active */
for (uint16_t i = 0; i < 16; i++) {
- playback_buttons[i]->set_active (i == (ffs (mask) - 1));
+ playback_buttons[i]->set_active (i == (PBD::ffs (mask) - 1));
}
break;
}
@@ -539,7 +539,7 @@ MidiChannelSelectorWindow::set_capture_selected_channels (uint16_t mask)
case ForceChannel:
/* only set the lowest set channel in the mask as active */
for (uint16_t i = 0; i < 16; i++) {
- capture_buttons[i]->set_active (i == (ffs (mask) - 1));
+ capture_buttons[i]->set_active (i == (PBD::ffs (mask) - 1));
}
break;
}
@@ -595,7 +595,7 @@ MidiChannelSelectorWindow::playback_mode_changed ()
case ForceChannel:
if (last_drawn_playback_mode == AllChannels || last_drawn_playback_mode == FilterChannels) {
playback_buttons.clear ();
- first_channel = ffs (track->get_playback_channel_mask()) - 1;
+ first_channel = PBD::ffs (track->get_playback_channel_mask()) - 1;
}
for (vector<Widget*>::iterator i = playback_mask_controls.begin(); i != playback_mask_controls.end(); ++i) {
(*i)->set_sensitive (false);
@@ -693,7 +693,7 @@ MidiChannelSelectorWindow::capture_mode_changed ()
case ForceChannel:
if (last_drawn_capture_mode == AllChannels || last_drawn_capture_mode == FilterChannels) {
capture_buttons.clear ();
- first_channel = ffs (track->get_capture_channel_mask()) - 1;
+ first_channel = PBD::ffs (track->get_capture_channel_mask()) - 1;
}
for (vector<Widget*>::iterator i = capture_mask_controls.begin(); i != capture_mask_controls.end(); ++i) {
(*i)->set_sensitive (false);
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h
index 5f374da55c..219d07f376 100644
--- a/gtk2_ardour/midi_region_view.h
+++ b/gtk2_ardour/midi_region_view.h
@@ -22,6 +22,10 @@
#include <string>
#include <vector>
+#ifdef interface
+#undef interface
+#endif
+
#include <libgnomecanvasmm.h>
#include <libgnomecanvasmm/polygon.h>
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index a4ffc442a3..93649dbebe 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -19,8 +19,6 @@
#include <cstdlib>
#include <cmath>
-#include <strings.h> // for ffs(3)
-
#include <algorithm>
#include <string>
#include <vector>
@@ -28,6 +26,7 @@
#include <sigc++/bind.h>
#include "pbd/error.h"
+#include "pbd/ffs.h"
#include "pbd/stl_delete.h"
#include "pbd/whitespace.h"
#include "pbd/basename.h"
@@ -665,7 +664,7 @@ MidiTimeAxisView::add_channel_command_menu_item (Menu_Helpers::MenuList& items,
}
}
- CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&chn_items.back());
+ Gtk::CheckMenuItem* cmi = static_cast<Gtk::CheckMenuItem*>(&chn_items.back());
_channel_command_menu_map[fully_qualified_param] = cmi;
cmi->set_active (visible);
}
@@ -697,7 +696,7 @@ MidiTimeAxisView::add_channel_command_menu_item (Menu_Helpers::MenuList& items,
}
}
- CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&items.back());
+ Gtk::CheckMenuItem* cmi = static_cast<Gtk::CheckMenuItem*>(&items.back());
_channel_command_menu_map[fully_qualified_param] = cmi;
cmi->set_active (visible);
@@ -739,7 +738,7 @@ MidiTimeAxisView::add_single_channel_controller_item(Menu_Helpers::MenuList& ctl
}
}
- CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&ctl_items.back());
+ Gtk::CheckMenuItem* cmi = static_cast<Gtk::CheckMenuItem*>(&ctl_items.back());
_controller_menu_map[fully_qualified_param] = cmi;
cmi->set_active (visible);
@@ -795,7 +794,7 @@ MidiTimeAxisView::add_multi_channel_controller_item(Menu_Helpers::MenuList& ctl_
}
}
- CheckMenuItem* cmi = static_cast<CheckMenuItem*>(&chn_items.back());
+ Gtk::CheckMenuItem* cmi = static_cast<Gtk::CheckMenuItem*>(&chn_items.back());
_controller_menu_map[fully_qualified_param] = cmi;
cmi->set_active (visible);
}
@@ -1491,7 +1490,7 @@ MidiTimeAxisView::playback_channel_mode_changed ()
_playback_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2</i>", _("Play"), _("some")));
break;
case ForceChannel:
- _playback_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2>%3</i>", _("Play"), _("all"), ffs (midi_track()->get_playback_channel_mask())));
+ _playback_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2>%3</i>", _("Play"), _("all"), PBD::ffs (midi_track()->get_playback_channel_mask())));
break;
}
}
@@ -1507,7 +1506,7 @@ MidiTimeAxisView::capture_channel_mode_changed ()
_capture_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2</i>", _("Rec"), _("some")));
break;
case ForceChannel:
- _capture_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2>%3</i>", _("Rec"), _("all"), ffs (midi_track()->get_capture_channel_mask())));
+ _capture_channel_status.set_markup (string_compose ("<b>%1</b>: <i>%2>%3</i>", _("Rec"), _("all"), PBD::ffs (midi_track()->get_capture_channel_mask())));
break;
}
}
diff --git a/gtk2_ardour/midi_tracer.cc b/gtk2_ardour/midi_tracer.cc
index 74c9b1643e..e0deb6dce8 100644
--- a/gtk2_ardour/midi_tracer.cc
+++ b/gtk2_ardour/midi_tracer.cc
@@ -23,6 +23,9 @@
#include <sys/time.h>
#include <time.h>
+#include "pbd/localtime_r.h"
+#include "pbd/timersub.h"
+
#include "midi++/parser.h"
#include "midi++/manager.h"
diff --git a/gtk2_ardour/missing_file_dialog.cc b/gtk2_ardour/missing_file_dialog.cc
index c7cb7f5edc..b1e2081a1d 100644
--- a/gtk2_ardour/missing_file_dialog.cc
+++ b/gtk2_ardour/missing_file_dialog.cc
@@ -19,12 +19,17 @@
#include "pbd/compose.h"
#include "pbd/replace_all.h"
#include "pbd/strsplit.h"
+#include "pbd/search_path.h"
#include "ardour/session.h"
#include "missing_file_dialog.h"
#include "i18n.h"
+#ifdef SearchPath
+#undef SearchPath
+#endif
+
using namespace Gtk;
using namespace std;
using namespace ARDOUR;
@@ -56,14 +61,18 @@ MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataT
break;
}
- string dirstr;
+ vector<string> source_dirs = s->source_search_path (type);
+ vector<string>::iterator i = source_dirs.begin();
+ ostringstream oss;
+ oss << *i << endl;
- dirstr = s->source_search_path (type);
- replace_all (dirstr, ":", "\n");
+ while (++i != source_dirs.end()) {
+ oss << *i << endl;
+ }
msg.set_justify (JUSTIFY_CENTER);
msg.set_markup (string_compose (_("%1 cannot find the %2 file\n\n<i>%3</i>\n\nin any of these folders:\n\n\
-<tt>%4</tt>\n\n"), PROGRAM_NAME, typestr, Glib::Markup::escape_text(path), Glib::Markup::escape_text (dirstr)));
+<tt>%4</tt>\n\n"), PROGRAM_NAME, typestr, Glib::Markup::escape_text(path), Glib::Markup::escape_text (oss.str())));
HBox* hbox = manage (new HBox);
hbox->pack_start (msg, false, true);
diff --git a/gtk2_ardour/mixer_actor.cc b/gtk2_ardour/mixer_actor.cc
index d7a1149a4b..8a90a3a1dd 100644
--- a/gtk2_ardour/mixer_actor.cc
+++ b/gtk2_ardour/mixer_actor.cc
@@ -35,6 +35,10 @@
#include "i18n.h"
+#ifdef SearchPath
+#undef SearchPath
+#endif
+
using namespace ARDOUR;
using namespace Gtk;
using namespace PBD;
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index d77023d201..9e2140fd10 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -1473,7 +1473,7 @@ MixerStrip::build_route_ops_menu ()
items.push_back (SeparatorElem());
items.push_back (CheckMenuElem (_("Active")));
- CheckMenuItem* i = dynamic_cast<CheckMenuItem *> (&items.back());
+ Gtk::CheckMenuItem* i = dynamic_cast<Gtk::CheckMenuItem *> (&items.back());
i->set_active (_route->active());
i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::set_route_active), !_route->active(), false));
@@ -1483,7 +1483,7 @@ MixerStrip::build_route_ops_menu ()
items.push_back (SeparatorElem());
items.push_back (CheckMenuElem (_("Protect Against Denormals"), sigc::mem_fun (*this, &RouteUI::toggle_denormal_protection)));
- denormal_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
+ denormal_menu_item = dynamic_cast<Gtk::CheckMenuItem *> (&items.back());
denormal_menu_item->set_active (_route->denormal_protection());
if (!Profile->get_sae()) {
diff --git a/gtk2_ardour/panner2d.cc b/gtk2_ardour/panner2d.cc
index 64d83ab162..395cd2f5dd 100644
--- a/gtk2_ardour/panner2d.cc
+++ b/gtk2_ardour/panner2d.cc
@@ -390,7 +390,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
{
CartesianVector c;
cairo_t* cr;
- bool small = (height <= large_size_threshold);
+ bool small_size = (height <= large_size_threshold);
const double diameter = radius*2.0;
cr = gdk_cairo_create (get_window()->gobj());
@@ -473,7 +473,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
cairo_select_font_face (cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
- if (small) {
+ if (small_size) {
arc_radius = 4.0;
} else {
cairo_set_font_size (cr, 10);
@@ -498,10 +498,10 @@ Panner2d::on_expose_event (GdkEventExpose *event)
cairo_set_source_rgba (cr, 0.517, 0.772, 0.882, 1.0);
cairo_stroke (cr);
- if (!small && !signal->text.empty()) {
+ if (!small_size && !signal->text.empty()) {
cairo_set_source_rgb (cr, 0.517, 0.772, 0.882);
/* the +/- adjustments are a hack to try to center the text in the circle */
- if (small) {
+ if (small_size) {
cairo_move_to (cr, c.x - 1, c.y + 1);
} else {
cairo_move_to (cr, c.x - 4, c.y + 4);
@@ -535,7 +535,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
cairo_move_to (cr, c.x, c.y);
cairo_save (cr);
cairo_rotate (cr, -(speaker->position.azi/360.0) * (2.0 * M_PI));
- if (small) {
+ if (small_size) {
cairo_scale (cr, 0.8, 0.8);
} else {
cairo_scale (cr, 1.2, 1.2);
@@ -553,7 +553,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
cairo_fill (cr);
cairo_restore (cr);
- if (!small) {
+ if (!small_size) {
cairo_set_font_size (cr, 16);
/* move the text in just a bit */
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc
index 181664bb4e..a5ed0c7aee 100644
--- a/gtk2_ardour/panner_ui.cc
+++ b/gtk2_ardour/panner_ui.cc
@@ -382,7 +382,7 @@ PannerUI::build_pan_menu ()
items.clear ();
items.push_back (CheckMenuElem (_("Bypass"), sigc::mem_fun(*this, &PannerUI::pan_bypass_toggle)));
- bypass_menu_item = static_cast<CheckMenuItem*> (&items.back());
+ bypass_menu_item = static_cast<Gtk::CheckMenuItem*> (&items.back());
/* set state first, connect second */
diff --git a/gtk2_ardour/patch_change_dialog.cc b/gtk2_ardour/patch_change_dialog.cc
index 2ecfd4bdd7..081604344c 100644
--- a/gtk2_ardour/patch_change_dialog.cc
+++ b/gtk2_ardour/patch_change_dialog.cc
@@ -117,7 +117,7 @@ PatchChangeDialog::PatchChangeDialog (
add_button (Stock::CANCEL, RESPONSE_CANCEL);
add_button (ok, RESPONSE_ACCEPT);
if (allow_delete) {
- add_button (Stock::DELETE, RESPONSE_REJECT);
+ add_button (Gtk::StockID(GTK_STOCK_DELETE), RESPONSE_REJECT);
}
set_default_response (RESPONSE_ACCEPT);
diff --git a/gtk2_ardour/pingback.cc b/gtk2_ardour/pingback.cc
index dea7f52f01..ccec81cba7 100644
--- a/gtk2_ardour/pingback.cc
+++ b/gtk2_ardour/pingback.cc
@@ -23,7 +23,10 @@
#include <fstream>
#include <cstring>
+#ifndef WIN32
#include <sys/utsname.h>
+#endif
+
#include <curl/curl.h>
#include <glibmm/miscutils.h>
@@ -70,6 +73,7 @@ struct ping_call {
static void*
_pingback (void *arg)
{
+#ifndef WIN32
ping_call* cm = static_cast<ping_call*> (arg);
CURL* c;
struct utsname utb;
@@ -158,6 +162,8 @@ _pingback (void *arg)
curl_easy_cleanup (c);
delete cm;
+#endif /* WIN32 */
+
return 0;
}
diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc
index 81adf40896..2a031318ff 100644
--- a/gtk2_ardour/plugin_selector.cc
+++ b/gtk2_ardour/plugin_selector.cc
@@ -21,7 +21,6 @@
#endif
#include <cstdio>
-#include <lrdf.h>
#include <map>
#include <algorithm>
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index d9741f5e39..c19738f02f 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -59,8 +59,6 @@
#include "lv2_plugin_ui.h"
#endif
-#include <lrdf.h>
-
#include "ardour_window.h"
#include "ardour_ui.h"
#include "prompter.h"
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 0df5d2214d..5c21d7ff25 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -514,7 +514,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
items.push_back (MenuElem (_("Rescan"), sigc::mem_fun (*this, &PortMatrix::setup_all_ports)));
items.push_back (CheckMenuElem (_("Show individual ports"), sigc::mem_fun (*this, &PortMatrix::toggle_show_only_bundles)));
- CheckMenuItem* i = dynamic_cast<CheckMenuItem*> (&items.back());
+ Gtk::CheckMenuItem* i = dynamic_cast<Gtk::CheckMenuItem*> (&items.back());
_inhibit_toggle_show_only_bundles = true;
i->set_active (!_show_only_bundles);
_inhibit_toggle_show_only_bundles = false;
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 1c5c47c41e..77f0e2da01 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -382,7 +382,7 @@ ProcessorEntry::build_controls_menu ()
for (list<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
items.push_back (CheckMenuElem ((*i)->name ()));
- CheckMenuItem* c = dynamic_cast<CheckMenuItem*> (&items.back ());
+ Gtk::CheckMenuItem* c = dynamic_cast<Gtk::CheckMenuItem*> (&items.back ());
c->set_active ((*i)->visible ());
c->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &ProcessorEntry::toggle_control_visibility), *i));
}
diff --git a/gtk2_ardour/region_gain_line.h b/gtk2_ardour/region_gain_line.h
index c0b843acd0..61b361210b 100644
--- a/gtk2_ardour/region_gain_line.h
+++ b/gtk2_ardour/region_gain_line.h
@@ -22,6 +22,10 @@
#include "ardour/ardour.h"
+#ifdef interface
+#undef interface
+#endif
+
#include <libgnomecanvasmm.h>
#include "automation_line.h"
diff --git a/gtk2_ardour/region_view.h b/gtk2_ardour/region_view.h
index 1eda8fd360..3016117353 100644
--- a/gtk2_ardour/region_view.h
+++ b/gtk2_ardour/region_view.h
@@ -19,6 +19,10 @@
#ifndef __gtk_ardour_region_view_h__
#define __gtk_ardour_region_view_h__
+#ifdef interface
+#undef interface
+#endif
+
#include <vector>
#include <libgnomecanvasmm.h>
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index b0fec293cf..a113fe9db8 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -694,7 +694,7 @@ RouteTimeAxisView::build_display_menu ()
}
items.push_back (CheckMenuElem (_("Active")));
- CheckMenuItem* i = dynamic_cast<CheckMenuItem *> (&items.back());
+ Gtk::CheckMenuItem* i = dynamic_cast<Gtk::CheckMenuItem *> (&items.back());
bool click_sets_active = true;
if (active > 0 && inactive == 0) {
i->set_active (true);
@@ -2038,12 +2038,12 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> p
for (std::set<Evoral::Parameter>::const_iterator i = automatable.begin(); i != automatable.end(); ++i) {
ProcessorAutomationNode* pan;
- CheckMenuItem* mitem;
+ Gtk::CheckMenuItem* mitem;
string name = processor->describe_parameter (*i);
items.push_back (CheckMenuElem (name));
- mitem = dynamic_cast<CheckMenuItem*> (&items.back());
+ mitem = dynamic_cast<Gtk::CheckMenuItem*> (&items.back());
_subplugin_menu_map[*i] = mitem;
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index c1dde89c39..9494d42353 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -784,7 +784,7 @@ RouteUI::build_record_menu ()
MenuList& items = record_menu->items();
items.push_back (CheckMenuElem (_("Step Entry"), sigc::mem_fun (*this, &RouteUI::toggle_step_edit)));
- step_edit_item = dynamic_cast<CheckMenuItem*> (&items.back());
+ step_edit_item = dynamic_cast<Gtk::CheckMenuItem*> (&items.back());
if (_route->record_enabled()) {
step_edit_item->set_sensitive (false);
@@ -1206,20 +1206,20 @@ RouteUI::build_solo_menu (void)
solo_menu = new Menu;
solo_menu->set_name ("ArdourContextMenu");
MenuList& items = solo_menu->items();
- CheckMenuItem* check;
+ Gtk::CheckMenuItem* check;
- check = new CheckMenuItem(_("Solo Isolate"));
+ check = new Gtk::CheckMenuItem(_("Solo Isolate"));
check->set_active (_route->solo_isolated());
check->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_solo_isolated), check));
items.push_back (CheckMenuElem(*check));
- solo_isolated_check = dynamic_cast<CheckMenuItem*>(&items.back());
+ solo_isolated_check = dynamic_cast<Gtk::CheckMenuItem*>(&items.back());
check->show_all();
- check = new CheckMenuItem(_("Solo Safe"));
+ check = new Gtk::CheckMenuItem(_("Solo Safe"));
check->set_active (_route->solo_safe());
check->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_solo_safe), check));
items.push_back (CheckMenuElem(*check));
- solo_safe_check = dynamic_cast<CheckMenuItem*>(&items.back());
+ solo_safe_check = dynamic_cast<Gtk::CheckMenuItem*>(&items.back());
check->show_all();
//items.push_back (SeparatorElem());
@@ -1237,25 +1237,25 @@ RouteUI::build_mute_menu(void)
MenuList& items = mute_menu->items();
- pre_fader_mute_check = manage (new CheckMenuItem(_("Pre Fader")));
+ pre_fader_mute_check = manage (new Gtk::CheckMenuItem(_("Pre Fader")));
init_mute_menu(MuteMaster::PreFader, pre_fader_mute_check);
pre_fader_mute_check->signal_toggled().connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_mute_menu), MuteMaster::PreFader, pre_fader_mute_check));
items.push_back (CheckMenuElem(*pre_fader_mute_check));
pre_fader_mute_check->show_all();
- post_fader_mute_check = manage (new CheckMenuItem(_("Post Fader")));
+ post_fader_mute_check = manage (new Gtk::CheckMenuItem(_("Post Fader")));
init_mute_menu(MuteMaster::PostFader, post_fader_mute_check);
post_fader_mute_check->signal_toggled().connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_mute_menu), MuteMaster::PostFader, post_fader_mute_check));
items.push_back (CheckMenuElem(*post_fader_mute_check));
post_fader_mute_check->show_all();
- listen_mute_check = manage (new CheckMenuItem(_("Control Outs")));
+ listen_mute_check = manage (new Gtk::CheckMenuItem(_("Control Outs")));
init_mute_menu(MuteMaster::Listen, listen_mute_check);
listen_mute_check->signal_toggled().connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_mute_menu), MuteMaster::Listen, listen_mute_check));
items.push_back (CheckMenuElem(*listen_mute_check));
listen_mute_check->show_all();
- main_mute_check = manage (new CheckMenuItem(_("Main Outs")));
+ main_mute_check = manage (new Gtk::CheckMenuItem(_("Main Outs")));
init_mute_menu(MuteMaster::Main, main_mute_check);
main_mute_check->signal_toggled().connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_mute_menu), MuteMaster::Main, main_mute_check));
items.push_back (CheckMenuElem(*main_mute_check));
@@ -1268,7 +1268,7 @@ RouteUI::build_mute_menu(void)
}
void
-RouteUI::init_mute_menu(MuteMaster::MutePoint mp, CheckMenuItem* check)
+RouteUI::init_mute_menu(MuteMaster::MutePoint mp, Gtk::CheckMenuItem* check)
{
check->set_active (_route->mute_points() & mp);
}
@@ -1958,7 +1958,7 @@ RouteUI::invert_press (GdkEventButton* ev)
for (uint32_t i = 0; i < N; ++i) {
items.push_back (CheckMenuElem (string_compose (X_("Ø%1"), i + 1), sigc::bind (sigc::mem_fun (*this, &RouteUI::invert_menu_toggled), i)));
- CheckMenuItem* e = dynamic_cast<CheckMenuItem*> (&items.back ());
+ Gtk::CheckMenuItem* e = dynamic_cast<Gtk::CheckMenuItem*> (&items.back ());
++_i_am_the_modifier;
e->set_active (_route->phase_invert (i));
--_i_am_the_modifier;
diff --git a/gtk2_ardour/session_metadata_dialog.h b/gtk2_ardour/session_metadata_dialog.h
index 9aa62ed4ca..1599e50bb3 100644
--- a/gtk2_ardour/session_metadata_dialog.h
+++ b/gtk2_ardour/session_metadata_dialog.h
@@ -22,6 +22,10 @@
#include "ardour_dialog.h"
+#ifdef interface
+#undef interface
+#endif
+
#include <gtkmm.h>
#include <boost/shared_ptr.hpp>
@@ -82,7 +86,7 @@ class TextMetadataField : public MetadataField {
Gtk::Label* value_label;
Gtk::Entry* entry;
- uint width;
+ guint width;
};
/// MetadataField that accepts only numbers
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 986ed7f985..bf2b90355f 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -31,6 +31,8 @@
#include <gtkmm/box.h>
#include <gtkmm/stock.h>
+
+#include <glib/gstdio.h>
#include <glibmm/fileutils.h>
#include "pbd/convert.h"
@@ -1464,6 +1466,9 @@ SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool&
bool
SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths)
{
+#ifdef WIN32
+ return false;
+#else
std::string tmpdir(Glib::build_filename (s->session_directory().sound_path(), "linktest"));
bool ret = false;
@@ -1485,7 +1490,7 @@ SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths
goto out;
}
- unlink (tmpc);
+ ::g_unlink (tmpc);
}
ret = true;
@@ -1493,6 +1498,7 @@ SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths
out:
rmdir (tmpdir.c_str());
return ret;
+#endif
}
SoundFileChooser::SoundFileChooser (string title, ARDOUR::Session* s)
diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc
index fd53fd55ff..27ec3b4059 100644
--- a/gtk2_ardour/step_entry.cc
+++ b/gtk2_ardour/step_entry.cc
@@ -36,6 +36,10 @@
#include "i18n.h"
+#ifdef SearchPath
+#undef SearchPath
+#endif
+
using namespace std;
using namespace Gtk;
using namespace Glib;
diff --git a/gtk2_ardour/transcode_ffmpeg.cc b/gtk2_ardour/transcode_ffmpeg.cc
index b35f843d15..aedd7d25eb 100644
--- a/gtk2_ardour/transcode_ffmpeg.cc
+++ b/gtk2_ardour/transcode_ffmpeg.cc
@@ -32,6 +32,10 @@
#include "i18n.h"
+#ifdef SearchPath
+#undef SearchPath
+#endif
+
using namespace PBD;
TranscodeFfmpeg::TranscodeFfmpeg (std::string f)
@@ -123,7 +127,7 @@ TranscodeFfmpeg::probe ()
* SystemExec::Terminated is emitted and ffcmd set to NULL */
int timeout = 300; // 1.5 sec
while (ffcmd && --timeout > 0) {
- usleep(5000);
+ Glib::usleep(5000);
}
if (timeout == 0 || ffoutput.empty()) {
return false;
@@ -504,7 +508,11 @@ TranscodeFfmpeg::cancel ()
{
if (!ffcmd || !ffcmd->is_running()) { return;}
ffcmd->write_to_stdin("q");
+#ifdef WIN32
+ Sleep(1000);
+#else
sleep (1);
+#endif
if (ffcmd) {
ffcmd->terminate();
}
diff --git a/gtk2_ardour/transcode_video_dialog.cc b/gtk2_ardour/transcode_video_dialog.cc
index ee0d755b17..2a4e05f076 100644
--- a/gtk2_ardour/transcode_video_dialog.cc
+++ b/gtk2_ardour/transcode_video_dialog.cc
@@ -30,6 +30,8 @@
#include <sigc++/bind.h>
#include <libgen.h>
+#include <glib/gstdio.h>
+
#include "pbd/error.h"
#include "pbd/convert.h"
#include "gtkmm2ext/utils.h"
@@ -301,9 +303,9 @@ void
TranscodeVideoDialog::finished ()
{
if (aborted) {
- unlink(path_entry.get_text().c_str());
+ ::g_unlink(path_entry.get_text().c_str());
if (!audiofile.empty()) {
- unlink(audiofile.c_str());
+ ::g_unlink(audiofile.c_str());
}
Gtk::Dialog::response(RESPONSE_CANCEL);
} else {
diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc
index 86f03bbd95..573e509ab9 100644
--- a/gtk2_ardour/ui_config.cc
+++ b/gtk2_ardour/ui_config.cc
@@ -278,7 +278,7 @@ UIConfiguration::color_by_name (const std::string& name)
}
// cerr << string_compose (_("Color %1 not found"), name) << endl;
- return RGBA_TO_UINT (random()%256,random()%256,random()%256,0xff);
+ return RGBA_TO_UINT (g_random_int()%256,g_random_int()%256,g_random_int()%256,0xff);
}
void
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc
index 97368a7863..557c86c3f6 100644
--- a/gtk2_ardour/utils.cc
+++ b/gtk2_ardour/utils.cc
@@ -754,7 +754,9 @@ set_pango_fontsize ()
/* FT2 rendering - used by GnomeCanvas, sigh */
+#ifndef WIN32
pango_ft2_font_map_set_resolution ((PangoFT2FontMap*) pango_ft2_font_map_new(), val/1024, val/1024);
+#endif
/* Cairo rendering, in case there is any */
@@ -828,9 +830,9 @@ unique_random_color (list<Gdk::Color>& used_colors)
const int32_t max_saturation = 48000; // 65535 would open up the whole color wheel
- newcolor.set_red (random() % max_saturation);
- newcolor.set_blue (random() % max_saturation);
- newcolor.set_green (random() % max_saturation);
+ newcolor.set_red (g_random_int() % max_saturation);
+ newcolor.set_blue (g_random_int() % max_saturation);
+ newcolor.set_green (g_random_int() % max_saturation);
if (used_colors.size() == 0) {
used_colors.push_back (newcolor);
diff --git a/gtk2_ardour/utils_videotl.cc b/gtk2_ardour/utils_videotl.cc
index 504fc3d2eb..1496893e82 100644
--- a/gtk2_ardour/utils_videotl.cc
+++ b/gtk2_ardour/utils_videotl.cc
@@ -253,6 +253,7 @@ video_query_info (
, filepath.c_str());
char *res = curl_http_get(url, NULL);
int pid=0;
+#ifndef COMPILER_MINGW
if (res) {
char *pch, *pst;
int version;
@@ -285,6 +286,7 @@ video_query_info (
}
free(res);
}
+#endif
if (pid!=5) {
return false;
}
diff --git a/gtk2_ardour/video_image_frame.cc b/gtk2_ardour/video_image_frame.cc
index 3c39dea77b..310f3a68d3 100644
--- a/gtk2_ardour/video_image_frame.cc
+++ b/gtk2_ardour/video_image_frame.cc
@@ -197,7 +197,7 @@ http_get_thread (void *arg) {
char *res = NULL;
do {
res=curl_http_get(url, &status);
- if (status == 503) usleep(5000); // try-again
+ if (status == 503) Glib::usleep(5000); // try-again
} while (status == 503 && --timeout > 0);
if (status != 200 || !res) {
@@ -246,7 +246,7 @@ VideoImageFrame::http_download_done (char *data){
exposeimg();
/* don't request frames too quickly, wait after user has zoomed */
- usleep(40000);
+ Glib::usleep(40000);
if (queued_request) {
http_get_again(want_video_frame_number);
diff --git a/gtk2_ardour/video_monitor.cc b/gtk2_ardour/video_monitor.cc
index 2c265365fa..ae4d5faacc 100644
--- a/gtk2_ardour/video_monitor.cc
+++ b/gtk2_ardour/video_monitor.cc
@@ -94,7 +94,7 @@ VideoMonitor::query_full_state (bool wait)
process->write_to_stdin("get osdcfg\n");
int timeout = 40;
if (wait && knownstate !=127 && --timeout) {
- usleep(50000);
+ Glib::usleep(50000);
sched_yield();
}
}
@@ -113,7 +113,7 @@ VideoMonitor::quit ()
*/
int timeout = 40;
while (is_started() && --timeout) {
- usleep(50000);
+ Glib::usleep(50000);
sched_yield();
}
if (timeout <= 0) {
diff --git a/gtk2_ardour/video_server_dialog.cc b/gtk2_ardour/video_server_dialog.cc
index d7a018a045..ce0633b6c3 100644
--- a/gtk2_ardour/video_server_dialog.cc
+++ b/gtk2_ardour/video_server_dialog.cc
@@ -29,10 +29,18 @@
#include "ardour/template_utils.h"
#include "ardour/session.h"
+#ifdef interface
+#undef interface
+#endif
+
#include "video_server_dialog.h"
#include "utils_videotl.h"
#include "i18n.h"
+#ifdef SearchPath
+#undef SearchPath
+#endif
+
using namespace Gtk;
using namespace std;
using namespace PBD;
diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript
index bb4e2035ec..429b8c2dbd 100644
--- a/gtk2_ardour/wscript
+++ b/gtk2_ardour/wscript
@@ -266,8 +266,9 @@ def configure(conf):
'gtk2_ardour', conf.env['MAJOR'], conf.env['MINOR'], 0)
autowaf.configure(conf)
- if re.search ("linux", sys.platform) != None:
- autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
+ if Options.options.dist_target == 'auto':
+ if re.search ("linux", sys.platform) != None:
+ autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
# TODO: Insert a sanity check for on OS X to ensure CoreAudio is present
@@ -418,6 +419,9 @@ def build(bld):
'libardour_cp',
'libgtkmm2ext',
'libtaglib' ]
+ if bld.env['build_target'] == 'mingw':
+ if bld.env['DEBUG'] == False:
+ obj.linkflags = ['-mwindows']
if sys.platform == 'darwin':
obj.use += ' libappleutility'
obj.defines = [