mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Merged with trunk R1141
git-svn-id: svn://localhost/ardour2/branches/midi@1142 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
af105afe6c
commit
ef6b25432d
209 changed files with 21004 additions and 6768 deletions
|
|
@ -6,6 +6,7 @@ Many thanks to these translators for making Ardour available in other
|
|||
languages:
|
||||
|
||||
French: Alain Fréhel <alain.frehel@free.fr>
|
||||
Christophe Combelles <ccomb@free.fr>
|
||||
|
||||
German: Karsten Petersen <kapet@kapet.de>
|
||||
|
||||
|
|
|
|||
156
SConstruct
156
SConstruct
|
|
@ -9,13 +9,14 @@ import errno
|
|||
import time
|
||||
import platform
|
||||
import string
|
||||
import commands
|
||||
from sets import Set
|
||||
import SCons.Node.FS
|
||||
|
||||
SConsignFile()
|
||||
EnsureSConsVersion(0, 96)
|
||||
|
||||
version = '2.0beta5.1'
|
||||
version = '2.0beta8'
|
||||
|
||||
subst_dict = { }
|
||||
|
||||
|
|
@ -40,7 +41,7 @@ opts.AddOptions(
|
|||
PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'),
|
||||
BoolOption('SURFACES', 'Build support for control surfaces', 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('VERSIONED', 'Add version 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)
|
||||
)
|
||||
|
||||
|
|
@ -230,41 +231,71 @@ def i18n (buildenv, sources, installenv):
|
|||
moname = domain + '.mo'
|
||||
installenv.Alias('install', installenv.InstallAs (os.path.join (modir, moname), lang + '.mo'))
|
||||
|
||||
|
||||
def fetch_svn_revision (path):
|
||||
cmd = "svn info "
|
||||
cmd += path
|
||||
cmd += " | awk '/^Revision:/ { print $2}'"
|
||||
return commands.getoutput (cmd)
|
||||
|
||||
def create_stored_revision (target = None, source = None, env = None):
|
||||
if os.path.exists('.svn'):
|
||||
rev = fetch_svn_revision ('.');
|
||||
try:
|
||||
text = "#ifndef __ardour_svn_revision_h__\n"
|
||||
text += "#define __ardour_svn_revision_h__\n"
|
||||
text += "static const char* ardour_svn_revision = \"" + rev + "\";\n";
|
||||
text += "#endif\n"
|
||||
print '============> writing svn revision info to svn_revision.h\n'
|
||||
o = file ('svn_revision.h', 'w')
|
||||
o.write (text)
|
||||
o.close ()
|
||||
except IOError:
|
||||
print "Could not open svn_revision.h for writing\n"
|
||||
sys.exit (-1)
|
||||
else:
|
||||
print "You cannot use \"scons revision\" on without using a checked out"
|
||||
print "copy of the Ardour source code repository"
|
||||
sys.exit (-1)
|
||||
|
||||
#
|
||||
# A generic builder for version.cc files
|
||||
#
|
||||
# note: requires that DOMAIN, MAJOR, MINOR, MICRO are set in the construction environment
|
||||
# note: assumes one source files, the header that declares the version variables
|
||||
#
|
||||
|
||||
def version_builder (target, source, env):
|
||||
text = "int " + env['DOMAIN'] + "_major_version = " + str (env['MAJOR']) + ";\n"
|
||||
text += "int " + env['DOMAIN'] + "_minor_version = " + str (env['MINOR']) + ";\n"
|
||||
text += "int " + env['DOMAIN'] + "_micro_version = " + str (env['MICRO']) + ";\n"
|
||||
|
||||
try:
|
||||
o = file (target[0].get_path(), 'w')
|
||||
o.write (text)
|
||||
o.close ()
|
||||
except IOError:
|
||||
print "Could not open", target[0].get_path(), " for writing\n"
|
||||
sys.exit (-1)
|
||||
|
||||
text = "#ifndef __" + env['DOMAIN'] + "_version_h__\n"
|
||||
text += "#define __" + env['DOMAIN'] + "_version_h__\n"
|
||||
text += "extern int " + env['DOMAIN'] + "_major_version;\n"
|
||||
text += "extern int " + env['DOMAIN'] + "_minor_version;\n"
|
||||
text += "extern int " + env['DOMAIN'] + "_micro_version;\n"
|
||||
text += "#endif /* __" + env['DOMAIN'] + "_version_h__ */\n"
|
||||
|
||||
try:
|
||||
o = file (target[1].get_path(), 'w')
|
||||
o.write (text)
|
||||
o.close ();
|
||||
except IOError:
|
||||
print "Could not open", target[1].get_path(), " for writing\n"
|
||||
sys.exit (-1)
|
||||
|
||||
return None
|
||||
|
||||
text = "int " + env['DOMAIN'] + "_major_version = " + str (env['MAJOR']) + ";\n"
|
||||
text += "int " + env['DOMAIN'] + "_minor_version = " + str (env['MINOR']) + ";\n"
|
||||
text += "int " + env['DOMAIN'] + "_micro_version = " + str (env['MICRO']) + ";\n"
|
||||
|
||||
try:
|
||||
o = file (target[0].get_path(), 'w')
|
||||
o.write (text)
|
||||
o.close ()
|
||||
except IOError:
|
||||
print "Could not open", target[0].get_path(), " for writing\n"
|
||||
sys.exit (-1)
|
||||
|
||||
text = "#ifndef __" + env['DOMAIN'] + "_version_h__\n"
|
||||
text += "#define __" + env['DOMAIN'] + "_version_h__\n"
|
||||
text += "extern const char* " + env['DOMAIN'] + "_revision;\n"
|
||||
text += "extern int " + env['DOMAIN'] + "_major_version;\n"
|
||||
text += "extern int " + env['DOMAIN'] + "_minor_version;\n"
|
||||
text += "extern int " + env['DOMAIN'] + "_micro_version;\n"
|
||||
text += "#endif /* __" + env['DOMAIN'] + "_version_h__ */\n"
|
||||
|
||||
try:
|
||||
o = file (target[1].get_path(), 'w')
|
||||
o.write (text)
|
||||
o.close ()
|
||||
except IOError:
|
||||
print "Could not open", target[1].get_path(), " for writing\n"
|
||||
sys.exit (-1)
|
||||
|
||||
return None
|
||||
|
||||
version_bld = Builder (action = version_builder)
|
||||
env.Append (BUILDERS = {'VersionBuild' : version_bld})
|
||||
|
|
@ -278,32 +309,18 @@ env.Append (BUILDERS = {'VersionBuild' : version_bld})
|
|||
#
|
||||
|
||||
def versioned_builder(target,source,env):
|
||||
# build ID is composed of a representation of the date of the last CVS transaction
|
||||
# for this (SConscript) file
|
||||
w, r = os.popen2( "svn info | awk '/^Revision:/ { print $2}'")
|
||||
|
||||
try:
|
||||
o = file (source[0].get_dir().get_path() + '/CVS/Entries', "r")
|
||||
except IOError:
|
||||
print "Could not CVS/Entries for reading"
|
||||
last_revision = r.readline().strip()
|
||||
w.close()
|
||||
r.close()
|
||||
if last_revision == "":
|
||||
print "No SVN info found - versioned executable cannot be built"
|
||||
return -1
|
||||
|
||||
last_date = ""
|
||||
lines = o.readlines()
|
||||
for line in lines:
|
||||
if line[0:12] == '/SConscript/':
|
||||
parts = line.split ("/")
|
||||
last_date = parts[3]
|
||||
break
|
||||
o.close ()
|
||||
print "The current build ID is " + last_revision
|
||||
|
||||
if last_date == "":
|
||||
print "No SConscript CVS update info found - versioned executable cannot be built"
|
||||
return -1
|
||||
|
||||
tag = time.strftime ('%Y%M%d%H%m', time.strptime (last_date))
|
||||
print "The current build ID is " + tag
|
||||
|
||||
tagged_executable = source[0].get_path() + '-' + tag
|
||||
tagged_executable = source[0].get_path() + '-' + last_revision
|
||||
|
||||
if os.path.exists (tagged_executable):
|
||||
print "Replacing existing executable with the same build tag."
|
||||
|
|
@ -361,7 +378,7 @@ env.Append (BUILDERS = {'Tarball' : tarball_bld})
|
|||
#
|
||||
|
||||
if env['VST']:
|
||||
sys.stdout.write ("Are you building Ardour for personal use (rather than distributiont to others)? [no]: ")
|
||||
sys.stdout.write ("Are you building Ardour for personal use (rather than distribution to others)? [no]: ")
|
||||
answer = sys.stdin.readline ()
|
||||
answer = answer.rstrip().strip()
|
||||
if answer != "yes" and answer != "y":
|
||||
|
|
@ -462,7 +479,7 @@ libraries['flac'] = conf.Finish ()
|
|||
|
||||
libraries['boost'] = LibraryInfo ()
|
||||
conf = Configure (libraries['boost'])
|
||||
if conf.CheckHeader ('boost/shared_ptr.hpp', language='CXX') == 0:
|
||||
if conf.CheckHeader ('boost/shared_ptr.hpp', language='CXX') == False:
|
||||
print "Boost header files do not appear to be installed."
|
||||
sys.exit (1)
|
||||
|
||||
|
|
@ -523,7 +540,7 @@ elif conf.CheckCHeader('/System/Library/Frameworks/CoreMIDI.framework/Headers/Co
|
|||
subst_dict['%MIDITYPE%'] = "coremidi"
|
||||
print "Using CoreMIDI"
|
||||
else:
|
||||
print "It appears you don't have the required MIDI libraries installed."
|
||||
print "It appears you don't have the required MIDI libraries installed. For Linux this means you are missing the development package for ALSA libraries."
|
||||
sys.exit (1)
|
||||
|
||||
env = conf.Finish()
|
||||
|
|
@ -549,7 +566,7 @@ if env['SYSLIBS']:
|
|||
# cannot use system one for the time being
|
||||
#
|
||||
|
||||
libraries['sndfile'] = LibraryInfo(LIBS='libsndfile',
|
||||
libraries['sndfile-ardour'] = LibraryInfo(LIBS='libsndfile-ardour',
|
||||
LIBPATH='#libs/libsndfile',
|
||||
CPPPATH=['#libs/libsndfile', '#libs/libsndfile/src'])
|
||||
|
||||
|
|
@ -587,7 +604,8 @@ if env['SYSLIBS']:
|
|||
gtk_subdirs = [
|
||||
# 'libs/flowcanvas',
|
||||
'libs/gtkmm2ext',
|
||||
'gtk2_ardour'
|
||||
'gtk2_ardour',
|
||||
'libs/clearlooks'
|
||||
]
|
||||
|
||||
else:
|
||||
|
|
@ -616,7 +634,7 @@ else:
|
|||
libraries['soundtouch'] = LibraryInfo(LIBS='soundtouch',
|
||||
LIBPATH='#libs/soundtouch',
|
||||
CPPPATH=['#libs', '#libs/soundtouch'])
|
||||
libraries['sndfile'] = LibraryInfo(LIBS='libsndfile',
|
||||
libraries['sndfile-ardour'] = LibraryInfo(LIBS='libsndfile-ardour',
|
||||
LIBPATH='#libs/libsndfile',
|
||||
CPPPATH=['#libs/libsndfile', '#libs/libsndfile/src'])
|
||||
# libraries['libglademm'] = LibraryInfo(LIBS='libglademm',
|
||||
|
|
@ -656,8 +674,9 @@ else:
|
|||
'libs/gtkmm2/gtk',
|
||||
'libs/libgnomecanvasmm',
|
||||
# 'libs/flowcanvas',
|
||||
'libs/gtkmm2ext',
|
||||
'gtk2_ardour'
|
||||
'libs/gtkmm2ext',
|
||||
'gtk2_ardour',
|
||||
'libs/clearlooks'
|
||||
]
|
||||
|
||||
#
|
||||
|
|
@ -722,10 +741,10 @@ if os.environ.has_key('HOME'):
|
|||
|
||||
conf = Configure (env)
|
||||
|
||||
have_cxx = conf.TryAction (Action (env['CXX'] + ' --version'))
|
||||
have_cxx = conf.TryAction (Action (str(env['CXX']) + ' --version'))
|
||||
if have_cxx[0] != 1:
|
||||
print "This system has no functional C++ compiler. You cannot build Ardour from source without one."
|
||||
exit (1)
|
||||
sys.exit (1)
|
||||
else:
|
||||
print "Congratulations, you have a functioning C++ compiler."
|
||||
|
||||
|
|
@ -950,6 +969,9 @@ env = conf.Finish()
|
|||
|
||||
rcbuild = env.SubstInFile ('ardour.rc','ardour.rc.in', SUBST_DICT = subst_dict)
|
||||
|
||||
the_revision = env.Command ('frobnicatory_decoy', [], create_stored_revision)
|
||||
|
||||
env.Alias('revision', the_revision)
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour_system.rc'))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.rc'))
|
||||
|
||||
|
|
@ -959,13 +981,8 @@ Default (rcbuild)
|
|||
|
||||
Precious (env['DISTTREE'])
|
||||
|
||||
#
|
||||
# note the special "cleanfirst" source name. this triggers removal
|
||||
# of the existing disttree
|
||||
#
|
||||
|
||||
env.Distribute (env['DISTTREE'],
|
||||
[ 'SConstruct',
|
||||
[ 'SConstruct', 'svn_revision.h',
|
||||
'COPYING', 'PACKAGER_README', 'README',
|
||||
'ardour.rc.in',
|
||||
'ardour_system.rc',
|
||||
|
|
@ -989,12 +1006,13 @@ env.Distribute (env['DISTTREE'],
|
|||
glob.glob ('DOCUMENTATION/README*')
|
||||
)
|
||||
|
||||
srcdist = env.Tarball(env['TARBALL'], env['DISTTREE'])
|
||||
srcdist = env.Tarball(env['TARBALL'], [ env['DISTTREE'], the_revision ])
|
||||
env.Alias ('srctar', srcdist)
|
||||
|
||||
#
|
||||
# don't leave the distree around
|
||||
#
|
||||
|
||||
env.AddPreAction (env['DISTTREE'], Action ('rm -rf ' + str (File (env['DISTTREE']))))
|
||||
env.AddPostAction (srcdist, Action ('rm -rf ' + str (File (env['DISTTREE']))))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Ardour>
|
||||
<MIDI-port tag="%MIDITAG%" device="ardour" type="%MIDITYPE%" mode="duplex"/>
|
||||
<MIDI-port tag="control" device="ardour" type="%MIDITYPE%" mode="duplex"/>
|
||||
|
|
@ -31,6 +31,7 @@
|
|||
<Option name="quieten-at-speed" value="1.000000"/>
|
||||
<Option name="use-vst" value="yes"/>
|
||||
<Option name="use-tranzport" value="yes"/>
|
||||
<Option name="destructive-xfade-msecs" value="500"/>
|
||||
</Config>
|
||||
<extra>
|
||||
<Keyboard edit-button="3" edit-modifier="4" delete-button="3" delete-modifier="1" snap-modifier="32"/>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Ardour>
|
||||
<Config>
|
||||
<Option name="minimum-disk-io-bytes" value="262144"/>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
|
|||
gtkardour.Append(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
|
||||
gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
|
||||
gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
|
||||
gtkardour.Append(CPPPATH="#/") # for top level svn_revision.h
|
||||
#gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
|
||||
gtkardour.Append(PACKAGE=domain)
|
||||
gtkardour.Append(POTFILE=domain + '.pot')
|
||||
|
|
@ -34,7 +35,7 @@ gtkardour.Merge ([
|
|||
libraries['libgnomecanvas2'],
|
||||
libraries['libgnomecanvasmm'],
|
||||
libraries['sysmidi'],
|
||||
libraries['sndfile'],
|
||||
libraries['sndfile-ardour'],
|
||||
libraries['flac'],
|
||||
libraries['lrdf'],
|
||||
libraries['glibmm2'],
|
||||
|
|
@ -261,8 +262,6 @@ versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
|
|||
|
||||
gtkardour.Append(CXXFLAGS=versionflag)
|
||||
|
||||
gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
|
||||
|
||||
executable = 'ardour.bin'
|
||||
|
||||
ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
|
||||
|
|
@ -310,6 +309,7 @@ env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'),
|
|||
env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/pixmaps'), pixmap_files))
|
||||
env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/icons'), icon_files))
|
||||
|
||||
env.Alias ('version', gtkardour.VersionBuild(['version.cc','version.h'], []))
|
||||
|
||||
#dist
|
||||
env.Alias ('tarball', env.Distribute (env['DISTTREE'],
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "utils.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "svn_revision.h"
|
||||
#include "about.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "ardour_ui.h"
|
||||
|
|
@ -139,11 +140,16 @@ static const char* authors[] = {
|
|||
N_("Per Sigmond"),
|
||||
N_("Doug Mclain"),
|
||||
N_("Petter Sundlöf"),
|
||||
N_("Thorsten Wilms"),
|
||||
N_("Ben Loftis"),
|
||||
N_("Stefan Kersten"),
|
||||
N_("Christopher George"),
|
||||
N_("Robert Jordens"),
|
||||
0
|
||||
};
|
||||
|
||||
static const char* translators[] = {
|
||||
N_("French:\n\tAlain Fréhel <alain.frehel@free.fr>\n"),
|
||||
N_("French:\n\tAlain Fréhel <alain.frehel@free.fr>\n\tChristophe Combelles <ccomb@free.fr>\n"),
|
||||
N_("German:\n\tKarsten Petersen <kapet@kapet.de>\n"),
|
||||
N_("Italian:\n\tFilippo Pappalardo <filippo@email.it>\n"),
|
||||
N_("Portuguese:\n\tRui Nuno Capela <rncbc@rncbc.org>\n"),
|
||||
|
|
@ -184,16 +190,11 @@ About::About ()
|
|||
"under certain conditions; see the file COPYING for details.\n"));
|
||||
set_name (X_("ardour"));
|
||||
set_website (X_("http://ardour.org/"));
|
||||
set_website_label (X_("visit http://www.ardour.org/"));
|
||||
set_version ((string_compose(_("%1\n(built with ardour/gtk %2.%3.%4 libardour: %5.%6.%7)"),
|
||||
set_website_label (_("visit http://www.ardour.org/"));
|
||||
set_version ((string_compose(_("%1\n(built from revision %2)"),
|
||||
VERSIONSTRING,
|
||||
gtk_ardour_major_version,
|
||||
gtk_ardour_minor_version,
|
||||
gtk_ardour_micro_version,
|
||||
libardour_major_version,
|
||||
libardour_minor_version,
|
||||
libardour_micro_version)));
|
||||
|
||||
ardour_svn_revision)));
|
||||
|
||||
|
||||
#ifdef WITH_PAYMENT_OPTIONS
|
||||
paypal_button.add (paypal_pixmap);
|
||||
|
|
|
|||
|
|
@ -85,15 +85,6 @@ ActionManager::init ()
|
|||
}
|
||||
}
|
||||
|
||||
RefPtr<Action>
|
||||
ActionManager::register_action (RefPtr<ActionGroup> group, const char * name, const char * label, slot<void> sl, guint key, Gdk::ModifierType mods)
|
||||
{
|
||||
RefPtr<Action> act = register_action (group, name, label, sl);
|
||||
AccelMap::add_entry (act->get_accel_path(), key, mods);
|
||||
|
||||
return act;
|
||||
}
|
||||
|
||||
RefPtr<Action>
|
||||
ActionManager::register_action (RefPtr<ActionGroup> group, const char * name, const char * label, slot<void> sl)
|
||||
{
|
||||
|
|
@ -117,15 +108,6 @@ ActionManager::register_action (RefPtr<ActionGroup> group, const char * name, co
|
|||
}
|
||||
|
||||
|
||||
RefPtr<Action>
|
||||
ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group& rgroup, const char * name, const char * label, slot<void> sl, guint key, Gdk::ModifierType mods)
|
||||
{
|
||||
RefPtr<Action> act = register_radio_action (group, rgroup, name, label, sl);
|
||||
AccelMap::add_entry (act->get_accel_path(), key, mods);
|
||||
|
||||
return act;
|
||||
}
|
||||
|
||||
RefPtr<Action>
|
||||
ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group& rgroup, const char * name, const char * label, slot<void> sl)
|
||||
{
|
||||
|
|
@ -137,15 +119,6 @@ ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Gr
|
|||
return act;
|
||||
}
|
||||
|
||||
RefPtr<Action>
|
||||
ActionManager::register_toggle_action (RefPtr<ActionGroup> group, const char * name, const char * label, slot<void> sl, guint key, Gdk::ModifierType mods)
|
||||
{
|
||||
RefPtr<Action> act = register_toggle_action (group,name, label, sl);
|
||||
AccelMap::add_entry (act->get_accel_path(), key, mods);
|
||||
|
||||
return act;
|
||||
}
|
||||
|
||||
RefPtr<Action>
|
||||
ActionManager::register_toggle_action (RefPtr<ActionGroup> group, const char * name, const char * label, slot<void> sl)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,20 +38,20 @@ using namespace std;
|
|||
using namespace PBD;
|
||||
|
||||
static const char* channel_setup_names[] = {
|
||||
"Mono",
|
||||
"Stereo",
|
||||
"3 Channels",
|
||||
"4 Channels",
|
||||
"6 Channels",
|
||||
"8 Channels",
|
||||
"Manual Setup",
|
||||
N_("Mono"),
|
||||
N_("Stereo"),
|
||||
N_("3 Channels"),
|
||||
N_("4 Channels"),
|
||||
N_("6 Channels"),
|
||||
N_("8 Channels"),
|
||||
N_("Manual Setup"),
|
||||
"MIDI",
|
||||
0
|
||||
};
|
||||
|
||||
static const char* track_mode_names[] = {
|
||||
"Normal",
|
||||
"Tape",
|
||||
N_("Normal"),
|
||||
N_("Tape"),
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -67,11 +67,11 @@ AddRouteDialog::AddRouteDialog ()
|
|||
routes_spinner (routes_adjustment)
|
||||
{
|
||||
if (channel_combo_strings.empty()) {
|
||||
channel_combo_strings = PBD::internationalize (channel_setup_names);
|
||||
channel_combo_strings = I18N (channel_setup_names);
|
||||
}
|
||||
|
||||
if (track_mode_strings.empty()) {
|
||||
track_mode_strings = PBD::internationalize (track_mode_names);
|
||||
track_mode_strings = I18N (track_mode_names);
|
||||
}
|
||||
|
||||
set_name ("AddRouteDialog");
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@ cd `dirname "$0"`/..
|
|||
#export G_DEBUG=fatal_criticals
|
||||
|
||||
export ARDOUR_PATH=gtk2_ardour/icons:gtk2_ardour/pixmaps:gtk2_ardour
|
||||
export GTK_PATH=libs/clearlooks
|
||||
|
||||
|
||||
export LD_LIBRARY_PATH=libs/surfaces/control_protocol:libs/ardour:libs/midi++2:libs/pbd:libs/soundtouch:libs/gtkmm2ext:libs/sigc++2:libs/glibmm2:libs/gtkmm2/atk:libs/gtkmm2/pango:libs/gtkmm2/gdk:libs/gtkmm2/gtk:libs/libgnomecanvasmm:libs/libsndfile:libs/appleutility:$LD_LIBRARY_PATH
|
||||
|
||||
# DYLD_LIBRARY_PATH is for darwin.
|
||||
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
# For the internal clearlooks engine
|
||||
export GTK_PATH=$PWD/libs/clearlooks:~/.ardour2
|
||||
|
||||
# LADSPA_PATH for OSX
|
||||
export LADSPA_PATH=$LADSPA_PATH:/Library/Audio/Plug-Ins/LADSPA
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@
|
|||
|
||||
(gtk_accel_path "<Actions>/Common/goto-editor" "<alt>e")
|
||||
(gtk_accel_path "<Actions>/Common/goto-mixer" "<alt>m")
|
||||
(gtk-accel_path "<Actions>/Common/ToggleSoundFileBrowser" "<alt>f")
|
||||
(gtk-accel_path "<Actions>/Common/ToggleLocations" "<alt>l")
|
||||
(gtk-accel_path "<Actions>/Common/ToggleBigClock" "<alt>b")
|
||||
(gtk-accel_path "<Actions>/Common/ToggleColorManager" "<alt>c")
|
||||
(gtk_accel_path "<Actions>/Common/ToggleSoundFileBrowser" "<alt>f")
|
||||
(gtk_accel_path "<Actions>/Common/ToggleLocations" "<alt>l")
|
||||
(gtk_accel_path "<Actions>/Common/ToggleBigClock" "<alt>b")
|
||||
(gtk_accel_path "<Actions>/Common/ToggleColorManager" "<alt>c")
|
||||
|
||||
(gtk_accel_path "<Actions>/Editor/editor-copy" "<control>c")
|
||||
(gtk_accel_path "<Actions>/Common/Quit" "<control>q")
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
cWaveForm 0.0 0.0 0.0 0.80
|
||||
cMutedWaveForm 0.35 0.35 0.35 1.0
|
||||
cSelectedFrameBase 0.0 0.57 0.66 0.5
|
||||
cFrameBase 0.0 0.76 0.75 0.5
|
||||
cSelectedFrameBase 0.71 0.57 0.66 1.0
|
||||
cFrameBase 0.75 0.75 0.76 1.0
|
||||
cAudioTrackOutline 0.00 0.00 0.00 1.00
|
||||
cAudioTrackBase 0.80 0.80 1.0 0.5
|
||||
cAudioBusBase 0.65 0.65 0.75 0.41
|
||||
cAudioBusBase 0.86 0.82 0.92 0.41
|
||||
cMidiTrackOutline 0.00 0.00 0.00 1.00
|
||||
cMidiTrackBase 1.0 0.85 0.85 0.5
|
||||
cMidiBusBase 0.75 0.65 0.65 0.41
|
||||
cMeterBar 0.40 0.40 0.40 1.0
|
||||
cTempoBar 0.45 0.45 0.45 1.0
|
||||
cMarkerBar 0.50 0.50 0.50 1.0
|
||||
cRangeMarkerBar 0.55 0.55 0.55 1.0
|
||||
cTransportMarkerBar 0.60 0.60 0.60 1.0
|
||||
cMeterBar 0.40 0.40 0.45 1.0
|
||||
cTempoBar 0.45 0.45 0.50 1.0
|
||||
cMarkerBar 0.50 0.50 0.55 1.0
|
||||
cRangeMarkerBar 0.55 0.55 0.59 1.0
|
||||
cTransportMarkerBar 0.60 0.60 0.64 1.0
|
||||
cTimeStretchFill 0.89 0.71 0.71 0.59
|
||||
cTimeStretchOutline 0.39 0.39 0.39 0.59
|
||||
cAutomationLine 0.27 0.74 0.35 1.0
|
||||
|
|
@ -68,8 +68,8 @@ cEnteredAutomationLine 0.87 0.39 0.39 1.00
|
|||
cEnteredMarker 0.87 0.39 0.39 1.00
|
||||
cMeterMarker 0.95 0.26 0.36 1.00
|
||||
cTempoMarker 0.95 0.26 0.36 1.00
|
||||
cMeasureLineBeat 0.55 0.55 0.55 1.00
|
||||
cMeasureLineBar 0.45 0.45 0.45 1.00
|
||||
cMeasureLineBeat 0.40 0.40 0.40 0.50
|
||||
cMeasureLineBar 0.55 0.55 0.60 0.70
|
||||
cGhostTrackBaseOutline 0.00 0.00 0.00 1.00
|
||||
cGhostTrackBaseFill 0.27 0.00 0.49 0.50
|
||||
cImageTrackBase 0.87 0.87 0.85 1.00
|
||||
|
|
|
|||
|
|
@ -131,9 +131,31 @@
|
|||
<menuitem action='zoom-focus-playhead'/>
|
||||
<menuitem action='zoom-focus-edit'/>
|
||||
</menu>
|
||||
<menu name='SnapMode' action='SnapMode'>
|
||||
<menuitem action='snap-normal'/>
|
||||
<menuitem action='snap-magnetic'/>
|
||||
</menu>
|
||||
<menu name='SnapTo' action='SnapTo'>
|
||||
<menuitem action='snap-to-beat'/>
|
||||
<menuitem action='snap-to-bar'/>
|
||||
<menuitem action='snap-to-frame'/>
|
||||
<menuitem action='snap-to-cd-frame'/>
|
||||
<menuitem action='snap-to-smpte-frame'/>
|
||||
<menuitem action='snap-to-smpte-seconds'/>
|
||||
<menuitem action='snap-to-smpte-minutes'/>
|
||||
<menuitem action='snap-to-seconds'/>
|
||||
<menuitem action='snap-to-minutes'/>
|
||||
<menuitem action='snap-to-thirtyseconds'/>
|
||||
<menuitem action='snap-to-asixteenthbeat'/>
|
||||
<menuitem action='snap-to-eighths'/>
|
||||
<menuitem action='snap-to-quarters'/>
|
||||
<menuitem action='snap-to-thirds'/>
|
||||
<menuitem action='snap-to-beat'/>
|
||||
<menuitem action='snap-to-bar'/>
|
||||
<menuitem action='snap-to-mark'/>
|
||||
<menuitem action='snap-to-edit-cursor'/>
|
||||
<menuitem action='snap-to-region-start'/>
|
||||
<menuitem action='snap-to-region-end'/>
|
||||
<menuitem action='snap-to-region-sync'/>
|
||||
<menuitem action='snap-to-region-boundary'/>
|
||||
</menu>
|
||||
<menu name='MeterFalloff' action='MeterFalloff'>
|
||||
<menuitem action='MeterFalloffOff'/>
|
||||
|
|
@ -194,7 +216,6 @@
|
|||
<menuitem action='ToggleOptionsEditor'/>
|
||||
<menuitem action='ToggleSoundFileBrowser'/>
|
||||
<menuitem action='ToggleInspector'/>
|
||||
<menuitem action='ToggleConnections'/>
|
||||
<menuitem action='ToggleLocations'/>
|
||||
<menuitem action='ToggleColorManager'/>
|
||||
<menuitem action='ToggleBigClock'/>
|
||||
|
|
@ -214,7 +235,7 @@
|
|||
<menuitem action='FileHeaderFormatCAF'/>
|
||||
</menu>
|
||||
</menu>
|
||||
<menu action='SMPTE'>
|
||||
<menu action='Timecode'>
|
||||
<menuitem action='Smpte23976'/>
|
||||
<menuitem action='Smpte24'/>
|
||||
<menuitem action='Smpte24976'/>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
export GTK_PATH=%INSTALL_PREFIX%/lib/ardour2:$GTK_PATH
|
||||
|
||||
export LD_LIBRARY_PATH=%INSTALL_PREFIX%/lib/ardour2:$LD_LIBRARY_PATH
|
||||
# DYLD_LIBRARY_PATH is for Darwin
|
||||
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ style "default_base" = "medium_text"
|
|||
GtkButton::button_relief = GTK_RELIEF_NONE
|
||||
GtkTreeView::vertical-padding = 0
|
||||
GtkTreeView::horizontal-padding = 0
|
||||
GtkTreeView::even-row-color = { 0, 0, 0 }
|
||||
GtkTreeView::odd-row-color = { 0, 0, 0 }
|
||||
|
||||
fg[NORMAL] = { 0.80, 0.80, 0.80 }
|
||||
fg[ACTIVE] = { 0.80, 0.80, 0.80 }
|
||||
|
|
@ -93,8 +95,8 @@ style "default_base" = "medium_text"
|
|||
fg[INSENSITIVE] = { 0.80, 0.80, 0.80 }
|
||||
fg[SELECTED] = { 0.80, 0.80, 0.80 }
|
||||
|
||||
bg[NORMAL] = { 0.40, 0.41, 0.41 }
|
||||
bg[ACTIVE] = { 0.40, 0.41, 0.41 }
|
||||
bg[NORMAL] = { 0.35, 0.35, 0.40 }
|
||||
bg[ACTIVE] = { 0.35, 0.35, 0.40 }
|
||||
bg[PRELIGHT] = "#565690"
|
||||
bg[INSENSITIVE] = { 0.10, 0.10, 0.10 }
|
||||
bg[SELECTED] = { 0, 0.40, 0.60 }
|
||||
|
|
@ -105,24 +107,25 @@ style "default_base" = "medium_text"
|
|||
text[INSENSITIVE] = { 0.80, 0.80, 0.80}
|
||||
text[SELECTED] = { 1.0, 1.0, 1.0 }
|
||||
|
||||
base[ACTIVE] = "#2f272f"
|
||||
base[NORMAL] = "#1c1e21"
|
||||
base[ACTIVE] = "#272a2f"
|
||||
base[NORMAL] = "#1a1e20"
|
||||
base[PRELIGHT] = { 0.20, 0.20, 0.20 }
|
||||
base[INSENSITIVE] = "#4c5159"
|
||||
base[SELECTED] = { 0.25, 0.25, 0.25 }
|
||||
|
||||
engine "clearlooks" {
|
||||
|
||||
engine "clearlooks"
|
||||
{
|
||||
menubarstyle = 0 # 0 = flat, 1 = sunken, 2 = flat gradient
|
||||
menuitemstyle = 0 # 0 = flat, 1 = 3d-ish (gradient), 2 = 3d-ish (button)
|
||||
listviewitemstyle = 0 # 0 = flat, 1 = 3d-ish (gradient)
|
||||
progressbarstyle = 0 # 0 = candy bar, 1 = flat
|
||||
progressbarstyle = 1 # 0 = candy bar, 1 = fancy candy bar, 2 = flat
|
||||
}
|
||||
}
|
||||
|
||||
style "base_frame"
|
||||
{
|
||||
fg[NORMAL] = { 0.80, 0.80, 0.80 }
|
||||
bg[NORMAL] = { 0.40, 0.40, 0.40 }
|
||||
bg[NORMAL] = { 0.35, 0.35, 0.40 }
|
||||
}
|
||||
|
||||
style "transport_base" = "medium_bold_text"
|
||||
|
|
@ -136,8 +139,8 @@ style "transport_base" = "medium_bold_text"
|
|||
/*
|
||||
style "black_mackie_menu_bar" = "medium_bold_text"
|
||||
{
|
||||
fg[NORMAL] = { 1.0, 1.0, 1.0 }
|
||||
bg[NORMAL] = { 0, 0, 0 }
|
||||
fg[NORMAL] = { 1.0, 1.0, 1.0 }
|
||||
bg[NORMAL] = { 0, 0, 0 }
|
||||
}
|
||||
*/
|
||||
style "default_buttons_menus"
|
||||
|
|
@ -145,11 +148,11 @@ style "default_buttons_menus"
|
|||
font_name = "sans 8"
|
||||
fg[ACTIVE] = { 1.0, 1.0, 1.0 }
|
||||
|
||||
bg[NORMAL] = { 0.35, 0.35, 0.35 }
|
||||
bg[NORMAL] = { 0.30, 0.30, 0.35 }
|
||||
bg[ACTIVE] = "#565690"
|
||||
bg[PRELIGHT] = { 0.20, 0.20, 0.20 }
|
||||
bg[INSENSITIVE] = { 0.20, 0.20, 0.20 }
|
||||
bg[SELECTED] = { 0.20, 0.20, 0.20 }
|
||||
bg[PRELIGHT] = { 0.15, 0.15, 0.20 }
|
||||
bg[INSENSITIVE] = { 0.15, 0.15, 0.20 }
|
||||
bg[SELECTED] = { 0.15, 0.15, 0.20 }
|
||||
}
|
||||
|
||||
style "very_small_button" = "default_buttons_menus"
|
||||
|
|
@ -203,6 +206,15 @@ style "solo_button" = "small_button"
|
|||
fg[ACTIVE] = { 0, 0, 0 }
|
||||
}
|
||||
|
||||
style "safe_solo_button" = "small_button"
|
||||
{
|
||||
bg[PRELIGHT] = { 0, 1.0, 0 }
|
||||
bg[ACTIVE] = { 0.19, 0.97, 0.69 }
|
||||
|
||||
fg[PRELIGHT] = { 0, 0, 0 }
|
||||
fg[ACTIVE] = { 0, 0, 0 }
|
||||
}
|
||||
|
||||
style "mixer_solo_button" = "solo_button"
|
||||
{
|
||||
font_name = "sans 7"
|
||||
|
|
@ -211,6 +223,14 @@ style "mixer_solo_button" = "solo_button"
|
|||
|
||||
}
|
||||
|
||||
style "mixer_safe_solo_button" = "safe_solo_button"
|
||||
{
|
||||
font_name = "sans 7"
|
||||
xthickness = 0
|
||||
ythickness = 0
|
||||
|
||||
}
|
||||
|
||||
|
||||
style "mute_button" = "small_button"
|
||||
{
|
||||
|
|
@ -248,8 +268,8 @@ style "mixer_red_active_button" = "very_small_button"
|
|||
fg[ACTIVE] = { 0, 1.0, 1.0 }
|
||||
bg[ACTIVE] = { 0.7, 0, 0 }
|
||||
|
||||
base[INSENSITIVE] = { 0.21, 0.21, 0.21 }
|
||||
bg[INSENSITIVE] = { 0.21, 0.21, 0.21 }
|
||||
base[INSENSITIVE] = { 0.16, 0.16, 0.21 }
|
||||
bg[INSENSITIVE] = { 0.16, 0.16, 0.21 }
|
||||
}
|
||||
|
||||
style "time_button" = "default_buttons_menus"
|
||||
|
|
@ -277,10 +297,10 @@ style "shuttle_control" = "very_small_text"
|
|||
fg[SELECTED] = { 0.85, 0.92, 0.98 }
|
||||
fg[INSENSITIVE] = { 0.85, 0.92, 0.98 }
|
||||
|
||||
bg[NORMAL] = { 0.31, 0.31, 0.31 }
|
||||
bg[PRELIGHT] = { 0.31, 0.31, 0.31 }
|
||||
bg[INSENSITIVE] = { 0.31, 0.31, 0.31 }
|
||||
bg[ACTIVE] = { 0.50, 1.0, 0.50 }
|
||||
bg[NORMAL] = { 0.26, 0.26, 0.31 }
|
||||
bg[PRELIGHT] = { 0.26, 0.26, 0.31 }
|
||||
bg[INSENSITIVE] = { 0.26, 0.26, 0.31 }
|
||||
bg[ACTIVE] = { 0.70, 0.70, 0.70 }
|
||||
bg[SELECTED] = { 1.0, 0.04, 0.04 }
|
||||
}
|
||||
|
||||
|
|
@ -305,20 +325,20 @@ style "options_window" = "default_base"
|
|||
|
||||
style "option_entry" = "default_base"
|
||||
{
|
||||
fg[NORMAL] = { 0.50, 1.0, 1.0 }
|
||||
fg[ACTIVE] = { 0.50, 1.0, 1.0 }
|
||||
fg[NORMAL] = { 1.0, 1.0, 1.0 }
|
||||
fg[ACTIVE] = { 1.0, 1.0, 1.0 }
|
||||
fg[INSENSITIVE] = { 0.80, 0.80, 0.80 }
|
||||
|
||||
base[INSENSITIVE] = { 0.12, 0.12, 0.12 }
|
||||
base[INSENSITIVE] = { 0.07, 0.07, 0.12 }
|
||||
|
||||
bg[NORMAL] = { 0.40, 0.40, 0.40 }
|
||||
bg[ACTIVE] = { 0.40, 0.40, 0.40 }
|
||||
bg[NORMAL] = { 0.35, 0.35, 0.40 }
|
||||
bg[ACTIVE] = { 0.35, 0.35, 0.40 }
|
||||
}
|
||||
|
||||
style "red_when_active" = "medium_text"
|
||||
{
|
||||
fg[NORMAL] = { 0.80, 0.80, 0.80 }
|
||||
bg[NORMAL] = { 0.31, 0.31, 0.31 }
|
||||
bg[NORMAL] = { 0.26, 0.26, 0.31 }
|
||||
|
||||
fg[ACTIVE] = { 0.80, 0.80, 0.80 }
|
||||
bg[ACTIVE] = { 1.0, 0, 0}
|
||||
|
|
@ -338,13 +358,13 @@ style "xrun_warn"
|
|||
bg[ACTIVE] = { 0.09, 1.0, 0.46 }
|
||||
}
|
||||
/*
|
||||
style "menu_bar_base"
|
||||
style "menu_bar_base" = "default_base"
|
||||
{
|
||||
bg[NORMAL] = { 0, 0, 0 }
|
||||
bg[ACTIVE] = { 0, 0, 0 }
|
||||
bg[PRELIGHT] = { 0, 0, 0 }
|
||||
bg[INSENSITIVE] = { 0, 0, 0 }
|
||||
bg[SELECTED] = { 0, 0, 0 }
|
||||
bg[NORMAL] = { 0.2, 0.2, 0.3 }
|
||||
bg[ACTIVE] = { 0, 0, 0 }
|
||||
bg[PRELIGHT] = { 0, 0, 0 }
|
||||
bg[INSENSITIVE] = { 0, 0, 0 }
|
||||
bg[SELECTED] = { 0, 0, 0 }
|
||||
}
|
||||
*/
|
||||
style "fatal_message" = "medium_text"
|
||||
|
|
@ -389,15 +409,15 @@ style "warning_message" = "medium_text"
|
|||
|
||||
style "medium_entry" = "medium_text"
|
||||
{
|
||||
fg[NORMAL] = { 0.50, 1.0, 1.0 }
|
||||
fg[ACTIVE] = { 0.50, 1.0, 1.0 }
|
||||
fg[SELECTED] = { 0.50, 1.0, 0.50 }
|
||||
fg[NORMAL] = { 0.70, 0.70, 0.70 }
|
||||
fg[ACTIVE] = { 0.70, 0.70, 0.70 }
|
||||
fg[SELECTED] = { 1.0, 1.0, 1.0 }
|
||||
|
||||
bg[NORMAL] = { 0.40, 0.40, 0.40 }
|
||||
bg[NORMAL] = { 0.35, 0.35, 0.40 }
|
||||
|
||||
base[NORMAL] = { 0, 0, 0 }
|
||||
base[ACTIVE] = { 0, 0, 0 }
|
||||
base[SELECTED] = { 0.5, 0.5, 1.0 }
|
||||
base[SELECTED] = { 0.70, 0.70, 0.70 }
|
||||
}
|
||||
|
||||
style "medium_entry_noselection_fg" = "medium_entry"
|
||||
|
|
@ -407,15 +427,15 @@ style "medium_entry_noselection_fg" = "medium_entry"
|
|||
|
||||
style "medium_entry_noselection_bg" = "medium_entry"
|
||||
{
|
||||
bg[SELECTED] = { 0.50, 1.0, 1.0 }
|
||||
bg[SELECTED] = { 1.0, 1.0, 1.0 }
|
||||
}
|
||||
|
||||
style "medium_bold_entry" = "medium_bold_text"
|
||||
{
|
||||
fg[NORMAL] = { 0.50, 1.0, 1.0 }
|
||||
fg[ACTIVE] = { 0.50, 1.0, 1.0 }
|
||||
fg[NORMAL] = { 0.70, 0.70, 0.70 }
|
||||
fg[ACTIVE] = { 0.70, 0.70, 0.70 }
|
||||
|
||||
bg[NORMAL] = { 0.40, 0.40, 0.40 }
|
||||
bg[NORMAL] = { 0.35, 0.35, 0.40 }
|
||||
|
||||
base[NORMAL] = { 0, 0, 0 }
|
||||
base[ACTIVE] = { 0, 0, 0 }
|
||||
|
|
@ -425,8 +445,8 @@ style "medium_bold_entry" = "medium_bold_text"
|
|||
|
||||
style "small_entry" = "small_text"
|
||||
{
|
||||
fg[NORMAL] = { 0.50, 1.0, 1.0 }
|
||||
fg[ACTIVE] = { 0.50, 1.0, 1.0 }
|
||||
fg[NORMAL] = { 0.70, 0.70, 0.70 }
|
||||
fg[ACTIVE] = { 0.70, 0.70, 0.70 }
|
||||
bg[NORMAL] = { 0.0, 0.0, 0.0 }
|
||||
base[NORMAL] = { 0, 0, 0 }
|
||||
base[ACTIVE] = { 0, 0, 0 }
|
||||
|
|
@ -441,10 +461,10 @@ style "red_active_small_entry" = "small_entry"
|
|||
|
||||
style "small_bold_entry" = "small_bold_text"
|
||||
{
|
||||
fg[NORMAL] = { 0.50, 1.0, 1.0 }
|
||||
fg[ACTIVE] = { 0.50, 1.0, 1.0 }
|
||||
fg[NORMAL] = { 0.70, 0.70, 0.70 }
|
||||
fg[ACTIVE] = { 0.70, 0.70, 0.70 }
|
||||
|
||||
bg[NORMAL] = { 0.40, 0.40, 0.40 }
|
||||
bg[NORMAL] = { 0.35, 0.35, 0.40 }
|
||||
|
||||
base[NORMAL] = { 0, 0, 0 }
|
||||
base[ACTIVE] = { 0, 0, 0 }
|
||||
|
|
@ -523,7 +543,7 @@ style "audio_track_base" = "default_base"
|
|||
{
|
||||
font_name = "sans 6"
|
||||
fg[NORMAL] = { 0.77, 0.77, 0.72 }
|
||||
bg[NORMAL] = { 0.32, 0.32, 0.45 }
|
||||
bg[NORMAL] = { 0.18, 0.19, 0.22 }
|
||||
bg[ACTIVE] = { 0.20, 0.20, 0.20 }
|
||||
bg[PRELIGHT] = { 0.20, 0.20, 0.20 }
|
||||
bg[INSENSITIVE] = { 0.20, 0.20, 0.20 }
|
||||
|
|
@ -534,8 +554,9 @@ style "midi_bus_base"
|
|||
{
|
||||
font_name = "sans 6"
|
||||
fg[NORMAL] = { 0.77, 0.77, 0.72 }
|
||||
fg[NORMAL] = { 0.8, 0.7, 0.2 }
|
||||
bg[NORMAL] = { 0.26, 0.20, 0.20 }
|
||||
fg[NORMAL] = { 0.7, 0.8, 0.2 }
|
||||
#bg[NORMAL] = {0, 0.36, 0.40 }
|
||||
bg[NORMAL] = "#444466"
|
||||
}
|
||||
|
||||
style "midi_track_base" = "default_base"
|
||||
|
|
@ -570,7 +591,7 @@ style "active_track_name_display"
|
|||
|
||||
style "track_separator"
|
||||
{
|
||||
bg[NORMAL] = { 0.40, 0.40, 0.40 }
|
||||
bg[NORMAL] = { 0.35, 0.35, 0.40 }
|
||||
}
|
||||
|
||||
#
|
||||
|
|
@ -626,7 +647,7 @@ style "region_list_display" = "small_bold_text"
|
|||
{
|
||||
fg[NORMAL] = { 0.80, 0.80, 0.80 }
|
||||
fg[ACTIVE] = { 0.80, 0.80, 0.80 }
|
||||
fg[SELECTED] = { 0.50, 1.0, 1.0 }
|
||||
fg[SELECTED] = { 0.70, 0.70, 0.70 }
|
||||
bg[NORMAL] = { 0, 0, 0 }
|
||||
bg[ACTIVE] = { 0, 0, 0 }
|
||||
bg[SELECTED] = { 0, 0, 0 }
|
||||
|
|
@ -638,11 +659,11 @@ style "region_list_display" = "small_bold_text"
|
|||
|
||||
style "main_canvas_area"
|
||||
{
|
||||
bg[NORMAL] = { 0.38, 0.38, 0.38 }
|
||||
bg[ACTIVE] = { 0.38, 0.38, 0.38 }
|
||||
bg[INSENSITIVE] = { 0.38, 0.38, 0.38 }
|
||||
bg[SELECTED] = { 0.38, 0.38, 0.38 }
|
||||
bg[PRELIGHT] = { 0.38, 0.38, 0.38 }
|
||||
bg[NORMAL] = { 0.20, 0.20, 0.25 }
|
||||
bg[ACTIVE] = { 0.20, 0.20, 0.25 }
|
||||
bg[INSENSITIVE] = { 0.20, 0.20, 0.25 }
|
||||
bg[SELECTED] = { 0.20, 0.20, 0.25 }
|
||||
bg[PRELIGHT] = { 0.20, 0.20, 0.25 }
|
||||
}
|
||||
|
||||
style "track_controls_inactive"
|
||||
|
|
@ -685,7 +706,7 @@ style "plugin_slider"
|
|||
|
||||
fg[NORMAL] = { 0.37, 0.43, 0.52 }
|
||||
fg[ACTIVE] = { 0.37, 0.43, 0.52 }
|
||||
fg[INSENSITIVE] = {0.40, 0.40, 0.40 } # matches default_base
|
||||
fg[INSENSITIVE] = {0.35, 0.35, 0.40 } # matches default_base
|
||||
fg[SELECTED] = { 0.37, 0.43, 0.52 }
|
||||
fg[PRELIGHT] = { 0.37, 0.43, 0.52 }
|
||||
|
||||
|
|
@ -736,7 +757,7 @@ style "redirect_list_display"
|
|||
|
||||
font_name = "sans 7"
|
||||
text[NORMAL] = { 0.80, 0.80, 0.80 }
|
||||
text[ACTIVE] = { 0.5, 0.5, 0.9 }
|
||||
text[ACTIVE] = { 0.70, 0.70, 0.70 }
|
||||
text[INSENSITIVE] = { 0, 0, 0 }
|
||||
text[SELECTED] = { 0.9, 0.3, 0.3 }
|
||||
|
||||
|
|
@ -749,7 +770,7 @@ style "redirect_list_display"
|
|||
# text
|
||||
|
||||
fg[NORMAL] = { 0.5, 0.5, 0.5 } # used for inactive
|
||||
fg[ACTIVE] = { 0.5, 1.0, 1.0 } # used for active
|
||||
fg[ACTIVE] = { 1.0, 1.0, 1.0 } # used for active
|
||||
}
|
||||
|
||||
style "inspector_redirect_list_display" = "redirect_list_display"
|
||||
|
|
@ -768,12 +789,6 @@ style "pan_zone" = "default_base"
|
|||
fg[ACTIVE] = { 0.95, 0.48, 0.11 }
|
||||
}
|
||||
|
||||
style "wall_clock" = "medium_bold_text"
|
||||
{
|
||||
fg[NORMAL] = { 1.0, 1.0, 1.0 }
|
||||
bg[NORMAL] = { 0, 0, 0 }
|
||||
}
|
||||
|
||||
style "paler_red_when_active" = "medium_text"
|
||||
{
|
||||
fg[NORMAL] = { 0.80, 0.80, 0.80 }
|
||||
|
|
@ -812,31 +827,85 @@ style "selected_strip_frame"
|
|||
style "flashing_alert" = "very_small_text"
|
||||
{
|
||||
fg[NORMAL] = { 0.80, 0.80, 0.80 }
|
||||
bg[NORMAL] = { 0.31, 0.31, 0.31 }
|
||||
bg[NORMAL] = { 0.26, 0.26, 0.31 }
|
||||
|
||||
fg[ACTIVE] = { 0.80, 0.80, 0.80 }
|
||||
bg[ACTIVE] = { 1.0, 0, 0}
|
||||
}
|
||||
|
||||
style "selected_io_selector_port_list" = "medium_text"
|
||||
style "selected_io_selector_port_list" = "medium_bold_text"
|
||||
{
|
||||
fg[NORMAL] = { 0.50, 1.0, 1.0 }
|
||||
fg[SELECTED] = { 0.50, 1.0, 1.0 }
|
||||
base[NORMAL] = { 0, 0, 0 }
|
||||
base[SELECTED] = { 0, 0, 0 }
|
||||
|
||||
GtkTreeView::even-row-color = { 0.64, 0.68, 0.54 }
|
||||
GtkTreeView::odd-row-color = { 0.64, 0.68, 0.54 }
|
||||
|
||||
# fg is used to color the fg (text) of the column header button
|
||||
|
||||
fg[NORMAL] = { 0.80, 0.80, 0.70 }
|
||||
fg[SELECTED] = { 0.80, 0.80, 0.70 }
|
||||
fg[ACTIVE] = { 0.80, 0.80, 0.70 }
|
||||
fg[PRELIGHT] = { 0.80, 0.80, 0.70 }
|
||||
fg[INSENSITIVE] = { 0.80, 0.80, 0.70 }
|
||||
|
||||
# bg is used used to color the background of the column header button
|
||||
|
||||
bg[NORMAL] = { 0.30, 0.30, 0.35 }
|
||||
bg[ACTIVE] = { 0.30, 0.30, 0.35 }
|
||||
bg[PRELIGHT] = { 0.30, 0.30, 0.35 }
|
||||
bg[INSENSITIVE] = { 0.30, 0.30, 0.35 }
|
||||
bg[SELECTED] = { 0.30, 0.30, 0.35 }
|
||||
|
||||
# text is used to color the treeview row text
|
||||
|
||||
text[NORMAL] = { 0.80, 0.80, 0.70 }
|
||||
text[SELECTED] = { 0.80, 0.80, 0.70 }
|
||||
|
||||
# base is used to color a treeview with no rows
|
||||
|
||||
base[NORMAL] = { 0.64, 0.68, 0.54 }
|
||||
base[ACTIVE] = { 0.64, 0.68, 0.54 }
|
||||
base[PRELIGHT] = { 0.64, 0.68, 0.54 }
|
||||
base[INSENSITIVE] = { 0.64, 0.68, 0.54 }
|
||||
base[SELECTED] = { 0.64, 0.68, 0.54 }
|
||||
|
||||
}
|
||||
|
||||
style "io_selector_port_list" = "medium_text"
|
||||
{
|
||||
fg[NORMAL] = {0.80, 0.80, 0.70 }
|
||||
fg[SELECTED] = {0.80, 0.80, 0.70 }
|
||||
base[NORMAL] = { 0.26, 0.26, 0.26 }
|
||||
base[SELECTED] = { 0.26, 0.26, 0.26 }
|
||||
|
||||
# fg is used to color the fg (text) of the column header button
|
||||
|
||||
fg[NORMAL] = { 0.80, 0.80, 0.70 }
|
||||
fg[SELECTED] = { 0.80, 0.80, 0.70 }
|
||||
fg[ACTIVE] = { 0.80, 0.80, 0.70 }
|
||||
fg[PRELIGHT] = { 0.80, 0.80, 0.70 }
|
||||
fg[INSENSITIVE] = { 0.80, 0.80, 0.70 }
|
||||
|
||||
# bg is used used to color the background of the column header button
|
||||
|
||||
bg[NORMAL] = { 0.30, 0.30, 0.35 }
|
||||
bg[ACTIVE] = { 0.30, 0.30, 0.35 }
|
||||
bg[PRELIGHT] = { 0.30, 0.30, 0.35 }
|
||||
bg[INSENSITIVE] = { 0.30, 0.30, 0.35 }
|
||||
bg[SELECTED] = { 0.30, 0.30, 0.35 }
|
||||
|
||||
# text is used to color the treeview row text
|
||||
|
||||
text[NORMAL] = { 0.80, 0.80, 0.70 }
|
||||
text[SELECTED] = { 0.80, 0.80, 0.70 }
|
||||
|
||||
# base is used to color a treeview with no rows
|
||||
|
||||
base[NORMAL] = { 0, 0, 0 }
|
||||
base[ACTIVE] = { 0, 0, 0 }
|
||||
base[PRELIGHT] = { 0, 0, 0 }
|
||||
base[INSENSITIVE] = { 0, 0, 0 }
|
||||
base[SELECTED] = { 0, 0, 0 }
|
||||
}
|
||||
|
||||
style "io_selector_notebook" = "default_base"
|
||||
{
|
||||
fg[NORMAL] = { 0.50, 1.0, 1.0 }
|
||||
fg[NORMAL] = { 1.0, 1.0, 1.0 }
|
||||
font_name ="sans bold 8"
|
||||
}
|
||||
|
||||
|
|
@ -880,11 +949,11 @@ style "pan_slider"
|
|||
bg[SELECTED] = { 0, 0, 0 }
|
||||
bg[PRELIGHT] = { 0, 0, 0 }
|
||||
|
||||
text[NORMAL] = { 0.85, 0.92, 0.98 }
|
||||
text[ACTIVE] = { 0.85, 0.92, 0.98 }
|
||||
text[INSENSITIVE] = { 0.85, 0.92, 0.98 }
|
||||
text[SELECTED] = { 0.85, 0.92, 0.98 }
|
||||
text[PRELIGHT] = { 0.85, 0.92, 0.98 }
|
||||
text[NORMAL] = { 0.70, 0.70, 0.70 }
|
||||
text[ACTIVE] = { 0.70, 0.70, 0.70 }
|
||||
text[INSENSITIVE] = { 0.70, 0.70, 0.70 }
|
||||
text[SELECTED] = { 0.70, 0.70, 0.70 }
|
||||
text[PRELIGHT] = { 0.70, 0.70, 0.70 }
|
||||
}
|
||||
|
||||
style "region_list_whole_file"
|
||||
|
|
@ -966,8 +1035,8 @@ widget "*EditorTimeButton*" style "time_button"
|
|||
widget "*EditorMixerButton*" style "default_buttons_menus"
|
||||
widget "*SoloButton*" style "solo_button"
|
||||
widget "*SoloButton.*" style "solo_button"
|
||||
widget "*SafeSoloButton*" style "solo_button"
|
||||
widget "*SafeSoloButton.*" 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"
|
||||
|
|
@ -1116,8 +1185,6 @@ widget "*MixerTrackDisplayList" style "track_list_display"
|
|||
widget "*MixerSnapshotDisplayList" style "track_list_display"
|
||||
widget "*MixerAuxDisplayList" style "track_list_display"
|
||||
widget "*MixerGroupList" style "track_list_display"
|
||||
/*widget "*WallClock" style "wall_clock"
|
||||
widget "*CPULoad" style "wall_clock"*/
|
||||
widget "*RegionEditorLabel" style "medium_text"
|
||||
widget "*RegionEditorSmallLabel" style "small_text"
|
||||
widget "*RegionEditorEntry" style "medium_entry"
|
||||
|
|
@ -1151,7 +1218,9 @@ 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"
|
||||
|
|
|
|||
|
|
@ -542,11 +542,11 @@ ARDOUR_UI::update_buffer_load ()
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::count_recenabled_diskstreams (Route& route)
|
||||
ARDOUR_UI::count_recenabled_streams (Route& route)
|
||||
{
|
||||
Track* track = dynamic_cast<Track*>(&route);
|
||||
if (track && track->diskstream()->record_enabled()) {
|
||||
rec_enabled_diskstreams++;
|
||||
rec_enabled_streams += track->n_inputs().get_total();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -568,11 +568,11 @@ ARDOUR_UI::update_disk_space()
|
|||
int secs;
|
||||
nframes_t fr = session->frame_rate();
|
||||
|
||||
rec_enabled_diskstreams = 0;
|
||||
session->foreach_route (this, &ARDOUR_UI::count_recenabled_diskstreams);
|
||||
rec_enabled_streams = 0;
|
||||
session->foreach_route (this, &ARDOUR_UI::count_recenabled_streams);
|
||||
|
||||
if (rec_enabled_diskstreams) {
|
||||
frames /= rec_enabled_diskstreams;
|
||||
if (rec_enabled_streams) {
|
||||
frames /= rec_enabled_streams;
|
||||
}
|
||||
|
||||
hrs = frames / (fr * 3600);
|
||||
|
|
@ -1038,7 +1038,7 @@ ARDOUR_UI::transport_stop ()
|
|||
return;
|
||||
}
|
||||
|
||||
if (Config->get_auto_loop()) {
|
||||
if (session->get_play_loop ()) {
|
||||
session->request_play_loop (false);
|
||||
}
|
||||
|
||||
|
|
@ -1092,7 +1092,7 @@ ARDOUR_UI::transport_roll ()
|
|||
|
||||
rolling = session->transport_rolling ();
|
||||
|
||||
if (Config->get_auto_loop()) {
|
||||
if (session->get_play_loop()) {
|
||||
session->request_play_loop (false);
|
||||
auto_loop_button.set_active (false);
|
||||
roll_button.set_active (true);
|
||||
|
|
@ -1110,7 +1110,7 @@ void
|
|||
ARDOUR_UI::transport_loop()
|
||||
{
|
||||
if (session) {
|
||||
if (Config->get_auto_loop()) {
|
||||
if (session->get_play_loop()) {
|
||||
if (session->transport_rolling()) {
|
||||
Location * looploc = session->locations()->auto_loop_location();
|
||||
if (looploc) {
|
||||
|
|
@ -1269,7 +1269,6 @@ ARDOUR_UI::engine_stopped ()
|
|||
ActionManager::set_sensitive (ActionManager::jack_opposite_sensitive_actions, true);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ARDOUR_UI::engine_running ()
|
||||
{
|
||||
|
|
@ -1471,7 +1470,6 @@ ARDOUR_UI::snapshot_session ()
|
|||
|
||||
prompter.set_name ("Prompter");
|
||||
prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
|
||||
prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
|
||||
prompter.set_prompt (_("Name of New Snapshot"));
|
||||
prompter.set_initial_text (now);
|
||||
|
||||
|
|
@ -1621,7 +1619,6 @@ ARDOUR_UI::save_template ()
|
|||
prompter.set_prompt (_("Name for mix template:"));
|
||||
prompter.set_initial_text(session->name() + _("-template"));
|
||||
prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
|
||||
prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
|
||||
|
||||
switch (prompter.run()) {
|
||||
case RESPONSE_ACCEPT:
|
||||
|
|
@ -1646,18 +1643,25 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
|
|||
int response = Gtk::RESPONSE_NONE;
|
||||
|
||||
new_session_dialog->set_modal(true);
|
||||
new_session_dialog->set_name(predetermined_path);
|
||||
new_session_dialog->set_name (predetermined_path);
|
||||
new_session_dialog->reset_recent();
|
||||
new_session_dialog->show();
|
||||
|
||||
do {
|
||||
response = new_session_dialog->run ();
|
||||
|
||||
_session_is_new = false;
|
||||
|
||||
if(response == Gtk::RESPONSE_CANCEL || response == Gtk::RESPONSE_DELETE_EVENT) {
|
||||
quit();
|
||||
if (response == Gtk::RESPONSE_CANCEL || response == Gtk::RESPONSE_DELETE_EVENT) {
|
||||
|
||||
if (!session) {
|
||||
quit();
|
||||
}
|
||||
new_session_dialog->hide ();
|
||||
return;
|
||||
|
||||
} else if (response == Gtk::RESPONSE_NONE) {
|
||||
|
||||
/* Clear was pressed */
|
||||
new_session_dialog->reset();
|
||||
|
||||
|
|
@ -1709,8 +1713,6 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
|
|||
|
||||
} else {
|
||||
|
||||
_session_is_new = true;
|
||||
|
||||
if (session_name.empty()) {
|
||||
response = Gtk::RESPONSE_NONE;
|
||||
continue;
|
||||
|
|
@ -1726,14 +1728,43 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
|
|||
} else {
|
||||
|
||||
session_path = new_session_dialog->session_folder();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//XXX This is needed because session constructor wants a
|
||||
//non-existant path. hopefully this will be fixed at some point.
|
||||
|
||||
session_path = Glib::build_filename (session_path, session_name);
|
||||
|
||||
if (g_file_test (session_path.c_str(), GFileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
|
||||
|
||||
Glib::ustring str = string_compose (_("This session\n%1\nalready exists. Do you want to open it?"), session_path);
|
||||
|
||||
MessageDialog msg (str,
|
||||
false,
|
||||
Gtk::MESSAGE_WARNING,
|
||||
Gtk::BUTTONS_YES_NO,
|
||||
true);
|
||||
|
||||
|
||||
msg.set_name (X_("CleanupDialog"));
|
||||
msg.set_wmclass (_("existing_session"), "Ardour");
|
||||
msg.set_position (Gtk::WIN_POS_MOUSE);
|
||||
|
||||
switch (msg.run()) {
|
||||
case RESPONSE_YES:
|
||||
load_session (session_path, session_name);
|
||||
goto done;
|
||||
break;
|
||||
default:
|
||||
response = RESPONSE_NONE;
|
||||
new_session_dialog->reset ();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
_session_is_new = true;
|
||||
|
||||
std::string template_name = new_session_dialog->session_template_name();
|
||||
|
||||
if (new_session_dialog->use_session_template()) {
|
||||
|
|
@ -1793,6 +1824,7 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
|
|||
|
||||
} while (response == Gtk::RESPONSE_NONE);
|
||||
|
||||
done:
|
||||
show();
|
||||
new_session_dialog->get_window()->set_cursor();
|
||||
new_session_dialog->hide();
|
||||
|
|
@ -1844,6 +1876,9 @@ This prevents the session from being loaded."));
|
|||
Config->set_current_owner (ConfigVariableBase::Interface);
|
||||
|
||||
session_loaded = true;
|
||||
|
||||
goto_editor_window ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1911,10 +1946,6 @@ ARDOUR_UI::show ()
|
|||
|
||||
shown_flag = true;
|
||||
}
|
||||
|
||||
if (about) {
|
||||
about->present ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1922,8 +1953,16 @@ ARDOUR_UI::show_splash ()
|
|||
{
|
||||
if (about == 0) {
|
||||
about = new About();
|
||||
about->signal_response().connect(mem_fun (*this, &ARDOUR_UI::about_signal_response) );
|
||||
}
|
||||
about->present();
|
||||
flush_pending ();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::about_signal_response(int response)
|
||||
{
|
||||
hide_splash();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1947,7 +1986,7 @@ ARDOUR_UI::display_cleanup_results (Session::cleanup_report& rep, const gchar* l
|
|||
_("No audio files were ready for cleanup"),
|
||||
true,
|
||||
Gtk::MESSAGE_INFO,
|
||||
(Gtk::ButtonsType)(Gtk::BUTTONS_CLOSE) );
|
||||
(Gtk::ButtonsType)(Gtk::BUTTONS_OK) );
|
||||
msgd.set_secondary_text (_("If this seems suprising, \n\
|
||||
check for any existing snapshots.\n\
|
||||
These may still include regions that\n\
|
||||
|
|
|
|||
|
|
@ -151,7 +151,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void toggle_big_clock_window ();
|
||||
void toggle_connection_editor ();
|
||||
void toggle_route_params_window ();
|
||||
void toggle_tempo_window ();
|
||||
void toggle_editing_space();
|
||||
|
||||
Gtk::Tooltips& tooltips() { return _tooltips; }
|
||||
|
|
@ -168,7 +167,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void rec_enable_button_blink (bool onoff, ARDOUR::AudioDiskstream *, Gtk::Widget *w);
|
||||
|
||||
void name_io_setup (ARDOUR::AudioEngine&, string&, ARDOUR::IO& io, bool in);
|
||||
void choose_io (ARDOUR::IO&, bool input);
|
||||
|
||||
static gint hide_and_quit (GdkEventAny *ev, ArdourDialog *);
|
||||
|
||||
|
|
@ -227,7 +225,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void toggle_click ();
|
||||
|
||||
void toggle_session_auto_loop ();
|
||||
void toggle_session_punch_in ();
|
||||
|
||||
void toggle_options_window ();
|
||||
|
||||
|
|
@ -284,14 +281,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
Gtk::Table option_table;
|
||||
|
||||
int setup_windows ();
|
||||
void setup_session_menu ();
|
||||
void setup_transport ();
|
||||
void setup_clock ();
|
||||
void setup_session_info ();
|
||||
void setup_adjustables ();
|
||||
|
||||
Gtk::MenuBar* make_menubar ();
|
||||
|
||||
static ARDOUR_UI *theArdourUI;
|
||||
|
||||
void startup ();
|
||||
|
|
@ -299,8 +292,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
void finish();
|
||||
int ask_about_saving_session (const string & why);
|
||||
gint ask_about_save_deleted (GdkEventAny*);
|
||||
void save_session_choice_made (int);
|
||||
int save_the_session;
|
||||
|
||||
void queue_transport_change ();
|
||||
|
|
@ -314,8 +305,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
void use_config ();
|
||||
|
||||
void clear_meters ();
|
||||
|
||||
static gint _blink (void *);
|
||||
void blink ();
|
||||
gint blink_timeout_tag;
|
||||
|
|
@ -326,6 +315,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void control_methods_adjusted ();
|
||||
void mmc_device_id_adjusted ();
|
||||
|
||||
void about_signal_response(int response);
|
||||
|
||||
private:
|
||||
Gtk::VBox top_packer;
|
||||
|
||||
|
|
@ -444,8 +435,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void allow_mmc_and_local ();
|
||||
void allow_local_only ();
|
||||
|
||||
static void rate_printer (char buf[32], Gtk::Adjustment &, void *);
|
||||
|
||||
Gtk::Menu* session_popup_menu;
|
||||
|
||||
struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
|
||||
|
|
@ -465,7 +454,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
Gtk::FileChooserDialog* open_session_selector;
|
||||
|
||||
void build_session_selector();
|
||||
void recent_session_selection_changed ();
|
||||
void redisplay_recent_sessions();
|
||||
void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
|
||||
|
||||
|
|
@ -483,7 +471,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
void build_menu_bar ();
|
||||
void build_control_surface_menu ();
|
||||
void pack_toplevel_controls();
|
||||
|
||||
Gtk::Label wall_clock_label;
|
||||
Gtk::EventBox wall_clock_box;
|
||||
|
|
@ -521,8 +508,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
void open_session ();
|
||||
void open_recent_session ();
|
||||
void open_ok_clicked ();
|
||||
|
||||
void save_template ();
|
||||
|
||||
void session_add_audio_route (bool disk, int32_t input_channels, int32_t output_channels, ARDOUR::TrackMode mode, uint32_t how_many);
|
||||
|
|
@ -544,14 +529,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void transport_rewind (int option);
|
||||
void transport_loop ();
|
||||
|
||||
void transport_locating ();
|
||||
void transport_rolling ();
|
||||
void transport_rewinding ();
|
||||
void transport_forwarding ();
|
||||
void transport_stopped ();
|
||||
|
||||
void send_all_midi_feedback ();
|
||||
|
||||
bool _session_is_new;
|
||||
void connect_to_session (ARDOUR::Session *);
|
||||
void connect_dependents_to_session (ARDOUR::Session *);
|
||||
|
|
@ -563,9 +545,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
void snapshot_session ();
|
||||
|
||||
void map_record_state ();
|
||||
void queue_map_record_state ();
|
||||
|
||||
Mixer_UI *mixer;
|
||||
int create_mixer ();
|
||||
|
||||
|
|
@ -591,7 +570,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
/* route dialog */
|
||||
|
||||
AddRouteDialog *add_route_dialog;
|
||||
void add_route_dialog_done (int status);
|
||||
|
||||
/* SoundFile Browser */
|
||||
SoundFileBrowser *sfdb;
|
||||
|
|
@ -604,15 +582,13 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
/* Keymap handling */
|
||||
|
||||
Glib::RefPtr<Gtk::ActionGroup> get_common_actions();
|
||||
void install_actions ();
|
||||
void test_binding_action (const char *);
|
||||
void start_keyboard_prefix();
|
||||
|
||||
void toggle_record_enable (uint32_t);
|
||||
|
||||
uint32_t rec_enabled_diskstreams;
|
||||
void count_recenabled_diskstreams (ARDOUR::Route&);
|
||||
uint32_t rec_enabled_streams;
|
||||
void count_recenabled_streams (ARDOUR::Route&);
|
||||
|
||||
About* about;
|
||||
bool shown_flag;
|
||||
|
|
@ -631,8 +607,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
struct timeval last_peak_grab;
|
||||
struct timeval last_shuttle_request;
|
||||
|
||||
void editor_display_control_changed (Editing::DisplayControl c);
|
||||
|
||||
bool have_disk_overrun_displayed;
|
||||
bool have_disk_underrun_displayed;
|
||||
|
||||
|
|
@ -678,7 +652,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void toggle_StopTransportAtEndOfSession();
|
||||
void toggle_GainReduceFastTransport();
|
||||
void toggle_LatchedSolo();
|
||||
void toggle_SoloViaBus();
|
||||
void toggle_LatchedRecordEnable ();
|
||||
|
||||
void mtc_port_changed ();
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ ARDOUR_UI::transport_rolling ()
|
|||
roll_button.set_active (false);
|
||||
auto_loop_button.set_active (false);
|
||||
|
||||
} else if (Config->get_auto_loop ()) {
|
||||
} else if (session->get_play_loop ()) {
|
||||
auto_loop_button.set_active (true);
|
||||
play_selection_button.set_active (false);
|
||||
roll_button.set_active (false);
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ void
|
|||
ARDOUR_UI::toggle_session_auto_loop ()
|
||||
{
|
||||
if (session) {
|
||||
if (Config->get_auto_loop()) {
|
||||
if (session->get_play_loop()) {
|
||||
if (session->transport_rolling()) {
|
||||
transport_roll();
|
||||
} else {
|
||||
|
|
@ -769,8 +769,6 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
|
|||
map_solo_model ();
|
||||
} else if (PARAM_IS ("auto-play")) {
|
||||
ActionManager::map_some_state ("Transport", "ToggleAutoPlay", &Configuration::get_auto_play);
|
||||
} else if (PARAM_IS ("auto-loop")) {
|
||||
ActionManager::map_some_state ("Transport", "Loop", &Configuration::get_auto_loop);
|
||||
} else if (PARAM_IS ("auto-return")) {
|
||||
ActionManager::map_some_state ("Transport", "ToggleAutoReturn", &Configuration::get_auto_return);
|
||||
} else if (PARAM_IS ("auto-input")) {
|
||||
|
|
|
|||
|
|
@ -1712,7 +1712,7 @@ AudioClock::build_ops_menu ()
|
|||
MenuList& mode_items = mode_menu->items();
|
||||
mode_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
mode_items.push_back (MenuElem (_("SMPTE"), bind (mem_fun(*this, &AudioClock::set_mode), SMPTE)));
|
||||
mode_items.push_back (MenuElem (_("Timecode"), bind (mem_fun(*this, &AudioClock::set_mode), SMPTE)));
|
||||
mode_items.push_back (MenuElem (_("Bars:Beats"), bind (mem_fun(*this, &AudioClock::set_mode), BBT)));
|
||||
mode_items.push_back (MenuElem (_("Minutes:Seconds"), bind (mem_fun(*this, &AudioClock::set_mode), MinSec)));
|
||||
mode_items.push_back (MenuElem (_("Audio Frames"), bind (mem_fun(*this, &AudioClock::set_mode), Frames)));
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#include <pbd/memento_command.h>
|
||||
|
||||
#include <ardour/audioregion.h>
|
||||
#include <ardour/playlist.h>
|
||||
#include <ardour/utils.h>
|
||||
#include <gtkmm2ext/utils.h>
|
||||
#include <gtkmm2ext/stop_signal.h>
|
||||
|
|
@ -42,28 +45,12 @@ AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr<AudioRegion>
|
|||
_region (r),
|
||||
_region_view (rv),
|
||||
name_label (_("NAME:")),
|
||||
lock_button (_("lock")),
|
||||
mute_button (_("mute")),
|
||||
opaque_button (_("opaque")),
|
||||
envelope_active_button(_("active")),
|
||||
envelope_view_button(_("visible")),
|
||||
raise_arrow (Gtk::ARROW_UP, Gtk::SHADOW_OUT),
|
||||
lower_arrow (Gtk::ARROW_DOWN, Gtk::SHADOW_OUT),
|
||||
layer_label (_("Layer")),
|
||||
audition_button (_("play")),
|
||||
time_table (3, 2),
|
||||
start_clock ("AudioRegionEditorClock", true),
|
||||
end_clock ("AudioRegionEditorClock", true),
|
||||
length_clock ("AudioRegionEditorClock", true, true),
|
||||
sync_offset_clock ("AudioRegionEditorClock", true, true),
|
||||
envelope_loop_table (1, 3),
|
||||
envelope_label (_("ENVELOPE")),
|
||||
fade_in_table (4, 3),
|
||||
fade_in_length_adjustment (5.0, 0.0, 10000, 0.05, 1),
|
||||
fade_in_length_spinner (fade_in_length_adjustment, 10),
|
||||
fade_out_table (4, 3),
|
||||
fade_out_length_adjustment (5.0, 0.0, 10000, 0.05, 1),
|
||||
fade_out_length_spinner (fade_out_length_adjustment, 10)
|
||||
sync_offset_clock ("AudioRegionEditorClock", true, true)
|
||||
|
||||
{
|
||||
start_clock.set_session (&_session);
|
||||
|
|
@ -77,66 +64,15 @@ AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr<AudioRegion>
|
|||
name_hbox.pack_start (name_label, false, false);
|
||||
name_hbox.pack_start (name_entry, false, false);
|
||||
|
||||
raise_button.add (raise_arrow);
|
||||
lower_button.add (lower_arrow);
|
||||
layer_frame.set_name ("BaseFrame");
|
||||
layer_frame.set_shadow_type (Gtk::SHADOW_IN);
|
||||
layer_frame.add (layer_value_label);
|
||||
layer_label.set_name ("AudioRegionEditorLabel");
|
||||
layer_value_label.set_name ("AudioRegionEditorLabel");
|
||||
Gtkmm2ext::set_size_request_to_display_given_text (layer_value_label, "99", 5, 2);
|
||||
|
||||
layer_hbox.set_spacing (5);
|
||||
layer_hbox.pack_start (layer_label, false, false);
|
||||
layer_hbox.pack_start (layer_frame, false, false);
|
||||
#if 0
|
||||
layer_hbox.pack_start (raise_button, false, false);
|
||||
layer_hbox.pack_start (lower_button, false, false);
|
||||
#endif
|
||||
|
||||
mute_button.set_name ("AudioRegionEditorToggleButton");
|
||||
opaque_button.set_name ("AudioRegionEditorToggleButton");
|
||||
lock_button.set_name ("AudioRegionEditorToggleButton");
|
||||
envelope_active_button.set_name ("AudioRegionEditorToggleButton");
|
||||
envelope_view_button.set_name ("AudioRegionEditorToggleButton");
|
||||
fade_in_active_button.set_name ("AudioRegionEditorToggleButton");
|
||||
fade_out_active_button.set_name ("AudioRegionEditorToggleButton");
|
||||
audition_button.set_name ("AudioRegionEditorToggleButton");
|
||||
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (mute_button, _("mute this region"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (opaque_button, _("regions underneath this one cannot be heard"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (lock_button, _("prevent any changes to this region"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (envelope_active_button, _("use the gain envelope during playback"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (envelope_view_button, _("show the gain envelope"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (fade_in_active_button, _("use fade in curve during playback"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (fade_out_active_button, _("use fade out curve during playback"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (audition_button, _("audition this region"));
|
||||
|
||||
mute_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
opaque_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
lock_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
envelope_active_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
envelope_view_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
fade_in_active_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
fade_out_active_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
audition_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
|
||||
mute_button.set_events (mute_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
opaque_button.set_events (opaque_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
lock_button.set_events (lock_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
envelope_active_button.set_events (envelope_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
envelope_view_button.set_events (envelope_view_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
fade_in_active_button.set_events (fade_in_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
fade_out_active_button.set_events (fade_out_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
audition_button.set_events (audition_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
|
||||
|
||||
top_row_button_hbox.set_border_width (5);
|
||||
top_row_button_hbox.set_spacing (5);
|
||||
top_row_button_hbox.set_homogeneous (false);
|
||||
top_row_button_hbox.pack_start (mute_button, false, false);
|
||||
top_row_button_hbox.pack_start (opaque_button, false, false);
|
||||
top_row_button_hbox.pack_start (lock_button, false, false);
|
||||
top_row_button_hbox.pack_start (layer_hbox, false, false, 5);
|
||||
top_row_button_hbox.pack_end (audition_button, false, false);
|
||||
|
||||
top_row_hbox.pack_start (name_hbox, true, true);
|
||||
|
|
@ -170,87 +106,9 @@ AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr<AudioRegion>
|
|||
time_table.attach (length_alignment, 0, 1, 2, 3, Gtk::FILL, Gtk::FILL);
|
||||
time_table.attach (length_clock, 1, 2, 2, 3, Gtk::FILL, Gtk::FILL);
|
||||
|
||||
envelope_label.set_name ("AudioRegionEditorLabel");
|
||||
|
||||
envelope_loop_table.set_border_width (5);
|
||||
envelope_loop_table.set_row_spacings (2);
|
||||
envelope_loop_table.attach (envelope_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
|
||||
envelope_loop_table.attach (envelope_active_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
|
||||
envelope_loop_table.attach (envelope_view_button, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
|
||||
|
||||
/* fade in */
|
||||
|
||||
fade_in_table.set_border_width (5);
|
||||
fade_in_table.set_homogeneous (false);
|
||||
|
||||
fade_in_label.set_name ("AudioRegionEditorLabel");
|
||||
fade_in_active_button_label.set_name ("AudioRegionEditorSmallLabel");
|
||||
fade_in_length_label.set_name ("AudioRegionEditorSmallLabel");
|
||||
|
||||
fade_in_label.set_text (_("FADE IN"));
|
||||
fade_in_active_button_label.set_text (_("active"));
|
||||
fade_in_length_label.set_text (_("msecs"));
|
||||
|
||||
fade_in_active_button.add (fade_in_active_button_label);
|
||||
|
||||
fade_in_length_spinner.set_name("GenericSpinner");
|
||||
|
||||
fade_in_length_spinner.set_digits (3);
|
||||
|
||||
// fade_in_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
|
||||
|
||||
Gtkmm2ext::set_size_request_to_display_given_text (fade_in_length_spinner, "500g", 20, -1);
|
||||
|
||||
fade_in_label_align.add (fade_in_label);
|
||||
fade_in_label_align.set (0.5);
|
||||
|
||||
|
||||
fade_in_table.attach (fade_in_label_align, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
|
||||
|
||||
fade_in_table.attach (fade_in_length_label, 0, 1, 1, 2, Gtk::EXPAND, Gtk::FILL);
|
||||
fade_in_table.attach (fade_in_length_spinner, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
|
||||
|
||||
fade_in_table.attach (fade_in_active_button, 0, 2, 3, 5, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
|
||||
|
||||
/* fade out */
|
||||
|
||||
fade_out_table.set_border_width (5);
|
||||
fade_out_table.set_homogeneous (false);
|
||||
|
||||
fade_out_label.set_name ("AudioRegionEditorLabel");
|
||||
fade_out_active_button_label.set_name ("AudioRegionEditorSmallLabel");
|
||||
fade_out_length_label.set_name ("AudioRegionEditorSmallLabel");
|
||||
|
||||
fade_out_label.set_text (_("FADE OUT"));
|
||||
fade_out_active_button_label.set_text (_("active"));
|
||||
fade_out_length_label.set_text (_("msecs"));
|
||||
|
||||
fade_out_active_button.add (fade_out_active_button_label);
|
||||
|
||||
fade_out_length_spinner.set_name("GenericSpinner");
|
||||
|
||||
fade_out_length_spinner.set_digits (3);
|
||||
|
||||
fade_out_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
|
||||
|
||||
Gtkmm2ext::set_size_request_to_display_given_text (fade_out_length_spinner, "500g", 20, -1);
|
||||
|
||||
fade_out_label_align.add (fade_out_label);
|
||||
fade_out_label_align.set (0.5);
|
||||
|
||||
fade_out_table.attach (fade_out_label_align, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
|
||||
|
||||
fade_out_table.attach (fade_out_length_label, 0, 1, 1, 2, Gtk::EXPAND, Gtk::FILL);
|
||||
fade_out_table.attach (fade_out_length_spinner, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
|
||||
|
||||
fade_out_table.attach (fade_out_active_button, 0, 2, 3, 5, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
|
||||
|
||||
lower_hbox.pack_start (time_table, true, true);
|
||||
lower_hbox.pack_start (sep1, false, false);
|
||||
lower_hbox.pack_start (envelope_loop_table, true, true);
|
||||
lower_hbox.pack_start (sep2, false, false);
|
||||
lower_hbox.pack_start (fade_in_table, true, true);
|
||||
lower_hbox.pack_start (fade_out_table, true, true);
|
||||
|
||||
get_vbox()->pack_start (top_row_hbox, true, true);
|
||||
get_vbox()->pack_start (sep3, false, false);
|
||||
|
|
@ -269,29 +127,8 @@ AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr<AudioRegion>
|
|||
|
||||
name_changed ();
|
||||
bounds_changed (Change (StartChanged|LengthChanged|PositionChanged));
|
||||
envelope_active_changed ();
|
||||
mute_changed ();
|
||||
opacity_changed ();
|
||||
lock_changed ();
|
||||
layer_changed ();
|
||||
fade_in_changed ();
|
||||
fade_out_changed ();
|
||||
|
||||
XMLNode *node = _region->extra_xml ("GUI");
|
||||
XMLProperty *prop = 0;
|
||||
bool showing_envelope = false;
|
||||
|
||||
if (node && (prop = node->property ("envelope-visible")) != 0) {
|
||||
if (prop->value() == "yes") {
|
||||
showing_envelope = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (showing_envelope) {
|
||||
envelope_view_button.set_active (true);
|
||||
} else {
|
||||
envelope_view_button.set_active (false);
|
||||
}
|
||||
//XMLNode *node = _region->extra_xml ("GUI");
|
||||
|
||||
_region->StateChanged.connect (mem_fun(*this, &AudioRegionEditor::region_changed));
|
||||
|
||||
|
|
@ -313,47 +150,6 @@ AudioRegionEditor::region_changed (Change what_changed)
|
|||
if (what_changed & BoundsChanged) {
|
||||
bounds_changed (what_changed);
|
||||
}
|
||||
|
||||
if (what_changed & Region::OpacityChanged) {
|
||||
opacity_changed ();
|
||||
}
|
||||
if (what_changed & Region::MuteChanged) {
|
||||
mute_changed ();
|
||||
}
|
||||
if (what_changed & Region::LockChanged) {
|
||||
lock_changed ();
|
||||
}
|
||||
if (what_changed & Region::LayerChanged) {
|
||||
layer_changed ();
|
||||
}
|
||||
|
||||
if (what_changed & AudioRegion::EnvelopeActiveChanged) {
|
||||
envelope_active_changed ();
|
||||
}
|
||||
if (what_changed & AudioRegion::FadeInChanged) {
|
||||
fade_in_changed ();
|
||||
}
|
||||
if (what_changed & AudioRegion::FadeOutChanged) {
|
||||
fade_out_changed ();
|
||||
}
|
||||
if (what_changed & AudioRegion::FadeInActiveChanged) {
|
||||
fade_in_active_changed ();
|
||||
}
|
||||
if (what_changed & AudioRegion::FadeOutActiveChanged) {
|
||||
fade_out_active_changed ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::fade_in_realized ()
|
||||
{
|
||||
fade_in_changed ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::fade_out_realized ()
|
||||
{
|
||||
fade_out_changed ();
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
@ -389,77 +185,51 @@ AudioRegionEditor::breleased (GdkEventButton* ev, Gtk::SpinButton* but, void (Au
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::start_editing_fade_in ()
|
||||
{
|
||||
_region->freeze ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::stop_editing_fade_in ()
|
||||
{
|
||||
_region->thaw (_("fade in edit"));
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::start_editing_fade_out ()
|
||||
{
|
||||
_region->freeze ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::stop_editing_fade_out ()
|
||||
{
|
||||
_region->thaw (_("fade out edit"));
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::connect_editor_events ()
|
||||
{
|
||||
name_entry.signal_changed().connect (mem_fun(*this, &AudioRegionEditor::name_entry_changed));
|
||||
name_entry.signal_changed().connect (mem_fun(*this, &AudioRegionEditor::name_entry_changed));
|
||||
|
||||
start_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::start_clock_changed));
|
||||
end_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::end_clock_changed));
|
||||
length_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::length_clock_changed));
|
||||
|
||||
fade_in_length_spinner.signal_button_press_event().connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_in_length_spinner,
|
||||
&AudioRegionEditor::start_editing_fade_in));
|
||||
fade_in_length_spinner.signal_button_release_event().connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_in_length_spinner,
|
||||
&AudioRegionEditor::stop_editing_fade_in));
|
||||
|
||||
fade_out_length_spinner.signal_button_press_event().connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_out_length_spinner,
|
||||
&AudioRegionEditor::start_editing_fade_out));
|
||||
fade_out_length_spinner.signal_button_release_event().connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_out_length_spinner,
|
||||
&AudioRegionEditor::stop_editing_fade_out));
|
||||
|
||||
fade_in_length_adjustment.signal_value_changed().connect (mem_fun(*this, &AudioRegionEditor::fade_in_length_adjustment_changed));
|
||||
fade_out_length_adjustment.signal_value_changed().connect (mem_fun(*this, &AudioRegionEditor::fade_out_length_adjustment_changed));
|
||||
|
||||
fade_in_active_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::fade_in_active_toggled));
|
||||
fade_out_active_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::fade_out_active_toggled));
|
||||
|
||||
envelope_active_button.signal_button_press_event().connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_press));
|
||||
envelope_active_button.signal_button_release_event().connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_release));
|
||||
audition_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::audition_button_toggled));
|
||||
envelope_view_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::envelope_view_button_toggled));
|
||||
lock_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lock_button_clicked));
|
||||
mute_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::mute_button_clicked));
|
||||
opaque_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::opaque_button_clicked));
|
||||
raise_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::raise_button_clicked));
|
||||
lower_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lower_button_clicked));
|
||||
_session.AuditionActive.connect (mem_fun(*this, &AudioRegionEditor::audition_state_changed));
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::start_clock_changed ()
|
||||
{
|
||||
_region->set_position (start_clock.current_time(), this);
|
||||
_session.begin_reversible_command (_("change region start position"));
|
||||
|
||||
Playlist* const pl = _region->playlist();
|
||||
|
||||
if (pl) {
|
||||
XMLNode &before = pl->get_state();
|
||||
_region->set_position (start_clock.current_time(), this);
|
||||
XMLNode &after = pl->get_state();
|
||||
_session.add_command(new MementoCommand<Playlist>(*pl, &before, &after));
|
||||
}
|
||||
|
||||
_session.commit_reversible_command ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::end_clock_changed ()
|
||||
{
|
||||
_region->trim_end (end_clock.current_time(), this);
|
||||
_session.begin_reversible_command (_("change region end position"));
|
||||
|
||||
Playlist* const pl = _region->playlist();
|
||||
|
||||
if (pl) {
|
||||
XMLNode &before = pl->get_state();
|
||||
_region->trim_end (end_clock.current_time(), this);
|
||||
XMLNode &after = pl->get_state();
|
||||
_session.add_command(new MementoCommand<Playlist>(*pl, &before, &after));
|
||||
}
|
||||
|
||||
_session.commit_reversible_command ();
|
||||
|
||||
end_clock.set (_region->position() + _region->length(), true);
|
||||
}
|
||||
|
|
@ -468,32 +238,23 @@ void
|
|||
AudioRegionEditor::length_clock_changed ()
|
||||
{
|
||||
nframes_t frames = length_clock.current_time();
|
||||
_region->trim_end (_region->position() + frames, this);
|
||||
|
||||
_session.begin_reversible_command (_("change region length"));
|
||||
|
||||
Playlist* const pl = _region->playlist();
|
||||
|
||||
if (pl) {
|
||||
XMLNode &before = pl->get_state();
|
||||
_region->trim_end (_region->position() + frames, this);
|
||||
XMLNode &after = pl->get_state();
|
||||
_session.add_command(new MementoCommand<Playlist>(*pl, &before, &after));
|
||||
}
|
||||
|
||||
_session.commit_reversible_command ();
|
||||
|
||||
length_clock.set (_region->length());
|
||||
}
|
||||
|
||||
gint
|
||||
AudioRegionEditor::envelope_active_button_press(GdkEventButton *ev)
|
||||
{
|
||||
return stop_signal (envelope_active_button, "button_press_event");
|
||||
}
|
||||
|
||||
gint
|
||||
AudioRegionEditor::envelope_active_button_release (GdkEventButton *ev)
|
||||
{
|
||||
_region->set_envelope_active (!_region->envelope_active());
|
||||
return stop_signal (envelope_active_button, "button_release_event");
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::envelope_view_button_toggled ()
|
||||
{
|
||||
bool visible = envelope_view_button.get_active ();
|
||||
|
||||
_region_view.set_envelope_visible (visible);
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::audition_button_toggled ()
|
||||
{
|
||||
|
|
@ -504,56 +265,6 @@ AudioRegionEditor::audition_button_toggled ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::raise_button_clicked ()
|
||||
{
|
||||
_region->raise ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::lower_button_clicked ()
|
||||
{
|
||||
_region->lower ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::opaque_button_clicked ()
|
||||
{
|
||||
bool ractive = _region->opaque();
|
||||
|
||||
if (opaque_button.get_active() != ractive) {
|
||||
_region->set_opaque (!ractive);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::mute_button_clicked ()
|
||||
{
|
||||
bool ractive = _region->muted();
|
||||
|
||||
if (mute_button.get_active() != ractive) {
|
||||
_region->set_muted (!ractive);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::lock_button_clicked ()
|
||||
{
|
||||
bool ractive = _region->locked();
|
||||
|
||||
if (lock_button.get_active() != ractive) {
|
||||
_region->set_locked (!ractive);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::layer_changed ()
|
||||
{
|
||||
char buf[8];
|
||||
snprintf (buf, sizeof(buf), "%d", (int) _region->layer() + 1);
|
||||
layer_value_label.set_text (buf);
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::name_changed ()
|
||||
{
|
||||
|
|
@ -562,48 +273,6 @@ AudioRegionEditor::name_changed ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::lock_changed ()
|
||||
{
|
||||
bool yn;
|
||||
|
||||
if ((yn = _region->locked()) != lock_button.get_active()) {
|
||||
lock_button.set_active (yn);
|
||||
}
|
||||
|
||||
start_clock.set_sensitive (!yn);
|
||||
end_clock.set_sensitive (!yn);
|
||||
length_clock.set_sensitive (!yn);
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::envelope_active_changed ()
|
||||
{
|
||||
bool yn;
|
||||
|
||||
if ((yn = _region->envelope_active()) != envelope_active_button.get_active()) {
|
||||
envelope_active_button.set_active (yn);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::opacity_changed ()
|
||||
{
|
||||
bool yn;
|
||||
if ((yn = _region->opaque()) != opaque_button.get_active()) {
|
||||
opaque_button.set_active (yn);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::mute_changed ()
|
||||
{
|
||||
bool yn;
|
||||
if ((yn = _region->muted()) != mute_button.get_active()) {
|
||||
mute_button.set_active (yn);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::bounds_changed (Change what_changed)
|
||||
{
|
||||
|
|
@ -628,97 +297,6 @@ AudioRegionEditor::name_entry_changed ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::fade_in_changed ()
|
||||
{
|
||||
float msecs = fade_in_length_adjustment.get_value();
|
||||
nframes_t sr = _session.frame_rate();
|
||||
nframes_t adj_frames = (nframes_t) floor (msecs * (sr/1000.0f));
|
||||
nframes_t frames;
|
||||
bool x;
|
||||
|
||||
if (adj_frames != (frames = (nframes_t) _region->fade_in().back()->when)) {
|
||||
fade_in_length_adjustment.set_value ((frames * 1000.0f) / sr);
|
||||
}
|
||||
|
||||
if ((x = _region->fade_in_active()) != fade_in_active_button.get_active()) {
|
||||
fade_in_active_button.set_active (x);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::fade_out_changed ()
|
||||
{
|
||||
float msecs = fade_out_length_adjustment.get_value();
|
||||
nframes_t sr = _session.frame_rate();
|
||||
nframes_t adj_frames = (nframes_t) floor (msecs * (sr/1000.0f));
|
||||
nframes_t frames;
|
||||
bool x;
|
||||
if (adj_frames != (frames = (nframes_t) _region->fade_out().back()->when)) {
|
||||
fade_out_length_adjustment.set_value ((frames * 1000.0f) / sr);
|
||||
}
|
||||
|
||||
if ((x = _region->fade_out_active()) != fade_out_active_button.get_active()) {
|
||||
fade_out_active_button.set_active (x);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::fade_in_length_adjustment_changed ()
|
||||
{
|
||||
nframes_t fade_length = (nframes_t) floor (fade_in_length_adjustment.get_value() * _session.frame_rate() * 0.001);
|
||||
fade_length = max (fade_length, (nframes_t) 64);
|
||||
fade_length = min (fade_length, _region->length());
|
||||
|
||||
_region->set_fade_in_length (fade_length);
|
||||
/* region is frozen, no worries */
|
||||
fade_in_changed();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::fade_out_length_adjustment_changed ()
|
||||
{
|
||||
nframes_t fade_length = (nframes_t) floor (fade_out_length_adjustment.get_value() * _session.frame_rate() * 0.001);
|
||||
fade_length = max (fade_length, (nframes_t) 64);
|
||||
fade_length = min (fade_length, _region->length());
|
||||
|
||||
_region->set_fade_out_length (fade_length);
|
||||
/* region is frozen, no worries */
|
||||
fade_out_changed();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::fade_in_active_toggled ()
|
||||
{
|
||||
_region->set_fade_in_active (fade_in_active_button.get_active());
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::fade_out_active_toggled ()
|
||||
{
|
||||
_region->set_fade_out_active (fade_out_active_button.get_active());
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::fade_out_active_changed ()
|
||||
{
|
||||
bool x;
|
||||
|
||||
if ((x = _region->fade_out_active()) != fade_out_active_button.get_active()) {
|
||||
fade_out_active_button.set_active (x);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::fade_in_active_changed ()
|
||||
{
|
||||
bool x;
|
||||
|
||||
if ((x = _region->fade_in_active()) != fade_in_active_button.get_active()) {
|
||||
fade_in_active_button.set_active (x);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionEditor::audition_state_changed (bool yn)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -69,21 +69,6 @@ class AudioRegionEditor : public RegionEditor
|
|||
Gtk::HBox top_row_hbox;
|
||||
Gtk::HBox top_row_button_hbox;
|
||||
|
||||
Gtk::ToggleButton lock_button;
|
||||
Gtk::ToggleButton mute_button;
|
||||
Gtk::ToggleButton opaque_button;
|
||||
Gtk::ToggleButton envelope_active_button;
|
||||
Gtk::ToggleButton envelope_view_button;
|
||||
|
||||
Gtk::Button raise_button;
|
||||
Gtk::Arrow raise_arrow;
|
||||
Gtk::Button lower_button;
|
||||
Gtk::Arrow lower_arrow;
|
||||
Gtk::Frame layer_frame;
|
||||
Gtk::Label layer_value_label;
|
||||
Gtk::Label layer_label;
|
||||
Gtk::HBox layer_hbox;
|
||||
|
||||
Gtk::ToggleButton audition_button;
|
||||
|
||||
Gtk::HBox lower_hbox;
|
||||
|
|
@ -102,31 +87,6 @@ class AudioRegionEditor : public RegionEditor
|
|||
AudioClock length_clock;
|
||||
AudioClock sync_offset_clock;
|
||||
|
||||
Gtk::Table envelope_loop_table;
|
||||
Gtk::Button loop_button;
|
||||
Gtk::Label loop_label;
|
||||
Gtk::Label envelope_label;
|
||||
|
||||
Gtk::Table fade_in_table;
|
||||
Gtk::Label fade_in_label;
|
||||
Gtk::Alignment fade_in_label_align;
|
||||
Gtk::Label fade_in_active_button_label;
|
||||
Gtk::ToggleButton fade_in_active_button;
|
||||
Gtk::Label fade_in_length_label;
|
||||
|
||||
Gtk::Adjustment fade_in_length_adjustment;
|
||||
Gtk::SpinButton fade_in_length_spinner;
|
||||
|
||||
Gtk::Table fade_out_table;
|
||||
Gtk::Label fade_out_label;
|
||||
Gtk::Alignment fade_out_label_align;
|
||||
Gtk::Label fade_out_active_button_label;
|
||||
Gtk::ToggleButton fade_out_active_button;
|
||||
Gtk::Label fade_out_length_label;
|
||||
|
||||
Gtk::Adjustment fade_out_length_adjustment;
|
||||
Gtk::SpinButton fade_out_length_spinner;
|
||||
|
||||
Gtk::HSeparator sep3;
|
||||
Gtk::VSeparator sep1;
|
||||
Gtk::VSeparator sep2;
|
||||
|
|
@ -134,16 +94,7 @@ class AudioRegionEditor : public RegionEditor
|
|||
void region_changed (ARDOUR::Change);
|
||||
void bounds_changed (ARDOUR::Change);
|
||||
void name_changed ();
|
||||
void opacity_changed ();
|
||||
void mute_changed ();
|
||||
void envelope_active_changed ();
|
||||
void lock_changed ();
|
||||
void layer_changed ();
|
||||
|
||||
void fade_in_length_adjustment_changed ();
|
||||
void fade_out_length_adjustment_changed ();
|
||||
void fade_in_changed ();
|
||||
void fade_out_changed ();
|
||||
void audition_state_changed (bool);
|
||||
|
||||
void activation ();
|
||||
|
|
@ -153,29 +104,7 @@ class AudioRegionEditor : public RegionEditor
|
|||
void end_clock_changed ();
|
||||
void length_clock_changed ();
|
||||
|
||||
gint envelope_active_button_press (GdkEventButton *);
|
||||
gint envelope_active_button_release (GdkEventButton *);
|
||||
|
||||
void audition_button_toggled ();
|
||||
void envelope_view_button_toggled ();
|
||||
void lock_button_clicked ();
|
||||
void mute_button_clicked ();
|
||||
void opaque_button_clicked ();
|
||||
void raise_button_clicked ();
|
||||
void lower_button_clicked ();
|
||||
|
||||
void fade_in_active_toggled ();
|
||||
void fade_out_active_toggled ();
|
||||
void fade_in_active_changed ();
|
||||
void fade_out_active_changed ();
|
||||
|
||||
void fade_in_realized ();
|
||||
void fade_out_realized ();
|
||||
|
||||
void start_editing_fade_in ();
|
||||
void start_editing_fade_out ();
|
||||
void stop_editing_fade_in ();
|
||||
void stop_editing_fade_out ();
|
||||
|
||||
gint bpressed (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)());
|
||||
gint breleased (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)());
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include <ardour/audiosource.h>
|
||||
#include <ardour/audio_diskstream.h>
|
||||
#include <pbd/memento_command.h>
|
||||
#include <pbd/stacktrace.h>
|
||||
|
||||
#include "streamview.h"
|
||||
#include "audio_region_view.h"
|
||||
|
|
@ -247,16 +248,52 @@ AudioRegionView::fade_out_changed ()
|
|||
reset_fade_out_shape ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::set_fade_in_shape (AudioRegion::FadeShape shape)
|
||||
{
|
||||
AutomationList& alist = audio_region()->fade_in();
|
||||
XMLNode& before (alist.get_state());
|
||||
trackview.session().begin_reversible_command ("fade in shape");
|
||||
audio_region()->set_fade_in_shape (shape);
|
||||
XMLNode& after (alist.get_state());
|
||||
trackview.session().add_command (new MementoCommand<AutomationList>(alist, &before, &after));
|
||||
trackview.session().commit_reversible_command ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::set_fade_out_shape (AudioRegion::FadeShape shape)
|
||||
{
|
||||
AutomationList& alist = audio_region()->fade_out();
|
||||
XMLNode& before (alist.get_state());
|
||||
trackview.session().begin_reversible_command ("fade out shape");
|
||||
audio_region()->set_fade_out_shape (shape);
|
||||
XMLNode& after (alist.get_state());
|
||||
trackview.session().add_command (new MementoCommand<AutomationList>(alist, &before, &after));
|
||||
trackview.session().commit_reversible_command ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::set_fade_in_active (bool yn)
|
||||
{
|
||||
AutomationList& alist = audio_region()->fade_in();
|
||||
XMLNode& before (alist.get_state());
|
||||
trackview.session().begin_reversible_command ("fade in shape");
|
||||
audio_region()->set_fade_in_active (yn);
|
||||
XMLNode& after (alist.get_state());
|
||||
trackview.session().add_command (new MementoCommand<AutomationList>(alist, &before, &after));
|
||||
trackview.session().commit_reversible_command ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::set_fade_out_active (bool yn)
|
||||
{
|
||||
AutomationList& alist = audio_region()->fade_out();
|
||||
XMLNode& before (alist.get_state());
|
||||
trackview.session().begin_reversible_command ("fade out shape");
|
||||
audio_region()->set_fade_out_active (yn);
|
||||
XMLNode& after (alist.get_state());
|
||||
trackview.session().add_command (new MementoCommand<AutomationList>(alist, &before, &after));
|
||||
trackview.session().commit_reversible_command ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -868,6 +905,9 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
|
|||
waves = tmp_waves;
|
||||
tmp_waves.clear ();
|
||||
|
||||
/* all waves created, don't hook into peaks ready anymore */
|
||||
data_ready_connection.disconnect ();
|
||||
|
||||
if (!zero_line) {
|
||||
zero_line = new ArdourCanvas::SimpleLine (*group);
|
||||
zero_line->property_x1() = (gdouble) 1.0;
|
||||
|
|
@ -882,11 +922,6 @@ void
|
|||
AudioRegionView::peaks_ready_handler (uint32_t which)
|
||||
{
|
||||
Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &AudioRegionView::create_one_wave), which, false));
|
||||
|
||||
if (!waves.empty()) {
|
||||
/* all waves created, don't hook into peaks ready anymore */
|
||||
data_ready_connection.disconnect ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -924,12 +959,11 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
|
|||
trackview.session().begin_reversible_command (_("add gain control point"));
|
||||
XMLNode &before = audio_region()->envelope().get_state();
|
||||
|
||||
|
||||
if (!audio_region()->envelope_active()) {
|
||||
XMLNode &before = audio_region()->get_state();
|
||||
XMLNode ®ion_before = audio_region()->get_state();
|
||||
audio_region()->set_envelope_active(true);
|
||||
XMLNode &after = audio_region()->get_state();
|
||||
trackview.session().add_command (new MementoCommand<AudioRegion>(*(audio_region().get()), &before, &after));
|
||||
XMLNode ®ion_after = audio_region()->get_state();
|
||||
trackview.session().add_command (new MementoCommand<AudioRegion>(*(audio_region().get()), ®ion_before, ®ion_after));
|
||||
}
|
||||
|
||||
audio_region()->envelope().add (fx, y);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <libgnomecanvasmm.h>
|
||||
#include <libgnomecanvasmm/polygon.h>
|
||||
#include <sigc++/signal.h>
|
||||
#include <ardour/region.h>
|
||||
#include <ardour/audioregion.h>
|
||||
|
||||
#include "region_view.h"
|
||||
#include "route_time_axis.h"
|
||||
|
|
@ -93,7 +93,9 @@ class AudioRegionView : public RegionView
|
|||
void reset_fade_out_shape_width (nframes_t);
|
||||
void set_fade_in_active (bool);
|
||||
void set_fade_out_active (bool);
|
||||
|
||||
void set_fade_in_shape (ARDOUR::AudioRegion::FadeShape);
|
||||
void set_fade_out_shape (ARDOUR::AudioRegion::FadeShape);
|
||||
|
||||
virtual void entered ();
|
||||
virtual void exited ();
|
||||
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ AutomationLine::AutomationLine (const string & name, TimeAxisView& tv, ArdourCan
|
|||
|
||||
alist.StateChanged.connect (mem_fun(*this, &AutomationLine::list_changed));
|
||||
|
||||
trackview.session().register_with_memento_command_factory(_id, this);
|
||||
trackview.session().register_with_memento_command_factory(alist.id(), this);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -270,14 +270,6 @@ AutomationLine::queue_reset ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
AutomationLine::set_point_size (double sz)
|
||||
{
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
(*i)->set_size (sz);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AutomationLine::show ()
|
||||
{
|
||||
|
|
@ -302,18 +294,27 @@ AutomationLine::hide ()
|
|||
_visible = false;
|
||||
}
|
||||
|
||||
double
|
||||
AutomationLine::control_point_box_size ()
|
||||
{
|
||||
if (_height > TimeAxisView::hLarger) {
|
||||
return 8.0;
|
||||
} else if (_height > (guint32) TimeAxisView::hNormal) {
|
||||
return 6.0;
|
||||
}
|
||||
return 4.0;
|
||||
}
|
||||
|
||||
void
|
||||
AutomationLine::set_height (guint32 h)
|
||||
{
|
||||
if (h != _height) {
|
||||
_height = h;
|
||||
|
||||
if (_height > (guint32) TimeAxisView::Larger) {
|
||||
set_point_size (8.0);
|
||||
} else if (_height > (guint32) TimeAxisView::Normal) {
|
||||
set_point_size (6.0);
|
||||
} else {
|
||||
set_point_size (4.0);
|
||||
double bsz = control_point_box_size();
|
||||
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
(*i)->set_size (bsz);
|
||||
}
|
||||
|
||||
reset ();
|
||||
|
|
@ -670,11 +671,16 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
|
|||
uint32_t this_ry = 0;
|
||||
uint32_t prev_ry = 0;
|
||||
double* slope;
|
||||
uint32_t box_size;
|
||||
uint32_t cpsize;
|
||||
|
||||
/* hide all existing points, and the line */
|
||||
|
||||
cpsize = 0;
|
||||
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
(*i)->hide();
|
||||
++cpsize;
|
||||
}
|
||||
|
||||
line->hide ();
|
||||
|
|
@ -695,6 +701,8 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
|
|||
slope[n] = ydelta/xdelta;
|
||||
}
|
||||
|
||||
box_size = (uint32_t) control_point_box_size ();
|
||||
|
||||
/* read all points and decide which ones to show as control points */
|
||||
|
||||
view_index = 0;
|
||||
|
|
@ -736,29 +744,27 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
|
|||
*/
|
||||
|
||||
this_rx = (uint32_t) rint (tx);
|
||||
this_ry = (unsigned long) rint (ty);
|
||||
|
||||
if (view_index && pi != npoints && (this_rx == prev_rx) && (this_ry == prev_ry)) {
|
||||
this_ry = (uint32_t) rint (ty);
|
||||
|
||||
if (view_index && pi != npoints && /* not the first, not the last */
|
||||
(((this_rx == prev_rx) && (this_ry == prev_ry)) || /* same point */
|
||||
(((this_rx - prev_rx) < (box_size + 2)) && /* too close horizontally */
|
||||
((abs ((int)(this_ry - prev_ry)) < (int) (box_size + 2)))))) { /* too close vertically */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* ok, we should display this point */
|
||||
|
||||
if (view_index >= control_points.size()) {
|
||||
if (view_index >= cpsize) {
|
||||
|
||||
/* make sure we have enough control points */
|
||||
|
||||
ControlPoint* ncp = new ControlPoint (*this);
|
||||
|
||||
if (_height > (guint32) TimeAxisView::Larger) {
|
||||
ncp->set_size (8.0);
|
||||
} else if (_height > (guint32) TimeAxisView::Normal) {
|
||||
ncp->set_size (6.0);
|
||||
} else {
|
||||
ncp->set_size (4.0);
|
||||
}
|
||||
|
||||
ncp->set_size (box_size);
|
||||
|
||||
control_points.push_back (ncp);
|
||||
++cpsize;
|
||||
}
|
||||
|
||||
ControlPoint::ShapeType shape;
|
||||
|
|
@ -829,6 +835,10 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
|
|||
line_points.push_back (Art::Point (0,0));
|
||||
}
|
||||
|
||||
while (line_points.size() > npoints) {
|
||||
line_points.pop_back ();
|
||||
}
|
||||
|
||||
for (view_index = 0; view_index < npoints; ++view_index) {
|
||||
line_points[view_index].set_x (control_points[view_index]->get_x());
|
||||
line_points[view_index].set_y (control_points[view_index]->get_y());
|
||||
|
|
@ -1168,16 +1178,8 @@ AutomationLine::hide_selection ()
|
|||
// show_selection ();
|
||||
}
|
||||
|
||||
|
||||
// This is copied into AudioRegionGainLine
|
||||
UndoAction
|
||||
AutomationLine::get_memento ()
|
||||
{
|
||||
return alist.get_memento();
|
||||
}
|
||||
|
||||
void
|
||||
AutomationLine::list_changed (Change ignored)
|
||||
AutomationLine::list_changed ()
|
||||
{
|
||||
queue_reset ();
|
||||
}
|
||||
|
|
@ -1201,9 +1203,7 @@ AutomationLine::reset_callback (const AutomationList& events)
|
|||
|
||||
for (ai = events.const_begin(); ai != events.const_end(); ++ai) {
|
||||
|
||||
double translated_y;
|
||||
|
||||
translated_y = (*ai)->value;
|
||||
double translated_y = (*ai)->value;
|
||||
model_to_view_y (translated_y);
|
||||
|
||||
tmp_points.push_back (ALPoint (trackview.editor.frame_to_unit ((*ai)->when),
|
||||
|
|
@ -1271,16 +1271,16 @@ AutomationLine::hide_all_but_selected_control_points ()
|
|||
}
|
||||
}
|
||||
|
||||
XMLNode &AutomationLine::get_state(void)
|
||||
XMLNode &
|
||||
AutomationLine::get_state (void)
|
||||
{
|
||||
XMLNode *node = new XMLNode("AutomationLine");
|
||||
node->add_child_nocopy(alist.get_state());
|
||||
return *node;
|
||||
/* function as a proxy for the model */
|
||||
return alist.get_state();
|
||||
}
|
||||
|
||||
int AutomationLine::set_state(const XMLNode &node)
|
||||
int
|
||||
AutomationLine::set_state (const XMLNode &node)
|
||||
{
|
||||
// TODO
|
||||
//alist.set_state(node);
|
||||
return 0;
|
||||
/* function as a proxy for the model */
|
||||
return alist.set_state (node);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class ControlPoint
|
|||
ShapeType _shape;
|
||||
};
|
||||
|
||||
class AutomationLine : public PBD::StatefulDestructible
|
||||
class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoingAway
|
||||
{
|
||||
public:
|
||||
AutomationLine (const string & name, TimeAxisView&, ArdourCanvas::Group&, ARDOUR::AutomationList&);
|
||||
|
|
@ -146,8 +146,6 @@ class AutomationLine : public PBD::StatefulDestructible
|
|||
void show_selection();
|
||||
void hide_selection ();
|
||||
|
||||
void set_point_size (double size);
|
||||
|
||||
virtual string get_verbose_cursor_string (float);
|
||||
virtual void view_to_model_y (double&) = 0;
|
||||
virtual void model_to_view_y (double&) = 0;
|
||||
|
|
@ -204,9 +202,7 @@ class AutomationLine : public PBD::StatefulDestructible
|
|||
virtual void change_model_range (ARDOUR::AutomationList::iterator,ARDOUR::AutomationList::iterator, double delta, float ydelta);
|
||||
|
||||
void reset_callback (const ARDOUR::AutomationList&);
|
||||
void list_changed (ARDOUR::Change);
|
||||
|
||||
UndoAction get_memento();
|
||||
void list_changed ();
|
||||
|
||||
virtual bool event_handler (GdkEvent*);
|
||||
|
||||
|
|
@ -221,6 +217,8 @@ class AutomationLine : public PBD::StatefulDestructible
|
|||
void reset_line_coords (ControlPoint&);
|
||||
void update_line ();
|
||||
|
||||
double control_point_box_size ();
|
||||
|
||||
struct ModelRepresentation {
|
||||
ARDOUR::AutomationList::iterator start;
|
||||
ARDOUR::AutomationList::iterator end;
|
||||
|
|
|
|||
|
|
@ -43,31 +43,22 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
|
|||
ignore_state_request = false;
|
||||
first_call_to_set_height = true;
|
||||
|
||||
// base_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display),
|
||||
// gnome_canvas_simplerect_get_type(),
|
||||
// "x1", 0.0,
|
||||
// "y1", 0.0,
|
||||
// "x2", 1000000.0,
|
||||
// "outline_color_rgba", color_map[cAutomationTrackOutline],
|
||||
// /* outline ends and bottom */
|
||||
// "outline_what", (guint32) (0x1|0x2|0x8),
|
||||
// "fill_color_rgba", color_map[cAutomationTrackFill],
|
||||
// NULL);
|
||||
base_rect = new SimpleRect(*canvas_display);
|
||||
base_rect->property_x1() = 0.0;
|
||||
base_rect->property_y1() = 0.0;
|
||||
base_rect->property_x2() = 1000000.0;
|
||||
base_rect->property_x2() = max_frames;
|
||||
base_rect->property_outline_color_rgba() = color_map[cAutomationTrackOutline];
|
||||
/* outline ends and bottom */
|
||||
base_rect->property_outline_what() = (guint32) (0x1|0x2|0x8);
|
||||
base_rect->property_fill_color_rgba() = color_map[cAutomationTrackFill];
|
||||
//base_rect->property_fill_color_rgba() = color_map[cEnteredControlPoint];
|
||||
|
||||
base_rect->set_data ("trackview", this);
|
||||
|
||||
base_rect->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_automation_track_event),
|
||||
base_rect, this));
|
||||
|
||||
hide_button.add (*(manage (new Gtk::Image (get_xpm("small_x.xpm")))));
|
||||
hide_button.add (*(manage (new Gtk::Image (::get_icon("hide")))));
|
||||
|
||||
height_button.set_name ("TrackSizeButton");
|
||||
auto_button.set_name ("TrackVisualButton");
|
||||
|
|
@ -402,8 +393,13 @@ AutomationTimeAxisView::set_samples_per_unit (double spu)
|
|||
void
|
||||
AutomationTimeAxisView::hide_clicked ()
|
||||
{
|
||||
// LAME fix for refreshing the hide button
|
||||
hide_button.set_sensitive(false);
|
||||
|
||||
set_marked_for_display (false);
|
||||
hide ();
|
||||
|
||||
hide_button.set_sensitive(true);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
Copyright (C) 2000-2002 Paul Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -16,20 +16,22 @@
|
|||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id$
|
||||
*/
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <ardour/dB.h>
|
||||
#include <ardour/dB.h>
|
||||
|
||||
#include "canvas-waveview.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "canvas-waveview.h"
|
||||
#include "rgb_macros.h"
|
||||
|
||||
enum {
|
||||
extern void c_stacktrace();
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_DATA_SRC,
|
||||
PROP_CHANNEL,
|
||||
|
|
@ -48,66 +50,66 @@
|
|||
PROP_WAVE_COLOR,
|
||||
PROP_RECTIFIED,
|
||||
PROP_REGION_START
|
||||
};
|
||||
};
|
||||
|
||||
static void gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class);
|
||||
static void gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class);
|
||||
|
||||
static void gnome_canvas_waveview_init (GnomeCanvasWaveView *waveview);
|
||||
static void gnome_canvas_waveview_init (GnomeCanvasWaveView *waveview);
|
||||
|
||||
static void gnome_canvas_waveview_destroy (GtkObject *object);
|
||||
static void gnome_canvas_waveview_destroy (GtkObject *object);
|
||||
|
||||
static void gnome_canvas_waveview_set_property (GObject *object,
|
||||
static void gnome_canvas_waveview_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gnome_canvas_waveview_get_property (GObject *object,
|
||||
static void gnome_canvas_waveview_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void gnome_canvas_waveview_update (GnomeCanvasItem *item,
|
||||
static void gnome_canvas_waveview_update (GnomeCanvasItem *item,
|
||||
double *affine,
|
||||
ArtSVP *clip_path,
|
||||
int flags);
|
||||
|
||||
static void gnome_canvas_waveview_bounds (GnomeCanvasItem *item,
|
||||
static void gnome_canvas_waveview_bounds (GnomeCanvasItem *item,
|
||||
double *x1,
|
||||
double *y1,
|
||||
double *x2,
|
||||
double *y2);
|
||||
|
||||
static double gnome_canvas_waveview_point (GnomeCanvasItem *item,
|
||||
static double gnome_canvas_waveview_point (GnomeCanvasItem *item,
|
||||
double x,
|
||||
double y,
|
||||
int cx,
|
||||
int cy,
|
||||
GnomeCanvasItem **actual_item);
|
||||
|
||||
static void gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
||||
static void gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
||||
GnomeCanvasBuf *buf);
|
||||
|
||||
static void gnome_canvas_waveview_draw (GnomeCanvasItem *item,
|
||||
static void gnome_canvas_waveview_draw (GnomeCanvasItem *item,
|
||||
GdkDrawable *drawable,
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
int h);
|
||||
|
||||
static void gnome_canvas_waveview_set_data_src (GnomeCanvasWaveView *,
|
||||
static void gnome_canvas_waveview_set_data_src (GnomeCanvasWaveView *,
|
||||
void *);
|
||||
|
||||
static void gnome_canvas_waveview_set_channel (GnomeCanvasWaveView *,
|
||||
static void gnome_canvas_waveview_set_channel (GnomeCanvasWaveView *,
|
||||
guint32);
|
||||
|
||||
static gint32 gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview,
|
||||
static gint32 gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview,
|
||||
gulong start_sample,
|
||||
gulong end_sample);
|
||||
|
||||
static GnomeCanvasItemClass *parent_class;
|
||||
static GnomeCanvasItemClass *parent_class;
|
||||
|
||||
GType
|
||||
gnome_canvas_waveview_get_type (void)
|
||||
{
|
||||
GType
|
||||
gnome_canvas_waveview_get_type (void)
|
||||
{
|
||||
static GType waveview_type;
|
||||
|
||||
if (!waveview_type) {
|
||||
|
|
@ -131,9 +133,9 @@
|
|||
return waveview_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
|
||||
{
|
||||
static void
|
||||
gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GtkObjectClass *object_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
|
@ -266,7 +268,7 @@
|
|||
item_class->point = gnome_canvas_waveview_point;
|
||||
item_class->render = gnome_canvas_waveview_render;
|
||||
item_class->draw = gnome_canvas_waveview_draw;
|
||||
}
|
||||
}
|
||||
|
||||
GnomeCanvasWaveViewCache*
|
||||
gnome_canvas_waveview_cache_new ()
|
||||
|
|
@ -331,6 +333,7 @@ gnome_canvas_waveview_destroy (GtkObject *object)
|
|||
}
|
||||
|
||||
#define DEBUG_CACHE 0
|
||||
#undef CACHE_MEMMOVE_OPTIMIZATION
|
||||
|
||||
static gint32
|
||||
gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_sample, gulong end_sample)
|
||||
|
|
@ -345,6 +348,10 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
|
|||
gulong copied;
|
||||
GnomeCanvasWaveViewCache *cache;
|
||||
float* gain;
|
||||
#ifdef CACHE_MEMMOVE_OPTIMIZATION
|
||||
gulong present_frames;
|
||||
gulong present_entries;
|
||||
#endif
|
||||
|
||||
cache = waveview->cache;
|
||||
|
||||
|
|
@ -422,7 +429,6 @@ gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_
|
|||
|
||||
ostart = new_cache_start;
|
||||
|
||||
#undef CACHE_MEMMOVE_OPTIMIZATION
|
||||
#ifdef CACHE_MEMMOVE_OPTIMIZATION
|
||||
|
||||
/* data is not entirely in the cache, so go fetch it, making sure to fill the cache */
|
||||
|
|
@ -971,7 +977,7 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
|||
|
||||
#if 0
|
||||
printf ("0x%x r (%d..%d)(%d..%d) bbox (%d..%d)(%d..%d)"
|
||||
" b/e %d..%d s= %lu..%lu\n",
|
||||
" b/e %d..%d s= %lu..%lu @ %f\n",
|
||||
waveview,
|
||||
buf->rect.x0,
|
||||
buf->rect.x1,
|
||||
|
|
@ -981,7 +987,8 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
|||
waveview->bbox_lrx,
|
||||
waveview->bbox_uly,
|
||||
waveview->bbox_lry,
|
||||
begin, end, s1, s2);
|
||||
begin, end, s1, s2,
|
||||
waveview->samples_per_unit);
|
||||
#endif
|
||||
|
||||
/* now ensure that the cache is full and properly
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include "editing.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
// This involves some cpp magic. --taybin
|
||||
|
|
@ -24,6 +26,13 @@ str2snaptype (const string & str) {
|
|||
#include "editing_syms.h"
|
||||
return SnapToBar;
|
||||
}
|
||||
|
||||
#undef SNAPTYPE
|
||||
#define SNAPTYPE(s) N_(#s),
|
||||
const char *snaptypestrs[] = {
|
||||
#include "editing_syms.h"
|
||||
0
|
||||
};
|
||||
#undef SNAPTYPE
|
||||
#define SNAPTYPE(a) /*empty*/
|
||||
|
||||
|
|
@ -36,9 +45,17 @@ str2snapmode (const string & str) {
|
|||
#include "editing_syms.h"
|
||||
return SnapNormal;
|
||||
}
|
||||
|
||||
#undef SNAPMODE
|
||||
#define SNAPMODE(s) N_(#s),
|
||||
const char *snapmodestrs[] = {
|
||||
#include "editing_syms.h"
|
||||
0
|
||||
};
|
||||
#undef SNAPMODE
|
||||
#define SNAPMODE(a) /*empty*/
|
||||
|
||||
|
||||
// REGIONLISTSORTTYPE
|
||||
#undef REGIONLISTSORTTYPE
|
||||
#define REGIONLISTSORTTYPE(s) if (!strcmp(type, #s)) {return s;}
|
||||
|
|
@ -48,6 +65,13 @@ str2regionlistsorttype (const string & str) {
|
|||
#include "editing_syms.h"
|
||||
return ByName;
|
||||
}
|
||||
|
||||
#undef REGIONLISTSORTTYPE
|
||||
#define REGIONLISTSORTTYPE(s) N_(#s),
|
||||
const char *regionlistsorttypestrs[] = {
|
||||
#include "editing_syms.h"
|
||||
0
|
||||
};
|
||||
#undef REGIONLISTSORTTYPE
|
||||
#define REGIONLISTSORTTYPE(a) /*empty*/
|
||||
|
||||
|
|
@ -60,6 +84,13 @@ str2mousemode (const string & str) {
|
|||
#include "editing_syms.h"
|
||||
return MouseObject;
|
||||
}
|
||||
|
||||
#undef MOUSEMODE
|
||||
#define MOUSEMODE(s) N_(#s),
|
||||
const char *mousemodestrs[] = {
|
||||
#include "editing_syms.h"
|
||||
0
|
||||
};
|
||||
#undef MOUSEMODE
|
||||
#define MOUSEMODE(a) /*empty*/
|
||||
|
||||
|
|
@ -72,6 +103,13 @@ str2zoomfocus (const string & str) {
|
|||
#include "editing_syms.h"
|
||||
return ZoomFocusPlayhead;
|
||||
}
|
||||
|
||||
#undef ZOOMFOCUS
|
||||
#define ZOOMFOCUS(s) N_(#s),
|
||||
const char *zoomfocusstrs[] = {
|
||||
#include "editing_syms.h"
|
||||
0
|
||||
};
|
||||
#undef ZOOMFOCUS
|
||||
#define ZOOMFOCUS(a) /*empty*/
|
||||
|
||||
|
|
@ -84,7 +122,25 @@ str2displaycontrol (const string & str) {
|
|||
#include "editing_syms.h"
|
||||
return FollowPlayhead;
|
||||
}
|
||||
|
||||
#undef DISPLAYCONTROL
|
||||
#define DISPLAYCONTROL(s) N_(#s),
|
||||
const char *displaycontrolstrs[] = {
|
||||
#include "editing_syms.h"
|
||||
0
|
||||
};
|
||||
#undef DISPLAYCONTROL
|
||||
#define DISPLAYCONTROL(a) /*empty*/
|
||||
|
||||
//IMPORTMODE
|
||||
#undef IMPORTMODE
|
||||
#define IMPORTMODE(s) N_(#s),
|
||||
const char *importmodestrs[] = {
|
||||
#include "editing_syms.h"
|
||||
0
|
||||
};
|
||||
#undef IMPORTMODE
|
||||
#define IMPORTMODE(a) /*empty*/
|
||||
|
||||
} // namespace Editing
|
||||
|
||||
|
|
|
|||
|
|
@ -24,11 +24,7 @@ enum SnapType {
|
|||
#include "editing_syms.h"
|
||||
};
|
||||
|
||||
#undef SNAPTYPE
|
||||
#define SNAPTYPE(s) #s,
|
||||
static const char *snaptypestrs[] = {
|
||||
#include "editing_syms.h"
|
||||
};
|
||||
extern const char *snaptypestrs[];
|
||||
inline const char* enum2str(SnapType m) {return snaptypestrs[m];}
|
||||
SnapType str2snaptype(const std::string &);
|
||||
|
||||
|
|
@ -42,11 +38,7 @@ enum SnapMode {
|
|||
#include "editing_syms.h"
|
||||
};
|
||||
|
||||
#undef SNAPMODE
|
||||
#define SNAPMODE(s) #s,
|
||||
static const char *snapmodestrs[] = {
|
||||
#include "editing_syms.h"
|
||||
};
|
||||
extern const char *snapmodestrs[];
|
||||
inline const char* enum2str(SnapMode m) {return snapmodestrs[m];}
|
||||
SnapMode str2snapmode(const std::string &);
|
||||
|
||||
|
|
@ -60,11 +52,7 @@ enum RegionListSortType {
|
|||
#include "editing_syms.h"
|
||||
};
|
||||
|
||||
#undef REGIONLISTSORTTYPE
|
||||
#define REGIONLISTSORTTYPE(s) #s,
|
||||
static const char *regionlistsorttypestrs[] = {
|
||||
#include "editing_syms.h"
|
||||
};
|
||||
extern const char *regionlistsorttypestrs[];
|
||||
inline const char* enum2str(RegionListSortType m) {return regionlistsorttypestrs[m];}
|
||||
RegionListSortType str2regionlistsorttype(const std::string &);
|
||||
|
||||
|
|
@ -78,11 +66,7 @@ enum MouseMode {
|
|||
#include "editing_syms.h"
|
||||
};
|
||||
|
||||
#undef MOUSEMODE
|
||||
#define MOUSEMODE(s) #s,
|
||||
static const char *mousemodestrs[] = {
|
||||
#include "editing_syms.h"
|
||||
};
|
||||
extern const char *mousemodestrs[];
|
||||
inline const char* enum2str(MouseMode m) {return mousemodestrs[m];}
|
||||
MouseMode str2mousemode(const std::string &);
|
||||
|
||||
|
|
@ -96,11 +80,7 @@ enum ZoomFocus {
|
|||
#include "editing_syms.h"
|
||||
};
|
||||
|
||||
#undef ZOOMFOCUS
|
||||
#define ZOOMFOCUS(s) #s,
|
||||
static const char *zoomfocusstrs[] = {
|
||||
#include "editing_syms.h"
|
||||
};
|
||||
extern const char *zoomfocusstrs[];
|
||||
inline const char* enum2str(ZoomFocus m) {return zoomfocusstrs[m];}
|
||||
ZoomFocus str2zoomfocus(const std::string &);
|
||||
|
||||
|
|
@ -114,11 +94,7 @@ enum DisplayControl {
|
|||
#include "editing_syms.h"
|
||||
};
|
||||
|
||||
#undef DISPLAYCONTROL
|
||||
#define DISPLAYCONTROL(s) #s,
|
||||
static const char *displaycontrolstrs[] = {
|
||||
#include "editing_syms.h"
|
||||
};
|
||||
extern const char *displaycontrolstrs[];
|
||||
inline const char* enum2str(DisplayControl m) {return displaycontrolstrs[m];}
|
||||
DisplayControl str2displaycontrol (const std::string &);
|
||||
|
||||
|
|
@ -132,11 +108,7 @@ enum ImportMode {
|
|||
#include "editing_syms.h"
|
||||
};
|
||||
|
||||
#undef IMPORTMODE
|
||||
#define IMPORTMODE(s) #s,
|
||||
static const char *importmodestrs[] = {
|
||||
#include "editing_syms.h"
|
||||
};
|
||||
extern const char *importmodestrs[];
|
||||
inline const char* enum2str(ImportMode m) {return importmodestrs[m];}
|
||||
ImportMode str2importmode (const std::string &);
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
#include "selection.h"
|
||||
#include "audio_streamview.h"
|
||||
#include "time_axis_view.h"
|
||||
#include "audio_time_axis.h"
|
||||
#include "utils.h"
|
||||
#include "crossfade_view.h"
|
||||
#include "editing.h"
|
||||
|
|
@ -98,7 +99,7 @@ const double Editor::timebar_height = 15.0;
|
|||
|
||||
#include "editor_xpms"
|
||||
|
||||
static const gchar *snap_type_strings[] = {
|
||||
static const gchar *_snap_type_strings[] = {
|
||||
N_("None"),
|
||||
N_("CD Frames"),
|
||||
N_("SMPTE Frames"),
|
||||
|
|
@ -122,13 +123,13 @@ static const gchar *snap_type_strings[] = {
|
|||
0
|
||||
};
|
||||
|
||||
static const gchar *snap_mode_strings[] = {
|
||||
N_("Normal Snap"),
|
||||
N_("Magnetic Snap"),
|
||||
static const gchar *_snap_mode_strings[] = {
|
||||
N_("Normal"),
|
||||
N_("Magnetic"),
|
||||
0
|
||||
};
|
||||
|
||||
static const gchar *zoom_focus_strings[] = {
|
||||
static const gchar *_zoom_focus_strings[] = {
|
||||
N_("Left"),
|
||||
N_("Right"),
|
||||
N_("Center"),
|
||||
|
|
@ -177,7 +178,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
|
||||
minsec_label (_("Mins:Secs")),
|
||||
bbt_label (_("Bars:Beats")),
|
||||
smpte_label (_("SMPTE")),
|
||||
smpte_label (_("Timecode")),
|
||||
frame_label (_("Frames")),
|
||||
tempo_label (_("Tempo")),
|
||||
meter_label (_("Meter")),
|
||||
|
|
@ -240,6 +241,10 @@ Editor::Editor (AudioEngine& eng)
|
|||
current_mixer_strip = 0;
|
||||
current_bbt_points = 0;
|
||||
|
||||
snap_type_strings = I18N (_snap_type_strings);
|
||||
snap_mode_strings = I18N (_snap_mode_strings);
|
||||
zoom_focus_strings = I18N(_zoom_focus_strings);
|
||||
|
||||
snap_type = SnapToFrame;
|
||||
set_snap_to (snap_type);
|
||||
snap_mode = SnapNormal;
|
||||
|
|
@ -285,6 +290,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
transport_marker_menu = 0;
|
||||
new_transport_marker_menu = 0;
|
||||
editor_mixer_strip_width = Wide;
|
||||
show_editor_mixer_when_tracks_arrive = false;
|
||||
repos_zoom_queued = false;
|
||||
region_edit_menu_split_item = 0;
|
||||
temp_location = 0;
|
||||
|
|
@ -302,6 +308,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
edit_cursor = 0;
|
||||
playhead_cursor = 0;
|
||||
button_release_can_deselect = true;
|
||||
canvas_idle_queued = false;
|
||||
|
||||
location_marker_color = color_map[cLocationMarker];
|
||||
location_range_color = color_map[cLocationRange];
|
||||
|
|
@ -511,7 +518,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
edit_group_display.signal_button_press_event().connect (mem_fun(*this, &Editor::edit_group_list_button_press_event), false);
|
||||
|
||||
VBox* edit_group_display_packer = manage (new VBox());
|
||||
HButtonBox* edit_group_display_button_box = manage (new HButtonBox());
|
||||
HBox* edit_group_display_button_box = manage (new HBox());
|
||||
edit_group_display_button_box->set_homogeneous (true);
|
||||
|
||||
Button* edit_group_add_button = manage (new Button ());
|
||||
|
|
@ -546,7 +553,6 @@ Editor::Editor (AudioEngine& eng)
|
|||
region_list_display.set_model (region_list_model);
|
||||
region_list_display.append_column (_("Regions"), region_list_columns.name);
|
||||
region_list_display.set_headers_visible (false);
|
||||
region_list_display.set_hover_expand (true);
|
||||
|
||||
region_list_display.get_selection()->set_select_function (mem_fun (*this, &Editor::region_list_selection_filter));
|
||||
|
||||
|
|
@ -632,6 +638,8 @@ Editor::Editor (AudioEngine& eng)
|
|||
the_notebook.popup_enable ();
|
||||
the_notebook.set_tab_pos (Gtk::POS_RIGHT);
|
||||
|
||||
post_maximal_editor_width = 0;
|
||||
post_maximal_pane_position = 0;
|
||||
edit_pane.pack1 (edit_packer, true, true);
|
||||
edit_pane.pack2 (the_notebook, false, true);
|
||||
|
||||
|
|
@ -1116,6 +1124,7 @@ Editor::connect_to_session (Session *t)
|
|||
update_title ();
|
||||
|
||||
session->GoingAway.connect (mem_fun(*this, &Editor::session_going_away));
|
||||
session->history().Changed.connect (mem_fun (*this, &Editor::history_changed));
|
||||
|
||||
/* These signals can all be emitted by a non-GUI thread. Therefore the
|
||||
handlers for them must not attempt to directly interact with the GUI,
|
||||
|
|
@ -1308,7 +1317,6 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
|
|||
}
|
||||
|
||||
MenuList& items (fade_context_menu.items());
|
||||
AudioRegion& ar (*arv->audio_region().get()); // FIXME
|
||||
|
||||
items.clear ();
|
||||
|
||||
|
|
@ -1323,11 +1331,11 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
|
|||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
items.push_back (MenuElem (_("Linear"), bind (mem_fun (ar, &AudioRegion::set_fade_in_shape), AudioRegion::Linear)));
|
||||
items.push_back (MenuElem (_("Slowest"), bind (mem_fun (ar, &AudioRegion::set_fade_in_shape), AudioRegion::LogB)));
|
||||
items.push_back (MenuElem (_("Slow"), bind (mem_fun (ar, &AudioRegion::set_fade_in_shape), AudioRegion::Fast)));
|
||||
items.push_back (MenuElem (_("Fast"), bind (mem_fun (ar, &AudioRegion::set_fade_in_shape), AudioRegion::LogA)));
|
||||
items.push_back (MenuElem (_("Fastest"), bind (mem_fun (ar, &AudioRegion::set_fade_in_shape), AudioRegion::Slow)));
|
||||
items.push_back (MenuElem (_("Linear"), bind (mem_fun (*arv, &AudioRegionView::set_fade_in_shape), AudioRegion::Linear)));
|
||||
items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*arv, &AudioRegionView::set_fade_in_shape), AudioRegion::LogB)));
|
||||
items.push_back (MenuElem (_("Slow"), bind (mem_fun (*arv, &AudioRegionView::set_fade_in_shape), AudioRegion::Fast)));
|
||||
items.push_back (MenuElem (_("Fast"), bind (mem_fun (*arv, &AudioRegionView::set_fade_in_shape), AudioRegion::LogA)));
|
||||
items.push_back (MenuElem (_("Fastest"), bind (mem_fun (*arv, &AudioRegionView::set_fade_in_shape), AudioRegion::Slow)));
|
||||
break;
|
||||
|
||||
case FadeOutItem:
|
||||
|
|
@ -1340,13 +1348,14 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
|
|||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
items.push_back (MenuElem (_("Linear"), bind (mem_fun (ar, &AudioRegion::set_fade_out_shape), AudioRegion::Linear)));
|
||||
items.push_back (MenuElem (_("Slowest"), bind (mem_fun (ar, &AudioRegion::set_fade_out_shape), AudioRegion::Fast)));
|
||||
items.push_back (MenuElem (_("Slow"), bind (mem_fun (ar, &AudioRegion::set_fade_out_shape), AudioRegion::LogB)));
|
||||
items.push_back (MenuElem (_("Fast"), bind (mem_fun (ar, &AudioRegion::set_fade_out_shape), AudioRegion::LogA)));
|
||||
items.push_back (MenuElem (_("Fastest"), bind (mem_fun (ar, &AudioRegion::set_fade_out_shape), AudioRegion::Slow)));
|
||||
items.push_back (MenuElem (_("Linear"), bind (mem_fun (*arv, &AudioRegionView::set_fade_out_shape), AudioRegion::Linear)));
|
||||
items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*arv, &AudioRegionView::set_fade_out_shape), AudioRegion::Fast)));
|
||||
items.push_back (MenuElem (_("Slow"), bind (mem_fun (*arv, &AudioRegionView::set_fade_out_shape), AudioRegion::LogB)));
|
||||
items.push_back (MenuElem (_("Fast"), bind (mem_fun (*arv, &AudioRegionView::set_fade_out_shape), AudioRegion::LogA)));
|
||||
items.push_back (MenuElem (_("Fastest"), bind (mem_fun (*arv, &AudioRegionView::set_fade_out_shape), AudioRegion::Slow)));
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
fatal << _("programming error: ")
|
||||
<< X_("non-fade canvas item passed to popup_fade_context_menu()")
|
||||
|
|
@ -1691,7 +1700,7 @@ Editor::add_region_context_items (AudioStreamView* sv, boost::shared_ptr<Region>
|
|||
become selected.
|
||||
*/
|
||||
|
||||
region_menu->signal_map_event().connect (bind (mem_fun(*this, &Editor::set_selected_regionview_from_map_event), sv, boost::weak_ptr<Region>(region)));
|
||||
// region_menu->signal_map_event().connect (bind (mem_fun(*this, &Editor::set_selected_regionview_from_map_event), sv, boost::weak_ptr<Region>(region)));
|
||||
|
||||
items.push_back (MenuElem (_("Popup region editor"), mem_fun(*this, &Editor::edit_region)));
|
||||
items.push_back (MenuElem (_("Raise to top layer"), mem_fun(*this, &Editor::raise_region_to_top)));
|
||||
|
|
@ -1711,32 +1720,50 @@ Editor::add_region_context_items (AudioStreamView* sv, boost::shared_ptr<Region>
|
|||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
/* XXX hopefully this nonsense will go away with SigC++ 2.X, where the compiler
|
||||
might be able to figure out which overloaded member function to use in
|
||||
a bind() call ...
|
||||
*/
|
||||
|
||||
void (Editor::*type_A_pmf)(void (Region::*pmf)(bool), bool) = &Editor::region_selection_op;
|
||||
|
||||
items.push_back (MenuElem (_("Lock"), bind (mem_fun(*this, type_A_pmf), &Region::set_locked, true)));
|
||||
items.push_back (MenuElem (_("Unlock"), bind (mem_fun(*this, type_A_pmf), &Region::set_locked, false)));
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
if (region->muted()) {
|
||||
items.push_back (MenuElem (_("Unmute"), bind (mem_fun(*this, type_A_pmf), &Region::set_muted, false)));
|
||||
} else {
|
||||
items.push_back (MenuElem (_("Mute"), bind (mem_fun(*this, type_A_pmf), &Region::set_muted, true)));
|
||||
items.push_back (CheckMenuElem (_("Lock"), mem_fun(*this, &Editor::toggle_region_lock)));
|
||||
region_lock_item = static_cast<CheckMenuItem*>(&items.back());
|
||||
if (region->locked()) {
|
||||
region_lock_item->set_active();
|
||||
}
|
||||
items.push_back (CheckMenuElem (_("Mute"), mem_fun(*this, &Editor::toggle_region_mute)));
|
||||
region_mute_item = static_cast<CheckMenuItem*>(&items.back());
|
||||
if (region->muted()) {
|
||||
region_mute_item->set_active();
|
||||
}
|
||||
items.push_back (CheckMenuElem (_("Opaque"), mem_fun(*this, &Editor::toggle_region_opaque)));
|
||||
region_opaque_item = static_cast<CheckMenuItem*>(&items.back());
|
||||
if (region->opaque()) {
|
||||
region_opaque_item->set_active();
|
||||
}
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
items.push_back (MenuElem (_("Original position"), mem_fun(*this, &Editor::naturalize)));
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (CheckMenuElem (_("Original position"), mem_fun(*this, &Editor::naturalize)));
|
||||
if (region->at_natural_position()) {
|
||||
items.back().set_sensitive (false);
|
||||
}
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
if (ar) {
|
||||
|
||||
RegionView* rv = sv->find_view (ar);
|
||||
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(rv);
|
||||
|
||||
items.push_back (MenuElem (_("Reset Envelope"), mem_fun(*this, &Editor::reset_region_gain_envelopes)));
|
||||
|
||||
items.push_back (CheckMenuElem (_("Envelope Visible"), mem_fun(*this, &Editor::toggle_gain_envelope_visibility)));
|
||||
region_envelope_visible_item = static_cast<CheckMenuItem*> (&items.back());
|
||||
|
||||
if (arv->envelope_visible()) {
|
||||
region_envelope_visible_item->set_active (true);
|
||||
}
|
||||
|
||||
items.push_back (CheckMenuElem (_("Envelope Active"), mem_fun(*this, &Editor::toggle_gain_envelope_active)));
|
||||
region_envelope_active_item = static_cast<CheckMenuItem*> (&items.back());
|
||||
|
||||
if (ar->envelope_active()) {
|
||||
region_envelope_active_item->set_active (true);
|
||||
}
|
||||
|
||||
items.push_back (MenuElem (_("Toggle envelope visibility"), mem_fun(*this, &Editor::toggle_gain_envelope_visibility)));
|
||||
items.push_back (MenuElem (_("Toggle envelope active"), mem_fun(*this, &Editor::toggle_gain_envelope_active)));
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
if (ar->scale_amplitude() != 1.0f) {
|
||||
|
|
@ -1752,7 +1779,7 @@ Editor::add_region_context_items (AudioStreamView* sv, boost::shared_ptr<Region>
|
|||
/* range related stuff */
|
||||
|
||||
items.push_back (MenuElem (_("Add Range Markers"), mem_fun (*this, &Editor::add_location_from_audio_region)));
|
||||
items.push_back (MenuElem (_("Set Range"), mem_fun (*this, &Editor::set_selection_from_audio_region)));
|
||||
items.push_back (MenuElem (_("Set Range Selection"), mem_fun (*this, &Editor::set_selection_from_audio_region)));
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
/* Nudge region */
|
||||
|
|
@ -1789,8 +1816,6 @@ Editor::add_region_context_items (AudioStreamView* sv, boost::shared_ptr<Region>
|
|||
items.push_back (MenuElem (_("Fill Track"), (mem_fun(*this, &Editor::region_fill_track))));
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::remove_clicked_region)));
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Destroy"), mem_fun(*this, &Editor::destroy_clicked_region)));
|
||||
|
||||
/* OK, stick the region submenu at the top of the list, and then add
|
||||
the standard items.
|
||||
|
|
@ -1861,7 +1886,7 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items)
|
|||
MenuList& play_items = play_menu->items();
|
||||
play_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
play_items.push_back (MenuElem (_("Play from edit cursor")));
|
||||
play_items.push_back (MenuElem (_("Play from edit cursor"), mem_fun(*this, &Editor::play_from_edit_cursor)));
|
||||
play_items.push_back (MenuElem (_("Play from start"), mem_fun(*this, &Editor::play_from_start)));
|
||||
play_items.push_back (MenuElem (_("Play region"), mem_fun(*this, &Editor::play_selected_region)));
|
||||
play_items.push_back (SeparatorElem());
|
||||
|
|
@ -1946,7 +1971,7 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items)
|
|||
MenuList& play_items = play_menu->items();
|
||||
play_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
play_items.push_back (MenuElem (_("Play from edit cursor")));
|
||||
play_items.push_back (MenuElem (_("Play from edit cursor"), mem_fun(*this, &Editor::play_from_edit_cursor)));
|
||||
play_items.push_back (MenuElem (_("Play from start"), mem_fun(*this, &Editor::play_from_start)));
|
||||
edit_items.push_back (MenuElem (_("Play"), *play_menu));
|
||||
|
||||
|
|
@ -1995,10 +2020,13 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items)
|
|||
|
||||
void
|
||||
Editor::set_snap_to (SnapType st)
|
||||
{
|
||||
{
|
||||
snap_type = st;
|
||||
vector<string> txt = internationalize (snap_type_strings);
|
||||
snap_type_selector.set_active_text (txt[(int)st]);
|
||||
string str = snap_type_strings[(int) st];
|
||||
|
||||
if (str != snap_type_selector.get_active_text()) {
|
||||
snap_type_selector.set_active_text (str);
|
||||
}
|
||||
|
||||
instant_save ();
|
||||
|
||||
|
|
@ -2019,8 +2047,11 @@ void
|
|||
Editor::set_snap_mode (SnapMode mode)
|
||||
{
|
||||
snap_mode = mode;
|
||||
vector<string> txt = internationalize (snap_mode_strings);
|
||||
snap_mode_selector.set_active_text (txt[(int)mode]);
|
||||
string str = snap_mode_strings[(int)mode];
|
||||
|
||||
if (str != snap_mode_selector.get_active_text ()) {
|
||||
snap_mode_selector.set_active_text (str);
|
||||
}
|
||||
|
||||
instant_save ();
|
||||
}
|
||||
|
|
@ -2147,6 +2178,7 @@ Editor::set_state (const XMLNode& node)
|
|||
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
|
||||
if (act) {
|
||||
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
bool yn = (prop->value() == X_("yes"));
|
||||
|
||||
|
|
@ -2584,10 +2616,10 @@ Editor::setup_toolbar ()
|
|||
zoom_box.pack_start (zoom_out_full_button, false, false);
|
||||
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (zoom_range_clock, _("Current Zoom Range\n(Width of visible area)"));
|
||||
|
||||
|
||||
zoom_focus_selector.set_name ("ZoomFocusSelector");
|
||||
Gtkmm2ext::set_size_request_to_display_given_text (zoom_focus_selector, "Focus Center", 2+FUDGE, 0);
|
||||
set_popdown_strings (zoom_focus_selector, internationalize (zoom_focus_strings));
|
||||
set_popdown_strings (zoom_focus_selector, zoom_focus_strings);
|
||||
zoom_focus_selector.signal_changed().connect (mem_fun(*this, &Editor::zoom_focus_selection_done));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (zoom_focus_selector, _("Zoom focus"));
|
||||
|
||||
|
|
@ -2601,13 +2633,13 @@ Editor::setup_toolbar ()
|
|||
|
||||
snap_type_selector.set_name ("SnapTypeSelector");
|
||||
Gtkmm2ext::set_size_request_to_display_given_text (snap_type_selector, "SMPTE Seconds", 2+FUDGE, 10);
|
||||
set_popdown_strings (snap_type_selector, internationalize (snap_type_strings));
|
||||
set_popdown_strings (snap_type_selector, snap_type_strings);
|
||||
snap_type_selector.signal_changed().connect (mem_fun(*this, &Editor::snap_type_selection_done));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (snap_type_selector, _("Unit to snap cursors and ranges to"));
|
||||
|
||||
snap_mode_selector.set_name ("SnapModeSelector");
|
||||
Gtkmm2ext::set_size_request_to_display_given_text (snap_mode_selector, "Magnetic Snap", 2+FUDGE, 10);
|
||||
set_popdown_strings (snap_mode_selector, internationalize (snap_mode_strings));
|
||||
set_popdown_strings (snap_mode_selector, snap_mode_strings);
|
||||
snap_mode_selector.signal_changed().connect (mem_fun(*this, &Editor::snap_mode_selection_done));
|
||||
|
||||
snap_box.pack_start (edit_cursor_clock, false, false);
|
||||
|
|
@ -2819,33 +2851,36 @@ Editor::commit_reversible_command ()
|
|||
}
|
||||
|
||||
bool
|
||||
Editor::set_selected_track_from_click (bool press, Selection::Operation op, bool with_undo, bool no_remove)
|
||||
Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no_remove)
|
||||
{
|
||||
bool commit = false;
|
||||
|
||||
if (!clicked_axisview) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (op) {
|
||||
case Selection::Toggle:
|
||||
if (selection->selected (clicked_axisview)) {
|
||||
if (selection->selected (&view)) {
|
||||
if (!no_remove) {
|
||||
selection->remove (clicked_axisview);
|
||||
selection->remove (&view);
|
||||
commit = true;
|
||||
}
|
||||
} else {
|
||||
selection->add (clicked_axisview);
|
||||
selection->add (&view);
|
||||
commit = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case Selection::Add:
|
||||
if (!selection->selected (&view)) {
|
||||
selection->add (&view);
|
||||
commit = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Selection::Set:
|
||||
if (selection->selected (clicked_axisview) && selection->tracks.size() == 1) {
|
||||
if (selection->selected (&view) && selection->tracks.size() == 1) {
|
||||
/* no commit necessary */
|
||||
}
|
||||
|
||||
selection->set (clicked_axisview);
|
||||
selection->set (&view);
|
||||
break;
|
||||
|
||||
case Selection::Extend:
|
||||
|
|
@ -2857,7 +2892,17 @@ Editor::set_selected_track_from_click (bool press, Selection::Operation op, bool
|
|||
}
|
||||
|
||||
bool
|
||||
Editor::set_selected_control_point_from_click (bool press, Selection::Operation op, bool with_undo, bool no_remove)
|
||||
Editor::set_selected_track_from_click (Selection::Operation op, bool no_remove)
|
||||
{
|
||||
if (!clicked_routeview) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return set_selected_track (*clicked_routeview, op, no_remove);
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::set_selected_control_point_from_click (Selection::Operation op, bool no_remove)
|
||||
{
|
||||
if (!clicked_control_point) {
|
||||
return false;
|
||||
|
|
@ -2877,7 +2922,7 @@ Editor::set_selected_control_point_from_click (bool press, Selection::Operation
|
|||
}
|
||||
|
||||
void
|
||||
Editor::get_relevant_tracks (RouteTimeAxisView& base, set<RouteTimeAxisView*>& relevant_tracks)
|
||||
Editor::get_relevant_tracks (set<RouteTimeAxisView*>& relevant_tracks)
|
||||
{
|
||||
/* step one: get all selected tracks and all tracks in the relevant edit groups */
|
||||
|
||||
|
|
@ -2906,14 +2951,9 @@ Editor::get_relevant_tracks (RouteTimeAxisView& base, set<RouteTimeAxisView*>& r
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
/* no active group, or no group */
|
||||
|
||||
relevant_tracks.insert (&base);
|
||||
relevant_tracks.insert (atv);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2922,14 +2962,10 @@ Editor::mapover_tracks (slot<void,RouteTimeAxisView&,uint32_t> sl)
|
|||
{
|
||||
set<RouteTimeAxisView*> relevant_tracks;
|
||||
|
||||
if (!clicked_routeview) {
|
||||
return;
|
||||
}
|
||||
|
||||
get_relevant_tracks (*clicked_routeview, relevant_tracks);
|
||||
get_relevant_tracks (relevant_tracks);
|
||||
|
||||
uint32_t sz = relevant_tracks.size();
|
||||
|
||||
|
||||
for (set<RouteTimeAxisView*>::iterator ati = relevant_tracks.begin(); ati != relevant_tracks.end(); ++ati) {
|
||||
sl (**ati, sz);
|
||||
}
|
||||
|
|
@ -3117,7 +3153,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
|
|||
|
||||
set<RouteTimeAxisView*> relevant_tracks;
|
||||
|
||||
get_relevant_tracks (*clicked_routeview, relevant_tracks);
|
||||
get_relevant_tracks (relevant_tracks);
|
||||
|
||||
for (set<RouteTimeAxisView*>::iterator t = relevant_tracks.begin(); t != relevant_tracks.end(); ++t) {
|
||||
(*t)->get_selectables (first_frame, last_frame, -1.0, -1.0, results);
|
||||
|
|
@ -3192,6 +3228,9 @@ Editor::set_selected_regionview_from_region_list (boost::shared_ptr<Region> regi
|
|||
case Selection::Extend:
|
||||
selection->add (all_equivalent_regions);
|
||||
break;
|
||||
case Selection::Add:
|
||||
selection->add (all_equivalent_regions);
|
||||
break;
|
||||
}
|
||||
|
||||
commit_reversible_command () ;
|
||||
|
|
@ -3259,89 +3298,27 @@ Editor::set_edit_group_mute (Route& route, bool yn)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::set_edit_menu (Menu& menu)
|
||||
Editor::history_changed ()
|
||||
{
|
||||
edit_menu = &menu;
|
||||
edit_menu->signal_map_event().connect (mem_fun(*this, &Editor::edit_menu_map_handler));
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::edit_menu_map_handler (GdkEventAny* ev)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
MenuList& edit_items = edit_menu->items();
|
||||
string label;
|
||||
|
||||
/* Nuke all the old items */
|
||||
|
||||
edit_items.clear ();
|
||||
|
||||
if (session == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (session->undo_depth() == 0) {
|
||||
label = _("Undo");
|
||||
} else {
|
||||
label = string_compose(_("Undo (%1)"), session->next_undo());
|
||||
}
|
||||
|
||||
edit_items.push_back (MenuElem (label, bind (mem_fun(*this, &Editor::undo), 1U)));
|
||||
|
||||
if (session->undo_depth() == 0) {
|
||||
edit_items.back().set_sensitive (false);
|
||||
}
|
||||
|
||||
if (session->redo_depth() == 0) {
|
||||
label = _("Redo");
|
||||
} else {
|
||||
label = string_compose(_("Redo (%1)"), session->next_redo());
|
||||
}
|
||||
|
||||
edit_items.push_back (MenuElem (label, bind (mem_fun(*this, &Editor::redo), 1U)));
|
||||
if (session->redo_depth() == 0) {
|
||||
edit_items.back().set_sensitive (false);
|
||||
}
|
||||
|
||||
vector<MenuItem*> mitems;
|
||||
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Cut"), mem_fun(*this, &Editor::cut)));
|
||||
mitems.push_back (&edit_items.back());
|
||||
edit_items.push_back (MenuElem (_("Copy"), mem_fun(*this, &Editor::copy)));
|
||||
mitems.push_back (&edit_items.back());
|
||||
edit_items.push_back (MenuElem (_("Paste"), bind (mem_fun(*this, &Editor::paste), 1.0f)));
|
||||
mitems.push_back (&edit_items.back());
|
||||
edit_items.push_back (SeparatorElem());
|
||||
edit_items.push_back (MenuElem (_("Align"), bind (mem_fun(*this, &Editor::align), ARDOUR::SyncPoint)));
|
||||
mitems.push_back (&edit_items.back());
|
||||
edit_items.push_back (MenuElem (_("Align Relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::SyncPoint)));
|
||||
mitems.push_back (&edit_items.back());
|
||||
edit_items.push_back (SeparatorElem());
|
||||
|
||||
if (selection->empty()) {
|
||||
for (vector<MenuItem*>::iterator i = mitems.begin(); i != mitems.end(); ++i) {
|
||||
(*i)->set_sensitive (false);
|
||||
if (undo_action && session) {
|
||||
if (session->undo_depth() == 0) {
|
||||
label = _("Undo");
|
||||
} else {
|
||||
label = string_compose(_("Undo (%1)"), session->next_undo());
|
||||
}
|
||||
undo_action->property_label() = label;
|
||||
}
|
||||
|
||||
Menu* import_menu = manage (new Menu());
|
||||
import_menu->set_name ("ArdourContextMenu");
|
||||
MenuList& import_items = import_menu->items();
|
||||
|
||||
import_items.push_back (MenuElem (_("... as new track"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportAsTrack)));
|
||||
import_items.push_back (MenuElem (_("... as new region"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportAsRegion)));
|
||||
|
||||
edit_items.push_back (MenuElem (_("Import audio (copy)"), *import_menu));
|
||||
edit_items.push_back (SeparatorElem());
|
||||
|
||||
edit_items.push_back (MenuElem (_("Remove last capture"), mem_fun(*this, &Editor::remove_last_capture)));
|
||||
|
||||
if (!session->have_captured()) {
|
||||
edit_items.back().set_sensitive (false);
|
||||
if (redo_action && session) {
|
||||
if (session->redo_depth() == 0) {
|
||||
label = _("Redo");
|
||||
} else {
|
||||
label = string_compose(_("Redo (%1)"), session->next_redo());
|
||||
}
|
||||
redo_action->property_label() = label;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -3449,10 +3426,6 @@ Editor::edit_mode_selection_done ()
|
|||
void
|
||||
Editor::snap_type_selection_done ()
|
||||
{
|
||||
if (session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
string choice = snap_type_selector.get_active_text();
|
||||
SnapType snaptype = SnapToFrame;
|
||||
|
||||
|
|
@ -3498,35 +3471,34 @@ Editor::snap_type_selection_done ()
|
|||
snaptype = SnapToFrame;
|
||||
}
|
||||
|
||||
set_snap_to (snaptype);
|
||||
RefPtr<RadioAction> ract = snap_type_action (snaptype);
|
||||
if (ract) {
|
||||
ract->set_active ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::snap_mode_selection_done ()
|
||||
{
|
||||
if(session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
string choice = snap_mode_selector.get_active_text();
|
||||
SnapMode mode = SnapNormal;
|
||||
|
||||
if (choice == _("Normal Snap")) {
|
||||
if (choice == _("Normal")) {
|
||||
mode = SnapNormal;
|
||||
} else if (choice == _("Magnetic Snap")) {
|
||||
} else if (choice == _("Magnetic")) {
|
||||
mode = SnapMagnetic;
|
||||
}
|
||||
|
||||
set_snap_mode (mode);
|
||||
RefPtr<RadioAction> ract = snap_mode_action (mode);
|
||||
|
||||
if (ract) {
|
||||
ract->set_active (true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::zoom_focus_selection_done ()
|
||||
{
|
||||
if (session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
string choice = zoom_focus_selector.get_active_text();
|
||||
ZoomFocus focus_type = ZoomFocusLeft;
|
||||
|
||||
|
|
@ -3541,8 +3513,12 @@ Editor::zoom_focus_selection_done ()
|
|||
} else if (choice == _("Edit Cursor")) {
|
||||
focus_type = ZoomFocusEdit;
|
||||
}
|
||||
|
||||
RefPtr<RadioAction> ract = zoom_focus_action (focus_type);
|
||||
|
||||
set_zoom_focus (focus_type);
|
||||
if (ract) {
|
||||
ract->set_active ();
|
||||
}
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
@ -3673,8 +3649,11 @@ Editor::get_valid_views (TimeAxisView* track, RouteGroup* group)
|
|||
void
|
||||
Editor::set_zoom_focus (ZoomFocus f)
|
||||
{
|
||||
vector<string> txt = internationalize (zoom_focus_strings);
|
||||
zoom_focus_selector.set_active_text (txt[(int)f]);
|
||||
string str = zoom_focus_strings[(int)f];
|
||||
|
||||
if (str != zoom_focus_selector.get_active_text()) {
|
||||
zoom_focus_selector.set_active_text (str);
|
||||
}
|
||||
|
||||
if (zoom_focus != f) {
|
||||
zoom_focus = f;
|
||||
|
|
@ -3985,7 +3964,18 @@ Editor::redisplay_snapshots ()
|
|||
for (vector<string*>::iterator i = states->begin(); i != states->end(); ++i) {
|
||||
string statename = *(*i);
|
||||
TreeModel::Row row = *(snapshot_display_model->append());
|
||||
row[snapshot_display_columns.visible_name] = statename;
|
||||
|
||||
// we don't have a way of changing the rendering in just one TreeView
|
||||
// cell so just put an asterisk on each side of the name for now.
|
||||
string display_name;
|
||||
if (statename == session->snap_name()) {
|
||||
display_name = "*"+statename+"*";
|
||||
snapshot_display.get_selection()->select(row);
|
||||
} else {
|
||||
display_name = statename;
|
||||
}
|
||||
|
||||
row[snapshot_display_columns.visible_name] = display_name;
|
||||
row[snapshot_display_columns.real_name] = statename;
|
||||
}
|
||||
|
||||
|
|
@ -4002,24 +3992,48 @@ Editor::session_state_saved (string snap_name)
|
|||
void
|
||||
Editor::maximise_editing_space ()
|
||||
{
|
||||
initial_ruler_update_required = true;
|
||||
|
||||
mouse_mode_tearoff->set_visible (false);
|
||||
tools_tearoff->set_visible (false);
|
||||
|
||||
pre_maximal_pane_position = edit_pane.get_position();
|
||||
edit_pane.set_position (edit_pane.get_width());
|
||||
pre_maximal_editor_width = this->get_width();
|
||||
|
||||
if(post_maximal_pane_position == 0) {
|
||||
post_maximal_pane_position = edit_pane.get_width();
|
||||
}
|
||||
|
||||
|
||||
fullscreen();
|
||||
if(post_maximal_editor_width) {
|
||||
edit_pane.set_position (post_maximal_pane_position -
|
||||
abs(post_maximal_editor_width - pre_maximal_editor_width));
|
||||
} else {
|
||||
edit_pane.set_position (post_maximal_pane_position);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::restore_editing_space ()
|
||||
{
|
||||
mouse_mode_tearoff->set_visible (true);
|
||||
tools_tearoff->set_visible (true);
|
||||
initial_ruler_update_required = true;
|
||||
|
||||
edit_pane.set_position (pre_maximal_pane_position);
|
||||
// user changed width of pane during fullscreen
|
||||
if(post_maximal_pane_position != edit_pane.get_position()) {
|
||||
post_maximal_pane_position = edit_pane.get_position();
|
||||
}
|
||||
|
||||
unfullscreen();
|
||||
|
||||
mouse_mode_tearoff->set_visible (true);
|
||||
tools_tearoff->set_visible (true);
|
||||
post_maximal_editor_width = this->get_width();
|
||||
|
||||
|
||||
edit_pane.set_position (
|
||||
pre_maximal_pane_position + abs(this->get_width() - pre_maximal_editor_width)
|
||||
);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -174,8 +174,6 @@ class Editor : public PublicEditor
|
|||
|
||||
/* undo related */
|
||||
|
||||
void set_edit_menu (Gtk::Menu&);
|
||||
|
||||
nframes_t unit_to_frame (double unit) {
|
||||
return (nframes_t) rint (unit * frames_per_unit);
|
||||
}
|
||||
|
|
@ -244,11 +242,6 @@ class Editor : public PublicEditor
|
|||
void export_session();
|
||||
void export_selection();
|
||||
|
||||
/* this is what actually does it */
|
||||
|
||||
void export_audiofile (ARDOUR::AudioExportSpecification&);
|
||||
|
||||
/* */
|
||||
|
||||
void add_toplevel_controls (Gtk::Container&);
|
||||
|
||||
|
|
@ -355,12 +348,13 @@ class Editor : public PublicEditor
|
|||
PlaylistSelector* _playlist_selector;
|
||||
|
||||
void set_frames_per_unit (double);
|
||||
void frames_per_unit_modified ();
|
||||
|
||||
Editing::MouseMode mouse_mode;
|
||||
void mouse_insert (GdkEventButton *);
|
||||
|
||||
int post_maximal_editor_width;
|
||||
int post_maximal_pane_position;
|
||||
int pre_maximal_pane_position;
|
||||
int pre_maximal_editor_width;
|
||||
void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
|
||||
|
||||
Gtk::Notebook the_notebook;
|
||||
|
|
@ -419,7 +413,7 @@ class Editor : public PublicEditor
|
|||
CrossfadeView* clicked_crossfadeview;
|
||||
ControlPoint* clicked_control_point;
|
||||
|
||||
void get_relevant_tracks (RouteTimeAxisView& base, std::set<RouteTimeAxisView*>& relevant_tracks);
|
||||
void get_relevant_tracks (std::set<RouteTimeAxisView*>& relevant_tracks);
|
||||
void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl);
|
||||
|
||||
/* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */
|
||||
|
|
@ -436,8 +430,10 @@ class Editor : public PublicEditor
|
|||
|
||||
void catch_vanishing_regionview (RegionView *);
|
||||
|
||||
bool set_selected_control_point_from_click (bool press, Selection::Operation op = Selection::Set, bool with_undo = true, bool no_remove=false);
|
||||
bool set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool with_undo = true, bool no_remove=false);
|
||||
bool set_selected_track (TimeAxisView&, 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 (Selection::Operation op = Selection::Set, bool no_remove=false);
|
||||
bool set_selected_regionview_from_click (bool press, Selection::Operation op = Selection::Set, bool no_track_remove=false);
|
||||
|
||||
void set_selected_regionview_from_region_list (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set);
|
||||
|
|
@ -495,9 +491,6 @@ class Editor : public PublicEditor
|
|||
|
||||
bool verbose_cursor_on; // so far unused
|
||||
|
||||
void flush_track_canvas ();
|
||||
void flush_time_canvas ();
|
||||
|
||||
Gtk::EventBox time_canvas_event_box;
|
||||
Gtk::EventBox track_canvas_event_box;
|
||||
Gtk::EventBox time_button_event_box;
|
||||
|
|
@ -668,9 +661,6 @@ class Editor : public PublicEditor
|
|||
Gtk::Menu *edit_controls_left_menu;
|
||||
Gtk::Menu *edit_controls_right_menu;
|
||||
|
||||
void track_canvas_scroller_realized ();
|
||||
void time_canvas_scroller_realized ();
|
||||
|
||||
Gtk::VBox track_canvas_vbox;
|
||||
Gtk::VBox time_canvas_vbox;
|
||||
Gtk::VBox edit_controls_vbox;
|
||||
|
|
@ -807,9 +797,6 @@ class Editor : public PublicEditor
|
|||
|
||||
void update_current_screen ();
|
||||
|
||||
gint show_track_context_menu (GdkEventButton *);
|
||||
void hide_track_context_menu ();
|
||||
|
||||
void session_going_away ();
|
||||
|
||||
nframes_t cut_buffer_start;
|
||||
|
|
@ -828,8 +815,8 @@ class Editor : public PublicEditor
|
|||
|
||||
int ensure_cursor (nframes_t* pos);
|
||||
|
||||
void handle_new_region (boost::shared_ptr<ARDOUR::Region>);
|
||||
void handle_region_removed (boost::shared_ptr<ARDOUR::Region>);
|
||||
void handle_new_region (boost::weak_ptr<ARDOUR::Region>);
|
||||
void handle_region_removed (boost::weak_ptr<ARDOUR::Region>);
|
||||
void add_region_to_region_display (boost::shared_ptr<ARDOUR::Region>);
|
||||
void region_hidden (boost::shared_ptr<ARDOUR::Region>);
|
||||
void redisplay_regions ();
|
||||
|
|
@ -849,6 +836,7 @@ class Editor : public PublicEditor
|
|||
|
||||
void reset_point_selection ();
|
||||
void toggle_region_mute ();
|
||||
void toggle_region_lock ();
|
||||
void toggle_region_opaque ();
|
||||
void raise_region ();
|
||||
void raise_region_to_top ();
|
||||
|
|
@ -865,7 +853,6 @@ class Editor : public PublicEditor
|
|||
void align_selection_relative (ARDOUR::RegionPoint point, nframes_t position);
|
||||
void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
|
||||
void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
|
||||
void remove_some_regions ();
|
||||
void remove_clicked_region ();
|
||||
void destroy_clicked_region ();
|
||||
void edit_region ();
|
||||
|
|
@ -898,7 +885,6 @@ class Editor : public PublicEditor
|
|||
void keyboard_paste ();
|
||||
void keyboard_duplicate_region ();
|
||||
void keyboard_duplicate_selection ();
|
||||
void keyboard_nudge ();
|
||||
void keyboard_insert_region_list_selection ();
|
||||
|
||||
void region_from_selection ();
|
||||
|
|
@ -912,7 +898,6 @@ class Editor : public PublicEditor
|
|||
void play_from_edit_cursor ();
|
||||
void play_selected_region ();
|
||||
void audition_selected_region ();
|
||||
void toggle_loop_playback ();
|
||||
void loop_selected_region ();
|
||||
void play_location (ARDOUR::Location&);
|
||||
void loop_location (ARDOUR::Location&);
|
||||
|
|
@ -1030,10 +1015,6 @@ class Editor : public PublicEditor
|
|||
Editing::SnapMode snap_mode;
|
||||
double snap_threshold;
|
||||
|
||||
void soundfile_chosen_for_insert (const string & selection, bool split_channels);
|
||||
void soundfile_chosen_for_embed (const string & selection, bool split_channels);
|
||||
void soundfile_chosen_for_import (const string & selection, bool split_channels);
|
||||
|
||||
void handle_gui_changes (const string &, void *);
|
||||
|
||||
void hide_all_tracks (bool with_select);
|
||||
|
|
@ -1058,7 +1039,6 @@ class Editor : public PublicEditor
|
|||
std::set<ARDOUR::Playlist*> motion_frozen_playlists;
|
||||
void region_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
||||
void region_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
||||
void region_copy_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
||||
|
||||
void cursor_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
||||
void cursor_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
||||
|
|
@ -1146,11 +1126,10 @@ class Editor : public PublicEditor
|
|||
bool track_canvas_event (GdkEvent* event, ArdourCanvas::Item*);
|
||||
bool track_canvas_scroll (GdkEventScroll* event);
|
||||
|
||||
bool track_canvas_button_press_event (GdkEventButton *);
|
||||
bool track_canvas_button_release_event (GdkEventButton *);
|
||||
|
||||
Gtk::Allocation canvas_allocation;
|
||||
bool canvas_idle_queued;
|
||||
void track_canvas_allocate (Gtk::Allocation alloc);
|
||||
void time_canvas_allocate (Gtk::Allocation alloc);
|
||||
bool track_canvas_idle ();
|
||||
|
||||
void set_edit_cursor (GdkEvent* event);
|
||||
void set_playhead_cursor (GdkEvent* event);
|
||||
|
|
@ -1176,7 +1155,6 @@ class Editor : public PublicEditor
|
|||
void handle_new_duration ();
|
||||
void initialize_canvas ();
|
||||
void reset_scrolling_region (Gtk::Allocation* alloc = 0);
|
||||
void scroll_canvas ();
|
||||
|
||||
/* display control */
|
||||
|
||||
|
|
@ -1302,17 +1280,29 @@ class Editor : public PublicEditor
|
|||
Gtk::ComboBoxText snap_mode_selector;
|
||||
Gtk::HBox snap_box;
|
||||
|
||||
std::vector<std::string> snap_type_strings;
|
||||
std::vector<std::string> snap_mode_strings;
|
||||
|
||||
void snap_type_selection_done ();
|
||||
void snap_mode_selection_done ();
|
||||
|
||||
void snap_mode_chosen (Editing::SnapMode);
|
||||
void snap_type_chosen (Editing::SnapType);
|
||||
|
||||
Glib::RefPtr<Gtk::RadioAction> snap_type_action (Editing::SnapType);
|
||||
Glib::RefPtr<Gtk::RadioAction> snap_mode_action (Editing::SnapMode);
|
||||
|
||||
Gtk::ComboBoxText zoom_focus_selector;
|
||||
Gtk::VBox zoom_focus_box;
|
||||
Gtk::VBox zoom_focus_box;
|
||||
|
||||
std::vector<std::string> zoom_focus_strings;
|
||||
|
||||
void zoom_focus_selection_done ();
|
||||
void zoom_focus_chosen (Editing::ZoomFocus);
|
||||
|
||||
Glib::RefPtr<Gtk::RadioAction> zoom_focus_action (Editing::ZoomFocus);
|
||||
|
||||
Gtk::HBox zoom_box;
|
||||
|
||||
void update_zoom_indicator ();
|
||||
void zoom_adjustment_changed();
|
||||
|
||||
void edit_cursor_clock_changed();
|
||||
|
|
@ -1333,8 +1323,6 @@ class Editor : public PublicEditor
|
|||
void track_selection_changed ();
|
||||
void region_selection_changed ();
|
||||
void point_selection_changed ();
|
||||
void audio_track_selection_changed ();
|
||||
void line_selection_changed ();
|
||||
|
||||
enum SelectionOp {
|
||||
CreateSelection,
|
||||
|
|
@ -1423,7 +1411,6 @@ class Editor : public PublicEditor
|
|||
Glib::RefPtr<Gtk::ListStore> route_display_model;
|
||||
Glib::RefPtr<Gtk::TreeSelection> route_display_selection;
|
||||
|
||||
gint route_list_compare_func (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator);
|
||||
Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > route_list_display;
|
||||
Gtk::ScrolledWindow route_list_scroller;
|
||||
Gtk::Menu* route_list_menu;
|
||||
|
|
@ -1438,7 +1425,6 @@ class Editor : public PublicEditor
|
|||
void route_list_reordered (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* what);
|
||||
bool ignore_route_list_reorder;
|
||||
bool no_route_list_redisplay;
|
||||
void queue_route_list_reordered ();
|
||||
|
||||
void build_route_list_menu ();
|
||||
void show_route_list_menu ();
|
||||
|
|
@ -1486,9 +1472,6 @@ class Editor : public PublicEditor
|
|||
void new_edit_group ();
|
||||
void edit_group_list_button_clicked ();
|
||||
gint edit_group_list_button_press_event (GdkEventButton* ev);
|
||||
void edit_group_selection_changed ();
|
||||
void fake_add_edit_group (ARDOUR::RouteGroup* group);
|
||||
void fake_remove_edit_group (ARDOUR::RouteGroup* group);
|
||||
void add_edit_group (ARDOUR::RouteGroup* group);
|
||||
void remove_selected_edit_group ();
|
||||
void edit_groups_changed ();
|
||||
|
|
@ -1605,8 +1588,6 @@ class Editor : public PublicEditor
|
|||
UndoHistory visual_history;
|
||||
UndoTransaction current_visual_command;
|
||||
|
||||
void begin_reversible_visual_command (const string & cmd_name);
|
||||
void commit_reversible_visual_command ();
|
||||
|
||||
void update_title ();
|
||||
void update_title_s (const string & snapshot_name);
|
||||
|
|
@ -1645,11 +1626,6 @@ class Editor : public PublicEditor
|
|||
|
||||
void duplicate_dialog (bool for_region);
|
||||
|
||||
/* edit menu */
|
||||
|
||||
Gtk::Menu* edit_menu;
|
||||
bool edit_menu_map_handler (GdkEventAny*);
|
||||
|
||||
nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
|
||||
|
||||
void time_fx_motion (ArdourCanvas::Item*, GdkEvent*);
|
||||
|
|
@ -1691,6 +1667,7 @@ class Editor : public PublicEditor
|
|||
/* editor-mixer strip */
|
||||
|
||||
MixerStrip *current_mixer_strip;
|
||||
bool show_editor_mixer_when_tracks_arrive;
|
||||
Gtk::VBox current_mixer_strip_vbox;
|
||||
void cms_deleted ();
|
||||
void current_mixer_strip_hidden ();
|
||||
|
|
@ -1751,7 +1728,6 @@ class Editor : public PublicEditor
|
|||
void toggle_xfade_active (ARDOUR::Crossfade*);
|
||||
void toggle_xfade_length (ARDOUR::Crossfade*);
|
||||
void edit_xfade (ARDOUR::Crossfade*);
|
||||
void remove_xfade ();
|
||||
void xfade_edit_left_region ();
|
||||
void xfade_edit_right_region ();
|
||||
|
||||
|
|
@ -1797,10 +1773,23 @@ class Editor : public PublicEditor
|
|||
|
||||
void toggle_gain_envelope_visibility ();
|
||||
void toggle_gain_envelope_active ();
|
||||
void reset_region_gain_envelopes ();
|
||||
|
||||
Gtk::CheckMenuItem* region_envelope_visible_item;
|
||||
Gtk::CheckMenuItem* region_envelope_active_item;
|
||||
Gtk::CheckMenuItem* region_mute_item;
|
||||
Gtk::CheckMenuItem* region_lock_item;
|
||||
Gtk::CheckMenuItem* region_opaque_item;
|
||||
|
||||
bool on_key_press_event (GdkEventKey*);
|
||||
|
||||
void session_state_saved (string);
|
||||
|
||||
Glib::RefPtr<Gtk::Action> undo_action;
|
||||
Glib::RefPtr<Gtk::Action> redo_action;
|
||||
|
||||
void history_changed ();
|
||||
|
||||
};
|
||||
|
||||
#endif /* __ardour_editor_h__ */
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Editor::register_actions ()
|
|||
ActionManager::register_action (editor_actions, X_("Monitoring"), _("Monitoring"));
|
||||
ActionManager::register_action (editor_actions, X_("Autoconnect"), _("Autoconnect"));
|
||||
ActionManager::register_action (editor_actions, X_("Layering"), _("Layering"));
|
||||
ActionManager::register_action (editor_actions, X_("SMPTE"), _("SMPTE fps"));
|
||||
ActionManager::register_action (editor_actions, X_("Timecode"), _("Timecode fps"));
|
||||
ActionManager::register_action (editor_actions, X_("Pullup"), _("Pullup / Pulldown"));
|
||||
ActionManager::register_action (editor_actions, X_("addExistingAudioFiles"), _("Add Existing Audio"));
|
||||
|
||||
|
|
@ -201,9 +201,9 @@ Editor::register_actions ()
|
|||
act = ActionManager::register_action (editor_actions, "set-region-sync-position", _("Set Region Sync Position"), mem_fun(*this, &Editor::kbd_set_sync_position));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (editor_actions, "undo", _("Undo"), bind (mem_fun(*this, &Editor::undo), 1U));
|
||||
undo_action = act = ActionManager::register_action (editor_actions, "undo", _("Undo"), bind (mem_fun(*this, &Editor::undo), 1U));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (editor_actions, "redo", _("Redo"), bind (mem_fun(*this, &Editor::redo), 1U));
|
||||
redo_action = act = ActionManager::register_action (editor_actions, "redo", _("Redo"), bind (mem_fun(*this, &Editor::redo), 1U));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (editor_actions, "export-session", _("Export Session"), mem_fun(*this, &Editor::export_session));
|
||||
|
|
@ -258,15 +258,15 @@ Editor::register_actions ()
|
|||
Glib::RefPtr<ActionGroup> zoom_actions = ActionGroup::create (X_("Zoom"));
|
||||
RadioAction::Group zoom_group;
|
||||
|
||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-left", _("Zoom Focus Left"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusLeft));
|
||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-left", _("Zoom Focus Left"), bind (mem_fun(*this, &Editor::zoom_focus_chosen), Editing::ZoomFocusLeft));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-right", _("Zoom Focus Right"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusRight));
|
||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-right", _("Zoom Focus Right"), bind (mem_fun(*this, &Editor::zoom_focus_chosen), Editing::ZoomFocusRight));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-center", _("Zoom Focus Center"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusCenter));
|
||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-center", _("Zoom Focus Center"), bind (mem_fun(*this, &Editor::zoom_focus_chosen), Editing::ZoomFocusCenter));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-playhead", _("Zoom Focus Playhead"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusPlayhead));
|
||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-playhead", _("Zoom Focus Playhead"), bind (mem_fun(*this, &Editor::zoom_focus_chosen), Editing::ZoomFocusPlayhead));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-edit", _("Zoom Focus Edit"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusEdit));
|
||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-edit", _("Zoom Focus Edit"), bind (mem_fun(*this, &Editor::zoom_focus_chosen), Editing::ZoomFocusEdit));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
Glib::RefPtr<ActionGroup> mouse_mode_actions = ActionGroup::create (X_("MouseMode"));
|
||||
|
|
@ -278,31 +278,36 @@ Editor::register_actions ()
|
|||
ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-zoom", _("Zoom Tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseZoom, false));
|
||||
ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Timefx Tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseTimeFX, false));
|
||||
|
||||
ActionManager::register_action (editor_actions, X_("SnapTo"), _("Snap To"));
|
||||
ActionManager::register_action (editor_actions, X_("SnapMode"), _("Snap Mode"));
|
||||
|
||||
RadioAction::Group snap_mode_group;
|
||||
ActionManager::register_radio_action (editor_actions, snap_mode_group, X_("snap-normal"), _("Normal"), (bind (mem_fun(*this, &Editor::snap_mode_chosen), Editing::SnapNormal)));
|
||||
ActionManager::register_radio_action (editor_actions, snap_mode_group, X_("snap-magnetic"), _("Magnetic"), (bind (mem_fun(*this, &Editor::snap_mode_chosen), Editing::SnapMagnetic)));
|
||||
|
||||
Glib::RefPtr<ActionGroup> snap_actions = ActionGroup::create (X_("Snap"));
|
||||
RadioAction::Group snap_choice_group;
|
||||
|
||||
ActionManager::register_action (editor_actions, X_("SnapTo"), _("Snap To"));
|
||||
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-frame"), _("Snap to frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToFrame)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-cd-frame"), _("Snap to cd frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToCDFrame)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-frame"), _("Snap to SMPTE frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTEFrame)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-seconds"), _("Snap to SMPTE seconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTESeconds)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-minutes"), _("Snap to SMPTE minutes"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTEMinutes)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-seconds"), _("Snap to seconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSeconds)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-minutes"), _("Snap to minutes"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToMinutes)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("Snap to thirtyseconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAThirtysecondBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("Snap to asixteenthbeat"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToASixteenthBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-eighths"), _("Snap to eighths"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAEighthBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-quarters"), _("Snap to quarters"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAQuarterBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirds"), _("Snap to thirds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAThirdBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-beat"), _("Snap to beat"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-bar"), _("Snap to bar"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToBar)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-mark"), _("Snap to mark"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToMark)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-edit-cursor"), _("Snap to edit cursor"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToEditCursor)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-start"), _("Snap to region start"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionStart)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-end"), _("Snap to region end"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionEnd)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-sync"), _("Snap to region sync"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionSync)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-boundary"), _("Snap to region boundary"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionBoundary)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-frame"), _("Snap to frame"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToFrame)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-cd-frame"), _("Snap to cd frame"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToCDFrame)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-frame"), _("Snap to SMPTE frame"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSMPTEFrame)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-seconds"), _("Snap to SMPTE seconds"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSMPTESeconds)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-minutes"), _("Snap to SMPTE minutes"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSMPTEMinutes)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-seconds"), _("Snap to seconds"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSeconds)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-minutes"), _("Snap to minutes"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToMinutes)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("Snap to thirtyseconds"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToAThirtysecondBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("Snap to asixteenthbeat"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToASixteenthBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-eighths"), _("Snap to eighths"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToAEighthBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-quarters"), _("Snap to quarters"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToAQuarterBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirds"), _("Snap to thirds"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToAThirdBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-beat"), _("Snap to beat"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeat)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-bar"), _("Snap to bar"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBar)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-mark"), _("Snap to mark"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToMark)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-edit-cursor"), _("Snap to edit cursor"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToEditCursor)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-start"), _("Snap to region start"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionStart)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-end"), _("Snap to region end"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionEnd)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-sync"), _("Snap to region sync"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionSync)));
|
||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-boundary"), _("Snap to region boundary"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionBoundary)));
|
||||
|
||||
/* REGION LIST */
|
||||
|
||||
|
|
@ -625,6 +630,206 @@ Editor::set_layer_model (LayerModel model)
|
|||
}
|
||||
}
|
||||
|
||||
RefPtr<RadioAction>
|
||||
Editor::snap_type_action (SnapType type)
|
||||
{
|
||||
|
||||
const char* action = 0;
|
||||
RefPtr<Action> act;
|
||||
|
||||
switch (type) {
|
||||
case Editing::SnapToFrame:
|
||||
action = "snap-to-frame";
|
||||
break;
|
||||
case Editing::SnapToCDFrame:
|
||||
action = "snap-to-cd-frame";
|
||||
break;
|
||||
case Editing::SnapToSMPTEFrame:
|
||||
action = "snap-to-smpte-frame";
|
||||
break;
|
||||
case Editing::SnapToSMPTESeconds:
|
||||
action = "snap-to-smpte-seconds";
|
||||
break;
|
||||
case Editing::SnapToSMPTEMinutes:
|
||||
action = "snap-to-smpte-minutes";
|
||||
break;
|
||||
case Editing::SnapToSeconds:
|
||||
action = "snap-to-seconds";
|
||||
break;
|
||||
case Editing::SnapToMinutes:
|
||||
action = "snap-to-minutes";
|
||||
break;
|
||||
case Editing::SnapToAThirtysecondBeat:
|
||||
action = "snap-to-thirtyseconds";
|
||||
break;
|
||||
case Editing::SnapToASixteenthBeat:
|
||||
action = "snap-to-asixteenthbeat";
|
||||
break;
|
||||
case Editing::SnapToAEighthBeat:
|
||||
action = "snap-to-eighths";
|
||||
break;
|
||||
case Editing::SnapToAQuarterBeat:
|
||||
action = "snap-to-quarters";
|
||||
break;
|
||||
case Editing::SnapToAThirdBeat:
|
||||
action = "snap-to-thirds";
|
||||
break;
|
||||
case Editing::SnapToBeat:
|
||||
action = "snap-to-beat";
|
||||
break;
|
||||
case Editing::SnapToBar:
|
||||
action = "snap-to-bar";
|
||||
break;
|
||||
case Editing::SnapToMark:
|
||||
action = "snap-to-mark";
|
||||
break;
|
||||
case Editing::SnapToEditCursor:
|
||||
action = "snap-to-edit-cursor";
|
||||
break;
|
||||
case Editing::SnapToRegionStart:
|
||||
action = "snap-to-region-start";
|
||||
break;
|
||||
case Editing::SnapToRegionEnd:
|
||||
action = "snap-to-region-end";
|
||||
break;
|
||||
case Editing::SnapToRegionSync:
|
||||
action = "snap-to-region-sync";
|
||||
break;
|
||||
case Editing::SnapToRegionBoundary:
|
||||
action = "snap-to-region-boundary";
|
||||
break;
|
||||
default:
|
||||
fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible snap-to type", (int) type) << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
act = ActionManager::get_action (X_("Snap"), action);
|
||||
|
||||
if (act) {
|
||||
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
|
||||
return ract;
|
||||
|
||||
} else {
|
||||
error << string_compose (_("programming error: %1"), "Editor::snap_type_chosen could not find action to match type.") << endmsg;
|
||||
return RefPtr<RadioAction>();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::snap_type_chosen (SnapType type)
|
||||
{
|
||||
/* this is driven by a toggle on a radio group, and so is invoked twice,
|
||||
once for the item that became inactive and once for the one that became
|
||||
active.
|
||||
*/
|
||||
|
||||
RefPtr<RadioAction> ract = snap_type_action (type);
|
||||
|
||||
if (ract && ract->get_active()) {
|
||||
set_snap_to (type);
|
||||
}
|
||||
}
|
||||
|
||||
RefPtr<RadioAction>
|
||||
Editor::snap_mode_action (SnapMode mode)
|
||||
{
|
||||
const char* action = 0;
|
||||
RefPtr<Action> act;
|
||||
|
||||
switch (mode) {
|
||||
case Editing::SnapNormal:
|
||||
action = X_("snap-normal");
|
||||
break;
|
||||
case Editing::SnapMagnetic:
|
||||
action = X_("snap-magnetic");
|
||||
break;
|
||||
default:
|
||||
fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible snap mode type", (int) mode) << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
act = ActionManager::get_action (X_("Editor"), action);
|
||||
|
||||
if (act) {
|
||||
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
|
||||
return ract;
|
||||
|
||||
} else {
|
||||
error << string_compose (_("programming error: %1: %2"), "Editor::snap_mode_chosen could not find action to match mode.", action) << endmsg;
|
||||
return RefPtr<RadioAction> ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::snap_mode_chosen (SnapMode mode)
|
||||
{
|
||||
/* this is driven by a toggle on a radio group, and so is invoked twice,
|
||||
once for the item that became inactive and once for the one that became
|
||||
active.
|
||||
*/
|
||||
|
||||
RefPtr<RadioAction> ract = snap_mode_action (mode);
|
||||
|
||||
if (ract && ract->get_active()) {
|
||||
set_snap_mode (mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RefPtr<RadioAction>
|
||||
Editor::zoom_focus_action (ZoomFocus focus)
|
||||
{
|
||||
const char* action = 0;
|
||||
RefPtr<Action> act;
|
||||
|
||||
switch (focus) {
|
||||
case ZoomFocusLeft:
|
||||
action = X_("zoom-focus-left");
|
||||
break;
|
||||
case ZoomFocusRight:
|
||||
action = X_("zoom-focus-right");
|
||||
break;
|
||||
case ZoomFocusCenter:
|
||||
action = X_("zoom-focus-center");
|
||||
break;
|
||||
case ZoomFocusPlayhead:
|
||||
action = X_("zoom-focus-playhead");
|
||||
break;
|
||||
case ZoomFocusEdit:
|
||||
action = X_("zoom-focus-edit");
|
||||
break;
|
||||
default:
|
||||
fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible focus type", (int) focus) << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
act = ActionManager::get_action (X_("Zoom"), action);
|
||||
|
||||
if (act) {
|
||||
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
|
||||
return ract;
|
||||
} else {
|
||||
error << string_compose (_("programming error: %1: %2"), "Editor::zoom_focus_action could not find action to match focus.", action) << endmsg;
|
||||
}
|
||||
|
||||
return RefPtr<RadioAction> ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::zoom_focus_chosen (ZoomFocus focus)
|
||||
{
|
||||
/* this is driven by a toggle on a radio group, and so is invoked twice,
|
||||
once for the item that became inactive and once for the one that became
|
||||
active.
|
||||
*/
|
||||
|
||||
RefPtr<RadioAction> ract = zoom_focus_action (focus);
|
||||
|
||||
if (ract && ract->get_active()) {
|
||||
set_zoom_focus (focus);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::smpte_fps_chosen (Session::SmpteFormat format)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -270,7 +270,11 @@ Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool
|
|||
idspec += string_compose(":%1", n);
|
||||
|
||||
try {
|
||||
source = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createReadable (DataType::AUDIO, *session, idspec, (mode == ImportAsTrack ? AudioFileSource::Destructive : AudioFileSource::Flag (0))));
|
||||
source = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createReadable
|
||||
(DataType::AUDIO, *session, idspec,
|
||||
(mode == ImportAsTapeTrack ?
|
||||
AudioFileSource::Destructive :
|
||||
AudioFileSource::Flag (0))));
|
||||
sources.push_back(source);
|
||||
}
|
||||
|
||||
|
|
@ -285,7 +289,11 @@ Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool
|
|||
if (sources.empty()) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
if (sources[0]->natural_position() != 0) {
|
||||
pos = sources[0]->natural_position();
|
||||
}
|
||||
|
||||
region_name = PBD::basename_nosuffix (path);
|
||||
region_name += "-0";
|
||||
|
||||
|
|
|
|||
|
|
@ -275,9 +275,32 @@ Editor::initialize_canvas ()
|
|||
void
|
||||
Editor::track_canvas_allocate (Gtk::Allocation alloc)
|
||||
{
|
||||
canvas_allocation = alloc;
|
||||
|
||||
canvas_width = alloc.get_width();
|
||||
canvas_height = alloc.get_height();
|
||||
if (!initial_ruler_update_required) {
|
||||
if (!canvas_idle_queued) {
|
||||
/* call this first so that we do stuff before any pending redraw */
|
||||
Glib::signal_idle().connect (mem_fun (*this, &Editor::track_canvas_idle), false);
|
||||
canvas_idle_queued = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
initial_ruler_update_required = false;
|
||||
|
||||
track_canvas_idle ();
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::track_canvas_idle ()
|
||||
{
|
||||
|
||||
if (canvas_idle_queued) {
|
||||
canvas_idle_queued = false;
|
||||
}
|
||||
|
||||
canvas_width = canvas_allocation.get_width();
|
||||
canvas_height = canvas_allocation.get_height();
|
||||
|
||||
zoom_range_clock.set ((nframes_t) floor ((canvas_width * frames_per_unit)));
|
||||
edit_cursor->set_position (edit_cursor->current_frame);
|
||||
|
|
@ -319,18 +342,12 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
|
|||
transport_punchout_line->property_y2() = canvas_height;
|
||||
}
|
||||
|
||||
if (is_visible() && initial_ruler_update_required) {
|
||||
/*
|
||||
this is really dumb, but signal_size_allocate() gets emitted intermittently
|
||||
depending on whether the canvas contents are visible or not.
|
||||
we only want to do this once
|
||||
*/
|
||||
update_fixed_rulers();
|
||||
tempo_map_changed (Change (0));
|
||||
initial_ruler_update_required = false;
|
||||
}
|
||||
update_fixed_rulers();
|
||||
tempo_map_changed (Change (0));
|
||||
|
||||
Resized (); /* EMIT_SIGNAL */
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -925,7 +925,7 @@ Editor::update_loop_range_view (bool visibility)
|
|||
|
||||
Location* tll;
|
||||
|
||||
if (Config->get_auto_loop() && ((tll = transport_loop_location()) != 0)) {
|
||||
if (session->get_play_loop() && ((tll = transport_loop_location()) != 0)) {
|
||||
|
||||
double x1 = frame_to_pixel (tll->start());
|
||||
double x2 = frame_to_pixel (tll->end());
|
||||
|
|
|
|||
|
|
@ -49,15 +49,18 @@ Editor::cms_deleted ()
|
|||
void
|
||||
Editor::show_editor_mixer (bool yn)
|
||||
{
|
||||
show_editor_mixer_when_tracks_arrive = false;
|
||||
|
||||
if (yn) {
|
||||
|
||||
if (current_mixer_strip == 0) {
|
||||
|
||||
if (selection->tracks.empty()) {
|
||||
|
||||
if (track_views.empty()) {
|
||||
if (track_views.empty()) {
|
||||
show_editor_mixer_when_tracks_arrive = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
AudioTimeAxisView* atv;
|
||||
|
|
|
|||
|
|
@ -317,14 +317,14 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
|
|||
|
||||
switch (item_type) {
|
||||
case RegionItem:
|
||||
c1 = set_selected_track_from_click (press, op, true, true);
|
||||
c1 = set_selected_track_from_click (op, true);
|
||||
c2 = set_selected_regionview_from_click (press, op, true);
|
||||
commit = (c1 || c2);
|
||||
break;
|
||||
|
||||
case RegionViewNameHighlight:
|
||||
case RegionViewName:
|
||||
c1 = set_selected_track_from_click (press, op, true, true);
|
||||
c1 = set_selected_track_from_click (op, true);
|
||||
c2 = set_selected_regionview_from_click (press, op, true);
|
||||
commit = (c1 || c2);
|
||||
break;
|
||||
|
|
@ -332,17 +332,17 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
|
|||
case GainAutomationControlPointItem:
|
||||
case PanAutomationControlPointItem:
|
||||
case RedirectAutomationControlPointItem:
|
||||
c1 = set_selected_track_from_click (press, op, true, true);
|
||||
c2 = set_selected_control_point_from_click (press, op, false);
|
||||
c1 = set_selected_track_from_click (op, true);
|
||||
c2 = set_selected_control_point_from_click (op, false);
|
||||
commit = (c1 || c2);
|
||||
break;
|
||||
|
||||
case StreamItem:
|
||||
commit = set_selected_track_from_click (press, op, true, true);
|
||||
commit = set_selected_track_from_click (op, true);
|
||||
break;
|
||||
|
||||
case AutomationTrackItem:
|
||||
commit = set_selected_track_from_click (press, op, true, true);
|
||||
commit = set_selected_track_from_click (op, true);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -361,7 +361,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
|
|||
case StreamItem:
|
||||
case RegionItem:
|
||||
case AutomationTrackItem:
|
||||
commit = set_selected_track_from_click (press, op, true, true);
|
||||
commit = set_selected_track_from_click (op, true);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -1819,12 +1819,13 @@ Editor::fade_in_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* even
|
|||
}
|
||||
|
||||
begin_reversible_command (_("change fade in length"));
|
||||
XMLNode &before = arv->audio_region()->get_state();
|
||||
AutomationList& alist = arv->audio_region()->fade_in();
|
||||
XMLNode &before = alist.get_state();
|
||||
|
||||
arv->audio_region()->set_fade_in_length (fade_length);
|
||||
|
||||
XMLNode &after = arv->audio_region()->get_state();
|
||||
session->add_command(new MementoCommand<ARDOUR::AudioRegion>(*arv->audio_region().get(), &before, &after));
|
||||
XMLNode &after = alist.get_state();
|
||||
session->add_command(new MementoCommand<AutomationList>(alist, &before, &after));
|
||||
commit_reversible_command ();
|
||||
fade_in_drag_motion_callback (item, event);
|
||||
}
|
||||
|
|
@ -1914,12 +1915,13 @@ Editor::fade_out_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* eve
|
|||
}
|
||||
|
||||
begin_reversible_command (_("change fade out length"));
|
||||
XMLNode &before = arv->region()->get_state();
|
||||
AutomationList& alist = arv->audio_region()->fade_out();
|
||||
XMLNode &before = alist.get_state();
|
||||
|
||||
arv->audio_region()->set_fade_out_length (fade_length);
|
||||
|
||||
XMLNode &after = arv->region()->get_state();
|
||||
session->add_command(new MementoCommand<ARDOUR::Region>(*arv->region().get(), &before, &after));
|
||||
XMLNode &after = alist.get_state();
|
||||
session->add_command(new MementoCommand<AutomationList>(alist, &before, &after));
|
||||
commit_reversible_command ();
|
||||
|
||||
fade_out_drag_motion_callback (item, event);
|
||||
|
|
|
|||
|
|
@ -162,9 +162,9 @@ Editor::remove_clicked_region ()
|
|||
void
|
||||
Editor::destroy_clicked_region ()
|
||||
{
|
||||
int32_t selected = selection->regions.size();
|
||||
uint32_t selected = selection->regions.size();
|
||||
|
||||
if (!session || clicked_regionview == 0 && selected == 0) {
|
||||
if (!session || !selected) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ Do you really want to destroy %1 ?"),
|
|||
return;
|
||||
}
|
||||
|
||||
if (selected > 0) {
|
||||
if (selected) {
|
||||
list<boost::shared_ptr<Region> > r;
|
||||
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
|
|
@ -199,9 +199,6 @@ Do you really want to destroy %1 ?"),
|
|||
}
|
||||
|
||||
session->destroy_regions (r);
|
||||
|
||||
} else if (clicked_regionview) {
|
||||
session->destroy_region (clicked_regionview->region());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1088,7 +1085,7 @@ Editor::temporal_zoom (gdouble fpu)
|
|||
|
||||
case ZoomFocusEdit:
|
||||
/* try to keep the edit cursor in the center */
|
||||
if (edit_cursor->current_frame > leftmost_frame + (new_page/2)) {
|
||||
if (edit_cursor->current_frame > new_page/2) {
|
||||
leftmost_after_zoom = edit_cursor->current_frame - (new_page/2);
|
||||
} else {
|
||||
leftmost_after_zoom = 0;
|
||||
|
|
@ -1275,6 +1272,9 @@ Editor::select_all_in_track (Selection::Operation op)
|
|||
case Selection::Extend:
|
||||
/* not defined yet */
|
||||
break;
|
||||
case Selection::Add:
|
||||
selection->add (touched);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1291,6 +1291,7 @@ Editor::select_all (Selection::Operation op)
|
|||
}
|
||||
begin_reversible_command (_("select all"));
|
||||
switch (op) {
|
||||
case Selection::Add:
|
||||
case Selection::Toggle:
|
||||
selection->add (touched);
|
||||
break;
|
||||
|
|
@ -1348,6 +1349,7 @@ Editor::select_all_within (nframes_t start, nframes_t end, double top, double bo
|
|||
|
||||
begin_reversible_command (_("select all within"));
|
||||
switch (op) {
|
||||
case Selection::Add:
|
||||
case Selection::Toggle:
|
||||
cerr << "toggle\n";
|
||||
selection->add (touched);
|
||||
|
|
@ -1840,7 +1842,7 @@ Editor::toggle_playback (bool with_abort)
|
|||
|
||||
if (session->transport_rolling()) {
|
||||
session->request_stop (with_abort);
|
||||
if (Config->get_auto_loop()) {
|
||||
if (session->get_play_loop()) {
|
||||
session->request_play_loop (false);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1854,6 +1856,12 @@ Editor::play_from_start ()
|
|||
session->request_locate (session->current_start_frame(), true);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::play_from_edit_cursor ()
|
||||
{
|
||||
session->request_locate (edit_cursor->current_frame, true);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::play_selection ()
|
||||
{
|
||||
|
|
@ -1922,28 +1930,6 @@ Editor::loop_location (Location& location)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::toggle_region_mute ()
|
||||
{
|
||||
if (clicked_regionview) {
|
||||
clicked_regionview->region()->set_muted (!clicked_regionview->region()->muted());
|
||||
} else if (!selection->regions.empty()) {
|
||||
bool yn = ! (*selection->regions.begin())->region()->muted();
|
||||
selection->foreach_region (&Region::set_muted, yn);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::toggle_region_opaque ()
|
||||
{
|
||||
if (clicked_regionview) {
|
||||
clicked_regionview->region()->set_opaque (!clicked_regionview->region()->opaque());
|
||||
} else if (!selection->regions.empty()) {
|
||||
bool yn = ! (*selection->regions.begin())->region()->opaque();
|
||||
selection->foreach_region (&Region::set_opaque, yn);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::raise_region ()
|
||||
{
|
||||
|
|
@ -3340,7 +3326,7 @@ Editor::normalize_region ()
|
|||
continue;
|
||||
XMLNode &before = arv->region()->get_state();
|
||||
arv->audio_region()->normalize_to (0.0f);
|
||||
// session->add_command (new MementoCommand<Region>(*(arv->region().get()), &before, &arv->region()->get_state()));
|
||||
session->add_command (new MementoCommand<Region>(*(arv->region().get()), &before, &arv->region()->get_state()));
|
||||
}
|
||||
|
||||
commit_reversible_command ();
|
||||
|
|
@ -3488,13 +3474,40 @@ Editor::brush (nframes_t pos)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::reset_region_gain_envelopes ()
|
||||
{
|
||||
if (!session || selection->regions.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
session->begin_reversible_command (_("reset region gain"));
|
||||
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
|
||||
if (arv) {
|
||||
AutomationList& alist (arv->audio_region()->envelope());
|
||||
XMLNode& before (alist.get_state());
|
||||
|
||||
arv->audio_region()->set_default_envelope ();
|
||||
session->add_command (new MementoCommand<AutomationList>(arv->audio_region()->envelope(), &before, &alist.get_state()));
|
||||
}
|
||||
}
|
||||
|
||||
session->commit_reversible_command ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::toggle_gain_envelope_visibility ()
|
||||
{
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
|
||||
if (arv)
|
||||
arv->set_envelope_visible (!arv->envelope_visible());
|
||||
if (arv) {
|
||||
bool x = region_envelope_visible_item->get_active();
|
||||
if (x != arv->envelope_visible()) {
|
||||
arv->set_envelope_visible (x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3503,7 +3516,53 @@ Editor::toggle_gain_envelope_active ()
|
|||
{
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
|
||||
if (arv)
|
||||
arv->audio_region()->set_envelope_active (true);
|
||||
if (arv) {
|
||||
bool x = region_envelope_active_item->get_active();
|
||||
if (x != arv->audio_region()->envelope_active()) {
|
||||
arv->audio_region()->set_envelope_active (x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::toggle_region_lock ()
|
||||
{
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
|
||||
if (arv) {
|
||||
bool x = region_lock_item->get_active();
|
||||
if (x != arv->audio_region()->locked()) {
|
||||
arv->audio_region()->set_locked (x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::toggle_region_mute ()
|
||||
{
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
|
||||
if (arv) {
|
||||
bool x = region_mute_item->get_active();
|
||||
if (x != arv->audio_region()->muted()) {
|
||||
arv->audio_region()->set_muted (x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::toggle_region_opaque ()
|
||||
{
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
|
||||
if (arv) {
|
||||
bool x = region_opaque_item->get_active();
|
||||
if (x != arv->audio_region()->opaque()) {
|
||||
arv->audio_region()->set_opaque (x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,22 +48,27 @@ using namespace Glib;
|
|||
using namespace Editing;
|
||||
|
||||
void
|
||||
Editor::handle_region_removed (boost::shared_ptr<Region> region)
|
||||
Editor::handle_region_removed (boost::weak_ptr<Region> wregion)
|
||||
{
|
||||
ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_region_removed), region));
|
||||
ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_region_removed), wregion));
|
||||
redisplay_regions ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::handle_new_region (boost::shared_ptr<Region> region)
|
||||
Editor::handle_new_region (boost::weak_ptr<Region> wregion)
|
||||
{
|
||||
ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_new_region), region));
|
||||
ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_new_region), wregion));
|
||||
|
||||
/* don't copy region - the one we are being notified
|
||||
about belongs to the session, and so it will
|
||||
never be edited.
|
||||
*/
|
||||
add_region_to_region_display (region);
|
||||
|
||||
boost::shared_ptr<Region> region (wregion.lock());
|
||||
|
||||
if (region) {
|
||||
add_region_to_region_display (region);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -118,6 +118,10 @@ Editor::handle_new_route (Session::RouteList& routes)
|
|||
tv->GoingAway.connect (bind (mem_fun(*this, &Editor::remove_route), tv));
|
||||
}
|
||||
|
||||
if (show_editor_mixer_when_tracks_arrive) {
|
||||
show_editor_mixer (true);
|
||||
}
|
||||
|
||||
editor_mixer_button.set_sensitive(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,6 +138,34 @@ Editor::ruler_button_press (GdkEventButton* ev)
|
|||
ruler_grabbed_widget = grab_widget;
|
||||
}
|
||||
|
||||
gint x,y;
|
||||
Gdk::ModifierType state;
|
||||
|
||||
/* need to use the correct x,y, the event lies */
|
||||
time_canvas_event_box.get_window()->get_pointer (x, y, state);
|
||||
|
||||
nframes_t where = leftmost_frame + pixel_to_frame (x);
|
||||
|
||||
switch (ev->button) {
|
||||
case 1:
|
||||
/* transport playhead */
|
||||
snap_to (where);
|
||||
session->request_locate (where);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
/* edit cursor */
|
||||
if (snap_type != Editing::SnapToEditCursor) {
|
||||
snap_to (where);
|
||||
}
|
||||
edit_cursor->set_position (where);
|
||||
edit_cursor_clock.set (where);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -150,7 +178,6 @@ Editor::ruler_button_release (GdkEventButton* ev)
|
|||
/* need to use the correct x,y, the event lies */
|
||||
time_canvas_event_box.get_window()->get_pointer (x, y, state);
|
||||
|
||||
|
||||
ruler_pressed_button = 0;
|
||||
|
||||
if (session == 0) {
|
||||
|
|
@ -345,7 +372,7 @@ Editor::popup_ruler_menu (nframes_t where, ItemType t)
|
|||
mitem->set_active(true);
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (X_("SMPTE"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_smpte)));
|
||||
ruler_items.push_back (CheckMenuElem (X_("Timecode"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_smpte)));
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_metric_smpte]) {
|
||||
mitem->set_active(true);
|
||||
|
|
@ -1043,13 +1070,12 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
uint32_t magic_accent_number = 1;
|
||||
gint nmarks;
|
||||
char buf[64];
|
||||
gint n;
|
||||
gint n = 0;
|
||||
nframes_t pos;
|
||||
bool bar_helper_on = true;
|
||||
|
||||
BBT_Time next_beat;
|
||||
nframes_t next_beat_pos;
|
||||
nframes_t ilower = (nframes_t) floor (lower);
|
||||
|
||||
if ((desirable_marks = maxchars / 7) == 0) {
|
||||
return 0;
|
||||
|
|
@ -1091,7 +1117,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
beats = current_bbt_points->size() - bars;
|
||||
|
||||
/*Only show the bar helper if there aren't many bars on the screen */
|
||||
if (bars > 2) {
|
||||
if (bars > 1) {
|
||||
bar_helper_on = false;
|
||||
}
|
||||
|
||||
|
|
@ -1108,11 +1134,12 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
double position_of_helper;
|
||||
bool i_am_accented = false;
|
||||
bool we_need_ticks = false;
|
||||
bool helper_active = false;
|
||||
|
||||
position_of_helper = ilower + (30 * Editor::get_current_zoom ());
|
||||
position_of_helper = lower + (30 * Editor::get_current_zoom ());
|
||||
|
||||
if (desirable_marks >= (beats)) {
|
||||
nmarks = ((beats + 1) * bbt_beat_subdivision) + 1;
|
||||
nmarks = (beats * bbt_beat_subdivision) + 1;
|
||||
we_need_ticks = true;
|
||||
} else {
|
||||
nmarks = beats + 1;
|
||||
|
|
@ -1121,19 +1148,23 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks);
|
||||
|
||||
(*marks)[0].label = g_strdup(" ");
|
||||
(*marks)[0].position = ilower;
|
||||
(*marks)[0].position = lower;
|
||||
(*marks)[0].style = GtkCustomRulerMarkMicro;
|
||||
|
||||
for (n = 1, i = current_bbt_points->begin(); n < nmarks && i != current_bbt_points->end(); i++) {
|
||||
for (n = 1, i = current_bbt_points->begin(); n < nmarks && i != current_bbt_points->end(); ++i) {
|
||||
|
||||
if ((*i).frame < ilower && (bar_helper_on)) {
|
||||
if ((*i).frame < lower && (bar_helper_on)) {
|
||||
snprintf (buf, sizeof(buf), "<%" PRIu32 "|%" PRIu32, (*i).bar, (*i).beat);
|
||||
(*marks)[0].label = g_strdup (buf);
|
||||
helper_active = true;
|
||||
} else {
|
||||
|
||||
if ((*i).type == TempoMap::Bar) {
|
||||
(((*i).frame < position_of_helper) && bar_helper_on) ?
|
||||
snprintf (buf, sizeof(buf), " ") : snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
|
||||
if (((*i).frame < position_of_helper) && helper_active) {
|
||||
snprintf (buf, sizeof(buf), " ");
|
||||
} else {
|
||||
snprintf (buf, sizeof(buf), "%" PRIu32, (*i).bar);
|
||||
}
|
||||
(*marks)[n].label = g_strdup (buf);
|
||||
(*marks)[n].position = (*i).frame;
|
||||
(*marks)[n].style = GtkCustomRulerMarkMajor;
|
||||
|
|
@ -1157,7 +1188,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
|
||||
/* Add the tick marks */
|
||||
|
||||
if (we_need_ticks && (*i).type != TempoMap::Bar) {
|
||||
if (we_need_ticks && (*i).type == TempoMap::Beat) {
|
||||
|
||||
/* Find the next beat */
|
||||
|
||||
|
|
@ -1225,14 +1256,14 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
|
||||
/* we're in bar land */
|
||||
|
||||
if (desirable_marks < (uint32_t) (bars / 256)) {
|
||||
if (desirable_marks < (bars / 256)) {
|
||||
nmarks = 1;
|
||||
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks);
|
||||
snprintf (buf, sizeof(buf), "too many bars... (currently %" PRIu32 ")", bars );
|
||||
(*marks)[0].style = GtkCustomRulerMarkMajor;
|
||||
(*marks)[0].label = g_strdup (buf);
|
||||
(*marks)[0].position = ilower;
|
||||
} else if (desirable_marks < (uint32_t) (nmarks = (gint) (bars / 64))) {
|
||||
(*marks)[0].position = lower;
|
||||
} else if (desirable_marks < (uint32_t)(nmarks = (gint) (bars / 64) + 1)) {
|
||||
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks);
|
||||
for (n = 0, i = current_bbt_points->begin(); i != current_bbt_points->end() && n < nmarks; i++) {
|
||||
if ((*i).type == TempoMap::Bar) {
|
||||
|
|
@ -1254,7 +1285,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (desirable_marks < (uint32_t) (nmarks = (gint)(bars / 16))) {
|
||||
} else if (desirable_marks < (uint32_t)(nmarks = (bars / 16) + 1)) {
|
||||
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks);
|
||||
for (n = 0, i = current_bbt_points->begin(); i != current_bbt_points->end() && n < nmarks; i++) {
|
||||
if ((*i).type == TempoMap::Bar) {
|
||||
|
|
@ -1276,7 +1307,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (desirable_marks < (uint32_t) (nmarks = (gint)(bars / 4))){
|
||||
} else if (desirable_marks < (uint32_t)(nmarks = (bars / 4) + 1)){
|
||||
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks);
|
||||
for (n = 0, i = current_bbt_points->begin(); i != current_bbt_points->end() && n < nmarks; ++i) {
|
||||
if ((*i).type == TempoMap::Bar) {
|
||||
|
|
@ -1299,8 +1330,8 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
}
|
||||
}
|
||||
} else {
|
||||
nmarks = bars;
|
||||
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks);
|
||||
nmarks = bars + 1;
|
||||
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks );
|
||||
for (n = 0, i = current_bbt_points->begin(); i != current_bbt_points->end() && n < nmarks; i++) {
|
||||
if ((*i).type == TempoMap::Bar) {
|
||||
if ((*i).bar % 4 == 1) {
|
||||
|
|
@ -1320,7 +1351,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
}
|
||||
}
|
||||
}
|
||||
return nmarks;
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,6 +96,10 @@ Editor::draw_metric_marks (const Metrics& metrics)
|
|||
void
|
||||
Editor::tempo_map_changed (Change ignored)
|
||||
{
|
||||
if (!session) {
|
||||
return;
|
||||
}
|
||||
|
||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::tempo_map_changed), ignored));
|
||||
|
||||
BBT_Time previous_beat, next_beat; // the beats previous to the leftmost frame and after the rightmost frame
|
||||
|
|
@ -112,13 +116,13 @@ Editor::tempo_map_changed (Change ignored)
|
|||
previous_beat.ticks = 0;
|
||||
|
||||
if (session->tempo_map().meter_at(leftmost_frame + current_page_frames()).beats_per_bar () > next_beat.beats + 1) {
|
||||
next_beat.beats += 1;
|
||||
next_beat.beats += 1;
|
||||
} else {
|
||||
next_beat.bars += 1;
|
||||
next_beat.beats = 1;
|
||||
next_beat.bars += 1;
|
||||
next_beat.beats = 1;
|
||||
}
|
||||
next_beat.ticks = 0;
|
||||
|
||||
|
||||
if (current_bbt_points) {
|
||||
delete current_bbt_points;
|
||||
current_bbt_points = 0;
|
||||
|
|
@ -227,9 +231,9 @@ Editor::draw_measures ()
|
|||
case TempoMap::Beat:
|
||||
|
||||
if ((*i).beat == 1) {
|
||||
color = color_map[cMeasureLineBeat];
|
||||
} else {
|
||||
color = color_map[cMeasureLineBar];
|
||||
} else {
|
||||
color = color_map[cMeasureLineBeat];
|
||||
|
||||
if (beat_density > 2.0) {
|
||||
/* only draw beat lines if the gaps between beats are large.
|
||||
|
|
|
|||
|
|
@ -212,28 +212,28 @@ ExportDialog::ExportDialog(PublicEditor& e)
|
|||
takes a reference.
|
||||
*/
|
||||
|
||||
vector<string> pop_strings = internationalize(sample_rates);
|
||||
vector<string> pop_strings = I18N(sample_rates);
|
||||
Gtkmm2ext::set_popdown_strings (sample_rate_combo, pop_strings);
|
||||
sample_rate_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize(src_quality);
|
||||
pop_strings = I18N(src_quality);
|
||||
Gtkmm2ext::set_popdown_strings (src_quality_combo, pop_strings);
|
||||
src_quality_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize(dither_types);
|
||||
pop_strings = I18N(dither_types);
|
||||
Gtkmm2ext::set_popdown_strings (dither_type_combo, pop_strings);
|
||||
dither_type_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize(channel_strings);
|
||||
pop_strings = I18N(channel_strings);
|
||||
Gtkmm2ext::set_popdown_strings (channel_count_combo, pop_strings);
|
||||
channel_count_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize((const char **) sndfile_header_formats_strings);
|
||||
pop_strings = I18N((const char **) sndfile_header_formats_strings);
|
||||
Gtkmm2ext::set_popdown_strings (header_format_combo, pop_strings);
|
||||
header_format_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize((const char **) sndfile_bitdepth_formats_strings);
|
||||
pop_strings = I18N((const char **) sndfile_bitdepth_formats_strings);
|
||||
Gtkmm2ext::set_popdown_strings (bitdepth_format_combo, pop_strings);
|
||||
bitdepth_format_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize((const char **) sndfile_endian_formats_strings);
|
||||
pop_strings = I18N((const char **) sndfile_endian_formats_strings);
|
||||
Gtkmm2ext::set_popdown_strings (endian_format_combo, pop_strings);
|
||||
endian_format_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize(cue_file_types);
|
||||
pop_strings = I18N(cue_file_types);
|
||||
Gtkmm2ext::set_popdown_strings (cue_file_combo, pop_strings);
|
||||
cue_file_combo.set_active_text (pop_strings.front());
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
ExportRegionDialog::ExportRegionDialog (PublicEditor& editor, boost::shared_ptr<ARDOUR::Region> region)
|
||||
: ExportDialog(editor)
|
||||
{
|
||||
boost::shared_ptr<ARDOUR::AudioRegion> audio_region = boost::dynamic_pointer_cast<ARDOUR::AudioRegion>(region);
|
||||
audio_region = boost::dynamic_pointer_cast<ARDOUR::AudioRegion>(region);
|
||||
assert(audio_region);
|
||||
|
||||
do_not_allow_track_and_master_selection();
|
||||
|
|
|
|||
|
|
@ -123,8 +123,9 @@ FFTGraph::setWindowSize_internal(int windowSize)
|
|||
}
|
||||
|
||||
_logScale = (int *) malloc(sizeof(int) * _dataSize);
|
||||
float count = 0;
|
||||
for (int i = 0; i < _dataSize; i++) {
|
||||
_logScale[i] = (int)floor(log10( 1.0 + i * 9.0 / (double)_dataSize) * (double)scaleWidth);
|
||||
_logScale[i] = 0;
|
||||
}
|
||||
_plan = fftwf_plan_r2r_1d(_windowSize, _in, _out, FFTW_R2HC, FFTW_ESTIMATE);
|
||||
}
|
||||
|
|
@ -241,8 +242,11 @@ FFTGraph::draw_scales(Glib::RefPtr<Gdk::Window> window)
|
|||
int rate_at_pos = (int)((double)(SR/2) * (double)logscale_pos / (double)_dataSize);
|
||||
|
||||
char buf[32];
|
||||
snprintf(buf,32,"%dhz",rate_at_pos);
|
||||
|
||||
if (rate_at_pos < 1000)
|
||||
snprintf(buf,32,"%dHz",rate_at_pos);
|
||||
else
|
||||
snprintf(buf,32,"%dk",(int)floor( (float)rate_at_pos/(float)1000) );
|
||||
|
||||
std::string label = buf;
|
||||
|
||||
layout->set_text(label);
|
||||
|
|
@ -371,12 +375,22 @@ FFTGraph::on_size_request(Gtk::Requisition* requisition)
|
|||
if (_logScale != 0) {
|
||||
free(_logScale);
|
||||
}
|
||||
|
||||
_logScale = (int *) malloc(sizeof(int) * _dataSize);
|
||||
//cerr << "LogScale: " << endl;
|
||||
|
||||
float SR = 44100;
|
||||
float FFT_START = SR/(double)_dataSize;
|
||||
float FFT_END = SR/2.0;
|
||||
float FFT_RANGE = log( FFT_END / FFT_START);
|
||||
float pixel = 0;
|
||||
for (int i = 0; i < _dataSize; i++) {
|
||||
_logScale[i] = (int)floor(log10( 1.0 + i * 9.0 / (double)_dataSize) * (double)scaleWidth);
|
||||
//cerr << i << ":\t" << _logScale[i] << endl;
|
||||
float freq_at_bin = (SR/2.0) * ((double)i / (double)_dataSize);
|
||||
float freq_at_pixel = FFT_START * exp( FFT_RANGE * pixel / (double)scaleWidth );
|
||||
while (freq_at_bin > freq_at_pixel) {
|
||||
pixel++;
|
||||
freq_at_pixel = FFT_START * exp( FFT_RANGE * pixel / (double)scaleWidth );
|
||||
}
|
||||
_logScale[i] = floor(pixel);
|
||||
//printf("logscale at %d = %3.3f, freq_at_pixel %3.3f, freq_at_bin %3.3f, scaleWidth %d\n", i, pixel, freq_at_pixel, freq_at_bin, scaleWidth);
|
||||
}
|
||||
|
||||
requisition->width = width;;
|
||||
|
|
|
|||
|
|
@ -63,12 +63,10 @@ GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkE
|
|||
lines.front()->view_to_model_y (y);
|
||||
|
||||
_session.begin_reversible_command (_("add gain automation event"));
|
||||
|
||||
XMLNode &before = curve.get_state();
|
||||
XMLNode& before = curve.get_state();
|
||||
curve.add (when, y);
|
||||
XMLNode &after = curve.get_state();
|
||||
_session.add_command(new MementoCommand<ARDOUR::Curve>(curve, &before, &after));
|
||||
_session.commit_reversible_command ();
|
||||
XMLNode& after = curve.get_state();
|
||||
_session.commit_reversible_command (new MementoCommand<ARDOUR::Curve>(curve, &before, &after));
|
||||
_session.set_dirty ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define __ardour_gtk_gui_thread_h__
|
||||
|
||||
#include <gtkmm2ext/gtk_ui.h>
|
||||
#include <pbd/crossthread.h>
|
||||
|
||||
#define ENSURE_GUI_THREAD(slot) \
|
||||
if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {\
|
||||
|
|
@ -9,4 +10,8 @@
|
|||
return;\
|
||||
}
|
||||
|
||||
#define GTK_SAFE(theSlot) crossthread_safe (Gtkmm2ext::UI::instance()->thread_id(),\
|
||||
*Gtkmm2ext::UI::instance(), \
|
||||
(theSlot))
|
||||
|
||||
#endif /* __ardour_gtk_gui_thread_h__ */
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define __i18n_h__
|
||||
|
||||
#include <pbd/compose.h>
|
||||
#include <pbd/convert.h>
|
||||
#include "gettext.h"
|
||||
|
||||
#include <vector>
|
||||
|
|
@ -10,5 +11,6 @@
|
|||
#define _(Text) dgettext (PACKAGE,Text)
|
||||
#define N_(Text) gettext_noop (Text)
|
||||
#define X_(Text) Text
|
||||
#define I18N(Array) PBD::internationalize (PACKAGE, Array)
|
||||
|
||||
#endif // __i18n_h__
|
||||
|
|
|
|||
BIN
gtk2_ardour/icons/hide.png
Normal file
BIN
gtk2_ardour/icons/hide.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 523 B |
BIN
gtk2_ardour/icons/record_normal_red.png
Normal file
BIN
gtk2_ardour/icons/record_normal_red.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 489 B |
BIN
gtk2_ardour/icons/record_tape_red.png
Normal file
BIN
gtk2_ardour/icons/record_tape_red.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 613 B |
BIN
gtk2_ardour/icons/strip_width.png
Normal file
BIN
gtk2_ardour/icons/strip_width.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 256 B |
|
|
@ -258,6 +258,46 @@ IOSelector::~IOSelector ()
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
IOSelector::set_button_sensitivity ()
|
||||
{
|
||||
DataType t = io->default_type();
|
||||
|
||||
if (for_input) {
|
||||
|
||||
if (io->input_maximum().get(t) < 0 || io->input_maximum().get(t) > io->n_inputs().get(t)) {
|
||||
add_port_button.set_sensitive (true);
|
||||
} else {
|
||||
add_port_button.set_sensitive (false);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (io->output_maximum().get(t) < 0 || io->output_maximum().get(t) > io->n_outputs().get(t)) {
|
||||
add_port_button.set_sensitive (true);
|
||||
} else {
|
||||
add_port_button.set_sensitive (false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (for_input) {
|
||||
if (io->n_inputs().get(t) && (io->input_minimum().get(t) < 0 || io->input_minimum().get(t) < io->n_inputs().get(t))) {
|
||||
remove_port_button.set_sensitive (true);
|
||||
} else {
|
||||
remove_port_button.set_sensitive (false);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (io->n_outputs().get(t) && (io->output_minimum().get(t) < 0 || io->output_minimum().get(t) < io->n_outputs().get(t))) {
|
||||
remove_port_button.set_sensitive (true);
|
||||
} else {
|
||||
remove_port_button.set_sensitive (false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
IOSelector::name_changed (void* src)
|
||||
{
|
||||
|
|
@ -288,7 +328,10 @@ IOSelector::rescan ()
|
|||
gint current_page;
|
||||
vector<string> rowdata;
|
||||
|
||||
page_selection_connection.disconnect ();
|
||||
|
||||
current_page = notebook.get_current_page ();
|
||||
|
||||
pages.clear ();
|
||||
|
||||
/* get relevant current JACK ports */
|
||||
|
|
@ -347,7 +390,6 @@ IOSelector::rescan ()
|
|||
row[port_display_columns.full_name] = s->second;
|
||||
}
|
||||
|
||||
//display->get_selection()->signal_changed().connect (bind (mem_fun(*this, &IOSelector::port_selection_changed), display));
|
||||
display->signal_button_release_event().connect (bind (mem_fun(*this, &IOSelector::port_selection_changed), display));
|
||||
Label *tab_label = manage (new Label);
|
||||
|
||||
|
|
@ -363,7 +405,7 @@ IOSelector::rescan ()
|
|||
}
|
||||
|
||||
notebook.set_current_page (current_page);
|
||||
//notebook.signal_show().connect (bind (mem_fun (notebook, &Notebook::set_current_page), current_page));
|
||||
page_selection_connection = notebook.signal_show().connect (bind (mem_fun (notebook, &Notebook::set_current_page), current_page));
|
||||
selector_box.show_all ();
|
||||
}
|
||||
|
||||
|
|
@ -372,12 +414,11 @@ IOSelector::display_ports ()
|
|||
{
|
||||
TreeView *firsttview = 0;
|
||||
TreeView *selected_port_tview = 0;
|
||||
|
||||
{
|
||||
Glib::Mutex::Lock lm (port_display_lock);
|
||||
Port *port;
|
||||
uint32_t limit;
|
||||
|
||||
|
||||
// The IO selector only works for single typed IOs
|
||||
const ARDOUR::DataType t = io->default_type();
|
||||
|
||||
|
|
@ -386,22 +427,21 @@ IOSelector::display_ports ()
|
|||
} else {
|
||||
limit = io->n_outputs().get(t);
|
||||
}
|
||||
|
||||
for (slist<TreeView *>::iterator i = port_displays.begin(); i != port_displays.end(); ) {
|
||||
|
||||
for (slist<TreeView *>::iterator i = port_displays.begin(); i != port_displays.end(); ) {
|
||||
|
||||
slist<TreeView *>::iterator tmp;
|
||||
|
||||
|
||||
tmp = i;
|
||||
++tmp;
|
||||
|
||||
|
||||
port_box.remove (**i);
|
||||
delete *i;
|
||||
port_displays.erase (i);
|
||||
|
||||
|
||||
i = tmp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (uint32_t n = 0; n < limit; ++n) {
|
||||
|
||||
TreeView* tview;
|
||||
|
|
@ -415,13 +455,13 @@ IOSelector::display_ports ()
|
|||
}
|
||||
|
||||
/* we know there is '/' because we put it there */
|
||||
|
||||
|
||||
really_short_name = port->short_name();
|
||||
really_short_name = really_short_name.substr (really_short_name.find ('/') + 1);
|
||||
|
||||
|
||||
tview = manage (new TreeView());
|
||||
RefPtr<ListStore> port_model = ListStore::create (port_display_columns);
|
||||
|
||||
|
||||
if (!firsttview) {
|
||||
firsttview = tview;
|
||||
}
|
||||
|
|
@ -429,18 +469,18 @@ IOSelector::display_ports ()
|
|||
tview->set_model (port_model);
|
||||
tview->append_column (really_short_name, port_display_columns.displayed_name);
|
||||
tview->get_selection()->set_mode (SELECTION_SINGLE);
|
||||
tview->set_data ("port", port);
|
||||
tview->set_data (X_("port"), port);
|
||||
tview->set_headers_visible (true);
|
||||
tview->set_name ("IOSelectorPortList");
|
||||
tview->set_name (X_("IOSelectorPortList"));
|
||||
|
||||
port_box.pack_start (*tview);
|
||||
port_displays.insert (port_displays.end(), tview);
|
||||
|
||||
/* now fill the clist with the current connections */
|
||||
|
||||
|
||||
|
||||
const char **connections = port->get_connections ();
|
||||
|
||||
|
||||
if (connections) {
|
||||
for (uint32_t c = 0; connections[c]; ++c) {
|
||||
TreeModel::Row row = *(port_model->append());
|
||||
|
|
@ -459,9 +499,9 @@ IOSelector::display_ports ()
|
|||
selected_port_tview = tview;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
if (io->output_maximum().get(t) == 1) {
|
||||
selected_port = port;
|
||||
selected_port_tview = tview;
|
||||
|
|
@ -471,39 +511,27 @@ IOSelector::display_ports ()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TreeViewColumn* col = tview->get_column (0);
|
||||
|
||||
col->set_clickable (true);
|
||||
|
||||
/* handle button events on the column header and within the treeview itself */
|
||||
|
||||
/* handle button events on the column header ... */
|
||||
col->signal_clicked().connect (bind (mem_fun(*this, &IOSelector::select_treeview), tview));
|
||||
|
||||
/* ... and within the treeview itself */
|
||||
tview->signal_button_release_event().connect (bind (mem_fun(*this, &IOSelector::connection_button_release), tview));
|
||||
}
|
||||
|
||||
|
||||
port_box.show_all ();
|
||||
|
||||
if (selected_port_tview) {
|
||||
// GTK2FIX
|
||||
// selected_port_tview->click_column(0);
|
||||
selected_port_tview->set_name ("IOSelectorPortListSelected");
|
||||
for (slist<TreeView *>::iterator i = port_displays.begin(); i != port_displays.end(); ++i) {
|
||||
if (*i != selected_port_tview) {
|
||||
(*i)->set_name ("IOSelectorPortList");
|
||||
(*i)->queue_draw ();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selected_port = 0;
|
||||
selector_box.hide_all ();
|
||||
}
|
||||
}
|
||||
|
||||
if (!selected_port_tview) {
|
||||
selected_port_tview = firsttview;
|
||||
}
|
||||
|
||||
if (selected_port_tview) {
|
||||
select_treeview (selected_port_tview);
|
||||
} else if (firsttview) {
|
||||
// select first
|
||||
select_treeview (firsttview);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -569,14 +597,6 @@ IOSelector::add_port ()
|
|||
msg.run ();
|
||||
}
|
||||
|
||||
if (io->input_maximum().get(t) >= 0 && io->input_maximum().get(t) <= (size_t) io->n_inputs().get(t)) {
|
||||
add_port_button.set_sensitive (false);
|
||||
}
|
||||
|
||||
if (io->input_minimum().get(t) < (size_t) io->n_inputs().get(t)) {
|
||||
remove_port_button.set_sensitive (true);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
try {
|
||||
|
|
@ -587,11 +607,9 @@ IOSelector::add_port ()
|
|||
MessageDialog msg (0, _("There are no more JACK ports available."));
|
||||
msg.run ();
|
||||
}
|
||||
|
||||
if (io->output_maximum().get(t) >= 0 && io->output_maximum().get(t) <= (size_t) io->n_outputs().get(t)) {
|
||||
add_port_button.set_sensitive (false);
|
||||
}
|
||||
}
|
||||
|
||||
set_button_sensitivity ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -608,26 +626,13 @@ IOSelector::remove_port ()
|
|||
if ((nports = io->n_inputs().get(t)) > 0) {
|
||||
io->remove_input_port (io->input(nports-1), this);
|
||||
}
|
||||
if (io->input_minimum().get(t) == (size_t) io->n_inputs().get(t)) {
|
||||
remove_port_button.set_sensitive (false);
|
||||
}
|
||||
} else {
|
||||
if ((nports = io->n_outputs().get(t)) > 0) {
|
||||
io->remove_output_port (io->output(nports-1), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gint
|
||||
IOSelector::remove_port_when_idle (Port *port)
|
||||
{
|
||||
if (for_input) {
|
||||
io->remove_input_port (port, this);
|
||||
} else {
|
||||
io->remove_output_port (port, this);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
set_button_sensitivity ();
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
@ -649,20 +654,15 @@ IOSelector::connection_button_release (GdkEventButton *ev, TreeView *treeview)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!(Keyboard::is_delete_event (ev))) {
|
||||
//return false;
|
||||
}
|
||||
|
||||
if (!treeview->get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
|
||||
return false;
|
||||
}
|
||||
cerr << "path = " << path.to_string() << endl;
|
||||
|
||||
|
||||
if ((iter = treeview->get_model()->get_iter (path.to_string()))) {
|
||||
|
||||
/* path is valid */
|
||||
ustring connected_port_name = (*iter)[port_display_columns.full_name];
|
||||
Port *port = reinterpret_cast<Port *> (treeview->get_data (_("port")));
|
||||
Port *port = reinterpret_cast<Port *> (treeview->get_data (X_("port")));
|
||||
|
||||
if (for_input) {
|
||||
Port *p = session.engine().get_port_by_name (connected_port_name);
|
||||
|
|
@ -678,46 +678,15 @@ IOSelector::connection_button_release (GdkEventButton *ev, TreeView *treeview)
|
|||
return true;
|
||||
}
|
||||
|
||||
gint
|
||||
IOSelector::port_column_button_release (GdkEventButton* event, TreeView* treeview)
|
||||
{
|
||||
/* this handles button release on the button at the top of a single-column
|
||||
treeview (representing a port)
|
||||
*/
|
||||
cerr << "IOSelector::port_column_button_release() called" << endl;
|
||||
|
||||
if (Keyboard::is_delete_event (event)) {
|
||||
Port* port;
|
||||
{
|
||||
Glib::Mutex::Lock lm (port_display_lock);
|
||||
|
||||
port = static_cast<Port *> (treeview->get_data (_("port")));
|
||||
|
||||
if (port == selected_port) {
|
||||
selected_port = 0;
|
||||
treeview->set_name ("IOSelectorPortList");
|
||||
treeview->queue_draw();
|
||||
}
|
||||
}
|
||||
|
||||
/* remove the port when idle - if we do it here, we will destroy the widget
|
||||
for whom we are handling an event. not good.
|
||||
*/
|
||||
|
||||
signal_idle().connect (bind (mem_fun(*this, &IOSelector::remove_port_when_idle), port));
|
||||
|
||||
} else {
|
||||
select_treeview (treeview);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
IOSelector::select_next_treeview ()
|
||||
{
|
||||
slist<TreeView*>::iterator next;
|
||||
|
||||
if (port_displays.empty() || port_displays.size() == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (slist<TreeView *>::iterator i = port_displays.begin(); i != port_displays.end(); ++i) {
|
||||
|
||||
if ((*i)->get_name() == "IOSelectorPortListSelected") {
|
||||
|
|
@ -744,21 +713,41 @@ IOSelector::select_treeview (TreeView* tview)
|
|||
*/
|
||||
|
||||
Glib::Mutex::Lock lm (port_display_lock);
|
||||
Port* port = reinterpret_cast<Port *> (tview->get_data (_("port")));
|
||||
Port* port = reinterpret_cast<Port *> (tview->get_data (X_("port")));
|
||||
|
||||
selected_port = port;
|
||||
|
||||
tview->set_name ("IOSelectorPortListSelected");
|
||||
tview->queue_draw ();
|
||||
|
||||
/* ugly hack to force the column header button to change as well */
|
||||
|
||||
TreeViewColumn* col = tview->get_column (0);
|
||||
GtkTreeViewColumn* ccol = col->gobj();
|
||||
|
||||
if (port != selected_port) {
|
||||
selected_port = port;
|
||||
|
||||
tview->set_name ("IOSelectorPortListSelected");
|
||||
|
||||
for (slist<TreeView*>::iterator i = port_displays.begin(); i != port_displays.end(); ++i) {
|
||||
if (*i != tview) {
|
||||
(*i)->set_name ("IOSelectorPortList");
|
||||
(*i)->queue_draw ();
|
||||
}
|
||||
}
|
||||
selector_box.show_all ();
|
||||
if (ccol->button) {
|
||||
gtk_widget_set_name (ccol->button, "IOSelectorPortListSelected");
|
||||
gtk_widget_queue_draw (ccol->button);
|
||||
}
|
||||
|
||||
for (slist<TreeView*>::iterator i = port_displays.begin(); i != port_displays.end(); ++i) {
|
||||
if (*i == tview) {
|
||||
continue;
|
||||
}
|
||||
|
||||
col = (*i)->get_column (0);
|
||||
ccol = col->gobj();
|
||||
|
||||
if (ccol->button) {
|
||||
gtk_widget_set_name (ccol->button, "IOSelectorPortList");
|
||||
gtk_widget_queue_draw (ccol->button);
|
||||
}
|
||||
|
||||
(*i)->set_name ("IOSelectorPortList");
|
||||
(*i)->queue_draw ();
|
||||
}
|
||||
|
||||
selector_box.show_all ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ class IOSelector : public Gtk::VBox {
|
|||
boost::shared_ptr<ARDOUR::IO> io;
|
||||
bool for_input;
|
||||
ARDOUR::Port *selected_port;
|
||||
sigc::connection page_selection_connection;
|
||||
|
||||
Gtk::VBox main_box;
|
||||
Gtk::HBox port_and_selector_box;
|
||||
|
|
@ -123,9 +124,8 @@ class IOSelector : public Gtk::VBox {
|
|||
|
||||
void add_port ();
|
||||
void remove_port ();
|
||||
gint remove_port_when_idle (ARDOUR::Port *);
|
||||
void set_button_sensitivity ();
|
||||
|
||||
gint port_column_button_release (GdkEventButton *, Gtk::TreeView*);
|
||||
gint connection_button_release (GdkEventButton *, Gtk::TreeView*);
|
||||
|
||||
void select_treeview(Gtk::TreeView*);
|
||||
|
|
|
|||
|
|
@ -796,6 +796,8 @@ Keyboard::modifier_state_equals (guint state, ModifierMask mask)
|
|||
Selection::Operation
|
||||
Keyboard::selection_type (guint state)
|
||||
{
|
||||
/* note that there is no modifier for "Add" */
|
||||
|
||||
if (modifier_state_equals (state, Shift)) {
|
||||
return Selection::Extend;
|
||||
} else if (modifier_state_equals (state, Control)) {
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ LocationEditRow::set_location (Location *loc)
|
|||
the row spacing, so make it insensitive (paul).
|
||||
*/
|
||||
|
||||
if (location->is_end()) {
|
||||
if (location->is_end() || location->is_start()) {
|
||||
remove_button.set_sensitive (false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include <gtkmm2ext/popup.h>
|
||||
#include <gtkmm2ext/utils.h>
|
||||
|
||||
#include "svn_revision.h"
|
||||
#include "version.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "opts.h"
|
||||
|
|
@ -259,7 +260,6 @@ show_ui_callback (void *arg)
|
|||
ARDOUR_UI * ui = (ARDOUR_UI *) arg;
|
||||
|
||||
ui->hide_splash();
|
||||
ui->show ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -286,7 +286,7 @@ Please consider the possibilities, and perhaps (re)start JACK."));
|
|||
win.set_position (Gtk::WIN_POS_CENTER);
|
||||
|
||||
if (!no_splash) {
|
||||
ui->hide_splash ();
|
||||
ui->hide_splash ();
|
||||
}
|
||||
|
||||
/* we just don't care about the result, but we want to block */
|
||||
|
|
@ -329,10 +329,12 @@ To create it from the command line, start ardour as \"ardour --new %1"), path) <
|
|||
ui->load_session (path, name);
|
||||
|
||||
} else {
|
||||
/* TODO: This bit of code doesn't work properly yet
|
||||
Glib::signal_idle().connect (bind (mem_fun (*ui, &ARDOUR_UI::cmdline_new_session), path));
|
||||
ui->set_will_create_new_session_automatically (true); */
|
||||
|
||||
/* TODO: This bit of code doesn't work properly yet
|
||||
Glib::signal_idle().connect (bind (mem_fun (*ui, &ARDOUR_UI::cmdline_new_session), path));
|
||||
ui->set_will_create_new_session_automatically (true);
|
||||
*/
|
||||
|
||||
/* Show the NSD */
|
||||
ui->hide_splash ();
|
||||
if (!Config->get_no_new_session_dialog()) {
|
||||
|
|
@ -383,7 +385,7 @@ int main (int argc, char *argv[])
|
|||
cout << _("Ardour/GTK ")
|
||||
<< VERSIONSTRING
|
||||
<< _("\n (built using ")
|
||||
<< ARDOUR::get_ardour_revision ()
|
||||
<< ardour_svn_revision
|
||||
#ifdef __GNUC__
|
||||
<< _(" and GCC version ") << __VERSION__
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
|
|||
canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
|
||||
canvas_rect->property_x1() = 0.0;
|
||||
canvas_rect->property_y1() = 0.0;
|
||||
canvas_rect->property_x2() = 1000000.0;
|
||||
canvas_rect->property_x2() = max_frames;
|
||||
canvas_rect->property_y2() = (double)20;
|
||||
canvas_rect->property_outline_color_rgba() = color_map[cMarkerTrackOutline];
|
||||
canvas_rect->property_fill_color_rgba() = stream_base_color;
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ using namespace PBD;
|
|||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
int MixerStrip::scrollbar_height = 0;
|
||||
|
||||
#ifdef VARISPEED_IN_MIXER_STRIP
|
||||
static void
|
||||
speed_printer (char buf[32], Gtk::Adjustment& adj, void* arg)
|
||||
|
|
@ -108,8 +110,8 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
|
|||
comment_window = 0;
|
||||
comment_area = 0;
|
||||
|
||||
width_button.add (*(manage (new Gtk::Image (get_xpm("lr.xpm")))));
|
||||
hide_button.add (*(manage (new Gtk::Image (get_xpm("small_x.xpm")))));
|
||||
width_button.add (*(manage (new Gtk::Image (::get_icon("strip_width")))));
|
||||
hide_button.add (*(manage (new Gtk::Image (::get_icon("hide")))));
|
||||
|
||||
input_label.set_text (_("Input"));
|
||||
input_button.add (input_label);
|
||||
|
|
@ -122,34 +124,31 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
|
|||
output_label.set_name ("MixerIOButtonLabel");
|
||||
|
||||
_route->meter_change.connect (mem_fun(*this, &MixerStrip::meter_changed));
|
||||
meter_point_button.add (meter_point_label);
|
||||
meter_point_button.set_name ("MixerStripMeterPreButton");
|
||||
meter_point_label.set_name ("MixerStripMeterPreButton");
|
||||
meter_point_button.add (meter_point_label);
|
||||
meter_point_button.set_name ("MixerStripMeterPreButton");
|
||||
meter_point_label.set_name ("MixerStripMeterPreButton");
|
||||
|
||||
switch (_route->meter_point()) {
|
||||
case MeterInput:
|
||||
meter_point_label.set_text (_("input"));
|
||||
break;
|
||||
|
||||
switch (_route->meter_point()) {
|
||||
case MeterInput:
|
||||
meter_point_label.set_text (_("input"));
|
||||
break;
|
||||
|
||||
case MeterPreFader:
|
||||
meter_point_label.set_text (_("pre"));
|
||||
break;
|
||||
|
||||
case MeterPostFader:
|
||||
meter_point_label.set_text (_("post"));
|
||||
break;
|
||||
}
|
||||
case MeterPreFader:
|
||||
meter_point_label.set_text (_("pre"));
|
||||
break;
|
||||
|
||||
/* TRANSLATORS: this string should be longest of the strings
|
||||
used to describe meter points. In english, its "input".
|
||||
*/
|
||||
|
||||
set_size_request_to_display_given_text (meter_point_button, _("tupni"), 5, 5);
|
||||
|
||||
|
||||
bottom_button_table.attach (meter_point_button, 1, 2, 0, 1);
|
||||
|
||||
|
||||
case MeterPostFader:
|
||||
meter_point_label.set_text (_("post"));
|
||||
break;
|
||||
}
|
||||
|
||||
/* TRANSLATORS: this string should be longest of the strings
|
||||
used to describe meter points. In english, it's "input".
|
||||
*/
|
||||
set_size_request_to_display_given_text (meter_point_button, _("tupni"), 5, 5);
|
||||
|
||||
bottom_button_table.attach (meter_point_button, 1, 2, 0, 1);
|
||||
|
||||
meter_point_button.signal_button_press_event().connect (mem_fun (gpm, &GainMeter::meter_press), false);
|
||||
/* XXX what is this meant to do? */
|
||||
//meter_point_button.signal_button_release_event().connect (mem_fun (gpm, &GainMeter::meter_release), false);
|
||||
|
|
@ -261,6 +260,20 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
|
|||
global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK);
|
||||
global_vpacker.pack_start (comment_button, Gtk::PACK_SHRINK);
|
||||
|
||||
if (route()->master() || route()->control()) {
|
||||
|
||||
if (scrollbar_height == 0) {
|
||||
HScrollbar scrollbar;
|
||||
Gtk::Requisition requisition;
|
||||
scrollbar.size_request (requisition);
|
||||
scrollbar_height = requisition.height;
|
||||
}
|
||||
|
||||
EventBox* spacer = manage (new EventBox);
|
||||
spacer->set_size_request (-1, scrollbar_height);
|
||||
global_vpacker.pack_start (*spacer, false, false);
|
||||
}
|
||||
|
||||
global_frame.add (global_vpacker);
|
||||
global_frame.set_shadow_type (Gtk::SHADOW_IN);
|
||||
global_frame.set_name ("BaseFrame");
|
||||
|
|
@ -416,8 +429,10 @@ MixerStrip::set_width (Width w)
|
|||
solo_button->set_label (_("solo"));
|
||||
|
||||
if (_route->comment() == "") {
|
||||
comment_button.unset_bg (STATE_NORMAL);
|
||||
comment_button.set_label (_("comments"));
|
||||
} else {
|
||||
comment_button.modify_bg (STATE_NORMAL, color());
|
||||
comment_button.set_label (_("*comments*"));
|
||||
}
|
||||
|
||||
|
|
@ -439,8 +454,10 @@ MixerStrip::set_width (Width w)
|
|||
solo_button->set_label (_("S"));
|
||||
|
||||
if (_route->comment() == "") {
|
||||
comment_button.unset_bg (STATE_NORMAL);
|
||||
comment_button.set_label (_("Cmt"));
|
||||
} else {
|
||||
comment_button.modify_bg (STATE_NORMAL, color());
|
||||
comment_button.set_label (_("*Cmt*"));
|
||||
}
|
||||
|
||||
|
|
@ -497,7 +514,7 @@ MixerStrip::output_press (GdkEventButton *ev)
|
|||
citems.push_back (SeparatorElem());
|
||||
|
||||
_session.foreach_connection (this, &MixerStrip::add_connection_to_output_menu);
|
||||
|
||||
|
||||
output_menu.popup (1, ev->time);
|
||||
break;
|
||||
|
||||
|
|
@ -553,13 +570,13 @@ MixerStrip::input_press (GdkEventButton *ev)
|
|||
switch (ev->button) {
|
||||
|
||||
case 1:
|
||||
|
||||
citems.push_back (MenuElem (_("Edit"), mem_fun(*this, &MixerStrip::edit_input_configuration)));
|
||||
citems.push_back (SeparatorElem());
|
||||
citems.push_back (MenuElem (_("Disconnect"), mem_fun (*(static_cast<RouteUI*>(this)), &RouteUI::disconnect_input)));
|
||||
citems.push_back (SeparatorElem());
|
||||
|
||||
_session.foreach_connection (this, &MixerStrip::add_connection_to_input_menu);
|
||||
|
||||
input_menu.popup (1, ev->time);
|
||||
break;
|
||||
|
||||
|
|
@ -757,6 +774,42 @@ MixerStrip::output_changed (IOChange change, void *src)
|
|||
Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &MixerStrip::update_output_display));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MixerStrip::comment_editor_done_editing() {
|
||||
string str = comment_area->get_buffer()->get_text();
|
||||
if (_route->comment() != str) {
|
||||
_route->set_comment (str, this);
|
||||
|
||||
switch (_width) {
|
||||
|
||||
case Wide:
|
||||
if (! str.empty()) {
|
||||
comment_button.modify_bg (STATE_NORMAL, color());
|
||||
comment_button.set_label (_("*Comments*"));
|
||||
} else {
|
||||
comment_button.unset_bg (STATE_NORMAL);
|
||||
comment_button.set_label (_("Comments"));
|
||||
}
|
||||
break;
|
||||
|
||||
case Narrow:
|
||||
if (! str.empty()) {
|
||||
comment_button.modify_bg (STATE_NORMAL, color());
|
||||
comment_button.set_label (_("*Cmt*"));
|
||||
} else {
|
||||
comment_button.unset_bg (STATE_NORMAL);
|
||||
comment_button.set_label (_("Cmt"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (comment_button,
|
||||
str.empty() ? _("Click to Add/Edit Comments") : str);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
MixerStrip::comment_button_clicked ()
|
||||
{
|
||||
|
|
@ -764,38 +817,13 @@ MixerStrip::comment_button_clicked ()
|
|||
setup_comment_editor ();
|
||||
}
|
||||
|
||||
int x, y, cw_width, cw_height;
|
||||
int x, y, cw_width, cw_height;
|
||||
|
||||
if (comment_window->is_visible()) {
|
||||
string str = comment_area->get_buffer()->get_text();
|
||||
if (_route->comment() != str) {
|
||||
_route->set_comment (str, this);
|
||||
comment_window->hide ();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (_width) {
|
||||
|
||||
case Wide:
|
||||
if (! str.empty()) {
|
||||
comment_button.set_label (_("*Comments*"));
|
||||
} else {
|
||||
comment_button.set_label (_("Comments"));
|
||||
}
|
||||
break;
|
||||
|
||||
case Narrow:
|
||||
if (! str.empty()) {
|
||||
comment_button.set_label (_("*Cmt*"));
|
||||
} else {
|
||||
comment_button.set_label (_("Cmt"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (comment_button,
|
||||
str.empty() ? _("Click to Add/Edit Comments") : str);
|
||||
}
|
||||
comment_window->hide ();
|
||||
return;
|
||||
}
|
||||
comment_window->get_size (cw_width, cw_height);
|
||||
comment_window->get_position(x, y);
|
||||
comment_window->move(x, y - (cw_height / 2) - 45);
|
||||
|
|
@ -806,7 +834,6 @@ MixerStrip::comment_button_clicked ()
|
|||
|
||||
comment_window->show();
|
||||
comment_window->present();
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -819,6 +846,7 @@ MixerStrip::setup_comment_editor ()
|
|||
comment_window = new ArdourDialog (title, false);
|
||||
comment_window->set_position (Gtk::WIN_POS_MOUSE);
|
||||
comment_window->set_skip_taskbar_hint (true);
|
||||
comment_window->signal_hide().connect (mem_fun(*this, &MixerStrip::comment_editor_done_editing));
|
||||
|
||||
comment_area = manage (new TextView());
|
||||
comment_area->set_name ("MixerTrackCommentArea");
|
||||
|
|
@ -1075,11 +1103,17 @@ MixerStrip::width_clicked ()
|
|||
void
|
||||
MixerStrip::hide_clicked ()
|
||||
{
|
||||
// LAME fix to reset the button status for when it is redisplayed (part 1)
|
||||
hide_button.set_sensitive(false);
|
||||
|
||||
if (_embedded) {
|
||||
Hiding(); /* EMIT_SIGNAL */
|
||||
} else {
|
||||
_mixer.hide_strip (this);
|
||||
}
|
||||
|
||||
// (part 2)
|
||||
hide_button.set_sensitive(true);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1165,21 +1199,11 @@ MixerStrip::mix_group() const
|
|||
void
|
||||
MixerStrip::engine_stopped ()
|
||||
{
|
||||
input_button.set_sensitive (false);
|
||||
if (rec_enable_button) {
|
||||
rec_enable_button->set_sensitive (false);
|
||||
}
|
||||
output_button.set_sensitive (false);
|
||||
}
|
||||
|
||||
void
|
||||
MixerStrip::engine_running ()
|
||||
{
|
||||
input_button.set_sensitive (true);
|
||||
if (rec_enable_button) {
|
||||
rec_enable_button->set_sensitive (true);
|
||||
}
|
||||
output_button.set_sensitive (true);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
Gtk::TextView* comment_area;
|
||||
Gtk::Button comment_button;
|
||||
|
||||
void comment_editor_done_editing();
|
||||
void setup_comment_editor ();
|
||||
void comment_button_clicked ();
|
||||
|
||||
|
|
@ -245,6 +246,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
void engine_running();
|
||||
void engine_stopped();
|
||||
|
||||
static int scrollbar_height;
|
||||
};
|
||||
|
||||
#endif /* __ardour_mixer_strip__ */
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ Mixer_UI::Mixer_UI (AudioEngine& eng)
|
|||
strip_packer.pack_end (scroller_base, true, true);
|
||||
|
||||
scroller.add (strip_packer);
|
||||
scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
|
||||
scroller.set_policy (Gtk::POLICY_ALWAYS, Gtk::POLICY_AUTOMATIC);
|
||||
|
||||
track_model = ListStore::create (track_columns);
|
||||
track_display.set_model (track_model);
|
||||
|
|
@ -185,7 +185,7 @@ Mixer_UI::Mixer_UI (AudioEngine& eng)
|
|||
list_vpacker.pack_start (rhs_pane1, true, true);
|
||||
|
||||
global_hpacker.pack_start (scroller, true, true);
|
||||
global_hpacker.pack_start (out_packer, false, false);
|
||||
global_hpacker.pack_start (out_packer, false, false, 12);
|
||||
|
||||
list_hpane.add1(list_vpacker);
|
||||
list_hpane.add2(global_hpacker);
|
||||
|
|
@ -393,11 +393,11 @@ Mixer_UI::disconnect_from_session ()
|
|||
void
|
||||
Mixer_UI::show_strip (MixerStrip* ms)
|
||||
{
|
||||
TreeModel::Children rows = track_model->children();
|
||||
TreeModel::Children rows = track_model->children();
|
||||
TreeModel::Children::iterator i;
|
||||
|
||||
|
||||
for (i = rows.begin(); i != rows.end(); ++i) {
|
||||
|
||||
|
||||
MixerStrip* strip = (*i)[track_columns.strip];
|
||||
if (strip == ms) {
|
||||
(*i)[track_columns.visible] = true;
|
||||
|
|
@ -409,7 +409,7 @@ Mixer_UI::show_strip (MixerStrip* ms)
|
|||
void
|
||||
Mixer_UI::hide_strip (MixerStrip* ms)
|
||||
{
|
||||
TreeModel::Children rows = track_model->children();
|
||||
TreeModel::Children rows = track_model->children();
|
||||
TreeModel::Children::iterator i;
|
||||
|
||||
for (i = rows.begin(); i != rows.end(); ++i) {
|
||||
|
|
@ -419,37 +419,37 @@ Mixer_UI::hide_strip (MixerStrip* ms)
|
|||
(*i)[track_columns.visible] = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gint
|
||||
Mixer_UI::start_updating ()
|
||||
{
|
||||
fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun(*this, &Mixer_UI::fast_update_strips));
|
||||
return 0;
|
||||
}
|
||||
gint
|
||||
Mixer_UI::start_updating ()
|
||||
{
|
||||
fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun(*this, &Mixer_UI::fast_update_strips));
|
||||
return 0;
|
||||
}
|
||||
|
||||
gint
|
||||
Mixer_UI::stop_updating ()
|
||||
{
|
||||
fast_screen_update_connection.disconnect();
|
||||
return 0;
|
||||
}
|
||||
gint
|
||||
Mixer_UI::stop_updating ()
|
||||
{
|
||||
fast_screen_update_connection.disconnect();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
Mixer_UI::fast_update_strips ()
|
||||
{
|
||||
if (is_mapped () && session) {
|
||||
for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||
(*i)->fast_update ();
|
||||
}
|
||||
}
|
||||
}
|
||||
void
|
||||
Mixer_UI::fast_update_strips ()
|
||||
{
|
||||
if (is_mapped () && session) {
|
||||
for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||
(*i)->fast_update ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Mixer_UI::set_all_strips_visibility (bool yn)
|
||||
{
|
||||
TreeModel::Children rows = track_model->children();
|
||||
TreeModel::Children rows = track_model->children();
|
||||
TreeModel::Children::iterator i;
|
||||
|
||||
no_track_list_redisplay = true;
|
||||
|
|
|
|||
|
|
@ -313,7 +313,6 @@ NewSessionDialog::NewSessionDialog()
|
|||
m_treeview->set_enable_search(true);
|
||||
m_treeview->set_fixed_height_mode(false);
|
||||
m_treeview->set_hover_selection(false);
|
||||
m_treeview->set_hover_expand(true);
|
||||
m_treeview->set_size_request(-1, 150);
|
||||
recent_scrolledwindow->set_flags(Gtk::CAN_FOCUS);
|
||||
recent_scrolledwindow->set_border_width(6);
|
||||
|
|
|
|||
|
|
@ -318,11 +318,12 @@ OptionEditor::destructo_xfade_adjustment_changed ()
|
|||
float val = destructo_xfade_adjustment.get_value();
|
||||
|
||||
/* val is in msecs */
|
||||
|
||||
|
||||
Config->set_destructive_xfade_msecs ((uint32_t) floor (val));
|
||||
|
||||
if (session) {
|
||||
DestructiveFileSource::setup_standard_crossfades (session->frame_rate());
|
||||
SndFileSource::setup_standard_crossfades (session->frame_rate());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -420,19 +421,19 @@ OptionEditor::setup_midi_options ()
|
|||
}
|
||||
|
||||
tb->set_active (!(*i).second->input()->offline());
|
||||
tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_online_toggled), (*i).second, tb));
|
||||
tb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::port_online_toggled), (*i).second, tb));
|
||||
(*i).second->input()->OfflineStatusChanged.connect (bind (mem_fun(*this, &OptionEditor::map_port_online), (*i).second, tb));
|
||||
table->attach (*tb, 1, 2, n+2, n+3, FILL|EXPAND, FILL);
|
||||
|
||||
tb = manage (new ToggleButton ());
|
||||
tb->set_name ("OptionEditorToggleButton");
|
||||
tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_trace_in_toggled), (*i).second, tb));
|
||||
tb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::port_trace_in_toggled), (*i).second, tb));
|
||||
tb->set_size_request (10, 10);
|
||||
table->attach (*tb, 2, 3, n+2, n+3, FILL|EXPAND, FILL);
|
||||
|
||||
tb = manage (new ToggleButton ());
|
||||
tb->set_name ("OptionEditorToggleButton");
|
||||
tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_trace_out_toggled), (*i).second, tb));
|
||||
tb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::port_trace_out_toggled), (*i).second, tb));
|
||||
tb->set_size_request (10, 10);
|
||||
table->attach (*tb, 3, 4, n+2, n+3, FILL|EXPAND, FILL);
|
||||
|
||||
|
|
@ -544,15 +545,14 @@ OptionEditor::midi_port_chosen (MIDI::Port* port, Gtk::RadioButton* rb)
|
|||
}
|
||||
}
|
||||
|
||||
gint
|
||||
OptionEditor::port_online_toggled (GdkEventButton* ev, MIDI::Port* port, ToggleButton* tb)
|
||||
void
|
||||
OptionEditor::port_online_toggled (MIDI::Port* port, ToggleButton* tb)
|
||||
{
|
||||
bool wanted = tb->get_active(); /* it hasn't changed at this point */
|
||||
|
||||
bool wanted = tb->get_active();
|
||||
|
||||
if (wanted != port->input()->offline()) {
|
||||
port->input()->set_offline (wanted);
|
||||
}
|
||||
return stop_signal (*tb, "button_press_event");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -567,24 +567,24 @@ OptionEditor::map_port_online (MIDI::Port* port, ToggleButton* tb)
|
|||
}
|
||||
}
|
||||
|
||||
gint
|
||||
OptionEditor::port_trace_in_toggled (GdkEventButton* ev, MIDI::Port* port, ToggleButton* tb)
|
||||
void
|
||||
OptionEditor::port_trace_in_toggled (MIDI::Port* port, ToggleButton* tb)
|
||||
{
|
||||
/* XXX not very good MVC style here */
|
||||
bool trace = tb->get_active();
|
||||
|
||||
port->input()->trace (!tb->get_active(), &cerr, string (port->name()) + string (" input: "));
|
||||
tb->set_active (!tb->get_active());
|
||||
return stop_signal (*tb, "button_press_event");
|
||||
if (port->input()->tracing() != trace) {
|
||||
port->output()->trace (trace, &cerr, string (port->name()) + string (" input: "));
|
||||
}
|
||||
}
|
||||
|
||||
gint
|
||||
OptionEditor::port_trace_out_toggled (GdkEventButton* ev,MIDI::Port* port, ToggleButton* tb)
|
||||
void
|
||||
OptionEditor::port_trace_out_toggled (MIDI::Port* port, ToggleButton* tb)
|
||||
{
|
||||
/* XXX not very good MVC style here */
|
||||
bool trace = tb->get_active();
|
||||
|
||||
port->output()->trace (!tb->get_active(), &cerr, string (port->name()) + string (" output: "));
|
||||
tb->set_active (!tb->get_active());
|
||||
return stop_signal (*tb, "button_press_event");
|
||||
if (port->output()->tracing() != trace) {
|
||||
port->output()->trace (trace, &cerr, string (port->name()) + string (" output: "));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -116,9 +116,9 @@ class OptionEditor : public Gtk::Dialog
|
|||
Gtk::RadioButton::Group mmc_button_group;
|
||||
Gtk::RadioButton::Group midi_button_group;
|
||||
|
||||
gint port_online_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
|
||||
gint port_trace_in_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
|
||||
gint port_trace_out_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
|
||||
void port_online_toggled (MIDI::Port*,Gtk::ToggleButton*);
|
||||
void port_trace_in_toggled (MIDI::Port*,Gtk::ToggleButton*);
|
||||
void port_trace_out_toggled (MIDI::Port*,Gtk::ToggleButton*);
|
||||
|
||||
void mmc_port_chosen (MIDI::Port*,Gtk::RadioButton*);
|
||||
void mtc_port_chosen (MIDI::Port*,Gtk::RadioButton*);
|
||||
|
|
|
|||
|
|
@ -118,16 +118,21 @@ PluginUIWindow::PluginUIWindow (boost::shared_ptr<PluginInsert> insert, bool scr
|
|||
PluginUIWindow::~PluginUIWindow ()
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
PluginUIWindow::on_key_press_event (GdkEventKey* event)
|
||||
{
|
||||
return PublicEditor::instance().on_key_press_event(event);
|
||||
if (!key_press_focus_accelerator_handler (*this, event)) {
|
||||
return PublicEditor::instance().on_key_press_event(event);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
PluginUIWindow::on_key_release_event (GdkEventKey* event)
|
||||
{
|
||||
return PublicEditor::instance().on_key_release_event(event);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
# -*- python -*-
|
||||
import os
|
||||
import os.path
|
||||
import glob
|
||||
|
||||
Import ('env gtkardour install_prefix intl_files')
|
||||
|
||||
potfiles_in = open('POTFILES.in', 'w')
|
||||
|
||||
intl_files.sort()
|
||||
|
||||
print "Generating POTFILES.in in gtk_ardour/po"
|
||||
|
||||
potfiles_in.write("""# This file was automatically generated by a configuration script.
|
||||
# Contains a list of source files containing translatable
|
||||
# strings sorted alphabetically.
|
||||
[encoding: UTF-8]
|
||||
""")
|
||||
|
||||
for f in intl_files[:]:
|
||||
potfiles_in.write(f + '\n')
|
||||
|
||||
potfiles_in.close()
|
||||
|
||||
print "Updating pot file: "
|
||||
|
||||
domain = gtkardour['DOMAIN']
|
||||
potfile = gtkardour['POTFILE']
|
||||
|
||||
poaction = env.Action('intltool-update -p -g=' + domain)
|
||||
|
||||
Execute(poaction)
|
||||
|
||||
# this should probably be merged with the i18n builder somehow
|
||||
|
||||
p_oze = [ os.path.basename (po) for po in glob.glob ('*.po') ]
|
||||
languages = [ po.replace ('.po', '') for po in p_oze ]
|
||||
m_oze = [ po.replace (".po", ".mo") for po in p_oze ]
|
||||
|
||||
for mo in m_oze[:]:
|
||||
po = mo.replace (".mo", ".po")
|
||||
env.Alias ('install', gtkardour.MoBuild (mo, [ po, potfile ]))
|
||||
|
||||
for lang in languages[:]:
|
||||
modir = (os.path.join (install_prefix, 'share/locale/' + lang + '/LC_MESSAGES/'))
|
||||
moname = domain + '.mo'
|
||||
env.Alias('install', env.InstallAs (os.path.join (modir, moname), lang + '.mo'))
|
||||
|
||||
env.Alias ('tarball', env.Distribute (env['DISTTREE'],
|
||||
[ 'SConscript', 'gtk_ardour.pot' ] +
|
||||
glob.glob('*.po')))
|
||||
File diff suppressed because it is too large
Load diff
5865
gtk2_ardour/po/sv_SE.po
Normal file
5865
gtk2_ardour/po/sv_SE.po
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -16,6 +16,7 @@
|
|||
#include "editing.h"
|
||||
#include "keyboard_target.h"
|
||||
#include "canvas.h"
|
||||
#include "selection.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
class Session;
|
||||
|
|
@ -54,7 +55,7 @@ class ImageFrameView;
|
|||
class ImageFrameTimeAxis;
|
||||
class MarkerView;
|
||||
|
||||
class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
||||
class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway {
|
||||
public:
|
||||
PublicEditor();
|
||||
virtual ~PublicEditor();
|
||||
|
|
@ -86,7 +87,6 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
|||
virtual void new_region_from_selection () = 0;
|
||||
virtual void separate_region_from_selection () = 0;
|
||||
virtual void toggle_playback (bool with_abort) = 0;
|
||||
virtual void set_edit_menu (Gtk::Menu&) = 0;
|
||||
virtual nframes_t unit_to_frame (double unit) = 0;
|
||||
virtual double frame_to_unit (nframes_t frame) = 0;
|
||||
virtual double frame_to_unit (double frame) = 0;
|
||||
|
|
@ -111,8 +111,10 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
|||
virtual void new_playlists () = 0;
|
||||
virtual void copy_playlists () = 0;
|
||||
virtual void clear_playlists () = 0;
|
||||
virtual bool set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove = false) = 0;
|
||||
virtual void set_selected_mixer_strip (TimeAxisView&) = 0;
|
||||
virtual void hide_track_in_display (TimeAxisView& tv) = 0;
|
||||
virtual void show_track_in_display (TimeAxisView& tv) = 0;
|
||||
virtual void set_follow_playhead (bool yn) = 0;
|
||||
virtual void toggle_follow_playhead () = 0;
|
||||
virtual bool follow_playhead() const = 0;
|
||||
|
|
|
|||
|
|
@ -923,7 +923,7 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
|
|||
|
||||
if ((insert = boost::dynamic_pointer_cast<Insert> (redirect)) == 0) {
|
||||
|
||||
/* its a send */
|
||||
/* it's a send */
|
||||
|
||||
if (!_session.engine().connected()) {
|
||||
return;
|
||||
|
|
@ -967,30 +967,21 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
|
|||
PluginUIWindow *plugin_ui;
|
||||
|
||||
if (plugin_insert->get_gui() == 0) {
|
||||
|
||||
string title;
|
||||
string maker = plugin_insert->plugin()->maker();
|
||||
string::size_type email_pos;
|
||||
|
||||
if ((email_pos = maker.find_first_of ('<')) != string::npos) {
|
||||
maker = maker.substr (0, email_pos - 1);
|
||||
}
|
||||
|
||||
if (maker.length() > 32) {
|
||||
maker = maker.substr (0, 32);
|
||||
maker += " ...";
|
||||
}
|
||||
|
||||
title = string_compose(_("ardour: %1: %2 (by %3)"), _route->name(), plugin_insert->name(), maker);
|
||||
|
||||
|
||||
plugin_ui = new PluginUIWindow (plugin_insert);
|
||||
|
||||
if (_owner_is_mixer) {
|
||||
ARDOUR_UI::instance()->the_mixer()->ensure_float (*plugin_ui);
|
||||
} else {
|
||||
ARDOUR_UI::instance()->the_editor().ensure_float (*plugin_ui);
|
||||
}
|
||||
plugin_ui->set_title (title);
|
||||
|
||||
plugin_ui->set_title (generate_redirect_title (plugin_insert));
|
||||
plugin_insert->set_gui (plugin_ui);
|
||||
|
||||
// change window title when route name is changed
|
||||
_route->name_changed.connect (bind (mem_fun(*this, &RedirectBox::route_name_changed), plugin_ui, plugin_insert));
|
||||
|
||||
|
||||
} else {
|
||||
plugin_ui = reinterpret_cast<PluginUIWindow *> (plugin_insert->get_gui());
|
||||
|
|
@ -1069,8 +1060,12 @@ RedirectBox::register_actions ()
|
|||
|
||||
/* new stuff */
|
||||
ActionManager::register_action (popup_act_grp, X_("newplugin"), _("New Plugin ..."), sigc::ptr_fun (RedirectBox::rb_choose_plugin));
|
||||
ActionManager::register_action (popup_act_grp, X_("newinsert"), _("New Insert"), sigc::ptr_fun (RedirectBox::rb_choose_insert));
|
||||
ActionManager::register_action (popup_act_grp, X_("newsend"), _("New Send ..."), sigc::ptr_fun (RedirectBox::rb_choose_send));
|
||||
|
||||
act = ActionManager::register_action (popup_act_grp, X_("newinsert"), _("New Insert"), sigc::ptr_fun (RedirectBox::rb_choose_insert));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (popup_act_grp, X_("newsend"), _("New Send ..."), sigc::ptr_fun (RedirectBox::rb_choose_send));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
|
||||
ActionManager::register_action (popup_act_grp, X_("clear"), _("Clear"), sigc::ptr_fun (RedirectBox::rb_clear));
|
||||
|
||||
/* standard editing stuff */
|
||||
|
|
@ -1097,6 +1092,8 @@ RedirectBox::register_actions ()
|
|||
ActionManager::plugin_selection_sensitive_actions.push_back(act);
|
||||
|
||||
ActionManager::add_action_group (popup_act_grp);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1242,3 +1239,29 @@ RedirectBox::rb_edit ()
|
|||
_current_redirect_box->for_selected_redirects (&RedirectBox::edit_redirect);
|
||||
}
|
||||
|
||||
void
|
||||
RedirectBox::route_name_changed (void* src, PluginUIWindow* plugin_ui, boost::shared_ptr<PluginInsert> pi)
|
||||
{
|
||||
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RedirectBox::route_name_changed), src, plugin_ui, pi));
|
||||
|
||||
plugin_ui->set_title (generate_redirect_title (pi));
|
||||
}
|
||||
|
||||
string
|
||||
RedirectBox::generate_redirect_title (boost::shared_ptr<PluginInsert> pi)
|
||||
{
|
||||
string maker = pi->plugin()->maker();
|
||||
string::size_type email_pos;
|
||||
|
||||
if ((email_pos = maker.find_first_of ('<')) != string::npos) {
|
||||
maker = maker.substr (0, email_pos - 1);
|
||||
}
|
||||
|
||||
if (maker.length() > 32) {
|
||||
maker = maker.substr (0, 32);
|
||||
maker += " ...";
|
||||
}
|
||||
|
||||
return string_compose(_("ardour: %1: %2 (by %3)"), _route->name(), pi->name(), maker);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,19 +49,20 @@
|
|||
|
||||
class MotionController;
|
||||
class PluginSelector;
|
||||
class PluginUIWindow;
|
||||
class RouteRedirectSelection;
|
||||
|
||||
namespace ARDOUR {
|
||||
class Connection;
|
||||
class Insert;
|
||||
class Plugin;
|
||||
class PluginInsert;
|
||||
class PortInsert;
|
||||
class Route;
|
||||
class Send;
|
||||
class Insert;
|
||||
class Session;
|
||||
class PortInsert;
|
||||
class Connection;
|
||||
class Plugin;
|
||||
}
|
||||
|
||||
|
||||
class RedirectBox : public Gtk::HBox
|
||||
{
|
||||
public:
|
||||
|
|
@ -217,6 +218,9 @@ class RedirectBox : public Gtk::HBox
|
|||
static void rb_activate_all ();
|
||||
static void rb_deactivate_all ();
|
||||
static void rb_edit ();
|
||||
|
||||
void route_name_changed (void* src, PluginUIWindow* plugin_ui, boost::shared_ptr<ARDOUR::PluginInsert> pi);
|
||||
std::string generate_redirect_title (boost::shared_ptr<ARDOUR::PluginInsert> pi);
|
||||
};
|
||||
|
||||
#endif /* __ardour_gtk_redirect_box__ */
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ AudioRegionGainLine::start_drag (ControlPoint* cp, float fraction)
|
|||
if (!rv.audio_region()->envelope_active()) {
|
||||
trackview.session().add_command(new MementoCommand<AudioRegion>(*(rv.audio_region().get()), &rv.audio_region()->get_state(), 0));
|
||||
rv.audio_region()->set_envelope_active(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This is an extended copy from AutomationList
|
||||
|
|
@ -62,18 +62,18 @@ AudioRegionGainLine::remove_point (ControlPoint& cp)
|
|||
model_representation (cp, mr);
|
||||
|
||||
trackview.editor.current_session()->begin_reversible_command (_("remove control point"));
|
||||
XMLNode &before = get_state();
|
||||
XMLNode &before = alist.get_state();
|
||||
|
||||
if (!rv.audio_region()->envelope_active()) {
|
||||
XMLNode &before = rv.audio_region()->get_state();
|
||||
XMLNode ®ion_before = rv.audio_region()->get_state();
|
||||
rv.audio_region()->set_envelope_active(true);
|
||||
XMLNode &after = rv.audio_region()->get_state();
|
||||
trackview.session().add_command(new MementoCommand<AudioRegion>(*(rv.audio_region().get()), &before, &after));
|
||||
}
|
||||
|
||||
XMLNode ®ion_after = rv.audio_region()->get_state();
|
||||
trackview.session().add_command(new MementoCommand<AudioRegion>(*(rv.audio_region().get()), ®ion_before, ®ion_after));
|
||||
}
|
||||
|
||||
alist.erase (mr.start, mr.end);
|
||||
|
||||
trackview.editor.current_session()->add_command (new MementoCommand<AudioRegionGainLine>(*this, &before, &get_state()));
|
||||
trackview.editor.current_session()->add_command (new MementoCommand<AutomationList>(alist, &before, &alist.get_state()));
|
||||
trackview.editor.current_session()->commit_reversible_command ();
|
||||
trackview.editor.current_session()->set_dirty ();
|
||||
}
|
||||
|
|
@ -84,14 +84,8 @@ AudioRegionGainLine::end_drag (ControlPoint* cp)
|
|||
if (!rv.audio_region()->envelope_active()) {
|
||||
rv.audio_region()->set_envelope_active(true);
|
||||
trackview.session().add_command(new MementoCommand<AudioRegion>(*(rv.audio_region().get()), 0, &rv.audio_region()->get_state()));
|
||||
}
|
||||
}
|
||||
|
||||
AutomationLine::end_drag(cp);
|
||||
}
|
||||
|
||||
|
||||
// This is a copy from AutomationList
|
||||
UndoAction
|
||||
AudioRegionGainLine::get_memento ()
|
||||
{
|
||||
return alist.get_memento();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,23 +79,19 @@ RegionSelection::clear_all()
|
|||
{
|
||||
clear();
|
||||
_bylayer.clear();
|
||||
_current_start = 0;
|
||||
_current_end = 0;
|
||||
}
|
||||
|
||||
bool RegionSelection::contains (RegionView* rv)
|
||||
{
|
||||
if (this->find (rv) != end()) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this->find (rv) != end();
|
||||
}
|
||||
|
||||
void
|
||||
RegionSelection::add (RegionView* rv, bool dosort)
|
||||
{
|
||||
if (this->find (rv) != end()) {
|
||||
if (contains (rv)) {
|
||||
/* we already have it */
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,8 +149,6 @@ RegionView::~RegionView ()
|
|||
{
|
||||
in_destructor = true;
|
||||
|
||||
RegionViewGoingAway (this); /* EMIT_SIGNAL */
|
||||
|
||||
for (vector<GhostRegion*>::iterator g = ghosts.begin(); g != ghosts.end(); ++g) {
|
||||
delete *g;
|
||||
}
|
||||
|
|
@ -407,6 +405,7 @@ RegionView::region_renamed ()
|
|||
|
||||
set_item_name (str, this);
|
||||
set_name_text (str);
|
||||
reset_width_dependent_items (_pixel_width);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include <gtkmm2ext/utils.h>
|
||||
|
||||
#include <ardour/playlist.h>
|
||||
#include <ardour/audioplaylist.h>
|
||||
#include <ardour/diskstream.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/ladspa_plugin.h>
|
||||
|
|
@ -116,7 +117,8 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
|
|||
visual_button.set_name ("TrackVisualButton");
|
||||
hide_button.set_name ("TrackRemoveButton");
|
||||
|
||||
hide_button.add (*(manage (new Image (get_xpm("small_x.xpm")))));
|
||||
hide_button.add (*(manage (new Image (::get_icon("hide")))));
|
||||
hide_button.show_all ();
|
||||
|
||||
edit_group_button.signal_button_release_event().connect (mem_fun(*this, &RouteTimeAxisView::edit_click), false);
|
||||
playlist_button.signal_clicked().connect (mem_fun(*this, &RouteTimeAxisView::playlist_click));
|
||||
|
|
@ -125,13 +127,26 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
|
|||
visual_button.signal_clicked().connect (mem_fun(*this, &RouteTimeAxisView::visual_click));
|
||||
hide_button.signal_clicked().connect (mem_fun(*this, &RouteTimeAxisView::hide_click));
|
||||
|
||||
solo_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::solo_press), false);
|
||||
solo_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::solo_release), false);
|
||||
mute_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::mute_press), false);
|
||||
mute_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::mute_release), false);
|
||||
solo_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::solo_press));
|
||||
solo_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::solo_release));
|
||||
mute_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::mute_press));
|
||||
mute_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::mute_release));
|
||||
|
||||
if (is_track()) {
|
||||
rec_enable_button->set_active (false);
|
||||
|
||||
/* use icon */
|
||||
|
||||
rec_enable_button->remove ();
|
||||
switch (track()->mode()) {
|
||||
case ARDOUR::Normal:
|
||||
rec_enable_button->add (*(manage (new Image (::get_icon (X_("record_normal_red"))))));
|
||||
break;
|
||||
case ARDOUR::Destructive:
|
||||
rec_enable_button->add (*(manage (new Image (::get_icon (X_("record_tape_red"))))));
|
||||
break;
|
||||
}
|
||||
rec_enable_button->show_all ();
|
||||
|
||||
rec_enable_button->set_name ("TrackRecordEnableButton");
|
||||
rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press));
|
||||
controls_table.attach (*rec_enable_button, 5, 6, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
|
|
@ -192,6 +207,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
|
|||
|
||||
if (is_track()) {
|
||||
|
||||
track()->TrackModeChanged.connect (mem_fun(*this, &RouteTimeAxisView::track_mode_changed));
|
||||
track()->FreezeChange.connect (mem_fun(*this, &RouteTimeAxisView::map_frozen));
|
||||
track()->DiskstreamChanged.connect (mem_fun(*this, &RouteTimeAxisView::diskstream_changed));
|
||||
get_diskstream()->SpeedChanged.connect (mem_fun(*this, &RouteTimeAxisView::speed_changed));
|
||||
|
|
@ -286,8 +302,6 @@ RouteTimeAxisView::add_edit_group_menu_item (RouteGroup *eg, RadioMenuItem::Grou
|
|||
|
||||
MenuList &items = edit_group_menu.items();
|
||||
|
||||
cerr << "adding edit group " << eg->name() << endl;
|
||||
|
||||
items.push_back (RadioMenuElem (*group, eg->name(), bind (mem_fun(*this, &RouteTimeAxisView::set_edit_group_from_menu), eg)));
|
||||
if (_route->edit_group() == eg) {
|
||||
static_cast<RadioMenuItem*>(&items.back())->set_active ();
|
||||
|
|
@ -296,18 +310,10 @@ RouteTimeAxisView::add_edit_group_menu_item (RouteGroup *eg, RadioMenuItem::Grou
|
|||
|
||||
void
|
||||
RouteTimeAxisView::set_edit_group_from_menu (RouteGroup *eg)
|
||||
|
||||
{
|
||||
_route->set_edit_group (eg, this);
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::playlist_state_changed (Change ignored)
|
||||
{
|
||||
// ENSURE_GUI_THREAD (bind (mem_fun(*this, &RouteTimeAxisView::playlist_state_changed), ignored));
|
||||
// why are we here ?
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::playlist_changed ()
|
||||
|
||||
|
|
@ -352,13 +358,15 @@ RouteTimeAxisView::playlist_click ()
|
|||
{
|
||||
// always build a new action menu
|
||||
|
||||
if (playlist_action_menu == 0) {
|
||||
playlist_action_menu = new Menu;
|
||||
playlist_action_menu->set_name ("ArdourContextMenu");
|
||||
}
|
||||
|
||||
build_playlist_menu(playlist_action_menu);
|
||||
if (playlist_action_menu != 0) {
|
||||
delete playlist_action_menu;
|
||||
}
|
||||
|
||||
playlist_action_menu = new Menu;
|
||||
playlist_action_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
build_playlist_menu (playlist_action_menu);
|
||||
editor.set_selected_track (*this, Selection::Add);
|
||||
playlist_action_menu->popup (1, 0);
|
||||
}
|
||||
|
||||
|
|
@ -371,6 +379,7 @@ RouteTimeAxisView::automation_click ()
|
|||
*/
|
||||
build_display_menu ();
|
||||
}
|
||||
editor.set_selected_track (*this, Selection::Add);
|
||||
automation_action_menu->popup (1, 0);
|
||||
}
|
||||
|
||||
|
|
@ -453,6 +462,24 @@ RouteTimeAxisView::build_display_menu ()
|
|||
|
||||
get_diskstream()->AlignmentStyleChanged.connect (
|
||||
mem_fun(*this, &RouteTimeAxisView::align_style_changed));
|
||||
|
||||
RadioMenuItem::Group mode_group;
|
||||
items.push_back (RadioMenuElem (mode_group, _("Normal mode"),
|
||||
bind (mem_fun (*this, &RouteTimeAxisView::set_track_mode), ARDOUR::Normal)));
|
||||
normal_track_mode_item = dynamic_cast<RadioMenuItem*>(&items.back());
|
||||
items.push_back (RadioMenuElem (mode_group, _("Tape mode"),
|
||||
bind (mem_fun (*this, &RouteTimeAxisView::set_track_mode), ARDOUR::Destructive)));
|
||||
destructive_track_mode_item = dynamic_cast<RadioMenuItem*>(&items.back());
|
||||
|
||||
|
||||
switch (track()->mode()) {
|
||||
case ARDOUR::Destructive:
|
||||
destructive_track_mode_item->set_active ();
|
||||
break;
|
||||
case ARDOUR::Normal:
|
||||
normal_track_mode_item->set_active ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
|
@ -464,6 +491,91 @@ RouteTimeAxisView::build_display_menu ()
|
|||
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
|
||||
}
|
||||
|
||||
static bool __reset_item (RadioMenuItem* item)
|
||||
{
|
||||
cerr << "reset item to true\n";
|
||||
item->set_active ();
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::set_track_mode (TrackMode mode)
|
||||
{
|
||||
RadioMenuItem* item;
|
||||
RadioMenuItem* other_item;
|
||||
|
||||
switch (mode) {
|
||||
case ARDOUR::Normal:
|
||||
item = normal_track_mode_item;
|
||||
other_item = destructive_track_mode_item;
|
||||
break;
|
||||
case ARDOUR::Destructive:
|
||||
item = destructive_track_mode_item;
|
||||
other_item = normal_track_mode_item;
|
||||
break;
|
||||
default:
|
||||
fatal << string_compose (_("programming error: %1 %2"), "illegal track mode in RouteTimeAxisView::set_track_mode", mode) << endmsg;
|
||||
/*NOTREACHED*/
|
||||
return;
|
||||
}
|
||||
|
||||
if (item->get_active () && track()->mode() != mode) {
|
||||
_set_track_mode (track(), mode, other_item);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::_set_track_mode (Track* track, TrackMode mode, RadioMenuItem* reset_item)
|
||||
{
|
||||
bool needs_bounce;
|
||||
|
||||
if (!track->can_use_mode (mode, needs_bounce)) {
|
||||
|
||||
if (!needs_bounce) {
|
||||
/* cannot be done */
|
||||
Glib::signal_idle().connect (bind (sigc::ptr_fun (__reset_item), reset_item));
|
||||
return;
|
||||
} else {
|
||||
cerr << "would bounce this one\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
track->set_mode (mode);
|
||||
|
||||
rec_enable_button->remove ();
|
||||
switch (mode) {
|
||||
case ARDOUR::Normal:
|
||||
rec_enable_button->add (*(manage (new Image (::get_icon (X_("record_normal_red"))))));
|
||||
break;
|
||||
case ARDOUR::Destructive:
|
||||
rec_enable_button->add (*(manage (new Image (::get_icon (X_("record_tape_red"))))));
|
||||
break;
|
||||
}
|
||||
rec_enable_button->show_all ();
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::track_mode_changed ()
|
||||
{
|
||||
RadioMenuItem* item;
|
||||
|
||||
switch (track()->mode()) {
|
||||
case ARDOUR::Normal:
|
||||
item = normal_track_mode_item;
|
||||
break;
|
||||
case ARDOUR::Destructive:
|
||||
item = destructive_track_mode_item;
|
||||
break;
|
||||
default:
|
||||
fatal << string_compose (_("programming error: %1 %2"), "illegal track mode in RouteTimeAxisView::set_track_mode", track()->mode()) << endmsg;
|
||||
/*NOTREACHED*/
|
||||
return;
|
||||
}
|
||||
|
||||
item->set_active ();
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
|
||||
|
|
@ -710,7 +822,24 @@ RouteTimeAxisView::align_style_changed ()
|
|||
void
|
||||
RouteTimeAxisView::set_align_style (AlignStyle style)
|
||||
{
|
||||
get_diskstream()->set_align_style (style);
|
||||
RadioMenuItem* item;
|
||||
|
||||
switch (style) {
|
||||
case ExistingMaterial:
|
||||
item = align_existing_item;
|
||||
break;
|
||||
case CaptureTime:
|
||||
item = align_capture_item;
|
||||
break;
|
||||
default:
|
||||
fatal << string_compose (_("programming error: %1 %2"), "illegal align style in RouteTimeAxisView::set_align_style", style) << endmsg;
|
||||
/*NOTREACHED*/
|
||||
return;
|
||||
}
|
||||
|
||||
if (item->get_active()) {
|
||||
get_diskstream()->set_align_style (style);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -782,7 +911,7 @@ RouteTimeAxisView::use_copy_playlist (bool prompt)
|
|||
|
||||
if (name.length()) {
|
||||
ds->use_copy_playlist ();
|
||||
pl->set_name (name);
|
||||
ds->playlist()->set_name (name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -809,7 +938,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt)
|
|||
prompter.set_initial_text (name);
|
||||
prompter.add_button (Gtk::Stock::NEW, Gtk::RESPONSE_ACCEPT);
|
||||
prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
|
||||
|
||||
|
||||
switch (prompter.run ()) {
|
||||
case Gtk::RESPONSE_ACCEPT:
|
||||
prompter.get_result (name);
|
||||
|
|
@ -822,7 +951,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt)
|
|||
|
||||
if (name.length()) {
|
||||
ds->use_new_playlist ();
|
||||
pl->set_name (name);
|
||||
ds->playlist()->set_name (name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -879,6 +1008,10 @@ RouteTimeAxisView::selection_click (GdkEventButton* ev)
|
|||
case Selection::Extend:
|
||||
/* not defined yet */
|
||||
break;
|
||||
|
||||
case Selection::Add:
|
||||
editor.get_selection().add (*tracks);
|
||||
break;
|
||||
}
|
||||
|
||||
delete tracks;
|
||||
|
|
@ -998,7 +1131,12 @@ RouteTimeAxisView::visual_click ()
|
|||
void
|
||||
RouteTimeAxisView::hide_click ()
|
||||
{
|
||||
// LAME fix for hide_button refresh fix
|
||||
hide_button.set_sensitive(false);
|
||||
|
||||
editor.hide_track_in_display (*this);
|
||||
|
||||
hide_button.set_sensitive(true);
|
||||
}
|
||||
|
||||
boost::shared_ptr<Region>
|
||||
|
|
@ -1124,12 +1262,28 @@ RouteTimeAxisView::build_playlist_menu (Gtk::Menu * menu)
|
|||
if (playlist_menu) {
|
||||
delete playlist_menu;
|
||||
}
|
||||
|
||||
playlist_menu = new Menu;
|
||||
playlist_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
playlist_items.push_back (MenuElem (string_compose (_("Current: %1"), get_diskstream()->playlist()->name())));
|
||||
playlist_items.push_back (SeparatorElem());
|
||||
vector<Playlist*> playlists;
|
||||
boost::shared_ptr<Diskstream> ds = get_diskstream();
|
||||
RadioMenuItem::Group playlist_group;
|
||||
|
||||
_session.get_playlists (playlists);
|
||||
|
||||
for (vector<Playlist*>::iterator i = playlists.begin(); i != playlists.end(); ++i) {
|
||||
|
||||
if ((*i)->get_orig_diskstream_id() == ds->id()) {
|
||||
playlist_items.push_back (RadioMenuElem (playlist_group, (*i)->name(), bind (mem_fun (*this, &RouteTimeAxisView::use_playlist), (*i))));
|
||||
|
||||
if (ds->playlist()->id() == (*i)->id()) {
|
||||
static_cast<RadioMenuItem*>(&playlist_items.back())->set_active();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
playlist_items.push_back (SeparatorElem());
|
||||
playlist_items.push_back (MenuElem (_("Rename"), mem_fun(*this, &RouteTimeAxisView::rename_current_playlist)));
|
||||
playlist_items.push_back (SeparatorElem());
|
||||
|
||||
|
|
@ -1138,8 +1292,20 @@ RouteTimeAxisView::build_playlist_menu (Gtk::Menu * menu)
|
|||
playlist_items.push_back (SeparatorElem());
|
||||
playlist_items.push_back (MenuElem (_("Clear Current"), mem_fun(editor, &PublicEditor::clear_playlists)));
|
||||
playlist_items.push_back (SeparatorElem());
|
||||
playlist_items.push_back (MenuElem(_("Select"), mem_fun(*this, &RouteTimeAxisView::show_playlist_selector)));
|
||||
|
||||
playlist_items.push_back (MenuElem(_("Select from all ..."), mem_fun(*this, &RouteTimeAxisView::show_playlist_selector)));
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::use_playlist (Playlist* pl)
|
||||
{
|
||||
AudioPlaylist* apl = dynamic_cast<AudioPlaylist*> (pl);
|
||||
|
||||
assert (is_track());
|
||||
|
||||
if (apl) {
|
||||
get_diskstream()->use_playlist (apl);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -134,14 +134,6 @@ protected:
|
|||
|
||||
gint edit_click (GdkEventButton *);
|
||||
|
||||
void build_redirect_window ();
|
||||
void redirect_click ();
|
||||
void redirect_add ();
|
||||
void redirect_remove ();
|
||||
void redirect_edit ();
|
||||
void redirect_relist ();
|
||||
void redirect_row_selected (gint row, gint col, GdkEvent *ev);
|
||||
void add_to_redirect_display (ARDOUR::Redirect *);
|
||||
void redirects_changed (void *);
|
||||
|
||||
void add_redirect_to_subplugin_menu (boost::shared_ptr<ARDOUR::Redirect>);
|
||||
|
|
@ -164,14 +156,10 @@ protected:
|
|||
|
||||
void reset_redirect_automation_curves ();
|
||||
|
||||
void update_automation_view (ARDOUR::AutomationType);
|
||||
|
||||
void take_name_changed (void *);
|
||||
void route_name_changed (void *);
|
||||
void name_entry_changed ();
|
||||
|
||||
void on_area_realize ();
|
||||
|
||||
virtual void label_view ();
|
||||
|
||||
void add_edit_group_menu_item (ARDOUR::RouteGroup *, Gtk::RadioMenuItem::Group*);
|
||||
|
|
@ -192,10 +180,8 @@ protected:
|
|||
void playlist_click ();
|
||||
void show_playlist_selector ();
|
||||
void playlist_changed ();
|
||||
void playlist_state_changed (ARDOUR::Change);
|
||||
void playlist_modified ();
|
||||
|
||||
void add_playlist_to_playlist_menu (ARDOUR::Playlist*);
|
||||
void rename_current_playlist ();
|
||||
|
||||
void automation_click ();
|
||||
|
|
@ -207,7 +193,6 @@ protected:
|
|||
|
||||
void visual_click ();
|
||||
void hide_click ();
|
||||
gint when_displayed (GdkEventAny*);
|
||||
|
||||
void speed_changed ();
|
||||
|
||||
|
|
@ -238,12 +223,20 @@ protected:
|
|||
Gtk::Menu edit_group_menu;
|
||||
Gtk::RadioMenuItem* align_existing_item;
|
||||
Gtk::RadioMenuItem* align_capture_item;
|
||||
Gtk::RadioMenuItem* normal_track_mode_item;
|
||||
Gtk::RadioMenuItem* destructive_track_mode_item;
|
||||
Gtk::Menu* playlist_menu;
|
||||
Gtk::Menu* playlist_action_menu;
|
||||
Gtk::MenuItem* playlist_item;
|
||||
|
||||
void use_playlist (ARDOUR::Playlist*);
|
||||
|
||||
ArdourCanvas::SimpleRect* timestretch_rect;
|
||||
|
||||
|
||||
void set_track_mode (ARDOUR::TrackMode);
|
||||
void _set_track_mode (ARDOUR::Track* track, ARDOUR::TrackMode mode, Gtk::RadioMenuItem* reset_item);
|
||||
void track_mode_changed ();
|
||||
|
||||
list<RedirectAutomationInfo*> redirect_automation;
|
||||
vector<RedirectAutomationLine*> redirect_automation_curves;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
#include "gui_thread.h"
|
||||
|
||||
#include <ardour/route.h>
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/audioengine.h>
|
||||
#include <ardour/audio_track.h>
|
||||
#include <ardour/audio_diskstream.h>
|
||||
#include <ardour/midi_track.h>
|
||||
|
|
@ -72,8 +74,15 @@ RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, co
|
|||
|
||||
_route->active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed));
|
||||
|
||||
mute_button = manage (new BindableToggleButton (_route->mute_control(), m_name ));
|
||||
solo_button = manage (new BindableToggleButton (_route->solo_control(), s_name ));
|
||||
mute_button = manage (new BindableToggleButton (_route->mute_control(), m_name ));
|
||||
solo_button = manage (new BindableToggleButton (_route->solo_control(), s_name ));
|
||||
|
||||
// mute_button->unset_flags (Gtk::CAN_FOCUS);
|
||||
// solo_button->unset_flags (Gtk::CAN_FOCUS);
|
||||
|
||||
_route->mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed));
|
||||
_route->solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
||||
_route->solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
|
||||
|
||||
if (is_track()) {
|
||||
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(_route);
|
||||
|
|
@ -83,7 +92,6 @@ RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, co
|
|||
_session.RecordStateChanged.connect (mem_fun (*this, &RouteUI::session_rec_enable_changed));
|
||||
|
||||
rec_enable_button = manage (new BindableToggleButton (t->rec_enable_control(), r_name ));
|
||||
|
||||
rec_enable_button->unset_flags (Gtk::CAN_FOCUS);
|
||||
|
||||
update_rec_display ();
|
||||
|
|
@ -114,7 +122,7 @@ RouteUI::mute_press(GdkEventButton* ev)
|
|||
build_mute_menu();
|
||||
}
|
||||
|
||||
mute_menu->popup(0,0);
|
||||
mute_menu->popup(0,ev->time);
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -124,6 +132,8 @@ RouteUI::mute_press(GdkEventButton* ev)
|
|||
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control))) {
|
||||
wait_for_release = true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -189,7 +199,7 @@ RouteUI::solo_press(GdkEventButton* ev)
|
|||
build_solo_menu ();
|
||||
}
|
||||
|
||||
solo_menu->popup (1, 0);
|
||||
solo_menu->popup (1, ev->time);
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -200,6 +210,8 @@ RouteUI::solo_press(GdkEventButton* ev)
|
|||
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control))) {
|
||||
wait_for_release = true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -277,6 +289,12 @@ RouteUI::solo_release(GdkEventButton* ev)
|
|||
bool
|
||||
RouteUI::rec_enable_press(GdkEventButton* ev)
|
||||
{
|
||||
if (!_session.engine().connected()) {
|
||||
MessageDialog msg (_("Not connected to JACK - cannot engage record"));
|
||||
msg.run ();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!ignore_toggle && is_track() && rec_enable_button) {
|
||||
|
||||
if (ev->button == 2 && Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
|
|
@ -489,7 +507,7 @@ RouteUI::build_solo_menu (void)
|
|||
items.push_back (CheckMenuElem(*check));
|
||||
check->show_all();
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
//items.push_back (SeparatorElem());
|
||||
// items.push_back (MenuElem (_("MIDI Bind"), mem_fun (*mute_button, &BindableToggleButton::midi_learn)));
|
||||
|
||||
}
|
||||
|
|
@ -532,7 +550,7 @@ RouteUI::build_mute_menu(void)
|
|||
items.push_back (CheckMenuElem(*check));
|
||||
check->show_all();
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
//items.push_back (SeparatorElem());
|
||||
// items.push_back (MenuElem (_("MIDI Bind"), mem_fun (*mute_button, &BindableToggleButton::midi_learn)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,8 +156,6 @@ class RouteUI : public virtual AxisView
|
|||
|
||||
void reversibly_apply_route_boolean (string name, void (ARDOUR::Route::*func)(bool, void*), bool, void *);
|
||||
void reversibly_apply_track_boolean (string name, void (ARDOUR::Track::*func)(bool, void*), bool, void *);
|
||||
|
||||
sigc::signal<void> GoingAway;
|
||||
};
|
||||
|
||||
#endif /* __ardour_route_ui__ */
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class Selection : public sigc::trackable
|
|||
|
||||
enum Operation {
|
||||
Set,
|
||||
Add,
|
||||
Toggle,
|
||||
Extend
|
||||
};
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ SoundFileBox::SoundFileBox ()
|
|||
main_box.pack_start(format, false, false);
|
||||
main_box.pack_start(channels, false, false);
|
||||
main_box.pack_start(samplerate, false, false);
|
||||
main_box.pack_start(timecode, false, false);
|
||||
main_box.pack_start(field_view, true, true);
|
||||
main_box.pack_start(top_box, false, false);
|
||||
main_box.pack_start(bottom_box, false, false);
|
||||
|
|
@ -129,21 +130,25 @@ SoundFileBox::setup_labels (string filename)
|
|||
path = filename;
|
||||
|
||||
string error_msg;
|
||||
|
||||
if(!AudioFileSource::get_soundfile_info (filename, sf_info, error_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
length.set_alignment (0.0f, 0.0f);
|
||||
length.set_text (string_compose("Length: %1", PBD::length2string(sf_info.length, sf_info.samplerate)));
|
||||
length.set_text (string_compose(_("Length: %1"), PBD::length2string(sf_info.length, sf_info.samplerate)));
|
||||
|
||||
format.set_alignment (0.0f, 0.0f);
|
||||
format.set_text (sf_info.format_name);
|
||||
|
||||
channels.set_alignment (0.0f, 0.0f);
|
||||
channels.set_text (string_compose("Channels: %1", sf_info.channels));
|
||||
channels.set_text (string_compose(_("Channels: %1"), sf_info.channels));
|
||||
|
||||
samplerate.set_alignment (0.0f, 0.0f);
|
||||
samplerate.set_text (string_compose("Samplerate: %1", sf_info.samplerate));
|
||||
samplerate.set_text (string_compose(_("Samplerate: %1"), sf_info.samplerate));
|
||||
|
||||
timecode.set_alignment (0.0f, 0.0f);
|
||||
timecode.set_text (string_compose (_("Timecode: %1"), PBD::length2string(sf_info.timecode, sf_info.samplerate)));
|
||||
|
||||
setup_fields ();
|
||||
|
||||
|
|
@ -190,9 +195,11 @@ SoundFileBox::play_btn_clicked ()
|
|||
return;
|
||||
}
|
||||
|
||||
static std::map<string, boost::shared_ptr<AudioRegion> > region_cache;
|
||||
typedef std::map<string, boost::shared_ptr<AudioRegion> > RegionCache;
|
||||
static RegionCache region_cache;
|
||||
RegionCache::iterator the_region;
|
||||
|
||||
if (region_cache.find (path) == region_cache.end()) {
|
||||
if ((the_region = region_cache.find (path)) == region_cache.end()) {
|
||||
SourceList srclist;
|
||||
boost::shared_ptr<AudioFileSource> afs;
|
||||
|
||||
|
|
@ -211,18 +218,27 @@ SoundFileBox::play_btn_clicked ()
|
|||
return;
|
||||
}
|
||||
|
||||
string rname;
|
||||
|
||||
_session->region_name (rname, Glib::path_get_basename(srclist[0]->name()), false);
|
||||
|
||||
pair<string,boost::shared_ptr<AudioRegion> > newpair;
|
||||
pair<RegionCache::iterator,bool> res;
|
||||
|
||||
_session->region_name (newpair.first, Glib::path_get_basename(srclist[0]->name()), false);
|
||||
newpair.second = boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (srclist, 0, srclist[0]->length(), newpair.first, 0, Region::DefaultFlags, false));
|
||||
newpair.first = path;
|
||||
newpair.second = boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (srclist, 0, srclist[0]->length(), rname, 0, Region::DefaultFlags, false));
|
||||
|
||||
region_cache.insert (newpair);
|
||||
|
||||
res = region_cache.insert (newpair);
|
||||
the_region = res.first;
|
||||
}
|
||||
|
||||
play_btn.hide();
|
||||
stop_btn.show();
|
||||
|
||||
_session->audition_region(region_cache[path]);
|
||||
boost::shared_ptr<Region> r = boost::static_pointer_cast<Region> (the_region->second);
|
||||
|
||||
_session->audition_region(r);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -356,7 +372,7 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s)
|
|||
split_check (_("Split Channels"))
|
||||
{
|
||||
if (mode_strings.empty()) {
|
||||
mode_strings = PBD::internationalize (import_mode_strings);
|
||||
mode_strings = I18N (import_mode_strings);
|
||||
}
|
||||
|
||||
ARDOUR_UI::instance()->tooltips().set_tip(split_check,
|
||||
|
|
@ -366,12 +382,12 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s)
|
|||
ARDOUR_UI::instance()->tooltips().set_tip(*btn,
|
||||
_("Link to an external file"));
|
||||
|
||||
add_button (Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
|
||||
|
||||
btn = add_button (_("Import"), ResponseImport);
|
||||
ARDOUR_UI::instance()->tooltips().set_tip(*btn,
|
||||
_("Copy a file to the session folder"));
|
||||
|
||||
add_button (Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
|
||||
|
||||
Gtk::HBox *box = manage (new Gtk::HBox());
|
||||
|
||||
Gtkmm2ext::set_popdown_strings (mode_combo, mode_strings);
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ class SoundFileBox : public Gtk::VBox
|
|||
Gtk::Label format;
|
||||
Gtk::Label channels;
|
||||
Gtk::Label samplerate;
|
||||
Gtk::Label timecode;
|
||||
|
||||
Gtk::TreeView field_view;
|
||||
Glib::RefPtr<Gtk::ListStore> fields;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ StreamView::StreamView (RouteTimeAxisView& tv)
|
|||
canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
|
||||
canvas_rect->property_x1() = 0.0;
|
||||
canvas_rect->property_y1() = 0.0;
|
||||
canvas_rect->property_x2() = 1000000.0;
|
||||
canvas_rect->property_x2() = _trackview.editor.frame_to_pixel (max_frames);
|
||||
canvas_rect->property_y2() = (double) tv.height;
|
||||
canvas_rect->property_outline_what() = (guint32) (0x1|0x2|0x8); // outline ends and bottom
|
||||
// (Fill/Outline colours set in derived classes)
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
|||
|
||||
if (canvas_item_visible ((*i)->canvas_display)) {
|
||||
++nth;
|
||||
effective_height += (*i)->show_at (y + effective_height, nth, parent);
|
||||
effective_height += (*i)->show_at (y + 1 + effective_height, nth, parent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -286,18 +286,8 @@ TimeAxisView::controls_ebox_button_release (GdkEventButton* ev)
|
|||
void
|
||||
TimeAxisView::selection_click (GdkEventButton* ev)
|
||||
{
|
||||
if (Keyboard::modifier_state_contains (ev->state, Keyboard::Shift)) {
|
||||
|
||||
if (editor.get_selection().selected (this)) {
|
||||
editor.get_selection().remove (this);
|
||||
} else {
|
||||
editor.get_selection().add (this);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
editor.get_selection().set (this);
|
||||
}
|
||||
Selection::Operation op = Keyboard::selection_type (ev->state);
|
||||
editor.set_selected_track (*this, op, false);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -383,8 +373,48 @@ TimeAxisView::set_height_pixels (uint32_t h)
|
|||
bool
|
||||
TimeAxisView::name_entry_key_release (GdkEventKey* ev)
|
||||
{
|
||||
PublicEditor::TrackViewList *allviews = 0;
|
||||
PublicEditor::TrackViewList::iterator i;
|
||||
|
||||
switch (ev->keyval) {
|
||||
case GDK_Escape:
|
||||
name_entry.select_region (0,0);
|
||||
controls_ebox.grab_focus ();
|
||||
name_entry_changed ();
|
||||
return true;
|
||||
|
||||
/* Shift+Tab Keys Pressed. Note that for Shift+Tab, GDK actually
|
||||
* generates a different ev->keyval, rather than setting
|
||||
* ev->state.
|
||||
*/
|
||||
case GDK_ISO_Left_Tab:
|
||||
case GDK_Tab:
|
||||
name_entry_changed ();
|
||||
allviews = editor.get_valid_views (0);
|
||||
if (allviews != 0) {
|
||||
i = find (allviews->begin(), allviews->end(), this);
|
||||
if (ev->keyval == GDK_Tab) {
|
||||
if (i != allviews->end()) {
|
||||
do {
|
||||
if (++i == allviews->end()) { return true; }
|
||||
} while((*i)->hidden());
|
||||
}
|
||||
} else {
|
||||
if (i != allviews->begin()) {
|
||||
do {
|
||||
if (--i == allviews->begin()) { return true; }
|
||||
} while ((*i)->hidden());
|
||||
}
|
||||
}
|
||||
|
||||
if ((*i)->height_style == Small) {
|
||||
(*i)->set_height(Smaller);
|
||||
}
|
||||
|
||||
(*i)->name_entry.grab_focus();
|
||||
}
|
||||
return true;
|
||||
|
||||
case GDK_Up:
|
||||
case GDK_Down:
|
||||
name_entry_changed ();
|
||||
|
|
@ -434,6 +464,7 @@ TimeAxisView::name_entry_focus_out (GdkEventFocus* ev)
|
|||
last_name_entry_key_press_event = 0;
|
||||
name_entry_key_timeout.disconnect ();
|
||||
name_entry.set_name ("EditorTrackNameDisplay");
|
||||
name_entry.select_region (0,0);
|
||||
|
||||
/* do the real stuff */
|
||||
|
||||
|
|
@ -485,12 +516,14 @@ TimeAxisView::popup_display_menu (guint32 when)
|
|||
if (display_menu == 0) {
|
||||
build_display_menu ();
|
||||
}
|
||||
editor.set_selected_track (*this, Selection::Add);
|
||||
display_menu->popup (1, when);
|
||||
}
|
||||
|
||||
gint
|
||||
TimeAxisView::size_click (GdkEventButton *ev)
|
||||
{
|
||||
editor.set_selected_track (*this, Selection::Add);
|
||||
popup_size_menu (ev->time);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -359,12 +359,25 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
|||
GtkWidget* focus = gtk_window_get_focus (win);
|
||||
bool special_handling_of_unmodified_accelerators = false;
|
||||
|
||||
#undef DEBUG_ACCELERATOR_HANDLING
|
||||
#ifdef DEBUG_ACCELERATOR_HANDLING
|
||||
bool debug = (getenv ("ARDOUR_DEBUG_ACCELERATOR_HANDLING") != 0);
|
||||
#endif
|
||||
|
||||
if (focus) {
|
||||
if (GTK_IS_ENTRY(focus)) {
|
||||
special_handling_of_unmodified_accelerators = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_ACCELERATOR_HANDLING
|
||||
if (debug) {
|
||||
cerr << "Key event: code = " << ev->keyval << " state = " << hex << ev->state << dec << " focus is an entry ? "
|
||||
<< special_handling_of_unmodified_accelerators
|
||||
<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This exists to allow us to override the way GTK handles
|
||||
key events. The normal sequence is:
|
||||
|
||||
|
|
@ -441,20 +454,40 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
|||
|
||||
/* no special handling or modifiers in effect: accelerate first */
|
||||
|
||||
#ifdef DEBUG_ACCELERATOR_HANDLING
|
||||
if (debug) {
|
||||
cerr << "\tactivate, then propagate\n";
|
||||
}
|
||||
#endif
|
||||
if (!gtk_window_activate_key (win, ev)) {
|
||||
return gtk_window_propagate_key_event (win, ev);
|
||||
} else {
|
||||
#ifdef DEBUG_ACCELERATOR_HANDLING
|
||||
if (debug) {
|
||||
cerr << "\tnot handled\n";
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* no modifiers, propagate first */
|
||||
|
||||
#ifdef DEBUG_ACCELERATOR_HANDLING
|
||||
if (debug) {
|
||||
cerr << "\tactivate, then propagate\n";
|
||||
}
|
||||
#endif
|
||||
if (!gtk_window_propagate_key_event (win, ev)) {
|
||||
return gtk_window_activate_key (win, ev);
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG_ACCELERATOR_HANDLING
|
||||
if (debug) {
|
||||
cerr << "\tnot handled\n";
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,12 @@ VisualTimeAxis::visual_click()
|
|||
void
|
||||
VisualTimeAxis::hide_click()
|
||||
{
|
||||
// LAME fix for hide_button display refresh
|
||||
hide_button.set_sensitive(false);
|
||||
|
||||
editor.hide_track_in_display (*this);
|
||||
|
||||
hide_button.set_sensitive(true);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ ardour = env.Copy()
|
|||
|
||||
domain = 'libardour'
|
||||
|
||||
ardour.Append(DOMAIN = domain, MAJOR = 1, MINOR = 0, MICRO = 0)
|
||||
ardour.Append(DOMAIN = domain, MAJOR = 2, MINOR = 0, MICRO = 0)
|
||||
ardour.Append(CXXFLAGS = "-DPACKAGE=\\\"" + domain + "\\\"")
|
||||
ardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
|
||||
ardour.Append(PACKAGE = domain)
|
||||
|
|
@ -44,6 +44,7 @@ buffer_set.cc
|
|||
meter.cc
|
||||
amp.cc
|
||||
panner.cc
|
||||
destructive_filesource.cc
|
||||
audiofilesource.cc
|
||||
audiofilter.cc
|
||||
audioregion.cc
|
||||
|
|
@ -64,7 +65,6 @@ crossfade.cc
|
|||
curve.cc
|
||||
cycle_timer.cc
|
||||
default_click.cc
|
||||
destructive_filesource.cc
|
||||
gain.cc
|
||||
gdither.cc
|
||||
globals.cc
|
||||
|
|
@ -105,7 +105,6 @@ sndfile_helpers.cc
|
|||
sndfilesource.cc
|
||||
source.cc
|
||||
source_factory.cc
|
||||
state_manager.cc
|
||||
tempo.cc
|
||||
utils.cc
|
||||
version.cc
|
||||
|
|
@ -242,7 +241,7 @@ ardour = conf.Finish ()
|
|||
ardour.Merge ([
|
||||
libraries['core'],
|
||||
libraries['xml'],
|
||||
libraries['sndfile'],
|
||||
libraries['sndfile-ardour'],
|
||||
libraries['raptor'],
|
||||
libraries['lrdf'],
|
||||
libraries['samplerate'],
|
||||
|
|
@ -260,8 +259,6 @@ if ardour['LIBLO']:
|
|||
if ardour['COREAUDIO'] or ardour['AUDIOUNITS']:
|
||||
ardour.Merge ([ libraries['appleutility'] ])
|
||||
|
||||
ardour.VersionBuild(['version.cc', 'ardour/version.h'], 'SConscript')
|
||||
|
||||
def SharedAsmObjectEmitter(target, source, env):
|
||||
for tgt in target:
|
||||
tgt.attributes.shared = 1
|
||||
|
|
@ -291,7 +288,9 @@ if env['NLS']:
|
|||
|
||||
|
||||
env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), libardour))
|
||||
|
||||
|
||||
env.Alias('version', ardour.VersionBuild(['version.cc', 'ardour/version.h'], []))
|
||||
|
||||
env.Alias('tarball', env.Distribute (env['DISTTREE'],
|
||||
[ 'SConscript', 'i18n.h', 'gettext.h', 'sse_functions.s', 'sse_functions_64bit.s' ] +
|
||||
ardour_files + osc_files + vst_files + coreaudio_files + audiounit_files +
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ class AudioDiskstream : public Diskstream
|
|||
}
|
||||
|
||||
void set_record_enabled (bool yn);
|
||||
int set_destructive (bool yn);
|
||||
bool can_become_destructive (bool& requires_bounce) const;
|
||||
|
||||
float peak_power(uint32_t n=0) {
|
||||
float x = channels[n].peak_power;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ class AudioTrack : public Track
|
|||
AudioTrack (Session&, const XMLNode&);
|
||||
~AudioTrack ();
|
||||
|
||||
int set_mode (TrackMode m);
|
||||
bool can_use_mode (TrackMode m, bool& bounce_required);
|
||||
|
||||
int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
|
||||
nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
|
||||
|
||||
|
|
@ -63,6 +66,8 @@ class AudioTrack : public Track
|
|||
|
||||
protected:
|
||||
XMLNode& state (bool full);
|
||||
|
||||
int _set_state (const XMLNode&, bool call_base);
|
||||
|
||||
private:
|
||||
int set_diskstream (boost::shared_ptr<AudioDiskstream>, void *);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (C) 2006 Paul Davis
|
||||
Written by Taybin Rutkin
|
||||
Written by Taybin Rutkin
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ struct SoundFileInfo {
|
|||
uint16_t channels;
|
||||
int64_t length;
|
||||
std::string format_name;
|
||||
int64_t timecode;
|
||||
};
|
||||
|
||||
class AudioFileSource : public AudioSource {
|
||||
|
|
@ -81,6 +82,8 @@ class AudioFileSource : public AudioSource {
|
|||
void mark_take (string);
|
||||
string take_id() const { return _take_id; }
|
||||
|
||||
bool is_embedded() const { return _is_embedded; }
|
||||
|
||||
static void set_bwf_serial_number (int);
|
||||
|
||||
static void set_search_path (string);
|
||||
|
|
@ -93,6 +96,9 @@ class AudioFileSource : public AudioSource {
|
|||
XMLNode& get_state ();
|
||||
int set_state (const XMLNode&);
|
||||
|
||||
bool destructive() const { return (_flags & Destructive); }
|
||||
virtual bool set_destructive (bool yn) { return false; }
|
||||
|
||||
/* this should really be protected, but C++ is getting stricter
|
||||
and creating slots from protected member functions is starting
|
||||
to cause issues.
|
||||
|
|
@ -121,9 +127,12 @@ class AudioFileSource : public AudioSource {
|
|||
string _path;
|
||||
Flag _flags;
|
||||
string _take_id;
|
||||
uint64_t timeline_position;
|
||||
int64_t timeline_position;
|
||||
bool file_is_new;
|
||||
|
||||
bool _is_embedded;
|
||||
static bool determine_embeddedness(string path);
|
||||
|
||||
static string peak_dir;
|
||||
static string search_path;
|
||||
|
||||
|
|
@ -133,7 +142,7 @@ class AudioFileSource : public AudioSource {
|
|||
|
||||
static uint64_t header_position_offset;
|
||||
|
||||
virtual void set_timeline_position (nframes_t pos);
|
||||
virtual void set_timeline_position (int64_t pos);
|
||||
virtual void set_header_timeline_position () = 0;
|
||||
|
||||
bool find (std::string path, bool must_exist, bool& is_new);
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ class AudioRegion : public Region
|
|||
void set_fade_out (FadeShape, nframes_t);
|
||||
|
||||
void set_envelope_active (bool yn);
|
||||
void set_default_envelope ();
|
||||
|
||||
int separate_by_channel (ARDOUR::Session&, vector<AudioRegion*>&) const;
|
||||
|
||||
|
|
@ -143,7 +144,6 @@ class AudioRegion : public Region
|
|||
void set_default_fades ();
|
||||
void set_default_fade_in ();
|
||||
void set_default_fade_out ();
|
||||
void set_default_envelope ();
|
||||
|
||||
void recompute_gain_at_end ();
|
||||
void recompute_gain_at_start ();
|
||||
|
|
@ -157,8 +157,11 @@ class AudioRegion : public Region
|
|||
void recompute_at_start ();
|
||||
void recompute_at_end ();
|
||||
|
||||
void envelope_changed (Change);
|
||||
void envelope_changed ();
|
||||
void fade_in_changed ();
|
||||
void fade_out_changed ();
|
||||
void source_offset_changed ();
|
||||
void listen_to_my_curves ();
|
||||
|
||||
mutable Curve _fade_in;
|
||||
FadeShape _fade_in_shape;
|
||||
|
|
@ -171,6 +174,13 @@ class AudioRegion : public Region
|
|||
|
||||
protected:
|
||||
int set_live_state (const XMLNode&, Change&, bool send);
|
||||
|
||||
virtual bool verify_start (jack_nframes_t);
|
||||
virtual bool verify_start_and_length (jack_nframes_t, jack_nframes_t);
|
||||
virtual bool verify_start_mutable (jack_nframes_t&_start);
|
||||
virtual bool verify_length (jack_nframes_t);
|
||||
/*virtual void recompute_at_start () = 0;
|
||||
virtual void recompute_at_end () = 0;*/
|
||||
};
|
||||
|
||||
} /* namespace ARDOUR */
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ const nframes_t frames_per_peak = 256;
|
|||
uint32_t read_data_count() const { return _read_data_count; }
|
||||
uint32_t write_data_count() const { return _write_data_count; }
|
||||
|
||||
int read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, double samples_per_unit) const;
|
||||
virtual int read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, double samples_per_unit) const;
|
||||
int build_peaks ();
|
||||
bool peaks_ready (sigc::slot<void>, sigc::connection&) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
#include <pbd/statefuldestructible.h>
|
||||
|
||||
#include <ardour/ardour.h>
|
||||
#include <ardour/state_manager.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
|
|
@ -54,14 +53,15 @@ struct ControlEvent {
|
|||
|
||||
};
|
||||
|
||||
class AutomationList : public StateManager, public PBD::StatefulDestructible
|
||||
class AutomationList : public PBD::StatefulDestructible
|
||||
{
|
||||
public:
|
||||
typedef std::list<ControlEvent*> AutomationEventList;
|
||||
typedef AutomationEventList::iterator iterator;
|
||||
typedef AutomationEventList::const_iterator const_iterator;
|
||||
|
||||
AutomationList(double default_value, bool no_state = false);
|
||||
AutomationList (double default_value);
|
||||
AutomationList (const XMLNode&);
|
||||
~AutomationList();
|
||||
|
||||
AutomationList (const AutomationList&);
|
||||
|
|
@ -85,8 +85,9 @@ struct ControlEvent {
|
|||
|
||||
void reposition_for_rt_add (double when);
|
||||
void rt_add (double when, double value);
|
||||
iterator add (double when, double value, iterator, bool ignore_mode = false);
|
||||
void add (double when, double value, bool for_loading = false);
|
||||
void add (double when, double value);
|
||||
/* this should be private but old-school automation loading needs it in IO/Redirect */
|
||||
void fast_simple_add (double when, double value);
|
||||
|
||||
void reset_range (double start, double end);
|
||||
void erase_range (double start, double end);
|
||||
|
|
@ -151,13 +152,12 @@ struct ControlEvent {
|
|||
(obj.*method)(*this);
|
||||
}
|
||||
|
||||
UndoAction get_memento () const;
|
||||
|
||||
virtual void store_state (XMLNode& node) const;
|
||||
virtual void load_state (const XMLNode&);
|
||||
sigc::signal<void> StateChanged;
|
||||
|
||||
XMLNode &get_state(void);
|
||||
XMLNode& get_state(void);
|
||||
int set_state (const XMLNode &s);
|
||||
XMLNode& state (bool full);
|
||||
XMLNode& serialize_events ();
|
||||
|
||||
void set_max_xval (double);
|
||||
double get_max_xval() const { return max_xval; }
|
||||
|
|
@ -188,12 +188,6 @@ struct ControlEvent {
|
|||
|
||||
protected:
|
||||
|
||||
struct State : public ARDOUR::StateManager::State {
|
||||
AutomationEventList events;
|
||||
|
||||
State (std::string why) : ARDOUR::StateManager::State (why) {}
|
||||
};
|
||||
|
||||
AutomationEventList events;
|
||||
mutable Glib::Mutex lock;
|
||||
bool _frozen;
|
||||
|
|
@ -215,7 +209,6 @@ struct ControlEvent {
|
|||
double min_yval;
|
||||
double max_yval;
|
||||
double default_value;
|
||||
bool no_state;
|
||||
|
||||
iterator rt_insertion_point;
|
||||
double rt_pos;
|
||||
|
|
@ -242,14 +235,12 @@ struct ControlEvent {
|
|||
|
||||
virtual double unlocked_eval (double where);
|
||||
|
||||
Change restore_state (StateManager::State&);
|
||||
StateManager::State* state_factory (std::string why) const;
|
||||
|
||||
virtual ControlEvent* point_factory (double,double) const;
|
||||
virtual ControlEvent* point_factory (const ControlEvent&) const;
|
||||
|
||||
|
||||
AutomationList* cut_copy_clear (double, double, int op);
|
||||
|
||||
int deserialize_events (const XMLNode&);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ CONFIG_VARIABLE (std::string, click_emphasis_sound, "click-emphasis-sound", "")
|
|||
CONFIG_VARIABLE (bool, auto_play, "auto-play", false)
|
||||
CONFIG_VARIABLE (bool, auto_return, "auto-return", false)
|
||||
CONFIG_VARIABLE (bool, auto_input, "auto-input", true)
|
||||
CONFIG_VARIABLE (bool, auto_loop, "auto-loop", false)
|
||||
CONFIG_VARIABLE (bool, punch_in, "punch-in", false)
|
||||
CONFIG_VARIABLE (bool, punch_out, "punch-out", false)
|
||||
CONFIG_VARIABLE (bool, plugins_stop_with_transport, "plugins-stop-with-transport", false)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ class CoreAudioSource : public AudioFileSource {
|
|||
int flush_header () {return 0;};
|
||||
void set_header_timeline_position () {};
|
||||
|
||||
static int get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg);
|
||||
|
||||
protected:
|
||||
nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const;
|
||||
nframes_t write_unlocked (Sample *dst, nframes_t cnt) { return 0; }
|
||||
|
|
@ -50,7 +52,7 @@ class CoreAudioSource : public AudioFileSource {
|
|||
mutable nframes_t tmpbufsize;
|
||||
mutable Glib::Mutex _tmpbuf_lock;
|
||||
|
||||
void init (const string &str);
|
||||
void init (string str);
|
||||
};
|
||||
|
||||
}; /* namespace ARDOUR */
|
||||
|
|
|
|||
|
|
@ -51,9 +51,10 @@ class Curve : public AutomationList
|
|||
~Curve ();
|
||||
Curve (const Curve& other);
|
||||
Curve (const Curve& other, double start, double end);
|
||||
Curve (const XMLNode&);
|
||||
|
||||
bool rt_safe_get_vector (double x0, double x1, float *arg, size_t veclen);
|
||||
void get_vector (double x0, double x1, float *arg, size_t veclen);
|
||||
bool rt_safe_get_vector (double x0, double x1, float *arg, int32_t veclen);
|
||||
void get_vector (double x0, double x1, float *arg, int32_t veclen);
|
||||
|
||||
AutomationEventList::iterator closest_control_point_before (double xval);
|
||||
AutomationEventList::iterator closest_control_point_after (double xval);
|
||||
|
|
@ -66,22 +67,20 @@ class Curve : public AutomationList
|
|||
ControlEvent* point_factory (double,double) const;
|
||||
ControlEvent* point_factory (const ControlEvent&) const;
|
||||
|
||||
Change restore_state (StateManager::State&);
|
||||
|
||||
private:
|
||||
AutomationList::iterator last_bound;
|
||||
|
||||
double unlocked_eval (double where);
|
||||
double multipoint_eval (double x);
|
||||
|
||||
void _get_vector (double x0, double x1, float *arg, size_t veclen);
|
||||
void _get_vector (double x0, double x1, float *arg, int32_t veclen);
|
||||
|
||||
};
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
||||
extern "C" {
|
||||
void curve_get_vector_from_c (void *arg, double, double, float*, size_t);
|
||||
void curve_get_vector_from_c (void *arg, double, double, float*, int32_t);
|
||||
}
|
||||
|
||||
#endif /* __ardour_curve_h__ */
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ class DestructiveFileSource : public SndFileSource {
|
|||
|
||||
static void setup_standard_crossfades (nframes_t sample_rate);
|
||||
|
||||
int read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, double samples_per_unit) const;
|
||||
|
||||
protected:
|
||||
nframes_t write_unlocked (Sample *src, nframes_t cnt);
|
||||
|
||||
|
|
@ -66,7 +68,7 @@ class DestructiveFileSource : public SndFileSource {
|
|||
|
||||
void init ();
|
||||
nframes_t crossfade (Sample* data, nframes_t cnt, int dir);
|
||||
void set_timeline_position (nframes_t);
|
||||
void set_timeline_position (int64_t);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,8 @@ class IO;
|
|||
virtual void set_record_enabled (bool yn) = 0;
|
||||
|
||||
bool destructive() const { return _flags & Destructive; }
|
||||
virtual void set_destructive (bool yn);
|
||||
virtual int set_destructive (bool yn) { return -1; }
|
||||
virtual bool can_become_destructive (bool& requires_bounce) const { return false; }
|
||||
|
||||
bool hidden() const { return _flags & Hidden; }
|
||||
bool recordable() const { return _flags & Recordable; }
|
||||
|
|
@ -137,6 +138,8 @@ class IO;
|
|||
|
||||
void handle_input_change (IOChange, void *src);
|
||||
|
||||
void remove_region_from_last_capture (boost::weak_ptr<Region> wregion);
|
||||
|
||||
sigc::signal<void> RecordEnableChanged;
|
||||
sigc::signal<void> SpeedChanged;
|
||||
sigc::signal<void> ReverseChanged;
|
||||
|
|
@ -223,6 +226,7 @@ class IO;
|
|||
virtual bool realtime_set_speed (double, bool global_change);
|
||||
|
||||
std::list<boost::shared_ptr<Region> > _last_capture_regions;
|
||||
|
||||
virtual int use_pending_capture_data (XMLNode& node) = 0;
|
||||
|
||||
virtual void get_input_sources () = 0;
|
||||
|
|
|
|||
|
|
@ -89,15 +89,6 @@ class PortInsert : public Insert
|
|||
int32_t compute_output_streams (int32_t cnt) const;
|
||||
};
|
||||
|
||||
struct PluginInsertState : public RedirectState
|
||||
{
|
||||
PluginInsertState (std::string why)
|
||||
: RedirectState (why) {}
|
||||
~PluginInsertState() {}
|
||||
|
||||
PluginState plugin_state;
|
||||
};
|
||||
|
||||
class PluginInsert : public Insert
|
||||
{
|
||||
public:
|
||||
|
|
@ -112,9 +103,6 @@ class PluginInsert : public Insert
|
|||
XMLNode& get_state(void);
|
||||
int set_state(const XMLNode&);
|
||||
|
||||
StateManager::State* state_factory (std::string why) const;
|
||||
Change restore_state (StateManager::State&);
|
||||
|
||||
void run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset);
|
||||
void silence (nframes_t nframes, nframes_t offset);
|
||||
|
||||
|
|
@ -160,9 +148,7 @@ class PluginInsert : public Insert
|
|||
nframes_t latency();
|
||||
|
||||
void transport_stopped (nframes_t now);
|
||||
|
||||
protected:
|
||||
void store_state (PluginInsertState&) const;
|
||||
void automation_snapshot (nframes_t now);
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
#include <ardour/ardour.h>
|
||||
#include <ardour/utils.h>
|
||||
#include <ardour/state_manager.h>
|
||||
#include <ardour/curve.h>
|
||||
#include <ardour/types.h>
|
||||
#include <ardour/data_type.h>
|
||||
|
|
@ -65,7 +64,7 @@ class BufferSet;
|
|||
* An IO can contain ports of varying types, making routes/inserts/etc with
|
||||
* varied combinations of types (eg MIDI and audio) possible.
|
||||
*/
|
||||
class IO : public PBD::StatefulDestructible, public ARDOUR::StateManager
|
||||
class IO : public PBD::StatefulDestructible
|
||||
{
|
||||
|
||||
public:
|
||||
|
|
@ -74,7 +73,9 @@ class IO : public PBD::StatefulDestructible, public ARDOUR::StateManager
|
|||
IO (Session&, string name,
|
||||
int input_min = -1, int input_max = -1,
|
||||
int output_min = -1, int output_max = -1,
|
||||
DataType default_type = DataType::AUDIO);
|
||||
DataType default_type = DataType::AUDIO);
|
||||
|
||||
IO (Session&, const XMLNode&, DataType default_type = DataType::AUDIO);
|
||||
|
||||
virtual ~IO();
|
||||
|
||||
|
|
@ -82,18 +83,12 @@ class IO : public PBD::StatefulDestructible, public ARDOUR::StateManager
|
|||
ChanCount input_maximum() const { return _input_maximum; }
|
||||
ChanCount output_minimum() const { return _output_minimum; }
|
||||
ChanCount output_maximum() const { return _output_maximum; }
|
||||
|
||||
|
||||
void set_input_minimum (ChanCount n);
|
||||
void set_input_maximum (ChanCount n);
|
||||
void set_output_minimum (ChanCount n);
|
||||
void set_output_maximum (ChanCount n);
|
||||
|
||||
// Do not write any new code using these
|
||||
void set_input_minimum (int n);
|
||||
void set_input_maximum (int n);
|
||||
void set_output_minimum (int n);
|
||||
void set_output_maximum (int n);
|
||||
|
||||
DataType default_type() const { return _default_type; }
|
||||
void set_default_type(DataType t) { _default_type = t; }
|
||||
|
||||
|
|
@ -187,9 +182,6 @@ class IO : public PBD::StatefulDestructible, public ARDOUR::StateManager
|
|||
XMLNode& get_state (void);
|
||||
int set_state (const XMLNode&);
|
||||
|
||||
virtual UndoAction get_memento() const;
|
||||
|
||||
|
||||
static int disable_connecting (void);
|
||||
|
||||
static int enable_connecting (void);
|
||||
|
|
@ -224,6 +216,14 @@ public:
|
|||
|
||||
/* automation */
|
||||
|
||||
static void set_automation_interval (jack_nframes_t frames) {
|
||||
_automation_interval = frames;
|
||||
}
|
||||
|
||||
static jack_nframes_t automation_interval() {
|
||||
return _automation_interval;
|
||||
}
|
||||
|
||||
void clear_automation ();
|
||||
|
||||
bool gain_automation_recording() const {
|
||||
|
|
@ -245,6 +245,7 @@ public:
|
|||
sigc::signal<void> gain_automation_style_changed;
|
||||
|
||||
virtual void transport_stopped (nframes_t now);
|
||||
void automation_snapshot (nframes_t now);
|
||||
|
||||
ARDOUR::Curve& gain_automation_curve () { return _gain_automation_curve; }
|
||||
|
||||
|
|
@ -304,10 +305,8 @@ public:
|
|||
|
||||
GainControllable _gain_control;
|
||||
|
||||
/* state management */
|
||||
|
||||
Change restore_state (State&);
|
||||
StateManager::State* state_factory (std::string why) const;
|
||||
nframes_t last_automation_snapshot;
|
||||
static nframes_t _automation_interval;
|
||||
|
||||
AutoState _gain_automation_state;
|
||||
AutoStyle _gain_automation_style;
|
||||
|
|
@ -315,11 +314,12 @@ public:
|
|||
bool apply_gain_automation;
|
||||
Curve _gain_automation_curve;
|
||||
|
||||
int save_automation (const string&);
|
||||
int load_automation (const string&);
|
||||
|
||||
Glib::Mutex automation_lock;
|
||||
|
||||
virtual int set_automation_state (const XMLNode&);
|
||||
virtual XMLNode& get_automation_state ();
|
||||
virtual int load_automation (std::string path);
|
||||
|
||||
/* AudioTrack::deprecated_use_diskstream_connections() needs these */
|
||||
|
||||
int set_inputs (const string& str);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue