Merged with trunk R1612.

git-svn-id: svn://localhost/ardour2/branches/midi@1614 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2007-03-18 06:07:08 +00:00
parent eb270e70a1
commit 99904735e0
705 changed files with 43740 additions and 7669 deletions

View file

@ -1,4 +1,4 @@
all: scons cscope all: scons
scons: scons:
scons scons

View file

@ -16,7 +16,7 @@ import SCons.Node.FS
SConsignFile() SConsignFile()
EnsureSConsVersion(0, 96) EnsureSConsVersion(0, 96)
ardour_version = '2.0beta11.1' ardour_version = '2.0beta12'
subst_dict = { } subst_dict = { }
@ -41,9 +41,11 @@ opts.AddOptions(
PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'), PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'),
BoolOption('SURFACES', 'Build support for control surfaces', 1), BoolOption('SURFACES', 'Build support for control surfaces', 1),
BoolOption('SYSLIBS', 'USE AT YOUR OWN RISK: CANCELS ALL SUPPORT FROM ARDOUR AUTHORS: Use existing system versions of various libraries instead of internal ones', 0), BoolOption('SYSLIBS', 'USE AT YOUR OWN RISK: CANCELS ALL SUPPORT FROM ARDOUR AUTHORS: Use existing system versions of various libraries instead of internal ones', 0),
BoolOption('UNIVERSAL', 'Compile as universal binary. Requires that external libraries are already universal.', 0),
BoolOption('VERSIONED', 'Add revision information to ardour/gtk executable name inside the build directory', 0), BoolOption('VERSIONED', 'Add revision information to ardour/gtk executable name inside the build directory', 0),
BoolOption('VST', 'Compile with support for VST', 0), BoolOption('VST', 'Compile with support for VST', 0),
BoolOption('TRANZPORT', 'Compile with support for Frontier Designs (if libusb is available)', 0) BoolOption('GPROFILE', 'Compile with support for gprofile (Developers only)', 0),
BoolOption('TRANZPORT', 'Compile with support for Frontier Designs (if libusb is available)', 1)
) )
#---------------------------------------------------------------------- #----------------------------------------------------------------------
@ -311,7 +313,7 @@ env.Append (BUILDERS = {'VersionBuild' : version_bld})
# #
def versioned_builder(target,source,env): def versioned_builder(target,source,env):
w, r = os.popen2( "svn info | awk '/^Revision:/ { print $2}'") w, r = os.popen2( "LANG= svn info | awk '/^Revision:/ { print $2}'")
last_revision = r.readline().strip() last_revision = r.readline().strip()
w.close() w.close()
@ -530,7 +532,10 @@ env = conf.Finish()
# #
opt_flags = [] opt_flags = []
debug_flags = [ '-g' ] if env['GPROFILE'] == 1:
debug_flags = [ '-g', '-pg' ]
else:
debug_flags = [ '-g' ]
# guess at the platform, used to define compiler flags # guess at the platform, used to define compiler flags
@ -596,7 +601,7 @@ elif ((re.search ("i[0-9]86", config[config_cpu]) != None) or (re.search ("x86_6
if env['DIST_TARGET'] != 'i386': if env['DIST_TARGET'] != 'i386':
flag_line = os.popen ("cat /proc/cpuinfo | grep '^flags'").read()[:-1] flag_line = os.popen ("cat /proc/cpuinfo | grep '^flags'").read()[:-1]
x86_flags = flag_line.split (": ")[1:][0].split (' ') x86_flags = flag_line.split (": ")[1:][0].split ()
if "mmx" in x86_flags: if "mmx" in x86_flags:
opt_flags.append ("-mmmx") opt_flags.append ("-mmmx")
@ -660,13 +665,19 @@ opt_flags[:0] = [
"-fomit-frame-pointer", "-fomit-frame-pointer",
"-ffast-math", "-ffast-math",
"-fstrength-reduce", "-fstrength-reduce",
"-fno-strict-aliasing" "-pipe"
] ]
if env['DEBUG'] == 1: if env['DEBUG'] == 1:
env.Append(CCFLAGS=" ".join (debug_flags)) env.Append(CCFLAGS=" ".join (debug_flags))
env.Append(LINKFLAGS=" ".join (debug_flags))
else: else:
env.Append(CCFLAGS=" ".join (opt_flags)) env.Append(CCFLAGS=" ".join (opt_flags))
env.Append(LINKFLAGS=" ".join (opt_flags))
if env['UNIVERSAL'] == 1:
env.Append(CCFLAGS="-arch i386 -arch ppc")
env.Append(LINKFLAGS="-arch i386 -arch ppc")
# #
# warnings flags # warnings flags
@ -676,8 +687,9 @@ env.Append(CCFLAGS="-Wall")
env.Append(CXXFLAGS="-Woverloaded-virtual") env.Append(CXXFLAGS="-Woverloaded-virtual")
if env['EXTRA_WARN']: if env['EXTRA_WARN']:
env.Append(CCFLAGS="-Wextra -pedantic") env.Append(CCFLAGS="-Wextra -pedantic -ansi")
env.Append(CXXFLAGS="-ansi") env.Append(CXXFLAGS="-ansi")
# env.Append(CFLAGS="-iso")
if env['LIBLO']: if env['LIBLO']:
env.Append(CCFLAGS="-DHAVE_LIBLO") env.Append(CCFLAGS="-DHAVE_LIBLO")
@ -837,7 +849,7 @@ if env['SYSLIBS']:
libraries['sndfile-ardour'] = LibraryInfo(LIBS='libsndfile-ardour', libraries['sndfile-ardour'] = LibraryInfo(LIBS='libsndfile-ardour',
LIBPATH='#libs/libsndfile', LIBPATH='#libs/libsndfile',
CPPPATH=['#libs/libsndfile', '#libs/libsndfile/src']) CPPPATH=['#libs/libsndfile/src'])
# libraries['libglademm'] = LibraryInfo() # libraries['libglademm'] = LibraryInfo()
# libraries['libglademm'].ParseConfig ('pkg-config --cflags --libs libglademm-2.4') # libraries['libglademm'].ParseConfig ('pkg-config --cflags --libs libglademm-2.4')
@ -957,11 +969,14 @@ else:
# its included in the tarball # its included in the tarball
# #
surface_subdirs = [ 'libs/surfaces/control_protocol', 'libs/surfaces/generic_midi', 'libs/surfaces/tranzport' ] surface_subdirs = [ 'libs/surfaces/control_protocol', 'libs/surfaces/generic_midi', 'libs/surfaces/tranzport', 'libs/surfaces/mackie' ]
if env['SURFACES']: if env['SURFACES']:
if have_libusb: if have_libusb:
env['TRANZPORT'] = 'yes' env['TRANZPORT'] = 1
else:
env['TRANZPORT'] = 0
print 'Disabled building Tranzport code because libusb could not be found'
if os.access ('libs/surfaces/sony9pin', os.F_OK): if os.access ('libs/surfaces/sony9pin', os.F_OK):
surface_subdirs += [ 'libs/surfaces/sony9pin' ] surface_subdirs += [ 'libs/surfaces/sony9pin' ]
@ -1076,6 +1091,13 @@ if not conf.CheckFunc('posix_memalign'):
env = conf.Finish() env = conf.Finish()
rcbuild = env.SubstInFile ('ardour.rc','ardour.rc.in', SUBST_DICT = subst_dict) rcbuild = env.SubstInFile ('ardour.rc','ardour.rc.in', SUBST_DICT = subst_dict)
subst_dict['%VERSION%'] = ardour_version[0:3]
subst_dict['%EXTRA_VERSION%'] = ardour_version[3:]
subst_dict['%REVISION_STRING%'] = ''
if os.path.exists('.svn'):
subst_dict['%REVISION_STRING%'] = '.' + fetch_svn_revision ('.') + 'svn'
# specbuild = env.SubstInFile ('ardour.spec','ardour.spec.in', SUBST_DICT = subst_dict)
the_revision = env.Command ('frobnicatory_decoy', [], create_stored_revision) the_revision = env.Command ('frobnicatory_decoy', [], create_stored_revision)

View file

@ -459,8 +459,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
#INPUT = libs/pbd libs/midi++2 libs/ardour libs/gtkmm2ext gtk2_ardour INPUT = libs/pbd libs/midi++2 libs/ardour libs/surfaces libs/gtkmm2ext gtk2_ardour
INPUT = libs/ardour gtk2_ardour
# If the value of the INPUT tag contains directories, you can use the # If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@ -557,7 +556,7 @@ FILTER_SOURCE_FILES = NO
# Note: To get rid of all source code in the generated output, make sure also # Note: To get rid of all source code in the generated output, make sure also
# VERBATIM_HEADERS is set to NO. # VERBATIM_HEADERS is set to NO.
SOURCE_BROWSER = NO SOURCE_BROWSER = YES
# Setting the INLINE_SOURCES tag to YES will include the body # Setting the INLINE_SOURCES tag to YES will include the body
# of functions and classes directly in the documentation. # of functions and classes directly in the documentation.
@ -604,7 +603,7 @@ VERBATIM_HEADERS = YES
# of all compounds will be generated. Enable this if the project # of all compounds will be generated. Enable this if the project
# contains a lot of classes, structs, unions or interfaces. # contains a lot of classes, structs, unions or interfaces.
ALPHABETICAL_INDEX = NO ALPHABETICAL_INDEX = YES
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
@ -767,7 +766,7 @@ COMPACT_LATEX = NO
# by the printer. Possible values are: a4, a4wide, letter, legal and # by the printer. Possible values are: a4, a4wide, letter, legal and
# executive. If left blank a4wide will be used. # executive. If left blank a4wide will be used.
PAPER_TYPE = a4wide PAPER_TYPE = letter
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
# packages that should be included in the LaTeX output. # packages that should be included in the LaTeX output.
@ -792,7 +791,7 @@ PDF_HYPERLINKS = NO
# plain latex in the generated Makefile. Set this option to YES to get a # plain latex in the generated Makefile. Set this option to YES to get a
# higher quality PDF documentation. # higher quality PDF documentation.
USE_PDFLATEX = NO USE_PDFLATEX = YES
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
# command to the generated LaTeX files. This will instruct LaTeX to keep # command to the generated LaTeX files. This will instruct LaTeX to keep
@ -1006,7 +1005,7 @@ INCLUDE_FILE_PATTERNS =
# undefined via #undef or recursively expanded use the := operator # undefined via #undef or recursively expanded use the := operator
# instead of the = operator. # instead of the = operator.
PREDEFINED = HAVE_COREAUDIO VST_SUPPORT HAVE_LIBLO FFT_ANALYSIS PREDEFINED = HAVE_LIBLO FFT_ANALYSIS
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded. # this tag can be used to specify a list of macro names that should be expanded.

View file

@ -147,7 +147,6 @@ export_range_markers_dialog.cc
gain_automation_time_axis.cc gain_automation_time_axis.cc
gain_meter.cc gain_meter.cc
ghostregion.cc ghostregion.cc
grouped_buttons.cc
gtk-custom-hruler.c gtk-custom-hruler.c
gtk-custom-ruler.c gtk-custom-ruler.c
imageframe.cc imageframe.cc
@ -276,6 +275,13 @@ rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
tt = gtkmmtests.Program(target = 'tt', source = tt_files) tt = gtkmmtests.Program(target = 'tt', source = tt_files)
my_subst_dict = { } my_subst_dict = { }
#
# null substitution just to avoid ardour.bindings being in svn
#
ardourbindings = env.SubstInFile ('ardour.bindings', 'ardour.bindings.in', SUBST_DICT = my_subst_dict);
my_subst_dict['%INSTALL_PREFIX%'] = final_prefix my_subst_dict['%INSTALL_PREFIX%'] = final_prefix
my_subst_dict['%LIBDIR%'] = env['LIBDIR'] my_subst_dict['%LIBDIR%'] = env['LIBDIR']
my_subst_dict['%VERSION%'] = ardour_version my_subst_dict['%VERSION%'] = ardour_version
@ -286,6 +292,7 @@ env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
ardourdev = env.SubstInFile ('ardev_common.sh','ardev_common.sh.in', SUBST_DICT = my_subst_dict); ardourdev = env.SubstInFile ('ardev_common.sh','ardev_common.sh.in', SUBST_DICT = my_subst_dict);
env.AddPostAction (ardourdev, Chmod ('$TARGET', 0755)) env.AddPostAction (ardourdev, Chmod ('$TARGET', 0755))
Default(ardourbindings)
Default(ardourdev) Default(ardourdev)
Default(ardoursh) Default(ardoursh)
@ -329,7 +336,7 @@ env.Alias ('tarball', env.Distribute (env['DISTTREE'],
'ardour.sh.in', 'ardour.sh.in',
'ardev_common.sh.in', 'ardev_common.sh.in',
'ardour2_ui.rc', 'splash.png', 'ardour2_ui.rc', 'splash.png',
'ardour.menus', 'ardour.bindings', 'ardour.colors', 'ardour.menus', 'ardour.bindings.in', 'ardour.colors',
'editor_xpms' 'editor_xpms'
] + ] +
gtkardour_files + gtkardour_files +

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <algorithm> #include <algorithm>
@ -145,8 +144,13 @@ static const char* authors[] = {
N_("Stefan Kersten"), N_("Stefan Kersten"),
N_("Christopher George"), N_("Christopher George"),
N_("Robert Jordens"), N_("Robert Jordens"),
N_("Dave Robillard"),
N_("Hans Fugal"),
N_("Brian Ahr"), N_("Brian Ahr"),
N_("Nimal Ratnayake"), N_("Nimal Ratnayake"),
N_("Mike Täht"),
N_("John Anderson"),
N_("Nedko Arnaudov"),
0 0
}; };

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __ardour_gtk_about_h__ #ifndef __ardour_gtk_about_h__

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <vector> #include <vector>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdio> #include <cstdio>
@ -149,7 +148,7 @@ AddRouteDialog::track_type_chosen ()
if (track_button.get_active()) { if (track_button.get_active()) {
track_mode_combo.set_sensitive (true); track_mode_combo.set_sensitive (true);
} else { } else {
track_mode_combo.set_sensitive (true); track_mode_combo.set_sensitive (false);
} }
} }

View file

@ -16,7 +16,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <gtkmm2ext/gtk_ui.h> #include <gtkmm2ext/gtk_ui.h>

View file

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
dir=`dirname "$0"` dir=`dirname "$0"`
. $dir/ardev_common.sh . $dir/ardev_common.sh
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
exec gdb $EXECUTABLE $* exec gdb $EXECUTABLE $*

View file

@ -1,3 +1,4 @@
#!/bin/sh #!/bin/sh
. `dirname "$0"`/ardev_common.sh . `dirname "$0"`/ardev_common.sh
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
exec $EXECUTABLE $* exec $EXECUTABLE $*

View file

@ -9,7 +9,7 @@
; (gtk_accel_path "<Actions>/JACK/JACKReconnect" "") ; (gtk_accel_path "<Actions>/JACK/JACKReconnect" "")
; (gtk_accel_path "<Actions>/Editor/Autoconnect" "") ; (gtk_accel_path "<Actions>/Editor/Autoconnect" "")
; (gtk_accel_path "<Actions>/Editor/Edit" "") ; (gtk_accel_path "<Actions>/Editor/Edit" "")
(gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-end" "<Control>grave") (gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-end" "<Control>comma")
; (gtk_accel_path "<Actions>/redirectmenu/copy" "") ; (gtk_accel_path "<Actions>/redirectmenu/copy" "")
; (gtk_accel_path "<Actions>/options/MeterFalloffFaster" "") ; (gtk_accel_path "<Actions>/options/MeterFalloffFaster" "")
(gtk_accel_path "<Actions>/Transport/ToggleRollForgetCapture" "<Control>space") (gtk_accel_path "<Actions>/Transport/ToggleRollForgetCapture" "<Control>space")
@ -23,7 +23,7 @@
; (gtk_accel_path "<Actions>/options/MeterFalloffSlow" "") ; (gtk_accel_path "<Actions>/options/MeterFalloffSlow" "")
; (gtk_accel_path "<Actions>/RegionList/rlHide" "") ; (gtk_accel_path "<Actions>/RegionList/rlHide" "")
; (gtk_accel_path "<Actions>/Main/Metering" "") ; (gtk_accel_path "<Actions>/Main/Metering" "")
(gtk_accel_path "<Actions>/Editor/playhead-to-next-region-end" "<Control>Tab") (gtk_accel_path "<Actions>/Editor/playhead-to-next-region-end" "<Control>period")
; (gtk_accel_path "<Actions>/Zoom/zoom-focus-playhead" "") ; (gtk_accel_path "<Actions>/Zoom/zoom-focus-playhead" "")
; (gtk_accel_path "<Actions>/Editor/center-edit-cursor" "") ; (gtk_accel_path "<Actions>/Editor/center-edit-cursor" "")
; (gtk_accel_path "<Actions>/Editor/Monitoring" "") ; (gtk_accel_path "<Actions>/Editor/Monitoring" "")
@ -61,7 +61,7 @@
(gtk_accel_path "<Actions>/Editor/jump-backward-to-mark" "<Control>KP_Left") (gtk_accel_path "<Actions>/Editor/jump-backward-to-mark" "<Control>KP_Left")
; (gtk_accel_path "<Actions>/Main/AudioFileFormatData" "") ; (gtk_accel_path "<Actions>/Main/AudioFileFormatData" "")
; (gtk_accel_path "<Actions>/options/MeterFalloffFastest" "") ; (gtk_accel_path "<Actions>/options/MeterFalloffFastest" "")
(gtk_accel_path "<Actions>/Editor/audition-at-mouse" "period") ; (gtk_accel_path "<Actions>/Editor/audition-at-mouse" "")
(gtk_accel_path "<Actions>/Transport/Forward" "<Control>rightarrow") (gtk_accel_path "<Actions>/Transport/Forward" "<Control>rightarrow")
; (gtk_accel_path "<Actions>/Snap/snap-to-smpte-seconds" "") ; (gtk_accel_path "<Actions>/Snap/snap-to-smpte-seconds" "")
; (gtk_accel_path "<Actions>/Snap/snap-to-smpte-frame" "") ; (gtk_accel_path "<Actions>/Snap/snap-to-smpte-frame" "")
@ -93,7 +93,7 @@
(gtk_accel_path "<Actions>/Editor/set-edit-cursor" "e") (gtk_accel_path "<Actions>/Editor/set-edit-cursor" "e")
; (gtk_accel_path "<Actions>/Editor/Smpte30drop" "") ; (gtk_accel_path "<Actions>/Editor/Smpte30drop" "")
; (gtk_accel_path "<Actions>/Zoom/zoom-focus-edit" "") ; (gtk_accel_path "<Actions>/Zoom/zoom-focus-edit" "")
(gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-start" "grave") (gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-start" "comma")
; (gtk_accel_path "<Actions>/Editor/EditCursorMovementOptions" "") ; (gtk_accel_path "<Actions>/Editor/EditCursorMovementOptions" "")
; (gtk_accel_path "<Actions>/redirectmenu/activate_all" "") ; (gtk_accel_path "<Actions>/redirectmenu/activate_all" "")
; (gtk_accel_path "<Actions>/Editor/addExternalAudioAsTapeTrack" "") ; (gtk_accel_path "<Actions>/Editor/addExternalAudioAsTapeTrack" "")
@ -112,7 +112,6 @@
(gtk_accel_path "<Actions>/Editor/extend-range-to-end-of-region" "rightanglebracket") (gtk_accel_path "<Actions>/Editor/extend-range-to-end-of-region" "rightanglebracket")
(gtk_accel_path "<Actions>/Editor/scroll-backward" "leftarrow") (gtk_accel_path "<Actions>/Editor/scroll-backward" "leftarrow")
(gtk_accel_path "<Actions>/Editor/start-range" "<Control>KP_Down") (gtk_accel_path "<Actions>/Editor/start-range" "<Control>KP_Down")
; (gtk_accel_path "<Actions>/Editor/ToggleTranzportSurface" "")
; (gtk_accel_path "<Actions>/ShuttleActions/SetShuttleUnitsSemitones" "") ; (gtk_accel_path "<Actions>/ShuttleActions/SetShuttleUnitsSemitones" "")
; (gtk_accel_path "<Actions>/JACK/JACKLatency128" "") ; (gtk_accel_path "<Actions>/JACK/JACKLatency128" "")
; (gtk_accel_path "<Actions>/Snap/snap-to-beat" "") ; (gtk_accel_path "<Actions>/Snap/snap-to-beat" "")
@ -124,6 +123,7 @@
; (gtk_accel_path "<Actions>/Editor/EditSelectRegionOptions" "") ; (gtk_accel_path "<Actions>/Editor/EditSelectRegionOptions" "")
(gtk_accel_path "<Actions>/Editor/crop" "c") (gtk_accel_path "<Actions>/Editor/crop" "c")
; (gtk_accel_path "<Actions>/redirectmenu/newsend" "") ; (gtk_accel_path "<Actions>/redirectmenu/newsend" "")
; (gtk_accel_path "<Actions>/Editor/ToggleGeneric MIDISurfaceSubMenu" "")
; (gtk_accel_path "<Actions>/Editor/MeterFalloff" "") ; (gtk_accel_path "<Actions>/Editor/MeterFalloff" "")
; (gtk_accel_path "<Actions>/RegionList/rlRemove" "") ; (gtk_accel_path "<Actions>/RegionList/rlRemove" "")
(gtk_accel_path "<Actions>/Transport/GotoStart" "Home") (gtk_accel_path "<Actions>/Transport/GotoStart" "Home")
@ -151,6 +151,7 @@
(gtk_accel_path "<Actions>/Common/goto-editor" "<Alt>e") (gtk_accel_path "<Actions>/Common/goto-editor" "<Alt>e")
(gtk_accel_path "<Actions>/Editor/select-all" "<Control>a") (gtk_accel_path "<Actions>/Editor/select-all" "<Control>a")
(gtk_accel_path "<Actions>/Editor/nudge-next-forward" "<Control>KP_Add") (gtk_accel_path "<Actions>/Editor/nudge-next-forward" "<Control>KP_Add")
; (gtk_accel_path "<Actions>/options/ShowSoloMutes" "")
; (gtk_accel_path "<Actions>/Snap/snap-to-eighths" "") ; (gtk_accel_path "<Actions>/Snap/snap-to-eighths" "")
(gtk_accel_path "<Actions>/Editor/select-all-after-playhead" "<Shift><Control>p") (gtk_accel_path "<Actions>/Editor/select-all-after-playhead" "<Shift><Control>p")
(gtk_accel_path "<Actions>/Common/ToggleMaximalEditor" "F11") (gtk_accel_path "<Actions>/Common/ToggleMaximalEditor" "F11")
@ -272,7 +273,7 @@
; (gtk_accel_path "<Actions>/options/VerifyRemoveLastCapture" "") ; (gtk_accel_path "<Actions>/options/VerifyRemoveLastCapture" "")
; (gtk_accel_path "<Actions>/options/OutputAutoConnectPhysical" "") ; (gtk_accel_path "<Actions>/options/OutputAutoConnectPhysical" "")
(gtk_accel_path "<Actions>/Editor/step-tracks-up" "uparrow") (gtk_accel_path "<Actions>/Editor/step-tracks-up" "uparrow")
(gtk_accel_path "<Actions>/Editor/playhead-to-next-region-start" "Tab") (gtk_accel_path "<Actions>/Editor/playhead-to-next-region-start" "period")
; (gtk_accel_path "<Actions>/options/SendMMC" "") ; (gtk_accel_path "<Actions>/options/SendMMC" "")
; (gtk_accel_path "<Actions>/Editor/toggle-auto-xfades" "") ; (gtk_accel_path "<Actions>/Editor/toggle-auto-xfades" "")
; (gtk_accel_path "<Actions>/Main/AudioFileFormatHeader" "") ; (gtk_accel_path "<Actions>/Main/AudioFileFormatHeader" "")
@ -305,6 +306,7 @@
; (gtk_accel_path "<Actions>/Snap/snap-to-region-sync" "") ; (gtk_accel_path "<Actions>/Snap/snap-to-region-sync" "")
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-previous-region-sync" "apostrophe") (gtk_accel_path "<Actions>/Editor/edit-cursor-to-previous-region-sync" "apostrophe")
; (gtk_accel_path "<Actions>/redirectmenu/clear" "") ; (gtk_accel_path "<Actions>/redirectmenu/clear" "")
; (gtk_accel_path "<Actions>/Editor/ToggleGeneric MIDISurfaceFeedback" "")
; (gtk_accel_path "<Actions>/Editor/PullupPlus4Minus1" "") ; (gtk_accel_path "<Actions>/Editor/PullupPlus4Minus1" "")
; (gtk_accel_path "<Actions>/JACK/JACKLatency512" "") ; (gtk_accel_path "<Actions>/JACK/JACKLatency512" "")
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-next-region-end" "<Control>bracketright") (gtk_accel_path "<Actions>/Editor/edit-cursor-to-next-region-end" "<Control>bracketright")

View file

@ -101,3 +101,6 @@ cTrimHandleLockedStart 0.92 0.06 0.06 0.16
cTrimHandleLockedEnd 0.92 0.06 0.06 0.16 cTrimHandleLockedEnd 0.92 0.06 0.06 0.16
cTrimHandleStart 0.10 0.00 1.00 0.27 cTrimHandleStart 0.10 0.00 1.00 0.27
cTrimHandleEnd 0.10 0.00 1.00 0.27 cTrimHandleEnd 0.10 0.00 1.00 0.27
cEditCursor 0.00 0.00 1.00 1.00
cPlayHead 1.00 0.00 0.00 1.00

View file

@ -291,8 +291,12 @@
<menuitem action='OutputAutoConnectMaster'/> <menuitem action='OutputAutoConnectMaster'/>
<menuitem action='OutputAutoConnectManual'/> <menuitem action='OutputAutoConnectManual'/>
</menu> </menu>
<menu action='ControlSurfaces'/> <menu action='ControlSurfaces'>
<menu action='Monitoring'> <menuitem action='RemoteUserDefined'/>
<menuitem action='RemoteMixerDefined'/>
<menuitem action='RemoteEditorDefined'/>
</menu>
<menu action='Monitoring'>
<menuitem action='UseHardwareMonitoring'/> <menuitem action='UseHardwareMonitoring'/>
<menuitem action='UseSoftwareMonitoring'/> <menuitem action='UseSoftwareMonitoring'/>
<menuitem action='UseExternalMonitoring'/> <menuitem action='UseExternalMonitoring'/>
@ -318,6 +322,7 @@
<menuitem action='LatchedSolo'/> <menuitem action='LatchedSolo'/>
<menuitem action='SoloInPlace'/> <menuitem action='SoloInPlace'/>
<menuitem action='SoloViaBus'/> <menuitem action='SoloViaBus'/>
<menuitem action='ShowSoloMutes'/>
</menu> </menu>
<menu action='Crossfades'> <menu action='Crossfades'>
<menuitem action='toggle-xfades-active'/> <menuitem action='toggle-xfades-active'/>
@ -337,6 +342,7 @@
<menuitem action='SendMMC'/> <menuitem action='SendMMC'/>
<menuitem action='UseMMC'/> <menuitem action='UseMMC'/>
<separator/> <separator/>
<menuitem action='UseOSC'/>
<menuitem action='StopPluginsWithTransport'/> <menuitem action='StopPluginsWithTransport'/>
<menuitem action='DoNotRunPluginsWhileRecording'/> <menuitem action='DoNotRunPluginsWhileRecording'/>
<menuitem action='LatchedRecordEnable'/> <menuitem action='LatchedRecordEnable'/>

View file

@ -80,7 +80,7 @@ style "marker_text"
style "time_axis_view_item_name" style "time_axis_view_item_name"
{ {
font_name = "sans 6" font_name = "sans 9"
} }
style "default_base" = "medium_text" style "default_base" = "medium_text"
@ -185,24 +185,58 @@ style "small_red_active_and_selected_button" = "small_button"
bg[SELECTED] = { 1.0, 0, 0} bg[SELECTED] = { 1.0, 0, 0}
} }
style "track_rec_enable_button" = "small_button"
{
fg[SELECTED] = { 0.0, 0.0, 0.0 }
fg[ACTIVE] = { 0.0, 0.0, 0.0 }
fg[PRELIGHT] = { 0.0, 0.0, 0.0 }
bg[SELECTED] = { 1.0, 0.0, 0.0 }
bg[ACTIVE] = { 0.91, 0.68, 0.68}
bg[PRELIGHT] = { 1.0, 0.0, 0.0 }
}
style "gain_fader" style "gain_fader"
{ {
bg[NORMAL] = { 0.269, 0.269, 0.300} bg[NORMAL] = { 0.269, 0.269, 0.300}
bg[ACTIVE] = { 0.152, 0.152, 0.168 } bg[ACTIVE] = { 0.152, 0.152, 0.168 }
} }
style "mixer_rec_enable_button" = "track_rec_enable_button"
style "track_rec_enable_button" = "small_button"
{
}
style "track_rec_enable_button_active" = "small_button"
{
fg[SELECTED] = { 0.0, 0.0, 0.0 }
fg[ACTIVE] = { 0.0, 0.0, 0.0 }
fg[PRELIGHT] = { 0.0, 0.0, 0.0 }
fg[NORMAL] = { 0.0, 0.0, 0.0 }
bg[NORMAL] = { 1.0, 0.0, 0.0 }
bg[ACTIVE] = { 1.0, 0.0, 0.0 }
bg[SELECTED] = { 1.0, 0.0, 0.0 }
bg[PRELIGHT] = { 1.0, 0.0, 0.0 }
}
style "track_rec_enable_button_alternate" = "small_button"
{
fg[SELECTED] = { 0.0, 0.0, 0.0 }
fg[ACTIVE] = { 0.0, 0.0, 0.0 }
fg[PRELIGHT] = { 0.0, 0.0, 0.0 }
fg[NORMAL] = { 0.0, 0.0, 0.0 }
bg[NORMAL] = { 0.91, 0.68, 0.68}
bg[ACTIVE] = { 0.91, 0.68, 0.68}
bg[SELECTED] = { 0.91, 0.68, 0.68}
bg[PRELIGHT] = { 0.91, 0.68, 0.68}
}
style "mixer_track_rec_enable_button" = "track_rec_enable_button"
{
font_name = "sans 7"
xthickness = 0
ythickness = 0
}
style "mixer_track_rec_enable_button_alternate" = "track_rec_enable_button_alternate"
{
font_name = "sans 7"
xthickness = 0
ythickness = 0
}
style "mixer_track_rec_enable_button_active" = "track_rec_enable_button_active"
{ {
font_name = "sans 7" font_name = "sans 7"
xthickness = 0 xthickness = 0
@ -211,20 +245,33 @@ style "mixer_rec_enable_button" = "track_rec_enable_button"
style "solo_button" = "small_button" style "solo_button" = "small_button"
{ {
bg[PRELIGHT] = { 0, 1.0, 0 }
bg[ACTIVE] = { 0.66, 0.97, 0.19 }
fg[PRELIGHT] = { 0, 0, 0 }
fg[ACTIVE] = { 0, 0, 0 }
} }
style "safe_solo_button" = "small_button" style "solo_button_alternate" = "small_button"
{ {
bg[PRELIGHT] = { 0, 1.0, 0 } bg[NORMAL] = { 0.19, 0.97, 0.69 } # solo-safe
bg[ACTIVE] = { 0.19, 0.97, 0.69 } bg[ACTIVE] = { 0.19, 0.97, 0.69 } # solo-safe
bg[SELECTED] = { 0.19, 0.97, 0.69 } # solo-safe
bg[PRELIGHT] = { 0.19, 0.97, 0.69 } # solo-safe
fg[PRELIGHT] = { 0, 0, 0 }
fg[ACTIVE] = { 0, 0, 0 } fg[ACTIVE] = { 0, 0, 0 }
fg[SELECTED] = { 0, 0, 0 }
fg[NORMAL] = { 0, 0, 0 }
fg[PRELIGHT] = { 0, 0, 0 }
}
style "solo_button_active" = "small_button"
{
bg[NORMAL] = { 0.66, 0.97, 0.19 } # solo
bg[ACTIVE] = { 0.66, 0.97, 0.19 } # solo
bg[SELECTED] = { 0.66, 0.97, 0.19 } # solo
bg[PRELIGHT] = { 0.66, 0.97, 0.19 } # solo
fg[ACTIVE] = { 0, 0, 0 }
fg[SELECTED] = { 0, 0, 0 }
fg[NORMAL] = { 0, 0, 0 }
fg[PRELIGHT] = { 0, 0, 0 }
} }
style "mixer_solo_button" = "solo_button" style "mixer_solo_button" = "solo_button"
@ -232,27 +279,72 @@ style "mixer_solo_button" = "solo_button"
font_name = "sans 7" font_name = "sans 7"
xthickness = 0 xthickness = 0
ythickness = 0 ythickness = 0
} }
style "mixer_safe_solo_button" = "safe_solo_button" style "mixer_solo_button_alternate" = "solo_button_alternate"
{
font_name = "sans 7"
xthickness = 0
ythickness = 0
}
style "mixer_solo_button_active" = "solo_button_active"
{ {
font_name = "sans 7" font_name = "sans 7"
xthickness = 0 xthickness = 0
ythickness = 0 ythickness = 0
} }
style "mute_button" = "small_button" style "mute_button" = "small_button"
{ {
bg[PRELIGHT] = { 1.0, 0.65, 0.13 }
bg[ACTIVE] = { 1.0, 0.98, 0.53 }
fg[PRELIGHT] = { 0, 0, 0 }
fg[ACTIVE] = { 0, 0, 0 }
} }
style "mute_button_alternate" = "small_button"
{
bg[ACTIVE] = { 1.0, 0.98, 0.53 }
bg[NORMAL] = { 1.0, 0.98, 0.53 }
bg[SELECTED] = { 1.0, 0.98, 0.53 }
bg[PRELIGHT] = { 1.0, 0.98, 0.53 }
fg[SELECTED] = { 0, 0, 0 }
fg[ACTIVE] = { 0, 0, 0 }
fg[NORMAL] = { 0, 0, 0 }
fg[PRELIGHT] = { 0, 0, 0 }
}
style "mute_button_active" = "small_button"
{
bg[NORMAL] = { 0.90, 0.89, 0.73 }
bg[ACTIVE] = { 0.90, 0.89, 0.73 }
bg[PRELIGHT] = { 0.90, 0.89, 0.73 }
bg[SELECTED] = { 0.90, 0.89, 0.73 }
fg[SELECTED] = { 0, 0, 0 }
fg[ACTIVE] = { 0, 0, 0 }
fg[NORMAL] = { 0, 0, 0 }
fg[PRELIGHT] = { 0, 0, 0 }
}
style "mixer_mute_button" = "mute_button"
{
font_name = "sans 7"
xthickness = 0
ythickness = 0
}
style "mixer_mute_button_alternate" = "mute_button_alternate"
{
font_name = "sans 7"
xthickness = 0
ythickness = 0
}
style "mixer_mute_button_active" = "mute_button_active"
{
font_name = "sans 7"
xthickness = 0
ythickness = 0
}
style "multiline_combo" = "small_button" style "multiline_combo" = "small_button"
{ {
@ -291,14 +383,39 @@ style "time_button" = "default_buttons_menus"
style "transport_button" style "transport_button"
{ {
}
style "transport_button_active"
{
bg[NORMAL] = { 0.50, 1.0, 0.50 }
bg[ACTIVE] = { 0.50, 1.0, 0.50 } bg[ACTIVE] = { 0.50, 1.0, 0.50 }
bg[SELECTED] = { 0.50, 1.0, 0.50 }
bg[PRELIGHT] = { 0.50, 1.0, 0.50 }
fg[NORMAL] = { 0, 0, 0 }
fg[PRELIGHT] = { 0, 0, 0 }
fg[SELECTED] = { 0, 0, 0 }
fg[ACTIVE] = { 0, 0, 0 } fg[ACTIVE] = { 0, 0, 0 }
} }
style "transport_rec_button" style "transport_rec_button"
{
}
style "transport_rec_button_active"
{ {
bg[ACTIVE] = { 1.0, 0, 0 } bg[ACTIVE] = { 1.0, 0, 0 }
bg[PRELIGHT] = { 0.91, 0.68, 0.68 } #blinking rec button color bg[NORMAL] = { 1.0, 0, 0 }
bg[SELECTED] = { 1.0, 0, 0 }
bg[PRELIGHT] = { 1.0, 0, 0 }
}
style "transport_rec_button_alternate"
{
bg[PRELIGHT] = { 0.91, 0.68, 0.68 }
bg[NORMAL] = { 0.91, 0.68, 0.68 }
bg[SELECTED] = { 0.91, 0.68, 0.68 }
bg[ACTIVE] = { 0.91, 0.68, 0.68 }
} }
style "shuttle_control" = "very_small_text" style "shuttle_control" = "very_small_text"
@ -1034,361 +1151,366 @@ style "ardour_button" ="default_buttons_menus"
} }
#--------------------------------------------------------------- #---------------------------------------------------------------
widget "*FirstActionMessage" style "first_action_message"
widget "*VerboseCanvasCursor" style "verbose_canvas_cursor"
widget "*MarkerText" style "marker_text"
widget "*TimeAxisViewItemName*" style "time_axis_view_item_name"
#widget "*ExportProgress" style "default_buttons_menus"
widget "*ExportFileLabel" style "small_bold_text"
widget "*ExportFormatLabel" style "medium_bold_text"
widget "*ExportHeader" style "small_bold_text"
widget "*ExportFileDisplay" style "medium_entry"
widget "*ExportFormatDisplay" style "medium_entry"
widget "*ExportCheckbox" style "small_entry"
widget "*ExportTrackSelector*" style "medium_entry_noselection_bg"
widget "*ArdourContextMenu*" style "default_buttons_menus"
widget "*EditGroupTitleButton*" style "default_buttons_menus"
widget "*MixerGroupTitleButton*" style "default_buttons_menus"
widget "*ErrorLogCloseButton" style "default_buttons_menus"
widget "*EditorGTKButton*" style "default_buttons_menus"
widget "*ToolbarButton" style "default_buttons_menus"
widget "*ToolbarButton*" style "default_buttons_menus"
widget "*CrossfadeEditButton" style "default_buttons_menus"
widget "*CrossfadeEditButton*" style "default_buttons_menus"
widget "*TrackHistoryButton*" style "default_buttons_menus"
widget "*TrackSizeButton*" style "default_buttons_menus"
widget "*TrackPlaylistButton*" style "default_buttons_menus"
widget "*TrackAutomationButton*" style "default_buttons_menus"
widget "*TrackGroupButton*" style "default_buttons_menus"
widget "*TrackMixButton*" style "default_buttons_menus"
widget "*TrackVisualButton*" style "default_buttons_menus"
widget "*TrackRemoveButton*" style "default_buttons_menus"
widget "*BaseButton" style "default_buttons_menus"
widget "*TakeButtonLabel" style "default_buttons_menus"
widget "*MixerWidthButton" style "default_buttons_menus"
widget "*MixerHideButton" style "default_buttons_menus"
widget "*MixerSendButton" style "default_buttons_menus"
widget "*MixerSendButtonLabel" style "default_buttons_menus"
widget "*MixerSendSwitch" style "default_buttons_menus"
widget "*MixerInsertButton" style "default_buttons_menus"
widget "*MixerInsertButtonLabel" style "default_buttons_menus"
widget "*MixerInsertSwitch" style "default_buttons_menus"
widget "*MixerMonitorInputButton*" style "very_small_button"
widget "*MixerMonitorInputButton.*" style "very_small_button"
widget "*MixerIOButton" style "very_small_button"
widget "*MixerIOButtonLabel" style "very_small_button"
widget "*AddRouteDialogSpinner" style "ardour_adjusters"
widget "*AddRouteDialogRadioButton*" style "options_window"
widget "*OptionsNotebook" style "options_window"
widget "*OptionEditorToggleButton*" style "options_window"
widget "*OptionsLabel" style "options_window"
widget "*OptionEditorAuditionerLabel" style "options_window"
widget "*OptionsEntry" style "option_entry"
widget "*InspectorNotebook" style "options_window"
widget "*NewSessionDialog" style "options_window"
widget "*NewSessionDialogButton*" style "options_window"
widget "*MixerSendSwitch*" style "very_small_red_active_and_selected_button"
widget "*OptionEditorToggleButton" style "small_red_active_and_selected_button"
widget "*NewSessionDialogButton" style "small_red_active_and_selected_button"
widget "*MixerRecordEnableButton" style "mixer_rec_enable_button"
widget "*MixerRecordEnableButton*" style "mixer_rec_enable_button"
widget "*TrackRecordEnableButton" style "track_rec_enable_button"
widget "*TrackRecordEnableButton*" style "track_rec_enable_button"
widget "*TrackMuteButton*" style "mute_button"
widget "*TrackLoopButton*" style "track_loop_button"
widget "*PanAutomationLineSelector*" style "multiline_combo"
widget "*EditorTimeButton*" style "time_button"
widget "*EditorMixerButton*" style "default_buttons_menus"
widget "*SoloButton*" style "solo_button"
widget "*SoloButton.*" style "solo_button"
widget "*SafeSoloButton*" style "safe_solo_button"
widget "*SafeSoloButton.*" style "safe_solo_button"
widget "*MixerPhaseInvertButton*" style "very_small_button"
widget "*MixerPhaseInvertButton.*" style "very_small_button"
widget "*MixerAutomationRecordingButton*" style "very_small_button"
widget "*MixerAutomationRecordingButton.*" style "very_small_button"
widget "*MixerAutomationModeButton*" style "very_small_button"
widget "*MixerAutomationModeButton.*" style "very_small_button"
widget "*MixerAutomationPlaybackButton*" style "very_small_button"
widget "*MixerAutomationPlaybackButton.*" style "very_small_button"
widget "*MixerMuteButton*" style "mixer_mute_button"
widget "*MixerMuteButton.*" style "mixer_mute_button"
widget "*MixerSoloButton*" style "mixer_solo_button"
widget "*MixerSoloButton.*" style "mixer_solo_button"
widget "*MixerNameButton" style "very_small_button"
widget "*MixerNameButtonLabel" style "very_small_button"
widget "*MixerGroupButton" style "very_small_button"
widget "*MixerGroupButtonLabel" style "very_small_button"
widget "*MixerCommentButton" style "very_small_button"
widget "*MixerCommentButton*" style "very_small_button"
widget "*EditGroupButton" style "very_small_button"
widget "*EditGroupButtonLabel" style "very_small_button"
widget "*TransportButton" style "transport_button"
widget "*TransportButton*" style "transport_button"
widget "*ShuttleButton" style "transport_button"
widget "*ShuttleButton*" style "transport_button"
widget "*ShuttleDisplay" style "transport_button"
widget "*ShuttleDisplay*" style "transport_button"
widget "*ShuttleControl" style "shuttle_control"
widget "*TransportRecButton" style "transport_rec_button"
widget "*TransportRecButton*" style "transport_rec_button"
widget "*RecordingXrunWarningWindow" style "xrun_warn"
widget "*RecordingXrunWarningWindow*" style "xrun_warn"
/*widget "*MainMenuBar" style "menu_bar_base"*/
widget "*ErrorMessage" style "error_message"
widget "*FatalMessage" style "fatal_message"
widget "*InfoMessage" style "info_message"
widget "*WarningMessage" style "warning_message"
widget "*BigClockNonRecording" style "non_recording_big_clock_display"
widget "*BigClockRecording" style "recording_big_clock_display"
widget "*TransportClockDisplay" style "transport_clock_display"
widget "*SecondaryClockDisplay" style "transport_clock_display"
widget "*AudioClockFramesUpperInfo" style "tempo_meter_clock_display"
widget "*AudioClockFramesLowerInfo" style "tempo_meter_clock_display"
widget "*AudioClockSMPTEUpperInfo" style "tempo_meter_clock_display"
widget "*AudioClockSMPTELowerInfo" style "tempo_meter_clock_display"
widget "*AudioClockBBTUpperInfo" style "tempo_meter_clock_display"
widget "*AudioClockBBTLowerInfo" style "tempo_meter_clock_display"
widget "*SelectionStartClock" style "default_clock_display"
widget "*SelectionEndClock" style "default_clock_display"
widget "*EditCursorClock" style "default_clock_display"
widget "*PreRollClock" style "default_clock_display"
widget "*PostRollClock" style "default_clock_display"
widget "*NudgeClock" style "default_clock_display"
widget "*ZoomRangeClock" style "default_clock_display"
widget "*SMPTEOffsetClock" style "default_clock_display"
widget "*TransportLabel" style "small_bold_text"
widget "*TakeLabel" style "small_bold_text"
widget "*LocationLabel" style "small_bold_text"
widget "*WipeLabel" style "small_bold_text"
widget "*TakeTagLabel" style "small_bold_text"
widget "*ToolBarLabel" style "small_bold_text"
widget "*EditorDisplayLabel" style "small_bold_text"
widget "*NewSessionLabel" style "large_text"
widget "*GlobalButtonLabel" style "default_buttons_menus"
widget "*ClickButton" style "medium_entry"
widget "*RegionNameDisplay" style "medium_entry"
widget "*PluginDisplay" style "medium_entry"
widget "*SelectionDisplay" style "medium_entry"
widget "*HistorySelector" style "medium_entry"
widget "*LocationSelector" style "medium_entry"
widget "*TakeSelector" style "medium_entry"
widget "*RegionSelector" style "medium_entry"
widget "*SMPTERuler" style "editor_time_ruler"
widget "*BBTRuler" style "editor_time_ruler"
widget "*FramesRuler" style "editor_time_ruler"
widget "*MinSecRuler" style "editor_time_ruler"
widget "*BaseFrame" style "base_frame"
widget "*AudioBusControlsBaseUnselected" style "audio_bus_base"
widget "*AudioBusControlsBaseInactiveUnselected" style "track_controls_inactive"
widget "*AudioBusControlsBaseInactiveSelected" style "track_controls_inactive"
widget "*AudioBusControlsBaseSelected" style "edit_controls_base_selected"
widget "*AudioTimeAxisViewControlsBaseUnselected" style "audio_track_base"
widget "*AudioTrackStripBase" style "audio_track_base"
widget "*AudioTrackControlsBaseUnselected" style "audio_track_base"
widget "*AudioTrackFader" style "gain_fader"
widget "*AudioBusStripBase" style "audio_bus_base"
widget "*AudioBusFader" style "gain_fader"
widget "*MidiBusControlsBaseUnselected" style "midi_bus_base"
widget "*MidiBusControlsBaseInactiveUnselected" style "track_controls_inactive"
widget "*MidiBusControlsBaseInactiveSelected" style "track_controls_inactive"
widget "*MidiBusControlsBaseSelected" style "edit_controls_base_selected"
widget "*MidiTimeAxisViewControlsBaseUnselected" style "midi_track_base"
widget "*MidiTrackStripBase" style "midi_track_base"
widget "*MidiTrackControlsBaseUnselected" style "midi_track_base"
widget "*MidiTrackFader" style "midi_track_base"
widget "*MidiBusStripBase" style "midi_bus_base"
widget "*MidiBusFader" style "midi_bus_base"
widget "*TrackSeparator" style "track_separator"
widget "*TrackEditIndicator0*" style "edit_group_0"
widget "*TrackEditIndicator1*" style "edit_group_1"
widget "*TrackEditIndicator2*" style "edit_group_2"
widget "*TrackEditIndicator3*" style "edit_group_3"
widget "*TrackEditIndicator4*" style "edit_group_3"
widget "*TrackEditIndicator5*" style "edit_group_3"
widget "*TrackEditIndicator6*" style "edit_group_3"
widget "*TrackEditIndicator7*" style "edit_group_3"
widget "*EditorTrackNameDisplay" style "track_name_display"
widget "*EditorTrackNameDisplay*" style "track_name_display"
widget "*EditorActiveTrackNameDisplay" style "active_track_name_display"
widget "*EditorActiveTrackNameDisplay*" style "active_track_name_display"
widget "*CrossfadeEditAuditionButton" style "red_when_active"
widget "*CrossfadeEditAuditionButton*" style "red_when_active"
widget "*CrossfadeEditCurveButton" style "red_when_active"
widget "*CrossfadeEditCurveButton*" style "red_when_active"
widget "*CrossfadeEditLabel" style "medium_text"
widget "*CrossfadeEditFrame" style "base_frame"
widget "*MouseModeButton" style "default_buttons_menus"
widget "*MouseModeButton*" style "default_buttons_menus"
widget "*EditorMainCanvas" style "main_canvas_area"
widget "*AudioTrackControlsBaseInactiveUnselected" style "track_controls_inactive"
widget "*AutomationTrackControlsBaseInactiveUnselected" style "track_controls_inactive"
widget "*AutomationTrackName" style "automation_track_name"
widget "*AudioTrackControlsBaseInactiveSelected" style "track_controls_inactive"
widget "*AutomationTrackControlsBaseInactiveSelected" style "track_controls_inactive"
widget "*AudioTrackStripBaseInactive" style "track_controls_inactive"
widget "*AudioBusStripBaseInactive" style "track_controls_inactive"
widget "*AudioTrackControlsBaseSelected" style "edit_controls_base_selected"
widget "*AutomationTrackControlsBase" style "automation_track_controls_base"
widget "*AutomationTrackControlsBaseSelected" style "edit_controls_base_selected"
/*widget "*EditorMenuBar*" style "black_mackie_menu_bar"
widget "*MainMenuBar*" style "black_mackie_menu_bar"*/
widget "*ZoomClickBox" style "medium_bold_entry"
widget "*PluginParameterLabel" style "medium_text"
widget "*PluginNameInfo" style "plugin_name_text"
widget "*PluginMakerInfo" style "plugin_maker_text"
widget "*PluginParameterInfo" style "medium_text"
widget "*MotionControllerValue" style "medium_entry"
widget "*ParameterValueDisplay" style "medium_bold_entry"
widget "*PluginUIClickBox" style "medium_bold_entry"
widget "*PluginUIClickBox*" style "medium_bold_entry"
widget "*PluginSlider" style "plugin_slider"
widget "*RedirectSelector" style "redirect_list_display"
widget "*RedirectSelector.*" style "redirect_list_display"
widget "*EditGroupDisplay" style "treeview_display"
widget "*TrackListDisplay" style "treeview_display"
widget "*RegionListDisplay" style "treeview_display"
widget "*NamedSelectionDisplay" style "treeview_display"
widget "*SnapshotDisplay" style "treeview_display"
widget "*MixerTrackCommentArea" style "option_entry"
widget "*MixerPanZone" style "pan_zone"
widget "*MixerTrackDisplayList" style "treeview_display"
widget "*MixerSnapshotDisplayList" style "treeview_display"
widget "*MixerAuxDisplayList" style "treeview_display"
widget "*MixerGroupList" style "treeview_display"
widget "*RegionEditorLabel" style "medium_text"
widget "*RegionEditorSmallLabel" style "small_text"
widget "*RegionEditorEntry" style "medium_entry"
widget "*RegionEditorClock" style "default_clock_display"
widget "*RegionEditorToggleButton" style "paler_red_when_active"
widget "*RegionEditorToggleButton*" style "paler_red_when_active"
widget "*MixerStripSpeedBase" style "small_entry"
widget "*MixerStripSpeedBase*" style "small_entry"
widget "*MixerStripSpeedBaseNotOne" style "small_red_on_black_entry"
widget "*MixerStripSpeedBaseNotOne*" style "small_red_on_black_entry"
widget "*MixerStripGainDisplay" style "small_entry"
widget "*MixerStripGainDisplay*" style "small_entry"
widget "*MixerStripGainUnitButton" style "very_small_button"
widget "*MixerStripGainUnitButton*" style "very_small_button"
widget "*MixerStripMeterPreButton" style "very_small_button"
widget "*MixerStripMeterPreButton*" style "very_small_button"
widget "*MixerStripPeakDisplay*" style "red_active_small_entry"
widget "*MixerStripPeakDisplayPeak*" style "peak_display_peaked_entry"
widget "*MixerStripSelectedFrame" style "selected_strip_frame"
widget "*MixerStripFrame" style "base_frame"
widget "*HWMonitorButton" style "red_when_active"
widget "*HWMonitorButton*" style "red_when_active"
widget "*BypassButton" style "red_when_active"
widget "*BypassButton*" style "red_when_active"
widget "*TransportSoloAlert" style "flashing_alert"
widget "*TransportSoloAlert.*" style "flashing_alert"
widget "*TransportAuditioningAlert" style "flashing_alert"
widget "*TransportAuditioningAlert.*" style "flashing_alert"
widget "*FadeCurve" style "medium_bold_entry"
widget "*FadeCurve*" style "medium_bold_entry"
widget "*IOSelectorButton" style "default_buttons_menus"
widget "*IOSelectorButton*" style "default_buttons_menus"
widget "*IOSelectorList" style "medium_entry_noselection_fg"
widget "*IOSelectorPortList" style "io_selector_port_list"
widget "*IOSelectorPortList.*" style "io_selector_port_list"
widget "*IOSelectorPortListSelected" style "selected_io_selector_port_list"
widget "*IOSelectorPortListSelected.*" style "selected_io_selector_port_list"
widget "*IOSelectorNotebook" style "io_selector_notebook"
widget "*IOSelectorNotebookTab" style "io_selector_notebook"
widget "*IOSelectorFrame" style "base_frame"
widget "*ConnectionEditorButton" style "default_buttons_menus"
widget "*ConnectionEditorButton*" style "default_buttons_menus"
widget "*ConnectionEditorList" style "medium_entry_noselection_fg"
widget "*ConnectionEditorConnectionList" style "medium_entry"
widget "*ConnectionEditorPortList" style "io_selector_port_list"
widget "*ConnectionEditorPortListSelected" style "selected_io_selector_port_list"
widget "*ConnectionEditorNotebook" style "io_selector_notebook"
widget "*ConnectionEditorNotebookTab" style "io_selector_notebook"
widget "*ConnectionEditorFrame" style "base_frame"
widget "*RouteParamsListDisplay" style "inspector_track_list_display"
widget "*RouteParamsPreListDisplay" style "inspector_redirect_list_display"
widget "*RouteParamsPostListDisplay" style "inspector_redirect_list_display"
widget "*TearOffArrow" style "tearoff_arrow"
widget "*RouteParamsTitleButton" style "medium_text"
widget "*RouteParamsTitleLabel" style "medium_text"
widget "*PluginAutomateRecordButton" style "small_red_active_and_selected_button"
widget "*PluginAutomateRecordButton*" style "small_red_active_and_selected_button"
widget "*PluginAutomatePlayButton" style "small_red_active_and_selected_button"
widget "*PluginAutomatePlayButton*" style "small_red_active_and_selected_button"
widget "*PluginAutomateButton" style "small_button"
widget "*PluginAutomateButton*" style "small_button"
widget "*PluginSaveButton" style "small_button"
widget "*PluginSaveButton*" style "small_button"
widget "*PluginLoadButton" style "small_button"
widget "*PluginLoadButton*" style "small_button"
widget "*FaderMetricsStrip" style "meter_metrics_strip"
widget "*MeterMetricsStrip" style "meter_metrics_strip"
widget "*MetricDialogFrame" style "base_frame"
widget "*MetricEntry" style "medium_bold_entry"
widget "*MetricButton" style "default_buttons_menus"
widget "*MetricButton.*" style "default_buttons_menus"
widget "*MetricLabel" style "medium_text"
widget "*TimeStretchButton" style "default_buttons_menus"
widget "*TimeStretchButton.*" style "default_buttons_menus"
widget "*TimeStretchProgress" style "default_buttons_menus"
widget "*ChoiceWindow" style "default_buttons_menus"
widget "*ChoicePrompt" style "default_buttons_menus"
widget "*ChoiceButton" style "default_buttons_menus"
widget "*ChoiceButton*" style "default_buttons_menus"
widget "*SelectionModeButton" style "default_buttons_menus"
widget "*SelectionModeButton*" style "default_buttons_menus"
widget "*TrackLabel" style "medium_text"
widget "*TrackPlugName" style "medium_text"
widget "*TrackParameterName" style "small_text"
widget "*AddRouteDialog*" style "medium_text"
widget "*AddRouteDialog.GtkLabel" style "medium_text"
widget "*AddRouteDialogChannelChoice" style "medium_bold_entry"
widget "*AddRouteDialogSpinner" style "medium_bold_entry"
widget "*AddRouteDialogSpinner*" style "medium_bold_entry"
widget "*AddRouteDialogRadioButton" style "red_when_active"
widget "*AddRouteDialogButton" style "default_buttons_menus"
widget "*AddRouteDialogNameTemplateEntry" style "medium_bold_entry"
widget "*NewSessionIOLabel" style "larger_bold_text"
widget "*NewSessionSR1Label" style "red_medium_text"
widget "*NewSessionSR2Label" style "medium_text"
widget "*NewSessionChannelChoice" style "medium_bold_entry"
widget "*NewSessionMainButton" style "larger_bold_text"
widget "*NewSessionMainButton*" style "larger_bold_text"
widget "*NewSessionMainLabel" style "larger_bold_text"
widget "*LocationEditRowClock" style "location_rows_clock"
widget "*LocationEditNameLabel" style "medium_text"
widget "*LocationEditSetButton" style "location_row_button"
widget "*LocationEditSetButton*" style "location_row_button"
widget "*LocationEditGoButton" style "location_row_button"
widget "*LocationEditGoButton*" style "location_row_button"
widget "*LocationEditCdButton" style "small_red_active_and_selected_button"
widget "*LocationEditCdButton*" style "small_red_active_and_selected_button"
widget "*LocationEditHideButton" style "small_red_active_and_selected_button"
widget "*LocationEditHideButton*" style "small_red_active_and_selected_button"
widget "*LocationEditNumberLabel" style "small_text"
widget "*LocationLocEditorFrame" style "base_frame"
widget "*LocationRangeEditorFrame" style "base_frame"
widget "*LocationEditNameEntry" style "option_entry"
widget "*LocationAddLocationButton" style "default_buttons_menus"
widget "*LocationAddLocationButton*" style "default_buttons_menus"
widget "*LocationAddRangeButton" style "default_buttons_menus"
widget "*LocationAddRangeButton*" style "default_buttons_menus"
widget "*LocationEditRemoveButton" style "location_row_button"
widget "*LocationEditRemoveButton*" style "location_row_button"
widget "*PanSlider" style "pan_slider"
widget "*PanningLinkButton" style "mixer_red_active_button"
widget "*PanningLinkButton.*" style "mixer_red_active_button"
widget "*PanningLinkDirectionButton" style "very_small_button"
widget "*PanningLinkDirectionButton.*" style "very_small_button"
widget "*ChannelCountSelector" style "medium_bold_entry"
widget "*ChannelCountSelector.GtkArrow" style "default_buttons_menus"
widget "*RegionListWholeFile" style "treeview_parent_node"
widget "*EditorHScrollbar" style "editor_hscrollbar"
class "GtkWidget" style "default_base" class "GtkWidget" style:highest "default_base"
class "GtkScrollbar" style "ardour_adjusters" class "GtkScrollbar" style:highest "ardour_adjusters"
class "GtkLabel" style "default_buttons_menus" class "GtkLabel" style:highest "default_buttons_menus"
class "GtkButton" style "ardour_button" class "GtkButton" style:highest "ardour_button"
class "GtkArrow" style "tearoff_arrow" class "GtkArrow" style:highest "tearoff_arrow"
class "GtkProgressBar" style "ardour_progressbars" class "GtkProgressBar" style:highest "ardour_progressbars"
widget "*FirstActionMessage" style:highest "first_action_message"
widget "*VerboseCanvasCursor" style:highest "verbose_canvas_cursor"
widget "*MarkerText" style:highest "marker_text"
widget "*TimeAxisViewItemName*" style:highest "time_axis_view_item_name"
#widget "*ExportProgress" style:highest "default_buttons_menus"
widget "*ExportFileLabel" style:highest "small_bold_text"
widget "*ExportFormatLabel" style:highest "medium_bold_text"
widget "*ExportHeader" style:highest "small_bold_text"
widget "*ExportFileDisplay" style:highest "medium_entry"
widget "*ExportFormatDisplay" style:highest "medium_entry"
widget "*ExportCheckbox" style:highest "small_entry"
widget "*ExportTrackSelector*" style:highest "medium_entry_noselection_bg"
widget "*EditModeSelector" style:highest "medium_bold_entry"
widget "*SnapTypeSelector" style:highest "medium_bold_entry"
widget "*SnapModeSelector" style:highest "medium_bold_entry"
widget "*ZoomFocusSelector" style:highest "medium_bold_entry"
widget "*ArdourContextMenu*" style:highest "default_buttons_menus"
widget "*EditGroupTitleButton*" style:highest "default_buttons_menus"
widget "*MixerGroupTitleButton*" style:highest "default_buttons_menus"
widget "*ErrorLogCloseButton" style:highest "default_buttons_menus"
widget "*EditorGTKButton*" style:highest "default_buttons_menus"
widget "*ToolbarButton" style:highest "default_buttons_menus"
widget "*ToolbarButton*" style:highest "default_buttons_menus"
widget "*CrossfadeEditButton" style:highest "default_buttons_menus"
widget "*CrossfadeEditButton*" style:highest "default_buttons_menus"
widget "*TrackHistoryButton*" style:highest "default_buttons_menus"
widget "*TrackSizeButton*" style:highest "default_buttons_menus"
widget "*TrackPlaylistButton*" style:highest "default_buttons_menus"
widget "*TrackAutomationButton*" style:highest "default_buttons_menus"
widget "*TrackGroupButton*" style:highest "default_buttons_menus"
widget "*TrackMixButton*" style:highest "default_buttons_menus"
widget "*TrackVisualButton*" style:highest "default_buttons_menus"
widget "*TrackRemoveButton*" style:highest "default_buttons_menus"
widget "*BaseButton" style:highest "default_buttons_menus"
widget "*TakeButtonLabel" style:highest "default_buttons_menus"
widget "*MixerWidthButton" style:highest "default_buttons_menus"
widget "*MixerHideButton" style:highest "default_buttons_menus"
widget "*MixerSendButton" style:highest "default_buttons_menus"
widget "*MixerSendButtonLabel" style:highest "default_buttons_menus"
widget "*MixerSendSwitch" style:highest "default_buttons_menus"
widget "*MixerInsertButton" style:highest "default_buttons_menus"
widget "*MixerInsertButtonLabel" style:highest "default_buttons_menus"
widget "*MixerInsertSwitch" style:highest "default_buttons_menus"
widget "*MixerMonitorInputButton*" style:highest "very_small_button"
widget "*MixerMonitorInputButton.*" style:highest "very_small_button"
widget "*MixerIOButton" style:highest "very_small_button"
widget "*MixerIOButtonLabel" style:highest "very_small_button"
widget "*AddRouteDialogSpinner" style:highest "ardour_adjusters"
widget "*AddRouteDialogRadioButton*" style:highest "options_window"
widget "*OptionsNotebook" style:highest "options_window"
widget "*OptionEditorToggleButton*" style:highest "options_window"
widget "*OptionsLabel" style:highest "options_window"
widget "*OptionEditorAuditionerLabel" style:highest "options_window"
widget "*OptionsEntry" style:highest "option_entry"
widget "*InspectorNotebook" style:highest "options_window"
widget "*NewSessionDialog" style:highest "options_window"
widget "*NewSessionDialogButton*" style:highest "options_window"
widget "*MixerSendSwitch*" style:highest "very_small_red_active_and_selected_button"
widget "*OptionEditorToggleButton" style:highest "small_red_active_and_selected_button"
widget "*NewSessionDialogButton" style:highest "small_red_active_and_selected_button"
widget "*RecordEnableButton" style:highest "track_rec_enable_button"
widget "*RecordEnableButton-active" style:highest "track_rec_enable_button_active"
widget "*RecordEnableButton-alternate" style:highest "track_rec_enable_button_alternate"
widget "*MixerRecordEnableButton" style:highest "mixer_track_rec_enable_button"
widget "*MixerRecordEnableButton-active" style:highest "mixer_track_rec_enable_button_active"
widget "*MixerRecordEnableButton-alternate" style:highest "mixer_track_rec_enable_button_alternate"
widget "*MuteButton" style:highest "mute_button"
widget "*MuteButton-alternate" style:highest "mute_button_alternate"
widget "*MuteButton-active" style:highest "mute_button_active"
widget "*MixerMuteButton" style:highest "mixer_mute_button"
widget "*MixerMuteButton-alternate" style:highest "mixer_mute_button_alternate"
widget "*MixerMuteButton-active" style:highest "mixer_mute_button_active"
widget "*SoloButton" style:highest "solo_button"
widget "*SoloButton-alternate" style:highest "solo_button_alternate"
widget "*SoloButton-active" style:highest "solo_button_active"
widget "*MixerSoloButton" style:highest "mixer_solo_button"
widget "*MixerSoloButton-alternate" style:highest "mixer_solo_button_alternate"
widget "*MixerSoloButton-active" style:highest "mixer_solo_button_active"
widget "*TrackLoopButton*" style:highest "track_loop_button"
widget "*PanAutomationLineSelector*" style:highest "multiline_combo"
widget "*EditorTimeButton*" style:highest "time_button"
widget "*MixerPhaseInvertButton*" style:highest "very_small_button"
widget "*MixerPhaseInvertButton.*" style:highest "very_small_button"
widget "*MixerAutomationRecordingButton*" style:highest "very_small_button"
widget "*MixerAutomationRecordingButton.*" style:highest "very_small_button"
widget "*MixerAutomationModeButton*" style:highest "very_small_button"
widget "*MixerAutomationModeButton.*" style:highest "very_small_button"
widget "*MixerAutomationPlaybackButton*" style:highest "very_small_button"
widget "*MixerAutomationPlaybackButton.*" style:highest "very_small_button"
widget "*MixerNameButton" style:highest "very_small_button"
widget "*MixerNameButtonLabel" style:highest "very_small_button"
widget "*MixerGroupButton" style:highest "very_small_button"
widget "*MixerGroupButtonLabel" style:highest "very_small_button"
widget "*MixerCommentButton" style:highest "very_small_button"
widget "*MixerCommentButton*" style:highest "very_small_button"
widget "*EditGroupButton" style:highest "very_small_button"
widget "*EditGroupButtonLabel" style:highest "very_small_button"
widget "*TransportButton" style:highest "transport_rec_button"
widget "*TransportButton-active" style:highest "transport_button_active"
widget "*ShuttleButton" style:highest "transport_button"
widget "*ShuttleButton*" style:highest "transport_button"
widget "*ShuttleDisplay" style:highest "transport_button"
widget "*ShuttleDisplay*" style:highest "transport_button"
widget "*ShuttleControl" style:highest "shuttle_control"
widget "*TransportRecButton" style:highest "transport_rec_button"
widget "*TransportRecButton*" style:highest "transport_rec_button"
widget "*TransportRecButton-active" style:highest "transport_rec_button_active"
widget "*TransportRecButton-active*" style:highest "transport_rec_button_active"
widget "*TransportRecButton-alternate" style:highest "transport_rec_button_alternate"
widget "*TransportRecButton-alternate*" style:highest "transport_rec_button_alternate"
widget "*TransportRecButton*" style:highest "transport_rec_button"
widget "*RecordingXrunWarningWindow" style:highest "xrun_warn"
widget "*RecordingXrunWarningWindow*" style:highest "xrun_warn"
/*widget "*MainMenuBar" style:highest "menu_bar_base"*/
widget "*ErrorMessage" style:highest "error_message"
widget "*FatalMessage" style:highest "fatal_message"
widget "*InfoMessage" style:highest "info_message"
widget "*WarningMessage" style:highest "warning_message"
widget "*BigClockNonRecording" style:highest "non_recording_big_clock_display"
widget "*BigClockRecording" style:highest "recording_big_clock_display"
widget "*TransportClockDisplay" style:highest "transport_clock_display"
widget "*SecondaryClockDisplay" style:highest "transport_clock_display"
widget "*AudioClockFramesUpperInfo" style:highest "tempo_meter_clock_display"
widget "*AudioClockFramesLowerInfo" style:highest "tempo_meter_clock_display"
widget "*AudioClockSMPTEUpperInfo" style:highest "tempo_meter_clock_display"
widget "*AudioClockSMPTELowerInfo" style:highest "tempo_meter_clock_display"
widget "*AudioClockBBTUpperInfo" style:highest "tempo_meter_clock_display"
widget "*AudioClockBBTLowerInfo" style:highest "tempo_meter_clock_display"
widget "*SelectionStartClock" style:highest "default_clock_display"
widget "*SelectionEndClock" style:highest "default_clock_display"
widget "*EditCursorClock" style:highest "default_clock_display"
widget "*PreRollClock" style:highest "default_clock_display"
widget "*PostRollClock" style:highest "default_clock_display"
widget "*NudgeClock" style:highest "default_clock_display"
widget "*ZoomRangeClock" style:highest "default_clock_display"
widget "*SMPTEOffsetClock" style:highest "default_clock_display"
widget "*TransportLabel" style:highest "small_bold_text"
widget "*TakeLabel" style:highest "small_bold_text"
widget "*LocationLabel" style:highest "small_bold_text"
widget "*WipeLabel" style:highest "small_bold_text"
widget "*TakeTagLabel" style:highest "small_bold_text"
widget "*ToolBarLabel" style:highest "small_bold_text"
widget "*EditorDisplayLabel" style:highest "small_bold_text"
widget "*NewSessionLabel" style:highest "large_text"
widget "*GlobalButtonLabel" style:highest "default_buttons_menus"
widget "*ClickButton" style:highest "medium_entry"
widget "*RegionNameDisplay" style:highest "medium_entry"
widget "*PluginDisplay" style:highest "medium_entry"
widget "*SelectionDisplay" style:highest "medium_entry"
widget "*HistorySelector" style:highest "medium_entry"
widget "*LocationSelector" style:highest "medium_entry"
widget "*TakeSelector" style:highest "medium_entry"
widget "*RegionSelector" style:highest "medium_entry"
widget "*SMPTERuler" style:highest "editor_time_ruler"
widget "*BBTRuler" style:highest "editor_time_ruler"
widget "*FramesRuler" style:highest "editor_time_ruler"
widget "*MinSecRuler" style:highest "editor_time_ruler"
widget "*BaseFrame" style:highest "base_frame"
widget "*AudioTrackStripBase" style:highest "audio_track_base"
widget "*TimeAxisViewControlsBaseUnselected" style:highest "audio_track_base"
widget "*AudioTrackControlsBaseUnselected" style:highest "audio_track_base"
widget "*AudioTrackFader" style:highest "gain_fader"
widget "*AudioBusStripBase" style:highest "audio_bus_base"
widget "*BusControlsBaseUnselected" style:highest "audio_bus_base"
widget "*AudioBusFader" style:highest "gain_fader"
widget "*TrackSeparator" style:highest "track_separator"
widget "*TrackEditIndicator0*" style:highest "edit_group_0"
widget "*TrackEditIndicator1*" style:highest "edit_group_1"
widget "*TrackEditIndicator2*" style:highest "edit_group_2"
widget "*TrackEditIndicator3*" style:highest "edit_group_3"
widget "*TrackEditIndicator4*" style:highest "edit_group_3"
widget "*TrackEditIndicator5*" style:highest "edit_group_3"
widget "*TrackEditIndicator6*" style:highest "edit_group_3"
widget "*TrackEditIndicator7*" style:highest "edit_group_3"
widget "*EditorTrackNameDisplay" style:highest "track_name_display"
widget "*EditorTrackNameDisplay*" style:highest "track_name_display"
widget "*EditorActiveTrackNameDisplay" style:highest "active_track_name_display"
widget "*EditorActiveTrackNameDisplay*" style:highest "active_track_name_display"
widget "*CrossfadeEditAuditionButton" style:highest "red_when_active"
widget "*CrossfadeEditAuditionButton*" style:highest "red_when_active"
widget "*CrossfadeEditCurveButton" style:highest "red_when_active"
widget "*CrossfadeEditCurveButton*" style:highest "red_when_active"
widget "*CrossfadeEditLabel" style:highest "medium_text"
widget "*CrossfadeEditFrame" style:highest "base_frame"
widget "*MouseModeButton" style:highest "default_buttons_menus"
widget "*MouseModeButton*" style:highest "default_buttons_menus"
widget "*EditorMainCanvas" style:highest "main_canvas_area"
widget "*AudioTrackControlsBaseInactiveUnselected" style:highest "track_controls_inactive"
widget "*BusControlsBaseInactiveUnselected" style:highest "track_controls_inactive"
widget "*AutomationTrackControlsBaseInactiveUnselected" style:highest "track_controls_inactive"
widget "*AutomationTrackName" style:highest "automation_track_name"
widget "*AudioTrackControlsBaseInactiveSelected" style:highest "track_controls_inactive"
widget "*BusControlsBaseInactiveSelected" style:highest "track_controls_inactive"
widget "*AutomationTrackControlsBaseInactiveSelected" style:highest "track_controls_inactive"
widget "*AudioTrackStripBaseInactive" style:highest "track_controls_inactive"
widget "*AudioBusStripBaseInactive" style:highest "track_controls_inactive"
widget "*AudioTrackControlsBaseSelected" style:highest "edit_controls_base_selected"
widget "*BusControlsBaseSelected" style:highest "edit_controls_base_selected"
widget "*AutomationTrackControlsBase" style:highest "automation_track_controls_base"
widget "*AutomationTrackControlsBaseSelected" style:highest "edit_controls_base_selected"
/*widget "*EditorMenuBar*" style:highest "black_mackie_menu_bar"
widget "*MainMenuBar*" style:highest "black_mackie_menu_bar"
*/
widget "*ZoomClickBox" style:highest "medium_bold_entry"
widget "*PluginParameterLabel" style:highest "medium_text"
widget "*PluginNameInfo" style:highest "plugin_name_text"
widget "*PluginMakerInfo" style:highest "plugin_maker_text"
widget "*PluginParameterInfo" style:highest "medium_text"
widget "*MotionControllerValue" style:highest "medium_entry"
widget "*ParameterValueDisplay" style:highest "medium_bold_entry"
widget "*PluginUIClickBox" style:highest "medium_bold_entry"
widget "*PluginUIClickBox*" style:highest "medium_bold_entry"
widget "*PluginSlider" style:highest "plugin_slider"
widget "*RedirectSelector" style:highest "redirect_list_display"
widget "*RedirectSelector.*" style:highest "redirect_list_display"
widget "*EditGroupDisplay" style:highest "treeview_display"
widget "*TrackListDisplay" style:highest "treeview_display"
widget "*RegionListDisplay" style:highest "treeview_display"
widget "*NamedSelectionDisplay" style:highest "treeview_display"
widget "*SnapshotDisplay" style:highest "treeview_display"
widget "*MixerTrackCommentArea" style:highest "option_entry"
widget "*MixerPanZone" style:highest "pan_zone"
widget "*MixerTrackDisplayList" style:highest "treeview_display"
widget "*MixerSnapshotDisplayList" style:highest "treeview_display"
widget "*MixerAuxDisplayList" style:highest "treeview_display"
widget "*MixerGroupList" style:highest "treeview_display"
widget "*RegionEditorLabel" style:highest "medium_text"
widget "*RegionEditorSmallLabel" style:highest "small_text"
widget "*RegionEditorEntry" style:highest "medium_entry"
widget "*RegionEditorClock" style:highest "default_clock_display"
widget "*RegionEditorToggleButton" style:highest "paler_red_when_active"
widget "*RegionEditorToggleButton*" style:highest "paler_red_when_active"
widget "*MixerStripSpeedBase" style:highest "small_entry"
widget "*MixerStripSpeedBase*" style:highest "small_entry"
widget "*MixerStripSpeedBaseNotOne" style:highest "small_red_on_black_entry"
widget "*MixerStripSpeedBaseNotOne*" style:highest "small_red_on_black_entry"
widget "*MixerStripGainDisplay" style:highest "small_entry"
widget "*MixerStripGainDisplay*" style:highest "small_entry"
widget "*MixerStripGainUnitButton" style:highest "very_small_button"
widget "*MixerStripGainUnitButton*" style:highest "very_small_button"
widget "*MixerStripMeterPreButton" style:highest "very_small_button"
widget "*MixerStripMeterPreButton*" style:highest "very_small_button"
widget "*MixerStripPeakDisplay*" style:highest "red_active_small_entry"
widget "*MixerStripPeakDisplayPeak*" style:highest "peak_display_peaked_entry"
widget "*MixerStripSelectedFrame" style:highest "selected_strip_frame"
widget "*MixerStripFrame" style:highest "base_frame"
widget "*HWMonitorButton" style:highest "red_when_active"
widget "*HWMonitorButton*" style:highest "red_when_active"
widget "*BypassButton" style:highest "red_when_active"
widget "*BypassButton*" style:highest "red_when_active"
widget "*TransportSoloAlert" style:highest "flashing_alert"
widget "*TransportSoloAlert.*" style:highest "flashing_alert"
widget "*TransportAuditioningAlert" style:highest "flashing_alert"
widget "*TransportAuditioningAlert.*" style:highest "flashing_alert"
widget "*FadeCurve" style:highest "medium_bold_entry"
widget "*FadeCurve*" style:highest "medium_bold_entry"
widget "*IOSelectorButton" style:highest "default_buttons_menus"
widget "*IOSelectorButton*" style:highest "default_buttons_menus"
widget "*IOSelectorList" style:highest "medium_entry_noselection_fg"
widget "*IOSelectorPortList" style:highest "io_selector_port_list"
widget "*IOSelectorPortList.*" style:highest "io_selector_port_list"
widget "*IOSelectorPortListSelected" style:highest "selected_io_selector_port_list"
widget "*IOSelectorPortListSelected.*" style:highest "selected_io_selector_port_list"
widget "*IOSelectorNotebook" style:highest "io_selector_notebook"
widget "*IOSelectorNotebookTab" style:highest "io_selector_notebook"
widget "*IOSelectorFrame" style:highest "base_frame"
widget "*ConnectionEditorButton" style:highest "default_buttons_menus"
widget "*ConnectionEditorButton*" style:highest "default_buttons_menus"
widget "*ConnectionEditorList" style:highest "medium_entry_noselection_fg"
widget "*ConnectionEditorConnectionList" style:highest "medium_entry"
widget "*ConnectionEditorPortList" style:highest "io_selector_port_list"
widget "*ConnectionEditorPortListSelected" style:highest "selected_io_selector_port_list"
widget "*ConnectionEditorNotebook" style:highest "io_selector_notebook"
widget "*ConnectionEditorNotebookTab" style:highest "io_selector_notebook"
widget "*ConnectionEditorFrame" style:highest "base_frame"
widget "*RouteParamsListDisplay" style:highest "inspector_track_list_display"
widget "*RouteParamsPreListDisplay" style:highest "inspector_redirect_list_display"
widget "*RouteParamsPostListDisplay" style:highest "inspector_redirect_list_display"
widget "*TearOffArrow" style:highest "tearoff_arrow"
widget "*RouteParamsTitleButton" style:highest "medium_text"
widget "*RouteParamsTitleLabel" style:highest "medium_text"
widget "*PluginAutomateRecordButton" style:highest "small_red_active_and_selected_button"
widget "*PluginAutomateRecordButton*" style:highest "small_red_active_and_selected_button"
widget "*PluginAutomatePlayButton" style:highest "small_red_active_and_selected_button"
widget "*PluginAutomatePlayButton*" style:highest "small_red_active_and_selected_button"
widget "*PluginAutomateButton" style:highest "small_button"
widget "*PluginAutomateButton*" style:highest "small_button"
widget "*PluginSaveButton" style:highest "small_button"
widget "*PluginSaveButton*" style:highest "small_button"
widget "*PluginLoadButton" style:highest "small_button"
widget "*PluginLoadButton*" style:highest "small_button"
widget "*FaderMetricsStrip" style:highest "meter_metrics_strip"
widget "*MeterMetricsStrip" style:highest "meter_metrics_strip"
widget "*MetricDialogFrame" style:highest "base_frame"
widget "*MetricEntry" style:highest "medium_bold_entry"
widget "*MetricButton" style:highest "default_buttons_menus"
widget "*MetricButton.*" style:highest "default_buttons_menus"
widget "*MetricLabel" style:highest "medium_text"
widget "*TimeStretchButton" style:highest "default_buttons_menus"
widget "*TimeStretchButton.*" style:highest "default_buttons_menus"
widget "*TimeStretchProgress" style:highest "default_buttons_menus"
widget "*ChoiceWindow" style:highest "default_buttons_menus"
widget "*ChoicePrompt" style:highest "default_buttons_menus"
widget "*ChoiceButton" style:highest "default_buttons_menus"
widget "*ChoiceButton*" style:highest "default_buttons_menus"
widget "*SelectionModeButton" style:highest "default_buttons_menus"
widget "*SelectionModeButton*" style:highest "default_buttons_menus"
widget "*TrackLabel" style:highest "medium_text"
widget "*TrackPlugName" style:highest "medium_text"
widget "*TrackParameterName" style:highest "small_text"
widget "*AddRouteDialog*" style:highest "medium_text"
widget "*AddRouteDialog.GtkLabel" style:highest "medium_text"
widget "*AddRouteDialogChannelChoice" style:highest "medium_bold_entry"
widget "*AddRouteDialogSpinner" style:highest "medium_bold_entry"
widget "*AddRouteDialogSpinner*" style:highest "medium_bold_entry"
widget "*AddRouteDialogRadioButton" style:highest "red_when_active"
widget "*AddRouteDialogButton" style:highest "default_buttons_menus"
widget "*AddRouteDialogNameTemplateEntry" style:highest "medium_bold_entry"
widget "*NewSessionIOLabel" style:highest "larger_bold_text"
widget "*NewSessionSR1Label" style:highest "red_medium_text"
widget "*NewSessionSR2Label" style:highest "medium_text"
widget "*NewSessionChannelChoice" style:highest "medium_bold_entry"
widget "*NewSessionMainButton" style:highest "larger_bold_text"
widget "*NewSessionMainButton*" style:highest "larger_bold_text"
widget "*NewSessionMainLabel" style:highest "larger_bold_text"
widget "*LocationEditRowClock" style:highest "location_rows_clock"
widget "*LocationEditNameLabel" style:highest "medium_text"
widget "*LocationEditSetButton" style:highest "location_row_button"
widget "*LocationEditSetButton*" style:highest "location_row_button"
widget "*LocationEditGoButton" style:highest "location_row_button"
widget "*LocationEditGoButton*" style:highest "location_row_button"
widget "*LocationEditCdButton" style:highest "small_red_active_and_selected_button"
widget "*LocationEditCdButton*" style:highest "small_red_active_and_selected_button"
widget "*LocationEditHideButton" style:highest "small_red_active_and_selected_button"
widget "*LocationEditHideButton*" style:highest "small_red_active_and_selected_button"
widget "*LocationEditNumberLabel" style:highest "small_text"
widget "*LocationLocEditorFrame" style:highest "base_frame"
widget "*LocationRangeEditorFrame" style:highest "base_frame"
widget "*LocationEditNameEntry" style:highest "option_entry"
widget "*LocationAddLocationButton" style:highest "default_buttons_menus"
widget "*LocationAddLocationButton*" style:highest "default_buttons_menus"
widget "*LocationAddRangeButton" style:highest "default_buttons_menus"
widget "*LocationAddRangeButton*" style:highest "default_buttons_menus"
widget "*LocationEditRemoveButton" style:highest "location_row_button"
widget "*LocationEditRemoveButton*" style:highest "location_row_button"
widget "*PanSlider" style:highest "pan_slider"
widget "*PanningLinkButton" style:highest "mixer_red_active_button"
widget "*PanningLinkButton.*" style:highest "mixer_red_active_button"
widget "*PanningLinkDirectionButton" style:highest "very_small_button"
widget "*PanningLinkDirectionButton.*" style:highest "very_small_button"
widget "*ChannelCountSelector" style:highest "medium_bold_entry"
widget "*ChannelCountSelector.GtkArrow" style:highest "default_buttons_menus"
widget "*RegionListWholeFile" style:highest "treeview_parent_node"
widget "*EditorHScrollbar" style:highest "editor_hscrollbar"

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */

