mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-30 18:37:40 +01:00
Merge branch 'master' into saveas
Conflicts: gtk2_ardour/ardour.menus.in libs/ardour/session_state.cc
This commit is contained in:
commit
ced4378d09
602 changed files with 94298 additions and 65112 deletions
18
.gitignore
vendored
18
.gitignore
vendored
|
|
@ -60,33 +60,15 @@ tags
|
|||
/gtk2_ardour/ardev_common.sh
|
||||
/gtk2_ardour/*.bindings
|
||||
/gtk2_ardour/*.rc
|
||||
/gtk2_ardour/version.cc
|
||||
/gtk2_ardour/version.h
|
||||
|
||||
# /libs/ardour/
|
||||
/libs/ardour/version.cc
|
||||
/libs/ardour/ardour/version.h
|
||||
/libs/ardour/revision.cc
|
||||
/libs/ardour/config_text.cc
|
||||
|
||||
# /libs/canvas
|
||||
/libs/canvas/version.cc
|
||||
/libs/canvas/canvas/version.h
|
||||
|
||||
# /libs/gtkmm2ext/
|
||||
/libs/gtkmm2ext/*.pot
|
||||
/libs/gtkmm2ext/*.mo
|
||||
/libs/gtkmm2ext/*.po
|
||||
/libs/gtkmm2ext/version.cc
|
||||
/libs/gtkmm2ext/gtkmm2ext/version.h
|
||||
|
||||
# /libs/midi++2/
|
||||
/libs/midi++2/version.cc
|
||||
/libs/midi++2/midi++/version.h
|
||||
|
||||
# /libs/pbd/
|
||||
/libs/pbd/version.cc
|
||||
/libs/pbd/pbd/version.h
|
||||
|
||||
/libs/taglib/taglib/flacproperties.h
|
||||
/libs/taglib/taglib/apefooter.h
|
||||
|
|
|
|||
|
|
@ -128,4 +128,8 @@
|
|||
Name="TargetSxSFolder"
|
||||
Value="@TargetSxSFolder@"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="LibardourFolder"
|
||||
Value="mixbus3"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\MSVCMixbus3.vsprops"
|
||||
InheritedPropertySheets="..\MSVCMixbus3\MSVCMixbus3.vsprops"
|
||||
UseOfMFC="0"
|
||||
>
|
||||
<Tool
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
AdditionalOptions="/FI$(TargetSxsFolder)\targetsxs.h"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""F:\+GTK-SOURCES\jackdmp\src\common\jack";"F:\+GTK-SOURCES\jackdmp\src\windows";..\libs;..\libs\pbd\msvc;..\libs\surfaces\control_protocol;..\libs\ardour;..\libs\canvas;..\libs\gtkmm2ext;..\libs\pbd;"..\libs\midi++2";..\libs\evoral;..\libs\libltc;..\libs\timecode;"..\libs\vamp-sdk";..\libs\audiographer;..\libs\rubberband;..\libs\fst;"$(GenericIncludeFolder)\ardourext";"$(GenericIncludeFolder)\freetype2";"$(GenericIncludeFolder)\gtk-2.0";"$(GenericIncludeFolder)\gtk-2.0\gdk";"$(GenericIncludeFolder)\atk-2.0";"$(GenericIncludeFolder)\cairo";"$(GenericIncludeFolder)\pango-1.0";"$(GenericIncludeFolder)\libart-2.0";"$(GenericIncludeFolder)\libsndfile";"$(GenericIncludeFolder)\lrdf";"$(GenericIncludeFolder)\raptor";"$(GenericLibraryFolder)\glib-2.0\include";"$(GenericIncludeFolder)\lilv-0";"$(GenericIncludeFolder)\suil-0""
|
||||
PreprocessorDefinitions="VERSIONSTRING="\"3.1.1\"";PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;LIBCANVAS_STATIC;CANVAS_DEBUG;RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_H;WIN32;_WIN32;_WINDOWS;_MBCS;_DEBUG;DEBUG="Debug";ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;CLEARLOOKS_CONF_LOCATION="\"\\etc\\engines\\libclearlooks.la\"";FONTS_CONF_LOCATION="\"\\etc\\fontconfig\\fonts.conf\"";PANGO_CONF_LOCATION="\"\\etc\\pango\\pango.modules\"";PIXBUFLOADERS_CONF_LOCATION="\"\\etc\\gtk-2.0\\gdk-pixbuf.loaders\"";PROGRAM_NAME="\"Mixbus3\"";PACKAGE="\"gtk2_ardour\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
PreprocessorDefinitions="VERSIONSTRING="\"3.1.1\"";PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;LIBCANVAS_STATIC;CANVAS_DEBUG;RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_H;WIN32;_WIN32;_WINDOWS;_MBCS;_DEBUG;DEBUG="Debug";ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;CLEARLOOKS_CONF_LOCATION="\"\\etc\\engines\\libclearlooks.la\"";FONTS_CONF_LOCATION="\"\\etc\\fontconfig\\fonts.conf\"";PANGO_CONF_LOCATION="\"\\etc\\pango\\pango.modules\"";PIXBUFLOADERS_CONF_LOCATION="\"\\etc\\gtk-2.0\\gdk-pixbuf.loaders\"";PROGRAM_NAME="\"Mixbus\"";PROGRAM_VERSION="\"3\"";PACKAGE="\"gtk2_ardour\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
MinimalRebuild="true"
|
||||
RuntimeLibrary="3"
|
||||
StructMemberAlignment="0"
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libfftw3-3.lib libfftw3f-3.lib libfftw3l-3.lib libeay32.lib iconvD.lib zlib1D.lib boost-regex32D.lib $(DllPrefix)atkmm32$(AtkmmDllSuffix)D.lib $(DllPrefix)gtkmm32$(GtkmmDllSuffix)D.lib $(DllPrefix)gdkmm32$(GtkmmDllSuffix)D.lib $(DllPrefix)glibmm32$(GlibmmDllSuffix)D.lib $(DllPrefix)giomm32$(GlibmmDllSuffix)D.lib $(DllPrefix)cairomm32$(CairommDllSuffix)D.lib $(DllPrefix)pangomm32$(PangommDllSuffix)D.lib pthreadVCE2.lib $(DllPrefix)pango32$(PangoDllSuffix)D.lib $(DllPrefix)pangoft232$(PangoDllSuffix)D.lib $(DllPrefix)pangowin32$(PangoDllSuffix)D.lib $(DllPrefix)pangocairo32$(PangoDllSuffix)D.lib $(DllPrefix)cairo32$(CairoDllSuffix)D.lib $(DllPrefix)atk32$(AtkDllSuffix)D.lib $(DllPrefix)gthread32$(GlibDllSuffix)D.lib $(DllPrefix)gobject32$(GlibDllSuffix)D.lib $(DllPrefix)gmodule32$(GlibDllSuffix)D.lib $(DllPrefix)glib32$(GlibDllSuffix)D.lib $(DllPrefix)gio32$(GlibDllSuffix)D.lib $(DllPrefix)gtk32$(GtkDllSuffix)D.lib $(DllPrefix)gdk32$(GtkDllSuffix)D.lib $(DllPrefix)gdk-pixbuf32$(GdkPixbufDllSuffix)D.lib $(DllPrefix)sigc++32-2.0D.lib $(DllPrefix)curlD.lib $(DllPrefix)fontconfigD.lib freetype32-2D.lib raptor2D.lib lrdfD.lib libloD.lib $(DllPrefix)ardour32D.lib $(DllPrefix)ardour_cp32D.lib $(DllPrefix)audiographer32D.lib $(DllPrefix)pbd32D.lib $(DllPrefix)midi++32D.lib $(DllPrefix)evoral32D.lib $(DllPrefix)gtkmm2ext32D.lib $(DllPrefix)ltcD.lib $(DllPrefix)timecode32D.lib cairocanvasD.lib rubberbandD.lib $(DllPrefix)sndfile-1D.lib $(DllPrefix)samplerate-0D.lib vampsdkD.lib vamphostsdkD.lib panner_1in2out32D.lib panner_2in2out32D.lib panner_vbap32D.lib $(DllPrefix)lilv32-0D.lib suil-0D.lib $(DllPrefix)serd32-0D.lib $(DllPrefix)sord32-0D.lib $(DllPrefix)sratom32-0D.lib libart_lgpl_2D.lib libjackD.lib libxml2D.lib intlD.lib shell32.lib psapi.lib ws2_32.lib winmm.lib"
|
||||
AdditionalDependencies="libfftw3-3.lib libfftw3f-3.lib libfftw3l-3.lib libeay32.lib iconvD.lib zlib1D.lib boost-regex32D.lib $(DllPrefix)atkmm32$(AtkmmDllSuffix)D.lib $(DllPrefix)gtkmm32$(GtkmmDllSuffix)D.lib $(DllPrefix)gdkmm32$(GtkmmDllSuffix)D.lib $(DllPrefix)glibmm32$(GlibmmDllSuffix)D.lib $(DllPrefix)giomm32$(GlibmmDllSuffix)D.lib $(DllPrefix)cairomm32$(CairommDllSuffix)D.lib $(DllPrefix)pangomm32$(PangommDllSuffix)D.lib pthreadVCE2.lib $(DllPrefix)pango32$(PangoDllSuffix)D.lib $(DllPrefix)pangoft232$(PangoDllSuffix)D.lib $(DllPrefix)pangowin32$(PangoDllSuffix)D.lib $(DllPrefix)pangocairo32$(PangoDllSuffix)D.lib $(DllPrefix)cairo32$(CairoDllSuffix)D.lib $(DllPrefix)atk32$(AtkDllSuffix)D.lib $(DllPrefix)gthread32$(GlibDllSuffix)D.lib $(DllPrefix)gobject32$(GlibDllSuffix)D.lib $(DllPrefix)gmodule32$(GlibDllSuffix)D.lib $(DllPrefix)glib32$(GlibDllSuffix)D.lib $(DllPrefix)gio32$(GlibDllSuffix)D.lib $(DllPrefix)gtk32$(GtkDllSuffix)D.lib $(DllPrefix)gdk32$(GtkDllSuffix)D.lib $(DllPrefix)gdk-pixbuf32$(GdkPixbufDllSuffix)D.lib $(DllPrefix)sigc++32-2.0D.lib $(DllPrefix)curlD.lib $(DllPrefix)fontconfigD.lib freetype32-2D.lib raptor2D.lib lrdfD.lib libloD.lib $(DllPrefix)ardour32D.lib $(DllPrefix)ardour_cp32D.lib $(DllPrefix)audiographer32D.lib $(DllPrefix)pbd32D.lib $(DllPrefix)midi++32D.lib $(DllPrefix)evoral32D.lib $(DllPrefix)gtkmm2ext32D.lib $(DllPrefix)ltcD.lib $(DllPrefix)timecode32D.lib cairocanvasD.lib rubberbandD.lib $(DllPrefix)sndfile-1D.lib $(DllPrefix)samplerate-0D.lib vampsdkD.lib vamphostsdkD.lib panner_1in2out32D.lib panner_2in2out32D.lib panner_vbap32D.lib $(DllPrefix)lilv32-0D.lib $(DllPrefix)suil32-0D.lib $(DllPrefix)serd32-0D.lib $(DllPrefix)sord32-0D.lib $(DllPrefix)sratom32-0D.lib libart_lgpl_2D.lib libjackD.lib libxml2D.lib intlD.lib shell32.lib psapi.lib ws2_32.lib winmm.lib"
|
||||
OutputFile="$(Debug32TestSuiteFolder)\$(ProjectName)D.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="F:\pthread-win32\Pre-built.2\lib"
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="cd ..\gtk2_ardour
copy /Y "pixmaps\*.xpm" "$(Debug32TestSuiteFolder)\..\share\ardour3\pixmaps"
copy /Y "icons\*.png" "$(Debug32TestSuiteFolder)\..\share\ardour3\icons"
copy /Y "icons\cursor_square\*.png" "$(Debug32TestSuiteFolder)\..\share\ardour3\icons"
copy /Y "icons\cursor_square\hotspots" "$(Debug32TestSuiteFolder)\..\share\ardour3\icons"
copy /Y "default_ui_config" "$(Debug32TestSuiteFolder)\..\share\ardour3"
"
|
||||
CommandLine="cd ..\gtk2_ardour
copy /Y "pixmaps\*.xpm" "$(Debug32TestSuiteFolder)\..\share\$(LibardourFolder)\pixmaps"
copy /Y "icons\*.png" "$(Debug32TestSuiteFolder)\..\share\$(LibardourFolder)\icons"
copy /Y "icons\cursor_square\*.png" "$(Debug32TestSuiteFolder)\..\share\$(LibardourFolder)\icons"
copy /Y "icons\cursor_square\hotspots" "$(Debug32TestSuiteFolder)\..\share\$(LibardourFolder)\icons"
copy /Y "default_ui_config" "$(Debug32TestSuiteFolder)\..\share\$(LibardourFolder)"
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\MSVCMixbus3.vsprops"
|
||||
InheritedPropertySheets="..\MSVCMixbus3\MSVCMixbus3.vsprops"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=""F:\+GTK-SOURCES\jackdmp\src\common\jack";"F:\+GTK-SOURCES\jackdmp\src\windows";..\libs;..\libs\pbd\msvc;..\libs\surfaces\control_protocol;..\libs\ardour;..\libs\canvas;..\libs\gtkmm2ext;..\libs\pbd;"..\libs\midi++2";..\libs\evoral;..\libs\libltc;..\libs\timecode;"..\libs\vamp-sdk";..\libs\audiographer;..\libs\rubberband;..\libs\fst;"$(GenericIncludeFolder)\ardourext";"$(GenericIncludeFolder)\freetype2";"$(GenericIncludeFolder)\gtk-2.0";"$(GenericIncludeFolder)\gtk-2.0\gdk";"$(GenericIncludeFolder)\atk-2.0";"$(GenericIncludeFolder)\cairo";"$(GenericIncludeFolder)\pango-1.0";"$(GenericIncludeFolder)\libart-2.0";"$(GenericIncludeFolder)\libsndfile";"$(GenericIncludeFolder)\lrdf";"$(GenericIncludeFolder)\raptor";"$(GenericLibraryFolder)\glib-2.0\include";"$(GenericIncludeFolder)\lilv-0";"$(GenericIncludeFolder)\suil-0""
|
||||
PreprocessorDefinitions="VERSIONSTRING="\"3.1.1\"";PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;LIBCANVAS_STATIC;RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_H;WIN32;_WIN32;_WINDOWS;_MBCS;NDEBUG;ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;PROGRAM_NAME="\"Mixbus3\"";PACKAGE="\"gtk2_ardour\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
PreprocessorDefinitions="VERSIONSTRING="\"3.1.1\"";PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;LIBCANVAS_STATIC;RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_H;WIN32;_WIN32;_WINDOWS;_MBCS;NDEBUG;ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;PROGRAM_NAME="\"Mixbus\"";PROGRAM_VERSION="\"3\"";PACKAGE="\"gtk2_ardour\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
StringPooling="false"
|
||||
RuntimeLibrary="2"
|
||||
EnableEnhancedInstructionSet="1"
|
||||
|
|
@ -149,7 +149,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libfftw3-3.lib libfftw3f-3.lib libfftw3l-3.lib libeay32.lib iconv.lib zlib1.lib boost-regex32.lib $(DllPrefix)atkmm32$(AtkmmDllSuffix).lib $(DllPrefix)gtkmm32$(GtkmmDllSuffix).lib $(DllPrefix)gdkmm32$(GtkmmDllSuffix).lib $(DllPrefix)glibmm32$(GlibmmDllSuffix).lib $(DllPrefix)giomm32$(GlibmmDllSuffix).lib $(DllPrefix)cairomm32$(CairommDllSuffix).lib $(DllPrefix)pangomm32$(PangommDllSuffix).lib pthreadVCE2.lib $(DllPrefix)pango32$(PangoDllSuffix).lib $(DllPrefix)pangoft232$(PangoDllSuffix).lib $(DllPrefix)pangowin32$(PangoDllSuffix).lib $(DllPrefix)pangocairo32$(PangoDllSuffix).lib $(DllPrefix)cairo32$(CairoDllSuffix).lib $(DllPrefix)atk32$(AtkDllSuffix).lib $(DllPrefix)gthread32$(GlibDllSuffix).lib $(DllPrefix)gobject32$(GlibDllSuffix).lib $(DllPrefix)gmodule32$(GlibDllSuffix).lib $(DllPrefix)glib32$(GlibDllSuffix).lib $(DllPrefix)gio32$(GlibDllSuffix).lib $(DllPrefix)gtk32$(GtkDllSuffix).lib $(DllPrefix)gdk32$(GtkDllSuffix).lib $(DllPrefix)gdk-pixbuf32$(GdkPixbufDllSuffix).lib $(DllPrefix)sigc++32-2.0.lib $(DllPrefix)curl.lib $(DllPrefix)fontconfig.lib freetype32-2.lib raptor2.lib lrdf.lib liblo.lib $(DllPrefix)ardour32.lib $(DllPrefix)ardour_cp32.lib $(DllPrefix)audiographer32.lib $(DllPrefix)pbd32.lib $(DllPrefix)midi++32.lib $(DllPrefix)evoral32.lib $(DllPrefix)gtkmm2ext32.lib $(DllPrefix)ltc.lib $(DllPrefix)timecode32.lib cairocanvas.lib rubberband.lib $(DllPrefix)sndfile-1.lib $(DllPrefix)samplerate-0.lib vampsdk.lib vamphostsdk.lib panner_1in2out32.lib panner_2in2out32.lib panner_vbap32.lib $(DllPrefix)lilv32-0.lib suil-0.lib $(DllPrefix)serd32-0.lib $(DllPrefix)sord32-0.lib $(DllPrefix)sratom32-0.lib libart_lgpl_2.lib libjack.lib libxml2.lib intl.lib shell32.lib psapi.lib ws2_32.lib winmm.lib"
|
||||
AdditionalDependencies="libfftw3-3.lib libfftw3f-3.lib libfftw3l-3.lib libeay32.lib iconv.lib zlib1.lib boost-regex32.lib $(DllPrefix)atkmm32$(AtkmmDllSuffix).lib $(DllPrefix)gtkmm32$(GtkmmDllSuffix).lib $(DllPrefix)gdkmm32$(GtkmmDllSuffix).lib $(DllPrefix)glibmm32$(GlibmmDllSuffix).lib $(DllPrefix)giomm32$(GlibmmDllSuffix).lib $(DllPrefix)cairomm32$(CairommDllSuffix).lib $(DllPrefix)pangomm32$(PangommDllSuffix).lib pthreadVCE2.lib $(DllPrefix)pango32$(PangoDllSuffix).lib $(DllPrefix)pangoft232$(PangoDllSuffix).lib $(DllPrefix)pangowin32$(PangoDllSuffix).lib $(DllPrefix)pangocairo32$(PangoDllSuffix).lib $(DllPrefix)cairo32$(CairoDllSuffix).lib $(DllPrefix)atk32$(AtkDllSuffix).lib $(DllPrefix)gthread32$(GlibDllSuffix).lib $(DllPrefix)gobject32$(GlibDllSuffix).lib $(DllPrefix)gmodule32$(GlibDllSuffix).lib $(DllPrefix)glib32$(GlibDllSuffix).lib $(DllPrefix)gio32$(GlibDllSuffix).lib $(DllPrefix)gtk32$(GtkDllSuffix).lib $(DllPrefix)gdk32$(GtkDllSuffix).lib $(DllPrefix)gdk-pixbuf32$(GdkPixbufDllSuffix).lib $(DllPrefix)sigc++32-2.0.lib $(DllPrefix)curl.lib $(DllPrefix)fontconfig.lib freetype32-2.lib raptor2.lib lrdf.lib liblo.lib $(DllPrefix)ardour32.lib $(DllPrefix)ardour_cp32.lib $(DllPrefix)audiographer32.lib $(DllPrefix)pbd32.lib $(DllPrefix)midi++32.lib $(DllPrefix)evoral32.lib $(DllPrefix)gtkmm2ext32.lib $(DllPrefix)ltc.lib $(DllPrefix)timecode32.lib cairocanvas.lib rubberband.lib $(DllPrefix)sndfile-1.lib $(DllPrefix)samplerate-0.lib vampsdk.lib vamphostsdk.lib panner_1in2out32.lib panner_2in2out32.lib panner_vbap32.lib $(DllPrefix)lilv32-0.lib $(DllPrefix)suil32-0.lib $(DllPrefix)serd32-0.lib $(DllPrefix)sord32-0.lib $(DllPrefix)sratom32-0.lib libart_lgpl_2.lib libjack.lib libxml2.lib intl.lib shell32.lib psapi.lib ws2_32.lib winmm.lib"
|
||||
OutputFile="$(Release32TestSuiteFolder)\$(ProjectName).exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="F:\pthread-win32\Pre-built.2\lib"
|
||||
|
|
@ -182,7 +182,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy /Y "$(Release32TestSuiteFolder)\$(ProjectName).exe" "$(Release32TargetFolder)\$(ProjectName).exe"
cd ..\gtk2_ardour
copy /Y "pixmaps\*.xpm" "$(Release32TestSuiteFolder)\..\share\ardour3\pixmaps"
copy /Y "icons\*.png" "$(Release32TestSuiteFolder)\..\share\ardour3\icons"
copy /Y "icons\cursor_square\*.png" "$(Release32TestSuiteFolder)\..\share\ardour3\icons"
copy /Y "icons\cursor_square\hotspots" "$(Release32TestSuiteFolder)\..\share\ardour3\icons"
copy /Y "default_ui_config" "$(PackagerFolderLocal)\..\share\ardour3"
copy /Y "default_ui_config" "$(Release32TestSuiteFolder)\..\share\ardour3"
"
|
||||
CommandLine="copy /Y "$(Release32TestSuiteFolder)\$(ProjectName).exe" "$(Release32TargetFolder)\$(ProjectName).exe"
cd ..\gtk2_ardour
copy /Y "pixmaps\*.xpm" "$(Release32TestSuiteFolder)\..\share\$(LibardourFolder)\pixmaps"
copy /Y "icons\*.png" "$(Release32TestSuiteFolder)\..\share\$(LibardourFolder)\icons"
copy /Y "icons\cursor_square\*.png" "$(Release32TestSuiteFolder)\..\share\$(LibardourFolder)\icons"
copy /Y "icons\cursor_square\hotspots" "$(Release32TestSuiteFolder)\..\share\$(LibardourFolder)\icons"
copy /Y "default_ui_config" "$(PackagerFolderLocal)\..\share\$(LibardourFolder)"
copy /Y "default_ui_config" "$(Release32TestSuiteFolder)\..\share\$(LibardourFolder)"
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
|
@ -190,7 +190,7 @@
|
|||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\MSVCMixbus3.vsprops"
|
||||
InheritedPropertySheets="..\MSVCMixbus3\MSVCMixbus3.vsprops"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
<Tool
|
||||
|
|
@ -215,7 +215,7 @@
|
|||
AdditionalOptions="/FI$(TargetSxsFolder)\targetsxs.h"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""F:\+GTK-SOURCES\jackdmp\src\common\jack";"F:\+GTK-SOURCES\jackdmp\src\windows";..\libs;..\libs\pbd\msvc;..\libs\surfaces\control_protocol;..\libs\ardour;..\libs\canvas;..\libs\gtkmm2ext;..\libs\pbd;"..\libs\midi++2";..\libs\evoral;..\libs\libltc;..\libs\timecode;"..\libs\vamp-sdk";..\libs\audiographer;..\libs\rubberband;..\libs\fst;"$(GenericIncludeFolder)\ardourext";"$(GenericIncludeFolder)\freetype2";"$(GenericIncludeFolder)\gtk-2.0";"$(GenericIncludeFolder)\gtk-2.0\gdk";"$(GenericIncludeFolder)\atk-2.0";"$(GenericIncludeFolder)\cairo";"$(GenericIncludeFolder)\pango-1.0";"$(GenericIncludeFolder)\libart-2.0";"$(GenericIncludeFolder)\libsndfile";"$(GenericIncludeFolder)\lrdf";"$(GenericIncludeFolder)\raptor";"$(GenericLibraryFolder)\glib-2.0\include";"$(GenericIncludeFolder)\lilv-0";"$(GenericIncludeFolder)\suil-0""
|
||||
PreprocessorDefinitions="VERSIONSTRING="\"3.1.1\"";PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;CANVAS_DEBUG;LIBCANVAS_STATIC;RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_HWIN32;_WIN32;_WINDOWS;_MBCS;ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;CLEARLOOKS_CONF_LOCATION="\"\\etc\\engines\\libclearlooks.la\"";PANGO_CONF_LOCATION="\"\\etc\\pango\\pango.modules\"";PIXBUFLOADERS_CONF_LOCATION="\"\\etc\\gtk-2.0\\gdk-pixbuf.loaders\"";PROGRAM_NAME="\"Mixbus3\"";PACKAGE="\"gtk2_ardour\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
PreprocessorDefinitions="VERSIONSTRING="\"3.1.1\"";PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;CANVAS_DEBUG;LIBCANVAS_STATIC;RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_HWIN32;_WIN32;_WINDOWS;_MBCS;ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;CLEARLOOKS_CONF_LOCATION="\"\\etc\\engines\\libclearlooks.la\"";PANGO_CONF_LOCATION="\"\\etc\\pango\\pango.modules\"";PIXBUFLOADERS_CONF_LOCATION="\"\\etc\\gtk-2.0\\gdk-pixbuf.loaders\"";PROGRAM_NAME="\"Mixbus\"";PROGRAM_VERSION="\"3\"";PACKAGE="\"gtk2_ardour\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
StringPooling="false"
|
||||
RuntimeLibrary="2"
|
||||
EnableEnhancedInstructionSet="1"
|
||||
|
|
@ -234,7 +234,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libfftw3-3.lib libfftw3f-3.lib libfftw3l-3.lib libeay32.lib iconvRDC.lib zlib1RDC.lib boost-regex32RDC.lib $(DllPrefix)atkmm32$(AtkmmDllSuffix)RDC.lib $(DllPrefix)gtkmm32$(GtkmmDllSuffix)RDC.lib $(DllPrefix)gdkmm32$(GtkmmDllSuffix)RDC.lib $(DllPrefix)glibmm32$(GlibmmDllSuffix)RDC.lib $(DllPrefix)giomm32$(GlibmmDllSuffix)RDC.lib $(DllPrefix)cairomm32$(CairommDllSuffix)RDC.lib $(DllPrefix)pangomm32$(PangommDllSuffix)RDC.lib pthreadVCE2.lib $(DllPrefix)pango32$(PangoDllSuffix)RDC.lib $(DllPrefix)pangoft232$(PangoDllSuffix)RDC.lib $(DllPrefix)pangowin32$(PangoDllSuffix)RDC.lib $(DllPrefix)pangocairo32$(PangoDllSuffix)RDC.lib $(DllPrefix)cairo32$(CairoDllSuffix)RDC.lib $(DllPrefix)atk32$(AtkDllSuffix)RDC.lib $(DllPrefix)gthread32$(GlibDllSuffix)RDC.lib $(DllPrefix)gobject32$(GlibDllSuffix)RDC.lib $(DllPrefix)gmodule32$(GlibDllSuffix)RDC.lib $(DllPrefix)glib32$(GlibDllSuffix)RDC.lib $(DllPrefix)gio32$(GlibDllSuffix)RDC.lib $(DllPrefix)gtk32$(GtkDllSuffix)RDC.lib $(DllPrefix)gdk32$(GtkDllSuffix)RDC.lib $(DllPrefix)gdk-pixbuf32$(GdkPixbufDllSuffix)RDC.lib $(DllPrefix)sigc++32-2.0RDC.lib $(DllPrefix)curlRDC.lib $(DllPrefix)fontconfigRDC.lib freetype32-2RDC.lib raptor2.lib lrdf.lib libloRDC.lib $(DllPrefix)ardour32RDC.lib $(DllPrefix)ardour_cp32RDC.lib $(DllPrefix)audiographer32RDC.lib $(DllPrefix)pbd32RDC.lib $(DllPrefix)midi++32RDC.lib $(DllPrefix)evoral32RDC.lib $(DllPrefix)gtkmm2ext32RDC.lib $(DllPrefix)ltcRDC.lib $(DllPrefix)timecode32RDC.lib cairocanvasRDC.lib rubberbandRDC.lib $(DllPrefix)sndfile-1.lib $(DllPrefix)samplerate-0.lib vampsdkRDC.lib vamphostsdkRDC.lib panner_1in2out32RDC.lib panner_2in2out32RDC.lib panner_vbap32RDC.lib $(DllPrefix)lilv32-0RDC.lib suil-0RDC.lib $(DllPrefix)serd32-0RDC.lib $(DllPrefix)sord32-0RDC.lib $(DllPrefix)sratom32-0RDC.lib libart_lgpl_2.lib libjack.lib libxml2.lib intlRDC.lib shell32.lib psapi.lib ws2_32.lib winmm.lib"
|
||||
AdditionalDependencies="libfftw3-3.lib libfftw3f-3.lib libfftw3l-3.lib libeay32.lib iconvRDC.lib zlib1RDC.lib boost-regex32RDC.lib $(DllPrefix)atkmm32$(AtkmmDllSuffix)RDC.lib $(DllPrefix)gtkmm32$(GtkmmDllSuffix)RDC.lib $(DllPrefix)gdkmm32$(GtkmmDllSuffix)RDC.lib $(DllPrefix)glibmm32$(GlibmmDllSuffix)RDC.lib $(DllPrefix)giomm32$(GlibmmDllSuffix)RDC.lib $(DllPrefix)cairomm32$(CairommDllSuffix)RDC.lib $(DllPrefix)pangomm32$(PangommDllSuffix)RDC.lib pthreadVCE2.lib $(DllPrefix)pango32$(PangoDllSuffix)RDC.lib $(DllPrefix)pangoft232$(PangoDllSuffix)RDC.lib $(DllPrefix)pangowin32$(PangoDllSuffix)RDC.lib $(DllPrefix)pangocairo32$(PangoDllSuffix)RDC.lib $(DllPrefix)cairo32$(CairoDllSuffix)RDC.lib $(DllPrefix)atk32$(AtkDllSuffix)RDC.lib $(DllPrefix)gthread32$(GlibDllSuffix)RDC.lib $(DllPrefix)gobject32$(GlibDllSuffix)RDC.lib $(DllPrefix)gmodule32$(GlibDllSuffix)RDC.lib $(DllPrefix)glib32$(GlibDllSuffix)RDC.lib $(DllPrefix)gio32$(GlibDllSuffix)RDC.lib $(DllPrefix)gtk32$(GtkDllSuffix)RDC.lib $(DllPrefix)gdk32$(GtkDllSuffix)RDC.lib $(DllPrefix)gdk-pixbuf32$(GdkPixbufDllSuffix)RDC.lib $(DllPrefix)sigc++32-2.0RDC.lib $(DllPrefix)curlRDC.lib $(DllPrefix)fontconfigRDC.lib freetype32-2RDC.lib raptor2.lib lrdf.lib libloRDC.lib $(DllPrefix)ardour32RDC.lib $(DllPrefix)ardour_cp32RDC.lib $(DllPrefix)audiographer32RDC.lib $(DllPrefix)pbd32RDC.lib $(DllPrefix)midi++32RDC.lib $(DllPrefix)evoral32RDC.lib $(DllPrefix)gtkmm2ext32RDC.lib $(DllPrefix)ltcRDC.lib $(DllPrefix)timecode32RDC.lib cairocanvasRDC.lib rubberbandRDC.lib $(DllPrefix)sndfile-1.lib $(DllPrefix)samplerate-0.lib vampsdkRDC.lib vamphostsdkRDC.lib panner_1in2out32RDC.lib panner_2in2out32RDC.lib panner_vbap32RDC.lib $(DllPrefix)lilv32-0RDC.lib $(DllPrefix)suil32-0RDC.lib $(DllPrefix)serd32-0RDC.lib $(DllPrefix)sord32-0RDC.lib $(DllPrefix)sratom32-0RDC.lib libart_lgpl_2.lib libjack.lib libxml2.lib intlRDC.lib shell32.lib psapi.lib ws2_32.lib winmm.lib"
|
||||
OutputFile="$(Release32TestSuiteFolder)\$(ProjectName)RDC.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="F:\pthread-win32\Pre-built.2\lib"
|
||||
|
|
@ -267,7 +267,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="cd ..\gtk2_ardour
copy /Y "pixmaps\*.xpm" "$(Release32TestSuiteFolder)\..\share\ardour3\pixmaps"
copy /Y "icons\*.png" "$(Release32TestSuiteFolder)\..\share\ardour3\icons"
copy /Y "icons\cursor_square\*.png" "$(Release32TestSuiteFolder)\..\share\ardour3\icons"
copy /Y "icons\cursor_square\hotspots" "$(Release32TestSuiteFolder)\..\share\ardour3\icons"
copy /Y "default_ui_config" "$(Release32TestSuiteFolder)\..\share\ardour3"
"
|
||||
CommandLine="cd ..\gtk2_ardour
copy /Y "pixmaps\*.xpm" "$(Release32TestSuiteFolder)\..\share\$(LibardourFolder)\pixmaps"
copy /Y "icons\*.png" "$(Release32TestSuiteFolder)\..\share\$(LibardourFolder)\icons"
copy /Y "icons\cursor_square\*.png" "$(Release32TestSuiteFolder)\..\share\$(LibardourFolder)\icons"
copy /Y "icons\cursor_square\hotspots" "$(Release32TestSuiteFolder)\..\share\$(LibardourFolder)\icons"
copy /Y "default_ui_config" "$(Release32TestSuiteFolder)\..\share\$(LibardourFolder)"
"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
|
|
|
|||
|
|
@ -128,4 +128,8 @@
|
|||
Name="TargetSxSFolder"
|
||||
Value="@TargetSxSFolder@"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="LibardourFolder"
|
||||
Value="ardour3"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
AdditionalOptions="/FI$(TargetSxsFolder)\targetsxs.h"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\libs;..\libs\fst;..\libs\ardour;..\libs\pbd;..\libs\gtkmm2ext;..\libs\rubberband;..\libs\evoral;..\libs\timecode;"$(GenericIncludeFolder)\ardourext";"$(GenericIncludeFolder)\freetype2";"$(GenericIncludeFolder)\gtk-2.0";"$(GenericIncludeFolder)\gtk-2.0\gdk";"$(GenericIncludeFolder)\atk-2.0";"$(GenericIncludeFolder)\cairo";"$(GenericIncludeFolder)\pango-1.0";"$(GenericIncludeFolder)\libart-2.0";"$(GenericIncludeFolder)\lrdf";"$(GenericIncludeFolder)\raptor";"$(GenericLibraryFolder)\glib-2.0\include""
|
||||
PreprocessorDefinitions="VST_SCANNER_APP;PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;DEBUGGABLE_SCANNER_APP;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;LIBCANVAS_STATIC;CANVAS_DEBUG;LIBARDOUR_STATIC;RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_H;WIN32;_WIN32;_WINDOWS;_MBCS;_DEBUG;ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;CLEARLOOKS_CONF_LOCATION="\"\\etc\\engines\\libclearlooks.la\"";FONTS_CONF_LOCATION="\"\\etc\\fontconfig\\fonts.conf\"";PANGO_CONF_LOCATION="\"\\etc\\pango\\pango.modules\"";PIXBUFLOADERS_CONF_LOCATION="\"\\etc\\gtk-2.0\\gdk-pixbuf.loaders\"";PROGRAM_NAME="\"Mixbus3\"";PROGRAM_VERSION="\"\"";PACKAGE="\"vst_scanner\"";I18N_PACKAGE="\"ardour3\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
PreprocessorDefinitions="VST_SCANNER_APP;PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;DEBUGGABLE_SCANNER_APP;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;LIBCANVAS_STATIC;CANVAS_DEBUG;LIBARDOUR_STATIC;LIBARDOUR=\"mixbus3\";RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_H;WIN32;_WIN32;_WINDOWS;_MBCS;_DEBUG;ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;CLEARLOOKS_CONF_LOCATION="\"\\etc\\engines\\libclearlooks.la\"";FONTS_CONF_LOCATION="\"\\etc\\fontconfig\\fonts.conf\"";PANGO_CONF_LOCATION="\"\\etc\\pango\\pango.modules\"";PIXBUFLOADERS_CONF_LOCATION="\"\\etc\\gtk-2.0\\gdk-pixbuf.loaders\"";PROGRAM_NAME="\"Mixbus\"";PROGRAM_VERSION="\"3\"";PACKAGE="\"vst_scanner\"";I18N_PACKAGE="\"ardour3\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
MinimalRebuild="true"
|
||||
RuntimeLibrary="3"
|
||||
StructMemberAlignment="0"
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\libs;..\libs\fst;..\libs\ardour;..\libs\pbd;..\libs\gtkmm2ext;..\libs\rubberband;..\libs\evoral;..\libs\timecode;"$(GenericIncludeFolder)\ardourext";"$(GenericIncludeFolder)\freetype2";"$(GenericIncludeFolder)\gtk-2.0";"$(GenericIncludeFolder)\gtk-2.0\gdk";"$(GenericIncludeFolder)\atk-2.0";"$(GenericIncludeFolder)\cairo";"$(GenericIncludeFolder)\pango-1.0";"$(GenericIncludeFolder)\libart-2.0";"$(GenericIncludeFolder)\lrdf";"$(GenericIncludeFolder)\raptor";"$(GenericLibraryFolder)\glib-2.0\include""
|
||||
PreprocessorDefinitions="VST_SCANNER_APP;PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;LIBCANVAS_STATIC;LIBARDOUR_STATIC;RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_H;WIN32;_WIN32;_WINDOWS;_MBCS;NDEBUG;ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;PROGRAM_NAME="\"Mixbus3\"";PROGRAM_VERSION="\"\"";PACKAGE="\"vst_scanner\"";I18N_PACKAGE="\"ardour3\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
PreprocessorDefinitions="VST_SCANNER_APP;PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;LIBCANVAS_STATIC;LIBARDOUR_STATIC;LIBARDOUR=\"mixbus3\";RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_H;WIN32;_WIN32;_WINDOWS;_MBCS;NDEBUG;ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;PROGRAM_NAME="\"Mixbus\"";PROGRAM_VERSION="\"3\"";PACKAGE="\"vst_scanner\"";I18N_PACKAGE="\"ardour3\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
StringPooling="false"
|
||||
RuntimeLibrary="2"
|
||||
EnableEnhancedInstructionSet="1"
|
||||
|
|
@ -212,7 +212,7 @@
|
|||
AdditionalOptions="/FI$(TargetSxsFolder)\targetsxs.h"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\libs;..\libs\fst;..\libs\ardour;..\libs\pbd;..\libs\gtkmm2ext;..\libs\rubberband;..\libs\evoral;..\libs\timecode;"$(GenericIncludeFolder)\ardourext";"$(GenericIncludeFolder)\freetype2";"$(GenericIncludeFolder)\gtk-2.0";"$(GenericIncludeFolder)\gtk-2.0\gdk";"$(GenericIncludeFolder)\atk-2.0";"$(GenericIncludeFolder)\cairo";"$(GenericIncludeFolder)\pango-1.0";"$(GenericIncludeFolder)\libart-2.0";"$(GenericIncludeFolder)\lrdf";"$(GenericIncludeFolder)\raptor";"$(GenericLibraryFolder)\glib-2.0\include""
|
||||
PreprocessorDefinitions="VST_SCANNER_APP;PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;DEBUGGABLE_SCANNER_APP;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;CANVAS_DEBUG;LIBCANVAS_STATIC;LIBARDOUR_STATIC;RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_HWIN32;_WIN32;_WINDOWS;_MBCS;ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;CLEARLOOKS_CONF_LOCATION="\"\\etc\\engines\\libclearlooks.la\"";PANGO_CONF_LOCATION="\"\\etc\\pango\\pango.modules\"";PIXBUFLOADERS_CONF_LOCATION="\"\\etc\\gtk-2.0\\gdk-pixbuf.loaders\"";PROGRAM_NAME="\"Mixbus3\"";PROGRAM_VERSION="\"\"";PACKAGE="\"vst_scanner\"";I18N_PACKAGE="\"ardour3\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
PreprocessorDefinitions="VST_SCANNER_APP;PLATFORM_WINDOWS;COMPILER_MSVC;PTHREAD_WIN32;DEBUGGABLE_SCANNER_APP;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;CANVAS_COMPATIBILITY;CANVAS_DEBUG;LIBCANVAS_STATIC;LIBARDOUR_STATIC;LIBARDOUR=\"mixbus3\";RUBBERBAND_IS_IN_WIN_STATIC_LIB;USE_CAIRO_IMAGE_SURFACE;NOMINMAX;NO_POSIX_MEMALIGN;INCLUDE_ARDOUR_MISCELLANEOUS=1;BOOST_REGEX_DYN_LINK;BOOST_REGEX_NO_LIB;BOOST_CHRONO_NO_LIB;BOOST_SYSTEM_NO_LIB;BOOST_THREAD_NO_LIB;BOOST_DATE_TIME_NO_LIB;GNU_WIN32;HAVE_CONFIG_HWIN32;_WIN32;_WINDOWS;_MBCS;ARCH_X86;USE_XMMINTRIN;BUILD_SSE_OPTIMIZATIONS;ENABLE_NLS=1;CLEARLOOKS_CONF_LOCATION="\"\\etc\\engines\\libclearlooks.la\"";PANGO_CONF_LOCATION="\"\\etc\\pango\\pango.modules\"";PIXBUFLOADERS_CONF_LOCATION="\"\\etc\\gtk-2.0\\gdk-pixbuf.loaders\"";PROGRAM_NAME="\"Mixbus\"";PROGRAM_VERSION="\"3\"";PACKAGE="\"vst_scanner\"";I18N_PACKAGE="\"ardour3\"";_REENTRANT;_USE_MATH_DEFINES;_LARGEFILE_SOURCE;_LARGEFILE64_SOURCE;LIBC_DISABLE_DEPRECATED;BOOST_SYSTEM_NO_DEPRECATED;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;INTERNAL_SHARED_LIBS=1;JACK_SESSION=1;HAVE_GLIB=1;HAVE_GTHREAD=1;HAVE_SNDFILE=1;HAVE_GIOMM=1;HAVE_CURL=1;HAVE_LO=1;HAVE_MODE_T=1;PHONE_HOME=1;FREESOUND=1;WINDOWS_KEY=\"Mod4><Super\";IS_OSX=0;HAVE_XML=1;HAVE_UUID=1;HAVE_LIBS_PBD=1;HAVE_JACK=1;HAVE_LIBS_MIDIPP2=1;HAVE_LIBS_EVORAL=1;HAVE_FFTW3=1;HAVE_FFTW3F=1;HAVE_AUBIO=1;HAVE_LIBS_VAMP_SDK=1;HAVE_LIBS_VAMP_PLUGINS=1;HAVE_LIBS_TAGLIB=1;HAVE_LIBS_LIBLTC=1;HAVE_LIBS_RUBBERBAND=1;HAVE_CONTROL_PROTOCOL=1;HAVE_FRONTIER=1;HAVE_GENERIC_MIDI=1;HAVE_MACKIE=1;HAVE_OSC=1;HAVE_TRANZPORT=1;HAVE_WIIMOTE=1;HAVE_LIBS_SURFACES=1;HAVE_2IN2OUT=1;HAVE_1IN2OUT=1;HAVE_VBAP=1;HAVE_LIBS_PANNERS=1;HAVE_LIBS_TIMECODE=1;HAVE_LRDF=1;HAVE_SAMPLERATE=1;HAVE_SERD=1;HAVE_SORD=1;HAVE_SRATOM=1;HAVE_LILV=1;HAVE_LILV_0_16_0=1;HAVE_OGG=1;HAVE_FLAC=1;HAVE_RUBBERBAND=1;USE_RUBBERBAND=1;HAVE_JACK_SESSION=1;HAVE_UNISTD=1;HAVE_JACK_ON_INFO_SHUTDOWN=1;HAVE_JACK_VIDEO_SUPPORT=1;HAVE_BOOST_SCOPED_PTR_HPP=1;HAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1;HAVE_LIBS_ARDOUR=1;HAVE_GTKMM=1;HAVE_GTK=1;HAVE_LIBS_GTKMM2EXT=1;HAVE_LIBS_CLEARLOOKS_NEWER=1;HAVE_BOOST_FORMAT_HPP=1;HAVE_LIBS_AUDIOGRAPHER=1;HAVE_GNOMECANVAS=0;HAVE_GNOMECANVASMM=0;HAVE_X11=0;HAVE_FONTCONFIG=1;HAVE_BOOST_SHARED_PTR_HPP=1;HAVE_BOOST_WEAK_PTR_HPP=1;HAVE_GTK2_ARDOUR=1;HAVE_EXPORT=1;HAVE_MIDI_MAPS=1;HAVE_MCP=1;HAVE_PATCHFILES=1;HAVE_TOOLS_SANITY_CHECK=1;SMF_VERSION=\"1.2\";CURRENT_SESSION_FILE_VERSION=3001;LOCALEDIR="\"\"""
|
||||
StringPooling="false"
|
||||
RuntimeLibrary="2"
|
||||
EnableEnhancedInstructionSet="1"
|
||||
|
|
|
|||
67
cfgtool/cfgtool.cc
Normal file
67
cfgtool/cfgtool.cc
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "pbd/xml++.h"
|
||||
#include "ardour/rc_configuration.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace std;
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Usage: %s [-h] <file-name>\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!strcmp (argv[1], "-h") || !strcmp (argv[1], "--help")) {
|
||||
fprintf(stdout, "Usage: %s <file-name>\n\n", argv[0]);
|
||||
fprintf(stdout, "Writes the default Ardour config to the given file\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
g_setenv ("ARDOUR_DLL_PATH", "/xxx", 1);
|
||||
g_setenv ("ARDOUR_CONFIG_PATH", "/xxx", 1);
|
||||
|
||||
if (!ARDOUR::init (false, true, "/xxx")) {
|
||||
fprintf(stderr, "Failed to initialize libardour\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
RCConfiguration * rc = new RCConfiguration;
|
||||
XMLNode& state = rc->get_state();
|
||||
|
||||
XMLNode* cfg = state.child ("Config");
|
||||
cfg->remove_nodes_and_delete ("name", "donate-url");
|
||||
cfg->remove_nodes_and_delete ("name", "osx_pingback-url");
|
||||
cfg->remove_nodes_and_delete ("name", "linux-pingback-url");
|
||||
cfg->remove_nodes_and_delete ("name", "updates-url");
|
||||
cfg->remove_nodes_and_delete ("name", "freesound-download-dir"); // user specific
|
||||
|
||||
XMLTree tree;
|
||||
tree.set_root (&state);
|
||||
|
||||
if (!tree.write (argv[1])) {
|
||||
fprintf(stderr, "Error saving config file '%s'\n", argv[1]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#include "ardour/vst_types.h"
|
||||
int vstfx_init (void*) { return 0; }
|
||||
void vstfx_exit () {}
|
||||
void vstfx_destroy_editor (VSTState*) {}
|
||||
|
||||
#ifdef WINDOWS_VST_SUPPORT
|
||||
extern "C" {
|
||||
int fst_init (void* possible_hmodule) { return -1;}
|
||||
void fst_exit (void) {}
|
||||
VSTHandle* fst_load (const char*) { return 0; }
|
||||
int fst_unload (VSTHandle**) { return -1; }
|
||||
VSTState * fst_instantiate (VSTHandle *, audioMasterCallback amc, void* userptr) { return 0; }
|
||||
void fst_close (VSTState *) {}
|
||||
void fst_audio_master_idle(void) {}
|
||||
};
|
||||
#endif
|
||||
24
cfgtool/wscript
Normal file
24
cfgtool/wscript
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env python
|
||||
from waflib.extras import autowaf as autowaf
|
||||
|
||||
top = '.'
|
||||
out = 'build'
|
||||
|
||||
def options(opt):
|
||||
autowaf.set_options(opt)
|
||||
|
||||
def configure(conf):
|
||||
conf.load('misc')
|
||||
conf.load('compiler_cxx')
|
||||
autowaf.configure(conf)
|
||||
|
||||
def build(bld):
|
||||
if bld.env['build_target'] == 'mingw':
|
||||
return;
|
||||
|
||||
obj = bld (features = 'cxx c cxxprogram')
|
||||
obj.source = 'cfgtool.cc'
|
||||
obj.target = 'cfgtool'
|
||||
obj.use = [ 'libpbd', 'libardour', ]
|
||||
obj.use = [ 'libpbd', 'libardour', ]
|
||||
obj.install_path = None
|
||||
|
|
@ -27,11 +27,8 @@
|
|||
#include "pbd/file_utils.h"
|
||||
|
||||
#include "ardour/revision.h"
|
||||
#include "ardour/version.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#include "about.h"
|
||||
#include "configinfo.h"
|
||||
#include "rgb_macros.h"
|
||||
|
|
@ -49,6 +46,10 @@ using namespace std;
|
|||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
#ifndef CODENAME
|
||||
#define CODENAME ""
|
||||
#endif
|
||||
|
||||
#ifdef WITH_PAYMENT_OPTIONS
|
||||
|
||||
/* XPM */
|
||||
|
|
@ -137,6 +138,7 @@ static const char* authors[] = {
|
|||
N_("André Colomb"),
|
||||
N_("Paul Davis"),
|
||||
N_("Gerard van Dongen"),
|
||||
N_("John Emmas"),
|
||||
N_("Colin Fletcher"),
|
||||
N_("Dave Flick"),
|
||||
N_("Hans Fugal"),
|
||||
|
|
@ -164,6 +166,7 @@ static const char* authors[] = {
|
|||
N_("Nick Mainsbridge"),
|
||||
N_("Tim Mayberry"),
|
||||
N_("Doug Mclain"),
|
||||
N_("Todd Naugle"),
|
||||
N_("Jack O'Quin"),
|
||||
N_("Nimal Ratnayake"),
|
||||
N_("David Robillard"),
|
||||
|
|
@ -585,13 +588,13 @@ About::About ()
|
|||
}
|
||||
|
||||
set_translator_credits (t);
|
||||
set_copyright (_("Copyright (C) 1999-2013 Paul Davis\n"));
|
||||
set_copyright (_("Copyright (C) 1999-2015 Paul Davis\n"));
|
||||
set_license (gpl);
|
||||
set_name (X_("Ardour"));
|
||||
set_website (X_("http://ardour.org/"));
|
||||
set_website_label (_("http://ardour.org/"));
|
||||
set_version ((string_compose(_("%1\n(built from revision %2)"),
|
||||
VERSIONSTRING,
|
||||
set_version ((string_compose(_("%1%2\n(built from revision %3)"),
|
||||
VERSIONSTRING, CODENAME,
|
||||
revision)));
|
||||
|
||||
Gtk::Button* config_button = manage (new Button (_("Config")));
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ AddRouteDialog::AddRouteDialog ()
|
|||
, routes_adjustment (1, 1, 128, 1, 4)
|
||||
, routes_spinner (routes_adjustment)
|
||||
, configuration_label (_("Configuration:"))
|
||||
, mode_label (_("Track mode:"))
|
||||
, mode_label (_("Record Mode:"))
|
||||
, instrument_label (_("Instrument:"))
|
||||
{
|
||||
set_name ("AddRouteDialog");
|
||||
|
|
@ -80,6 +80,13 @@ AddRouteDialog::AddRouteDialog ()
|
|||
track_bus_combo.append_text (_("Busses"));
|
||||
track_bus_combo.set_active (0);
|
||||
|
||||
insert_at_combo.append_text (_("First"));
|
||||
insert_at_combo.append_text (_("Before Selection"));
|
||||
insert_at_combo.append_text (_("After Selection"));
|
||||
insert_at_combo.append_text (_("Last"));
|
||||
|
||||
insert_at_combo.set_active (1);
|
||||
|
||||
VBox* vbox = manage (new VBox);
|
||||
Gtk::Label* l;
|
||||
|
||||
|
|
@ -151,6 +158,12 @@ AddRouteDialog::AddRouteDialog ()
|
|||
table2->attach (route_group_combo, 2, 3, n, n + 1, Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0);
|
||||
++n;
|
||||
|
||||
/* New route will be inserted at.. */
|
||||
l = manage (new Label (_("Insert:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||
table2->attach (*l, 1, 2, n, n + 1, Gtk::FILL, Gtk::EXPAND, 0, 0);
|
||||
table2->attach (insert_at_combo, 2, 3, n, n + 1, Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0);
|
||||
++n;
|
||||
|
||||
options_box->pack_start (*table2, false, true);
|
||||
vbox->pack_start (*options_box, false, true);
|
||||
|
||||
|
|
@ -170,6 +183,8 @@ AddRouteDialog::AddRouteDialog ()
|
|||
|
||||
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||
add_button (Stock::ADD, RESPONSE_ACCEPT);
|
||||
set_response_sensitive (RESPONSE_ACCEPT, true);
|
||||
set_default_response (RESPONSE_ACCEPT);
|
||||
|
||||
track_type_chosen ();
|
||||
}
|
||||
|
|
@ -188,18 +203,16 @@ AddRouteDialog::channel_combo_changed ()
|
|||
AddRouteDialog::TypeWanted
|
||||
AddRouteDialog::type_wanted() const
|
||||
{
|
||||
switch (track_bus_combo.get_active_row_number ()) {
|
||||
case 0:
|
||||
return AudioTrack;
|
||||
case 1:
|
||||
std::string str = track_bus_combo.get_active_text();
|
||||
if (str == _("Busses")) {
|
||||
return AudioBus;
|
||||
} else if (str == _("MIDI Tracks")){
|
||||
return MidiTrack;
|
||||
case 2:
|
||||
} else if (str == _("Audio+MIDI Tracks")) {
|
||||
return MixedTrack;
|
||||
default:
|
||||
break;
|
||||
} else {
|
||||
return AudioTrack;
|
||||
}
|
||||
|
||||
return AudioBus;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -538,6 +551,21 @@ AddRouteDialog::group_changed ()
|
|||
}
|
||||
}
|
||||
|
||||
AddRouteDialog::InsertAt
|
||||
AddRouteDialog::insert_at ()
|
||||
{
|
||||
std::string str = insert_at_combo.get_active_text();
|
||||
|
||||
if (str == _("First")) {
|
||||
return First;
|
||||
} else if (str == _("After Selection")) {
|
||||
return AfterSelection;
|
||||
} else if (str == _("Before Selection")){
|
||||
return BeforeSelection;
|
||||
}
|
||||
return Last;
|
||||
}
|
||||
|
||||
bool
|
||||
AddRouteDialog::channel_separator (const Glib::RefPtr<Gtk::TreeModel> &, const Gtk::TreeModel::iterator &i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,6 +67,13 @@ class AddRouteDialog : public ArdourDialog
|
|||
|
||||
ARDOUR::TrackMode mode();
|
||||
ARDOUR::RouteGroup* route_group ();
|
||||
enum InsertAt {
|
||||
BeforeSelection,
|
||||
AfterSelection,
|
||||
First,
|
||||
Last
|
||||
};
|
||||
InsertAt insert_at();
|
||||
|
||||
private:
|
||||
Gtk::Entry name_template_entry;
|
||||
|
|
@ -80,6 +87,8 @@ class AddRouteDialog : public ArdourDialog
|
|||
Gtk::ComboBoxText mode_combo;
|
||||
Gtk::ComboBoxText route_group_combo;
|
||||
InstrumentSelector instrument_combo;
|
||||
Gtk::Label insert_at_label;
|
||||
Gtk::ComboBoxText insert_at_combo;
|
||||
|
||||
std::vector<ARDOUR::TemplateInfo> route_templates;
|
||||
|
||||
|
|
|
|||
|
|
@ -271,6 +271,7 @@ static bool check_video_file_extension(std::string file)
|
|||
".mpg" , ".MPG" ,
|
||||
".mpeg" , ".MPEG" ,
|
||||
".mts" , ".MTS" ,
|
||||
".m2t" , ".M2T" ,
|
||||
".mov" , ".MOV" ,
|
||||
".mp4" , ".MP4" ,
|
||||
".mkv" , ".MKV" ,
|
||||
|
|
|
|||
4
gtk2_ardour/arcfg
Executable file
4
gtk2_ardour/arcfg
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
TOP=`dirname "$0"`/..
|
||||
. $TOP/build/gtk2_ardour/ardev_common_waf.sh
|
||||
exec $TOP/build/cfgtool/cfgtool "$@"
|
||||
|
|
@ -17,7 +17,7 @@ export ARDOUR_DATA_PATH=$TOP:$TOP/build:$TOP/gtk2_ardour:$TOP/build/gtk2_ardour:
|
|||
export ARDOUR_MIDIMAPS_PATH=$TOP/midi_maps:.
|
||||
export ARDOUR_MCP_PATH=$TOP/mcp:.
|
||||
export ARDOUR_EXPORT_FORMATS_PATH=$TOP/export:.
|
||||
export ARDOUR_BACKEND_PATH=$libs/backends/jack:$libs/backends/wavesaudio:$libs/backends/dummy:$libs/backends/alsa
|
||||
export ARDOUR_BACKEND_PATH=$libs/backends/jack:$libs/backends/wavesaudio:$libs/backends/dummy:$libs/backends/alsa:$libs/backends/coreaudio:$libs/backends/portaudio:$libs/backends/asio
|
||||
export ARDOUR_TEST_PATH=$TOP/libs/ardour/test/data
|
||||
export PBD_TEST_PATH=$TOP/libs/pbd/test
|
||||
export EVORAL_TEST_PATH=$TOP/libs/evoral/test/testdata
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@
|
|||
<separator/>
|
||||
<menuitem action='Save'/>
|
||||
<menuitem action='SaveAs'/>
|
||||
#ifndef WINDOWS // can't move open files.
|
||||
<menuitem action='Rename'/>
|
||||
<menuitem action='SnapshotStay'/>
|
||||
<menuitem action='SnapshotSwitch'/>
|
||||
#endif
|
||||
<menuitem action='SaveTemplate'/>
|
||||
<menu name='Metadata' action='Metadata'>
|
||||
<menuitem action='EditMetadata'/>
|
||||
|
|
@ -30,8 +32,8 @@
|
|||
<menuitem action='StemExport'/>
|
||||
<menuitem action='ExportVideo'/>
|
||||
</menu>
|
||||
<menuitem action='bring-into-session'/>
|
||||
<menu name='Cleanup' action='Cleanup'>
|
||||
<menuitem action='bring-into-session'/>
|
||||
<menuitem action='CleanupUnused'/>
|
||||
<menuitem action='FlushWastebasket'/>
|
||||
</menu>
|
||||
|
|
@ -52,26 +54,22 @@
|
|||
<menu name='Transport' action='Transport'>
|
||||
<menuitem action='ToggleRoll'/>
|
||||
<menu action="PlayMenu">
|
||||
<menuitem action='main-menu-play-selected-regions'/>
|
||||
<menuitem action='play-edit-range'/>
|
||||
<menuitem action='PlaySelection'/>
|
||||
<menuitem action='PlayPreroll'/>
|
||||
<menuitem action='ToggleRollMaybe'/>
|
||||
<menuitem action='play-from-edit-point-and-return'/>
|
||||
<menuitem action='Loop'/>
|
||||
</menu>
|
||||
<menuitem action='record-roll'/>
|
||||
<menuitem action='Record'/>
|
||||
<menuitem action='ToggleRollMaybe'/>
|
||||
<menuitem action='ToggleRollForgetCapture'/>
|
||||
<menuitem action='Record'/>
|
||||
#if 0
|
||||
<menuitem action='toggle-skip-playback'/>
|
||||
<menu action="SetLoopMenu">
|
||||
<menuitem action='set-loop-from-edit-range'/>
|
||||
<menuitem action='set-loop-from-region'/>
|
||||
</menu>
|
||||
<menu action="SetPunchMenu">
|
||||
<menuitem action='set-punch-from-edit-range'/>
|
||||
<menuitem action='set-punch-from-region'/>
|
||||
</menu>
|
||||
#endif
|
||||
|
||||
<separator/>
|
||||
<menuitem action='set-loop-from-edit-range'/>
|
||||
<menuitem action='set-punch-from-edit-range'/>
|
||||
|
||||
<separator/>
|
||||
<menuitem action='Forward'/>
|
||||
|
|
@ -187,10 +185,8 @@
|
|||
<menuitem action='editor-delete'/>
|
||||
<menuitem action='editor-crop'/>
|
||||
<menuitem action='split-region'/>
|
||||
<menuitem action='split-region-at-transients'/>
|
||||
<menu action="SeparateMenu">
|
||||
<menuitem action='separate-under-region'/>
|
||||
<menuitem action='editor-separate'/>
|
||||
<menuitem action='separate-from-loop'/>
|
||||
<menuitem action='separate-from-punch'/>
|
||||
<separator/>
|
||||
|
|
@ -216,6 +212,49 @@
|
|||
<menuitem action='cycle-edit-point'/>
|
||||
<menuitem action='cycle-edit-point-with-marker'/>
|
||||
</menu>
|
||||
<menu name='SnapMode' action='SnapMode'>
|
||||
<menuitem action='snap-off'/>
|
||||
<menuitem action='snap-normal'/>
|
||||
<menuitem action='snap-magnetic'/>
|
||||
<separator/>
|
||||
<menuitem action='cycle-snap-mode'/>
|
||||
<menuitem action='next-snap-choice'/>
|
||||
<menuitem action='prev-snap-choice'/>
|
||||
<menuitem action='next-snap-choice-music-only'/>
|
||||
<menuitem action='prev-snap-choice-music-only'/>
|
||||
</menu>
|
||||
<menu name='SnapTo' action='SnapTo'>
|
||||
<menuitem action='snap-to-cd-frame'/>
|
||||
<menuitem action='snap-to-timecode-frame'/>
|
||||
<menuitem action='snap-to-timecode-seconds'/>
|
||||
<menuitem action='snap-to-timecode-minutes'/>
|
||||
<menuitem action='snap-to-seconds'/>
|
||||
<menuitem action='snap-to-minutes'/>
|
||||
<menuitem action='snap-to-onetwentyeighths'/>
|
||||
<menuitem action='snap-to-sixtyfourths'/>
|
||||
<menuitem action='snap-to-thirtyseconds'/>
|
||||
<menuitem action='snap-to-twentyeighths'/>
|
||||
<menuitem action='snap-to-twentyfourths'/>
|
||||
<menuitem action='snap-to-twentieths'/>
|
||||
<menuitem action='snap-to-asixteenthbeat'/>
|
||||
<menuitem action='snap-to-fourteenths'/>
|
||||
<menuitem action='snap-to-twelfths'/>
|
||||
<menuitem action='snap-to-tenths'/>
|
||||
<menuitem action='snap-to-eighths'/>
|
||||
<menuitem action='snap-to-sevenths'/>
|
||||
<menuitem action='snap-to-sixths'/>
|
||||
<menuitem action='snap-to-fifths'/>
|
||||
<menuitem action='snap-to-quarters'/>
|
||||
<menuitem action='snap-to-thirds'/>
|
||||
<menuitem action='snap-to-halves'/>
|
||||
<menuitem action='snap-to-beat'/>
|
||||
<menuitem action='snap-to-bar'/>
|
||||
<menuitem action='snap-to-mark'/>
|
||||
<menuitem action='snap-to-region-start'/>
|
||||
<menuitem action='snap-to-region-end'/>
|
||||
<menuitem action='snap-to-region-sync'/>
|
||||
<menuitem action='snap-to-region-boundary'/>
|
||||
</menu>
|
||||
<separator/>
|
||||
<menu action="TempoMenu">
|
||||
<menuitem action='set-tempo-from-region'/>
|
||||
|
|
@ -234,12 +273,12 @@
|
|||
<menuitem action='loop-region'/>
|
||||
<menuitem action='rename-region'/>
|
||||
<menuitem action='show-region-properties'/>
|
||||
<menuitem action='analyze-region'/>
|
||||
<menu action='RegionMenuEdit'>
|
||||
<menuitem action='combine-regions'/>
|
||||
<menuitem action='uncombine-regions'/>
|
||||
<menuitem action='analyze-region'/>
|
||||
<menuitem action='pitch-shift-region'/>
|
||||
<menuitem action='split-region'/>
|
||||
<menuitem action='split-region-at-transients'/>
|
||||
<menuitem action='split-multichannel-region'/>
|
||||
<menuitem action='close-region-gaps'/>
|
||||
<menuitem action='place-transient' />
|
||||
|
|
@ -328,7 +367,7 @@
|
|||
<menuitem action="move-selected-tracks-up"/>
|
||||
<menuitem action="move-selected-tracks-down"/>
|
||||
<menu action='TrackHeightMenu'>
|
||||
<menuitem action='fit-tracks'/>
|
||||
<menuitem action='fit-selection'/>
|
||||
<menuitem action='track-height-largest'/>
|
||||
<menuitem action='track-height-larger'/>
|
||||
<menuitem action='track-height-large'/>
|
||||
|
|
@ -369,7 +408,7 @@
|
|||
<menuitem action='temporal-zoom-out'/>
|
||||
<menuitem action='zoom-to-session'/>
|
||||
<menuitem action='zoom-to-selection'/>
|
||||
<menuitem action='zoom-to-selection-both-axes'/>
|
||||
<menuitem action='fit-selection'/>
|
||||
<menuitem action='toggle-zoom'/>
|
||||
<menuitem action='expand-tracks'/>
|
||||
<menuitem action='shrink-tracks'/>
|
||||
|
|
@ -383,57 +422,16 @@
|
|||
<menuitem action='zoom-focus-edit'/>
|
||||
<menuitem action='cycle-zoom-focus'/>
|
||||
</menu>
|
||||
<menu name='SnapMode' action='SnapMode'>
|
||||
<menuitem action='snap-off'/>
|
||||
<menuitem action='snap-normal'/>
|
||||
<menuitem action='snap-magnetic'/>
|
||||
<separator/>
|
||||
<menuitem action='cycle-snap-mode'/>
|
||||
<menuitem action='next-snap-choice'/>
|
||||
<menuitem action='prev-snap-choice'/>
|
||||
<menuitem action='next-snap-choice-music-only'/>
|
||||
<menuitem action='prev-snap-choice-music-only'/>
|
||||
</menu>
|
||||
<menu name='SnapTo' action='SnapTo'>
|
||||
<menuitem action='snap-to-cd-frame'/>
|
||||
<menuitem action='snap-to-timecode-frame'/>
|
||||
<menuitem action='snap-to-timecode-seconds'/>
|
||||
<menuitem action='snap-to-timecode-minutes'/>
|
||||
<menuitem action='snap-to-seconds'/>
|
||||
<menuitem action='snap-to-minutes'/>
|
||||
<menuitem action='snap-to-onetwentyeighths'/>
|
||||
<menuitem action='snap-to-sixtyfourths'/>
|
||||
<menuitem action='snap-to-thirtyseconds'/>
|
||||
<menuitem action='snap-to-twentyeighths'/>
|
||||
<menuitem action='snap-to-twentyfourths'/>
|
||||
<menuitem action='snap-to-twentieths'/>
|
||||
<menuitem action='snap-to-asixteenthbeat'/>
|
||||
<menuitem action='snap-to-fourteenths'/>
|
||||
<menuitem action='snap-to-twelfths'/>
|
||||
<menuitem action='snap-to-tenths'/>
|
||||
<menuitem action='snap-to-eighths'/>
|
||||
<menuitem action='snap-to-sevenths'/>
|
||||
<menuitem action='snap-to-sixths'/>
|
||||
<menuitem action='snap-to-fifths'/>
|
||||
<menuitem action='snap-to-quarters'/>
|
||||
<menuitem action='snap-to-thirds'/>
|
||||
<menuitem action='snap-to-halves'/>
|
||||
<menuitem action='snap-to-beat'/>
|
||||
<menuitem action='snap-to-bar'/>
|
||||
<menuitem action='snap-to-mark'/>
|
||||
<menuitem action='snap-to-region-start'/>
|
||||
<menuitem action='snap-to-region-end'/>
|
||||
<menuitem action='snap-to-region-sync'/>
|
||||
<menuitem action='snap-to-region-boundary'/>
|
||||
</menu>
|
||||
|
||||
<menu action="RulerMenu">
|
||||
<menuitem action="toggle-minsec-ruler"/>
|
||||
<menuitem action="toggle-timecode-ruler"/>
|
||||
<menuitem action="toggle-samples-ruler"/>
|
||||
<menuitem action="toggle-bbt-ruler"/>
|
||||
<separator/>
|
||||
<menuitem action="toggle-meter-ruler"/>
|
||||
<menuitem action="toggle-tempo-ruler"/>
|
||||
<menuitem action="toggle-range-ruler"/>
|
||||
<menuitem action="toggle-loop-punch-ruler"/>
|
||||
<menuitem action="toggle-cd-marker-ruler"/>
|
||||
<menuitem action="toggle-marker-ruler"/>
|
||||
|
|
@ -493,9 +491,6 @@
|
|||
<menuitem action='ToggleGroupTabs'/>
|
||||
<menuitem action='show-marker-lines'/>
|
||||
|
||||
<separator/>
|
||||
<menuitem action='show-ui-prefs'/>
|
||||
|
||||
</menu>
|
||||
<menu action = 'WindowMenu'>
|
||||
<menuitem action='toggle-audio-midi-setup'/>
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ ArdourButton::Element ArdourButton::just_led_default_elements = ArdourButton::El
|
|||
|
||||
ArdourButton::ArdourButton (Element e)
|
||||
: _elements (e)
|
||||
, _icon (ArdourButton::NoIcon)
|
||||
, _tweaks (Tweaks (0))
|
||||
, _char_pixel_width (0)
|
||||
, _char_pixel_height (0)
|
||||
|
|
@ -77,6 +78,8 @@ ArdourButton::ArdourButton (Element e)
|
|||
, text_inactive_color(0)
|
||||
, led_active_color(0)
|
||||
, led_inactive_color(0)
|
||||
, led_custom_color (0)
|
||||
, use_custom_led_color (false)
|
||||
, convex_pattern (0)
|
||||
, concave_pattern (0)
|
||||
, led_inset_pattern (0)
|
||||
|
|
@ -113,6 +116,8 @@ ArdourButton::ArdourButton (const std::string& str, Element e)
|
|||
, text_inactive_color(0)
|
||||
, led_active_color(0)
|
||||
, led_inactive_color(0)
|
||||
, led_custom_color (0)
|
||||
, use_custom_led_color (false)
|
||||
, convex_pattern (0)
|
||||
, concave_pattern (0)
|
||||
, led_inset_pattern (0)
|
||||
|
|
@ -194,6 +199,13 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
uint32_t text_color;
|
||||
uint32_t led_color;
|
||||
|
||||
#ifdef __APPLE__
|
||||
const double dpiscale = 1.0;
|
||||
#else
|
||||
const double dpiscale = ARDOUR_UI::config()->get_font_scale () / 102400.;
|
||||
#endif
|
||||
const double corner_radius = std::max(2.0, _corner_radius * dpiscale);
|
||||
|
||||
if (_update_colors) {
|
||||
set_colors ();
|
||||
}
|
||||
|
|
@ -209,6 +221,10 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
led_color = led_inactive_color;
|
||||
}
|
||||
|
||||
if (use_custom_led_color) {
|
||||
led_color = led_custom_color;
|
||||
}
|
||||
|
||||
void (*rounded_function)(cairo_t*, double, double, double, double, double);
|
||||
|
||||
switch (_corner_mask) {
|
||||
|
|
@ -230,14 +246,14 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
|
||||
// draw edge (filling a rect underneath, rather than stroking a border on top, allows the corners to be lighter-weight.
|
||||
if ((_elements & (Body|Edge)) == (Body|Edge)) {
|
||||
rounded_function (cr, 0, 0, get_width(), get_height(), _corner_radius + 1.5);
|
||||
rounded_function (cr, 0, 0, get_width(), get_height(), corner_radius + 1.5);
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 1);
|
||||
cairo_fill(cr);
|
||||
}
|
||||
|
||||
// background fill
|
||||
if ((_elements & Body)==Body) {
|
||||
rounded_function (cr, 1, 1, get_width() - 2, get_height() - 2, _corner_radius);
|
||||
rounded_function (cr, 1, 1, get_width() - 2, get_height() - 2, corner_radius);
|
||||
if (active_state() == Gtkmm2ext::ImplicitActive && !((_elements & Indicator)==Indicator)) {
|
||||
ArdourCanvas::set_source_rgba (cr, fill_inactive_color);
|
||||
cairo_fill (cr);
|
||||
|
|
@ -256,7 +272,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
if ((_elements & Body)==Body) {
|
||||
if (active_state() == Gtkmm2ext::ImplicitActive && !((_elements & Indicator)==Indicator)) {
|
||||
cairo_set_line_width (cr, 2.0);
|
||||
rounded_function (cr, 2, 2, get_width() - 4, get_height() - 4, _corner_radius-0.5);
|
||||
rounded_function (cr, 2, 2, get_width() - 4, get_height() - 4, corner_radius-0.5);
|
||||
ArdourCanvas::set_source_rgba (cr, fill_active_color);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
|
|
@ -264,18 +280,25 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
|
||||
//show the "convex" or "concave" gradient
|
||||
if (!_flat_buttons) {
|
||||
if ( active_state() == Gtkmm2ext::ExplicitActive && !((_elements & Indicator)==Indicator) ) {
|
||||
if ( active_state() == Gtkmm2ext::ExplicitActive && ( !((_elements & Indicator)==Indicator) || use_custom_led_color) ) {
|
||||
//concave
|
||||
cairo_set_source (cr, concave_pattern);
|
||||
Gtkmm2ext::rounded_rectangle (cr, 1, 1, get_width() - 2, get_height() - 2, _corner_radius);
|
||||
Gtkmm2ext::rounded_rectangle (cr, 1, 1, get_width() - 2, get_height() - 2, corner_radius);
|
||||
cairo_fill (cr);
|
||||
} else {
|
||||
cairo_set_source (cr, convex_pattern);
|
||||
Gtkmm2ext::rounded_rectangle (cr, 1, 1, get_width() - 2, get_height() - 2, _corner_radius);
|
||||
Gtkmm2ext::rounded_rectangle (cr, 1, 1, get_width() - 2, get_height() - 2, corner_radius);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
}
|
||||
|
||||
#define VECTORICONSTROKEFILL(fillalpha) \
|
||||
cairo_set_line_width(cr, 1.5); \
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 1.0); \
|
||||
cairo_stroke_preserve(cr); \
|
||||
cairo_set_source_rgba (cr, 1, 1, 1, (fillalpha)); \
|
||||
cairo_fill(cr);
|
||||
|
||||
//Pixbuf, if any
|
||||
if (_pixbuf) {
|
||||
double x = rint((get_width() - _pixbuf->get_width()) * .5);
|
||||
|
|
@ -297,8 +320,10 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
gdk_cairo_set_source_pixbuf (cr, _pixbuf->gobj(), x, y);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
else // rec-en is exclusive to pixbuf (tape machine mode, rec-en)
|
||||
if ((_elements & (RecButton|RecTapeMode)) == (RecButton|RecTapeMode)) {
|
||||
else /* VectorIcons are exclusive to Pixbuf Icons */
|
||||
/* TODO separate these into dedicated class
|
||||
* it may also be efficient to render them only once for every size (image-surface) */
|
||||
if ((_elements & VectorIcon) && _icon == RecTapeMode) {
|
||||
const double x = get_width() * .5;
|
||||
const double y = get_height() * .5;
|
||||
const double r = std::min(10., std::min(x, y) * .6); // TODO we need a better way to limit max. radius.
|
||||
|
|
@ -307,10 +332,11 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
cairo_translate(cr, x, y);
|
||||
|
||||
cairo_arc (cr, 0, 0, r, 0, 2 * M_PI);
|
||||
if (active_state() == Gtkmm2ext::ExplicitActive)
|
||||
if (active_state() == Gtkmm2ext::ExplicitActive) {
|
||||
cairo_set_source_rgba (cr, .95, .1, .1, 1.);
|
||||
else
|
||||
} else {
|
||||
cairo_set_source_rgba (cr, .95, .44, .44, 1.); // #f46f6f
|
||||
}
|
||||
cairo_fill_preserve(cr);
|
||||
cairo_set_source_rgba (cr, .0, .0, .0, .5);
|
||||
cairo_set_line_width(cr, 1);
|
||||
|
|
@ -355,7 +381,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
|
||||
cairo_restore(cr);
|
||||
}
|
||||
else if (_elements & RecButton) {
|
||||
else if ((_elements & VectorIcon) && _icon == RecButton) {
|
||||
const double x = get_width() * .5;
|
||||
const double y = get_height() * .5;
|
||||
const double r = std::min(10., std::min(x, y) * .55); // TODO we need a better way to limit max. radius.
|
||||
|
|
@ -369,7 +395,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
cairo_set_line_width(cr, 1);
|
||||
cairo_stroke(cr);
|
||||
}
|
||||
else if (_elements & CloseCross) {
|
||||
else if ((_elements & VectorIcon) && _icon == CloseCross) {
|
||||
const double x = get_width() * .5;
|
||||
const double y = get_height() * .5;
|
||||
const double o = .5 + std::min(x, y) * .4;
|
||||
|
|
@ -381,6 +407,224 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
cairo_line_to(cr, x-o, y+o);
|
||||
cairo_stroke(cr);
|
||||
}
|
||||
else if ((_elements & VectorIcon) && _icon == StripWidth) {
|
||||
const double x0 = get_width() * .2;
|
||||
const double x1 = get_width() * .8;
|
||||
|
||||
const double y0 = get_height() * .25;
|
||||
const double y1= get_height() * .75;
|
||||
|
||||
const double ym= get_height() * .5;
|
||||
|
||||
// arrow
|
||||
const double xa0= get_height() * .39;
|
||||
const double xa1= get_height() * .61;
|
||||
const double ya0= get_height() * .35;
|
||||
const double ya1= get_height() * .65;
|
||||
|
||||
ArdourCanvas::set_source_rgba (cr, text_color);
|
||||
cairo_set_line_width(cr, 1);
|
||||
|
||||
// left + right
|
||||
cairo_move_to(cr, x0, y0);
|
||||
cairo_line_to(cr, x0, y1);
|
||||
cairo_move_to(cr, x1, y0);
|
||||
cairo_line_to(cr, x1, y1);
|
||||
|
||||
// horiz center line
|
||||
cairo_move_to(cr, x0, ym);
|
||||
cairo_line_to(cr, x1, ym);
|
||||
|
||||
// arrow left
|
||||
cairo_move_to(cr, x0, ym);
|
||||
cairo_line_to(cr, xa0, ya0);
|
||||
cairo_move_to(cr, x0, ym);
|
||||
cairo_line_to(cr, xa0, ya1);
|
||||
|
||||
// arrow right
|
||||
cairo_move_to(cr, x1, ym);
|
||||
cairo_line_to(cr, xa1, ya0);
|
||||
cairo_move_to(cr, x1, ym);
|
||||
cairo_line_to(cr, xa1, ya1);
|
||||
cairo_stroke(cr);
|
||||
}
|
||||
else if ((_elements & VectorIcon) && _icon == DinMidi) {
|
||||
const double x = get_width() * .5;
|
||||
const double y = get_height() * .5;
|
||||
const double r = std::min(x, y) * .75;
|
||||
ArdourCanvas::set_source_rgba (cr, text_color);
|
||||
cairo_set_line_width(cr, 1);
|
||||
cairo_arc (cr, x, y, r, 0, 2 * M_PI);
|
||||
cairo_stroke(cr);
|
||||
|
||||
// pins equally spaced 45deg
|
||||
cairo_arc (cr, x, y * 0.5, r * .15, 0, 2 * M_PI);
|
||||
cairo_fill(cr);
|
||||
cairo_arc (cr, x * 0.5, y, r * .15, 0, 2 * M_PI);
|
||||
cairo_fill(cr);
|
||||
cairo_arc (cr, x * 1.5, y, r * .15, 0, 2 * M_PI);
|
||||
cairo_fill(cr);
|
||||
// .5 + .5 * .5 * sin(45deg), 1.5 - .5 * .5 * cos(45deg)
|
||||
cairo_arc (cr, x * 0.677, y * .677, r * .15, 0, 2 * M_PI);
|
||||
cairo_fill(cr);
|
||||
cairo_arc (cr, x * 1.323, y * .677, r * .15, 0, 2 * M_PI);
|
||||
cairo_fill(cr);
|
||||
|
||||
// bottom notch
|
||||
cairo_arc (cr, x, y+r, r * .28, 1.05 * M_PI, 1.95 * M_PI);
|
||||
cairo_stroke(cr);
|
||||
}
|
||||
else if ((_elements & VectorIcon) && _icon == TransportStop) {
|
||||
const int wh = std::min (get_width(), get_height());
|
||||
cairo_rectangle (cr,
|
||||
(get_width() - wh) * .5 + wh * .25,
|
||||
(get_height() - wh) * .5 + wh * .25,
|
||||
wh * .5, wh * .5);
|
||||
|
||||
VECTORICONSTROKEFILL(0.8);
|
||||
}
|
||||
else if ((_elements & VectorIcon) && _icon == TransportPlay) {
|
||||
const int wh = std::min (get_width(), get_height()) * .5;
|
||||
const double y = get_height() * .5;
|
||||
const double x = get_width() - wh;
|
||||
|
||||
const float tri = ceil(.577 * wh); // 1/sqrt(3)
|
||||
|
||||
cairo_move_to (cr, x + wh * .5, y);
|
||||
cairo_line_to (cr, x - wh * .5, y - tri);
|
||||
cairo_line_to (cr, x - wh * .5, y + tri);
|
||||
cairo_close_path (cr);
|
||||
|
||||
VECTORICONSTROKEFILL(0.8);
|
||||
}
|
||||
else if ((_elements & VectorIcon) && _icon == TransportPanic) {
|
||||
const int wh = std::min (get_width(), get_height()) * .1;
|
||||
const double xc = get_width() * .5;
|
||||
const double yh = get_height();
|
||||
cairo_rectangle (cr,
|
||||
xc - wh, yh *.2,
|
||||
wh * 2, yh *.4);
|
||||
VECTORICONSTROKEFILL(0.8);
|
||||
|
||||
cairo_arc (cr, xc, yh *.75, wh, 0, 2 * M_PI);
|
||||
VECTORICONSTROKEFILL(0.8);
|
||||
}
|
||||
else if ((_elements & VectorIcon) && (_icon == TransportStart || _icon == TransportEnd || _icon == TransportRange)) {
|
||||
// small play triangle
|
||||
int wh = std::min (get_width(), get_height());
|
||||
const double y = get_height() * .5;
|
||||
const double x = get_width() - wh * .5;
|
||||
wh *= .18;
|
||||
const float tri = ceil(.577 * wh * 2); // 1/sqrt(3)
|
||||
|
||||
const float ln = std::min (get_width(), get_height()) * .07;
|
||||
|
||||
if (_icon == TransportStart || _icon == TransportRange) {
|
||||
cairo_rectangle (cr,
|
||||
x - wh - ln, y - tri * 1.7,
|
||||
ln * 2, tri * 3.4);
|
||||
|
||||
VECTORICONSTROKEFILL(1.0);
|
||||
}
|
||||
|
||||
if (_icon == TransportEnd || _icon == TransportRange) {
|
||||
cairo_rectangle (cr,
|
||||
x + wh - ln, y - tri * 1.7,
|
||||
ln * 2, tri * 3.4);
|
||||
|
||||
VECTORICONSTROKEFILL(1.0);
|
||||
}
|
||||
|
||||
if (_icon == TransportStart) {
|
||||
cairo_move_to (cr, x - wh, y);
|
||||
cairo_line_to (cr, x + wh, y - tri);
|
||||
cairo_line_to (cr, x + wh, y + tri);
|
||||
} else {
|
||||
cairo_move_to (cr, x + wh, y);
|
||||
cairo_line_to (cr, x - wh, y - tri);
|
||||
cairo_line_to (cr, x - wh, y + tri);
|
||||
}
|
||||
|
||||
cairo_close_path (cr);
|
||||
VECTORICONSTROKEFILL(1.0);
|
||||
}
|
||||
else if ((_elements & VectorIcon) && _icon == TransportLoop) {
|
||||
const double x = get_width() * .5;
|
||||
const double y = get_height() * .5;
|
||||
const double r = std::min(x, y);
|
||||
|
||||
cairo_arc (cr, x, y, r * .6, 0, 2 * M_PI);
|
||||
cairo_arc_negative (cr, x, y, r * .3, 2 * M_PI, 0);
|
||||
|
||||
VECTORICONSTROKEFILL(1.0);
|
||||
#define ARCARROW(rad, ang) \
|
||||
x + (rad) * sin((ang) * 2.0 * M_PI), y + (rad) * cos((ang) * 2.0 * M_PI)
|
||||
|
||||
cairo_move_to (cr, ARCARROW(r * .30, .72));
|
||||
cairo_line_to (cr, ARCARROW(r * .08, .72));
|
||||
cairo_line_to (cr, ARCARROW(r * .54, .60));
|
||||
cairo_line_to (cr, ARCARROW(r * .73, .72));
|
||||
cairo_line_to (cr, ARCARROW(r * .60, .72));
|
||||
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 1.0);
|
||||
cairo_stroke_preserve(cr);
|
||||
cairo_close_path (cr);
|
||||
cairo_set_source_rgba (cr, 1, 1, 1, 1.0);
|
||||
cairo_fill(cr);
|
||||
#undef ARCARROW
|
||||
}
|
||||
else if ((_elements & VectorIcon) && _icon == TransportMetronom) {
|
||||
const double x = get_width() * .5;
|
||||
const double y = get_height() * .5;
|
||||
const double wh = std::min(x, y);
|
||||
const double h = wh * .8;
|
||||
const double w = wh * .5;
|
||||
const double lw = w * .25;
|
||||
|
||||
cairo_rectangle (cr,
|
||||
x - w * .7, y + h * .25,
|
||||
w * 1.4, lw);
|
||||
|
||||
VECTORICONSTROKEFILL(1.0);
|
||||
|
||||
cairo_move_to (cr, x - w, y + h);
|
||||
cairo_line_to (cr, x + w, y + h);
|
||||
cairo_line_to (cr, x + w * .35, y - h);
|
||||
cairo_line_to (cr, x - w * .35, y - h);
|
||||
cairo_line_to (cr, x - w, y + h);
|
||||
|
||||
cairo_move_to (cr, x - w + lw, y + h -lw);
|
||||
cairo_line_to (cr, x - w * .35 + lw, y - h + lw);
|
||||
cairo_line_to (cr, x + w * .35 - lw, y - h + lw);
|
||||
cairo_line_to (cr, x + w - lw, y + h -lw);
|
||||
cairo_line_to (cr, x - w + lw, y + h -lw);
|
||||
|
||||
VECTORICONSTROKEFILL(1.0);
|
||||
|
||||
// ddx = .70 w = .75 * .5 wh = .375 wh
|
||||
// ddy = .75 h - lw = .75 * .8 wh - wh .5 * .2 = .5 wh
|
||||
// ang = (ddx/ddy):
|
||||
// -> angle = atan (ang) = atan (375 / .5) ~= 36deg
|
||||
const double dx = lw * .2; // 1 - cos(tan^-1(ang))
|
||||
const double dy = lw * .4; // 1 - sin(tan^-1(ang))
|
||||
cairo_move_to (cr, x - w * .3 , y + h * .25 + lw * .5);
|
||||
cairo_line_to (cr, x - w + dx , y - h + lw + dy);
|
||||
cairo_line_to (cr, x - w + lw , y - h + lw);
|
||||
cairo_line_to (cr, x - w * .3 + lw, y + h * .25 + lw * .5);
|
||||
cairo_close_path (cr);
|
||||
|
||||
VECTORICONSTROKEFILL(1.0);
|
||||
|
||||
cairo_rectangle (cr,
|
||||
x - w * .7, y + h * .25,
|
||||
w * 1.4, lw);
|
||||
cairo_fill(cr);
|
||||
}
|
||||
else if (_elements & VectorIcon) {
|
||||
// missing icon
|
||||
assert(0);
|
||||
}
|
||||
#undef VECTORICONSTROKEFILL
|
||||
|
||||
const int text_margin = char_pixel_width();
|
||||
// Text, if any
|
||||
|
|
@ -500,12 +744,12 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
|
||||
//black ring
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
cairo_arc (cr, 0, 0, _diameter * .5 - 1, 0, 2 * M_PI);
|
||||
cairo_arc (cr, 0, 0, _diameter * .5 - 1 * dpiscale, 0, 2 * M_PI);
|
||||
cairo_fill(cr);
|
||||
|
||||
//led color
|
||||
ArdourCanvas::set_source_rgba (cr, led_color);
|
||||
cairo_arc (cr, 0, 0, _diameter * .5 - 3, 0, 2 * M_PI);
|
||||
cairo_arc (cr, 0, 0, _diameter * .5 - 3 * dpiscale, 0, 2 * M_PI);
|
||||
cairo_fill(cr);
|
||||
|
||||
cairo_restore (cr);
|
||||
|
|
@ -513,7 +757,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
|
||||
// a transparent overlay to indicate insensitivity
|
||||
if ((visual_state() & Gtkmm2ext::Insensitive)) {
|
||||
rounded_function (cr, 0, 0, get_width(), get_height(), _corner_radius);
|
||||
rounded_function (cr, 0, 0, get_width(), get_height(), corner_radius);
|
||||
uint32_t ins_color = ARDOUR_UI::config()->color ("gtk_background");
|
||||
ArdourCanvas::set_source_rgb_a (cr, ins_color, 0.6);
|
||||
cairo_fill (cr);
|
||||
|
|
@ -523,7 +767,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
if (ARDOUR_UI::config()->get_widget_prelight()
|
||||
&& !((visual_state() & Gtkmm2ext::Insensitive))) {
|
||||
if (_hovering) {
|
||||
rounded_function (cr, 1, 1, get_width() - 2, get_height() - 2, _corner_radius);
|
||||
rounded_function (cr, 1, 1, get_width() - 2, get_height() - 2, corner_radius);
|
||||
cairo_set_source_rgba (cr, 0.905, 0.917, 0.925, 0.2);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
|
|
@ -531,7 +775,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
|
||||
//user is currently pressing the button. dark outline helps to indicate this
|
||||
if (_grabbed && !(_elements & (Inactive|Menu))) {
|
||||
rounded_function (cr, 1, 1, get_width() - 2, get_height() - 2, _corner_radius);
|
||||
rounded_function (cr, 1, 1, get_width() - 2, get_height() - 2, corner_radius);
|
||||
cairo_set_line_width(cr, 2);
|
||||
cairo_set_source_rgba (cr, 0.1, 0.1, 0.1, .5);
|
||||
cairo_stroke (cr);
|
||||
|
|
@ -541,7 +785,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
if (visual_state() & Gtkmm2ext::Selected) {
|
||||
cairo_set_line_width(cr, 1);
|
||||
cairo_set_source_rgba (cr, 1, 0, 0, 0.8);
|
||||
rounded_function (cr, 0.5, 0.5, get_width() - 1, get_height() - 1, _corner_radius);
|
||||
rounded_function (cr, 0.5, 0.5, get_width() - 1, get_height() - 1, corner_radius);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
|
||||
|
|
@ -551,7 +795,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
// (the editor is always the first receiver for KeyDown).
|
||||
// It's needed for eg. the engine-dialog at startup or after closing a sesion.
|
||||
if (_focused) {
|
||||
rounded_function (cr, 1.5, 1.5, get_width() - 3, get_height() - 3, _corner_radius);
|
||||
rounded_function (cr, 1.5, 1.5, get_width() - 3, get_height() - 3, corner_radius);
|
||||
cairo_set_source_rgba (cr, 0.905, 0.917, 0.925, 0.8);
|
||||
double dashes = 1;
|
||||
cairo_set_dash (cr, &dashes, 1, 0);
|
||||
|
|
@ -587,7 +831,7 @@ ArdourButton::on_size_request (Gtk::Requisition* req)
|
|||
CairoWidget::on_size_request (req);
|
||||
|
||||
if (_diameter == 0) {
|
||||
const float newdia = rint (ARDOUR_UI::config()->get_font_scale () / 9600.0); // 11px with 100% font-scaling
|
||||
const float newdia = rint (char_pixel_height());
|
||||
if (_diameter != newdia) {
|
||||
_pattern_height = 0;
|
||||
_diameter = newdia;
|
||||
|
|
@ -619,7 +863,7 @@ ArdourButton::on_size_request (Gtk::Requisition* req)
|
|||
req->width += _diameter + 4;
|
||||
}
|
||||
|
||||
if (_elements & (RecButton | CloseCross)) {
|
||||
if (_elements & VectorIcon) {
|
||||
assert(!(_elements & Text));
|
||||
const int wh = std::max (rint (TRACKHEADERBTNW * char_avg_pixel_width()), ceil (char_pixel_height() * BASELINESTRETCH + 1.));
|
||||
req->width += wh;
|
||||
|
|
@ -785,7 +1029,7 @@ ArdourButton::on_button_press_event (GdkEventButton *ev)
|
|||
{
|
||||
focus_handler ();
|
||||
|
||||
if ((_elements & Indicator) && _led_rect && _distinct_led_click) {
|
||||
if (ev->button == 1 && (_elements & Indicator) && _led_rect && _distinct_led_click) {
|
||||
if (ev->x >= _led_rect->x && ev->x < _led_rect->x + _led_rect->width &&
|
||||
ev->y >= _led_rect->y && ev->y < _led_rect->y + _led_rect->height) {
|
||||
return true;
|
||||
|
|
@ -799,7 +1043,7 @@ ArdourButton::on_button_press_event (GdkEventButton *ev)
|
|||
_grabbed = true;
|
||||
CairoWidget::set_dirty ();
|
||||
|
||||
if (!_act_on_release) {
|
||||
if (ev->button == 1 && !_act_on_release) {
|
||||
if (_action) {
|
||||
_action->activate ();
|
||||
return true;
|
||||
|
|
@ -815,7 +1059,7 @@ ArdourButton::on_button_press_event (GdkEventButton *ev)
|
|||
bool
|
||||
ArdourButton::on_button_release_event (GdkEventButton *ev)
|
||||
{
|
||||
if (_hovering && (_elements & Indicator) && _led_rect && _distinct_led_click) {
|
||||
if (ev->button == 1 && _hovering && (_elements & Indicator) && _led_rect && _distinct_led_click) {
|
||||
if (ev->x >= _led_rect->x && ev->x < _led_rect->x + _led_rect->width &&
|
||||
ev->y >= _led_rect->y && ev->y < _led_rect->y + _led_rect->height) {
|
||||
signal_led_clicked(); /* EMIT SIGNAL */
|
||||
|
|
@ -826,7 +1070,7 @@ ArdourButton::on_button_release_event (GdkEventButton *ev)
|
|||
_grabbed = false;
|
||||
CairoWidget::set_dirty ();
|
||||
|
||||
if (_hovering) {
|
||||
if (ev->button == 1 && _hovering) {
|
||||
signal_clicked ();
|
||||
if (_act_on_release) {
|
||||
if (_action) {
|
||||
|
|
@ -1085,7 +1329,7 @@ ArdourButton::action_sensitivity_changed ()
|
|||
}
|
||||
|
||||
void
|
||||
ArdourButton::set_layout_ellisize_width (int w)
|
||||
ArdourButton::set_layout_ellipsize_width (int w)
|
||||
{
|
||||
if (_layout_ellipsize_width == w) {
|
||||
return;
|
||||
|
|
@ -1094,8 +1338,11 @@ ArdourButton::set_layout_ellisize_width (int w)
|
|||
if (!_layout) {
|
||||
return;
|
||||
}
|
||||
if (_layout_ellipsize_width > 0) {
|
||||
_layout->set_width (_layout_ellipsize_width);
|
||||
if (_layout_ellipsize_width > 3 * PANGO_SCALE) {
|
||||
_layout->set_width (_layout_ellipsize_width - 3 * PANGO_SCALE);
|
||||
}
|
||||
if (is_realized ()) {
|
||||
queue_resize ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1110,8 +1357,8 @@ ArdourButton::set_text_ellipsize (Pango::EllipsizeMode e)
|
|||
return;
|
||||
}
|
||||
_layout->set_ellipsize(_ellipsis);
|
||||
if (_layout_ellipsize_width > 0) {
|
||||
_layout->set_width (_layout_ellipsize_width);
|
||||
if (_layout_ellipsize_width > 3 * PANGO_SCALE) {
|
||||
_layout->set_width (_layout_ellipsize_width - 3 * PANGO_SCALE);
|
||||
}
|
||||
if (is_realized ()) {
|
||||
queue_resize ();
|
||||
|
|
@ -1125,8 +1372,8 @@ ArdourButton::ensure_layout ()
|
|||
ensure_style ();
|
||||
_layout = Pango::Layout::create (get_pango_context());
|
||||
_layout->set_ellipsize(_ellipsis);
|
||||
if (_layout_ellipsize_width > 0) {
|
||||
_layout->set_width (_layout_ellipsize_width);
|
||||
if (_layout_ellipsize_width > 3 * PANGO_SCALE) {
|
||||
_layout->set_width (_layout_ellipsize_width - 3* PANGO_SCALE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1183,3 +1430,22 @@ ArdourButton::add_elements (Element e)
|
|||
_elements = (ArdourButton::Element) (_elements | e);
|
||||
CairoWidget::set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
ArdourButton::set_icon (Icon i)
|
||||
{
|
||||
_icon = i;
|
||||
CairoWidget::set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
ArdourButton::set_custom_led_color (uint32_t c, bool useit)
|
||||
{
|
||||
if (led_custom_color == c && use_custom_led_color == useit) {
|
||||
return;
|
||||
}
|
||||
|
||||
led_custom_color = c;
|
||||
use_custom_led_color = useit;
|
||||
CairoWidget::set_dirty ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,9 +40,24 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
|||
unused = 0x10,
|
||||
Menu = 0x20,
|
||||
Inactive = 0x40, // no _action is defined AND state is not used
|
||||
RecButton = 0x80, // tentative, see commit message
|
||||
RecTapeMode = 0x100, // tentative
|
||||
CloseCross = 0x200, // tentative
|
||||
VectorIcon = 0x80, // tentative, see commit message
|
||||
};
|
||||
|
||||
enum Icon {
|
||||
NoIcon,
|
||||
RecButton,
|
||||
RecTapeMode,
|
||||
CloseCross,
|
||||
StripWidth,
|
||||
DinMidi,
|
||||
TransportStop,
|
||||
TransportPlay,
|
||||
TransportLoop,
|
||||
TransportRange,
|
||||
TransportStart,
|
||||
TransportEnd,
|
||||
TransportPanic,
|
||||
TransportMetronom,
|
||||
};
|
||||
|
||||
static Element default_elements;
|
||||
|
|
@ -65,12 +80,17 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
|||
void set_active_state (Gtkmm2ext::ActiveState);
|
||||
void set_visual_state (Gtkmm2ext::VisualState);
|
||||
|
||||
void set_custom_led_color (const uint32_t c, const bool useit = true);
|
||||
|
||||
void set_act_on_release (bool onRelease) { _act_on_release = onRelease; }
|
||||
|
||||
Element elements() const { return _elements; }
|
||||
void set_elements (Element);
|
||||
void add_elements (Element);
|
||||
|
||||
Icon icon() const { return _icon; }
|
||||
void set_icon (Icon);
|
||||
|
||||
void set_corner_radius (float);
|
||||
|
||||
void set_text (const std::string&);
|
||||
|
|
@ -82,7 +102,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
|||
void set_led_left (bool yn);
|
||||
void set_distinct_led_click (bool yn);
|
||||
|
||||
void set_layout_ellisize_width (int w);
|
||||
void set_layout_ellipsize_width (int w);
|
||||
void set_layout_font (const Pango::FontDescription&);
|
||||
void set_text_ellipsize (Pango::EllipsizeMode);
|
||||
|
||||
|
|
@ -129,6 +149,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
|||
Glib::RefPtr<Gdk::Pixbuf> _pixbuf;
|
||||
std::string _text;
|
||||
Element _elements;
|
||||
Icon _icon;
|
||||
Tweaks _tweaks;
|
||||
BindingProxy binding_proxy;
|
||||
|
||||
|
|
@ -154,6 +175,8 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
|||
|
||||
uint32_t led_active_color;
|
||||
uint32_t led_inactive_color;
|
||||
uint32_t led_custom_color;
|
||||
bool use_custom_led_color;
|
||||
|
||||
cairo_pattern_t* convex_pattern;
|
||||
cairo_pattern_t* concave_pattern;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
|
|||
, _splash_pushed (false)
|
||||
{
|
||||
init ();
|
||||
set_position (Gtk::WIN_POS_MOUSE);
|
||||
set_position (Gtk::WIN_POS_CENTER);
|
||||
}
|
||||
|
||||
ArdourDialog::ArdourDialog (Gtk::Window& parent, string title, bool modal, bool use_seperator)
|
||||
|
|
@ -64,26 +64,19 @@ ArdourDialog::~ArdourDialog ()
|
|||
}
|
||||
|
||||
bool
|
||||
ArdourDialog::on_key_press_event (GdkEventKey* ev)
|
||||
ArdourDialog::on_focus_in_event (GdkEventFocus *ev)
|
||||
{
|
||||
if (!relay_key_press (ev, this)) {
|
||||
return Gtk::Window::on_key_press_event(ev);
|
||||
Keyboard::the_keyboard().focus_in_window (ev, this);
|
||||
return Dialog::on_focus_in_event (ev);
|
||||
}
|
||||
|
||||
bool
|
||||
ArdourDialog::on_focus_out_event (GdkEventFocus *ev)
|
||||
{
|
||||
if (!get_modal()) {
|
||||
Keyboard::the_keyboard().focus_out_window (ev, this);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ArdourDialog::on_enter_notify_event (GdkEventCrossing *ev)
|
||||
{
|
||||
Keyboard::the_keyboard().enter_window (ev, this);
|
||||
return Dialog::on_enter_notify_event (ev);
|
||||
}
|
||||
|
||||
bool
|
||||
ArdourDialog::on_leave_notify_event (GdkEventCrossing *ev)
|
||||
{
|
||||
Keyboard::the_keyboard().leave_window (ev, this);
|
||||
return Dialog::on_leave_notify_event (ev);
|
||||
return Dialog::on_focus_out_event (ev);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -119,7 +112,7 @@ void
|
|||
ArdourDialog::init ()
|
||||
{
|
||||
set_border_width (10);
|
||||
|
||||
add_events (Gdk::FOCUS_CHANGE_MASK);
|
||||
set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
|
||||
|
||||
Gtk::Window* parent = WM::Manager::instance().transient_parent();
|
||||
|
|
|
|||
|
|
@ -42,10 +42,9 @@ class ArdourDialog : public Gtk::Dialog, public ARDOUR::SessionHandlePtr
|
|||
ArdourDialog (Gtk::Window& parent, std::string title, bool modal = false, bool use_separator = false);
|
||||
~ArdourDialog();
|
||||
|
||||
bool on_enter_notify_event (GdkEventCrossing*);
|
||||
bool on_leave_notify_event (GdkEventCrossing*);
|
||||
bool on_focus_in_event (GdkEventFocus*);
|
||||
bool on_focus_out_event (GdkEventFocus*);
|
||||
bool on_delete_event (GdkEventAny*);
|
||||
bool on_key_press_event (GdkEventKey*);
|
||||
void on_unmap ();
|
||||
void on_show ();
|
||||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ typedef uint64_t microseconds_t;
|
|||
#include "big_clock_window.h"
|
||||
#include "bundle_manager.h"
|
||||
#include "engine_dialog.h"
|
||||
#include "export_video_dialog.h"
|
||||
#include "export_video_infobox.h"
|
||||
#include "gain_meter.h"
|
||||
#include "global_port_matrix.h"
|
||||
#include "gui_object.h"
|
||||
|
|
@ -155,6 +157,26 @@ ARDOUR_UI *ARDOUR_UI::theArdourUI = 0;
|
|||
sigc::signal<void, framepos_t, bool, framepos_t> ARDOUR_UI::Clock;
|
||||
sigc::signal<void> ARDOUR_UI::CloseAllDialogs;
|
||||
|
||||
|
||||
static bool
|
||||
ask_about_configuration_copy (string const & old_dir, string const & new_dir, int version)
|
||||
{
|
||||
MessageDialog msg (string_compose (_("%1 %2.x has discovered configuration files from %1 %3.x.\n\n"
|
||||
"Would you like these files to be copied and used for %1 %2.x?\n\n"
|
||||
"(This will require you to restart %1.)"),
|
||||
PROGRAM_NAME, PROGRAM_VERSION, version),
|
||||
false, /* no markup */
|
||||
Gtk::MESSAGE_INFO,
|
||||
Gtk::BUTTONS_YES_NO,
|
||||
true /* modal, though it hardly matters since it is the only window */
|
||||
);
|
||||
|
||||
msg.set_default_response (Gtk::RESPONSE_YES);
|
||||
msg.show_all ();
|
||||
|
||||
return (msg.run() == Gtk::RESPONSE_YES);
|
||||
}
|
||||
|
||||
ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||
|
||||
: Gtkmm2ext::UI (PROGRAM_NAME, argcp, argvp)
|
||||
|
|
@ -194,6 +216,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
, auditioning_alert_button (_("Audition"))
|
||||
, solo_alert_button (_("Solo"))
|
||||
, feedback_alert_button (_("Feedback"))
|
||||
, error_alert_button ( ArdourButton::just_led_default_elements )
|
||||
|
||||
, editor_meter(0)
|
||||
, editor_meter_peak_display()
|
||||
|
|
@ -206,6 +229,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
, location_ui (X_("locations"), _("Locations"))
|
||||
, route_params (X_("inspector"), _("Tracks and Busses"))
|
||||
, audio_midi_setup (X_("audio-midi-setup"), _("Audio/MIDI Setup"))
|
||||
, export_video_dialog (X_("video-export"), _("Video Export Dialog"))
|
||||
, session_option_editor (X_("session-options-editor"), _("Properties"), boost::bind (&ARDOUR_UI::create_session_option_editor, this))
|
||||
, add_video_dialog (X_("add-video"), _("Add Tracks/Busses"), boost::bind (&ARDOUR_UI::create_add_video_dialog, this))
|
||||
, bundle_manager (X_("bundle-manager"), _("Bundle Manager"), boost::bind (&ARDOUR_UI::create_bundle_manager, this))
|
||||
|
|
@ -213,13 +237,20 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
, audio_port_matrix (X_("audio-connection-manager"), _("Audio Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::AUDIO))
|
||||
, midi_port_matrix (X_("midi-connection-manager"), _("MIDI Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::MIDI))
|
||||
|
||||
, error_log_button (_("Errors"))
|
||||
|
||||
, _status_bar_visibility (X_("status-bar"))
|
||||
, _feedback_exists (false)
|
||||
, _log_not_acknowledged (LogLevelNone)
|
||||
{
|
||||
Gtkmm2ext::init(localedir);
|
||||
|
||||
if (ARDOUR::handle_old_configuration_files (boost::bind (ask_about_configuration_copy, _1, _2, _3))) {
|
||||
MessageDialog msg (string_compose (_("Your configuration files were copied. You can now restart %1."), PROGRAM_NAME), true);
|
||||
msg.run ();
|
||||
/* configuration was modified, exit immediately */
|
||||
_exit (0);
|
||||
}
|
||||
|
||||
|
||||
splash = 0;
|
||||
|
||||
_numpad_locate_happening = false;
|
||||
|
|
@ -358,6 +389,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
big_clock_window.set_state (*ui_xml);
|
||||
audio_port_matrix.set_state (*ui_xml);
|
||||
midi_port_matrix.set_state (*ui_xml);
|
||||
export_video_dialog.set_state (*ui_xml);
|
||||
}
|
||||
|
||||
WM::Manager::instance().register_window (&key_editor);
|
||||
|
|
@ -369,6 +401,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
WM::Manager::instance().register_window (&add_video_dialog);
|
||||
WM::Manager::instance().register_window (&route_params);
|
||||
WM::Manager::instance().register_window (&audio_midi_setup);
|
||||
WM::Manager::instance().register_window (&export_video_dialog);
|
||||
WM::Manager::instance().register_window (&bundle_manager);
|
||||
WM::Manager::instance().register_window (&location_ui);
|
||||
WM::Manager::instance().register_window (&big_clock_window);
|
||||
|
|
@ -434,7 +467,7 @@ ARDOUR_UI::engine_halted (const char* reason, bool free_reason)
|
|||
free it later.
|
||||
*/
|
||||
char *copy = strdup (reason);
|
||||
Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&ARDOUR_UI::engine_halted, this, copy, true));
|
||||
Gtkmm2ext::UI::instance()->call_slot (MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_halted, this, copy, true));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -461,7 +494,6 @@ the audio backend and save the session."), PROGRAM_NAME);
|
|||
|
||||
MessageDialog msg (*editor, msgstr);
|
||||
pop_back_splash (msg);
|
||||
msg.set_keep_above (true);
|
||||
msg.run ();
|
||||
|
||||
if (free_reason) {
|
||||
|
|
@ -489,7 +521,9 @@ ARDOUR_UI::post_engine ()
|
|||
|
||||
AudioEngine::instance()->Stopped.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_stopped, this), gui_context());
|
||||
AudioEngine::instance()->SampleRateChanged.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::update_sample_rate, this, _1), gui_context());
|
||||
AudioEngine::instance()->BufferSizeChanged.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::update_sample_rate, this, _1), gui_context());
|
||||
AudioEngine::instance()->Halted.connect_same_thread (halt_connection, boost::bind (&ARDOUR_UI::engine_halted, this, _1, false));
|
||||
AudioEngine::instance()->BecameSilent.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::audioengine_became_silent, this), gui_context());
|
||||
|
||||
_tooltips.enable();
|
||||
|
||||
|
|
@ -676,6 +710,13 @@ ARDOUR_UI::get_transport_controllable_state ()
|
|||
return *node;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::save_session_at_its_request (std::string snapshot_name)
|
||||
{
|
||||
if (_session) {
|
||||
_session->save_state (snapshot_name);
|
||||
}
|
||||
}
|
||||
|
||||
gint
|
||||
ARDOUR_UI::autosave_session ()
|
||||
|
|
@ -754,7 +795,7 @@ ARDOUR_UI::starting ()
|
|||
bool brand_new_user = ArdourStartup::required ();
|
||||
|
||||
app->ShouldQuit.connect (sigc::mem_fun (*this, &ARDOUR_UI::queue_finish));
|
||||
app->ShouldLoad.connect (sigc::mem_fun (*this, &ARDOUR_UI::idle_load));
|
||||
app->ShouldLoad.connect (sigc::mem_fun (*this, &ARDOUR_UI::load_from_application_api));
|
||||
|
||||
if (ARDOUR_COMMAND_LINE::check_announcements) {
|
||||
check_announcements ();
|
||||
|
|
@ -851,6 +892,50 @@ ARDOUR_UI::starting ()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NO_PLUGIN_STATE
|
||||
|
||||
ARDOUR::RecentSessions rs;
|
||||
ARDOUR::read_recent_sessions (rs);
|
||||
|
||||
string path = Glib::build_filename (user_config_directory(), ".iknowaboutfreeversion");
|
||||
|
||||
if (!Glib::file_test (path, Glib::FILE_TEST_EXISTS) && !rs.empty()) {
|
||||
|
||||
/* already used Ardour, have sessions ... warn about plugin state */
|
||||
|
||||
ArdourDialog d (_("Free/Demo Version Warning"), true);
|
||||
Label l;
|
||||
Button b (string_compose (_("Subscribe and support development of %1"), PROGRAM_NAME));
|
||||
CheckButton c (_("Don't warn me about this again"));
|
||||
|
||||
l.set_markup (string_compose (_("<span weight=\"bold\" size=\"large\">%1</span>\n\n<b>%2</b>\n\n<i>%3</i>\n\n%4"),
|
||||
string_compose (_("This is a free/demo version of %1"), PROGRAM_NAME),
|
||||
_("It will not restore OR save any plugin settings"),
|
||||
_("If you load an existing session with plugin settings\n"
|
||||
"they will not be used and will be lost."),
|
||||
_("To get full access to updates without this limitation\n"
|
||||
"consider becoming a subscriber for a low cost every month.")));
|
||||
l.set_justify (JUSTIFY_CENTER);
|
||||
|
||||
b.signal_clicked().connect (mem_fun(*this, &ARDOUR_UI::launch_subscribe));
|
||||
|
||||
d.get_vbox()->pack_start (l, true, true);
|
||||
d.get_vbox()->pack_start (b, false, false, 12);
|
||||
d.get_vbox()->pack_start (c, false, false, 12);
|
||||
|
||||
d.add_button (_("Quit now"), RESPONSE_CANCEL);
|
||||
d.add_button (string_compose (_("Continue using %1"), PROGRAM_NAME), RESPONSE_OK);
|
||||
|
||||
d.show_all ();
|
||||
|
||||
c.signal_toggled().connect (sigc::hide_return (sigc::bind (sigc::ptr_fun (toggle_file_existence), path)));
|
||||
|
||||
if (d.run () != RESPONSE_OK) {
|
||||
_exit (0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* go get a session */
|
||||
|
||||
const bool new_session_required = (ARDOUR_COMMAND_LINE::new_session || brand_new_user);
|
||||
|
|
@ -1020,7 +1105,6 @@ If you still wish to quit, please use the\n\n\
|
|||
close_all_dialogs ();
|
||||
|
||||
if (_session) {
|
||||
// _session->set_deletion_in_progress ();
|
||||
_session->set_clean ();
|
||||
_session->remove_pending_capture_state ();
|
||||
delete _session;
|
||||
|
|
@ -1084,7 +1168,6 @@ ARDOUR_UI::ask_about_saving_session (const vector<string>& actions)
|
|||
prompt_label.show();
|
||||
dimage->show();
|
||||
window.show();
|
||||
window.set_keep_above (true);
|
||||
window.present ();
|
||||
|
||||
ResponseType r = (ResponseType) window.run();
|
||||
|
|
@ -1129,7 +1212,8 @@ ARDOUR_UI::every_second ()
|
|||
void
|
||||
ARDOUR_UI::every_point_one_seconds ()
|
||||
{
|
||||
shuttle_box->update_speed_display ();
|
||||
// TODO get rid of this..
|
||||
// ShuttleControl is updated directly via TransportStateChange signal
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1188,7 +1272,7 @@ ARDOUR_UI::update_sample_rate (framecnt_t)
|
|||
|
||||
if (!AudioEngine::instance()->connected()) {
|
||||
|
||||
snprintf (buf, sizeof (buf), _("Audio: <span foreground=\"red\">none</span>"));
|
||||
snprintf (buf, sizeof (buf), "%s", _("Audio: <span foreground=\"red\">none</span>"));
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -1196,7 +1280,7 @@ ARDOUR_UI::update_sample_rate (framecnt_t)
|
|||
|
||||
if (rate == 0) {
|
||||
/* no sample rate available */
|
||||
snprintf (buf, sizeof (buf), _("Audio: <span foreground=\"red\">none</span>"));
|
||||
snprintf (buf, sizeof (buf), "%s", _("Audio: <span foreground=\"red\">none</span>"));
|
||||
} else {
|
||||
|
||||
if (fmod (rate, 1000.0) != 0.0) {
|
||||
|
|
@ -1342,7 +1426,7 @@ ARDOUR_UI::update_disk_space()
|
|||
snprintf (buf, sizeof (buf), "%s", _("Disk: <span foreground=\"green\">24hrs+</span>"));
|
||||
} else {
|
||||
rec_enabled_streams = 0;
|
||||
_session->foreach_route (this, &ARDOUR_UI::count_recenabled_streams);
|
||||
_session->foreach_route (this, &ARDOUR_UI::count_recenabled_streams, false);
|
||||
|
||||
framecnt_t frames = opt_frames.get_value_or (0);
|
||||
|
||||
|
|
@ -2254,6 +2338,7 @@ ARDOUR_UI::blink_handler (bool blink_on)
|
|||
sync_blink (blink_on);
|
||||
audition_blink (blink_on);
|
||||
feedback_blink (blink_on);
|
||||
error_blink (blink_on);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -2494,6 +2579,10 @@ ARDOUR_UI::save_state (const string & name, bool switch_to_it)
|
|||
|
||||
_session->add_extra_xml (*node);
|
||||
|
||||
if (export_video_dialog) {
|
||||
_session->add_extra_xml (export_video_dialog->get_state());
|
||||
}
|
||||
|
||||
save_state_canfail (name, switch_to_it);
|
||||
}
|
||||
|
||||
|
|
@ -2602,7 +2691,7 @@ ARDOUR_UI::edit_metadata ()
|
|||
{
|
||||
SessionMetadataEditor dialog;
|
||||
dialog.set_session (_session);
|
||||
editor->ensure_float (dialog);
|
||||
dialog.grab_focus ();
|
||||
dialog.run ();
|
||||
}
|
||||
|
||||
|
|
@ -2611,7 +2700,6 @@ ARDOUR_UI::import_metadata ()
|
|||
{
|
||||
SessionMetadataImporter dialog;
|
||||
dialog.set_session (_session);
|
||||
editor->ensure_float (dialog);
|
||||
dialog.run ();
|
||||
}
|
||||
|
||||
|
|
@ -2630,7 +2718,7 @@ ARDOUR_UI::ask_about_loading_existing_session (const std::string& session_path)
|
|||
msg.set_name (X_("OpenExistingDialog"));
|
||||
msg.set_title (_("Open Existing Session"));
|
||||
msg.set_wmclass (X_("existing_session"), PROGRAM_NAME);
|
||||
msg.set_position (Gtk::WIN_POS_MOUSE);
|
||||
msg.set_position (Gtk::WIN_POS_CENTER);
|
||||
pop_back_splash (msg);
|
||||
|
||||
switch (msg.run()) {
|
||||
|
|
@ -2692,19 +2780,16 @@ ARDOUR_UI::build_session_from_dialog (SessionDialog& sd, const std::string& sess
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::idle_load (const std::string& path)
|
||||
ARDOUR_UI::load_from_application_api (const std::string& path)
|
||||
{
|
||||
if (_session) {
|
||||
if (Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) {
|
||||
/* /path/to/foo => /path/to/foo, foo */
|
||||
load_session (path, basename_nosuffix (path));
|
||||
} else {
|
||||
/* /path/to/foo/foo.ardour => /path/to/foo, foo */
|
||||
load_session (Glib::path_get_dirname (path), basename_nosuffix (path));
|
||||
}
|
||||
ARDOUR_COMMAND_LINE::session_name = path;
|
||||
|
||||
if (Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) {
|
||||
/* /path/to/foo => /path/to/foo, foo */
|
||||
load_session (path, basename_nosuffix (path));
|
||||
} else {
|
||||
ARDOUR_COMMAND_LINE::session_name = path;
|
||||
/* /path/to/foo/foo.ardour => /path/to/foo, foo */
|
||||
load_session (Glib::path_get_dirname (path), basename_nosuffix (path));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3027,7 +3112,6 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
|
|||
Gtk::MESSAGE_INFO,
|
||||
BUTTONS_OK);
|
||||
|
||||
msg.set_keep_above (true);
|
||||
msg.set_title (_("Loading Error"));
|
||||
msg.set_position (Gtk::WIN_POS_CENTER);
|
||||
pop_back_splash (msg);
|
||||
|
|
@ -3051,8 +3135,7 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
|
|||
true,
|
||||
Gtk::MESSAGE_INFO,
|
||||
BUTTONS_OK);
|
||||
|
||||
msg.set_keep_above (true);
|
||||
|
||||
msg.set_title (_("Read-only Session"));
|
||||
msg.set_position (Gtk::WIN_POS_CENTER);
|
||||
pop_back_splash (msg);
|
||||
|
|
@ -3130,6 +3213,7 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name,
|
|||
XMLNode* n;
|
||||
n = Config->instant_xml (X_("Editor"));
|
||||
if (n) {
|
||||
n->remove_nodes_and_delete ("Selection"); // no not apply selection to new sessions.
|
||||
new_session->add_instant_xml (*n, false);
|
||||
}
|
||||
n = Config->instant_xml (X_("Mixer"));
|
||||
|
|
@ -3183,6 +3267,12 @@ ARDOUR_UI::launch_tracker ()
|
|||
PBD::open_uri ("http://tracker.ardour.org/bug_report_page.php");
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::launch_subscribe ()
|
||||
{
|
||||
PBD::open_uri ("https://community.ardour.org/s/subscribe");
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::launch_cheat_sheet ()
|
||||
{
|
||||
|
|
@ -3469,46 +3559,50 @@ ARDOUR_UI::flush_trash ()
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::setup_order_hint ()
|
||||
ARDOUR_UI::setup_order_hint (AddRouteDialog::InsertAt place)
|
||||
{
|
||||
uint32_t order_hint = 0;
|
||||
uint32_t order_hint = UINT32_MAX;
|
||||
|
||||
if (editor->get_selection().tracks.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
we want the new routes to have their order keys set starting from
|
||||
the highest order key in the selection + 1 (if available).
|
||||
*/
|
||||
if (add_route_dialog->get_transient_for () == mixer->get_toplevel()) {
|
||||
for (RouteUISelection::iterator s = mixer->selection().routes.begin(); s != mixer->selection().routes.end(); ++s) {
|
||||
if ((*s)->route()->order_key() > order_hint) {
|
||||
order_hint = (*s)->route()->order_key();
|
||||
}
|
||||
}
|
||||
|
||||
if (!mixer->selection().routes.empty()) {
|
||||
|
||||
if (place == AddRouteDialog::AfterSelection) {
|
||||
RouteTimeAxisView *rtav = dynamic_cast<RouteTimeAxisView*> (editor->get_selection().tracks.back());
|
||||
if (rtav) {
|
||||
order_hint = rtav->route()->order_key();
|
||||
order_hint++;
|
||||
}
|
||||
|
||||
} else if (place == AddRouteDialog::BeforeSelection) {
|
||||
RouteTimeAxisView *rtav = dynamic_cast<RouteTimeAxisView*> (editor->get_selection().tracks.front());
|
||||
if (rtav) {
|
||||
order_hint = rtav->route()->order_key();
|
||||
}
|
||||
} else if (place == AddRouteDialog::First) {
|
||||
order_hint = 0;
|
||||
} else {
|
||||
for (TrackSelection::iterator s = editor->get_selection().tracks.begin(); s != editor->get_selection().tracks.end(); ++s) {
|
||||
RouteTimeAxisView* tav = dynamic_cast<RouteTimeAxisView*> (*s);
|
||||
if (tav && tav->route() && tav->route()->order_key() > order_hint) {
|
||||
order_hint = tav->route()->order_key();
|
||||
}
|
||||
}
|
||||
/* leave order_hint at UINT32_MAX */
|
||||
}
|
||||
|
||||
if (!editor->get_selection().tracks.empty()) {
|
||||
order_hint++;
|
||||
}
|
||||
if (order_hint == UINT32_MAX) {
|
||||
/** AddRouteDialog::Last or selection with first/last not a RouteTimeAxisView
|
||||
* not setting an order hint will place new routes last.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
_session->set_order_hint (order_hint);
|
||||
|
||||
/* create a gap in the existing route order keys to accomodate new routes.*/
|
||||
|
||||
boost::shared_ptr <RouteList> rd = _session->get_routes();
|
||||
for (RouteList::iterator ri = rd->begin(); ri != rd->end(); ++ri) {
|
||||
boost::shared_ptr<Route> rt (*ri);
|
||||
|
||||
|
||||
if (rt->is_monitor()) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -3520,7 +3614,7 @@ ARDOUR_UI::setup_order_hint ()
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::add_route (Gtk::Window* float_window)
|
||||
ARDOUR_UI::add_route (Gtk::Window* /* ignored */)
|
||||
{
|
||||
int count;
|
||||
|
||||
|
|
@ -3533,11 +3627,6 @@ ARDOUR_UI::add_route (Gtk::Window* float_window)
|
|||
return;
|
||||
}
|
||||
|
||||
if (float_window) {
|
||||
add_route_dialog->unset_transient_for ();
|
||||
add_route_dialog->set_transient_for (*float_window);
|
||||
}
|
||||
|
||||
ResponseType r = (ResponseType) add_route_dialog->run ();
|
||||
|
||||
add_route_dialog->hide();
|
||||
|
|
@ -3554,7 +3643,7 @@ ARDOUR_UI::add_route (Gtk::Window* float_window)
|
|||
return;
|
||||
}
|
||||
|
||||
setup_order_hint();
|
||||
setup_order_hint(add_route_dialog->insert_at());
|
||||
|
||||
string template_path = add_route_dialog->track_template();
|
||||
DisplaySuspender ds;
|
||||
|
|
@ -3648,7 +3737,7 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg)
|
|||
int firsttime = 0;
|
||||
while (!ARDOUR_UI::instance()->video_timeline->check_server()) {
|
||||
if (firsttime++) {
|
||||
warning << _("Could not connect to the Video Server. Start it or configure its access URL in Edit -> Preferences.") << endmsg;
|
||||
warning << _("Could not connect to the Video Server. Start it or configure its access URL in Preferences.") << endmsg;
|
||||
}
|
||||
VideoServerDialog *video_server_dialog = new VideoServerDialog (_session);
|
||||
if (float_window) {
|
||||
|
|
@ -3753,7 +3842,7 @@ ARDOUR_UI::add_video (Gtk::Window* float_window)
|
|||
}
|
||||
|
||||
if (!start_video_server(float_window, false)) {
|
||||
warning << _("Could not connect to the Video Server. Start it or configure its access URL in Edit -> Preferences.") << endmsg;
|
||||
warning << _("Could not connect to the Video Server. Start it or configure its access URL in Preferences.") << endmsg;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -3876,6 +3965,8 @@ ARDOUR_UI::remove_video ()
|
|||
_session->add_extra_xml(*node);
|
||||
node = new XMLNode(X_("Videomonitor"));
|
||||
_session->add_extra_xml(*node);
|
||||
node = new XMLNode(X_("Videoexport"));
|
||||
_session->add_extra_xml(*node);
|
||||
stop_video_server();
|
||||
}
|
||||
|
||||
|
|
@ -3890,6 +3981,29 @@ ARDOUR_UI::flush_videotimeline_cache (bool localcacheonly)
|
|||
editor->queue_visual_videotimeline_update();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::export_video (bool range)
|
||||
{
|
||||
if (ARDOUR::Config->get_show_video_export_info()) {
|
||||
ExportVideoInfobox infobox (_session);
|
||||
Gtk::ResponseType rv = (Gtk::ResponseType) infobox.run();
|
||||
if (infobox.show_again()) {
|
||||
ARDOUR::Config->set_show_video_export_info(false);
|
||||
}
|
||||
switch (rv) {
|
||||
case GTK_RESPONSE_YES:
|
||||
PBD::open_uri (ARDOUR::Config->get_reference_manual_url() + "/video-timeline/operations/#export");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
export_video_dialog->set_session (_session);
|
||||
export_video_dialog->apply_state(editor->get_selection().time, range);
|
||||
export_video_dialog->run ();
|
||||
export_video_dialog->hide ();
|
||||
}
|
||||
|
||||
XMLNode*
|
||||
ARDOUR_UI::mixer_settings () const
|
||||
{
|
||||
|
|
@ -4243,6 +4357,7 @@ int
|
|||
ARDOUR_UI::reconnect_to_engine ()
|
||||
{
|
||||
if (AudioEngine::instance()->start ()) {
|
||||
// TODO somehow make this the topmost window (above any dialogs currently visible)
|
||||
if (editor) {
|
||||
MessageDialog msg (*editor, _("Could not reconnect to the Audio/MIDI engine"));
|
||||
msg.run ();
|
||||
|
|
@ -4636,3 +4751,60 @@ ARDOUR_UI::set_flat_buttons ()
|
|||
{
|
||||
CairoWidget::set_flat_buttons( config()->get_flat_buttons() );
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::audioengine_became_silent ()
|
||||
{
|
||||
MessageDialog msg (string_compose (_("This is a free/demo copy of %1. It has just switched to silent mode."), PROGRAM_NAME),
|
||||
true,
|
||||
Gtk::MESSAGE_WARNING,
|
||||
Gtk::BUTTONS_NONE,
|
||||
true);
|
||||
|
||||
msg.set_title (string_compose (_("%1 is now silent"), PROGRAM_NAME));
|
||||
|
||||
Gtk::Label pay_label (string_compose (_("Please consider paying for a copy of %1 - you can pay whatever you want."), PROGRAM_NAME));
|
||||
Gtk::Label subscribe_label (_("Better yet become a subscriber - subscriptions start at US$1 per month."));
|
||||
Gtk::Button pay_button (_("Pay for a copy (via the web)"));
|
||||
Gtk::Button subscribe_button (_("Become a subscriber (via the web)"));
|
||||
Gtk::HBox pay_button_box;
|
||||
Gtk::HBox subscribe_button_box;
|
||||
|
||||
pay_button_box.pack_start (pay_button, true, false);
|
||||
subscribe_button_box.pack_start (subscribe_button, true, false);
|
||||
|
||||
bool (*openuri)(const char*) = PBD::open_uri; /* this forces selection of the const char* variant of PBD::open_uri(), which we need to avoid ambiguity below */
|
||||
|
||||
pay_button.signal_clicked().connect (sigc::hide_return (sigc::bind (sigc::ptr_fun (openuri), (const char*) "https://ardour.org/download")));
|
||||
subscribe_button.signal_clicked().connect (sigc::hide_return (sigc::bind (sigc::ptr_fun (openuri), (const char*) "https://community.ardour.org/s/subscribe")));
|
||||
|
||||
msg.get_vbox()->pack_start (pay_label);
|
||||
msg.get_vbox()->pack_start (pay_button_box);
|
||||
msg.get_vbox()->pack_start (subscribe_label);
|
||||
msg.get_vbox()->pack_start (subscribe_button_box);
|
||||
|
||||
msg.get_vbox()->show_all ();
|
||||
|
||||
msg.add_button (_("Remain silent"), Gtk::RESPONSE_CANCEL);
|
||||
msg.add_button (_("Save and quit"), Gtk::RESPONSE_NO);
|
||||
msg.add_button (_("Give me more time"), Gtk::RESPONSE_YES);
|
||||
|
||||
int r = msg.run ();
|
||||
|
||||
switch (r) {
|
||||
case Gtk::RESPONSE_YES:
|
||||
AudioEngine::instance()->reset_silence_countdown ();
|
||||
break;
|
||||
|
||||
case Gtk::RESPONSE_NO:
|
||||
/* save and quit */
|
||||
save_state_canfail ("");
|
||||
exit (0);
|
||||
break;
|
||||
|
||||
case Gtk::RESPONSE_CANCEL:
|
||||
default:
|
||||
/* don't reset, save session and exit */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@
|
|||
#include "ardour_window.h"
|
||||
#include "editing.h"
|
||||
#include "engine_dialog.h"
|
||||
#include "export_video_dialog.h"
|
||||
#include "meterbridge.h"
|
||||
#include "ui_config.h"
|
||||
#include "enums.h"
|
||||
|
|
@ -150,6 +151,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void launch_manual ();
|
||||
void launch_reference ();
|
||||
void launch_tracker ();
|
||||
void launch_subscribe ();
|
||||
void launch_cheat_sheet ();
|
||||
void launch_website ();
|
||||
void launch_website_dev ();
|
||||
|
|
@ -158,7 +160,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void show_about ();
|
||||
void hide_about ();
|
||||
|
||||
void idle_load (const std::string& path);
|
||||
void load_from_application_api (const std::string& path);
|
||||
void finish();
|
||||
|
||||
int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
|
||||
|
|
@ -247,6 +249,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
bool start_video_server (Gtk::Window* float_window, bool popup_msg);
|
||||
void stop_video_server (bool ask_confirm=false);
|
||||
void flush_videotimeline_cache (bool localcacheonly=false);
|
||||
void export_video (bool range = false);
|
||||
|
||||
void session_add_audio_track (
|
||||
int input_channels,
|
||||
|
|
@ -350,6 +353,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
|
||||
int ask_about_saving_session (const std::vector<std::string>& actions);
|
||||
|
||||
void save_session_at_its_request (std::string);
|
||||
/* periodic safety backup, to be precise */
|
||||
gint autosave_session();
|
||||
void update_autosave();
|
||||
|
|
@ -458,6 +462,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
ArdourButton auditioning_alert_button;
|
||||
ArdourButton solo_alert_button;
|
||||
ArdourButton feedback_alert_button;
|
||||
ArdourButton error_alert_button;
|
||||
|
||||
Gtk::VBox alert_box;
|
||||
Gtk::VBox meter_box;
|
||||
|
|
@ -473,6 +478,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void sync_blink (bool);
|
||||
void audition_blink (bool);
|
||||
void feedback_blink (bool);
|
||||
void error_blink (bool);
|
||||
|
||||
void set_flat_buttons();
|
||||
|
||||
|
|
@ -483,6 +489,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
bool solo_alert_press (GdkEventButton* ev);
|
||||
bool audition_alert_press (GdkEventButton* ev);
|
||||
bool feedback_alert_press (GdkEventButton *);
|
||||
bool error_alert_press (GdkEventButton *);
|
||||
|
||||
void big_clock_value_changed ();
|
||||
void primary_clock_value_changed ();
|
||||
|
|
@ -612,7 +619,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
|
||||
void save_session_as ();
|
||||
void rename_session ();
|
||||
void setup_order_hint ();
|
||||
void setup_order_hint (AddRouteDialog::InsertAt);
|
||||
|
||||
int create_mixer ();
|
||||
int create_editor ();
|
||||
|
|
@ -629,6 +636,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
WM::Proxy<LocationUIWindow> location_ui;
|
||||
WM::Proxy<RouteParams_UI> route_params;
|
||||
WM::Proxy<EngineControl> audio_midi_setup;
|
||||
WM::Proxy<ExportVideoDialog> export_video_dialog;
|
||||
|
||||
/* Windows/Dialogs that require a creator method */
|
||||
|
||||
|
|
@ -733,7 +741,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
const char *msg);
|
||||
Gtk::Label status_bar_label;
|
||||
bool status_bar_button_press (GdkEventButton*);
|
||||
Gtk::ToggleButton error_log_button;
|
||||
|
||||
void loading_message (const std::string& msg);
|
||||
|
||||
|
|
@ -771,12 +778,22 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void successful_graph_sort ();
|
||||
bool _feedback_exists;
|
||||
|
||||
enum ArdourLogLevel {
|
||||
LogLevelNone = 0,
|
||||
LogLevelInfo,
|
||||
LogLevelWarning,
|
||||
LogLevelError
|
||||
};
|
||||
|
||||
ArdourLogLevel _log_not_acknowledged;
|
||||
|
||||
void resize_text_widgets ();
|
||||
|
||||
std::string _announce_string;
|
||||
void check_announcements ();
|
||||
|
||||
int do_audio_midi_setup (uint32_t);
|
||||
void audioengine_became_silent ();
|
||||
};
|
||||
|
||||
#endif /* __ardour_gui_h__ */
|
||||
|
|
|
|||
|
|
@ -96,18 +96,15 @@ ARDOUR_UI::setup_windows ()
|
|||
status_bar_event_box->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
status_bar_label.set_size_request (300, -1);
|
||||
status_bar_packer->pack_start (*status_bar_event_box, true, true, 6);
|
||||
status_bar_packer->pack_start (error_log_button, false, false);
|
||||
|
||||
status_bar_label.show ();
|
||||
status_bar_event_box->show ();
|
||||
status_bar_packer->show ();
|
||||
error_log_button.show ();
|
||||
|
||||
error_log_button.signal_clicked().connect (mem_fun (*this, &UI::toggle_errors));
|
||||
status_bar_event_box->signal_button_press_event().connect (mem_fun (*this, &ARDOUR_UI::status_bar_button_press));
|
||||
|
||||
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);
|
||||
editor->get_status_bar_packer().pack_start (menu_bar_base, false, false, 2);
|
||||
#else
|
||||
top_packer.pack_start (menu_bar_base, false, false);
|
||||
#endif
|
||||
|
|
@ -146,6 +143,7 @@ ARDOUR_UI::setup_tooltips ()
|
|||
set_tip (primary_clock, _("<b>Primary Clock</b> right-click to set display mode. Click to edit, click+drag a digit or mouse-over+scroll wheel to modify.\nText edits: right-to-left overwrite <tt>Esc</tt>: cancel; <tt>Enter</tt>: confirm; postfix the edit with '+' or '-' to enter delta times.\n"));
|
||||
set_tip (secondary_clock, _("<b>Secondary Clock</b> right-click to set display mode. Click to edit, click+drag a digit or mouse-over+scroll wheel to modify.\nText edits: right-to-left overwrite <tt>Esc</tt>: cancel; <tt>Enter</tt>: confirm; postfix the edit with '+' or '-' to enter delta times.\n"));
|
||||
set_tip (editor_meter_peak_display, _("Reset All Peak Indicators"));
|
||||
set_tip (error_alert_button, _("Show Error Log and acknowledge warnings"));
|
||||
|
||||
synchronize_sync_source_and_video_pullup ();
|
||||
|
||||
|
|
@ -175,18 +173,25 @@ ARDOUR_UI::display_message (const char *prefix, gint prefix_len, RefPtr<TextBuff
|
|||
string text;
|
||||
|
||||
UI::display_message (prefix, prefix_len, ptag, mtag, msg);
|
||||
#ifdef TOP_MENUBAR
|
||||
|
||||
ArdourLogLevel ll = LogLevelNone;
|
||||
|
||||
if (strcmp (prefix, _("[ERROR]: ")) == 0) {
|
||||
text = "<span color=\"red\" weight=\"bold\">";
|
||||
ll = LogLevelError;
|
||||
} else if (strcmp (prefix, _("[WARNING]: ")) == 0) {
|
||||
text = "<span color=\"yellow\" weight=\"bold\">";
|
||||
ll = LogLevelWarning;
|
||||
} else if (strcmp (prefix, _("[INFO]: ")) == 0) {
|
||||
text = "<span color=\"green\" weight=\"bold\">";
|
||||
ll = LogLevelInfo;
|
||||
} else {
|
||||
text = "<span color=\"white\" weight=\"bold\">???";
|
||||
}
|
||||
|
||||
_log_not_acknowledged = std::max(_log_not_acknowledged, ll);
|
||||
|
||||
#ifdef TOP_MENUBAR
|
||||
text += prefix;
|
||||
text += "</span>";
|
||||
text += msg;
|
||||
|
|
@ -211,13 +216,21 @@ ARDOUR_UI::tearoff_settings (const char* name) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define PX_SCALE(pxmin, dflt) rint(std::max((double)pxmin, (double)dflt * btn_scale))
|
||||
|
||||
void
|
||||
ARDOUR_UI::setup_transport ()
|
||||
{
|
||||
RefPtr<Action> act;
|
||||
|
||||
transport_tearoff_hbox.set_border_width (3);
|
||||
transport_tearoff_hbox.set_spacing (3);
|
||||
#ifdef __APPLE__
|
||||
const double btn_scale = 1.0;
|
||||
#else
|
||||
const double btn_scale = config()->get_font_scale () / 102400.;
|
||||
#endif
|
||||
|
||||
transport_tearoff_hbox.set_border_width (PX_SCALE(3,3));
|
||||
transport_tearoff_hbox.set_spacing (PX_SCALE(3,3));
|
||||
|
||||
transport_tearoff = manage (new TearOff (transport_tearoff_hbox));
|
||||
transport_tearoff->set_name ("TransportBase");
|
||||
|
|
@ -251,7 +264,9 @@ ARDOUR_UI::setup_transport ()
|
|||
|
||||
// auto_input_button.set_text (_("Auto Input"));
|
||||
|
||||
click_button.set_image (get_icon (X_("metronome")));
|
||||
click_button.set_elements ((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
|
||||
click_button.set_icon (ArdourButton::TransportMetronom);
|
||||
|
||||
act = ActionManager::get_action ("Transport", "ToggleClick");
|
||||
click_button.set_related_action (act);
|
||||
click_button.signal_button_press_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::click_button_clicked), false);
|
||||
|
|
@ -267,19 +282,25 @@ ARDOUR_UI::setup_transport ()
|
|||
|
||||
stop_button.set_active (true);
|
||||
|
||||
goto_start_button.set_image (get_icon (X_("transport_start")));
|
||||
goto_end_button.set_image (get_icon (X_("transport_end")));
|
||||
roll_button.set_image (get_icon (X_("transport_play")));
|
||||
stop_button.set_image (get_icon (X_("transport_stop")));
|
||||
play_selection_button.set_image (get_icon (X_("transport_range")));
|
||||
auto_loop_button.set_image (get_icon (X_("transport_loop")));
|
||||
goto_start_button.set_elements ((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
|
||||
goto_start_button.set_icon (ArdourButton::TransportStart);
|
||||
goto_end_button.set_elements ((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
|
||||
goto_end_button.set_icon (ArdourButton::TransportEnd);
|
||||
roll_button.set_elements ((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
|
||||
roll_button.set_icon (ArdourButton::TransportPlay);
|
||||
stop_button.set_elements ((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
|
||||
stop_button.set_icon (ArdourButton::TransportStop);
|
||||
play_selection_button.set_elements ((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
|
||||
play_selection_button.set_icon (ArdourButton::TransportRange);
|
||||
auto_loop_button.set_elements ((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
|
||||
auto_loop_button.set_icon (ArdourButton::TransportLoop);
|
||||
|
||||
rec_button.set_elements ((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body|ArdourButton::RecButton));
|
||||
rec_button.set_elements ((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
|
||||
rec_button.set_icon (ArdourButton::RecButton);
|
||||
|
||||
midi_panic_button.set_elements ((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
|
||||
midi_panic_button.set_icon (ArdourButton::TransportPanic);
|
||||
|
||||
midi_panic_button.set_image (get_icon (X_("midi_panic")));
|
||||
/* the icon for this has an odd aspect ratio, so fatten up the button */
|
||||
midi_panic_button.set_size_request (25, -1);
|
||||
|
||||
act = ActionManager::get_action (X_("Transport"), X_("Stop"));
|
||||
stop_button.set_related_action (act);
|
||||
act = ActionManager::get_action (X_("Transport"), X_("Roll"));
|
||||
|
|
@ -325,9 +346,14 @@ ARDOUR_UI::setup_transport ()
|
|||
auditioning_alert_button.signal_button_press_event().connect (sigc::mem_fun(*this,&ARDOUR_UI::audition_alert_press), false);
|
||||
feedback_alert_button.set_name ("feedback alert");
|
||||
feedback_alert_button.signal_button_press_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::feedback_alert_press), false);
|
||||
error_alert_button.set_name ("error alert");
|
||||
error_alert_button.signal_button_release_event().connect (sigc::mem_fun(*this,&ARDOUR_UI::error_alert_press), false);
|
||||
act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window"));
|
||||
error_alert_button.set_related_action(act);
|
||||
error_alert_button.set_fallthrough_to_parent(true);
|
||||
|
||||
alert_box.set_homogeneous (true);
|
||||
alert_box.set_spacing (2);
|
||||
alert_box.set_spacing (PX_SCALE(2, 2));
|
||||
alert_box.pack_start (solo_alert_button, true, true);
|
||||
alert_box.pack_start (auditioning_alert_button, true, true);
|
||||
alert_box.pack_start (feedback_alert_button, true, true);
|
||||
|
|
@ -345,7 +371,11 @@ ARDOUR_UI::setup_transport ()
|
|||
transport_button_size_group->add_widget (roll_button);
|
||||
transport_button_size_group->add_widget (stop_button);
|
||||
|
||||
goto_start_button.set_size_request (-1, 40);
|
||||
/* the icon for this has an odd aspect ratio, so fatten up the button */
|
||||
midi_panic_button.set_size_request (PX_SCALE(25, 25), -1);
|
||||
goto_start_button.set_size_request (PX_SCALE(28, 28), PX_SCALE(44, 44));
|
||||
click_button.set_size_request (PX_SCALE(32, 32), PX_SCALE(44, 44));
|
||||
|
||||
|
||||
HBox* tbox1 = manage (new HBox);
|
||||
HBox* tbox2 = manage (new HBox);
|
||||
|
|
@ -357,9 +387,9 @@ ARDOUR_UI::setup_transport ()
|
|||
Alignment* a1 = manage (new Alignment);
|
||||
Alignment* a2 = manage (new Alignment);
|
||||
|
||||
tbox1->set_spacing (2);
|
||||
tbox2->set_spacing (2);
|
||||
tbox->set_spacing (2);
|
||||
tbox1->set_spacing (PX_SCALE(2, 2));
|
||||
tbox2->set_spacing (PX_SCALE(2, 2));
|
||||
tbox->set_spacing (PX_SCALE(2, 2));
|
||||
|
||||
if (!Profile->get_trx()) {
|
||||
tbox1->pack_start (midi_panic_button, true, true, 5);
|
||||
|
|
@ -394,7 +424,7 @@ ARDOUR_UI::setup_transport ()
|
|||
if (!ARDOUR::Profile->get_small_screen() && !ARDOUR::Profile->get_trx()) {
|
||||
clock_box->pack_start (*secondary_clock, false, false);
|
||||
}
|
||||
clock_box->set_spacing (3);
|
||||
clock_box->set_spacing (PX_SCALE(3, 3));
|
||||
|
||||
shuttle_box = manage (new ShuttleControl);
|
||||
shuttle_box->show ();
|
||||
|
|
@ -402,7 +432,7 @@ ARDOUR_UI::setup_transport ()
|
|||
VBox* transport_vbox = manage (new VBox);
|
||||
transport_vbox->set_name ("TransportBase");
|
||||
transport_vbox->set_border_width (0);
|
||||
transport_vbox->set_spacing (3);
|
||||
transport_vbox->set_spacing (PX_SCALE(3, 3));
|
||||
transport_vbox->pack_start (*tbox, true, true, 0);
|
||||
|
||||
if (!Profile->get_trx()) {
|
||||
|
|
@ -421,7 +451,7 @@ ARDOUR_UI::setup_transport ()
|
|||
|
||||
VBox* auto_box = manage (new VBox);
|
||||
auto_box->set_homogeneous (true);
|
||||
auto_box->set_spacing (2);
|
||||
auto_box->set_spacing (PX_SCALE(2, 2));
|
||||
auto_box->pack_start (sync_button, true, true);
|
||||
if (!ARDOUR::Profile->get_trx()) {
|
||||
auto_box->pack_start (follow_edits_button, true, true);
|
||||
|
|
@ -465,6 +495,7 @@ ARDOUR_UI::setup_transport ()
|
|||
transport_tearoff->set_state (*tnode);
|
||||
}
|
||||
}
|
||||
#undef PX_SCALE
|
||||
|
||||
void
|
||||
ARDOUR_UI::detach_tearoff (Box* b, Widget* w)
|
||||
|
|
@ -536,6 +567,26 @@ ARDOUR_UI::feedback_alert_press (GdkEventButton *)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ARDOUR_UI::error_alert_press (GdkEventButton* ev)
|
||||
{
|
||||
bool do_toggle = true;
|
||||
if (ev->button == 1) {
|
||||
if (_log_not_acknowledged == LogLevelError) {
|
||||
// just acknowledge the error, don't hide the log if it's already visible
|
||||
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window"));
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
|
||||
if (tact && tact->get_active()) {
|
||||
do_toggle = false;
|
||||
}
|
||||
}
|
||||
_log_not_acknowledged = LogLevelNone;
|
||||
error_blink (false); // immediate acknowledge
|
||||
}
|
||||
// maybe fall through to to button toggle
|
||||
return !do_toggle;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::solo_blink (bool onoff)
|
||||
{
|
||||
|
|
@ -609,6 +660,32 @@ ARDOUR_UI::feedback_blink (bool onoff)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::error_blink (bool onoff)
|
||||
{
|
||||
switch (_log_not_acknowledged) {
|
||||
case LogLevelError:
|
||||
// blink
|
||||
if (onoff) {
|
||||
error_alert_button.set_custom_led_color(0xff0000ff); // bright red
|
||||
} else {
|
||||
error_alert_button.set_custom_led_color(0x880000ff); // dark red
|
||||
}
|
||||
break;
|
||||
case LogLevelWarning:
|
||||
error_alert_button.set_custom_led_color(0xccaa00ff); // yellow
|
||||
break;
|
||||
case LogLevelInfo:
|
||||
error_alert_button.set_custom_led_color(0x88cc00ff); // lime green
|
||||
break;
|
||||
default:
|
||||
error_alert_button.set_custom_led_color(0x333333ff); // gray
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
ARDOUR_UI::set_transport_sensitivity (bool yn)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ ARDOUR_UI::set_session (Session *s)
|
|||
|
||||
blink_connection = Timers::blink_connect (sigc::mem_fun(*this, &ARDOUR_UI::blink_handler));
|
||||
|
||||
_session->SaveSessionRequested.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::save_session_at_its_request, this, _1), gui_context());
|
||||
_session->RecordStateChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::record_state_changed, this), gui_context());
|
||||
_session->StepEditStatusChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::step_edit_status_change, this, _1), gui_context());
|
||||
_session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::map_transport_state, this), gui_context());
|
||||
|
|
@ -335,7 +336,9 @@ ARDOUR_UI::goto_editor_window ()
|
|||
editor->show_window ();
|
||||
editor->present ();
|
||||
/* mixer should now be on top */
|
||||
WM::Manager::instance().set_transient_for (editor);
|
||||
if (ARDOUR_UI::config()->get_transients_follow_front()) {
|
||||
WM::Manager::instance().set_transient_for (editor);
|
||||
}
|
||||
_mixer_on_top = false;
|
||||
}
|
||||
|
||||
|
|
@ -364,7 +367,9 @@ ARDOUR_UI::goto_mixer_window ()
|
|||
mixer->show_window ();
|
||||
mixer->present ();
|
||||
/* mixer should now be on top */
|
||||
WM::Manager::instance().set_transient_for (mixer);
|
||||
if (ARDOUR_UI::config()->get_transients_follow_front()) {
|
||||
WM::Manager::instance().set_transient_for (mixer);
|
||||
}
|
||||
_mixer_on_top = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ ARDOUR_UI::install_actions ()
|
|||
sigc::mem_fun (*this, &ARDOUR_UI::remove_video));
|
||||
act->set_sensitive (false);
|
||||
act = ActionManager::register_action (main_actions, X_("ExportVideo"), _("Export To Video File"),
|
||||
hide_return (sigc::bind (sigc::mem_fun(*editor, &PublicEditor::export_video), false)));
|
||||
hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::export_video), false)));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (main_actions, X_("SnapshotStay"), _("Snapshot (& keep working on current version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::snapshot_session), false));
|
||||
|
|
@ -271,7 +271,7 @@ if (Profile->get_mixbus())
|
|||
act = ActionManager::register_action (transport_actions, X_("Loop"), _("Play Loop Range"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_session_auto_loop));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (transport_actions, X_("PlaySelection"), _("Play Selected Range"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_selection));
|
||||
act = ActionManager::register_action (transport_actions, X_("PlaySelection"), _("Play Selection"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_selection));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (transport_actions, X_("PlayPreroll"), _("Play Selection w/Preroll"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_preroll));
|
||||
|
|
@ -518,7 +518,9 @@ ARDOUR_UI::build_menu_bar ()
|
|||
#endif
|
||||
disk_space = true;
|
||||
}
|
||||
|
||||
|
||||
hbox->pack_end (error_alert_button, false, false, 2);
|
||||
|
||||
hbox->pack_end (wall_clock_label, false, false, 2);
|
||||
hbox->pack_end (disk_space_label, false, false, 4);
|
||||
hbox->pack_end (cpu_load_label, false, false, 4);
|
||||
|
|
@ -527,12 +529,14 @@ ARDOUR_UI::build_menu_bar ()
|
|||
hbox->pack_end (timecode_format_label, false, false, 4);
|
||||
hbox->pack_end (format_label, false, false, 4);
|
||||
|
||||
menu_hbox.pack_end (*ev, false, false, 6);
|
||||
menu_hbox.pack_end (*ev, false, false, 2);
|
||||
|
||||
menu_bar_base.set_name ("MainMenuBar");
|
||||
menu_bar_base.add (menu_hbox);
|
||||
|
||||
#ifndef GTKOSX
|
||||
_status_bar_visibility.add (&wall_clock_label, X_("WallClock"), _("Wall Clock"), wall_clock);
|
||||
#endif
|
||||
_status_bar_visibility.add (&disk_space_label, X_("Disk"), _("Disk Space"), disk_space);
|
||||
_status_bar_visibility.add (&cpu_load_label, X_("DSP"), _("DSP"), true);
|
||||
_status_bar_visibility.add (&buffer_load_label, X_("Buffers"), _("Buffers"), true);
|
||||
|
|
|
|||
|
|
@ -416,6 +416,8 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||
}
|
||||
} else if (p == "waveform-scale") {
|
||||
ArdourCanvas::WaveView::set_global_logscaled (ARDOUR_UI::config()->get_waveform_scale() == Logarithmic);
|
||||
} else if (p == "widget-prelight") {
|
||||
CairoWidget::set_widget_prelight( config()->get_widget_prelight() );
|
||||
} else if (p == "waveform-shape") {
|
||||
ArdourCanvas::WaveView::set_global_shape (ARDOUR_UI::config()->get_waveform_shape() == Rectified
|
||||
? ArdourCanvas::WaveView::Rectified : ArdourCanvas::WaveView::Normal);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ ArdourWindow::ArdourWindow (string title)
|
|||
{
|
||||
set_title (title);
|
||||
init ();
|
||||
set_position (Gtk::WIN_POS_MOUSE);
|
||||
set_position (Gtk::WIN_POS_CENTER);
|
||||
}
|
||||
|
||||
ArdourWindow::ArdourWindow (Gtk::Window& parent, string /*title*/)
|
||||
|
|
@ -58,21 +58,31 @@ ArdourWindow::~ArdourWindow ()
|
|||
bool
|
||||
ArdourWindow::on_key_press_event (GdkEventKey* ev)
|
||||
{
|
||||
return relay_key_press (ev, this);
|
||||
bool handled = Gtk::Window::on_key_press_event (ev);
|
||||
|
||||
if (!handled) {
|
||||
if (!get_modal()) {
|
||||
handled = relay_key_press (ev, this);
|
||||
}
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
bool
|
||||
ArdourWindow::on_enter_notify_event (GdkEventCrossing *ev)
|
||||
ArdourWindow::on_focus_in_event (GdkEventFocus *ev)
|
||||
{
|
||||
Keyboard::the_keyboard().enter_window (ev, this);
|
||||
return Window::on_enter_notify_event (ev);
|
||||
Keyboard::the_keyboard().focus_in_window (ev, this);
|
||||
return Window::on_focus_in_event (ev);
|
||||
}
|
||||
|
||||
bool
|
||||
ArdourWindow::on_leave_notify_event (GdkEventCrossing *ev)
|
||||
ArdourWindow::on_focus_out_event (GdkEventFocus *ev)
|
||||
{
|
||||
Keyboard::the_keyboard().leave_window (ev, this);
|
||||
return Window::on_leave_notify_event (ev);
|
||||
if (!get_modal()) {
|
||||
Keyboard::the_keyboard().focus_out_window (ev, this);
|
||||
}
|
||||
return Window::on_focus_out_event (ev);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -92,8 +102,9 @@ void
|
|||
ArdourWindow::init ()
|
||||
{
|
||||
set_border_width (10);
|
||||
add_events (Gdk::FOCUS_CHANGE_MASK);
|
||||
|
||||
/* ArdourWindows are not dialogs (they have no "OK" or "Close" button) but
|
||||
/* ArdourWindows are not dialogs (they have no "OK" or "Close" button) but
|
||||
they should be considered part of the same "window level" as a dialog. This
|
||||
works on X11 and Quartz, in that:
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ class ArdourWindow : public Gtk::Window, public ARDOUR::SessionHandlePtr, public
|
|||
ArdourWindow (Gtk::Window& parent, std::string title);
|
||||
~ArdourWindow();
|
||||
|
||||
bool on_enter_notify_event (GdkEventCrossing*);
|
||||
bool on_leave_notify_event (GdkEventCrossing*);
|
||||
bool on_focus_in_event (GdkEventFocus*);
|
||||
bool on_focus_out_event (GdkEventFocus*);
|
||||
bool on_delete_event (GdkEventAny *);
|
||||
bool on_key_press_event (GdkEventKey*);
|
||||
void on_unmap ();
|
||||
|
|
|
|||
|
|
@ -7,13 +7,15 @@ TOP=..
|
|||
|
||||
LIBS_DIR=$TOP/build/libs
|
||||
|
||||
ALLGOOD=yes
|
||||
|
||||
run_tests () {
|
||||
echo ""
|
||||
echo "-------------------------------------------"
|
||||
echo "Running tests for $1..."
|
||||
echo "-------------------------------------------"
|
||||
echo ""
|
||||
$2 $LIBS_DIR/$1/run-tests
|
||||
$2 $LIBS_DIR/$1/run-tests || ALLGOOD=no
|
||||
echo ""
|
||||
}
|
||||
|
||||
|
|
@ -27,3 +29,11 @@ run_tests midi++2
|
|||
run_tests evoral
|
||||
run_tests pbd
|
||||
run_tests ardour
|
||||
|
||||
if test "$ALLGOOD" != "yes"; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo " *** SOME TEST(s) FAILED ***"
|
||||
echo ""
|
||||
echo ""
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -34,7 +34,15 @@
|
|||
#undef require
|
||||
#undef verify
|
||||
|
||||
#ifdef YES
|
||||
#undef YES
|
||||
#endif
|
||||
#ifdef NO
|
||||
#undef NO
|
||||
#endif
|
||||
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/eventbox.h>
|
||||
#include <gtkmm/combobox.h>
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/label.h>
|
||||
|
|
@ -74,8 +82,11 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
|
|||
bool non_gtk_gui() const { return true; }
|
||||
|
||||
void lower_box_realized ();
|
||||
bool lower_box_visibility_notify (GdkEventVisibility*);
|
||||
|
||||
void cocoa_view_resized ();
|
||||
void on_realize ();
|
||||
void grab_focus();
|
||||
void forward_key_event (GdkEventKey*);
|
||||
|
||||
bool on_window_show (const std::string& /*title*/);
|
||||
|
|
@ -90,7 +101,7 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
|
|||
int prefwidth;
|
||||
|
||||
Gtk::HBox top_box;
|
||||
Gtk::HBox low_box;
|
||||
Gtk::EventBox low_box;
|
||||
Gtk::VBox vpacker;
|
||||
Gtk::Label automation_mode_label;
|
||||
Gtk::ComboBoxText automation_mode_selector;
|
||||
|
|
|
|||
|
|
@ -153,8 +153,15 @@ AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert)
|
|||
|
||||
smaller_hbox->set_spacing (6);
|
||||
smaller_hbox->pack_start (preset_label, false, false, 4);
|
||||
smaller_hbox->pack_start (_preset_modified, false, false);
|
||||
smaller_hbox->pack_start (_preset_combo, false, false);
|
||||
smaller_hbox->pack_start (add_button, false, false);
|
||||
#if 0
|
||||
/* Ardour does not currently allow to overwrite existing presets
|
||||
* see save_property_list() in audio_unit.cc
|
||||
*/
|
||||
smaller_hbox->pack_start (save_button, false, false);
|
||||
#endif
|
||||
#if 0
|
||||
/* one day these might be useful with an AU plugin, but not yet */
|
||||
smaller_hbox->pack_start (automation_mode_label, false, false);
|
||||
|
|
@ -190,7 +197,7 @@ AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert)
|
|||
cocoa_parent = 0;
|
||||
cocoa_window = 0;
|
||||
|
||||
#ifdef WITH_CARBBON
|
||||
#ifdef WITH_CARBON
|
||||
_activating_from_app = false;
|
||||
_notify = 0;
|
||||
au_view = 0;
|
||||
|
|
@ -210,7 +217,10 @@ AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert)
|
|||
create_cocoa_view ();
|
||||
}
|
||||
|
||||
low_box.add_events(Gdk::VISIBILITY_NOTIFY_MASK);
|
||||
|
||||
low_box.signal_realize().connect (mem_fun (this, &AUPluginUI::lower_box_realized));
|
||||
low_box.signal_visibility_notify_event ().connect (mem_fun (this, &AUPluginUI::lower_box_visibility_notify));
|
||||
}
|
||||
|
||||
AUPluginUI::~AUPluginUI ()
|
||||
|
|
@ -496,7 +506,7 @@ AUPluginUI::create_carbon_view ()
|
|||
kWindowNoShadowAttribute|
|
||||
kWindowNoTitleBarAttribute);
|
||||
|
||||
if ((err = CreateNewWindow(kDocumentWindowClass, attr, &r, &carbon_window)) != noErr) {
|
||||
if ((err = CreateNewWindow(kUtilityWindowClass, attr, &r, &carbon_window)) != noErr) {
|
||||
error << string_compose (_("AUPluginUI: cannot create carbon window (err: %1)"), err) << endmsg;
|
||||
CloseComponent (editView);
|
||||
return -1;
|
||||
|
|
@ -626,6 +636,7 @@ AUPluginUI::parent_carbon_window ()
|
|||
_notify = [ [NotificationObject alloc] initWithPluginUI:this andCocoaParent:cocoa_parent andTopLevelParent:win ];
|
||||
|
||||
[win addChildWindow:cocoa_parent ordered:NSWindowAbove];
|
||||
[win setAutodisplay:1]; // turn of GTK stuff for this window
|
||||
|
||||
return 0;
|
||||
#else
|
||||
|
|
@ -677,6 +688,13 @@ AUPluginUI::parent_cocoa_window ()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
AUPluginUI::grab_focus()
|
||||
{
|
||||
if (au_view) {
|
||||
[au_view becomeFirstResponder];
|
||||
}
|
||||
}
|
||||
void
|
||||
AUPluginUI::forward_key_event (GdkEventKey* ev)
|
||||
{
|
||||
|
|
@ -722,6 +740,19 @@ AUPluginUI::lower_box_realized ()
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
AUPluginUI::lower_box_visibility_notify (GdkEventVisibility* ev)
|
||||
{
|
||||
#ifdef WITH_CARBON
|
||||
if (carbon_window && ev->state != GDK_VISIBILITY_UNOBSCURED) {
|
||||
ShowWindow (carbon_window);
|
||||
ActivateWindow (carbon_window, TRUE);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
AUPluginUI::on_window_hide ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "gtkmm2ext/rgb_macros.h"
|
||||
|
||||
#include "ardour/profile.h"
|
||||
#include "ardour/lmath.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/slave.h"
|
||||
#include "ardour/tempo.h"
|
||||
|
|
@ -2078,6 +2079,24 @@ AudioClock::frames_from_audioframes_string (const string& str) const
|
|||
return f;
|
||||
}
|
||||
|
||||
void
|
||||
AudioClock::copy_text_to_clipboard () const
|
||||
{
|
||||
string val;
|
||||
if (editing) {
|
||||
val = pre_edit_string;
|
||||
} else {
|
||||
val = _layout->get_text ();
|
||||
}
|
||||
const size_t trim = val.find_first_not_of(" ");
|
||||
if (trim == string::npos) {
|
||||
assert(0); // empty clock, can't be right.
|
||||
return;
|
||||
}
|
||||
Glib::RefPtr<Clipboard> cl = Gtk::Clipboard::get();
|
||||
cl->set_text (val.substr(trim));
|
||||
}
|
||||
|
||||
void
|
||||
AudioClock::build_ops_menu ()
|
||||
{
|
||||
|
|
@ -2098,6 +2117,8 @@ AudioClock::build_ops_menu ()
|
|||
ops_items.push_back (MenuElem (_("Set From Playhead"), sigc::mem_fun(*this, &AudioClock::set_from_playhead)));
|
||||
ops_items.push_back (MenuElem (_("Locate to This Time"), sigc::mem_fun(*this, &AudioClock::locate)));
|
||||
}
|
||||
ops_items.push_back (SeparatorElem());
|
||||
ops_items.push_back (MenuElem (_("Copy to clipboard"), sigc::mem_fun(*this, &AudioClock::copy_text_to_clipboard)));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr
|
|||
void set_bbt_reference (framepos_t);
|
||||
void set_is_duration (bool);
|
||||
|
||||
void copy_text_to_clipboard () const;
|
||||
|
||||
std::string name() const { return _name; }
|
||||
|
||||
framepos_t current_time (framepos_t position = 0) const;
|
||||
|
|
|
|||
|
|
@ -1052,6 +1052,8 @@ AudioRegionView::update_envelope_visibility ()
|
|||
|
||||
if (ARDOUR_UI::config()->get_show_region_gain() || trackview.editor().current_mouse_mode() == Editing::MouseDraw || trackview.editor().current_mouse_mode() == Editing::MouseRange ) {
|
||||
gain_line->set_visibility (AutomationLine::VisibleAspects(AutomationLine::ControlPoints|AutomationLine::Line));
|
||||
gain_line->canvas_group().raise_to_top ();
|
||||
|
||||
} else {
|
||||
gain_line->set_visibility (AutomationLine::VisibleAspects(0));
|
||||
}
|
||||
|
|
@ -1140,7 +1142,8 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/)
|
|||
wave->set_samples_per_pixel (samples_per_pixel);
|
||||
wave->set_show_zero_line (true);
|
||||
wave->set_clip_level (ARDOUR_UI::config()->get_waveform_clip_level ());
|
||||
|
||||
wave->set_start_shift (1.0);
|
||||
|
||||
wave->Event.connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_wave_view_event), wave, this));
|
||||
|
||||
switch (ARDOUR_UI::config()->get_waveform_shape()) {
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@
|
|||
#include "pbd/stl_delete.h"
|
||||
#include "pbd/memento_command.h"
|
||||
|
||||
#include <gtkmm2ext/gtk_ui.h>
|
||||
#include <gtkmm2ext/selector.h>
|
||||
#include <gtkmm2ext/bindable_button.h>
|
||||
#include <gtkmm2ext/utils.h>
|
||||
#include "gtkmm2ext/gtk_ui.h"
|
||||
#include "gtkmm2ext/selector.h"
|
||||
#include "gtkmm2ext/bindable_button.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "ardour/event_type_map.h"
|
||||
#include "ardour/pannable.h"
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ AutomationController::AutomationController(boost::shared_ptr<Automatable>
|
|||
} else {
|
||||
but->set_name("generic button");
|
||||
}
|
||||
but->set_controllable(ac);
|
||||
but->signal_clicked.connect(
|
||||
sigc::mem_fun(*this, &AutomationController::toggled));
|
||||
|
||||
|
|
@ -303,10 +304,10 @@ AutomationController::on_button_release(GdkEventButton* ev)
|
|||
sigc::mem_fun(*this, &AutomationController::run_note_select_dialog)));
|
||||
}
|
||||
if (is_low) {
|
||||
for (double beats = 1.0; beats <= 16; ++beats) {
|
||||
items.push_back(MenuElem(string_compose(_("Set to %1 beat(s)"), (int)beats),
|
||||
for (int beats = 1; beats <= 16; ++beats) {
|
||||
items.push_back(MenuElem (string_compose(P_("Set to %1 beat", "Set to %1 beats", beats), beats),
|
||||
sigc::bind(sigc::mem_fun(*this, &AutomationController::set_freq_beats),
|
||||
beats)));
|
||||
(double)beats)));
|
||||
}
|
||||
}
|
||||
menu->popup(1, ev->time);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ AutomationLine::AutomationLine (const string& name,
|
|||
terminal_points_can_slide = true;
|
||||
_height = 0;
|
||||
|
||||
group = new ArdourCanvas::Container (&parent);
|
||||
group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple(0, 1.5));
|
||||
CANVAS_DEBUG_NAME (group, "region gain envelope group");
|
||||
|
||||
line = new ArdourCanvas::PolyLine (group);
|
||||
|
|
@ -156,7 +156,7 @@ void
|
|||
AutomationLine::update_visibility ()
|
||||
{
|
||||
if (_visible & Line) {
|
||||
/* Only show the line there are some points, otherwise we may show an out-of-date line
|
||||
/* Only show the line when there are some points, otherwise we may show an out-of-date line
|
||||
when automation points have been removed (the line will still follow the shape of the
|
||||
old points).
|
||||
*/
|
||||
|
|
@ -289,16 +289,16 @@ AutomationLine::modify_point_y (ControlPoint& cp, double y)
|
|||
|
||||
cp.move_to (x, y, ControlPoint::Full);
|
||||
|
||||
alist->freeze ();
|
||||
sync_model_with_view_point (cp);
|
||||
alist->thaw ();
|
||||
|
||||
reset_line_coords (cp);
|
||||
|
||||
if (line_points.size() > 1) {
|
||||
line->set_steps (line_points, is_stepped());
|
||||
}
|
||||
|
||||
alist->freeze ();
|
||||
sync_model_with_view_point (cp);
|
||||
alist->thaw ();
|
||||
|
||||
update_pending = false;
|
||||
|
||||
trackview.editor().session()->add_command (
|
||||
|
|
@ -317,14 +317,17 @@ AutomationLine::reset_line_coords (ControlPoint& cp)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
AutomationLine::sync_model_with_view_points (list<ControlPoint*> cp)
|
||||
{
|
||||
update_pending = true;
|
||||
|
||||
bool moved = false;
|
||||
for (list<ControlPoint*>::iterator i = cp.begin(); i != cp.end(); ++i) {
|
||||
sync_model_with_view_point (**i);
|
||||
moved = sync_model_with_view_point (**i) || moved;
|
||||
}
|
||||
|
||||
return moved;
|
||||
}
|
||||
|
||||
string
|
||||
|
|
@ -743,13 +746,13 @@ AutomationLine::end_drag (bool with_push, uint32_t final_index)
|
|||
}
|
||||
|
||||
alist->freeze ();
|
||||
sync_model_with_view_points (_drag_points);
|
||||
bool moved = sync_model_with_view_points (_drag_points);
|
||||
|
||||
if (with_push) {
|
||||
ControlPoint* p;
|
||||
uint32_t i = final_index;
|
||||
while ((p = nth (i)) != 0 && p->can_slide()) {
|
||||
sync_model_with_view_point (*p);
|
||||
moved = sync_model_with_view_point (*p) || moved;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
|
@ -758,6 +761,12 @@ AutomationLine::end_drag (bool with_push, uint32_t final_index)
|
|||
|
||||
update_pending = false;
|
||||
|
||||
if (moved) {
|
||||
/* A point has moved as a result of sync (clamped to integer or boolean
|
||||
value), update line accordingly. */
|
||||
line->set_steps (line_points, is_stepped());
|
||||
}
|
||||
|
||||
trackview.editor().session()->add_command (
|
||||
new MementoCommand<AutomationList>(memento_command_binder (), 0, &alist->get_state()));
|
||||
|
||||
|
|
@ -767,7 +776,7 @@ AutomationLine::end_drag (bool with_push, uint32_t final_index)
|
|||
contiguous_points.clear ();
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
AutomationLine::sync_model_with_view_point (ControlPoint& cp)
|
||||
{
|
||||
/* find out where the visual control point is.
|
||||
|
|
@ -792,6 +801,17 @@ AutomationLine::sync_model_with_view_point (ControlPoint& cp)
|
|||
view_to_model_coord_y (view_y);
|
||||
|
||||
alist->modify (cp.model(), view_x, view_y);
|
||||
|
||||
/* convert back from model to view y for clamping position (for integer/boolean/etc) */
|
||||
model_to_view_coord_y (view_y);
|
||||
const double point_y = _height - (view_y * _height);
|
||||
if (point_y != cp.get_y()) {
|
||||
cp.move_to (cp.get_x(), point_y, ControlPoint::Full);
|
||||
reset_line_coords (cp);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -1178,8 +1198,10 @@ AutomationLine::view_to_model_coord_y (double& y) const
|
|||
y = 2.0 * y - 1.0;
|
||||
} else {
|
||||
y = y * (double)(alist->get_max_y() - alist->get_min_y()) + alist->get_min_y();
|
||||
if (_desc.toggled || _desc.integer_step) {
|
||||
if (_desc.integer_step) {
|
||||
y = round(y);
|
||||
} else if (_desc.toggled) {
|
||||
y = (y > 0.5) ? 1.0 : 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,8 +202,8 @@ private:
|
|||
typedef boost::shared_ptr<ContiguousControlPoints> CCP;
|
||||
std::vector<CCP> contiguous_points;
|
||||
|
||||
void sync_model_with_view_point (ControlPoint&);
|
||||
void sync_model_with_view_points (std::list<ControlPoint*>);
|
||||
bool sync_model_with_view_point (ControlPoint&);
|
||||
bool sync_model_with_view_points (std::list<ControlPoint*>);
|
||||
void start_drag_common (double, float);
|
||||
|
||||
void reset_callback (const Evoral::ControlList&);
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ AutomationRegionView::create_line (boost::shared_ptr<ARDOUR::AutomationList> lis
|
|||
_parameter,
|
||||
&_source_relative_time_converter));
|
||||
_line->set_colors();
|
||||
_line->set_height ((uint32_t)rint(trackview.current_height() - NAME_HIGHLIGHT_SIZE));
|
||||
_line->set_height ((uint32_t)rint(trackview.current_height() - 2.5 - NAME_HIGHLIGHT_SIZE));
|
||||
_line->set_visibility (AutomationLine::VisibleAspects (AutomationLine::Line|AutomationLine::ControlPoints));
|
||||
_line->set_maximum_time (_region->length());
|
||||
_line->set_offset (_region->start ());
|
||||
|
|
@ -132,30 +132,10 @@ AutomationRegionView::canvas_group_event (GdkEvent* ev)
|
|||
|
||||
PublicEditor& e = trackview.editor ();
|
||||
|
||||
if (!trackview.editor().internal_editing()) {
|
||||
// not in internal edit mode, so just act like a normal region
|
||||
return RegionView::canvas_group_event (ev);
|
||||
}
|
||||
|
||||
if (ev->type == GDK_BUTTON_PRESS && e.current_mouse_mode() == Editing::MouseContent) {
|
||||
|
||||
/* XXX: icky dcast to Editor */
|
||||
e.drags()->set (new EditorRubberbandSelectDrag (dynamic_cast<Editor*> (&e), group), ev);
|
||||
e.drags()->start_grab (ev);
|
||||
return true;
|
||||
|
||||
} else if (ev->type == GDK_MOTION_NOTIFY && e.drags()->active()) {
|
||||
/* we probably shouldn't have to handle this here, but... */
|
||||
e.drags()->motion_handler(ev, false);
|
||||
return true;
|
||||
|
||||
} else if (ev->type == GDK_BUTTON_RELEASE && e.current_mouse_mode() == Editing::MouseDraw) {
|
||||
if (e.drags()->end_grab (ev)) {
|
||||
return true;
|
||||
} else if (e.current_mouse_mode() != Editing::MouseDraw &&
|
||||
e.current_mouse_mode() != Editing::MouseContent) {
|
||||
return RegionView::canvas_group_event (ev);
|
||||
}
|
||||
if (trackview.editor().internal_editing() &&
|
||||
ev->type == GDK_BUTTON_RELEASE &&
|
||||
e.current_mouse_mode() == Editing::MouseDraw &&
|
||||
!e.drags()->active()) {
|
||||
|
||||
double x = ev->button.x;
|
||||
double y = ev->button.y;
|
||||
|
|
@ -255,7 +235,7 @@ AutomationRegionView::set_height (double h)
|
|||
RegionView::set_height(h);
|
||||
|
||||
if (_line) {
|
||||
_line->set_height ((uint32_t)rint(h - NAME_HIGHLIGHT_SIZE));
|
||||
_line->set_height ((uint32_t)rint(h - 2.5 - NAME_HIGHLIGHT_SIZE));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ AutomationStreamView::clear ()
|
|||
* confusing.
|
||||
*/
|
||||
void
|
||||
AutomationStreamView::get_selectables (framepos_t start, framepos_t end, double botfrac, double topfrac, list<Selectable*>& results)
|
||||
AutomationStreamView::get_selectables (framepos_t start, framepos_t end, double botfrac, double topfrac, list<Selectable*>& results, bool /*within*/)
|
||||
{
|
||||
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
AutomationRegionView* arv = dynamic_cast<AutomationRegionView*> (*i);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class AutomationStreamView : public StreamView
|
|||
|
||||
void clear ();
|
||||
|
||||
void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable*> &);
|
||||
void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable*> &, bool within = false);
|
||||
void set_selected_points (PointSelection &);
|
||||
|
||||
std::list<boost::shared_ptr<AutomationLine> > get_lines () const;
|
||||
|
|
|
|||
|
|
@ -91,12 +91,26 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||
, _automatable (a)
|
||||
, _parameter (p)
|
||||
, _base_rect (new ArdourCanvas::Rectangle (_canvas_display))
|
||||
, _name (nom)
|
||||
, _view (show_regions ? new AutomationStreamView (*this) : 0)
|
||||
, auto_button (X_("")) /* force addition of a label */
|
||||
, _show_regions (show_regions)
|
||||
{
|
||||
//concatenate plugin name and param name into the tooltip
|
||||
string tipname = nomparent;
|
||||
if (!tipname.empty()) {
|
||||
tipname += ": ";
|
||||
}
|
||||
tipname += nom;
|
||||
ARDOUR_UI::instance()->set_tip(controls_ebox, tipname);
|
||||
|
||||
//plugin name and param name appear on 2 separate lines in the track header
|
||||
tipname = nomparent;
|
||||
if (!tipname.empty()) {
|
||||
tipname += "\n";
|
||||
}
|
||||
tipname += nom;
|
||||
_name = tipname;
|
||||
|
||||
CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for auto %2/%1", _name, r->name()));
|
||||
CANVAS_DEBUG_NAME (selection_group, string_compose ("selections for auto %2/%1", _name, r->name()));
|
||||
CANVAS_DEBUG_NAME (_ghost_group, string_compose ("ghosts for auto %2/%1", _name, r->name()));
|
||||
|
|
@ -135,7 +149,8 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||
_base_rect->lower_to_bottom();
|
||||
}
|
||||
|
||||
hide_button.set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::CloseCross));
|
||||
hide_button.set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
|
||||
hide_button.set_icon (ArdourButton::CloseCross);
|
||||
hide_button.set_tweaks(ArdourButton::TrackHeader);
|
||||
|
||||
auto_button.set_name ("route button");
|
||||
|
|
@ -170,13 +185,6 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||
name_label.set_name (X_("TrackParameterName"));
|
||||
name_label.set_ellipsize (Pango::ELLIPSIZE_END);
|
||||
|
||||
string tipname = nomparent;
|
||||
if (!tipname.empty()) {
|
||||
tipname += ": ";
|
||||
}
|
||||
tipname += _name;
|
||||
ARDOUR_UI::instance()->set_tip(controls_ebox, tipname);
|
||||
|
||||
/* add the buttons */
|
||||
controls_table.set_border_width (1);
|
||||
controls_table.remove (name_hbox);
|
||||
|
|
@ -278,6 +286,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||
|
||||
AutomationTimeAxisView::~AutomationTimeAxisView ()
|
||||
{
|
||||
cleanup_gui_properties ();
|
||||
delete _view;
|
||||
}
|
||||
|
||||
|
|
@ -447,18 +456,18 @@ AutomationTimeAxisView::clear_clicked ()
|
|||
}
|
||||
|
||||
void
|
||||
AutomationTimeAxisView::set_height (uint32_t h)
|
||||
AutomationTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
||||
{
|
||||
bool const changed = (height != (uint32_t) h) || first_call_to_set_height;
|
||||
uint32_t const normal = preset_height (HeightNormal);
|
||||
bool const changed_between_small_and_normal = ( (height < normal && h >= normal) || (height >= normal || h < normal) );
|
||||
|
||||
TimeAxisView::set_height (h);
|
||||
TimeAxisView::set_height (h, m);
|
||||
|
||||
_base_rect->set_y1 (h);
|
||||
|
||||
if (_line) {
|
||||
_line->set_height(h);
|
||||
_line->set_height(h - 2.5);
|
||||
}
|
||||
|
||||
if (_view) {
|
||||
|
|
@ -471,7 +480,10 @@ AutomationTimeAxisView::set_height (uint32_t h)
|
|||
first_call_to_set_height = false;
|
||||
|
||||
if (h >= preset_height (HeightNormal)) {
|
||||
auto_button.show();
|
||||
if (!(_parameter.type() >= MidiCCAutomation &&
|
||||
_parameter.type() <= MidiChannelPressureAutomation)) {
|
||||
auto_button.show();
|
||||
}
|
||||
name_label.show();
|
||||
hide_button.show();
|
||||
|
||||
|
|
@ -560,7 +572,10 @@ AutomationTimeAxisView::build_display_menu ()
|
|||
(AutoState) Touch)));
|
||||
auto_touch_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
|
||||
|
||||
items.push_back (MenuElem (_("State"), *auto_state_menu));
|
||||
if (!(_parameter.type() >= MidiCCAutomation &&
|
||||
_parameter.type() <= MidiChannelPressureAutomation)) {
|
||||
items.push_back (MenuElem (_("State"), *auto_state_menu));
|
||||
}
|
||||
|
||||
/* mode menu */
|
||||
|
||||
|
|
@ -693,7 +708,7 @@ AutomationTimeAxisView::paste_one (framepos_t pos, unsigned paste_count, float t
|
|||
}
|
||||
|
||||
void
|
||||
AutomationTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list<Selectable*>& results)
|
||||
AutomationTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list<Selectable*>& results, bool /*within*/)
|
||||
{
|
||||
if (!_line && !_view) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
|||
|
||||
~AutomationTimeAxisView();
|
||||
|
||||
virtual void set_height (uint32_t);
|
||||
virtual void set_height (uint32_t, TrackHeightMode m = OnlySelf);
|
||||
void set_samples_per_pixel (double);
|
||||
std::string name() const { return _name; }
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
|||
std::list<boost::shared_ptr<AutomationLine> > lines () const;
|
||||
|
||||
void set_selected_points (PointSelection&);
|
||||
void get_selectables (ARDOUR::framepos_t start, ARDOUR::framepos_t end, double top, double bot, std::list<Selectable *>&);
|
||||
void get_selectables (ARDOUR::framepos_t start, ARDOUR::framepos_t end, double top, double bot, std::list<Selectable *>&, bool within = false);
|
||||
void get_inverted_selectables (Selection&, std::list<Selectable*>& results);
|
||||
|
||||
void show_timestretch (framepos_t /*start*/, framepos_t /*end*/, int /*layers*/, int /*layer*/) {}
|
||||
|
|
|
|||
|
|
@ -70,11 +70,18 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu
|
|||
property_hashtable.emplace(property_name, s.str());
|
||||
gui_object_state().set_property<T> (state_id(), property_name, value);
|
||||
}
|
||||
|
||||
void cleanup_gui_properties () {
|
||||
/* remove related property node from the GUI state */
|
||||
gui_object_state().remove_node (state_id());
|
||||
property_hashtable.clear ();
|
||||
}
|
||||
|
||||
bool marked_for_display () const;
|
||||
virtual bool set_marked_for_display (bool);
|
||||
|
||||
static GUIObjectState& gui_object_state();
|
||||
void clear_property_cache() { property_hashtable.clear(); }
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
|||
|
|
@ -69,13 +69,10 @@ void
|
|||
BigClockWindow::on_realize ()
|
||||
{
|
||||
ArdourWindow::on_realize ();
|
||||
/* (try to) ensure that resizing is possible.
|
||||
*/
|
||||
get_window()->set_decorations (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH);
|
||||
|
||||
/* try to force a fixed aspect ratio so that we don't distort the font
|
||||
*/
|
||||
/* (try to) ensure that resizing is possible and the window can be moved (and closed) */
|
||||
get_window()->set_decorations (Gdk::DECOR_BORDER | Gdk::DECOR_RESIZEH | Gdk::DECOR_TITLE | Gdk::DECOR_MENU);
|
||||
|
||||
/* try to force a fixed aspect ratio so that we don't distort the font */
|
||||
float aspect = default_size.width/(float)default_size.height;
|
||||
Gdk::Geometry geom;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,11 +20,13 @@
|
|||
#ifndef __gtk2_ardour_bundle_env_h__
|
||||
#define __gtk2_ardour_bundle_env_h__
|
||||
|
||||
#include <string>
|
||||
|
||||
/** This function must do whatever is necessary to create the right runtime
|
||||
* environment for the GTK2 version of ardour, on a per-platform basis.
|
||||
*/
|
||||
|
||||
void fixup_bundle_environment (int, char* [], const char** localedir);
|
||||
void fixup_bundle_environment (int, char* [], std::string & localedir);
|
||||
|
||||
/** Load any fonts required by the GTK2 version of ardour, on a per-platform
|
||||
* basis.
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ using namespace std;
|
|||
extern void set_language_preference (); // cocoacarbon.mm
|
||||
|
||||
void
|
||||
fixup_bundle_environment (int, char* [], const char** localedir)
|
||||
fixup_bundle_environment (int, char* [], string & localedir)
|
||||
{
|
||||
if (!g_getenv ("ARDOUR_BUNDLED")) {
|
||||
return;
|
||||
|
|
@ -76,7 +76,7 @@ fixup_bundle_environment (int, char* [], const char** localedir)
|
|||
|
||||
#ifdef ENABLE_NLS
|
||||
if (!ARDOUR::translations_are_enabled ()) {
|
||||
(*localedir) = "/this/cannot/exist";
|
||||
localedir = "/this/cannot/exist";
|
||||
} else {
|
||||
/* force localedir into the bundle */
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ fixup_bundle_environment (int, char* [], const char** localedir)
|
|||
lpath.push_back (bundle_dir);
|
||||
lpath.push_back ("Resources");
|
||||
lpath.push_back ("locale");
|
||||
(*localedir) = strdup (Glib::build_filename (lpath).c_str());
|
||||
localedir = Glib::build_filename (lpath).c_str();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -110,37 +110,8 @@ fixup_bundle_environment (int, char* [], const char** localedir)
|
|||
*/
|
||||
|
||||
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,
|
||||
but the user may not have write permission. so ...
|
||||
|
||||
we also have to make sure that the user ardour directory
|
||||
actually exists ...
|
||||
*/
|
||||
|
||||
if (g_mkdir_with_parents (userconfigdir.c_str(), 0755) < 0) {
|
||||
error << string_compose (_("cannot create user %3 folder %1 (%2)"), userconfigdir, strerror (errno), PROGRAM_NAME)
|
||||
<< endmsg;
|
||||
} else {
|
||||
|
||||
path = Glib::build_filename (userconfigdir, "pango.rc");
|
||||
std::ofstream pangorc (path.c_str());
|
||||
if (!pangorc) {
|
||||
error << string_compose (_("cannot open pango.rc file %1") , path) << endmsg;
|
||||
} else {
|
||||
pangorc << "[Pango]\nModuleFiles="
|
||||
<< Glib::build_filename (bundle_dir, "Resources/pango.modules")
|
||||
<< endl;
|
||||
pangorc.close ();
|
||||
|
||||
g_setenv ("PANGO_RC_FILE", path.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);
|
||||
}
|
||||
|
||||
void load_custom_fonts()
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ using namespace ARDOUR;
|
|||
using namespace std;
|
||||
|
||||
void
|
||||
fixup_bundle_environment (int /*argc*/, char* argv[], const char** localedir)
|
||||
fixup_bundle_environment (int /*argc*/, char* argv[], string & localedir)
|
||||
{
|
||||
/* THIS IS FOR LINUX - its just about the only place where its
|
||||
* acceptable to build paths directly using '/'.
|
||||
|
|
@ -60,18 +60,17 @@ fixup_bundle_environment (int /*argc*/, char* argv[], const char** localedir)
|
|||
|
||||
std::string path;
|
||||
std::string dir_path = Glib::path_get_dirname (Glib::path_get_dirname (argv[0]));
|
||||
std::string userconfigdir = user_config_directory();
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
if (!ARDOUR::translations_are_enabled ()) {
|
||||
(*localedir) = "/this/cannot/exist";
|
||||
localedir = "/this/cannot/exist";
|
||||
} else {
|
||||
/* force localedir into the bundle */
|
||||
vector<string> lpath;
|
||||
lpath.push_back (dir_path);
|
||||
lpath.push_back ("share");
|
||||
lpath.push_back ("locale");
|
||||
(*localedir) = canonical_path (Glib::build_filename (lpath)).c_str();
|
||||
localedir = canonical_path (Glib::build_filename (lpath)).c_str();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -106,39 +105,6 @@ fixup_bundle_environment (int /*argc*/, char* argv[], const char** localedir)
|
|||
error << _("No fontconfig file found on your system. Things may looked very odd or ugly") << endmsg;
|
||||
}
|
||||
|
||||
/* write a pango.rc file and tell pango to use it. we'd love
|
||||
to put this into the Ardour.app bundle and leave it there,
|
||||
but the user may not have write permission. so ...
|
||||
|
||||
we also have to make sure that the user ardour directory
|
||||
actually exists ...
|
||||
*/
|
||||
|
||||
if (g_mkdir_with_parents (userconfigdir.c_str(), 0755) < 0) {
|
||||
error << string_compose (_("cannot create user %3 folder %1 (%2)"), userconfigdir, strerror (errno), PROGRAM_NAME)
|
||||
<< endmsg;
|
||||
} else {
|
||||
|
||||
path = Glib::build_filename (userconfigdir, "pango.rc");
|
||||
std::ofstream pangorc (path.c_str());
|
||||
if (!pangorc) {
|
||||
error << string_compose (_("cannot open pango.rc file %1") , path) << endmsg;
|
||||
} else {
|
||||
pangorc << "[Pango]\nModuleFiles="
|
||||
<< Glib::build_filename (userconfigdir, "pango.modules")
|
||||
<< endl;
|
||||
pangorc.close ();
|
||||
}
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
#include "bundle_env.h"
|
||||
#include "i18n.h"
|
||||
|
||||
|
|
@ -84,7 +85,7 @@ get_install_path ()
|
|||
|
||||
|
||||
void
|
||||
fixup_bundle_environment (int, char* [], const char** localedir)
|
||||
fixup_bundle_environment (int, char* [], string & localedir)
|
||||
{
|
||||
EnvironmentalProtectionAgency::set_global_epa (new EnvironmentalProtectionAgency (true));
|
||||
/* what to do ? */
|
||||
|
|
@ -95,8 +96,17 @@ fixup_bundle_environment (int, char* [], const char** localedir)
|
|||
// Unset GTK_RC_FILES so that only ardour specific files are loaded
|
||||
Glib::unsetenv ("GTK_RC_FILES");
|
||||
|
||||
|
||||
std::string path;
|
||||
|
||||
if (ARDOUR::translations_are_enabled ()) {
|
||||
path = windows_search_path().to_string();
|
||||
path += "\\locale";
|
||||
Glib::setenv ("GTK_LOCALEDIR", path, true);
|
||||
|
||||
// and return the same path to our caller
|
||||
localedir = path;
|
||||
}
|
||||
|
||||
const char *cstr;
|
||||
cstr = getenv ("VAMP_PATH");
|
||||
if (cstr) {
|
||||
|
|
@ -111,6 +121,8 @@ fixup_bundle_environment (int, char* [], const char** localedir)
|
|||
path += G_SEARCHPATH_SEPARATOR;
|
||||
path += "%COMMONPROGRAMFILES%\\Vamp Plugins";
|
||||
Glib::setenv ("VAMP_PATH", path, true);
|
||||
|
||||
Glib::setenv ("SUIL_MODULE_DIR", Glib::build_filename(ardour_dll_directory(), "suil"), true);
|
||||
}
|
||||
|
||||
static __cdecl void
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ string clearlooks_la_file;
|
|||
}
|
||||
|
||||
void
|
||||
fixup_bundle_environment (int argc, char* argv[], const char** localedir)
|
||||
fixup_bundle_environment (int argc, char* argv[], string & localedir)
|
||||
{
|
||||
std::string exec_path = argv[0];
|
||||
std::string dir_path = Glib::path_get_dirname (exec_path);
|
||||
|
|
@ -411,6 +411,10 @@ fixup_bundle_environment (int argc, char* argv[], const char** localedir)
|
|||
Glib::setenv ("LADSPA_PATH", path, true);
|
||||
|
||||
|
||||
// Next, set up 'SUIL_MODULE_DIR'
|
||||
Glib::setenv ("SUIL_MODULE_DIR", Glib::build_filename(ardour_dll_directory(), "suil"), true);
|
||||
|
||||
|
||||
// Next, set up 'VAMP_PATH'
|
||||
cstr = getenv ("VAMP_PATH");
|
||||
if (cstr) {
|
||||
|
|
@ -446,7 +450,7 @@ fixup_bundle_environment (int argc, char* argv[], const char** localedir)
|
|||
Glib::setenv ("GTK_LOCALEDIR", path, true);
|
||||
|
||||
// and return the same path to our caller
|
||||
(*localedir) = strdup (path.c_str());
|
||||
localedir = path;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
gtk-button-images = 0 # [ Default value: 1 ] Show stock icons on buttons.
|
||||
|
||||
style "default" = "medium_text"
|
||||
{
|
||||
#Original values for reference
|
||||
|
|
@ -99,7 +101,7 @@ style "default" = "medium_text"
|
|||
GtkTreeView :: vertical-separator = 2 # [ 2 ] ( >= 0 ) Vertical space between cells. Must be an even number.
|
||||
|
||||
GtkEntry :: honors-transparent-bg-hint = 1 # [ 0 ] ( bool ) (Clearlooks) Without this, gecko will fill in the background of the entry.
|
||||
GtkEntry :: cursor-color = @fg_selected
|
||||
GtkEntry :: cursor-color = @bg_selected
|
||||
|
||||
#GtkToolbar::shadow_type = GTK_SHADOW_ETCHED_IN
|
||||
|
||||
|
|
@ -231,9 +233,9 @@ style "small_text"
|
|||
font_name = "@FONT_SMALL@"
|
||||
}
|
||||
|
||||
style "small_mono_text"
|
||||
style "small_clock"
|
||||
{
|
||||
font_name = "@MONOSPACE@ @FONT_SMALLER@"
|
||||
font_name = "@CLOCKFONT@ @FONT_SMALLER@"
|
||||
}
|
||||
|
||||
style "small_italic_text"
|
||||
|
|
@ -278,9 +280,9 @@ style "big_text"
|
|||
font_name = "@FONT_BIG@"
|
||||
}
|
||||
|
||||
style "bigger_mono_text"
|
||||
style "bigger_clock"
|
||||
{
|
||||
font_name = "@MONOSPACE@ @FONT_BIGGER@"
|
||||
font_name = "@CLOCKFONT@ @FONT_BIGGER@"
|
||||
}
|
||||
|
||||
style "larger_text"
|
||||
|
|
@ -288,9 +290,9 @@ style "larger_text"
|
|||
font_name = "@FONT_LARGE@"
|
||||
}
|
||||
|
||||
style "monospace massive_text"
|
||||
style "massive_clock"
|
||||
{
|
||||
font_name = "@MONOSPACE@ bold @FONT_MASSIVE@"
|
||||
font_name = "@CLOCKFONT@ bold @FONT_MASSIVE@"
|
||||
}
|
||||
|
||||
style "big_bold_text"
|
||||
|
|
@ -1053,16 +1055,16 @@ widget "*FatalMessage" style:highest "fatal_message"
|
|||
widget "*InfoMessage" style:highest "info_message"
|
||||
widget "*WarningMessage" style:highest "warning_message"
|
||||
|
||||
widget "*big clock" style:highest "monospace massive_text"
|
||||
widget "*selection clock" style:highest "small_mono_text"
|
||||
widget "*punch clock" style:highest "small_mono_text"
|
||||
widget "*transport clock" style:highest "bigger_mono_text"
|
||||
widget "*secondary clock" style:highest "bigger_mono_text"
|
||||
widget "*transport delta clock" style:highest "bigger_mono_text"
|
||||
widget "*secondary delta clock" style:highest "bigger_mono_text"
|
||||
widget "*big clock" style:highest "massive_clock"
|
||||
widget "*selection clock" style:highest "small_clock"
|
||||
widget "*punch clock" style:highest "small_clock"
|
||||
widget "*transport clock" style:highest "bigger_clock"
|
||||
widget "*secondary clock" style:highest "bigger_clock"
|
||||
widget "*transport delta clock" style:highest "bigger_clock"
|
||||
widget "*secondary delta clock" style:highest "bigger_clock"
|
||||
widget "*silence duration clock" style:highest "medium_text"
|
||||
widget "*edit point clock" style:highest "medium_text"
|
||||
widget "*nudge clock" style:highest "small_mono_text"
|
||||
widget "*nudge clock" style:highest "small_clock"
|
||||
widget "*menubar clock" style:highest "medium_text"
|
||||
widget "*zoomrange clock" style:highest "medium_text"
|
||||
widget "*timecodeoffset clock" style:highest "medium_text"
|
||||
|
|
|
|||
|
|
@ -117,11 +117,11 @@
|
|||
</Colors>
|
||||
<ColorAliases>
|
||||
<ColorAlias name="active crossfade" alias="color 1"/>
|
||||
<ColorAlias name="arrange base" alias="color 2"/>
|
||||
<ColorAlias name="arrange base" alias="color 34"/>
|
||||
<ColorAlias name="audio automation track fill" alias="color 70"/>
|
||||
<ColorAlias name="audio bus base" alias="color 3"/>
|
||||
<ColorAlias name="audio master bus base" alias="color 4"/>
|
||||
<ColorAlias name="audio track base" alias="color 70"/>
|
||||
<ColorAlias name="audio track base" alias="color 77"/>
|
||||
<ColorAlias name="automation line" alias="color 6"/>
|
||||
<ColorAlias name="automation track outline" alias="color 7"/>
|
||||
<ColorAlias name="big clock active: background" alias="color 4"/>
|
||||
|
|
@ -208,8 +208,8 @@
|
|||
<ColorAlias name="gtk_solo" alias="color 91"/>
|
||||
<ColorAlias name="gtk_somewhat_bright_indicator" alias="color 89"/>
|
||||
<ColorAlias name="gtk_texts" alias="color 50"/>
|
||||
<ColorAlias name="gtk_track_header_inactive" alias="color 84"/>
|
||||
<ColorAlias name="gtk_track_header_selected" alias="color 93"/>
|
||||
<ColorAlias name="gtk_track_header_inactive" alias="color 34"/>
|
||||
<ColorAlias name="gtk_track_header_selected" alias="color 40"/>
|
||||
<ColorAlias name="image track" alias="color 31"/>
|
||||
<ColorAlias name="inactive crossfade" alias="color 32"/>
|
||||
<ColorAlias name="inactive fade handle" alias="color 33"/>
|
||||
|
|
@ -229,7 +229,7 @@
|
|||
<ColorAlias name="marker label" alias="color 4"/>
|
||||
<ColorAlias name="marker track" alias="color 31"/>
|
||||
<ColorAlias name="measure line bar" alias="color 13"/>
|
||||
<ColorAlias name="measure line beat" alias="color 45"/>
|
||||
<ColorAlias name="measure line beat" alias="color 33"/>
|
||||
<ColorAlias name="meter background bottom" alias="color 46"/>
|
||||
<ColorAlias name="meter background top" alias="color 34"/>
|
||||
<ColorAlias name="meter bar" alias="color 7"/>
|
||||
|
|
@ -250,7 +250,7 @@
|
|||
<ColorAlias name="meterstrip ppm fg" alias="color 31"/>
|
||||
<ColorAlias name="meterstrip vu bg" alias="color 32"/>
|
||||
<ColorAlias name="meterstrip vu fg" alias="color 4"/>
|
||||
<ColorAlias name="midi automation track fill" alias="color 94"/>
|
||||
<ColorAlias name="midi automation track fill" alias="color 58"/>
|
||||
<ColorAlias name="midi bus base" alias="color 4"/>
|
||||
<ColorAlias name="midi device: fill" alias="color 25"/>
|
||||
<ColorAlias name="midi device: fill active" alias="color 42"/>
|
||||
|
|
@ -269,10 +269,10 @@
|
|||
<ColorAlias name="midi meter color8" alias="color 56"/>
|
||||
<ColorAlias name="midi meter color9" alias="color 17"/>
|
||||
<ColorAlias name="midi note inactive channel" alias="color 4"/>
|
||||
<ColorAlias name="midi note max" alias="color 52"/>
|
||||
<ColorAlias name="midi note mid" alias="color 57"/>
|
||||
<ColorAlias name="midi note min" alias="color 58"/>
|
||||
<ColorAlias name="midi note selected" alias="color 59"/>
|
||||
<ColorAlias name="midi note max" alias="color 8"/>
|
||||
<ColorAlias name="midi note mid" alias="color 96"/>
|
||||
<ColorAlias name="midi note min" alias="color 103"/>
|
||||
<ColorAlias name="midi note selected" alias="color 40"/>
|
||||
<ColorAlias name="midi note selected outline" alias="color 9"/>
|
||||
<ColorAlias name="midi note velocity text" alias="color 32"/>
|
||||
<ColorAlias name="midi patch change fill" alias="color 60"/>
|
||||
|
|
@ -337,13 +337,11 @@
|
|||
<ColorAlias name="piano roll black outline" alias="color 33"/>
|
||||
<ColorAlias name="piano roll white" alias="color 45"/>
|
||||
<ColorAlias name="play head" alias="color 9"/>
|
||||
<ColorAlias name="plugin bypass button: fill" alias="color 71"/>
|
||||
<ColorAlias name="plugin bypass button: fill active" alias="color 42"/>
|
||||
<ColorAlias name="plugin bypass button: led active" alias="color 9"/>
|
||||
<ColorAlias name="plugin bypass button: led active" alias="color 8"/>
|
||||
<ColorAlias name="processor automation line" alias="color 77"/>
|
||||
<ColorAlias name="processor control button: fill" alias="color 29"/>
|
||||
<ColorAlias name="processor control button: fill active" alias="color 46"/>
|
||||
<ColorAlias name="processor control button: led active" alias="color 16"/>
|
||||
<ColorAlias name="processor control button: led active" alias="color 62"/>
|
||||
<ColorAlias name="processor fader: fill" alias="color 16"/>
|
||||
<ColorAlias name="processor fader: fill active" alias="color 78"/>
|
||||
<ColorAlias name="processor fader: led active" alias="color 37"/>
|
||||
|
|
@ -369,7 +367,6 @@
|
|||
<ColorAlias name="recording rect" alias="color 86"/>
|
||||
<ColorAlias name="recording waveform fill" alias="color 13"/>
|
||||
<ColorAlias name="recording waveform outline" alias="color 43"/>
|
||||
<ColorAlias name="time axis view item base" alias="color 94"/>
|
||||
<ColorAlias name="region list automatic" alias="color 53"/>
|
||||
<ColorAlias name="region list missing source" alias="color 9"/>
|
||||
<ColorAlias name="region list whole file" alias="color 1"/>
|
||||
|
|
@ -438,7 +435,8 @@
|
|||
<ColorAlias name="tempo bar" alias="color 46"/>
|
||||
<ColorAlias name="tempo marker" alias="color 19"/>
|
||||
<ColorAlias name="time axis frame" alias="color 4"/>
|
||||
<ColorAlias name="time stretch fill" alias="color 26"/>
|
||||
<ColorAlias name="time axis view item base" alias="color 94"/>
|
||||
<ColorAlias name="time stretch fill" alias="color 100"/>
|
||||
<ColorAlias name="time stretch outline" alias="color 94"/>
|
||||
<ColorAlias name="tracknumber label: fill" alias="color 34"/>
|
||||
<ColorAlias name="tracknumber label: fill active" alias="color 46"/>
|
||||
|
|
@ -476,38 +474,40 @@
|
|||
<ColorAlias name="zoom button: led active" alias="color 8"/>
|
||||
</ColorAliases>
|
||||
<Modifiers>
|
||||
<Modifier name="audio bus base" modifier="= alpha:0.4078"/>
|
||||
<Modifier name="audio track base" modifier="= alpha:0.4078"/>
|
||||
<Modifier name="automation track fill" modifier="= alpha:0.326156"/>
|
||||
<Modifier name="audio bus base" modifier="= alpha:0.3"/>
|
||||
<Modifier name="audio track base" modifier="= alpha:0.3"/>
|
||||
<Modifier name="automation track fill" modifier="= alpha:0.3"/>
|
||||
<Modifier name="covered region base" modifier="= alpha:0.7"/>
|
||||
<Modifier name="crossfade alpha" modifier="= alpha:0.1803"/>
|
||||
<Modifier name="dragging region" modifier="= alpha:0.9"/>
|
||||
<Modifier name="editable region" modifier="= alpha:0.1"/>
|
||||
<Modifier name="editable region" modifier="= alpha:0.25"/>
|
||||
<Modifier name="gain line inactive" modifier="= alpha:0.7725"/>
|
||||
<Modifier name="ghost track base" modifier="= alpha:0.640782"/>
|
||||
<Modifier name="ghost track midi fill" modifier="= alpha:0.228968"/>
|
||||
<Modifier name="ghost track midi fill" modifier="= alpha:0.3"/>
|
||||
<Modifier name="inactive crossfade" modifier="= alpha:0.4666"/>
|
||||
<Modifier name="loop rectangle" modifier="= alpha:0.9764"/>
|
||||
<Modifier name="measure line beat" modifier="= alpha:0.4627"/>
|
||||
<Modifier name="loop rectangle" modifier="= alpha:0.5"/>
|
||||
<Modifier name="marker bar" modifier="= alpha:0.5"/>
|
||||
<Modifier name="measure line beat" modifier="= alpha:1.0"/>
|
||||
<Modifier name="midi frame base" modifier="= alpha:0.4"/>
|
||||
<Modifier name="midi note" modifier="= alpha:0.686905"/>
|
||||
<Modifier name="midi note" modifier="= alpha:0.8"/>
|
||||
<Modifier name="midi note velocity text" modifier="= alpha:0.4666"/>
|
||||
<Modifier name="midi patch change fill" modifier="= alpha:0.6274"/>
|
||||
<Modifier name="midi sysex fill" modifier="= alpha:0.4666"/>
|
||||
<Modifier name="midi track base" modifier="= alpha:0.3725"/>
|
||||
<Modifier name="midi track base" modifier="= alpha:0.3"/>
|
||||
<Modifier name="mono panner position fill" modifier="= alpha:0.8"/>
|
||||
<Modifier name="opaque region base" modifier="= alpha:0.75"/>
|
||||
<Modifier name="panner fill" modifier="= alpha:0.7882"/>
|
||||
<Modifier name="piano roll black" modifier="= alpha:0.331098"/>
|
||||
<Modifier name="piano roll white" modifier="= alpha:0.4627"/>
|
||||
<Modifier name="piano roll black" modifier="= alpha:0.2"/>
|
||||
<Modifier name="piano roll white" modifier="= alpha:0.2"/>
|
||||
<Modifier name="recording rect" modifier="= alpha:0.25"/>
|
||||
<Modifier name="time axis view item base" modifier="= alpha:0.7"/>
|
||||
<Modifier name="covered region base" modifier="= alpha:0.7"/>
|
||||
<Modifier name="opaque region base" modifier="= alpha:0.7"/>
|
||||
<Modifier name="transparent region base" modifier="= alpha:0.50"/>
|
||||
<Modifier name="selected midi note" modifier="= alpha:0.7529"/>
|
||||
<Modifier name="selection rect" modifier="= alpha:0.4666"/>
|
||||
<Modifier name="silence" modifier="= alpha:0.4784"/>
|
||||
<Modifier name="stereo panner inverted" modifier="= alpha:0.7882"/>
|
||||
<Modifier name="stereo panner inverted bg" modifier="= alpha:0.7529"/>
|
||||
<Modifier name="time axis view item base" modifier="= alpha:0.7"/>
|
||||
<Modifier name="transparent region base" modifier="= alpha:0.6"/>
|
||||
<Modifier name="time stretch fill" modifier="= alpha:0.5"/>
|
||||
<Modifier name="verbose canvas cursor" modifier="= alpha:0.4666"/>
|
||||
</Modifiers>
|
||||
</Ardour>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<Option name="waveform-gradient-depth" value="0"/>
|
||||
<Option name="timeline-item-gradient-depth" value="0.5"/>
|
||||
<Option name="all-floating-windows-are-dialogs" value="0"/>
|
||||
<Option name="transients-follow-front" value="0"/>
|
||||
<Option name="color-regions-using-track-color" value="0"/>
|
||||
<Option name="show-waveform-clipping" value="1"/>
|
||||
<Option name="lock-gui-after-seconds" value="0"/>
|
||||
|
|
|
|||
|
|
@ -116,8 +116,8 @@ EditNoteDialog::EditNoteDialog (MidiRegionView* rv, set<NoteBase*> n)
|
|||
int test_channel = (*_events.begin())->note()->channel ();
|
||||
int test_pitch = (*_events.begin())->note()->note ();
|
||||
int test_velocity = (*_events.begin())->note()->velocity ();
|
||||
Evoral::MusicalTime test_time = (*_events.begin())->note()->time ();
|
||||
Evoral::MusicalTime test_length = (*_events.begin())->note()->length ();
|
||||
Evoral::Beats test_time = (*_events.begin())->note()->time ();
|
||||
Evoral::Beats test_length = (*_events.begin())->note()->length ();
|
||||
|
||||
for (set<NoteBase*>::iterator i = _events.begin(); i != _events.end(); ++i) {
|
||||
if ((*i)->note()->channel() != test_channel) {
|
||||
|
|
@ -193,7 +193,7 @@ EditNoteDialog::done (int r)
|
|||
}
|
||||
}
|
||||
|
||||
Evoral::MusicalTime const t = _region_view->source_relative_time_converter().from (_time_clock.current_time ());
|
||||
Evoral::Beats const t = _region_view->source_relative_time_converter().from (_time_clock.current_time ());
|
||||
|
||||
if (!_time_all.get_sensitive() || _time_all.get_active ()) {
|
||||
for (set<NoteBase*>::iterator i = _events.begin(); i != _events.end(); ++i) {
|
||||
|
|
@ -204,7 +204,7 @@ EditNoteDialog::done (int r)
|
|||
}
|
||||
}
|
||||
|
||||
Evoral::MusicalTime const d = _region_view->region_relative_time_converter().from (_length_clock.current_duration ());
|
||||
Evoral::Beats const d = _region_view->region_relative_time_converter().from (_length_clock.current_duration ());
|
||||
|
||||
if (!_length_all.get_sensitive() || _length_all.get_active ()) {
|
||||
for (set<NoteBase*>::iterator i = _events.begin(); i != _events.end(); ++i) {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@
|
|||
#include "ardour/audio_track.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/audioregion.h"
|
||||
#include "ardour/lmath.h"
|
||||
#include "ardour/location.h"
|
||||
#include "ardour/profile.h"
|
||||
#include "ardour/route_group.h"
|
||||
|
|
@ -80,7 +81,6 @@
|
|||
|
||||
#include "control_protocol/control_protocol.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "actions.h"
|
||||
#include "analysis_window.h"
|
||||
#include "audio_clock.h"
|
||||
|
|
@ -251,6 +251,7 @@ pane_size_watcher (Paned* pane)
|
|||
Editor::Editor ()
|
||||
: _join_object_range_state (JOIN_OBJECT_RANGE_NONE)
|
||||
|
||||
, _mouse_changed_selection (false)
|
||||
/* time display buttons */
|
||||
, minsec_label (_("Mins:Secs"))
|
||||
, bbt_label (_("Bars:Beats"))
|
||||
|
|
@ -403,7 +404,7 @@ Editor::Editor ()
|
|||
location_loop_color = ARDOUR_UI::config()->color ("location loop");
|
||||
location_punch_color = ARDOUR_UI::config()->color ("location punch");
|
||||
|
||||
zoom_focus = ZoomFocusLeft;
|
||||
zoom_focus = ZoomFocusPlayhead;
|
||||
_edit_point = EditAtMouse;
|
||||
_visible_track_count = -1;
|
||||
|
||||
|
|
@ -680,7 +681,6 @@ Editor::Editor ()
|
|||
_snap_mode = SnapOff;
|
||||
set_snap_mode (_snap_mode);
|
||||
set_mouse_mode (MouseObject, true);
|
||||
pre_internal_mouse_mode = MouseObject;
|
||||
pre_internal_snap_type = _snap_type;
|
||||
pre_internal_snap_mode = _snap_mode;
|
||||
internal_snap_type = _snap_type;
|
||||
|
|
@ -1860,9 +1860,9 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
|
|||
edit_items.push_back (MenuElem (_("Select All in Range"), sigc::mem_fun(*this, &Editor::select_all_selectables_using_time_selection)));
|
||||
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Set Loop from Range"), sigc::bind (sigc::mem_fun(*this, &Editor::set_loop_from_selection), false)));
|
||||
edit_items.push_back (MenuElem (_("Set Punch from Range"), sigc::mem_fun(*this, &Editor::set_punch_from_selection)));
|
||||
edit_items.push_back (MenuElem (_("Set Session Start/End from Range"), sigc::mem_fun(*this, &Editor::set_session_extents_from_selection)));
|
||||
edit_items.push_back (MenuElem (_("Set Loop from Selection"), sigc::bind (sigc::mem_fun(*this, &Editor::set_loop_from_selection), false)));
|
||||
edit_items.push_back (MenuElem (_("Set Punch from Selection"), sigc::mem_fun(*this, &Editor::set_punch_from_selection)));
|
||||
edit_items.push_back (MenuElem (_("Set Session Start/End from Selection"), sigc::mem_fun(*this, &Editor::set_session_extents_from_selection)));
|
||||
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Add Range Markers"), sigc::mem_fun (*this, &Editor::add_location_from_selection)));
|
||||
|
|
@ -1879,7 +1879,7 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
|
|||
edit_items.push_back (MenuElem (_("Bounce Range to Region List With Processing"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, true)));
|
||||
edit_items.push_back (MenuElem (_("Export Range..."), sigc::mem_fun(*this, &Editor::export_selection)));
|
||||
if (ARDOUR_UI::instance()->video_timeline->get_duration() > 0) {
|
||||
edit_items.push_back (MenuElem (_("Export Video Range..."), sigc::bind (sigc::mem_fun(*this, &Editor::export_video), true)));
|
||||
edit_items.push_back (MenuElem (_("Export Video Range..."), sigc::bind (sigc::mem_fun(*(ARDOUR_UI::instance()), &ARDOUR_UI::export_video), true)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2038,6 +2038,12 @@ Editor::set_snap_to (SnapType st)
|
|||
{
|
||||
unsigned int snap_ind = (unsigned int)st;
|
||||
|
||||
if (internal_editing()) {
|
||||
internal_snap_type = st;
|
||||
} else {
|
||||
pre_internal_snap_type = st;
|
||||
}
|
||||
|
||||
_snap_type = st;
|
||||
|
||||
if (snap_ind > snap_type_strings.size() - 1) {
|
||||
|
|
@ -2094,6 +2100,8 @@ Editor::set_snap_to (SnapType st)
|
|||
break;
|
||||
}
|
||||
|
||||
redisplay_tempo (false);
|
||||
|
||||
SnapChanged (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
|
|
@ -2314,37 +2322,16 @@ Editor::set_state (const XMLNode& node, int /*version*/)
|
|||
if ((prop = node.property ("show-measures"))) {
|
||||
bool yn = string_is_affirmative (prop->value());
|
||||
_show_measures = yn;
|
||||
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleMeasureVisibility"));
|
||||
if (act) {
|
||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
/* do it twice to force the change */
|
||||
tact->set_active (!yn);
|
||||
tact->set_active (yn);
|
||||
}
|
||||
}
|
||||
|
||||
if ((prop = node.property ("follow-playhead"))) {
|
||||
bool yn = string_is_affirmative (prop->value());
|
||||
set_follow_playhead (yn);
|
||||
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-follow-playhead"));
|
||||
if (act) {
|
||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
if (tact->get_active() != yn) {
|
||||
tact->set_active (yn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((prop = node.property ("stationary-playhead"))) {
|
||||
bool yn = string_is_affirmative (prop->value());
|
||||
set_stationary_playhead (yn);
|
||||
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-stationary-playhead"));
|
||||
if (act) {
|
||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
if (tact->get_active() != yn) {
|
||||
tact->set_active (yn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((prop = node.property ("region-list-sort-type"))) {
|
||||
|
|
@ -2420,6 +2407,42 @@ Editor::set_state (const XMLNode& node, int /*version*/)
|
|||
nudge_clock->set (_session->frame_rate() * 5, true);
|
||||
}
|
||||
|
||||
{
|
||||
/* apply state
|
||||
* Not all properties may have been in XML, but
|
||||
* those that are linked to a private variable may need changing
|
||||
*/
|
||||
RefPtr<Action> act;
|
||||
bool yn;
|
||||
|
||||
act = ActionManager::get_action (X_("Editor"), X_("ToggleMeasureVisibility"));
|
||||
if (act) {
|
||||
yn = _show_measures;
|
||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
/* do it twice to force the change */
|
||||
tact->set_active (!yn);
|
||||
tact->set_active (yn);
|
||||
}
|
||||
|
||||
act = ActionManager::get_action (X_("Editor"), X_("toggle-follow-playhead"));
|
||||
yn = _follow_playhead;
|
||||
if (act) {
|
||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
if (tact->get_active() != yn) {
|
||||
tact->set_active (yn);
|
||||
}
|
||||
}
|
||||
|
||||
act = ActionManager::get_action (X_("Editor"), X_("toggle-stationary-playhead"));
|
||||
yn = _stationary_playhead;
|
||||
if (act) {
|
||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
if (tact->get_active() != yn) {
|
||||
tact->set_active (yn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -3184,14 +3207,14 @@ Editor::build_snap_type_menu ()
|
|||
void
|
||||
Editor::setup_tooltips ()
|
||||
{
|
||||
ARDOUR_UI::instance()->set_tip (smart_mode_button, _("Smart Mode (add Range functions to Object mode)"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_move_button, _("Object Mode (select/move Objects)"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_cut_button, _("Cut Mode (split Regions)"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_select_button, _("Grab/Select Objects"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_draw_button, _("Draw/Edit Gain/Notes/Automation"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_timefx_button, _("Stretch/Shrink Regions and MIDI Notes"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_audition_button, _("Listen to Specific Regions"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_content_button, _("Edit Contents (notes and automation)"));
|
||||
ARDOUR_UI::instance()->set_tip (smart_mode_button, _("Smart Mode (add Range functions to Grab mode)"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_move_button, _("Grab Mode (select/move objects)"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_cut_button, _("Cut Mode (split regions)"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_select_button, _("Range Mode (select time ranges)"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_draw_button, _("Draw Mode (draw and edit gain/notes/automation)"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_timefx_button, _("Stretch Mode (time-stretch audio and midi regions, preserving pitch)"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_audition_button, _("Audition Mode (listen to regions)"));
|
||||
ARDOUR_UI::instance()->set_tip (mouse_content_button, _("Internal Edit Mode (edit notes and gain curves inside regions)"));
|
||||
ARDOUR_UI::instance()->set_tip (*_group_tabs, _("Groups: click to (de)activate\nContext-click for other operations"));
|
||||
ARDOUR_UI::instance()->set_tip (nudge_forward_button, _("Nudge Region/Selection Later"));
|
||||
ARDOUR_UI::instance()->set_tip (nudge_backward_button, _("Nudge Region/Selection Earlier"));
|
||||
|
|
@ -3319,7 +3342,12 @@ Editor::begin_selection_op_history ()
|
|||
{
|
||||
selection_op_cmd_depth = 0;
|
||||
selection_op_history_it = 0;
|
||||
selection_op_history.clear();
|
||||
|
||||
while(!selection_op_history.empty()) {
|
||||
delete selection_op_history.front();
|
||||
selection_op_history.pop_front();
|
||||
}
|
||||
|
||||
selection_undo_action->set_sensitive (false);
|
||||
selection_redo_action->set_sensitive (false);
|
||||
selection_op_history.push_front (&_selection_memento->get_state ());
|
||||
|
|
@ -3342,20 +3370,31 @@ Editor::commit_reversible_selection_op ()
|
|||
if (selection_op_cmd_depth == 1) {
|
||||
|
||||
if (selection_op_history_it > 0 && selection_op_history_it < selection_op_history.size()) {
|
||||
/**
|
||||
The user has undone some selection ops and then made a new one,
|
||||
making anything earlier in the list invalid.
|
||||
*/
|
||||
|
||||
list<XMLNode *>::iterator it = selection_op_history.begin();
|
||||
advance (it, selection_op_history_it);
|
||||
selection_op_history.erase (selection_op_history.begin(), it);
|
||||
list<XMLNode *>::iterator e_it = it;
|
||||
advance (e_it, selection_op_history_it);
|
||||
|
||||
for ( ; it != e_it; ++it) {
|
||||
delete *it;
|
||||
}
|
||||
selection_op_history.erase (selection_op_history.begin(), e_it);
|
||||
}
|
||||
|
||||
selection_op_history.push_front (&_selection_memento->get_state ());
|
||||
selection_op_history_it = 0;
|
||||
|
||||
selection_undo_action->set_sensitive (true);
|
||||
selection_redo_action->set_sensitive (false);
|
||||
}
|
||||
|
||||
if (selection_op_cmd_depth > 0) {
|
||||
selection_op_cmd_depth--;
|
||||
}
|
||||
|
||||
selection_undo_action->set_sensitive (true);
|
||||
selection_redo_action->set_sensitive (false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3371,7 +3410,6 @@ Editor::undo_selection_op ()
|
|||
selection_redo_action->set_sensitive (true);
|
||||
}
|
||||
++n;
|
||||
|
||||
}
|
||||
/* is there an earlier entry? */
|
||||
if ((selection_op_history_it + 1) >= selection_op_history.size()) {
|
||||
|
|
@ -3394,7 +3432,6 @@ Editor::redo_selection_op ()
|
|||
selection_undo_action->set_sensitive (true);
|
||||
}
|
||||
++n;
|
||||
|
||||
}
|
||||
|
||||
if (selection_op_history_it == 0) {
|
||||
|
|
@ -3421,12 +3458,25 @@ Editor::begin_reversible_command (GQuark q)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::abort_reversible_command ()
|
||||
{
|
||||
if (_session) {
|
||||
while(!before.empty()) {
|
||||
delete before.front();
|
||||
before.pop_front();
|
||||
}
|
||||
_session->abort_reversible_command ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::commit_reversible_command ()
|
||||
{
|
||||
if (_session) {
|
||||
if (before.size() == 1) {
|
||||
_session->add_command (new MementoCommand<SelectionMemento>(*(_selection_memento), before.front(), &_selection_memento->get_state ()));
|
||||
redo_action->set_sensitive(false);
|
||||
undo_action->set_sensitive(true);
|
||||
begin_selection_op_history ();
|
||||
}
|
||||
|
|
@ -3653,7 +3703,7 @@ Editor::build_track_count_menu ()
|
|||
visible_tracks_selector.AddMenuElem (MenuElem (X_("24"), sigc::bind (sigc::mem_fun(*this, &Editor::set_visible_track_count), 24)));
|
||||
visible_tracks_selector.AddMenuElem (MenuElem (X_("32"), sigc::bind (sigc::mem_fun(*this, &Editor::set_visible_track_count), 32)));
|
||||
visible_tracks_selector.AddMenuElem (MenuElem (X_("64"), sigc::bind (sigc::mem_fun(*this, &Editor::set_visible_track_count), 64)));
|
||||
visible_tracks_selector.AddMenuElem (MenuElem (_("Selected"), sigc::mem_fun(*this, &Editor::fit_selected_tracks)));
|
||||
visible_tracks_selector.AddMenuElem (MenuElem (_("Selection"), sigc::mem_fun(*this, &Editor::fit_selection)));
|
||||
visible_tracks_selector.AddMenuElem (MenuElem (_("All"), sigc::bind (sigc::mem_fun(*this, &Editor::set_visible_track_count), 0)));
|
||||
} else {
|
||||
visible_tracks_selector.AddMenuElem (MenuElem (_("Fit 1 track"), sigc::bind (sigc::mem_fun(*this, &Editor::set_visible_track_count), 1)));
|
||||
|
|
@ -3665,7 +3715,7 @@ Editor::build_track_count_menu ()
|
|||
visible_tracks_selector.AddMenuElem (MenuElem (_("Fit 32 tracks"), sigc::bind (sigc::mem_fun(*this, &Editor::set_visible_track_count), 32)));
|
||||
visible_tracks_selector.AddMenuElem (MenuElem (_("Fit 48 tracks"), sigc::bind (sigc::mem_fun(*this, &Editor::set_visible_track_count), 48)));
|
||||
visible_tracks_selector.AddMenuElem (MenuElem (_("Fit All tracks"), sigc::bind (sigc::mem_fun(*this, &Editor::set_visible_track_count), 0)));
|
||||
visible_tracks_selector.AddMenuElem (MenuElem (_("Fit Selected tracks"), sigc::mem_fun(*this, &Editor::fit_selected_tracks)));
|
||||
visible_tracks_selector.AddMenuElem (MenuElem (_("Fit Selection"), sigc::mem_fun(*this, &Editor::fit_selection)));
|
||||
|
||||
zoom_preset_selector.AddMenuElem (MenuElem (_("Zoom to 10 ms"), sigc::bind (sigc::mem_fun(*this, &Editor::set_zoom_preset), 10)));
|
||||
zoom_preset_selector.AddMenuElem (MenuElem (_("Zoom to 100 ms"), sigc::bind (sigc::mem_fun(*this, &Editor::set_zoom_preset), 100)));
|
||||
|
|
@ -3735,7 +3785,7 @@ Editor::set_visible_track_count (int32_t n)
|
|||
}
|
||||
|
||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
(*i)->set_height (h);
|
||||
(*i)->set_height (h, TimeAxisView::HeightPerLane);
|
||||
}
|
||||
|
||||
if (str != visible_tracks_selector.get_text()) {
|
||||
|
|
@ -4001,90 +4051,56 @@ Editor::get_paste_offset (framepos_t pos, unsigned paste_count, framecnt_t durat
|
|||
return offset;
|
||||
}
|
||||
|
||||
Evoral::MusicalTime
|
||||
unsigned
|
||||
Editor::get_grid_beat_divisions(framepos_t position)
|
||||
{
|
||||
switch (_snap_type) {
|
||||
case SnapToBeatDiv128: return 128;
|
||||
case SnapToBeatDiv64: return 64;
|
||||
case SnapToBeatDiv32: return 32;
|
||||
case SnapToBeatDiv28: return 28;
|
||||
case SnapToBeatDiv24: return 24;
|
||||
case SnapToBeatDiv20: return 20;
|
||||
case SnapToBeatDiv16: return 16;
|
||||
case SnapToBeatDiv14: return 14;
|
||||
case SnapToBeatDiv12: return 12;
|
||||
case SnapToBeatDiv10: return 10;
|
||||
case SnapToBeatDiv8: return 8;
|
||||
case SnapToBeatDiv7: return 7;
|
||||
case SnapToBeatDiv6: return 6;
|
||||
case SnapToBeatDiv5: return 5;
|
||||
case SnapToBeatDiv4: return 4;
|
||||
case SnapToBeatDiv3: return 3;
|
||||
case SnapToBeatDiv2: return 2;
|
||||
default: return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Evoral::Beats
|
||||
Editor::get_grid_type_as_beats (bool& success, framepos_t position)
|
||||
{
|
||||
success = true;
|
||||
|
||||
const unsigned divisions = get_grid_beat_divisions(position);
|
||||
if (divisions) {
|
||||
return Evoral::Beats(1.0 / (double)get_grid_beat_divisions(position));
|
||||
}
|
||||
|
||||
switch (_snap_type) {
|
||||
case SnapToBeat:
|
||||
return Evoral::MusicalTime(1.0);
|
||||
break;
|
||||
|
||||
case SnapToBeatDiv128:
|
||||
return Evoral::MusicalTime(1.0/128.0);
|
||||
break;
|
||||
case SnapToBeatDiv64:
|
||||
return Evoral::MusicalTime(1.0/64.0);
|
||||
break;
|
||||
case SnapToBeatDiv32:
|
||||
return Evoral::MusicalTime(1.0/32.0);
|
||||
break;
|
||||
case SnapToBeatDiv28:
|
||||
return Evoral::MusicalTime(1.0/28.0);
|
||||
break;
|
||||
case SnapToBeatDiv24:
|
||||
return Evoral::MusicalTime(1.0/24.0);
|
||||
break;
|
||||
case SnapToBeatDiv20:
|
||||
return Evoral::MusicalTime(1.0/20.0);
|
||||
break;
|
||||
case SnapToBeatDiv16:
|
||||
return Evoral::MusicalTime(1.0/16.0);
|
||||
break;
|
||||
case SnapToBeatDiv14:
|
||||
return Evoral::MusicalTime(1.0/14.0);
|
||||
break;
|
||||
case SnapToBeatDiv12:
|
||||
return Evoral::MusicalTime(1.0/12.0);
|
||||
break;
|
||||
case SnapToBeatDiv10:
|
||||
return Evoral::MusicalTime(1.0/10.0);
|
||||
break;
|
||||
case SnapToBeatDiv8:
|
||||
return Evoral::MusicalTime(1.0/8.0);
|
||||
break;
|
||||
case SnapToBeatDiv7:
|
||||
return Evoral::MusicalTime(1.0/7.0);
|
||||
break;
|
||||
case SnapToBeatDiv6:
|
||||
return Evoral::MusicalTime(1.0/6.0);
|
||||
break;
|
||||
case SnapToBeatDiv5:
|
||||
return Evoral::MusicalTime(1.0/5.0);
|
||||
break;
|
||||
case SnapToBeatDiv4:
|
||||
return Evoral::MusicalTime(1.0/4.0);
|
||||
break;
|
||||
case SnapToBeatDiv3:
|
||||
return Evoral::MusicalTime(1.0/3.0);
|
||||
break;
|
||||
case SnapToBeatDiv2:
|
||||
return Evoral::MusicalTime(1.0/2.0);
|
||||
break;
|
||||
|
||||
return Evoral::Beats(1.0);
|
||||
case SnapToBar:
|
||||
if (_session) {
|
||||
return Evoral::MusicalTime(_session->tempo_map().meter_at (position).divisions_per_bar());
|
||||
return Evoral::Beats(_session->tempo_map().meter_at (position).divisions_per_bar());
|
||||
}
|
||||
break;
|
||||
|
||||
case SnapToCDFrame:
|
||||
case SnapToTimecodeFrame:
|
||||
case SnapToTimecodeSeconds:
|
||||
case SnapToTimecodeMinutes:
|
||||
case SnapToSeconds:
|
||||
case SnapToMinutes:
|
||||
case SnapToRegionStart:
|
||||
case SnapToRegionEnd:
|
||||
case SnapToRegionSync:
|
||||
case SnapToRegionBoundary:
|
||||
default:
|
||||
success = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return Evoral::MusicalTime();
|
||||
return Evoral::Beats();
|
||||
}
|
||||
|
||||
framecnt_t
|
||||
|
|
@ -4461,6 +4477,7 @@ Editor::use_visual_state (VisualState& vs)
|
|||
*ARDOUR_UI::instance()->gui_object_state = *vs.gui_state;
|
||||
|
||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
(*i)->clear_property_cache();
|
||||
(*i)->reset_visual_state ();
|
||||
}
|
||||
}
|
||||
|
|
@ -4638,7 +4655,7 @@ Editor::sort_track_selection (TrackViewList& sel)
|
|||
}
|
||||
|
||||
framepos_t
|
||||
Editor::get_preferred_edit_position (bool ignore_playhead, bool from_context_menu)
|
||||
Editor::get_preferred_edit_position (bool ignore_playhead, bool from_context_menu, bool from_outside_canvas)
|
||||
{
|
||||
bool ignored;
|
||||
framepos_t where = 0;
|
||||
|
|
@ -4647,8 +4664,10 @@ Editor::get_preferred_edit_position (bool ignore_playhead, bool from_context_men
|
|||
if(Profile->get_mixbus())
|
||||
if (ep == EditAtSelectedMarker)
|
||||
ep=EditAtPlayhead;
|
||||
|
||||
if (from_context_menu && (ep == EditAtMouse)) {
|
||||
|
||||
if (from_outside_canvas && (ep == EditAtMouse)) {
|
||||
ep = EditAtPlayhead;
|
||||
} else if (from_context_menu && (ep == EditAtMouse)) {
|
||||
return canvas_event_sample (&context_click_event, 0, 0);
|
||||
}
|
||||
|
||||
|
|
@ -4663,7 +4682,13 @@ Editor::get_preferred_edit_position (bool ignore_playhead, bool from_context_men
|
|||
|
||||
switch (ep) {
|
||||
case EditAtPlayhead:
|
||||
where = _session->audible_frame();
|
||||
if (_dragging_playhead) {
|
||||
if (!mouse_frame (where, ignored)) {
|
||||
/* XXX not right but what can we do ? */
|
||||
return 0;
|
||||
}
|
||||
} else
|
||||
where = _session->audible_frame();
|
||||
DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("GPEP: use playhead @ %1\n", where));
|
||||
break;
|
||||
|
||||
|
|
@ -4918,17 +4943,17 @@ Editor::get_regions_from_selection_and_entered ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::get_regionviews_by_id (PBD::ID const & id, RegionSelection & regions) const
|
||||
Editor::get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) const
|
||||
{
|
||||
for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
RouteTimeAxisView* tatv;
|
||||
RouteTimeAxisView* rtav;
|
||||
|
||||
if ((tatv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
|
||||
if ((rtav = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
|
||||
boost::shared_ptr<Playlist> pl;
|
||||
std::vector<boost::shared_ptr<Region> > results;
|
||||
boost::shared_ptr<Track> tr;
|
||||
|
||||
if ((tr = tatv->track()) == 0) {
|
||||
if ((tr = rtav->track()) == 0) {
|
||||
/* bus */
|
||||
continue;
|
||||
}
|
||||
|
|
@ -4936,9 +4961,9 @@ Editor::get_regionviews_by_id (PBD::ID const & id, RegionSelection & regions) co
|
|||
if ((pl = (tr->playlist())) != 0) {
|
||||
boost::shared_ptr<Region> r = pl->region_by_id (id);
|
||||
if (r) {
|
||||
RegionView* marv = tatv->view()->find_view (r);
|
||||
if (marv) {
|
||||
regions.push_back (marv);
|
||||
RegionView* rv = rtav->view()->find_view (r);
|
||||
if (rv) {
|
||||
regions.push_back (rv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4946,6 +4971,21 @@ Editor::get_regionviews_by_id (PBD::ID const & id, RegionSelection & regions) co
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::get_per_region_note_selection (list<pair<PBD::ID, set<boost::shared_ptr<Evoral::Note<Evoral::Beats> > > > > &selection) const
|
||||
{
|
||||
|
||||
for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
MidiTimeAxisView* mtav;
|
||||
|
||||
if ((mtav = dynamic_cast<MidiTimeAxisView*> (*i)) != 0) {
|
||||
|
||||
mtav->get_per_region_note_selection (selection);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Editor::get_regions_corresponding_to (boost::shared_ptr<Region> region, vector<RegionView*>& regions, bool src_comparison)
|
||||
{
|
||||
|
|
@ -5121,6 +5161,19 @@ Editor::region_view_added (RegionView * rv)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (rv);
|
||||
if (mrv) {
|
||||
list<pair<PBD::ID const, list<boost::shared_ptr<Evoral::Note<Evoral::Beats> > > > >::iterator rnote;
|
||||
for (rnote = selection->pending_midi_note_selection.begin(); rnote != selection->pending_midi_note_selection.end(); ++rnote) {
|
||||
if (rv->region()->id () == (*rnote).first) {
|
||||
mrv->select_notes ((*rnote).second);
|
||||
selection->pending_midi_note_selection.erase(rnote);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_summary->set_background_dirty ();
|
||||
}
|
||||
|
||||
|
|
@ -5184,6 +5237,8 @@ Editor::add_routes (RouteList& routes)
|
|||
|
||||
RouteTimeAxisView *rtv;
|
||||
list<RouteTimeAxisView*> new_views;
|
||||
TrackViewList new_selection;
|
||||
bool from_scratch = (track_views.size() == 0);
|
||||
|
||||
for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
|
||||
boost::shared_ptr<Route> route = (*x);
|
||||
|
|
@ -5206,6 +5261,7 @@ Editor::add_routes (RouteList& routes)
|
|||
|
||||
new_views.push_back (rtv);
|
||||
track_views.push_back (rtv);
|
||||
new_selection.push_back (rtv);
|
||||
|
||||
rtv->effective_gain_display ();
|
||||
|
||||
|
|
@ -5218,6 +5274,12 @@ Editor::add_routes (RouteList& routes)
|
|||
_summary->routes_added (new_views);
|
||||
}
|
||||
|
||||
if (!from_scratch) {
|
||||
selection->tracks.clear();
|
||||
selection->add (new_selection);
|
||||
begin_selection_op_history();
|
||||
}
|
||||
|
||||
if (show_editor_mixer_when_tracks_arrive) {
|
||||
show_editor_mixer (true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
}
|
||||
|
||||
double sample_to_pixel (framepos_t sample) const {
|
||||
return sample / samples_per_pixel;
|
||||
return round (sample / (double) samples_per_pixel);
|
||||
}
|
||||
|
||||
double sample_to_pixel_unrounded (framepos_t sample) const {
|
||||
|
|
@ -242,6 +242,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
/* selection */
|
||||
|
||||
Selection& get_selection() const { return *selection; }
|
||||
bool get_selection_extents ( framepos_t &start, framepos_t &end ); // the time extents of the current selection, whether Range, Region(s), Control Points, or Notes
|
||||
Selection& get_cut_buffer() const { return *cut_buffer; }
|
||||
void track_mixer_selection ();
|
||||
|
||||
|
|
@ -260,6 +261,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
|
||||
void set_selected_regionview_from_region_list (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set);
|
||||
|
||||
void remove_tracks ();
|
||||
|
||||
/* tempo */
|
||||
|
||||
void set_show_measures (bool yn);
|
||||
|
|
@ -315,7 +318,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
|
||||
framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next);
|
||||
framecnt_t get_paste_offset (framepos_t pos, unsigned paste_count, framecnt_t duration);
|
||||
Evoral::MusicalTime get_grid_type_as_beats (bool& success, framepos_t position);
|
||||
unsigned get_grid_beat_divisions(framepos_t position);
|
||||
Evoral::Beats get_grid_type_as_beats (bool& success, framepos_t position);
|
||||
|
||||
void nudge_forward (bool next, bool force_playhead);
|
||||
void nudge_backward (bool next, bool force_playhead);
|
||||
|
|
@ -361,8 +365,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
|
||||
void scroll_tracks_down_line ();
|
||||
void scroll_tracks_up_line ();
|
||||
bool scroll_up_one_track ();
|
||||
bool scroll_down_one_track ();
|
||||
bool scroll_up_one_track (bool skip_child_views = false);
|
||||
bool scroll_down_one_track (bool skip_child_views = false);
|
||||
|
||||
void prepare_for_cleanup ();
|
||||
void finish_cleanup ();
|
||||
|
|
@ -380,7 +384,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void reset_zoom (framecnt_t);
|
||||
void reposition_and_zoom (framepos_t, double);
|
||||
|
||||
framepos_t get_preferred_edit_position (bool ignore_playhead = false, bool use_context_click = false);
|
||||
framepos_t get_preferred_edit_position (bool ignore_playhead = false,
|
||||
bool use_context_click = false,
|
||||
bool from_outside_canvas = false);
|
||||
|
||||
bool update_mouse_speed ();
|
||||
bool decelerate_mouse_speed ();
|
||||
|
|
@ -417,7 +423,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
|
||||
void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions, bool src_comparison);
|
||||
|
||||
void get_regionviews_by_id (PBD::ID const & id, RegionSelection & regions) const;
|
||||
void get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) const;
|
||||
void get_per_region_note_selection (std::list<std::pair<PBD::ID, std::set<boost::shared_ptr<Evoral::Note<Evoral::Beats> > > > >&) const;
|
||||
|
||||
void center_screen (framepos_t);
|
||||
|
||||
|
|
@ -447,6 +454,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void redo_selection_op ();
|
||||
void begin_reversible_command (std::string cmd_name);
|
||||
void begin_reversible_command (GQuark);
|
||||
void abort_reversible_command ();
|
||||
void commit_reversible_command ();
|
||||
|
||||
DragManager* drags () const {
|
||||
|
|
@ -495,15 +503,15 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
_stepping_axis_view = v;
|
||||
}
|
||||
|
||||
ArdourCanvas::Container* get_trackview_group () const { return _trackview_group; }
|
||||
ArdourCanvas::Container* get_noscroll_group () const { return no_scroll_group; }
|
||||
ArdourCanvas::ScrollGroup* get_hscroll_group () const { return h_scroll_group; }
|
||||
ArdourCanvas::ScrollGroup* get_vscroll_group () const { return v_scroll_group; }
|
||||
ArdourCanvas::ScrollGroup* get_hvscroll_group () const { return hv_scroll_group; }
|
||||
ArdourCanvas::Container* get_trackview_group () const { return _trackview_group; }
|
||||
ArdourCanvas::Container* get_noscroll_group () const { return no_scroll_group; }
|
||||
ArdourCanvas::ScrollGroup* get_hscroll_group () const { return h_scroll_group; }
|
||||
ArdourCanvas::ScrollGroup* get_hvscroll_group () const { return hv_scroll_group; }
|
||||
ArdourCanvas::ScrollGroup* get_cursor_scroll_group () const { return cursor_scroll_group; }
|
||||
|
||||
ArdourCanvas::GtkCanvasViewport* get_track_canvas () const;
|
||||
ArdourCanvas::GtkCanvasViewport* get_track_canvas () const;
|
||||
|
||||
void override_visible_track_count ();
|
||||
void override_visible_track_count ();
|
||||
|
||||
/* Ruler metrics methods */
|
||||
|
||||
|
|
@ -570,7 +578,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void set_samples_per_pixel (framecnt_t);
|
||||
|
||||
Editing::MouseMode mouse_mode;
|
||||
Editing::MouseMode pre_internal_mouse_mode;
|
||||
Editing::SnapType pre_internal_snap_type;
|
||||
Editing::SnapMode pre_internal_snap_mode;
|
||||
Editing::SnapType internal_snap_type;
|
||||
|
|
@ -673,6 +680,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void hide_marker (ArdourCanvas::Item*, GdkEvent*);
|
||||
void clear_marker_display ();
|
||||
void mouse_add_new_range (framepos_t);
|
||||
void mouse_add_new_loop (framepos_t);
|
||||
void mouse_add_new_punch (framepos_t);
|
||||
bool choose_new_marker_name(std::string &name);
|
||||
void update_cd_marker_display ();
|
||||
void ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location);
|
||||
|
|
@ -703,6 +712,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
|
||||
void button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type);
|
||||
bool button_release_can_deselect;
|
||||
bool _mouse_changed_selection;
|
||||
|
||||
void catch_vanishing_regionview (RegionView *);
|
||||
|
||||
|
|
@ -810,15 +820,15 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
/* The group containing all other groups that are scrolled vertically
|
||||
and horizontally.
|
||||
*/
|
||||
ArdourCanvas::ScrollGroup* hv_scroll_group;
|
||||
|
||||
/* The group containing all other groups that are scrolled vertically ONLY
|
||||
*/
|
||||
ArdourCanvas::ScrollGroup* v_scroll_group;
|
||||
ArdourCanvas::ScrollGroup* hv_scroll_group;
|
||||
|
||||
/* The group containing all other groups that are scrolled horizontally ONLY
|
||||
*/
|
||||
ArdourCanvas::ScrollGroup* h_scroll_group;
|
||||
ArdourCanvas::ScrollGroup* h_scroll_group;
|
||||
|
||||
/* Scroll group for cursors, scrolled horizontally, above everything else
|
||||
*/
|
||||
ArdourCanvas::ScrollGroup* cursor_scroll_group;
|
||||
|
||||
/* The group containing all trackviews. */
|
||||
ArdourCanvas::Container* no_scroll_group;
|
||||
|
|
@ -988,7 +998,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void toggle_ruler_video (bool onoff) {ruler_video_action->set_active(onoff);}
|
||||
int videotl_bar_height; /* in units of timebar_height; default: 4 */
|
||||
int get_videotl_bar_height () const { return videotl_bar_height; }
|
||||
void export_video (bool range = false);
|
||||
void toggle_region_video_lock ();
|
||||
|
||||
friend class EditorCursor;
|
||||
|
|
@ -1172,7 +1181,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
|
||||
void cut_copy (Editing::CutCopyOp);
|
||||
bool can_cut_copy () const;
|
||||
void cut_copy_points (Editing::CutCopyOp, Evoral::MusicalTime earliest=Evoral::MusicalTime(), bool midi=false);
|
||||
void cut_copy_points (Editing::CutCopyOp, Evoral::Beats earliest=Evoral::Beats(), bool midi=false);
|
||||
void cut_copy_regions (Editing::CutCopyOp, RegionSelection&);
|
||||
void cut_copy_ranges (Editing::CutCopyOp);
|
||||
void cut_copy_midi (Editing::CutCopyOp);
|
||||
|
|
@ -1425,9 +1434,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
|
||||
void set_session_extents_from_selection ();
|
||||
|
||||
void set_loop_from_edit_range (bool play);
|
||||
void set_loop_from_region (bool play);
|
||||
void set_punch_from_edit_range ();
|
||||
|
||||
void set_loop_range (framepos_t start, framepos_t end, std::string cmd);
|
||||
void set_punch_range (framepos_t start, framepos_t end, std::string cmd);
|
||||
|
|
@ -2126,10 +2133,11 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
RhythmFerret* rhythm_ferret;
|
||||
|
||||
void fit_tracks (TrackViewList &);
|
||||
void fit_selected_tracks ();
|
||||
void fit_selection ();
|
||||
void set_track_height (Height);
|
||||
|
||||
void remove_tracks ();
|
||||
void _remove_tracks ();
|
||||
bool idle_remove_tracks ();
|
||||
void toggle_tracks_active ();
|
||||
|
||||
bool _have_idled;
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ Editor::register_actions ()
|
|||
/* We don't bother registering "unlock" because it would be insensitive
|
||||
when required. Editor::unlock() must be invoked directly.
|
||||
*/
|
||||
ActionManager::register_action (editor_actions, "lock", _("Lock"), sigc::mem_fun (*this, &Editor::lock));
|
||||
ActionManager::register_action (editor_actions, "lock", S_("Session|Lock"), sigc::mem_fun (*this, &Editor::lock));
|
||||
|
||||
toggle_reg_sens (editor_actions, "show-editor-mixer", _("Show Editor Mixer"), sigc::mem_fun (*this, &Editor::editor_mixer_button_toggled));
|
||||
toggle_reg_sens (editor_actions, "show-editor-list", _("Show Editor List"), sigc::mem_fun (*this, &Editor::editor_list_button_toggled));
|
||||
|
|
@ -262,7 +262,6 @@ Editor::register_actions ()
|
|||
reg_sens (editor_actions, "temporal-zoom-in", _("Zoom In"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), false));
|
||||
reg_sens (editor_actions, "zoom-to-session", _("Zoom to Session"), sigc::mem_fun(*this, &Editor::temporal_zoom_session));
|
||||
reg_sens (editor_actions, "zoom-to-selection", _("Zoom to Selection"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_selection), false));
|
||||
reg_sens (editor_actions, "zoom-to-selection-both-axes", _("Zoom to Selection (Width and Height)"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_selection), true));
|
||||
reg_sens (editor_actions, "toggle-zoom", _("Toggle Zoom State"), sigc::mem_fun(*this, &Editor::swap_visual_state));
|
||||
|
||||
reg_sens (editor_actions, "expand-tracks", _("Expand Track Height"), sigc::bind (sigc::mem_fun (*this, &Editor::tav_zoom_step), false));
|
||||
|
|
@ -295,9 +294,9 @@ Editor::register_actions ()
|
|||
|
||||
toggle_reg_sens (editor_actions, "toggle-skip-playback", _("Use Skip Ranges"), sigc::mem_fun(*this, &Editor::toggle_skip_playback));
|
||||
|
||||
reg_sens (editor_actions, "set-loop-from-edit-range", _("Set Loop from Edit Range"), sigc::bind (sigc::mem_fun(*this, &Editor::set_loop_from_edit_range), false));
|
||||
reg_sens (editor_actions, "set-punch-from-edit-range", _("Set Punch from Edit Range"), sigc::mem_fun(*this, &Editor::set_punch_from_edit_range));
|
||||
reg_sens (editor_actions, "set-session-from-edit-range", _("Set Session Start/End from Edit Range"), sigc::mem_fun(*this, &Editor::set_session_extents_from_selection));
|
||||
reg_sens (editor_actions, "set-loop-from-edit-range", _("Set Loop from Selection"), sigc::bind (sigc::mem_fun(*this, &Editor::set_loop_from_selection), false));
|
||||
reg_sens (editor_actions, "set-punch-from-edit-range", _("Set Punch from Selection"), sigc::mem_fun(*this, &Editor::set_punch_from_selection));
|
||||
reg_sens (editor_actions, "set-session-from-edit-range", _("Set Session Start/End from Selection"), sigc::mem_fun(*this, &Editor::set_session_extents_from_selection));
|
||||
|
||||
/* this is a duplicated action so that the main menu can use a different label */
|
||||
reg_sens (editor_actions, "main-menu-play-selected-regions", _("Play Selected Regions"), sigc::mem_fun (*this, &Editor::play_selected_region));
|
||||
|
|
@ -402,15 +401,12 @@ Editor::register_actions ()
|
|||
|
||||
act = reg_sens (editor_actions, "toggle-track-active", _("Toggle Active"), (sigc::mem_fun(*this, &Editor::toggle_tracks_active)));
|
||||
ActionManager::track_selection_sensitive_actions.push_back (act);
|
||||
if (Profile->get_sae()) {
|
||||
act = reg_sens (editor_actions, "remove-track", _("Delete"), (sigc::mem_fun(*this, &Editor::remove_tracks)));
|
||||
} else {
|
||||
act = reg_sens (editor_actions, "remove-track", _("Remove"), (sigc::mem_fun(*this, &Editor::remove_tracks)));
|
||||
}
|
||||
act = reg_sens (editor_actions, "remove-track", _("Remove"), (sigc::mem_fun(*this, &Editor::remove_tracks)));
|
||||
/* not selection sensitive? */
|
||||
|
||||
ActionManager::track_selection_sensitive_actions.push_back (act);
|
||||
|
||||
act = reg_sens (editor_actions, "fit-tracks", _("Fit Selected Tracks"), sigc::mem_fun(*this, &Editor::fit_selected_tracks));
|
||||
ActionManager::track_selection_sensitive_actions.push_back (act);
|
||||
act = reg_sens (editor_actions, "fit-selection", _("Fit Selection (Vertical)"), sigc::mem_fun(*this, &Editor::fit_selection));
|
||||
|
||||
act = reg_sens (editor_actions, "track-height-largest", _("Largest"), sigc::bind (
|
||||
sigc::mem_fun(*this, &Editor::set_track_height), HeightLargest));
|
||||
|
|
@ -502,7 +498,7 @@ Editor::register_actions ()
|
|||
// ActionManager::register_action (editor_actions, "set-edit-splice", _("Splice"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Splice));
|
||||
ActionManager::register_action (editor_actions, "set-edit-ripple", _("Ripple"), bind (mem_fun (*this, &Editor::set_edit_mode), Ripple));
|
||||
ActionManager::register_action (editor_actions, "set-edit-slide", _("Slide"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Slide));
|
||||
ActionManager::register_action (editor_actions, "set-edit-lock", _("Lock"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Lock));
|
||||
ActionManager::register_action (editor_actions, "set-edit-lock", S_("EditMode|Lock"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Lock));
|
||||
ActionManager::register_action (editor_actions, "cycle-edit-mode", _("Cycle Edit Mode"), sigc::mem_fun (*this, &Editor::cycle_edit_mode));
|
||||
|
||||
ActionManager::register_action (editor_actions, X_("SnapTo"), _("Snap to"));
|
||||
|
|
@ -700,7 +696,7 @@ Editor::register_actions ()
|
|||
|
||||
ActionManager::register_toggle_action (editor_actions, X_("ToggleGroupTabs"), _("Show Group Tabs"), sigc::mem_fun (*this, &Editor::set_group_tabs));
|
||||
|
||||
ActionManager::register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("Show Measures"), sigc::mem_fun (*this, &Editor::toggle_measure_visibility));
|
||||
ActionManager::register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("Show Measure Lines"), sigc::mem_fun (*this, &Editor::toggle_measure_visibility));
|
||||
|
||||
/* if there is a logo in the editor canvas, its always visible at startup */
|
||||
|
||||
|
|
@ -1921,8 +1917,8 @@ Editor::register_region_actions ()
|
|||
|
||||
reg_sens (_region_actions, "play-selected-regions", _("Play"), sigc::mem_fun(*this, &Editor::play_selected_region));
|
||||
|
||||
reg_sens (_region_actions, "bounce-regions-unprocessed", _("Bounce (with processing)"), (sigc::bind (sigc::mem_fun (*this, &Editor::bounce_region_selection), true)));
|
||||
reg_sens (_region_actions, "bounce-regions-processed", _("Bounce (without processing)"), (sigc::bind (sigc::mem_fun (*this, &Editor::bounce_region_selection), false)));
|
||||
reg_sens (_region_actions, "bounce-regions-processed", _("Bounce (with processing)"), (sigc::bind (sigc::mem_fun (*this, &Editor::bounce_region_selection), true)));
|
||||
reg_sens (_region_actions, "bounce-regions-unprocessed", _("Bounce (without processing)"), (sigc::bind (sigc::mem_fun (*this, &Editor::bounce_region_selection), false)));
|
||||
reg_sens (_region_actions, "combine-regions", _("Combine"), sigc::mem_fun (*this, &Editor::combine_regions));
|
||||
reg_sens (_region_actions, "uncombine-regions", _("Uncombine"), sigc::mem_fun (*this, &Editor::uncombine_regions));
|
||||
|
||||
|
|
@ -1989,7 +1985,7 @@ Editor::register_region_actions ()
|
|||
|
||||
reg_sens (_region_actions, "set-region-sync-position", _("Set Sync Position"), sigc::mem_fun (*this, &Editor::set_region_sync_position));
|
||||
reg_sens (_region_actions, "place-transient", _("Place Transient"), sigc::mem_fun (*this, &Editor::place_transient));
|
||||
reg_sens (_region_actions, "split-region", _("Split"), sigc::mem_fun (*this, &Editor::split_region));
|
||||
reg_sens (_region_actions, "split-region", _("Split/Separate"), sigc::mem_fun (*this, &Editor::split_region));
|
||||
reg_sens (_region_actions, "trim-front", _("Trim Start at Edit Point"), sigc::mem_fun (*this, &Editor::trim_region_front));
|
||||
reg_sens (_region_actions, "trim-back", _("Trim End at Edit Point"), sigc::mem_fun (*this, &Editor::trim_region_back));
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ void
|
|||
Editor::session_import_dialog ()
|
||||
{
|
||||
SessionImportDialog dialog (_session);
|
||||
ensure_float (dialog);
|
||||
dialog.run ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ Editor::initialize_canvas ()
|
|||
_track_canvas_viewport = new ArdourCanvas::GtkCanvasViewport (horizontal_adjustment, vertical_adjustment);
|
||||
_track_canvas = _track_canvas_viewport->canvas ();
|
||||
|
||||
_track_canvas->set_background_color (ARDOUR_UI::config()->color ("arrange base"));
|
||||
_track_canvas->set_background_color (ARDOUR_UI::config()->color ("arrange base"));
|
||||
|
||||
/* scroll group for items that should not automatically scroll
|
||||
* (e.g verbose cursor). It shares the canvas coordinate space.
|
||||
|
|
@ -80,7 +80,11 @@ Editor::initialize_canvas ()
|
|||
|
||||
ArdourCanvas::ScrollGroup* hsg;
|
||||
ArdourCanvas::ScrollGroup* hg;
|
||||
ArdourCanvas::ScrollGroup* vg;
|
||||
ArdourCanvas::ScrollGroup* cg;
|
||||
|
||||
h_scroll_group = hg = new ArdourCanvas::ScrollGroup (_track_canvas->root(), ArdourCanvas::ScrollGroup::ScrollsHorizontally);
|
||||
CANVAS_DEBUG_NAME (h_scroll_group, "canvas h scroll");
|
||||
_track_canvas->add_scroller (*hg);
|
||||
|
||||
hv_scroll_group = hsg = new ArdourCanvas::ScrollGroup (_track_canvas->root(),
|
||||
ArdourCanvas::ScrollGroup::ScrollSensitivity (ArdourCanvas::ScrollGroup::ScrollsVertically|
|
||||
|
|
@ -88,13 +92,9 @@ Editor::initialize_canvas ()
|
|||
CANVAS_DEBUG_NAME (hv_scroll_group, "canvas hv scroll");
|
||||
_track_canvas->add_scroller (*hsg);
|
||||
|
||||
v_scroll_group = vg = new ArdourCanvas::ScrollGroup (_track_canvas->root(), ArdourCanvas::ScrollGroup::ScrollsVertically);
|
||||
CANVAS_DEBUG_NAME (v_scroll_group, "canvas v scroll");
|
||||
_track_canvas->add_scroller (*vg);
|
||||
|
||||
h_scroll_group = hg = new ArdourCanvas::ScrollGroup (_track_canvas->root(), ArdourCanvas::ScrollGroup::ScrollsHorizontally);
|
||||
CANVAS_DEBUG_NAME (h_scroll_group, "canvas h scroll");
|
||||
_track_canvas->add_scroller (*hg);
|
||||
cursor_scroll_group = cg = new ArdourCanvas::ScrollGroup (_track_canvas->root(), ArdourCanvas::ScrollGroup::ScrollsHorizontally);
|
||||
CANVAS_DEBUG_NAME (cursor_scroll_group, "canvas cursor scroll");
|
||||
_track_canvas->add_scroller (*cg);
|
||||
|
||||
_verbose_cursor = new VerboseCursor (this);
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ Editor::initialize_canvas ()
|
|||
transport_punch_range_rect->hide();
|
||||
|
||||
/*a group to hold time (measure) lines */
|
||||
time_line_group = new ArdourCanvas::Container (hv_scroll_group);
|
||||
time_line_group = new ArdourCanvas::Container (h_scroll_group);
|
||||
CANVAS_DEBUG_NAME (time_line_group, "time line group");
|
||||
|
||||
_trackview_group = new ArdourCanvas::Container (hv_scroll_group);
|
||||
|
|
@ -231,7 +231,6 @@ Editor::initialize_canvas ()
|
|||
logo_item->lower_to_bottom ();
|
||||
}
|
||||
|
||||
|
||||
_canvas_drop_zone = new ArdourCanvas::Rectangle (hv_scroll_group, ArdourCanvas::Rect (0.0, 0.0, ArdourCanvas::COORD_MAX, 0.0));
|
||||
/* this thing is transparent */
|
||||
_canvas_drop_zone->set_fill (false);
|
||||
|
|
@ -899,22 +898,22 @@ Editor::color_handler()
|
|||
|
||||
playhead_cursor->set_color (ARDOUR_UI::config()->color ("play head"));
|
||||
|
||||
meter_bar->set_fill_color (ARDOUR_UI::config()->color ("meter bar"));
|
||||
meter_bar->set_fill_color (ARDOUR_UI::config()->color_mod ("meter bar", "marker bar"));
|
||||
meter_bar->set_outline_color (ARDOUR_UI::config()->color ("marker bar separator"));
|
||||
|
||||
tempo_bar->set_fill_color (ARDOUR_UI::config()->color ("tempo bar"));
|
||||
tempo_bar->set_fill_color (ARDOUR_UI::config()->color_mod ("tempo bar", "marker bar"));
|
||||
tempo_bar->set_outline_color (ARDOUR_UI::config()->color ("marker bar separator"));
|
||||
|
||||
marker_bar->set_fill_color (ARDOUR_UI::config()->color ("marker bar"));
|
||||
marker_bar->set_fill_color (ARDOUR_UI::config()->color_mod ("marker bar", "marker bar"));
|
||||
marker_bar->set_outline_color (ARDOUR_UI::config()->color ("marker bar separator"));
|
||||
|
||||
cd_marker_bar->set_fill_color (ARDOUR_UI::config()->color ("cd marker bar"));
|
||||
cd_marker_bar->set_fill_color (ARDOUR_UI::config()->color_mod ("cd marker bar", "marker bar"));
|
||||
cd_marker_bar->set_outline_color (ARDOUR_UI::config()->color ("marker bar separator"));
|
||||
|
||||
range_marker_bar->set_fill_color (ARDOUR_UI::config()->color ("range marker bar"));
|
||||
range_marker_bar->set_fill_color (ARDOUR_UI::config()->color_mod ("range marker bar", "marker bar"));
|
||||
range_marker_bar->set_outline_color (ARDOUR_UI::config()->color ("marker bar separator"));
|
||||
|
||||
transport_marker_bar->set_fill_color (ARDOUR_UI::config()->color ("transport marker bar"));
|
||||
transport_marker_bar->set_fill_color (ARDOUR_UI::config()->color_mod ("transport marker bar", "marker bar"));
|
||||
transport_marker_bar->set_outline_color (ARDOUR_UI::config()->color ("marker bar separator"));
|
||||
|
||||
cd_marker_bar_drag_rect->set_fill_color (ARDOUR_UI::config()->color ("range drag bar rect"));
|
||||
|
|
@ -946,8 +945,9 @@ Editor::color_handler()
|
|||
|
||||
refresh_location_display ();
|
||||
|
||||
/* redraw the whole thing */
|
||||
_track_canvas->queue_draw ();
|
||||
/* redraw the whole thing */
|
||||
_track_canvas->set_background_color (ARDOUR_UI::config()->color ("arrange base"));
|
||||
_track_canvas->queue_draw ();
|
||||
|
||||
/*
|
||||
redisplay_tempo (true);
|
||||
|
|
@ -1012,15 +1012,22 @@ Editor::set_canvas_cursor (Gdk::Cursor* cursor)
|
|||
{
|
||||
Glib::RefPtr<Gdk::Window> win = _track_canvas->get_window();
|
||||
|
||||
if (win && cursor) {
|
||||
win->set_cursor (*cursor);
|
||||
if (win && !_cursors->is_invalid (cursor)) {
|
||||
/* glibmm 2.4 doesn't allow null cursor pointer because it uses
|
||||
a Gdk::Cursor& as the argument to Gdk::Window::set_cursor().
|
||||
But a null pointer just means "use parent window cursor",
|
||||
and so should be allowed. Gtkmm 3.x has fixed this API.
|
||||
|
||||
For now, drop down and use C API
|
||||
*/
|
||||
gdk_window_set_cursor (win->gobj(), cursor ? cursor->gobj() : 0);
|
||||
}
|
||||
}
|
||||
|
||||
size_t
|
||||
Editor::push_canvas_cursor (Gdk::Cursor* cursor)
|
||||
{
|
||||
if (cursor) {
|
||||
if (!_cursors->is_invalid (cursor)) {
|
||||
_cursor_stack.push_back (cursor);
|
||||
set_canvas_cursor (cursor);
|
||||
}
|
||||
|
|
@ -1095,7 +1102,7 @@ Editor::which_trim_cursor (bool left) const
|
|||
Gdk::Cursor*
|
||||
Editor::which_mode_cursor () const
|
||||
{
|
||||
Gdk::Cursor* mode_cursor = 0;
|
||||
Gdk::Cursor* mode_cursor = MouseCursors::invalid_cursor ();
|
||||
|
||||
switch (mouse_mode) {
|
||||
case MouseRange:
|
||||
|
|
@ -1161,7 +1168,7 @@ Editor::which_mode_cursor () const
|
|||
Gdk::Cursor*
|
||||
Editor::which_track_cursor () const
|
||||
{
|
||||
Gdk::Cursor* cursor = 0;
|
||||
Gdk::Cursor* cursor = MouseCursors::invalid_cursor();
|
||||
|
||||
switch (_join_object_range_state) {
|
||||
case JOIN_OBJECT_RANGE_NONE:
|
||||
|
|
@ -1332,7 +1339,7 @@ Editor::choose_canvas_cursor_on_entry (ItemType type)
|
|||
|
||||
Gdk::Cursor* cursor = which_canvas_cursor(type);
|
||||
|
||||
if (cursor) {
|
||||
if (!_cursors->is_invalid (cursor)) {
|
||||
// Push a new enter context
|
||||
const EnterContext ctx = { type, CursorContext::create(*this, cursor) };
|
||||
_enter_stack.push_back(ctx);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "pbd/stacktrace.h"
|
||||
|
||||
#include "ardour/audio_track.h"
|
||||
#include "ardour/midi_track.h"
|
||||
#include "ardour/midi_region.h"
|
||||
#include "ardour/region_factory.h"
|
||||
#include "ardour/profile.h"
|
||||
|
|
@ -176,19 +178,25 @@ Editor::canvas_scroll_event (GdkEventScroll *event, bool from_canvas)
|
|||
}
|
||||
|
||||
bool
|
||||
Editor::track_canvas_button_press_event (GdkEventButton */*event*/)
|
||||
Editor::track_canvas_button_press_event (GdkEventButton *event)
|
||||
{
|
||||
selection->clear ();
|
||||
_track_canvas->grab_focus();
|
||||
if (!Keyboard::is_context_menu_event (event)) {
|
||||
begin_reversible_selection_op (X_("Clear Selection Click (track canvas)"));
|
||||
selection->clear ();
|
||||
commit_reversible_selection_op();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::track_canvas_button_release_event (GdkEventButton *event)
|
||||
{
|
||||
if (_drags->active ()) {
|
||||
_drags->end_grab ((GdkEvent*) event);
|
||||
}
|
||||
if (!Keyboard::is_context_menu_event (event)) {
|
||||
if (_drags->active ()) {
|
||||
_drags->end_grab ((GdkEvent*) event);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1029,12 +1037,29 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
|
|||
|
||||
switch (event->scroll.direction) {
|
||||
case GDK_SCROLL_UP:
|
||||
temporal_zoom_step (false);
|
||||
|
||||
if (Profile->get_mixbus()) {
|
||||
//for mouse-wheel zoom, force zoom-focus to mouse
|
||||
Editing::ZoomFocus temp_focus = zoom_focus;
|
||||
zoom_focus = Editing::ZoomFocusMouse;
|
||||
temporal_zoom_step (false);
|
||||
zoom_focus = temp_focus;
|
||||
} else {
|
||||
temporal_zoom_step (false);
|
||||
}
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case GDK_SCROLL_DOWN:
|
||||
temporal_zoom_step (true);
|
||||
if (Profile->get_mixbus()) {
|
||||
//for mouse-wheel zoom, force zoom-focus to mouse
|
||||
Editing::ZoomFocus temp_focus = zoom_focus;
|
||||
zoom_focus = Editing::ZoomFocusMouse;
|
||||
temporal_zoom_step (true);
|
||||
zoom_focus = temp_focus;
|
||||
} else {
|
||||
temporal_zoom_step (true);
|
||||
}
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
|
|
@ -1105,8 +1130,10 @@ Editor::canvas_drop_zone_event (GdkEvent* event)
|
|||
switch (event->type) {
|
||||
case GDK_BUTTON_RELEASE:
|
||||
if (event->button.button == 1) {
|
||||
begin_reversible_selection_op (X_("Nowhere Click"));
|
||||
selection->clear_objects ();
|
||||
selection->clear_tracks ();
|
||||
commit_reversible_selection_op ();
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1182,6 +1209,18 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
|
|||
region = _regions->get_dragged_region ();
|
||||
|
||||
if (region) {
|
||||
|
||||
if (tv.first == 0
|
||||
&& (
|
||||
boost::dynamic_pointer_cast<AudioRegion> (region) != 0 ||
|
||||
boost::dynamic_pointer_cast<MidiRegion> (region) != 0
|
||||
)
|
||||
)
|
||||
{
|
||||
/* drop to drop-zone */
|
||||
context->drag_status (context->get_suggested_action(), time);
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((boost::dynamic_pointer_cast<AudioRegion> (region) != 0 &&
|
||||
dynamic_cast<AudioTimeAxisView*> (tv.first) != 0) ||
|
||||
|
|
@ -1226,9 +1265,6 @@ Editor::drop_regions (const Glib::RefPtr<Gdk::DragContext>& /*context*/,
|
|||
const SelectionData& /*data*/,
|
||||
guint /*info*/, guint /*time*/)
|
||||
{
|
||||
boost::shared_ptr<Region> region;
|
||||
boost::shared_ptr<Region> region_copy;
|
||||
RouteTimeAxisView* rtav;
|
||||
GdkEvent event;
|
||||
double px;
|
||||
double py;
|
||||
|
|
@ -1238,39 +1274,47 @@ Editor::drop_regions (const Glib::RefPtr<Gdk::DragContext>& /*context*/,
|
|||
event.button.y = y;
|
||||
/* assume we're dragging with button 1 */
|
||||
event.motion.state = Gdk::BUTTON1_MASK;
|
||||
|
||||
framepos_t const pos = window_event_sample (&event, &px, &py);
|
||||
|
||||
boost::shared_ptr<Region> region = _regions->get_dragged_region ();
|
||||
if (!region) { return; }
|
||||
|
||||
RouteTimeAxisView* rtav = 0;
|
||||
std::pair<TimeAxisView*, int> const tv = trackview_by_y_position (py, false);
|
||||
|
||||
if (tv.first != 0) {
|
||||
|
||||
rtav = dynamic_cast<RouteTimeAxisView*> (tv.first);
|
||||
|
||||
if (rtav != 0 && rtav->is_track ()) {
|
||||
|
||||
boost::shared_ptr<Region> region = _regions->get_dragged_region ();
|
||||
|
||||
if (region) {
|
||||
|
||||
region_copy = RegionFactory::create (region, true);
|
||||
|
||||
|
||||
if ((boost::dynamic_pointer_cast<AudioRegion> (region_copy) != 0 &&
|
||||
dynamic_cast<AudioTimeAxisView*> (tv.first) != 0) ||
|
||||
(boost::dynamic_pointer_cast<MidiRegion> (region_copy) != 0 &&
|
||||
dynamic_cast<MidiTimeAxisView*> (tv.first) != 0)) {
|
||||
|
||||
/* audio to audio
|
||||
OR
|
||||
midi to midi
|
||||
*/
|
||||
|
||||
|
||||
_drags->set (new RegionInsertDrag (this, region_copy, rtav, pos), &event);
|
||||
_drags->end_grab (0);
|
||||
} else {
|
||||
try {
|
||||
if (boost::dynamic_pointer_cast<AudioRegion> (region)) {
|
||||
uint32_t output_chan = region->n_channels();
|
||||
if ((Config->get_output_auto_connect() & AutoConnectMaster) && session()->master_out()) {
|
||||
output_chan = session()->master_out()->n_inputs().n_audio();
|
||||
}
|
||||
list<boost::shared_ptr<AudioTrack> > audio_tracks;
|
||||
audio_tracks = session()->new_audio_track (region->n_channels(), output_chan, ARDOUR::Normal, 0, 1, region->name());
|
||||
rtav = axis_view_from_route (audio_tracks.front());
|
||||
} else if (boost::dynamic_pointer_cast<MidiRegion> (region)) {
|
||||
ChanCount one_midi_port (DataType::MIDI, 1);
|
||||
list<boost::shared_ptr<MidiTrack> > midi_tracks;
|
||||
midi_tracks = session()->new_midi_track (one_midi_port, one_midi_port, boost::shared_ptr<ARDOUR::PluginInfo>(), ARDOUR::Normal, 0, 1, region->name());
|
||||
rtav = axis_view_from_route (midi_tracks.front());
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} catch (...) {
|
||||
error << _("Could not create new track after region placed in the drop zone") << endmsg;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (rtav != 0 && rtav->is_track ()) {
|
||||
boost::shared_ptr<Region> region_copy = RegionFactory::create (region, true);
|
||||
|
||||
if ((boost::dynamic_pointer_cast<AudioRegion> (region_copy) != 0 && dynamic_cast<AudioTimeAxisView*> (rtav) != 0) ||
|
||||
(boost::dynamic_pointer_cast<MidiRegion> (region_copy) != 0 && dynamic_cast<MidiTimeAxisView*> (rtav) != 0)) {
|
||||
_drags->set (new RegionInsertDrag (this, region_copy, rtav, pos), &event);
|
||||
_drags->end_grab (0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ using namespace Gtk;
|
|||
|
||||
EditorCursor::EditorCursor (Editor& ed, bool (Editor::*callbck)(GdkEvent*,ArdourCanvas::Item*))
|
||||
: _editor (ed)
|
||||
, _track_canvas_item (new ArdourCanvas::Arrow (_editor.get_hscroll_group()))
|
||||
, _track_canvas_item (new ArdourCanvas::Arrow (_editor.get_cursor_scroll_group()))
|
||||
{
|
||||
CANVAS_DEBUG_NAME (_track_canvas_item, "track canvas editor cursor");
|
||||
|
||||
|
|
@ -77,11 +77,11 @@ EditorCursor::~EditorCursor ()
|
|||
void
|
||||
EditorCursor::set_position (framepos_t frame)
|
||||
{
|
||||
PositionChanged (frame);
|
||||
if (_current_frame != frame) { PositionChanged (frame); }
|
||||
|
||||
double const new_pos = _editor.sample_to_pixel_unrounded (frame);
|
||||
|
||||
if (new_pos != _track_canvas_item->x ()) {
|
||||
if (rint(new_pos) != rint(_track_canvas_item->x ())) {
|
||||
_track_canvas_item->set_x (new_pos);
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "cursor_context.h"
|
||||
#include "editor_items.h"
|
||||
#include "mouse_cursors.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
class Location;
|
||||
|
|
@ -58,8 +59,8 @@ public:
|
|||
|
||||
void abort ();
|
||||
void add (Drag *);
|
||||
void set (Drag *, GdkEvent *, Gdk::Cursor* c = 0);
|
||||
void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
|
||||
void set (Drag *, GdkEvent *, Gdk::Cursor* c = MouseCursors::invalid_cursor());
|
||||
void start_grab (GdkEvent *, Gdk::Cursor* c = MouseCursors::invalid_cursor());
|
||||
bool end_grab (GdkEvent *);
|
||||
bool have_item (ArdourCanvas::Item *) const;
|
||||
|
||||
|
|
@ -177,6 +178,10 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool initially_vertical() const {
|
||||
return _initially_vertical;
|
||||
}
|
||||
|
||||
/** Set up the _pointer_frame_offset */
|
||||
virtual void setup_pointer_frame_offset () {
|
||||
_pointer_frame_offset = 0;
|
||||
|
|
@ -233,6 +238,8 @@ protected:
|
|||
private:
|
||||
bool _trackview_only; ///< true if pointer y value should always be relative to the top of the trackview group
|
||||
bool _move_threshold_passed; ///< true if the move threshold has been passed, otherwise false
|
||||
bool _starting_point_passed; ///< true if we called move () with first_move flag, otherwise false
|
||||
bool _initially_vertical; ///< true if after move threshold is passed we appear to be moving vertically; undefined before that
|
||||
bool _was_double_click; ///< true if drag initiated by a double click event
|
||||
double _grab_x; ///< trackview x of the grab start position
|
||||
double _grab_y; ///< y of the grab start position, possibly adjusted if _trackview_only is true
|
||||
|
|
@ -285,9 +292,11 @@ protected:
|
|||
/** a list of the non-hidden TimeAxisViews sorted by editor order key */
|
||||
std::vector<TimeAxisView*> _time_axis_views;
|
||||
int find_time_axis_view (TimeAxisView *) const;
|
||||
int apply_track_delta (const int start, const int delta, const int skip, const bool distance_only = false) const;
|
||||
|
||||
int _visible_y_low;
|
||||
int _visible_y_high;
|
||||
uint32_t _ntracks;
|
||||
|
||||
friend class DraggingView;
|
||||
|
||||
|
|
@ -319,13 +328,19 @@ public:
|
|||
protected:
|
||||
|
||||
double compute_x_delta (GdkEvent const *, ARDOUR::framepos_t *);
|
||||
virtual bool y_movement_allowed (int, double) const;
|
||||
virtual bool y_movement_allowed (int, double, int skip_invisible = 0) const;
|
||||
|
||||
bool _brushing;
|
||||
ARDOUR::framepos_t _last_frame_position; ///< last position of the thing being dragged
|
||||
double _total_x_delta;
|
||||
int _last_pointer_time_axis_view;
|
||||
double _last_pointer_layer;
|
||||
bool _single_axis;
|
||||
|
||||
private:
|
||||
uint32_t _ndropzone;
|
||||
uint32_t _pdropzone;
|
||||
uint32_t _ddropzone;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -428,7 +443,7 @@ public:
|
|||
void finished (GdkEvent *, bool);
|
||||
void aborted (bool);
|
||||
protected:
|
||||
bool y_movement_allowed (int delta_track, double delta_layer) const;
|
||||
bool y_movement_allowed (int delta_track, double delta_layer, int skip_invisible = 0) const;
|
||||
|
||||
private:
|
||||
TimeAxisView *prev_tav; // where regions were most recently dragged from
|
||||
|
|
@ -974,7 +989,6 @@ public:
|
|||
private:
|
||||
Operation _operation;
|
||||
bool _add;
|
||||
int _original_pointer_time_axis;
|
||||
std::list<TimeAxisView*> _added_time_axes;
|
||||
bool _time_selection_at_start;
|
||||
framepos_t start_at_start;
|
||||
|
|
@ -993,7 +1007,8 @@ public:
|
|||
};
|
||||
|
||||
RangeMarkerBarDrag (Editor *, ArdourCanvas::Item *, Operation);
|
||||
|
||||
~RangeMarkerBarDrag ();
|
||||
|
||||
void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
|
||||
void motion (GdkEvent *, bool);
|
||||
void finished (GdkEvent *, bool);
|
||||
|
|
@ -1041,7 +1056,7 @@ class AutomationRangeDrag : public Drag
|
|||
{
|
||||
public:
|
||||
AutomationRangeDrag (Editor *, AutomationTimeAxisView *, std::list<ARDOUR::AudioRange> const &);
|
||||
AutomationRangeDrag (Editor *, AudioRegionView *, std::list<ARDOUR::AudioRange> const &);
|
||||
AutomationRangeDrag (Editor *, RegionView *, std::list<ARDOUR::AudioRange> const &);
|
||||
|
||||
void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
|
||||
void motion (GdkEvent *, bool);
|
||||
|
|
@ -1054,7 +1069,8 @@ public:
|
|||
|
||||
private:
|
||||
void setup (std::list<boost::shared_ptr<AutomationLine> > const &);
|
||||
double y_fraction (boost::shared_ptr<AutomationLine>, double global_y_position) const;
|
||||
double y_fraction (boost::shared_ptr<AutomationLine>, double global_y_position) const;
|
||||
double value (boost::shared_ptr<ARDOUR::AutomationList> list, double x) const;
|
||||
|
||||
std::list<ARDOUR::AudioRange> _ranges;
|
||||
|
||||
|
|
@ -1068,8 +1084,9 @@ private:
|
|||
};
|
||||
|
||||
std::list<Line> _lines;
|
||||
double y_origin;
|
||||
bool _nothing_to_drag;
|
||||
double _y_origin;
|
||||
bool _nothing_to_drag;
|
||||
bool _integral;
|
||||
};
|
||||
|
||||
/** Drag of one edge of an xfade
|
||||
|
|
|
|||
|
|
@ -177,19 +177,6 @@ EditorGroupTabs::add_menu_items (Gtk::Menu* m, RouteGroup* g)
|
|||
}
|
||||
}
|
||||
|
||||
PBD::PropertyList
|
||||
EditorGroupTabs::default_properties () const
|
||||
{
|
||||
PBD::PropertyList plist;
|
||||
|
||||
plist.add (Properties::active, true);
|
||||
plist.add (Properties::mute, true);
|
||||
plist.add (Properties::solo, true);
|
||||
plist.add (Properties::recenable, true);
|
||||
|
||||
return plist;
|
||||
}
|
||||
|
||||
RouteList
|
||||
EditorGroupTabs::selected_routes () const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ private:
|
|||
return get_height();
|
||||
}
|
||||
void add_menu_items (Gtk::Menu *, ARDOUR::RouteGroup *);
|
||||
PBD::PropertyList default_properties () const;
|
||||
ARDOUR::RouteList selected_routes () const;
|
||||
void sync_order_keys ();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -673,6 +673,38 @@ Editor::mouse_add_new_marker (framepos_t where, bool is_cd, bool is_xrun)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::mouse_add_new_loop (framepos_t where)
|
||||
{
|
||||
if (!_session) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Make this marker 1/8th of the visible area of the session so that
|
||||
it's reasonably easy to manipulate after creation.
|
||||
*/
|
||||
|
||||
framepos_t const end = where + current_page_samples() / 8;
|
||||
|
||||
set_loop_range (where, end, _("set loop range"));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::mouse_add_new_punch (framepos_t where)
|
||||
{
|
||||
if (!_session) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Make this marker 1/8th of the visible area of the session so that
|
||||
it's reasonably easy to manipulate after creation.
|
||||
*/
|
||||
|
||||
framepos_t const end = where + current_page_samples() / 8;
|
||||
|
||||
set_punch_range (where, end, _("set punch range"));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::mouse_add_new_range (framepos_t where)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ Editor::track_mixer_selection ()
|
|||
void
|
||||
Editor::follow_mixer_selection ()
|
||||
{
|
||||
if (!ARDOUR_UI::config()->get_link_editor_and_mixer_selection() || _following_mixer_selection) {
|
||||
if (_following_mixer_selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -214,10 +214,6 @@ Editor::mouse_mode_object_range_toggled()
|
|||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
|
||||
assert (tact);
|
||||
|
||||
if (tact->get_active()) {
|
||||
m = MouseObject; //Smart mode turned to ON, force editing to Object mode
|
||||
}
|
||||
|
||||
set_mouse_mode(m, true); //call this so the button styles can get updated
|
||||
}
|
||||
|
||||
|
|
@ -335,37 +331,59 @@ Editor::internal_editing() const
|
|||
void
|
||||
Editor::update_time_selection_display ()
|
||||
{
|
||||
if (smart_mode_action->get_active()) {
|
||||
/* not sure what to do here */
|
||||
if (mouse_mode == MouseObject) {
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
switch (mouse_mode) {
|
||||
case MouseRange:
|
||||
selection->clear_objects ();
|
||||
selection->ClearMidiNoteSelection(); //signal
|
||||
break;
|
||||
case MouseObject:
|
||||
selection->clear_objects ();
|
||||
selection->clear_time ();
|
||||
selection->clear_tracks ();
|
||||
selection->ClearMidiNoteSelection(); //signal
|
||||
break;
|
||||
case MouseContent:
|
||||
case MouseDraw:
|
||||
//if we go into internal editing, clear everything in the outside world
|
||||
selection->clear_objects ();
|
||||
selection->clear_time ();
|
||||
selection->clear_tracks ();
|
||||
break;
|
||||
default:
|
||||
//clear everything
|
||||
selection->clear_objects ();
|
||||
selection->clear_time ();
|
||||
selection->clear_tracks ();
|
||||
break;
|
||||
}
|
||||
switch (mouse_mode) {
|
||||
case MouseRange:
|
||||
selection->clear_objects ();
|
||||
selection->ClearMidiNoteSelection (); /* EMIT SIGNAL */
|
||||
break;
|
||||
case MouseObject:
|
||||
selection->clear_time ();
|
||||
selection->clear_tracks ();
|
||||
selection->ClearMidiNoteSelection (); /* EMIT SIGNAL */
|
||||
break;
|
||||
case MouseDraw:
|
||||
/* Clear regions, but not time or tracks, since that
|
||||
would destroy the range selection rectangle, which we need to stick
|
||||
around for AutomationRangeDrag. */
|
||||
selection->clear_regions ();
|
||||
selection->clear_playlists ();
|
||||
break;
|
||||
case MouseContent:
|
||||
/* This handles internal edit.
|
||||
Clear everything except points and notes.
|
||||
*/
|
||||
selection->clear_regions();
|
||||
selection->clear_lines();
|
||||
selection->clear_playlists ();
|
||||
|
||||
selection->clear_time ();
|
||||
selection->clear_tracks ();
|
||||
break;
|
||||
|
||||
case MouseTimeFX:
|
||||
/* We probably want to keep region selection */
|
||||
selection->clear_points ();
|
||||
selection->clear_lines();
|
||||
selection->clear_playlists ();
|
||||
|
||||
selection->clear_time ();
|
||||
selection->clear_tracks ();
|
||||
break;
|
||||
|
||||
case MouseAudition:
|
||||
/*Don't lose lines or points if no action in this mode */
|
||||
selection->clear_regions ();
|
||||
selection->clear_playlists ();
|
||||
selection->clear_time ();
|
||||
selection->clear_tracks ();
|
||||
break;
|
||||
|
||||
default:
|
||||
/*Clear everything */
|
||||
selection->clear_objects();
|
||||
selection->clear_time ();
|
||||
selection->clear_tracks ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -448,11 +466,15 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
|
|||
Selection::Operation op = ArdourKeyboard::selection_type (event->button.state);
|
||||
bool press = (event->type == GDK_BUTTON_PRESS);
|
||||
|
||||
if (press) {
|
||||
_mouse_changed_selection = false;
|
||||
}
|
||||
|
||||
switch (item_type) {
|
||||
case RegionItem:
|
||||
if (press) {
|
||||
if (eff_mouse_mode != MouseRange) {
|
||||
set_selected_regionview_from_click (press, op);
|
||||
_mouse_changed_selection = set_selected_regionview_from_click (press, op);
|
||||
} else {
|
||||
/* don't change the selection unless the
|
||||
clicked track is not currently selected. if
|
||||
|
|
@ -465,7 +487,7 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
|
|||
}
|
||||
} else {
|
||||
if (eff_mouse_mode != MouseRange) {
|
||||
set_selected_regionview_from_click (press, op);
|
||||
_mouse_changed_selection |= set_selected_regionview_from_click (press, op);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -483,7 +505,7 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
|
|||
case StartCrossFadeItem:
|
||||
case EndCrossFadeItem:
|
||||
if (get_smart_mode() || eff_mouse_mode != MouseRange) {
|
||||
set_selected_regionview_from_click (press, op);
|
||||
_mouse_changed_selection |= set_selected_regionview_from_click (press, op);
|
||||
} else if (event->type == GDK_BUTTON_PRESS) {
|
||||
set_selected_track_as_side_effect (op);
|
||||
}
|
||||
|
|
@ -492,7 +514,7 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
|
|||
case ControlPointItem:
|
||||
set_selected_track_as_side_effect (op);
|
||||
if (eff_mouse_mode != MouseRange) {
|
||||
set_selected_control_point_from_click (press, op);
|
||||
_mouse_changed_selection |= set_selected_control_point_from_click (press, op);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -501,6 +523,10 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
|
|||
if (event->button.button == 3) {
|
||||
selection->clear_tracks ();
|
||||
set_selected_track_as_side_effect (op);
|
||||
|
||||
/* We won't get a release.*/
|
||||
begin_reversible_selection_op (X_("Button 3 Menu Select"));
|
||||
commit_reversible_selection_op ();
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -511,6 +537,12 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ((!press) && _mouse_changed_selection) {
|
||||
begin_reversible_selection_op (X_("Button Selection"));
|
||||
commit_reversible_selection_op ();
|
||||
_mouse_changed_selection = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -735,15 +767,21 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
break;
|
||||
|
||||
case StreamItem:
|
||||
if (dynamic_cast<MidiTimeAxisView*> (clicked_axisview)) {
|
||||
_drags->set (new RegionCreateDrag (this, item, clicked_axisview), event);
|
||||
return true;
|
||||
}
|
||||
//in the past, we created a new midi region here, but perhaps that is best left to the Draw mode
|
||||
break;
|
||||
|
||||
case AutomationTrackItem:
|
||||
/* rubberband drag to select automation points */
|
||||
_drags->set (new EditorRubberbandSelectDrag (this, item), event);
|
||||
return true;
|
||||
break;
|
||||
|
||||
case RegionItem:
|
||||
if (dynamic_cast<AutomationRegionView*>(clicked_regionview)) {
|
||||
/* rubberband drag to select automation points */
|
||||
_drags->set (new EditorRubberbandSelectDrag (this, item), event);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -915,12 +953,13 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
|
||||
case SelectionItem:
|
||||
{
|
||||
AudioRegionView* arv = dynamic_cast<AudioRegionView *> (clicked_regionview);
|
||||
if (arv) {
|
||||
_drags->set (new AutomationRangeDrag (this, arv, selection->time), event, _cursors->up_down);
|
||||
if (dynamic_cast<AudioRegionView*>(clicked_regionview) ||
|
||||
dynamic_cast<AutomationRegionView*>(clicked_regionview)) {
|
||||
_drags->set (new AutomationRangeDrag (this, clicked_regionview, selection->time),
|
||||
event, _cursors->up_down);
|
||||
} else {
|
||||
double const y = event->button.y;
|
||||
pair<TimeAxisView*, int> tvp = trackview_by_y_position (y);
|
||||
pair<TimeAxisView*, int> tvp = trackview_by_y_position (y, false);
|
||||
if (tvp.first) {
|
||||
AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (tvp.first);
|
||||
if ( atv) {
|
||||
|
|
@ -1149,20 +1188,24 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
return true;
|
||||
}
|
||||
|
||||
/* see if we're finishing a drag */
|
||||
bool were_dragging = false;
|
||||
|
||||
bool were_dragging = false;
|
||||
if (_drags->active ()) {
|
||||
bool const r = _drags->end_grab (event);
|
||||
if (r) {
|
||||
/* grab dragged, so do nothing else */
|
||||
return true;
|
||||
}
|
||||
if (!Keyboard::is_context_menu_event (&event->button)) {
|
||||
|
||||
were_dragging = true;
|
||||
}
|
||||
/* see if we're finishing a drag */
|
||||
|
||||
if (_drags->active ()) {
|
||||
bool const r = _drags->end_grab (event);
|
||||
if (r) {
|
||||
/* grab dragged, so do nothing else */
|
||||
return true;
|
||||
}
|
||||
|
||||
were_dragging = true;
|
||||
}
|
||||
|
||||
update_region_layering_order_editor ();
|
||||
update_region_layering_order_editor ();
|
||||
}
|
||||
|
||||
/* edit events get handled here */
|
||||
|
||||
|
|
@ -1453,7 +1496,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
} else if (_session) {
|
||||
/* make sure we stop */
|
||||
_session->request_transport_speed (0.0);
|
||||
}
|
||||
|
|
@ -1465,10 +1508,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
}
|
||||
|
||||
/* do any (de)selection operations that should occur on button release */
|
||||
|
||||
begin_reversible_selection_op (_("Button Select"));
|
||||
button_selection (item, event, item_type);
|
||||
commit_reversible_selection_op ();
|
||||
button_selection (item, event, item_type);
|
||||
|
||||
return true;
|
||||
break;
|
||||
|
|
@ -1885,7 +1925,6 @@ Editor::edit_control_point (ArdourCanvas::Item* item)
|
|||
}
|
||||
|
||||
ControlPointDialog d (p);
|
||||
ensure_float (d);
|
||||
|
||||
if (d.run () != RESPONSE_ACCEPT) {
|
||||
return;
|
||||
|
|
@ -1905,7 +1944,6 @@ Editor::edit_notes (MidiRegionView* mrv)
|
|||
|
||||
EditNoteDialog* d = new EditNoteDialog (mrv, s);
|
||||
d->show_all ();
|
||||
ensure_float (*d);
|
||||
|
||||
d->signal_response().connect (sigc::bind (sigc::mem_fun (*this, &Editor::note_edit_done), d));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1411,10 +1411,9 @@ Editor::scroll_tracks_up_line ()
|
|||
}
|
||||
|
||||
bool
|
||||
Editor::scroll_down_one_track ()
|
||||
Editor::scroll_down_one_track (bool skip_child_views)
|
||||
{
|
||||
TrackViewList::reverse_iterator next = track_views.rend();
|
||||
std::pair<TimeAxisView*,double> res;
|
||||
const double top_of_trackviews = vertical_adjustment.get_value();
|
||||
|
||||
for (TrackViewList::reverse_iterator t = track_views.rbegin(); t != track_views.rend(); ++t) {
|
||||
|
|
@ -1422,14 +1421,51 @@ Editor::scroll_down_one_track ()
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
/* If this is the upper-most visible trackview, we want to display
|
||||
the one above it (next)
|
||||
*/
|
||||
|
||||
res = (*t)->covers_y_position (top_of_trackviews);
|
||||
* the one above it (next)
|
||||
*
|
||||
* Note that covers_y_position() is recursive and includes child views
|
||||
*/
|
||||
std::pair<TimeAxisView*,double> res = (*t)->covers_y_position (top_of_trackviews);
|
||||
|
||||
if (res.first) {
|
||||
if (skip_child_views) {
|
||||
break;
|
||||
}
|
||||
/* automation lane (one level, non-recursive)
|
||||
*
|
||||
* - if no automation lane exists -> move to next tack
|
||||
* - if the first (here: bottom-most) matches -> move to next tack
|
||||
* - if no y-axis match is found -> the current track is at the top
|
||||
* -> move to last (here: top-most) automation lane
|
||||
*/
|
||||
TimeAxisView::Children kids = (*t)->get_child_list();
|
||||
TimeAxisView::Children::reverse_iterator nkid = kids.rend();
|
||||
|
||||
for (TimeAxisView::Children::reverse_iterator ci = kids.rbegin(); ci != kids.rend(); ++ci) {
|
||||
if ((*ci)->hidden()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::pair<TimeAxisView*,double> dev;
|
||||
dev = (*ci)->covers_y_position (top_of_trackviews);
|
||||
if (dev.first) {
|
||||
/* some automation lane is currently at the top */
|
||||
if (ci == kids.rbegin()) {
|
||||
/* first (bottom-most) autmation lane is at the top.
|
||||
* -> move to next track
|
||||
*/
|
||||
nkid = kids.rend();
|
||||
}
|
||||
break;
|
||||
}
|
||||
nkid = ci;
|
||||
}
|
||||
|
||||
if (nkid != kids.rend()) {
|
||||
ensure_time_axis_view_is_visible (**nkid, true);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
next = t;
|
||||
|
|
@ -1446,10 +1482,9 @@ Editor::scroll_down_one_track ()
|
|||
}
|
||||
|
||||
bool
|
||||
Editor::scroll_up_one_track ()
|
||||
Editor::scroll_up_one_track (bool skip_child_views)
|
||||
{
|
||||
TrackViewList::iterator prev = track_views.end();
|
||||
std::pair<TimeAxisView*,double> res;
|
||||
double top_of_trackviews = vertical_adjustment.get_value ();
|
||||
|
||||
for (TrackViewList::iterator t = track_views.begin(); t != track_views.end(); ++t) {
|
||||
|
|
@ -1458,10 +1493,55 @@ Editor::scroll_up_one_track ()
|
|||
continue;
|
||||
}
|
||||
|
||||
/* find the trackview at the top of the trackview group */
|
||||
res = (*t)->covers_y_position (top_of_trackviews);
|
||||
/* find the trackview at the top of the trackview group
|
||||
*
|
||||
* Note that covers_y_position() is recursive and includes child views
|
||||
*/
|
||||
std::pair<TimeAxisView*,double> res = (*t)->covers_y_position (top_of_trackviews);
|
||||
|
||||
if (res.first) {
|
||||
if (skip_child_views) {
|
||||
break;
|
||||
}
|
||||
/* automation lane (one level, non-recursive)
|
||||
*
|
||||
* - if no automation lane exists -> move to prev tack
|
||||
* - if no y-axis match is found -> the current track is at the top -> move to prev track
|
||||
* (actually last automation lane of previous track, see below)
|
||||
* - if first (top-most) lane is at the top -> move to this track
|
||||
* - else move up one lane
|
||||
*/
|
||||
TimeAxisView::Children kids = (*t)->get_child_list();
|
||||
TimeAxisView::Children::iterator pkid = kids.end();
|
||||
|
||||
for (TimeAxisView::Children::iterator ci = kids.begin(); ci != kids.end(); ++ci) {
|
||||
if ((*ci)->hidden()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::pair<TimeAxisView*,double> dev;
|
||||
dev = (*ci)->covers_y_position (top_of_trackviews);
|
||||
if (dev.first) {
|
||||
/* some automation lane is currently at the top */
|
||||
if (ci == kids.begin()) {
|
||||
/* first (top-most) autmation lane is at the top.
|
||||
* jump directly to this track's top
|
||||
*/
|
||||
ensure_time_axis_view_is_visible (**t, true);
|
||||
return true;
|
||||
}
|
||||
else if (pkid != kids.end()) {
|
||||
/* some other automation lane is at the top.
|
||||
* move up to prev automation lane.
|
||||
*/
|
||||
ensure_time_axis_view_is_visible (**pkid, true);
|
||||
return true;
|
||||
}
|
||||
assert(0); // not reached
|
||||
break;
|
||||
}
|
||||
pkid = ci;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1469,7 +1549,23 @@ Editor::scroll_up_one_track ()
|
|||
}
|
||||
|
||||
if (prev != track_views.end()) {
|
||||
ensure_time_axis_view_is_visible (**prev, true);
|
||||
// move to bottom-most automation-lane of the previous track
|
||||
TimeAxisView::Children kids = (*prev)->get_child_list();
|
||||
TimeAxisView::Children::reverse_iterator pkid = kids.rend();
|
||||
if (!skip_child_views) {
|
||||
// find the last visible lane
|
||||
for (TimeAxisView::Children::reverse_iterator ci = kids.rbegin(); ci != kids.rend(); ++ci) {
|
||||
if (!(*ci)->hidden()) {
|
||||
pkid = ci;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pkid != kids.rend()) {
|
||||
ensure_time_axis_view_is_visible (**pkid, true);
|
||||
} else {
|
||||
ensure_time_axis_view_is_visible (**prev, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1712,29 +1808,9 @@ Editor::temporal_zoom_region (bool both_axes)
|
|||
framepos_t end = 0;
|
||||
set<TimeAxisView*> tracks;
|
||||
|
||||
RegionSelection rs = get_regions_from_selection_and_entered ();
|
||||
|
||||
if (rs.empty()) {
|
||||
if ( !get_selection_extents(start, end) )
|
||||
return;
|
||||
}
|
||||
|
||||
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
|
||||
|
||||
if ((*i)->region()->position() < start) {
|
||||
start = (*i)->region()->position();
|
||||
}
|
||||
|
||||
if ((*i)->region()->last_frame() + 1 > end) {
|
||||
end = (*i)->region()->last_frame() + 1;
|
||||
}
|
||||
|
||||
tracks.insert (&((*i)->get_time_axis_view()));
|
||||
}
|
||||
|
||||
if ((start == 0 && end == 0) || end < start) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
calc_extra_zoom_edges (start, end);
|
||||
|
||||
/* if we're zooming on both axes we need to save track heights etc.
|
||||
|
|
@ -1772,6 +1848,46 @@ Editor::temporal_zoom_region (bool both_axes)
|
|||
}
|
||||
|
||||
|
||||
bool
|
||||
Editor::get_selection_extents ( framepos_t &start, framepos_t &end )
|
||||
{
|
||||
start = max_framepos;
|
||||
end = 0;
|
||||
bool ret = true;
|
||||
|
||||
//ToDo: if notes are selected, set extents to that selection
|
||||
|
||||
//ToDo: if control points are selected, set extents to that selection
|
||||
|
||||
if ( !selection->regions.empty() ) {
|
||||
RegionSelection rs = get_regions_from_selection_and_entered ();
|
||||
|
||||
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
|
||||
|
||||
if ((*i)->region()->position() < start) {
|
||||
start = (*i)->region()->position();
|
||||
}
|
||||
|
||||
if ((*i)->region()->last_frame() + 1 > end) {
|
||||
end = (*i)->region()->last_frame() + 1;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (!selection->time.empty()) {
|
||||
start = selection->time.start();
|
||||
end = selection->time.end_frame();
|
||||
} else
|
||||
ret = false; //no selection found
|
||||
|
||||
//range check
|
||||
if ((start == 0 && end == 0) || end < start) {
|
||||
ret = false;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Editor::temporal_zoom_selection (bool both_axes)
|
||||
{
|
||||
|
|
@ -1788,16 +1904,14 @@ Editor::temporal_zoom_selection (bool both_axes)
|
|||
//if a range is selected, zoom to that
|
||||
if (!selection->time.empty()) {
|
||||
|
||||
framepos_t start = selection->time.start();
|
||||
framepos_t end = selection->time.end_frame();
|
||||
|
||||
calc_extra_zoom_edges(start, end);
|
||||
|
||||
temporal_zoom_by_frame (start, end);
|
||||
|
||||
framepos_t start, end;
|
||||
if (get_selection_extents (start, end)) {
|
||||
calc_extra_zoom_edges(start, end);
|
||||
temporal_zoom_by_frame (start, end);
|
||||
}
|
||||
|
||||
if (both_axes)
|
||||
fit_selected_tracks();
|
||||
|
||||
fit_selection();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2342,11 +2456,15 @@ Editor::play_from_edit_point_and_return ()
|
|||
void
|
||||
Editor::play_selection ()
|
||||
{
|
||||
if (selection->time.empty()) {
|
||||
framepos_t start, end;
|
||||
if (!get_selection_extents ( start, end))
|
||||
return;
|
||||
}
|
||||
|
||||
_session->request_play_range (&selection->time, true);
|
||||
AudioRange ar (start, end, 0);
|
||||
list<AudioRange> lar;
|
||||
lar.push_back (ar);
|
||||
|
||||
_session->request_play_range (&lar, true);
|
||||
}
|
||||
|
||||
framepos_t
|
||||
|
|
@ -2379,16 +2497,17 @@ Editor::maybe_locate_with_edit_preroll ( framepos_t location )
|
|||
void
|
||||
Editor::play_with_preroll ()
|
||||
{
|
||||
if (selection->time.empty()) {
|
||||
return;
|
||||
} else {
|
||||
{
|
||||
framepos_t preroll = get_preroll();
|
||||
|
||||
framepos_t start = 0;
|
||||
if (selection->time[clicked_selection].start > preroll)
|
||||
start = selection->time[clicked_selection].start - preroll;
|
||||
framepos_t start, end;
|
||||
if (!get_selection_extents ( start, end))
|
||||
return;
|
||||
|
||||
if (start > preroll)
|
||||
start = start - preroll;
|
||||
|
||||
framepos_t end = selection->time[clicked_selection].end + preroll;
|
||||
end = end + preroll; //"post-roll"
|
||||
|
||||
AudioRange ar (start, end, 0);
|
||||
list<AudioRange> lar;
|
||||
|
|
@ -3968,7 +4087,7 @@ struct AutomationRecord {
|
|||
* @param op Operation (Cut, Copy or Clear)
|
||||
*/
|
||||
void
|
||||
Editor::cut_copy_points (Editing::CutCopyOp op, Evoral::MusicalTime earliest, bool midi)
|
||||
Editor::cut_copy_points (Editing::CutCopyOp op, Evoral::Beats earliest, bool midi)
|
||||
{
|
||||
if (selection->points.empty ()) {
|
||||
return;
|
||||
|
|
@ -4010,7 +4129,7 @@ Editor::cut_copy_points (Editing::CutCopyOp op, Evoral::MusicalTime earliest, bo
|
|||
lists[al].copy->fast_simple_add ((*j)->when, (*j)->value);
|
||||
if (midi) {
|
||||
/* Update earliest MIDI start time in beats */
|
||||
earliest = std::min(earliest, Evoral::MusicalTime((*j)->when));
|
||||
earliest = std::min(earliest, Evoral::Beats((*j)->when));
|
||||
} else {
|
||||
/* Update earliest session start time in frames */
|
||||
start = std::min(start, (*i)->line().session_position(j));
|
||||
|
|
@ -4019,8 +4138,8 @@ Editor::cut_copy_points (Editing::CutCopyOp op, Evoral::MusicalTime earliest, bo
|
|||
|
||||
/* Snap start time backwards, so copy/paste is snap aligned. */
|
||||
if (midi) {
|
||||
if (earliest == Evoral::MusicalTime::max()) {
|
||||
earliest = Evoral::MusicalTime(); // Weird... don't offset
|
||||
if (earliest == Evoral::Beats::max()) {
|
||||
earliest = Evoral::Beats(); // Weird... don't offset
|
||||
}
|
||||
earliest.round_down_to_beat();
|
||||
} else {
|
||||
|
|
@ -4073,7 +4192,7 @@ Editor::cut_copy_points (Editing::CutCopyOp op, Evoral::MusicalTime earliest, bo
|
|||
void
|
||||
Editor::cut_copy_midi (CutCopyOp op)
|
||||
{
|
||||
Evoral::MusicalTime earliest = Evoral::MusicalTime::max();
|
||||
Evoral::Beats earliest = Evoral::Beats::max();
|
||||
for (MidiRegionSelection::iterator i = selection->midi_regions.begin(); i != selection->midi_regions.end(); ++i) {
|
||||
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(*i);
|
||||
if (mrv) {
|
||||
|
|
@ -4919,14 +5038,14 @@ Editor::strip_region_silence ()
|
|||
Command*
|
||||
Editor::apply_midi_note_edit_op_to_region (MidiOperator& op, MidiRegionView& mrv)
|
||||
{
|
||||
Evoral::Sequence<Evoral::MusicalTime>::Notes selected;
|
||||
Evoral::Sequence<Evoral::Beats>::Notes selected;
|
||||
mrv.selection_as_notelist (selected, true);
|
||||
|
||||
vector<Evoral::Sequence<Evoral::MusicalTime>::Notes> v;
|
||||
vector<Evoral::Sequence<Evoral::Beats>::Notes> v;
|
||||
v.push_back (selected);
|
||||
|
||||
framepos_t pos_frames = mrv.midi_region()->position() - mrv.midi_region()->start();
|
||||
Evoral::MusicalTime pos_beats = _session->tempo_map().framewalk_to_beats(0, pos_frames);
|
||||
framepos_t pos_frames = mrv.midi_region()->position() - mrv.midi_region()->start();
|
||||
Evoral::Beats pos_beats = _session->tempo_map().framewalk_to_beats(0, pos_frames);
|
||||
|
||||
return op (mrv.midi_region()->model(), pos_beats, v);
|
||||
}
|
||||
|
|
@ -5093,7 +5212,7 @@ Editor::insert_patch_change (bool from_context)
|
|||
*/
|
||||
MidiRegionView* first = dynamic_cast<MidiRegionView*> (rs.front ());
|
||||
|
||||
Evoral::PatchChange<Evoral::MusicalTime> empty (Evoral::MusicalTime(), 0, 0, 0);
|
||||
Evoral::PatchChange<Evoral::Beats> empty (Evoral::Beats(), 0, 0, 0);
|
||||
PatchChangeDialog d (0, _session, empty, first->instrument_info(), Gtk::Stock::ADD);
|
||||
|
||||
if (d.run() == RESPONSE_CANCEL) {
|
||||
|
|
@ -5771,20 +5890,25 @@ Editor::set_playhead_cursor ()
|
|||
void
|
||||
Editor::split_region ()
|
||||
{
|
||||
//if a range is selected, separate it
|
||||
if ( !selection->time.empty()) {
|
||||
separate_regions_between (selection->time);
|
||||
return;
|
||||
}
|
||||
|
||||
RegionSelection rs = get_regions_from_selection_and_edit_point ();
|
||||
//if no range was selected, try to find some regions to split
|
||||
if (current_mouse_mode() == MouseObject) { //don't try this for Internal Edit, Stretch, Draw, etc.
|
||||
|
||||
RegionSelection rs = get_regions_from_selection_and_edit_point ();
|
||||
|
||||
framepos_t where = get_preferred_edit_position ();
|
||||
framepos_t where = get_preferred_edit_position ();
|
||||
|
||||
if (rs.empty()) {
|
||||
return;
|
||||
if (rs.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
split_regions_at (where, rs);
|
||||
}
|
||||
|
||||
split_regions_at (where, rs);
|
||||
}
|
||||
|
||||
struct EditorOrderRouteSorter {
|
||||
|
|
@ -5858,64 +5982,28 @@ Editor::select_prev_route()
|
|||
|
||||
void
|
||||
Editor::set_loop_from_selection (bool play)
|
||||
{
|
||||
if (_session == 0 || selection->time.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
framepos_t start = selection->time[clicked_selection].start;
|
||||
framepos_t end = selection->time[clicked_selection].end;
|
||||
|
||||
set_loop_range (start, end, _("set loop range from selection"));
|
||||
|
||||
if (play) {
|
||||
_session->request_locate (start, true);
|
||||
_session->request_play_loop (true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_loop_from_edit_range (bool play)
|
||||
{
|
||||
if (_session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
framepos_t start;
|
||||
framepos_t end;
|
||||
|
||||
if (!get_edit_op_range (start, end)) {
|
||||
framepos_t start, end;
|
||||
if (!get_selection_extents ( start, end))
|
||||
return;
|
||||
}
|
||||
|
||||
set_loop_range (start, end, _("set loop range from edit range"));
|
||||
set_loop_range (start, end, _("set loop range from selection"));
|
||||
|
||||
if (play) {
|
||||
_session->request_locate (start, true);
|
||||
_session->request_play_loop (true);
|
||||
_session->request_play_loop (true, true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_loop_from_region (bool play)
|
||||
{
|
||||
framepos_t start = max_framepos;
|
||||
framepos_t end = 0;
|
||||
|
||||
RegionSelection rs = get_regions_from_selection_and_entered ();
|
||||
|
||||
if (rs.empty()) {
|
||||
framepos_t start, end;
|
||||
if (!get_selection_extents ( start, end))
|
||||
return;
|
||||
}
|
||||
|
||||
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
|
||||
if ((*i)->region()->position() < start) {
|
||||
start = (*i)->region()->position();
|
||||
}
|
||||
if ((*i)->region()->last_frame() + 1 > end) {
|
||||
end = (*i)->region()->last_frame() + 1;
|
||||
}
|
||||
}
|
||||
|
||||
set_loop_range (start, end, _("set loop range from region"));
|
||||
|
||||
|
|
@ -5928,12 +6016,13 @@ Editor::set_loop_from_region (bool play)
|
|||
void
|
||||
Editor::set_punch_from_selection ()
|
||||
{
|
||||
if (_session == 0 || selection->time.empty()) {
|
||||
if (_session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
framepos_t start = selection->time[clicked_selection].start;
|
||||
framepos_t end = selection->time[clicked_selection].end;
|
||||
framepos_t start, end;
|
||||
if (!get_selection_extents ( start, end))
|
||||
return;
|
||||
|
||||
set_punch_range (start, end, _("set punch range from selection"));
|
||||
}
|
||||
|
|
@ -5941,14 +6030,15 @@ Editor::set_punch_from_selection ()
|
|||
void
|
||||
Editor::set_session_extents_from_selection ()
|
||||
{
|
||||
if (_session == 0 || selection->time.empty()) {
|
||||
if (_session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
framepos_t start, end;
|
||||
if (!get_selection_extents ( start, end))
|
||||
return;
|
||||
|
||||
begin_reversible_command (_("set session start/stop from selection"));
|
||||
|
||||
framepos_t start = selection->time[clicked_selection].start;
|
||||
framepos_t end = selection->time[clicked_selection].end;
|
||||
begin_reversible_command (_("set session start/end from selection"));
|
||||
|
||||
Location* loc;
|
||||
if ((loc = _session->locations()->session_range_location()) == 0) {
|
||||
|
|
@ -5966,43 +6056,12 @@ Editor::set_session_extents_from_selection ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_punch_from_edit_range ()
|
||||
{
|
||||
if (_session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
framepos_t start;
|
||||
framepos_t end;
|
||||
|
||||
if (!get_edit_op_range (start, end)) {
|
||||
return;
|
||||
}
|
||||
|
||||
set_punch_range (start, end, _("set punch range from edit range"));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_punch_from_region ()
|
||||
{
|
||||
framepos_t start = max_framepos;
|
||||
framepos_t end = 0;
|
||||
|
||||
RegionSelection rs = get_regions_from_selection_and_entered ();
|
||||
|
||||
if (rs.empty()) {
|
||||
framepos_t start, end;
|
||||
if (!get_selection_extents ( start, end))
|
||||
return;
|
||||
}
|
||||
|
||||
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
|
||||
if ((*i)->region()->position() < start) {
|
||||
start = (*i)->region()->position();
|
||||
}
|
||||
if ((*i)->region()->last_frame() + 1 > end) {
|
||||
end = (*i)->region()->last_frame() + 1;
|
||||
}
|
||||
}
|
||||
|
||||
set_punch_range (start, end, _("set punch range from region"));
|
||||
}
|
||||
|
|
@ -6690,6 +6749,23 @@ Editor::toggle_tracks_active ()
|
|||
|
||||
void
|
||||
Editor::remove_tracks ()
|
||||
{
|
||||
/* this will delete GUI objects that may be the subject of an event
|
||||
handler in which this method is called. Defer actual deletion to the
|
||||
next idle callback, when all event handling is finished.
|
||||
*/
|
||||
Glib::signal_idle().connect (sigc::mem_fun (*this, &Editor::idle_remove_tracks));
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::idle_remove_tracks ()
|
||||
{
|
||||
_remove_tracks ();
|
||||
return false; /* do not call again */
|
||||
}
|
||||
|
||||
void
|
||||
Editor::_remove_tracks ()
|
||||
{
|
||||
TrackSelection& ts (selection->tracks);
|
||||
|
||||
|
|
@ -6745,19 +6821,9 @@ edit your ardour.rc file to set the\n\
|
|||
return;
|
||||
}
|
||||
|
||||
// XXX should be using gettext plural forms, maybe?
|
||||
if (ntracks > 1) {
|
||||
trackstr = _("tracks");
|
||||
} else {
|
||||
trackstr = _("track");
|
||||
}
|
||||
|
||||
if (nbusses > 1) {
|
||||
busstr = _("busses");
|
||||
} else {
|
||||
busstr = _("bus");
|
||||
}
|
||||
|
||||
trackstr = P_("track", "tracks", ntracks);
|
||||
busstr = P_("bus", "busses", nbusses);
|
||||
|
||||
if (ntracks) {
|
||||
if (nbusses) {
|
||||
prompt = string_compose (_("Do you really want to remove %1 %2 and %3 %4?\n"
|
||||
|
|
@ -6954,7 +7020,7 @@ Editor::insert_time (
|
|||
}
|
||||
|
||||
void
|
||||
Editor::fit_selected_tracks ()
|
||||
Editor::fit_selection ()
|
||||
{
|
||||
if (!selection->tracks.empty()) {
|
||||
fit_tracks (selection->tracks);
|
||||
|
|
@ -7020,7 +7086,7 @@ Editor::fit_tracks (TrackViewList & tracks)
|
|||
}
|
||||
|
||||
undo_visual_stack.push_back (current_visual_state (true));
|
||||
no_save_visual = true;
|
||||
PBD::Unwinder<bool> nsv (no_save_visual, true);
|
||||
|
||||
/* build a list of all tracks, including children */
|
||||
|
||||
|
|
@ -7033,36 +7099,36 @@ Editor::fit_tracks (TrackViewList & tracks)
|
|||
}
|
||||
}
|
||||
|
||||
bool prev_was_selected = false;
|
||||
bool is_selected = tracks.contains (all.front());
|
||||
bool next_is_selected;
|
||||
|
||||
for (TrackViewList::iterator t = all.begin(); t != all.end(); ++t) {
|
||||
|
||||
TrackViewList::iterator next;
|
||||
|
||||
next = t;
|
||||
++next;
|
||||
|
||||
if (next != all.end()) {
|
||||
next_is_selected = tracks.contains (*next);
|
||||
} else {
|
||||
next_is_selected = false;
|
||||
}
|
||||
|
||||
// find selection range.
|
||||
// if someone knows how to user TrackViewList::iterator for this
|
||||
// I'm all ears.
|
||||
int selected_top = -1;
|
||||
int selected_bottom = -1;
|
||||
int i = 0;
|
||||
for (TrackViewList::iterator t = all.begin(); t != all.end(); ++t, ++i) {
|
||||
if ((*t)->marked_for_display ()) {
|
||||
if (is_selected) {
|
||||
if (tracks.contains(*t)) {
|
||||
if (selected_top == -1) {
|
||||
selected_top = i;
|
||||
}
|
||||
selected_bottom = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
i = 0;
|
||||
for (TrackViewList::iterator t = all.begin(); t != all.end(); ++t, ++i) {
|
||||
if ((*t)->marked_for_display ()) {
|
||||
if (tracks.contains(*t)) {
|
||||
(*t)->set_height (h);
|
||||
first_y_pos = std::min ((*t)->y_position (), first_y_pos);
|
||||
} else {
|
||||
if (prev_was_selected && next_is_selected) {
|
||||
if (i > selected_top && i < selected_bottom) {
|
||||
hide_track_in_display (*t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
prev_was_selected = is_selected;
|
||||
is_selected = next_is_selected;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -109,17 +109,17 @@ EditorRegions::EditorRegions (Editor* e)
|
|||
Gtk::Label* l;
|
||||
|
||||
ColumnInfo ci[] = {
|
||||
{ 0, _("Region"), _("Region name, with number of channels in []'s") },
|
||||
{ 1, _("Position"), _("Position of start of region") },
|
||||
{ 2, _("End"), _("Position of end of region") },
|
||||
{ 3, _("Length"), _("Length of the region") },
|
||||
{ 4, _("Sync"), _("Position of region sync point, relative to start of the region") },
|
||||
{ 5, _("Fade In"), _("Length of region fade-in (units: secondary clock), () if disabled") },
|
||||
{ 6, _("Fade Out"), _("Length of region fade-out (units: secondary clock), () if disabled") },
|
||||
{ 7, _("L"), _("Region position locked?") },
|
||||
{ 8, _("G"), _("Region position glued to Bars|Beats time?") },
|
||||
{ 9, _("M"), _("Region muted?") },
|
||||
{ 10, _("O"), _("Region opaque (blocks regions below it from being heard)?") },
|
||||
{ 0, _("Region"), _("Region name, with number of channels in []'s") },
|
||||
{ 1, _("Position"), _("Position of start of region") },
|
||||
{ 2, _("End"), _("Position of end of region") },
|
||||
{ 3, _("Length"), _("Length of the region") },
|
||||
{ 4, _("Sync"), _("Position of region sync point, relative to start of the region") },
|
||||
{ 5, _("Fade In"), _("Length of region fade-in (units: secondary clock), () if disabled") },
|
||||
{ 6, _("Fade Out"), _("Length of region fade-out (units: secondary clock), () if disabled") },
|
||||
{ 7, S_("Lock|L"), _("Region position locked?") },
|
||||
{ 8, S_("Gain|G"), _("Region position glued to Bars|Beats time?") },
|
||||
{ 9, S_("Mute|M"), _("Region muted?") },
|
||||
{ 10, S_("Opaque|O"), _("Region opaque (blocks regions below it from being heard)?") },
|
||||
{ -1, 0, 0 }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -93,18 +93,18 @@ EditorRouteGroups::EditorRouteGroups (Editor* e)
|
|||
Gtk::Label* l;
|
||||
|
||||
ColumnInfo ci[] = {
|
||||
{ 0, _("Col"), _("Group Tab Color") },
|
||||
{ 1, _("Name"), _("Name of Group") },
|
||||
{ 2, _("V"), _("Group is visible?") },
|
||||
{ 3, _("On"), _("Group is enabled?") },
|
||||
{ 4, S_("group|G"), _("Sharing Gain?") },
|
||||
{ 5, S_("relative|Rel"), _("Relative Gain Changes?") },
|
||||
{ 6, S_("mute|M"), _("Sharing Mute?") },
|
||||
{ 7, S_("solo|S"), _("Sharing Solo?") },
|
||||
{ 8, _("Rec"), _("Sharing Record-enable Status?") },
|
||||
{ 9, S_("monitoring|Mon"), _("Sharing Monitoring Choice?") },
|
||||
{ 10, S_("selection|Sel"), _("Sharing Selected/Editing Status?") },
|
||||
{ 11, S_("active|A"), _("Sharing Active Status?") },
|
||||
{ 0, _("Col"), _("Group Tab Color") },
|
||||
{ 1, _("Name"), _("Name of Group") },
|
||||
{ 2, S_("Visible|V"), _("Group is visible?") },
|
||||
{ 3, _("On"), _("Group is enabled?") },
|
||||
{ 4, S_("Group|G"), _("Sharing Gain?") },
|
||||
{ 5, S_("Relative|Rel"), _("Relative Gain Changes?") },
|
||||
{ 6, S_("Mute|M"), _("Sharing Mute?") },
|
||||
{ 7, S_("Solo|S"), _("Sharing Solo?") },
|
||||
{ 8, _("Rec"), _("Sharing Record-enable Status?") },
|
||||
{ 9, S_("Monitoring|Mon"), _("Sharing Monitoring Choice?") },
|
||||
{ 10, S_("Selection|Sel"), _("Sharing Selected/Editing Status?") },
|
||||
{ 11, S_("Active|A"), _("Sharing Active Status?") },
|
||||
{ -1, 0, 0 }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -203,15 +203,15 @@ EditorRoutes::EditorRoutes (Editor* e)
|
|||
Gtk::Label* l;
|
||||
|
||||
ColumnInfo ci[] = {
|
||||
{ 0, _("Name"), _("Track/Bus Name") },
|
||||
{ 1, _("V"), _("Track/Bus visible ?") },
|
||||
{ 2, _("A"), _("Track/Bus active ?") },
|
||||
{ 3, _("I"), _("MIDI input enabled") },
|
||||
{ 4, _("R"), _("Record enabled") },
|
||||
{ 5, _("M"), _("Muted") },
|
||||
{ 6, _("S"), _("Soloed") },
|
||||
{ 7, _("SI"), _("Solo Isolated") },
|
||||
{ 8, _("SS"), _("Solo Safe (Locked)") },
|
||||
{ 0, _("Name"), _("Track/Bus Name") },
|
||||
{ 1, S_("Visible|V"), _("Track/Bus visible ?") },
|
||||
{ 2, S_("Active|A"), _("Track/Bus active ?") },
|
||||
{ 3, S_("MidiInput|I"), _("MIDI input enabled") },
|
||||
{ 4, S_("Rec|R"), _("Record enabled") },
|
||||
{ 5, S_("Mute|M"), _("Muted") },
|
||||
{ 6, S_("Solo|S"), _("Soloed") },
|
||||
{ 7, S_("SoloIso|SI"), _("Solo Isolated") },
|
||||
{ 8, S_("SoloLock|SS"), _("Solo Safe (Locked)") },
|
||||
{ -1, 0, 0 }
|
||||
};
|
||||
|
||||
|
|
@ -516,7 +516,7 @@ EditorRoutes::redisplay_real ()
|
|||
}
|
||||
|
||||
bool visible = tv->marked_for_display ();
|
||||
|
||||
|
||||
/* show or hide the TimeAxisView */
|
||||
if (visible) {
|
||||
position += tv->show_at (position, n, &_editor->edit_controls_vbox);
|
||||
|
|
@ -636,7 +636,6 @@ void
|
|||
EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
|
||||
{
|
||||
PBD::Unwinder<bool> at (_adding_routes, true);
|
||||
|
||||
bool from_scratch = (_model->children().size() == 0);
|
||||
Gtk::TreeModel::Children::iterator insert_iter = _model->children().end();
|
||||
|
||||
|
|
@ -649,10 +648,6 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
|
|||
}
|
||||
}
|
||||
|
||||
if(!from_scratch) {
|
||||
_editor->selection->tracks.clear();
|
||||
}
|
||||
|
||||
DisplaySuspender ds;
|
||||
|
||||
_display.set_model (Glib::RefPtr<ListStore>());
|
||||
|
|
@ -685,10 +680,6 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
|
|||
row[_columns.solo_safe_state] = (*x)->route()->solo_safe();
|
||||
row[_columns.name_editable] = true;
|
||||
|
||||
if (!from_scratch) {
|
||||
_editor->selection->add(*x);
|
||||
}
|
||||
|
||||
boost::weak_ptr<Route> wr ((*x)->route());
|
||||
|
||||
(*x)->route()->gui_changed.connect (*this, MISSING_INVALIDATOR, boost::bind (&EditorRoutes::handle_gui_changes, this, _1, _2), gui_context());
|
||||
|
|
@ -725,8 +716,9 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
|
|||
_display.set_model (_model);
|
||||
|
||||
/* now update route order keys from the treeview/track display order */
|
||||
|
||||
sync_order_keys_from_treeview ();
|
||||
if (!from_scratch) {
|
||||
sync_order_keys_from_treeview ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -879,10 +871,19 @@ EditorRoutes::reset_remote_control_ids ()
|
|||
|
||||
for (ri = rows.begin(); ri != rows.end(); ++ri) {
|
||||
|
||||
/* skip two special values */
|
||||
|
||||
if (rid == Route::MasterBusRemoteControlID) {
|
||||
rid++;
|
||||
}
|
||||
|
||||
if (rid == Route::MonitorBusRemoteControlID) {
|
||||
rid++;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> route = (*ri)[_columns.route];
|
||||
bool visible = (*ri)[_columns.visible];
|
||||
|
||||
|
||||
if (!route->is_master() && !route->is_monitor()) {
|
||||
|
||||
uint32_t new_rid = (visible ? rid : invisible_key--);
|
||||
|
|
@ -1325,6 +1326,8 @@ EditorRoutes::button_press (GdkEventButton* ev)
|
|||
void
|
||||
EditorRoutes::selection_changed ()
|
||||
{
|
||||
_editor->begin_reversible_selection_op (X_("Select Track from Route List"));
|
||||
|
||||
if (_display.get_selection()->count_selected_rows() > 0) {
|
||||
|
||||
TreeIter iter;
|
||||
|
|
@ -1349,6 +1352,8 @@ EditorRoutes::selection_changed ()
|
|||
} else {
|
||||
_editor->get_selection().clear_tracks ();
|
||||
}
|
||||
|
||||
_editor->commit_reversible_selection_op ();
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -1389,29 +1394,10 @@ EditorRoutes::initial_display ()
|
|||
return;
|
||||
}
|
||||
|
||||
boost::shared_ptr<RouteList> routes = _session->get_routes();
|
||||
|
||||
if (ARDOUR_UI::instance()->session_is_new ()) {
|
||||
|
||||
/* new session: stamp all routes with the right editor order
|
||||
* key
|
||||
*/
|
||||
|
||||
_editor->add_routes (*(routes.get()));
|
||||
|
||||
} else {
|
||||
|
||||
/* existing session: sort a copy of the route list by
|
||||
* editor-order and add its contents to the display.
|
||||
*/
|
||||
|
||||
RouteList r (*routes);
|
||||
EditorOrderRouteSorter sorter;
|
||||
|
||||
r.sort (sorter);
|
||||
_editor->add_routes (r);
|
||||
|
||||
}
|
||||
RouteList r (*_session->get_routes());
|
||||
|
||||
r.sort (EditorOrderRouteSorter ());
|
||||
_editor->add_routes (r);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -221,7 +221,8 @@ Editor::popup_ruler_menu (framepos_t where, ItemType t)
|
|||
|
||||
break;
|
||||
case TransportMarkerBarItem:
|
||||
|
||||
ruler_items.push_back (MenuElem (_("Make Loop range"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_loop), where)));
|
||||
ruler_items.push_back (MenuElem (_("Make Punch range"), sigc::bind (sigc::mem_fun (*this, &Editor::mouse_add_new_punch), where)));
|
||||
break;
|
||||
|
||||
case CdMarkerBarItem:
|
||||
|
|
@ -239,25 +240,43 @@ Editor::popup_ruler_menu (framepos_t where, ItemType t)
|
|||
break;
|
||||
|
||||
case VideoBarItem:
|
||||
ruler_items.push_back (MenuElem (_("Timeline height")));
|
||||
static_cast<MenuItem*>(&ruler_items.back())->set_sensitive(false);
|
||||
/* proper headings would be nice
|
||||
* but AFAICT the only way to get them will be to define a
|
||||
* special GTK style for insensitive Elements or subclass MenuItem
|
||||
*/
|
||||
//ruler_items.push_back (MenuElem (_("Timeline height"))); // heading
|
||||
//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<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<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<Gtk::CheckMenuItem*>(&ruler_items.back())->set_active(true);}
|
||||
|
||||
ruler_items.push_back (SeparatorElem ());
|
||||
|
||||
ruler_items.push_back (MenuElem (_("Align Video Track")));
|
||||
static_cast<MenuItem*>(&ruler_items.back())->set_sensitive(false);
|
||||
|
||||
//ruler_items.push_back (MenuElem (_("Align Video Track"))); // heading
|
||||
//static_cast<MenuItem*>(&ruler_items.back())->set_sensitive(false);
|
||||
ruler_items.push_back (CheckMenuElem (_("Lock")));
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
ruler_items.push_back (SeparatorElem ());
|
||||
|
||||
//ruler_items.push_back (MenuElem (_("Video Monitor"))); // heading
|
||||
//static_cast<MenuItem*>(&ruler_items.back())->set_sensitive(false);
|
||||
ruler_items.push_back (CheckMenuElem (_("Video Monitor")));
|
||||
{
|
||||
Gtk::CheckMenuItem* xjadeo_toggle = static_cast<Gtk::CheckMenuItem*>(&ruler_items.back());
|
||||
if (!ARDOUR_UI::instance()->video_timeline->found_xjadeo()) {
|
||||
xjadeo_toggle->set_sensitive(false);
|
||||
}
|
||||
xjadeo_toggle->set_active(xjadeo_proc_action->get_active());
|
||||
xjadeo_toggle->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &Editor::toggle_xjadeo_proc), -1));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -202,8 +202,9 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op)
|
|||
}
|
||||
} else if (group && group->is_active()) {
|
||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
|
||||
if ((*i)->route_group() == group)
|
||||
if ((*i)->route_group() == group) {
|
||||
selection->remove(*i);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selection->remove (clicked_axisview);
|
||||
|
|
@ -215,8 +216,9 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op)
|
|||
}
|
||||
} else if (group && group->is_active()) {
|
||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
|
||||
if ( (*i)->route_group() == group)
|
||||
if ((*i)->route_group() == group) {
|
||||
selection->add(*i);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selection->add (clicked_axisview);
|
||||
|
|
@ -234,8 +236,9 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op)
|
|||
}
|
||||
} else if (group && group->is_active()) {
|
||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
|
||||
if ((*i)->route_group() == group)
|
||||
if ((*i)->route_group() == group) {
|
||||
selection->add(*i);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selection->add (clicked_axisview);
|
||||
|
|
@ -253,8 +256,9 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op)
|
|||
}
|
||||
} else if (group && group->is_active()) {
|
||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
|
||||
if ((*i)->route_group() == group)
|
||||
if ((*i)->route_group() == group) {
|
||||
selection->add(*i);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selection->set (clicked_axisview);
|
||||
|
|
@ -270,7 +274,7 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op)
|
|||
void
|
||||
Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no_remove)
|
||||
{
|
||||
begin_reversible_selection_op(_("Set Selected Track"));
|
||||
begin_reversible_selection_op (X_("Set Selected Track"));
|
||||
|
||||
switch (op) {
|
||||
case Selection::Toggle:
|
||||
|
|
@ -896,7 +900,7 @@ Editor::set_selected_regionview_from_region_list (boost::shared_ptr<Region> regi
|
|||
return;
|
||||
}
|
||||
|
||||
begin_reversible_selection_op (_("set selected regions"));
|
||||
begin_reversible_selection_op (X_("set selected regions"));
|
||||
|
||||
switch (op) {
|
||||
case Selection::Toggle:
|
||||
|
|
@ -939,7 +943,7 @@ Editor::set_selected_regionview_from_map_event (GdkEventAny* /*ev*/, StreamView*
|
|||
return true;
|
||||
}
|
||||
|
||||
begin_reversible_selection_op (_("set selected regions"));
|
||||
begin_reversible_selection_op (X_("set selected regions"));
|
||||
|
||||
selection->set (rv);
|
||||
|
||||
|
|
@ -1352,7 +1356,7 @@ Editor::select_all_in_track (Selection::Operation op)
|
|||
return;
|
||||
}
|
||||
|
||||
begin_reversible_selection_op(_("Select All in Track"));
|
||||
begin_reversible_selection_op (X_("Select All in Track"));
|
||||
|
||||
clicked_routeview->get_selectables (0, max_framepos, 0, DBL_MAX, touched);
|
||||
|
||||
|
|
@ -1416,7 +1420,7 @@ Editor::select_all_objects (Selection::Operation op)
|
|||
}
|
||||
|
||||
|
||||
begin_reversible_selection_op (_("select all"));
|
||||
begin_reversible_selection_op (X_("select all"));
|
||||
switch (op) {
|
||||
case Selection::Add:
|
||||
selection->add (touched);
|
||||
|
|
@ -1443,7 +1447,7 @@ Editor::invert_selection_in_track ()
|
|||
return;
|
||||
}
|
||||
|
||||
begin_reversible_selection_op(_("Invert Selection in Track"));
|
||||
begin_reversible_selection_op (X_("Invert Selection in Track"));
|
||||
clicked_routeview->get_inverted_selectables (*selection, touched);
|
||||
selection->set (touched);
|
||||
commit_reversible_selection_op ();
|
||||
|
|
@ -1471,7 +1475,7 @@ Editor::invert_selection ()
|
|||
(*iter)->get_inverted_selectables (*selection, touched);
|
||||
}
|
||||
|
||||
begin_reversible_selection_op(_("Invert Selection"));
|
||||
begin_reversible_selection_op (X_("Invert Selection"));
|
||||
selection->set (touched);
|
||||
commit_reversible_selection_op ();
|
||||
}
|
||||
|
|
@ -1514,7 +1518,7 @@ Editor::select_all_within (framepos_t start, framepos_t end, double top, double
|
|||
}
|
||||
}
|
||||
|
||||
begin_reversible_selection_op (_("select all within"));
|
||||
begin_reversible_selection_op (X_("select all within"));
|
||||
switch (op) {
|
||||
case Selection::Add:
|
||||
selection->add (found);
|
||||
|
|
@ -1541,6 +1545,12 @@ Editor::set_selection_from_region ()
|
|||
}
|
||||
|
||||
selection->set (selection->regions.start(), selection->regions.end_frame());
|
||||
|
||||
//we must now select tracks, because otherwise set_selection_from_region would appear to do nothing
|
||||
//perhaps too drastic; perhaps the user really only wants the region's track selected
|
||||
//but I can't think of any use-case for that (why wouldn't you just select the region?)
|
||||
select_all_tracks();
|
||||
|
||||
if (!Profile->get_sae()) {
|
||||
set_mouse_mode (Editing::MouseRange, false);
|
||||
}
|
||||
|
|
@ -1572,7 +1582,7 @@ Editor::set_selection_from_loop()
|
|||
void
|
||||
Editor::set_selection_from_range (Location& loc)
|
||||
{
|
||||
begin_reversible_selection_op (_("set selection from range"));
|
||||
begin_reversible_selection_op (X_("set selection from range"));
|
||||
selection->set (loc.start(), loc.end());
|
||||
commit_reversible_selection_op ();
|
||||
|
||||
|
|
@ -1612,7 +1622,7 @@ Editor::select_all_selectables_using_time_selection ()
|
|||
(*iter)->get_selectables (start, end - 1, 0, DBL_MAX, touched);
|
||||
}
|
||||
|
||||
begin_reversible_selection_op (_("select all from range"));
|
||||
begin_reversible_selection_op (X_("select all from range"));
|
||||
selection->set (touched);
|
||||
commit_reversible_selection_op ();
|
||||
}
|
||||
|
|
@ -1643,7 +1653,7 @@ Editor::select_all_selectables_using_punch()
|
|||
}
|
||||
(*iter)->get_selectables (location->start(), location->end() - 1, 0, DBL_MAX, touched);
|
||||
}
|
||||
begin_reversible_selection_op (_("select all from punch"));
|
||||
begin_reversible_selection_op (X_("select all from punch"));
|
||||
selection->set (touched);
|
||||
commit_reversible_selection_op ();
|
||||
|
||||
|
|
@ -1674,7 +1684,7 @@ Editor::select_all_selectables_using_loop()
|
|||
}
|
||||
(*iter)->get_selectables (location->start(), location->end() - 1, 0, DBL_MAX, touched);
|
||||
}
|
||||
begin_reversible_selection_op (_("select all from loop"));
|
||||
begin_reversible_selection_op (X_("select all from loop"));
|
||||
selection->set (touched);
|
||||
commit_reversible_selection_op ();
|
||||
|
||||
|
|
@ -1710,9 +1720,9 @@ Editor::select_all_selectables_using_cursor (EditorCursor *cursor, bool after)
|
|||
}
|
||||
|
||||
if (after) {
|
||||
begin_reversible_selection_op (_("select all after cursor"));
|
||||
begin_reversible_selection_op (X_("select all after cursor"));
|
||||
} else {
|
||||
begin_reversible_selection_op (_("select all before cursor"));
|
||||
begin_reversible_selection_op (X_("select all before cursor"));
|
||||
}
|
||||
|
||||
TrackViewList* ts;
|
||||
|
|
@ -1741,10 +1751,10 @@ Editor::select_all_selectables_using_edit (bool after)
|
|||
list<Selectable *> touched;
|
||||
|
||||
if (after) {
|
||||
start = get_preferred_edit_position();
|
||||
start = get_preferred_edit_position(false, true);
|
||||
end = _session->current_end_frame();
|
||||
} else {
|
||||
if ((end = get_preferred_edit_position()) > 1) {
|
||||
if ((end = get_preferred_edit_position(false, true)) > 1) {
|
||||
start = 0;
|
||||
end -= 1;
|
||||
} else {
|
||||
|
|
@ -1761,9 +1771,9 @@ Editor::select_all_selectables_using_edit (bool after)
|
|||
}
|
||||
|
||||
if (after) {
|
||||
begin_reversible_selection_op (_("select all after edit"));
|
||||
begin_reversible_selection_op (X_("select all after edit"));
|
||||
} else {
|
||||
begin_reversible_selection_op (_("select all before edit"));
|
||||
begin_reversible_selection_op (X_("select all before edit"));
|
||||
}
|
||||
|
||||
TrackViewList* ts;
|
||||
|
|
@ -1785,7 +1795,7 @@ Editor::select_all_selectables_using_edit (bool after)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::select_all_selectables_between (bool /*within*/)
|
||||
Editor::select_all_selectables_between (bool within)
|
||||
{
|
||||
framepos_t start;
|
||||
framepos_t end;
|
||||
|
|
@ -1815,10 +1825,10 @@ Editor::select_all_selectables_between (bool /*within*/)
|
|||
if ((*iter)->hidden()) {
|
||||
continue;
|
||||
}
|
||||
(*iter)->get_selectables (start, end, 0, DBL_MAX, touched);
|
||||
(*iter)->get_selectables (start, end, 0, DBL_MAX, touched, within);
|
||||
}
|
||||
|
||||
begin_reversible_selection_op(_("Select all Selectables Between"));
|
||||
begin_reversible_selection_op (X_("Select all Selectables Between"));
|
||||
selection->set (touched);
|
||||
commit_reversible_selection_op ();
|
||||
}
|
||||
|
|
@ -1837,7 +1847,7 @@ Editor::select_range_between ()
|
|||
return;
|
||||
}
|
||||
|
||||
begin_reversible_selection_op(_("Select Range Between"));
|
||||
begin_reversible_selection_op (X_("Select Range Between"));
|
||||
set_mouse_mode (MouseRange);
|
||||
selection->set (start, end);
|
||||
commit_reversible_selection_op ();
|
||||
|
|
@ -1947,7 +1957,7 @@ Editor::get_edit_op_range (framepos_t& start, framepos_t& end) const
|
|||
void
|
||||
Editor::deselect_all ()
|
||||
{
|
||||
begin_reversible_selection_op(_("Clear Selection"));
|
||||
begin_reversible_selection_op (X_("Deselect All"));
|
||||
selection->clear ();
|
||||
commit_reversible_selection_op ();
|
||||
}
|
||||
|
|
@ -1955,7 +1965,7 @@ Editor::deselect_all ()
|
|||
long
|
||||
Editor::select_range (framepos_t s, framepos_t e)
|
||||
{
|
||||
begin_reversible_selection_op(_("Select Range"));
|
||||
begin_reversible_selection_op (X_("Select Range"));
|
||||
selection->add (clicked_axisview);
|
||||
selection->time.clear ();
|
||||
long ret = selection->set (s, e);
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ EditorSummary::render_background_image ()
|
|||
StreamView* s = (*i)->view ();
|
||||
|
||||
if (s) {
|
||||
cairo_set_line_width (cr, _track_height * 0.6);
|
||||
cairo_set_line_width (cr, _track_height * 0.8);
|
||||
|
||||
s->foreach_regionview (sigc::bind (
|
||||
sigc::mem_fun (*this, &EditorSummary::render_region),
|
||||
|
|
@ -242,10 +242,10 @@ EditorSummary::render (cairo_t* cr, cairo_rectangle_t*)
|
|||
int32_t width = _view_rectangle_x.second - _view_rectangle_x.first;
|
||||
int32_t height = _view_rectangle_y.second - _view_rectangle_y.first;
|
||||
cairo_rectangle (cr, _view_rectangle_x.first, _view_rectangle_y.first, width, height);
|
||||
cairo_set_source_rgba (cr, 1, 1, 1, 0.25);
|
||||
cairo_set_source_rgba (cr, 1, 1, 1, 0.1);
|
||||
cairo_fill_preserve (cr);
|
||||
cairo_set_line_width (cr, 1);
|
||||
cairo_set_source_rgba (cr, 1, 1, 1, 0.5);
|
||||
cairo_set_source_rgba (cr, 1, 1, 1, 0.4);
|
||||
cairo_stroke (cr);
|
||||
|
||||
/* Playhead */
|
||||
|
|
@ -639,12 +639,16 @@ EditorSummary::on_motion_notify_event (GdkEventMotion* ev)
|
|||
xr.first += dx;
|
||||
} else if (_zoom_position == RIGHT || _zoom_position == RIGHT_TOP || _zoom_position == RIGHT_BOTTOM) {
|
||||
xr.second += dx;
|
||||
} else {
|
||||
xr.first = -1; /* do not change */
|
||||
}
|
||||
|
||||
if (_zoom_position == TOP || _zoom_position == LEFT_TOP || _zoom_position == RIGHT_TOP) {
|
||||
yr.first += dy;
|
||||
} else if (_zoom_position == BOTTOM || _zoom_position == LEFT_BOTTOM || _zoom_position == RIGHT_BOTTOM) {
|
||||
yr.second += dy;
|
||||
} else {
|
||||
yr.first = -1; /* do not change y */
|
||||
}
|
||||
|
||||
set_overlays_dirty ();
|
||||
|
|
@ -799,8 +803,12 @@ EditorSummary::set_editor (pair<double,double> const x, pair<double, double> con
|
|||
return;
|
||||
}
|
||||
|
||||
set_editor_x (x);
|
||||
set_editor_y (y);
|
||||
if (x.first >= 0) {
|
||||
set_editor_x (x);
|
||||
}
|
||||
if (y.first >= 0) {
|
||||
set_editor_y (y);
|
||||
}
|
||||
}
|
||||
|
||||
/** Set the left of the x range visible in the editor.
|
||||
|
|
@ -904,7 +912,7 @@ EditorSummary::set_editor_y (pair<double, double> const y)
|
|||
set_dirty ();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Compute current height of tracks between y.first and y.second. We add up
|
||||
the total height into `total_height' and the height of complete tracks into
|
||||
`scale height'.
|
||||
|
|
@ -946,7 +954,7 @@ EditorSummary::set_editor_y (pair<double, double> const y)
|
|||
/* Height that we will use for scaling; use the whole editor height unless there are not
|
||||
enough tracks to fill it.
|
||||
*/
|
||||
double const ch = min (total_height, _editor->visible_canvas_height());
|
||||
double const ch = min (total_height, (_editor->visible_canvas_height() - _editor->get_trackview_group()->canvas_origin().y));
|
||||
|
||||
/* hence required scale factor of the complete tracks to fit the required y range;
|
||||
the amount of space they should take up divided by the amount they currently take up.
|
||||
|
|
@ -964,7 +972,7 @@ EditorSummary::set_editor_y (pair<double, double> const y)
|
|||
}
|
||||
|
||||
if (yc.first <= 0 && yc.second >= _track_height) {
|
||||
(*i)->set_height (max (TimeAxisView::preset_height (HeightSmall), (uint32_t) ((*i)->effective_height() * scale)));
|
||||
(*i)->set_height (max (TimeAxisView::preset_height (HeightSmall), (uint32_t) ((*i)->effective_height() * scale)), TimeAxisView::TotalHeight);
|
||||
}
|
||||
|
||||
yc.first -= _track_height;
|
||||
|
|
|
|||
|
|
@ -178,8 +178,9 @@ Editor::draw_measures (ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
|
|||
if (tempo_lines == 0) {
|
||||
tempo_lines = new TempoLines (time_line_group, ArdourCanvas::LineSet::Vertical);
|
||||
}
|
||||
|
||||
tempo_lines->draw (begin, end);
|
||||
|
||||
const unsigned divisions = get_grid_beat_divisions(leftmost_frame);
|
||||
tempo_lines->draw (begin, end, divisions, leftmost_frame, _session->frame_rate());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -195,8 +196,6 @@ Editor::mouse_add_new_tempo_event (framepos_t frame)
|
|||
//this causes compiz to display no border.
|
||||
//tempo_dialog.signal_realize().connect (sigc::bind (sigc::ptr_fun (set_decoration), &tempo_dialog, Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
|
||||
|
||||
ensure_float (tempo_dialog);
|
||||
|
||||
switch (tempo_dialog.run()) {
|
||||
case RESPONSE_ACCEPT:
|
||||
break;
|
||||
|
|
@ -237,8 +236,6 @@ Editor::mouse_add_new_meter_event (framepos_t frame)
|
|||
//this causes compiz to display no border..
|
||||
//meter_dialog.signal_realize().connect (sigc::bind (sigc::ptr_fun (set_decoration), &meter_dialog, Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
|
||||
|
||||
ensure_float (meter_dialog);
|
||||
|
||||
switch (meter_dialog.run ()) {
|
||||
case RESPONSE_ACCEPT:
|
||||
break;
|
||||
|
|
@ -289,8 +286,6 @@ Editor::edit_meter_section (MeterSection* section)
|
|||
{
|
||||
MeterDialog meter_dialog (*section, _("done"));
|
||||
|
||||
ensure_float (meter_dialog);
|
||||
|
||||
switch (meter_dialog.run()) {
|
||||
case RESPONSE_ACCEPT:
|
||||
break;
|
||||
|
|
@ -319,8 +314,6 @@ Editor::edit_tempo_section (TempoSection* section)
|
|||
{
|
||||
TempoDialog tempo_dialog (*section, _("done"));
|
||||
|
||||
ensure_float (tempo_dialog);
|
||||
|
||||
switch (tempo_dialog.run ()) {
|
||||
case RESPONSE_ACCEPT:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#include "audio_time_axis.h"
|
||||
#include "video_image_frame.h"
|
||||
#include "export_video_dialog.h"
|
||||
#include "export_video_infobox.h"
|
||||
#include "interthread_progress_window.h"
|
||||
|
||||
#include "pbd/openuri.h"
|
||||
|
|
@ -105,26 +104,3 @@ Editor::embed_audio_from_video (std::string path, framepos_t n, bool lock_positi
|
|||
import_status.all_done = true;
|
||||
::g_unlink(path.c_str());
|
||||
}
|
||||
|
||||
void
|
||||
Editor::export_video (bool range)
|
||||
{
|
||||
if (ARDOUR::Config->get_show_video_export_info()) {
|
||||
ExportVideoInfobox infobox (_session);
|
||||
Gtk::ResponseType rv = (Gtk::ResponseType) infobox.run();
|
||||
if (infobox.show_again()) {
|
||||
ARDOUR::Config->set_show_video_export_info(false);
|
||||
}
|
||||
switch (rv) {
|
||||
case GTK_RESPONSE_YES:
|
||||
PBD::open_uri (ARDOUR::Config->get_reference_manual_url() + "/video-timeline/operations/#export");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
ExportVideoDialog dialog (_session, get_selection().time, range);
|
||||
Gtk::ResponseType r = (Gtk::ResponseType) dialog.run();
|
||||
(void) r; // keep gcc quiet
|
||||
dialog.hide();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,10 +43,12 @@
|
|||
#include "ardour/mididm.h"
|
||||
#include "ardour/rc_configuration.h"
|
||||
#include "ardour/types.h"
|
||||
#include "ardour/profile.h"
|
||||
|
||||
#include "pbd/convert.h"
|
||||
#include "pbd/error.h"
|
||||
|
||||
#include "opts.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "engine_dialog.h"
|
||||
#include "gui_thread.h"
|
||||
|
|
@ -67,6 +69,7 @@ static const char* results_markup = X_("<span weight=\"bold\" size=\"larger\">%1
|
|||
|
||||
EngineControl::EngineControl ()
|
||||
: ArdourDialog (_("Audio/MIDI Setup"))
|
||||
, engine_status ("")
|
||||
, basic_packer (9, 4)
|
||||
, input_latency_adjustment (0, 0, 99999, 1)
|
||||
, input_latency (input_latency_adjustment)
|
||||
|
|
@ -91,9 +94,10 @@ EngineControl::EngineControl ()
|
|||
, ignore_changes (0)
|
||||
, _desired_sample_rate (0)
|
||||
, started_at_least_once (false)
|
||||
, queue_device_changed (false)
|
||||
{
|
||||
using namespace Notebook_Helpers;
|
||||
vector<string> strings;
|
||||
vector<string> backend_names;
|
||||
Label* label;
|
||||
AttachOptions xopt = AttachOptions (FILL|EXPAND);
|
||||
int row;
|
||||
|
|
@ -111,11 +115,10 @@ EngineControl::EngineControl ()
|
|||
}
|
||||
|
||||
for (vector<const ARDOUR::AudioBackendInfo*>::const_iterator b = backends.begin(); b != backends.end(); ++b) {
|
||||
strings.push_back ((*b)->name);
|
||||
backend_names.push_back ((*b)->name);
|
||||
}
|
||||
|
||||
set_popdown_strings (backend_combo, strings);
|
||||
backend_combo.set_active_text (strings.front());
|
||||
set_popdown_strings (backend_combo, backend_names);
|
||||
backend_combo.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::backend_changed));
|
||||
|
||||
/* setup basic packing characteristics for the table used on the main
|
||||
|
|
@ -247,6 +250,9 @@ EngineControl::EngineControl ()
|
|||
get_vbox()->set_border_width (12);
|
||||
get_vbox()->pack_start (notebook);
|
||||
|
||||
get_action_area()->pack_start (engine_status);
|
||||
engine_status.show();
|
||||
|
||||
/* need a special function to print "all available channels" when the
|
||||
* channel counts hit zero.
|
||||
*/
|
||||
|
|
@ -262,9 +268,9 @@ EngineControl::EngineControl ()
|
|||
control_app_button.signal_clicked().connect (mem_fun (*this, &EngineControl::control_app_button_clicked));
|
||||
manage_control_app_sensitivity ();
|
||||
|
||||
cancel_button = add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
|
||||
ok_button = add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK);
|
||||
cancel_button = add_button (Gtk::Stock::CLOSE, Gtk::RESPONSE_CANCEL);
|
||||
apply_button = add_button (Gtk::Stock::APPLY, Gtk::RESPONSE_APPLY);
|
||||
ok_button = add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK);
|
||||
|
||||
/* Pick up any existing audio setup configuration, if appropriate */
|
||||
|
||||
|
|
@ -273,17 +279,28 @@ EngineControl::EngineControl ()
|
|||
ARDOUR::AudioEngine::instance()->Running.connect (running_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_running, this), gui_context());
|
||||
ARDOUR::AudioEngine::instance()->Stopped.connect (stopped_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_stopped, this), gui_context());
|
||||
ARDOUR::AudioEngine::instance()->Halted.connect (stopped_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_stopped, this), gui_context());
|
||||
ARDOUR::AudioEngine::instance()->DeviceListChanged.connect (devicelist_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::device_list_changed, this), gui_context());
|
||||
|
||||
if (audio_setup)
|
||||
{
|
||||
if (audio_setup) {
|
||||
set_state (*audio_setup);
|
||||
}
|
||||
{
|
||||
|
||||
if (backend_combo.get_active_text().empty()) {
|
||||
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
|
||||
backend_combo.set_active_text (backend_names.front());
|
||||
}
|
||||
|
||||
backend_changed ();
|
||||
|
||||
/* in case the setting the backend failed, e.g. stale config, from set_state(), try again */
|
||||
if (0 == ARDOUR::AudioEngine::instance()->current_backend()) {
|
||||
backend_combo.set_active_text (backend_names.back());
|
||||
/* ignore: don't save state */
|
||||
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
|
||||
backend_changed ();
|
||||
}
|
||||
|
||||
|
||||
/* Connect to signals */
|
||||
|
||||
driver_combo.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::driver_changed));
|
||||
|
|
@ -298,12 +315,21 @@ EngineControl::EngineControl ()
|
|||
output_channels.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::parameter_changed));
|
||||
|
||||
notebook.signal_switch_page().connect (sigc::mem_fun (*this, &EngineControl::on_switch_page));
|
||||
|
||||
connect_disconnect_button.signal_clicked().connect (sigc::mem_fun (*this, &EngineControl::connect_disconnect_click));
|
||||
connect_disconnect_button.set_no_show_all();
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
EngineControl::on_show ()
|
||||
{
|
||||
ArdourDialog::on_show ();
|
||||
if (!ARDOUR::AudioEngine::instance()->current_backend() || !ARDOUR::AudioEngine::instance()->running()) {
|
||||
// re-check _have_control (jackd running) see #6041
|
||||
backend_changed ();
|
||||
}
|
||||
device_changed ();
|
||||
ok_button->grab_focus();
|
||||
}
|
||||
|
||||
|
|
@ -317,9 +343,28 @@ EngineControl::on_response (int response_id)
|
|||
push_state_to_backend (true);
|
||||
break;
|
||||
case RESPONSE_OK:
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
// For some reason we don't understand, 'hide()'
|
||||
// needs to get called first in Windows
|
||||
hide ();
|
||||
|
||||
// But if there's no session open, this can produce
|
||||
// a long gap when nothing appears to be happening.
|
||||
// Let's show the splash image while we're waiting.
|
||||
if ( !ARDOUR_COMMAND_LINE::no_splash ) {
|
||||
if ( ARDOUR_UI::instance() ) {
|
||||
if ( !ARDOUR_UI::instance()->session_loaded ) {
|
||||
ARDOUR_UI::instance()->show_splash();
|
||||
}
|
||||
}
|
||||
}
|
||||
push_state_to_backend (true);
|
||||
break;
|
||||
#else
|
||||
push_state_to_backend (true);
|
||||
hide ();
|
||||
break;
|
||||
#endif
|
||||
case RESPONSE_DELETE_EVENT:
|
||||
{
|
||||
GdkEventButton ev;
|
||||
|
|
@ -364,15 +409,6 @@ EngineControl::build_notebook ()
|
|||
|
||||
basic_vbox.pack_start (basic_hbox, false, false);
|
||||
|
||||
if (_have_control) {
|
||||
Gtk::HBox* hpacker = manage (new HBox);
|
||||
hpacker->set_border_width (12);
|
||||
hpacker->pack_start (control_app_button, false, false);
|
||||
hpacker->show ();
|
||||
control_app_button.show();
|
||||
basic_vbox.pack_start (*hpacker);
|
||||
}
|
||||
|
||||
{
|
||||
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
|
||||
basic_vbox.show_all ();
|
||||
|
|
@ -416,6 +452,10 @@ EngineControl::build_full_control_notebook ()
|
|||
basic_packer.attach (buffer_size_combo, 1, 2, row, row + 1, xopt, (AttachOptions) 0);
|
||||
buffer_size_duration_label.set_alignment (0.0); /* left-align */
|
||||
basic_packer.attach (buffer_size_duration_label, 2, 3, row, row+1, SHRINK, (AttachOptions) 0);
|
||||
|
||||
/* button spans 2 rows */
|
||||
|
||||
basic_packer.attach (control_app_button, 3, 4, row-1, row+1, xopt, xopt);
|
||||
row++;
|
||||
|
||||
input_channels.set_name ("InputChannels");
|
||||
|
|
@ -424,22 +464,26 @@ EngineControl::build_full_control_notebook ()
|
|||
input_channels.set_wrap (false);
|
||||
output_channels.set_editable (true);
|
||||
|
||||
label = manage (left_aligned_label (_("Input Channels:")));
|
||||
basic_packer.attach (*label, 0, 1, row, row+1, xopt, (AttachOptions) 0);
|
||||
basic_packer.attach (input_channels, 1, 2, row, row+1, xopt, (AttachOptions) 0);
|
||||
++row;
|
||||
|
||||
if (!ARDOUR::Profile->get_mixbus()) {
|
||||
label = manage (left_aligned_label (_("Input Channels:")));
|
||||
basic_packer.attach (*label, 0, 1, row, row+1, xopt, (AttachOptions) 0);
|
||||
basic_packer.attach (input_channels, 1, 2, row, row+1, xopt, (AttachOptions) 0);
|
||||
++row;
|
||||
}
|
||||
|
||||
output_channels.set_name ("OutputChannels");
|
||||
output_channels.set_flags (Gtk::CAN_FOCUS);
|
||||
output_channels.set_digits (0);
|
||||
output_channels.set_wrap (false);
|
||||
output_channels.set_editable (true);
|
||||
|
||||
label = manage (left_aligned_label (_("Output Channels:")));
|
||||
basic_packer.attach (*label, 0, 1, row, row+1, xopt, (AttachOptions) 0);
|
||||
basic_packer.attach (output_channels, 1, 2, row, row+1, xopt, (AttachOptions) 0);
|
||||
++row;
|
||||
|
||||
if (!ARDOUR::Profile->get_mixbus()) {
|
||||
label = manage (left_aligned_label (_("Output Channels:")));
|
||||
basic_packer.attach (*label, 0, 1, row, row+1, xopt, (AttachOptions) 0);
|
||||
basic_packer.attach (output_channels, 1, 2, row, row+1, xopt, (AttachOptions) 0);
|
||||
++row;
|
||||
}
|
||||
|
||||
input_latency.set_name ("InputLatency");
|
||||
input_latency.set_flags (Gtk::CAN_FOCUS);
|
||||
input_latency.set_digits (0);
|
||||
|
|
@ -470,7 +514,7 @@ EngineControl::build_full_control_notebook ()
|
|||
basic_packer.attach (lm_button_audio, 3, 4, row-1, row+1, xopt, xopt);
|
||||
++row;
|
||||
|
||||
label = manage (left_aligned_label (_("MIDI System")));
|
||||
label = manage (left_aligned_label (_("MIDI System:")));
|
||||
basic_packer.attach (*label, 0, 1, row, row + 1, xopt, (AttachOptions) 0);
|
||||
basic_packer.attach (midi_option_combo, 1, 2, row, row + 1, SHRINK, (AttachOptions) 0);
|
||||
basic_packer.attach (midi_devices_button, 3, 4, row, row+1, xopt, xopt);
|
||||
|
|
@ -511,8 +555,6 @@ EngineControl::build_no_control_notebook ()
|
|||
row++;
|
||||
}
|
||||
|
||||
connect_disconnect_button.signal_clicked().connect (sigc::mem_fun (*this, &EngineControl::connect_disconnect_click));
|
||||
|
||||
basic_packer.attach (connect_disconnect_button, 0, 2, row, row+1, FILL, AttachOptions (0));
|
||||
row++;
|
||||
}
|
||||
|
|
@ -701,6 +743,7 @@ EngineControl::backend_changed ()
|
|||
|
||||
if (!(backend = ARDOUR::AudioEngine::instance()->set_backend (backend_name, "ardour", ""))) {
|
||||
/* eh? setting the backend failed... how ? */
|
||||
/* A: stale config contains a backend that does not exist in current build */
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -758,6 +801,8 @@ EngineControl::backend_changed ()
|
|||
}
|
||||
}
|
||||
|
||||
connect_disconnect_button.hide();
|
||||
|
||||
midi_option_changed();
|
||||
|
||||
started_at_least_once = false;
|
||||
|
|
@ -770,6 +815,10 @@ EngineControl::backend_changed ()
|
|||
bool
|
||||
EngineControl::print_channel_count (Gtk::SpinButton* sb)
|
||||
{
|
||||
if (ARDOUR::Profile->get_mixbus()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t cnt = (uint32_t) sb->get_value();
|
||||
if (cnt == 0) {
|
||||
sb->set_text (_("all available channels"));
|
||||
|
|
@ -811,16 +860,23 @@ EngineControl::list_devices ()
|
|||
update_sensitivity ();
|
||||
|
||||
{
|
||||
string current_device;
|
||||
current_device = backend->device_name ();
|
||||
string current_device, found_device;
|
||||
current_device = device_combo.get_active_text ();
|
||||
if (current_device == "") {
|
||||
// device might not have been set yet
|
||||
current_device = device_combo.get_active_text ();
|
||||
if (current_device == "")
|
||||
// device has never been set, make sure it's not blank
|
||||
current_device = available_devices.front ();
|
||||
current_device = backend->device_name ();
|
||||
}
|
||||
|
||||
// Make sure that the active text is still relevant for this
|
||||
// device (it might only be relevant to the previous device!!)
|
||||
for (vector<string>::const_iterator i = available_devices.begin(); i != available_devices.end(); ++i) {
|
||||
if (*i == current_device)
|
||||
found_device = current_device;
|
||||
}
|
||||
if (found_device == "")
|
||||
// device has never been set (or was not relevant
|
||||
// for this backend) Let's make sure it's not blank
|
||||
current_device = available_devices.front ();
|
||||
|
||||
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
|
||||
set_popdown_strings (device_combo, available_devices);
|
||||
|
||||
|
|
@ -851,6 +907,13 @@ EngineControl::list_devices ()
|
|||
} else {
|
||||
ok_button->set_sensitive (true);
|
||||
apply_button->set_sensitive (true);
|
||||
if (backend->can_change_sample_rate_when_running() && sample_rate_combo.get_children().size() > 0) {
|
||||
sample_rate_combo.set_sensitive (true);
|
||||
}
|
||||
if (backend->can_change_buffer_size_when_running() && buffer_size_combo.get_children().size() > 0) {
|
||||
buffer_size_combo.set_sensitive (true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -878,6 +941,18 @@ EngineControl::device_changed ()
|
|||
string device_name = device_combo.get_active_text ();
|
||||
vector<string> s;
|
||||
|
||||
if (device_name != backend->device_name()) {
|
||||
/* we set the backend-device to query various device related intormation.
|
||||
* This has the side effect that backend->device_name() will match
|
||||
* the device_name and 'change_device' will never be true.
|
||||
* so work around this by setting...
|
||||
*/
|
||||
queue_device_changed = true;
|
||||
}
|
||||
|
||||
//the device name must be set FIRST so ASIO can populate buffersizes and the control panel button
|
||||
backend->set_device_name(device_name);
|
||||
|
||||
{
|
||||
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
|
||||
|
||||
|
|
@ -955,7 +1030,11 @@ EngineControl::device_changed ()
|
|||
buffer_size_combo.set_sensitive (true);
|
||||
set_popdown_strings (buffer_size_combo, s);
|
||||
|
||||
buffer_size_combo.set_active_text (bufsize_as_string (backend->default_buffer_size()));
|
||||
uint32_t period = backend->buffer_size();
|
||||
if (0 == period) {
|
||||
period = backend->default_buffer_size(device_name);
|
||||
}
|
||||
set_active_text_if_present (buffer_size_combo, bufsize_as_string (period));
|
||||
show_buffer_duration ();
|
||||
} else {
|
||||
buffer_size_combo.set_sensitive (false);
|
||||
|
|
@ -980,8 +1059,8 @@ EngineControl::bufsize_as_string (uint32_t sz)
|
|||
/* Translators: "samples" is always plural here, so no
|
||||
need for plural+singular forms.
|
||||
*/
|
||||
char buf[32];
|
||||
snprintf (buf, sizeof (buf), _("%u samples"), sz);
|
||||
char buf[64];
|
||||
snprintf (buf, sizeof (buf), "%u %s", sz, P_("sample", "samples", sz));
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
@ -993,9 +1072,6 @@ EngineControl::sample_rate_changed ()
|
|||
*/
|
||||
|
||||
show_buffer_duration ();
|
||||
if (!ignore_changes) {
|
||||
save_state ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1003,9 +1079,6 @@ void
|
|||
EngineControl::buffer_size_changed ()
|
||||
{
|
||||
show_buffer_duration ();
|
||||
if (!ignore_changes) {
|
||||
save_state ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1020,15 +1093,25 @@ EngineControl::show_buffer_duration ()
|
|||
uint32_t samples = atoi (bs_text); /* will ignore trailing text */
|
||||
uint32_t rate = get_rate();
|
||||
|
||||
/* Translators: "msecs" is ALWAYS plural here, so we do not
|
||||
need singular form as well.
|
||||
*/
|
||||
/* Developers: note the hard-coding of a double buffered model
|
||||
in the (2 * samples) computation of latency. we always start
|
||||
the audiobackend in this configuration.
|
||||
*/
|
||||
/* note to jack1 developers: ardour also always starts the engine
|
||||
* in async mode (no jack2 --sync option) which adds an extra cycle
|
||||
* of latency with jack2 (and *3 would be correct)
|
||||
* The value can also be wrong if jackd is started externally..
|
||||
*
|
||||
* At the time of writing the ALSA backend always uses double-buffering *2,
|
||||
* The Dummy backend *1, and who knows what ASIO really does :)
|
||||
*
|
||||
* So just display the period size, that's also what
|
||||
* ARDOUR_UI::update_sample_rate() does for the status bar.
|
||||
* (the statusbar calls AudioEngine::instance()->usecs_per_cycle()
|
||||
* but still, that's the buffer period, not [round-trip] latency)
|
||||
*/
|
||||
char buf[32];
|
||||
snprintf (buf, sizeof (buf), _("(%.1f msecs)"), (2 * samples) / (rate/1000.0));
|
||||
snprintf (buf, sizeof (buf), _("(%.1f ms)"), (samples / (rate/1000.0f)));
|
||||
buffer_size_duration_label.set_text (buf);
|
||||
}
|
||||
|
||||
|
|
@ -1069,18 +1152,11 @@ EngineControl::midi_option_changed ()
|
|||
} else {
|
||||
midi_devices_button.set_sensitive (true);
|
||||
}
|
||||
|
||||
if (!ignore_changes) {
|
||||
save_state ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EngineControl::parameter_changed ()
|
||||
{
|
||||
if (!ignore_changes) {
|
||||
save_state ();
|
||||
}
|
||||
}
|
||||
|
||||
EngineControl::State
|
||||
|
|
@ -1179,7 +1255,7 @@ EngineControl::maybe_display_saved_state ()
|
|||
if (!_desired_sample_rate) {
|
||||
sample_rate_combo.set_active_text (rate_as_string (state->sample_rate));
|
||||
}
|
||||
buffer_size_combo.set_active_text (bufsize_as_string (state->buffer_size));
|
||||
set_active_text_if_present (buffer_size_combo, bufsize_as_string (state->buffer_size));
|
||||
/* call this explicitly because we're ignoring changes to
|
||||
the controls at this point.
|
||||
*/
|
||||
|
|
@ -1392,16 +1468,15 @@ EngineControl::set_state (const XMLNode& root)
|
|||
for (StateList::const_iterator i = states.begin(); i != states.end(); ++i) {
|
||||
|
||||
if ((*i)->active) {
|
||||
ignore_changes++;
|
||||
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
|
||||
backend_combo.set_active_text ((*i)->backend);
|
||||
driver_combo.set_active_text ((*i)->driver);
|
||||
device_combo.set_active_text ((*i)->device);
|
||||
sample_rate_combo.set_active_text (rate_as_string ((*i)->sample_rate));
|
||||
buffer_size_combo.set_active_text (bufsize_as_string ((*i)->buffer_size));
|
||||
set_active_text_if_present (buffer_size_combo, bufsize_as_string ((*i)->buffer_size));
|
||||
input_latency.set_value ((*i)->input_latency);
|
||||
output_latency.set_value ((*i)->output_latency);
|
||||
midi_option_combo.set_active_text ((*i)->midi_option);
|
||||
ignore_changes--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1443,7 +1518,7 @@ EngineControl::push_state_to_backend (bool start)
|
|||
}
|
||||
}
|
||||
|
||||
if (get_device_name() != backend->device_name()) {
|
||||
if (queue_device_changed || get_device_name() != backend->device_name()) {
|
||||
change_device = true;
|
||||
}
|
||||
|
||||
|
|
@ -1512,6 +1587,8 @@ EngineControl::push_state_to_backend (bool start)
|
|||
}
|
||||
}
|
||||
|
||||
queue_device_changed = false;
|
||||
|
||||
if (!_have_control) {
|
||||
|
||||
/* We do not have control over the backend, so the best we can
|
||||
|
|
@ -1670,6 +1747,8 @@ EngineControl::post_push ()
|
|||
if (!state) {
|
||||
state = save_state ();
|
||||
assert (state);
|
||||
} else {
|
||||
store_state(state);
|
||||
}
|
||||
|
||||
/* all off */
|
||||
|
|
@ -1714,6 +1793,8 @@ EngineControl::get_buffer_size () const
|
|||
uint32_t samples;
|
||||
|
||||
if (sscanf (txt.c_str(), "%d", &samples) != 1) {
|
||||
fprintf(stderr, "Find a trout and repeatedly slap the nearest C++ who throws exceptions without catching them.\n");
|
||||
fprintf(stderr, "Ardour will likely crash now, giving you time to get the trout.\n");
|
||||
throw exception ();
|
||||
}
|
||||
|
||||
|
|
@ -1729,12 +1810,22 @@ EngineControl::get_midi_option () const
|
|||
uint32_t
|
||||
EngineControl::get_input_channels() const
|
||||
{
|
||||
if (ARDOUR::Profile->get_mixbus()) {
|
||||
boost::shared_ptr<ARDOUR::AudioBackend> backend = ARDOUR::AudioEngine::instance()->current_backend();
|
||||
if (!backend) return 0;
|
||||
return backend->input_channels();
|
||||
}
|
||||
return (uint32_t) input_channels_adjustment.get_value();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
EngineControl::get_output_channels() const
|
||||
{
|
||||
if (ARDOUR::Profile->get_mixbus()) {
|
||||
boost::shared_ptr<ARDOUR::AudioBackend> backend = ARDOUR::AudioEngine::instance()->current_backend();
|
||||
if (!backend) return 0;
|
||||
return backend->input_channels();
|
||||
}
|
||||
return (uint32_t) output_channels_adjustment.get_value();
|
||||
}
|
||||
|
||||
|
|
@ -1926,6 +2017,8 @@ EngineControl::check_audio_latency_measurement ()
|
|||
solid = false;
|
||||
}
|
||||
|
||||
lm_results.set_markup (string_compose (results_markup, buf));
|
||||
|
||||
if (solid) {
|
||||
have_lm_results = true;
|
||||
end_latency_detection ();
|
||||
|
|
@ -1933,8 +2026,6 @@ EngineControl::check_audio_latency_measurement ()
|
|||
return false;
|
||||
}
|
||||
|
||||
lm_results.set_markup (string_compose (results_markup, buf));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1986,6 +2077,7 @@ EngineControl::check_midi_latency_measurement ()
|
|||
have_lm_results = true;
|
||||
end_latency_detection ();
|
||||
lm_use_button.set_sensitive (true);
|
||||
lm_results.set_markup (string_compose (results_markup, buf));
|
||||
return false;
|
||||
} else if (mididm->processed () > 400) {
|
||||
have_lm_results = false;
|
||||
|
|
@ -2094,15 +2186,17 @@ EngineControl::engine_running ()
|
|||
boost::shared_ptr<ARDOUR::AudioBackend> backend = ARDOUR::AudioEngine::instance()->current_backend();
|
||||
assert (backend);
|
||||
|
||||
buffer_size_combo.set_active_text (bufsize_as_string (backend->buffer_size()));
|
||||
set_active_text_if_present (buffer_size_combo, bufsize_as_string (backend->buffer_size()));
|
||||
sample_rate_combo.set_active_text (rate_as_string (backend->sample_rate()));
|
||||
|
||||
buffer_size_combo.set_sensitive (true);
|
||||
sample_rate_combo.set_sensitive (true);
|
||||
|
||||
connect_disconnect_button.set_label (string_compose (_("Disconnect from %1"), backend->name()));
|
||||
connect_disconnect_button.show();
|
||||
|
||||
started_at_least_once = true;
|
||||
engine_status.set_markup(string_compose ("<span foreground=\"green\">%1</span>", _("Active")));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -2113,9 +2207,19 @@ EngineControl::engine_stopped ()
|
|||
|
||||
buffer_size_combo.set_sensitive (false);
|
||||
connect_disconnect_button.set_label (string_compose (_("Connect to %1"), backend->name()));
|
||||
connect_disconnect_button.show();
|
||||
|
||||
sample_rate_combo.set_sensitive (true);
|
||||
buffer_size_combo.set_sensitive (true);
|
||||
engine_status.set_markup(string_compose ("<span foreground=\"red\">%1</span>", _("Inactive")));
|
||||
}
|
||||
|
||||
void
|
||||
EngineControl::device_list_changed ()
|
||||
{
|
||||
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1); // ??
|
||||
list_devices ();
|
||||
midi_option_changed();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
|
|||
private:
|
||||
Gtk::Notebook notebook;
|
||||
|
||||
Gtk::Label engine_status;
|
||||
|
||||
/* core fields used by all backends */
|
||||
|
||||
Gtk::Table basic_packer;
|
||||
|
|
@ -117,6 +119,7 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
|
|||
uint32_t ignore_changes;
|
||||
uint32_t _desired_sample_rate;
|
||||
bool started_at_least_once;
|
||||
bool queue_device_changed;
|
||||
|
||||
void driver_changed ();
|
||||
void backend_changed ();
|
||||
|
|
@ -245,8 +248,11 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
|
|||
|
||||
void engine_running ();
|
||||
void engine_stopped ();
|
||||
void device_list_changed ();
|
||||
|
||||
PBD::ScopedConnection running_connection;
|
||||
PBD::ScopedConnection stopped_connection;
|
||||
PBD::ScopedConnectionList stopped_connection;
|
||||
PBD::ScopedConnection devicelist_connection;
|
||||
|
||||
void connect_disconnect_click ();
|
||||
void calibrate_audio_latency ();
|
||||
|
|
|
|||
|
|
@ -179,16 +179,21 @@ PortExportChannelSelector::ChannelTreeView::ChannelTreeView (uint32_t max_channe
|
|||
|
||||
/* Add column with toggle and text */
|
||||
|
||||
append_column_editable (_("Bus or Track"), route_cols.selected);
|
||||
append_column_editable (_("Export"), route_cols.selected);
|
||||
|
||||
Gtk::CellRendererText* text_renderer = Gtk::manage (new Gtk::CellRendererText);
|
||||
text_renderer->property_editable() = false;
|
||||
text_renderer->set_alignment (0.0, 0.5);
|
||||
|
||||
Gtk::TreeView::Column* column = get_column (0);
|
||||
Gtk::TreeView::Column* column = Gtk::manage (new Gtk::TreeView::Column);
|
||||
column->set_title (_("Bus or Track"));
|
||||
column->pack_start (*text_renderer);
|
||||
column->set_expand (true);
|
||||
column->add_attribute (text_renderer->property_text(), route_cols.name);
|
||||
append_column (*column);
|
||||
|
||||
Gtk::CellRendererToggle *toggle = dynamic_cast<Gtk::CellRendererToggle *>(get_column_cell_renderer (0));
|
||||
toggle->set_alignment (0.0, 0.5);
|
||||
toggle->signal_toggled().connect (sigc::mem_fun (*this, &PortExportChannelSelector::ChannelTreeView::update_toggle_selection));
|
||||
|
||||
static_columns = get_columns().size();
|
||||
|
|
@ -315,6 +320,7 @@ PortExportChannelSelector::ChannelTreeView::set_channel_count (uint32_t channels
|
|||
|
||||
Gtk::CellRendererCombo* combo_renderer = Gtk::manage (new Gtk::CellRendererCombo);
|
||||
combo_renderer->property_text_column() = 2;
|
||||
combo_renderer->property_has_entry() = false;
|
||||
column->pack_start (*combo_renderer);
|
||||
|
||||
append_column (*column);
|
||||
|
|
@ -551,18 +557,25 @@ TrackExportChannelSelector::TrackExportChannelSelector (ARDOUR::Session * sessio
|
|||
|
||||
// Track list
|
||||
track_list = Gtk::ListStore::create (track_cols);
|
||||
track_list->set_sort_column (track_cols.order_key, Gtk::SORT_ASCENDING);
|
||||
track_view.set_model (track_list);
|
||||
track_view.set_headers_visible (true);
|
||||
|
||||
track_view.append_column_editable (_("Track"), track_cols.selected);
|
||||
track_view.append_column_editable (_("Export"), track_cols.selected);
|
||||
Gtk::CellRendererToggle *toggle = dynamic_cast<Gtk::CellRendererToggle *>(track_view.get_column_cell_renderer (0));
|
||||
toggle->set_alignment (0.0, 0.5);
|
||||
|
||||
toggle->signal_toggled().connect (sigc::hide (sigc::mem_fun (*this, &TrackExportChannelSelector::update_config)));
|
||||
|
||||
Gtk::CellRendererText* text_renderer = Gtk::manage (new Gtk::CellRendererText);
|
||||
text_renderer->property_editable() = false;
|
||||
text_renderer->set_alignment (0.0, 0.5);
|
||||
|
||||
Gtk::TreeView::Column* column = track_view.get_column (0);
|
||||
column->pack_start (*text_renderer);
|
||||
Gtk::TreeView::Column* column = Gtk::manage (new Gtk::TreeView::Column);
|
||||
column->set_title (_("Track name"));
|
||||
|
||||
track_view.append_column (*column);
|
||||
column->pack_start (*text_renderer, false);
|
||||
column->add_attribute (text_renderer->property_text(), track_cols.label);
|
||||
|
||||
fill_list();
|
||||
|
|
@ -609,6 +622,7 @@ TrackExportChannelSelector::add_track (boost::shared_ptr<Route> route)
|
|||
row[track_cols.selected] = true;
|
||||
row[track_cols.label] = route->name();
|
||||
row[track_cols.route] = route;
|
||||
row[track_cols.order_key] = route->order_key();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -241,7 +241,6 @@ class TrackExportChannelSelector : public ExportChannelSelector
|
|||
void fill_list();
|
||||
void add_track (boost::shared_ptr<ARDOUR::Route> route);
|
||||
void update_config();
|
||||
|
||||
ChannelConfigList configs;
|
||||
|
||||
Gtk::VBox main_layout;
|
||||
|
|
@ -252,8 +251,9 @@ class TrackExportChannelSelector : public ExportChannelSelector
|
|||
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
|
||||
Gtk::TreeModelColumn<std::string> label;
|
||||
Gtk::TreeModelColumn<bool> selected;
|
||||
Gtk::TreeModelColumn<uint32_t> order_key;
|
||||
|
||||
TrackCols () { add (route); add(label); add(selected); }
|
||||
TrackCols () { add (route); add(label); add(selected); add(order_key); }
|
||||
};
|
||||
TrackCols track_cols;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/convert.h"
|
||||
#include "gtkmm2ext/keyboard.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
#include "ardour/session_directory.h"
|
||||
#include "ardour/profile.h"
|
||||
|
|
@ -56,22 +57,35 @@
|
|||
#include "utils_videotl.h"
|
||||
#include "i18n.h"
|
||||
|
||||
#ifdef COMPILER_MSVC
|
||||
#define rintf(x) round((x) + 0.5)
|
||||
#endif
|
||||
|
||||
using namespace Gtk;
|
||||
using namespace std;
|
||||
using namespace PBD;
|
||||
using namespace ARDOUR;
|
||||
using namespace VideoUtils;
|
||||
|
||||
ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range)
|
||||
ExportVideoDialog::ExportVideoDialog ()
|
||||
: ArdourDialog (_("Export Video File "))
|
||||
, export_range (tme)
|
||||
, _aborted(false)
|
||||
, _twopass(false)
|
||||
, _firstpass(false)
|
||||
, _normalize(false)
|
||||
, _previous_progress(0)
|
||||
, _transcoder(0)
|
||||
, _video_source_aspect_ratio(-1)
|
||||
, _suspend_signals(false)
|
||||
, outfn_path_label (_("File:"), Gtk::ALIGN_LEFT)
|
||||
, outfn_browse_button (_("Browse"))
|
||||
, invid_path_label (_("Video:"), Gtk::ALIGN_LEFT)
|
||||
, invid_browse_button (_("Browse"))
|
||||
, transcode_button (_("Export"))
|
||||
, abort_button (_("Abort"))
|
||||
, progress_box (0)
|
||||
, scale_checkbox (_("Scale Video (W x H):"))
|
||||
, scale_aspect (_("Retain Aspect"))
|
||||
, width_adjustment (768, 128, 1920, 1, 16, 0)
|
||||
, width_spinner (width_adjustment)
|
||||
, height_adjustment (576, 128, 1920, 1, 16, 0)
|
||||
|
|
@ -89,8 +103,6 @@ ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range
|
|||
, debug_checkbox (_("Debug Mode: Print ffmpeg command and output to stdout."))
|
||||
#endif
|
||||
{
|
||||
set_session (s);
|
||||
|
||||
set_name ("ExportVideoDialog");
|
||||
set_modal (true);
|
||||
set_skip_taskbar_hint (true);
|
||||
|
|
@ -102,19 +114,20 @@ ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range
|
|||
HBox* path_hbox;
|
||||
|
||||
/* check if ffmpeg can be found */
|
||||
transcoder = new TranscodeFfmpeg("");
|
||||
if (!transcoder->ffexec_ok()) {
|
||||
_transcoder = new TranscodeFfmpeg(X_(""));
|
||||
if (!_transcoder->ffexec_ok()) {
|
||||
l = manage (new Label (_("No ffprobe or ffmpeg executables could be found on this system. Video Export is not possible until you install those tools. See the Log window for more information."), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||
l->set_line_wrap();
|
||||
vbox->pack_start (*l, false, false, 8);
|
||||
get_vbox()->pack_start (*vbox, false, false);
|
||||
add_button (Stock::OK, RESPONSE_CANCEL);
|
||||
show_all_children ();
|
||||
delete _transcoder; _transcoder = 0;
|
||||
return;
|
||||
}
|
||||
delete transcoder; transcoder = 0;
|
||||
delete _transcoder; _transcoder = 0;
|
||||
|
||||
l = manage (new Label (_("<b>Output:</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||
l = manage (new Label (_("<b>Output:</b> (file extension defines format)"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||
l->set_use_markup ();
|
||||
vbox->pack_start (*l, false, false, 4);
|
||||
|
||||
|
|
@ -124,7 +137,7 @@ ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range
|
|||
path_hbox->pack_start (outfn_browse_button, false, false, 3);
|
||||
vbox->pack_start (*path_hbox, false, false, 2);
|
||||
|
||||
l = manage (new Label (_("<b>Input:</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||
l = manage (new Label (_("<b>Input Video:</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||
l->set_use_markup ();
|
||||
vbox->pack_start (*l, false, false, 4);
|
||||
|
||||
|
|
@ -143,53 +156,7 @@ ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range
|
|||
|
||||
insnd_combo.set_name ("PaddedButton");
|
||||
insnd_combo.append_text (string_compose (_("from the %1 session's start to the session's end"), PROGRAM_NAME));
|
||||
|
||||
frameoffset_t av_offset = ARDOUR_UI::instance()->video_timeline->get_offset();
|
||||
if (av_offset < 0 ) {
|
||||
insnd_combo.append_text (_("from 00:00:00:00 to the video's end"));
|
||||
} else {
|
||||
insnd_combo.append_text (_("from the video's start to the video's end"));
|
||||
}
|
||||
if (!export_range.empty()) {
|
||||
insnd_combo.append_text (_("Selected range")); // TODO show export_range.start() -> export_range.end_frame()
|
||||
}
|
||||
if (range) {
|
||||
insnd_combo.set_active(2);
|
||||
} else {
|
||||
insnd_combo.set_active(0);
|
||||
}
|
||||
|
||||
outfn_path_entry.set_width_chars(38);
|
||||
outfn_path_entry.set_text (_session->session_directory().export_path() + G_DIR_SEPARATOR +"export.avi");
|
||||
|
||||
XMLNode* node = _session->extra_xml (X_("Videotimeline"));
|
||||
if (node) {
|
||||
bool filenameset = false;
|
||||
if (node->property(X_("OriginalVideoFile"))) {
|
||||
std::string filename = node->property(X_("OriginalVideoFile"))->value();
|
||||
if (Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) {
|
||||
invid_path_entry.set_text (filename);
|
||||
filenameset = true;
|
||||
}
|
||||
}
|
||||
if (!filenameset
|
||||
&& node->property(X_("Filename"))
|
||||
&& node->property(X_("LocalFile"))
|
||||
&& node->property(X_("LocalFile"))->value() == X_("1")
|
||||
) {
|
||||
std::string filename = node->property(X_("Filename"))->value();
|
||||
if (filename.at(0) != G_DIR_SEPARATOR) {
|
||||
filename = Glib::build_filename (_session->session_directory().video_path(), filename);
|
||||
}
|
||||
if (Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) {
|
||||
invid_path_entry.set_text (filename);
|
||||
filenameset = true;
|
||||
}
|
||||
}
|
||||
if (!filenameset) {
|
||||
invid_path_entry.set_text (X_(""));
|
||||
}
|
||||
}
|
||||
|
||||
l = manage (new Label (_("<b>Settings:</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||
l->set_use_markup ();
|
||||
|
|
@ -221,7 +188,8 @@ ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range
|
|||
t->attach (*l, 0, 1, ty, ty+1);
|
||||
t->attach (audio_samplerate_combo, 1, 2, ty, ty+1);
|
||||
t->attach (normalize_checkbox, 2, 4, ty, ty+1); ty++;
|
||||
t->attach (scale_checkbox, 0, 2, ty, ty+1);
|
||||
t->attach (scale_checkbox, 0, 1, ty, ty+1);
|
||||
t->attach (scale_aspect, 1, 2, ty, ty+1);
|
||||
t->attach (width_spinner, 2, 3, ty, ty+1);
|
||||
t->attach (height_spinner, 3, 4, ty, ty+1); ty++;
|
||||
t->attach (fps_checkbox, 0, 3, ty, ty+1);
|
||||
|
|
@ -245,20 +213,22 @@ ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range
|
|||
preset_combo.append_text("dvd-PAL");
|
||||
preset_combo.append_text("flv");
|
||||
preset_combo.append_text("mpeg4");
|
||||
preset_combo.append_text("mp4/h264/aac");
|
||||
preset_combo.append_text("ogg");
|
||||
preset_combo.append_text("webm");
|
||||
preset_combo.append_text("you-tube");
|
||||
preset_combo.set_active(0);
|
||||
|
||||
audio_codec_combo.set_name ("PaddedButton");
|
||||
audio_codec_combo.append_text(_("(default for format)"));
|
||||
audio_codec_combo.append_text("ac3");
|
||||
audio_codec_combo.append_text("aac");
|
||||
audio_codec_combo.append_text("libmp3lame");
|
||||
audio_codec_combo.append_text("libvorbis");
|
||||
audio_codec_combo.append_text("mp2");
|
||||
audio_codec_combo.append_text("pcm_s16le");
|
||||
audio_codec_combo.set_active(2);
|
||||
|
||||
video_codec_combo.set_name ("PaddedButton");
|
||||
video_codec_combo.append_text(_("(default for format)"));
|
||||
video_codec_combo.append_text("flv");
|
||||
video_codec_combo.append_text("libtheora");
|
||||
video_codec_combo.append_text("mjpeg");
|
||||
|
|
@ -267,30 +237,28 @@ ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range
|
|||
video_codec_combo.append_text("h264");
|
||||
video_codec_combo.append_text("vpx (webm)");
|
||||
video_codec_combo.append_text("copy");
|
||||
video_codec_combo.set_active(4);
|
||||
|
||||
audio_bitrate_combo.set_name ("PaddedButton");
|
||||
audio_bitrate_combo.append_text(_("(default)"));
|
||||
audio_bitrate_combo.append_text("64k");
|
||||
audio_bitrate_combo.append_text("128k");
|
||||
audio_bitrate_combo.append_text("192k");
|
||||
audio_bitrate_combo.append_text("256k");
|
||||
audio_bitrate_combo.append_text("320k");
|
||||
audio_bitrate_combo.set_active(2);
|
||||
|
||||
audio_samplerate_combo.set_name ("PaddedButton");
|
||||
audio_samplerate_combo.append_text("22050");
|
||||
audio_samplerate_combo.append_text("44100");
|
||||
audio_samplerate_combo.append_text("48000");
|
||||
audio_samplerate_combo.set_active(2);
|
||||
|
||||
video_bitrate_combo.set_name ("PaddedButton");
|
||||
video_bitrate_combo.append_text(_("(default)"));
|
||||
video_bitrate_combo.append_text(_("(retain)"));
|
||||
video_bitrate_combo.append_text("200k");
|
||||
video_bitrate_combo.append_text("800k");
|
||||
video_bitrate_combo.append_text("2000k");
|
||||
video_bitrate_combo.append_text("5000k");
|
||||
video_bitrate_combo.append_text("8000k");
|
||||
video_bitrate_combo.append_text("retain");
|
||||
video_bitrate_combo.set_active(3);
|
||||
|
||||
fps_combo.set_name ("PaddedButton");
|
||||
fps_combo.append_text("23.976");
|
||||
|
|
@ -301,27 +269,10 @@ ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range
|
|||
fps_combo.append_text("30");
|
||||
fps_combo.append_text("59.94");
|
||||
fps_combo.append_text("60");
|
||||
float tcfps = _session->timecode_frames_per_second();
|
||||
if (fabs(tcfps - 23.976) < 0.01) { fps_combo.set_active(0); }
|
||||
else if (fabs(tcfps - 24.0 ) < 0.01) { fps_combo.set_active(1); }
|
||||
else if (fabs(tcfps - 24.976) < 0.01) { fps_combo.set_active(2); }
|
||||
else if (fabs(tcfps - 25.0 ) < 0.01) { fps_combo.set_active(3); }
|
||||
else if (fabs(tcfps - 29.97 ) < 0.01) { fps_combo.set_active(4); }
|
||||
else if (fabs(tcfps - 30.0 ) < 0.01) { fps_combo.set_active(5); }
|
||||
else if (fabs(tcfps - 59.94 ) < 0.01) { fps_combo.set_active(6); }
|
||||
else if (fabs(tcfps - 60.0 ) < 0.01) { fps_combo.set_active(7); }
|
||||
else { fps_combo.set_active(5); }
|
||||
|
||||
aspect_combo.set_name ("PaddedButton");
|
||||
aspect_combo.append_text("4:3");
|
||||
aspect_combo.append_text("16:9");
|
||||
aspect_combo.set_active(1);
|
||||
|
||||
optimizations_checkbox.set_sensitive(false);
|
||||
scale_checkbox_toggled();
|
||||
aspect_checkbox_toggled();
|
||||
fps_checkbox_toggled();
|
||||
video_codec_combo_changed();
|
||||
|
||||
vbox->pack_start (*options_box, false, true, 4);
|
||||
get_vbox()->set_spacing (4);
|
||||
|
|
@ -342,6 +293,10 @@ ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range
|
|||
transcode_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportVideoDialog::launch_export));
|
||||
abort_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportVideoDialog::abort_clicked));
|
||||
|
||||
invid_path_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportVideoDialog::set_original_file_information));
|
||||
width_spinner.signal_value_changed().connect (sigc::mem_fun (*this, &ExportVideoDialog::width_value_changed));
|
||||
height_spinner.signal_value_changed().connect (sigc::mem_fun (*this, &ExportVideoDialog::height_value_changed));
|
||||
|
||||
cancel_button = add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||
get_action_area()->pack_start (transcode_button, false, false);
|
||||
show_all_children ();
|
||||
|
|
@ -350,7 +305,229 @@ ExportVideoDialog::ExportVideoDialog (Session* s, TimeSelection &tme, bool range
|
|||
|
||||
ExportVideoDialog::~ExportVideoDialog ()
|
||||
{
|
||||
if (transcoder) { delete transcoder; transcoder = 0;}
|
||||
if (_transcoder) { delete _transcoder; _transcoder = 0;}
|
||||
}
|
||||
|
||||
void
|
||||
ExportVideoDialog::set_original_file_information()
|
||||
{
|
||||
assert(_transcoder == 0);
|
||||
std::string infile = invid_path_entry.get_text();
|
||||
|
||||
if (scale_checkbox.get_active()) {
|
||||
// user may have set custom values already, don't touch.
|
||||
return;
|
||||
}
|
||||
if (infile == "" || !Glib::file_test(infile, Glib::FILE_TEST_EXISTS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
_transcoder = new TranscodeFfmpeg(infile);
|
||||
if (_transcoder->probe_ok()) {
|
||||
_video_source_aspect_ratio = -1;
|
||||
width_spinner.set_value(_transcoder->get_width());
|
||||
height_spinner.set_value(_transcoder->get_height());
|
||||
_video_source_aspect_ratio = _transcoder->get_aspect();
|
||||
}
|
||||
|
||||
delete _transcoder; _transcoder = 0;
|
||||
}
|
||||
void
|
||||
ExportVideoDialog::apply_state (TimeSelection &tme, bool range)
|
||||
{
|
||||
_suspend_dirty = true; // TODO really just queue 'dirty' and mark session dirty on "Export"
|
||||
|
||||
export_range = tme;
|
||||
_video_source_aspect_ratio = -1;
|
||||
|
||||
outfn_path_entry.set_text (_session->session_directory().export_path() + G_DIR_SEPARATOR +"export.avi");
|
||||
|
||||
// TODO remember setting for export-range.. somehow, (let explicit range override)
|
||||
frameoffset_t av_offset = ARDOUR_UI::instance()->video_timeline->get_offset();
|
||||
if (av_offset < 0 ) {
|
||||
insnd_combo.append_text (_("from 00:00:00:00 to the video's end"));
|
||||
} else {
|
||||
insnd_combo.append_text (_("from the video's start to the video's end"));
|
||||
}
|
||||
if (!export_range.empty()) {
|
||||
insnd_combo.append_text (_("Selected range")); // TODO show export_range.start() -> export_range.end_frame()
|
||||
}
|
||||
if (range) {
|
||||
insnd_combo.set_active(2);
|
||||
} else {
|
||||
insnd_combo.set_active(0);
|
||||
}
|
||||
|
||||
preset_combo.set_active(0);
|
||||
audio_codec_combo.set_active(0);
|
||||
video_codec_combo.set_active(0);
|
||||
audio_bitrate_combo.set_active(0);
|
||||
audio_samplerate_combo.set_active(2);
|
||||
video_bitrate_combo.set_active(0);
|
||||
aspect_combo.set_active(1);
|
||||
|
||||
scale_checkbox.set_active(false);
|
||||
scale_aspect.set_active(true);
|
||||
aspect_checkbox.set_active(false);
|
||||
normalize_checkbox.set_active(false);
|
||||
twopass_checkbox.set_active(false);
|
||||
optimizations_checkbox.set_active(false);
|
||||
deinterlace_checkbox.set_active(false);
|
||||
bframes_checkbox.set_active(false);
|
||||
fps_checkbox.set_active(false);
|
||||
meta_checkbox.set_active(false);
|
||||
|
||||
float tcfps = _session->timecode_frames_per_second();
|
||||
|
||||
LocaleGuard lg (X_("C"));
|
||||
|
||||
XMLNode* node = _session->extra_xml (X_("Videotimeline"));
|
||||
bool filenameset = false;
|
||||
if (node) {
|
||||
if (node->property(X_("OriginalVideoFile"))) {
|
||||
std::string filename = node->property(X_("OriginalVideoFile"))->value();
|
||||
if (Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) {
|
||||
invid_path_entry.set_text (filename);
|
||||
filenameset = true;
|
||||
}
|
||||
}
|
||||
if (!filenameset
|
||||
&& node->property(X_("Filename"))
|
||||
&& node->property(X_("LocalFile"))
|
||||
&& node->property(X_("LocalFile"))->value() == X_("1")
|
||||
)
|
||||
{
|
||||
std::string filename = node->property(X_("Filename"))->value();
|
||||
if (filename.at(0) != G_DIR_SEPARATOR)
|
||||
{
|
||||
filename = Glib::build_filename (_session->session_directory().video_path(), filename);
|
||||
}
|
||||
if (Glib::file_test(filename, Glib::FILE_TEST_EXISTS))
|
||||
{
|
||||
invid_path_entry.set_text (filename);
|
||||
filenameset = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!filenameset) {
|
||||
invid_path_entry.set_text (X_(""));
|
||||
}
|
||||
|
||||
node = _session->extra_xml (X_("Videoexport"));
|
||||
if (node) {
|
||||
const XMLProperty* prop;
|
||||
prop = node->property (X_("ChangeGeometry"));
|
||||
if (prop) { scale_checkbox.set_active(atoi(prop->value())?true:false); }
|
||||
prop = node->property (X_("KeepAspect"));
|
||||
if (prop) { scale_aspect.set_active(atoi(prop->value())?true:false); }
|
||||
prop = node->property (X_("ChangeAspect"));
|
||||
if (prop) { aspect_checkbox.set_active(atoi(prop->value())?true:false); }
|
||||
prop = node->property (X_("NormalizeAudio"));
|
||||
if (prop) { normalize_checkbox.set_active(atoi(prop->value())?true:false); }
|
||||
prop = node->property (X_("TwoPassEncode"));
|
||||
if (prop) { twopass_checkbox.set_active(atoi(prop->value())?true:false); }
|
||||
prop = node->property (X_("CodecOptimzations"));
|
||||
if (prop) { optimizations_checkbox.set_active(atoi(prop->value())?true:false); }
|
||||
prop = node->property (X_("Deinterlace"));
|
||||
if (prop) { deinterlace_checkbox.set_active(atoi(prop->value())?true:false); }
|
||||
prop = node->property (X_("BFrames"));
|
||||
if (prop) { bframes_checkbox.set_active(atoi(prop->value())?true:false); }
|
||||
prop = node->property (X_("ChangeFPS"));
|
||||
if (prop) { fps_checkbox.set_active(atoi(prop->value())?true:false); }
|
||||
prop = node->property (X_("Metadata"));
|
||||
if (prop) { meta_checkbox.set_active(atoi(prop->value())?true:false); }
|
||||
|
||||
prop = node->property (X_("Format"));
|
||||
if (prop && !prop->value().empty()) { change_file_extension( "." + prop->value()); }
|
||||
|
||||
_suspend_signals = true;
|
||||
prop = node->property (X_("Width"));
|
||||
if (prop) { width_spinner.set_value(atoi(prop->value())); }
|
||||
prop = node->property (X_("Height"));
|
||||
if (prop) { height_spinner.set_value(atoi(prop->value())); }
|
||||
_suspend_signals = false;
|
||||
|
||||
prop = node->property (X_("FPS"));
|
||||
if (prop && fps_checkbox.get_active()) { tcfps = atof(prop->value()); }
|
||||
|
||||
prop = node->property (X_("Preset"));
|
||||
if (prop) { preset_combo.set_active_text(prop->value()); }
|
||||
prop = node->property (X_("VCodec"));
|
||||
if (prop) { video_codec_combo.set_active_text(prop->value()); }
|
||||
prop = node->property (X_("ACodec"));
|
||||
if (prop) { audio_codec_combo.set_active_text(prop->value()); }
|
||||
prop = node->property (X_("VBitrate"));
|
||||
if (prop) { video_bitrate_combo.set_active_text(prop->value()); }
|
||||
prop = node->property (X_("ABitrate"));
|
||||
if (prop) { audio_bitrate_combo.set_active_text(prop->value()); }
|
||||
prop = node->property (X_("AspectRatio"));
|
||||
if (prop) { aspect_combo.set_active_text(prop->value()); }
|
||||
prop = node->property (X_("SampleRate"));
|
||||
if (prop) { audio_samplerate_combo.set_active_text(prop->value()); }
|
||||
}
|
||||
|
||||
if (fabs(tcfps - 23.976) < 0.01) { fps_combo.set_active(0); }
|
||||
else if (fabs(tcfps - 24.0 ) < 0.01) { fps_combo.set_active(1); }
|
||||
else if (fabs(tcfps - 24.976) < 0.01) { fps_combo.set_active(2); }
|
||||
else if (fabs(tcfps - 25.0 ) < 0.01) { fps_combo.set_active(3); }
|
||||
else if (fabs(tcfps - 29.97 ) < 0.01) { fps_combo.set_active(4); }
|
||||
else if (fabs(tcfps - 30.0 ) < 0.01) { fps_combo.set_active(5); }
|
||||
else if (fabs(tcfps - 59.94 ) < 0.01) { fps_combo.set_active(6); }
|
||||
else if (fabs(tcfps - 60.0 ) < 0.01) { fps_combo.set_active(7); }
|
||||
else { fps_combo.set_active(5); }
|
||||
|
||||
set_original_file_information();
|
||||
|
||||
/* update sensitivity */
|
||||
scale_checkbox_toggled();
|
||||
aspect_checkbox_toggled();
|
||||
fps_checkbox_toggled();
|
||||
video_codec_combo_changed();
|
||||
|
||||
_suspend_dirty = false;
|
||||
|
||||
show_all_children ();
|
||||
if (progress_box) {
|
||||
progress_box->hide();
|
||||
}
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
ExportVideoDialog::get_state ()
|
||||
{
|
||||
LocaleGuard lg (X_("C"));
|
||||
XMLNode* node = new XMLNode (X_("Videoexport"));
|
||||
node->add_property (X_("ChangeGeometry"), scale_checkbox.get_active() ? X_("1") : X_("0"));
|
||||
node->add_property (X_("KeepAspect"), scale_aspect.get_active() ? X_("1") : X_("0"));
|
||||
node->add_property (X_("ChangeAspect"), aspect_checkbox.get_active() ? X_("1") : X_("0"));
|
||||
node->add_property (X_("NormalizeAudio"), normalize_checkbox.get_active() ? X_("1") : X_("0"));
|
||||
node->add_property (X_("TwoPassEncode"), twopass_checkbox.get_active() ? X_("1") : X_("0"));
|
||||
node->add_property (X_("CodecOptimzations"), optimizations_checkbox.get_active() ? X_("1") : X_("0"));
|
||||
node->add_property (X_("Deinterlace"), deinterlace_checkbox.get_active() ? X_("1") : X_("0"));
|
||||
node->add_property (X_("BFrames"), bframes_checkbox.get_active() ? X_("1") : X_("0"));
|
||||
node->add_property (X_("ChangeFPS"), fps_checkbox.get_active() ? X_("1") : X_("0"));
|
||||
node->add_property (X_("Metadata"), meta_checkbox.get_active() ? X_("1") : X_("0"));
|
||||
|
||||
node->add_property (X_("Format"), get_file_extension(outfn_path_entry.get_text()));
|
||||
|
||||
node->add_property (X_("Width"), width_spinner.get_value());
|
||||
node->add_property (X_("Height"), height_spinner.get_value());
|
||||
|
||||
node->add_property (X_("Preset"), preset_combo.get_active_text());
|
||||
node->add_property (X_("VCodec"), video_codec_combo.get_active_text());
|
||||
node->add_property (X_("ACodec"), audio_codec_combo.get_active_text());
|
||||
node->add_property (X_("VBitrate"), video_bitrate_combo.get_active_text());
|
||||
node->add_property (X_("ABitrate"), audio_bitrate_combo.get_active_text());
|
||||
node->add_property (X_("AspectRatio"), aspect_combo.get_active_text());
|
||||
node->add_property (X_("SampleRate"), audio_samplerate_combo.get_active_text());
|
||||
node->add_property (X_("FPS"), fps_combo.get_active_text());
|
||||
|
||||
return *node;
|
||||
}
|
||||
|
||||
void
|
||||
ExportVideoDialog::set_state (const XMLNode &)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -362,9 +539,9 @@ ExportVideoDialog::on_show ()
|
|||
void
|
||||
ExportVideoDialog::abort_clicked ()
|
||||
{
|
||||
aborted = true;
|
||||
if (transcoder) {
|
||||
transcoder->cancel();
|
||||
_aborted = true;
|
||||
if (_transcoder) {
|
||||
_transcoder->cancel();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -376,10 +553,10 @@ ExportVideoDialog::update_progress (framecnt_t c, framecnt_t a)
|
|||
pbar.pulse();
|
||||
} else {
|
||||
double progress = (double)c / (double) a;
|
||||
progress = progress / ((twopass ? 2.0 : 1.0) + (normalize ? 2.0 : 1.0));
|
||||
if (normalize && twopass) progress += (firstpass ? .5 : .75);
|
||||
else if (normalize) progress += 2.0/3.0;
|
||||
else if (twopass) progress += (firstpass ? 1.0/3.0 : 2.0/3.0);
|
||||
progress = progress / ((_twopass ? 2.0 : 1.0) + (_normalize ? 2.0 : 1.0));
|
||||
if (_normalize && _twopass) progress += (_firstpass ? .5 : .75);
|
||||
else if (_normalize) progress += 2.0/3.0;
|
||||
else if (_twopass) progress += (_firstpass ? 1.0/3.0 : 2.0/3.0);
|
||||
else progress += .5;
|
||||
|
||||
pbar.set_fraction (progress);
|
||||
|
|
@ -395,18 +572,18 @@ ExportVideoDialog::audio_progress_display ()
|
|||
if (status->normalizing) {
|
||||
pbar.set_text (_("Normalizing audio"));
|
||||
progress = ((float) status->current_normalize_cycle) / status->total_normalize_cycles;
|
||||
progress = progress / (twopass ? 4.0 : 3.0) + (twopass ? .25 : 1.0/3.0);
|
||||
progress = progress / (_twopass ? 4.0 : 3.0) + (_twopass ? .25 : 1.0/3.0);
|
||||
} else {
|
||||
pbar.set_text (_("Exporting audio"));
|
||||
progress = ((float) status->processed_frames_current_timespan) / status->total_frames_current_timespan;
|
||||
progress = progress / ((twopass ? 2.0 : 1.0) + (normalize ? 2.0 : 1.0));
|
||||
progress = progress / ((_twopass ? 2.0 : 1.0) + (_normalize ? 2.0 : 1.0));
|
||||
}
|
||||
if (progress < previous_progress) {
|
||||
if (progress < _previous_progress) {
|
||||
// Work around gtk bug
|
||||
pbar.hide();
|
||||
pbar.show();
|
||||
}
|
||||
previous_progress = progress;
|
||||
_previous_progress = progress;
|
||||
pbar.set_fraction (progress);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -414,13 +591,14 @@ ExportVideoDialog::audio_progress_display ()
|
|||
void
|
||||
ExportVideoDialog::finished ()
|
||||
{
|
||||
if (aborted) {
|
||||
if (_aborted) {
|
||||
::g_unlink(outfn_path_entry.get_text().c_str());
|
||||
::g_unlink (insnd.c_str());
|
||||
::g_unlink (_insnd.c_str());
|
||||
delete _transcoder; _transcoder = 0;
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
} else if (twopass && firstpass) {
|
||||
firstpass = false;
|
||||
if (transcoder) { delete transcoder; transcoder = 0;}
|
||||
} else if (_twopass && _firstpass) {
|
||||
_firstpass = false;
|
||||
if (_transcoder) { delete _transcoder; _transcoder = 0;}
|
||||
encode_pass(2);
|
||||
} else {
|
||||
if (twopass_checkbox.get_active()) {
|
||||
|
|
@ -428,7 +606,8 @@ ExportVideoDialog::finished ()
|
|||
std::string p2log = Glib::path_get_dirname (outfn) + G_DIR_SEPARATOR + "ffmpeg2pass";
|
||||
::g_unlink (p2log.c_str());
|
||||
}
|
||||
::g_unlink (insnd.c_str());
|
||||
::g_unlink (_insnd.c_str());
|
||||
delete _transcoder; _transcoder = 0;
|
||||
Gtk::Dialog::response(RESPONSE_ACCEPT);
|
||||
}
|
||||
}
|
||||
|
|
@ -436,6 +615,13 @@ ExportVideoDialog::finished ()
|
|||
void
|
||||
ExportVideoDialog::launch_export ()
|
||||
{
|
||||
/* remember current settings.
|
||||
* needed because apply_state() acts on both:
|
||||
* "Videotimeline" and "Video Export" extra XML
|
||||
* as well as current _session settings
|
||||
*/
|
||||
_session->add_extra_xml (get_state());
|
||||
|
||||
std::string outfn = outfn_path_entry.get_text();
|
||||
if (!confirm_video_outfn(outfn)) { return; }
|
||||
|
||||
|
|
@ -445,10 +631,10 @@ ExportVideoDialog::launch_export ()
|
|||
pbar.set_size_request(300,-1);
|
||||
pbar.set_text(_("Exporting Audio..."));
|
||||
progress_box->show();
|
||||
aborted = false;
|
||||
twopass = twopass_checkbox.get_active();
|
||||
firstpass = true;
|
||||
normalize = normalize_checkbox.get_active();
|
||||
_aborted = false;
|
||||
_twopass = twopass_checkbox.get_active();
|
||||
_firstpass = true;
|
||||
_normalize = normalize_checkbox.get_active();
|
||||
|
||||
/* export audio track */
|
||||
ExportTimespanPtr tsp = _session->get_export_handler()->add_timespan();
|
||||
|
|
@ -457,7 +643,7 @@ ExportVideoDialog::launch_export ()
|
|||
boost::shared_ptr<AudioGrapher::BroadcastInfo> b;
|
||||
XMLTree tree;
|
||||
std::string vtl_samplerate = audio_samplerate_combo.get_active_text();
|
||||
std::string vtl_normalize = normalize ? "true" : "false";
|
||||
std::string vtl_normalize = _normalize ? "true" : "false";
|
||||
tree.read_buffer(std::string(
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
|
||||
"<ExportFormatSpecification name=\"VTL-WAV-16\" id=\"3094591e-ccb9-4385-a93f-c9955ffeb1f0\">"
|
||||
|
|
@ -496,14 +682,14 @@ ExportVideoDialog::launch_export ()
|
|||
framepos_t start, end;
|
||||
start = end = 0;
|
||||
if (insnd_combo.get_active_row_number() == 1) {
|
||||
transcoder = new TranscodeFfmpeg(invid_path_entry.get_text());
|
||||
if (transcoder->probe_ok() && transcoder->get_fps() > 0) {
|
||||
end = transcoder->get_duration() * _session->nominal_frame_rate() / transcoder->get_fps();
|
||||
_transcoder = new TranscodeFfmpeg(invid_path_entry.get_text());
|
||||
if (_transcoder->probe_ok() && _transcoder->get_fps() > 0) {
|
||||
end = _transcoder->get_duration() * _session->nominal_frame_rate() / _transcoder->get_fps();
|
||||
} else {
|
||||
warning << _("Export Video: Cannot query duration of video-file, using duration from timeline instead.") << endmsg;
|
||||
end = ARDOUR_UI::instance()->video_timeline->get_duration();
|
||||
}
|
||||
if (transcoder) {delete transcoder; transcoder = 0;}
|
||||
if (_transcoder) {delete _transcoder; _transcoder = 0;}
|
||||
|
||||
frameoffset_t av_offset = ARDOUR_UI::instance()->video_timeline->get_offset();
|
||||
#if 0 /* DEBUG */
|
||||
|
|
@ -531,6 +717,7 @@ ExportVideoDialog::launch_export ()
|
|||
|
||||
if ( (start >= end) || (end < vstart) || (start > vend)) {
|
||||
warning << _("Export Video: export-range does not include video.") << endmsg;
|
||||
delete _transcoder; _transcoder = 0;
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
return;
|
||||
}
|
||||
|
|
@ -543,6 +730,7 @@ ExportVideoDialog::launch_export ()
|
|||
IO* master_out = _session->master_out()->output().get();
|
||||
if (!master_out) {
|
||||
warning << _("Export Video: No Master Out Ports to Connect for Audio Export") << endmsg;
|
||||
delete _transcoder; _transcoder = 0;
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
return;
|
||||
}
|
||||
|
|
@ -557,7 +745,7 @@ ExportVideoDialog::launch_export ()
|
|||
fnp->set_timespan(tsp);
|
||||
fnp->set_label("vtl");
|
||||
fnp->include_label = true;
|
||||
insnd = fnp->get_path(fmp);
|
||||
_insnd = fnp->get_path(fmp);
|
||||
|
||||
/* do sound export */
|
||||
fmp->set_soundcloud_upload(false);
|
||||
|
|
@ -566,9 +754,9 @@ ExportVideoDialog::launch_export ()
|
|||
status = _session->get_export_status ();
|
||||
|
||||
audio_progress_connection = Glib::signal_timeout().connect (sigc::mem_fun(*this, &ExportVideoDialog::audio_progress_display), 100);
|
||||
previous_progress = 0.0;
|
||||
_previous_progress = 0.0;
|
||||
while (status->running) {
|
||||
if (aborted) { status->abort(); }
|
||||
if (_aborted) { status->abort(); }
|
||||
if (gtk_events_pending()) {
|
||||
gtk_main_iteration ();
|
||||
} else {
|
||||
|
|
@ -578,7 +766,8 @@ ExportVideoDialog::launch_export ()
|
|||
audio_progress_connection.disconnect();
|
||||
status->finish ();
|
||||
if (status->aborted()) {
|
||||
::g_unlink (insnd.c_str());
|
||||
::g_unlink (_insnd.c_str());
|
||||
delete _transcoder; _transcoder = 0;
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
return;
|
||||
}
|
||||
|
|
@ -592,19 +781,21 @@ ExportVideoDialog::encode_pass (int pass)
|
|||
std::string outfn = outfn_path_entry.get_text();
|
||||
std::string invid = invid_path_entry.get_text();
|
||||
|
||||
transcoder = new TranscodeFfmpeg(invid);
|
||||
if (!transcoder->ffexec_ok()) {
|
||||
_transcoder = new TranscodeFfmpeg(invid);
|
||||
if (!_transcoder->ffexec_ok()) {
|
||||
/* ffmpeg binary was not found. TranscodeFfmpeg prints a warning */
|
||||
::g_unlink (insnd.c_str());
|
||||
::g_unlink (_insnd.c_str());
|
||||
delete _transcoder; _transcoder = 0;
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
return;
|
||||
}
|
||||
if (!transcoder->probe_ok()) {
|
||||
if (!_transcoder->probe_ok()) {
|
||||
/* video input file can not be read */
|
||||
warning << _("Export Video: Video input file cannot be read.") << endmsg;
|
||||
::g_unlink (insnd.c_str());
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
return;
|
||||
::g_unlink (_insnd.c_str());
|
||||
delete _transcoder; _transcoder = 0;
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
return;
|
||||
}
|
||||
|
||||
std::string preset = preset_combo.get_active_text();
|
||||
|
|
@ -613,21 +804,32 @@ ExportVideoDialog::encode_pass (int pass)
|
|||
|
||||
if (fps_checkbox.get_active()) {
|
||||
ffs["-r"] = fps_combo.get_active_text();
|
||||
transcoder->set_fps(atof(fps_combo.get_active_text()));
|
||||
_transcoder->set_fps(atof(fps_combo.get_active_text()));
|
||||
}
|
||||
|
||||
if (scale_checkbox.get_active()) {
|
||||
ffs["-s"] = string_compose("%1x%2", width_spinner.get_value(), height_spinner.get_value());
|
||||
}
|
||||
ffs["-vcodec"] = video_codec_combo.get_active_text();
|
||||
ffs["-acodec"] = audio_codec_combo.get_active_text();
|
||||
|
||||
if (video_bitrate_combo.get_active_text() == "retain" ) {
|
||||
if (video_codec_combo.get_active_text() != _("(default for format)")) {
|
||||
ffs["-vcodec"] = video_codec_combo.get_active_text();
|
||||
}
|
||||
if (audio_codec_combo.get_active_text() != _("(default for format)")) {
|
||||
ffs["-acodec"] = audio_codec_combo.get_active_text();
|
||||
}
|
||||
|
||||
if (video_bitrate_combo.get_active_text() == _("(default)") ) {
|
||||
;
|
||||
}
|
||||
else if (video_bitrate_combo.get_active_text() == _("(retain)") ) {
|
||||
ffs["-qscale"] = "0";
|
||||
} else {
|
||||
ffs["-b:v"] = video_bitrate_combo.get_active_text();
|
||||
}
|
||||
ffs["-b:a"] = audio_bitrate_combo.get_active_text();
|
||||
|
||||
if (audio_bitrate_combo.get_active_text() != _("(default)") ) {
|
||||
ffs["-b:a"] = audio_bitrate_combo.get_active_text();
|
||||
}
|
||||
|
||||
if (audio_codec_combo.get_active_text() == "aac" ) {
|
||||
ffs["-strict"] = "-2";
|
||||
|
|
@ -694,7 +896,7 @@ ExportVideoDialog::encode_pass (int pass)
|
|||
}
|
||||
|
||||
bool map = true;
|
||||
if (pass == 1 && twopass) {
|
||||
if (pass == 1 && _twopass) {
|
||||
pbar.set_text (_("Encoding Video.. Pass 1/2"));
|
||||
map = false;
|
||||
ffs["-pass"] = "1";
|
||||
|
|
@ -733,7 +935,7 @@ ExportVideoDialog::encode_pass (int pass)
|
|||
|
||||
std::ostringstream osstream; osstream << duration_s;
|
||||
ffs["-t"] = osstream.str();
|
||||
transcoder->set_duration(duration_s * transcoder->get_fps());
|
||||
_transcoder->set_duration(duration_s * _transcoder->get_fps());
|
||||
|
||||
if (insnd_combo.get_active_row_number() == 0 || insnd_combo.get_active_row_number() == 2) {
|
||||
framepos_t start, snend;
|
||||
|
|
@ -752,13 +954,13 @@ ExportVideoDialog::encode_pass (int pass)
|
|||
#endif
|
||||
|
||||
if (av_offset > start && av_offset + vid_duration < snend) {
|
||||
transcoder->set_leadinout((av_offset - start) / (double)_session->nominal_frame_rate(),
|
||||
_transcoder->set_leadinout((av_offset - start) / (double)_session->nominal_frame_rate(),
|
||||
(snend - (av_offset + vid_duration)) / (double)_session->nominal_frame_rate());
|
||||
} else if (av_offset > start) {
|
||||
transcoder->set_leadinout((av_offset - start) / (double)_session->nominal_frame_rate(), 0);
|
||||
_transcoder->set_leadinout((av_offset - start) / (double)_session->nominal_frame_rate(), 0);
|
||||
} else if (av_offset + vid_duration < snend) {
|
||||
transcoder->set_leadinout(0, (snend - (av_offset + vid_duration)) / (double)_session->nominal_frame_rate());
|
||||
transcoder->set_avoffset((av_offset - start) / (double)_session->nominal_frame_rate());
|
||||
_transcoder->set_leadinout(0, (snend - (av_offset + vid_duration)) / (double)_session->nominal_frame_rate());
|
||||
_transcoder->set_avoffset((av_offset - start) / (double)_session->nominal_frame_rate());
|
||||
}
|
||||
#if 0
|
||||
else if (start > av_offset) {
|
||||
|
|
@ -767,15 +969,15 @@ ExportVideoDialog::encode_pass (int pass)
|
|||
}
|
||||
#endif
|
||||
else {
|
||||
transcoder->set_avoffset((av_offset - start) / (double)_session->nominal_frame_rate());
|
||||
_transcoder->set_avoffset((av_offset - start) / (double)_session->nominal_frame_rate());
|
||||
}
|
||||
|
||||
} else if (av_offset < 0) {
|
||||
/* from 00:00:00:00 to video-end */
|
||||
transcoder->set_avoffset(av_offset / (double)_session->nominal_frame_rate());
|
||||
_transcoder->set_avoffset(av_offset / (double)_session->nominal_frame_rate());
|
||||
}
|
||||
|
||||
TranscodeFfmpeg::FFSettings meta = transcoder->default_meta_data();
|
||||
TranscodeFfmpeg::FFSettings meta = _transcoder->default_meta_data();
|
||||
if (meta_checkbox.get_active()) {
|
||||
ARDOUR::SessionMetadata * session_data = ARDOUR::SessionMetadata::Metadata();
|
||||
if (session_data->year() > 0 ) {
|
||||
|
|
@ -803,14 +1005,15 @@ ExportVideoDialog::encode_pass (int pass)
|
|||
|
||||
#if 1 /* tentative debug mode */
|
||||
if (debug_checkbox.get_active()) {
|
||||
transcoder->set_debug(true);
|
||||
_transcoder->set_debug(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
transcoder->Progress.connect(*this, invalidator (*this), boost::bind (&ExportVideoDialog::update_progress , this, _1, _2), gui_context());
|
||||
transcoder->Finished.connect(*this, invalidator (*this), boost::bind (&ExportVideoDialog::finished, this), gui_context());
|
||||
if (!transcoder->encode(outfn, insnd, invid, ffs, meta, map)) {
|
||||
_transcoder->Progress.connect(*this, invalidator (*this), boost::bind (&ExportVideoDialog::update_progress , this, _1, _2), gui_context());
|
||||
_transcoder->Finished.connect(*this, invalidator (*this), boost::bind (&ExportVideoDialog::finished, this), gui_context());
|
||||
if (!_transcoder->encode(outfn, _insnd, invid, ffs, meta, map)) {
|
||||
ARDOUR_UI::instance()->popup_error(_("Transcoding failed."));
|
||||
delete _transcoder; _transcoder = 0;
|
||||
Gtk::Dialog::response(RESPONSE_CANCEL);
|
||||
return;
|
||||
}
|
||||
|
|
@ -819,28 +1022,69 @@ ExportVideoDialog::encode_pass (int pass)
|
|||
void
|
||||
ExportVideoDialog::change_file_extension (std::string ext)
|
||||
{
|
||||
if (ext == "") return;
|
||||
outfn_path_entry.set_text (
|
||||
strip_file_extension(outfn_path_entry.get_text()) + ext
|
||||
);
|
||||
}
|
||||
|
||||
void
|
||||
ExportVideoDialog::width_value_changed ()
|
||||
{
|
||||
if (_suspend_signals) {
|
||||
return;
|
||||
}
|
||||
if (_session && !_suspend_dirty) _session->set_dirty ();
|
||||
if (!scale_checkbox.get_active() || !scale_aspect.get_active()) {
|
||||
return;
|
||||
}
|
||||
if (_video_source_aspect_ratio <= 0) {
|
||||
return;
|
||||
}
|
||||
_suspend_signals = true;
|
||||
height_spinner.set_value(rintf(width_spinner.get_value() / _video_source_aspect_ratio));
|
||||
_suspend_signals = false;
|
||||
}
|
||||
|
||||
void
|
||||
ExportVideoDialog::height_value_changed ()
|
||||
{
|
||||
if (_suspend_signals) {
|
||||
return;
|
||||
}
|
||||
if (_session && !_suspend_dirty) _session->set_dirty ();
|
||||
if (!scale_checkbox.get_active() || !scale_aspect.get_active()) {
|
||||
return;
|
||||
}
|
||||
if (_video_source_aspect_ratio <= 0) {
|
||||
return;
|
||||
}
|
||||
_suspend_signals = true;
|
||||
width_spinner.set_value(rintf(height_spinner.get_value() * _video_source_aspect_ratio));
|
||||
_suspend_signals = false;
|
||||
}
|
||||
|
||||
void
|
||||
ExportVideoDialog::scale_checkbox_toggled ()
|
||||
{
|
||||
scale_aspect.set_sensitive(scale_checkbox.get_active());
|
||||
width_spinner.set_sensitive(scale_checkbox.get_active());
|
||||
height_spinner.set_sensitive(scale_checkbox.get_active());
|
||||
if (_session && !_suspend_dirty) _session->set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
ExportVideoDialog::fps_checkbox_toggled ()
|
||||
{
|
||||
fps_combo.set_sensitive(fps_checkbox.get_active());
|
||||
if (_session && !_suspend_dirty) _session->set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
ExportVideoDialog::aspect_checkbox_toggled ()
|
||||
{
|
||||
aspect_combo.set_sensitive(aspect_checkbox.get_active());
|
||||
if (_session && !_suspend_dirty) _session->set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -868,6 +1112,7 @@ ExportVideoDialog::video_codec_combo_changed ()
|
|||
optimizations_checkbox.set_active(false);
|
||||
optimizations_label.set_text("-");
|
||||
}
|
||||
if (_session && !_suspend_dirty) _session->set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -878,18 +1123,18 @@ ExportVideoDialog::preset_combo_changed ()
|
|||
|
||||
if (p == "flv") {
|
||||
change_file_extension(".flv");
|
||||
audio_codec_combo.set_active(1);
|
||||
video_codec_combo.set_active(0);
|
||||
audio_bitrate_combo.set_active(1);
|
||||
video_bitrate_combo.set_active(1);
|
||||
audio_codec_combo.set_active(2);
|
||||
video_codec_combo.set_active(1);
|
||||
audio_bitrate_combo.set_active(2);
|
||||
video_bitrate_combo.set_active(3);
|
||||
audio_samplerate_combo.set_active(1);
|
||||
}
|
||||
else if (p == "you-tube") {
|
||||
change_file_extension(".avi");
|
||||
audio_codec_combo.set_active(2);
|
||||
video_codec_combo.set_active(5);
|
||||
audio_bitrate_combo.set_active(1);
|
||||
video_bitrate_combo.set_active(2);
|
||||
audio_codec_combo.set_active(3);
|
||||
video_codec_combo.set_active(6);
|
||||
audio_bitrate_combo.set_active(2);
|
||||
video_bitrate_combo.set_active(4);
|
||||
if (_session->nominal_frame_rate() == 48000 || _session->nominal_frame_rate() == 96000) {
|
||||
audio_samplerate_combo.set_active(2);
|
||||
} else {
|
||||
|
|
@ -898,10 +1143,22 @@ ExportVideoDialog::preset_combo_changed ()
|
|||
}
|
||||
else if (p == "ogg") {
|
||||
change_file_extension(".ogv");
|
||||
audio_codec_combo.set_active(3);
|
||||
video_codec_combo.set_active(1);
|
||||
audio_bitrate_combo.set_active(2);
|
||||
video_bitrate_combo.set_active(2);
|
||||
audio_codec_combo.set_active(4);
|
||||
video_codec_combo.set_active(2);
|
||||
audio_bitrate_combo.set_active(3);
|
||||
video_bitrate_combo.set_active(4);
|
||||
if (_session->nominal_frame_rate() == 48000 || _session->nominal_frame_rate() == 96000) {
|
||||
audio_samplerate_combo.set_active(2);
|
||||
} else {
|
||||
audio_samplerate_combo.set_active(1);
|
||||
}
|
||||
}
|
||||
else if (p == "webm") {
|
||||
change_file_extension(".webm");
|
||||
audio_codec_combo.set_active(4);
|
||||
video_codec_combo.set_active(7);
|
||||
audio_bitrate_combo.set_active(3);
|
||||
video_bitrate_combo.set_active(4);
|
||||
if (_session->nominal_frame_rate() == 48000 || _session->nominal_frame_rate() == 96000) {
|
||||
audio_samplerate_combo.set_active(2);
|
||||
} else {
|
||||
|
|
@ -910,18 +1167,18 @@ ExportVideoDialog::preset_combo_changed ()
|
|||
}
|
||||
else if (p == "dvd-mp2") {
|
||||
change_file_extension(".mpg");
|
||||
audio_codec_combo.set_active(4);
|
||||
video_codec_combo.set_active(3);
|
||||
audio_bitrate_combo.set_active(3);
|
||||
video_bitrate_combo.set_active(3);
|
||||
audio_codec_combo.set_active(5);
|
||||
video_codec_combo.set_active(4);
|
||||
audio_bitrate_combo.set_active(4);
|
||||
video_bitrate_combo.set_active(5);
|
||||
audio_samplerate_combo.set_active(2);
|
||||
}
|
||||
else if (p == "dvd-NTSC" || p == "dvd-PAL") {
|
||||
change_file_extension(".mpg");
|
||||
audio_codec_combo.set_active(5);
|
||||
video_codec_combo.set_active(3);
|
||||
audio_bitrate_combo.set_active(3);
|
||||
video_bitrate_combo.set_active(3);
|
||||
audio_codec_combo.set_active(6);
|
||||
video_codec_combo.set_active(4);
|
||||
audio_bitrate_combo.set_active(4);
|
||||
video_bitrate_combo.set_active(5);
|
||||
audio_samplerate_combo.set_active(2);
|
||||
|
||||
scale_checkbox.set_active(false);
|
||||
|
|
@ -929,10 +1186,22 @@ ExportVideoDialog::preset_combo_changed ()
|
|||
}
|
||||
else if (p == "mpeg4") {
|
||||
change_file_extension(".mp4");
|
||||
audio_codec_combo.set_active(0);
|
||||
video_codec_combo.set_active(4);
|
||||
audio_bitrate_combo.set_active(3);
|
||||
video_bitrate_combo.set_active(3);
|
||||
audio_codec_combo.set_active(1);
|
||||
video_codec_combo.set_active(5);
|
||||
audio_bitrate_combo.set_active(4);
|
||||
video_bitrate_combo.set_active(5);
|
||||
if (_session->nominal_frame_rate() == 48000 || _session->nominal_frame_rate() == 96000) {
|
||||
audio_samplerate_combo.set_active(2);
|
||||
} else {
|
||||
audio_samplerate_combo.set_active(1);
|
||||
}
|
||||
}
|
||||
else if (p == "mp4/h264/aac") {
|
||||
change_file_extension(".mp4");
|
||||
audio_codec_combo.set_active(2);
|
||||
video_codec_combo.set_active(6);
|
||||
audio_bitrate_combo.set_active(0);
|
||||
video_bitrate_combo.set_active(0);
|
||||
if (_session->nominal_frame_rate() == 48000 || _session->nominal_frame_rate() == 96000) {
|
||||
audio_samplerate_combo.set_active(2);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -41,19 +41,28 @@
|
|||
class ExportVideoDialog : public ArdourDialog , public PBD::ScopedConnectionList
|
||||
{
|
||||
public:
|
||||
ExportVideoDialog (ARDOUR::Session*, TimeSelection &tme, bool range = false);
|
||||
ExportVideoDialog ();
|
||||
~ExportVideoDialog ();
|
||||
|
||||
std::string get_exported_filename () { return outfn_path_entry.get_text(); }
|
||||
|
||||
void apply_state(TimeSelection &tme, bool range);
|
||||
|
||||
XMLNode& get_state ();
|
||||
void set_state (const XMLNode &);
|
||||
|
||||
private:
|
||||
TimeSelection &export_range;
|
||||
TimeSelection export_range;
|
||||
|
||||
void on_show ();
|
||||
void abort_clicked ();
|
||||
void launch_export ();
|
||||
void encode_pass (int);
|
||||
void change_file_extension (std::string);
|
||||
void width_value_changed ();
|
||||
void height_value_changed ();
|
||||
|
||||
void set_original_file_information ();
|
||||
|
||||
void open_outfn_dialog ();
|
||||
void open_invid_dialog ();
|
||||
|
|
@ -63,10 +72,10 @@ class ExportVideoDialog : public ArdourDialog , public PBD::ScopedConnectionList
|
|||
void aspect_checkbox_toggled ();
|
||||
void fps_checkbox_toggled ();
|
||||
|
||||
bool aborted;
|
||||
bool twopass;
|
||||
bool firstpass;
|
||||
bool normalize;
|
||||
bool _aborted;
|
||||
bool _twopass;
|
||||
bool _firstpass;
|
||||
bool _normalize;
|
||||
|
||||
void finished ();
|
||||
void update_progress (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
|
||||
|
|
@ -74,10 +83,14 @@ class ExportVideoDialog : public ArdourDialog , public PBD::ScopedConnectionList
|
|||
boost::shared_ptr<ARDOUR::ExportStatus> status;
|
||||
sigc::connection audio_progress_connection;
|
||||
gint audio_progress_display ();
|
||||
float previous_progress;
|
||||
float _previous_progress;
|
||||
|
||||
TranscodeFfmpeg *transcoder;
|
||||
std::string insnd;
|
||||
TranscodeFfmpeg *_transcoder;
|
||||
std::string _insnd;
|
||||
|
||||
float _video_source_aspect_ratio;
|
||||
bool _suspend_signals;
|
||||
bool _suspend_dirty;
|
||||
|
||||
Gtk::Label outfn_path_label;
|
||||
Gtk::Entry outfn_path_entry;
|
||||
|
|
@ -103,6 +116,7 @@ class ExportVideoDialog : public ArdourDialog , public PBD::ScopedConnectionList
|
|||
Gtk::ComboBoxText preset_combo;
|
||||
|
||||
Gtk::CheckButton scale_checkbox;
|
||||
Gtk::CheckButton scale_aspect;
|
||||
Gtk::Adjustment width_adjustment;
|
||||
Gtk::SpinButton width_spinner;
|
||||
Gtk::Adjustment height_adjustment;
|
||||
|
|
|
|||
|
|
@ -83,8 +83,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
|
|||
Label* combo_label = manage (new Label (_("<span size=\"large\">Presets</span>")));
|
||||
combo_label->set_use_markup (true);
|
||||
|
||||
latency_button.add (latency_label);
|
||||
latency_button.signal_clicked().connect (sigc::mem_fun (*this, &PlugUIBase::latency_button_clicked));
|
||||
latency_button.signal_clicked.connect (sigc::mem_fun (*this, &PlugUIBase::latency_button_clicked));
|
||||
set_latency_label ();
|
||||
|
||||
smaller_hbox->pack_start (latency_button, false, false, 10);
|
||||
|
|
@ -730,7 +729,6 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
|
|||
|
||||
automation_state_changed (control_ui);
|
||||
|
||||
mcontrol->Changed.connect (control_connections, invalidator (*this), boost::bind (&GenericPluginUI::ui_parameter_changed, this, control_ui), gui_context());
|
||||
mcontrol->alist()->automation_state_changed.connect (control_connections, invalidator (*this), boost::bind (&GenericPluginUI::automation_state_changed, this, control_ui), gui_context());
|
||||
|
||||
input_controls.push_back (control_ui);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ GhostRegion::GhostRegion (ArdourCanvas::Container* parent, TimeAxisView& tv, Tim
|
|||
CANVAS_DEBUG_NAME (group, "ghost region");
|
||||
group->set_position (ArdourCanvas::Duple (initial_pos, 0));
|
||||
|
||||
base_rect = new ArdourCanvas::TimeRectangle (group);
|
||||
base_rect = new ArdourCanvas::Rectangle (group);
|
||||
CANVAS_DEBUG_NAME (base_rect, "ghost region rect");
|
||||
base_rect->set_x0 (0);
|
||||
base_rect->set_y0 (1.0);
|
||||
|
|
|
|||
|
|
@ -395,6 +395,26 @@ GroupTabs::new_from_soloed ()
|
|||
run_new_group_dialog (soloed);
|
||||
}
|
||||
|
||||
PBD::PropertyList
|
||||
GroupTabs::default_properties () const
|
||||
{
|
||||
PBD::PropertyList plist;
|
||||
|
||||
plist.add (Properties::route_active, true);
|
||||
plist.add (Properties::active, true);
|
||||
plist.add (Properties::gain, true);
|
||||
plist.add (Properties::relative, true);
|
||||
plist.add (Properties::color, true);
|
||||
plist.add (Properties::monitoring, true);
|
||||
plist.add (Properties::select, true);
|
||||
plist.add (Properties::mute, true);
|
||||
plist.add (Properties::solo, true);
|
||||
plist.add (Properties::gain, true);
|
||||
plist.add (Properties::recenable, true);
|
||||
|
||||
return plist;
|
||||
}
|
||||
|
||||
void
|
||||
GroupTabs::run_new_group_dialog (RouteList const & rl)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ private:
|
|||
virtual double extent () const = 0;
|
||||
|
||||
virtual void add_menu_items (Gtk::Menu *, ARDOUR::RouteGroup *) {}
|
||||
virtual PBD::PropertyList default_properties () const = 0;
|
||||
virtual PBD::PropertyList default_properties () const;
|
||||
virtual ARDOUR::RouteList selected_routes () const = 0;
|
||||
virtual void sync_order_keys () = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,16 @@ GUIObjectState::get_or_add_node (const string& id)
|
|||
return get_or_add_node (&_state, id);
|
||||
}
|
||||
|
||||
/** Remove node with provided id.
|
||||
* @param id property of Object node to look for.
|
||||
*/
|
||||
|
||||
void
|
||||
GUIObjectState::remove_node (const std::string& id)
|
||||
{
|
||||
_state.remove_nodes_and_delete(X_("id"), id );
|
||||
}
|
||||
|
||||
/** Get a string from our state.
|
||||
* @param id property of Object node to look for.
|
||||
* @param prop_name name of the Object property to return.
|
||||
|
|
|
|||
|
|
@ -47,12 +47,14 @@ public:
|
|||
s << val;
|
||||
child->add_property (prop_name.c_str(), s.str());
|
||||
}
|
||||
|
||||
|
||||
std::list<std::string> all_ids () const;
|
||||
|
||||
static XMLNode* get_node (const XMLNode *, const std::string &);
|
||||
XMLNode* get_or_add_node (const std::string &);
|
||||
static XMLNode* get_or_add_node (XMLNode *, const std::string &);
|
||||
|
||||
void remove_node (const std::string& id);
|
||||
|
||||
private:
|
||||
XMLNode _state;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace ArdourCanvas {
|
|||
class Hit : public NoteBase
|
||||
{
|
||||
public:
|
||||
typedef Evoral::Note<Evoral::MusicalTime> NoteType;
|
||||
typedef Evoral::Note<Evoral::Beats> NoteType;
|
||||
|
||||
Hit (MidiRegionView& region,
|
||||
ArdourCanvas::Item* parent,
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ KeyEditor::on_key_press_event (GdkEventKey* ev)
|
|||
if (!ev->is_modifier) {
|
||||
last_keyval = ev->keyval;
|
||||
}
|
||||
return false;
|
||||
return ArdourWindow::on_key_press_event (ev);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -203,11 +203,14 @@ KeyEditor::on_key_release_event (GdkEventKey* ev)
|
|||
goto out;
|
||||
}
|
||||
|
||||
GdkModifierType mod = (GdkModifierType)(Keyboard::RelevantModifierKeyMask & ev->state);
|
||||
|
||||
Gtkmm2ext::possibly_translate_keyval_to_make_legal_accelerator (ev->keyval);
|
||||
Gtkmm2ext::possibly_translate_mod_to_make_legal_accelerator (mod);
|
||||
|
||||
bool result = AccelMap::change_entry (path,
|
||||
last_keyval,
|
||||
ModifierType (Keyboard::RelevantModifierKeyMask & ev->state),
|
||||
Gdk::ModifierType(mod),
|
||||
true);
|
||||
|
||||
if (result) {
|
||||
|
|
@ -310,4 +313,7 @@ void
|
|||
KeyEditor::reset ()
|
||||
{
|
||||
Keyboard::the_keyboard().reset_bindings ();
|
||||
populate ();
|
||||
view.get_selection()->unselect_all ();
|
||||
populate ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,6 +234,8 @@ LevelMeterBase::hide_all_meters ()
|
|||
void
|
||||
LevelMeterBase::setup_meters (int len, int initial_width, int thin_width)
|
||||
{
|
||||
hide_all_meters ();
|
||||
|
||||
if (!_meter) {
|
||||
return; /* do it later or never */
|
||||
}
|
||||
|
|
@ -393,13 +395,8 @@ LevelMeterBase::setup_meters (int len, int initial_width, int thin_width)
|
|||
}
|
||||
if (meters[n].width != width || meters[n].length != len || color_changed || meter_type != visible_meter_type) {
|
||||
bool hl = meters[n].meter ? meters[n].meter->get_highlight() : false;
|
||||
|
||||
if (meters[n].meter && meters[n].meter->get_parent()) {
|
||||
mtr_remove (*meters[n].meter);
|
||||
meters[n].packed = false;
|
||||
delete meters[n].meter;
|
||||
}
|
||||
|
||||
meters[n].packed = false;
|
||||
delete meters[n].meter;
|
||||
meters[n].meter = new FastMeter ((uint32_t) floor (ARDOUR_UI::config()->get_meter_hold()), width, _meter_orientation, len,
|
||||
c[0], c[1], c[2], c[3], c[4],
|
||||
c[5], c[6], c[7], c[8], c[9],
|
||||
|
|
@ -413,13 +410,14 @@ LevelMeterBase::setup_meters (int len, int initial_width, int thin_width)
|
|||
meters[n].meter->add_events (Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK);
|
||||
meters[n].meter->signal_button_press_event().connect (sigc::mem_fun (*this, &LevelMeterBase::meter_button_press), false);
|
||||
meters[n].meter->signal_button_release_event().connect (sigc::mem_fun (*this, &LevelMeterBase::meter_button_release), false);
|
||||
|
||||
mtr_pack (*meters[n].meter);
|
||||
meters[n].meter->show_all ();
|
||||
meters[n].packed = true;
|
||||
}
|
||||
}
|
||||
|
||||
//pack_end (*meters[n].meter, false, false);
|
||||
mtr_pack (*meters[n].meter);
|
||||
meters[n].meter->show_all ();
|
||||
meters[n].packed = true;
|
||||
}
|
||||
//show();
|
||||
color_changed = false;
|
||||
visible_meter_type = meter_type;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -839,7 +839,9 @@ LocationUI::LocationUI ()
|
|||
|
||||
LocationUI::~LocationUI()
|
||||
{
|
||||
delete _clock_group;
|
||||
loop_edit_row.unset_clock_group ();
|
||||
punch_edit_row.unset_clock_group ();
|
||||
delete _clock_group;
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
#include "audio_clock.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
class LocationStack;
|
||||
class Location;
|
||||
}
|
||||
|
||||
|
|
@ -58,6 +57,7 @@ class LocationEditRow : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
|||
void set_number (int);
|
||||
void focus_name();
|
||||
void set_clock_group (ClockGroup&);
|
||||
void unset_clock_group () { _clock_group = 0; }
|
||||
|
||||
sigc::signal<void,ARDOUR::Location*> remove_requested;
|
||||
sigc::signal<void> redraw_ranges;
|
||||
|
|
@ -162,7 +162,6 @@ class LocationUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
|||
XMLNode & get_state () const;
|
||||
|
||||
private:
|
||||
ARDOUR::LocationStack* locations;
|
||||
/** set to the location that has just been created with the LocationUI `add' button
|
||||
(if Config->get_name_new_markers() is true); if it is non-0, the name entry of
|
||||
the location is given the focus by location_added().
|
||||
|
|
|
|||
|
|
@ -282,7 +282,24 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
_lv2->enable_ui_emission();
|
||||
}
|
||||
|
||||
const LilvUI* ui = (const LilvUI*)_lv2->c_ui();
|
||||
const LilvUI* ui = (const LilvUI*)_lv2->c_ui();
|
||||
const LilvNode* bundle = lilv_ui_get_bundle_uri(ui);
|
||||
const LilvNode* binary = lilv_ui_get_binary_uri(ui);
|
||||
#ifdef HAVE_LILV_0_21_3
|
||||
char* ui_bundle_path = lilv_file_uri_parse(lilv_node_as_uri(bundle), NULL);
|
||||
char* ui_binary_path = lilv_file_uri_parse(lilv_node_as_uri(binary), NULL);
|
||||
#else
|
||||
char* ui_bundle_path = strdup(lilv_uri_to_path(lilv_node_as_uri(bundle)));
|
||||
char* ui_binary_path = strdup(lilv_uri_to_path(lilv_node_as_uri(binary)));
|
||||
#endif
|
||||
if (!ui_bundle_path || !ui_binary_path) {
|
||||
error << _("failed to get path for UI bindle or binary") << endmsg;
|
||||
free(ui_bundle_path);
|
||||
free(ui_binary_path);
|
||||
free(features);
|
||||
return;
|
||||
}
|
||||
|
||||
_inst = suil_instance_new(
|
||||
ui_host,
|
||||
this,
|
||||
|
|
@ -290,10 +307,12 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
_lv2->uri(),
|
||||
lilv_node_as_uri(lilv_ui_get_uri(ui)),
|
||||
lilv_node_as_uri((const LilvNode*)_lv2->c_ui_type()),
|
||||
lilv_uri_to_path(lilv_node_as_uri(lilv_ui_get_bundle_uri(ui))),
|
||||
lilv_uri_to_path(lilv_node_as_uri(lilv_ui_get_binary_uri(ui))),
|
||||
ui_bundle_path,
|
||||
ui_binary_path,
|
||||
features);
|
||||
|
||||
free(ui_bundle_path);
|
||||
free(ui_binary_path);
|
||||
free(features);
|
||||
|
||||
#define GET_WIDGET(inst) suil_instance_get_widget((SuilInstance*)inst);
|
||||
|
|
@ -322,6 +341,8 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
container->add(*Gtk::manage(Glib::wrap(c_widget)));
|
||||
}
|
||||
container->show_all();
|
||||
gtk_widget_set_can_focus(c_widget, true);
|
||||
gtk_widget_grab_focus(c_widget);
|
||||
} else {
|
||||
_external_ui_ptr = (struct lv2_external_ui*)GET_WIDGET(_inst);
|
||||
}
|
||||
|
|
@ -349,6 +370,15 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
LV2PluginUI::grab_focus()
|
||||
{
|
||||
if (_inst && !_lv2->is_external_ui()) {
|
||||
GtkWidget* c_widget = (GtkWidget*)GET_WIDGET(_inst);
|
||||
gtk_widget_grab_focus(c_widget);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LV2PluginUI::lv2ui_free()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox
|
|||
bool stop_updating(GdkEventAny*);
|
||||
|
||||
int package (Gtk::Window&);
|
||||
void grab_focus ();
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
#endif
|
||||
|
||||
#include "ardour/revision.h"
|
||||
#include "ardour/version.h"
|
||||
#include "ardour/ardour.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/session_utils.h"
|
||||
|
|
@ -48,7 +47,6 @@
|
|||
#include <gtkmm2ext/popup.h>
|
||||
#include <gtkmm2ext/utils.h>
|
||||
|
||||
#include "version.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "opts.h"
|
||||
#include "enums.h"
|
||||
|
|
@ -76,7 +74,7 @@ TextReceiver text_receiver ("ardour");
|
|||
extern int curvetest (string);
|
||||
|
||||
static ARDOUR_UI *ui = 0;
|
||||
static const char* localedir = LOCALEDIR;
|
||||
static string localedir (LOCALEDIR);
|
||||
|
||||
void
|
||||
gui_jack_error ()
|
||||
|
|
@ -121,7 +119,7 @@ Click OK to exit %1."), PROGRAM_NAME, AudioEngine::instance()->current_backend_n
|
|||
} else {
|
||||
|
||||
/* engine has already run, so this is a mid-session backend death */
|
||||
|
||||
|
||||
MessageDialog msg (string_compose (_("The audio backend (%1) has failed, or terminated"), AudioEngine::instance()->current_backend_name()), false);
|
||||
msg.set_secondary_text (string_compose (_("%2 exited unexpectedly, and without notifying %1."),
|
||||
PROGRAM_NAME, AudioEngine::instance()->current_backend_name()));
|
||||
|
|
@ -134,8 +132,7 @@ Click OK to exit %1."), PROGRAM_NAME, AudioEngine::instance()->current_backend_n
|
|||
static void
|
||||
sigpipe_handler (int /*signal*/)
|
||||
{
|
||||
/* XXX fix this so that we do this again after a reconnect to the backend
|
||||
*/
|
||||
/* XXX fix this so that we do this again after a reconnect to the backend */
|
||||
|
||||
static bool done_the_backend_thing = false;
|
||||
|
||||
|
|
@ -147,170 +144,39 @@ sigpipe_handler (int /*signal*/)
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if (!defined COMPILER_MSVC && defined PLATFORM_WINDOWS)
|
||||
static bool IsAConsolePort (HANDLE handle)
|
||||
|
||||
static FILE* pStdOut = 0;
|
||||
static FILE* pStdErr = 0;
|
||||
static BOOL bConsole;
|
||||
static HANDLE hStdOut;
|
||||
|
||||
static bool
|
||||
IsAConsolePort (HANDLE handle)
|
||||
{
|
||||
DWORD mode;
|
||||
return (GetConsoleMode(handle, &mode) != 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
|
||||
/*
|
||||
* Release build with MSVC uses ardour_main()
|
||||
*/
|
||||
int ardour_main (int argc, char *argv[])
|
||||
|
||||
#elif (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)
|
||||
|
||||
// prototype for function in windows_vst_plugin_ui.cc
|
||||
extern int windows_vst_gui_init (int* argc, char** argv[]);
|
||||
|
||||
/* this is called from the entry point of a wine-compiled
|
||||
executable that is linked against gtk2_ardour built
|
||||
as a shared library.
|
||||
*/
|
||||
extern "C" {
|
||||
|
||||
int ardour_main (int argc, char *argv[])
|
||||
|
||||
#else
|
||||
int main (int argc, char *argv[])
|
||||
#endif
|
||||
static void
|
||||
console_madness_begin ()
|
||||
{
|
||||
fixup_bundle_environment (argc, argv, &localedir);
|
||||
bConsole = AttachConsole(ATTACH_PARENT_PROCESS);
|
||||
hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
||||
load_custom_fonts(); /* needs to happen before any gtk and pango init calls */
|
||||
|
||||
if (!Glib::thread_supported()) {
|
||||
Glib::thread_init();
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
gtk_set_locale ();
|
||||
#endif
|
||||
|
||||
#if (!defined COMPILER_MSVC && defined PLATFORM_WINDOWS)
|
||||
/* re-attach to the console so we can see 'printf()' output etc.
|
||||
* for MSVC see gtk2_ardour/msvc/winmain.cc
|
||||
*/
|
||||
FILE *pStdOut = 0, *pStdErr = 0;
|
||||
BOOL bConsole = AttachConsole(ATTACH_PARENT_PROCESS);
|
||||
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
||||
if ((bConsole) && (IsAConsolePort(hStdOut))) {
|
||||
pStdOut = freopen( "CONOUT$", "w", stdout );
|
||||
pStdErr = freopen( "CONOUT$", "w", stderr );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)
|
||||
/* this does some magic that is needed to make GTK and X11 client interact properly.
|
||||
* the platform dependent code is in windows_vst_plugin_ui.cc
|
||||
*/
|
||||
windows_vst_gui_init (&argc, &argv);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
cerr << "bind txt domain [" << PACKAGE << "] to " << localedir << endl;
|
||||
|
||||
(void) bindtextdomain (PACKAGE, localedir);
|
||||
/* our i18n translations are all in UTF-8, so make sure
|
||||
that even if the user locale doesn't specify UTF-8,
|
||||
we use that when handling them.
|
||||
*/
|
||||
(void) bind_textdomain_codeset (PACKAGE,"UTF-8");
|
||||
#endif
|
||||
|
||||
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, 0);
|
||||
|
||||
// catch error message system signals ();
|
||||
|
||||
text_receiver.listen_to (error);
|
||||
text_receiver.listen_to (info);
|
||||
text_receiver.listen_to (fatal);
|
||||
text_receiver.listen_to (warning);
|
||||
|
||||
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
|
||||
if (g_getenv ("BOOST_DEBUG")) {
|
||||
boost_debug_shared_ptr_show_live_debugging (true);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (parse_opts (argc, argv)) {
|
||||
#if (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
|
||||
// Since we don't ordinarily have access to stdout and stderr with
|
||||
// an MSVC app, let the user know we encountered a parsing error.
|
||||
Gtk::Main app(&argc, &argv); // Calls 'gtk_init()'
|
||||
|
||||
Gtk::MessageDialog dlgReportParseError (_("\n Ardour could not understand your command line "),
|
||||
false, MESSAGE_ERROR, BUTTONS_CLOSE, true);
|
||||
dlgReportParseError.set_title (_("An error was encountered while launching Ardour"));
|
||||
dlgReportParseError.run ();
|
||||
#endif
|
||||
exit (1);
|
||||
}
|
||||
|
||||
cout << PROGRAM_NAME
|
||||
<< VERSIONSTRING
|
||||
<< _(" (built using ")
|
||||
<< revision
|
||||
#ifdef __GNUC__
|
||||
<< _(" and GCC version ") << __VERSION__
|
||||
#endif
|
||||
<< ')'
|
||||
<< endl;
|
||||
|
||||
if (just_version) {
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (no_splash) {
|
||||
cerr << _("Copyright (C) 1999-2012 Paul Davis") << endl
|
||||
<< _("Some portions Copyright (C) Steve Harris, Ari Johnson, Brett Viren, Joel Baker, Robin Gareus") << endl
|
||||
<< endl
|
||||
<< string_compose (_("%1 comes with ABSOLUTELY NO WARRANTY"), PROGRAM_NAME) << endl
|
||||
<< _("not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.") << endl
|
||||
<< _("This is free software, and you are welcome to redistribute it ") << endl
|
||||
<< _("under certain conditions; see the source for copying conditions.")
|
||||
<< endl;
|
||||
}
|
||||
|
||||
/* some GUI objects need this */
|
||||
|
||||
if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir)) {
|
||||
error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg;
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (curvetest_file) {
|
||||
return curvetest (curvetest_file);
|
||||
}
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
if (::signal (SIGPIPE, sigpipe_handler)) {
|
||||
cerr << _("Cannot xinstall SIGPIPE error handler") << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
try {
|
||||
ui = new ARDOUR_UI (&argc, &argv, localedir);
|
||||
} catch (failed_constructor& err) {
|
||||
error << string_compose (_("could not create %1 GUI"), PROGRAM_NAME) << endmsg;
|
||||
exit (1);
|
||||
}
|
||||
|
||||
ui->run (text_receiver);
|
||||
Gtkmm2ext::Application::instance()->cleanup();
|
||||
delete ui;
|
||||
ui = 0;
|
||||
|
||||
ARDOUR::cleanup ();
|
||||
pthread_cancel_all ();
|
||||
|
||||
#if (!defined COMPILER_MSVC && defined PLATFORM_WINDOWS)
|
||||
static void
|
||||
console_madness_end ()
|
||||
{
|
||||
if (pStdOut) {
|
||||
fclose (pStdOut);
|
||||
}
|
||||
|
|
@ -335,8 +201,167 @@ int main (int argc, char *argv[])
|
|||
|
||||
FreeConsole();
|
||||
}
|
||||
}
|
||||
|
||||
static void command_line_parse_error (int *argc, char** argv[]) {}
|
||||
|
||||
#elif (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
|
||||
|
||||
// these are not used here. for MSVC see gtk2_ardour/msvc/winmain.cc
|
||||
static void console_madness_begin () {}
|
||||
static void console_madness_end () {}
|
||||
|
||||
static void command_line_parse_error (int *argc, char** argv[]) {
|
||||
// Since we don't ordinarily have access to stdout and stderr with
|
||||
// an MSVC app, let the user know we encountered a parsing error.
|
||||
Gtk::Main app(argc, argv); // Calls 'gtk_init()'
|
||||
|
||||
Gtk::MessageDialog dlgReportParseError (string_compose (_("\n %1 could not understand your command line "), PROGRAM_NAME),
|
||||
false, MESSAGE_ERROR, BUTTONS_CLOSE, true);
|
||||
dlgReportParseError.set_title (string_compose (_("An error was encountered while launching %1"), PROGRAM_NAME));
|
||||
dlgReportParseError.run ();
|
||||
}
|
||||
|
||||
#else
|
||||
static void console_madness_begin () {}
|
||||
static void console_madness_end () {}
|
||||
static void command_line_parse_error (int *argc, char** argv[]) {}
|
||||
#endif
|
||||
|
||||
#if (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
|
||||
/*
|
||||
* Release build with MSVC uses ardour_main()
|
||||
*/
|
||||
int ardour_main (int argc, char *argv[])
|
||||
|
||||
#elif (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)
|
||||
|
||||
// prototype for function in windows_vst_plugin_ui.cc
|
||||
extern int windows_vst_gui_init (int* argc, char** argv[]);
|
||||
|
||||
/* this is called from the entry point of a wine-compiled
|
||||
executable that is linked against gtk2_ardour built
|
||||
as a shared library.
|
||||
*/
|
||||
extern "C" {
|
||||
|
||||
int ardour_main (int argc, char *argv[])
|
||||
|
||||
#else
|
||||
int main (int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
ARDOUR::check_for_old_configuration_files();
|
||||
|
||||
fixup_bundle_environment (argc, argv, localedir);
|
||||
|
||||
load_custom_fonts(); /* needs to happen before any gtk and pango init calls */
|
||||
|
||||
if (!Glib::thread_supported()) {
|
||||
Glib::thread_init();
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
gtk_set_locale ();
|
||||
#endif
|
||||
|
||||
console_madness_begin();
|
||||
|
||||
#if (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)
|
||||
/* this does some magic that is needed to make GTK and X11 client interact properly.
|
||||
* the platform dependent code is in windows_vst_plugin_ui.cc
|
||||
*/
|
||||
windows_vst_gui_init (&argc, &argv);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
cerr << "bind txt domain [" << PACKAGE << "] to " << localedir << endl;
|
||||
|
||||
(void) bindtextdomain (PACKAGE, localedir.c_str());
|
||||
/* our i18n translations are all in UTF-8, so make sure
|
||||
that even if the user locale doesn't specify UTF-8,
|
||||
we use that when handling them.
|
||||
*/
|
||||
(void) bind_textdomain_codeset (PACKAGE,"UTF-8");
|
||||
#endif
|
||||
|
||||
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, 0);
|
||||
|
||||
// catch error message system signals ();
|
||||
|
||||
text_receiver.listen_to (error);
|
||||
text_receiver.listen_to (info);
|
||||
text_receiver.listen_to (fatal);
|
||||
text_receiver.listen_to (warning);
|
||||
|
||||
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
|
||||
if (g_getenv ("BOOST_DEBUG")) {
|
||||
boost_debug_shared_ptr_show_live_debugging (true);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (parse_opts (argc, argv)) {
|
||||
command_line_parse_error (&argc, &argv);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
cout << PROGRAM_NAME
|
||||
<< VERSIONSTRING
|
||||
<< _(" (built using ")
|
||||
<< revision
|
||||
#ifdef __GNUC__
|
||||
<< _(" and GCC version ") << __VERSION__
|
||||
#endif
|
||||
<< ')'
|
||||
<< endl;
|
||||
|
||||
if (just_version) {
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (no_splash) {
|
||||
cerr << _("Copyright (C) 1999-2015 Paul Davis") << endl
|
||||
<< _("Some portions Copyright (C) Steve Harris, Ari Johnson, Brett Viren, Joel Baker, Robin Gareus") << endl
|
||||
<< endl
|
||||
<< string_compose (_("%1 comes with ABSOLUTELY NO WARRANTY"), PROGRAM_NAME) << endl
|
||||
<< _("not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.") << endl
|
||||
<< _("This is free software, and you are welcome to redistribute it ") << endl
|
||||
<< _("under certain conditions; see the source for copying conditions.")
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir.c_str())) {
|
||||
error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg;
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (curvetest_file) {
|
||||
return curvetest (curvetest_file);
|
||||
}
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
if (::signal (SIGPIPE, sigpipe_handler)) {
|
||||
cerr << _("Cannot xinstall SIGPIPE error handler") << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
try {
|
||||
ui = new ARDOUR_UI (&argc, &argv, localedir.c_str());
|
||||
} catch (failed_constructor& err) {
|
||||
error << string_compose (_("could not create %1 GUI"), PROGRAM_NAME) << endmsg;
|
||||
exit (1);
|
||||
}
|
||||
|
||||
ui->run (text_receiver);
|
||||
Gtkmm2ext::Application::instance()->cleanup();
|
||||
delete ui;
|
||||
ui = 0;
|
||||
|
||||
ARDOUR::cleanup ();
|
||||
pthread_cancel_all ();
|
||||
|
||||
console_madness_end ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
#if (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Container& parent, guint32 rgba,
|
|||
group->name = string_compose ("Marker::group for %1", annotation);
|
||||
#endif
|
||||
|
||||
_name_background = new ArdourCanvas::TimeRectangle (group);
|
||||
_name_background = new ArdourCanvas::Rectangle (group);
|
||||
#ifdef CANVAS_DEBUG
|
||||
_name_background->name = string_compose ("Marker::_name_background for %1", annotation);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt)
|
|||
name_label.set_name("meterbridge label");
|
||||
name_label.set_angle(-90.0);
|
||||
name_label.set_text_ellipsize (Pango::ELLIPSIZE_END);
|
||||
name_label.set_layout_ellisize_width(48 * PANGO_SCALE);
|
||||
name_label.set_layout_ellipsize_width(48 * PANGO_SCALE);
|
||||
name_label.set_size_request(18, 50);
|
||||
name_label.set_alignment(-1.0, .5);
|
||||
ARDOUR_UI::instance()->set_tip (name_label, _route->name());
|
||||
|
|
@ -186,7 +186,7 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt)
|
|||
number_label.set_elements((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::Text|ArdourButton::Inactive));
|
||||
number_label.set_name("tracknumber label");
|
||||
number_label.set_angle(-90.0);
|
||||
number_label.set_layout_ellisize_width(18 * PANGO_SCALE);
|
||||
number_label.set_layout_ellipsize_width(18 * PANGO_SCALE);
|
||||
number_label.set_alignment(.5, .5);
|
||||
|
||||
namebx.set_size_request(18, 52);
|
||||
|
|
@ -350,13 +350,17 @@ MeterStrip::blink_rec_display (bool onoff)
|
|||
std::string
|
||||
MeterStrip::state_id() const
|
||||
{
|
||||
return string_compose ("mtrs %1", _route->id().to_s());
|
||||
if (_route) {
|
||||
return string_compose ("mtrs %1", _route->id().to_s());
|
||||
} else {
|
||||
return string ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MeterStrip::set_button_names()
|
||||
{
|
||||
mute_button->set_text (_("M"));
|
||||
mute_button->set_text (S_("Mute|M"));
|
||||
|
||||
if (_route && _route->solo_safe()) {
|
||||
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() | Gtkmm2ext::Insensitive));
|
||||
|
|
@ -364,20 +368,20 @@ MeterStrip::set_button_names()
|
|||
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() & ~Gtkmm2ext::Insensitive));
|
||||
}
|
||||
if (!Config->get_solo_control_is_listen_control()) {
|
||||
solo_button->set_text (_("S"));
|
||||
solo_button->set_text (S_("Solo|S"));
|
||||
} else {
|
||||
switch (Config->get_listen_position()) {
|
||||
case AfterFaderListen:
|
||||
solo_button->set_text (_("A"));
|
||||
solo_button->set_text (S_("AfterFader|A"));
|
||||
break;
|
||||
case PreFaderListen:
|
||||
solo_button->set_text (_("P"));
|
||||
solo_button->set_text (S_("PreFader|P"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
monitor_input_button->set_text (_("I"));
|
||||
monitor_disk_button->set_text (_("D"));
|
||||
monitor_input_button->set_text (S_("MonitorInput|I"));
|
||||
monitor_disk_button->set_text (S_("MonitorDisk|D"));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -536,13 +540,40 @@ MeterStrip::on_size_allocate (Gtk::Allocation& a)
|
|||
// NB numbers are rotated 90deg. on the meterbridge
|
||||
tnh = 4 + std::max(2u, _session->track_number_decimals()) * 8; // TODO 8 = max_with_of_digit_0_to_9()
|
||||
}
|
||||
|
||||
int prev_height, ignored;
|
||||
bool need_relayout = false;
|
||||
|
||||
namebx.get_size_request(ignored, prev_height);
|
||||
namebx.set_size_request(18, nh + tnh);
|
||||
namenumberbx.set_size_request(18, nh + tnh);
|
||||
if (_route) {
|
||||
name_label.set_size_request(18, nh + (_route->is_master() ? tnh : -1));
|
||||
name_label.set_layout_ellisize_width ((nh - 4 + (_route->is_master() ? tnh : 0)) * PANGO_SCALE);
|
||||
|
||||
if (prev_height != nh + tnh) {
|
||||
need_relayout = true;
|
||||
}
|
||||
|
||||
namenumberbx.get_size_request(ignored, prev_height);
|
||||
namenumberbx.set_size_request(18, nh + tnh);
|
||||
|
||||
if (prev_height != nh + tnh) {
|
||||
need_relayout = true;
|
||||
}
|
||||
|
||||
if (_route) {
|
||||
int nlh = nh + (_route->is_master() ? tnh : -1);
|
||||
name_label.get_size_request(ignored, prev_height);
|
||||
name_label.set_size_request(18, nlh);
|
||||
name_label.set_layout_ellipsize_width ((nh - 4 + (_route->is_master() ? tnh : 0)) * PANGO_SCALE);
|
||||
if (prev_height != nlh) {
|
||||
need_relayout = true;
|
||||
}
|
||||
}
|
||||
|
||||
VBox::on_size_allocate(a);
|
||||
|
||||
if (need_relayout) {
|
||||
queue_resize();
|
||||
MetricChanged(); // force re-layout, parent on_scroll(), queue_resize()
|
||||
}
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
|
|||
|
|
@ -104,9 +104,12 @@ Meterbridge::Meterbridge ()
|
|||
Gdk::Geometry geom;
|
||||
geom.max_width = 1<<16;
|
||||
geom.max_height = max_height;
|
||||
geom.min_width = 40;
|
||||
geom.min_height = -1;
|
||||
geom.height_inc = 16;
|
||||
geom.width_inc = 1;
|
||||
set_geometry_hints(*((Gtk::Window*) this), geom, Gdk::HINT_MAX_SIZE | Gdk::HINT_RESIZE_INC);
|
||||
assert(max_height % 16 == 0);
|
||||
set_geometry_hints(*((Gtk::Window*) this), geom, Gdk::HINT_MIN_SIZE | Gdk::HINT_MAX_SIZE | Gdk::HINT_RESIZE_INC);
|
||||
|
||||
set_keep_above (true);
|
||||
set_border_width (0);
|
||||
|
|
@ -325,33 +328,18 @@ Meterbridge::on_size_request (Gtk::Requisition* r)
|
|||
Gtk::Requisition mr = meterarea.size_request();
|
||||
|
||||
geom.max_width = mr.width + metrics_left.get_width() + metrics_right.get_width();
|
||||
geom.max_width = std::max(50, geom.max_width);
|
||||
geom.max_height = max_height;
|
||||
|
||||
#ifndef GTKOSX
|
||||
/* on OSX this leads to a constant live-loop: show/hide scrollbar
|
||||
* on Linux, the window is resized IFF the scrollbar was not visible
|
||||
*/
|
||||
const Gtk::Scrollbar * hsc = scroller.get_hscrollbar();
|
||||
Glib::RefPtr<Gdk::Screen> screen = get_screen ();
|
||||
Gdk::Rectangle monitor_rect;
|
||||
screen->get_monitor_geometry (0, monitor_rect);
|
||||
const int scr_w = monitor_rect.get_width() - 44;
|
||||
|
||||
if (cur_max_width < geom.max_width
|
||||
&& cur_max_width < scr_w
|
||||
&& !(scroller.get_hscrollbar_visible() && hsc)) {
|
||||
int h = r->height;
|
||||
*r = Gtk::Requisition();
|
||||
r->width = geom.max_width;
|
||||
r->height = h;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cur_max_width != geom.max_width) {
|
||||
cur_max_width = geom.max_width;
|
||||
/* height resizes are 'heavy' since the metric areas and meter-patterns
|
||||
* are re-generated. limit to 16px steps. */
|
||||
geom.height_inc = 16;
|
||||
geom.width_inc = 1;
|
||||
set_geometry_hints(*((Gtk::Window*) this), geom, Gdk::HINT_MAX_SIZE | Gdk::HINT_RESIZE_INC);
|
||||
geom.min_width = 40;
|
||||
geom.min_height = -1;
|
||||
set_geometry_hints(*((Gtk::Window*) this), geom, Gdk::HINT_MIN_SIZE | Gdk::HINT_MAX_SIZE | Gdk::HINT_RESIZE_INC);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -360,6 +348,7 @@ Meterbridge::on_size_allocate (Gtk::Allocation& a)
|
|||
{
|
||||
const Gtk::Scrollbar * hsc = scroller.get_hscrollbar();
|
||||
|
||||
/* switch left/right edge patterns depending on horizontal scroll-position */
|
||||
if (scroller.get_hscrollbar_visible() && hsc) {
|
||||
if (!scroll_connection.connected()) {
|
||||
scroll_connection = scroller.get_hscrollbar()->get_adjustment()->signal_value_changed().connect(sigc::mem_fun (*this, &Meterbridge::on_scroll));
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include <gtkmm/table.h>
|
||||
|
||||
#include "pbd/compose.h"
|
||||
#include "pbd/ffs.h"
|
||||
|
||||
#include "gtkmm2ext/gtk_ui.h"
|
||||
#include "gtkmm2ext/gui_thread.h"
|
||||
|
|
@ -343,10 +344,10 @@ MidiChannelSelectorWindow::MidiChannelSelectorWindow (boost::shared_ptr<MidiTrac
|
|||
playback_mask_changed ();
|
||||
capture_mask_changed ();
|
||||
|
||||
track->PlaybackChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::playback_mask_changed, this), gui_context());
|
||||
track->PlaybackChannelModeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::playback_mode_changed, this), gui_context());
|
||||
track->CaptureChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::capture_mask_changed, this), gui_context());
|
||||
track->CaptureChannelModeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::capture_mode_changed, this), gui_context());
|
||||
track->playback_filter().ChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::playback_mask_changed, this), gui_context());
|
||||
track->playback_filter().ChannelModeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::playback_mode_changed, this), gui_context());
|
||||
track->capture_filter().ChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::capture_mask_changed, this), gui_context());
|
||||
track->capture_filter().ChannelModeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::capture_mode_changed, this), gui_context());
|
||||
}
|
||||
|
||||
MidiChannelSelectorWindow::~MidiChannelSelectorWindow()
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
using namespace ARDOUR;
|
||||
|
||||
MidiCutBuffer::MidiCutBuffer (Session* s)
|
||||
: AutomatableSequence<Evoral::MusicalTime> (*s)
|
||||
: AutomatableSequence<Evoral::Beats> (*s)
|
||||
, _origin (0)
|
||||
{
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue