changes related to OS X main menu & accelerators, plus osx_build script

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2514 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-10-05 00:33:23 +00:00
parent 1bded229cc
commit 17ebbb9d3f
5 changed files with 24 additions and 5 deletions

View file

@ -34,7 +34,7 @@
using namespace PBD;
#define KBD_DEBUG 1
#define KBD_DEBUG 0
bool debug_keyboard = false;
guint Keyboard::edit_but = 3;

View file

@ -334,6 +334,12 @@ set_color (Gdk::Color& c, int rgb)
c.set_rgb((rgb >> 16)*256, ((rgb & 0xff00) >> 8)*256, (rgb & 0xff)*256);
}
#ifdef GTKOSX
extern "C" {
gboolean gdk_quartz_possibly_forward (GdkEvent*);
}
#endif
bool
key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
{
@ -345,7 +351,6 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
#ifdef DEBUG_ACCELERATOR_HANDLING
bool debug = (getenv ("ARDOUR_DEBUG_ACCELERATOR_HANDLING") != 0);
#endif
if (focus) {
if (GTK_IS_ENTRY(focus) || Keyboard::some_magic_widget_has_focus()) {
special_handling_of_unmodified_accelerators = true;
@ -440,6 +445,11 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
if (debug) {
cerr << "\tactivate, then propagate\n";
}
#endif
#ifdef GTKOSX
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
return true;
}
#endif
if (!gtk_window_activate_key (win, ev)) {
return gtk_window_propagate_key_event (win, ev);
@ -465,6 +475,11 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
if (debug) {
cerr << "\tpropagation didn't handle, so activate\n";
}
#endif
#ifdef GTKOSX
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
return true;
}
#endif
return gtk_window_activate_key (win, ev);
} else {

View file

@ -1,4 +1,4 @@
#ifndef __ardour_svn_revision_h__
#define __ardour_svn_revision_h__
static const char* ardour_svn_revision = "2496";
static const char* ardour_svn_revision = "2513";
#endif

View file

@ -7,6 +7,7 @@ GTKQUARTZ_ROOT=/opt/gtk
SAE=
WITH_JACK=1
WITH_LADSPA=1
STRIP=1
while [ $# -gt 0 ] ; do
echo "arg = $1"
@ -14,6 +15,7 @@ while [ $# -gt 0 ] ; do
--sae) SAE=1 ; shift ;;
--nojack) WITH_JACK= ; shift ;;
--noladpsa) WITH_LADSPA= ; shift ;;
--nostrip) STRIP= ; shift ;;
esac
done
@ -66,7 +68,9 @@ cp -R Resources $APPROOT
echo "Copying ardour executable ...."
cp ../../gtk2_ardour/ardour-$version $APPROOT/MacOS/Ardour2
if test x$STRIP != x ; then
strip $APPROOT/MacOS/Ardour2
fi
if test x$WITH_JACK != x ; then
cp /usr/local/lib/jack/jack_coreaudio.so $Frameworks
cp /usr/local/bin/jackd $APPROOT/MacOS