if gtkardour['GTKOSX'] and gtkardour['NATIVE_OSX_KEYS']:
#
- # Command(Mod1), Alt(Mod5), Ctrl, Shift
+ # Command(Meta), Alt(Mod1), Ctrl, Shift
+ # **** as of february 4th 2008, OUR VERSION OF *****
+ # Gtk/Quartz maps:
+ # NSCommand (aka "Command" aka "Apple" aka "Cauliflower") -> Meta
+ # NSAlternate (aka "Option") -> Mod1
#
- keybindings_dict['%PRIMARY%'] = 'Mod5'
- keybindings_dict['%SECONDARY%'] = 'Alt'
+ keybindings_dict['%PRIMARY%'] = 'Meta'
+ keybindings_dict['%SECONDARY%'] = 'Mod1'
keybindings_dict['%TERTIARY%'] = 'Shift'
keybindings_dict['%LEVEL4%'] = 'Ctrl'
- keybindings_dict['%WINDOW%'] = 'Mod5'
+ keybindings_dict['%WINDOW%'] = 'Mod1'
else:
#
# Ctrl, Alt, Shift, Mod3(Meta)
(gtk_accel_path "<Actions>/Transport/TransitionToReverse" "<%PRIMARY%>downarrow")
(gtk_accel_path "<Actions>/Editor/select-next-route" "<%SECONDARY%>downarrow")
-(gtk_accel_path "<Actions>/Editor/scroll-backward" "leftarrow")
-(gtk_accel_path "<Actions>/Transport/Rewind" "<%PRIMARY%>leftarrow")
-(gtk_accel_path "<Actions>/Editor/scroll-playhead-backward" "<%TERTIARY%>leftarrow")
+(gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-boundary" "leftarrow")
+(gtk_accel_path "<Actions>/Editor/tab-to-transient-backwards" "<%PRIMARY%>leftarrow")
+(gtk_accel_path "<Actions>/Editor/nudge-playhead-backward" "<%SECONDARY%>leftarrow")
-(gtk_accel_path "<Actions>/Editor/scroll-forward" "rightarrow")
-(gtk_accel_path "<Actions>/Transport/Forward" "<%PRIMARY%>rightarrow")
-(gtk_accel_path "<Actions>/Editor/scroll-playhead-forward" "<%TERTIARY%>rightarrow")
+(gtk_accel_path "<Actions>/Editor/playhead-to-next-region-boundary" "rightarrow")
+(gtk_accel_path "<Actions>/Editor/tab-to-transient-forwards" "<%PRIMARY%>rightarrow")
+(gtk_accel_path "<Actions>/Editor/nudge-playhead-forward" "<%SECONDARY%>rightarrow")
(gtk_accel_path "<Actions>/Editor/scroll-tracks-down" "Page_Down")
(gtk_accel_path "<Actions>/Editor/scroll-tracks-up" "Page_Up")
(gtk_accel_path "<Actions>/Editor/cycle-snap-choice" "3")
(gtk_accel_path "<Actions>/Transport/ToggleAutoReturn" "4")
(gtk_accel_path "<Actions>/Transport/ToggleClick" "5")
-(gtk_accel_path "<Actions>/Editor/tab-to-transient-forwards" "7")
-(gtk_accel_path "<Actions>/Editor/tab-to-transient-backwards" "8")
(gtk_accel_path "<Actions>/Editor/set-tempo-from-region" "9")
(gtk_accel_path "<Actions>/Editor/set-tempo-from-edit-range" "0")
-
;;
;; unbound actions
;;
<separator/>
<menuitem action='tab-to-transient-forwards'/>
<menuitem action='tab-to-transient-backwards'/>
+ <menuitem action='nudge-playhead-forward'/>
+ <menuitem action='nudge-playhead-backward'/>
<separator/>
<menuitem action='Record'/>
<separator/>
<menuitem action='edit-cursor-to-range-start'/>
<menuitem action='edit-cursor-to-range-end'/>
</menu>
+ <menuitem action='set-tempo-from-region'/>
+ <menuitem action='set-tempo-from-edit-range'/>
<menu name='KeyMouse Actions' action='KeyMouse Actions'>
<menuitem action='play-selected-regions'/>
<menuitem action='brush-at-mouse'/>
<menuitem action='normalize-region'/>
<separator/>
<menuitem action="nudge-forward"/>
- <menuitem action="nudge-next-forward"/>
<menuitem action="nudge-backward"/>
- <menuitem action="nudge-next-backward"/>
<menuitem action='split-region'/>
<menuitem action='set-region-sync-position'/>
<separator/>
<menuitem action='trim-region-to-punch'/>
<separator/>
<menuitem action='pitch-shift-region'/>
- <menuitem action='set-tempo-from-region'/>
- <menuitem action='set-tempo-from-edit-range'/>
</menu>
<menu name='View' action = 'View'>
<menu name='ZoomFocus' action='ZoomFocus'>
act = ActionManager::register_action (editor_actions, "nudge-next-backward", _("Nudge Next Backward"), bind (mem_fun(*this, &Editor::nudge_backward), true, false));
ActionManager::session_sensitive_actions.push_back (act);
+ act = ActionManager::register_action (editor_actions, "nudge-playhead-forward", _("Nudge Playhead Forward"), bind (mem_fun(*this, &Editor::nudge_forward), false, true));
+ ActionManager::session_sensitive_actions.push_back (act);
+ act = ActionManager::register_action (editor_actions, "nudge-playhead-backward", _("Nudge Playhead Backward"), bind (mem_fun(*this, &Editor::nudge_backward), false, true));
+ ActionManager::session_sensitive_actions.push_back (act);
+
act = ActionManager::register_action (editor_actions, "temporal-zoom-out", _("Zoom Out"), bind (mem_fun(*this, &Editor::temporal_zoom_step), true));
ActionManager::session_sensitive_actions.push_back (act);
if ((*x) > pos) {
break;
}
+ ++x;
}
if (x == positions.end()) {
Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no_remove)
{
+ cerr << "set selected track, op = " << op << " selected ? " << selection->selected (&view) << " no remove? " << no_remove << endl;
+
switch (op) {
case Selection::Toggle:
if (selection->selected (&view)) {
#include <ardour/profile.h>
#include <gtkmm/stock.h>
+#include <gtkmm/label.h>
#include <gtkmm/accelkey.h>
#include <gtkmm/accelmap.h>
#include <gtkmm/uimanager.h>
scroller.add (view);
scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
- unbind_box.pack_start (unbind_button, false, false);
-
- unbind_button.signal_clicked().connect (mem_fun (*this, &KeyEditor::unbind));
get_vbox()->set_spacing (6);
get_vbox()->pack_start (scroller);
if (!ARDOUR::Profile->get_sae()) {
+
+ Label* hint = manage (new Label (_("Select an action, then press the key(s) to (re)set its shortcut")));
+ hint->show ();
+ unbind_box.set_spacing (6);
+ unbind_box.pack_start (*hint, false, true);
+ unbind_box.pack_start (unbind_button, false, false);
+ unbind_button.signal_clicked().connect (mem_fun (*this, &KeyEditor::unbind));
+
get_vbox()->pack_start (unbind_box, false, false);
unbind_box.show ();
unbind_button.show ();
+
}
get_vbox()->set_border_width (12);
#ifdef GTKOSX
string label = (*k);
- replace_all (label, "<Mod5>", _("Command-"));
+
+ /* Gtk/Quartz maps:
+ NSAlternate/NSOption key to Mod1
+ NSCommand key to Meta
+ */
+
+ replace_all (label, "<Meta>", _("Command-"));
replace_all (label, "<Alt>", _("Option-"));
replace_all (label, "<Shift>", _("Shift-"));
+ replace_all (label, "<Control>", _("Control-"));
row[columns.binding] = label;
#else
row[columns.binding] = (*k);
path += "/../Plugins";
setenv ("LADSPA_PATH", path.c_str(), 1);
+
+ cstr = getenv ("VAMP_PATH");
+ if (cstr) {
+ path = cstr;
+ path += ':';
+ }
+ path = dir_path;
+ path += "/../Frameworks";
+
+ setenv ("VAMP_PATH", path.c_str(), 1);
+
+ cstr = getenv ("ARDOUR_CONTROL_SURFACE_PATH");
+ if (cstr) {
+ path = cstr;
+ path += ':';
+ }
+ path = dir_path;
+ path += "/../Surfaces";
+ setenv ("ARDOUR_CONTROL_SURFACE_PATH", path.c_str(), 1);
+
cstr = getenv ("LV2_PATH");
if (cstr) {
path = cstr;
#ifdef GTKOSX
- /* Command = Mod1
- Option/Alt = Mod5
+ /* Command = Meta
+ Option/Alt = Mod1
*/
{ "Shift", GDK_SHIFT_MASK },
- { "Command", GDK_MOD1_MASK },
+ { "Command", GDK_META_MASK },
{ "Control", GDK_CONTROL_MASK },
- { "Option", GDK_MOD5_MASK },
+ { "Option", GDK_MOD1_MASK },
{ "Command-Shift", GDK_MOD1_MASK|GDK_SHIFT_MASK },
{ "Command-Option", GDK_MOD1_MASK|GDK_MOD5_MASK },
{ "Shift-Option", GDK_SHIFT_MASK|GDK_MOD5_MASK },
modifiers |= kMenuShiftModifier;
}
+ /* gdk/quartz maps Alt/Option to Mod1 */
+
if (key->accel_mods & (GDK_MOD1_MASK)) {
modifiers |= kMenuOptionModifier;
}
if (key->accel_mods & GDK_CONTROL_MASK) {
modifiers |= kMenuControlModifier;
}
+
+ /* gdk/quartz maps Command to Meta */
- if (key->accel_mods & GDK_MOD5_MASK) {
- /* Mod5 is what ardour's binding file uses to mean "Command"
- Nothing needs to be set in modifiers, but we need to notice
- that there *is* an implicit modifier
- */
+ if (key->accel_mods & GDK_META_MASK) {
use_command = 1;
}
}
bool
TimeAxisView::controls_ebox_button_release (GdkEventButton* ev)
{
+ cerr << "CEB button release\n";
switch (ev->button) {
case 1:
selection_click (ev);
it does allow.
*/
+ int fakekey = GDK_VoidSymbol;
int ret = false;
switch (ev->keyval) {
case GDK_Tab:
- ret = gtk_accel_groups_activate(G_OBJECT(win), GDK_nabla, GdkModifierType(ev->state));
- break;
-
- // some X and/or GDK implementations do Shift-Tab -> GDK_ISO_Left_Tab
-
case GDK_ISO_Left_Tab:
- ret = gtk_accel_groups_activate(G_OBJECT(win), GDK_nabla, GdkModifierType(ev->state));
+ fakekey = GDK_nabla;
break;
case GDK_Up:
- ret = gtk_accel_groups_activate(G_OBJECT(win), GDK_uparrow, GdkModifierType(ev->state));
+ fakekey = GDK_uparrow;
break;
case GDK_Down:
- ret = gtk_accel_groups_activate(G_OBJECT(win), GDK_downarrow, GdkModifierType(ev->state));
+ fakekey = GDK_downarrow;
break;
case GDK_Right:
- ret = gtk_accel_groups_activate(G_OBJECT(win), GDK_rightarrow, GdkModifierType(ev->state));
+ fakekey = GDK_rightarrow;
break;
case GDK_Left:
- ret = gtk_accel_groups_activate(G_OBJECT(win), GDK_leftarrow, GdkModifierType(ev->state));
+ fakekey = GDK_leftarrow;
break;
default:
break;
}
- if (ret) {
- return true;
+ if (fakekey != GDK_VoidSymbol) {
+ ret = gtk_accel_groups_activate(G_OBJECT(win), fakekey, GdkModifierType(ev->state));
+
+ if (ret) {
+ return true;
+ }
+
+#ifdef GTKOSX
+ int oldval = ev->keyval;
+ ev->keyval = fakekey;
+ if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
+ return true;
+ }
+ ev->keyval = oldval;
}
+#endif
}
/* consider all relevant modifiers but not LOCK or SHIFT */
string
Session::control_protocol_path ()
{
+ char *p = getenv ("ARDOUR_CONTROL_SURFACE_PATH");
+ if (p && *p) {
+ return p;
+ }
return suffixed_search_path (X_("surfaces"), false);
}
#ifndef __ardour_svn_revision_h__
#define __ardour_svn_revision_h__
-static const char* ardour_svn_revision = "2985";
+static const char* ardour_svn_revision = "2986";
#endif
Frameworks=$APPROOT/Frameworks
Resources=$APPROOT/Resources
Plugins=$APPROOT/Plugins
+Surfaces=$APPROOT/Surfaces
Shared=$Resources/share
Etc=$Resources/etc
mkdir -p $APPROOT/MacOS
mkdir -p $APPROOT/Resources
mkdir -p $APPROOT/Plugins
+mkdir -p $APPROOT/Surfaces
mkdir -p $Frameworks/modules
mkdir -p $Shared/templates
mkdir -p $Etc
(cd $Frameworks/clearlooks/engines && ln -s ../../libclearlooks.dylib libclearlooks.dylib && ln -s ../../libclearlooks.dylib libclearlooks.so)
# XXX STILL NEED TO DO PANNERS FOR TRUNK
+cp ../../libs/surfaces/*/libardour_*.dylib $Surfaces
+# hack ... move libardour_cp back into Frameworks
+cp $Surfaces/libardour_cp*.dylib $Frameworks
-cp ../../libs/surfaces/*/libardour_*.dylib $Frameworks
+# VAMP plugins that we use
+cp ../../libs/vamp-plugins/libardourvampplugins.dylib $Frameworks
while [ true ] ; do
missing=false
echo "Fixing up library names ..."
# now do the same for all the libraries we include
-for dylib in $Frameworks/*.dylib $Frameworks/modules/*.so ; do
+for dylib in $Frameworks/*.dylib $Frameworks/modules/*.so $Surfaces/*.dylib ; do
# skip symlinks
if test ! -L $dylib ; then