View file

@ -1,64 +0,0 @@
/*
Copyright (C) 2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/
#include <gtkmm/stock.h>
#include "ardour_message.h"
#include "i18n.h"
using namespace std;
using namespace Gtk;
ArdourMessage::ArdourMessage (Gtk::Window* parent,
string name, string msg,
bool grab_focus, bool auto_run)
: ArdourDialog (name),
label (msg)
{
label.set_name (X_("PrompterLabel"));
label.set_justify (JUSTIFY_CENTER);
label.show ();
get_vbox()->pack_start (label);
Button* ok_button = add_button (Stock::OK, RESPONSE_ACCEPT);
set_name (X_("Prompter"));
set_position (Gtk::WIN_POS_MOUSE);
set_modal (true);
set_type_hint (Gdk::WINDOW_TYPE_HINT_MENU);
if (grab_focus) {
ok_button->grab_focus ();
}
if (parent) {
set_transient_for (*parent);
}
if (auto_run) {
run ();
}
}
ArdourMessage::~ArdourMessage()
{
}

View file

@ -1,5 +1,5 @@
/* /*
Copyright (C) 1999-2002 Paul Davis Copyright (C) 1999-2007 Paul Davis
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#define __STDC_FORMAT_MACROS 1 #define __STDC_FORMAT_MACROS 1
@ -31,6 +30,8 @@
#include <iostream> #include <iostream>
#include <sys/resource.h>
#include <gtkmm/messagedialog.h> #include <gtkmm/messagedialog.h>
#include <gtkmm/accelmap.h> #include <gtkmm/accelmap.h>
@ -71,7 +72,6 @@
#include "mixer_ui.h" #include "mixer_ui.h"
#include "prompter.h" #include "prompter.h"
#include "opts.h" #include "opts.h"
#include "keyboard_target.h"
#include "add_route_dialog.h" #include "add_route_dialog.h"
#include "new_session_dialog.h" #include "new_session_dialog.h"
#include "about.h" #include "about.h"
@ -91,6 +91,7 @@ ARDOUR_UI *ARDOUR_UI::theArdourUI = 0;
sigc::signal<void,bool> ARDOUR_UI::Blink; sigc::signal<void,bool> ARDOUR_UI::Blink;
sigc::signal<void> ARDOUR_UI::RapidScreenUpdate; sigc::signal<void> ARDOUR_UI::RapidScreenUpdate;
sigc::signal<void> ARDOUR_UI::MidRapidScreenUpdate;
sigc::signal<void> ARDOUR_UI::SuperRapidScreenUpdate; sigc::signal<void> ARDOUR_UI::SuperRapidScreenUpdate;
sigc::signal<void,nframes_t> ARDOUR_UI::Clock; sigc::signal<void,nframes_t> ARDOUR_UI::Clock;
@ -118,16 +119,34 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
/* transport */ /* transport */
time_master_button (_("time\nmaster")), roll_controllable ("transport roll", *this, TransportControllable::Roll),
stop_controllable ("transport stop", *this, TransportControllable::Stop),
goto_start_controllable ("transport goto start", *this, TransportControllable::GotoStart),
goto_end_controllable ("transport goto end", *this, TransportControllable::GotoEnd),
auto_loop_controllable ("transport auto loop", *this, TransportControllable::AutoLoop),
play_selection_controllable ("transport play selection", *this, TransportControllable::PlaySelection),
rec_controllable ("transport rec-enable", *this, TransportControllable::RecordEnable),
shuttle_controllable ("shuttle", *this, TransportControllable::ShuttleControl),
shuttle_controller_binding_proxy (shuttle_controllable),
roll_button (roll_controllable),
stop_button (stop_controllable),
goto_start_button (goto_start_controllable),
goto_end_button (goto_end_controllable),
auto_loop_button (auto_loop_controllable),
play_selection_button (play_selection_controllable),
rec_button (rec_controllable),
shuttle_units_button (_("% ")), shuttle_units_button (_("% ")),
punch_in_button (_("Punch In")), punch_in_button (_("Punch In")),
punch_out_button (_("Punch Out")), punch_out_button (_("Punch Out")),
auto_return_button (_("Auto Return")), auto_return_button (_("Auto Return")),
auto_play_button (_("Autuo Play")), auto_play_button (_("Auto Play")),
auto_input_button (_("Auto Input")), auto_input_button (_("Auto Input")),
click_button (_("Click")), click_button (_("Click")),
time_master_button (_("time\nmaster")),
auditioning_alert_button (_("AUDITION")), auditioning_alert_button (_("AUDITION")),
solo_alert_button (_("SOLO")), solo_alert_button (_("SOLO")),
shown_flag (false) shown_flag (false)
@ -164,8 +183,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
location_ui = 0; location_ui = 0;
open_session_selector = 0; open_session_selector = 0;
have_configure_timeout = false; have_configure_timeout = false;
have_disk_overrun_displayed = false; have_disk_speed_dialog_displayed = false;
have_disk_underrun_displayed = false;
_will_create_new_session_automatically = false; _will_create_new_session_automatically = false;
session_loaded = false; session_loaded = false;
last_speed_displayed = -1.0f; last_speed_displayed = -1.0f;
@ -249,10 +267,6 @@ ARDOUR_UI::set_engine (AudioEngine& e)
AudioFileSource::set_build_peakfiles (true); AudioFileSource::set_build_peakfiles (true);
AudioFileSource::set_build_missing_peakfiles (true); AudioFileSource::set_build_missing_peakfiles (true);
if (AudioSource::start_peak_thread ()) {
throw failed_constructor();
}
/* set default clock modes */ /* set default clock modes */
primary_clock.set_mode (AudioClock::SMPTE); primary_clock.set_mode (AudioClock::SMPTE);
@ -290,8 +304,6 @@ ARDOUR_UI::~ARDOUR_UI ()
if (add_route_dialog) { if (add_route_dialog) {
delete add_route_dialog; delete add_route_dialog;
} }
AudioSource::stop_peak_thread ();
} }
gint gint
@ -333,6 +345,63 @@ ARDOUR_UI::configure_handler (GdkEventConfigure* conf)
return FALSE; return FALSE;
} }
void
ARDOUR_UI::set_transport_controllable_state (const XMLNode& node)
{
const XMLProperty* prop;
if ((prop = node.property ("roll")) != 0) {
roll_controllable.set_id (prop->value());
}
if ((prop = node.property ("stop")) != 0) {
stop_controllable.set_id (prop->value());
}
if ((prop = node.property ("goto_start")) != 0) {
goto_start_controllable.set_id (prop->value());
}
if ((prop = node.property ("goto_end")) != 0) {
goto_end_controllable.set_id (prop->value());
}
if ((prop = node.property ("auto_loop")) != 0) {
auto_loop_controllable.set_id (prop->value());
}
if ((prop = node.property ("play_selection")) != 0) {
play_selection_controllable.set_id (prop->value());
}
if ((prop = node.property ("rec")) != 0) {
rec_controllable.set_id (prop->value());
}
if ((prop = node.property ("shuttle")) != 0) {
shuttle_controllable.set_id (prop->value());
}
}
XMLNode&
ARDOUR_UI::get_transport_controllable_state ()
{
XMLNode* node = new XMLNode(X_("TransportControllables"));
char buf[64];
roll_controllable.id().print (buf, sizeof (buf));
node->add_property (X_("roll"), buf);
stop_controllable.id().print (buf, sizeof (buf));
node->add_property (X_("stop"), buf);
goto_start_controllable.id().print (buf, sizeof (buf));
node->add_property (X_("goto_start"), buf);
goto_end_controllable.id().print (buf, sizeof (buf));
node->add_property (X_("goto_end"), buf);
auto_loop_controllable.id().print (buf, sizeof (buf));
node->add_property (X_("auto_loop"), buf);
play_selection_controllable.id().print (buf, sizeof (buf));
node->add_property (X_("play_selection"), buf);
rec_controllable.id().print (buf, sizeof (buf));
node->add_property (X_("rec"), buf);
shuttle_controllable.id().print (buf, sizeof (buf));
node->add_property (X_("shuttle"), buf);
return *node;
}
void void
ARDOUR_UI::save_ardour_state () ARDOUR_UI::save_ardour_state ()
{ {
@ -346,6 +415,7 @@ ARDOUR_UI::save_ardour_state ()
XMLNode* node = new XMLNode (keyboard->get_state()); XMLNode* node = new XMLNode (keyboard->get_state());
Config->add_extra_xml (*node); Config->add_extra_xml (*node);
Config->add_extra_xml (get_transport_controllable_state());
Config->save_state(); Config->save_state();
XMLNode enode(static_cast<Stateful*>(editor)->get_state()); XMLNode enode(static_cast<Stateful*>(editor)->get_state());
@ -365,9 +435,72 @@ ARDOUR_UI::save_ardour_state ()
void void
ARDOUR_UI::startup () ARDOUR_UI::startup ()
{ {
// relax check_memory_locking();
} }
void
ARDOUR_UI::no_memory_warning ()
{
XMLNode node (X_("no-memory-warning"));
Config->add_instant_xml (node, get_user_ardour_path());
}
void
ARDOUR_UI::check_memory_locking ()
{
#ifdef __APPLE__
/* OS X doesn't support mlockall(2), and so testing for memory locking capability there is pointless */
return;
#else // !__APPLE__
XMLNode* memory_warning_node = Config->instant_xml (X_("no-memory-warning"), get_user_ardour_path());
if (engine->is_realtime() && memory_warning_node == 0) {
struct rlimit limits;
int64_t ram;
long pages, page_size;
if ((page_size = sysconf (_SC_PAGESIZE)) < 0 ||(pages = sysconf (_SC_PHYS_PAGES)) < 0) {
ram = 0;
} else {
ram = (int64_t) pages * (int64_t) page_size;
}
if (getrlimit (RLIMIT_MEMLOCK, &limits)) {
return;
}
if (limits.rlim_cur != RLIM_INFINITY) {
if (ram == 0 || ((double) limits.rlim_cur / ram) < 0.75) {
MessageDialog msg (_("WARNING: Your system has a limit for maximum amount of locked memory. "
"This might cause Ardour to run out of memory before your system "
"runs out of memory. \n\n"
"You can view the memory limit with 'ulimit -l', "
"and it is normally controlled by /etc/security/limits.conf"));
VBox* vbox = msg.get_vbox();
HBox hbox;
CheckButton cb (_("Do not show this window again"));
cb.signal_toggled().connect (mem_fun (*this, &ARDOUR_UI::no_memory_warning));
hbox.pack_start (cb, true, false);
vbox->pack_start (hbox);
hbox.show_all ();
editor->ensure_float (msg);
msg.run ();
}
}
}
#endif // !__APPLE__
}
void void
ARDOUR_UI::finish() ARDOUR_UI::finish()
{ {
@ -490,6 +623,13 @@ ARDOUR_UI::every_point_one_seconds ()
return TRUE; return TRUE;
} }
gint
ARDOUR_UI::every_point_oh_five_seconds ()
{
MidRapidScreenUpdate(); /* EMIT_SIGNAL */
return true;
}
gint gint
ARDOUR_UI::every_point_zero_one_seconds () ARDOUR_UI::every_point_zero_one_seconds ()
{ {
@ -609,40 +749,6 @@ ARDOUR_UI::update_wall_clock ()
return TRUE; return TRUE;
} }
void
ARDOUR_UI::control_methods_adjusted ()
{
int which_method;
which_method = (int) online_control_button->adjustment.get_value();
switch (which_method) {
case 0:
allow_mmc_and_local ();
break;
case 1:
allow_mmc_only ();
break;
case 2:
allow_local_only ();
break;
default:
fatal << _("programming error: impossible control method") << endmsg;
}
}
void
ARDOUR_UI::mmc_device_id_adjusted ()
{
#if 0
if (mmc) {
int dev_id = (int) mmc_id_button->adjustment.get_value();
mmc->set_device_id (dev_id);
}
#endif
}
gint gint
ARDOUR_UI::session_menu (GdkEventButton *ev) ARDOUR_UI::session_menu (GdkEventButton *ev)
@ -923,7 +1029,8 @@ ARDOUR_UI::session_add_audio_route (bool track, int32_t input_channels, int32_t
if (how_many == 1) { if (how_many == 1) {
error << _("could not create a new audio track") << endmsg; error << _("could not create a new audio track") << endmsg;
} else { } else {
error << string_compose (_("could not create %1 new audio tracks"), how_many) << endmsg; error << string_compose (_("could only create %1 of %2 new audio %3"),
tracks.size(), how_many, (track ? _("tracks") : _("busses"))) << endmsg;
} }
} }
@ -954,6 +1061,7 @@ ARDOUR_UI::session_add_audio_route (bool track, int32_t input_channels, int32_t
} }
catch (...) { catch (...) {
cerr << "About to complain about JACK\n";
MessageDialog msg (*editor, MessageDialog msg (*editor,
_("There are insufficient JACK ports available\n\ _("There are insufficient JACK ports available\n\
to create a new track or bus.\n\ to create a new track or bus.\n\
@ -1101,11 +1209,11 @@ ARDOUR_UI::transport_roll ()
if (session->get_play_loop()) { if (session->get_play_loop()) {
session->request_play_loop (false); session->request_play_loop (false);
auto_loop_button.set_active (false); auto_loop_button.set_visual_state (1);
roll_button.set_active (true); roll_button.set_visual_state (1);
} else if (session->get_play_range ()) { } else if (session->get_play_range ()) {
session->request_play_range (false); session->request_play_range (false);
play_selection_button.set_active (false); play_selection_button.set_visual_state (0);
} else if (rolling) { } else if (rolling) {
session->request_locate (session->last_transport_start(), true); session->request_locate (session->last_transport_start(), true);
} }
@ -1243,24 +1351,6 @@ ARDOUR_UI::map_transport_state ()
} }
} }
void
ARDOUR_UI::allow_local_only ()
{
}
void
ARDOUR_UI::allow_mmc_only ()
{
}
void
ARDOUR_UI::allow_mmc_and_local ()
{
}
void void
ARDOUR_UI::GlobalClickBox::printer (char buf[32], Adjustment &adj, void *arg) ARDOUR_UI::GlobalClickBox::printer (char buf[32], Adjustment &adj, void *arg)
{ {
@ -1282,6 +1372,49 @@ ARDOUR_UI::engine_running ()
ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::engine_running)); ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::engine_running));
ActionManager::set_sensitive (ActionManager::jack_sensitive_actions, true); ActionManager::set_sensitive (ActionManager::jack_sensitive_actions, true);
ActionManager::set_sensitive (ActionManager::jack_opposite_sensitive_actions, false); ActionManager::set_sensitive (ActionManager::jack_opposite_sensitive_actions, false);
Glib::RefPtr<Action> action;
char* action_name = 0;
switch (engine->frames_per_cycle()) {
case 32:
action_name = X_("JACKLatency32");
break;
case 64:
action_name = X_("JACKLatency64");
break;
case 128:
action_name = X_("JACKLatency128");
break;
case 512:
action_name = X_("JACKLatency512");
break;
case 1024:
action_name = X_("JACKLatency1024");
break;
case 2048:
action_name = X_("JACKLatency2048");
break;
case 4096:
action_name = X_("JACKLatency4096");
break;
case 8192:
action_name = X_("JACKLatency8192");
break;
default:
/* XXX can we do anything useful ? */
break;
}
if (action_name) {
action = ActionManager::get_action (X_("JACK"), action_name);
if (action) {
Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (action);
ract->set_active ();
}
}
} }
void void
@ -1379,7 +1512,7 @@ ARDOUR_UI::_blink (void *arg)
void void
ARDOUR_UI::blink () ARDOUR_UI::blink ()
{ {
Blink (blink_on = !blink_on); /* EMIT_SIGNAL */ Blink (blink_on = !blink_on); /* EMIT_SIGNAL */
} }
void void
@ -1454,17 +1587,18 @@ ARDOUR_UI::snapshot_session ()
{ {
ArdourPrompter prompter (true); ArdourPrompter prompter (true);
string snapname; string snapname;
string now; char timebuf[128];
time_t n; time_t n;
struct tm local_time;
time (&n); time (&n);
now = ctime (&n); localtime_r (&n, &local_time);
now = now.substr (20, 4) + now.substr (3, 16) + " (" + now.substr (0, 3) + ")"; strftime (timebuf, sizeof(timebuf), "%FT%T", &local_time);
prompter.set_name ("Prompter"); prompter.set_name ("Prompter");
prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT); prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
prompter.set_prompt (_("Name of New Snapshot")); prompter.set_prompt (_("Name of New Snapshot"));
prompter.set_initial_text (now); prompter.set_initial_text (timebuf);
switch (prompter.run()) { switch (prompter.run()) {
case RESPONSE_ACCEPT: case RESPONSE_ACCEPT:
@ -1571,18 +1705,18 @@ ARDOUR_UI::transport_rec_enable_blink (bool onoff)
switch (session->record_status()) { switch (session->record_status()) {
case Session::Enabled: case Session::Enabled:
if (onoff) { if (onoff) {
rec_button.set_state (1); rec_button.set_visual_state (2);
} else { } else {
rec_button.set_state (0); rec_button.set_visual_state (0);
} }
break; break;
case Session::Recording: case Session::Recording:
rec_button.set_state (2); rec_button.set_visual_state (1);
break; break;
default: default:
rec_button.set_state (0); rec_button.set_visual_state (0);
break; break;
} }
} }
@ -1595,12 +1729,6 @@ ARDOUR_UI::hide_and_quit (GdkEventAny *ev, ArdourDialog *window)
return TRUE; return TRUE;
} }
void
ARDOUR_UI::start_keyboard_prefix ()
{
keyboard->start_prefix();
}
void void
ARDOUR_UI::save_template () ARDOUR_UI::save_template ()
@ -1627,12 +1755,18 @@ ARDOUR_UI::save_template ()
} }
} }
void bool
ARDOUR_UI::new_session (std::string predetermined_path) ARDOUR_UI::new_session (std::string predetermined_path)
{ {
string session_name; string session_name;
string session_path; string session_path;
if (!engine->connected()) {
MessageDialog msg (_("Ardour is not connected to JACK at this time. Creating new sessions is not possible."));
msg.run ();
return false;
}
int response = Gtk::RESPONSE_NONE; int response = Gtk::RESPONSE_NONE;
new_session_dialog->set_modal(true); new_session_dialog->set_modal(true);
@ -1643,6 +1777,13 @@ ARDOUR_UI::new_session (std::string predetermined_path)
do { do {
response = new_session_dialog->run (); response = new_session_dialog->run ();
if (!engine->connected()) {
new_session_dialog->hide ();
MessageDialog msg (_("Ardour is not connected to JACK at this time. Creating new sessions is not possible."));
msg.run ();
return false;
}
_session_is_new = false; _session_is_new = false;
if (response == Gtk::RESPONSE_CANCEL || response == Gtk::RESPONSE_DELETE_EVENT) { if (response == Gtk::RESPONSE_CANCEL || response == Gtk::RESPONSE_DELETE_EVENT) {
@ -1651,7 +1792,7 @@ ARDOUR_UI::new_session (std::string predetermined_path)
quit(); quit();
} }
new_session_dialog->hide (); new_session_dialog->hide ();
return; return false;
} else if (response == Gtk::RESPONSE_NONE) { } else if (response == Gtk::RESPONSE_NONE) {
@ -1802,15 +1943,20 @@ ARDOUR_UI::new_session (std::string predetermined_path)
uint32_t nphysin = (uint32_t) new_session_dialog->input_limit_count(); uint32_t nphysin = (uint32_t) new_session_dialog->input_limit_count();
uint32_t nphysout = (uint32_t) new_session_dialog->output_limit_count(); uint32_t nphysout = (uint32_t) new_session_dialog->output_limit_count();
build_session (session_path, if (build_session (session_path,
session_name, session_name,
cchns, cchns,
mchns, mchns,
iconnect, iconnect,
oconnect, oconnect,
nphysin, nphysin,
nphysout, nphysout,
engine->frame_rate() * 60 * 5); engine->frame_rate() * 60 * 5)) {
response = Gtk::RESPONSE_NONE;
new_session_dialog->reset ();
continue;
}
} }
} }
} }
@ -1821,6 +1967,7 @@ ARDOUR_UI::new_session (std::string predetermined_path)
show(); show();
new_session_dialog->get_window()->set_cursor(); new_session_dialog->get_window()->set_cursor();
new_session_dialog->hide(); new_session_dialog->hide();
return true;
} }
void void
@ -1876,6 +2023,7 @@ ARDOUR_UI::load_session (const string & path, const string & snap_name, string*
session->set_clean (); session->set_clean ();
} }
editor->edit_cursor_position (true);
return 0; return 0;
} }
@ -1909,7 +2057,8 @@ ARDOUR_UI::build_session (const string & path, const string & snap_name,
catch (...) { catch (...) {
error << string_compose(_("Session \"%1 (snapshot %2)\" did not load successfully"), path, snap_name) << endmsg; MessageDialog msg (string_compose(_("Could not create session in \"%1\""), path));
msg.run ();
return -1; return -1;
} }
@ -2095,9 +2244,17 @@ After cleanup, unused audio files will be moved to a \
editor->prepare_for_cleanup (); editor->prepare_for_cleanup ();
/* do not allow flush until a session is reloaded */
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Main"), X_("FlushWastebasket"));
if (act) {
act->set_sensitive (false);
}
if (session->cleanup_sources (rep)) { if (session->cleanup_sources (rep)) {
return; return;
} }
checker.hide(); checker.hide();
display_cleanup_results (rep, display_cleanup_results (rep,
_("cleaned files"), _("cleaned files"),
@ -2109,6 +2266,9 @@ Flushing the wastebasket will \n\
release an additional\n\ release an additional\n\
%4 %5bytes of disk space.\n" %4 %5bytes of disk space.\n"
)); ));
} }
void void
@ -2133,7 +2293,7 @@ releasing %4 %5bytes of disk space"));
} }
void void
ARDOUR_UI::add_route () ARDOUR_UI::add_route (Gtk::Window* float_window)
{ {
int count; int count;
@ -2143,7 +2303,9 @@ ARDOUR_UI::add_route ()
if (add_route_dialog == 0) { if (add_route_dialog == 0) {
add_route_dialog = new AddRouteDialog; add_route_dialog = new AddRouteDialog;
editor->ensure_float (*add_route_dialog); if (float_window) {
add_route_dialog->set_transient_for (*float_window);
}
} }
if (add_route_dialog->is_visible()) { if (add_route_dialog->is_visible()) {
@ -2261,18 +2423,18 @@ ARDOUR_UI::halt_on_xrun_message ()
void void
ARDOUR_UI::disk_overrun_handler () ARDOUR_UI::disk_overrun_handler ()
{ {
ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler)); ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::disk_overrun_handler));
if (!have_disk_overrun_displayed) { if (!have_disk_speed_dialog_displayed) {
have_disk_overrun_displayed = true; have_disk_speed_dialog_displayed = true;
MessageDialog msg (*editor, X_("diskrate dialog"), _("\ MessageDialog* msg = new MessageDialog (*editor, X_("diskrate dialog"), _("\
The disk system on your computer\n\ The disk system on your computer\n\
was not able to keep up with Ardour.\n\ was not able to keep up with Ardour.\n\
\n\ \n\
Specifically, it failed to write data to disk\n\ Specifically, it failed to write data to disk\n\
quickly enough to keep up with recording.\n")); quickly enough to keep up with recording.\n"));
msg.run (); msg->signal_response().connect (bind (mem_fun (*this, &ARDOUR_UI::disk_speed_dialog_gone), msg));
have_disk_overrun_displayed = false; msg->show_all ();
} }
} }
@ -2281,29 +2443,24 @@ ARDOUR_UI::disk_underrun_handler ()
{ {
ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler)); ENSURE_GUI_THREAD (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler));
if (!have_disk_underrun_displayed) { if (!have_disk_speed_dialog_displayed) {
have_disk_underrun_displayed = true; have_disk_speed_dialog_displayed = true;
MessageDialog msg (*editor, MessageDialog* msg = new MessageDialog (*editor,
(_("The disk system on your computer\n\ _("The disk system on your computer\n\
was not able to keep up with Ardour.\n\ was not able to keep up with Ardour.\n\
\n\ \n\
Specifically, it failed to read data from disk\n\ Specifically, it failed to read data from disk\n\
quickly enough to keep up with playback.\n"))); quickly enough to keep up with playback.\n"));
msg.run (); msg->signal_response().connect (bind (mem_fun (*this, &ARDOUR_UI::disk_speed_dialog_gone), msg));
have_disk_underrun_displayed = false; msg->show_all ();
} }
} }
void void
ARDOUR_UI::disk_underrun_message_gone () ARDOUR_UI::disk_speed_dialog_gone (int ignored_response, MessageDialog* msg)
{ {
have_disk_underrun_displayed = false; have_disk_speed_dialog_displayed = false;
} delete msg;
void
ARDOUR_UI::disk_overrun_message_gone ()
{
have_disk_underrun_displayed = false;
} }
int int
@ -2360,13 +2517,6 @@ ARDOUR_UI::reconnect_to_jack ()
} }
} }
void
ARDOUR_UI::set_jack_buffer_size (nframes_t nframes)
{
engine->request_buffer_size (nframes);
update_sample_rate (0);
}
int int
ARDOUR_UI::cmdline_new_session (string path) ARDOUR_UI::cmdline_new_session (string path)
{ {
@ -2434,6 +2584,11 @@ ARDOUR_UI::use_config ()
Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act); Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
ract->set_active (); ract->set_active ();
} }
XMLNode* node = Config->extra_xml (X_("TransportControllables"));
if (node) {
set_transport_controllable_state (*node);
}
} }
void void
@ -2503,3 +2658,107 @@ ARDOUR_UI::store_clock_modes ()
ARDOUR_UI::TransportControllable::TransportControllable (std::string name, ARDOUR_UI& u, ToggleType tp)
: Controllable (name), ui (u), type(tp)
{
}
void
ARDOUR_UI::TransportControllable::set_value (float val)
{
if (type == ShuttleControl) {
double fract;
if (val == 0.5f) {
fract = 0.0;
} else {
if (val < 0.5f) {
fract = -((0.5f - val)/0.5f);
} else {
fract = ((val - 0.5f)/0.5f);
}
}
ui.set_shuttle_fract (fract);
return;
}
if (val < 0.5f) {
/* do nothing: these are radio-style actions */
return;
}
char *action = 0;
switch (type) {
case Roll:
action = X_("Roll");
break;
case Stop:
action = X_("Stop");
break;
case GotoStart:
action = X_("Goto Start");
break;
case GotoEnd:
action = X_("Goto End");
break;
case AutoLoop:
action = X_("Loop");
break;
case PlaySelection:
action = X_("Play Selection");
break;
case RecordEnable:
action = X_("Record");
break;
default:
break;
}
if (action == 0) {
return;
}
Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", action);
if (act) {
act->activate ();
}
}
float
ARDOUR_UI::TransportControllable::get_value (void) const
{
float val = 0.0f;
switch (type) {
case Roll:
break;
case Stop:
break;
case GotoStart:
break;
case GotoEnd:
break;
case AutoLoop:
break;
case PlaySelection:
break;
case RecordEnable:
break;
case ShuttleControl:
break;
default:
break;
}
return val;
}
void
ARDOUR_UI::TransportControllable::set_id (const string& str)
{
_id = str;
}

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __ardour_gui_h__ #ifndef __ardour_gui_h__
@ -55,6 +54,7 @@
#include <gtkmm2ext/gtk_ui.h> #include <gtkmm2ext/gtk_ui.h>
#include <gtkmm2ext/click_box.h> #include <gtkmm2ext/click_box.h>
#include <gtkmm2ext/stateful_button.h> #include <gtkmm2ext/stateful_button.h>
#include <gtkmm2ext/bindable_button.h>
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include <ardour/session.h> #include <ardour/session.h>
@ -65,7 +65,6 @@
class AudioClock; class AudioClock;
class PublicEditor; class PublicEditor;
class Keyboard; class Keyboard;
class MeterBridge;
class OptionEditor; class OptionEditor;
class Mixer_UI; class Mixer_UI;
class ConnectionEditor; class ConnectionEditor;
@ -128,7 +127,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
_will_create_new_session_automatically = yn; _will_create_new_session_automatically = yn;
} }
void new_session(std::string path = string()); bool new_session(std::string path = string());
gint cmdline_new_session (string path); gint cmdline_new_session (string path);
int unload_session (); int unload_session ();
void close_session(); void close_session();
@ -156,6 +155,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
static sigc::signal<void,bool> Blink; static sigc::signal<void,bool> Blink;
static sigc::signal<void> RapidScreenUpdate; static sigc::signal<void> RapidScreenUpdate;
static sigc::signal<void> MidRapidScreenUpdate;
static sigc::signal<void> SuperRapidScreenUpdate; static sigc::signal<void> SuperRapidScreenUpdate;
static sigc::signal<void,nframes_t> Clock; static sigc::signal<void,nframes_t> Clock;
@ -187,7 +187,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void store_clock_modes (); void store_clock_modes ();
void restore_clock_modes (); void restore_clock_modes ();
void add_route (); void add_route (Gtk::Window* float_window);
void session_add_audio_track (int input_channels, int32_t output_channels, ARDOUR::TrackMode mode, uint32_t how_many) { void session_add_audio_track (int input_channels, int32_t output_channels, ARDOUR::TrackMode mode, uint32_t how_many) {
session_add_audio_route (true, input_channels, output_channels, mode, how_many); session_add_audio_route (true, input_channels, output_channels, mode, how_many);
@ -277,9 +277,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
GlobalClickBox *crossfade_time_button; GlobalClickBox *crossfade_time_button;
vector<string> crossfade_time_strings; vector<string> crossfade_time_strings;
GlobalClickBox *mmc_id_button;
vector<string> mmc_id_strings;
Gtk::ToggleButton preroll_button; Gtk::ToggleButton preroll_button;
Gtk::ToggleButton postroll_button; Gtk::ToggleButton postroll_button;
@ -289,7 +286,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
int setup_windows (); int setup_windows ();
void setup_transport (); void setup_transport ();
void setup_clock (); void setup_clock ();
void setup_adjustables ();
static ARDOUR_UI *theArdourUI; static ARDOUR_UI *theArdourUI;
@ -317,9 +313,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void start_blinking (); void start_blinking ();
void stop_blinking (); void stop_blinking ();
void control_methods_adjusted ();
void mmc_device_id_adjusted ();
void about_signal_response(int response); void about_signal_response(int response);
private: private:
@ -360,18 +353,51 @@ class ARDOUR_UI : public Gtkmm2ext::UI
Gtk::HBox primary_clock_hbox; Gtk::HBox primary_clock_hbox;
Gtk::HBox secondary_clock_hbox; Gtk::HBox secondary_clock_hbox;
Gtkmm2ext::StatefulButton roll_button;
Gtkmm2ext::StatefulButton stop_button;
Gtkmm2ext::StatefulButton rewind_button;
Gtkmm2ext::StatefulButton forward_button;
Gtkmm2ext::StatefulButton goto_start_button;
Gtkmm2ext::StatefulButton goto_end_button;
Gtkmm2ext::StatefulButton auto_loop_button;
Gtkmm2ext::StatefulButton play_selection_button;
Gtkmm2ext::StatefulButton rec_button; struct TransportControllable : public PBD::Controllable {
enum ToggleType {
Roll = 0,
Stop,
RecordEnable,
GotoStart,
GotoEnd,
AutoLoop,
PlaySelection,
ShuttleControl
};
TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
void set_value (float);
float get_value (void) const;
void set_id (const std::string&);
ARDOUR_UI& ui;
ToggleType type;
};
TransportControllable roll_controllable;
TransportControllable stop_controllable;
TransportControllable goto_start_controllable;
TransportControllable goto_end_controllable;
TransportControllable auto_loop_controllable;
TransportControllable play_selection_controllable;
TransportControllable rec_controllable;
TransportControllable shuttle_controllable;
BindingProxy shuttle_controller_binding_proxy;
void set_transport_controllable_state (const XMLNode&);
XMLNode& get_transport_controllable_state ();
BindableButton roll_button;
BindableButton stop_button;
BindableButton goto_start_button;
BindableButton goto_end_button;
BindableButton auto_loop_button;
BindableButton play_selection_button;
BindableButton rec_button;
Gtk::ToggleButton time_master_button;
Gtk::ComboBoxText sync_option_combo; Gtk::ComboBoxText sync_option_combo;
void sync_option_changed (); void sync_option_changed ();
@ -403,16 +429,19 @@ class ARDOUR_UI : public Gtkmm2ext::UI
gint shuttle_box_expose (GdkEventExpose*); gint shuttle_box_expose (GdkEventExpose*);
gint mouse_shuttle (double x, bool force); gint mouse_shuttle (double x, bool force);
void use_shuttle_fract (bool force); void use_shuttle_fract (bool force);
void set_shuttle_fract (double);
bool shuttle_grabbed; bool shuttle_grabbed;
double shuttle_fract; double shuttle_fract;
Gtk::ToggleButton punch_in_button; Gtkmm2ext::StatefulToggleButton punch_in_button;
Gtk::ToggleButton punch_out_button; Gtkmm2ext::StatefulToggleButton punch_out_button;
Gtk::ToggleButton auto_return_button; Gtkmm2ext::StatefulToggleButton auto_return_button;
Gtk::ToggleButton auto_play_button; Gtkmm2ext::StatefulToggleButton auto_play_button;
Gtk::ToggleButton auto_input_button; Gtkmm2ext::StatefulToggleButton auto_input_button;
Gtk::ToggleButton click_button; Gtkmm2ext::StatefulToggleButton click_button;
Gtkmm2ext::StatefulToggleButton time_master_button;
Gtk::ToggleButton auditioning_alert_button; Gtk::ToggleButton auditioning_alert_button;
Gtk::ToggleButton solo_alert_button; Gtk::ToggleButton solo_alert_button;
@ -435,14 +464,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void transport_rec_enable_blink (bool onoff); void transport_rec_enable_blink (bool onoff);
/* These change where we accept control from:
MMC, X (local) or both.
*/
void allow_mmc_only ();
void allow_mmc_and_local ();
void allow_local_only ();
Gtk::Menu* session_popup_menu; Gtk::Menu* session_popup_menu;
struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord { struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
@ -502,10 +523,12 @@ class ARDOUR_UI : public Gtkmm2ext::UI
gint every_second (); gint every_second ();
gint every_point_one_seconds (); gint every_point_one_seconds ();
gint every_point_oh_five_seconds ();
gint every_point_zero_one_seconds (); gint every_point_zero_one_seconds ();
sigc::connection second_connection; sigc::connection second_connection;
sigc::connection point_one_second_connection; sigc::connection point_one_second_connection;
sigc::connection point_oh_five_second_connection;
sigc::connection point_zero_one_second_connection; sigc::connection point_zero_one_second_connection;
gint session_menu (GdkEventButton *); gint session_menu (GdkEventButton *);
@ -589,7 +612,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
/* Keymap handling */ /* Keymap handling */
void install_actions (); void install_actions ();
void start_keyboard_prefix();
void toggle_record_enable (uint32_t); void toggle_record_enable (uint32_t);
@ -613,11 +635,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI
struct timeval last_peak_grab; struct timeval last_peak_grab;
struct timeval last_shuttle_request; struct timeval last_shuttle_request;
bool have_disk_overrun_displayed; bool have_disk_speed_dialog_displayed;
bool have_disk_underrun_displayed; void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
void disk_overrun_message_gone ();
void disk_underrun_message_gone ();
void disk_overrun_handler (); void disk_overrun_handler ();
void disk_underrun_handler (); void disk_underrun_handler ();
@ -646,10 +665,13 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void toggle_use_midi_control(); void toggle_use_midi_control();
void toggle_send_mtc (); void toggle_send_mtc ();
void toggle_use_osc ();
void set_input_auto_connect (ARDOUR::AutoConnectOption); void set_input_auto_connect (ARDOUR::AutoConnectOption);
void set_output_auto_connect (ARDOUR::AutoConnectOption); void set_output_auto_connect (ARDOUR::AutoConnectOption);
void set_solo_model (ARDOUR::SoloModel); void set_solo_model (ARDOUR::SoloModel);
void set_monitor_model (ARDOUR::MonitorModel); void set_monitor_model (ARDOUR::MonitorModel);
void set_remote_model (ARDOUR::RemoteModel);
void toggle_StopPluginsWithTransport(); void toggle_StopPluginsWithTransport();
void toggle_DoNotRunPluginsWhileRecording(); void toggle_DoNotRunPluginsWhileRecording();
@ -658,12 +680,14 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void toggle_StopTransportAtEndOfSession(); void toggle_StopTransportAtEndOfSession();
void toggle_GainReduceFastTransport(); void toggle_GainReduceFastTransport();
void toggle_LatchedSolo(); void toggle_LatchedSolo();
void toggle_ShowSoloMutes();
void toggle_LatchedRecordEnable (); void toggle_LatchedRecordEnable ();
void toggle_RegionEquivalentsOverlap (); void toggle_RegionEquivalentsOverlap ();
void mtc_port_changed (); void mtc_port_changed ();
void map_solo_model (); void map_solo_model ();
void map_monitor_model (); void map_monitor_model ();
void map_remote_model ();
void map_file_header_format (); void map_file_header_format ();
void map_file_data_format (); void map_file_data_format ();
void map_input_auto_connect (); void map_input_auto_connect ();
@ -680,6 +704,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI
bool can_save_keybindings; bool can_save_keybindings;
bool first_idle (); bool first_idle ();
void no_memory_warning ();
void check_memory_locking ();
}; };
#endif /* __ardour_gui_h__ */ #endif /* __ardour_gui_h__ */

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <fcntl.h> #include <fcntl.h>
@ -38,10 +37,12 @@
#include <ardour/route.h> #include <ardour/route.h>
#include "ardour_ui.h" #include "ardour_ui.h"
#include "keyboard.h"
#include "public_editor.h" #include "public_editor.h"
#include "audio_clock.h" #include "audio_clock.h"
#include "actions.h" #include "actions.h"
#include "utils.h" #include "utils.h"
#include "color_manager.h"
#include "i18n.h" #include "i18n.h"
@ -72,9 +73,10 @@ ARDOUR_UI::setup_windows ()
setup_clock (); setup_clock ();
setup_transport(); setup_transport();
setup_adjustables ();
build_menu_bar (); build_menu_bar ();
color_manager->signal_unmap().connect (bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleColorManager")));
top_packer.pack_start (menu_bar_base, false, false); top_packer.pack_start (menu_bar_base, false, false);
top_packer.pack_start (transport_frame, false, false); top_packer.pack_start (transport_frame, false, false);
@ -83,46 +85,14 @@ ARDOUR_UI::setup_windows ()
return 0; return 0;
} }
void
ARDOUR_UI::setup_adjustables ()
{
adjuster_table.set_homogeneous (true);
online_control_strings.push_back (_("MMC + Local"));
online_control_strings.push_back (_("MMC"));
online_control_strings.push_back (_("Local"));
online_control_button = new GlobalClickBox ("CONTROL",
online_control_strings);
online_control_button->adjustment.signal_value_changed().connect(mem_fun(*this,&ARDOUR_UI::control_methods_adjusted));
mmc_id_strings.push_back ("1");
mmc_id_strings.push_back ("2");
mmc_id_strings.push_back ("3");
mmc_id_strings.push_back ("4");
mmc_id_strings.push_back ("5");
mmc_id_strings.push_back ("6");
mmc_id_strings.push_back ("7");
mmc_id_strings.push_back ("8");
mmc_id_strings.push_back ("9");
mmc_id_button = new GlobalClickBox (_("MMC ID"), mmc_id_strings);
mmc_id_button->adjustment.signal_value_changed().connect (mem_fun(*this,&ARDOUR_UI::mmc_device_id_adjusted));
adjuster_table.attach (*online_control_button, 0, 2, 1, 2, FILL|EXPAND, FILL, 5, 5);
adjuster_table.attach (*mmc_id_button, 2, 3, 1, 2, FILL, FILL, 5, 5);
}
void void
ARDOUR_UI::transport_stopped () ARDOUR_UI::transport_stopped ()
{ {
stop_button.set_active (true); stop_button.set_visual_state (1);
roll_button.set_active (false); roll_button.set_visual_state (0);
play_selection_button.set_active (false); play_selection_button.set_visual_state (0);
auto_loop_button.set_active (false); auto_loop_button.set_visual_state (0);
shuttle_fract = 0; shuttle_fract = 0;
shuttle_box.queue_draw (); shuttle_box.queue_draw ();
@ -133,22 +103,22 @@ ARDOUR_UI::transport_stopped ()
void void
ARDOUR_UI::transport_rolling () ARDOUR_UI::transport_rolling ()
{ {
stop_button.set_active (false); stop_button.set_visual_state (0);
if (session->get_play_range()) { if (session->get_play_range()) {
play_selection_button.set_active (true); play_selection_button.set_visual_state (1);
roll_button.set_active (false); roll_button.set_visual_state (0);
auto_loop_button.set_active (false); auto_loop_button.set_visual_state (0);
} else if (session->get_play_loop ()) { } else if (session->get_play_loop ()) {
auto_loop_button.set_active (true); auto_loop_button.set_visual_state (1);
play_selection_button.set_active (false); play_selection_button.set_visual_state (0);
roll_button.set_active (false); roll_button.set_visual_state (0);
} else { } else {
roll_button.set_active (true); roll_button.set_visual_state (1);
play_selection_button.set_active (false); play_selection_button.set_visual_state (0);
auto_loop_button.set_active (false); auto_loop_button.set_visual_state (0);
} }
/* reset shuttle controller */ /* reset shuttle controller */
@ -160,19 +130,19 @@ ARDOUR_UI::transport_rolling ()
void void
ARDOUR_UI::transport_rewinding () ARDOUR_UI::transport_rewinding ()
{ {
stop_button.set_active(false); stop_button.set_visual_state (0);
roll_button.set_active (true); roll_button.set_visual_state (1);
play_selection_button.set_active (false); play_selection_button.set_visual_state (0);
auto_loop_button.set_active (false); auto_loop_button.set_visual_state (0);
} }
void void
ARDOUR_UI::transport_forwarding () ARDOUR_UI::transport_forwarding ()
{ {
stop_button.set_active (false); stop_button.set_visual_state (0);
roll_button.set_active (true); roll_button.set_visual_state (1);
play_selection_button.set_active (false); play_selection_button.set_visual_state (0);
auto_loop_button.set_active (false); auto_loop_button.set_visual_state (0);
} }
void void
@ -207,6 +177,7 @@ ARDOUR_UI::setup_transport ()
play_selection_button.set_name ("TransportButton"); play_selection_button.set_name ("TransportButton");
rec_button.set_name ("TransportRecButton"); rec_button.set_name ("TransportRecButton");
auto_loop_button.set_name ("TransportButton"); auto_loop_button.set_name ("TransportButton");
auto_return_button.set_name ("TransportButton"); auto_return_button.set_name ("TransportButton");
auto_play_button.set_name ("TransportButton"); auto_play_button.set_name ("TransportButton");
auto_input_button.set_name ("TransportButton"); auto_input_button.set_name ("TransportButton");
@ -215,30 +186,6 @@ ARDOUR_UI::setup_transport ()
click_button.set_name ("TransportButton"); click_button.set_name ("TransportButton");
time_master_button.set_name ("TransportButton"); time_master_button.set_name ("TransportButton");
vector<Gdk::Color> colors;
Gdk::Color c;
/* record button has 3 color states, so we set 2 extra here */
set_color(c, rgba_from_style ("TransportRecButton", 0xff, 0, 0, 0, "bg", Gtk::STATE_PRELIGHT, false ));
colors.push_back (c);
set_color(c, rgba_from_style ("TransportRecButton", 0xff, 0, 0, 0, "bg", Gtk::STATE_ACTIVE, false ));
colors.push_back (c);
rec_button.set_colors (colors);
colors.clear ();
/* other buttons get 2 color states, so add one here */
set_color(c, rgba_from_style ("TransportButton", 0x7f, 0xff, 0x7f, 0, "bg", Gtk::STATE_ACTIVE, false ));
colors.push_back (c);
stop_button.set_colors (colors);
roll_button.set_colors (colors);
auto_loop_button.set_colors (colors);
play_selection_button.set_colors (colors);
goto_start_button.set_colors (colors);
goto_end_button.set_colors (colors);
stop_button.set_size_request(29, -1); stop_button.set_size_request(29, -1);
roll_button.set_size_request(29, -1); roll_button.set_size_request(29, -1);
auto_loop_button.set_size_request(29, -1); auto_loop_button.set_size_request(29, -1);
@ -249,7 +196,7 @@ ARDOUR_UI::setup_transport ()
Widget* w; Widget* w;
stop_button.set_active (true); stop_button.set_visual_state (1);
w = manage (new Image (get_icon (X_("transport_start")))); w = manage (new Image (get_icon (X_("transport_start"))));
w->show(); w->show();
@ -298,6 +245,7 @@ ARDOUR_UI::setup_transport ()
ARDOUR_UI::instance()->tooltips().set_tip (goto_start_button, _("Go to start of session")); ARDOUR_UI::instance()->tooltips().set_tip (goto_start_button, _("Go to start of session"));
ARDOUR_UI::instance()->tooltips().set_tip (goto_end_button, _("Go to end of session")); ARDOUR_UI::instance()->tooltips().set_tip (goto_end_button, _("Go to end of session"));
ARDOUR_UI::instance()->tooltips().set_tip (auto_loop_button, _("Play loop range")); ARDOUR_UI::instance()->tooltips().set_tip (auto_loop_button, _("Play loop range"));
ARDOUR_UI::instance()->tooltips().set_tip (auto_return_button, _("Return to last playback start when stopped")); ARDOUR_UI::instance()->tooltips().set_tip (auto_return_button, _("Return to last playback start when stopped"));
ARDOUR_UI::instance()->tooltips().set_tip (auto_play_button, _("Start playback after any locate")); ARDOUR_UI::instance()->tooltips().set_tip (auto_play_button, _("Start playback after any locate"));
ARDOUR_UI::instance()->tooltips().set_tip (auto_input_button, _("Be sensible about input monitoring")); ARDOUR_UI::instance()->tooltips().set_tip (auto_input_button, _("Be sensible about input monitoring"));
@ -338,12 +286,7 @@ ARDOUR_UI::setup_transport ()
ActionManager::get_action ("Transport", "TogglePunchIn")->connect_proxy (punch_in_button); ActionManager::get_action ("Transport", "TogglePunchIn")->connect_proxy (punch_in_button);
ActionManager::get_action ("Transport", "TogglePunchOut")->connect_proxy (punch_out_button); ActionManager::get_action ("Transport", "TogglePunchOut")->connect_proxy (punch_out_button);
preroll_button.unset_flags (CAN_FOCUS);
preroll_button.set_events (preroll_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
preroll_button.set_name ("TransportButton"); preroll_button.set_name ("TransportButton");
postroll_button.unset_flags (CAN_FOCUS);
postroll_button.set_events (postroll_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
postroll_button.set_name ("TransportButton"); postroll_button.set_name ("TransportButton");
preroll_clock.set_mode (AudioClock::MinSec); preroll_clock.set_mode (AudioClock::MinSec);
@ -622,6 +565,10 @@ ARDOUR_UI::shuttle_box_button_press (GdkEventButton* ev)
return true; return true;
} }
if (shuttle_controller_binding_proxy.button_press_handler (ev)) {
return true;
}
if (Keyboard::is_context_menu_event (ev)) { if (Keyboard::is_context_menu_event (ev)) {
show_shuttle_context_menu (); show_shuttle_context_menu ();
return true; return true;
@ -659,8 +606,8 @@ ARDOUR_UI::shuttle_box_button_release (GdkEventButton* ev)
if (Config->get_auto_play() || roll_button.get_state()) { if (Config->get_auto_play() || roll_button.get_state()) {
shuttle_fract = SHUTTLE_FRACT_SPEED1; shuttle_fract = SHUTTLE_FRACT_SPEED1;
session->request_transport_speed (1.0); session->request_transport_speed (1.0);
stop_button.set_active (false); stop_button.set_visual_state (0);
roll_button.set_active (true); roll_button.set_visual_state (1);
} else { } else {
shuttle_fract = 0; shuttle_fract = 0;
session->request_transport_speed (0.0); session->request_transport_speed (0.0);
@ -673,8 +620,8 @@ ARDOUR_UI::shuttle_box_button_release (GdkEventButton* ev)
if (session->transport_rolling()) { if (session->transport_rolling()) {
shuttle_fract = SHUTTLE_FRACT_SPEED1; shuttle_fract = SHUTTLE_FRACT_SPEED1;
session->request_transport_speed (1.0); session->request_transport_speed (1.0);
stop_button.set_active (false); stop_button.set_visual_state (0);
roll_button.set_active (true); roll_button.set_visual_state (1);
} else { } else {
shuttle_fract = 0; shuttle_fract = 0;
} }
@ -749,6 +696,13 @@ ARDOUR_UI::mouse_shuttle (double x, bool force)
return true; return true;
} }
void
ARDOUR_UI::set_shuttle_fract (double f)
{
shuttle_fract = f;
use_shuttle_fract (false);
}
void void
ARDOUR_UI::use_shuttle_fract (bool force) ARDOUR_UI::use_shuttle_fract (bool force)
{ {

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
/* this file exists solely to break compilation dependencies that /* this file exists solely to break compilation dependencies that

View file

@ -62,6 +62,20 @@ ARDOUR_UI::connect_to_session (Session *s)
ActionManager::set_sensitive (ActionManager::range_sensitive_actions, false); ActionManager::set_sensitive (ActionManager::range_sensitive_actions, false);
} }
if (!session->control_out()) {
Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), X_("SoloViaBus"));
if (act) {
act->set_sensitive (false);
}
}
/* allow wastebasket flush again */
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Main"), X_("FlushWastebasket"));
if (act) {
act->set_sensitive (true);
}
/* there are never any selections on startup */ /* there are never any selections on startup */
ActionManager::set_sensitive (ActionManager::region_selection_sensitive_actions, false); ActionManager::set_sensitive (ActionManager::region_selection_sensitive_actions, false);
@ -139,6 +153,7 @@ ARDOUR_UI::connect_to_session (Session *s)
second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_second), 1000); second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_second), 1000);
point_one_second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_point_one_seconds), 100); point_one_second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_point_one_seconds), 100);
// point_oh_five_second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_point_oh_five_seconds), 50);
point_zero_one_second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_point_zero_one_seconds), 40); point_zero_one_second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_point_zero_one_seconds), 40);
} }
@ -158,6 +173,7 @@ ARDOUR_UI::unload_session ()
editor->hide (); editor->hide ();
second_connection.disconnect (); second_connection.disconnect ();
point_one_second_connection.disconnect (); point_one_second_connection.disconnect ();
point_oh_five_second_connection.disconnect ();
point_zero_one_second_connection.disconnect(); point_zero_one_second_connection.disconnect();
ActionManager::set_sensitive (ActionManager::session_sensitive_actions, false); ActionManager::set_sensitive (ActionManager::session_sensitive_actions, false);
@ -322,7 +338,7 @@ int
ARDOUR_UI::create_route_params () ARDOUR_UI::create_route_params ()
{ {
if (route_params == 0) { if (route_params == 0) {
route_params = new RouteParams_UI (*engine); route_params = new RouteParams_UI ();
route_params->set_session (session); route_params->set_session (session);
route_params->signal_unmap().connect (sigc::bind(sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleInspector"))); route_params->signal_unmap().connect (sigc::bind(sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleInspector")));
} }

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
/* This file contains any ARDOUR_UI methods that require knowledge of /* This file contains any ARDOUR_UI methods that require knowledge of
@ -35,6 +34,7 @@
#include "actions.h" #include "actions.h"
#include <ardour/session.h> #include <ardour/session.h>
#include <ardour/audioengine.h>
#include <ardour/control_protocol_manager.h> #include <ardour/control_protocol_manager.h>
#include <control_protocol/control_protocol.h> #include <control_protocol/control_protocol.h>
@ -54,7 +54,7 @@ ARDOUR_UI::create_editor ()
{ {
try { try {
editor = new Editor (*engine); editor = new Editor ();
} }
catch (failed_constructor& err) { catch (failed_constructor& err) {
@ -92,14 +92,15 @@ ARDOUR_UI::install_actions ()
/* the real actions */ /* the real actions */
act = ActionManager::register_action (main_actions, X_("New"), _("New"), bind (mem_fun(*this, &ARDOUR_UI::new_session), string ())); act = ActionManager::register_action (main_actions, X_("New"), _("New"), hide_return (bind (mem_fun(*this, &ARDOUR_UI::new_session), string ())));
ActionManager::register_action (main_actions, X_("Open"), _("Open"), mem_fun(*this, &ARDOUR_UI::open_session)); ActionManager::register_action (main_actions, X_("Open"), _("Open"), mem_fun(*this, &ARDOUR_UI::open_session));
ActionManager::register_action (main_actions, X_("Recent"), _("Recent"), mem_fun(*this, &ARDOUR_UI::open_recent_session)); ActionManager::register_action (main_actions, X_("Recent"), _("Recent"), mem_fun(*this, &ARDOUR_UI::open_recent_session));
act = ActionManager::register_action (main_actions, X_("Close"), _("Close"), mem_fun(*this, &ARDOUR_UI::close_session)); act = ActionManager::register_action (main_actions, X_("Close"), _("Close"), mem_fun(*this, &ARDOUR_UI::close_session));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (main_actions, X_("AddTrackBus"), _("Add Track/Bus"), mem_fun(*this, &ARDOUR_UI::add_route)); act = ActionManager::register_action (main_actions, X_("AddTrackBus"), _("Add Track/Bus"),
bind (mem_fun(*this, &ARDOUR_UI::add_route), (Gtk::Window*) 0));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
@ -180,7 +181,6 @@ ARDOUR_UI::install_actions ()
common_actions = ActionGroup::create (X_("Common")); common_actions = ActionGroup::create (X_("Common"));
ActionManager::register_action (main_actions, X_("Windows"), _("Windows")); ActionManager::register_action (main_actions, X_("Windows"), _("Windows"));
ActionManager::register_action (common_actions, X_("Start-Prefix"), _("start prefix"), mem_fun(*this, &ARDOUR_UI::start_keyboard_prefix));
ActionManager::register_action (common_actions, X_("Quit"), _("Quit"), (mem_fun(*this, &ARDOUR_UI::finish))); ActionManager::register_action (common_actions, X_("Quit"), _("Quit"), (mem_fun(*this, &ARDOUR_UI::finish)));
/* windows visibility actions */ /* windows visibility actions */
@ -397,6 +397,11 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_toggle_action (option_actions, X_("UseMIDIcontrol"), _("Use MIDI control"), mem_fun (*this, &ARDOUR_UI::toggle_use_midi_control)); act = ActionManager::register_toggle_action (option_actions, X_("UseMIDIcontrol"), _("Use MIDI control"), mem_fun (*this, &ARDOUR_UI::toggle_use_midi_control));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (option_actions, X_("UseOSC"), _("Use OSC"), mem_fun (*this, &ARDOUR_UI::toggle_use_osc));
#ifndef HAVE_LIBLO
act->set_sensitive (false);
#endif
ActionManager::register_toggle_action (option_actions, X_("StopPluginsWithTransport"), _("Stop plugins with transport"), mem_fun (*this, &ARDOUR_UI::toggle_StopPluginsWithTransport)); ActionManager::register_toggle_action (option_actions, X_("StopPluginsWithTransport"), _("Stop plugins with transport"), mem_fun (*this, &ARDOUR_UI::toggle_StopPluginsWithTransport));
ActionManager::register_toggle_action (option_actions, X_("VerifyRemoveLastCapture"), _("Verify remove last capture"), mem_fun (*this, &ARDOUR_UI::toggle_VerifyRemoveLastCapture)); ActionManager::register_toggle_action (option_actions, X_("VerifyRemoveLastCapture"), _("Verify remove last capture"), mem_fun (*this, &ARDOUR_UI::toggle_VerifyRemoveLastCapture));
ActionManager::register_toggle_action (option_actions, X_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun)); ActionManager::register_toggle_action (option_actions, X_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun));
@ -410,6 +415,8 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_toggle_action (option_actions, X_("LatchedSolo"), _("Latched solo"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedSolo)); act = ActionManager::register_toggle_action (option_actions, X_("LatchedSolo"), _("Latched solo"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedSolo));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (option_actions, X_("ShowSoloMutes"), _("Show solo muting"), mem_fun (*this, &ARDOUR_UI::toggle_ShowSoloMutes));
ActionManager::session_sensitive_actions.push_back (act);
/* !!! REMEMBER THAT RADIO ACTIONS HAVE TO BE HANDLED WITH MORE FINESSE THAN SIMPLE TOGGLES !!! */ /* !!! REMEMBER THAT RADIO ACTIONS HAVE TO BE HANDLED WITH MORE FINESSE THAN SIMPLE TOGGLES !!! */
@ -472,6 +479,15 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_radio_action (option_actions, output_auto_connect_group, X_("OutputAutoConnectManual"), _("Manually connect outputs"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_output_auto_connect), (AutoConnectOption) 0))); act = ActionManager::register_radio_action (option_actions, output_auto_connect_group, X_("OutputAutoConnectManual"), _("Manually connect outputs"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_output_auto_connect), (AutoConnectOption) 0)));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
RadioAction::Group remote_group;
act = ActionManager::register_radio_action (option_actions, remote_group, X_("RemoteUserDefined"), _("Remote ID assigned by User"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_remote_model), UserOrdered)));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_radio_action (option_actions, remote_group, X_("RemoteMixerDefined"), _("Remote ID follows order of Mixer"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_remote_model), MixerOrdered)));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_radio_action (option_actions, remote_group, X_("RemoteEditorDefined"), _("Remote ID follows order of Editor"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_remote_model), EditorOrdered)));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::add_action_group (shuttle_actions); ActionManager::add_action_group (shuttle_actions);
ActionManager::add_action_group (option_actions); ActionManager::add_action_group (option_actions);
ActionManager::add_action_group (jack_actions); ActionManager::add_action_group (jack_actions);
@ -526,6 +542,57 @@ ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const cha
} }
} }
void
ARDOUR_UI::set_jack_buffer_size (nframes_t nframes)
{
Glib::RefPtr<Action> action;
char* action_name = 0;
switch (nframes) {
case 32:
action_name = X_("JACKLatency32");
break;
case 64:
action_name = X_("JACKLatency64");
break;
case 128:
action_name = X_("JACKLatency128");
break;
case 512:
action_name = X_("JACKLatency512");
break;
case 1024:
action_name = X_("JACKLatency1024");
break;
case 2048:
action_name = X_("JACKLatency2048");
break;
case 4096:
action_name = X_("JACKLatency4096");
break;
case 8192:
action_name = X_("JACKLatency8192");
break;
default:
/* XXX can we do anything useful ? */
break;
}
if (action_name) {
action = ActionManager::get_action (X_("JACK"), action_name);
if (action) {
Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (action);
if (ract && ract->get_active()) {
engine->request_buffer_size (nframes);
update_sample_rate (0);
}
}
}
}
void void
ARDOUR_UI::build_control_surface_menu () ARDOUR_UI::build_control_surface_menu ()
{ {

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
/* This file contains any ARDOUR_UI methods that require knowledge of /* This file contains any ARDOUR_UI methods that require knowledge of
@ -35,7 +34,7 @@ ARDOUR_UI::create_mixer ()
{ {
try { try {
mixer = new Mixer_UI (*engine); mixer = new Mixer_UI ();
} }
catch (failed_constructor& err) { catch (failed_constructor& err) {
@ -44,3 +43,4 @@ ARDOUR_UI::create_mixer ()
return 0; return 0;
} }

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <pbd/convert.h> #include <pbd/convert.h>
@ -25,6 +24,7 @@
#include <ardour/configuration.h> #include <ardour/configuration.h>
#include <ardour/session.h> #include <ardour/session.h>
#include <ardour/osc.h>
#include <ardour/audioengine.h> #include <ardour/audioengine.h>
#include "ardour_ui.h" #include "ardour_ui.h"
@ -63,6 +63,12 @@ ARDOUR_UI::toggle_use_mmc ()
ActionManager::toggle_config_state ("options", "UseMMC", &Configuration::set_mmc_control, &Configuration::get_mmc_control); ActionManager::toggle_config_state ("options", "UseMMC", &Configuration::set_mmc_control, &Configuration::get_mmc_control);
} }
void
ARDOUR_UI::toggle_use_osc ()
{
ActionManager::toggle_config_state ("options", "UseOSC", &Configuration::set_use_osc, &Configuration::get_use_osc);
}
void void
ARDOUR_UI::toggle_use_midi_control () ARDOUR_UI::toggle_use_midi_control ()
{ {
@ -78,7 +84,7 @@ ARDOUR_UI::toggle_send_midi_feedback ()
void void
ARDOUR_UI::set_native_file_header_format (HeaderFormat hf) ARDOUR_UI::set_native_file_header_format (HeaderFormat hf)
{ {
const char *action; const char *action = 0;
switch (hf) { switch (hf) {
case BWF: case BWF:
@ -120,7 +126,7 @@ ARDOUR_UI::set_native_file_header_format (HeaderFormat hf)
void void
ARDOUR_UI::set_native_file_data_format (SampleFormat sf) ARDOUR_UI::set_native_file_data_format (SampleFormat sf)
{ {
const char* action; const char* action = 0;
switch (sf) { switch (sf) {
case FormatFloat: case FormatFloat:
@ -225,6 +231,39 @@ ARDOUR_UI::set_solo_model (SoloModel model)
} }
void
ARDOUR_UI::set_remote_model (RemoteModel model)
{
const char* action = 0;
switch (model) {
case UserOrdered:
action = X_("RemoteUserDefined");
break;
case MixerOrdered:
action = X_("RemoteMixerDefined");
break;
case EditorOrdered:
action = X_("RemoteEditorDefined");
break;
default:
fatal << string_compose (_("programming error: unknown remote model in ARDOUR_UI::set_remote_model: %1"), model) << endmsg;
/*NOTREACHED*/
}
Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
if (act) {
Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
if (ract && ract->get_active() && Config->get_remote_model() != model) {
Config->set_remote_model (model);
}
}
}
void void
ARDOUR_UI::set_monitor_model (MonitorModel model) ARDOUR_UI::set_monitor_model (MonitorModel model)
{ {
@ -389,6 +428,12 @@ ARDOUR_UI::toggle_LatchedSolo()
ActionManager::toggle_config_state ("options", "LatchedSolo", &Configuration::set_solo_latched, &Configuration::get_solo_latched); ActionManager::toggle_config_state ("options", "LatchedSolo", &Configuration::set_solo_latched, &Configuration::get_solo_latched);
} }
void
ARDOUR_UI::toggle_ShowSoloMutes()
{
ActionManager::toggle_config_state ("options", "ShowSoloMutes", &Configuration::set_show_solo_mutes, &Configuration::get_show_solo_mutes);
}
void void
ARDOUR_UI::mtc_port_changed () ARDOUR_UI::mtc_port_changed ()
{ {
@ -471,6 +516,33 @@ ARDOUR_UI::map_monitor_model ()
} }
} }
void
ARDOUR_UI::map_remote_model ()
{
const char* on = 0;
switch (Config->get_remote_model()) {
case UserOrdered:
on = X_("RemoteUserDefined");
break;
case MixerOrdered:
on = X_("RemoteMixerDefined");
break;
case EditorOrdered:
on = X_("RemoteEditorDefined");
break;
}
Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
if (tact && !tact->get_active()) {
tact->set_active (true);
}
}
}
void void
ARDOUR_UI::map_file_header_format () ARDOUR_UI::map_file_header_format ()
{ {
@ -758,6 +830,19 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
sync_option_combo.set_active_text (slave_source_to_string (Config->get_slave_source())); sync_option_combo.set_active_text (slave_source_to_string (Config->get_slave_source()));
switch (Config->get_slave_source()) {
case None:
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
break;
default:
/* XXX need to make auto-play is off as well as insensitive */
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
break;
}
} else if (PARAM_IS ("send-mtc")) { } else if (PARAM_IS ("send-mtc")) {
ActionManager::map_some_state ("options", "SendMTC", &Configuration::get_send_mtc); ActionManager::map_some_state ("options", "SendMTC", &Configuration::get_send_mtc);
@ -766,6 +851,18 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
ActionManager::map_some_state ("options", "SendMMC", &Configuration::get_send_mmc); ActionManager::map_some_state ("options", "SendMMC", &Configuration::get_send_mmc);
} else if (PARAM_IS ("use-osc")) {
#ifdef HAVE_LIBLO
if (Config->get_use_osc()) {
osc->start ();
} else {
osc->stop ();
}
#endif
ActionManager::map_some_state ("options", "UseOSC", &Configuration::get_use_osc);
} else if (PARAM_IS ("mmc-control")) { } else if (PARAM_IS ("mmc-control")) {
ActionManager::map_some_state ("options", "UseMMC", &Configuration::get_mmc_control); ActionManager::map_some_state ("options", "UseMMC", &Configuration::get_mmc_control);
} else if (PARAM_IS ("midi-feedback")) { } else if (PARAM_IS ("midi-feedback")) {
@ -778,6 +875,8 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
ActionManager::map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable); ActionManager::map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable);
} else if (PARAM_IS ("solo-latched")) { } else if (PARAM_IS ("solo-latched")) {
ActionManager::map_some_state ("options", "LatchedSolo", &Configuration::get_solo_latched); ActionManager::map_some_state ("options", "LatchedSolo", &Configuration::get_solo_latched);
} else if (PARAM_IS ("show-solo-mutes")) {
ActionManager::map_some_state ("options", "ShowSoloMutes", &Configuration::get_show_solo_mutes);
} else if (PARAM_IS ("solo-model")) { } else if (PARAM_IS ("solo-model")) {
map_solo_model (); map_solo_model ();
} else if (PARAM_IS ("auto-play")) { } else if (PARAM_IS ("auto-play")) {
@ -806,6 +905,8 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
ActionManager::map_some_state ("options", "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end); ActionManager::map_some_state ("options", "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end);
} else if (PARAM_IS ("monitoring-model")) { } else if (PARAM_IS ("monitoring-model")) {
map_monitor_model (); map_monitor_model ();
} else if (PARAM_IS ("remote-model")) {
map_remote_model ();
} else if (PARAM_IS ("use-video-sync")) { } else if (PARAM_IS ("use-video-sync")) {
ActionManager::map_some_state ("Transport", "ToggleVideoSync", &Configuration::get_use_video_sync); ActionManager::map_some_state ("Transport", "ToggleVideoSync", &Configuration::get_use_video_sync);
} else if (PARAM_IS ("quieten-at-speed")) { } else if (PARAM_IS ("quieten-at-speed")) {

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdio> // for sprintf #include <cstdio> // for sprintf

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __audio_clock_h__ #ifndef __audio_clock_h__

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <pbd/memento_command.h> #include <pbd/memento_command.h>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __gtk_ardour_audio_region_edit_h__ #ifndef __gtk_ardour_audio_region_edit_h__

View file

@ -88,13 +88,36 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView
{ {
} }
AudioRegionView::AudioRegionView (const AudioRegionView& other)
: RegionView (other)
, zero_line(0)
, fade_in_shape(0)
, fade_out_shape(0)
, fade_in_handle(0)
, fade_out_handle(0)
, gain_line(0)
, _amplitude_above_axis(1.0)
, _flags(0)
, fade_color(0)
{
Gdk::Color c;
int r,g,b,a;
UINT_TO_RGBA (other.fill_color, &r, &g, &b, &a);
c.set_rgb_p (r/255.0, g/255.0, b/255.0);
init (c, false);
}
void void
AudioRegionView::init (Gdk::Color& basic_color, bool wfd) AudioRegionView::init (Gdk::Color& basic_color, bool wfd)
{ {
// FIXME: Some redundancy here with RegionView::init. Need to figure out // FIXME: Some redundancy here with RegionView::init. Need to figure out
// where order is important and where it isn't... // where order is important and where it isn't...
RegionView::init(basic_color, wfd); RegionView::init(basic_color, false);
XMLNode *node; XMLNode *node;
@ -629,13 +652,16 @@ AudioRegionView::set_samples_per_unit (gdouble spu)
{ {
RegionView::set_samples_per_unit (spu); RegionView::set_samples_per_unit (spu);
for (uint32_t n=0; n < waves.size(); ++n) { if (_flags & WaveformVisible) {
waves[n]->property_samples_per_unit() = spu; for (uint32_t n=0; n < waves.size(); ++n) {
waves[n]->property_samples_per_unit() = spu;
}
} }
if (gain_line) { if (gain_line) {
gain_line->reset (); gain_line->reset ();
} }
reset_fade_shapes (); reset_fade_shapes ();
} }
@ -698,6 +724,10 @@ AudioRegionView::set_waveform_visible (bool yn)
if (((_flags & WaveformVisible) != yn)) { if (((_flags & WaveformVisible) != yn)) {
if (yn) { if (yn) {
for (uint32_t n=0; n < waves.size(); ++n) { for (uint32_t n=0; n < waves.size(); ++n) {
/* make sure the zoom level is correct, since we don't update
this when waveforms are hidden.
*/
waves[n]->property_samples_per_unit() = samples_per_unit;
waves[n]->show(); waves[n]->show();
} }
_flags |= WaveformVisible; _flags |= WaveformVisible;

View file

@ -55,6 +55,8 @@ class AudioRegionView : public RegionView
double initial_samples_per_unit, double initial_samples_per_unit,
Gdk::Color& basic_color); Gdk::Color& basic_color);
AudioRegionView (const AudioRegionView& other);
~AudioRegionView (); ~AudioRegionView ();
virtual void init (Gdk::Color& base_color, bool wait_for_data = false); virtual void init (Gdk::Color& base_color, bool wait_for_data = false);
@ -160,9 +162,9 @@ class AudioRegionView : public RegionView
void reset_width_dependent_items (double pixel_width); void reset_width_dependent_items (double pixel_width);
void set_waveview_data_src(); void set_waveview_data_src();
vector<GnomeCanvasWaveViewCache*> wave_caches;
void color_handler (ColorID, uint32_t); void color_handler (ColorID, uint32_t);
vector<GnomeCanvasWaveViewCache*> wave_caches;
}; };
#endif /* __gtk_ardour_audio_region_view_h__ */ #endif /* __gtk_ardour_audio_region_view_h__ */

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdlib> #include <cstdlib>
@ -116,21 +115,13 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
_route->panner().Changed.connect (mem_fun(*this, &AudioTimeAxisView::update_pans)); _route->panner().Changed.connect (mem_fun(*this, &AudioTimeAxisView::update_pans));
if (is_track()) { update_control_names ();
controls_ebox.set_name ("AudioTrackControlsBaseUnselected"); if (is_audio_track()) {
controls_base_selected_name = "AudioTrackControlsBaseSelected";
controls_base_unselected_name = "AudioTrackControlsBaseUnselected";
/* ask for notifications of any new RegionViews */ /* ask for notifications of any new RegionViews */
_view->RegionViewAdded.connect (mem_fun(*this, &AudioTimeAxisView::region_view_added)); _view->RegionViewAdded.connect (mem_fun(*this, &AudioTimeAxisView::region_view_added));
_view->attach (); _view->attach ();
} else { /* bus */
controls_ebox.set_name ("AudioBusControlsBaseUnselected");
controls_base_selected_name = "AudioBusControlsBaseSelected";
controls_base_unselected_name = "AudioBusControlsBaseUnselected";
} }
post_construct (); post_construct ();
@ -630,7 +621,19 @@ void
AudioTimeAxisView::route_active_changed () AudioTimeAxisView::route_active_changed ()
{ {
RouteTimeAxisView::route_active_changed (); RouteTimeAxisView::route_active_changed ();
update_control_names ();
}
/**
* Set up the names of the controls so that they are coloured
* correctly depending on whether this route is inactive or
* selected.
*/
void
AudioTimeAxisView::update_control_names ()
{
if (is_audio_track()) { if (is_audio_track()) {
if (_route->active()) { if (_route->active()) {
controls_ebox.set_name ("AudioTrackControlsBaseUnselected"); controls_ebox.set_name ("AudioTrackControlsBaseUnselected");

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __ardour_audio_time_axis_h__ #ifndef __ardour_audio_time_axis_h__
@ -115,6 +114,7 @@ class AudioTimeAxisView : public RouteTimeAxisView
void pan_hidden (); void pan_hidden ();
void update_pans (); void update_pans ();
void update_control_names ();
AutomationTimeAxisView* gain_track; AutomationTimeAxisView* gain_track;
AutomationTimeAxisView* pan_track; AutomationTimeAxisView* pan_track;

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <sigc++/signal.h> #include <sigc++/signal.h>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cmath> #include <cmath>
@ -25,6 +24,7 @@
#include <pbd/stl_delete.h> #include <pbd/stl_delete.h>
#include <pbd/memento_command.h> #include <pbd/memento_command.h>
#include <pbd/stacktrace.h>
#include <ardour/automation_event.h> #include <ardour/automation_event.h>
#include <ardour/curve.h> #include <ardour/curve.h>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __ardour_automation_line_h__ #ifndef __ardour_automation_line_h__

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <sigc++/signal.h> #include <sigc++/signal.h>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdlib> #include <cstdlib>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __ardour_gtk_axis_view_h__ #ifndef __ardour_gtk_axis_view_h__

View file

@ -16,7 +16,15 @@
#include <libgnomecanvas/libgnomecanvas.h> #include <libgnomecanvas/libgnomecanvas.h>
#include <gtk/gtkenums.h> #include <gtk/gtkenums.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <libart_lgpl/art_misc.h> #include <libart_lgpl/art_misc.h>
#ifdef __cplusplus
}
#endif
#include <libart_lgpl/art_pixbuf.h> #include <libart_lgpl/art_pixbuf.h>

View file

@ -257,13 +257,14 @@ gnome_canvas_simplerect_bounds (GnomeCanvasItem *item, double *x1, double *y1, d
} }
static void static void
gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item) gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item)
{ {
GnomeCanvasSimpleRect* simplerect; GnomeCanvasSimpleRect* simplerect;
double x1, x2, y1, y2; double x1, x2, y1, y2;
double old_x1, old_x2, old_y1, old_y2; double old_x1, old_x2, old_y1, old_y2;
double a, b, c, d; ArtDRect unionrect, old, new;
old_x1 = item->x1; old_x1 = item->x1;
old_y1 = item->y1; old_y1 = item->y1;
@ -288,23 +289,73 @@ gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item)
/* now queue redraws for changed areas */ /* now queue redraws for changed areas */
a = MIN(item->x1, old_x1); if (item->x1 == old_x1 && item->x2 == old_x2) {
b = MAX(item->x1, old_x1);
a = MIN(a, item->x2); /* no change in x-axis position */
a = MIN(a, old_x2);
b = MAX(b, item->x2);
b = MAX(b, old_x2);
c = MIN(item->y1, old_y1); if (item->y1 == old_y1) {
d = MAX(item->y1, old_y1); /* top didn't change, so just draw bottom */
c = MIN(c,item->y2); double start_y = MIN (item->y2, old_y2);
c = MIN(c, old_y2); double end_y = MAX (item->y2, old_y2);
d = MAX(d,item->y2);
d = MAX(d, old_y2);
gnome_canvas_request_redraw (item->canvas, a, c, b + 0.5, d + 0.5); gnome_canvas_request_redraw (item->canvas, item->x1, start_y - 0.5, item->x2 + 0.5, end_y + 0.5);
return;
} else if (item->y2 == old_y2) {
/* bottom didn't change, just draw top */
double start_y = MIN (item->y1, old_y1);
double end_y = MAX (item->y1, old_y1);
gnome_canvas_request_redraw (item->canvas, item->x1, start_y - 0.5, item->x2 + 0.5, end_y + 0.5);
return;
}
} else if (item->y1 == old_y1 && item->y2 == old_y2) {
/* no change in y-axis position */
if (item->x1 == old_x1) {
/* start didn't change, so just draw at the end */
double start_x = MIN (item->x2, old_x2);
double end_x = MAX (item->x2, old_x2);
gnome_canvas_request_redraw (item->canvas, start_x - 0.5, item->y1, end_x + 0.5, item->y2 + 0.5);
return;
} else if (item->x2 == old_x2) {
/* end didn't change, so just draw at the start */
double start_x = MIN (item->x1, old_x1);
double end_x = MAX (item->x1, old_x1);
gnome_canvas_request_redraw (item->canvas, start_x - 0.5, item->y1, end_x + 0.5, item->y2 + 0.5);
return;
}
}
new.x0 = x1;
new.y0 = y1;
new.x1 = x2;
new.y1 = y2;
old.x0 = old_x1;
old.y0 = old_y1;
old.x1 = old_x2;
old.y1 = old_y2;
art_drect_union (&unionrect, &old, &new);
gnome_canvas_request_redraw (item->canvas,
unionrect.x0,
unionrect.y0,
unionrect.x1 + 0.5,
unionrect.y1 + 0.5);
} }
/* /*

View file

@ -369,7 +369,8 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
end_sample = end_sample + waveview->region_start; end_sample = end_sample + waveview->region_start;
#if DEBUG_CACHE #if DEBUG_CACHE
// printf("waveview->region_start == %lu\n",waveview->region_start); // printf("waveview->region_start == %lu\n",waveview->region_start);
printf ("=> 0x%x cache @ 0x%x range: %lu - %lu request: %lu - %lu (%lu frames)\n", // c_stacktrace ();
printf ("\n\n=> 0x%x cache @ 0x%x range: %lu - %lu request: %lu - %lu (%lu frames)\n",
waveview, cache, waveview, cache,
cache->start, cache->end, cache->start, cache->end,
start_sample, end_sample, end_sample - start_sample); start_sample, end_sample, end_sample - start_sample);
@ -413,7 +414,7 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
} }
#if DEBUG_CACHE #if DEBUG_CACHE
fprintf (stderr, "\n\nAVAILABLE FRAMES = %lu of %lu, start = %lu, sstart = %lu, cstart = %lu\n", fprintf (stderr, "AVAILABLE FRAMES = %lu of %lu, start = %lu, sstart = %lu, cstart = %lu\n",
rf3, waveview->sourcefile_length_function (waveview->data_src, waveview->samples_per_unit), rf3, waveview->sourcefile_length_function (waveview->data_src, waveview->samples_per_unit),
waveview->region_start, start_sample, new_cache_start); waveview->region_start, start_sample, new_cache_start);
#endif #endif

View file

@ -104,3 +104,6 @@ COLORID(cTrimHandleLockedStart)
COLORID(cTrimHandleLockedEnd) COLORID(cTrimHandleLockedEnd)
COLORID(cTrimHandleStart) COLORID(cTrimHandleStart)
COLORID(cTrimHandleEnd) COLORID(cTrimHandleEnd)
COLORID(cEditCursor)
COLORID(cPlayHead)

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <map> #include <map>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __ardour_gtk_connection_editor_h__ #ifndef __ardour_gtk_connection_editor_h__

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cmath> #include <cmath>
@ -194,7 +193,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
for (list<Preset*>::iterator i = fade_in_presets->begin(); i != fade_in_presets->end(); ++i) { for (list<Preset*>::iterator i = fade_in_presets->begin(); i != fade_in_presets->end(); ++i) {
pxmap = manage (new Image (get_xpm((*i)->xpm))); pxmap = manage (new Image (::get_icon ((*i)->image_name)));
pbutton = manage (new Button); pbutton = manage (new Button);
pbutton->add (*pxmap); pbutton->add (*pxmap);
pbutton->set_name ("CrossfadeEditButton"); pbutton->set_name ("CrossfadeEditButton");
@ -215,7 +214,7 @@ CrossfadeEditor::CrossfadeEditor (Session& s, boost::shared_ptr<Crossfade> xf, d
for (list<Preset*>::iterator i = fade_out_presets->begin(); i != fade_out_presets->end(); ++i) { for (list<Preset*>::iterator i = fade_out_presets->begin(); i != fade_out_presets->end(); ++i) {
pxmap = manage (new Image (get_xpm((*i)->xpm))); pxmap = manage (new Image (::get_icon ((*i)->image_name)));
pbutton = manage (new Button); pbutton = manage (new Button);
pbutton->add (*pxmap); pbutton->add (*pxmap);
pbutton->set_name ("CrossfadeEditButton"); pbutton->set_name ("CrossfadeEditButton");
@ -832,7 +831,8 @@ CrossfadeEditor::build_presets ()
fade_out_presets = new Presets; fade_out_presets = new Presets;
/* FADE OUT */ /* FADE OUT */
p = new Preset ("hiin.xpm"); // p = new Preset ("hiin.xpm");
p = new Preset ("crossfade_in_fast-cut");
p->push_back (PresetPoint (0, 0)); p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (0.0207373, 0.197222)); p->push_back (PresetPoint (0.0207373, 0.197222));
p->push_back (PresetPoint (0.0645161, 0.525)); p->push_back (PresetPoint (0.0645161, 0.525));
@ -843,7 +843,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 1)); p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p); fade_in_presets->push_back (p);
p = new Preset ("loin.xpm"); // p = new Preset ("loin.xpm");
p = new Preset ("crossfade_in_transition");
p->push_back (PresetPoint (0, 0)); p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (0.389401, 0.0333333)); p->push_back (PresetPoint (0.389401, 0.0333333));
p->push_back (PresetPoint (0.629032, 0.0861111)); p->push_back (PresetPoint (0.629032, 0.0861111));
@ -853,7 +854,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 1)); p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p); fade_in_presets->push_back (p);
p = new Preset ("regin.xpm"); // p = new Preset ("regin.xpm");
p = new Preset ("crossfade_in_constant");
p->push_back (PresetPoint (0, 0)); p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (0.0737327, 0.308333)); p->push_back (PresetPoint (0.0737327, 0.308333));
p->push_back (PresetPoint (0.246544, 0.658333)); p->push_back (PresetPoint (0.246544, 0.658333));
@ -863,7 +865,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 1)); p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p); fade_in_presets->push_back (p);
p = new Preset ("regin2.xpm"); // p = new Preset ("regin2.xpm");
p = new Preset ("crossfade_in_slow-cut");
p->push_back (PresetPoint (0, 0)); p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (0.304147, 0.0694444)); p->push_back (PresetPoint (0.304147, 0.0694444));
p->push_back (PresetPoint (0.529954, 0.152778)); p->push_back (PresetPoint (0.529954, 0.152778));
@ -873,14 +876,16 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 1)); p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p); fade_in_presets->push_back (p);
p = new Preset ("linin.xpm"); // p = new Preset ("linin.xpm");
p = new Preset ("crossfade_in_dipped");
p->push_back (PresetPoint (0, 0)); p->push_back (PresetPoint (0, 0));
p->push_back (PresetPoint (1, 1)); p->push_back (PresetPoint (1, 1));
fade_in_presets->push_back (p); fade_in_presets->push_back (p);
/* FADE OUT */ /* FADE OUT */
p = new Preset ("hiout.xpm"); // p = new Preset ("hiout.xpm");
p = new Preset ("crossfade_out_fast-cut");
p->push_back (PresetPoint (0, 1)); p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (0.305556, 1)); p->push_back (PresetPoint (0.305556, 1));
p->push_back (PresetPoint (0.548611, 0.991736)); p->push_back (PresetPoint (0.548611, 0.991736));
@ -890,7 +895,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 0)); p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p); fade_out_presets->push_back (p);
p = new Preset ("regout.xpm"); // p = new Preset ("regout.xpm");
p = new Preset ("crossfade_out_constant");
p->push_back (PresetPoint (0, 1)); p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (0.228111, 0.988889)); p->push_back (PresetPoint (0.228111, 0.988889));
p->push_back (PresetPoint (0.347926, 0.972222)); p->push_back (PresetPoint (0.347926, 0.972222));
@ -900,7 +906,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 0)); p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p); fade_out_presets->push_back (p);
p = new Preset ("loout.xpm"); // p = new Preset ("loout.xpm");
p = new Preset ("crossfade_out_transition");
p->push_back (PresetPoint (0, 1)); p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (0.023041, 0.697222)); p->push_back (PresetPoint (0.023041, 0.697222));
p->push_back (PresetPoint (0.0553, 0.483333)); p->push_back (PresetPoint (0.0553, 0.483333));
@ -910,7 +917,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 0)); p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p); fade_out_presets->push_back (p);
p = new Preset ("regout2.xpm"); // p = new Preset ("regout2.xpm");
p = new Preset ("crossfade_out_slow-fade");
p->push_back (PresetPoint (0, 1)); p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (0.080645, 0.730556)); p->push_back (PresetPoint (0.080645, 0.730556));
p->push_back (PresetPoint (0.277778, 0.289256)); p->push_back (PresetPoint (0.277778, 0.289256));
@ -919,7 +927,8 @@ CrossfadeEditor::build_presets ()
p->push_back (PresetPoint (1, 0)); p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p); fade_out_presets->push_back (p);
p = new Preset ("linout.xpm"); // p = new Preset ("linout.xpm");
p = new Preset ("crossfade_out_dipped");
p->push_back (PresetPoint (0, 1)); p->push_back (PresetPoint (0, 1));
p->push_back (PresetPoint (1, 0)); p->push_back (PresetPoint (1, 0));
fade_out_presets->push_back (p); fade_out_presets->push_back (p);

View file

@ -43,10 +43,9 @@ class CrossfadeEditor : public ArdourDialog
}; };
struct Preset : public list<PresetPoint> { struct Preset : public list<PresetPoint> {
string xpm; const char* image_name;
Preset (string x) Preset (const char* x) : image_name (x) {}
: xpm (x) {}
}; };
typedef list<Preset*> Presets; typedef list<Preset*> Presets;

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <algorithm> #include <algorithm>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __gtk_ardour_crossfade_view_h__ #ifndef __gtk_ardour_crossfade_view_h__

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <unistd.h> #include <unistd.h>
@ -35,6 +34,7 @@
#include <gdkmm/color.h> #include <gdkmm/color.h>
#include <gdkmm/bitmap.h> #include <gdkmm/bitmap.h>
#include <gtkmm2ext/grouped_buttons.h>
#include <gtkmm2ext/gtk_ui.h> #include <gtkmm2ext/gtk_ui.h>
#include <gtkmm2ext/tearoff.h> #include <gtkmm2ext/tearoff.h>
#include <gtkmm2ext/utils.h> #include <gtkmm2ext/utils.h>
@ -54,7 +54,6 @@
#include "ardour_ui.h" #include "ardour_ui.h"
#include "editor.h" #include "editor.h"
#include "grouped_buttons.h"
#include "keyboard.h" #include "keyboard.h"
#include "marker.h" #include "marker.h"
#include "playlist_selector.h" #include "playlist_selector.h"
@ -69,7 +68,6 @@
#include "editing.h" #include "editing.h"
#include "public_editor.h" #include "public_editor.h"
#include "crossfade_edit.h" #include "crossfade_edit.h"
#include "audio_time_axis.h"
#include "canvas_impl.h" #include "canvas_impl.h"
#include "actions.h" #include "actions.h"
#include "gui_thread.h" #include "gui_thread.h"
@ -172,9 +170,8 @@ check_adjustment (Gtk::Adjustment* adj)
} }
Editor::Editor (AudioEngine& eng) Editor::Editor ()
: engine (eng), :
/* time display buttons */ /* time display buttons */
minsec_label (_("Mins:Secs")), minsec_label (_("Mins:Secs")),
@ -311,6 +308,7 @@ Editor::Editor (AudioEngine& eng)
button_release_can_deselect = true; button_release_can_deselect = true;
canvas_idle_queued = false; canvas_idle_queued = false;
_dragging_playhead = false; _dragging_playhead = false;
_dragging_hscrollbar = false;
location_marker_color = color_map[cLocationMarker]; location_marker_color = color_map[cLocationMarker];
location_range_color = color_map[cLocationRange]; location_range_color = color_map[cLocationRange];
@ -356,8 +354,8 @@ Editor::Editor (AudioEngine& eng)
edit_vscrollbar.set_adjustment (vertical_adjustment); edit_vscrollbar.set_adjustment (vertical_adjustment);
edit_hscrollbar.set_adjustment (horizontal_adjustment); edit_hscrollbar.set_adjustment (horizontal_adjustment);
edit_hscrollbar.signal_button_press_event().connect (mem_fun(*this, &Editor::hscrollbar_button_press)); edit_hscrollbar.signal_button_press_event().connect (mem_fun(*this, &Editor::hscrollbar_button_press), false);
edit_hscrollbar.signal_button_release_event().connect (mem_fun(*this, &Editor::hscrollbar_button_release)); edit_hscrollbar.signal_button_release_event().connect (mem_fun(*this, &Editor::hscrollbar_button_release), false);
edit_hscrollbar.signal_size_allocate().connect (mem_fun(*this, &Editor::hscrollbar_allocate)); edit_hscrollbar.signal_size_allocate().connect (mem_fun(*this, &Editor::hscrollbar_allocate));
edit_hscrollbar.set_name ("EditorHScrollbar"); edit_hscrollbar.set_name ("EditorHScrollbar");
@ -511,7 +509,7 @@ Editor::Editor (AudioEngine& eng)
edit_group_display.set_name ("EditGroupList"); edit_group_display.set_name ("EditGroupList");
edit_group_display.get_selection()->set_mode (SELECTION_SINGLE); edit_group_display.get_selection()->set_mode (SELECTION_SINGLE);
edit_group_display.set_headers_visible (false); edit_group_display.set_headers_visible (true);
edit_group_display.set_reorderable (false); edit_group_display.set_reorderable (false);
edit_group_display.set_rules_hint (true); edit_group_display.set_rules_hint (true);
edit_group_display.set_size_request (75, -1); edit_group_display.set_size_request (75, -1);
@ -986,6 +984,7 @@ Editor::handle_new_duration ()
if (new_end > last_canvas_frame) { if (new_end > last_canvas_frame) {
last_canvas_frame = new_end; last_canvas_frame = new_end;
horizontal_adjustment.set_upper (last_canvas_frame / frames_per_unit);
reset_scrolling_region (); reset_scrolling_region ();
} }
@ -1072,7 +1071,7 @@ Editor::connect_to_session (Session *t)
session_connections.push_back (session->SMPTEOffsetChanged.connect (mem_fun(*this, &Editor::update_just_smpte))); session_connections.push_back (session->SMPTEOffsetChanged.connect (mem_fun(*this, &Editor::update_just_smpte)));
session_connections.push_back (session->tempo_map().StateChanged.connect (mem_fun(*this, &Editor::tempo_map_changed))); session_connections.push_back (session->tempo_map().StateChanged.connect (bind (mem_fun(*this, &Editor::tempo_map_changed), false)));
edit_groups_changed (); edit_groups_changed ();
@ -1094,8 +1093,7 @@ Editor::connect_to_session (Session *t)
} }
session->locations()->add (loc, false); session->locations()->add (loc, false);
session->set_auto_loop_location (loc); session->set_auto_loop_location (loc);
} } else {
else {
// force name // force name
loc->set_name (_("Loop")); loc->set_name (_("Loop"));
} }
@ -1108,8 +1106,7 @@ Editor::connect_to_session (Session *t)
} }
session->locations()->add (loc, false); session->locations()->add (loc, false);
session->set_auto_punch_location (loc); session->set_auto_punch_location (loc);
} } else {
else {
// force name // force name
loc->set_name (_("Punch")); loc->set_name (_("Punch"));
} }
@ -1241,8 +1238,8 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
items.push_back (SeparatorElem()); items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Linear))); items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Linear)));
items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::LogB))); items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Fast)));
items.push_back (MenuElem (_("Slow"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Fast))); items.push_back (MenuElem (_("Slow"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::LogB)));
items.push_back (MenuElem (_("Fast"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::LogA))); items.push_back (MenuElem (_("Fast"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::LogA)));
items.push_back (MenuElem (_("Fastest"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Slow))); items.push_back (MenuElem (_("Fastest"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Slow)));
break; break;
@ -1258,10 +1255,10 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
items.push_back (SeparatorElem()); items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Linear))); items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Linear)));
items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Fast))); items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Slow)));
items.push_back (MenuElem (_("Slow"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::LogB))); items.push_back (MenuElem (_("Slow"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::LogA)));
items.push_back (MenuElem (_("Fast"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::LogA))); items.push_back (MenuElem (_("Fast"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::LogB)));
items.push_back (MenuElem (_("Fastest"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Slow))); items.push_back (MenuElem (_("Fastest"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Fast)));
break; break;
@ -3032,7 +3029,7 @@ gint
Editor::edit_controls_button_release (GdkEventButton* ev) Editor::edit_controls_button_release (GdkEventButton* ev)
{ {
if (Keyboard::is_context_menu_event (ev)) { if (Keyboard::is_context_menu_event (ev)) {
ARDOUR_UI::instance()->add_route (); ARDOUR_UI::instance()->add_route (this);
} }
return TRUE; return TRUE;
} }
@ -3181,7 +3178,6 @@ Editor::set_show_measures (bool yn)
if ((_show_measures = yn) == true) { if ((_show_measures = yn) == true) {
draw_measures (); draw_measures ();
} }
DisplayControlChanged (ShowMeasures);
instant_save (); instant_save ();
} }
} }
@ -3204,7 +3200,6 @@ Editor::set_follow_playhead (bool yn)
/* catch up */ /* catch up */
update_current_screen (); update_current_screen ();
} }
DisplayControlChanged (FollowPlayhead);
instant_save (); instant_save ();
} }
} }
@ -3290,7 +3285,7 @@ Editor::playlist_deletion_dialog (boost::shared_ptr<Playlist> pl)
label.show (); label.show ();
dialog.add_button (_("Delete playlist"), RESPONSE_ACCEPT); dialog.add_button (_("Delete playlist"), RESPONSE_ACCEPT);
dialog.add_button (_("Keep playlist"), RESPONSE_CANCEL); dialog.add_button (_("Keep playlist"), RESPONSE_REJECT);
dialog.add_button (_("Cancel"), RESPONSE_CANCEL); dialog.add_button (_("Cancel"), RESPONSE_CANCEL);
switch (dialog.run ()) { switch (dialog.run ()) {
@ -3621,26 +3616,6 @@ Editor::set_frames_per_unit (double fpu)
instant_save (); instant_save ();
} }
void
Editor::canvas_horizontally_scrolled ()
{
/* this is the core function that controls horizontal scrolling of the canvas. it is called
whenever the horizontal_adjustment emits its "value_changed" signal. it executes in an
idle handler.
*/
leftmost_frame = (nframes_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
nframes_t rightmost_frame = leftmost_frame + current_page_frames ();
if (rightmost_frame > last_canvas_frame) {
last_canvas_frame = rightmost_frame;
reset_scrolling_region ();
}
update_fixed_rulers ();
tempo_map_changed (Change (0));
}
void void
Editor::queue_visual_change (nframes_t where) Editor::queue_visual_change (nframes_t where)
{ {
@ -3687,7 +3662,7 @@ Editor::idle_visual_changer ()
/* the signal handler will do the rest */ /* the signal handler will do the rest */
} else { } else {
update_fixed_rulers(); update_fixed_rulers();
tempo_map_changed (Change (0)); tempo_map_changed (Change (0), true);
} }
} }
@ -3707,3 +3682,12 @@ Editor::sort_track_selection ()
selection->tracks.sort (cmp); selection->tracks.sort (cmp);
} }
nframes_t
Editor::edit_cursor_position(bool sync)
{
if (sync && edit_cursor->current_frame != edit_cursor_clock.current_time()) {
edit_cursor_clock.set(edit_cursor->current_frame, true);
}
return edit_cursor->current_frame;
}

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __ardour_editor_h__ #ifndef __ardour_editor_h__
@ -61,10 +60,6 @@ namespace Gtkmm2ext {
class TearOff; class TearOff;
} }
namespace LinuxAudioSystems {
class AudioEngine;
}
namespace ARDOUR { namespace ARDOUR {
class AudioDiskstream; class AudioDiskstream;
class RouteGroup; class RouteGroup;
@ -122,7 +117,7 @@ class TimeAxisViewItem ;
class Editor : public PublicEditor class Editor : public PublicEditor
{ {
public: public:
Editor (ARDOUR::AudioEngine&); Editor ();
~Editor (); ~Editor ();
void connect_to_session (ARDOUR::Session *); void connect_to_session (ARDOUR::Session *);
@ -147,11 +142,11 @@ class Editor : public PublicEditor
void step_mouse_mode (bool next); void step_mouse_mode (bool next);
Editing::MouseMode current_mouse_mode () { return mouse_mode; } Editing::MouseMode current_mouse_mode () { return mouse_mode; }
void add_imageframe_time_axis(const string & track_name, void*) ; void add_imageframe_time_axis(const std::string & track_name, void*) ;
void add_imageframe_marker_time_axis(const string & track_name, TimeAxisView* marked_track, void*) ; void add_imageframe_marker_time_axis(const std::string & track_name, TimeAxisView* marked_track, void*) ;
void connect_to_image_compositor() ; void connect_to_image_compositor() ;
void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item) ; void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item) ;
TimeAxisView* get_named_time_axis(const string & name) ; TimeAxisView* get_named_time_axis(const std::string & name) ;
void consider_auditioning (boost::shared_ptr<ARDOUR::Region>); void consider_auditioning (boost::shared_ptr<ARDOUR::Region>);
void hide_a_region (boost::shared_ptr<ARDOUR::Region>); void hide_a_region (boost::shared_ptr<ARDOUR::Region>);
@ -340,6 +335,8 @@ class Editor : public PublicEditor
void reset_zoom (double); void reset_zoom (double);
void reposition_and_zoom (nframes_t, double); void reposition_and_zoom (nframes_t, double);
nframes_t edit_cursor_position(bool);
protected: protected:
void map_transport_state (); void map_transport_state ();
void map_position_change (nframes_t); void map_position_change (nframes_t);
@ -349,7 +346,6 @@ class Editor : public PublicEditor
private: private:
ARDOUR::Session *session; ARDOUR::Session *session;
ARDOUR::AudioEngine& engine;
bool constructed; bool constructed;
PlaylistSelector* _playlist_selector; PlaylistSelector* _playlist_selector;
@ -441,6 +437,7 @@ class Editor : public PublicEditor
void catch_vanishing_regionview (RegionView *); void catch_vanishing_regionview (RegionView *);
bool set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false); bool set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false);
void select_all_tracks ();
bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false); bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
bool set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=false); bool set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=false);
@ -608,7 +605,7 @@ class Editor : public PublicEditor
nframes_t current_frame; nframes_t current_frame;
double length; double length;
Cursor (Editor&, const string& color, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*)); Cursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
~Cursor (); ~Cursor ();
void set_position (nframes_t); void set_position (nframes_t);
@ -653,6 +650,7 @@ class Editor : public PublicEditor
void controls_layout_size_request (Gtk::Requisition*); void controls_layout_size_request (Gtk::Requisition*);
Gtk::HScrollbar edit_hscrollbar; Gtk::HScrollbar edit_hscrollbar;
bool _dragging_hscrollbar;
void reset_hscrollbar_stepping (); void reset_hscrollbar_stepping ();
@ -1174,7 +1172,7 @@ class Editor : public PublicEditor
Gtk::Allocation canvas_allocation; Gtk::Allocation canvas_allocation;
bool canvas_idle_queued; bool canvas_idle_queued;
void track_canvas_allocate (Gtk::Allocation alloc); void track_canvas_allocate (Gtk::Allocation alloc);
bool track_canvas_idle (); bool track_canvas_size_allocated ();
void set_edit_cursor (GdkEvent* event); void set_edit_cursor (GdkEvent* event);
void set_playhead_cursor (GdkEvent* event); void set_playhead_cursor (GdkEvent* event);
@ -1241,6 +1239,7 @@ class Editor : public PublicEditor
void marker_menu_hide (); void marker_menu_hide ();
void marker_menu_loop_range (); void marker_menu_loop_range ();
void marker_menu_select_all_selectables_using_range (); void marker_menu_select_all_selectables_using_range ();
void marker_menu_select_using_range ();
void marker_menu_separate_regions_using_location (); void marker_menu_separate_regions_using_location ();
void marker_menu_play_from (); void marker_menu_play_from ();
void marker_menu_play_range (); void marker_menu_play_range ();
@ -1275,7 +1274,7 @@ class Editor : public PublicEditor
void remove_metric_marks (); void remove_metric_marks ();
void draw_metric_marks (const ARDOUR::Metrics& metrics); void draw_metric_marks (const ARDOUR::Metrics& metrics);
void tempo_map_changed (ARDOUR::Change); void tempo_map_changed (ARDOUR::Change, bool immediate_redraw);
void redisplay_tempo (); void redisplay_tempo ();
void snap_to (nframes_t& first, int32_t direction = 0, bool for_mark = false); void snap_to (nframes_t& first, int32_t direction = 0, bool for_mark = false);

View file

@ -126,7 +126,7 @@ Editor::register_actions ()
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "jump-backward-to-mark", _("Jump Backward to Mark"), mem_fun(*this, &Editor::jump_backward_to_mark)); act = ActionManager::register_action (editor_actions, "jump-backward-to-mark", _("Jump Backward to Mark"), mem_fun(*this, &Editor::jump_backward_to_mark));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "add-location-from-playhead", _("Add Location from Playhead"), mem_fun(*this, &Editor::add_location_from_playhead_cursor)); act = ActionManager::register_action (editor_actions, "add-location-from-playhead", _("Add Mark from Playhead"), mem_fun(*this, &Editor::add_location_from_playhead_cursor));
ActionManager::session_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "nudge-forward", _("Nudge Forward"), bind (mem_fun(*this, &Editor::nudge_forward), false)); act = ActionManager::register_action (editor_actions, "nudge-forward", _("Nudge Forward"), bind (mem_fun(*this, &Editor::nudge_forward), false));
@ -430,7 +430,7 @@ Editor::toggle_waveform_visibility ()
void void
Editor::toggle_waveforms_while_recording () Editor::toggle_waveforms_while_recording ()
{ {
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformVisibility")); Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformsWhileRecording"));
if (act) { if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
set_show_waveforms_recording (tact->get_active()); set_show_waveforms_recording (tact->get_active());

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <pbd/pthread_utils.h> #include <pbd/pthread_utils.h>
@ -40,6 +39,7 @@
#include "sfdb_ui.h" #include "sfdb_ui.h"
#include "editing.h" #include "editing.h"
#include "audio_time_axis.h" #include "audio_time_axis.h"
#include "utils.h"
#include "i18n.h" #include "i18n.h"
@ -245,6 +245,8 @@ Editor::import_sndfile (vector<ustring> paths, ImportMode mode, AudioTrack* trac
gtk_main_iteration (); gtk_main_iteration ();
} }
interthread_progress_window->hide ();
import_status.done = true; import_status.done = true;
interthread_progress_connection.disconnect (); interthread_progress_connection.disconnect ();
@ -315,7 +317,8 @@ Editor::embed_sndfile (vector<Glib::ustring> paths, bool split, bool multiple_fi
choices.push_back (_("Embed all without questions")); choices.push_back (_("Embed all without questions"));
Gtkmm2ext::Choice rate_choice ( Gtkmm2ext::Choice rate_choice (
string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"), path), string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"),
short_path (path, 40)),
choices, false); choices, false);
int resx = rate_choice.run (); int resx = rate_choice.run ();
@ -367,11 +370,21 @@ Editor::embed_sndfile (vector<Glib::ustring> paths, bool split, bool multiple_fi
for (int n = 0; n < finfo.channels; ++n) for (int n = 0; n < finfo.channels; ++n)
{ {
try { try {
source = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createReadable
(DataType::AUDIO, *session, path, n, /* check if we have this thing embedded already */
(mode == ImportAsTapeTrack ?
AudioFileSource::Destructive : boost::shared_ptr<Source> s;
AudioFileSource::Flag (0))));
if ((s = session->source_by_path_and_channel (path, n)) == 0) {
cerr << "source doesn't exist yet\n";
source = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createReadable
(DataType::AUDIO, *session, path, n,
(mode == ImportAsTapeTrack ?
AudioFileSource::Destructive :
AudioFileSource::Flag (0))));
} else {
source = boost::dynamic_pointer_cast<AudioFileSource> (s);
}
sources.push_back(source); sources.push_back(source);
} }

View file

@ -45,7 +45,6 @@ Editor::set_show_waveforms (bool yn)
atv->set_show_waveforms (yn); atv->set_show_waveforms (yn);
} }
} }
DisplayControlChanged (Editing::ShowWaveforms);
} }
} }
@ -61,6 +60,5 @@ Editor::set_show_waveforms_recording (bool yn)
atv->set_show_waveforms_recording (yn); atv->set_show_waveforms_recording (yn);
} }
} }
DisplayControlChanged (Editing::ShowWaveformsRecording);
} }
} }

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <libgnomecanvasmm/init.h> #include <libgnomecanvasmm/init.h>
@ -264,8 +263,20 @@ Editor::initialize_canvas ()
double time_width = FLT_MAX/frames_per_unit; double time_width = FLT_MAX/frames_per_unit;
time_canvas.set_scroll_region(0.0, 0.0, time_width, time_height); time_canvas.set_scroll_region(0.0, 0.0, time_width, time_height);
edit_cursor = new Cursor (*this, "blue", &Editor::canvas_edit_cursor_event); if (!color_map[cEditCursor]) {
playhead_cursor = new Cursor (*this, "red", &Editor::canvas_playhead_cursor_event); warning << _("edit cursor color not defined, check your ardour.colors file!") << endmsg;
color_map[cEditCursor] = RGBA_TO_UINT (30,30,30,255);
}
if (!color_map[cPlayHead]) {
warning << _("playhead color not defined, check your ardour.colors file!") << endmsg;
color_map[cPlayHead] = RGBA_TO_UINT (0,0,0,255);
}
edit_cursor = new Cursor (*this, &Editor::canvas_edit_cursor_event);
edit_cursor->canvas_item.property_fill_color_rgba() = color_map[cEditCursor];
playhead_cursor = new Cursor (*this, &Editor::canvas_playhead_cursor_event);
playhead_cursor->canvas_item.property_fill_color_rgba() = color_map[cPlayHead];
initial_ruler_update_required = true; initial_ruler_update_required = true;
track_canvas.signal_size_allocate().connect (mem_fun(*this, &Editor::track_canvas_allocate)); track_canvas.signal_size_allocate().connect (mem_fun(*this, &Editor::track_canvas_allocate));
@ -280,7 +291,7 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
if (!initial_ruler_update_required) { if (!initial_ruler_update_required) {
if (!canvas_idle_queued) { if (!canvas_idle_queued) {
/* call this first so that we do stuff before any pending redraw */ /* call this first so that we do stuff before any pending redraw */
Glib::signal_idle().connect (mem_fun (*this, &Editor::track_canvas_idle), false); Glib::signal_idle().connect (mem_fun (*this, &Editor::track_canvas_size_allocated), false);
canvas_idle_queued = true; canvas_idle_queued = true;
} }
return; return;
@ -288,11 +299,11 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
initial_ruler_update_required = false; initial_ruler_update_required = false;
track_canvas_idle (); track_canvas_size_allocated ();
} }
bool bool
Editor::track_canvas_idle () Editor::track_canvas_size_allocated ()
{ {
if (canvas_idle_queued) { if (canvas_idle_queued) {
canvas_idle_queued = false; canvas_idle_queued = false;
@ -321,7 +332,6 @@ Editor::track_canvas_idle ()
full_canvas_height = height; full_canvas_height = height;
} }
zoom_range_clock.set ((nframes_t) floor ((canvas_width * frames_per_unit))); zoom_range_clock.set ((nframes_t) floor ((canvas_width * frames_per_unit)));
edit_cursor->set_position (edit_cursor->current_frame); edit_cursor->set_position (edit_cursor->current_frame);
playhead_cursor->set_position (playhead_cursor->current_frame); playhead_cursor->set_position (playhead_cursor->current_frame);
@ -363,7 +373,7 @@ Editor::track_canvas_idle ()
} }
update_fixed_rulers(); update_fixed_rulers();
tempo_map_changed (Change (0)); tempo_map_changed (Change (0), true);
Resized (); /* EMIT_SIGNAL */ Resized (); /* EMIT_SIGNAL */
@ -698,3 +708,25 @@ Editor::left_track_canvas (GdkEventCrossing *ev)
} }
void
Editor::canvas_horizontally_scrolled ()
{
/* this is the core function that controls horizontal scrolling of the canvas. it is called
whenever the horizontal_adjustment emits its "value_changed" signal. it typically executes in an
idle handler, which is important because tempo_map_changed() should issue redraws immediately
and not defer them to an idle handler.
*/
leftmost_frame = (nframes_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
nframes_t rightmost_frame = leftmost_frame + current_page_frames ();
if (rightmost_frame > last_canvas_frame) {
last_canvas_frame = rightmost_frame;
reset_scrolling_region ();
}
update_fixed_rulers ();
tempo_map_changed (Change (0), !_dragging_hscrollbar);
}

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdlib> #include <cstdlib>
@ -25,6 +24,7 @@
#include <ardour/audioplaylist.h> #include <ardour/audioplaylist.h>
#include "editor.h" #include "editor.h"
#include "keyboard.h"
#include "public_editor.h" #include "public_editor.h"
#include "audio_region_view.h" #include "audio_region_view.h"
#include "audio_streamview.h" #include "audio_streamview.h"
@ -71,7 +71,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
event.button.y = wy; event.button.y = wy;
nframes_t where = event_frame (&event, 0, 0); nframes_t where = event_frame (&event, 0, 0);
temporal_zoom_to_frame (true, where); temporal_zoom_to_frame (false, where);
return true; return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) { } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
if (!current_stepping_trackview) { if (!current_stepping_trackview) {
@ -102,7 +102,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
event.button.y = wy; event.button.y = wy;
nframes_t where = event_frame (&event, 0, 0); nframes_t where = event_frame (&event, 0, 0);
temporal_zoom_to_frame (false, where); temporal_zoom_to_frame (true, where);
return true; return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) { } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
if (!current_stepping_trackview) { if (!current_stepping_trackview) {

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdlib> #include <cstdlib>
@ -31,7 +30,7 @@ using namespace ARDOUR;
using namespace PBD; using namespace PBD;
using namespace Gtk; using namespace Gtk;
Editor::Cursor::Cursor (Editor& ed, const string& color, bool (Editor::*callbck)(GdkEvent*,ArdourCanvas::Item*)) Editor::Cursor::Cursor (Editor& ed, bool (Editor::*callbck)(GdkEvent*,ArdourCanvas::Item*))
: editor (ed), : editor (ed),
canvas_item (*editor.cursor_group), canvas_item (*editor.cursor_group),
length(1.0) length(1.0)
@ -43,7 +42,6 @@ Editor::Cursor::Cursor (Editor& ed, const string& color, bool (Editor::*callbck)
points.push_back(Gnome::Art::Point(1.0, 0.0)); points.push_back(Gnome::Art::Point(1.0, 0.0));
canvas_item.property_points() = points; canvas_item.property_points() = points;
canvas_item.property_fill_color() = color; //.c_str());
canvas_item.property_width_pixels() = 1; canvas_item.property_width_pixels() = 1;
canvas_item.property_first_arrowhead() = TRUE; canvas_item.property_first_arrowhead() = TRUE;
canvas_item.property_last_arrowhead() = TRUE; canvas_item.property_last_arrowhead() = TRUE;

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdlib> #include <cstdlib>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <unistd.h> #include <unistd.h>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include "editor.h" #include "editor.h"
@ -34,17 +33,20 @@ Editor::hscrollbar_allocate (Gtk::Allocation &alloc)
bool bool
Editor::hscrollbar_button_press (GdkEventButton *ev) Editor::hscrollbar_button_press (GdkEventButton *ev)
{ {
return true; _dragging_hscrollbar = true;
return false;
} }
bool bool
Editor::hscrollbar_button_release (GdkEventButton *ev) Editor::hscrollbar_button_release (GdkEventButton *ev)
{ {
_dragging_hscrollbar = false;
if (session) { if (session) {
} }
return true; return false;
} }
void void

View file

@ -16,7 +16,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include "imageframe_view.h" #include "imageframe_view.h"

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <ardour/audioregion.h> #include <ardour/audioregion.h>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdlib> #include <cstdlib>
@ -70,7 +69,7 @@ Editor::keyboard_duplicate_region ()
return; return;
} }
float prefix; float prefix = 0;
bool was_floating; bool was_floating;
if (get_prefix (prefix, was_floating) == 0) { if (get_prefix (prefix, was_floating) == 0) {
@ -83,7 +82,7 @@ Editor::keyboard_duplicate_region ()
void void
Editor::keyboard_duplicate_selection () Editor::keyboard_duplicate_selection ()
{ {
float prefix; float prefix = 0;
bool was_floating; bool was_floating;
if (get_prefix (prefix, was_floating) == 0) { if (get_prefix (prefix, was_floating) == 0) {
@ -96,7 +95,7 @@ Editor::keyboard_duplicate_selection ()
void void
Editor::keyboard_paste () Editor::keyboard_paste ()
{ {
float prefix; float prefix = 0;
bool was_floating; bool was_floating;
if (get_prefix (prefix, was_floating) == 0) { if (get_prefix (prefix, was_floating) == 0) {
@ -109,7 +108,7 @@ Editor::keyboard_paste ()
void void
Editor::keyboard_insert_region_list_selection () Editor::keyboard_insert_region_list_selection ()
{ {
float prefix; float prefix = 0;
bool was_floating; bool was_floating;
if (get_prefix (prefix, was_floating) == 0) { if (get_prefix (prefix, was_floating) == 0) {
@ -122,6 +121,7 @@ Editor::keyboard_insert_region_list_selection ()
int int
Editor::get_prefix (float& val, bool& was_floating) Editor::get_prefix (float& val, bool& was_floating)
{ {
return Keyboard::the_keyboard().get_prefix (val, was_floating); was_floating = false;
return 1;
} }

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <sigc++/retype.h> #include <sigc++/retype.h>
@ -511,6 +510,7 @@ Editor::build_range_marker_menu (bool loop_or_punch)
items.push_back (MenuElem (_("Separate Regions in Range"), mem_fun(*this, &Editor::marker_menu_separate_regions_using_location))); items.push_back (MenuElem (_("Separate Regions in Range"), mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range))); items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
items.push_back (MenuElem (_("Select Range"), mem_fun(*this, &Editor::marker_menu_select_using_range)));
} }
@ -560,6 +560,24 @@ Editor::marker_menu_hide ()
} }
} }
void
Editor::marker_menu_select_using_range ()
{
Marker* marker;
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
/*NOTREACHED*/
}
Location* l;
bool is_start;
if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
set_selection_from_range (*l);
}
}
void void
Editor::marker_menu_select_all_selectables_using_range () Editor::marker_menu_select_all_selectables_using_range ()
{ {

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <gtkmm2ext/utils.h> #include <gtkmm2ext/utils.h>
@ -158,10 +157,13 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
} }
} }
double current = 0.0;
bool currentInitialized = 0;
void void
Editor::update_current_screen () Editor::update_current_screen ()
{ {
if (session && engine.running()) { if (session && session->engine().running()) {
nframes_t frame; nframes_t frame;
@ -178,31 +180,48 @@ Editor::update_current_screen ()
playhead_cursor->canvas_item.show(); playhead_cursor->canvas_item.show();
if (frame != last_update_frame) { if (frame != last_update_frame) {
const jack_nframes_t page_width = current_page_frames();
// Percentage width of the visible range to use as a scroll interval
// Idea: snap this to the nearest bar/beat/tick/etc, would make scrolling much
// less jarring when zoomed in.. and it would be fun to watch :)
static const double scroll_pct = 3.0/4.0;
const jack_nframes_t rightmost_frame = leftmost_frame + page_width; #undef CONTINUOUS_SCROLL
const jack_nframes_t scroll_interval = (jack_nframes_t)(page_width * scroll_pct); #ifndef CONTINUOUS_SCROLL
const jack_nframes_t padding = (jack_nframes_t)floor((page_width-scroll_interval) / 2.0); if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
if (frame < leftmost_frame + padding || frame > rightmost_frame - padding) {
if (session->transport_speed() < 0) { if (session->transport_speed() < 0) {
if (frame > scroll_interval) { if (frame > (current_page_frames()/2)) {
center_screen (frame - scroll_interval/2); center_screen (frame-(current_page_frames()/2));
} else { } else {
center_screen (scroll_interval); center_screen (current_page_frames()/2);
} }
} else { } else {
center_screen(frame + scroll_interval/2); center_screen (frame+(current_page_frames()/2));
} }
} }
playhead_cursor->set_position (frame); playhead_cursor->set_position (frame);
#else // CONTINUOUS_SCROLL
/* don't do continuous scroll till the new position is in the rightmost quarter of the
editor canvas
*/
if (session->transport_speed()) {
double target = ((double)frame - (double)current_page_frames()/2.0) / frames_per_unit;
if (target <= 0.0) target = 0.0;
if ( fabs(target - current) < current_page_frames()/frames_per_unit ) {
target = (target * 0.15) + (current * 0.85);
} else {
/* relax */
}
//printf("frame: %d, cpf: %d, fpu: %6.6f, current: %6.6f, target : %6.6f\n", frame, current_page_frames(), frames_per_unit, current, target );
current = target;
horizontal_adjustment.set_value ( current );
}
playhead_cursor->set_position (frame);
#endif // CONTINUOUS_SCROLL
} }
} else { } else {

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cassert> #include <cassert>
@ -35,6 +34,7 @@
#include "time_axis_view.h" #include "time_axis_view.h"
#include "audio_time_axis.h" #include "audio_time_axis.h"
#include "audio_region_view.h" #include "audio_region_view.h"
#include "midi_region_view.h"
#include "marker.h" #include "marker.h"
#include "streamview.h" #include "streamview.h"
#include "region_gain_line.h" #include "region_gain_line.h"
@ -302,7 +302,9 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
if (((mouse_mode != MouseObject) && if (((mouse_mode != MouseObject) &&
(mouse_mode != MouseAudition || item_type != RegionItem) && (mouse_mode != MouseAudition || item_type != RegionItem) &&
(mouse_mode != MouseTimeFX || item_type != RegionItem)) || (mouse_mode != MouseTimeFX || item_type != RegionItem) &&
(mouse_mode != MouseRange)) ||
(event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE || event->button.button > 3)) { (event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE || event->button.button > 3)) {
return; return;
@ -312,9 +314,11 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
if ((event->button.state & Keyboard::RelevantModifierKeyMask) && event->button.button != 1) { if ((event->button.state & Keyboard::RelevantModifierKeyMask) && event->button.button != 1) {
/* no selection action on modified button-2 or button-3 events */ /* almost no selection action on modified button-2 or button-3 events */
return; if (item_type != RegionItem && event->button.button != 2) {
return;
}
} }
} }
@ -325,29 +329,48 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
switch (item_type) { switch (item_type) {
case RegionItem: case RegionItem:
commit = set_selected_regionview_from_click (press, op, true); if (mouse_mode != MouseRange) {
commit = set_selected_regionview_from_click (press, op, true);
} else if (event->type == GDK_BUTTON_PRESS) {
commit = set_selected_track_from_click (press, op, false);
}
break; break;
case RegionViewNameHighlight: case RegionViewNameHighlight:
case RegionViewName: case RegionViewName:
commit = set_selected_regionview_from_click (press, op, true); if (mouse_mode != MouseRange) {
commit = set_selected_regionview_from_click (press, op, true);
} else if (event->type == GDK_BUTTON_PRESS) {
commit = set_selected_track_from_click (press, op, false);
}
break; break;
case FadeInHandleItem: case FadeInHandleItem:
case FadeInItem: case FadeInItem:
case FadeOutHandleItem: case FadeOutHandleItem:
case FadeOutItem: case FadeOutItem:
commit = set_selected_regionview_from_click (press, op, true); if (mouse_mode != MouseRange) {
commit = set_selected_regionview_from_click (press, op, true);
} else if (event->type == GDK_BUTTON_PRESS) {
commit = set_selected_track_from_click (press, op, false);
}
break; break;
case GainAutomationControlPointItem: case GainAutomationControlPointItem:
case PanAutomationControlPointItem: case PanAutomationControlPointItem:
case RedirectAutomationControlPointItem: case RedirectAutomationControlPointItem:
commit = set_selected_control_point_from_click (op, false); if (mouse_mode != MouseRange) {
commit = set_selected_control_point_from_click (op, false);
}
break; break;
case StreamItem: case StreamItem:
// commit = set_selected_track_from_click (press, op, true); /* for context click or range selection, select track */
if (event->button.button == 3) {
commit = set_selected_track_from_click (press, op, true);
} else if (event->type == GDK_BUTTON_PRESS && mouse_mode == MouseRange) {
commit = set_selected_track_from_click (press, op, false);
}
break; break;
case AutomationTrackItem: case AutomationTrackItem:
@ -358,26 +381,6 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
break; break;
} }
#define SELECT_TRACK_FROM_CANVAS_IN_RANGE_MODE
#ifdef SELECT_TRACK_FROM_CANVAS_IN_RANGE_MODE
/* in range mode, button 1/2/3 press potentially selects a track */
if (mouse_mode == MouseRange &&
event->type == GDK_BUTTON_PRESS &&
event->button.button <= 3) {
switch (item_type) {
case StreamItem:
case RegionItem:
case AutomationTrackItem:
commit = set_selected_track_from_click (true, op, true);
break;
default:
break;
}
}
#endif
if (commit) { if (commit) {
commit_reversible_command (); commit_reversible_command ();
} }
@ -1174,23 +1177,25 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
case GainAutomationControlPointItem: case GainAutomationControlPointItem:
case PanAutomationControlPointItem: case PanAutomationControlPointItem:
case RedirectAutomationControlPointItem: case RedirectAutomationControlPointItem:
cp = static_cast<ControlPoint*>(item->get_data ("control_point")); if (mouse_mode == MouseGain || mouse_mode == MouseObject) {
cp->set_visible (true); cp = static_cast<ControlPoint*>(item->get_data ("control_point"));
cp->set_visible (true);
double at_x, at_y; double at_x, at_y;
at_x = cp->get_x(); at_x = cp->get_x();
at_y = cp->get_y (); at_y = cp->get_y ();
cp->item->i2w (at_x, at_y); cp->item->i2w (at_x, at_y);
at_x += 20.0; at_x += 20.0;
at_y += 20.0; at_y += 20.0;
fraction = 1.0 - (cp->get_y() / cp->line.height()); fraction = 1.0 - (cp->get_y() / cp->line.height());
set_verbose_canvas_cursor (cp->line.get_verbose_cursor_string (fraction), at_x, at_y); set_verbose_canvas_cursor (cp->line.get_verbose_cursor_string (fraction), at_x, at_y);
show_verbose_canvas_cursor (); show_verbose_canvas_cursor ();
if (is_drawable()) { if (is_drawable()) {
track_canvas.get_window()->set_cursor (*fader_cursor); track_canvas.get_window()->set_cursor (*fader_cursor);
}
} }
break; break;
@ -1208,13 +1213,15 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
case GainAutomationLineItem: case GainAutomationLineItem:
case RedirectAutomationLineItem: case RedirectAutomationLineItem:
case PanAutomationLineItem: case PanAutomationLineItem:
{ if (mouse_mode == MouseGain || mouse_mode == MouseObject) {
ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item); {
if (line) ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
line->property_fill_color_rgba() = color_map[cEnteredAutomationLine]; if (line)
} line->property_fill_color_rgba() = color_map[cEnteredAutomationLine];
if (is_drawable()) { }
track_canvas.get_window()->set_cursor (*fader_cursor); if (is_drawable()) {
track_canvas.get_window()->set_cursor (*fader_cursor);
}
} }
break; break;
@ -1515,7 +1522,10 @@ Editor::motion_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item
*/ */
if (!drag_info.move_threshold_passed) { if (!drag_info.move_threshold_passed) {
drag_info.move_threshold_passed = (abs ((int) (drag_info.current_pointer_x - drag_info.grab_x)) > 4); bool x_threshold_passed = (abs ((int) (drag_info.current_pointer_x - drag_info.grab_x)) > 4);
bool y_threshold_passed = (abs ((int) (drag_info.current_pointer_y - drag_info.grab_y)) > 4);
drag_info.move_threshold_passed = (x_threshold_passed || y_threshold_passed);
// and change the initial grab loc/frame if this drag info wants us to // and change the initial grab loc/frame if this drag info wants us to
@ -2825,56 +2835,30 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
drag_info.want_move_threshold = false; // don't copy again drag_info.want_move_threshold = false; // don't copy again
/* this is committed in the grab finished callback. */
begin_reversible_command (_("Drag region copy"));
/* duplicate the region(s) */ /* duplicate the region(s) */
vector<RegionView*> new_regionviews; vector<RegionView*> new_regionviews;
set<boost::shared_ptr<Playlist> > affected_playlists;
pair<set<boost::shared_ptr<Playlist> >::iterator,bool> insert_result;
for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) { for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) {
RegionView* rv; RegionView* rv;
RegionView* nrv;
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(rv);
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(rv);
rv = (*i); rv = (*i);
boost::shared_ptr<Playlist> to_playlist = rv->region()->playlist(); if (arv)
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&rv->get_time_axis_view()); nrv = new AudioRegionView (*arv);
else if (mrv)
nrv = new MidiRegionView (*mrv);
else
continue;
insert_result = affected_playlists.insert (to_playlist); nrv->get_canvas_group()->show ();
if (insert_result.second) {
session->add_command (new MementoCommand<Playlist>(*to_playlist, &to_playlist->get_state(), 0));
}
latest_regionview = 0; new_regionviews.push_back (nrv);
sigc::connection c = rtv->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
/* create a new region with the same name. */
boost::shared_ptr<Region> newregion;
newregion = RegionFactory::create (rv->region());
assert(newregion != 0);
/* if the original region was locked, we don't care */
newregion->set_locked (false);
to_playlist->add_region (newregion, (nframes_t) (rv->region()->position() * rtv->get_diskstream()->speed()));
c.disconnect ();
if (latest_regionview) {
new_regionviews.push_back (latest_regionview);
}
} }
if (new_regionviews.empty()) { if (new_regionviews.empty()) {
return; return;
} }
@ -2886,6 +2870,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
/* reset drag_info data to reflect the fact that we are dragging the copies */ /* reset drag_info data to reflect the fact that we are dragging the copies */
drag_info.data = new_regionviews.front(); drag_info.data = new_regionviews.front();
swap_grab (new_regionviews.front()->get_canvas_group (), 0, event->motion.time); swap_grab (new_regionviews.front()->get_canvas_group (), 0, event->motion.time);
} }
@ -3164,149 +3149,147 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
MOTION MOTION
************************************************************/ ************************************************************/
pair<set<boost::shared_ptr<Playlist> >::iterator,bool> insert_result; bool do_move;
const list<RegionView*>& layered_regions = selection->regions.by_layer();
for (list<RegionView*>::const_iterator i = layered_regions.begin(); i != layered_regions.end(); ++i) {
RegionView* rv = (*i);
double ix1, ix2, iy1, iy2;
int32_t temp_pointer_y_span = pointer_y_span;
/* get item BBox, which will be relative to parent. so we have
to query on a child, then convert to world coordinates using
the parent.
*/
rv->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
rv->get_canvas_group()->i2w (ix1, iy1);
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
RouteTimeAxisView* canvas_rtv = dynamic_cast<RouteTimeAxisView*>(tvp2);
RouteTimeAxisView* temp_rtv;
if ((pointer_y_span != 0) && !clamp_y_axis) {
y_delta = 0;
int32_t x = 0;
for (j = height_list.begin(); j!= height_list.end(); j++) {
if (x == canvas_rtv->order) {
/* we found the track the region is on */
if (x != original_pointer_order) {
/*this isn't from the same track we're dragging from */
temp_pointer_y_span = canvas_pointer_y_span;
}
while (temp_pointer_y_span > 0) {
/* we're moving up canvas-wise,
so we need to find the next track height
*/
if (j != height_list.begin()) {
j--;
}
if (x != original_pointer_order) {
/* we're not from the dragged track, so ignore hidden tracks. */
if ((*j) == 0) {
temp_pointer_y_span++;
}
}
y_delta -= (*j);
temp_pointer_y_span--;
}
while (temp_pointer_y_span < 0) {
y_delta += (*j);
if (x != original_pointer_order) {
if ((*j) == 0) {
temp_pointer_y_span--;
}
}
if (j != height_list.end()) {
j++;
}
temp_pointer_y_span++;
}
/* find out where we'll be when we move and set height accordingly */
tvp2 = trackview_by_y_position (iy1 + y_delta);
temp_rtv = dynamic_cast<RouteTimeAxisView*>(tvp2);
rv->set_height (temp_rtv->height);
/* if you un-comment the following, the region colours will follow the track colours whilst dragging,
personally, i think this can confuse things, but never mind.
*/
//const GdkColor& col (temp_rtv->view->get_region_color());
//rv->set_color (const_cast<GdkColor&>(col));
break;
}
x++;
}
}
/* prevent the regionview from being moved to before
the zero position on the canvas.
*/
/* clamp */
if (x_delta < 0) {
if (-x_delta > ix1) {
x_delta = -ix1;
}
} else if ((x_delta > 0) &&(rv->region()->last_frame() > max_frames - x_delta)) {
x_delta = max_frames - rv->region()->last_frame();
}
if (drag_info.first_move) {
/* hide any dependent views */
rv->get_time_axis_view().hide_dependent_views (*rv);
/* this is subtle. raising the regionview itself won't help,
because raise_to_top() just puts the item on the top of
its parent's stack. so, we need to put the trackview canvas_display group
on the top, since its parent is the whole canvas.
*/
rv->get_canvas_group()->raise_to_top();
rv->get_time_axis_view().canvas_display->raise_to_top();
cursor_group->raise_to_top();
/* freeze the playlists from notifying till
the motion is done.
*/
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (&rv->get_time_axis_view());
if (rtv && rtv->is_audio_track()) {
boost::shared_ptr<AudioPlaylist> pl = boost::dynamic_pointer_cast<AudioPlaylist>(rtv->get_diskstream()->playlist());
if (pl) {
/* only freeze and capture state once */
insert_result = motion_frozen_playlists.insert (pl);
if (insert_result.second) {
pl->freeze();
session->add_command(new MementoCommand<Playlist>(*pl, &pl->get_state(), 0));
}
}
}
rv->region()->set_opaque(false);
}
if (drag_info.brushing) {
mouse_brush_insert_region (rv, pending_region_position);
} else {
rv->move (x_delta, y_delta);
}
}
if (drag_info.first_move) { if (drag_info.first_move) {
cursor_group->raise_to_top(); if (drag_info.move_threshold_passed) {
do_move = true;
} else {
do_move = false;
}
} else {
do_move = true;
} }
drag_info.first_move = false; if (do_move) {
pair<set<boost::shared_ptr<Playlist> >::iterator,bool> insert_result;
const list<RegionView*>& layered_regions = selection->regions.by_layer();
for (list<RegionView*>::const_iterator i = layered_regions.begin(); i != layered_regions.end(); ++i) {
RegionView* rv = (*i);
double ix1, ix2, iy1, iy2;
int32_t temp_pointer_y_span = pointer_y_span;
/* get item BBox, which will be relative to parent. so we have
to query on a child, then convert to world coordinates using
the parent.
*/
rv->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
rv->get_canvas_group()->i2w (ix1, iy1);
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
RouteTimeAxisView* canvas_rtv = dynamic_cast<RouteTimeAxisView*>(tvp2);
RouteTimeAxisView* temp_rtv;
if ((pointer_y_span != 0) && !clamp_y_axis) {
y_delta = 0;
int32_t x = 0;
for (j = height_list.begin(); j!= height_list.end(); j++) {
if (x == canvas_rtv->order) {
/* we found the track the region is on */
if (x != original_pointer_order) {
/*this isn't from the same track we're dragging from */
temp_pointer_y_span = canvas_pointer_y_span;
}
while (temp_pointer_y_span > 0) {
/* we're moving up canvas-wise,
so we need to find the next track height
*/
if (j != height_list.begin()) {
j--;
}
if (x != original_pointer_order) {
/* we're not from the dragged track, so ignore hidden tracks. */
if ((*j) == 0) {
temp_pointer_y_span++;
}
}
y_delta -= (*j);
temp_pointer_y_span--;
}
while (temp_pointer_y_span < 0) {
y_delta += (*j);
if (x != original_pointer_order) {
if ((*j) == 0) {
temp_pointer_y_span--;
}
}
if (j != height_list.end()) {
j++;
}
temp_pointer_y_span++;
}
/* find out where we'll be when we move and set height accordingly */
tvp2 = trackview_by_y_position (iy1 + y_delta);
temp_rtv = dynamic_cast<RouteTimeAxisView*>(tvp2);
rv->set_height (temp_rtv->height);
/* if you un-comment the following, the region colours will follow the track colours whilst dragging,
personally, i think this can confuse things, but never mind.
*/
//const GdkColor& col (temp_rtv->view->get_region_color());
//rv->set_color (const_cast<GdkColor&>(col));
break;
}
x++;
}
}
/* prevent the regionview from being moved to before
the zero position on the canvas.
*/
/* clamp */
if (x_delta < 0) {
if (-x_delta > ix1) {
x_delta = -ix1;
}
} else if ((x_delta > 0) &&(rv->region()->last_frame() > max_frames - x_delta)) {
x_delta = max_frames - rv->region()->last_frame();
}
if (drag_info.first_move) {
/* hide any dependent views */
rv->get_time_axis_view().hide_dependent_views (*rv);
/* this is subtle. raising the regionview itself won't help,
because raise_to_top() just puts the item on the top of
its parent's stack. so, we need to put the trackview canvas_display group
on the top, since its parent is the whole canvas.
*/
rv->get_canvas_group()->raise_to_top();
rv->get_time_axis_view().canvas_display->raise_to_top();
cursor_group->raise_to_top();
rv->fake_set_opaque (true);
}
if (drag_info.brushing) {
mouse_brush_insert_region (rv, pending_region_position);
} else {
rv->move (x_delta, y_delta);
}
} /* foreach region */
} /* if do_move */
if (drag_info.first_move && drag_info.move_threshold_passed) {
cursor_group->raise_to_top();
drag_info.first_move = false;
}
if (x_delta != 0 && !drag_info.brushing) { if (x_delta != 0 && !drag_info.brushing) {
show_verbose_time_cursor (drag_info.last_frame_position, 10); show_verbose_time_cursor (drag_info.last_frame_position, 10);
} }
} }
void void
@ -3317,7 +3300,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
pair<set<boost::shared_ptr<Playlist> >::iterator,bool> insert_result; pair<set<boost::shared_ptr<Playlist> >::iterator,bool> insert_result;
bool nocommit = true; bool nocommit = true;
double speed; double speed;
RouteTimeAxisView* atv; RouteTimeAxisView* rtv;
bool regionview_y_movement; bool regionview_y_movement;
bool regionview_x_movement; bool regionview_x_movement;
@ -3346,9 +3329,9 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
/* adjust for track speed */ /* adjust for track speed */
speed = 1.0; speed = 1.0;
atv = dynamic_cast<RouteTimeAxisView*> (drag_info.last_trackview); rtv = dynamic_cast<RouteTimeAxisView*> (drag_info.last_trackview);
if (atv && atv->get_diskstream()) { if (rtv && rtv->get_diskstream()) {
speed = atv->get_diskstream()->speed(); speed = rtv->get_diskstream()->speed();
} }
regionview_x_movement = (drag_info.last_frame_position != (nframes_t) (rv->region()->position()/speed)); regionview_x_movement = (drag_info.last_frame_position != (nframes_t) (rv->region()->position()/speed));
@ -3357,106 +3340,94 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
//printf ("last_frame: %s position is %lu %g\n", rv->get_time_axis_view().name().c_str(), drag_info.last_frame_position, speed); //printf ("last_frame: %s position is %lu %g\n", rv->get_time_axis_view().name().c_str(), drag_info.last_frame_position, speed);
//printf ("last_rackview: %s \n", drag_info.last_trackview->name().c_str()); //printf ("last_rackview: %s \n", drag_info.last_trackview->name().c_str());
char* op_string;
if (drag_info.copy) {
if (drag_info.x_constrained) {
op_string = _("fixed time region copy");
} else {
op_string = _("region copy");
}
} else {
if (drag_info.x_constrained) {
op_string = _("fixed time region drag");
} else {
op_string = _("region drag");
}
}
begin_reversible_command (op_string);
if (regionview_y_movement) { if (regionview_y_movement) {
/* motion between tracks */
list<RegionView*> new_selection;
/* moved to a different audio track. */ /* moved to a different audio track. */
for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ) { list<RegionView*> new_selection;
new_selection = selection->regions.by_layer();
selection->clear_regions ();
RegionView* rv2 = (*i); for (list<RegionView*>::const_iterator i = new_selection.begin(); i != new_selection.end(); ++i) {
/* the region that used to be in the old playlist is not RegionView* rv = (*i);
moved to the new one - we make a copy of it. as a result,
any existing editor for the region should no longer be double ix1, ix2, iy1, iy2;
visible.
*/ rv->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
rv->get_canvas_group()->i2w (ix1, iy1);
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
RouteTimeAxisView* rtv2 = dynamic_cast<RouteTimeAxisView*>(tvp2);
boost::shared_ptr<Playlist> from_playlist = rv->region()->playlist();
boost::shared_ptr<Playlist> to_playlist = rtv2->playlist();
where = (nframes_t) (unit_to_frame (ix1) * speed);
boost::shared_ptr<Region> new_region (RegionFactory::create (rv->region()));
if (!drag_info.copy) { if (!drag_info.copy) {
rv2->hide_region_editor();
/* the region that used to be in the old playlist is not
moved to the new one - we make a copy of it. as a result,
any existing editor for the region should no longer be
visible.
*/
rv->hide_region_editor();
rv->fake_set_opaque (false);
session->add_command (new MementoCommand<Playlist>(*from_playlist, &from_playlist->get_state(), 0));
from_playlist->remove_region ((rv->region()));
session->add_command (new MementoCommand<Playlist>(*from_playlist, 0, &from_playlist->get_state()));
} }
new_selection.push_back (rv2);
i++;
}
/* first, freeze the target tracks */
for (list<RegionView*>::const_iterator i = new_selection.begin(); i != new_selection.end();i++ ) {
boost::shared_ptr<Playlist> from_playlist;
boost::shared_ptr<Playlist> to_playlist;
double ix1, ix2, iy1, iy2;
(*i)->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
(*i)->get_canvas_group()->i2w (ix1, iy1);
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
RouteTimeAxisView* atv2 = dynamic_cast<RouteTimeAxisView*>(tvp2);
(*i)->region()->set_opaque (true);
from_playlist = (*i)->region()->playlist();
to_playlist = atv2->playlist();
/* the from_playlist was frozen in the "first_move" case
of the motion handler. the insert can fail,
but that doesn't matter. it just means
we already have the playlist in the list.
*/
motion_frozen_playlists.insert (from_playlist);
/* only freeze the to_playlist once */
insert_result = motion_frozen_playlists.insert(to_playlist);
if (insert_result.second) {
to_playlist->freeze();
session->add_command(new MementoCommand<Playlist>(*to_playlist, &to_playlist->get_state(), 0));
}
}
/* now do it again with the actual operations */
for (list<RegionView*>::const_iterator i = new_selection.begin(); i != new_selection.end();i++ ) {
boost::shared_ptr<Playlist> from_playlist;
boost::shared_ptr<Playlist> to_playlist;
double ix1, ix2, iy1, iy2;
(*i)->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
(*i)->get_canvas_group()->i2w (ix1, iy1);
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
RouteTimeAxisView* atv2 = dynamic_cast<RouteTimeAxisView*>(tvp2);
from_playlist = (*i)->region()->playlist();
to_playlist = atv2->playlist();
latest_regionview = 0; latest_regionview = 0;
where = (nframes_t) (unit_to_frame (ix1) * speed); sigc::connection c = rtv2->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
boost::shared_ptr<Region> new_region (RegionFactory::create ((*i)->region())); session->add_command (new MementoCommand<Playlist>(*to_playlist, &to_playlist->get_state(), 0));
from_playlist->remove_region (((*i)->region()));
sigc::connection c = atv2->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
to_playlist->add_region (new_region, where); to_playlist->add_region (new_region, where);
session->add_command (new MementoCommand<Playlist>(*to_playlist, 0, &to_playlist->get_state()));
c.disconnect (); c.disconnect ();
if (latest_regionview) { if (latest_regionview) {
selection->add (latest_regionview); selection->add (latest_regionview);
} }
if (drag_info.copy) {
// get rid of the copy
delete rv;
}
} }
} else { } else {
/* motion within a single track */ /* motion within a single track */
for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) { list<RegionView*> regions = selection->regions.by_layer();
if (drag_info.copy) {
selection->clear_regions();
}
for (list<RegionView*>::iterator i = regions.begin(); i != regions.end(); ++i) {
rv = (*i); rv = (*i);
@ -3464,12 +3435,13 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
continue; continue;
} }
if (regionview_x_movement) { if (regionview_x_movement) {
double ownspeed = 1.0; double ownspeed = 1.0;
RouteTimeAxisView* atv = dynamic_cast<RouteTimeAxisView*> (&(rv->get_time_axis_view())); rtv = dynamic_cast<RouteTimeAxisView*> (&(rv->get_time_axis_view()));
if (atv && atv->get_diskstream()) { if (rtv && rtv->get_diskstream()) {
ownspeed = atv->get_diskstream()->speed(); ownspeed = rtv->get_diskstream()->speed();
} }
/* base the new region position on the current position of the regionview.*/ /* base the new region position on the current position of the regionview.*/
@ -3485,22 +3457,61 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
where = rv->region()->position(); where = rv->region()->position();
} }
rv->get_time_axis_view().reveal_dependent_views (*rv); boost::shared_ptr<Playlist> to_playlist = rv->region()->playlist();
/* no need to add an undo here, we did that when we added this playlist to motion_frozen playlists */ /* add the undo */
rv->region()->set_position (where, (void *) this); session->add_command (new MementoCommand<Playlist>(*to_playlist, &to_playlist->get_state(), 0));
rv->region()->set_opaque (true);
if (drag_info.copy) {
boost::shared_ptr<Region> newregion;
boost::shared_ptr<Region> ar;
if ((ar = boost::dynamic_pointer_cast<AudioRegion>(rv->region())) != 0) {
newregion = RegionFactory::create (ar);
} else {
/* XXX MIDI HERE drobilla */
continue;
}
/* add it */
latest_regionview = 0;
sigc::connection c = rtv->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
to_playlist->add_region (newregion, (nframes_t) (where * rtv->get_diskstream()->speed()));
c.disconnect ();
if (latest_regionview) {
rtv->reveal_dependent_views (*latest_regionview);
selection->add (latest_regionview);
}
/* if the original region was locked, we don't care for the new one */
newregion->set_locked (false);
} else {
/* just change the model */
rv->region()->set_position (where, (void*) this);
}
/* add the redo */
session->add_command (new MementoCommand<Playlist>(*to_playlist, 0, &to_playlist->get_state()));
/* get rid of the copy */
if (drag_info.copy) {
delete rv;
}
} }
} }
out: out:
for (set<boost::shared_ptr<Playlist> >::iterator p = motion_frozen_playlists.begin(); p != motion_frozen_playlists.end(); ++p) {
(*p)->thaw ();
session->add_command (new MementoCommand<Playlist>(*((*p).get()), 0, & (*p)->get_state()));
}
motion_frozen_playlists.clear ();
if (!nocommit) { if (!nocommit) {
commit_reversible_command (); commit_reversible_command ();
@ -3516,10 +3527,10 @@ Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
if (Keyboard::modifier_state_contains (event->state, Keyboard::Control)) { if (Keyboard::modifier_state_contains (event->state, Keyboard::Control)) {
TimeAxisView* tv = &rv.get_time_axis_view(); TimeAxisView* tv = &rv.get_time_axis_view();
RouteTimeAxisView* atv = dynamic_cast<RouteTimeAxisView*>(tv); RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(tv);
double speed = 1.0; double speed = 1.0;
if (atv && atv->is_track()) { if (rtv && rtv->is_track()) {
speed = atv->get_diskstream()->speed(); speed = rtv->get_diskstream()->speed();
} }
if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Alt))) { if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Alt))) {
@ -3976,8 +3987,6 @@ Editor::start_trim (ArdourCanvas::Item* item, GdkEvent* event)
nframes_t region_end = (nframes_t) (clicked_regionview->region()->last_frame() / speed); nframes_t region_end = (nframes_t) (clicked_regionview->region()->last_frame() / speed);
nframes_t region_length = (nframes_t) (clicked_regionview->region()->length() / speed); nframes_t region_length = (nframes_t) (clicked_regionview->region()->length() / speed);
motion_frozen_playlists.clear();
//drag_info.item = clicked_regionview->get_name_highlight(); //drag_info.item = clicked_regionview->get_name_highlight();
drag_info.item = item; drag_info.item = item;
drag_info.motion_callback = &Editor::trim_motion_callback; drag_info.motion_callback = &Editor::trim_motion_callback;
@ -4066,7 +4075,7 @@ Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
begin_reversible_command (trim_type); begin_reversible_command (trim_type);
for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) { for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) {
(*i)->region()->set_opaque(false); (*i)->fake_set_opaque(false);
(*i)->region()->freeze (); (*i)->region()->freeze ();
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i); AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
@ -4261,7 +4270,7 @@ Editor::trim_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
i != selection->regions.by_layer().end(); ++i) i != selection->regions.by_layer().end(); ++i)
{ {
thaw_region_after_trim (**i); thaw_region_after_trim (**i);
(*i)->region()->set_opaque(true); (*i)->fake_set_opaque (true);
} }
} }
@ -4887,14 +4896,14 @@ Editor::mouse_brush_insert_region (RegionView* rv, nframes_t pos)
return; return;
} }
RouteTimeAxisView* atv = dynamic_cast<RouteTimeAxisView*>(&arv->get_time_axis_view()); RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&arv->get_time_axis_view());
if (atv == 0 || !atv->is_track()) { if (rtv == 0 || !rtv->is_track()) {
return; return;
} }
boost::shared_ptr<Playlist> playlist = atv->playlist(); boost::shared_ptr<Playlist> playlist = rtv->playlist();
double speed = atv->get_diskstream()->speed(); double speed = rtv->get_diskstream()->speed();
XMLNode &before = playlist->get_state(); XMLNode &before = playlist->get_state();
playlist->add_region (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (arv->audio_region())), (nframes_t) (pos * speed)); playlist->add_region (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (arv->audio_region())), (nframes_t) (pos * speed));

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdlib> #include <cstdlib>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <unistd.h> #include <unistd.h>
@ -2570,7 +2569,7 @@ Editor::bounce_range_selection ()
return; return;
} }
TrackViewList *views = get_valid_views (selection->time.track, selection->time.group); TrackSelection views = selection->tracks;
nframes_t start = selection->time[clicked_selection].start; nframes_t start = selection->time[clicked_selection].start;
nframes_t end = selection->time[clicked_selection].end; nframes_t end = selection->time[clicked_selection].end;
@ -2578,7 +2577,7 @@ Editor::bounce_range_selection ()
begin_reversible_command (_("bounce range")); begin_reversible_command (_("bounce range"));
for (TrackViewList::iterator i = views->begin(); i != views->end(); ++i) { for (TrackViewList::iterator i = views.begin(); i != views.end(); ++i) {
AudioTimeAxisView* atv; AudioTimeAxisView* atv;
@ -2605,8 +2604,6 @@ Editor::bounce_range_selection ()
} }
commit_reversible_command (); commit_reversible_command ();
delete views;
} }
void void

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdlib> #include <cstdlib>
@ -27,12 +26,14 @@
#include <ardour/audioregion.h> #include <ardour/audioregion.h>
#include <ardour/audiofilesource.h> #include <ardour/audiofilesource.h>
#include <ardour/silentfilesource.h>
#include <ardour/session_region.h> #include <ardour/session_region.h>
#include <gtkmm2ext/stop_signal.h> #include <gtkmm2ext/stop_signal.h>
#include "editor.h" #include "editor.h"
#include "editing.h" #include "editing.h"
#include "keyboard.h"
#include "ardour_ui.h" #include "ardour_ui.h"
#include "gui_thread.h" #include "gui_thread.h"
#include "actions.h" #include "actions.h"
@ -85,6 +86,9 @@ Editor::add_region_to_region_display (boost::shared_ptr<Region> region)
string str; string str;
TreeModel::Row row; TreeModel::Row row;
Gdk::Color c; Gdk::Color c;
bool missing_source;
missing_source = boost::dynamic_pointer_cast<SilentFileSource>(region->source());
if (!show_automatic_regions_in_region_list && region->automatic()) { if (!show_automatic_regions_in_region_list && region->automatic()) {
return; return;
@ -124,7 +128,11 @@ Editor::add_region_to_region_display (boost::shared_ptr<Region> region)
} else if (region->whole_file()) { } else if (region->whole_file()) {
row = *(region_list_model->append()); row = *(region_list_model->append());
set_color(c, rgba_from_style ("RegionListWholeFile", 0xff, 0, 0, 0, "fg", Gtk::STATE_NORMAL, false )); if (missing_source) {
c.set_rgb(65535,0,0); // FIXME: error color from style
} else {
set_color(c, rgba_from_style ("RegionListWholeFile", 0xff, 0, 0, 0, "fg", Gtk::STATE_NORMAL, false ));
}
row[region_list_columns.color_] = c; row[region_list_columns.color_] = c;
if (region->source()->name()[0] == '/') { // external file if (region->source()->name()[0] == '/') { // external file
@ -150,6 +158,10 @@ Editor::add_region_to_region_display (boost::shared_ptr<Region> region)
} }
if (missing_source) {
str += _(" (MISSING)");
}
row[region_list_columns.name] = str; row[region_list_columns.name] = str;
row[region_list_columns.region] = region; row[region_list_columns.region] = region;

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <algorithm> #include <algorithm>
@ -24,11 +23,13 @@
#include <cassert> #include <cassert>
#include "editor.h" #include "editor.h"
#include "keyboard.h"
#include "ardour_ui.h" #include "ardour_ui.h"
#include "audio_time_axis.h" #include "audio_time_axis.h"
#include "midi_time_axis.h" #include "midi_time_axis.h"
#include "mixer_strip.h" #include "mixer_strip.h"
#include "gui_thread.h" #include "gui_thread.h"
#include "actions.h"
#include <pbd/unknown_type.h> #include <pbd/unknown_type.h>
@ -56,7 +57,7 @@ Editor::handle_new_route (Session::RouteList& routes)
boost::shared_ptr<Route> route = (*x); boost::shared_ptr<Route> route = (*x);
if (route->hidden()) { if (route->hidden()) {
return; continue;
} }
if (route->default_type() == ARDOUR::DataType::AUDIO) if (route->default_type() == ARDOUR::DataType::AUDIO)
@ -157,9 +158,10 @@ Editor::remove_route (TimeAxisView *tv)
} }
} }
/* since the editor mixer goes away when you remove a route, set the /* since the editor mixer goes away when you remove a route, set the
* button to inacttive * button to inactive and untick the menu option
*/ */
editor_mixer_button.set_active(false); editor_mixer_button.set_active(false);
ActionManager::uncheck_toggleaction ("<Actions>/Editor/show-editor-mixer");
/* and disable if all tracks and/or routes are gone */ /* and disable if all tracks and/or routes are gone */
@ -275,6 +277,8 @@ Editor::redisplay_route_list ()
} }
full_canvas_height = position;
/* make sure the cursors stay on top of every newly added track */ /* make sure the cursors stay on top of every newly added track */
cursor_group->raise_to_top (); cursor_group->raise_to_top ();
@ -518,11 +522,13 @@ Editor::initial_route_list_display ()
void void
Editor::route_list_change (const Gtk::TreeModel::Path& path,const Gtk::TreeModel::iterator& iter) Editor::route_list_change (const Gtk::TreeModel::Path& path,const Gtk::TreeModel::iterator& iter)
{ {
session->set_remote_control_ids();
redisplay_route_list (); redisplay_route_list ();
} }
void void
Editor::route_list_delete (const Gtk::TreeModel::Path& path) Editor::route_list_delete (const Gtk::TreeModel::Path& path)
{ {
session->set_remote_control_ids();
redisplay_route_list (); redisplay_route_list ();
} }

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdio> // for sprintf, grrr #include <cstdio> // for sprintf, grrr
@ -706,7 +705,7 @@ Editor::update_ruler_visibility ()
update_fixed_rulers(); update_fixed_rulers();
//update_tempo_based_rulers(); //update_tempo_based_rulers();
tempo_map_changed(Change (0)); tempo_map_changed(Change (0), false);
time_canvas_event_box.show_all(); time_canvas_event_box.show_all();
time_button_event_box.show_all(); time_button_event_box.show_all();

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: editor.cc 1353 2007-01-18 03:06:15Z paul $
*/ */
#include <pbd/stacktrace.h> #include <pbd/stacktrace.h>
@ -154,6 +153,11 @@ Editor::extend_selection_to_track (TimeAxisView& view)
return false; return false;
} }
void
Editor::select_all_tracks ()
{
selection->set (track_views);
}
bool bool
Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no_remove) Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no_remove)

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdlib> #include <cstdlib>
@ -31,6 +30,7 @@
#include <gtkmm2ext/stop_signal.h> #include <gtkmm2ext/stop_signal.h>
#include "editor.h" #include "editor.h"
#include "keyboard.h"
#include "selection.h" #include "selection.h"
#include "time_axis_view.h" #include "time_axis_view.h"
#include "ardour_ui.h" #include "ardour_ui.h"

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdio> // for sprintf, grrr #include <cstdio> // for sprintf, grrr
@ -94,13 +93,13 @@ Editor::draw_metric_marks (const Metrics& metrics)
} }
void void
Editor::tempo_map_changed (Change ignored) Editor::tempo_map_changed (Change ignored, bool immediate_redraw)
{ {
if (!session) { if (!session) {
return; return;
} }
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::tempo_map_changed), ignored)); ENSURE_GUI_THREAD(bind (mem_fun (*this, &Editor::tempo_map_changed), ignored, immediate_redraw));
BBT_Time previous_beat, next_beat; // the beats previous to the leftmost frame and after the rightmost frame BBT_Time previous_beat, next_beat; // the beats previous to the leftmost frame and after the rightmost frame
@ -135,18 +134,27 @@ Editor::tempo_map_changed (Change ignored)
current_bbt_points = 0; current_bbt_points = 0;
} }
redisplay_tempo (); if (immediate_redraw) {
hide_measures ();
if (session && current_bbt_points) {
draw_measures ();
}
} else {
if (session && current_bbt_points) {
Glib::signal_idle().connect (mem_fun (*this, &Editor::lazy_hide_and_draw_measures));
} else {
hide_measures ();
}
}
} }
void void
Editor::redisplay_tempo () Editor::redisplay_tempo ()
{ {
if (session && current_bbt_points) {
Glib::signal_idle().connect (mem_fun (*this, &Editor::lazy_hide_and_draw_measures));
} else {
hide_measures ();
}
} }
void void

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <cstdlib> #include <cstdlib>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
@ -109,7 +108,6 @@ ExportDialog::ExportDialog(PublicEditor& e)
src_quality_label (_("Conversion Quality"), 1.0, 0.5), src_quality_label (_("Conversion Quality"), 1.0, 0.5),
dither_type_label (_("Dither Type"), 1.0, 0.5), dither_type_label (_("Dither Type"), 1.0, 0.5),
cuefile_only_checkbox (_("Export CD Marker File Only")), cuefile_only_checkbox (_("Export CD Marker File Only")),
file_frame (_("Export to File")),
file_browse_button (_("Browse")), file_browse_button (_("Browse")),
track_selector_button (_("Specific tracks ...")) track_selector_button (_("Specific tracks ..."))
{ {
@ -571,7 +569,7 @@ ExportDialog::save_state()
row = *ri; row = *ri;
track->add_property(X_("channel1"), row[exp_cols.left] ? X_("on") : X_("off")); track->add_property(X_("channel1"), row[exp_cols.left] ? X_("on") : X_("off"));
track->add_property(X_("channel1"), row[exp_cols.right] ? X_("on") : X_("off")); track->add_property(X_("channel2"), row[exp_cols.right] ? X_("on") : X_("off"));
tracks->add_child_nocopy(*track); tracks->add_child_nocopy(*track);
} }
@ -917,11 +915,9 @@ ExportDialog::do_export ()
end_dialog (); end_dialog ();
} }
void void
ExportDialog::end_dialog () ExportDialog::end_dialog ()
{ {
if (spec.running) { if (spec.running) {
spec.stop = true; spec.stop = true;
@ -934,7 +930,7 @@ ExportDialog::end_dialog ()
} }
} }
session->engine().freewheel (false); session->finalize_audio_export ();
hide_all (); hide_all ();
@ -950,19 +946,21 @@ ExportDialog::start_export ()
} }
/* If the filename hasn't been set before, use the /* If the filename hasn't been set before, use the
directory above the current session as a default current session's export directory as a default
location for the export. location for the export.
*/ */
if (file_entry.get_text().length() == 0) { if (file_entry.get_text().length() == 0) {
string dir = session->path(); string dir = session->export_dir();
string::size_type last_slash; string::size_type last_slash;
if ((last_slash = dir.find_last_of ('/')) != string::npos) { if ((last_slash = dir.find_last_of ('/')) != string::npos && last_slash != 0) {
dir = dir.substr (0, last_slash+1); dir = dir.substr (0, last_slash+1);
} }
dir = dir + "export.wav"; if (!wants_dir()) {
dir = dir + "export.wav";
}
file_entry.set_text (dir); file_entry.set_text (dir);
} }
@ -1307,7 +1305,7 @@ ExportDialog::window_closed (GdkEventAny *ignored)
void void
ExportDialog::browse () ExportDialog::browse ()
{ {
FileChooserDialog dialog("Export to file", FILE_CHOOSER_ACTION_SAVE); FileChooserDialog dialog("Export to file", browse_action());
dialog.set_transient_for(*this); dialog.set_transient_for(*this);
dialog.set_filename (file_entry.get_text()); dialog.set_filename (file_entry.get_text());

View file

@ -29,6 +29,7 @@
#include <gtkmm/progressbar.h> #include <gtkmm/progressbar.h>
#include <gtkmm/scrolledwindow.h> #include <gtkmm/scrolledwindow.h>
#include <gtkmm/fileselection.h> #include <gtkmm/fileselection.h>
#include <gtkmm/filechooser.h>
#include <gtkmm/comboboxtext.h> #include <gtkmm/comboboxtext.h>
#include <gtkmm/treeview.h> #include <gtkmm/treeview.h>
#include <gtkmm/liststore.h> #include <gtkmm/liststore.h>
@ -56,8 +57,11 @@ class ExportDialog : public ArdourDialog
virtual void set_range (nframes_t start, nframes_t end); virtual void set_range (nframes_t start, nframes_t end);
void start_export (); void start_export ();
virtual Gtk::FileChooserAction browse_action() const { return Gtk::FILE_CHOOSER_ACTION_SAVE; }
protected: protected:
ARDOUR::AudioExportSpecification spec; ARDOUR::AudioExportSpecification spec;
Gtk::Frame file_frame;
struct ExportModelColumns : public Gtk::TreeModel::ColumnRecord struct ExportModelColumns : public Gtk::TreeModel::ColumnRecord
{ {
@ -87,6 +91,8 @@ class ExportDialog : public ArdourDialog
// this method. The dialog will be closed after this function exited. // this method. The dialog will be closed after this function exited.
virtual void export_audio_data() = 0; virtual void export_audio_data() = 0;
virtual bool wants_dir() { return false; }
// reads the user input and fills spec with the according values // reads the user input and fills spec with the according values
// filepath: complete path to the target file, including filename // filepath: complete path to the target file, including filename
void initSpec(string &filepath); void initSpec(string &filepath);
@ -138,7 +144,6 @@ class ExportDialog : public ArdourDialog
Gtk::CheckButton cuefile_only_checkbox; Gtk::CheckButton cuefile_only_checkbox;
Gtk::Frame file_frame;
Gtk::Entry file_entry; Gtk::Entry file_entry;
Gtk::HBox file_hbox; Gtk::HBox file_hbox;
Gtk::Button file_browse_button; Gtk::Button file_browse_button;

View file

@ -38,12 +38,20 @@ using namespace std;
ExportRangeMarkersDialog::ExportRangeMarkersDialog (PublicEditor& editor) ExportRangeMarkersDialog::ExportRangeMarkersDialog (PublicEditor& editor)
: ExportDialog(editor) : ExportDialog(editor)
{ {
set_title (_("ardour: export ranges"));
file_frame.set_label (_("Export to Directory"));
do_not_allow_export_cd_markers(); do_not_allow_export_cd_markers();
total_duration = 0; total_duration = 0;
current_range_marker_index = 0; current_range_marker_index = 0;
} }
Gtk::FileChooserAction
ExportRangeMarkersDialog::browse_action () const
{
return Gtk::FILE_CHOOSER_ACTION_CREATE_FOLDER;
}
void void
ExportRangeMarkersDialog::export_audio_data () ExportRangeMarkersDialog::export_audio_data ()
@ -82,7 +90,8 @@ ExportRangeMarkersDialog::process_range_markers_export(Locations::LocationList&
// wait until export of this range finished // wait until export of this range finished
gtk_main_iteration(); gtk_main_iteration();
while(spec.running){
while (spec.running){
if(gtk_events_pending()){ if(gtk_events_pending()){
gtk_main_iteration(); gtk_main_iteration();
}else { }else {
@ -90,7 +99,6 @@ ExportRangeMarkersDialog::process_range_markers_export(Locations::LocationList&
} }
} }
getSession().engine().freewheel (false);
current_range_marker_index++; current_range_marker_index++;
} }
} }
@ -140,8 +148,7 @@ ExportRangeMarkersDialog::is_filepath_valid(string &filepath)
if ( (stat (filepath.c_str(), &statbuf) != 0) || if ( (stat (filepath.c_str(), &statbuf) != 0) ||
(!S_ISDIR (statbuf.st_mode)) ) { (!S_ISDIR (statbuf.st_mode)) ) {
string txt = _("Please select an existing target directory. Files\n" string txt = _("Please select an existing target directory. Files are not allowed!");
"are not allowed!");
MessageDialog msg (*this, txt, false, MESSAGE_ERROR, BUTTONS_OK, true); MessageDialog msg (*this, txt, false, MESSAGE_ERROR, BUTTONS_OK, true);
msg.run(); msg.run();
return false; return false;
@ -173,13 +180,11 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
Location *currentLocation = (*locationIter); Location *currentLocation = (*locationIter);
if(currentLocation->is_range_marker()){ if(currentLocation->is_range_marker()){
range_markers_durations_aggregated.push_back( range_markers_durations_aggregated.push_back (duration_before_current_location);
duration_before_current_location);
nframes_t duration = nframes_t duration = currentLocation->end() - currentLocation->start();
currentLocation->end() - currentLocation->start();
range_markers_durations.push_back(duration); range_markers_durations.push_back (duration);
duration_before_current_location += duration; duration_before_current_location += duration;
} }
} }
@ -193,13 +198,11 @@ ExportRangeMarkersDialog::progress_timeout ()
{ {
double progress = 0.0; double progress = 0.0;
if(current_range_marker_index >= range_markers_durations.size()){ if (current_range_marker_index >= range_markers_durations.size()){
progress = 1.0; progress = 1.0;
} } else{
else{ progress = ((double) range_markers_durations_aggregated[current_range_marker_index] +
progress = (spec.progress * (double) range_markers_durations[current_range_marker_index])) /
((double) range_markers_durations_aggregated[current_range_marker_index] +
(spec.progress * (double) range_markers_durations[current_range_marker_index])) /
(double) total_duration; (double) total_duration;
} }

View file

@ -30,11 +30,15 @@ class ExportRangeMarkersDialog : public ExportDialog
public: public:
ExportRangeMarkersDialog (PublicEditor&); ExportRangeMarkersDialog (PublicEditor&);
Gtk::FileChooserAction browse_action() const;
protected: protected:
virtual bool is_filepath_valid(string &filepath); virtual bool is_filepath_valid(string &filepath);
void export_audio_data(); void export_audio_data();
bool wants_dir() { return true; }
private: private:
// keeps the duration of all range_markers before the current // keeps the duration of all range_markers before the current
vector<nframes_t> range_markers_durations_aggregated; vector<nframes_t> range_markers_durations_aggregated;

View file

@ -31,6 +31,9 @@
ExportRegionDialog::ExportRegionDialog (PublicEditor& editor, boost::shared_ptr<ARDOUR::Region> region) ExportRegionDialog::ExportRegionDialog (PublicEditor& editor, boost::shared_ptr<ARDOUR::Region> region)
: ExportDialog(editor) : ExportDialog(editor)
{ {
set_title (_("ardour: export region"));
file_frame.set_label (_("Export to File")),
audio_region = boost::dynamic_pointer_cast<ARDOUR::AudioRegion>(region); audio_region = boost::dynamic_pointer_cast<ARDOUR::AudioRegion>(region);
assert(audio_region); assert(audio_region);

View file

@ -21,13 +21,14 @@
#include "ardour_ui.h" #include "ardour_ui.h"
#include "export_session_dialog.h" #include "export_session_dialog.h"
#include "i18n.h"
ExportSessionDialog::ExportSessionDialog (PublicEditor& editor) ExportSessionDialog::ExportSessionDialog (PublicEditor& editor)
: ExportDialog(editor) : ExportDialog(editor)
{ {
file_frame.set_label (_("Export to File"));
} }
void void
ExportSessionDialog::export_audio_data () ExportSessionDialog::export_audio_data ()
{ {

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <ardour/curve.h> #include <ardour/curve.h>

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <limits.h> #include <limits.h>
@ -107,11 +106,11 @@ GainMeter::GainMeter (boost::shared_ptr<IO> io, Session& s)
gain_display_box.pack_start (gain_display, true, true); gain_display_box.pack_start (gain_display, true, true);
peak_display.set_name ("MixerStripPeakDisplay"); peak_display.set_name ("MixerStripPeakDisplay");
peak_display.set_has_frame (false); // peak_display.set_has_frame (false);
peak_display.set_editable (false); // peak_display.set_editable (false);
set_size_request_to_display_given_text (peak_display, "-80.g", 2, 6); /* note the descender */ set_size_request_to_display_given_text (peak_display, "-80.g", 2, 6); /* note the descender */
max_peak = minus_infinity(); max_peak = minus_infinity();
peak_display.set_text (_("-inf")); peak_display.set_label (_("-inf"));
peak_display.unset_flags (Gtk::CAN_FOCUS); peak_display.unset_flags (Gtk::CAN_FOCUS);
meter_metric_area.set_name ("MeterMetricsStrip"); meter_metric_area.set_name ("MeterMetricsStrip");
@ -161,7 +160,7 @@ GainMeter::GainMeter (boost::shared_ptr<IO> io, Session& s)
using namespace Menu_Helpers; using namespace Menu_Helpers;
gain_astate_menu.items().push_back (MenuElem (_("Off"), gain_astate_menu.items().push_back (MenuElem (_("Manual"),
bind (mem_fun (*_io, &IO::set_gain_automation_state), (AutoState) Off))); bind (mem_fun (*_io, &IO::set_gain_automation_state), (AutoState) Off)));
gain_astate_menu.items().push_back (MenuElem (_("Play"), gain_astate_menu.items().push_back (MenuElem (_("Play"),
bind (mem_fun (*_io, &IO::set_gain_automation_state), (AutoState) Play))); bind (mem_fun (*_io, &IO::set_gain_automation_state), (AutoState) Play)));
@ -231,11 +230,11 @@ GainMeter::render_metrics (Gtk::Widget& w)
Glib::RefPtr<Gdk::Window> win (w.get_window()); Glib::RefPtr<Gdk::Window> win (w.get_window());
Glib::RefPtr<Gdk::GC> fg_gc (w.get_style()->get_fg_gc (Gtk::STATE_NORMAL)); Glib::RefPtr<Gdk::GC> fg_gc (w.get_style()->get_fg_gc (Gtk::STATE_NORMAL));
Glib::RefPtr<Gdk::GC> bg_gc (w.get_style()->get_bg_gc (Gtk::STATE_NORMAL)); Glib::RefPtr<Gdk::GC> bg_gc (w.get_style()->get_bg_gc (Gtk::STATE_NORMAL));
gint x, y, width, height, depth; gint width, height;
int db_points[] = { -50, -40, -20, -30, -10, -3, 0, 4 }; int db_points[] = { -50, -40, -20, -30, -10, -3, 0, 4 };
char buf[32]; char buf[32];
win->get_geometry (x, y, width, height, depth); win->get_size (width, height);
Glib::RefPtr<Gdk::Pixmap> pixmap = Gdk::Pixmap::create (win, width, height); Glib::RefPtr<Gdk::Pixmap> pixmap = Gdk::Pixmap::create (win, width, height);
@ -274,9 +273,9 @@ GainMeter::meter_metrics_expose (GdkEventExpose *ev)
Glib::RefPtr<Gdk::GC> bg_gc (meter_metric_area.get_style()->get_bg_gc (Gtk::STATE_NORMAL)); Glib::RefPtr<Gdk::GC> bg_gc (meter_metric_area.get_style()->get_bg_gc (Gtk::STATE_NORMAL));
GdkRectangle base_rect; GdkRectangle base_rect;
GdkRectangle draw_rect; GdkRectangle draw_rect;
gint x, y, width, height, depth; gint width, height;
win->get_geometry (x, y, width, height, depth); win->get_size (width, height);
base_rect.width = width; base_rect.width = width;
base_rect.height = height; base_rect.height = height;
@ -332,10 +331,10 @@ GainMeter::update_meters ()
max_peak = mpeak; max_peak = mpeak;
/* set peak display */ /* set peak display */
if (max_peak <= -200.0f) { if (max_peak <= -200.0f) {
peak_display.set_text (_("-inf")); peak_display.set_label (_("-inf"));
} else { } else {
snprintf (buf, sizeof(buf), "%.1f", max_peak); snprintf (buf, sizeof(buf), "%.1f", max_peak);
peak_display.set_text (buf); peak_display.set_label (buf);
} }
if (max_peak >= 0.0f) { if (max_peak >= 0.0f) {
@ -452,6 +451,14 @@ GainMeter::setup_meters ()
} }
} }
int
GainMeter::get_gm_width ()
{
Gtk::Requisition sz;
hbox.size_request (sz);
return sz.width;
}
bool bool
GainMeter::gain_key_press (GdkEventKey* ev) GainMeter::gain_key_press (GdkEventKey* ev)
{ {
@ -491,7 +498,7 @@ GainMeter::reset_peak_display ()
} }
max_peak = -INFINITY; max_peak = -INFINITY;
peak_display.set_text (_("-Inf")); peak_display.set_label (_("-Inf"));
peak_display.set_name ("MixerStripPeakDisplay"); peak_display.set_name ("MixerStripPeakDisplay");
} }
@ -513,7 +520,7 @@ GainMeter::meter_button_release (GdkEventButton* ev, uint32_t which)
case 1: case 1:
meters[which].meter->clear(); meters[which].meter->clear();
max_peak = minus_infinity(); max_peak = minus_infinity();
peak_display.set_text (_("-inf")); peak_display.set_label (_("-inf"));
peak_display.set_name ("MixerStripPeakDisplay"); peak_display.set_name ("MixerStripPeakDisplay");
break; break;
@ -842,7 +849,7 @@ GainMeter::_astate_string (AutoState state, bool shrt)
switch (state) { switch (state) {
case Off: case Off:
sstr = (shrt ? "O" : _("O")); sstr = (shrt ? "M" : _("M"));
break; break;
case Play: case Play:
sstr = (shrt ? "P" : _("P")); sstr = (shrt ? "P" : _("P"));

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __ardour_gtk_gain_meter_h__ #ifndef __ardour_gtk_gain_meter_h__
@ -70,6 +69,8 @@ class GainMeter : public Gtk::VBox
void set_width (Width); void set_width (Width);
void setup_meters (); void setup_meters ();
int get_gm_width ();
void set_meter_strip_name (const char * name); void set_meter_strip_name (const char * name);
void set_fader_name (const char * name); void set_fader_name (const char * name);
@ -85,7 +86,7 @@ class GainMeter : public Gtk::VBox
Gtkmm2ext::VSliderController *gain_slider; Gtkmm2ext::VSliderController *gain_slider;
Gtk::Adjustment gain_adjustment; Gtk::Adjustment gain_adjustment;
Gtkmm2ext::FocusEntry gain_display; Gtkmm2ext::FocusEntry gain_display;
Gtk::Entry peak_display; Gtk::Button peak_display;
Gtk::HBox gain_display_box; Gtk::HBox gain_display_box;
Gtk::HBox fader_box; Gtk::HBox fader_box;
Gtk::DrawingArea meter_metric_area; Gtk::DrawingArea meter_metric_area;

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#ifndef __ardour_gtk_ghost_region_h__ #ifndef __ardour_gtk_ghost_region_h__

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

View file

@ -4,7 +4,6 @@
#include "imageframe_p.h" #include "imageframe_p.h"
#include <libgnomecanvasmm/private/shape_p.h> #include <libgnomecanvasmm/private/shape_p.h>
/* $Id$ */
/* rect.c /* rect.c
* *

View file

@ -4,7 +4,6 @@
#include <glibmm.h> #include <glibmm.h>
/* $Id$ */
/* rect.h /* rect.h
* *

View file

@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id$
*/ */
#include <iostream> #include <iostream>

Some files were not shown because too many files have changed in this diff Show more