summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-21 19:01:50 +0000
committerDavid Robillard <d@drobilla.net>2006-10-21 19:01:50 +0000
commitfedf3d34f32264ac57c6a222b678dc90f2bb1a88 (patch)
treee816c676d12ccc32b7e666792b9a01ab5b5a0367 /gtk2_ardour
parent7bd41538d951c3e476655df741adfbebbb990bde (diff)
Merged with trunk R992.
Completely untested other than it compiles, runs, and records somewhat (need to merge again). git-svn-id: svn://localhost/ardour2/branches/midi@999 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/SConscript39
-rw-r--r--gtk2_ardour/about.cc6
-rw-r--r--gtk2_ardour/actions.cc51
-rw-r--r--gtk2_ardour/actions.h4
-rw-r--r--gtk2_ardour/analysis_window.cc4
-rwxr-xr-xgtk2_ardour/ardbg2
-rwxr-xr-xgtk2_ardour/ardev2
-rwxr-xr-xgtk2_ardour/ardev_common.sh2
-rw-r--r--gtk2_ardour/ardour.colors4
-rw-r--r--gtk2_ardour/ardour.menus12
-rw-r--r--gtk2_ardour/ardour2_ui.rc12
-rw-r--r--gtk2_ardour/ardour_ui.cc180
-rw-r--r--gtk2_ardour/ardour_ui.h64
-rw-r--r--gtk2_ardour/ardour_ui2.cc123
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc188
-rw-r--r--gtk2_ardour/ardour_ui_options.cc897
-rwxr-xr-xgtk2_ardour/arval3
-rw-r--r--gtk2_ardour/audio_clock.cc173
-rw-r--r--gtk2_ardour/audio_clock.h29
-rw-r--r--gtk2_ardour/audio_region_editor.cc26
-rw-r--r--gtk2_ardour/audio_region_view.cc19
-rw-r--r--gtk2_ardour/audio_region_view.h4
-rw-r--r--gtk2_ardour/audio_streamview.cc93
-rw-r--r--gtk2_ardour/audio_streamview.h7
-rw-r--r--gtk2_ardour/automation_line.cc20
-rw-r--r--gtk2_ardour/automation_line.h14
-rw-r--r--gtk2_ardour/automation_selectable.h6
-rw-r--r--gtk2_ardour/automation_time_axis.cc6
-rw-r--r--gtk2_ardour/automation_time_axis.h10
-rw-r--r--gtk2_ardour/canvas-waveview.c3
-rw-r--r--gtk2_ardour/crossfade_edit.cc14
-rw-r--r--gtk2_ardour/crossfade_view.cc18
-rw-r--r--gtk2_ardour/draginfo.h8
-rw-r--r--gtk2_ardour/editor.cc372
-rw-r--r--gtk2_ardour/editor.h170
-rw-r--r--gtk2_ardour/editor_actions.cc396
-rw-r--r--gtk2_ardour/editor_audio_import.cc16
-rw-r--r--gtk2_ardour/editor_audiotrack.cc6
-rw-r--r--gtk2_ardour/editor_canvas.cc36
-rw-r--r--gtk2_ardour/editor_canvas_events.cc4
-rw-r--r--gtk2_ardour/editor_cursors.cc2
-rw-r--r--gtk2_ardour/editor_export_audio.cc22
-rw-r--r--gtk2_ardour/editor_imageframe.cc70
-rw-r--r--gtk2_ardour/editor_keyboard.cc4
-rw-r--r--gtk2_ardour/editor_markers.cc12
-rw-r--r--gtk2_ardour/editor_mixer.cc2
-rw-r--r--gtk2_ardour/editor_mouse.cc170
-rw-r--r--gtk2_ardour/editor_ops.cc358
-rw-r--r--gtk2_ardour/editor_region_list.cc3
-rw-r--r--gtk2_ardour/editor_rulers.cc88
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc19
-rw-r--r--gtk2_ardour/export_dialog.cc6
-rw-r--r--gtk2_ardour/export_dialog.h2
-rw-r--r--gtk2_ardour/export_range_markers_dialog.cc4
-rw-r--r--gtk2_ardour/export_range_markers_dialog.h6
-rw-r--r--gtk2_ardour/export_session_dialog.cc2
-rw-r--r--gtk2_ardour/export_session_dialog.h2
-rw-r--r--gtk2_ardour/gain_automation_time_axis.cc2
-rw-r--r--gtk2_ardour/gain_automation_time_axis.h2
-rw-r--r--gtk2_ardour/gain_meter.cc25
-rw-r--r--gtk2_ardour/gain_meter.h2
-rw-r--r--gtk2_ardour/icons/nudge_left.pngbin0 -> 263 bytes
-rw-r--r--gtk2_ardour/icons/nudge_right.pngbin0 -> 252 bytes
-rw-r--r--gtk2_ardour/icons/tool_audition.pngbin0 -> 314 bytes
-rw-r--r--gtk2_ardour/icons/tool_gain.pngbin0 -> 417 bytes
-rw-r--r--gtk2_ardour/icons/tool_object.pngbin0 -> 461 bytes
-rw-r--r--gtk2_ardour/icons/tool_object.xpm54
-rw-r--r--gtk2_ardour/icons/tool_stretch.pngbin0 -> 284 bytes
-rw-r--r--gtk2_ardour/icons/tool_zoom.pngbin0 -> 355 bytes
-rw-r--r--gtk2_ardour/icons/transport_end.pngbin0 -> 331 bytes
-rw-r--r--gtk2_ardour/icons/transport_loop.pngbin0 -> 681 bytes
-rw-r--r--gtk2_ardour/icons/transport_play.pngbin0 -> 339 bytes
-rw-r--r--gtk2_ardour/icons/transport_range.pngbin0 -> 294 bytes
-rw-r--r--gtk2_ardour/icons/transport_record.pngbin0 -> 546 bytes
-rw-r--r--gtk2_ardour/icons/transport_start.pngbin0 -> 370 bytes
-rw-r--r--gtk2_ardour/icons/transport_stop.pngbin0 -> 204 bytes
-rw-r--r--gtk2_ardour/icons/tw_edit_icons_07.xcfbin0 -> 5600 bytes
-rw-r--r--gtk2_ardour/icons/zoom_full.pngbin0 -> 365 bytes
-rw-r--r--gtk2_ardour/icons/zoom_in.pngbin0 -> 354 bytes
-rw-r--r--gtk2_ardour/icons/zoom_out.pngbin0 -> 346 bytes
-rw-r--r--gtk2_ardour/imageframe_socket_handler.cc20
-rw-r--r--gtk2_ardour/imageframe_socket_handler.h8
-rw-r--r--gtk2_ardour/imageframe_time_axis_group.cc2
-rw-r--r--gtk2_ardour/imageframe_time_axis_group.h2
-rw-r--r--gtk2_ardour/imageframe_time_axis_view.cc2
-rw-r--r--gtk2_ardour/imageframe_view.cc12
-rw-r--r--gtk2_ardour/imageframe_view.h8
-rw-r--r--gtk2_ardour/location_ui.cc4
-rw-r--r--gtk2_ardour/main.cc9
-rw-r--r--gtk2_ardour/marker.cc4
-rw-r--r--gtk2_ardour/marker.h6
-rw-r--r--gtk2_ardour/marker_time_axis_view.cc4
-rw-r--r--gtk2_ardour/marker_time_axis_view.h2
-rw-r--r--gtk2_ardour/marker_view.cc4
-rw-r--r--gtk2_ardour/marker_view.h4
-rw-r--r--gtk2_ardour/meter_bridge_strip.cc6
-rw-r--r--gtk2_ardour/meter_bridge_strip.h6
-rw-r--r--gtk2_ardour/new_session_dialog.cc131
-rw-r--r--gtk2_ardour/new_session_dialog.h12
-rw-r--r--gtk2_ardour/option_editor.cc34
-rw-r--r--gtk2_ardour/pan_automation_time_axis.cc2
-rw-r--r--gtk2_ardour/pan_automation_time_axis.h2
-rw-r--r--gtk2_ardour/public_editor.h14
-rw-r--r--gtk2_ardour/redirect_automation_time_axis.cc2
-rw-r--r--gtk2_ardour/redirect_automation_time_axis.h2
-rw-r--r--gtk2_ardour/redirect_box.cc6
-rw-r--r--gtk2_ardour/redirect_box.h4
-rw-r--r--gtk2_ardour/region_selection.cc4
-rw-r--r--gtk2_ardour/region_selection.h8
-rw-r--r--gtk2_ardour/region_view.cc13
-rw-r--r--gtk2_ardour/region_view.h4
-rw-r--r--gtk2_ardour/route_time_axis.cc12
-rw-r--r--gtk2_ardour/route_time_axis.h10
-rw-r--r--gtk2_ardour/route_ui.cc25
-rw-r--r--gtk2_ardour/route_ui.h3
-rw-r--r--gtk2_ardour/selection.cc10
-rw-r--r--gtk2_ardour/selection.h10
-rw-r--r--gtk2_ardour/send_ui.cc13
-rw-r--r--gtk2_ardour/send_ui.h1
-rw-r--r--gtk2_ardour/sfdb_ui.cc8
-rw-r--r--gtk2_ardour/splash.pngbin0 -> 102707 bytes
-rw-r--r--gtk2_ardour/splash.ppm32
-rw-r--r--gtk2_ardour/streamview.cc35
-rw-r--r--gtk2_ardour/streamview.h8
-rw-r--r--gtk2_ardour/tempo_dialog.cc4
-rw-r--r--gtk2_ardour/tempo_dialog.h4
-rw-r--r--gtk2_ardour/time_axis_view.cc6
-rw-r--r--gtk2_ardour/time_axis_view.h8
-rw-r--r--gtk2_ardour/time_axis_view_item.cc24
-rw-r--r--gtk2_ardour/time_axis_view_item.h34
-rw-r--r--gtk2_ardour/time_selection.cc10
-rw-r--r--gtk2_ardour/time_selection.h6
-rw-r--r--gtk2_ardour/utils.cc46
-rw-r--r--gtk2_ardour/utils.h5
-rw-r--r--gtk2_ardour/visual_time_axis.cc2
-rw-r--r--gtk2_ardour/visual_time_axis.h2
136 files changed, 2396 insertions, 2163 deletions
diff --git a/gtk2_ardour/SConscript b/gtk2_ardour/SConscript
index 8a1fd22ff2..7ef2b668c9 100644
--- a/gtk2_ardour/SConscript
+++ b/gtk2_ardour/SConscript
@@ -7,6 +7,7 @@ import glob
Import('env install_prefix final_prefix config_prefix libraries i18n version')
gtkardour = env.Copy()
+gtkmmtests = env.Copy()
#
# this defines the version number of the GTK interface to ardour
@@ -49,6 +50,19 @@ gtkardour.Merge ([
libraries['jack']
])
+gtkmmtests.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
+
+gtkmmtests.Merge ([
+ libraries['gtkmm2'],
+ libraries['glib2'],
+ libraries['glibmm2'],
+ libraries['pangomm'],
+ libraries['atkmm'],
+ libraries['gdkmm2'],
+ libraries['sigc2'],
+ libraries['gtk2']
+])
+
if gtkardour['DMALLOC']:
gtkardour.Merge([libraries['dmalloc']])
gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
@@ -195,7 +209,8 @@ fft_graph.cc
fft_result.cc
""")
-pixmap_files=glob.glob('pixmaps/*.xpm')
+pixmap_files = glob.glob('pixmaps/*.xpm')
+icon_files = glob.glob ('icons/*.png')
intl_files = gtkardour_files + glob.glob('*.h')
@@ -216,6 +231,10 @@ stest_files=Split("""
stest.cc
""")
+tt_files=Split ("""
+tt.cc
+""")
+
extra_sources = []
vst_files = [ 'vst_pluginui.cc' ]
@@ -252,9 +271,10 @@ ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_fil
mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
itest = gtkardour.Program(target = 'itest', source = itest_files)
rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
+tt = gtkmmtests.Program(target = 'tt', source = tt_files)
my_subst_dict = { }
-my_subst_dict['%INSTALL_PREFIX%'] = install_prefix
+my_subst_dict['%INSTALL_PREFIX%'] = final_prefix
ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
@@ -286,8 +306,9 @@ env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
# data files
-env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.ppm'))
+env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.png'))
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))
#dist
@@ -295,12 +316,18 @@ env.Alias ('tarball', env.Distribute (env['DISTTREE'],
[ 'SConscript',
'i18n.h', 'gettext.h',
'ardour.sh.in',
- 'ardour2_ui.rc', 'splash.ppm',
+ 'ardour2_ui.rc', 'splash.png',
'ardour.menus', 'ardour.bindings', 'ardour.colors',
'editor_xpms'
] +
- gtkardour_files + vst_files + pixmap_files +
- glob.glob('po/*.po') + glob.glob('*.h')))
+ gtkardour_files +
+ vst_files +
+ pixmap_files +
+ icon_files +
+ skipped_files +
+ audiounit_files +
+ fft_analysis_files +
+ glob.glob('po/*.po') + glob.glob('*.h')))
# generate a prototype full-featured ardour_ui.rc file
diff --git a/gtk2_ardour/about.cc b/gtk2_ardour/about.cc
index e48e08f130..d43273f786 100644
--- a/gtk2_ardour/about.cc
+++ b/gtk2_ardour/about.cc
@@ -165,7 +165,7 @@ About::About ()
string path;
string t;
- path = find_data_file ("splash.ppm");
+ path = find_data_file ("splash.png");
Glib::RefPtr<Pixbuf> pixbuf = Gdk::Pixbuf::create_from_file (path);
@@ -178,13 +178,13 @@ About::About ()
}
set_translator_credits (t);
- set_copyright (_("Copyright (C) 1999-2005 Paul Davis\n"));
+ set_copyright (_("Copyright (C) 1999-2006 Paul Davis\n"));
set_license (_("Ardour comes with ABSOLUTELY NO WARRANTY\n"
"This is free software, and you are welcome to redistribute it\n"
"under certain conditions; see the file COPYING for details.\n"));
set_name (X_("ardour"));
set_website (X_("http://ardour.org/"));
- set_website_label (X_("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)"),
VERSIONSTRING,
gtk_ardour_major_version,
diff --git a/gtk2_ardour/actions.cc b/gtk2_ardour/actions.cc
index b2408620a5..885a23ffc7 100644
--- a/gtk2_ardour/actions.cc
+++ b/gtk2_ardour/actions.cc
@@ -40,6 +40,7 @@ using namespace Gtk;
using namespace Glib;
using namespace sigc;
using namespace PBD;
+using namespace ARDOUR;
vector<RefPtr<Gtk::Action> > ActionManager::session_sensitive_actions;
vector<RefPtr<Gtk::Action> > ActionManager::region_list_selection_sensitive_actions;
@@ -283,3 +284,53 @@ ActionManager::uncheck_toggleaction (const char * name)
delete [] group_name;
}
+void
+ActionManager::toggle_config_state (const char* group, const char* action, bool (Configuration::*set)(bool), bool (Configuration::*get)(void) const)
+{
+ Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact) {
+ bool x = (Config->*get)();
+
+ if (x != tact->get_active()) {
+ (Config->*set) (!x);
+ }
+ }
+ }
+}
+
+void
+ActionManager::toggle_config_state (const char* group, const char* action, sigc::slot<void> theSlot)
+{
+ Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ if (tact->get_active()) {
+ theSlot ();
+ }
+ }
+}
+
+void
+ActionManager::map_some_state (const char* group, const char* action, bool (Configuration::*get)() const)
+{
+ Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact) {
+
+ bool x = (Config->*get)();
+
+ if (tact->get_active() != x) {
+ tact->set_active (x);
+ }
+ } else {
+ cerr << group << ':' << action << " is not a toggle\n";
+ }
+ } else {
+ cerr << group << ':' << action << " not an action\n";
+ }
+}
diff --git a/gtk2_ardour/actions.h b/gtk2_ardour/actions.h
index 330caff1c2..e3ec57dbae 100644
--- a/gtk2_ardour/actions.h
+++ b/gtk2_ardour/actions.h
@@ -37,6 +37,10 @@ class ActionManager
static std::vector<Glib::RefPtr<Gtk::Action> > jack_opposite_sensitive_actions;
static std::vector<Glib::RefPtr<Gtk::Action> > edit_cursor_in_region_sensitive_actions;
+ static void map_some_state (const char* group, const char* action, bool (ARDOUR::Configuration::*get)() const);
+ static void toggle_config_state (const char* group, const char* action, bool (ARDOUR::Configuration::*set)(bool), bool (ARDOUR::Configuration::*get)(void) const);
+ static void toggle_config_state (const char* group, const char* action, sigc::slot<void> theSlot);
+
static void set_sensitive (std::vector<Glib::RefPtr<Gtk::Action> >& actions, bool);
static std::string unbound_string; /* the key string returned if an action is not bound */
diff --git a/gtk2_ardour/analysis_window.cc b/gtk2_ardour/analysis_window.cc
index d89c106831..163ac981b9 100644
--- a/gtk2_ardour/analysis_window.cc
+++ b/gtk2_ardour/analysis_window.cc
@@ -248,7 +248,7 @@ AnalysisWindow::analyze_data (Gtk::Button *button)
for (std::list<ARDOUR::AudioRange>::iterator j = ts.begin(); j != ts.end(); ++j) {
- jack_nframes_t i = 0;
+ nframes_t i = 0;
int n;
while ( i < (*j).length() ) {
@@ -289,7 +289,7 @@ AnalysisWindow::analyze_data (Gtk::Button *button)
continue;
// cerr << " - " << (*j)->region().name() << ": " << (*j)->region().length() << " samples starting at " << (*j)->region().position() << endl;
- jack_nframes_t i = 0;
+ nframes_t i = 0;
int n;
while ( i < arv->region()->length() ) {
diff --git a/gtk2_ardour/ardbg b/gtk2_ardour/ardbg
index 115db85f59..933b5ba720 100755
--- a/gtk2_ardour/ardbg
+++ b/gtk2_ardour/ardbg
@@ -1,4 +1,4 @@
#!/bin/sh
dir=`dirname "$0"`
-source $dir/ardev_common.sh
+. $dir/ardev_common.sh
exec gdb gtk2_ardour/ardour.bin $*
diff --git a/gtk2_ardour/ardev b/gtk2_ardour/ardev
index d3d44e55fe..04719908b4 100755
--- a/gtk2_ardour/ardev
+++ b/gtk2_ardour/ardev
@@ -1,3 +1,3 @@
#!/bin/sh
-source `dirname "$0"`/ardev_common.sh
+. `dirname "$0"`/ardev_common.sh
exec gtk2_ardour/ardour.bin --novst $*
diff --git a/gtk2_ardour/ardev_common.sh b/gtk2_ardour/ardev_common.sh
index df4bb025c0..165db68369 100755
--- a/gtk2_ardour/ardev_common.sh
+++ b/gtk2_ardour/ardev_common.sh
@@ -2,7 +2,7 @@ cd `dirname "$0"`/..
#export G_DEBUG=fatal_criticals
-export ARDOUR_PATH=gtk2_ardour/glade:gtk2_ardour/pixmaps:gtk2_ardour
+export ARDOUR_PATH=gtk2_ardour/icons:gtk2_ardour/pixmaps:gtk2_ardour
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
diff --git a/gtk2_ardour/ardour.colors b/gtk2_ardour/ardour.colors
index aa87f2de9d..cc44208234 100644
--- a/gtk2_ardour/ardour.colors
+++ b/gtk2_ardour/ardour.colors
@@ -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
-cMeasureLineBar 0.5 0.5 0.5 0.98
-cMeasureLineBeat 0.7 0.7 0.7 0.94
+cMeasureLineBeat 0.55 0.55 0.55 1.00
+cMeasureLineBar 0.45 0.45 0.45 1.00
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
diff --git a/gtk2_ardour/ardour.menus b/gtk2_ardour/ardour.menus
index d213b4a53c..845acac400 100644
--- a/gtk2_ardour/ardour.menus
+++ b/gtk2_ardour/ardour.menus
@@ -239,11 +239,12 @@
</menu>
<separator/>
<menu action='Autoconnect'>
- <menuitem action='AutoConnectNewTrackInputsToHardware'/>
+ <menuitem action='InputAutoConnectPhysical'/>
+ <menuitem action='InputAutoConnectManual'/>
<separator/>
- <menuitem action='AutoConnectNewTrackOutputsToHardware'/>
- <menuitem action='AutoConnectNewTrackOutputsToMaster'/>
- <menuitem action='ManuallyConnectNewTrackOutputs'/>
+ <menuitem action='OutputAutoConnectPhysical'/>
+ <menuitem action='OutputAutoConnectMaster'/>
+ <menuitem action='OutputAutoConnectManual'/>
</menu>
<menu action='ControlSurfaces'/>
<menu action='Monitoring'>
@@ -277,7 +278,6 @@
<menuitem action='toggle-xfades-active'/>
<menuitem action='toggle-xfades-visible'/>
<menuitem action='toggle-auto-xfades'/>
- <menuitem action='UnmuteNewFullCrossfades'/>
<separator/>
<menuitem action='CrossfadesFull'/>
<menuitem action='CrossfadesShort'/>
@@ -291,8 +291,6 @@
<menuitem action='SendMTC'/>
<menuitem action='SendMMC'/>
<menuitem action='UseMMC'/>
- <menuitem action='SendMIDIfeedback'/>
- <menuitem action='UseMIDIcontrol'/>
<separator/>
<menuitem action='StopPluginsWithTransport'/>
<menuitem action='DoNotRunPluginsWhileRecording'/>
diff --git a/gtk2_ardour/ardour2_ui.rc b/gtk2_ardour/ardour2_ui.rc
index d589f6ce55..abcfd4c262 100644
--- a/gtk2_ardour/ardour2_ui.rc
+++ b/gtk2_ardour/ardour2_ui.rc
@@ -83,6 +83,7 @@ style "default_base" = "medium_text"
GtkWidget::cursor_color = {1.0, 1.0, 1.0 }
GtkButton::default_border = { 0, 0, 0, 0 }
GtkButton::default_outside_border = { 0, 0, 0, 0 }
+ GtkButton::button_relief = GTK_RELIEF_NONE
GtkTreeView::vertical-padding = 0
GtkTreeView::horizontal-padding = 0
@@ -92,8 +93,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.40, 0.40 }
- bg[ACTIVE] = { 0.40, 0.40, 0.40 }
+ bg[NORMAL] = { 0.40, 0.41, 0.41 }
+ bg[ACTIVE] = { 0.40, 0.41, 0.41 }
bg[PRELIGHT] = "#565690"
bg[INSENSITIVE] = { 0.10, 0.10, 0.10 }
bg[SELECTED] = { 0, 0.40, 0.60 }
@@ -111,9 +112,9 @@ style "default_base" = "medium_text"
base[SELECTED] = { 0.25, 0.25, 0.25 }
engine "clearlooks" {
- menubarstyle = 1 # 0 = flat, 1 = sunken, 2 = flat gradient
- menuitemstyle = 1 # 0 = flat, 1 = 3d-ish (gradient), 2 = 3d-ish (button)
- listviewitemstyle = 1 # 0 = flat, 1 = 3d-ish (gradient)
+ 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
}
}
@@ -217,6 +218,7 @@ style "mute_button" = "small_button"
bg[ACTIVE] = { 1.0, 0.98, 0.53 }
fg[PRELIGHT] = { 0, 0, 0 }
+ fg[ACTIVE] = { 0, 0, 0 }
}
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index f0848e6f89..cc7b43b6b6 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -18,6 +18,9 @@
$Id$
*/
+#define __STDC_FORMAT_MACROS 1
+#include <stdint.h>
+
#include <algorithm>
#include <cmath>
#include <fcntl.h>
@@ -87,7 +90,7 @@ ARDOUR_UI *ARDOUR_UI::theArdourUI = 0;
sigc::signal<void,bool> ARDOUR_UI::Blink;
sigc::signal<void> ARDOUR_UI::RapidScreenUpdate;
sigc::signal<void> ARDOUR_UI::SuperRapidScreenUpdate;
-sigc::signal<void,jack_nframes_t> ARDOUR_UI::Clock;
+sigc::signal<void,nframes_t> ARDOUR_UI::Clock;
ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
@@ -173,16 +176,12 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
shuttle_fract = 0.0;
shuttle_max_speed = 8.0f;
- set_shuttle_units (Percentage);
- set_shuttle_behaviour (Sprung);
-
shuttle_style_menu = 0;
shuttle_unit_menu = 0;
gettimeofday (&last_peak_grab, 0);
gettimeofday (&last_shuttle_request, 0);
- ARDOUR::AudioDiskstream::DeleteSources.connect (mem_fun(*this, &ARDOUR_UI::delete_sources_in_the_right_thread));
ARDOUR::Diskstream::DiskOverrun.connect (mem_fun(*this, &ARDOUR_UI::disk_overrun_handler));
ARDOUR::Diskstream::DiskUnderrun.connect (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler));
@@ -492,7 +491,7 @@ ARDOUR_UI::every_point_zero_one_seconds ()
}
void
-ARDOUR_UI::update_sample_rate (jack_nframes_t ignored)
+ARDOUR_UI::update_sample_rate (nframes_t ignored)
{
char buf[32];
@@ -504,7 +503,7 @@ ARDOUR_UI::update_sample_rate (jack_nframes_t ignored)
} else {
- jack_nframes_t rate = engine->frame_rate();
+ nframes_t rate = engine->frame_rate();
if (fmod (rate, 1000.0) != 0.0) {
snprintf (buf, sizeof (buf), _("%.1f kHz / %4.1f msecs"),
@@ -558,7 +557,7 @@ ARDOUR_UI::update_disk_space()
return;
}
- jack_nframes_t frames = session->available_capture_duration();
+ nframes_t frames = session->available_capture_duration();
char buf[64];
if (frames == max_frames) {
@@ -567,23 +566,13 @@ ARDOUR_UI::update_disk_space()
int hrs;
int mins;
int secs;
- jack_nframes_t fr = session->frame_rate();
+ nframes_t fr = session->frame_rate();
- if (session->actively_recording()){
-
- rec_enabled_diskstreams = 0;
- session->foreach_route (this, &ARDOUR_UI::count_recenabled_diskstreams);
-
- if (rec_enabled_diskstreams) {
- frames /= rec_enabled_diskstreams;
- }
-
- } else {
-
- /* hmmm. shall we divide by the route count? or the diskstream count?
- or what? for now, do nothing ...
- */
-
+ rec_enabled_diskstreams = 0;
+ session->foreach_route (this, &ARDOUR_UI::count_recenabled_diskstreams);
+
+ if (rec_enabled_diskstreams) {
+ frames /= rec_enabled_diskstreams;
}
hrs = frames / (fr * 3600);
@@ -968,12 +957,13 @@ restart JACK with more ports."));
}
void
-ARDOUR_UI::do_transport_locate (jack_nframes_t new_position)
+ARDOUR_UI::do_transport_locate (nframes_t new_position)
{
- jack_nframes_t _preroll;
+ nframes_t _preroll = 0;
if (session) {
- _preroll = session->convert_to_frames_at (new_position, session->preroll);
+ // XXX CONFIG_CHANGE FIX - requires AnyTime handling
+ // _preroll = session->convert_to_frames_at (new_position, Config->get_preroll());
if (new_position > _preroll) {
new_position -= _preroll;
@@ -1023,7 +1013,7 @@ void
ARDOUR_UI::transport_goto_end ()
{
if (session) {
- jack_nframes_t frame = session->current_end_frame();
+ nframes_t frame = session->current_end_frame();
session->request_locate (frame);
/* force displayed area in editor to start no matter
@@ -1048,8 +1038,8 @@ ARDOUR_UI::transport_stop ()
return;
}
- if (session->get_auto_loop()) {
- session->request_auto_loop (false);
+ if (Config->get_auto_loop()) {
+ session->request_play_loop (false);
}
session->request_stop ();
@@ -1078,8 +1068,7 @@ ARDOUR_UI::transport_record ()
switch (session->record_status()) {
case Session::Disabled:
if (session->ntracks() == 0) {
- string txt = _("Please create 1 or more track\nbefore trying to record.\nCheck the Session menu.");
- MessageDialog msg (*editor, txt);
+ MessageDialog msg (*editor, _("Please create 1 or more track\nbefore trying to record.\nCheck the Session menu."));
msg.run ();
return;
}
@@ -1103,8 +1092,8 @@ ARDOUR_UI::transport_roll ()
rolling = session->transport_rolling ();
- if (session->get_auto_loop()) {
- session->request_auto_loop (false);
+ if (Config->get_auto_loop()) {
+ session->request_play_loop (false);
auto_loop_button.set_active (false);
roll_button.set_active (true);
} else if (session->get_play_range ()) {
@@ -1121,7 +1110,7 @@ void
ARDOUR_UI::transport_loop()
{
if (session) {
- if (session->get_auto_loop()) {
+ if (Config->get_auto_loop()) {
if (session->transport_rolling()) {
Location * looploc = session->locations()->auto_loop_location();
if (looploc) {
@@ -1130,7 +1119,7 @@ ARDOUR_UI::transport_loop()
}
}
else {
- session->request_auto_loop (true);
+ session->request_play_loop (true);
}
}
}
@@ -1661,11 +1650,9 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
new_session_dialog->reset_recent();
new_session_dialog->show();
- //Glib::RefPtr<Gdk::Window> nsd_window = new_session_dialog->get_window();
-
do {
response = new_session_dialog->run ();
- //nsd_window ->set_cursor(Gdk::Cursor(Gdk::WATCH));
+
if(response == Gtk::RESPONSE_CANCEL || response == Gtk::RESPONSE_DELETE_EVENT) {
quit();
return;
@@ -1682,7 +1669,6 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
if (session_name.empty()) {
response = Gtk::RESPONSE_NONE;
- cerr << "session name is empty\n";
continue;
}
@@ -1697,6 +1683,8 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
} else if (response == Gtk::RESPONSE_OK) {
+ session_name = new_session_dialog->session_name();
+
if (new_session_dialog->get_current_page() == 1) {
/* XXX this is a bit of a hack..
@@ -1707,7 +1695,6 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
if (session_name.empty()) {
response = Gtk::RESPONSE_NONE;
- cerr << "session name is empty 2\n";
continue;
}
@@ -1724,11 +1711,8 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
_session_is_new = true;
- session_name = new_session_dialog->session_name();
-
if (session_name.empty()) {
response = Gtk::RESPONSE_NONE;
- cerr << "session name is empty 3\n";
continue;
}
@@ -1741,7 +1725,7 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
} else {
- std::string session_path = new_session_dialog->session_folder();
+ session_path = new_session_dialog->session_folder();
}
@@ -1760,8 +1744,8 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
uint32_t cchns;
uint32_t mchns;
- Session::AutoConnectOption iconnect;
- Session::AutoConnectOption oconnect;
+ AutoConnectOption iconnect;
+ AutoConnectOption oconnect;
if (new_session_dialog->create_control_bus()) {
cchns = (uint32_t) new_session_dialog->control_channel_count();
@@ -1776,19 +1760,19 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
}
if (new_session_dialog->connect_inputs()) {
- iconnect = Session::AutoConnectPhysical;
+ iconnect = AutoConnectPhysical;
} else {
- iconnect = Session::AutoConnectOption (0);
+ iconnect = AutoConnectOption (0);
}
/// @todo some minor tweaks.
if (new_session_dialog->connect_outs_to_master()) {
- oconnect = Session::AutoConnectMaster;
+ oconnect = AutoConnectMaster;
} else if (new_session_dialog->connect_outs_to_physical()) {
- oconnect = Session::AutoConnectPhysical;
+ oconnect = AutoConnectPhysical;
} else {
- oconnect = Session::AutoConnectOption (0);
+ oconnect = AutoConnectOption (0);
}
uint32_t nphysin = (uint32_t) new_session_dialog->input_limit_count();
@@ -1857,6 +1841,8 @@ This prevents the session from being loaded."));
connect_to_session (new_session);
+ Config->set_current_owner (ConfigVariableBase::Interface);
+
session_loaded = true;
return 0;
}
@@ -1877,11 +1863,11 @@ int
ARDOUR_UI::build_session (const string & path, const string & snap_name,
uint32_t control_channels,
uint32_t master_channels,
- Session::AutoConnectOption input_connect,
- Session::AutoConnectOption output_connect,
+ AutoConnectOption input_connect,
+ AutoConnectOption output_connect,
uint32_t nphysin,
uint32_t nphysout,
- jack_nframes_t initial_length)
+ nframes_t initial_length)
{
Session *new_session;
int x;
@@ -2162,9 +2148,9 @@ ARDOUR_UI::add_route ()
string name_template = add_route_dialog->name_template ();
bool track = add_route_dialog->track ();
- Session::AutoConnectOption oac = session->get_output_auto_connect();
+ AutoConnectOption oac = Config->get_output_auto_connect();
- if (oac & Session::AutoConnectMaster) {
+ if (oac & AutoConnectMaster) {
output_chan = (session->master_out() ? session->master_out()->n_inputs().get(DataType::AUDIO) : input_chan);
} else {
output_chan = input_chan;
@@ -2248,18 +2234,6 @@ ARDOUR_UI::halt_on_xrun_message ()
msg.run ();
}
-void
-ARDOUR_UI::delete_sources_in_the_right_thread (list<boost::shared_ptr<ARDOUR::Source> >* deletion_list)
-{
- ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::delete_sources_in_the_right_thread), deletion_list));
-
- for (list<boost::shared_ptr<Source> >::iterator i = deletion_list->begin(); i != deletion_list->end(); ++i) {
- (*i)->drop_references ();
- }
-
- delete deletion_list;
-}
-
void
ARDOUR_UI::disk_overrun_handler ()
{
@@ -2363,7 +2337,7 @@ ARDOUR_UI::reconnect_to_jack ()
}
void
-ARDOUR_UI::set_jack_buffer_size (jack_nframes_t nframes)
+ARDOUR_UI::set_jack_buffer_size (nframes_t nframes)
{
engine->request_buffer_size (nframes);
update_sample_rate (0);
@@ -2390,72 +2364,6 @@ ARDOUR_UI::cmdline_new_session (string path)
}
void
-ARDOUR_UI::set_native_file_header_format (HeaderFormat hf)
-{
- Glib::RefPtr<Action> act;
-
- switch (hf) {
- case BWF:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatBWF"));
- break;
- case WAVE:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatWAVE"));
- break;
- case WAVE64:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatWAVE64"));
- break;
- case iXML:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatiXML"));
- break;
- case RF64:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatRF64"));
- break;
- case CAF:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatCAF"));
- break;
- case AIFF:
- act = ActionManager::get_action (X_("options"), X_("FileHeaderFormatAIFF"));
- break;
- }
-
- if (act) {
- Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active() && Config->get_native_file_header_format() != hf) {
- Config->set_native_file_header_format (hf);
- if (session) {
- session->reset_native_file_format ();
- }
- }
- }
-}
-
-void
-ARDOUR_UI::set_native_file_data_format (SampleFormat sf)
-{
- Glib::RefPtr<Action> act;
-
- switch (sf) {
- case FormatFloat:
- act = ActionManager::get_action (X_("options"), X_("FileDataFormatFloat"));
- break;
- case FormatInt24:
- act = ActionManager::get_action (X_("options"), X_("FileDataFormat24bit"));
- break;
- }
-
- if (act) {
- Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
-
- if (ract && ract->get_active() && Config->get_native_file_data_format() != sf) {
- Config->set_native_file_data_format (sf);
- if (session) {
- session->reset_native_file_format ();
- }
- }
- }
-}
-
-void
ARDOUR_UI::use_config ()
{
Glib::RefPtr<Action> act;
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index fdaa2d74ca..d3723e87a5 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -112,11 +112,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI
int build_session (const string & path, const string & snapshot,
uint32_t ctl_chns,
uint32_t master_chns,
- ARDOUR::Session::AutoConnectOption input_connect,
- ARDOUR::Session::AutoConnectOption output_connect,
+ ARDOUR::AutoConnectOption input_connect,
+ ARDOUR::AutoConnectOption output_connect,
uint32_t nphysin,
uint32_t nphysout,
- jack_nframes_t initial_length);
+ nframes_t initial_length);
bool session_is_new() const { return _session_is_new; }
ARDOUR::Session* the_session() { return session; }
@@ -159,7 +159,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
static sigc::signal<void,bool> Blink;
static sigc::signal<void> RapidScreenUpdate;
static sigc::signal<void> SuperRapidScreenUpdate;
- static sigc::signal<void,jack_nframes_t> Clock;
+ static sigc::signal<void,nframes_t> Clock;
/* this is a helper function to centralize the (complex) logic for
blinking rec-enable buttons.
@@ -179,7 +179,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void save_ardour_state ();
gboolean configure_handler (GdkEventConfigure* conf);
- void do_transport_locate (jack_nframes_t position);
+ void do_transport_locate (nframes_t position);
void halt_on_xrun_message ();
AudioClock primary_clock;
@@ -379,16 +379,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void toggle_time_master ();
void toggle_video_sync ();
- enum ShuttleBehaviour {
- Sprung,
- Wheel
- };
-
- enum ShuttleUnits {
- Percentage,
- Semitones
- };
-
Gtk::DrawingArea shuttle_box;
Gtk::EventBox speed_display_box;
Gtk::Label speed_display_label;
@@ -396,8 +386,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
Gtk::ComboBoxText shuttle_style_button;
Gtk::Menu* shuttle_unit_menu;
Gtk::Menu* shuttle_style_menu;
- ShuttleBehaviour shuttle_behaviour;
- ShuttleUnits shuttle_units;
float shuttle_max_speed;
Gtk::Menu* shuttle_context_menu;
@@ -405,8 +393,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void show_shuttle_context_menu ();
void shuttle_style_changed();
void shuttle_unit_clicked ();
- void set_shuttle_behaviour (ShuttleBehaviour);
- void set_shuttle_units (ShuttleUnits);
void set_shuttle_max_speed (float);
void update_speed_display ();
float last_speed_displayed;
@@ -517,7 +503,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
Gtk::Label sample_rate_label;
Gtk::EventBox sample_rate_box;
- void update_sample_rate (jack_nframes_t);
+ void update_sample_rate (nframes_t);
gint every_second ();
gint every_point_one_seconds ();
@@ -572,7 +558,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void we_have_dependents ();
void setup_keybindings ();
void setup_session_options ();
- void setup_config_options ();
guint32 last_key_press_time;
@@ -646,8 +631,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
struct timeval last_peak_grab;
struct timeval last_shuttle_request;
- void delete_sources_in_the_right_thread (list<boost::shared_ptr<ARDOUR::Source> >*);
-
void editor_display_control_changed (Editing::DisplayControl c);
bool have_disk_overrun_displayed;
@@ -662,7 +645,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void disconnect_from_jack ();
void reconnect_to_jack ();
- void set_jack_buffer_size (jack_nframes_t);
+ void set_jack_buffer_size (nframes_t);
Gtk::MenuItem* jack_disconnect_item;
Gtk::MenuItem* jack_reconnect_item;
@@ -677,22 +660,17 @@ class ARDOUR_UI : public Gtkmm2ext::UI
std::vector<std::string> positional_sync_strings;
- void toggle_config_state (const char* group, const char* action, void (ARDOUR::Configuration::*set)(bool));
- void toggle_session_state (const char* group, const char* action, void (ARDOUR::Session::*set)(bool), bool (ARDOUR::Session::*get)(void) const);
- void toggle_session_state (const char* group, const char* action, sigc::slot<void> theSlot);
void toggle_send_midi_feedback ();
void toggle_use_mmc ();
void toggle_send_mmc ();
void toggle_use_midi_control();
void toggle_send_mtc ();
- void toggle_AutoConnectNewTrackInputsToHardware();
- void toggle_AutoConnectNewTrackOutputsToHardware();
- void toggle_AutoConnectNewTrackOutputsToMaster();
- void toggle_ManuallyConnectNewTrackOutputs();
- void toggle_UseHardwareMonitoring();
- void toggle_UseSoftwareMonitoring();
- void toggle_UseExternalMonitoring();
+ void set_input_auto_connect (ARDOUR::AutoConnectOption);
+ void set_output_auto_connect (ARDOUR::AutoConnectOption);
+ void set_solo_model (ARDOUR::SoloModel);
+ void set_monitor_model (ARDOUR::MonitorModel);
+
void toggle_StopPluginsWithTransport();
void toggle_DoNotRunPluginsWhileRecording();
void toggle_VerifyRemoveLastCapture();
@@ -701,16 +679,24 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void toggle_GainReduceFastTransport();
void toggle_LatchedSolo();
void toggle_SoloViaBus();
- void toggle_AutomaticallyCreateCrossfades();
- void toggle_UnmuteNewFullCrossfades();
void toggle_LatchedRecordEnable ();
void mtc_port_changed ();
- void map_some_session_state (const char* group, const char* action, bool (ARDOUR::Session::*get)() const);
- void queue_session_control_changed (ARDOUR::Session::ControlType t);
- void session_control_changed (ARDOUR::Session::ControlType t);
+ void map_solo_model ();
+ void map_monitor_model ();
+ void map_file_header_format ();
+ void map_file_data_format ();
+ void map_input_auto_connect ();
+ void map_output_auto_connect ();
+ void parameter_changed (const char*);
+
+ void set_meter_hold (ARDOUR::MeterHold);
+ void set_meter_falloff (ARDOUR::MeterFalloff);
+ void map_meter_hold ();
+ void map_meter_falloff ();
void toggle_control_protocol (ARDOUR::ControlProtocolInfo*);
+ void toggle_control_protocol_feedback (ARDOUR::ControlProtocolInfo*, const char* group_name, const char* action_name);
};
#endif /* __ardour_gui_h__ */
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc
index 44287fe61e..7f724312aa 100644
--- a/gtk2_ardour/ardour_ui2.cc
+++ b/gtk2_ardour/ardour_ui2.cc
@@ -130,20 +130,16 @@ ARDOUR_UI::transport_stopped ()
update_disk_space ();
}
-static const double SHUTTLE_FRACT_SPEED1=0.48412291827; /* derived from A1,A2 */
-
void
ARDOUR_UI::transport_rolling ()
{
stop_button.set_active (false);
if (session->get_play_range()) {
-
play_selection_button.set_active (true);
roll_button.set_active (false);
auto_loop_button.set_active (false);
- } else if (session->get_auto_loop ()) {
-
+ } else if (Config->get_auto_loop ()) {
auto_loop_button.set_active (true);
play_selection_button.set_active (false);
roll_button.set_active (false);
@@ -243,29 +239,37 @@ ARDOUR_UI::setup_transport ()
goto_start_button.set_colors (colors);
goto_end_button.set_colors (colors);
+ stop_button.set_size_request(29, -1);
+ roll_button.set_size_request(29, -1);
+ auto_loop_button.set_size_request(29, -1);
+ play_selection_button.set_size_request(29, -1);
+ goto_start_button.set_size_request(29, -1);
+ goto_end_button.set_size_request(29, -1);
+ rec_button.set_size_request(29, -1);
+
Widget* w;
stop_button.set_active (true);
-
- w = manage (new Image (Stock::MEDIA_PREVIOUS, ICON_SIZE_BUTTON));
+
+ w = manage (new Image (get_icon (X_("transport_start"))));
w->show();
goto_start_button.add (*w);
- w = manage (new Image (Stock::MEDIA_NEXT, ICON_SIZE_BUTTON));
+ w = manage (new Image (get_icon (X_("transport_end"))));
w->show();
goto_end_button.add (*w);
- w = manage (new Image (Stock::MEDIA_PLAY, ICON_SIZE_BUTTON));
+ w = manage (new Image (get_icon (X_("transport_play"))));
w->show();
roll_button.add (*w);
- w = manage (new Image (Stock::MEDIA_STOP, ICON_SIZE_BUTTON));
+ w = manage (new Image (get_icon (X_("transport_stop"))));
w->show();
stop_button.add (*w);
- w = manage (new Image (Stock::MEDIA_PLAY, ICON_SIZE_BUTTON));
+ w = manage (new Image (get_icon (X_("transport_range"))));
w->show();
play_selection_button.add (*w);
- w = manage (new Image (Stock::MEDIA_RECORD, ICON_SIZE_BUTTON));
+ w = manage (new Image (get_icon (X_("transport_record"))));
w->show();
rec_button.add (*w);
- w = manage (new Image (get_xpm("loop.xpm")));
+ w = manage (new Image (get_icon (X_("transport_loop"))));
w->show();
auto_loop_button.add (*w);
@@ -359,6 +363,9 @@ ARDOUR_UI::setup_transport ()
auditioning_alert_button.set_name ("TransportAuditioningAlert");
auditioning_alert_button.signal_pressed().connect (mem_fun(*this,&ARDOUR_UI::audition_alert_toggle));
+ tooltips().set_tip (solo_alert_button, _("When active, something is soloed.\nClick to de-solo everything"));
+ tooltips().set_tip (auditioning_alert_button, _("When active, auditioning is taking place\nClick to stop the audition"));
+
alert_box.pack_start (solo_alert_button, false, false);
alert_box.pack_start (auditioning_alert_button, false, false);
@@ -396,9 +403,9 @@ ARDOUR_UI::setup_transport ()
sdframe->add (speed_display_box);
mtc_port_changed ();
- sync_option_combo.set_active_text (positional_sync_strings.front());
sync_option_combo.signal_changed().connect (mem_fun (*this, &ARDOUR_UI::sync_option_changed));
- Gtkmm2ext::set_size_request_to_display_given_text (sync_option_combo, "Internal", 22, 10);
+ const guint32 FUDGE = 25; // Combo's are stupid - they steal space from the entry for the button
+ set_size_request_to_display_given_text (sync_option_combo, X_("Igternal"), 2+FUDGE, 10);
shbox->pack_start (*sdframe, false, false);
shbox->pack_start (shuttle_units_button, true, true);
@@ -456,23 +463,6 @@ ARDOUR_UI::setup_transport ()
}
void
-ARDOUR_UI::setup_clock ()
-{
- ARDOUR_UI::Clock.connect (bind (mem_fun (big_clock, &AudioClock::set), false));
-
- big_clock_window = new Window (WINDOW_TOPLEVEL);
-
- big_clock_window->set_border_width (0);
- big_clock_window->add (big_clock);
- big_clock_window->set_title (_("ardour: clock"));
- big_clock_window->set_type_hint (Gdk::WINDOW_TYPE_HINT_MENU);
- big_clock_window->signal_realize().connect (bind (sigc::ptr_fun (set_decoration), big_clock_window, (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
- big_clock_window->signal_unmap().connect (bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleBigClock")));
-
- manage_window (*big_clock_window);
-}
-
-void
ARDOUR_UI::manage_window (Window& win)
{
win.signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), &win));
@@ -514,7 +504,7 @@ ARDOUR_UI::_auditioning_changed (bool onoff)
void
ARDOUR_UI::auditioning_changed (bool onoff)
{
- Gtkmm2ext::UI::instance()->call_slot(bind (mem_fun(*this, &ARDOUR_UI::_auditioning_changed), onoff));
+ UI::instance()->call_slot(bind (mem_fun(*this, &ARDOUR_UI::_auditioning_changed), onoff));
}
void
@@ -668,8 +658,8 @@ ARDOUR_UI::shuttle_box_button_release (GdkEventButton* ev)
mouse_shuttle (ev->x, true);
shuttle_grabbed = false;
shuttle_box.remove_modal_grab ();
- if (shuttle_behaviour == Sprung) {
- if (session->get_auto_play() || roll_button.get_state()) {
+ if (Config->get_shuttle_behaviour() == Sprung) {
+ if (Config->get_auto_play() || roll_button.get_state()) {
shuttle_fract = SHUTTLE_FRACT_SPEED1;
session->request_transport_speed (1.0);
stop_button.set_active (false);
@@ -829,49 +819,14 @@ ARDOUR_UI::shuttle_unit_clicked ()
}
void
-ARDOUR_UI::set_shuttle_units (ShuttleUnits u)
-{
- switch ((shuttle_units = u)) {
- case Percentage:
- shuttle_units_button.set_label("% ");
- break;
- case Semitones:
- shuttle_units_button.set_label(_("ST"));
- break;
- }
-}
-
-void
ARDOUR_UI::shuttle_style_changed ()
{
ustring str = shuttle_style_button.get_active_text ();
if (str == _("sprung")) {
- set_shuttle_behaviour (Sprung);
+ Config->set_shuttle_behaviour (Sprung);
} else if (str == _("wheel")) {
- set_shuttle_behaviour (Wheel);
- }
-}
-
-
-void
-ARDOUR_UI::set_shuttle_behaviour (ShuttleBehaviour b)
-{
- switch ((shuttle_behaviour = b)) {
- case Sprung:
- shuttle_style_button.set_active_text (_("sprung"));
- shuttle_fract = 0.0;
- shuttle_box.queue_draw ();
- if (session) {
- if (session->transport_rolling()) {
- shuttle_fract = SHUTTLE_FRACT_SPEED1;
- session->request_transport_speed (1.0);
- }
- }
- break;
- case Wheel:
- shuttle_style_button.set_active_text (_("wheel"));
- break;
+ Config->set_shuttle_behaviour (Wheel);
}
}
@@ -892,7 +847,7 @@ ARDOUR_UI::update_speed_display ()
if (x != last_speed_displayed) {
if (x != 0) {
- if (shuttle_units == Percentage) {
+ if (Config->get_shuttle_units() == Percentage) {
snprintf (buf, sizeof (buf), "%.2f", x);
} else {
if (x < 0) {
@@ -920,31 +875,19 @@ ARDOUR_UI::set_transport_sensitivity (bool yn)
void
ARDOUR_UI::editor_realized ()
{
+ Config->map_parameters (mem_fun (*this, &ARDOUR_UI::parameter_changed));
+
set_size_request_to_display_given_text (speed_display_box, _("-0.55"), 2, 2);
- /* XXX: this should really be saved in instant.xml or something similar and restored from there */
- shuttle_style_button.set_active_text (_("sprung"));
- const guint32 FUDGE = 20; // Combo's are stupid - they steal space from the entry for the button
+ const guint32 FUDGE = 25; // Combo's are stupid - they steal space from the entry for the button
set_size_request_to_display_given_text (shuttle_style_button, _("sprung"), 2+FUDGE, 10);
}
void
ARDOUR_UI::sync_option_changed ()
{
- string which;
-
- if (session == 0) {
- return;
+ if (session) {
+ session->request_slave_source (string_to_slave_source (sync_option_combo.get_active_text()));
}
-
- which = sync_option_combo.get_active_text();
-
- if (which == positional_sync_strings[Session::None]) {
- session->request_slave_source (Session::None);
- } else if (which == positional_sync_strings[Session::MTC]) {
- session->request_slave_source (Session::MTC);
- } else if (which == positional_sync_strings[Session::JACK]) {
- session->request_slave_source (Session::JACK);
- }
}
void
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 5af62db99f..d1931a22d5 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -26,6 +26,8 @@
#include <pbd/pathscanner.h>
+#include <gtkmm2ext/utils.h>
+
#include "ardour_ui.h"
#include "public_editor.h"
#include "audio_clock.h"
@@ -39,10 +41,13 @@
#include "i18n.h"
+using namespace std;
using namespace ARDOUR;
using namespace PBD;
-using namespace Gtk;
using namespace Gtkmm2ext;
+using namespace Gtk;
+using namespace Glib;
+using namespace sigc;
int
ARDOUR_UI::create_editor ()
@@ -81,6 +86,9 @@ ARDOUR_UI::install_actions ()
ActionManager::register_action (main_actions, X_("AudioFileFormatHeader"), _("Header"));
ActionManager::register_action (main_actions, X_("AudioFileFormatData"), _("Data"));
ActionManager::register_action (main_actions, X_("ControlSurfaces"), _("Control Surfaces"));
+ ActionManager::register_action (main_actions, X_("Metering"), _("Metering"));
+ ActionManager::register_action (main_actions, X_("MeteringFallOffRate"), _("Fall off rate"));
+ ActionManager::register_action (main_actions, X_("MeteringHoldTime"), _("Hold Time"));
/* the real actions */
@@ -149,23 +157,23 @@ ARDOUR_UI::install_actions ()
RadioAction::Group jack_latency_group;
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 32));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 32));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 64));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 64));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 128));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 128));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 256));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 256));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 512));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 512));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 1024));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 1024));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 2048));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 2048));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 4096));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 4096));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 8192));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 8192));
ActionManager::jack_sensitive_actions.push_back (act);
/* these actions are intended to be shared across all windows */
@@ -358,8 +366,8 @@ ARDOUR_UI::install_actions ()
Glib::RefPtr<ActionGroup> shuttle_actions = ActionGroup::create ("ShuttleActions");
- shuttle_actions->add (Action::create (X_("SetShuttleUnitsPercentage"), _("Percentage")), bind (mem_fun(*this, &ARDOUR_UI::set_shuttle_units), Percentage));
- shuttle_actions->add (Action::create (X_("SetShuttleUnitsSemitones"), _("Semitones")), bind (mem_fun(*this, &ARDOUR_UI::set_shuttle_units), Semitones));
+ shuttle_actions->add (Action::create (X_("SetShuttleUnitsPercentage"), _("Percentage")), hide_return (bind (mem_fun (*Config, &Configuration::set_shuttle_units), Percentage)));
+ shuttle_actions->add (Action::create (X_("SetShuttleUnitsSemitones"), _("Semitones")), hide_return (bind (mem_fun (*Config, &Configuration::set_shuttle_units), Semitones)));
Glib::RefPtr<ActionGroup> option_actions = ActionGroup::create ("options");
@@ -374,9 +382,37 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_toggle_action (option_actions, X_("UseMIDIcontrol"), _("Use MIDI control"), mem_fun (*this, &ARDOUR_UI::toggle_use_midi_control));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_toggle_action (option_actions, X_("AutoConnectNewTrackInputsToHardware"), _("Connect new track inputs to hardware"), mem_fun (*this, &ARDOUR_UI::toggle_AutoConnectNewTrackInputsToHardware));
+ ActionManager::register_toggle_action (option_actions, X_("StopPluginsWithTransport"), _("Stop plugins with transport"), mem_fun (*this, &ARDOUR_UI::toggle_StopPluginsWithTransport));
+ ActionManager::register_toggle_action (option_actions, X_("VerifyRemoveLastCapture"), _("Verify remove last capture"), mem_fun (*this, &ARDOUR_UI::toggle_VerifyRemoveLastCapture));
+ ActionManager::register_toggle_action (option_actions, X_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun));
+ ActionManager::register_toggle_action (option_actions, X_("StopTransportAtEndOfSession"), _("Stop transport at session end"), mem_fun (*this, &ARDOUR_UI::toggle_StopTransportAtEndOfSession));
+ ActionManager::register_toggle_action (option_actions, X_("GainReduceFastTransport"), _("-12dB gain reduce ffwd/rewind"), mem_fun (*this, &ARDOUR_UI::toggle_GainReduceFastTransport));
+ ActionManager::register_toggle_action (option_actions, X_("LatchedRecordEnable"), _("Rec-enable stays engaged at stop"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedRecordEnable));
+
+ act = ActionManager::register_toggle_action (option_actions, X_("DoNotRunPluginsWhileRecording"), _("Do not run plugins while recording"), mem_fun (*this, &ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording));
+ ActionManager::session_sensitive_actions.push_back (act);
+
+ act = ActionManager::register_toggle_action (option_actions, X_("LatchedSolo"), _("Latched solo"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedSolo));
ActionManager::session_sensitive_actions.push_back (act);
+ /* !!! REMEMBER THAT RADIO ACTIONS HAVE TO BE HANDLED WITH MORE FINESSE THAN SIMPLE TOGGLES !!! */
+
+ RadioAction::Group meter_falloff_group;
+ RadioAction::Group meter_hold_group;
+
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffOff"), _("Off"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffOff));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffSlowest"), _("Slowest"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffSlowest));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffSlow"), _("Slow"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffSlow));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffMedium"), _("Medium"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffMedium));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffFast"), _("Fast"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffFast));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffFaster"), _("Faster"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffFaster));
+ ActionManager::register_radio_action (option_actions, meter_falloff_group, X_("MeterFalloffFastest"), _("Fastest"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_falloff), MeterFalloffFastest));
+
+ ActionManager::register_radio_action (option_actions, meter_hold_group, X_("MeterHoldOff"), _("Off"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_hold), MeterHoldOff));
+ ActionManager::register_radio_action (option_actions, meter_hold_group, X_("MeterHoldShort"), _("Short"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_hold), MeterHoldShort));
+ ActionManager::register_radio_action (option_actions, meter_hold_group, X_("MeterHoldMedium"), _("Medium"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_hold), MeterHoldMedium));
+ ActionManager::register_radio_action (option_actions, meter_hold_group, X_("MeterHoldLong"), _("Long"), bind (mem_fun (*this, &ARDOUR_UI::set_meter_hold), MeterHoldLong));
+
RadioAction::Group file_header_group;
act = ActionManager::register_radio_action (option_actions, file_header_group, X_("FileHeaderFormatBWF"), X_("Broadcast WAVE"), bind (mem_fun (*this, &ARDOUR_UI::set_native_file_header_format), ARDOUR::BWF));
@@ -391,48 +427,33 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_radio_action (option_actions, file_data_group, X_("FileDataFormatFloat"), X_("32-bit floating point"), bind (mem_fun (*this, &ARDOUR_UI::set_native_file_data_format), ARDOUR::FormatFloat));
act = ActionManager::register_radio_action (option_actions, file_data_group, X_("FileDataFormat24bit"), X_("24-bit signed integer"), bind (mem_fun (*this, &ARDOUR_UI::set_native_file_data_format), ARDOUR::FormatInt24));
- RadioAction::Group connect_outputs_group;
-
- act = ActionManager::register_radio_action (option_actions, connect_outputs_group, X_("AutoConnectNewTrackOutputsToHardware"), _("Connect new track outputs to hardware"), mem_fun (*this, &ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToHardware));
- ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (option_actions, connect_outputs_group, X_("AutoConnectNewTrackOutputsToMaster"), _("Connect new track outputs to master"), mem_fun (*this, &ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToMaster));
- ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (option_actions, connect_outputs_group, X_("ManuallyConnectNewTrackOutputs"), _("Manually connect new track outputs"), mem_fun (*this, &ARDOUR_UI::toggle_ManuallyConnectNewTrackOutputs));
- ActionManager::session_sensitive_actions.push_back (act);
-
RadioAction::Group monitoring_group;
- act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseHardwareMonitoring"), _("Hardware monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseHardwareMonitoring));
- act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseSoftwareMonitoring"), _("Software monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseSoftwareMonitoring));
- act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseExternalMonitoring"), _("External monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseExternalMonitoring));
+ act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseHardwareMonitoring"), _("Hardware monitoring"), bind (mem_fun (*this, &ARDOUR_UI::set_monitor_model), HardwareMonitoring));
+ act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseSoftwareMonitoring"), _("Software monitoring"), bind (mem_fun (*this, &ARDOUR_UI::set_monitor_model), SoftwareMonitoring));
+ act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseExternalMonitoring"), _("External monitoring"), bind (mem_fun (*this, &ARDOUR_UI::set_monitor_model), ExternalMonitoring));
- /* Configuration object options (i.e. not session specific) */
-
- ActionManager::register_toggle_action (option_actions, X_("StopPluginsWithTransport"), _("Stop plugins with transport"), mem_fun (*this, &ARDOUR_UI::toggle_StopPluginsWithTransport));
- ActionManager::register_toggle_action (option_actions, X_("VerifyRemoveLastCapture"), _("Verify remove last capture"), mem_fun (*this, &ARDOUR_UI::toggle_VerifyRemoveLastCapture));
- ActionManager::register_toggle_action (option_actions, X_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun));
- ActionManager::register_toggle_action (option_actions, X_("StopTransportAtEndOfSession"), _("Stop transport at session end"), mem_fun (*this, &ARDOUR_UI::toggle_StopTransportAtEndOfSession));
- ActionManager::register_toggle_action (option_actions, X_("GainReduceFastTransport"), _("-12dB gain reduce ffwd/rewind"), mem_fun (*this, &ARDOUR_UI::toggle_GainReduceFastTransport));
- ActionManager::register_toggle_action (option_actions, X_("LatchedRecordEnable"), _("Rec-enable stays engaged at stop"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedRecordEnable));
+ RadioAction::Group solo_group;
- /* session options */
-
- act = ActionManager::register_toggle_action (option_actions, X_("DoNotRunPluginsWhileRecording"), _("Do not run plugins while recording"), mem_fun (*this, &ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording));
+ act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloInPlace"), _("Solo in-place"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_solo_model), InverseMute)));
ActionManager::session_sensitive_actions.push_back (act);
-
- act = ActionManager::register_toggle_action (option_actions, X_("LatchedSolo"), _("Latched solo"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedSolo));
+ act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloViaBus"), _("Solo via bus"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_solo_model), SoloBus)));
ActionManager::session_sensitive_actions.push_back (act);
- RadioAction::Group solo_group;
+ RadioAction::Group input_auto_connect_group;
- act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloInPlace"), _("Solo in-place"), mem_fun (*this, &ARDOUR_UI::toggle_SoloViaBus));
+ act = ActionManager::register_radio_action (option_actions, input_auto_connect_group, X_("InputAutoConnectPhysical"), _("Auto-connect inputs to physical inputs"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_input_auto_connect), AutoConnectPhysical)));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloViaBus"), _("Solo via bus"), mem_fun (*this, &ARDOUR_UI::toggle_SoloViaBus));
+ act = ActionManager::register_radio_action (option_actions, input_auto_connect_group, X_("InputAutoConnectManual"), _("Manually connect inputs"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_input_auto_connect), (AutoConnectOption) 0)));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (option_actions, X_("AutomaticallyCreateCrossfades"), _("Automatically create crossfades"), mem_fun (*this, &ARDOUR_UI::toggle_AutomaticallyCreateCrossfades));
+ RadioAction::Group output_auto_connect_group;
+
+ act = ActionManager::register_radio_action (option_actions, output_auto_connect_group, X_("OutputAutoConnectPhysical"), _("Auto-connect outputs to physical outs"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_output_auto_connect), AutoConnectPhysical)));
+ ActionManager::session_sensitive_actions.push_back (act);
+ act = ActionManager::register_radio_action (option_actions, output_auto_connect_group, X_("OutputAutoConnectMaster"), _("Auto-connect outputs to master bus"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_output_auto_connect), AutoConnectMaster)));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (option_actions, X_("UnmuteNewFullCrossfades"), _("Unmute new full crossfades"), mem_fun (*this, &ARDOUR_UI::toggle_UnmuteNewFullCrossfades));
+ act = ActionManager::register_radio_action (option_actions, output_auto_connect_group, X_("OutputAutoConnectManual"), _("Manually connect outputs"), hide_return (bind (mem_fun (*this, &ARDOUR_UI::set_output_auto_connect), (AutoConnectOption) 0)));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::add_action_group (shuttle_actions);
@@ -441,10 +462,6 @@ ARDOUR_UI::install_actions ()
ActionManager::add_action_group (transport_actions);
ActionManager::add_action_group (main_actions);
ActionManager::add_action_group (common_actions);
-
- /* initialize state of non-session dependent options */
-
- setup_config_options ();
}
void
@@ -466,9 +483,35 @@ ARDOUR_UI::toggle_control_protocol (ControlProtocolInfo* cpi)
}
void
+ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const char* group, const char* action)
+{
+ if (!session) {
+ /* this happens when we build the menu bar when control protocol support
+ has been used in the past for some given protocol - the item needs
+ to be made active, but there is no session yet.
+ */
+ return;
+ }
+
+ if (cpi->protocol) {
+ Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (group, action);
+
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+ bool x = tact->get_active();
+
+ if (tact && x != cpi->protocol->get_feedback()) {
+ cpi->protocol->set_feedback (!x);
+ }
+ }
+ }
+}
+
+void
ARDOUR_UI::build_control_surface_menu ()
{
list<ControlProtocolInfo*>::iterator i;
+ bool with_feedback;
/* !!! this has to match the top level entry from ardour.menus */
@@ -488,6 +531,8 @@ ARDOUR_UI::build_control_surface_menu ()
(bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol), *i)));
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+
+ with_feedback = false;
if ((*i)->protocol || (*i)->requested) {
tact->set_active ();
@@ -496,6 +541,34 @@ ARDOUR_UI::build_control_surface_menu ()
ui += "<menuitem action='";
ui += action_name;
ui += "'/>\n";
+
+ if ((*i)->supports_feedback) {
+
+ string submenu_name = action_name;
+
+ submenu_name += "SubMenu";
+
+ ActionManager::register_action (editor->editor_actions, submenu_name.c_str(), _("Controls"));
+
+ action_name += "Feedback";
+
+ Glib::RefPtr<Action> act = ActionManager::register_toggle_action (editor->editor_actions, action_name.c_str(), _("Feedback"),
+ (bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol_feedback),
+ *i,
+ "Editor",
+ action_name.c_str())));
+
+ ui += "<menu action='";
+ ui += submenu_name;
+ ui += "'>\n<menuitem action='";
+ ui += action_name;
+ ui += "'/>\n</menu>\n";
+
+ if ((*i)->protocol) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+ tact->set_active ((*i)->protocol->get_feedback ());
+ }
+ }
}
}
@@ -549,3 +622,24 @@ ARDOUR_UI::build_menu_bar ()
menu_bar_base.set_name ("MainMenuBar");
menu_bar_base.add (menu_hbox);
}
+
+void
+ARDOUR_UI::setup_clock ()
+{
+ ARDOUR_UI::Clock.connect (bind (mem_fun (big_clock, &AudioClock::set), false));
+
+ big_clock_window = new Window (WINDOW_TOPLEVEL);
+
+ big_clock_window->set_border_width (0);
+ big_clock_window->add (big_clock);
+ big_clock_window->set_title (_("ardour: clock"));
+ big_clock_window->set_type_hint (Gdk::WINDOW_TYPE_HINT_MENU);
+ big_clock_window->signal_realize().connect (bind (sigc::ptr_fun (set_decoration), big_clock_window, (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
+ big_clock_window->signal_unmap().connect (bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleBigClock")));
+
+ if (editor) {
+ editor->ensure_float (*big_clock_window);
+ }
+
+ manage_window (*big_clock_window);
+}
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc
index 21afbcde21..82147f04ee 100644
--- a/gtk2_ardour/ardour_ui_options.cc
+++ b/gtk2_ardour/ardour_ui_options.cc
@@ -36,198 +36,258 @@ using namespace Gtk;
using namespace Gtkmm2ext;
using namespace ARDOUR;
using namespace PBD;
-
-void
-ARDOUR_UI::setup_config_options ()
-{
- std::vector<Glib::ustring> groups;
- groups.push_back("options");
- groups.push_back("Editor");
- groups.push_back("Transport");
-
- struct {
- char* name;
- bool (Configuration::*method)(void) const;
- char act_type; //(t)oggle or (r)adio
- } options[] = {
- { "ToggleTimeMaster", &Configuration::get_jack_time_master, 't' },
- { "StopPluginsWithTransport", &Configuration::get_plugins_stop_with_transport, 't' },
- { "LatchedRecordEnable", &Configuration::get_latched_record_enable, 't' },
- { "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture, 't' },
- { "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun, 't' },
- { "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end, 't' },
- { "UseHardwareMonitoring", &Configuration::get_use_hardware_monitoring, 'r' },
- { "UseSoftwareMonitoring", &Configuration::get_use_sw_monitoring, 'r' },
- { "UseExternalMonitoring", &Configuration::get_use_external_monitoring, 'r' },
- { "MeterFalloffOff", &Configuration::get_meter_falloff_off, 'r' },
- { "MeterFalloffSlowest", &Configuration::get_meter_falloff_slowest, 'r' },
- { "MeterFalloffSlow", &Configuration::get_meter_falloff_slow, 'r' },
- { "MeterFalloffMedium", &Configuration::get_meter_falloff_medium, 'r' },
- { "MeterFalloffFast", &Configuration::get_meter_falloff_fast, 'r' },
- { "MeterFalloffFaster", &Configuration::get_meter_falloff_faster, 'r' },
- { "MeterFalloffFastest", &Configuration::get_meter_falloff_fastest, 'r' },
- { "MeterHoldOff", &Configuration::get_meter_hold_off, 'r' },
- { "MeterHoldShort", &Configuration::get_meter_hold_short, 'r' },
- { "MeterHoldMedium", &Configuration::get_meter_hold_medium, 'r' },
- { "MeterHoldLong", &Configuration::get_meter_hold_long, 'r' },
- { "ToggleVideoSync", &Configuration::get_use_video_sync, 't' },
- { 0, 0, 0 }
- };
-
- for (uint32_t n = 0; options[n].name; ++n) {
- for (std::vector<Glib::ustring>::iterator i = groups.begin(); i != groups.end(); i++) {
- Glib::RefPtr<Action> act = ActionManager::get_action (i->c_str(), options[n].name);
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (options[n].act_type == 't' || options[n].act_type == 'r') {
- if ((Config->*(options[n].method))()) {
- tact->set_active (true);
- } else {
- tact->set_active (false);
- }
- }
- continue;
- }
- }
- }
-}
+using namespace sigc;
void
ARDOUR_UI::toggle_time_master ()
{
- toggle_config_state ("Transport", "ToggleTimeMaster", &Configuration::set_jack_time_master);
- if (session) {
- session->engine().reset_timebase ();
- }
+ ActionManager::toggle_config_state ("Transport", "ToggleTimeMaster", &Configuration::set_jack_time_master, &Configuration::get_jack_time_master);
}
void
-ARDOUR_UI::toggle_config_state (const char* group, const char* action, void (Configuration::*set)(bool))
+ARDOUR_UI::toggle_send_mtc ()
{
- Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- (Config->*set) (tact->get_active());
- }
+ ActionManager::toggle_config_state ("options", "SendMTC", &Configuration::set_send_mtc, &Configuration::get_send_mtc);
}
void
-ARDOUR_UI::toggle_session_state (const char* group, const char* action, void (Session::*set)(bool), bool (Session::*get)(void) const)
+ARDOUR_UI::toggle_send_mmc ()
{
- if (session) {
- Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- bool x = (session->*get)();
-
- if (x != tact->get_active()) {
- (session->*set) (!x);
- }
- }
- }
+ ActionManager::toggle_config_state ("options", "SendMMC", &Configuration::set_send_mmc, &Configuration::get_send_mmc);
}
void
-ARDOUR_UI::toggle_session_state (const char* group, const char* action, sigc::slot<void> theSlot)
+ARDOUR_UI::toggle_use_mmc ()
{
- if (session) {
- Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- theSlot ();
- }
- }
- }
+ ActionManager::toggle_config_state ("options", "UseMMC", &Configuration::set_mmc_control, &Configuration::get_mmc_control);
}
void
-ARDOUR_UI::toggle_send_mtc ()
+ARDOUR_UI::toggle_use_midi_control ()
{
- toggle_session_state ("options", "SendMTC", &Session::set_send_mtc, &Session::get_send_mtc);
+ ActionManager::toggle_config_state ("options", "UseMIDIcontrol", &Configuration::set_midi_control, &Configuration::get_midi_control);
}
void
-ARDOUR_UI::toggle_send_mmc ()
+ARDOUR_UI::toggle_send_midi_feedback ()
{
- toggle_session_state ("options", "SendMMC", &Session::set_send_mmc, &Session::get_send_mmc);
+ ActionManager::toggle_config_state ("options", "SendMIDIfeedback", &Configuration::set_midi_feedback, &Configuration::get_midi_feedback);
}
void
-ARDOUR_UI::toggle_use_mmc ()
+ARDOUR_UI::set_native_file_header_format (HeaderFormat hf)
{
- toggle_session_state ("options", "UseMMC", &Session::set_mmc_control, &Session::get_mmc_control);
-}
+ const char *action;
-void
-ARDOUR_UI::toggle_use_midi_control ()
-{
- toggle_session_state ("options", "UseMIDIcontrol", &Session::set_midi_control, &Session::get_midi_control);
+ switch (hf) {
+ case BWF:
+ action = X_("FileHeaderFormatBWF");
+ break;
+ case WAVE:
+ action = X_("FileHeaderFormatWAVE");
+ break;
+ case WAVE64:
+ action = X_("FileHeaderFormatWAVE64");
+ break;
+ case iXML:
+ action = X_("FileHeaderFormatiXML");
+ break;
+ case RF64:
+ action = X_("FileHeaderFormatRF64");
+ break;
+ case CAF:
+ action = X_("FileHeaderFormatCAF");
+ break;
+ case AIFF:
+ action = X_("FileHeaderFormatAIFF");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_native_file_header_format() != hf) {
+ Config->set_native_file_header_format (hf);
+ }
+ }
}
void
-ARDOUR_UI::toggle_send_midi_feedback ()
+ARDOUR_UI::set_native_file_data_format (SampleFormat sf)
{
- toggle_session_state ("options", "SendMIDIfeedback", &Session::set_midi_feedback, &Session::get_midi_feedback);
+ const char* action;
+
+ switch (sf) {
+ case FormatFloat:
+ action = X_("FileDataFormatFloat");
+ break;
+ case FormatInt24:
+ action = X_("FileDataFormat24bit");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_native_file_data_format() != sf) {
+ Config->set_native_file_data_format (sf);
+ }
+ }
}
void
-ARDOUR_UI::toggle_AutoConnectNewTrackInputsToHardware()
+ARDOUR_UI::set_input_auto_connect (AutoConnectOption option)
{
- toggle_session_state ("options", "AutoConnectNewTrackInputsToHardware", &Session::set_input_auto_connect, &Session::get_input_auto_connect);
+ const char* action;
+
+ switch (option) {
+ case AutoConnectPhysical:
+ action = X_("InputAutoConnectPhysical");
+ break;
+ default:
+ action = X_("InputAutoConnectManual");
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+
+ if (ract && ract->get_active() && Config->get_input_auto_connect() != option) {
+ Config->set_input_auto_connect (option);
+ }
+ }
}
+
void
-ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToHardware()
+ARDOUR_UI::set_output_auto_connect (AutoConnectOption option)
{
- toggle_session_state ("options", "AutoConnectNewTrackOutputsToHardware", bind (mem_fun (session, &Session::set_output_auto_connect), Session::AutoConnectPhysical));
+ const char* action;
+
+ switch (option) {
+ case AutoConnectPhysical:
+ action = X_("OutputAutoConnectPhysical");
+ break;
+ case AutoConnectMaster:
+ action = X_("OutputAutoConnectMaster");
+ break;
+ default:
+ action = X_("OutputAutoConnectManual");
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+
+ if (ract && ract->get_active() && Config->get_output_auto_connect() != option) {
+ Config->set_output_auto_connect (option);
+ }
+ }
}
+
void
-ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToMaster()
+ARDOUR_UI::set_solo_model (SoloModel model)
{
- toggle_session_state ("options", "AutoConnectNewTrackOutputsToHardware", bind (mem_fun (session, &Session::set_output_auto_connect), Session::AutoConnectMaster));
+ const char* action = 0;
+
+ switch (model) {
+ case SoloBus:
+ action = X_("SoloViaBus");
+ break;
+
+ case InverseMute:
+ action = X_("SoloInPlace");
+ break;
+ default:
+ fatal << string_compose (_("programming error: unknown solo model in ARDOUR_UI::set_solo_model: %1"), model) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+
+ if (ract && ract->get_active() && Config->get_solo_model() != model) {
+ Config->set_solo_model (model);
+ }
+ }
+
}
+
void
-ARDOUR_UI::toggle_ManuallyConnectNewTrackOutputs()
+ARDOUR_UI::set_monitor_model (MonitorModel model)
{
- toggle_session_state ("options", "AutoConnectNewTrackOutputsToHardware", bind (mem_fun (session, &Session::set_output_auto_connect), Session::AutoConnectOption (0)));
+ const char* action = 0;
+
+ switch (model) {
+ case HardwareMonitoring:
+ action = X_("UseHardwareMonitoring");
+ break;
+
+ case SoftwareMonitoring:
+ action = X_("UseSoftwareMonitoring");
+ break;
+ case ExternalMonitoring:
+ action = X_("UseExternalMonitoring");
+ break;
+
+ default:
+ fatal << string_compose (_("programming error: unknown solo model in ARDOUR_UI::set_solo_model: %1"), model) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+
+ if (ract && ract->get_active() && Config->get_monitoring_model() != model) {
+ Config->set_monitoring_model (model);
+ }
+ }
+
}
void
ARDOUR_UI::toggle_auto_input ()
{
- toggle_session_state ("Transport", "ToggleAutoInput", &Session::set_auto_input, &Session::get_auto_input);
+ ActionManager::toggle_config_state ("Transport", "ToggleAutoInput", &Configuration::set_auto_input, &Configuration::get_auto_input);
}
void
ARDOUR_UI::toggle_auto_play ()
{
- toggle_session_state ("Transport", "ToggleAutoPlay", &Session::set_auto_play, &Session::get_auto_play);
+ ActionManager::toggle_config_state ("Transport", "ToggleAutoPlay", &Configuration::set_auto_play, &Configuration::get_auto_play);
}
void
ARDOUR_UI::toggle_auto_return ()
{
- toggle_session_state ("Transport", "ToggleAutoReturn", &Session::set_auto_return, &Session::get_auto_return);
+ ActionManager::toggle_config_state ("Transport", "ToggleAutoReturn", &Configuration::set_auto_return, &Configuration::get_auto_return);
}
void
ARDOUR_UI::toggle_click ()
{
- toggle_session_state ("Transport", "ToggleClick", &Session::set_clicking, &Session::get_clicking);
+ ActionManager::toggle_config_state ("Transport", "ToggleClick", &Configuration::set_clicking, &Configuration::get_clicking);
}
void
ARDOUR_UI::toggle_session_auto_loop ()
{
if (session) {
- if (session->get_auto_loop()) {
+ if (Config->get_auto_loop()) {
if (session->transport_rolling()) {
transport_roll();
} else {
- session->request_auto_loop (false);
+ session->request_play_loop (false);
}
} else {
- session->request_auto_loop (true);
+ session->request_play_loop (true);
}
}
}
@@ -235,16 +295,16 @@ ARDOUR_UI::toggle_session_auto_loop ()
void
ARDOUR_UI::toggle_punch_in ()
{
- toggle_session_state ("Transport", "TogglePunchIn", &Session::set_punch_in, &Session::get_punch_in);
+ ActionManager::toggle_config_state ("Transport", "TogglePunchIn", &Configuration::set_punch_in, &Configuration::get_punch_in);
}
void
ARDOUR_UI::toggle_punch_out ()
{
- toggle_session_state ("Transport", "TogglePunchOut", &Session::set_punch_out, &Session::get_punch_out);
+ ActionManager::toggle_config_state ("Transport", "TogglePunchOut", &Configuration::set_punch_out, &Configuration::get_punch_out);
}
- void
+void
ARDOUR_UI::toggle_video_sync()
{
Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", "ToggleVideoSync");
@@ -269,138 +329,51 @@ ARDOUR_UI::toggle_editing_space()
}
void
-ARDOUR_UI::toggle_UseHardwareMonitoring()
-{
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseHardwareMonitoring");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- Config->set_use_hardware_monitoring (true);
- Config->set_use_sw_monitoring (false);
- Config->set_use_external_monitoring (false);
- if (session) {
- session->reset_input_monitor_state();
- }
- }
- }
-}
-
-void
-ARDOUR_UI::toggle_UseSoftwareMonitoring()
-{
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseSoftwareMonitoring");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- Config->set_use_hardware_monitoring (false);
- Config->set_use_sw_monitoring (true);
- Config->set_use_external_monitoring (false);
- if (session) {
- session->reset_input_monitor_state();
- }
- }
- }
-}
-
-void
-ARDOUR_UI::toggle_UseExternalMonitoring()
-{
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseExternalMonitoring");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- Config->set_use_hardware_monitoring (false);
- Config->set_use_sw_monitoring (false);
- Config->set_use_external_monitoring (true);
- if (session) {
- session->reset_input_monitor_state();
- }
- }
- }
-}
-
-void
ARDOUR_UI::toggle_StopPluginsWithTransport()
{
- toggle_config_state ("options", "StopPluginsWithTransport", &Configuration::set_plugins_stop_with_transport);
+ ActionManager::toggle_config_state ("options", "StopPluginsWithTransport", &Configuration::set_plugins_stop_with_transport, &Configuration::get_plugins_stop_with_transport);
}
void
ARDOUR_UI::toggle_LatchedRecordEnable()
{
- toggle_config_state ("options", "LatchedRecordEnable", &Configuration::set_latched_record_enable);
+ ActionManager::toggle_config_state ("options", "LatchedRecordEnable", &Configuration::set_latched_record_enable, &Configuration::get_latched_record_enable);
}
void
ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording()
{
- toggle_session_state ("options", "DoNotRunPluginsWhileRecording", &Session::set_do_not_record_plugins, &Session::get_do_not_record_plugins);
+ ActionManager::toggle_config_state ("options", "DoNotRunPluginsWhileRecording", &Configuration::set_do_not_record_plugins, &Configuration::get_do_not_record_plugins);
}
void
ARDOUR_UI::toggle_VerifyRemoveLastCapture()
{
- toggle_config_state ("options", "VerifyRemoveLastCapture", &Configuration::set_verify_remove_last_capture);
+ ActionManager::toggle_config_state ("options", "VerifyRemoveLastCapture", &Configuration::set_verify_remove_last_capture, &Configuration::get_verify_remove_last_capture);
}
void
ARDOUR_UI::toggle_StopRecordingOnXrun()
{
- toggle_config_state ("options", "StopRecordingOnXrun", &Configuration::set_stop_recording_on_xrun);
+ ActionManager::toggle_config_state ("options", "StopRecordingOnXrun", &Configuration::set_stop_recording_on_xrun, &Configuration::get_stop_recording_on_xrun);
}
void
ARDOUR_UI::toggle_StopTransportAtEndOfSession()
{
- toggle_config_state ("options", "StopTransportAtEndOfSession", &Configuration::set_stop_at_session_end);
+ ActionManager::toggle_config_state ("options", "StopTransportAtEndOfSession", &Configuration::set_stop_at_session_end, &Configuration::get_stop_at_session_end);
}
void
ARDOUR_UI::toggle_GainReduceFastTransport()
{
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "GainReduceFastTransport");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- if (tact->get_active()) {
- Config->set_quieten_at_speed (0.251189); // -12dB reduction for ffwd or rewind
- } else {
- Config->set_quieten_at_speed (1.0); /* no change */
- }
- }
+ ActionManager::toggle_config_state ("options", "GainReduceFastTransport", &Configuration::set_quieten_at_speed, &Configuration::get_quieten_at_speed);
}
void
ARDOUR_UI::toggle_LatchedSolo()
{
- toggle_session_state ("options", "LatchedSolo", &Session::set_solo_latched, &Session::solo_latched);
-}
-
-void
-ARDOUR_UI::toggle_SoloViaBus()
-{
- if (!session) {
- return;
- }
-
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "SoloViaBus");
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
-
- if (tact->get_active()) {
- session->set_solo_model (Session::SoloBus);
- } else {
- session->set_solo_model (Session::InverseMute);
- }
- }
-}
-
-void
-ARDOUR_UI::toggle_AutomaticallyCreateCrossfades()
-{
-}
-void
-ARDOUR_UI::toggle_UnmuteNewFullCrossfades()
-{
+ ActionManager::toggle_config_state ("options", "LatchedSolo", &Configuration::set_solo_latched, &Configuration::get_solo_latched);
}
void
@@ -418,24 +391,12 @@ ARDOUR_UI::mtc_port_changed ()
have_mtc = false;
}
+ positional_sync_strings.clear ();
+ positional_sync_strings.push_back (slave_source_to_string (None));
if (have_mtc) {
- const gchar *psync_strings[] = {
- N_("Internal"),
- N_("MTC"),
- N_("JACK"),
- 0
- };
-
- positional_sync_strings = PBD::internationalize (psync_strings);
-
- } else {
- const gchar *psync_strings[] = {
- N_("Internal"),
- N_("JACK"),
- 0
- };
- positional_sync_strings = PBD::internationalize (psync_strings);
+ positional_sync_strings.push_back (slave_source_to_string (MTC));
}
+ positional_sync_strings.push_back (slave_source_to_string (JACK));
set_popdown_strings (sync_option_combo, positional_sync_strings);
}
@@ -445,147 +406,443 @@ ARDOUR_UI::setup_session_options ()
{
mtc_port_changed ();
- session_control_changed (Session::SlaveType);
- session_control_changed (Session::SendMTC);
- session_control_changed (Session::SendMMC);
- session_control_changed (Session::MMCControl);
- session_control_changed (Session::MidiFeedback);
- session_control_changed (Session::MidiControl);
- session_control_changed (Session::RecordingPlugins);
- session_control_changed (Session::CrossFadesActive);
- session_control_changed (Session::SoloLatch);
- session_control_changed (Session::SoloingModel);
- session_control_changed (Session::LayeringModel);
- session_control_changed (Session::CrossfadingModel);
- session_control_changed (Session::PunchOut);
- session_control_changed (Session::PunchIn);
- session_control_changed (Session::AutoPlay);
- session_control_changed (Session::AutoReturn);
- session_control_changed (Session::AutoInput);
- session_control_changed (Session::Clicking);
- session_control_changed (Session::SmpteMode);
-
- session->ControlChanged.connect (mem_fun (*this, &ARDOUR_UI::queue_session_control_changed));
+ Config->ParameterChanged.connect (mem_fun (*this, &ARDOUR_UI::parameter_changed));
}
+
void
-ARDOUR_UI::map_some_session_state (const char* group, const char* action, bool (Session::*get)() const)
+ARDOUR_UI::map_solo_model ()
{
- if (!session) {
- return;
+ const char* on;
+
+ if (Config->get_solo_model() == InverseMute) {
+ on = "SoloInPlace";
+ } else {
+ on = "SoloViaBus";
}
- Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- bool x = (session->*get)();
- if (tact->get_active() != x) {
- tact->set_active (x);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
}
}
}
void
-ARDOUR_UI::queue_session_control_changed (Session::ControlType t)
+ARDOUR_UI::map_monitor_model ()
{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &ARDOUR_UI::session_control_changed), t));
+ const char* on = 0;
+
+ switch (Config->get_monitoring_model()) {
+ case HardwareMonitoring:
+ on = X_("UseHardwareMonitoring");
+ break;
+ case SoftwareMonitoring:
+ on = X_("UseSoftwareMonitoring");
+ break;
+ case ExternalMonitoring:
+ on = X_("UseExternalMonitoring");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
+ }
+ }
}
void
-ARDOUR_UI::session_control_changed (Session::ControlType t)
+ARDOUR_UI::map_file_header_format ()
{
- switch (t) {
- case Session::SlaveType:
- switch (session->slave_source()) {
- case Session::None:
- sync_option_combo.set_active_text (_("Internal"));
- break;
- case Session::MTC:
- sync_option_combo.set_active_text (_("MTC"));
- break;
- case Session::JACK:
- sync_option_combo.set_active_text (_("JACK"));
- break;
- }
-
- break;
+ const char* action = 0;
- case Session::SendMTC:
- map_some_session_state ("options", "SendMTC", &Session::get_send_mtc);
+ switch (Config->get_native_file_header_format()) {
+ case BWF:
+ action = X_("FileHeaderFormatBWF");
break;
- case Session::SendMMC:
- map_some_session_state ("options", "SendMMC", &Session::get_send_mmc);
+ case WAVE:
+ action = X_("FileHeaderFormatWAVE");
break;
- case Session::MMCControl:
- map_some_session_state ("options", "UseMMC", &Session::get_mmc_control);
+ case WAVE64:
+ action = X_("FileHeaderFormatWAVE64");
break;
- case Session::MidiFeedback:
- map_some_session_state ("options", "SendMIDIfeedback", &Session::get_midi_feedback);
+ case iXML:
+ action = X_("FileHeaderFormatiXML");
break;
- case Session::MidiControl:
- map_some_session_state ("options", "UseMIDIcontrol", &Session::get_midi_control);
+ case RF64:
+ action = X_("FileHeaderFormatRF64");
break;
- case Session::RecordingPlugins:
- map_some_session_state ("options", "DoNotRunPluginsWhileRecording", &Session::get_do_not_record_plugins);
+ case CAF:
+ action = X_("FileHeaderFormatCAF");
break;
- case Session::CrossFadesActive:
- map_some_session_state ("options", "CrossfadesActive", &Session::get_crossfades_active);
- break;
+ default:
+ fatal << string_compose (_("programming error: unknown file header format passed to ARDOUR_UI::map_file_data_format: %1"),
+ Config->get_native_file_header_format()) << endmsg;
+ /*NOTREACHED*/
+ }
- case Session::SoloLatch:
- break;
- case Session::SoloingModel:
- switch (session->solo_model()) {
- case Session::InverseMute:
- break;
- case Session::SoloBus:
- break;
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
}
- break;
+ }
+}
- case Session::LayeringModel:
- break;
+void
+ARDOUR_UI::map_file_data_format ()
+{
+ const char* action = 0;
- case Session::CrossfadingModel:
+ switch (Config->get_native_file_data_format()) {
+ case FormatFloat:
+ action = X_("FileDataFormatFloat");
break;
- case Session::AutoPlay:
- map_some_session_state ("Transport", "ToggleAutoPlay", &Session::get_auto_play);
+ case FormatInt24:
+ action = X_("FileDataFormat24bit");
break;
- case Session::AutoLoop:
- break;
+ default:
+ fatal << string_compose (_("programming error: unknown file data format passed to ARDOUR_UI::map_file_data_format: %1"),
+ Config->get_native_file_data_format()) << endmsg;
+ /*NOTREACHED*/
+ }
- case Session::AutoReturn:
- map_some_session_state ("Transport", "ToggleAutoReturn", &Session::get_auto_return);
- break;
- case Session::AutoInput:
- map_some_session_state ("Transport", "ToggleAutoInput", &Session::get_auto_input);
- break;
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
- case Session::PunchOut:
- map_some_session_state ("Transport", "TogglePunchOut", &Session::get_punch_out);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
+ }
+ }
+}
+
+void
+ARDOUR_UI::map_input_auto_connect ()
+{
+ const char* on;
+
+ if (Config->get_input_auto_connect() == (AutoConnectOption) 0) {
+ on = "InputAutoConnectManual";
+ } else {
+ on = "InputAutoConnectPhysical";
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
+ }
+ }
+}
+
+void
+ARDOUR_UI::map_output_auto_connect ()
+{
+ const char* on;
+
+ if (Config->get_output_auto_connect() == (AutoConnectOption) 0) {
+ on = "OutputAutoConnectManual";
+ } else if (Config->get_output_auto_connect() == AutoConnectPhysical) {
+ on = "OutputAutoConnectPhysical";
+ } else {
+ on = "OutputAutoConnectMaster";
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
+ }
+ }
+}
+
+void
+ARDOUR_UI::map_meter_falloff ()
+{
+ const char* action = X_("MeterFalloffMedium");
+
+ /* XXX hack alert. Fix this. Please */
+
+ float val = Config->get_meter_falloff ();
+ MeterFalloff code = (MeterFalloff) (int) (floor (val));
+
+ switch (code) {
+ case MeterFalloffOff:
+ action = X_("MeterFalloffOff");
+ break;
+ case MeterFalloffSlowest:
+ action = X_("MeterFalloffSlowest");
+ break;
+ case MeterFalloffSlow:
+ action = X_("MeterFalloffSlow");
+ break;
+ case MeterFalloffMedium:
+ action = X_("MeterFalloffMedium");
+ break;
+ case MeterFalloffFast:
+ action = X_("MeterFalloffFast");
break;
+ case MeterFalloffFaster:
+ action = X_("MeterFalloffFaster");
+ break;
+ case MeterFalloffFastest:
+ action = X_("MeterFalloffFastest");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
+ }
+}
- case Session::PunchIn:
- map_some_session_state ("Transport", "TogglePunchIn", &Session::get_punch_in);
+void
+ARDOUR_UI::map_meter_hold ()
+{
+ const char* action = X_("MeterHoldMedium");
+
+ /* XXX hack alert. Fix this. Please */
+
+ float val = Config->get_meter_hold ();
+ MeterHold code = (MeterHold) (int) (floor (val));
+
+ switch (code) {
+ case MeterHoldOff:
+ action = X_("MeterHoldOff");
+ break;
+ case MeterHoldShort:
+ action = X_("MeterHoldShort");
break;
+ case MeterHoldMedium:
+ action = X_("MeterHoldMedium");
+ break;
+ case MeterHoldLong:
+ action = X_("MeterHoldLong");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
+ }
+}
+
+void
+ARDOUR_UI::set_meter_hold (MeterHold val)
+{
+ const char* action = 0;
+ float fval;
+
+ fval = meter_hold_to_float (val);
- case Session::Clicking:
- map_some_session_state ("Transport", "ToggleClick", &Session::get_clicking);
+ switch (val) {
+ case MeterHoldOff:
+ action = X_("MeterHoldOff");
+ break;
+ case MeterHoldShort:
+ action = X_("MeterHoldShort");
+ break;
+ case MeterHoldMedium:
+ action = X_("MeterHoldMedium");
+ break;
+ case MeterHoldLong:
+ action = X_("MeterHoldLong");
break;
+ }
- default:
- // somebody else handles this
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_meter_hold() != fval) {
+ Config->set_meter_hold (fval);
+ }
+ }
+}
+
+void
+ARDOUR_UI::set_meter_falloff (MeterFalloff val)
+{
+ const char* action = 0;
+ float fval;
+
+ fval = meter_falloff_to_float (val);
+
+ switch (val) {
+ case MeterFalloffOff:
+ action = X_("MeterFalloffOff");
+ break;
+ case MeterFalloffSlowest:
+ action = X_("MeterFalloffSlowest");
+ break;
+ case MeterFalloffSlow:
+ action = X_("MeterFalloffSlow");
+ break;
+ case MeterFalloffMedium:
+ action = X_("MeterFalloffMedium");
break;
+ case MeterFalloffFast:
+ action = X_("MeterFalloffFast");
+ break;
+ case MeterFalloffFaster:
+ action = X_("MeterFalloffFaster");
+ break;
+ case MeterFalloffFastest:
+ action = X_("MeterFalloffFastest");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_meter_falloff () != fval) {
+ Config->set_meter_falloff (fval);
+ }
+ }
+}
+
+void
+ARDOUR_UI::parameter_changed (const char* parameter_name)
+{
+#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
+
+ if (PARAM_IS ("slave-source")) {
+
+ sync_option_combo.set_active_text (slave_source_to_string (Config->get_slave_source()));
+
+ } else if (PARAM_IS ("send-mtc")) {
+
+ ActionManager::map_some_state ("options", "SendMTC", &Configuration::get_send_mtc);
+
+ } else if (PARAM_IS ("send-mmc")) {
+
+ ActionManager::map_some_state ("options", "SendMMC", &Configuration::get_send_mmc);
+
+ } else if (PARAM_IS ("mmc-control")) {
+ ActionManager::map_some_state ("options", "UseMMC", &Configuration::get_mmc_control);
+ } else if (PARAM_IS ("midi-feedback")) {
+ ActionManager::map_some_state ("options", "SendMIDIfeedback", &Configuration::get_midi_feedback);
+ } else if (PARAM_IS ("midi-control")) {
+ ActionManager::map_some_state ("options", "UseMIDIcontrol", &Configuration::get_midi_control);
+ } else if (PARAM_IS ("do-not-record-plugins")) {
+ ActionManager::map_some_state ("options", "DoNotRunPluginsWhileRecording", &Configuration::get_do_not_record_plugins);
+ } else if (PARAM_IS ("latched-record-enable")) {
+ ActionManager::map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable);
+ } else if (PARAM_IS ("solo-latched")) {
+ ActionManager::map_some_state ("options", "LatchedSolo", &Configuration::get_solo_latched);
+ } else if (PARAM_IS ("solo-model")) {
+ 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")) {
+ ActionManager::map_some_state ("Transport", "ToggleAutoInput", &Configuration::get_auto_input);
+ } else if (PARAM_IS ("punch-out")) {
+ ActionManager::map_some_state ("Transport", "TogglePunchOut", &Configuration::get_punch_out);
+ } else if (PARAM_IS ("punch-in")) {
+ ActionManager::map_some_state ("Transport", "TogglePunchIn", &Configuration::get_punch_in);
+ } else if (PARAM_IS ("clicking")) {
+ ActionManager::map_some_state ("Transport", "ToggleClick", &Configuration::get_clicking);
+ } else if (PARAM_IS ("jack-time-master")) {
+ ActionManager::map_some_state ("Transport", "ToggleTimeMaster", &Configuration::get_jack_time_master);
+ } else if (PARAM_IS ("plugins-stop-with-transport")) {
+ ActionManager::map_some_state ("options", "StopPluginsWithTransport", &Configuration::get_plugins_stop_with_transport);
+ } else if (PARAM_IS ("latched-record-enable")) {
+ ActionManager::map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable);
+ } else if (PARAM_IS ("verify-remove-last-capture")) {
+ ActionManager::map_some_state ("options", "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture);
+ } else if (PARAM_IS ("stop-recording-on-xrun")) {
+ ActionManager::map_some_state ("options", "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun);
+ } else if (PARAM_IS ("stop-at-session-end")) {
+ ActionManager::map_some_state ("options", "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end);
+ } else if (PARAM_IS ("monitoring-model")) {
+ map_monitor_model ();
+ } else if (PARAM_IS ("use-video-sync")) {
+ ActionManager::map_some_state ("Transport", "ToggleVideoSync", &Configuration::get_use_video_sync);
+ } else if (PARAM_IS ("quieten-at-speed")) {
+ ActionManager::map_some_state ("options", "GainReduceFastTransport", &Configuration::get_quieten_at_speed);
+ } else if (PARAM_IS ("shuttle-behaviour")) {
+
+ switch (Config->get_shuttle_behaviour ()) {
+ case Sprung:
+ shuttle_style_button.set_active_text (_("sprung"));
+ shuttle_fract = 0.0;
+ shuttle_box.queue_draw ();
+ if (session) {
+ if (session->transport_rolling()) {
+ shuttle_fract = SHUTTLE_FRACT_SPEED1;
+ session->request_transport_speed (1.0);
+ }
+ }
+ break;
+ case Wheel:
+ shuttle_style_button.set_active_text (_("wheel"));
+ break;
+ }
+
+ } else if (PARAM_IS ("shuttle-units")) {
+
+ switch (Config->get_shuttle_units()) {
+ case Percentage:
+ shuttle_units_button.set_label("% ");
+ break;
+ case Semitones:
+ shuttle_units_button.set_label(_("ST"));
+ break;
+ }
+ } else if (PARAM_IS ("input-auto-connect")) {
+ map_input_auto_connect ();
+ } else if (PARAM_IS ("output-auto-connect")) {
+ map_output_auto_connect ();
+ } else if (PARAM_IS ("native-file-header-format")) {
+ map_file_header_format ();
+ } else if (PARAM_IS ("native-file-data-format")) {
+ map_file_data_format ();
+ } else if (PARAM_IS ("meter-hold")) {
+ map_meter_hold ();
+ } else if (PARAM_IS ("meter-falloff")) {
+ map_meter_falloff ();
+ } else if (PARAM_IS ("verify-remove-last-capture")) {
+ ActionManager::map_some_state ("options", "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture);
}
+
+#undef PARAM_IS
}
diff --git a/gtk2_ardour/arval b/gtk2_ardour/arval
index cea6299d05..a1dc501d3f 100755
--- a/gtk2_ardour/arval
+++ b/gtk2_ardour/arval
@@ -1,3 +1,4 @@
#!/bin/sh
-source ardev_common.sh
+. ardev_common.sh
+export ARDOUR_RUNNING_UNDER_VALGRIND=TRUE
exec valgrind --num-callers=50 --tool=memcheck gtk2_ardour/ardour.bin --novst $*
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc
index 8c6f3a7d82..575f45ca38 100644
--- a/gtk2_ardour/audio_clock.cc
+++ b/gtk2_ardour/audio_clock.cc
@@ -326,38 +326,11 @@ AudioClock::on_realize ()
/* styles are not available until the widgets are bound to a window */
- switch (_mode) {
- case SMPTE:
- Gtkmm2ext::set_size_request_to_display_given_text (hours_label, "-88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (minutes_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (seconds_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (frames_label, "88", 0, 2);
- break;
-
- case BBT:
- Gtkmm2ext::set_size_request_to_display_given_text (bars_label, "-888", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (beats_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ticks_label, "8888", 0, 2);
- break;
-
- case MinSec:
- Gtkmm2ext::set_size_request_to_display_given_text (ms_hours_label, "99", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ms_minutes_label, "99", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ms_seconds_label, "99", 0, 2);
- break;
-
- case Frames:
- Gtkmm2ext::set_size_request_to_display_given_text (audio_frames_label, "4294967296", 0, 2);
- break;
-
- case Off:
- break;
-
- }
+ set_size_requests ();
}
void
-AudioClock::set (jack_nframes_t when, bool force)
+AudioClock::set (nframes_t when, bool force)
{
if ((!force && !is_visible()) || session == 0) {
@@ -395,7 +368,7 @@ AudioClock::set (jack_nframes_t when, bool force)
void
AudioClock::smpte_offset_changed ()
{
- jack_nframes_t current;
+ nframes_t current;
switch (_mode) {
case SMPTE:
@@ -412,7 +385,7 @@ AudioClock::smpte_offset_changed ()
}
void
-AudioClock::set_frames (jack_nframes_t when, bool force)
+AudioClock::set_frames (nframes_t when, bool force)
{
char buf[32];
snprintf (buf, sizeof (buf), "%u", when);
@@ -420,29 +393,29 @@ AudioClock::set_frames (jack_nframes_t when, bool force)
}
void
-AudioClock::set_minsec (jack_nframes_t when, bool force)
+AudioClock::set_minsec (nframes_t when, bool force)
{
char buf[32];
- jack_nframes_t left;
+ nframes_t left;
int hrs;
int mins;
float secs;
left = when;
hrs = (int) floor (left / (session->frame_rate() * 60.0f * 60.0f));
- left -= (jack_nframes_t) floor (hrs * session->frame_rate() * 60.0f * 60.0f);
+ left -= (nframes_t) floor (hrs * session->frame_rate() * 60.0f * 60.0f);
mins = (int) floor (left / (session->frame_rate() * 60.0f));
- left -= (jack_nframes_t) floor (mins * session->frame_rate() * 60.0f);
+ left -= (nframes_t) floor (mins * session->frame_rate() * 60.0f);
secs = left / (float) session->frame_rate();
if (force || hrs != ms_last_hrs) {
- sprintf (buf, "%d", hrs);
+ sprintf (buf, "%02d", hrs);
ms_hours_label.set_text (buf);
ms_last_hrs = hrs;
}
if (force || mins != ms_last_mins) {
- sprintf (buf, "%d", mins);
+ sprintf (buf, "%02d", mins);
ms_minutes_label.set_text (buf);
ms_last_mins = mins;
}
@@ -455,7 +428,7 @@ AudioClock::set_minsec (jack_nframes_t when, bool force)
}
void
-AudioClock::set_smpte (jack_nframes_t when, bool force)
+AudioClock::set_smpte (nframes_t when, bool force)
{
char buf[32];
SMPTE::Time smpte;
@@ -497,7 +470,7 @@ AudioClock::set_smpte (jack_nframes_t when, bool force)
}
void
-AudioClock::set_bbt (jack_nframes_t when, bool force)
+AudioClock::set_bbt (nframes_t when, bool force)
{
char buf[16];
BBT_Time bbt;
@@ -952,7 +925,7 @@ AudioClock::field_button_press_event (GdkEventButton *ev, Field field)
{
if (session == 0) return FALSE;
- jack_nframes_t frames = 0;
+ nframes_t frames = 0;
switch (ev->button) {
case 1:
@@ -1029,7 +1002,7 @@ AudioClock::field_button_scroll_event (GdkEventScroll *ev, Field field)
{
if (session == 0) return FALSE;
- jack_nframes_t frames = 0;
+ nframes_t frames = 0;
switch (ev->direction) {
@@ -1098,8 +1071,8 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
if (trunc(drag_accum) != 0) {
- jack_nframes_t frames;
- jack_nframes_t pos ;
+ nframes_t frames;
+ nframes_t pos ;
int dir;
dir = (drag_accum < 0 ? 1:-1);
pos = current_time();
@@ -1107,7 +1080,7 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
if (frames != 0 && frames * drag_accum < current_time()) {
- set ((jack_nframes_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
+ set ((nframes_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
} else {
set (0 , false);
@@ -1123,24 +1096,24 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
return TRUE;
}
-jack_nframes_t
-AudioClock::get_frames (Field field,jack_nframes_t pos,int dir)
+nframes_t
+AudioClock::get_frames (Field field,nframes_t pos,int dir)
{
- jack_nframes_t frames = 0;
+ nframes_t frames = 0;
BBT_Time bbt;
switch (field) {
case SMPTE_Hours:
- frames = (jack_nframes_t) floor (3600.0 * session->frame_rate());
+ frames = (nframes_t) floor (3600.0 * session->frame_rate());
break;
case SMPTE_Minutes:
- frames = (jack_nframes_t) floor (60.0 * session->frame_rate());
+ frames = (nframes_t) floor (60.0 * session->frame_rate());
break;
case SMPTE_Seconds:
frames = session->frame_rate();
break;
case SMPTE_Frames:
- frames = (jack_nframes_t) floor (session->frame_rate() / session->smpte_frames_per_second);
+ frames = (nframes_t) floor (session->frame_rate() / Config->get_smpte_frames_per_second());
break;
case AudioFrames:
@@ -1148,10 +1121,10 @@ AudioClock::get_frames (Field field,jack_nframes_t pos,int dir)
break;
case MS_Hours:
- frames = (jack_nframes_t) floor (3600.0 * session->frame_rate());
+ frames = (nframes_t) floor (3600.0 * session->frame_rate());
break;
case MS_Minutes:
- frames = (jack_nframes_t) floor (60.0 * session->frame_rate());
+ frames = (nframes_t) floor (60.0 * session->frame_rate());
break;
case MS_Seconds:
frames = session->frame_rate();
@@ -1180,10 +1153,10 @@ AudioClock::get_frames (Field field,jack_nframes_t pos,int dir)
return frames;
}
-jack_nframes_t
-AudioClock::current_time (jack_nframes_t pos) const
+nframes_t
+AudioClock::current_time (nframes_t pos) const
{
- jack_nframes_t ret = 0;
+ nframes_t ret = 0;
switch (_mode) {
case SMPTE:
@@ -1208,10 +1181,10 @@ AudioClock::current_time (jack_nframes_t pos) const
return ret;
}
-jack_nframes_t
-AudioClock::current_duration (jack_nframes_t pos) const
+nframes_t
+AudioClock::current_duration (nframes_t pos) const
{
- jack_nframes_t ret = 0;
+ nframes_t ret = 0;
switch (_mode) {
case SMPTE:
@@ -1248,7 +1221,7 @@ AudioClock::smpte_sanitize_display()
seconds_label.set_text("59");
}
- switch ((long)rint(session->smpte_frames_per_second)) {
+ switch ((long)rint(Config->get_smpte_frames_per_second())) {
case 24:
if (atoi(frames_label.get_text()) > 23) {
frames_label.set_text("23");
@@ -1268,14 +1241,14 @@ AudioClock::smpte_sanitize_display()
break;
}
- if (session->smpte_drop_frames) {
+ if (Config->get_smpte_drop_frames()) {
if ((atoi(minutes_label.get_text()) % 10) && (atoi(seconds_label.get_text()) == 0) && (atoi(frames_label.get_text()) < 2)) {
frames_label.set_text("02");
}
}
}
-jack_nframes_t
+nframes_t
AudioClock::smpte_frame_from_display () const
{
if (session == 0) {
@@ -1283,7 +1256,7 @@ AudioClock::smpte_frame_from_display () const
}
SMPTE::Time smpte;
- jack_nframes_t sample;
+ nframes_t sample;
smpte.hours = atoi (hours_label.get_text());
smpte.minutes = atoi (minutes_label.get_text());
@@ -1304,10 +1277,10 @@ AudioClock::smpte_frame_from_display () const
// Testcode for smpte<->sample conversions (P.S.)
SMPTE::Time smpte1;
- jack_nframes_t sample1;
- jack_nframes_t oldsample = 0;
+ nframes_t sample1;
+ nframes_t oldsample = 0;
SMPTE::Time smpte2;
- jack_nframes_t sample_increment;
+ nframes_t sample_increment;
sample_increment = (long)rint(session->frame_rate() / session->smpte_frames_per_second);
@@ -1666,7 +1639,7 @@ AudioClock::smpte_frame_from_display () const
return sample;
}
-jack_nframes_t
+nframes_t
AudioClock::minsec_frame_from_display () const
{
if (session == 0) {
@@ -1677,13 +1650,13 @@ AudioClock::minsec_frame_from_display () const
int mins = atoi (ms_minutes_label.get_text());
float secs = atof (ms_seconds_label.get_text());
- jack_nframes_t sr = session->frame_rate();
+ nframes_t sr = session->frame_rate();
- return (jack_nframes_t) floor ((hrs * 60.0f * 60.0f * sr) + (mins * 60.0f * sr) + (secs * sr));
+ return (nframes_t) floor ((hrs * 60.0f * 60.0f * sr) + (mins * 60.0f * sr) + (secs * sr));
}
-jack_nframes_t
-AudioClock::bbt_frame_from_display (jack_nframes_t pos) const
+nframes_t
+AudioClock::bbt_frame_from_display (nframes_t pos) const
{
if (session == 0) {
error << "AudioClock::current_time() called with BBT mode but without session!" << endmsg;
@@ -1697,14 +1670,14 @@ AudioClock::bbt_frame_from_display (jack_nframes_t pos) const
any.bbt.beats = atoi (beats_label.get_text());
any.bbt.ticks = atoi (ticks_label.get_text());
- jack_nframes_t ret = session->convert_to_frames_at (pos, any);
+ nframes_t ret = session->convert_to_frames_at (pos, any);
return ret;
}
-jack_nframes_t
-AudioClock::bbt_frame_duration_from_display (jack_nframes_t pos) const
+nframes_t
+AudioClock::bbt_frame_duration_from_display (nframes_t pos) const
{
if (session == 0) {
error << "AudioClock::current_time() called with BBT mode but without session!" << endmsg;
@@ -1721,10 +1694,10 @@ AudioClock::bbt_frame_duration_from_display (jack_nframes_t pos) const
return session->tempo_map().bbt_duration_at(pos,bbt,1);
}
-jack_nframes_t
+nframes_t
AudioClock::audio_frame_from_display () const
{
- return (jack_nframes_t) atoi (audio_frames_label.get_text());
+ return (nframes_t) atoi (audio_frames_label.get_text());
}
void
@@ -1775,40 +1748,66 @@ AudioClock::set_mode (Mode m)
}
_mode = m;
-
+
switch (_mode) {
case SMPTE:
clock_base.add (smpte_packer_hbox);
- Gtkmm2ext::set_size_request_to_display_given_text (hours_label, "-88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (minutes_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (seconds_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (frames_label, "88", 0, 2);
break;
case BBT:
clock_base.add (bbt_packer_hbox);
- Gtkmm2ext::set_size_request_to_display_given_text (bars_label, "-888", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (beats_label, "88", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ticks_label, "8888", 0, 2);
break;
case MinSec:
clock_base.add (minsec_packer_hbox);
- Gtkmm2ext::set_size_request_to_display_given_text (ms_hours_label, "99", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ms_minutes_label, "99", 0, 2);
- Gtkmm2ext::set_size_request_to_display_given_text (ms_seconds_label, "99", 0, 2);
break;
case Frames:
clock_base.add (frames_packer_hbox);
- Gtkmm2ext::set_size_request_to_display_given_text (audio_frames_label, "4294967296", 0, 2);
+ break;
case Off:
break;
}
+ set_size_requests ();
+
set (last_when, true);
clock_base.show_all ();
key_entry_state = 0;
}
+void
+AudioClock::set_size_requests ()
+{
+ /* note that in some fonts, "88" is narrower than "00", hence the 2 pixel padding */
+
+ switch (_mode) {
+ case SMPTE:
+ Gtkmm2ext::set_size_request_to_display_given_text (hours_label, "-88", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (minutes_label, "88", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (seconds_label, "88", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (frames_label, "88", 2, 2);
+ break;
+
+ case BBT:
+ Gtkmm2ext::set_size_request_to_display_given_text (bars_label, "-888", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (beats_label, "88", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (ticks_label, "8888", 2, 2);
+ break;
+
+ case MinSec:
+ Gtkmm2ext::set_size_request_to_display_given_text (ms_hours_label, "99", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (ms_minutes_label, "99", 2, 2);
+ Gtkmm2ext::set_size_request_to_display_given_text (ms_seconds_label, "99.999", 2, 2);
+ break;
+
+ case Frames:
+ Gtkmm2ext::set_size_request_to_display_given_text (audio_frames_label, "4294967296", 2, 2);
+ break;
+
+ case Off:
+ break;
+
+ }
+}
diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h
index 4bcf13e1de..e0431ba16e 100644
--- a/gtk2_ardour/audio_clock.h
+++ b/gtk2_ardour/audio_clock.h
@@ -47,11 +47,11 @@ class AudioClock : public Gtk::HBox
Mode mode() const { return _mode; }
- void set (jack_nframes_t, bool force = false);
+ void set (nframes_t, bool force = false);
void set_mode (Mode);
- jack_nframes_t current_time (jack_nframes_t position = 0) const;
- jack_nframes_t current_duration (jack_nframes_t position = 0) const;
+ nframes_t current_time (nframes_t position = 0) const;
+ nframes_t current_duration (nframes_t position = 0) const;
void set_session (ARDOUR::Session *s);
sigc::signal<void> ValueChanged;
@@ -131,7 +131,7 @@ class AudioClock : public Gtk::HBox
Gtk::EventBox clock_base;
Gtk::Frame clock_frame;
- jack_nframes_t last_when;
+ nframes_t last_when;
uint32_t last_hrs;
uint32_t last_mins;
@@ -158,24 +158,25 @@ class AudioClock : public Gtk::HBox
bool field_focus_in_event (GdkEventFocus *, Field);
bool field_focus_out_event (GdkEventFocus *, Field);
- void set_smpte (jack_nframes_t, bool);
- void set_bbt (jack_nframes_t, bool);
- void set_minsec (jack_nframes_t, bool);
- void set_frames (jack_nframes_t, bool);
+ void set_smpte (nframes_t, bool);
+ void set_bbt (nframes_t, bool);
+ void set_minsec (nframes_t, bool);
+ void set_frames (nframes_t, bool);
- jack_nframes_t get_frames (Field,jack_nframes_t pos = 0,int dir=1);
+ nframes_t get_frames (Field,nframes_t pos = 0,int dir=1);
void smpte_sanitize_display();
- jack_nframes_t smpte_frame_from_display () const;
- jack_nframes_t bbt_frame_from_display (jack_nframes_t) const;
- jack_nframes_t bbt_frame_duration_from_display (jack_nframes_t) const;
- jack_nframes_t minsec_frame_from_display () const;
- jack_nframes_t audio_frame_from_display () const;
+ nframes_t smpte_frame_from_display () const;
+ nframes_t bbt_frame_from_display (nframes_t) const;
+ nframes_t bbt_frame_duration_from_display (nframes_t) const;
+ nframes_t minsec_frame_from_display () const;
+ nframes_t audio_frame_from_display () const;
void build_ops_menu ();
void setup_events ();
void smpte_offset_changed ();
+ void set_size_requests ();
static const uint32_t field_length[(int)AudioFrames+1];
};
diff --git a/gtk2_ardour/audio_region_editor.cc b/gtk2_ardour/audio_region_editor.cc
index 3149a863ad..b6bb4589a9 100644
--- a/gtk2_ardour/audio_region_editor.cc
+++ b/gtk2_ardour/audio_region_editor.cc
@@ -467,7 +467,7 @@ AudioRegionEditor::end_clock_changed ()
void
AudioRegionEditor::length_clock_changed ()
{
- jack_nframes_t frames = length_clock.current_time();
+ nframes_t frames = length_clock.current_time();
_region->trim_end (_region->position() + frames, this);
length_clock.set (_region->length());
@@ -632,12 +632,12 @@ void
AudioRegionEditor::fade_in_changed ()
{
float msecs = fade_in_length_adjustment.get_value();
- jack_nframes_t sr = _session.frame_rate();
- jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
- jack_nframes_t frames;
+ 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 = (jack_nframes_t) _region->fade_in().back()->when)) {
+ if (adj_frames != (frames = (nframes_t) _region->fade_in().back()->when)) {
fade_in_length_adjustment.set_value ((frames * 1000.0f) / sr);
}
@@ -650,11 +650,11 @@ void
AudioRegionEditor::fade_out_changed ()
{
float msecs = fade_out_length_adjustment.get_value();
- jack_nframes_t sr = _session.frame_rate();
- jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
- jack_nframes_t frames;
+ 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 = (jack_nframes_t) _region->fade_out().back()->when)) {
+ if (adj_frames != (frames = (nframes_t) _region->fade_out().back()->when)) {
fade_out_length_adjustment.set_value ((frames * 1000.0f) / sr);
}
@@ -666,8 +666,8 @@ AudioRegionEditor::fade_out_changed ()
void
AudioRegionEditor::fade_in_length_adjustment_changed ()
{
- jack_nframes_t fade_length = (jack_nframes_t) floor (fade_in_length_adjustment.get_value() * _session.frame_rate() * 0.001);
- fade_length = max (fade_length, (jack_nframes_t) 64);
+ 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);
@@ -678,8 +678,8 @@ AudioRegionEditor::fade_in_length_adjustment_changed ()
void
AudioRegionEditor::fade_out_length_adjustment_changed ()
{
- jack_nframes_t fade_length = (jack_nframes_t) floor (fade_out_length_adjustment.get_value() * _session.frame_rate() * 0.001);
- fade_length = max (fade_length, (jack_nframes_t) 64);
+ 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);
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 41b95b0d42..73ac0c341d 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -159,8 +159,6 @@ AudioRegionView::init (Gdk::Color& basic_color, bool wfd)
gain_line->show ();
}
- reset_width_dependent_items ((double) _region->length() / samples_per_unit);
-
gain_line->reset ();
set_height (trackview.height);
@@ -471,11 +469,11 @@ AudioRegionView::reset_fade_shapes ()
void
AudioRegionView::reset_fade_in_shape ()
{
- reset_fade_in_shape_width ((jack_nframes_t) audio_region()->fade_in().back()->when);
+ reset_fade_in_shape_width ((nframes_t) audio_region()->fade_in().back()->when);
}
void
-AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
+AudioRegionView::reset_fade_in_shape_width (nframes_t width)
{
if (fade_in_handle == 0) {
return;
@@ -483,7 +481,7 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
/* smallest size for a fade is 64 frames */
- width = std::max ((jack_nframes_t) 64, width);
+ width = std::max ((nframes_t) 64, width);
Points* points;
double pwidth = width / samples_per_unit;
@@ -555,11 +553,11 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
void
AudioRegionView::reset_fade_out_shape ()
{
- reset_fade_out_shape_width ((jack_nframes_t) audio_region()->fade_out().back()->when);
+ reset_fade_out_shape_width ((nframes_t) audio_region()->fade_out().back()->when);
}
void
-AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
+AudioRegionView::reset_fade_out_shape_width (nframes_t width)
{
if (fade_out_handle == 0) {
return;
@@ -567,7 +565,7 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
/* smallest size for a fade is 64 frames */
- width = std::max ((jack_nframes_t) 64, width);
+ width = std::max ((nframes_t) 64, width);
Points* points;
double pwidth = width / samples_per_unit;
@@ -794,6 +792,9 @@ AudioRegionView::create_waves ()
}
if (create_zero_line) {
+ if (zero_line) {
+ delete zero_line;
+ }
zero_line = new ArdourCanvas::SimpleLine (*group);
zero_line->property_x1() = (gdouble) 1.0;
zero_line->property_x2() = (gdouble) (_region->length() / samples_per_unit) - 1.0;
@@ -906,7 +907,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
item->w2i (x, y);
- jack_nframes_t fx = trackview.editor.pixel_to_frame (x);
+ nframes_t fx = trackview.editor.pixel_to_frame (x);
if (fx > _region->length()) {
return;
diff --git a/gtk2_ardour/audio_region_view.h b/gtk2_ardour/audio_region_view.h
index 21fd519606..7d26f254d2 100644
--- a/gtk2_ardour/audio_region_view.h
+++ b/gtk2_ardour/audio_region_view.h
@@ -89,8 +89,8 @@ class AudioRegionView : public RegionView
GhostRegion* add_ghost (AutomationTimeAxisView&);
- void reset_fade_in_shape_width (jack_nframes_t);
- void reset_fade_out_shape_width (jack_nframes_t);
+ void reset_fade_in_shape_width (nframes_t);
+ void reset_fade_out_shape_width (nframes_t);
void set_fade_in_active (bool);
void set_fade_out_active (bool);
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc
index 85ba517f8e..f88b04ae1d 100644
--- a/gtk2_ardour/audio_streamview.cc
+++ b/gtk2_ardour/audio_streamview.cc
@@ -127,6 +127,8 @@ AudioStreamView::set_amplitude_above_axis (gdouble app)
void
AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wait_for_waves)
{
+ AudioRegionView *region_view;
+
ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::add_region_view), r));
boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion> (r);
@@ -135,19 +137,16 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wai
return;
}
- AudioRegionView *region_view;
- list<RegionView *>::iterator i;
-
- for (i = region_views.begin(); i != region_views.end(); ++i) {
+ for (list<RegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
if ((*i)->region() == r) {
/* great. we already have a AudioRegionView for this Region. use it again. */
-
+
(*i)->set_valid (true);
return;
}
}
-
+
switch (_trackview.audio_track()->mode()) {
case Normal:
region_view = new AudioRegionView (canvas_group, _trackview, region,
@@ -168,30 +167,38 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wai
region_view->set_waveform_visible(_trackview.editor.show_waveforms());
/* catch regionview going away */
+ region->GoingAway.connect (bind (mem_fun (*this, &AudioStreamView::remove_region_view), boost::weak_ptr<Region> (r)));
- region->GoingAway.connect (bind (mem_fun (*this, &AudioStreamView::remove_region_view), region));
-
RegionViewAdded (region_view);
}
void
-AudioStreamView::remove_region_view (boost::shared_ptr<Region> r)
+AudioStreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::remove_region_view), r));
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::remove_region_view), weak_r));
- for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
- list<CrossfadeView*>::iterator tmp;
-
- tmp = i;
- ++tmp;
-
- boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(r);
- if (ar && (*i)->crossfade.involves (ar)) {
- delete *i;
- crossfade_views.erase (i);
+ boost::shared_ptr<Region> r (weak_r.lock());
+
+ if (!r) {
+ return;
+ }
+
+ if (!_trackview.session().deletion_in_progress()) {
+
+ for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
+ list<CrossfadeView*>::iterator tmp;
+
+ tmp = i;
+ ++tmp;
+
+ boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(r);
+ if (ar && (*i)->crossfade.involves (ar)) {
+ delete *i;
+ crossfade_views.erase (i);
+ }
+
+ i = tmp;
}
-
- i = tmp;
}
StreamView::remove_region_view(r);
@@ -405,13 +412,15 @@ AudioStreamView::setup_rec_box ()
boost::shared_ptr<AudioFileSource> src = boost::static_pointer_cast<AudioFileSource> (ads->write_source (n));
if (src) {
sources.push_back (src);
- rec_data_ready_connections.push_back (src->PeakRangeReady.connect (bind (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), src)));
+
+ rec_data_ready_connections.push_back (src->PeakRangeReady.connect (bind
+ (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), boost::weak_ptr<Source>(src))));
}
}
// handle multi
- jack_nframes_t start = 0;
+ nframes_t start = 0;
if (rec_regions.size() > 0) {
start = rec_regions.back()->start() + _trackview.get_diskstream()->get_captured_frames(rec_regions.size()-1);
}
@@ -420,11 +429,8 @@ AudioStreamView::setup_rec_box ()
(RegionFactory::create (sources, start, 1 , "", 0, (Region::Flag)(Region::DefaultFlags | Region::DoNotSaveState), false)));
assert(region);
region->set_position (_trackview.session().transport_frame(), this);
- rec_regions.push_back (region);
-
- // rec regions are destroyed in setup_rec_box
- /* we add the region later */
+ rec_regions.push_back (region);
}
/* start a new rec box */
@@ -433,7 +439,7 @@ AudioStreamView::setup_rec_box ()
at = _trackview.audio_track(); /* we know what it is already */
boost::shared_ptr<AudioDiskstream> ds = at->audio_diskstream();
- jack_nframes_t frame_pos = ds->current_capture_start ();
+ nframes_t frame_pos = ds->current_capture_start ();
gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
gdouble xend;
uint32_t fill_color;
@@ -503,12 +509,15 @@ AudioStreamView::setup_rec_box ()
last_rec_data_frame = 0;
/* remove temp regions */
-
- for (list<boost::shared_ptr<Region> >::iterator iter = rec_regions.begin(); iter != rec_regions.end();) {
+
+ for (list<boost::shared_ptr<Region> >::iterator iter = rec_regions.begin(); iter != rec_regions.end(); ) {
list<boost::shared_ptr<Region> >::iterator tmp;
+
tmp = iter;
++tmp;
+
(*iter)->drop_references ();
+
iter = tmp;
}
@@ -537,18 +546,24 @@ AudioStreamView::foreach_crossfadeview (void (CrossfadeView::*pmf)(void))
}
void
-AudioStreamView::rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, boost::shared_ptr<Source> src)
+AudioStreamView::rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<Source> weak_src)
{
- // this is called from the peak building thread
+ ENSURE_GUI_THREAD(bind (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), start, cnt, weak_src));
+
+ boost::shared_ptr<Source> src (weak_src.lock());
+
+ if (!src) {
+ return;
+ }
- ENSURE_GUI_THREAD(bind (mem_fun (*this, &AudioStreamView::rec_peak_range_ready), start, cnt, src));
+ // this is called from the peak building thread
if (rec_data_ready_map.size() == 0 || start+cnt > last_rec_data_frame) {
last_rec_data_frame = start + cnt;
}
-
+
rec_data_ready_map[src] = true;
-
+
if (rec_data_ready_map.size() == _trackview.get_diskstream()->n_channels().get(DataType::AUDIO)) {
this->update_rec_regions ();
rec_data_ready_map.clear();
@@ -580,13 +595,13 @@ AudioStreamView::update_rec_regions ()
continue;
}
- jack_nframes_t origlen = region->length();
+ nframes_t origlen = region->length();
if (region == rec_regions.back() && rec_active) {
if (last_rec_data_frame > region->start()) {
- jack_nframes_t nlen = last_rec_data_frame - region->start();
+ nframes_t nlen = last_rec_data_frame - region->start();
if (nlen != region->length()) {
@@ -609,7 +624,7 @@ AudioStreamView::update_rec_regions ()
} else {
- jack_nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
+ nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
if (nlen != region->length()) {
diff --git a/gtk2_ardour/audio_streamview.h b/gtk2_ardour/audio_streamview.h
index 242b97f840..79aef2c042 100644
--- a/gtk2_ardour/audio_streamview.h
+++ b/gtk2_ardour/audio_streamview.h
@@ -23,6 +23,8 @@
#include <map>
#include <cmath>
+#include <boost/weak_ptr.hpp>
+
#include <ardour/location.h>
#include "enums.h"
#include "simplerect.h"
@@ -76,13 +78,12 @@ class AudioStreamView : public StreamView
private:
void setup_rec_box ();
- void rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, boost::shared_ptr<ARDOUR::Source> src);
+ void rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<ARDOUR::Source> src);
void update_rec_regions ();
void add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_waves);
- void remove_region_view (boost::shared_ptr<ARDOUR::Region> );
+ void remove_region_view (boost::weak_ptr<ARDOUR::Region> );
void remove_audio_region_view (boost::shared_ptr<ARDOUR::AudioRegion> );
- void remove_audio_rec_region (boost::shared_ptr<ARDOUR::AudioRegion>);
void undisplay_diskstream ();
void redisplay_diskstream ();
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index c0ba957af8..ee74fabfa4 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -504,14 +504,14 @@ AutomationLine::model_representation (ControlPoint& cp, ModelRepresentation& mr)
line to convert them to something relevant.
*/
- mr.xval = (jack_nframes_t) floor (cp.get_x());
+ mr.xval = (nframes_t) floor (cp.get_x());
mr.yval = 1.0 - (cp.get_y() / _height);
/* if xval has not changed, set it directly from the model to avoid rounding errors */
if (mr.xval == trackview.editor.frame_to_unit((*cp.model)->when)) {
- mr.xval = (jack_nframes_t) (*cp.model)->when;
+ mr.xval = (nframes_t) (*cp.model)->when;
} else {
mr.xval = trackview.editor.unit_to_frame (mr.xval);
}
@@ -526,7 +526,7 @@ AutomationLine::model_representation (ControlPoint& cp, ModelRepresentation& mr)
/* part 2: find out where the model point is now
*/
- mr.xpos = (jack_nframes_t) (*cp.model)->when;
+ mr.xpos = (nframes_t) (*cp.model)->when;
mr.ypos = (*cp.model)->value;
/* part 3: get the position of the visual control
@@ -545,7 +545,7 @@ AutomationLine::model_representation (ControlPoint& cp, ModelRepresentation& mr)
after = nth (cp.view_index + 1);
if (before) {
- mr.xmin = (jack_nframes_t) (*before->model)->when;
+ mr.xmin = (nframes_t) (*before->model)->when;
mr.ymin = (*before->model)->value;
mr.start = before->model;
++mr.start;
@@ -899,7 +899,7 @@ AutomationLine::start_drag (ControlPoint* cp, float fraction)
}
void
-AutomationLine::point_drag (ControlPoint& cp, jack_nframes_t x, float fraction, bool with_push)
+AutomationLine::point_drag (ControlPoint& cp, nframes_t x, float fraction, bool with_push)
{
modify_view (cp, x, fraction, with_push);
drags++;
@@ -1027,14 +1027,14 @@ AutomationLine::remove_point (ControlPoint& cp)
}
void
-AutomationLine::get_selectables (jack_nframes_t& start, jack_nframes_t& end,
+AutomationLine::get_selectables (nframes_t& start, nframes_t& end,
double botfrac, double topfrac, list<Selectable*>& results)
{
double top;
double bot;
- jack_nframes_t nstart;
- jack_nframes_t nend;
+ nframes_t nstart;
+ nframes_t nend;
bool collecting = false;
/* Curse X11 and its inverted coordinate system! */
@@ -1047,7 +1047,7 @@ AutomationLine::get_selectables (jack_nframes_t& start, jack_nframes_t& end,
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
- jack_nframes_t when = (jack_nframes_t) (*(*i)->model)->when;
+ nframes_t when = (nframes_t) (*(*i)->model)->when;
if (when >= start && when <= end) {
@@ -1239,7 +1239,7 @@ AutomationLine::clear ()
void
AutomationLine::change_model (AutomationList::iterator i, double x, double y)
{
- alist.modify (i, (jack_nframes_t) x, y);
+ alist.modify (i, (nframes_t) x, y);
}
void
diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h
index 8311025b02..eb2d204513 100644
--- a/gtk2_ardour/automation_line.h
+++ b/gtk2_ardour/automation_line.h
@@ -96,7 +96,7 @@ class ControlPoint
ShapeType _shape;
};
-class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
+class AutomationLine : public PBD::StatefulDestructible
{
public:
AutomationLine (const string & name, TimeAxisView&, ArdourCanvas::Group&, ARDOUR::AutomationList&);
@@ -107,7 +107,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
void clear();
void set_selected_points (PointSelection&);
- void get_selectables (jack_nframes_t& start, jack_nframes_t& end,
+ void get_selectables (nframes_t& start, nframes_t& end,
double botfrac, double topfrac,
list<Selectable*>& results);
void get_inverted_selectables (Selection&, list<Selectable*>& results);
@@ -118,7 +118,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
/* dragging API */
virtual void start_drag (ControlPoint*, float fraction);
- virtual void point_drag(ControlPoint&, jack_nframes_t x, float, bool with_push);
+ virtual void point_drag(ControlPoint&, nframes_t x, float, bool with_push);
virtual void end_drag (ControlPoint*);
virtual void line_drag(uint32_t i1, uint32_t i2, float, bool with_push);
@@ -224,13 +224,13 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
struct ModelRepresentation {
ARDOUR::AutomationList::iterator start;
ARDOUR::AutomationList::iterator end;
- jack_nframes_t xpos;
+ nframes_t xpos;
double ypos;
- jack_nframes_t xmin;
+ nframes_t xmin;
double ymin;
- jack_nframes_t xmax;
+ nframes_t xmax;
double ymax;
- jack_nframes_t xval;
+ nframes_t xval;
double yval;
};
diff --git a/gtk2_ardour/automation_selectable.h b/gtk2_ardour/automation_selectable.h
index 9b8f78e057..5b7f4d5705 100644
--- a/gtk2_ardour/automation_selectable.h
+++ b/gtk2_ardour/automation_selectable.h
@@ -8,13 +8,13 @@ class TimeAxisView;
struct AutomationSelectable : public Selectable
{
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
double low_fract;
double high_fract;
TimeAxisView& track;
- AutomationSelectable (jack_nframes_t s, jack_nframes_t e, double l, double h, TimeAxisView& atv)
+ AutomationSelectable (nframes_t s, nframes_t e, double l, double h, TimeAxisView& atv)
: start (s), end (e), low_fract (l), high_fract (h), track (atv) {}
};
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 80ed2acd16..22b6e10ac8 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -602,7 +602,7 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS
}
bool
-AutomationTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selection, size_t nth)
+AutomationTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size_t nth)
{
bool ret = true;
@@ -614,7 +614,7 @@ AutomationTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selec
}
bool
-AutomationTimeAxisView::paste_one (AutomationLine& line, jack_nframes_t pos, float times, Selection& selection, size_t nth)
+AutomationTimeAxisView::paste_one (AutomationLine& line, nframes_t pos, float times, Selection& selection, size_t nth)
{
AutomationSelection::iterator p;
AutomationList& alist (line.the_list());
@@ -670,7 +670,7 @@ AutomationTimeAxisView::remove_ghost (GhostRegion* gr)
}
void
-AutomationTimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results)
+AutomationTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results)
{
if (!lines.empty() && touched (top, bot)) {
double topfrac;
diff --git a/gtk2_ardour/automation_time_axis.h b/gtk2_ardour/automation_time_axis.h
index 0cd9acc034..30fa71bea9 100644
--- a/gtk2_ardour/automation_time_axis.h
+++ b/gtk2_ardour/automation_time_axis.h
@@ -48,7 +48,7 @@ class AutomationTimeAxisView : public TimeAxisView {
void set_samples_per_unit (double);
std::string name() const { return _name; }
- virtual void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double) = 0;
+ virtual void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double) = 0;
virtual void clear_lines ();
virtual void add_line (AutomationLine&);
@@ -56,17 +56,17 @@ class AutomationTimeAxisView : public TimeAxisView {
vector<AutomationLine*> lines;
void set_selected_points (PointSelection&);
- void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable *>&);
+ void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable *>&);
void get_inverted_selectables (Selection&, list<Selectable*>& results);
- void show_timestretch (jack_nframes_t start, jack_nframes_t end) {}
+ void show_timestretch (nframes_t start, nframes_t end) {}
void hide_timestretch () {}
/* editing operations */
bool cut_copy_clear (Selection&, Editing::CutCopyOp);
bool cut_copy_clear_objects (PointSelection&, Editing::CutCopyOp);
- bool paste (jack_nframes_t, float times, Selection&, size_t nth);
+ bool paste (nframes_t, float times, Selection&, size_t nth);
void reset_objects (PointSelection&);
void add_ghost (GhostRegion*);
@@ -110,7 +110,7 @@ class AutomationTimeAxisView : public TimeAxisView {
bool cut_copy_clear_one (AutomationLine&, Selection&, Editing::CutCopyOp);
bool cut_copy_clear_objects_one (AutomationLine&, PointSelection&, Editing::CutCopyOp);
- bool paste_one (AutomationLine&, jack_nframes_t, float times, Selection&, size_t nth);
+ bool paste_one (AutomationLine&, nframes_t, float times, Selection&, size_t nth);
void reset_objects_one (AutomationLine&, PointSelection&);
virtual void set_automation_state (ARDOUR::AutoState) = 0;
diff --git a/gtk2_ardour/canvas-waveview.c b/gtk2_ardour/canvas-waveview.c
index 3e4a14d86a..89f5da7bf6 100644
--- a/gtk2_ardour/canvas-waveview.c
+++ b/gtk2_ardour/canvas-waveview.c
@@ -861,9 +861,12 @@ gnome_canvas_waveview_get_property (GObject *object,
case PROP_RECTIFIED:
g_value_set_boolean (value, waveview->rectified);
+ break;
case PROP_REGION_START:
g_value_set_uint (value, waveview->region_start);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc
index 888eecdba2..6032bfa561 100644
--- a/gtk2_ardour/crossfade_edit.cc
+++ b/gtk2_ardour/crossfade_edit.cc
@@ -632,7 +632,7 @@ CrossfadeEditor::redraw ()
return;
}
- jack_nframes_t len = xfade.length ();
+ nframes_t len = xfade.length ();
fade[current].normative_curve.clear ();
fade[current].gain_curve.clear ();
@@ -1078,12 +1078,12 @@ void
CrossfadeEditor::audition_both ()
{
AudioPlaylist& pl (session.the_auditioner()->prepare_playlist());
- jack_nframes_t preroll;
- jack_nframes_t postroll;
- jack_nframes_t length;
- jack_nframes_t left_start_offset;
- jack_nframes_t right_length;
- jack_nframes_t left_length;
+ nframes_t preroll;
+ nframes_t postroll;
+ nframes_t length;
+ nframes_t left_start_offset;
+ nframes_t right_length;
+ nframes_t left_length;
if (preroll_button.get_active()) {
preroll = ARDOUR_UI::instance()->preroll_clock.current_duration ();
diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc
index 49fe40ca63..baf0f2a346 100644
--- a/gtk2_ardour/crossfade_view.cc
+++ b/gtk2_ardour/crossfade_view.cc
@@ -108,8 +108,8 @@ CrossfadeView::reset_width_dependent_items (double pixel_width)
void
CrossfadeView::set_height (double height)
{
- if (height == TimeAxisView::Smaller ||
- height == TimeAxisView::Small)
+ if (height == TimeAxisView::hSmaller ||
+ height == TimeAxisView::hSmall)
TimeAxisViewItem::set_height (height - 3 );
else
TimeAxisViewItem::set_height (height - NAME_HIGHLIGHT_SIZE - 3 );
@@ -149,14 +149,12 @@ CrossfadeView::redraw_curves ()
At "height - 3.0" the bottom of the crossfade touches the name highlight or the bottom of the track (if the
track is either Small or Smaller.
*/
- switch(get_time_axis_view().height) {
- case TimeAxisView::Smaller:
- case TimeAxisView::Small:
- h = get_time_axis_view().height - 3.0;
- break;
-
- default:
- h = get_time_axis_view().height - NAME_HIGHLIGHT_SIZE - 3.0;
+ double tav_height = get_time_axis_view().height;
+ if (tav_height == TimeAxisView::hSmaller ||
+ tav_height == TimeAxisView::hSmall) {
+ h = tav_height - 3.0;
+ } else {
+ h = tav_height - NAME_HIGHLIGHT_SIZE - 3.0;
}
if (h < 0) {
diff --git a/gtk2_ardour/draginfo.h b/gtk2_ardour/draginfo.h
index 12458fdf34..9b56fed7ab 100644
--- a/gtk2_ardour/draginfo.h
+++ b/gtk2_ardour/draginfo.h
@@ -20,11 +20,11 @@ struct DragInfo {
ArdourCanvas::Item* item;
ItemType item_type;
void* data;
- jack_nframes_t last_frame_position;
+ nframes_t last_frame_position;
int32_t pointer_frame_offset;
- jack_nframes_t grab_frame;
- jack_nframes_t last_pointer_frame;
- jack_nframes_t current_pointer_frame;
+ nframes_t grab_frame;
+ nframes_t last_pointer_frame;
+ nframes_t current_pointer_frame;
double grab_x, grab_y;
double cumulative_x_drag;
double cumulative_y_drag;
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 0fc9810c70..9924a2a929 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -98,15 +98,6 @@ const double Editor::timebar_height = 15.0;
#include "editor_xpms"
-static const int32_t slide_index = 0;
-static const int32_t splice_index = 1;
-
-static const gchar *edit_mode_strings[] = {
- N_("Slide Edit"),
- N_("Splice Edit"),
- 0
-};
-
static const gchar *snap_type_strings[] = {
N_("None"),
N_("CD Frames"),
@@ -138,11 +129,11 @@ static const gchar *snap_mode_strings[] = {
};
static const gchar *zoom_focus_strings[] = {
- N_("Focus Left"),
- N_("Focus Right"),
- N_("Focus Center"),
- N_("Focus Play"),
- N_("Focus Edit"),
+ N_("Left"),
+ N_("Right"),
+ N_("Center"),
+ N_("Playhead"),
+ N_("Edit Cursor"),
0
};
@@ -257,6 +248,7 @@ Editor::Editor (AudioEngine& eng)
bbt_beat_subdivision = 4;
canvas_width = 0;
canvas_height = 0;
+ autoscroll_active = false;
autoscroll_timeout_tag = -1;
interthread_progress_window = 0;
@@ -674,8 +666,8 @@ Editor::Editor (AudioEngine& eng)
/* nudge stuff */
- nudge_forward_button.add (*(manage (new Image (get_xpm("right_arrow.xpm")))));
- nudge_backward_button.add (*(manage (new Image (get_xpm("left_arrow.xpm")))));
+ nudge_forward_button.add (*(manage (new Image (::get_icon("nudge_right")))));
+ nudge_backward_button.add (*(manage (new Image (::get_icon("nudge_left")))));
ARDOUR_UI::instance()->tooltips().set_tip (nudge_forward_button, _("Nudge Region/Selection Forwards"));
ARDOUR_UI::instance()->tooltips().set_tip (nudge_backward_button, _("Nudge Region/Selection Backwards"));
@@ -701,9 +693,10 @@ Editor::Editor (AudioEngine& eng)
ControlProtocol::ZoomOut.connect (bind (mem_fun (*this, &Editor::temporal_zoom_step), true));
ControlProtocol::ScrollTimeline.connect (mem_fun (*this, &Editor::control_scroll));
+ Config->ParameterChanged.connect (mem_fun (*this, &Editor::parameter_changed));
+
constructed = true;
instant_save ();
-
}
Editor::~Editor()
@@ -803,19 +796,19 @@ Editor::tie_vertical_scrolling ()
void
Editor::set_frames_per_unit (double fpu)
{
- jack_nframes_t frames;
+ nframes_t frames;
if (fpu == frames_per_unit) {
return;
}
- if (fpu < 1.0) {
- fpu = 1.0;
+ if (fpu < 2.0) {
+ fpu = 2.0;
}
// convert fpu to frame count
- frames = (jack_nframes_t) floor (fpu * canvas_width);
+ frames = (nframes_t) floor (fpu * canvas_width);
/* don't allow zooms that fit more than the maximum number
of frames into an 800 pixel wide space.
@@ -825,6 +818,10 @@ Editor::set_frames_per_unit (double fpu)
return;
}
+ if (fpu == frames_per_unit) {
+ return;
+ }
+
frames_per_unit = fpu;
if (frames != zoom_range_clock.current_duration()) {
@@ -870,12 +867,12 @@ Editor::instant_save ()
}
void
-Editor::reposition_x_origin (jack_nframes_t frame)
+Editor::reposition_x_origin (nframes_t frame)
{
if (frame != leftmost_frame) {
leftmost_frame = frame;
- jack_nframes_t rightmost_frame = leftmost_frame + current_page_frames ();
+ nframes_t rightmost_frame = leftmost_frame + current_page_frames ();
if (rightmost_frame > last_canvas_frame) {
last_canvas_frame = rightmost_frame;
@@ -909,10 +906,10 @@ Editor::zoom_adjustment_changed ()
if (fpu < 1.0) {
fpu = 1.0;
- zoom_range_clock.set ((jack_nframes_t) floor (fpu * canvas_width));
+ zoom_range_clock.set ((nframes_t) floor (fpu * canvas_width));
} else if (fpu > session->current_end_frame() / canvas_width) {
fpu = session->current_end_frame() / canvas_width;
- zoom_range_clock.set ((jack_nframes_t) floor (fpu * canvas_width));
+ zoom_range_clock.set ((nframes_t) floor (fpu * canvas_width));
}
temporal_zoom (fpu);
@@ -928,14 +925,14 @@ Editor::control_scroll (float fraction)
}
double step = fraction * current_page_frames();
- jack_nframes_t target;
+ nframes_t target;
- if ((fraction < 0.0f) && (session->transport_frame() < (jack_nframes_t) fabs(step))) {
+ if ((fraction < 0.0f) && (session->transport_frame() < (nframes_t) fabs(step))) {
target = 0;
} else if ((fraction > 0.0f) && (max_frames - session->transport_frame() < step)) {
target = (max_frames - (current_page_frames()*2)); // allow room for slop in where the PH is on the screen
} else {
- target = (session->transport_frame() + (jack_nframes_t) floor ((fraction * current_page_frames())));
+ target = (session->transport_frame() + (nframes_t) floor ((fraction * current_page_frames())));
}
/* move visuals, we'll catch up with it later */
@@ -959,7 +956,7 @@ Editor::control_scroll (float fraction)
}
bool
-Editor::deferred_control_scroll (jack_nframes_t target)
+Editor::deferred_control_scroll (nframes_t target)
{
session->request_locate (target);
return false;
@@ -969,14 +966,14 @@ void
Editor::canvas_horizontally_scrolled ()
{
- leftmost_frame = (jack_nframes_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
+ leftmost_frame = (nframes_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
update_fixed_rulers ();
tempo_map_changed (Change (0));
}
void
-Editor::reposition_and_zoom (jack_nframes_t frame, double nfpu)
+Editor::reposition_and_zoom (nframes_t frame, double nfpu)
{
if (!repos_zoom_queued) {
repos_zoom_queued = true;
@@ -985,7 +982,7 @@ Editor::reposition_and_zoom (jack_nframes_t frame, double nfpu)
}
gint
-Editor::deferred_reposition_and_zoom (jack_nframes_t frame, double nfpu)
+Editor::deferred_reposition_and_zoom (nframes_t frame, double nfpu)
{
set_frames_per_unit (nfpu);
@@ -1003,39 +1000,6 @@ Editor::on_realize ()
}
void
-Editor::queue_session_control_changed (Session::ControlType t)
-{
- Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &Editor::session_control_changed), t));
-}
-
-void
-Editor::session_control_changed (Session::ControlType t)
-{
- // right now we're only tracking some state here
-
- switch (t) {
- case Session::AutoLoop:
- update_loop_range_view (true);
- break;
- case Session::PunchIn:
- case Session::PunchOut:
- update_punch_range_view (true);
- break;
-
- case Session::LayeringModel:
- update_layering_model ();
- break;
-
- case Session::SmpteMode:
- update_smpte_mode ();
- break;
-
- default:
- break;
- }
-}
-
-void
Editor::start_scrolling ()
{
scroll_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect
@@ -1049,7 +1013,7 @@ Editor::stop_scrolling ()
}
void
-Editor::map_position_change (jack_nframes_t frame)
+Editor::map_position_change (nframes_t frame)
{
ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::map_position_change), frame));
@@ -1062,7 +1026,7 @@ Editor::map_position_change (jack_nframes_t frame)
}
void
-Editor::center_screen (jack_nframes_t frame)
+Editor::center_screen (nframes_t frame)
{
double page = canvas_width * frames_per_unit;
@@ -1075,12 +1039,12 @@ Editor::center_screen (jack_nframes_t frame)
}
void
-Editor::center_screen_internal (jack_nframes_t frame, float page)
+Editor::center_screen_internal (nframes_t frame, float page)
{
page /= 2;
if (frame > page) {
- frame -= (jack_nframes_t) page;
+ frame -= (nframes_t) page;
} else {
frame = 0;
}
@@ -1093,7 +1057,7 @@ Editor::handle_new_duration ()
{
ENSURE_GUI_THREAD (mem_fun (*this, &Editor::handle_new_duration));
- jack_nframes_t new_end = session->get_maximum_extent() + (jack_nframes_t) floorf (current_page_frames() * 0.10f);
+ nframes_t new_end = session->get_maximum_extent() + (nframes_t) floorf (current_page_frames() * 0.10f);
if (new_end > last_canvas_frame) {
last_canvas_frame = new_end;
@@ -1174,10 +1138,6 @@ Editor::connect_to_session (Session *t)
session_connections.push_back (session->RegionHiddenChange.connect (mem_fun(*this, &Editor::region_hidden)));
session_connections.push_back (session->SMPTEOffsetChanged.connect (mem_fun(*this, &Editor::update_just_smpte)));
- session_connections.push_back (session->SMPTETypeChanged.connect (mem_fun(*this, &Editor::update_just_smpte)));
-
- session_connections.push_back (session->SMPTETypeChanged.connect (mem_fun(*this, &Editor::update_smpte_mode)));
- session_connections.push_back (session->PullupChanged.connect (mem_fun(*this, &Editor::update_video_pullup)));
session_connections.push_back (session->tempo_map().StateChanged.connect (mem_fun(*this, &Editor::tempo_map_changed)));
@@ -1193,16 +1153,6 @@ Editor::connect_to_session (Session *t)
analysis_window->set_session (session);
#endif
- switch (session->get_edit_mode()) {
- case Splice:
- edit_mode_selector.set_active_text (edit_mode_strings[splice_index]);
- break;
-
- case Slide:
- edit_mode_selector.set_active_text (edit_mode_strings[slide_index]);
- break;
- }
-
Location* loc = session->locations()->auto_loop_location();
if (loc == 0) {
loc = new Location (0, session->current_end_frame(), _("Loop"),(Location::Flags) (Location::IsAutoLoop | Location::IsHidden));
@@ -1231,10 +1181,8 @@ Editor::connect_to_session (Session *t)
loc->set_name (_("Punch"));
}
- update_loop_range_view (true);
- update_punch_range_view (true);
+ Config->map_parameters (mem_fun (*this, &Editor::parameter_changed));
- session->ControlChanged.connect (mem_fun(*this, &Editor::queue_session_control_changed));
session->StateSaved.connect (mem_fun(*this, &Editor::session_state_saved));
refresh_location_display ();
@@ -1244,35 +1192,6 @@ Editor::connect_to_session (Session *t)
session->locations()->StateChanged.connect (mem_fun(*this, &Editor::refresh_location_display_s));
session->locations()->end_location()->changed.connect (mem_fun(*this, &Editor::end_location_changed));
- bool yn;
- RefPtr<Action> act;
-
- act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-active"));
- if (act) {
- RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
- /* do it twice to force the change */
- yn = session->get_crossfades_active();
- tact->set_active (!yn);
- tact->set_active (yn);
- }
-
- act = ActionManager::get_action (X_("Editor"), X_("toggle-auto-xfades"));
- if (act) {
- RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
- /* do it twice to force the change */
- yn = Config->get_auto_xfade ();
- tact->set_active (!yn);
- tact->set_active (yn);
- }
-
- /* xfade visibility state set from editor::set_state() */
-
- update_crossfade_model();
- update_layering_model();
-
- update_smpte_mode();
- update_video_pullup();
-
handle_new_duration ();
redisplay_regions ();
@@ -1439,10 +1358,10 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
}
void
-Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, bool with_selection, jack_nframes_t frame)
+Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, bool with_selection, nframes_t frame)
{
using namespace Menu_Helpers;
- Menu* (Editor::*build_menu_function)(jack_nframes_t);
+ Menu* (Editor::*build_menu_function)(nframes_t);
Menu *menu;
switch (item_type) {
@@ -1554,7 +1473,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
}
Menu*
-Editor::build_track_context_menu (jack_nframes_t ignored)
+Editor::build_track_context_menu (nframes_t ignored)
{
using namespace Menu_Helpers;
@@ -1566,7 +1485,7 @@ Editor::build_track_context_menu (jack_nframes_t ignored)
}
Menu*
-Editor::build_track_bus_context_menu (jack_nframes_t ignored)
+Editor::build_track_bus_context_menu (nframes_t ignored)
{
using namespace Menu_Helpers;
@@ -1578,7 +1497,7 @@ Editor::build_track_bus_context_menu (jack_nframes_t ignored)
}
Menu*
-Editor::build_track_region_context_menu (jack_nframes_t frame)
+Editor::build_track_region_context_menu (nframes_t frame)
{
using namespace Menu_Helpers;
MenuList& edit_items = track_region_context_menu.items();
@@ -1591,7 +1510,7 @@ Editor::build_track_region_context_menu (jack_nframes_t frame)
Playlist* pl;
if ((ds = atv->get_diskstream()) && ((pl = ds->playlist()))) {
- Playlist::RegionList* regions = pl->regions_at ((jack_nframes_t) floor ( (double)frame * ds->speed()));
+ Playlist::RegionList* regions = pl->regions_at ((nframes_t) floor ( (double)frame * ds->speed()));
for (Playlist::RegionList::iterator i = regions->begin(); i != regions->end(); ++i) {
add_region_context_items (atv->audio_view(), (*i), edit_items);
}
@@ -1605,7 +1524,7 @@ Editor::build_track_region_context_menu (jack_nframes_t frame)
}
Menu*
-Editor::build_track_crossfade_context_menu (jack_nframes_t frame)
+Editor::build_track_crossfade_context_menu (nframes_t frame)
{
using namespace Menu_Helpers;
MenuList& edit_items = track_crossfade_context_menu.items();
@@ -1685,7 +1604,7 @@ Editor::analyze_range_selection()
Menu*
-Editor::build_track_selection_context_menu (jack_nframes_t ignored)
+Editor::build_track_selection_context_menu (nframes_t ignored)
{
using namespace Menu_Helpers;
MenuList& edit_items = track_selection_context_menu.items();
@@ -2248,7 +2167,7 @@ Editor::get_state ()
XMLNode* node = new XMLNode ("Editor");
char buf[32];
- _id.print (buf);
+ _id.print (buf, sizeof (buf));
node->add_property ("id", buf);
if (is_realized()) {
@@ -2330,7 +2249,7 @@ Editor::trackview_by_y_position (double y)
}
void
-Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
+Editor::snap_to (nframes_t& start, int32_t direction, bool for_mark)
{
Location* before = 0;
Location* after = 0;
@@ -2339,10 +2258,10 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
return;
}
- const jack_nframes_t one_second = session->frame_rate();
- const jack_nframes_t one_minute = session->frame_rate() * 60;
+ const nframes_t one_second = session->frame_rate();
+ const nframes_t one_minute = session->frame_rate() * 60;
- jack_nframes_t presnap = start;
+ nframes_t presnap = start;
switch (snap_type) {
case SnapToFrame:
@@ -2350,16 +2269,16 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
case SnapToCDFrame:
if (direction) {
- start = (jack_nframes_t) ceil ((double) start / (one_second / 75)) * (one_second / 75);
+ start = (nframes_t) ceil ((double) start / (one_second / 75)) * (one_second / 75);
} else {
- start = (jack_nframes_t) floor ((double) start / (one_second / 75)) * (one_second / 75);
+ start = (nframes_t) floor ((double) start / (one_second / 75)) * (one_second / 75);
}
break;
case SnapToSMPTEFrame:
if (direction) {
- start = (jack_nframes_t) (ceil ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
+ start = (nframes_t) (ceil ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
} else {
- start = (jack_nframes_t) (floor ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
+ start = (nframes_t) (floor ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
}
break;
@@ -2371,9 +2290,9 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
start -= session->smpte_offset ();
}
if (direction > 0) {
- start = (jack_nframes_t) ceil ((double) start / one_second) * one_second;
+ start = (nframes_t) ceil ((double) start / one_second) * one_second;
} else {
- start = (jack_nframes_t) floor ((double) start / one_second) * one_second;
+ start = (nframes_t) floor ((double) start / one_second) * one_second;
}
if (session->smpte_offset_negative())
@@ -2392,9 +2311,9 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
start -= session->smpte_offset ();
}
if (direction) {
- start = (jack_nframes_t) ceil ((double) start / one_minute) * one_minute;
+ start = (nframes_t) ceil ((double) start / one_minute) * one_minute;
} else {
- start = (jack_nframes_t) floor ((double) start / one_minute) * one_minute;
+ start = (nframes_t) floor ((double) start / one_minute) * one_minute;
}
if (session->smpte_offset_negative())
{
@@ -2406,17 +2325,17 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
case SnapToSeconds:
if (direction) {
- start = (jack_nframes_t) ceil ((double) start / one_second) * one_second;
+ start = (nframes_t) ceil ((double) start / one_second) * one_second;
} else {
- start = (jack_nframes_t) floor ((double) start / one_second) * one_second;
+ start = (nframes_t) floor ((double) start / one_second) * one_second;
}
break;
case SnapToMinutes:
if (direction) {
- start = (jack_nframes_t) ceil ((double) start / one_minute) * one_minute;
+ start = (nframes_t) ceil ((double) start / one_minute) * one_minute;
} else {
- start = (jack_nframes_t) floor ((double) start / one_minute) * one_minute;
+ start = (nframes_t) floor ((double) start / one_minute) * one_minute;
}
break;
@@ -2497,7 +2416,7 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
case SnapToRegionSync:
case SnapToRegionBoundary:
if (!region_boundary_cache.empty()) {
- vector<jack_nframes_t>::iterator i;
+ vector<nframes_t>::iterator i;
if (direction > 0) {
i = std::upper_bound (region_boundary_cache.begin(), region_boundary_cache.end(), start);
@@ -2549,22 +2468,22 @@ Editor::setup_toolbar ()
vector<ToggleButton *> mouse_mode_buttons;
- mouse_move_button.add (*(manage (new Image (get_xpm("tool_object.xpm")))));
+ mouse_move_button.add (*(manage (new Image (::get_icon("tool_object")))));
mouse_move_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_move_button);
mouse_select_button.add (*(manage (new Image (get_xpm("tool_range.xpm")))));
mouse_select_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_select_button);
- mouse_gain_button.add (*(manage (new Image (get_xpm("tool_gain.xpm")))));
+ mouse_gain_button.add (*(manage (new Image (::get_icon("tool_gain")))));
mouse_gain_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_gain_button);
- mouse_zoom_button.add (*(manage (new Image (get_xpm("tool_zoom.xpm")))));
+ mouse_zoom_button.add (*(manage (new Image (::get_icon("tool_zoom")))));
mouse_zoom_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_zoom_button);
- mouse_timefx_button.add (*(manage (new Image (get_xpm("tool_stretch.xpm")))));
+ mouse_timefx_button.add (*(manage (new Image (::get_icon("tool_stretch")))));
mouse_timefx_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_timefx_button);
- mouse_audition_button.add (*(manage (new Image (get_xpm("tool_audition.xpm")))));
+ mouse_audition_button.add (*(manage (new Image (::get_icon("tool_audition")))));
mouse_audition_button.set_relief(Gtk::RELIEF_NONE);
mouse_mode_buttons.push_back (&mouse_audition_button);
@@ -2582,9 +2501,13 @@ Editor::setup_toolbar ()
mouse_mode_button_box.pack_start(mouse_audition_button, true, true);
mouse_mode_button_box.set_homogeneous(true);
+ vector<string> edit_mode_strings;
+ edit_mode_strings.push_back (edit_mode_to_string (Splice));
+ edit_mode_strings.push_back (edit_mode_to_string (Slide));
+
edit_mode_selector.set_name ("EditModeSelector");
- Gtkmm2ext::set_size_request_to_display_given_text (edit_mode_selector, "Splice Edit", 2+FUDGE, 10);
- set_popdown_strings (edit_mode_selector, internationalize (edit_mode_strings));
+ Gtkmm2ext::set_size_request_to_display_given_text (edit_mode_selector, longest (edit_mode_strings).c_str(), 2+FUDGE, 10);
+ set_popdown_strings (edit_mode_selector, edit_mode_strings);
edit_mode_selector.signal_changed().connect (mem_fun(*this, &Editor::edit_mode_selection_done));
mode_box->pack_start(edit_mode_selector);
@@ -2641,17 +2564,17 @@ Editor::setup_toolbar ()
zoom_box.set_border_width (2);
zoom_in_button.set_name ("EditorTimeButton");
- zoom_in_button.add (*(manage (new Image (get_xpm("zoom_in.xpm")))));
+ zoom_in_button.add (*(manage (new Image (::get_icon("zoom_in")))));
zoom_in_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), false));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_in_button, _("Zoom In"));
zoom_out_button.set_name ("EditorTimeButton");
- zoom_out_button.add (*(manage (new Image (get_xpm("zoom_out.xpm")))));
+ zoom_out_button.add (*(manage (new Image (::get_icon("zoom_out")))));
zoom_out_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), true));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_button, _("Zoom Out"));
zoom_out_full_button.set_name ("EditorTimeButton");
- zoom_out_full_button.add (*(manage (new Image (get_xpm("zoom_full.xpm")))));
+ zoom_out_full_button.add (*(manage (new Image (::get_icon("zoom_full")))));
zoom_out_full_button.signal_clicked().connect (mem_fun(*this, &Editor::temporal_zoom_session));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_full_button, _("Zoom to Session"));
@@ -2666,6 +2589,7 @@ Editor::setup_toolbar ()
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));
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"));
zoom_box.pack_start (zoom_focus_selector, false, false);
@@ -2942,7 +2866,7 @@ Editor::set_selected_control_point_from_click (bool press, Selection::Operation
/* select this point and any others that it represents */
double y1, y2;
- jack_nframes_t x1, x2;
+ nframes_t x1, x2;
x1 = pixel_to_frame (clicked_control_point->get_x() - 10);
x2 = pixel_to_frame (clicked_control_point->get_x() + 10);
@@ -3125,8 +3049,8 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
} else if (op == Selection::Extend) {
list<Selectable*> results;
- jack_nframes_t last_frame;
- jack_nframes_t first_frame;
+ nframes_t last_frame;
+ nframes_t first_frame;
/* 1. find the last selected regionview in the track that was clicked in */
@@ -3522,7 +3446,7 @@ Editor::edit_mode_selection_done ()
mode = Slide;
}
- session->set_edit_mode (mode);
+ Config->set_edit_mode (mode);
}
void
@@ -3904,10 +3828,10 @@ Editor::playlist_selector () const
return *_playlist_selector;
}
-jack_nframes_t
-Editor::get_nudge_distance (jack_nframes_t pos, jack_nframes_t& next)
+nframes_t
+Editor::get_nudge_distance (nframes_t pos, nframes_t& next)
{
- jack_nframes_t ret;
+ nframes_t ret;
ret = nudge_clock.current_duration (pos);
next = ret + 1; /* XXXX fix me */
@@ -3957,7 +3881,7 @@ Editor::playlist_deletion_dialog (Playlist* pl)
}
bool
-Editor::audio_region_selection_covers (jack_nframes_t where)
+Editor::audio_region_selection_covers (nframes_t where)
{
for (RegionSelection::iterator a = selection->regions.begin(); a != selection->regions.end(); ++a) {
if ((*a)->region()->covers (where)) {
@@ -4149,131 +4073,3 @@ Editor::on_key_press_event (GdkEventKey* ev)
return key_press_focus_accelerator_handler (*this, ev);
}
-void
-Editor::update_smpte_mode ()
-{
- ENSURE_GUI_THREAD(mem_fun(*this, &Editor::update_smpte_mode));
-
- RefPtr<Action> act;
-
- float frames = session->smpte_frames_per_second;
- bool drop = session->smpte_drop_frames;
-
- if ((frames < 23.976 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte23976"));
- else if ((frames < 24 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte24"));
- else if ((frames < 24.976 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte24976"));
- else if ((frames < 25 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte25"));
- else if ((frames < 29.97 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte2997"));
- else if ((frames < 29.97 * 1.0005) && drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte2997drop"));
- else if ((frames < 30 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte30"));
- else if ((frames < 30 * 1.0005) && drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte30drop"));
- else if ((frames < 59.94 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte5994"));
- else if ((frames < 60 * 1.0005) && !drop)
- act = ActionManager::get_action (X_("Editor"), X_("Smpte60"));
- else
- cerr << "Unexpected SMPTE value (" << frames << (drop ? "drop" : "") << ") in update_smpte_mode. Menu is probably wrong\n" << endl;
-
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && !ract->get_active()) {
- ract->set_active (true);
- }
- }
-}
-
-void
-Editor::update_video_pullup ()
-{
- ENSURE_GUI_THREAD (mem_fun(*this, &Editor::update_video_pullup));
-
- RefPtr<Action> act;
-
- float pullup = session->video_pullup;
-
- if ( pullup < (-4.1667 - 0.1) * 0.99) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4Minus1"));
- } else if ( pullup < (-4.1667) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4"));
- } else if ( pullup < (-4.1667 + 0.1) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4Plus1"));
- } else if ( pullup < (-0.1) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus1"));
- } else if (pullup > (4.1667 + 0.1) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4Plus1"));
- } else if ( pullup > (4.1667) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4"));
- } else if ( pullup > (4.1667 - 0.1) * 0.99) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4Minus1"));
- } else if ( pullup > (0.1) * 0.99 ) {
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus1"));
- } else
- act = ActionManager::get_action (X_("Editor"), X_("PullupNone"));
-
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && !ract->get_active()) {
- ract->set_active (true);
- }
- }
-
-}
-
-
-void
-Editor::update_layering_model ()
-{
- RefPtr<Action> act;
-
- switch (session->get_layer_model()) {
- case Session::LaterHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
- break;
- case Session::MoveAddHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
- break;
- case Session::AddHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
- break;
- }
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && !ract->get_active()) {
- ract->set_active (true);
- }
- }
-}
-
-void
-Editor::update_crossfade_model ()
-{
- RefPtr<Action> act;
-
- switch (session->get_xfade_model()) {
- case FullCrossfade:
- act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
- break;
- case ShortCrossfade:
- act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
- break;
- }
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && !ract->get_active()) {
- ract->set_active (true);
- }
- }
-}
-
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index fe5d47df0c..c26248c1e7 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -128,9 +128,9 @@ class Editor : public PublicEditor
void connect_to_session (ARDOUR::Session *);
ARDOUR::Session* current_session() const { return session; }
- jack_nframes_t leftmost_position() const { return leftmost_frame; }
- jack_nframes_t current_page_frames() const {
- return (jack_nframes_t) floor (canvas_width * frames_per_unit);
+ nframes_t leftmost_position() const { return leftmost_frame; }
+ nframes_t current_page_frames() const {
+ return (nframes_t) floor (canvas_width * frames_per_unit);
}
void set_snap_to (Editing::SnapType);
@@ -176,11 +176,11 @@ class Editor : public PublicEditor
void set_edit_menu (Gtk::Menu&);
- jack_nframes_t unit_to_frame (double unit) {
- return (jack_nframes_t) rint (unit * frames_per_unit);
+ nframes_t unit_to_frame (double unit) {
+ return (nframes_t) rint (unit * frames_per_unit);
}
- double frame_to_unit (jack_nframes_t frame) {
+ double frame_to_unit (nframes_t frame) {
return rint ((double) frame / (double) frames_per_unit);
}
@@ -195,7 +195,7 @@ class Editor : public PublicEditor
xscroll_adjustment.
*/
- jack_nframes_t pixel_to_frame (double pixel) {
+ nframes_t pixel_to_frame (double pixel) {
/* pixel can be less than zero when motion events
are processed. since we've already run the world->canvas
@@ -204,13 +204,13 @@ class Editor : public PublicEditor
*/
if (pixel >= 0) {
- return (jack_nframes_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit);
+ return (nframes_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit);
} else {
return 0;
}
}
- gulong frame_to_pixel (jack_nframes_t frame) {
+ gulong frame_to_pixel (nframes_t frame) {
return (gulong) rint ((frame / (frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit)));
}
@@ -263,7 +263,7 @@ class Editor : public PublicEditor
PlaylistSelector& playlist_selector() const;
void route_name_changed (TimeAxisView *);
gdouble frames_per_unit;
- jack_nframes_t leftmost_frame;
+ nframes_t leftmost_frame;
void clear_playlist (ARDOUR::Playlist&);
void new_playlists ();
@@ -298,9 +298,6 @@ class Editor : public PublicEditor
void toggle_waveforms_while_recording ();
void toggle_measure_visibility ();
- void set_meter_falloff (int);
- void set_meter_hold (int32_t);
-
/* SMPTE timecode & video sync */
void smpte_fps_chosen (ARDOUR::Session::SmpteFormat format);
@@ -318,9 +315,8 @@ class Editor : public PublicEditor
void update_crossfade_model ();
void set_crossfade_model (ARDOUR::CrossfadeModel);
-
/* layers */
- void set_layer_model (ARDOUR::Session::LayerModel);
+ void set_layer_model (ARDOUR::LayerModel);
void update_layering_model ();
/* redirect shared ops menu. caller must free returned menu */
@@ -339,14 +335,14 @@ class Editor : public PublicEditor
bool new_regionviews_display_gain () { return _new_regionviews_show_envelope; }
void prepare_for_cleanup ();
- void reposition_x_origin (jack_nframes_t sample);
+ void reposition_x_origin (nframes_t sample);
void maximise_editing_space();
void restore_editing_space();
protected:
void map_transport_state ();
- void map_position_change (jack_nframes_t);
+ void map_position_change (nframes_t);
void on_realize();
@@ -401,7 +397,7 @@ class Editor : public PublicEditor
void hide();
void show ();
void set_name (const string&);
- void set_position (jack_nframes_t start, jack_nframes_t end = 0);
+ void set_position (nframes_t start, nframes_t end = 0);
void set_color_rgba (uint32_t);
};
@@ -413,7 +409,7 @@ class Editor : public PublicEditor
void hide_marker (ArdourCanvas::Item*, GdkEvent*);
void clear_marker_display ();
- void mouse_add_new_marker (jack_nframes_t where);
+ void mouse_add_new_marker (nframes_t where);
TimeAxisView* clicked_axisview;
RouteTimeAxisView* clicked_routeview;
@@ -459,12 +455,12 @@ class Editor : public PublicEditor
Gtk::Menu * track_edit_playlist_submenu;
Gtk::Menu * track_selection_edit_playlist_submenu;
- void popup_track_context_menu (int, int, ItemType, bool, jack_nframes_t);
- Gtk::Menu* build_track_context_menu (jack_nframes_t);
- Gtk::Menu* build_track_bus_context_menu (jack_nframes_t);
- Gtk::Menu* build_track_region_context_menu (jack_nframes_t frame);
- Gtk::Menu* build_track_crossfade_context_menu (jack_nframes_t);
- Gtk::Menu* build_track_selection_context_menu (jack_nframes_t);
+ void popup_track_context_menu (int, int, ItemType, bool, nframes_t);
+ Gtk::Menu* build_track_context_menu (nframes_t);
+ Gtk::Menu* build_track_bus_context_menu (nframes_t);
+ Gtk::Menu* build_track_region_context_menu (nframes_t frame);
+ Gtk::Menu* build_track_crossfade_context_menu (nframes_t);
+ Gtk::Menu* build_track_selection_context_menu (nframes_t);
void add_dstream_context_items (Gtk::Menu_Helpers::MenuList&);
void add_bus_context_items (Gtk::Menu_Helpers::MenuList&);
void add_region_context_items (AudioStreamView*, boost::shared_ptr<ARDOUR::Region>, Gtk::Menu_Helpers::MenuList&);
@@ -488,9 +484,7 @@ class Editor : public PublicEditor
ArdourCanvas::Text* verbose_canvas_cursor;
bool verbose_cursor_visible;
- void session_control_changed (ARDOUR::Session::ControlType);
- void queue_session_control_changed (ARDOUR::Session::ControlType);
-
+ void parameter_changed (const char *);
bool track_canvas_motion (GdkEvent*);
@@ -546,7 +540,7 @@ class Editor : public PublicEditor
void update_just_smpte ();
void update_fixed_rulers ();
void update_tempo_based_rulers ();
- void popup_ruler_menu (jack_nframes_t where = 0, ItemType type = RegionItem);
+ void popup_ruler_menu (nframes_t where = 0, ItemType type = RegionItem);
void update_ruler_visibility ();
void ruler_toggled (int);
gint ruler_label_button_release (GdkEventButton*);
@@ -608,13 +602,13 @@ class Editor : public PublicEditor
Editor& editor;
ArdourCanvas::Points points;
ArdourCanvas::Line canvas_item;
- jack_nframes_t current_frame;
+ nframes_t current_frame;
double length;
Cursor (Editor&, const string& color, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
~Cursor ();
- void set_position (jack_nframes_t);
+ void set_position (nframes_t);
void set_length (double units);
void set_y_axis (double position);
};
@@ -635,9 +629,9 @@ class Editor : public PublicEditor
void select_all_selectables_using_cursor (Cursor *, bool);
void select_all_selectables_between_cursors (Cursor *, Cursor *);
- boost::shared_ptr<ARDOUR::Region> find_next_region (jack_nframes_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
+ boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
- vector<jack_nframes_t> region_boundary_cache;
+ vector<nframes_t> region_boundary_cache;
void build_region_boundary_cache ();
Gtk::VBox trackview_vpacker;
@@ -665,7 +659,7 @@ class Editor : public PublicEditor
double canvas_width;
double canvas_height;
- jack_nframes_t last_canvas_frame;
+ nframes_t last_canvas_frame;
bool track_canvas_map_handler (GdkEventAny*);
bool time_canvas_map_handler (GdkEventAny*);
@@ -683,14 +677,14 @@ class Editor : public PublicEditor
Gtk::HBox edit_controls_hbox;
void control_scroll (float);
- bool deferred_control_scroll (jack_nframes_t);
+ bool deferred_control_scroll (nframes_t);
sigc::connection control_scroll_connection;
void tie_vertical_scrolling ();
void canvas_horizontally_scrolled ();
- void reposition_and_zoom (jack_nframes_t sample, double fpu);
- gint deferred_reposition_and_zoom (jack_nframes_t sample, double fpu);
+ void reposition_and_zoom (nframes_t sample, double fpu);
+ gint deferred_reposition_and_zoom (nframes_t sample, double fpu);
void end_location_changed (ARDOUR::Location*);
bool repos_zoom_queued;
@@ -702,14 +696,15 @@ class Editor : public PublicEditor
}
Gtk::TreeModelColumn<Glib::ustring> name;
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region;
- Gtk::TreeModelColumn<Gdk::Color> color_;
+ Gtk::TreeModelColumn<Gdk::Color> color_;
};
- RegionListDisplayModelColumns region_list_columns;
- Gtkmm2ext::DnDTreeView region_list_display;
- Glib::RefPtr<Gtk::TreeStore> region_list_model;
- Glib::RefPtr<Gtk::ToggleAction> toggle_full_region_list_action;
- Glib::RefPtr<Gtk::ToggleAction> toggle_show_auto_regions_action;
+ RegionListDisplayModelColumns region_list_columns;
+ Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Region> > region_list_display;
+
+ Glib::RefPtr<Gtk::TreeStore> region_list_model;
+ Glib::RefPtr<Gtk::ToggleAction> toggle_full_region_list_action;
+ Glib::RefPtr<Gtk::ToggleAction> toggle_show_auto_regions_action;
void region_list_selection_changed ();
bool region_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
@@ -772,7 +767,7 @@ class Editor : public PublicEditor
NamedSelectionDisplayModelColumns named_selection_columns;
Glib::RefPtr<Gtk::TreeStore> named_selection_model;
- Gtkmm2ext::DnDTreeView named_selection_display;
+ Gtkmm2ext::DnDTreeView<ARDOUR::NamedSelection*> named_selection_display;
Gtk::ScrolledWindow named_selection_scroller;
void name_selection();
@@ -806,9 +801,9 @@ class Editor : public PublicEditor
static void build_cursors ();
sigc::connection scroll_connection;
- jack_nframes_t last_update_frame;
- void center_screen (jack_nframes_t);
- void center_screen_internal (jack_nframes_t, float);
+ nframes_t last_update_frame;
+ void center_screen (nframes_t);
+ void center_screen_internal (nframes_t, float);
void update_current_screen ();
@@ -817,8 +812,8 @@ class Editor : public PublicEditor
void session_going_away ();
- jack_nframes_t cut_buffer_start;
- jack_nframes_t cut_buffer_length;
+ nframes_t cut_buffer_start;
+ nframes_t cut_buffer_length;
bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
@@ -831,7 +826,7 @@ class Editor : public PublicEditor
void register_actions ();
- int ensure_cursor (jack_nframes_t* pos);
+ int ensure_cursor (nframes_t* pos);
void handle_new_region (boost::shared_ptr<ARDOUR::Region>);
void handle_region_removed (boost::shared_ptr<ARDOUR::Region>);
@@ -848,7 +843,7 @@ class Editor : public PublicEditor
void cut_copy_ranges (Editing::CutCopyOp);
void mouse_paste ();
- void paste_internal (jack_nframes_t position, float times);
+ void paste_internal (nframes_t position, float times);
/* EDITING OPERATIONS */
@@ -860,16 +855,16 @@ class Editor : public PublicEditor
void lower_region ();
void lower_region_to_bottom ();
void split_region ();
- void split_region_at (jack_nframes_t);
- void split_regions_at (jack_nframes_t, RegionSelection&);
+ void split_region_at (nframes_t);
+ void split_regions_at (nframes_t, RegionSelection&);
void crop_region_to_selection ();
- void set_a_regions_sync_position (boost::shared_ptr<ARDOUR::Region>, jack_nframes_t);
+ void set_a_regions_sync_position (boost::shared_ptr<ARDOUR::Region>, nframes_t);
void set_region_sync_from_edit_cursor ();
void remove_region_sync();
- void align_selection (ARDOUR::RegionPoint, jack_nframes_t position);
- void align_selection_relative (ARDOUR::RegionPoint point, jack_nframes_t position);
- void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, jack_nframes_t position);
- void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, jack_nframes_t position);
+ void align_selection (ARDOUR::RegionPoint, nframes_t position);
+ 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 ();
@@ -927,8 +922,8 @@ class Editor : public PublicEditor
void temporal_zoom_selection ();
void temporal_zoom_session ();
void temporal_zoom (gdouble scale);
- void temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const string & op);
- void temporal_zoom_to_frame (bool coarser, jack_nframes_t frame);
+ void temporal_zoom_by_frame (nframes_t start, nframes_t end, const string & op);
+ void temporal_zoom_to_frame (bool coarser, nframes_t frame);
void amplitude_zoom (gdouble scale);
void amplitude_zoom_step (bool in);
@@ -938,13 +933,13 @@ class Editor : public PublicEditor
void add_external_audio_action (Editing::ImportMode);
- void bring_in_external_audio (Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t& pos, bool prompt);
- void do_import (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t&, bool);
- void do_embed (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t&, bool);
- int import_sndfile (Glib::ustring path, Editing::ImportMode mode, ARDOUR::AudioTrack* track, jack_nframes_t& pos);
+ void bring_in_external_audio (Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t& pos, bool prompt);
+ void do_import (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t&, bool);
+ void do_embed (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t&, bool);
+ int import_sndfile (Glib::ustring path, Editing::ImportMode mode, ARDOUR::AudioTrack* track, nframes_t& pos);
int embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
- ARDOUR::AudioTrack* track, jack_nframes_t& pos, bool prompt);
- int finish_bringing_in_audio (boost::shared_ptr<ARDOUR::AudioRegion> region, uint32_t, uint32_t, ARDOUR::AudioTrack* track, jack_nframes_t& pos, Editing::ImportMode mode);
+ ARDOUR::AudioTrack* track, nframes_t& pos, bool prompt);
+ int finish_bringing_in_audio (boost::shared_ptr<ARDOUR::AudioRegion> region, uint32_t, uint32_t, ARDOUR::AudioTrack* track, nframes_t& pos, Editing::ImportMode mode);
/* generic interthread progress window */
@@ -1025,7 +1020,7 @@ class Editor : public PublicEditor
void keyboard_selection_begin ();
void keyboard_selection_finish (bool add);
bool have_pending_keyboard_selection;
- jack_nframes_t pending_keyboard_selection_start;
+ nframes_t pending_keyboard_selection_start;
boost::shared_ptr<ARDOUR::Region> select_region_for_operation (int dir, TimeAxisView **tv);
void extend_selection_to_end_of_region (bool next);
@@ -1101,11 +1096,11 @@ class Editor : public PublicEditor
void remove_gain_control_point (ArdourCanvas::Item*, GdkEvent*);
void remove_control_point (ArdourCanvas::Item*, GdkEvent*);
- void mouse_brush_insert_region (RegionView*, jack_nframes_t pos);
- void brush (jack_nframes_t);
+ void mouse_brush_insert_region (RegionView*, nframes_t pos);
+ void brush (nframes_t);
- void show_verbose_time_cursor (jack_nframes_t frame, double offset = 0, double xpos=-1, double ypos=-1);
- void show_verbose_duration_cursor (jack_nframes_t start, jack_nframes_t end, double offset = 0, double xpos=-1, double ypos=-1);
+ void show_verbose_time_cursor (nframes_t frame, double offset = 0, double xpos=-1, double ypos=-1);
+ void show_verbose_duration_cursor (nframes_t start, nframes_t end, double offset = 0, double xpos=-1, double ypos=-1);
/* Canvas event handlers */
@@ -1204,8 +1199,8 @@ class Editor : public PublicEditor
void new_tempo_section ();
- void mouse_add_new_tempo_event (jack_nframes_t where);
- void mouse_add_new_meter_event (jack_nframes_t where);
+ void mouse_add_new_tempo_event (nframes_t where);
+ void mouse_add_new_meter_event (nframes_t where);
void remove_tempo_marker (ArdourCanvas::Item*);
void remove_meter_marker (ArdourCanvas::Item*);
@@ -1259,7 +1254,7 @@ class Editor : public PublicEditor
void tempo_map_changed (ARDOUR::Change);
void redisplay_tempo ();
- void snap_to (jack_nframes_t& first, int32_t direction = 0, bool for_mark = false);
+ void snap_to (nframes_t& first, int32_t direction = 0, bool for_mark = false);
uint32_t bbt_beat_subdivision;
/* toolbar */
@@ -1357,7 +1352,7 @@ class Editor : public PublicEditor
void region_selection_op (void (ARDOUR::Region::*pmf)(void*), void*);
void region_selection_op (void (ARDOUR::Region::*pmf)(bool), bool);
- bool audio_region_selection_covers (jack_nframes_t where);
+ bool audio_region_selection_covers (nframes_t where);
/* transport range select process */
enum RangeMarkerOp {
@@ -1398,7 +1393,7 @@ class Editor : public PublicEditor
void drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
void end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
- bool select_all_within (jack_nframes_t start, jack_nframes_t end, gdouble topy, gdouble boty, Selection::Operation op);
+ bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, Selection::Operation op);
ArdourCanvas::SimpleRect *rubberband_rect;
@@ -1409,7 +1404,7 @@ class Editor : public PublicEditor
void end_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
ArdourCanvas::SimpleRect *zoom_rect;
- void reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end);
+ void reposition_zoom_rect (nframes_t start, nframes_t end);
/* diskstream/route display management */
@@ -1429,9 +1424,9 @@ class Editor : public PublicEditor
Glib::RefPtr<Gtk::TreeSelection> route_display_selection;
gint route_list_compare_func (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator);
- Gtkmm2ext::DnDTreeView route_list_display;
- Gtk::ScrolledWindow route_list_scroller;
- Gtk::Menu* route_list_menu;
+ Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > route_list_display;
+ Gtk::ScrolledWindow route_list_scroller;
+ Gtk::Menu* route_list_menu;
bool route_list_display_button_press (GdkEventButton*);
bool route_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
@@ -1503,10 +1498,11 @@ class Editor : public PublicEditor
/* autoscrolling */
+ bool autoscroll_active;
int autoscroll_timeout_tag;
int autoscroll_direction;
uint32_t autoscroll_cnt;
- jack_nframes_t autoscroll_distance;
+ nframes_t autoscroll_distance;
static gint _autoscroll_canvas (void *);
bool autoscroll_canvas ();
@@ -1524,9 +1520,9 @@ class Editor : public PublicEditor
void start_trim (ArdourCanvas::Item*, GdkEvent*);
void point_trim (GdkEvent*);
void trim_motion_callback (ArdourCanvas::Item*, GdkEvent*);
- void single_contents_trim (RegionView&, jack_nframes_t, bool, bool, bool);
- void single_start_trim (RegionView&, jack_nframes_t, bool, bool);
- void single_end_trim (RegionView&, jack_nframes_t, bool, bool);
+ void single_contents_trim (RegionView&, nframes_t, bool, bool, bool);
+ void single_start_trim (RegionView&, nframes_t, bool, bool);
+ void single_end_trim (RegionView&, nframes_t, bool, bool);
void trim_finished_callback (ArdourCanvas::Item*, GdkEvent*);
void thaw_region_after_trim (RegionView& rv);
@@ -1580,7 +1576,7 @@ class Editor : public PublicEditor
ExportDialog *export_dialog;
ExportDialog *export_range_markers_dialog;
- void export_range (jack_nframes_t start, jack_nframes_t end);
+ void export_range (nframes_t start, nframes_t end);
void export_range_markers ();
int write_region_selection(RegionSelection&);
@@ -1654,7 +1650,7 @@ class Editor : public PublicEditor
Gtk::Menu* edit_menu;
bool edit_menu_map_handler (GdkEventAny*);
- jack_nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
+ nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
void time_fx_motion (ArdourCanvas::Item*, GdkEvent*);
void start_time_fx (ArdourCanvas::Item*, GdkEvent*);
@@ -1770,7 +1766,7 @@ class Editor : public PublicEditor
Gtk::VBox nudge_vbox;
AudioClock nudge_clock;
- jack_nframes_t get_nudge_distance (jack_nframes_t pos, jack_nframes_t& next);
+ nframes_t get_nudge_distance (nframes_t pos, nframes_t& next);
/* audio filters */
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index f1b9ef4b83..6fb8950047 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -5,6 +5,7 @@
#include "editing.h"
#include "actions.h"
#include "ardour_ui.h"
+#include "gui_thread.h"
#include "i18n.h"
using namespace Gtk;
@@ -41,9 +42,6 @@ Editor::register_actions ()
ActionManager::register_action (editor_actions, X_("Layering"), _("Layering"));
ActionManager::register_action (editor_actions, X_("SMPTE"), _("SMPTE fps"));
ActionManager::register_action (editor_actions, X_("Pullup"), _("Pullup / Pulldown"));
- ActionManager::register_action (editor_actions, X_("Metering"), _("Metering"));
- ActionManager::register_action (editor_actions, X_("MeteringFallOffRate"), _("Fall off rate"));
- ActionManager::register_action (editor_actions, X_("MeteringHoldTime"), _("Hold Time"));
ActionManager::register_action (editor_actions, X_("addExistingAudioFiles"), _("Add Existing Audio"));
/* add named actions for the editor */
@@ -368,32 +366,11 @@ Editor::register_actions ()
ActionManager::register_toggle_action (editor_actions, X_("ToggleWaveformsWhileRecording"), _("Show Waveforms While Recording"), mem_fun (*this, &Editor::toggle_waveforms_while_recording));
act = ActionManager::register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("Show Measures"), mem_fun (*this, &Editor::toggle_measure_visibility));
- RadioAction::Group meter_falloff_group;
- RadioAction::Group meter_hold_group;
-
- /*
- Slowest = 6.6dB/sec falloff at update rate of 40ms
- Slow = 6.8dB/sec falloff at update rate of 40ms
- */
-
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffOff"), _("Off"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlowest"), _("Slowest"), bind (mem_fun (*this, &Editor::set_meter_falloff), 1));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlow"), _("Slow"), bind (mem_fun (*this, &Editor::set_meter_falloff), 2));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffMedium"), _("Medium"), bind (mem_fun (*this, &Editor::set_meter_falloff), 3));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFast"), _("Fast"), bind (mem_fun (*this, &Editor::set_meter_falloff), 4));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFaster"), _("Faster"), bind (mem_fun (*this, &Editor::set_meter_falloff), 5));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFastest"), _("Fastest"), bind (mem_fun (*this, &Editor::set_meter_falloff), 6));
-
- ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldOff"), _("Off"), bind (mem_fun (*this, &Editor::set_meter_hold), 0));
- ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldShort"), _("Short"), bind (mem_fun (*this, &Editor::set_meter_hold), 40));
- ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldMedium"), _("Medium"), bind (mem_fun (*this, &Editor::set_meter_hold), 100));
- ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldLong"), _("Long"), bind (mem_fun (*this, &Editor::set_meter_hold), 200));
-
RadioAction::Group layer_model_group;
- ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerLaterHigher"), _("Later is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), Session::LaterHigher));
- ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerMoveAddHigher"), _("Most Recently Moved/Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), Session::MoveAddHigher));
- ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerAddHigher"), _("Most Recently Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), Session::AddHigher));
+ ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerLaterHigher"), _("Later is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), LaterHigher));
+ ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerMoveAddHigher"), _("Most Recently Moved/Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), MoveAddHigher));
+ ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerAddHigher"), _("Most Recently Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), AddHigher));
RadioAction::Group smpte_group;
@@ -458,37 +435,168 @@ Editor::toggle_measure_visibility ()
}
void
-Editor::toggle_auto_xfade ()
+Editor::set_crossfade_model (CrossfadeModel model)
{
- Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-auto-xfades"));
+ RefPtr<Action> act;
+
+ /* 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.
+ */
+
+ switch (model) {
+ case FullCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
+ break;
+ case ShortCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
+ break;
+ }
+
if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- Config->set_auto_xfade (tact->get_active());
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active()) {
+ Config->set_xfade_model (model);
+ }
}
}
void
-Editor::toggle_xfades_active ()
+Editor::update_crossfade_model ()
{
- Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-active"));
- if (session && act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- session->set_crossfades_active (tact->get_active());
+ RefPtr<Action> act;
+
+ switch (Config->get_xfade_model()) {
+ case FullCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
+ break;
+ case ShortCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
+ break;
+ }
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
}
}
void
-Editor::toggle_xfade_visibility ()
+Editor::update_smpte_mode ()
{
- Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-visible"));
- if (session && act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- // set_xfade_visibility (tact->get_active());
+ ENSURE_GUI_THREAD(mem_fun(*this, &Editor::update_smpte_mode));
+
+ RefPtr<Action> act;
+ const char* action = 0;
+
+ float frames = Config->get_smpte_frames_per_second();
+ bool drop = Config->get_smpte_drop_frames();
+
+ if ((frames < 23.976 * 1.0005) && !drop)
+ action = X_("Smpte23976");
+ else if ((frames < 24 * 1.0005) && !drop)
+ action = X_("Smpte24");
+ else if ((frames < 24.976 * 1.0005) && !drop)
+ action = X_("Smpte24976");
+ else if ((frames < 25 * 1.0005) && !drop)
+ action = X_("Smpte25");
+ else if ((frames < 29.97 * 1.0005) && !drop)
+ action = X_("Smpte2997");
+ else if ((frames < 29.97 * 1.0005) && drop)
+ action = X_("Smpte2997drop");
+ else if ((frames < 30 * 1.0005) && !drop)
+ action = X_("Smpte30");
+ else if ((frames < 30 * 1.0005) && drop)
+ action = X_("Smpte30drop");
+ else if ((frames < 59.94 * 1.0005) && !drop)
+ action = X_("Smpte5994");
+ else if ((frames < 60 * 1.0005) && !drop)
+ action = X_("Smpte60");
+ else {
+ fatal << string_compose (_("programming error: Unexpected SMPTE value (%1, drop = %2) in update_smpte_mode. Menu is probably wrong."),
+ frames, drop) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ act = ActionManager::get_action (X_("Editor"), action);
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
+ }
+}
+
+void
+Editor::update_video_pullup ()
+{
+ ENSURE_GUI_THREAD (mem_fun(*this, &Editor::update_video_pullup));
+
+ RefPtr<Action> act;
+ const char* action = 0;
+
+ float pullup = Config->get_video_pullup();
+
+ if ( pullup < (-4.1667 - 0.1) * 0.99) {
+ action = X_("PullupMinus4Minus1");
+ } else if ( pullup < (-4.1667) * 0.99 ) {
+ action = X_("PullupMinus4");
+ } else if ( pullup < (-4.1667 + 0.1) * 0.99 ) {
+ action = X_("PullupMinus4Plus1");
+ } else if ( pullup < (-0.1) * 0.99 ) {
+ action = X_("PullupMinus1");
+ } else if (pullup > (4.1667 + 0.1) * 0.99 ) {
+ action = X_("PullupPlus4Plus1");
+ } else if ( pullup > (4.1667) * 0.99 ) {
+ action = X_("PullupPlus4");
+ } else if ( pullup > (4.1667 - 0.1) * 0.99) {
+ action = X_("PullupPlus4Minus1");
+ } else if ( pullup > (0.1) * 0.99 ) {
+ action = X_("PullupPlus1");
+ } else {
+ action = X_("PullupNone");
+ }
+
+ act = ActionManager::get_action (X_("Editor"), action);
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
}
}
void
-Editor::set_layer_model (Session::LayerModel model)
+Editor::update_layering_model ()
+{
+ RefPtr<Action> act;
+
+ switch (Config->get_layer_model()) {
+ case LaterHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
+ break;
+ case MoveAddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
+ break;
+ case AddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
+ break;
+ }
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
+ }
+}
+
+void
+Editor::set_layer_model (LayerModel model)
{
/* 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
@@ -497,24 +605,22 @@ Editor::set_layer_model (Session::LayerModel model)
RefPtr<Action> act;
- if (session) {
- switch (model) {
- case Session::LaterHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
- break;
- case Session::MoveAddHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
- break;
- case Session::AddHigher:
- act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
- break;
- }
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active()) {
- session->set_layer_model (model);
- }
+ switch (model) {
+ case LaterHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
+ break;
+ case MoveAddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
+ break;
+ case AddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
+ break;
+ }
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_layer_model() != model) {
+ Config->set_layer_model (model);
}
}
}
@@ -606,88 +712,114 @@ Editor::video_pullup_chosen (Session::PullupFormat pullup)
active.
*/
- if (session) {
-
- RefPtr<Action> act;
-
- float pull = 0.0;
+ const char* action = 0;
- switch (pullup) {
- case Session::pullup_Plus4Plus1:{
- pull = 4.1667 + 0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4Plus1"));
- } break;
- case Session::pullup_Plus4:{
- pull = 4.1667;
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4"));
- } break;
- case Session::pullup_Plus4Minus1:{
- pull = 4.1667 - 0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4Minus1"));
- } break;
- case Session::pullup_Plus1:{
- pull = 0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupPlus1"));
- } break;
- case Session::pullup_None:{
- pull = 0.0;
- act = ActionManager::get_action (X_("Editor"), X_("PullupNone"));
- } break;
- case Session::pullup_Minus1:{
- pull = -0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus1"));
- } break;
- case Session::pullup_Minus4Plus1:{
- pull = -4.1667 + 0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4Plus1"));
- } break;
- case Session::pullup_Minus4:{
- pull = -4.1667;
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4"));
- } break;
- case Session::pullup_Minus4Minus1:{
- pull = -4.1667 - 0.1;
- act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4Minus1"));
- } break;
- default:
- cerr << "Session received unexpected pullup type" << endl;
+ RefPtr<Action> act;
+
+ float pull = 0.0;
+
+ switch (pullup) {
+ case Session::pullup_Plus4Plus1:
+ pull = 4.1667 + 0.1;
+ action = X_("PullupPlus4Plus1");
+ break;
+ case Session::pullup_Plus4:
+ pull = 4.1667;
+ action = X_("PullupPlus4");
+ break;
+ case Session::pullup_Plus4Minus1:
+ pull = 4.1667 - 0.1;
+ action = X_("PullupPlus4Minus1");
+ break;
+ case Session::pullup_Plus1:
+ pull = 0.1;
+ action = X_("PullupPlus1");
+ break;
+ case Session::pullup_None:
+ pull = 0.0;
+ action = X_("PullupNone");
+ break;
+ case Session::pullup_Minus1:
+ pull = -0.1;
+ action = X_("PullupMinus1");
+ break;
+ case Session::pullup_Minus4Plus1:
+ pull = -4.1667 + 0.1;
+ action = X_("PullupMinus4Plus1");
+ break;
+ case Session::pullup_Minus4:
+ pull = -4.1667;
+ action = X_("PullupMinus4");
+ break;
+ case Session::pullup_Minus4Minus1:
+ pull = -4.1667 - 0.1;
+ action = X_("PullupMinus4Minus1");
+ break;
+ default:
+ fatal << string_compose (_("programming error: %1"), "Session received unexpected pullup type") << endmsg;
+ /*NOTREACHED*/
+ }
+
+ act = ActionManager::get_action (X_("Editor"), action);
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active()) {
+ Config->set_video_pullup ( pull );
}
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active()) {
- session->set_video_pullup ( pull );
- }
- } else cerr << "Editor::video_pullup_chosen could not find action to match pullup." << endl;
+ } else {
+ error << string_compose (_("programming error: %1"), "Editor::video_pullup_chosen could not find action to match pullup.") << endmsg;
}
}
+void
+Editor::toggle_auto_xfade ()
+{
+ ActionManager::toggle_config_state ("Editor", "toggle-auto-xfades", &Configuration::set_auto_xfade, &Configuration::get_auto_xfade);
+}
void
-Editor::set_crossfade_model (CrossfadeModel model)
+Editor::toggle_xfades_active ()
{
- RefPtr<Action> act;
+ ActionManager::toggle_config_state ("Editor", "toggle-xfades-active", &Configuration::set_crossfades_active, &Configuration::get_crossfades_active);
+}
- /* 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.
- */
+void
+Editor::toggle_xfade_visibility ()
+{
+ ActionManager::toggle_config_state ("Editor", "toggle-xfades-visibility", &Configuration::set_crossfades_visible, &Configuration::get_crossfades_visible);
+}
- if (session) {
- switch (model) {
- case FullCrossfade:
- act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
- break;
- case ShortCrossfade:
- act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
- break;
- }
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active()) {
- session->set_xfade_model (model);
- }
- }
+void
+Editor::parameter_changed (const char* parameter_name)
+{
+#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
+
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::parameter_changed), parameter_name));
+
+ if (PARAM_IS ("auto-loop")) {
+ update_loop_range_view (true);
+ } else if (PARAM_IS ("punch-in")) {
+ update_punch_range_view (true);
+ } else if (PARAM_IS ("punch-out")) {
+ update_punch_range_view (true);
+ } else if (PARAM_IS ("layer-model")) {
+ update_layering_model ();
+ } else if (PARAM_IS ("smpte-frames-per-second") || PARAM_IS ("smpte-drop-frames")) {
+ update_smpte_mode ();
+ update_just_smpte ();
+ } else if (PARAM_IS ("video-pullup")) {
+ update_video_pullup ();
+ } else if (PARAM_IS ("crossfades-active")) {
+ ActionManager::map_some_state ("Editor", "toggle-xfades-active", &Configuration::get_crossfades_active);
+ } else if (PARAM_IS ("crossfades-visible")) {
+ ActionManager::map_some_state ("Editor", "toggle-xfades-visible", &Configuration::get_crossfades_visible);
+ } else if (PARAM_IS ("auto-xfade")) {
+ ActionManager::map_some_state ("Editor", "toggle-auto-xfades", &Configuration::get_auto_xfade);
+ } else if (PARAM_IS ("edit-mode")) {
+ edit_mode_selector.set_active_text (edit_mode_to_string (Config->get_edit_mode()));
}
+
+#undef PARAM_IS
}
diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc
index e38dee5953..eb232ff802 100644
--- a/gtk2_ardour/editor_audio_import.cc
+++ b/gtk2_ardour/editor_audio_import.cc
@@ -55,7 +55,7 @@ using namespace Editing;
void
Editor::add_external_audio_action (ImportMode mode)
{
- jack_nframes_t& pos = edit_cursor->current_frame;
+ nframes_t& pos = edit_cursor->current_frame;
AudioTrack* track = 0;
if (!selection->tracks.empty()) {
@@ -69,7 +69,7 @@ Editor::add_external_audio_action (ImportMode mode)
}
void
-Editor::bring_in_external_audio (ImportMode mode, AudioTrack* track, jack_nframes_t& pos, bool prompt)
+Editor::bring_in_external_audio (ImportMode mode, AudioTrack* track, nframes_t& pos, bool prompt)
{
if (session == 0) {
MessageDialog msg (0, _("You can't import or embed an audiofile until you have a session loaded."));
@@ -95,7 +95,7 @@ Editor::bring_in_external_audio (ImportMode mode, AudioTrack* track, jack_nframe
}
void
-Editor::do_import (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, jack_nframes_t& pos, bool prompt)
+Editor::do_import (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, nframes_t& pos, bool prompt)
{
/* SFDB sets "multichan" to true to indicate "split channels"
so reverse the setting to match the way libardour
@@ -120,7 +120,7 @@ Editor::do_import (vector<Glib::ustring> paths, bool split, ImportMode mode, Aud
}
void
-Editor::do_embed (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, jack_nframes_t& pos, bool prompt)
+Editor::do_embed (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, nframes_t& pos, bool prompt)
{
bool multiple_files = paths.size() > 1;
bool check_sample_rate = true;
@@ -140,7 +140,7 @@ Editor::do_embed (vector<Glib::ustring> paths, bool split, ImportMode mode, Audi
}
int
-Editor::import_sndfile (Glib::ustring path, ImportMode mode, AudioTrack* track, jack_nframes_t& pos)
+Editor::import_sndfile (Glib::ustring path, ImportMode mode, AudioTrack* track, nframes_t& pos)
{
interthread_progress_window->set_title (string_compose (_("ardour: importing %1"), path));
interthread_progress_window->set_position (Gtk::WIN_POS_MOUSE);
@@ -188,7 +188,7 @@ Editor::import_sndfile (Glib::ustring path, ImportMode mode, AudioTrack* track,
int
Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool& check_sample_rate, ImportMode mode,
- AudioTrack* track, jack_nframes_t& pos, bool prompt)
+ AudioTrack* track, nframes_t& pos, bool prompt)
{
boost::shared_ptr<AudioFileSource> source;
SourceList sources;
@@ -294,7 +294,7 @@ Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool
input_chan = finfo.channels;
- if (session->get_output_auto_connect() & Session::AutoConnectMaster) {
+ if (Config->get_output_auto_connect() & AutoConnectMaster) {
output_chan = (session->master_out() ? session->master_out()->n_inputs().get(DataType::AUDIO) : input_chan);
} else {
output_chan = input_chan;
@@ -308,7 +308,7 @@ Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool
}
int
-Editor::finish_bringing_in_audio (boost::shared_ptr<AudioRegion> region, uint32_t in_chans, uint32_t out_chans, AudioTrack* track, jack_nframes_t& pos, ImportMode mode)
+Editor::finish_bringing_in_audio (boost::shared_ptr<AudioRegion> region, uint32_t in_chans, uint32_t out_chans, AudioTrack* track, nframes_t& pos, ImportMode mode)
{
switch (mode) {
case ImportAsRegion:
diff --git a/gtk2_ardour/editor_audiotrack.cc b/gtk2_ardour/editor_audiotrack.cc
index 00a8e1db9f..f524dcdd40 100644
--- a/gtk2_ardour/editor_audiotrack.cc
+++ b/gtk2_ardour/editor_audiotrack.cc
@@ -17,8 +17,8 @@ Editor::set_route_loop_selection ()
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
Location* loc = transport_loop_location();
@@ -27,7 +27,7 @@ Editor::set_route_loop_selection ()
loc->set (start, end);
// enable looping, reposition and start rolling
- session->request_auto_loop (true);
+ session->request_play_loop (true);
session->request_locate (loc->start(), true);
}
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index e2e04326ca..2d854a384b 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -52,7 +52,7 @@ using namespace Glib;
using namespace Gtkmm2ext;
using namespace Editing;
-/* XXX this is a hack. it ought to be the maximum value of an jack_nframes_t */
+/* XXX this is a hack. it ought to be the maximum value of an nframes_t */
const double max_canvas_coordinate = (double) JACK_MAX_FRAMES;
@@ -279,7 +279,7 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
canvas_width = alloc.get_width();
canvas_height = alloc.get_height();
- zoom_range_clock.set ((jack_nframes_t) floor ((canvas_width * frames_per_unit)));
+ zoom_range_clock.set ((nframes_t) floor ((canvas_width * frames_per_unit)));
edit_cursor->set_position (edit_cursor->current_frame);
playhead_cursor->set_position (playhead_cursor->current_frame);
@@ -438,7 +438,7 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context,
vector<ustring> paths;
string spath;
GdkEvent ev;
- jack_nframes_t frame;
+ nframes_t frame;
if (convert_drop_to_paths (paths, context, x, y, data, info, time)) {
goto out;
@@ -466,7 +466,7 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context,
/* drop onto canvas background: create new tracks */
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
do_embed (paths, false, ImportAsTrack, 0, pos, false);
} else if ((tv = dynamic_cast<RouteTimeAxisView*>(tvp)) != 0) {
@@ -488,11 +488,12 @@ Editor::drop_regions (const RefPtr<Gdk::DragContext>& context,
const SelectionData& data,
guint info, guint time)
{
- const DnDTreeView::SerializedObjectPointers* sr = reinterpret_cast<const DnDTreeView::SerializedObjectPointers*> (data.get_data());
+ const SerializedObjectPointers<boost::shared_ptr<Region> >* sr =
+ reinterpret_cast<const SerializedObjectPointers<boost::shared_ptr<Region> > *> (data.get_data());
for (uint32_t i = 0; i < sr->cnt; ++i) {
- boost::shared_ptr<Region> r (reinterpret_cast<Region*> (sr->ptr[i]));
+ boost::shared_ptr<Region> r = sr->data[i];
insert_region_list_drag (r, x, y);
}
@@ -503,8 +504,8 @@ Editor::drop_regions (const RefPtr<Gdk::DragContext>& context,
void
Editor::maybe_autoscroll (GdkEvent* event)
{
- jack_nframes_t rightmost_frame = leftmost_frame + current_page_frames();
- jack_nframes_t frame = drag_info.current_pointer_frame;
+ nframes_t rightmost_frame = leftmost_frame + current_page_frames();
+ nframes_t frame = drag_info.current_pointer_frame;
bool startit = false;
static int last_autoscroll_direction = 0;
@@ -553,10 +554,10 @@ Editor::_autoscroll_canvas (void *arg)
bool
Editor::autoscroll_canvas ()
{
- jack_nframes_t new_frame;
- jack_nframes_t limit = max_frames - current_page_frames();
+ nframes_t new_frame;
+ nframes_t limit = max_frames - current_page_frames();
GdkEventMotion ev;
- jack_nframes_t target_frame;
+ nframes_t target_frame;
if (autoscroll_direction < 0) {
if (leftmost_frame < autoscroll_distance) {
@@ -606,17 +607,17 @@ Editor::autoscroll_canvas ()
/* after about a while, speed up a bit by changing the timeout interval */
- autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/30.0f);
+ autoscroll_distance = (nframes_t) floor (current_page_frames()/30.0f);
} else if (autoscroll_cnt == 150) { /* 1.0 seconds */
- autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/20.0f);
+ autoscroll_distance = (nframes_t) floor (current_page_frames()/20.0f);
} else if (autoscroll_cnt == 300) { /* 1.5 seconds */
/* after about another while, speed up by increasing the shift per callback */
- autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/10.0f);
+ autoscroll_distance = (nframes_t) floor (current_page_frames()/10.0f);
}
@@ -626,14 +627,15 @@ Editor::autoscroll_canvas ()
void
Editor::start_canvas_autoscroll (int dir)
{
- if (!session) {
+ if (!session || autoscroll_active) {
return;
}
stop_canvas_autoscroll ();
+ autoscroll_active = true;
autoscroll_direction = dir;
- autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/100.0);
+ autoscroll_distance = (nframes_t) floor (current_page_frames()/50.0);
autoscroll_cnt = 0;
/* do it right now, which will start the repeated callbacks */
@@ -648,6 +650,8 @@ Editor::stop_canvas_autoscroll ()
g_source_remove (autoscroll_timeout_tag);
autoscroll_timeout_tag = -1;
}
+
+ autoscroll_active = false;
}
gint
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc
index 58f9deebbd..249a65ae01 100644
--- a/gtk2_ardour/editor_canvas_events.cc
+++ b/gtk2_ardour/editor_canvas_events.cc
@@ -70,7 +70,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
event.button.x = wx;
event.button.y = wy;
- jack_nframes_t where = event_frame (&event, 0, 0);
+ nframes_t where = event_frame (&event, 0, 0);
temporal_zoom_to_frame (true, where);
return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
@@ -101,7 +101,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
event.button.x = wx;
event.button.y = wy;
- jack_nframes_t where = event_frame (&event, 0, 0);
+ nframes_t where = event_frame (&event, 0, 0);
temporal_zoom_to_frame (false, where);
return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
diff --git a/gtk2_ardour/editor_cursors.cc b/gtk2_ardour/editor_cursors.cc
index 2353481daf..7cd13cf686 100644
--- a/gtk2_ardour/editor_cursors.cc
+++ b/gtk2_ardour/editor_cursors.cc
@@ -63,7 +63,7 @@ Editor::Cursor::~Cursor ()
}
void
-Editor::Cursor::set_position (jack_nframes_t frame)
+Editor::Cursor::set_position (nframes_t frame)
{
double new_pos = editor.frame_to_unit (frame);
diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc
index 1b0308b080..4526862f79 100644
--- a/gtk2_ardour/editor_export_audio.cc
+++ b/gtk2_ardour/editor_export_audio.cc
@@ -56,7 +56,7 @@ void
Editor::export_session()
{
if (session) {
- export_range (0, session->current_end_frame());
+ export_range (session->current_start_frame(), session->current_end_frame());
}
}
@@ -75,7 +75,7 @@ Editor::export_selection ()
}
void
-Editor::export_range (jack_nframes_t start, jack_nframes_t end)
+Editor::export_range (nframes_t start, nframes_t end)
{
if (session) {
if (export_dialog == 0) {
@@ -162,11 +162,11 @@ bool
Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
{
boost::shared_ptr<AudioFileSource> fs;
- const jack_nframes_t chunk_size = 4096;
- jack_nframes_t to_read;
+ const nframes_t chunk_size = 4096;
+ nframes_t to_read;
Sample buf[chunk_size];
gain_t gain_buffer[chunk_size];
- jack_nframes_t pos;
+ nframes_t pos;
char s[PATH_MAX+1];
uint32_t cnt;
vector<boost::shared_ptr<AudioFileSource> > sources;
@@ -229,7 +229,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
pos = region->position();
while (to_read) {
- jack_nframes_t this_time;
+ nframes_t this_time;
this_time = min (to_read, chunk_size);
@@ -306,11 +306,11 @@ bool
Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list<AudioRange>& range)
{
boost::shared_ptr<AudioFileSource> fs;
- const jack_nframes_t chunk_size = 4096;
- jack_nframes_t nframes;
+ const nframes_t chunk_size = 4096;
+ nframes_t nframes;
Sample buf[chunk_size];
gain_t gain_buffer[chunk_size];
- jack_nframes_t pos;
+ nframes_t pos;
char s[PATH_MAX+1];
uint32_t cnt;
string path;
@@ -361,7 +361,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
pos = (*i).start;
while (nframes) {
- jack_nframes_t this_time;
+ nframes_t this_time;
this_time = min (nframes, chunk_size);
@@ -393,7 +393,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
while (nframes) {
- jack_nframes_t this_time = min (nframes, chunk_size);
+ nframes_t this_time = min (nframes, chunk_size);
memset (buf, 0, sizeof (Sample) * this_time);
for (uint32_t n=0; n < channels; ++n) {
diff --git a/gtk2_ardour/editor_imageframe.cc b/gtk2_ardour/editor_imageframe.cc
index 2cabb95461..adb64125fc 100644
--- a/gtk2_ardour/editor_imageframe.cc
+++ b/gtk2_ardour/editor_imageframe.cc
@@ -96,10 +96,10 @@ void
Editor::scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)
{
// GTK2FIX
- //jack_nframes_t offset = static_cast<jack_nframes_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
- jack_nframes_t offset = 0;
+ //nframes_t offset = static_cast<nframes_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
+ nframes_t offset = 0;
- jack_nframes_t x_pos = 0 ;
+ nframes_t x_pos = 0 ;
if(item->get_position() < offset)
{
x_pos = 0 ;
@@ -494,14 +494,14 @@ Editor::markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
double cx, cy ;
MarkerView* mv = reinterpret_cast<MarkerView*>(drag_info.data) ;
- jack_nframes_t pending_region_position ;
- jack_nframes_t pointer_frame ;
+ nframes_t pending_region_position ;
+ nframes_t pointer_frame ;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
- if (pointer_frame > (jack_nframes_t) drag_info.pointer_frame_offset)
+ if (pointer_frame > (nframes_t) drag_info.pointer_frame_offset)
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
@@ -542,14 +542,14 @@ Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*>(drag_info.data) ;
- jack_nframes_t pending_region_position;
- jack_nframes_t pointer_frame;
+ nframes_t pending_region_position;
+ nframes_t pointer_frame;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
- if (pointer_frame > (jack_nframes_t) drag_info.pointer_frame_offset)
+ if (pointer_frame > (nframes_t) drag_info.pointer_frame_offset)
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
@@ -577,7 +577,7 @@ Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
void
Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* event)
{
- jack_nframes_t where ;
+ nframes_t where ;
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
bool item_x_movement = (drag_info.last_frame_position != tavi->get_position()) ;
@@ -675,9 +675,9 @@ Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
- jack_nframes_t start = 0 ;
- jack_nframes_t end = 0 ;
- jack_nframes_t pointer_frame = event_frame(event) ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
// chekc th eposition of the item is not locked
if(!ifv->get_position_locked()) {
@@ -694,7 +694,7 @@ Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
}
// are we getting bigger or smaller?
- jack_nframes_t new_dur_val = end - start ;
+ nframes_t new_dur_val = end - start ;
// start handle, so a smaller pointer frame increases our component size
if(pointer_frame <= drag_info.grab_frame)
@@ -752,10 +752,10 @@ Editor::imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
}
else
{
- jack_nframes_t temp = ifv->get_position() + ifv->get_duration() ;
+ nframes_t temp = ifv->get_position() + ifv->get_duration() ;
- ifv->set_position((jack_nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
- ifv->set_duration((jack_nframes_t) drag_info.cumulative_x_drag, this) ;
+ ifv->set_position((nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
+ ifv->set_duration((nframes_t) drag_info.cumulative_x_drag, this) ;
}
}
@@ -764,10 +764,10 @@ Editor::imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
- jack_nframes_t start = 0 ;
- jack_nframes_t end = 0 ;
- jack_nframes_t pointer_frame = event_frame(event) ;
- jack_nframes_t new_dur_val = 0 ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
+ nframes_t new_dur_val = 0 ;
snap_to(pointer_frame) ;
@@ -829,7 +829,7 @@ Editor::imageframe_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
}
else
{
- jack_nframes_t new_duration = (jack_nframes_t)drag_info.cumulative_x_drag ;
+ nframes_t new_duration = (nframes_t)drag_info.cumulative_x_drag ;
if((new_duration <= ifv->get_max_duration()) && (new_duration >= ifv->get_min_duration()))
{
ifv->set_duration(new_duration, this) ;
@@ -889,9 +889,9 @@ Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
- jack_nframes_t start = 0 ;
- jack_nframes_t end = 0 ;
- jack_nframes_t pointer_frame = event_frame(event) ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
// chekc th eposition of the item is not locked
if(!mv->get_position_locked())
@@ -912,7 +912,7 @@ Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
}
// are we getting bigger or smaller?
- jack_nframes_t new_dur_val = end - start ;
+ nframes_t new_dur_val = end - start ;
if(pointer_frame <= drag_info.grab_frame)
{
@@ -969,10 +969,10 @@ Editor::markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
}
else
{
- jack_nframes_t temp = mv->get_position() + mv->get_duration() ;
+ nframes_t temp = mv->get_position() + mv->get_duration() ;
- mv->set_position((jack_nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
- mv->set_duration((jack_nframes_t) drag_info.cumulative_x_drag, this) ;
+ mv->set_position((nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
+ mv->set_duration((nframes_t) drag_info.cumulative_x_drag, this) ;
}
}
@@ -981,10 +981,10 @@ Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
- jack_nframes_t start = 0 ;
- jack_nframes_t end = 0 ;
- jack_nframes_t pointer_frame = event_frame(event) ;
- jack_nframes_t new_dur_val = 0 ;
+ nframes_t start = 0 ;
+ nframes_t end = 0 ;
+ nframes_t pointer_frame = event_frame(event) ;
+ nframes_t new_dur_val = 0 ;
snap_to(pointer_frame) ;
@@ -1009,7 +1009,7 @@ Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
{
// we cant extend beyond the item we are marking
ImageFrameView* marked_item = mv->get_marked_item() ;
- jack_nframes_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
+ nframes_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
{
@@ -1063,7 +1063,7 @@ Editor::markerview_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
}
else
{
- jack_nframes_t new_duration = (jack_nframes_t)drag_info.cumulative_x_drag ;
+ nframes_t new_duration = (nframes_t)drag_info.cumulative_x_drag ;
mv->set_duration(new_duration, this) ;
}
}
diff --git a/gtk2_ardour/editor_keyboard.cc b/gtk2_ardour/editor_keyboard.cc
index e9ccd26f46..cdea9d2272 100644
--- a/gtk2_ardour/editor_keyboard.cc
+++ b/gtk2_ardour/editor_keyboard.cc
@@ -79,7 +79,7 @@ Editor::kbd_set_edit_cursor ()
void
Editor::kbd_do_split (GdkEvent* ev)
{
- jack_nframes_t where = event_frame (ev);
+ nframes_t where = event_frame (ev);
if (entered_regionview) {
if (selection->regions.find (entered_regionview) != selection->regions.end()) {
@@ -122,7 +122,7 @@ Editor::kbd_set_sync_position ()
void
Editor::kbd_do_set_sync_position (GdkEvent* ev)
{
- jack_nframes_t where = event_frame (ev);
+ nframes_t where = event_frame (ev);
snap_to (where);
if (entered_regionview) {
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index 40f00c2e10..46383149a3 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -271,8 +271,8 @@ Editor::LocationMarkers::set_name (const string& str)
}
void
-Editor::LocationMarkers::set_position (jack_nframes_t startf,
- jack_nframes_t endf)
+Editor::LocationMarkers::set_position (nframes_t startf,
+ nframes_t endf)
{
start->set_position (startf);
if (end) { end->set_position (endf); }
@@ -286,7 +286,7 @@ Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
}
void
-Editor::mouse_add_new_marker (jack_nframes_t where)
+Editor::mouse_add_new_marker (nframes_t where)
{
if (session) {
Location *location = new Location (where, where, "mark", Location::IsMark);
@@ -745,7 +745,7 @@ Editor::marker_menu_loop_range ()
l2->set (l->start(), l->end());
// enable looping, reposition and start rolling
- session->request_auto_loop(true);
+ session->request_play_loop(true);
session->request_locate (l2->start(), true);
}
}
@@ -925,7 +925,7 @@ Editor::update_loop_range_view (bool visibility)
Location* tll;
- if (session->get_auto_loop() && ((tll = transport_loop_location()) != 0)) {
+ if (Config->get_auto_loop() && ((tll = transport_loop_location()) != 0)) {
double x1 = frame_to_pixel (tll->start());
double x2 = frame_to_pixel (tll->end());
@@ -951,7 +951,7 @@ Editor::update_punch_range_view (bool visibility)
Location* tpl;
- if ((session->get_punch_in() || session->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
+ if ((Config->get_punch_in() || Config->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
double x1 = frame_to_pixel (tpl->start());
double x2 = frame_to_pixel (tpl->end());
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc
index f9ce22ed4b..da09a95688 100644
--- a/gtk2_ardour/editor_mixer.cc
+++ b/gtk2_ardour/editor_mixer.cc
@@ -157,7 +157,7 @@ Editor::update_current_screen ()
{
if (session && engine.running()) {
- jack_nframes_t frame;
+ nframes_t frame;
frame = session->audible_frame();
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 4a8853e320..ae76025cc6 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -69,7 +69,7 @@ using namespace sigc;
using namespace Gtk;
using namespace Editing;
-jack_nframes_t
+nframes_t
Editor::event_frame (GdkEvent* event, double* pcx, double* pcy)
{
double cx, cy;
@@ -377,7 +377,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
bool
Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{
- jack_nframes_t where = event_frame (event, 0, 0);
+ nframes_t where = event_frame (event, 0, 0);
track_canvas.grab_focus();
@@ -821,7 +821,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
bool
Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{
- jack_nframes_t where = event_frame (event, 0, 0);
+ nframes_t where = event_frame (event, 0, 0);
/* no action if we're recording */
@@ -1710,7 +1710,7 @@ Editor::end_grab (ArdourCanvas::Item* item, GdkEvent* event)
void
Editor::set_edit_cursor (GdkEvent* event)
{
- jack_nframes_t pointer_frame = event_frame (event);
+ nframes_t pointer_frame = event_frame (event);
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
if (snap_type != SnapToEditCursor) {
@@ -1725,7 +1725,7 @@ Editor::set_edit_cursor (GdkEvent* event)
void
Editor::set_playhead_cursor (GdkEvent* event)
{
- jack_nframes_t pointer_frame = event_frame (event);
+ nframes_t pointer_frame = event_frame (event);
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
snap_to (pointer_frame);
@@ -1752,15 +1752,15 @@ Editor::start_fade_in_grab (ArdourCanvas::Item* item, GdkEvent* event)
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- drag_info.pointer_frame_offset = drag_info.grab_frame - ((jack_nframes_t) arv->audio_region()->fade_in().back()->when + arv->region()->position());
+ drag_info.pointer_frame_offset = drag_info.grab_frame - ((nframes_t) arv->audio_region()->fade_in().back()->when + arv->region()->position());
}
void
Editor::fade_in_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- jack_nframes_t pos;
- jack_nframes_t fade_length;
+ nframes_t pos;
+ nframes_t fade_length;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
@@ -1794,8 +1794,8 @@ Editor::fade_in_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* even
if (drag_info.first_move) return;
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- jack_nframes_t pos;
- jack_nframes_t fade_length;
+ nframes_t pos;
+ nframes_t fade_length;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
@@ -1845,15 +1845,15 @@ Editor::start_fade_out_grab (ArdourCanvas::Item* item, GdkEvent* event)
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- drag_info.pointer_frame_offset = drag_info.grab_frame - (arv->region()->length() - (jack_nframes_t) arv->audio_region()->fade_out().back()->when + arv->region()->position());
+ drag_info.pointer_frame_offset = drag_info.grab_frame - (arv->region()->length() - (nframes_t) arv->audio_region()->fade_out().back()->when + arv->region()->position());
}
void
Editor::fade_out_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- jack_nframes_t pos;
- jack_nframes_t fade_length;
+ nframes_t pos;
+ nframes_t fade_length;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
@@ -1889,8 +1889,8 @@ Editor::fade_out_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* eve
if (drag_info.first_move) return;
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
- jack_nframes_t pos;
- jack_nframes_t fade_length;
+ nframes_t pos;
+ nframes_t fade_length;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
@@ -1956,7 +1956,7 @@ void
Editor::cursor_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
Cursor* cursor = (Cursor *) drag_info.data;
- jack_nframes_t adjusted_frame;
+ nframes_t adjusted_frame;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
adjusted_frame = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
@@ -2061,7 +2061,7 @@ Editor::start_marker_grab (ArdourCanvas::Item* item, GdkEvent* event)
void
Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t f_delta;
+ nframes_t f_delta;
Marker* marker = (Marker *) drag_info.data;
Location *real_location;
Location *copy_location;
@@ -2069,7 +2069,7 @@ Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
bool move_both = false;
- jack_nframes_t newframe;
+ nframes_t newframe;
if (drag_info.pointer_frame_offset <= (long) drag_info.current_pointer_frame) {
newframe = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
}
@@ -2077,7 +2077,7 @@ Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
newframe = 0;
}
- jack_nframes_t next = newframe;
+ nframes_t next = newframe;
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
snap_to (newframe, 0, true);
@@ -2249,7 +2249,7 @@ void
Editor::meter_marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
MeterMarker* marker = (MeterMarker *) drag_info.data;
- jack_nframes_t adjusted_frame;
+ nframes_t adjusted_frame;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
adjusted_frame = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
@@ -2380,7 +2380,7 @@ void
Editor::tempo_marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
TempoMarker* marker = (TempoMarker *) drag_info.data;
- jack_nframes_t adjusted_frame;
+ nframes_t adjusted_frame;
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
adjusted_frame = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
@@ -2522,7 +2522,7 @@ Editor::control_point_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent*
cy = min ((double) cp->line.height(), cy);
//translate cx to frames
- jack_nframes_t cx_frames = unit_to_frame (cx);
+ nframes_t cx_frames = unit_to_frame (cx);
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier()) && !drag_info.x_constrained) {
snap_to (cx_frames);
@@ -2595,7 +2595,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
{
double cx;
double cy;
- jack_nframes_t frame_within_region;
+ nframes_t frame_within_region;
/* need to get x coordinate in terms of parent (TimeAxisItemView)
origin.
@@ -2604,7 +2604,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
cx = event->button.x;
cy = event->button.y;
line->parent_group().w2i (cx, cy);
- frame_within_region = (jack_nframes_t) floor (cx * frames_per_unit);
+ frame_within_region = (nframes_t) floor (cx * frames_per_unit);
if (!line->control_points_adjacent (frame_within_region, current_line_drag_info.before,
current_line_drag_info.after)) {
@@ -2684,7 +2684,7 @@ Editor::start_region_grab (ArdourCanvas::Item* item, GdkEvent* event)
speed = tv->get_diskstream()->speed();
}
- drag_info.last_frame_position = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
+ drag_info.last_frame_position = (nframes_t) (clicked_regionview->region()->position() / speed);
drag_info.pointer_frame_offset = drag_info.grab_frame - drag_info.last_frame_position;
drag_info.last_trackview = &clicked_regionview->get_time_axis_view();
// we want a move threshold
@@ -2717,7 +2717,7 @@ Editor::start_region_copy_grab (ArdourCanvas::Item* item, GdkEvent* event)
}
drag_info.last_trackview = &clicked_regionview->get_time_axis_view();
- drag_info.last_frame_position = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
+ drag_info.last_frame_position = (nframes_t) (clicked_regionview->region()->position() / speed);
drag_info.pointer_frame_offset = drag_info.grab_frame - drag_info.last_frame_position;
// we want a move threshold
drag_info.want_move_threshold = true;
@@ -2748,7 +2748,7 @@ Editor::start_region_brush_grab (ArdourCanvas::Item* item, GdkEvent* event)
speed = tv->get_diskstream()->speed();
}
- drag_info.last_frame_position = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
+ drag_info.last_frame_position = (nframes_t) (clicked_regionview->region()->position() / speed);
drag_info.pointer_frame_offset = drag_info.grab_frame - drag_info.last_frame_position;
drag_info.last_trackview = &clicked_regionview->get_time_axis_view();
// we want a move threshold
@@ -2764,7 +2764,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
double x_delta;
double y_delta = 0;
RegionView* rv = reinterpret_cast<RegionView*> (drag_info.data);
- jack_nframes_t pending_region_position = 0;
+ nframes_t pending_region_position = 0;
int32_t pointer_y_span = 0, canvas_pointer_y_span = 0, original_pointer_order;
int32_t visible_y_high = 0, visible_y_low = 512; //high meaning higher numbered.. not the height on the screen
bool clamp_y_axis = false;
@@ -2816,7 +2816,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
newregion->set_locked (false);
- to_playlist->add_region (newregion, (jack_nframes_t) (rv->region()->position() * rtv->get_diskstream()->speed()));
+ to_playlist->add_region (newregion, (nframes_t) (rv->region()->position() * rtv->get_diskstream()->speed()));
c.disconnect ();
@@ -3025,8 +3025,8 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
if ((int32_t)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
- jack_nframes_t sync_frame;
- jack_nframes_t sync_offset;
+ nframes_t sync_frame;
+ nframes_t sync_offset;
int32_t sync_dir;
pending_region_position = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
@@ -3261,7 +3261,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
void
Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t where;
+ nframes_t where;
RegionView* rv = reinterpret_cast<RegionView *> (drag_info.data);
pair<set<Playlist*>::iterator,bool> insert_result;
bool nocommit = true;
@@ -3300,7 +3300,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
speed = atv->get_diskstream()->speed();
}
- regionview_x_movement = (drag_info.last_frame_position != (jack_nframes_t) (rv->region()->position()/speed));
+ regionview_x_movement = (drag_info.last_frame_position != (nframes_t) (rv->region()->position()/speed));
regionview_y_movement = (drag_info.last_trackview != &rv->get_time_axis_view());
//printf ("last_frame: %s position is %lu %g\n", rv->get_time_axis_view().name().c_str(), drag_info.last_frame_position, speed);
@@ -3385,7 +3385,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
latest_regionview = 0;
- where = (jack_nframes_t) (unit_to_frame (ix1) * speed);
+ where = (nframes_t) (unit_to_frame (ix1) * speed);
boost::shared_ptr<Region> new_region (RegionFactory::create ((*i)->region()));
from_playlist->remove_region (((*i)->region()));
@@ -3425,7 +3425,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
rv->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
rv->get_canvas_group()->i2w (ix1, iy1);
- where = (jack_nframes_t) (unit_to_frame (ix1) * ownspeed);
+ where = (nframes_t) (unit_to_frame (ix1) * ownspeed);
} else {
@@ -3470,21 +3470,21 @@ Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Alt))) {
- align_region (rv.region(), SyncPoint, (jack_nframes_t) (edit_cursor->current_frame * speed));
+ align_region (rv.region(), SyncPoint, (nframes_t) (edit_cursor->current_frame * speed));
} else if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
- align_region (rv.region(), End, (jack_nframes_t) (edit_cursor->current_frame * speed));
+ align_region (rv.region(), End, (nframes_t) (edit_cursor->current_frame * speed));
} else {
- align_region (rv.region(), Start, (jack_nframes_t) (edit_cursor->current_frame * speed));
+ align_region (rv.region(), Start, (nframes_t) (edit_cursor->current_frame * speed));
}
}
}
void
-Editor::show_verbose_time_cursor (jack_nframes_t frame, double offset, double xpos, double ypos)
+Editor::show_verbose_time_cursor (nframes_t frame, double offset, double xpos, double ypos)
{
char buf[128];
SMPTE::Time smpte;
@@ -3509,7 +3509,7 @@ Editor::show_verbose_time_cursor (jack_nframes_t frame, double offset, double xp
case AudioClock::MinSec:
/* XXX fix this to compute min/sec properly */
session->smpte_time (frame, smpte);
- secs = smpte.seconds + ((float) smpte.frames / session->smpte_frames_per_second);
+ secs = smpte.seconds + ((float) smpte.frames / Config->get_smpte_frames_per_second());
snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%.4f", smpte.hours, smpte.minutes, secs);
break;
@@ -3528,7 +3528,7 @@ Editor::show_verbose_time_cursor (jack_nframes_t frame, double offset, double xp
}
void
-Editor::show_verbose_duration_cursor (jack_nframes_t start, jack_nframes_t end, double offset, double xpos, double ypos)
+Editor::show_verbose_duration_cursor (nframes_t start, nframes_t end, double offset, double xpos, double ypos)
{
char buf[128];
SMPTE::Time smpte;
@@ -3576,7 +3576,7 @@ Editor::show_verbose_duration_cursor (jack_nframes_t start, jack_nframes_t end,
case AudioClock::MinSec:
/* XXX fix this to compute min/sec properly */
session->smpte_duration (end - start, smpte);
- secs = smpte.seconds + ((float) smpte.frames / session->smpte_frames_per_second);
+ secs = smpte.seconds + ((float) smpte.frames / Config->get_smpte_frames_per_second());
snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%.4f", smpte.hours, smpte.minutes, secs);
break;
@@ -3685,8 +3685,8 @@ Editor::cancel_selection ()
void
Editor::start_selection_op (ArdourCanvas::Item* item, GdkEvent* event, SelectionOp op)
{
- jack_nframes_t start = 0;
- jack_nframes_t end = 0;
+ nframes_t start = 0;
+ nframes_t end = 0;
if (session == 0) {
return;
@@ -3743,10 +3743,10 @@ Editor::start_selection_op (ArdourCanvas::Item* item, GdkEvent* event, Selection
void
Editor::drag_selection (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t start = 0;
- jack_nframes_t end = 0;
- jack_nframes_t length;
- jack_nframes_t pending_position;
+ nframes_t start = 0;
+ nframes_t end = 0;
+ nframes_t length;
+ nframes_t pending_position;
if ((int32_t) drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
pending_position = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
@@ -3905,9 +3905,9 @@ Editor::start_trim (ArdourCanvas::Item* item, GdkEvent* event)
speed = tv->get_diskstream()->speed();
}
- jack_nframes_t region_start = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
- jack_nframes_t region_end = (jack_nframes_t) (clicked_regionview->region()->last_frame() / speed);
- jack_nframes_t region_length = (jack_nframes_t) (clicked_regionview->region()->length() / speed);
+ nframes_t region_start = (nframes_t) (clicked_regionview->region()->position() / speed);
+ nframes_t region_end = (nframes_t) (clicked_regionview->region()->last_frame() / speed);
+ nframes_t region_length = (nframes_t) (clicked_regionview->region()->length() / speed);
motion_frozen_playlists.clear();
@@ -3948,7 +3948,7 @@ void
Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
RegionView* rv = clicked_regionview;
- jack_nframes_t frame_delta = 0;
+ nframes_t frame_delta = 0;
bool left_direction;
bool obey_snap = !Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier());
@@ -4031,7 +4031,7 @@ Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
}
case EndTrim:
- if ((left_direction == true) && (drag_info.current_pointer_frame > (jack_nframes_t) (rv->region()->last_frame()/speed))) {
+ if ((left_direction == true) && (drag_info.current_pointer_frame > (nframes_t) (rv->region()->last_frame()/speed))) {
break;
} else {
for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) {
@@ -4059,10 +4059,10 @@ Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
switch (trim_op) {
case StartTrim:
- show_verbose_time_cursor((jack_nframes_t) (rv->region()->position()/speed), 10);
+ show_verbose_time_cursor((nframes_t) (rv->region()->position()/speed), 10);
break;
case EndTrim:
- show_verbose_time_cursor((jack_nframes_t) (rv->region()->last_frame()/speed), 10);
+ show_verbose_time_cursor((nframes_t) (rv->region()->last_frame()/speed), 10);
break;
case ContentsTrim:
show_verbose_time_cursor(drag_info.current_pointer_frame, 10);
@@ -4074,7 +4074,7 @@ Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
}
void
-Editor::single_contents_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_direction, bool swap_direction, bool obey_snap)
+Editor::single_contents_trim (RegionView& rv, nframes_t frame_delta, bool left_direction, bool swap_direction, bool obey_snap)
{
boost::shared_ptr<Region> region (rv.region());
@@ -4082,7 +4082,7 @@ Editor::single_contents_trim (RegionView& rv, jack_nframes_t frame_delta, bool l
return;
}
- jack_nframes_t new_bound;
+ nframes_t new_bound;
double speed = 1.0;
TimeAxisView* tvp = clicked_axisview;
@@ -4094,27 +4094,27 @@ Editor::single_contents_trim (RegionView& rv, jack_nframes_t frame_delta, bool l
if (left_direction) {
if (swap_direction) {
- new_bound = (jack_nframes_t) (region->position()/speed) + frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) + frame_delta;
} else {
- new_bound = (jack_nframes_t) (region->position()/speed) - frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) - frame_delta;
}
} else {
if (swap_direction) {
- new_bound = (jack_nframes_t) (region->position()/speed) - frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) - frame_delta;
} else {
- new_bound = (jack_nframes_t) (region->position()/speed) + frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) + frame_delta;
}
}
if (obey_snap) {
snap_to (new_bound);
}
- region->trim_start ((jack_nframes_t) (new_bound * speed), this);
+ region->trim_start ((nframes_t) (new_bound * speed), this);
rv.region_changed (StartChanged);
}
void
-Editor::single_start_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_direction, bool obey_snap)
+Editor::single_start_trim (RegionView& rv, nframes_t frame_delta, bool left_direction, bool obey_snap)
{
boost::shared_ptr<Region> region (rv.region());
@@ -4122,7 +4122,7 @@ Editor::single_start_trim (RegionView& rv, jack_nframes_t frame_delta, bool left
return;
}
- jack_nframes_t new_bound;
+ nframes_t new_bound;
double speed = 1.0;
TimeAxisView* tvp = clicked_axisview;
@@ -4133,22 +4133,22 @@ Editor::single_start_trim (RegionView& rv, jack_nframes_t frame_delta, bool left
}
if (left_direction) {
- new_bound = (jack_nframes_t) (region->position()/speed) - frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) - frame_delta;
} else {
- new_bound = (jack_nframes_t) (region->position()/speed) + frame_delta;
+ new_bound = (nframes_t) (region->position()/speed) + frame_delta;
}
if (obey_snap) {
snap_to (new_bound, (left_direction ? 0 : 1));
}
- region->trim_front ((jack_nframes_t) (new_bound * speed), this);
+ region->trim_front ((nframes_t) (new_bound * speed), this);
rv.region_changed (Change (LengthChanged|PositionChanged|StartChanged));
}
void
-Editor::single_end_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_direction, bool obey_snap)
+Editor::single_end_trim (RegionView& rv, nframes_t frame_delta, bool left_direction, bool obey_snap)
{
boost::shared_ptr<Region> region (rv.region());
@@ -4156,7 +4156,7 @@ Editor::single_end_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_d
return;
}
- jack_nframes_t new_bound;
+ nframes_t new_bound;
double speed = 1.0;
TimeAxisView* tvp = clicked_axisview;
@@ -4167,15 +4167,15 @@ Editor::single_end_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_d
}
if (left_direction) {
- new_bound = (jack_nframes_t) ((region->last_frame() + 1)/speed) - frame_delta;
+ new_bound = (nframes_t) ((region->last_frame() + 1)/speed) - frame_delta;
} else {
- new_bound = (jack_nframes_t) ((region->last_frame() + 1)/speed) + frame_delta;
+ new_bound = (nframes_t) ((region->last_frame() + 1)/speed) + frame_delta;
}
if (obey_snap) {
snap_to (new_bound);
}
- region->trim_end ((jack_nframes_t) (new_bound * speed), this);
+ region->trim_end ((nframes_t) (new_bound * speed), this);
rv.region_changed (LengthChanged);
}
@@ -4214,7 +4214,7 @@ void
Editor::point_trim (GdkEvent* event)
{
RegionView* rv = clicked_regionview;
- jack_nframes_t new_bound = drag_info.current_pointer_frame;
+ nframes_t new_bound = drag_info.current_pointer_frame;
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
snap_to (new_bound);
@@ -4361,8 +4361,8 @@ Editor::start_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event, Ran
void
Editor::drag_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t start = 0;
- jack_nframes_t end = 0;
+ nframes_t start = 0;
+ nframes_t end = 0;
ArdourCanvas::SimpleRect *crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
@@ -4465,8 +4465,8 @@ Editor::end_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
if (Keyboard::no_modifier_keys_pressed (&event->button)) {
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
start = session->locations()->first_mark_before (drag_info.grab_frame);
end = session->locations()->first_mark_after (drag_info.grab_frame);
@@ -4517,8 +4517,8 @@ Editor::start_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event)
void
Editor::drag_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
snap_to (drag_info.current_pointer_frame);
@@ -4578,7 +4578,7 @@ Editor::end_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event)
}
void
-Editor::reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end)
+Editor::reposition_zoom_rect (nframes_t start, nframes_t end)
{
double x1 = frame_to_pixel (start);
double x2 = frame_to_pixel (end);
@@ -4605,8 +4605,8 @@ Editor::start_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
void
Editor::drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
{
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
double y1;
double y2;
@@ -4775,7 +4775,7 @@ Editor::end_time_fx (ArdourCanvas::Item* item, GdkEvent* event)
return;
}
- jack_nframes_t newlen = drag_info.last_pointer_frame - clicked_regionview->region()->position();
+ nframes_t newlen = drag_info.last_pointer_frame - clicked_regionview->region()->position();
float percentage = (float) ((double) newlen - (double) clicked_regionview->region()->length()) / ((double) newlen) * 100.0f;
begin_reversible_command (_("timestretch"));
@@ -4786,7 +4786,7 @@ Editor::end_time_fx (ArdourCanvas::Item* item, GdkEvent* event)
}
void
-Editor::mouse_brush_insert_region (RegionView* rv, jack_nframes_t pos)
+Editor::mouse_brush_insert_region (RegionView* rv, nframes_t pos)
{
/* no brushing without a useful snap setting */
@@ -4827,7 +4827,7 @@ Editor::mouse_brush_insert_region (RegionView* rv, jack_nframes_t pos)
double speed = atv->get_diskstream()->speed();
XMLNode &before = playlist->get_state();
- playlist->add_region (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (arv->audio_region())), (jack_nframes_t) (pos * speed));
+ playlist->add_region (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (arv->audio_region())), (nframes_t) (pos * speed));
XMLNode &after = playlist->get_state();
session->add_command(new MementoCommand<Playlist>(*playlist, &before, &after));
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index f44b433caa..6a96b57795 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -90,89 +90,8 @@ Editor::redo (uint32_t n)
}
}
-void
-Editor::set_meter_hold (int32_t cnt)
-{
- Config->set_meter_hold_off(false);
- Config->set_meter_hold_short(false);
- Config->set_meter_hold_medium(false);
- Config->set_meter_hold_long(false);
-
- switch (cnt)
- {
- case 0:
- Config->set_meter_hold_off(true);
- break;
- case 40:
- Config->set_meter_hold_short(true);
- break;
- case 100:
- Config->set_meter_hold_medium(true);
- break;
- case 200:
- Config->set_meter_hold_long(true);
- break;
- }
-
- if (session) {
- session->set_meter_hold (cnt);
- }
-}
-
-void
-Editor::set_meter_falloff (int intval)
-{
- float val = 0.0f; /* off */
- std::string str;
-
- Config->set_meter_falloff_off(false);
- Config->set_meter_falloff_slowest(false);
- Config->set_meter_falloff_slow(false);
- Config->set_meter_falloff_medium(false);
- Config->set_meter_falloff_fast(false);
- Config->set_meter_falloff_faster(false);
- Config->set_meter_falloff_fastest(false);
-
- switch (intval)
- {
- case 0:
- val = 0.0f;
- Config->set_meter_falloff_off(true);
- break;
- case 1:
- val = 0.125f;
- Config->set_meter_falloff_slowest(true);
- break;
- case 2:
- val = 0.250f;
- Config->set_meter_falloff_slow(true);
- break;
- case 3:
- val = 0.375f;
- Config->set_meter_falloff_medium(true);
- break;
- case 4:
- val = 0.500f;
- Config->set_meter_falloff_fast(true);
- break;
- case 5:
- val = 0.750f;
- Config->set_meter_falloff_faster(true);
- break;
- case 6:
- val = 0.875f;
- Config->set_meter_falloff_fastest(true);
- break;
- }
-
- if (session) {
- session->set_meter_falloff (val);
- }
-}
-
-
int
-Editor::ensure_cursor (jack_nframes_t *pos)
+Editor::ensure_cursor (nframes_t *pos)
{
*pos = edit_cursor->current_frame;
return 0;
@@ -185,13 +104,13 @@ Editor::split_region ()
}
void
-Editor::split_region_at (jack_nframes_t where)
+Editor::split_region_at (nframes_t where)
{
split_regions_at (where, selection->regions);
}
void
-Editor::split_regions_at (jack_nframes_t where, RegionSelection& regions)
+Editor::split_regions_at (nframes_t where, RegionSelection& regions)
{
begin_reversible_command (_("split"));
@@ -291,7 +210,7 @@ Editor::select_region_for_operation (int dir, TimeAxisView **tv)
{
RegionView* rv;
boost::shared_ptr<Region> region;
- jack_nframes_t start = 0;
+ nframes_t start = 0;
if (selection->time.start () == selection->time.end_frame ()) {
@@ -334,7 +253,7 @@ Editor::extend_selection_to_end_of_region (bool next)
{
TimeAxisView *tv;
boost::shared_ptr<Region> region;
- jack_nframes_t start;
+ nframes_t start;
if ((region = select_region_for_operation (next ? 1 : 0, &tv)) == 0) {
return;
@@ -362,7 +281,7 @@ Editor::extend_selection_to_start_of_region (bool previous)
{
TimeAxisView *tv;
boost::shared_ptr<Region> region;
- jack_nframes_t end;
+ nframes_t end;
if ((region = select_region_for_operation (previous ? -1 : 0, &tv)) == 0) {
return;
@@ -389,8 +308,8 @@ Editor::extend_selection_to_start_of_region (bool previous)
void
Editor::nudge_forward (bool next)
{
- jack_nframes_t distance;
- jack_nframes_t next_distance;
+ nframes_t distance;
+ nframes_t next_distance;
if (!session) return;
@@ -424,8 +343,8 @@ Editor::nudge_forward (bool next)
void
Editor::nudge_backward (bool next)
{
- jack_nframes_t distance;
- jack_nframes_t next_distance;
+ nframes_t distance;
+ nframes_t next_distance;
if (!session) return;
@@ -470,7 +389,7 @@ Editor::nudge_backward (bool next)
void
Editor::nudge_forward_capture_offset ()
{
- jack_nframes_t distance;
+ nframes_t distance;
if (!session) return;
@@ -497,7 +416,7 @@ Editor::nudge_forward_capture_offset ()
void
Editor::nudge_backward_capture_offset ()
{
- jack_nframes_t distance;
+ nframes_t distance;
if (!session) return;
@@ -543,7 +462,7 @@ Editor::move_to_end ()
void
Editor::build_region_boundary_cache ()
{
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
RegionPoint point;
boost::shared_ptr<Region> r;
TrackViewList tracks;
@@ -599,7 +518,7 @@ Editor::build_region_boundary_cache ()
}
}
- jack_nframes_t rpos;
+ nframes_t rpos;
switch (snap_type) {
case SnapToRegionStart:
@@ -642,20 +561,20 @@ Editor::build_region_boundary_cache ()
}
boost::shared_ptr<Region>
-Editor::find_next_region (jack_nframes_t frame, RegionPoint point, int32_t dir, TrackViewList& tracks, TimeAxisView **ontrack)
+Editor::find_next_region (nframes_t frame, RegionPoint point, int32_t dir, TrackViewList& tracks, TimeAxisView **ontrack)
{
TrackViewList::iterator i;
- jack_nframes_t closest = max_frames;
+ nframes_t closest = max_frames;
boost::shared_ptr<Region> ret;
- jack_nframes_t rpos = 0;
+ nframes_t rpos = 0;
float track_speed;
- jack_nframes_t track_frame;
+ nframes_t track_frame;
AudioTimeAxisView *atav;
for (i = tracks.begin(); i != tracks.end(); ++i) {
- jack_nframes_t distance;
+ nframes_t distance;
boost::shared_ptr<Region> r;
track_speed = 1.0f;
@@ -707,7 +626,7 @@ void
Editor::cursor_to_region_point (Cursor* cursor, RegionPoint point, int32_t dir)
{
boost::shared_ptr<Region> r;
- jack_nframes_t pos = cursor->current_frame;
+ nframes_t pos = cursor->current_frame;
if (!session) {
return;
@@ -786,7 +705,7 @@ Editor::cursor_to_previous_region_point (Cursor* cursor, RegionPoint point)
void
Editor::cursor_to_selection_start (Cursor *cursor)
{
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
switch (mouse_mode) {
case MouseObject:
if (!selection->regions.empty()) {
@@ -814,7 +733,7 @@ Editor::cursor_to_selection_start (Cursor *cursor)
void
Editor::cursor_to_selection_end (Cursor *cursor)
{
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
switch (mouse_mode) {
case MouseObject:
@@ -843,8 +762,8 @@ Editor::cursor_to_selection_end (Cursor *cursor)
void
Editor::playhead_backward ()
{
- jack_nframes_t pos;
- jack_nframes_t cnt;
+ nframes_t pos;
+ nframes_t cnt;
float prefix;
bool was_floating;
@@ -852,15 +771,15 @@ Editor::playhead_backward ()
cnt = 1;
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
+ cnt = (nframes_t) floor (prefix * session->frame_rate ());
} else {
- cnt = (jack_nframes_t) prefix;
+ cnt = (nframes_t) prefix;
}
}
pos = playhead_cursor->current_frame;
- if ((jack_nframes_t) pos < cnt) {
+ if ((nframes_t) pos < cnt) {
pos = 0;
} else {
pos -= cnt;
@@ -877,8 +796,8 @@ Editor::playhead_backward ()
void
Editor::playhead_forward ()
{
- jack_nframes_t pos;
- jack_nframes_t cnt;
+ nframes_t pos;
+ nframes_t cnt;
bool was_floating;
float prefix;
@@ -886,9 +805,9 @@ Editor::playhead_forward ()
cnt = 1;
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
+ cnt = (nframes_t) floor (prefix * session->frame_rate ());
} else {
- cnt = (jack_nframes_t) floor (prefix);
+ cnt = (nframes_t) floor (prefix);
}
}
@@ -917,8 +836,8 @@ Editor::cursor_align (bool playhead_to_edit)
void
Editor::edit_cursor_backward ()
{
- jack_nframes_t pos;
- jack_nframes_t cnt;
+ nframes_t pos;
+ nframes_t cnt;
float prefix;
bool was_floating;
@@ -926,15 +845,15 @@ Editor::edit_cursor_backward ()
cnt = 1;
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
+ cnt = (nframes_t) floor (prefix * session->frame_rate ());
} else {
- cnt = (jack_nframes_t) prefix;
+ cnt = (nframes_t) prefix;
}
}
pos = edit_cursor->current_frame;
- if ((jack_nframes_t) pos < cnt) {
+ if ((nframes_t) pos < cnt) {
pos = 0;
} else {
pos -= cnt;
@@ -946,8 +865,8 @@ Editor::edit_cursor_backward ()
void
Editor::edit_cursor_forward ()
{
- jack_nframes_t pos;
- jack_nframes_t cnt;
+ nframes_t pos;
+ nframes_t cnt;
bool was_floating;
float prefix;
@@ -955,9 +874,9 @@ Editor::edit_cursor_forward ()
cnt = 1;
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
+ cnt = (nframes_t) floor (prefix * session->frame_rate ());
} else {
- cnt = (jack_nframes_t) floor (prefix);
+ cnt = (nframes_t) floor (prefix);
}
}
@@ -970,16 +889,16 @@ Editor::goto_frame ()
{
float prefix;
bool was_floating;
- jack_nframes_t frame;
+ nframes_t frame;
if (get_prefix (prefix, was_floating)) {
return;
}
if (was_floating) {
- frame = (jack_nframes_t) floor (prefix * session->frame_rate());
+ frame = (nframes_t) floor (prefix * session->frame_rate());
} else {
- frame = (jack_nframes_t) floor (prefix);
+ frame = (nframes_t) floor (prefix);
}
session->request_locate (frame);
@@ -988,19 +907,19 @@ Editor::goto_frame ()
void
Editor::scroll_backward (float pages)
{
- jack_nframes_t frame;
- jack_nframes_t one_page = (jack_nframes_t) rint (canvas_width * frames_per_unit);
+ nframes_t frame;
+ nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
bool was_floating;
float prefix;
- jack_nframes_t cnt;
+ nframes_t cnt;
if (get_prefix (prefix, was_floating)) {
- cnt = (jack_nframes_t) floor (pages * one_page);
+ cnt = (nframes_t) floor (pages * one_page);
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate());
+ cnt = (nframes_t) floor (prefix * session->frame_rate());
} else {
- cnt = (jack_nframes_t) floor (prefix * one_page);
+ cnt = (nframes_t) floor (prefix * one_page);
}
}
@@ -1016,24 +935,24 @@ Editor::scroll_backward (float pages)
void
Editor::scroll_forward (float pages)
{
- jack_nframes_t frame;
- jack_nframes_t one_page = (jack_nframes_t) rint (canvas_width * frames_per_unit);
+ nframes_t frame;
+ nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
bool was_floating;
float prefix;
- jack_nframes_t cnt;
+ nframes_t cnt;
if (get_prefix (prefix, was_floating)) {
- cnt = (jack_nframes_t) floor (pages * one_page);
+ cnt = (nframes_t) floor (pages * one_page);
} else {
if (was_floating) {
- cnt = (jack_nframes_t) floor (prefix * session->frame_rate());
+ cnt = (nframes_t) floor (prefix * session->frame_rate());
} else {
- cnt = (jack_nframes_t) floor (prefix * one_page);
+ cnt = (nframes_t) floor (prefix * one_page);
}
}
- if (ULONG_MAX - cnt < leftmost_frame) {
- frame = ULONG_MAX - cnt;
+ if (max_frames - cnt < leftmost_frame) {
+ frame = max_frames - cnt;
} else {
frame = leftmost_frame + cnt;
}
@@ -1123,17 +1042,17 @@ Editor::temporal_zoom (gdouble fpu)
{
if (!session) return;
- jack_nframes_t current_page = current_page_frames();
- jack_nframes_t current_leftmost = leftmost_frame;
- jack_nframes_t current_rightmost;
- jack_nframes_t current_center;
- jack_nframes_t new_page;
- jack_nframes_t leftmost_after_zoom = 0;
+ nframes_t current_page = current_page_frames();
+ nframes_t current_leftmost = leftmost_frame;
+ nframes_t current_rightmost;
+ nframes_t current_center;
+ nframes_t new_page;
+ nframes_t leftmost_after_zoom = 0;
double nfpu;
nfpu = fpu;
- new_page = (jack_nframes_t) floor (canvas_width * nfpu);
+ new_page = (nframes_t) floor (canvas_width * nfpu);
switch (zoom_focus) {
case ZoomFocusLeft:
@@ -1197,8 +1116,8 @@ Editor::temporal_zoom_selection ()
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
temporal_zoom_by_frame (start, end, "zoom to selection");
}
@@ -1214,7 +1133,7 @@ Editor::temporal_zoom_session ()
}
void
-Editor::temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const string & op)
+Editor::temporal_zoom_by_frame (nframes_t start, nframes_t end, const string & op)
{
if (!session) return;
@@ -1222,7 +1141,7 @@ Editor::temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const
return;
}
- jack_nframes_t range = end - start;
+ nframes_t range = end - start;
double new_fpu = (double)range / (double)canvas_width;
// double p2 = 1.0;
@@ -1232,9 +1151,9 @@ Editor::temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const
// }
// new_fpu = p2;
- jack_nframes_t new_page = (jack_nframes_t) floor (canvas_width * new_fpu);
- jack_nframes_t middle = (jack_nframes_t) floor( (double)start + ((double)range / 2.0f ));
- jack_nframes_t new_leftmost = (jack_nframes_t) floor( (double)middle - ((double)new_page/2.0f));
+ nframes_t new_page = (nframes_t) floor (canvas_width * new_fpu);
+ nframes_t middle = (nframes_t) floor( (double)start + ((double)range / 2.0f ));
+ nframes_t new_leftmost = (nframes_t) floor( (double)middle - ((double)new_page/2.0f));
if (new_leftmost > middle) new_leftmost = 0;
@@ -1247,7 +1166,7 @@ Editor::temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const
}
void
-Editor::temporal_zoom_to_frame (bool coarser, jack_nframes_t frame)
+Editor::temporal_zoom_to_frame (bool coarser, nframes_t frame)
{
if (!session) return;
@@ -1266,7 +1185,7 @@ Editor::temporal_zoom_to_frame (bool coarser, jack_nframes_t frame)
if (new_fpu == frames_per_unit) return;
- jack_nframes_t new_leftmost = frame - (jack_nframes_t)range_before;
+ nframes_t new_leftmost = frame - (nframes_t)range_before;
if (new_leftmost > frame) new_leftmost = 0;
@@ -1289,8 +1208,8 @@ Editor::add_location_from_selection ()
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
Location *location = new Location (start, end, "selection");
@@ -1305,7 +1224,7 @@ Editor::add_location_from_selection ()
void
Editor::add_location_from_playhead_cursor ()
{
- jack_nframes_t where = session->audible_frame();
+ nframes_t where = session->audible_frame();
Location *location = new Location (where, where, "mark", Location::IsMark);
session->begin_reversible_command (_("add marker"));
@@ -1414,7 +1333,7 @@ Editor::invert_selection ()
}
bool
-Editor::select_all_within (jack_nframes_t start, jack_nframes_t end, double top, double bot, Selection::Operation op)
+Editor::select_all_within (nframes_t start, nframes_t end, double top, double bot, Selection::Operation op)
{
list<Selectable *> touched;
@@ -1508,8 +1427,8 @@ Editor::select_all_selectables_using_time_selection ()
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
if (end - start < 1) {
return;
@@ -1575,8 +1494,8 @@ Editor::select_all_selectables_using_loop()
void
Editor::select_all_selectables_using_cursor (Cursor *cursor, bool after)
{
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
list<Selectable *> touched;
if (after) {
@@ -1606,8 +1525,8 @@ Editor::select_all_selectables_using_cursor (Cursor *cursor, bool after)
void
Editor::select_all_selectables_between_cursors (Cursor *cursor, Cursor *other_cursor)
{
- jack_nframes_t start;
- jack_nframes_t end;
+ nframes_t start;
+ nframes_t end;
list<Selectable *> touched;
bool other_cursor_is_first = cursor->current_frame > other_cursor->current_frame;
@@ -1725,7 +1644,7 @@ Editor::jump_backward_to_mark ()
void
Editor::set_mark ()
{
- jack_nframes_t pos;
+ nframes_t pos;
float prefix;
bool was_floating;
@@ -1733,9 +1652,9 @@ Editor::set_mark ()
pos = session->audible_frame ();
} else {
if (was_floating) {
- pos = (jack_nframes_t) floor (prefix * session->frame_rate ());
+ pos = (nframes_t) floor (prefix * session->frame_rate ());
} else {
- pos = (jack_nframes_t) floor (prefix);
+ pos = (nframes_t) floor (prefix);
}
}
@@ -1796,7 +1715,7 @@ Editor::insert_region_list_drag (boost::shared_ptr<Region> region, int x, int y)
double wx, wy;
double cx, cy;
TimeAxisView *tv;
- jack_nframes_t where;
+ nframes_t where;
AudioTimeAxisView *atv = 0;
Playlist *playlist;
@@ -1863,16 +1782,23 @@ Editor::insert_region_list_selection (float times)
return;
}
- TreeModel::iterator i = region_list_display.get_selection()->get_selected();
- boost::shared_ptr<Region> region = (*i)[region_list_columns.region];
+ TreeView::Selection::ListHandle_Path rows = selected->get_selected_rows ();
- begin_reversible_command (_("insert region"));
- XMLNode &before = playlist->get_state();
- playlist->add_region ((RegionFactory::create (region)), edit_cursor->current_frame, times);
- session->add_command(new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
- commit_reversible_command ();
-}
+ /* only one row selected, so rows.begin() is it */
+
+ TreeIter iter;
+
+ if ((iter = region_list_model->get_iter (*rows.begin()))) {
+ boost::shared_ptr<Region> region = (*iter)[region_list_columns.region];
+
+ begin_reversible_command (_("insert region"));
+ XMLNode &before = playlist->get_state();
+ playlist->add_region ((RegionFactory::create (region)), edit_cursor->current_frame, times);
+ session->add_command(new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
+ commit_reversible_command ();
+ }
+}
/* BUILT-IN EFFECTS */
@@ -1898,9 +1824,9 @@ Editor::toggle_playback (bool with_abort)
return;
}
- switch (session->slave_source()) {
- case Session::None:
- case Session::JACK:
+ switch (Config->get_slave_source()) {
+ case None:
+ case JACK:
break;
default:
/* transport controlled by the master */
@@ -1914,8 +1840,8 @@ Editor::toggle_playback (bool with_abort)
if (session->transport_rolling()) {
session->request_stop (with_abort);
- if (session->get_auto_loop()) {
- session->request_auto_loop (false);
+ if (Config->get_auto_loop()) {
+ session->request_play_loop (false);
}
} else {
session->request_transport_speed (1.0f);
@@ -1961,7 +1887,7 @@ Editor::loop_selected_region ()
// enable looping, reposition and start rolling
- session->request_auto_loop (true);
+ session->request_play_loop (true);
session->request_locate (tll->start(), false);
session->request_transport_speed (1.0f);
}
@@ -1991,7 +1917,7 @@ Editor::loop_location (Location& location)
tll->set (location.start(), location.end());
// enable looping, reposition and start rolling
- session->request_auto_loop (true);
+ session->request_play_loop (true);
session->request_locate (tll->start(), true);
}
}
@@ -2177,17 +2103,17 @@ Editor::region_from_selection ()
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
- jack_nframes_t selection_cnt = end - start + 1;
+ nframes_t selection_cnt = end - start + 1;
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
boost::shared_ptr<AudioRegion> current;
boost::shared_ptr<Region> current_r;
Playlist *pl;
- jack_nframes_t internal_start;
+ nframes_t internal_start;
string new_name;
if ((pl = (*i)->playlist()) == 0) {
@@ -2215,15 +2141,15 @@ Editor::create_region_from_selection (vector<boost::shared_ptr<AudioRegion> >& n
return;
}
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
boost::shared_ptr<AudioRegion> current;
boost::shared_ptr<Region> current_r;
Playlist* playlist;
- jack_nframes_t internal_start;
+ nframes_t internal_start;
string new_name;
if ((playlist = (*i)->playlist()) == 0) {
@@ -2303,7 +2229,7 @@ Editor::separate_region_from_selection ()
double speed = atv->get_diskstream()->speed();
for (list<AudioRange>::iterator t = selection->time.begin(); t != selection->time.end(); ++t) {
- playlist->partition ((jack_nframes_t)((*t).start * speed), (jack_nframes_t)((*t).end * speed), true);
+ playlist->partition ((nframes_t)((*t).start * speed), (nframes_t)((*t).end * speed), true);
}
if (doing_undo)
@@ -2358,7 +2284,7 @@ Editor::separate_regions_using_location (Location& loc)
double speed = atv->get_diskstream()->speed();
- playlist->partition ((jack_nframes_t)(loc.start() * speed), (jack_nframes_t)(loc.end() * speed), true);
+ playlist->partition ((nframes_t)(loc.start() * speed), (nframes_t)(loc.end() * speed), true);
if (doing_undo)
session->add_command(new MementoCommand<Playlist>(*playlist, before, &playlist->get_state()));
}
@@ -2404,9 +2330,9 @@ Editor::crop_region_to_selection ()
if (!playlists.empty()) {
- jack_nframes_t start;
- jack_nframes_t end;
- jack_nframes_t cnt;
+ nframes_t start;
+ nframes_t end;
+ nframes_t cnt;
begin_reversible_command (_("trim to selection"));
@@ -2441,7 +2367,7 @@ Editor::crop_region_to_selection ()
void
Editor::region_fill_track ()
{
- jack_nframes_t end;
+ nframes_t end;
if (!session || selection->regions.empty()) {
return;
@@ -2500,8 +2426,8 @@ Editor::region_fill_selection ()
TreeModel::iterator i = region_list_display.get_selection()->get_selected();
boost::shared_ptr<Region> region = (*i)[region_list_columns.region];
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
Playlist *playlist;
@@ -2509,7 +2435,7 @@ Editor::region_fill_selection ()
return;
}
- jack_nframes_t selection_length = end - start;
+ nframes_t selection_length = end - start;
float times = (float)selection_length / region->length();
begin_reversible_command (_("fill selection"));
@@ -2529,7 +2455,7 @@ Editor::region_fill_selection ()
}
void
-Editor::set_a_regions_sync_position (boost::shared_ptr<Region> region, jack_nframes_t position)
+Editor::set_a_regions_sync_position (boost::shared_ptr<Region> region, nframes_t position)
{
if (!region->covers (position)) {
@@ -2614,14 +2540,14 @@ struct RegionSortByTime {
};
void
-Editor::align_selection_relative (RegionPoint point, jack_nframes_t position)
+Editor::align_selection_relative (RegionPoint point, nframes_t position)
{
if (selection->regions.empty()) {
return;
}
- jack_nframes_t distance;
- jack_nframes_t pos = 0;
+ nframes_t distance;
+ nframes_t pos = 0;
int dir;
list<RegionView*> sorted;
@@ -2673,7 +2599,7 @@ Editor::align_selection_relative (RegionPoint point, jack_nframes_t position)
}
void
-Editor::align_selection (RegionPoint point, jack_nframes_t position)
+Editor::align_selection (RegionPoint point, nframes_t position)
{
if (selection->regions.empty()) {
return;
@@ -2689,7 +2615,7 @@ Editor::align_selection (RegionPoint point, jack_nframes_t position)
}
void
-Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, jack_nframes_t position)
+Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, nframes_t position)
{
begin_reversible_command (_("align region"));
align_region_internal (region, point, position);
@@ -2697,7 +2623,7 @@ Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, jack_
}
void
-Editor::align_region_internal (boost::shared_ptr<Region> region, RegionPoint point, jack_nframes_t position)
+Editor::align_region_internal (boost::shared_ptr<Region> region, RegionPoint point, nframes_t position)
{
XMLNode &before = region->playlist()->get_state();
@@ -2855,9 +2781,9 @@ Editor::bounce_range_selection ()
TrackViewList *views = get_valid_views (selection->time.track, selection->time.group);
- jack_nframes_t start = selection->time[clicked_selection].start;
- jack_nframes_t end = selection->time[clicked_selection].end;
- jack_nframes_t cnt = end - start + 1;
+ nframes_t start = selection->time[clicked_selection].start;
+ nframes_t end = selection->time[clicked_selection].end;
+ nframes_t cnt = end - start + 1;
begin_reversible_command (_("bounce range"));
@@ -2989,7 +2915,7 @@ Editor::cut_copy_regions (CutCopyOp op)
{
typedef std::map<AudioPlaylist*,AudioPlaylist*> PlaylistMapping;
PlaylistMapping pmap;
- jack_nframes_t first_position = max_frames;
+ nframes_t first_position = max_frames;
set<Playlist*> freezelist;
pair<set<Playlist*>::iterator,bool> insert_result;
@@ -3100,13 +3026,13 @@ Editor::mouse_paste ()
event.button.x = wx;
event.button.y = wy;
- jack_nframes_t where = event_frame (&event, 0, 0);
+ nframes_t where = event_frame (&event, 0, 0);
snap_to (where);
paste_internal (where, 1);
}
void
-Editor::paste_internal (jack_nframes_t position, float times)
+Editor::paste_internal (nframes_t position, float times)
{
bool commit = false;
@@ -3312,9 +3238,9 @@ void
Editor::nudge_track (bool use_edit_cursor, bool forwards)
{
Playlist *playlist;
- jack_nframes_t distance;
- jack_nframes_t next_distance;
- jack_nframes_t start;
+ nframes_t distance;
+ nframes_t next_distance;
+ nframes_t start;
if (use_edit_cursor) {
start = edit_cursor->current_frame;
@@ -3525,7 +3451,7 @@ Editor::external_edit_region ()
}
void
-Editor::brush (jack_nframes_t pos)
+Editor::brush (nframes_t pos)
{
RegionSelection sel;
snap_to (pos);
diff --git a/gtk2_ardour/editor_region_list.cc b/gtk2_ardour/editor_region_list.cc
index ccfa1c378a..1e75437db2 100644
--- a/gtk2_ardour/editor_region_list.cc
+++ b/gtk2_ardour/editor_region_list.cc
@@ -235,6 +235,7 @@ Editor::redisplay_regions ()
for (list<boost::shared_ptr<Region> >::iterator r = tmp_region_list.begin(); r != tmp_region_list.end(); ++r) {
add_region_to_region_display (*r);
}
+ tmp_region_list.clear();
region_list_display.set_model (region_list_model);
}
@@ -582,7 +583,7 @@ Editor::region_list_display_drag_data_received (const RefPtr<Gdk::DragContext>&
vector<ustring> paths;
if (convert_drop_to_paths (paths, context, x, y, data, info, time) == 0) {
- jack_nframes_t pos = 0;
+ nframes_t pos = 0;
do_embed (paths, false, ImportAsRegion, 0, pos, true);
context->drag_finish (true, false, time);
}
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index 224e779bf9..ecf7f0b263 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -160,7 +160,7 @@ Editor::ruler_button_release (GdkEventButton* ev)
hide_verbose_canvas_cursor();
stop_canvas_autoscroll();
- jack_nframes_t where = leftmost_frame + pixel_to_frame (x);
+ nframes_t where = leftmost_frame + pixel_to_frame (x);
switch (ev->button) {
case 1:
@@ -229,11 +229,11 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
track_canvas.c2w (x, y, wcx, wcy);
track_canvas.w2c (wcx, wcy, cx, cy);
- jack_nframes_t where = leftmost_frame + pixel_to_frame (x);
+ nframes_t where = leftmost_frame + pixel_to_frame (x);
/// ripped from maybe_autoscroll
- jack_nframes_t one_page = (jack_nframes_t) rint (canvas_width * frames_per_unit);
- jack_nframes_t rightmost_frame = leftmost_frame + one_page;
+ nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
+ nframes_t rightmost_frame = leftmost_frame + one_page;
jack_nframes_t frame = pixel_to_frame (cx);
@@ -289,7 +289,7 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
void
-Editor::popup_ruler_menu (jack_nframes_t where, ItemType t)
+Editor::popup_ruler_menu (nframes_t where, ItemType t)
{
using namespace Menu_Helpers;
@@ -696,8 +696,8 @@ Editor::update_just_smpte ()
an uint32_t (or larger) to a float ... what to do ?
*/
- jack_nframes_t page = (jack_nframes_t) floor (canvas_width * frames_per_unit);
- jack_nframes_t rightmost_frame = leftmost_frame + page;
+ nframes_t page = (nframes_t) floor (canvas_width * frames_per_unit);
+ nframes_t rightmost_frame = leftmost_frame + page;
if (ruler_shown[ruler_metric_smpte]) {
gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_smpte_ruler), leftmost_frame, rightmost_frame,
@@ -708,7 +708,7 @@ Editor::update_just_smpte ()
void
Editor::update_fixed_rulers ()
{
- jack_nframes_t rightmost_frame;
+ nframes_t rightmost_frame;
if (session == 0) {
return;
@@ -718,7 +718,7 @@ Editor::update_fixed_rulers ()
an uint32_t (or larger) to a float ... what to do ?
*/
- jack_nframes_t page = (jack_nframes_t) floor (canvas_width * frames_per_unit);
+ nframes_t page = (nframes_t) floor (canvas_width * frames_per_unit);
ruler_metrics[ruler_metric_smpte].units_per_pixel = frames_per_unit;
ruler_metrics[ruler_metric_frames].units_per_pixel = frames_per_unit;
@@ -757,7 +757,7 @@ Editor::update_tempo_based_rulers ()
an uint32_t (or larger) to a float ... what to do ?
*/
- jack_nframes_t page = (jack_nframes_t) floor (canvas_width * frames_per_unit);
+ nframes_t page = (nframes_t) floor (canvas_width * frames_per_unit);
ruler_metrics[ruler_metric_bbt].units_per_pixel = frames_per_unit;
if (ruler_shown[ruler_metric_bbt]) {
@@ -795,10 +795,10 @@ Editor::_metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble u
gint
Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
{
- jack_nframes_t range;
- jack_nframes_t pos;
- jack_nframes_t spacer;
- jack_nframes_t fr;
+ nframes_t range;
+ nframes_t pos;
+ nframes_t spacer;
+ nframes_t fr;
SMPTE::Time smpte;
gchar buf[16];
gint nmarks = 0;
@@ -816,13 +816,13 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
fr = session->frame_rate();
- if (lower > (spacer = (jack_nframes_t)(128 * Editor::get_current_zoom ()))) {
+ if (lower > (spacer = (nframes_t)(128 * Editor::get_current_zoom ()))) {
lower = lower - spacer;
} else {
lower = 0;
}
upper = upper + spacer;
- range = (jack_nframes_t) floor (upper - lower);
+ range = (nframes_t) floor (upper - lower);
if (range < (2 * session->frames_per_smpte_frame())) { /* 0 - 2 frames */
show_bits = true;
@@ -831,19 +831,19 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
} else if (range <= (fr / 4)) { /* 2 frames - 0.250 second */
show_frames = true;
mark_modulo = 1;
- nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
+ nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
} else if (range <= (fr / 2)) { /* 0.25-0.5 second */
show_frames = true;
mark_modulo = 2;
- nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
+ nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
} else if (range <= fr) { /* 0.5-1 second */
show_frames = true;
mark_modulo = 5;
- nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
+ nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
} else if (range <= 2 * fr) { /* 1-2 seconds */
show_frames = true;
mark_modulo = 10;
- nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
+ nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
} else if (range <= 8 * fr) { /* 2-8 seconds */
show_seconds = true;
mark_modulo = 1;
@@ -894,14 +894,14 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
nmarks = 1 + 24;
} else {
- /* not possible if jack_nframes_t is a 32 bit quantity */
+ /* not possible if nframes_t is a 32 bit quantity */
show_hours = true;
mark_modulo = 4;
nmarks = 1 + 24;
}
- pos = (jack_nframes_t) floor (lower);
+ pos = (nframes_t) floor (lower);
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks);
@@ -1044,12 +1044,12 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
gint nmarks;
char buf[64];
gint n;
- jack_nframes_t pos;
+ nframes_t pos;
bool bar_helper_on = true;
BBT_Time next_beat;
- jack_nframes_t next_beat_pos;
- jack_nframes_t ilower = (jack_nframes_t) floor (lower);
+ nframes_t next_beat_pos;
+ nframes_t ilower = (nframes_t) floor (lower);
if ((desirable_marks = maxchars / 7) == 0) {
return 0;
@@ -1102,7 +1102,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
uint32_t tick = 0;
uint32_t skip;
uint32_t t;
- jack_nframes_t frame_skip;
+ nframes_t frame_skip;
double frame_skip_error;
double accumulated_error;
double position_of_helper;
@@ -1173,7 +1173,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
next_beat_pos = session->tempo_map().frame_time(next_beat);
- frame_skip = (jack_nframes_t) floor (frame_skip_error = (session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
+ frame_skip = (nframes_t) floor (frame_skip_error = (session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
frame_skip_error -= frame_skip;
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
@@ -1199,7 +1199,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
(*marks)[n].label = g_strdup (buf);
- /* Error compensation for float to jack_nframes_t*/
+ /* Error compensation for float to nframes_t*/
accumulated_error += frame_skip_error;
if (accumulated_error > 1) {
pos += 1;
@@ -1327,10 +1327,10 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
gint
Editor::metric_get_frames (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
{
- jack_nframes_t mark_interval;
- jack_nframes_t pos;
- jack_nframes_t ilower = (jack_nframes_t) floor (lower);
- jack_nframes_t iupper = (jack_nframes_t) floor (upper);
+ nframes_t mark_interval;
+ nframes_t pos;
+ nframes_t ilower = (nframes_t) floor (lower);
+ nframes_t iupper = (nframes_t) floor (upper);
gchar buf[16];
gint nmarks;
gint n;
@@ -1358,15 +1358,15 @@ Editor::metric_get_frames (GtkCustomRulerMark **marks, gdouble lower, gdouble up
}
static void
-sample_to_clock_parts ( jack_nframes_t sample,
- jack_nframes_t sample_rate,
+sample_to_clock_parts ( nframes_t sample,
+ nframes_t sample_rate,
long *hrs_p,
long *mins_p,
long *secs_p,
long *millisecs_p)
{
- jack_nframes_t left;
+ nframes_t left;
long hrs;
long mins;
long secs;
@@ -1392,11 +1392,11 @@ sample_to_clock_parts ( jack_nframes_t sample,
gint
Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
{
- jack_nframes_t range;
- jack_nframes_t fr;
- jack_nframes_t mark_interval;
- jack_nframes_t pos;
- jack_nframes_t spacer;
+ nframes_t range;
+ nframes_t fr;
+ nframes_t mark_interval;
+ nframes_t pos;
+ nframes_t spacer;
long hrs, mins, secs, millisecs;
gchar buf[16];
gint nmarks;
@@ -1405,8 +1405,8 @@ Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble up
bool show_seconds = false;
bool show_minutes = false;
bool show_hours = false;
- jack_nframes_t ilower = (jack_nframes_t) floor (lower);
- jack_nframes_t iupper = (jack_nframes_t) floor (upper);
+ nframes_t ilower = (nframes_t) floor (lower);
+ nframes_t iupper = (nframes_t) floor (upper);
if (session == 0) {
return 0;
@@ -1415,7 +1415,7 @@ Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble up
fr = session->frame_rate();
/* to prevent 'flashing' */
- if (lower > (spacer = (jack_nframes_t)(128 * Editor::get_current_zoom ()))) {
+ if (lower > (spacer = (nframes_t)(128 * Editor::get_current_zoom ()))) {
lower = lower - spacer;
} else {
lower = 0;
@@ -1487,7 +1487,7 @@ Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble up
mark_modulo = 2;
} else {
- /* not possible if jack_nframes_t is a 32 bit quantity */
+ /* not possible if nframes_t is a 32 bit quantity */
mark_interval = 4 * 60 * 60 * fr; /* show 4 hrs */
}
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index e101da196f..c905e696cc 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -44,6 +44,7 @@
#include "rgb_macros.h"
#include "gui_thread.h"
#include "color.h"
+#include "time_axis_view.h"
#include "i18n.h"
@@ -200,6 +201,7 @@ Editor::draw_measures ()
}
track_canvas.get_scroll_region (x1, y1, x2, y2);
+ y2 = TimeAxisView::hLargest*5000; // five thousand largest tracks should be enough.. :)
/* get the first bar spacing */
@@ -210,8 +212,9 @@ Editor::draw_measures ()
beat_density = (beats * 10.0f) / track_canvas.get_width ();
- if (beat_density > 2.0f) {
- /* if the lines are too close together, they become useless */
+ if (beat_density > 4.0f) {
+ /* if the lines are too close together, they become useless
+ */
return;
}
@@ -228,10 +231,10 @@ Editor::draw_measures ()
} else {
color = color_map[cMeasureLineBar];
- /* only draw beat lines if the gaps between beats are large. */
-
- if (beat_density > 0.25) {
- break;
+ if (beat_density > 2.0) {
+ /* only draw beat lines if the gaps between beats are large.
+ */
+ break;
}
}
@@ -255,7 +258,7 @@ Editor::draw_measures ()
}
void
-Editor::mouse_add_new_tempo_event (jack_nframes_t frame)
+Editor::mouse_add_new_tempo_event (nframes_t frame)
{
if (session == 0) {
return;
@@ -297,7 +300,7 @@ Editor::mouse_add_new_tempo_event (jack_nframes_t frame)
}
void
-Editor::mouse_add_new_meter_event (jack_nframes_t frame)
+Editor::mouse_add_new_meter_event (nframes_t frame)
{
if (session == 0) {
return;
diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc
index 730da46673..e38f0ba946 100644
--- a/gtk2_ardour/export_dialog.cc
+++ b/gtk2_ardour/export_dialog.cc
@@ -581,7 +581,7 @@ ExportDialog::save_state()
}
void
-ExportDialog::set_range (jack_nframes_t start, jack_nframes_t end)
+ExportDialog::set_range (nframes_t start, nframes_t end)
{
spec.start_frame = start;
spec.end_frame = end;
@@ -595,7 +595,7 @@ ExportDialog::progress_timeout ()
}
void
-frames_to_cd_frames_string (char* buf, jack_nframes_t when, jack_nframes_t fr)
+frames_to_cd_frames_string (char* buf, nframes_t when, nframes_t fr)
{
long unsigned int remainder;
@@ -1022,7 +1022,7 @@ void
ExportDialog::sample_rate_chosen ()
{
string sr_str = sample_rate_combo.get_active_text();
- jack_nframes_t rate;
+ nframes_t rate;
if (sr_str == N_("22.05kHz")) {
rate = 22050;
diff --git a/gtk2_ardour/export_dialog.h b/gtk2_ardour/export_dialog.h
index 3bb2b40c06..13b327fe50 100644
--- a/gtk2_ardour/export_dialog.h
+++ b/gtk2_ardour/export_dialog.h
@@ -53,7 +53,7 @@ class ExportDialog : public ArdourDialog
~ExportDialog ();
void connect_to_session (ARDOUR::Session*);
- virtual void set_range (jack_nframes_t start, jack_nframes_t end);
+ virtual void set_range (nframes_t start, nframes_t end);
void start_export ();
protected:
diff --git a/gtk2_ardour/export_range_markers_dialog.cc b/gtk2_ardour/export_range_markers_dialog.cc
index e43eb20cd1..c91e1c101a 100644
--- a/gtk2_ardour/export_range_markers_dialog.cc
+++ b/gtk2_ardour/export_range_markers_dialog.cc
@@ -166,7 +166,7 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
// flush vector
range_markers_durations_aggregated.resize(0);
- jack_nframes_t duration_before_current_location = 0;
+ nframes_t duration_before_current_location = 0;
Locations::LocationList::iterator locationIter;
for (locationIter = locations.begin(); locationIter != locations.end(); ++locationIter) {
@@ -176,7 +176,7 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
range_markers_durations_aggregated.push_back(
duration_before_current_location);
- jack_nframes_t duration =
+ nframes_t duration =
currentLocation->end() - currentLocation->start();
range_markers_durations.push_back(duration);
diff --git a/gtk2_ardour/export_range_markers_dialog.h b/gtk2_ardour/export_range_markers_dialog.h
index a69e2b749b..7aae9640bf 100644
--- a/gtk2_ardour/export_range_markers_dialog.h
+++ b/gtk2_ardour/export_range_markers_dialog.h
@@ -37,10 +37,10 @@ class ExportRangeMarkersDialog : public ExportDialog
private:
// keeps the duration of all range_markers before the current
- vector<jack_nframes_t> range_markers_durations_aggregated;
- vector<jack_nframes_t> range_markers_durations;
+ vector<nframes_t> range_markers_durations_aggregated;
+ vector<nframes_t> range_markers_durations;
// duration of all range markers
- jack_nframes_t total_duration;
+ nframes_t total_duration;
// index of range marker, that get's exported right now
unsigned int current_range_marker_index;
diff --git a/gtk2_ardour/export_session_dialog.cc b/gtk2_ardour/export_session_dialog.cc
index 3c09efc0e6..7cd7fdc06f 100644
--- a/gtk2_ardour/export_session_dialog.cc
+++ b/gtk2_ardour/export_session_dialog.cc
@@ -47,7 +47,7 @@ ExportSessionDialog::export_audio_data ()
void
-ExportSessionDialog::set_range (jack_nframes_t start, jack_nframes_t end)
+ExportSessionDialog::set_range (nframes_t start, nframes_t end)
{
ExportDialog::set_range (start, end);
diff --git a/gtk2_ardour/export_session_dialog.h b/gtk2_ardour/export_session_dialog.h
index 707989444a..5aeec4ad10 100644
--- a/gtk2_ardour/export_session_dialog.h
+++ b/gtk2_ardour/export_session_dialog.h
@@ -27,7 +27,7 @@ class ExportSessionDialog : public ExportDialog
{
public:
ExportSessionDialog (PublicEditor&);
- void set_range (jack_nframes_t start, jack_nframes_t end);
+ void set_range (nframes_t start, nframes_t end);
protected:
void export_audio_data();
diff --git a/gtk2_ardour/gain_automation_time_axis.cc b/gtk2_ardour/gain_automation_time_axis.cc
index 47657e3292..7e4a1b1fbf 100644
--- a/gtk2_ardour/gain_automation_time_axis.cc
+++ b/gtk2_ardour/gain_automation_time_axis.cc
@@ -48,7 +48,7 @@ GainAutomationTimeAxisView::~GainAutomationTimeAxisView ()
}
void
-GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
+GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
{
double x = 0;
diff --git a/gtk2_ardour/gain_automation_time_axis.h b/gtk2_ardour/gain_automation_time_axis.h
index dc6d5bd28e..ea9388ccd3 100644
--- a/gtk2_ardour/gain_automation_time_axis.h
+++ b/gtk2_ardour/gain_automation_time_axis.h
@@ -22,7 +22,7 @@ class GainAutomationTimeAxisView : public AutomationTimeAxisView
~GainAutomationTimeAxisView();
- void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
+ void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
private:
ARDOUR::Curve& curve;
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index c0d7acc118..fc8e183d96 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -205,7 +205,7 @@ GainMeter::GainMeter (boost::shared_ptr<IO> io, Session& s)
gain_adjustment.signal_value_changed().connect (mem_fun(*this, &GainMeter::gain_adjusted));
peak_display.signal_button_release_event().connect (mem_fun(*this, &GainMeter::peak_button_release));
- _session.MeterHoldChanged.connect (mem_fun(*this, &GainMeter::meter_hold_changed));
+ Config->ParameterChanged.connect (mem_fun (*this, &GainMeter::parameter_changed));
gain_changed (0);
update_gain_sensitive ();
@@ -350,17 +350,24 @@ GainMeter::update_meters ()
}
void
-GainMeter::meter_hold_changed()
+GainMeter::parameter_changed(const char* parameter_name)
{
- ENSURE_GUI_THREAD(mem_fun(*this, &GainMeter::meter_hold_changed));
-
- vector<MeterInfo>::iterator i;
- uint32_t n;
+#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
+
+ ENSURE_GUI_THREAD (bind (mem_fun(*this, &GainMeter::parameter_changed), parameter_name));
+
+ if (PARAM_IS ("meter-hold")) {
- for (n = 0, i = meters.begin(); i != meters.end(); ++i, ++n) {
+ vector<MeterInfo>::iterator i;
+ uint32_t n;
- (*i).meter->set_hold_count ((uint32_t) floor(_session.meter_hold()));
+ for (n = 0, i = meters.begin(); i != meters.end(); ++i, ++n) {
+
+ (*i).meter->set_hold_count ((uint32_t) floor(Config->get_meter_hold()));
+ }
}
+
+#undef PARAM_IS
}
void
@@ -428,7 +435,7 @@ GainMeter::setup_meters ()
for (uint32_t n = 0; n < nmeters; ++n) {
if (meters[n].width != width) {
delete meters[n].meter;
- meters[n].meter = new FastMeter ((uint32_t) floor (_session.meter_hold()), width, FastMeter::Vertical);
+ meters[n].meter = new FastMeter ((uint32_t) floor (Config->get_meter_hold()), width, FastMeter::Vertical);
meters[n].width = width;
meters[n].meter->add_events (Gdk::BUTTON_RELEASE_MASK);
diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h
index 1dfc088248..bbc12ccb6c 100644
--- a/gtk2_ardour/gain_meter.h
+++ b/gtk2_ardour/gain_meter.h
@@ -172,7 +172,7 @@ class GainMeter : public Gtk::VBox
bool wait_for_release;
ARDOUR::MeterPoint old_meter_point;
- void meter_hold_changed();
+ void parameter_changed (const char*);
void reset_peak_display ();
void reset_group_peak_display (ARDOUR::RouteGroup*);
diff --git a/gtk2_ardour/icons/nudge_left.png b/gtk2_ardour/icons/nudge_left.png
new file mode 100644
index 0000000000..c88547771a
--- /dev/null
+++ b/gtk2_ardour/icons/nudge_left.png
Binary files differ
diff --git a/gtk2_ardour/icons/nudge_right.png b/gtk2_ardour/icons/nudge_right.png
new file mode 100644
index 0000000000..a6c1581363
--- /dev/null
+++ b/gtk2_ardour/icons/nudge_right.png
Binary files differ
diff --git a/gtk2_ardour/icons/tool_audition.png b/gtk2_ardour/icons/tool_audition.png
new file mode 100644
index 0000000000..65f52e1fb0
--- /dev/null
+++ b/gtk2_ardour/icons/tool_audition.png
Binary files differ
diff --git a/gtk2_ardour/icons/tool_gain.png b/gtk2_ardour/icons/tool_gain.png
new file mode 100644
index 0000000000..f54be9403a
--- /dev/null
+++ b/gtk2_ardour/icons/tool_gain.png
Binary files differ
diff --git a/gtk2_ardour/icons/tool_object.png b/gtk2_ardour/icons/tool_object.png
new file mode 100644
index 0000000000..0b5739e5a9
--- /dev/null
+++ b/gtk2_ardour/icons/tool_object.png
Binary files differ
diff --git a/gtk2_ardour/icons/tool_object.xpm b/gtk2_ardour/icons/tool_object.xpm
new file mode 100644
index 0000000000..b6b2fea299
--- /dev/null
+++ b/gtk2_ardour/icons/tool_object.xpm
@@ -0,0 +1,54 @@
+/* XPM */
+static char * tool_object_xpm[] = {
+"16 12 39 1",
+" c None",
+". c #000000",
+"+ c #0C0C0C",
+"@ c #151515",
+"# c #D1D1D1",
+"$ c #121212",
+"% c #161616",
+"& c #DADADA",
+"* c #131313",
+"= c #D6D6D6",
+"- c #0F0F0F",
+"; c #050505",
+"> c #D3D3D3",
+", c #0A0A0A",
+"' c #070707",
+") c #E5E5E5",
+"! c #292929",
+"~ c #B0B0B0",
+"{ c #262626",
+"] c #5C5C5C",
+"^ c #333333",
+"/ c #0E0E0E",
+"( c #111111",
+"_ c #3D3D3D",
+": c #F4F4F4",
+"< c #FFFFFF",
+"[ c #EBEBEB",
+"} c #D0D0D0",
+"| c #030303",
+"1 c #F1F1F1",
+"2 c #FDFDFD",
+"3 c #C3C3C3",
+"4 c #101010",
+"5 c #141414",
+"6 c #F2F2F2",
+"7 c #4E4E4E",
+"8 c #686868",
+"9 c #0B0B0B",
+"0 c #020202",
+" .+. ",
+" @#$ ",
+" %&* ",
+" +=-.. ",
+" ;>.,,-.. ",
+" .')!~{]^/ ",
+" (_:<<<[}| ",
+" '12<<<<<| ",
+" -~<<<<<34 ",
+" .56<<<<7| ",
+" /8<<<),. ",
+" .9|||0- "};
diff --git a/gtk2_ardour/icons/tool_stretch.png b/gtk2_ardour/icons/tool_stretch.png
new file mode 100644
index 0000000000..a599fbe51d
--- /dev/null
+++ b/gtk2_ardour/icons/tool_stretch.png
Binary files differ
diff --git a/gtk2_ardour/icons/tool_zoom.png b/gtk2_ardour/icons/tool_zoom.png
new file mode 100644
index 0000000000..f6b5e2781d
--- /dev/null
+++ b/gtk2_ardour/icons/tool_zoom.png
Binary files differ
diff --git a/gtk2_ardour/icons/transport_end.png b/gtk2_ardour/icons/transport_end.png
new file mode 100644
index 0000000000..1a16a7a5e8
--- /dev/null
+++ b/gtk2_ardour/icons/transport_end.png
Binary files differ
diff --git a/gtk2_ardour/icons/transport_loop.png b/gtk2_ardour/icons/transport_loop.png
new file mode 100644
index 0000000000..0a6f398b1f
--- /dev/null
+++ b/gtk2_ardour/icons/transport_loop.png
Binary files differ
diff --git a/gtk2_ardour/icons/transport_play.png b/gtk2_ardour/icons/transport_play.png
new file mode 100644
index 0000000000..14779b7fec
--- /dev/null
+++ b/gtk2_ardour/icons/transport_play.png
Binary files differ
diff --git a/gtk2_ardour/icons/transport_range.png b/gtk2_ardour/icons/transport_range.png
new file mode 100644
index 0000000000..20769ca962
--- /dev/null
+++ b/gtk2_ardour/icons/transport_range.png
Binary files differ
diff --git a/gtk2_ardour/icons/transport_record.png b/gtk2_ardour/icons/transport_record.png
new file mode 100644
index 0000000000..fa3972d9c5
--- /dev/null
+++ b/gtk2_ardour/icons/transport_record.png
Binary files differ
diff --git a/gtk2_ardour/icons/transport_start.png b/gtk2_ardour/icons/transport_start.png
new file mode 100644
index 0000000000..95b3f2e33a
--- /dev/null
+++ b/gtk2_ardour/icons/transport_start.png
Binary files differ
diff --git a/gtk2_ardour/icons/transport_stop.png b/gtk2_ardour/icons/transport_stop.png
new file mode 100644
index 0000000000..9b1e944c7b
--- /dev/null
+++ b/gtk2_ardour/icons/transport_stop.png
Binary files differ
diff --git a/gtk2_ardour/icons/tw_edit_icons_07.xcf b/gtk2_ardour/icons/tw_edit_icons_07.xcf
new file mode 100644
index 0000000000..fefae94082
--- /dev/null
+++ b/gtk2_ardour/icons/tw_edit_icons_07.xcf
Binary files differ
diff --git a/gtk2_ardour/icons/zoom_full.png b/gtk2_ardour/icons/zoom_full.png
new file mode 100644
index 0000000000..fdb2e1dcf2
--- /dev/null
+++ b/gtk2_ardour/icons/zoom_full.png
Binary files differ
diff --git a/gtk2_ardour/icons/zoom_in.png b/gtk2_ardour/icons/zoom_in.png
new file mode 100644
index 0000000000..b3ef4e8ac8
--- /dev/null
+++ b/gtk2_ardour/icons/zoom_in.png
Binary files differ
diff --git a/gtk2_ardour/icons/zoom_out.png b/gtk2_ardour/icons/zoom_out.png
new file mode 100644
index 0000000000..50effceb78
--- /dev/null
+++ b/gtk2_ardour/icons/zoom_out.png
Binary files differ
diff --git a/gtk2_ardour/imageframe_socket_handler.cc b/gtk2_ardour/imageframe_socket_handler.cc
index 905a96de7d..a7f4d603a7 100644
--- a/gtk2_ardour/imageframe_socket_handler.cc
+++ b/gtk2_ardour/imageframe_socket_handler.cc
@@ -538,7 +538,7 @@ ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed(const string &
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_imageframe_view_position_change(jack_nframes_t pos, void* src, ImageFrameView* item)
+ImageFrameSocketHandler::send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item)
{
// ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_position_change), pos, src, item));
@@ -574,7 +574,7 @@ ImageFrameSocketHandler::send_imageframe_view_position_change(jack_nframes_t pos
* @param item the item which has had a duration change
*/
void
-ImageFrameSocketHandler::send_imageframe_view_duration_change(jack_nframes_t dur, void* src, ImageFrameView* item)
+ImageFrameSocketHandler::send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item)
{
// ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change), dur, src, item));
@@ -688,7 +688,7 @@ ImageFrameSocketHandler::send_imageframe_view_removed(const string & item_id, vo
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_marker_view_position_change(jack_nframes_t pos, void* src, MarkerView* item)
+ImageFrameSocketHandler::send_marker_view_position_change(nframes_t pos, void* src, MarkerView* item)
{
if(this == src || src == 0)
{
@@ -722,7 +722,7 @@ ImageFrameSocketHandler::send_marker_view_position_change(jack_nframes_t pos, vo
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_marker_view_duration_change(jack_nframes_t dur, void* src, MarkerView* item)
+ImageFrameSocketHandler::send_marker_view_duration_change(nframes_t dur, void* src, MarkerView* item)
{
if(this == src || src == 0)
{
@@ -1337,11 +1337,11 @@ ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg)
position += image_id_size ;
// get the start frame value
- jack_nframes_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
+ nframes_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
position += 10 ;
// get the duration value
- jack_nframes_t duration = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
+ nframes_t duration = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
position += 10 ;
//get the named time axis view we about to add an image to
@@ -1673,7 +1673,7 @@ ImageFrameSocketHandler::handle_imageframe_view_position_update(const char* msg)
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
- jack_nframes_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
+ nframes_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
position += ardourvis::TIME_VALUE_CHARS ;
// get the named time axis
@@ -1725,7 +1725,7 @@ ImageFrameSocketHandler::handle_imageframe_view_duration_update(const char* msg)
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
- jack_nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
// get the named time axis
@@ -1828,7 +1828,7 @@ ImageFrameSocketHandler::handle_imageframe_view_max_duration_update(const char*
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
- jack_nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
int errcode ;
@@ -1916,7 +1916,7 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_update(const char*
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
- jack_nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
int errcode ;
diff --git a/gtk2_ardour/imageframe_socket_handler.h b/gtk2_ardour/imageframe_socket_handler.h
index 5af1824417..4dd8d69650 100644
--- a/gtk2_ardour/imageframe_socket_handler.h
+++ b/gtk2_ardour/imageframe_socket_handler.h
@@ -195,7 +195,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param src the identity of the object that initiated the change
* @param item the time axis item whos position has changed
*/
- void send_imageframe_view_position_change(jack_nframes_t pos, void* src, ImageFrameView* item) ;
+ void send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item) ;
/**
* Send a Image Frame View item duration changed message
@@ -204,7 +204,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param src the identity of the object that initiated the change
* @param item the item which has had a duration change
*/
- void send_imageframe_view_duration_change(jack_nframes_t dur, void* src, ImageFrameView* item) ;
+ void send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item) ;
/**
* Send a message indicating that an ImageFrameView has been renamed
@@ -234,7 +234,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param src the identity of the object that initiated the change
* @param item the time axis item whos position has changed
*/
- void send_marker_view_position_change(jack_nframes_t pos, void* src, MarkerView* item) ;
+ void send_marker_view_position_change(nframes_t pos, void* src, MarkerView* item) ;
/**
* Send a Marker View item duration changed message
@@ -243,7 +243,7 @@ class ImageFrameSocketHandler : public sigc::trackable
* @param src the identity of the object that initiated the change
* @param item the time axis item whos position has changed
*/
- void send_marker_view_duration_change(jack_nframes_t dur, void* src, MarkerView* item) ;
+ void send_marker_view_duration_change(nframes_t dur, void* src, MarkerView* item) ;
/**
* Send a message indicating that a MarkerView has been renamed
diff --git a/gtk2_ardour/imageframe_time_axis_group.cc b/gtk2_ardour/imageframe_time_axis_group.cc
index ab3dd3e350..647d45b963 100644
--- a/gtk2_ardour/imageframe_time_axis_group.cc
+++ b/gtk2_ardour/imageframe_time_axis_group.cc
@@ -195,7 +195,7 @@ ImageFrameTimeAxisGroup::apply_item_color(Gdk::Color& color)
* @param src the identity of the object that initiated the change
*/
ImageFrameView*
-ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, jack_nframes_t start, jack_nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src)
+ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src)
{
ImageFrameView* ifv = 0 ;
diff --git a/gtk2_ardour/imageframe_time_axis_group.h b/gtk2_ardour/imageframe_time_axis_group.h
index 1cd62d73f5..4619ae448a 100644
--- a/gtk2_ardour/imageframe_time_axis_group.h
+++ b/gtk2_ardour/imageframe_time_axis_group.h
@@ -139,7 +139,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
* @param num_channels the number of channles within the rgb_data
* @param src the identity of the object that initiated the change
*/
- ImageFrameView* add_imageframe_item(const string & item_id, jack_nframes_t start, jack_nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ;
+ ImageFrameView* add_imageframe_item(const string & item_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ;
/**
* Returns the named ImageFrameView or 0 if the named view does not exist on this view helper
diff --git a/gtk2_ardour/imageframe_time_axis_view.cc b/gtk2_ardour/imageframe_time_axis_view.cc
index a725082863..6e896ea5ec 100644
--- a/gtk2_ardour/imageframe_time_axis_view.cc
+++ b/gtk2_ardour/imageframe_time_axis_view.cc
@@ -410,7 +410,7 @@ ImageFrameTimeAxisView::set_imageframe_duration_sec(double sec)
{
if(selected_imageframe_group && selected_imageframe_view)
{
- selected_imageframe_view->set_duration((jack_nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
+ selected_imageframe_view->set_duration((nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
}
}
diff --git a/gtk2_ardour/imageframe_view.cc b/gtk2_ardour/imageframe_view.cc
index ac17a7cc1a..2c943dcae4 100644
--- a/gtk2_ardour/imageframe_view.cc
+++ b/gtk2_ardour/imageframe_view.cc
@@ -62,8 +62,8 @@ ImageFrameView::ImageFrameView(const string & item_id,
ImageFrameTimeAxisGroup* item_group,
double spu,
Gdk::Color& basic_color,
- jack_nframes_t start,
- jack_nframes_t duration,
+ nframes_t start,
+ nframes_t duration,
unsigned char* rgb_data,
uint32_t width,
uint32_t height,
@@ -172,9 +172,9 @@ delete imageframe;
* @return true if the position change was a success, false otherwise
*/
bool
-ImageFrameView::set_position(jack_nframes_t pos, void* src, double* delta)
+ImageFrameView::set_position(nframes_t pos, void* src, double* delta)
{
- jack_nframes_t old_pos = frame_position ;
+ nframes_t old_pos = frame_position ;
// do the standard stuff
bool ret = TimeAxisViewItem::set_position(pos, src, delta) ;
@@ -186,7 +186,7 @@ ImageFrameView::set_position(jack_nframes_t pos, void* src, double* delta)
{
// calculate the offset of the marker
MarkerView* mv = (MarkerView*)*i ;
- jack_nframes_t marker_old_pos = mv->get_position() ;
+ nframes_t marker_old_pos = mv->get_position() ;
mv->set_position(pos + (marker_old_pos - old_pos), src) ;
}
@@ -203,7 +203,7 @@ ImageFrameView::set_position(jack_nframes_t pos, void* src, double* delta)
* @return true if the duration change was succesful, false otherwise
*/
bool
-ImageFrameView::set_duration(jack_nframes_t dur, void* src)
+ImageFrameView::set_duration(nframes_t dur, void* src)
{
/* do the standard stuff */
bool ret = TimeAxisViewItem::set_duration(dur, src) ;
diff --git a/gtk2_ardour/imageframe_view.h b/gtk2_ardour/imageframe_view.h
index 5ae8aaded6..71d9268fef 100644
--- a/gtk2_ardour/imageframe_view.h
+++ b/gtk2_ardour/imageframe_view.h
@@ -66,8 +66,8 @@ class ImageFrameView : public TimeAxisViewItem
ImageFrameTimeAxisGroup* group,
double spu,
Gdk::Color& base_color,
- jack_nframes_t start,
- jack_nframes_t duration,
+ nframes_t start,
+ nframes_t duration,
unsigned char* rgb_data,
uint32_t width,
uint32_t height,
@@ -91,7 +91,7 @@ class ImageFrameView : public TimeAxisViewItem
* @param src the identity of the object that initiated the change
* @return true if the position change was a success, false otherwise
*/
- virtual bool set_position(jack_nframes_t pos, void* src, double* delta = 0) ;
+ virtual bool set_position(nframes_t pos, void* src, double* delta = 0) ;
/**
* Sets the duration of this item
@@ -100,7 +100,7 @@ class ImageFrameView : public TimeAxisViewItem
* @param src the identity of the object that initiated the change
* @return true if the duration change was succesful, false otherwise
*/
- virtual bool set_duration(jack_nframes_t dur, void* src) ;
+ virtual bool set_duration(nframes_t dur, void* src) ;
//---------------------------------------------------------------------------------------//
// Parent Component Methods
diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc
index 125ed8df5d..96ce92d42d 100644
--- a/gtk2_ardour/location_ui.cc
+++ b/gtk2_ardour/location_ui.cc
@@ -771,7 +771,7 @@ void
LocationUI::add_new_location()
{
if (session) {
- jack_nframes_t where = session->audible_frame();
+ nframes_t where = session->audible_frame();
Location *location = new Location (where, where, "mark", Location::IsMark);
session->begin_reversible_command (_("add marker"));
XMLNode &before = session->locations()->get_state();
@@ -787,7 +787,7 @@ void
LocationUI::add_new_range()
{
if (session) {
- jack_nframes_t where = session->audible_frame();
+ nframes_t where = session->audible_frame();
Location *location = new Location (where, where, "unnamed",
Location::IsRangeMarker);
session->begin_reversible_command (_("add range marker"));
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc
index 4beb771494..25b6b32166 100644
--- a/gtk2_ardour/main.cc
+++ b/gtk2_ardour/main.cc
@@ -383,13 +383,7 @@ int main (int argc, char *argv[])
cout << _("Ardour/GTK ")
<< VERSIONSTRING
<< _("\n (built using ")
- << gtk_ardour_major_version << '.'
- << gtk_ardour_minor_version << '.'
- << gtk_ardour_micro_version
- << _(" with libardour ")
- << libardour_major_version << '.'
- << libardour_minor_version << '.'
- << libardour_micro_version
+ << ARDOUR::get_ardour_revision ()
#ifdef __GNUC__
<< _(" and GCC version ") << __VERSION__
#endif
@@ -441,6 +435,7 @@ int main (int argc, char *argv[])
try {
ARDOUR::init (*engine, use_vst, try_hw_optimization);
+ Config->set_current_owner (ConfigVariableBase::Interface);
ui->set_engine (*engine);
} catch (failed_constructor& err) {
error << _("could not initialize Ardour.") << endmsg;
diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc
index fb2afb00b4..d5517b4bce 100644
--- a/gtk2_ardour/marker.cc
+++ b/gtk2_ardour/marker.cc
@@ -29,7 +29,7 @@
#include "i18n.h"
Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation,
- Type type, jack_nframes_t frame, bool handle_events)
+ Type type, nframes_t frame, bool handle_events)
: editor (ed), _type(type)
{
@@ -289,7 +289,7 @@ Marker::set_name (const string& name)
}
void
-Marker::set_position (jack_nframes_t frame)
+Marker::set_position (nframes_t frame)
{
double new_unit_position = editor.frame_to_unit (frame);
new_unit_position -= shift;
diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h
index 13e80ef512..e2e4307782 100644
--- a/gtk2_ardour/marker.h
+++ b/gtk2_ardour/marker.h
@@ -52,13 +52,13 @@ class Marker : public sigc::trackable
Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, Type,
- jack_nframes_t frame = 0, bool handle_events = true);
+ nframes_t frame = 0, bool handle_events = true);
virtual ~Marker ();
ArdourCanvas::Item& the_item() const;
- void set_position (jack_nframes_t);
+ void set_position (nframes_t);
void set_name (const string&);
void set_color_rgba (uint32_t rgba);
@@ -76,7 +76,7 @@ class Marker : public sigc::trackable
ArdourCanvas::Points *points;
double unit_position;
- jack_nframes_t frame_position;
+ nframes_t frame_position;
unsigned char shift; /* should be double, but its always small and integral */
Type _type;
diff --git a/gtk2_ardour/marker_time_axis_view.cc b/gtk2_ardour/marker_time_axis_view.cc
index 53e0aa8758..55d5742e8e 100644
--- a/gtk2_ardour/marker_time_axis_view.cc
+++ b/gtk2_ardour/marker_time_axis_view.cc
@@ -199,7 +199,7 @@ MarkerTimeAxisView::apply_color(Gdk::Color& color)
* @param src the identity of the object that initiated the change
*/
MarkerView*
-MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, jack_nframes_t start, jack_nframes_t dur, void* src)
+MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src)
{
if(ifv->has_marker_view_item(mark_id))
{
@@ -345,7 +345,7 @@ MarkerTimeAxisView::set_marker_duration_sec(double sec)
{
if(get_selected_time_axis_item() != 0)
{
- get_selected_time_axis_item()->set_duration((jack_nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
+ get_selected_time_axis_item()->set_duration((nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
}
}
diff --git a/gtk2_ardour/marker_time_axis_view.h b/gtk2_ardour/marker_time_axis_view.h
index 1dd742a459..4853f29855 100644
--- a/gtk2_ardour/marker_time_axis_view.h
+++ b/gtk2_ardour/marker_time_axis_view.h
@@ -131,7 +131,7 @@ class MarkerTimeAxisView : public sigc::trackable
* @param duration the duration the new item should be placed upon the timeline
* @param src the identity of the object that initiated the change
*/
- MarkerView* add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, jack_nframes_t start, jack_nframes_t dur, void* src) ;
+ MarkerView* add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src) ;
/**
* Returns the named MarkerView or 0 if the named marker does not exist
diff --git a/gtk2_ardour/marker_view.cc b/gtk2_ardour/marker_view.cc
index d73440ad54..f45a3ce971 100644
--- a/gtk2_ardour/marker_view.cc
+++ b/gtk2_ardour/marker_view.cc
@@ -54,8 +54,8 @@ MarkerView::MarkerView(ArdourCanvas::Group *parent,
Gdk::Color& basic_color,
std::string mark_type,
std::string mark_id,
- jack_nframes_t start,
- jack_nframes_t duration)
+ nframes_t start,
+ nframes_t duration)
: TimeAxisViewItem(mark_id, *parent,*tv,spu,basic_color,start,duration)
{
mark_type_text = mark_type ;
diff --git a/gtk2_ardour/marker_view.h b/gtk2_ardour/marker_view.h
index da45b33dd9..04b8587649 100644
--- a/gtk2_ardour/marker_view.h
+++ b/gtk2_ardour/marker_view.h
@@ -65,8 +65,8 @@ class MarkerView : public TimeAxisViewItem
Gdk::Color& base_color,
std::string mark_type,
std::string mark_id,
- jack_nframes_t start,
- jack_nframes_t duration) ;
+ nframes_t start,
+ nframes_t duration) ;
/**
* Destructor
diff --git a/gtk2_ardour/meter_bridge_strip.cc b/gtk2_ardour/meter_bridge_strip.cc
index ea3b609720..8a91603748 100644
--- a/gtk2_ardour/meter_bridge_strip.cc
+++ b/gtk2_ardour/meter_bridge_strip.cc
@@ -48,9 +48,9 @@ MeterBridgeStrip::MeterBridgeStrip (AudioEngine &eng,
Session& s,
Route& r,
string name,
- jack_nframes_t long_over,
- jack_nframes_t short_over,
- jack_nframes_t meter_hold)
+ nframes_t long_over,
+ nframes_t short_over,
+ nframes_t meter_hold)
: engine (eng),
session (s),
_route (r),
diff --git a/gtk2_ardour/meter_bridge_strip.h b/gtk2_ardour/meter_bridge_strip.h
index 62a3d61072..bdce16f17c 100644
--- a/gtk2_ardour/meter_bridge_strip.h
+++ b/gtk2_ardour/meter_bridge_strip.h
@@ -50,9 +50,9 @@ class MeterBridgeStrip : public sigc::trackable
ARDOUR::Session&,
ARDOUR::Route&,
string label,
- jack_nframes_t long_over,
- jack_nframes_t short_over,
- jack_nframes_t meter_hold);
+ nframes_t long_over,
+ nframes_t short_over,
+ nframes_t meter_hold);
void update (); /* called by meter timeout handler from ARDOUR_UI */
diff --git a/gtk2_ardour/new_session_dialog.cc b/gtk2_ardour/new_session_dialog.cc
index 4a533137a6..9a8bcecc42 100644
--- a/gtk2_ardour/new_session_dialog.cc
+++ b/gtk2_ardour/new_session_dialog.cc
@@ -36,17 +36,41 @@
#include "opts.h"
NewSessionDialog::NewSessionDialog()
- : ArdourDialog ("New Session Dialog")
+ : ArdourDialog ("session control")
{
- session_name_label = Gtk::manage(new class Gtk::Label(_("New Session Name :")));
+ session_name_label = Gtk::manage(new class Gtk::Label(_("Name :")));
m_name = Gtk::manage(new class Gtk::Entry());
m_name->set_text(GTK_ARDOUR::session_name);
- session_location_label = Gtk::manage(new class Gtk::Label(_("Create Session Directory In :")));
+ chan_count_label_1 = Gtk::manage(new class Gtk::Label(_("channels")));
+ chan_count_label_2 = Gtk::manage(new class Gtk::Label(_("channels")));
+ chan_count_label_3 = Gtk::manage(new class Gtk::Label(_("channels")));
+ chan_count_label_4 = Gtk::manage(new class Gtk::Label(_("channels")));
+
+ chan_count_label_1->set_alignment(0,0.5);
+ chan_count_label_1->set_padding(0,0);
+ chan_count_label_1->set_line_wrap(false);
+
+ chan_count_label_2->set_alignment(0,0.5);
+ chan_count_label_2->set_padding(0,0);
+ chan_count_label_2->set_line_wrap(false);
+
+ chan_count_label_3->set_alignment(0,0.5);
+ chan_count_label_3->set_padding(0,0);
+ chan_count_label_3->set_line_wrap(false);
+
+ chan_count_label_4->set_alignment(0,0.5);
+ chan_count_label_4->set_padding(0,0);
+ chan_count_label_4->set_line_wrap(false);
+
+ bus_label = Gtk::manage(new class Gtk::Label(_("<b>Busses</b>")));
+ input_label = Gtk::manage(new class Gtk::Label(_("<b>Inputs</b>")));
+ output_label = Gtk::manage(new class Gtk::Label(_("<b>Outputs</b>")));
+
+ session_location_label = Gtk::manage(new class Gtk::Label(_("Create Folder In :")));
m_folder = Gtk::manage(new class Gtk::FileChooserButton(Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
- session_template_label = Gtk::manage(new class Gtk::Label(_("Use Session Template :")));
+ session_template_label = Gtk::manage(new class Gtk::Label(_("Template :")));
m_template = Gtk::manage(new class Gtk::FileChooserButton());
- chan_count_label = Gtk::manage(new class Gtk::Label(_("Channel Count")));
m_create_control_bus = Gtk::manage(new class Gtk::CheckButton(_("Create Monitor Bus")));
Gtk::Adjustment *m_control_bus_channel_count_adj = Gtk::manage(new class Gtk::Adjustment(2, 0, 100, 1, 10, 10));
@@ -56,8 +80,8 @@ NewSessionDialog::NewSessionDialog()
m_master_bus_channel_count = Gtk::manage(new class Gtk::SpinButton(*m_master_bus_channel_count_adj, 1, 0));
m_create_master_bus = Gtk::manage(new class Gtk::CheckButton(_("Create Master Bus")));
advanced_table = Gtk::manage(new class Gtk::Table(2, 2, true));
- m_connect_inputs = Gtk::manage(new class Gtk::CheckButton(_("Automatically Connect Inputs")));
- m_limit_input_ports = Gtk::manage(new class Gtk::CheckButton(_("Port Limit")));
+ m_connect_inputs = Gtk::manage(new class Gtk::CheckButton(_("Automatically Connect to Physical Inputs")));
+ m_limit_input_ports = Gtk::manage(new class Gtk::CheckButton(_("Use only")));
Gtk::Adjustment *m_input_limit_count_adj = Gtk::manage(new class Gtk::Adjustment(1, 0, 100, 1, 10, 10));
m_input_limit_count = Gtk::manage(new class Gtk::SpinButton(*m_input_limit_count_adj, 1, 0));
@@ -65,10 +89,12 @@ NewSessionDialog::NewSessionDialog()
input_port_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
input_table = Gtk::manage(new class Gtk::Table(2, 2, false));
- input_label = Gtk::manage(new class Gtk::Label(_("<b>Track/Bus Inputs</b>")));
+ bus_frame = Gtk::manage(new class Gtk::Frame());
+ bus_table = Gtk::manage (new Gtk::Table (2, 3, false));
+
input_frame = Gtk::manage(new class Gtk::Frame());
m_connect_outputs = Gtk::manage(new class Gtk::CheckButton(_("Automatically Connect Outputs")));
- m_limit_output_ports = Gtk::manage(new class Gtk::CheckButton(_("Port Limit")));
+ m_limit_output_ports = Gtk::manage(new class Gtk::CheckButton(_("Use only")));
Gtk::Adjustment *m_output_limit_count_adj = Gtk::manage(new class Gtk::Adjustment(1, 0, 100, 1, 10, 10));
m_output_limit_count = Gtk::manage(new class Gtk::SpinButton(*m_output_limit_count_adj, 1, 0));
@@ -76,12 +102,11 @@ NewSessionDialog::NewSessionDialog()
output_port_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
Gtk::RadioButton::Group _RadioBGroup_m_connect_outputs_to_master;
- m_connect_outputs_to_master = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("Connect to Master Bus")));
- m_connect_outputs_to_physical = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("Connect to Physical Outputs")));
+ m_connect_outputs_to_master = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("... to Master Bus")));
+ m_connect_outputs_to_physical = Gtk::manage(new class Gtk::RadioButton(_RadioBGroup_m_connect_outputs_to_master, _("... to Physical Outputs")));
output_conn_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
output_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
- output_label = Gtk::manage(new class Gtk::Label(_("<b>Track/Bus Outputs</b>")));
output_frame = Gtk::manage(new class Gtk::Frame());
advanced_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
advanced_label = Gtk::manage(new class Gtk::Label(_("Advanced Options")));
@@ -92,24 +117,25 @@ NewSessionDialog::NewSessionDialog()
m_treeview = Gtk::manage(new class Gtk::TreeView());
recent_scrolledwindow = Gtk::manage(new class Gtk::ScrolledWindow());
- recent_sesion_label = Gtk::manage(new class Gtk::Label(_("Open Recent Session")));
+ recent_sesion_label = Gtk::manage(new class Gtk::Label(_("Recent:")));
recent_frame = Gtk::manage(new class Gtk::Frame());
open_session_vbox = Gtk::manage(new class Gtk::VBox(false, 0));
m_notebook = Gtk::manage(new class Gtk::Notebook());
session_name_label->set_alignment(0, 0.5);
- session_name_label->set_padding(0,0);
+ session_name_label->set_padding(6,0);
session_name_label->set_line_wrap(false);
session_name_label->set_selectable(false);
m_name->set_editable(true);
m_name->set_max_length(0);
m_name->set_has_frame(true);
m_name->set_activates_default(true);
+ m_name->set_width_chars (40);
session_location_label->set_alignment(0,0.5);
- session_location_label->set_padding(0,0);
+ session_location_label->set_padding(6,0);
session_location_label->set_line_wrap(false);
session_location_label->set_selectable(false);
session_template_label->set_alignment(0,0.5);
- session_template_label->set_padding(0,0);
+ session_template_label->set_padding(6,0);
session_template_label->set_line_wrap(false);
session_template_label->set_selectable(false);
m_create_control_bus->set_flags(Gtk::CAN_FOCUS);
@@ -128,7 +154,7 @@ NewSessionDialog::NewSessionDialog()
m_master_bus_channel_count->set_numeric(true);
m_master_bus_channel_count->set_digits(0);
m_master_bus_channel_count->set_wrap(false);
- open_session_file_label = Gtk::manage(new class Gtk::Label(_("Open Session File :")));
+ open_session_file_label = Gtk::manage(new class Gtk::Label(_("Browse:")));
open_session_file_label->set_alignment(0, 0.5);
m_create_master_bus->set_flags(Gtk::CAN_FOCUS);
m_create_master_bus->set_relief(Gtk::RELIEF_NORMAL);
@@ -137,11 +163,6 @@ NewSessionDialog::NewSessionDialog()
m_create_master_bus->set_border_width(0);
advanced_table->set_row_spacings(0);
advanced_table->set_col_spacings(0);
- advanced_table->attach(*chan_count_label, 1, 2, 0, 1, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_create_control_bus, 0, 1, 2, 3, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_control_bus_channel_count, 1, 2, 2, 3, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_master_bus_channel_count, 1, 2, 1, 2, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
- advanced_table->attach(*m_create_master_bus, 0, 1, 1, 2, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
m_connect_inputs->set_flags(Gtk::CAN_FOCUS);
m_connect_inputs->set_relief(Gtk::RELIEF_NORMAL);
@@ -161,14 +182,40 @@ NewSessionDialog::NewSessionDialog()
m_input_limit_count->set_wrap(false);
m_input_limit_count->set_sensitive(false);
+ bus_hbox = Gtk::manage (new Gtk::HBox (false, 0));
+ bus_hbox->pack_start (*bus_table, Gtk::PACK_SHRINK, 18);
+
+ bus_label->set_alignment(0, 0.5);
+ bus_label->set_padding(0,0);
+ bus_label->set_line_wrap(false);
+ bus_label->set_selectable(false);
+ bus_label->set_use_markup(true);
+ bus_frame->set_shadow_type(Gtk::SHADOW_NONE);
+ bus_frame->set_label_align(0,0.5);
+ bus_frame->add(*bus_hbox);
+ bus_frame->set_label_widget(*bus_label);
+
+ bus_table->set_row_spacings (0);
+ bus_table->set_col_spacings (0);
+ bus_table->attach (*m_create_master_bus, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ bus_table->attach (*m_master_bus_channel_count, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ bus_table->attach (*chan_count_label_1, 2, 3, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 6, 0);
+ bus_table->attach (*m_create_control_bus, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ bus_table->attach (*m_control_bus_channel_count, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ bus_table->attach (*chan_count_label_2, 2, 3, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 6, 0);
+
input_port_limit_hbox->pack_start(*m_limit_input_ports, Gtk::PACK_SHRINK, 6);
- input_port_limit_hbox->pack_start(*m_input_limit_count, Gtk::PACK_EXPAND_PADDING, 0);
+ input_port_limit_hbox->pack_start(*m_input_limit_count, Gtk::PACK_SHRINK, 0);
+ input_port_limit_hbox->pack_start(*chan_count_label_3, Gtk::PACK_SHRINK, 6);
input_port_vbox->pack_start(*m_connect_inputs, Gtk::PACK_SHRINK, 0);
input_port_vbox->pack_start(*input_port_limit_hbox, Gtk::PACK_EXPAND_PADDING, 0);
input_table->set_row_spacings(0);
input_table->set_col_spacings(0);
input_table->attach(*input_port_vbox, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 6, 6);
+ input_hbox = Gtk::manage (new Gtk::HBox (false, 0));
+ input_hbox->pack_start (*input_table, Gtk::PACK_SHRINK, 18);
+
input_label->set_alignment(0, 0.5);
input_label->set_padding(0,0);
input_label->set_line_wrap(false);
@@ -176,8 +223,9 @@ NewSessionDialog::NewSessionDialog()
input_label->set_use_markup(true);
input_frame->set_shadow_type(Gtk::SHADOW_NONE);
input_frame->set_label_align(0,0.5);
- input_frame->add(*input_table);
+ input_frame->add(*input_hbox);
input_frame->set_label_widget(*input_label);
+
m_connect_outputs->set_flags(Gtk::CAN_FOCUS);
m_connect_outputs->set_relief(Gtk::RELIEF_NORMAL);
m_connect_outputs->set_mode(true);
@@ -195,9 +243,8 @@ NewSessionDialog::NewSessionDialog()
m_output_limit_count->set_wrap(false);
m_output_limit_count->set_sensitive(false);
output_port_limit_hbox->pack_start(*m_limit_output_ports, Gtk::PACK_SHRINK, 6);
- output_port_limit_hbox->pack_start(*m_output_limit_count, Gtk::PACK_EXPAND_PADDING, 0);
- output_port_vbox->pack_start(*m_connect_outputs, Gtk::PACK_SHRINK, 0);
- output_port_vbox->pack_start(*output_port_limit_hbox, Gtk::PACK_EXPAND_PADDING, 0);
+ output_port_limit_hbox->pack_start(*m_output_limit_count, Gtk::PACK_SHRINK, 0);
+ output_port_limit_hbox->pack_start(*chan_count_label_4, Gtk::PACK_SHRINK, 6);
m_connect_outputs_to_master->set_flags(Gtk::CAN_FOCUS);
m_connect_outputs_to_master->set_relief(Gtk::RELIEF_NORMAL);
m_connect_outputs_to_master->set_mode(true);
@@ -208,11 +255,15 @@ NewSessionDialog::NewSessionDialog()
m_connect_outputs_to_physical->set_mode(true);
m_connect_outputs_to_physical->set_active(false);
m_connect_outputs_to_physical->set_border_width(0);
+ output_conn_vbox->pack_start(*m_connect_outputs, Gtk::PACK_SHRINK, 0);
output_conn_vbox->pack_start(*m_connect_outputs_to_master, Gtk::PACK_SHRINK, 0);
output_conn_vbox->pack_start(*m_connect_outputs_to_physical, Gtk::PACK_SHRINK, 0);
output_vbox->set_border_width(6);
- output_vbox->pack_start(*output_port_vbox);
+
+ output_port_vbox->pack_start(*output_port_limit_hbox, Gtk::PACK_SHRINK, 0);
+
output_vbox->pack_start(*output_conn_vbox);
+ output_vbox->pack_start(*output_port_vbox);
output_label->set_alignment(0, 0.5);
output_label->set_padding(0,0);
@@ -221,10 +272,16 @@ NewSessionDialog::NewSessionDialog()
output_label->set_use_markup(true);
output_frame->set_shadow_type(Gtk::SHADOW_NONE);
output_frame->set_label_align(0,0.5);
- output_frame->add(*output_vbox);
+
+ output_hbox = Gtk::manage (new Gtk::HBox (false, 0));
+ output_hbox->pack_start (*output_vbox, Gtk::PACK_SHRINK, 18);
+
+ output_frame->add(*output_hbox);
output_frame->set_label_widget(*output_label);
+
advanced_vbox->pack_start(*advanced_table, Gtk::PACK_SHRINK, 0);
- advanced_vbox->pack_start(*input_frame, Gtk::PACK_SHRINK, 12);
+ advanced_vbox->pack_start(*bus_frame, Gtk::PACK_SHRINK, 6);
+ advanced_vbox->pack_start(*input_frame, Gtk::PACK_SHRINK, 6);
advanced_vbox->pack_start(*output_frame, Gtk::PACK_SHRINK, 0);
advanced_label->set_padding(0,0);
advanced_label->set_line_wrap(false);
@@ -237,7 +294,7 @@ NewSessionDialog::NewSessionDialog()
advanced_expander->add(*advanced_vbox);
advanced_expander->set_label_widget(*advanced_label);
new_session_table->set_border_width(12);
- new_session_table->set_row_spacings(0);
+ new_session_table->set_row_spacings(6);
new_session_table->set_col_spacings(0);
new_session_table->attach(*session_name_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL, 0, 0);
new_session_table->attach(*m_name, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 0, 0);
@@ -245,11 +302,9 @@ NewSessionDialog::NewSessionDialog()
new_session_table->attach(*m_folder, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 0, 0);
new_session_table->attach(*session_template_label, 0, 1, 2, 3, Gtk::FILL, Gtk::FILL, 0, 0);
new_session_table->attach(*m_template, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 0, 0);
- new_session_table->attach(*advanced_expander, 0, 2, 3, 4, Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 12);
- chan_count_label->set_padding(0,0);
- chan_count_label->set_line_wrap(false);
- chan_count_label->set_selectable(false);
- open_session_hbox->pack_start(*open_session_file_label, true, true, 12);
+ new_session_table->attach(*advanced_expander, 0, 2, 3, 4, Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 6);
+
+ open_session_hbox->pack_start(*open_session_file_label, false, false, 12);
open_session_hbox->pack_start(*m_open_filechooser, true, true, 12);
m_treeview->set_flags(Gtk::CAN_FOCUS);
m_treeview->set_headers_visible(true);
@@ -271,11 +326,11 @@ NewSessionDialog::NewSessionDialog()
recent_sesion_label->set_line_wrap(false);
recent_sesion_label->set_selectable(false);
recent_frame->set_border_width(12);
- recent_frame->set_shadow_type(Gtk::SHADOW_IN);
+ recent_frame->set_shadow_type(Gtk::SHADOW_NONE);
recent_frame->add(*recent_scrolledwindow);
recent_frame->set_label_widget(*recent_sesion_label);
- open_session_vbox->pack_start(*open_session_hbox, Gtk::PACK_SHRINK, 12);
open_session_vbox->pack_start(*recent_frame, Gtk::PACK_EXPAND_WIDGET, 0);
+ open_session_vbox->pack_start(*open_session_hbox, Gtk::PACK_SHRINK, 12);
m_notebook->set_flags(Gtk::CAN_FOCUS);
m_notebook->set_scrollable(true);
m_notebook->append_page(*new_session_table, _("New Session"));
diff --git a/gtk2_ardour/new_session_dialog.h b/gtk2_ardour/new_session_dialog.h
index b175c1b79d..e0f488dc80 100644
--- a/gtk2_ardour/new_session_dialog.h
+++ b/gtk2_ardour/new_session_dialog.h
@@ -96,11 +96,20 @@ protected:
Gtk::Label * session_name_label;
Gtk::Label * session_location_label;
Gtk::Label * session_template_label;
- Gtk::Label * chan_count_label;
+ Gtk::Label * chan_count_label_1;
+ Gtk::Label * chan_count_label_2;
+ Gtk::Label * chan_count_label_3;
+ Gtk::Label * chan_count_label_4;
Gtk::Table * advanced_table;
Gtk::HBox * input_port_limit_hbox;
Gtk::VBox * input_port_vbox;
Gtk::Table * input_table;
+ Gtk::HBox * input_hbox;
+
+ Gtk::Label * bus_label;
+ Gtk::Frame * bus_frame;
+ Gtk::Table * bus_table;
+ Gtk::HBox * bus_hbox;
Gtk::Label * input_label;
Gtk::Frame * input_frame;
@@ -108,6 +117,7 @@ protected:
Gtk::VBox * output_port_vbox;
Gtk::VBox * output_conn_vbox;
Gtk::VBox * output_vbox;
+ Gtk::HBox * output_hbox;
Gtk::Label * output_label;
Gtk::Frame * output_frame;
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc
index 013761a86a..b75ef7ead8 100644
--- a/gtk2_ardour/option_editor.cc
+++ b/gtk2_ardour/option_editor.cc
@@ -248,16 +248,16 @@ OptionEditor::add_session_paths ()
click_emphasis_path_entry.set_sensitive (true);
session_raid_entry.set_sensitive (true);
- if (session->click_sound.length() == 0) {
+ if (Config->get_click_sound().empty()) {
click_path_entry.set_text (_("internal"));
} else {
- click_path_entry.set_text (session->click_sound);
+ click_path_entry.set_text (Config->get_click_sound());
}
- if (session->click_emphasis_sound.length() == 0) {
+ if (Config->get_click_emphasis_sound().empty()) {
click_emphasis_path_entry.set_text (_("internal"));
} else {
- click_emphasis_path_entry.set_text (session->click_emphasis_sound);
+ click_emphasis_path_entry.set_text (Config->get_click_emphasis_sound());
}
session_raid_entry.set_text(session->raid_path());
@@ -308,7 +308,7 @@ OptionEditor::short_xfade_adjustment_changed ()
/* val is in msecs */
- Crossfade::set_short_xfade_length ((jack_nframes_t) floor (session->frame_rate() * (val / 1000.0)));
+ Crossfade::set_short_xfade_length ((nframes_t) floor (session->frame_rate() * (val / 1000.0)));
}
}
@@ -366,7 +366,7 @@ void
OptionEditor::smpte_offset_chosen()
{
if (session) {
- jack_nframes_t frames = smpte_offset_clock.current_duration();
+ nframes_t frames = smpte_offset_clock.current_duration();
session->set_smpte_offset (frames);
}
}
@@ -607,7 +607,7 @@ void
OptionEditor::raid_path_changed ()
{
if (session) {
- session->set_raid_path (session_raid_entry.get_text());
+ Config->set_raid_path (session_raid_entry.get_text());
}
}
@@ -655,22 +655,22 @@ OptionEditor::click_sound_changed ()
if (session) {
string path = click_path_entry.get_text();
- if (path == session->click_sound) {
+ if (path == Config->get_click_sound()) {
return;
}
- if (path.length() == 0) {
+ if (path.empty()) {
- session->set_click_sound ("");
+ Config->set_click_sound ("");
} else {
strip_whitespace_edges (path);
if (path == _("internal")) {
- session->set_click_sound ("");
+ Config->set_click_sound ("");
} else {
- session->set_click_sound (path);
+ Config->set_click_sound (path);
}
}
}
@@ -682,22 +682,22 @@ OptionEditor::click_emphasis_sound_changed ()
if (session) {
string path = click_emphasis_path_entry.get_text();
- if (path == session->click_emphasis_sound) {
+ if (path == Config->get_click_emphasis_sound()) {
return;
}
- if (path.length() == 0) {
+ if (path.empty()) {
- session->set_click_emphasis_sound ("");
+ Config->set_click_emphasis_sound ("");
} else {
strip_whitespace_edges (path);
if (path == _("internal")) {
- session->set_click_emphasis_sound ("");
+ Config->set_click_emphasis_sound ("");
} else {
- session->set_click_emphasis_sound (path);
+ Config->set_click_emphasis_sound (path);
}
}
}
diff --git a/gtk2_ardour/pan_automation_time_axis.cc b/gtk2_ardour/pan_automation_time_axis.cc
index bbd4b3b06c..c484673c99 100644
--- a/gtk2_ardour/pan_automation_time_axis.cc
+++ b/gtk2_ardour/pan_automation_time_axis.cc
@@ -52,7 +52,7 @@ PanAutomationTimeAxisView::~PanAutomationTimeAxisView ()
}
void
-PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
+PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
{
if (lines.empty()) {
/* no data, possibly caused by no outputs/inputs */
diff --git a/gtk2_ardour/pan_automation_time_axis.h b/gtk2_ardour/pan_automation_time_axis.h
index ca4a4db8e7..0474677da8 100644
--- a/gtk2_ardour/pan_automation_time_axis.h
+++ b/gtk2_ardour/pan_automation_time_axis.h
@@ -22,7 +22,7 @@ class PanAutomationTimeAxisView : public AutomationTimeAxisView
~PanAutomationTimeAxisView();
- void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
+ void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
void clear_lines ();
void add_line (AutomationLine&);
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h
index a37e33bede..716f0b86d0 100644
--- a/gtk2_ardour/public_editor.h
+++ b/gtk2_ardour/public_editor.h
@@ -87,11 +87,11 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
virtual void separate_region_from_selection () = 0;
virtual void toggle_playback (bool with_abort) = 0;
virtual void set_edit_menu (Gtk::Menu&) = 0;
- virtual jack_nframes_t unit_to_frame (double unit) = 0;
- virtual double frame_to_unit (jack_nframes_t frame) = 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;
- virtual jack_nframes_t pixel_to_frame (double pixel) = 0;
- virtual gulong frame_to_pixel (jack_nframes_t frame) = 0;
+ virtual nframes_t pixel_to_frame (double pixel) = 0;
+ virtual gulong frame_to_pixel (nframes_t frame) = 0;
virtual Selection& get_selection() const = 0;
virtual Selection& get_cut_buffer() const = 0;
virtual void play_selection () = 0;
@@ -119,14 +119,14 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
virtual void ensure_float (Gtk::Window&) = 0;
virtual void show_window () = 0;
virtual TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0) = 0;
- virtual jack_nframes_t leftmost_position() const = 0;
- virtual jack_nframes_t current_page_frames() const = 0;
+ virtual nframes_t leftmost_position() const = 0;
+ virtual nframes_t current_page_frames() const = 0;
virtual void temporal_zoom_step (bool coarser) = 0;
virtual void scroll_tracks_down_line () = 0;
virtual void scroll_tracks_up_line () = 0;
virtual bool new_regionviews_display_gain () = 0;
virtual void prepare_for_cleanup () = 0;
- virtual void reposition_x_origin (jack_nframes_t frame) = 0;
+ virtual void reposition_x_origin (nframes_t frame) = 0;
virtual void remove_last_capture () = 0;
virtual void maximise_editing_space() = 0;
virtual void restore_editing_space() = 0;
diff --git a/gtk2_ardour/redirect_automation_time_axis.cc b/gtk2_ardour/redirect_automation_time_axis.cc
index f1e8eae9eb..529c0b565d 100644
--- a/gtk2_ardour/redirect_automation_time_axis.cc
+++ b/gtk2_ardour/redirect_automation_time_axis.cc
@@ -74,7 +74,7 @@ RedirectAutomationTimeAxisView::~RedirectAutomationTimeAxisView ()
}
void
-RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
+RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
{
double x = 0;
diff --git a/gtk2_ardour/redirect_automation_time_axis.h b/gtk2_ardour/redirect_automation_time_axis.h
index 6976dc2358..9c5670b8da 100644
--- a/gtk2_ardour/redirect_automation_time_axis.h
+++ b/gtk2_ardour/redirect_automation_time_axis.h
@@ -25,7 +25,7 @@ class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
~RedirectAutomationTimeAxisView();
- void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
+ void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
guint32 show_at (double y, int& nth, Gtk::VBox *parent);
void hide ();
diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc
index a7b7096829..35b96a410f 100644
--- a/gtk2_ardour/redirect_box.cc
+++ b/gtk2_ardour/redirect_box.cc
@@ -156,9 +156,9 @@ RedirectBox::~RedirectBox ()
}
void
-RedirectBox::object_drop (string type, uint32_t cnt, void** ptr)
+RedirectBox::object_drop (string type, uint32_t cnt, const boost::shared_ptr<Redirect>* ptr)
{
- if (type != "redirects" || cnt == 0 || ptr == 0) {
+ if (type != "redirects" || cnt == 0 || !ptr) {
return;
}
@@ -167,7 +167,7 @@ RedirectBox::object_drop (string type, uint32_t cnt, void** ptr)
list<boost::shared_ptr<Redirect> > redirects;
for (uint32_t n = 0; n < cnt; ++n) {
- redirects.push_back (boost::shared_ptr<Redirect> ((Redirect*) ptr[n]));
+ redirects.push_back (ptr[n]);
}
paste_redirect_list (redirects);
diff --git a/gtk2_ardour/redirect_box.h b/gtk2_ardour/redirect_box.h
index 51c17cad51..ead3b0dfb8 100644
--- a/gtk2_ardour/redirect_box.h
+++ b/gtk2_ardour/redirect_box.h
@@ -119,10 +119,10 @@ class RedirectBox : public Gtk::HBox
Gtk::EventBox redirect_eventbox;
Gtk::HBox redirect_hpacker;
- Gtkmm2ext::DnDTreeView redirect_display;
+ Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Redirect> > redirect_display;
Gtk::ScrolledWindow redirect_scroller;
- void object_drop (std::string type, uint32_t cnt, void**);
+ void object_drop (std::string type, uint32_t cnt, const boost::shared_ptr<ARDOUR::Redirect>*);
Width _width;
diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc
index 7f7148d2b1..d887021a42 100644
--- a/gtk2_ardour/region_selection.cc
+++ b/gtk2_ardour/region_selection.cc
@@ -148,7 +148,7 @@ RegionSelection::remove (RegionView* rv)
/* reset current start */
- jack_nframes_t ref = max_frames;
+ nframes_t ref = max_frames;
for (i = begin (); i != end(); ++i) {
if (region->first_frame() < ref) {
@@ -164,7 +164,7 @@ RegionSelection::remove (RegionView* rv)
/* reset current end */
- jack_nframes_t ref = 0;
+ nframes_t ref = 0;
for (i = begin (); i != end(); ++i) {
if (region->first_frame() > ref) {
diff --git a/gtk2_ardour/region_selection.h b/gtk2_ardour/region_selection.h
index 2192442cb0..7e1d3b0835 100644
--- a/gtk2_ardour/region_selection.h
+++ b/gtk2_ardour/region_selection.h
@@ -47,13 +47,13 @@ class RegionSelection : public set<RegionView*, RegionComparator>, public sigc::
void clear_all();
- jack_nframes_t start () const {
+ nframes_t start () const {
return _current_start;
}
/* collides with list<>::end */
- jack_nframes_t end_frame () const {
+ nframes_t end_frame () const {
return _current_end;
}
@@ -65,8 +65,8 @@ class RegionSelection : public set<RegionView*, RegionComparator>, public sigc::
void add_to_layer (RegionView *);
- jack_nframes_t _current_start;
- jack_nframes_t _current_end;
+ nframes_t _current_start;
+ nframes_t _current_end;
list<RegionView *> _bylayer;
};
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index 702c328ecd..3fe7563602 100644
--- a/gtk2_ardour/region_view.cc
+++ b/gtk2_ardour/region_view.cc
@@ -133,11 +133,6 @@ RegionView::init (Gdk::Color& basic_color, bool wfd)
set_height (trackview.height);
- region_muted ();
- region_sync_changed ();
- region_resized (BoundsChanged);
- region_locked ();
-
_region->StateChanged.connect (mem_fun(*this, &RegionView::region_changed));
group->signal_event().connect (bind (mem_fun (PublicEditor::instance(), &PublicEditor::canvas_region_view_event), group, this));
@@ -236,8 +231,6 @@ RegionView::region_resized (Change what_changed)
unit_length = _region->length() / samples_per_unit;
- reset_width_dependent_items (unit_length);
-
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
(*i)->set_duration (unit_length);
@@ -307,7 +300,7 @@ RegionView::lower_to_bottom ()
}
bool
-RegionView::set_position (jack_nframes_t pos, void* src, double* ignored)
+RegionView::set_position (nframes_t pos, void* src, double* ignored)
{
double delta;
bool ret;
@@ -343,7 +336,7 @@ RegionView::set_samples_per_unit (gdouble spu)
}
bool
-RegionView::set_duration (jack_nframes_t frames, void *src)
+RegionView::set_duration (nframes_t frames, void *src)
{
if (!TimeAxisViewItem::set_duration (frames, src)) {
return false;
@@ -424,7 +417,7 @@ RegionView::region_sync_changed ()
}
int sync_dir;
- jack_nframes_t sync_offset;
+ nframes_t sync_offset;
sync_offset = _region->sync_offset (sync_dir);
diff --git a/gtk2_ardour/region_view.h b/gtk2_ardour/region_view.h
index c7d113d17d..435e878bc8 100644
--- a/gtk2_ardour/region_view.h
+++ b/gtk2_ardour/region_view.h
@@ -58,7 +58,7 @@ class RegionView : public TimeAxisViewItem
virtual void set_height (double);
virtual void set_samples_per_unit (double);
- virtual bool set_duration (jack_nframes_t, void*);
+ virtual bool set_duration (nframes_t, void*);
void move (double xdelta, double ydelta);
@@ -67,7 +67,7 @@ class RegionView : public TimeAxisViewItem
void lower ();
void lower_to_bottom ();
- bool set_position(jack_nframes_t pos, void* src, double* delta = 0);
+ bool set_position(nframes_t pos, void* src, double* delta = 0);
virtual void show_region_editor () = 0;
virtual void hide_region_editor();
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 470a6d0b88..e0d976c233 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -469,7 +469,7 @@ RouteTimeAxisView::build_display_menu ()
void
-RouteTimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
+RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
{
double x1;
double x2;
@@ -902,7 +902,7 @@ RouteTimeAxisView::set_selected_regionviews (RegionSelection& regions)
}
void
-RouteTimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results)
+RouteTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results)
{
double speed = 1.0;
@@ -910,8 +910,8 @@ RouteTimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, do
speed = get_diskstream()->speed();
}
- jack_nframes_t start_adjusted = session_frame_to_track_frame(start, speed);
- jack_nframes_t end_adjusted = session_frame_to_track_frame(end, speed);
+ nframes_t start_adjusted = session_frame_to_track_frame(start, speed);
+ nframes_t end_adjusted = session_frame_to_track_frame(end, speed);
if (_view && ((top < 0.0 && bot < 0.0)) || touched (top, bot)) {
_view->get_selectables (start_adjusted, end_adjusted, results);
@@ -1005,7 +1005,7 @@ RouteTimeAxisView::hide_click ()
}
boost::shared_ptr<Region>
-RouteTimeAxisView::find_next_region (jack_nframes_t pos, RegionPoint point, int32_t dir)
+RouteTimeAxisView::find_next_region (nframes_t pos, RegionPoint point, int32_t dir)
{
boost::shared_ptr<Diskstream> stream;
Playlist *playlist;
@@ -1070,7 +1070,7 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
}
bool
-RouteTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selection, size_t nth)
+RouteTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size_t nth)
{
if (!is_track()) {
return false;
diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h
index 7489dc84fe..65d82506b8 100644
--- a/gtk2_ardour/route_time_axis.h
+++ b/gtk2_ardour/route_time_axis.h
@@ -73,19 +73,19 @@ public:
void set_samples_per_unit (double);
void set_height (TimeAxisView::TrackHeight);
- void show_timestretch (jack_nframes_t start, jack_nframes_t end);
+ void show_timestretch (nframes_t start, nframes_t end);
void hide_timestretch ();
void selection_click (GdkEventButton*);
void set_selected_points (PointSelection&);
void set_selected_regionviews (RegionSelection&);
- void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable *>&);
+ void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable *>&);
void get_inverted_selectables (Selection&, list<Selectable*>&);
- boost::shared_ptr<ARDOUR::Region> find_next_region (jack_nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
+ boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
/* Editing operations */
bool cut_copy_clear (Selection&, Editing::CutCopyOp);
- bool paste (jack_nframes_t, float times, Selection&, size_t nth);
+ bool paste (nframes_t, float times, Selection&, size_t nth);
list<TimeAxisView*> get_child_list();
@@ -203,7 +203,7 @@ protected:
virtual void show_existing_automation ();
virtual void hide_all_automation ();
- void timestretch (jack_nframes_t start, jack_nframes_t end);
+ void timestretch (nframes_t start, nframes_t end);
void visual_click ();
void hide_click ();
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 040dac6e0e..dc861fbbbb 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -26,6 +26,8 @@
#include <ardour/route_group.h>
#include <pbd/memento_command.h>
+#include <pbd/stacktrace.h>
+#include <pbd/shiva.h>
#include "route_ui.h"
#include "keyboard.h"
@@ -46,7 +48,6 @@ using namespace Gtkmm2ext;
using namespace ARDOUR;
using namespace PBD;
-
RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, const char* m_name,
const char* s_name, const char* r_name)
: AxisView(sess),
@@ -67,7 +68,8 @@ RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, co
set_color (unique_random_color());
}
- _route->GoingAway.connect (mem_fun (*this, &RouteUI::route_removed));
+ new Shiva<Route,RouteUI> (*_route, *this);
+
_route->active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed));
mute_button = manage (new BindableToggleButton (_route->mute_control(), m_name ));
@@ -97,6 +99,7 @@ RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, co
RouteUI::~RouteUI()
{
+ GoingAway (); /* EMIT SIGNAL */
delete mute_menu;
}
@@ -582,17 +585,6 @@ RouteUI::reversibly_apply_route_boolean (string name, void (Route::*func)(bool,
}
void
-RouteUI::reversibly_apply_audio_track_boolean (string name, void (AudioTrack::*func)(bool, void *), bool yn, void *arg)
-{
- _session.begin_reversible_command (name);
- XMLNode &before = audio_track()->get_state();
- bind (mem_fun (*audio_track(), func), yn, arg)();
- XMLNode &after = audio_track()->get_state();
- _session.add_command (new MementoCommand<AudioTrack>(*audio_track(), &before, &after));
- _session.commit_reversible_command ();
-}
-
-void
RouteUI::reversibly_apply_track_boolean (string name, void (Track::*func)(bool, void *), bool yn, void *arg)
{
_session.begin_reversible_command (name);
@@ -743,13 +735,6 @@ RouteUI::idle_remove_this_route (RouteUI *rui)
}
void
-RouteUI::route_removed ()
-{
- ENSURE_GUI_THREAD(mem_fun (*this, &RouteUI::route_removed));
- delete this;
-}
-
-void
RouteUI::route_rename ()
{
ArdourPrompter name_prompter (true);
diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h
index 00b3e0a313..eace2c6c2a 100644
--- a/gtk2_ardour/route_ui.h
+++ b/gtk2_ardour/route_ui.h
@@ -155,8 +155,9 @@ class RouteUI : public virtual AxisView
void set_remote_control_id (uint32_t id, Gtk::CheckMenuItem* item);
void reversibly_apply_route_boolean (string name, void (ARDOUR::Route::*func)(bool, void*), bool, void *);
- void reversibly_apply_audio_track_boolean (string name, void (ARDOUR::AudioTrack::*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__ */
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index 9d171e484d..06475aa1d4 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -234,7 +234,7 @@ Selection::toggle (vector<RegionView*>& r)
}
long
-Selection::toggle (jack_nframes_t start, jack_nframes_t end)
+Selection::toggle (nframes_t start, nframes_t end)
{
AudioRangeComparator cmp;
@@ -344,7 +344,7 @@ Selection::add (vector<RegionView*>& v)
}
long
-Selection::add (jack_nframes_t start, jack_nframes_t end)
+Selection::add (nframes_t start, nframes_t end)
{
AudioRangeComparator cmp;
@@ -360,7 +360,7 @@ Selection::add (jack_nframes_t start, jack_nframes_t end)
}
void
-Selection::replace (uint32_t sid, jack_nframes_t start, jack_nframes_t end)
+Selection::replace (uint32_t sid, nframes_t start, nframes_t end)
{
for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
if ((*i).id == sid) {
@@ -484,7 +484,7 @@ Selection::remove (uint32_t selection_id)
}
void
-Selection::remove (jack_nframes_t start, jack_nframes_t end)
+Selection::remove (nframes_t start, nframes_t end)
{
}
@@ -550,7 +550,7 @@ Selection::set (vector<RegionView*>& v)
}
long
-Selection::set (TimeAxisView* track, jack_nframes_t start, jack_nframes_t end)
+Selection::set (TimeAxisView* track, nframes_t start, nframes_t end)
{
if ((start == 0 && end == 0) || end < start) {
return 0;
diff --git a/gtk2_ardour/selection.h b/gtk2_ardour/selection.h
index 7b503a5e63..a1b1ae0da3 100644
--- a/gtk2_ardour/selection.h
+++ b/gtk2_ardour/selection.h
@@ -98,7 +98,7 @@ class Selection : public sigc::trackable
void set (const list<TimeAxisView*>&);
void set (RegionView*);
void set (std::vector<RegionView*>&);
- long set (TimeAxisView*, jack_nframes_t, jack_nframes_t);
+ long set (TimeAxisView*, nframes_t, nframes_t);
void set (ARDOUR::AutomationList*);
void set (ARDOUR::Playlist*);
void set (const list<ARDOUR::Playlist*>&);
@@ -109,7 +109,7 @@ class Selection : public sigc::trackable
void toggle (const list<TimeAxisView*>&);
void toggle (RegionView*);
void toggle (std::vector<RegionView*>&);
- long toggle (jack_nframes_t, jack_nframes_t);
+ long toggle (nframes_t, nframes_t);
void toggle (ARDOUR::AutomationList*);
void toggle (ARDOUR::Playlist*);
void toggle (const list<ARDOUR::Playlist*>&);
@@ -119,7 +119,7 @@ class Selection : public sigc::trackable
void add (const list<TimeAxisView*>&);
void add (RegionView*);
void add (std::vector<RegionView*>&);
- long add (jack_nframes_t, jack_nframes_t);
+ long add (nframes_t, nframes_t);
void add (ARDOUR::AutomationList*);
void add (ARDOUR::Playlist*);
void add (const list<ARDOUR::Playlist*>&);
@@ -129,13 +129,13 @@ class Selection : public sigc::trackable
void remove (const list<TimeAxisView*>&);
void remove (RegionView*);
void remove (uint32_t selection_id);
- void remove (jack_nframes_t, jack_nframes_t);
+ void remove (nframes_t, nframes_t);
void remove (ARDOUR::AutomationList*);
void remove (ARDOUR::Playlist*);
void remove (const list<ARDOUR::Playlist*>&);
void remove (boost::shared_ptr<ARDOUR::Redirect>);
- void replace (uint32_t time_index, jack_nframes_t start, jack_nframes_t end);
+ void replace (uint32_t time_index, nframes_t start, nframes_t end);
void clear_regions();
void clear_tracks ();
diff --git a/gtk2_ardour/send_ui.cc b/gtk2_ardour/send_ui.cc
index 897f5f3847..c4656834a6 100644
--- a/gtk2_ardour/send_ui.cc
+++ b/gtk2_ardour/send_ui.cc
@@ -98,14 +98,6 @@ SendUI::outs_changed (IOChange change, void* ignored)
}
void
-SendUI::send_going_away ()
-{
- ENSURE_GUI_THREAD (mem_fun (*this, &SendUI::send_going_away))
-
- delete this;
-}
-
-void
SendUI::update ()
{
}
@@ -113,7 +105,7 @@ SendUI::update ()
void
SendUI::fast_update ()
{
- if (_session.meter_falloff() > 0.0f) {
+ if (Config->get_meter_falloff() > 0.0f) {
gpm.update_meters ();
}
}
@@ -146,7 +138,6 @@ void
SendUIWindow::send_going_away ()
{
ENSURE_GUI_THREAD (mem_fun (*this, &SendUIWindow::send_going_away));
-
- delete this;
+ delete_when_idle (this);
}
diff --git a/gtk2_ardour/send_ui.h b/gtk2_ardour/send_ui.h
index c8576cab9e..b64e3c8e58 100644
--- a/gtk2_ardour/send_ui.h
+++ b/gtk2_ardour/send_ui.h
@@ -54,7 +54,6 @@ class SendUI : public Gtk::HBox
sigc::connection screen_update_connection;
sigc::connection fast_screen_update_connection;
- void send_going_away ();
void ins_changed (ARDOUR::IOChange, void*);
void outs_changed (ARDOUR::IOChange, void*);
};
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index f434463500..67084eb6a0 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -308,10 +308,10 @@ SoundFileBox::field_selected ()
// this needs to be kept in sync with the ImportMode enum defined in editing.h and editing_syms.h.
static const char *import_mode_strings[] = {
- X_("Add to Region list"),
- X_("Add to selected Track(s)"),
- X_("Add as new Track(s)"),
- X_("Add as new Tape Track(s)"),
+ N_("Add to Region list"),
+ N_("Add to selected Track(s)"),
+ N_("Add as new Track(s)"),
+ N_("Add as new Tape Track(s)"),
0
};
diff --git a/gtk2_ardour/splash.png b/gtk2_ardour/splash.png
new file mode 100644
index 0000000000..4152aa0cc2
--- /dev/null
+++ b/gtk2_ardour/splash.png
Binary files differ
diff --git a/gtk2_ardour/splash.ppm b/gtk2_ardour/splash.ppm
deleted file mode 100644
index 850f4072f7..0000000000
--- a/gtk2_ardour/splash.ppm
+++ /dev/null
@@ -1,32 +0,0 @@
-P6
-# CREATOR: The GIMP's PNM Filter Version 1.0
-321 216
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UUUUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDUUUUUUfff333DDDUUUUUUUUUDDDUUUfffUUUUUUUUU333ffffffDDDDDDUUUUUUUUUUUUUUUUUUUUUDDDUUUUUUDDDfff333DDDDDDUUUDDD333DDDDDDUUUDDDUUUDDDDDDUUUDDD333DDD333DDDDDDUUUDDDDDDDDD000%%%厖呞谮灋333DDDUUUUUUUUUDDDUUUDDDDDDUUUDDDDDD
-
-
-Ζ靠痧餡WWUUUDDDfffDDDDDDUUUDDDDDDUUUDDDDDDUUUUUU
-
-
-崓嵈创镲飱妸UUUDDDDDDUUUDDDUUUDDDDDDDDDUUU333DDDDDD///???创殆DDDDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDDDD晻暣创沣懵侣UUUDDDDDDUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDD555 创创创鲻DDDUUUUUUDDDDDDUUUUUUDDDUUUUUU---///创搭铑瓺DDDDDDDDDDDDDDUUUDDDUUUUUUDDDDDDDDD333UUU剟劥创鳧DDUUUUUUUUUDDDUUUUUUDDDDDDDDDUUUDDDUUUUUUfffUUULLL创纯靠篌驞DDDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDUUUUUU333DDDDDDUUUUUUDDDDDDUUUDDDUUUDDDDDDDDDUUU333DDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDDDDDDDDDDDfffDDDfffUUUUUUDDDDDDUUUDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUDDDDDDDDDUUUUUUUUUUUUDDDDDDUUUDDDDDDDDD333DDDUUUUUUDDDDDDDDDUUUDDD333DDDDDDDDDUUUDDDUUU333333333DDDUUUfffUUUUUUUUUUUUDDDDDDDDD333333DDDDDD333DDDUUUDDDUUUDDDDDDDDDDDDUUUDDDDDDUUUDDDUUUUUUUUUUUUfffDDD|||创撮殚ゥDDUUUUUUDDDUUUUUUUUUUUUUUUDDDUUUDDDDDD---创丛栽换籙UUDDDUUUUUUUUU333DDDDDDUUUDDDDDDDDDUUUUUUUUUUUU```创达镲洓沠ffDDDDDDDDDDDDDDDUUUDDDDDDDDDDDDDDDDDDDDDUUUBBB构貂鮓WWUUUUUUUUUUUUDDDDDDUUUDDDDDDDDD333DDDUUU```创戴鼢xxxDDD333DDDDDDDDDUUUDDDUUU333333333DDD
-
-
-崓嵈创耨fffDDDDDDDDDUUUUUUUUUUUUDDDUUUDDDUUUUUUUUUUUUDDD
-
-
-崓嵈创梃韪父DDD333DDDDDDUUUUUUUUUDDDDDDDDDUUUDDDeee创创创鷣亖DDD333UUUDDDDDDUUUDDDDDDUUUDDDUUUDDDUUUDDDLLL忖ⅱUUUUUUUUfffDDDDDDUUUDDDDDDDDDDDD999###创淬沣侣耈UUUUUDDDUUUUUUDDDDDDDDDUUUUUUUUUDDD333555'''创鷹棗fffDDDUUUUUUDDDUUUDDDUUUDDDUUUUUUDDDDDDUUUfffUUU
-
-
-晻暣创貂鮻DDDDDDUUUUUUDDDDDDUUUUUUUUUDDDDDDAAAAAA{{{晻暣创创殆UUUUUUDDDDDDUUUDDDDDDDDDUUUDDDUUUUUUDDDUUUUUUfff```创瘩耨UUU333DDDDDDUUUDDDDDD333DDDUUUUUUDDDUUUUUUUUUDDDUUUUUUUUUDDDDDDDDDfffDDDUUUUUUUUUUUUUUU333DDDUUUDDDDDDDDDDDDDDDUUUDDDUUU333DDDDDDDDD333DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUDDDDDDUUUUUUUUUUUUDDDfffUUUUUUUUUUUUDDD333DDDDDDDDDDDDUUUDDDUUUUUUUUUUUUDDDDDDDDDfffUUUUUUUUUDDDUUUUUUUUUDDD333DDDDDDUUUUUUDDD333DDDUUUUUUDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDDDDDDDDDDDDDDDD333fffUUUUUUUUUUUUDDDUUUUUUDDDUUUUUUUUU333333DDDDDD333DDDDDDUUUDDDUUUUUUUUUUUUPPP创创创鷮寣UUUDDDUUUDDDDDDDDDUUUDDDDDDUUUDDD888<<<櫃櫉煙创磋梃妹肬UUDDDUUUDDDDDDUUUDDDUUUUUUfffUUUDDDUUUUUUUUU===创创创鶧DDDDDDDDDDDDDDDDDDDDUUUDDDDDDDDDUUUUUUDDDDDDUUU
-
-
-SSS创葺葭珑垐圲UUUUUUUUDDDUUU]]]潩潣槝dddUUUDDDDDDDDDDDDDDDUUUUUUDDDDDDUUUUUUDDDUUUDDDDDDDDDQQQ创创创创磁排谮谟佑屯蜕缮敂擳TTUUUDDDDDDDDDDDDDDDUUU[[[创创创烫踢哌哌咭乙憫慾jjUUUUUUDDDUUUUUUUUUfffUUUUUUUUU
-
-
-NNN晻暣创构股缮佑用妹煙焥ss___DDDDDDDDDDDDDDDDDDUUUHHH煙熋妹揪緵洓悙恎gg[[[DDDDDDDDDfffUUUDDDUUUUUUUUUfff///ZZZ北睄崓潩潱#fffDDDDDDDDDUUUDDDfffDDDUUUDDDUUUDDDDDD333UUUDDDBBBnnn煙煷创靠肯舷行锌靠寣宲ppTTTDDDDDD333UUUDDDDDD===
diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc
index 3a15d84982..0b06858536 100644
--- a/gtk2_ardour/streamview.cc
+++ b/gtk2_ardour/streamview.cc
@@ -165,9 +165,15 @@ StreamView::add_region_view (boost::shared_ptr<Region> r)
}
void
-StreamView::remove_region_view (boost::shared_ptr<Region> r)
+StreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), r));
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), weak_r));
+
+ boost::shared_ptr<Region> r (weak_r.lock());
+
+ if (!r) {
+ return;
+ }
for (list<RegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
if (((*i)->region()) == r) {
@@ -178,27 +184,6 @@ StreamView::remove_region_view (boost::shared_ptr<Region> r)
}
}
-#if 0
-(unused)
-void
-StreamView::remove_rec_region (boost::shared_ptr<Region> r)
-{
- ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::remove_rec_region), r));
-
- if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {
- fatal << "region deleted from non-GUI thread!" << endmsg;
- /*NOTREACHED*/
- }
-
- for (list<boost::shared_ptr<Region> >::iterator i = rec_regions.begin(); i != rec_regions.end(); ++i) {
- if (*i == r) {
- rec_regions.erase (i);
- break;
- }
- }
-}
-#endif
-
void
StreamView::undisplay_diskstream ()
{
@@ -334,7 +319,7 @@ StreamView::update_rec_box ()
if (rec_active && rec_rects.size() > 0) {
/* only update the last box */
RecBoxInfo & rect = rec_rects.back();
- jack_nframes_t at = _trackview.get_diskstream()->current_capture_end();
+ nframes_t at = _trackview.get_diskstream()->current_capture_end();
double xstart;
double xend;
@@ -399,7 +384,7 @@ StreamView::set_selected_regionviews (RegionSelection& regions)
}
void
-StreamView::get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable*>& results)
+StreamView::get_selectables (nframes_t start, nframes_t end, list<Selectable*>& results)
{
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
if ((*i)->region()->coverage(start, end) != OverlapNone) {
diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h
index e965fc7c94..3774fd4dbb 100644
--- a/gtk2_ardour/streamview.h
+++ b/gtk2_ardour/streamview.h
@@ -44,8 +44,8 @@ namespace ARDOUR {
struct RecBoxInfo {
ArdourCanvas::SimpleRect* rectangle;
- jack_nframes_t start;
- jack_nframes_t length;
+ nframes_t start;
+ nframes_t length;
};
class PublicEditor;
@@ -87,7 +87,7 @@ public:
void foreach_regionview (sigc::slot<void,RegionView*> slot);
void set_selected_regionviews (RegionSelection&);
- void get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable* >&);
+ void get_selectables (nframes_t start, nframes_t end, list<Selectable* >&);
void get_inverted_selectables (Selection&, list<Selectable* >& results);
void add_region_view (boost::shared_ptr<ARDOUR::Region>);
@@ -108,7 +108,7 @@ protected:
virtual void update_rec_regions () = 0;
virtual void add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_waves) = 0;
- virtual void remove_region_view (boost::shared_ptr<ARDOUR::Region> );
+ virtual void remove_region_view (boost::weak_ptr<ARDOUR::Region> );
//void remove_rec_region (boost::shared_ptr<ARDOUR::Region>); (unused)
void display_diskstream (boost::shared_ptr<ARDOUR::Diskstream>);
diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc
index 7eb0362580..c5816e36d1 100644
--- a/gtk2_ardour/tempo_dialog.cc
+++ b/gtk2_ardour/tempo_dialog.cc
@@ -13,7 +13,7 @@ using namespace Gtkmm2ext;
using namespace ARDOUR;
using namespace PBD;
-TempoDialog::TempoDialog (TempoMap& map, jack_nframes_t frame, const string & action)
+TempoDialog::TempoDialog (TempoMap& map, nframes_t frame, const string & action)
: ArdourDialog ("tempo dialog"),
bpm_frame (_("Beats per minute")),
ok_button (action),
@@ -194,7 +194,7 @@ TempoDialog::get_bbt_time (BBT_Time& requested)
}
-MeterDialog::MeterDialog (TempoMap& map, jack_nframes_t frame, const string & action)
+MeterDialog::MeterDialog (TempoMap& map, nframes_t frame, const string & action)
: ArdourDialog ("meter dialog"),
note_frame (_("Meter denominator")),
bpb_frame (_("Beats per bar")),
diff --git a/gtk2_ardour/tempo_dialog.h b/gtk2_ardour/tempo_dialog.h
index 2c6827954f..720a87c4ba 100644
--- a/gtk2_ardour/tempo_dialog.h
+++ b/gtk2_ardour/tempo_dialog.h
@@ -33,7 +33,7 @@ struct TempoDialog : public ArdourDialog
Gtk::Frame when_frame;
char buf[64];
- TempoDialog (ARDOUR::TempoMap&, jack_nframes_t, const string & action);
+ TempoDialog (ARDOUR::TempoMap&, nframes_t, const string & action);
TempoDialog (ARDOUR::TempoSection&, const string & action);
double get_bpm ();
@@ -66,7 +66,7 @@ struct MeterDialog : public ArdourDialog
Gtk::Frame when_frame;
char buf[64];
- MeterDialog (ARDOUR::TempoMap&, jack_nframes_t, const string & action);
+ MeterDialog (ARDOUR::TempoMap&, nframes_t, const string & action);
MeterDialog (ARDOUR::MeterSection&, const string & action);
double get_bpb ();
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 2e1f3c5273..2119efc722 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -575,7 +575,7 @@ TimeAxisView::set_samples_per_unit (double spu)
}
void
-TimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
+TimeAxisView::show_timestretch (nframes_t start, nframes_t end)
{
for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
(*i)->show_timestretch (start, end);
@@ -617,7 +617,7 @@ TimeAxisView::show_selection (TimeSelection& ts)
selection_group->raise_to_top();
for (list<AudioRange>::iterator i = ts.begin(); i != ts.end(); ++i) {
- jack_nframes_t start, end, cnt;
+ nframes_t start, end, cnt;
start = (*i).start;
end = (*i).end;
@@ -795,7 +795,7 @@ TimeAxisView::remove_child (TimeAxisView* child)
}
void
-TimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& result)
+TimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& result)
{
return;
}
diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h
index eff2e5fb6a..0ba4dc1938 100644
--- a/gtk2_ardour/time_axis_view.h
+++ b/gtk2_ardour/time_axis_view.h
@@ -166,7 +166,7 @@ class TimeAxisView : public virtual AxisView
virtual void show_selection (TimeSelection&);
virtual void hide_selection ();
virtual void reshow_selection (TimeSelection&);
- virtual void show_timestretch (jack_nframes_t start, jack_nframes_t end);
+ virtual void show_timestretch (nframes_t start, nframes_t end);
virtual void hide_timestretch ();
virtual void hide_dependent_views (TimeAxisViewItem&) {}
@@ -175,18 +175,18 @@ class TimeAxisView : public virtual AxisView
/* editing operations */
virtual bool cut_copy_clear (Selection&, Editing::CutCopyOp) { return false; }
- virtual bool paste (jack_nframes_t, float times, Selection&, size_t nth) { return false; }
+ virtual bool paste (nframes_t, float times, Selection&, size_t nth) { return false; }
virtual void set_selected_regionviews (RegionSelection&) {}
virtual void set_selected_points (PointSelection&) {}
- virtual boost::shared_ptr<ARDOUR::Region> find_next_region (jack_nframes_t pos, ARDOUR::RegionPoint, int32_t dir) {
+ virtual boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir) {
return boost::shared_ptr<ARDOUR::Region> ();
}
void order_selection_trims (ArdourCanvas::Item *item, bool put_start_on_top);
- virtual void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results);
+ virtual void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results);
virtual void get_inverted_selectables (Selection&, list<Selectable *>& results);
/* state/serialization management */
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 28fafcaa09..b23e7972ae 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -68,7 +68,7 @@ double TimeAxisViewItem::NAME_HIGHLIGHT_THRESH;
* @param duration the duration of this item
*/
TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color,
- jack_nframes_t start, jack_nframes_t duration,
+ nframes_t start, nframes_t duration,
Visibility vis)
: trackview (tv)
{
@@ -242,7 +242,7 @@ TimeAxisViewItem::~TimeAxisViewItem()
* @return true if the position change was a success, false otherwise
*/
bool
-TimeAxisViewItem::set_position(jack_nframes_t pos, void* src, double* delta)
+TimeAxisViewItem::set_position(nframes_t pos, void* src, double* delta)
{
if (position_locked) {
return false;
@@ -282,7 +282,7 @@ TimeAxisViewItem::set_position(jack_nframes_t pos, void* src, double* delta)
*
* @return the position of this item
*/
-jack_nframes_t
+nframes_t
TimeAxisViewItem::get_position() const
{
return frame_position;
@@ -296,7 +296,7 @@ TimeAxisViewItem::get_position() const
* @return true if the duration change was succesful, false otherwise
*/
bool
-TimeAxisViewItem::set_duration (jack_nframes_t dur, void* src)
+TimeAxisViewItem::set_duration (nframes_t dur, void* src)
{
if ((dur > max_item_duration) || (dur < min_item_duration)) {
warning << string_compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
@@ -310,9 +310,7 @@ TimeAxisViewItem::set_duration (jack_nframes_t dur, void* src)
item_duration = dur;
- double pixel_width = trackview.editor.frame_to_pixel (dur);
-
- reset_width_dependent_items (pixel_width);
+ reset_width_dependent_items (trackview.editor.frame_to_pixel (dur));
DurationChanged (dur, src) ; /* EMIT_SIGNAL */
return true;
@@ -322,7 +320,7 @@ TimeAxisViewItem::set_duration (jack_nframes_t dur, void* src)
* Returns the duration of this item
*
*/
-jack_nframes_t
+nframes_t
TimeAxisViewItem::get_duration() const
{
return (item_duration);
@@ -335,7 +333,7 @@ TimeAxisViewItem::get_duration() const
* @param src the identity of the object that initiated the change
*/
void
-TimeAxisViewItem::set_max_duration(jack_nframes_t dur, void* src)
+TimeAxisViewItem::set_max_duration(nframes_t dur, void* src)
{
max_item_duration = dur ;
MaxDurationChanged(max_item_duration, src) ; /* EMIT_SIGNAL */
@@ -346,7 +344,7 @@ TimeAxisViewItem::set_max_duration(jack_nframes_t dur, void* src)
*
* @return the maximum duration that this item may be set to
*/
-jack_nframes_t
+nframes_t
TimeAxisViewItem::get_max_duration() const
{
return (max_item_duration) ;
@@ -359,7 +357,7 @@ TimeAxisViewItem::get_max_duration() const
* @param src the identity of the object that initiated the change
*/
void
-TimeAxisViewItem::set_min_duration(jack_nframes_t dur, void* src)
+TimeAxisViewItem::set_min_duration(nframes_t dur, void* src)
{
min_item_duration = dur ;
MinDurationChanged(max_item_duration, src) ; /* EMIT_SIGNAL */
@@ -370,7 +368,7 @@ TimeAxisViewItem::set_min_duration(jack_nframes_t dur, void* src)
*
* @return the nimum duration that this item mey be set to
*/
-jack_nframes_t
+nframes_t
TimeAxisViewItem::get_min_duration() const
{
return(min_item_duration) ;
@@ -851,7 +849,7 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
}
} else {
name_highlight->show();
- if (name_text) {
+ if (name_text && !get_item_name().empty()) {
name_text->show();
reset_name_width (pixel_width);
}
diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h
index 9ddb06876a..e27b944e2a 100644
--- a/gtk2_ardour/time_axis_view_item.h
+++ b/gtk2_ardour/time_axis_view_item.h
@@ -48,14 +48,14 @@ class TimeAxisViewItem : public Selectable
* @param src the identity of the object that initiated the change
* @return true if the position change was a success, false otherwise
*/
- virtual bool set_position(jack_nframes_t pos, void* src, double* delta = 0) ;
+ virtual bool set_position(nframes_t pos, void* src, double* delta = 0) ;
/**
* Return the position of this item upon the timeline
*
* @return the position of this item
*/
- jack_nframes_t get_position() const ;
+ nframes_t get_position() const ;
/**
* Sets the duration of this item
@@ -64,13 +64,13 @@ class TimeAxisViewItem : public Selectable
* @param src the identity of the object that initiated the change
* @return true if the duration change was succesful, false otherwise
*/
- virtual bool set_duration(jack_nframes_t dur, void* src) ;
+ virtual bool set_duration(nframes_t dur, void* src) ;
/**
* Returns the duration of this item
*
*/
- jack_nframes_t get_duration() const ;
+ nframes_t get_duration() const ;
/**
* Sets the maximum duration that this item make have.
@@ -78,14 +78,14 @@ class TimeAxisViewItem : public Selectable
* @param dur the new maximum duration
* @param src the identity of the object that initiated the change
*/
- virtual void set_max_duration(jack_nframes_t dur, void* src) ;
+ virtual void set_max_duration(nframes_t dur, void* src) ;
/**
* Returns the maxmimum duration that this item may be set to
*
* @return the maximum duration that this item may be set to
*/
- jack_nframes_t get_max_duration() const ;
+ nframes_t get_max_duration() const ;
/**
* Sets the minimu duration that this item may be set to
@@ -93,14 +93,14 @@ class TimeAxisViewItem : public Selectable
* @param the minimum duration that this item may be set to
* @param src the identity of the object that initiated the change
*/
- virtual void set_min_duration(jack_nframes_t dur, void* src) ;
+ virtual void set_min_duration(nframes_t dur, void* src) ;
/**
* Returns the minimum duration that this item mey be set to
*
* @return the nimum duration that this item mey be set to
*/
- jack_nframes_t get_min_duration() const ;
+ nframes_t get_min_duration() const ;
/**
* Sets whether the position of this Item is locked to its current position
@@ -295,19 +295,19 @@ class TimeAxisViewItem : public Selectable
sigc::signal<void,std::string,std::string,void*> NameChanged ;
/** Emiited when the position of this item changes */
- sigc::signal<void,jack_nframes_t,void*> PositionChanged ;
+ sigc::signal<void,nframes_t,void*> PositionChanged ;
/** Emitted when the position lock of this item is changed */
sigc::signal<void,bool,void*> PositionLockChanged ;
/** Emitted when the duration of this item changes */
- sigc::signal<void,jack_nframes_t,void*> DurationChanged ;
+ sigc::signal<void,nframes_t,void*> DurationChanged ;
/** Emitted when the maximum item duration is changed */
- sigc::signal<void,jack_nframes_t,void*> MaxDurationChanged ;
+ sigc::signal<void,nframes_t,void*> MaxDurationChanged ;
/** Emitted when the mionimum item duration is changed */
- sigc::signal<void,jack_nframes_t,void*> MinDurationChanged ;
+ sigc::signal<void,nframes_t,void*> MinDurationChanged ;
protected:
@@ -334,7 +334,7 @@ class TimeAxisViewItem : public Selectable
* @param duration the duration of this item
*/
TimeAxisViewItem(const std::string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color,
- jack_nframes_t start, jack_nframes_t duration, Visibility v = Visibility (0));
+ nframes_t start, nframes_t duration, Visibility v = Visibility (0));
/**
* Calculates some contrasting color for displaying various parts of this item, based upon the base color
@@ -379,16 +379,16 @@ class TimeAxisViewItem : public Selectable
bool position_locked ;
/** The posotion of this item on the timeline */
- jack_nframes_t frame_position ;
+ nframes_t frame_position ;
/** the duration of this item upon the timeline */
- jack_nframes_t item_duration ;
+ nframes_t item_duration ;
/** the maximum duration that we allow this item to take */
- jack_nframes_t max_item_duration ;
+ nframes_t max_item_duration ;
/** the minimu duration that we allow this item to take */
- jack_nframes_t min_item_duration ;
+ nframes_t min_item_duration ;
/** indicates whether this Max Duration constraint is active */
bool max_duration_active ;
diff --git a/gtk2_ardour/time_selection.cc b/gtk2_ardour/time_selection.cc
index 518e04cccb..c0a05abc45 100644
--- a/gtk2_ardour/time_selection.cc
+++ b/gtk2_ardour/time_selection.cc
@@ -69,14 +69,14 @@ TimeSelection::consolidate ()
return changed;
}
-jack_nframes_t
+nframes_t
TimeSelection::start ()
{
if (empty()) {
return 0;
}
- jack_nframes_t first = max_frames;
+ nframes_t first = max_frames;
for (std::list<AudioRange>::iterator i = begin(); i != end(); ++i) {
if ((*i).start < first) {
@@ -86,10 +86,10 @@ TimeSelection::start ()
return first;
}
-jack_nframes_t
+nframes_t
TimeSelection::end_frame ()
{
- jack_nframes_t last = 0;
+ nframes_t last = 0;
/* XXX make this work like RegionSelection: no linear search needed */
@@ -101,7 +101,7 @@ TimeSelection::end_frame ()
return last;
}
-jack_nframes_t
+nframes_t
TimeSelection::length()
{
return end_frame() - start() + 1;
diff --git a/gtk2_ardour/time_selection.h b/gtk2_ardour/time_selection.h
index f0db774733..54a8844ce0 100644
--- a/gtk2_ardour/time_selection.h
+++ b/gtk2_ardour/time_selection.h
@@ -27,9 +27,9 @@ struct TimeSelection : public std::list<ARDOUR::AudioRange> {
ARDOUR::AudioRange& operator[](uint32_t);
- jack_nframes_t start();
- jack_nframes_t end_frame();
- jack_nframes_t length();
+ nframes_t start();
+ nframes_t end_frame();
+ nframes_t length();
bool consolidate ();
};
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc
index ef90c34755..76b237713a 100644
--- a/gtk2_ardour/utils.cc
+++ b/gtk2_ardour/utils.cc
@@ -71,8 +71,7 @@ fit_to_pixels (const ustring& str, int pixel_width, Pango::FontDescription& font
break;
}
- ustr.erase (last);
- --last;
+ ustr.erase (last--);
}
return ustr;
@@ -469,3 +468,46 @@ get_xpm (std::string name)
return (xpm_map[name]);
}
+Glib::RefPtr<Gdk::Pixbuf>
+get_icon (const char* cname)
+{
+ string name = cname;
+ name += X_(".png");
+
+ string path = ARDOUR::find_data_file (name, "icons");
+
+ if (path.empty()) {
+ fatal << string_compose (_("cannot find icon image for %1"), name) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ return Gdk::Pixbuf::create_from_file (path);
+}
+
+string
+longest (vector<string>& strings)
+{
+ if (strings.empty()) {
+ return string ("");
+ }
+
+ vector<string>::iterator longest = strings.begin();
+ string::size_type longest_length = (*longest).length();
+
+ vector<string>::iterator i = longest;
+ ++i;
+
+ while (i != strings.end()) {
+
+ string::size_type len = (*i).length();
+
+ if (len > longest_length) {
+ longest = i;
+ longest_length = len;
+ }
+
+ ++i;
+ }
+
+ return *longest;
+}
diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h
index c0b7aac524..bb2a21d6c3 100644
--- a/gtk2_ardour/utils.h
+++ b/gtk2_ardour/utils.h
@@ -23,6 +23,7 @@
#include <string>
#include <cmath>
+#include <vector>
#include <ardour/types.h>
#include <libgnomecanvasmm/line.h>
#include <gdkmm/types.h>
@@ -75,8 +76,10 @@ void set_color (Gdk::Color&, int);
bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev);
-Glib::RefPtr<Gdk::Pixbuf> get_xpm(std::string);
+Glib::RefPtr<Gdk::Pixbuf> get_xpm (std::string);
+Glib::RefPtr<Gdk::Pixbuf> get_icon (const char*);
static std::map<std::string, Glib::RefPtr<Gdk::Pixbuf> > xpm_map;
const char* const *get_xpm_data (std::string path);
+std::string longest (std::vector<std::string>&);
#endif /* __ardour_gtk_utils_h__ */
diff --git a/gtk2_ardour/visual_time_axis.cc b/gtk2_ardour/visual_time_axis.cc
index e44ea4011e..fc71795a71 100644
--- a/gtk2_ardour/visual_time_axis.cc
+++ b/gtk2_ardour/visual_time_axis.cc
@@ -420,7 +420,7 @@ VisualTimeAxis::name_entry_key_release_handler(GdkEventKey* ev)
// Super class methods not handled by VisualTimeAxis
void
-VisualTimeAxis::show_timestretch (jack_nframes_t start, jack_nframes_t end)
+VisualTimeAxis::show_timestretch (nframes_t start, nframes_t end)
{
// Not handled by purely visual TimeAxis
}
diff --git a/gtk2_ardour/visual_time_axis.h b/gtk2_ardour/visual_time_axis.h
index c68ce8da1c..d569ca3733 100644
--- a/gtk2_ardour/visual_time_axis.h
+++ b/gtk2_ardour/visual_time_axis.h
@@ -251,7 +251,7 @@ class VisualTimeAxis : public TimeAxisView
*
* @todo should VisualTimeAxis handle this?
*/
- void show_timestretch (jack_nframes_t start, jack_nframes_t end);
+ void show_timestretch (nframes_t start, nframes_t end);
/**
* Not handle by purely visual TimeAxis