From d2a6fec03a8b1d6a91f75201a1950b08fc875d36 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 27 Oct 2015 14:35:55 -0400 Subject: [PATCH] additional GTKOSX => __APPLE__ changes missed in previous commit --- gtk2_ardour/ardour.menus.in | 6 +++--- gtk2_ardour/wscript | 4 ++-- libs/gtkmm2ext/keyboard.cc | 4 ++-- libs/gtkmm2ext/wscript | 6 ++++-- wscript | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in index d0d75d52eb..16634f800e 100644 --- a/gtk2_ardour/ardour.menus.in +++ b/gtk2_ardour/ardour.menus.in @@ -43,12 +43,12 @@ -#ifdef GTKOSX +#ifdef __APPLE__ #endif -#ifndef GTKOSX +#ifndef __APPLE__ #endif @@ -550,7 +550,7 @@ -#ifndef GTKOSX +#ifndef __APPLE__ #endif diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 92ea7ee1bc..ba1a829a6f 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -659,8 +659,8 @@ def build(bld): # Menus menus_argv = [] - if bld.is_defined('GTKOSX'): - menus_argv = [ '-E', '-P', '-DGTKOSX', '-' ] + if sys.platform == 'darwin': + menus_argv = [ '-E', '-P', '-D__APPLE__', '-' ] else: menus_argv = [ '-E', '-P' ] diff --git a/libs/gtkmm2ext/keyboard.cc b/libs/gtkmm2ext/keyboard.cc index 41d9f668e2..690ea024cf 100644 --- a/libs/gtkmm2ext/keyboard.cc +++ b/libs/gtkmm2ext/keyboard.cc @@ -57,7 +57,7 @@ guint Keyboard::delete_mod = GDK_SHIFT_MASK; guint Keyboard::insert_note_but = 1; guint Keyboard::insert_note_mod = GDK_CONTROL_MASK; -#ifdef GTKOSX +#ifdef __APPLE__ uint Keyboard::PrimaryModifier = GDK_META_MASK|GDK_MOD2_MASK; // Command guint Keyboard::SecondaryModifier = GDK_CONTROL_MASK; // Control @@ -591,7 +591,7 @@ Keyboard::is_insert_note_event (GdkEventButton *ev) bool Keyboard::is_button2_event (GdkEventButton* ev) { -#ifdef GTKOSX +#ifdef __APPLE__ return (ev->button == 2) || ((ev->button == 1) && ((ev->state & Keyboard::button2_modifiers) == Keyboard::button2_modifiers)); diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript index 0640f58d51..59d9c35243 100644 --- a/libs/gtkmm2ext/wscript +++ b/libs/gtkmm2ext/wscript @@ -2,6 +2,8 @@ from waflib.extras import autowaf as autowaf from waflib import Options import os +import sys +import platform as PLATFORM # Version of this package (even if built as a child) MAJOR = '0' @@ -105,7 +107,7 @@ def build(bld): obj.includes = ['.'] obj.name = 'libgtkmm2ext' obj.target = 'gtkmm2ext' - obj.uselib = 'GTKMM GTK GTKOSX OSX GDK' + obj.uselib = 'GTKMM GTK' obj.use = [ 'libpbd', 'libardour' ] obj.vnum = GTKMM2EXT_LIB_VERSION obj.install_path = bld.env['LIBDIR'] @@ -113,7 +115,7 @@ def build(bld): 'PACKAGE="' + I18N_PACKAGE + '"', 'LOCALEDIR="' + os.path.join( os.path.normpath(bld.env['DATADIR']), 'locale') + '"'] - if bld.is_defined('GTKOSX'): + if sys.platform == 'darwin': obj.source += ['gtkapplication_quartz.mm'] else: obj.source += ['gtkapplication_x11.c'] diff --git a/wscript b/wscript index c0c70377c2..eae6aee8e0 100644 --- a/wscript +++ b/wscript @@ -846,7 +846,7 @@ def configure(conf): conf.define ('HAVE_COREAUDIO', 1) conf.define ('AUDIOUNIT_SUPPORT', 1) - conf.define ('TOP_MENUBAR',1) + Conf.define ('TOP_MENUBAR',1) # It would be nice to be able to use this to force back-compatibility with 10.4 # but even by the time of 11, the 10.4 SDK is no longer available in any normal