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; using namespace PBD;
#define KBD_DEBUG 1 #define KBD_DEBUG 0
bool debug_keyboard = false; bool debug_keyboard = false;
guint Keyboard::edit_but = 3; guint Keyboard::edit_but = 3;

View file

@ -547,7 +547,7 @@ menu_event_handler_func (EventHandlerCallRef event_handler_call_ref,
/* This is called when an item is selected (what is the /* This is called when an item is selected (what is the
* GTK+ term? prelight?) * GTK+ term? prelight?)
*/ */
//g_print ("kEventClassMenu/kEventMenuTargetItem\n"); //g_print ("kEventClassMenu/kEventMenuTargetItem\n");
break; break;
case kEventMenuOpening: case kEventMenuOpening:

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); 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 bool
key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev) 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 #ifdef DEBUG_ACCELERATOR_HANDLING
bool debug = (getenv ("ARDOUR_DEBUG_ACCELERATOR_HANDLING") != 0); bool debug = (getenv ("ARDOUR_DEBUG_ACCELERATOR_HANDLING") != 0);
#endif #endif
if (focus) { if (focus) {
if (GTK_IS_ENTRY(focus) || Keyboard::some_magic_widget_has_focus()) { if (GTK_IS_ENTRY(focus) || Keyboard::some_magic_widget_has_focus()) {
special_handling_of_unmodified_accelerators = true; special_handling_of_unmodified_accelerators = true;
@ -440,6 +445,11 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
if (debug) { if (debug) {
cerr << "\tactivate, then propagate\n"; cerr << "\tactivate, then propagate\n";
} }
#endif
#ifdef GTKOSX
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
return true;
}
#endif #endif
if (!gtk_window_activate_key (win, ev)) { if (!gtk_window_activate_key (win, ev)) {
return gtk_window_propagate_key_event (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) { if (debug) {
cerr << "\tpropagation didn't handle, so activate\n"; cerr << "\tpropagation didn't handle, so activate\n";
} }
#endif
#ifdef GTKOSX
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
return true;
}
#endif #endif
return gtk_window_activate_key (win, ev); return gtk_window_activate_key (win, ev);
} else { } else {

View file

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

View file

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