summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/SConscript9
-rw-r--r--gtk2_ardour/ardour-sae.bindings.in1
-rw-r--r--gtk2_ardour/ardour-sae.menus1
-rw-r--r--gtk2_ardour/editor.cc8
-rw-r--r--gtk2_ardour/editor.h2
-rw-r--r--gtk2_ardour/editor_actions.cc3
-rw-r--r--gtk2_ardour/editor_markers.cc20
-rw-r--r--gtk2_ardour/editor_ops.cc2
-rw-r--r--gtk2_ardour/keyeditor.cc11
-rw-r--r--gtk2_ardour/sync-menu.c22
10 files changed, 60 insertions, 19 deletions
diff --git a/gtk2_ardour/SConscript b/gtk2_ardour/SConscript
index a0a197d4c0..7205bdc509 100644
--- a/gtk2_ardour/SConscript
+++ b/gtk2_ardour/SConscript
@@ -236,6 +236,10 @@ icon_files = glob.glob ('icons/*.png')
intl_files = gtkardour_files + glob.glob('*.h')
+evtest_files=Split("""
+evtest.cc
+""")
+
mtest_files=Split("""
mtest.cc
""")
@@ -293,6 +297,7 @@ executable = 'ardour-' + ardour_version
ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
+evest = gtkmmtests.Program(target = 'evtest', source = evtest_files)
mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
itest = gtkardour.Program(target = 'itest', source = itest_files)
rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
@@ -388,9 +393,9 @@ if gtkardour['GTKOSX'] and gtkardour['NATIVE_OSX_KEYS']:
#
# Command(Mod1), Alt(Mod5), Ctrl, Shift
#
- keybindings_dict['%PRIMARY%'] = 'Mod1'
+ keybindings_dict['%PRIMARY%'] = 'Mod5'
keybindings_dict['%SECONDARY%'] = 'Alt'
- keybindings_dict['%TERTIARY%'] = 'Ctrl'
+ keybindings_dict['%TERTIARY%'] = 'Shift'
keybindings_dict['%LEVEL4%'] = 'Shift'
else:
#
diff --git a/gtk2_ardour/ardour-sae.bindings.in b/gtk2_ardour/ardour-sae.bindings.in
index a28e586b05..e35fa5d5b9 100644
--- a/gtk2_ardour/ardour-sae.bindings.in
+++ b/gtk2_ardour/ardour-sae.bindings.in
@@ -10,6 +10,7 @@
; (gtk_accel_path "<Actions>/Editor/Autoconnect" "")
; (gtk_accel_path "<Actions>/Editor/Edit" "")
(gtk_accel_path "<Actions>/Editor/cycle-edit-point" "grave")
+(gtk_accel_path "<Actions>/Editor/cycle-edit-point-with-marker" "<%SECONDARY%>grave")
(gtk_accel_path "<Actions>/Editor/toggle-edit-mode" "1")
(gtk_accel_path "<Actions>/Editor/cycle-snap-mode" "2")
(gtk_accel_path "<Actions>/Editor/cycle-snap-choice" "3")
diff --git a/gtk2_ardour/ardour-sae.menus b/gtk2_ardour/ardour-sae.menus
index f8e745939f..d1bd55e90b 100644
--- a/gtk2_ardour/ardour-sae.menus
+++ b/gtk2_ardour/ardour-sae.menus
@@ -117,6 +117,7 @@
<menuitem action='set-mouse-mode-timefx'/>
<separator/>
<menuitem action='cycle-edit-point'/>
+ <menuitem action='cycle-edit-point-with-marker'/>
<menuitem action='toggle-edit-mode'/>
</menu>
</menu>
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index a5310c76b7..5dfcff248e 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -3251,14 +3251,18 @@ Editor::snap_mode_selection_done ()
}
void
-Editor::cycle_edit_point ()
+Editor::cycle_edit_point (bool with_marker)
{
switch (_edit_point) {
case EditAtMouse:
set_edit_point_preference (EditAtPlayhead);
break;
case EditAtPlayhead:
- set_edit_point_preference (EditAtSelectedMarker);
+ if (with_marker) {
+ set_edit_point_preference (EditAtSelectedMarker);
+ } else {
+ set_edit_point_preference (EditAtMouse);
+ }
break;
case EditAtSelectedMarker:
set_edit_point_preference (EditAtMouse);
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 49e2485ead..e25e365497 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -1957,7 +1957,7 @@ class Editor : public PublicEditor
Gtk::ComboBoxText edit_point_selector;
void set_edit_point_preference (Editing::EditPoint ep);
- void cycle_edit_point ();
+ void cycle_edit_point (bool with_marker);
void set_edit_point ();
void edit_point_selection_done ();
void edit_point_chosen (Editing::EditPoint);
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index 02b98bbbee..e0ebb6e314 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -387,7 +387,8 @@ Editor::register_actions ()
ActionManager::register_radio_action (editor_actions, edit_point_group, X_("edit-at-mouse"), _("Mouse"), (bind (mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtPlayhead)));
ActionManager::register_radio_action (editor_actions, edit_point_group, X_("edit-at-selected-marker"), _("Marker"), (bind (mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtPlayhead)));
- ActionManager::register_action (editor_actions, "cycle-edit-point", _("Change edit point"), mem_fun (*this, &Editor::cycle_edit_point));
+ ActionManager::register_action (editor_actions, "cycle-edit-point", _("Change edit point"), bind (mem_fun (*this, &Editor::cycle_edit_point), false));
+ ActionManager::register_action (editor_actions, "cycle-edit-point-with-marker", _("Change edit point (w/Marker)"), bind (mem_fun (*this, &Editor::cycle_edit_point), true));
ActionManager::register_action (editor_actions, "set-edit-splice", _("Splice"), bind (mem_fun (*this, &Editor::set_edit_mode), Splice));
ActionManager::register_action (editor_actions, "set-edit-slide", _("Slide"), bind (mem_fun (*this, &Editor::set_edit_mode), Slide));
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index ab6cd4f939..940b85acaf 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -26,6 +26,7 @@
#include <gtkmm2ext/window_title.h>
#include <ardour/location.h>
+#include <ardour/profile.h>
#include <pbd/memento_command.h>
#include "editor.h"
@@ -606,19 +607,21 @@ Editor::build_range_marker_menu (bool loop_or_punch)
MenuList& items = markerMenu->items();
markerMenu->set_name ("ArdourContextMenu");
+ items.push_back (MenuElem (_("Play Range"), mem_fun(*this, &Editor::marker_menu_play_range)));
items.push_back (MenuElem (_("Locate to Range Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
items.push_back (MenuElem (_("Play from Range Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
if (!loop_or_punch) {
- items.push_back (MenuElem (_("Play Range"), mem_fun(*this, &Editor::marker_menu_play_range)));
items.push_back (MenuElem (_("Loop Range"), mem_fun(*this, &Editor::marker_menu_loop_range)));
}
items.push_back (MenuElem (_("Set Range Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
- items.push_back (MenuElem (_("Set Range from Range Selection"), mem_fun(*this, &Editor::marker_menu_set_from_selection)));
+ if (!Profile->get_sae()) {
+ items.push_back (MenuElem (_("Set Range from Range Selection"), mem_fun(*this, &Editor::marker_menu_set_from_selection)));
+ }
items.push_back (SeparatorElem());
- items.push_back (MenuElem (_("Hide Range"), mem_fun(*this, &Editor::marker_menu_hide)));
if (!loop_or_punch) {
+ items.push_back (MenuElem (_("Hide Range"), mem_fun(*this, &Editor::marker_menu_hide)));
items.push_back (MenuElem (_("Rename Range"), mem_fun(*this, &Editor::marker_menu_rename)));
items.push_back (MenuElem (_("Remove Range"), mem_fun(*this, &Editor::marker_menu_remove)));
}
@@ -627,8 +630,9 @@ Editor::build_range_marker_menu (bool loop_or_punch)
items.push_back (MenuElem (_("Separate Regions in Range"), mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
- items.push_back (MenuElem (_("Select Range"), mem_fun(*this, &Editor::marker_menu_select_using_range)));
-
+ if (!Profile->get_sae()) {
+ items.push_back (MenuElem (_("Select Range"), mem_fun(*this, &Editor::marker_menu_select_using_range)));
+ }
}
void
@@ -807,13 +811,13 @@ Editor::marker_menu_set_from_playhead ()
if ((l = find_location_from_marker (marker, is_start)) != 0) {
if (l->is_mark()) {
- l->set_start (session->transport_frame ());
+ l->set_start (session->audible_frame ());
}
else {
if (is_start) {
- l->set_start (session->transport_frame ());
+ l->set_start (session->audible_frame ());
} else {
- l->set_end (session->transport_frame ());
+ l->set_end (session->audible_frame ());
}
}
}
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 06422ff1a1..09182261d9 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1938,7 +1938,7 @@ Editor::insert_region_list_selection (float times)
return;
}
} else if (entered_track != 0) {
- if ((tv = dynamic_cast<RouteTimeAxisView*>(selection->tracks.front())) == 0) {
+ if ((tv = dynamic_cast<RouteTimeAxisView*>(entered_track)) == 0) {
return;
}
} else {
diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc
index 8bf40b636d..e340ac0d69 100644
--- a/gtk2_ardour/keyeditor.cc
+++ b/gtk2_ardour/keyeditor.cc
@@ -8,6 +8,7 @@
#include <gtkmm/uimanager.h>
#include <pbd/strsplit.h>
+#include <pbd/replace_all.h>
#include "actions.h"
#include "keyboard.h"
@@ -18,6 +19,7 @@
using namespace std;
using namespace Gtk;
using namespace Gdk;
+using namespace PBD;
KeyEditor::KeyEditor ()
: ArdourDialog (_("Keybinding Editor"), false)
@@ -180,7 +182,16 @@ KeyEditor::populate ()
if (*k == ActionManager::unbound_string) {
row[columns.binding] = string();
} else {
+
+#ifdef GTKOSX
+ string label = (*k);
+ replace_all (label, "<Control>", _("Command-"));
+ replace_all (label, "<Alt>", _("Option-"));
+ replace_all (label, "<Shift>", _("Shift-"));
+ row[columns.binding] = label;
+#else
row[columns.binding] = (*k);
+#endif
}
}
}
diff --git a/gtk2_ardour/sync-menu.c b/gtk2_ardour/sync-menu.c
index 5e33562957..cf697db466 100644
--- a/gtk2_ardour/sync-menu.c
+++ b/gtk2_ardour/sync-menu.c
@@ -311,6 +311,7 @@ carbon_menu_item_update_accelerator (CarbonMenuItem *carbon_item,
GdkKeymap *keymap = gdk_keymap_get_for_display (display);
GdkKeymapKey *keys;
gint n_keys;
+ gint use_command;
if (gdk_keymap_get_entries_for_keyval (keymap, key->accel_key,
&keys, &n_keys))
@@ -322,19 +323,32 @@ carbon_menu_item_update_accelerator (CarbonMenuItem *carbon_item,
g_free (keys);
+ use_command = 0;
+
if (key->accel_mods)
{
- if (key->accel_mods & GDK_SHIFT_MASK)
+ if (key->accel_mods & GDK_SHIFT_MASK) {
modifiers |= kMenuShiftModifier;
+ }
- if (key->accel_mods & GDK_MOD5_MASK)
+ if (key->accel_mods & (GDK_MOD1_MASK)) {
modifiers |= kMenuOptionModifier;
+ }
- if (key->accel_mods & GDK_CONTROL_MASK)
+ if (key->accel_mods & GDK_CONTROL_MASK) {
modifiers |= kMenuControlModifier;
+ }
+
+ 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
+ */
+ use_command = 1;
+ }
}
- if ((key->accel_mods & (GDK_SHIFT_MASK|GDK_MOD1_MASK|GDK_CONTROL_MASK) )== 0)
+ if (!use_command)
modifiers |= kMenuNoCommandModifier;
SetMenuItemModifiers (carbon_item->menu, carbon_item->index,