change GTKOSX macro constant to use __APPLE__ instead
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 27 Oct 2015 17:43:31 +0000 (13:43 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 22 Feb 2016 20:31:25 +0000 (15:31 -0500)
15 files changed:
gtk2_ardour/add_video_dialog.cc
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_canvas.cc
gtk2_ardour/editor_mixer.cc
gtk2_ardour/editor_rulers.cc
gtk2_ardour/keyboard.cc
gtk2_ardour/mixer_ui.cc
gtk2_ardour/plugin_ui.cc
gtk2_ardour/processor_box.cc
gtk2_ardour/rc_option_editor.cc
gtk2_ardour/sfdb_ui.cc
gtk2_ardour/wscript
wscript

index 5fc53c7de2f1bd0a12f55a8431e79d4f7a76235c..31cb7432cbaaeee9557705840b2a0275d77d8379 100644 (file)
@@ -108,7 +108,7 @@ AddVideoDialog::AddVideoDialog (Session* s)
 
        /* file chooser */
        chooser.set_border_width (4);
-#ifdef GTKOSX
+#ifdef __APPLE__
        /* some broken redraw behaviour - this is a bandaid */
        chooser.signal_selection_changed().connect (mem_fun (chooser, &Widget::queue_draw));
 #endif
index ada1b5f9b7cea7f4d57a17ed7b6462396a9489be..2481463dbef14119e6ff92d01d50f3ea622da573 100644 (file)
@@ -627,7 +627,7 @@ ARDOUR_UI::post_engine ()
 
        /* start the time-of-day-clock */
 
-#ifndef GTKOSX
+#ifndef __APPLE__
        /* OS X provides a nearly-always visible wallclock, so don't be stupid */
        update_wall_clock ();
        Glib::signal_timeout().connect_seconds (sigc::mem_fun(*this, &ARDOUR_UI::update_wall_clock), 1);
index 69a3245fa01ef50ae004578a8f9fe4cb0a6a0a94..a0836f41d71da717b6009db4f5e08b1d08f187cd 100644 (file)
@@ -547,7 +547,7 @@ ARDOUR_UI::build_menu_bar ()
        bool disk_space = false;
 
        if (!Profile->get_small_screen()) {
-#ifndef GTKOSX
+#ifndef __APPLE__
                // OSX provides its own wallclock, thank you very much
                wall_clock = true;
 #endif
@@ -571,7 +571,7 @@ ARDOUR_UI::build_menu_bar ()
        menu_bar_base.set_name ("MainMenuBar");
        menu_bar_base.add (menu_hbox);
 
-#ifndef GTKOSX
+#ifndef __APPLE__
        _status_bar_visibility.add (&wall_clock_label,      X_("WallClock"), _("Wall Clock"), wall_clock);
 #endif
        _status_bar_visibility.add (&disk_space_label,      X_("Disk"),      _("Disk Space"), disk_space);
index a2b777e7bedbd44b36c584f05d63fc4fc5cea972..7e74bbedbf851540022ea3456384f372a043e852 100644 (file)
@@ -2015,7 +2015,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void cms_new (boost::shared_ptr<ARDOUR::Route>);
        void current_mixer_strip_hidden ();
 
-#ifdef GTKOSX
+#ifdef __APPLE__
        void ensure_all_elements_drawn ();
 #endif
        /* nudging tracks */
index 152a8046c4aae6bb8bb38a15c11789d6ad75da43..a2ad7b3336b1567b13acee13f9541210fe31cb6b 100644 (file)
@@ -462,7 +462,7 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context,
                snap_to (frame);
 
                bool copy = ((context->get_actions() & (Gdk::ACTION_COPY | Gdk::ACTION_LINK | Gdk::ACTION_MOVE)) == Gdk::ACTION_COPY);
-#ifdef GTKOSX
+#ifdef __APPLE__
                /* We are not allowed to call recursive main event loops from within
                   the main event loop with GTK/Quartz. Since import/embed wants
                   to push up a progress dialog, defer all this till we go idle.
index d1d5ad9cf4f7204220eb33002c199161b445773d..d83b2119832a42c31a25bacffaa715a9f6c289fb 100644 (file)
@@ -161,13 +161,13 @@ Editor::show_editor_mixer (bool yn)
                }
        }
 
-#ifdef GTKOSX
+#ifdef __APPLE__
        /* XXX gtk problem here */
        ensure_all_elements_drawn();
 #endif
 }
 
-#ifdef GTKOSX
+#ifdef __APPLE__
 void
 Editor::ensure_all_elements_drawn ()
 {
@@ -185,7 +185,7 @@ Editor::create_editor_mixer ()
        current_mixer_strip->Hiding.connect (sigc::mem_fun(*this, &Editor::current_mixer_strip_hidden));
        current_mixer_strip->WidthChanged.connect (sigc::mem_fun (*this, &Editor::mixer_strip_width_changed));
 
-#ifdef GTKOSX
+#ifdef __APPLE__
        current_mixer_strip->WidthChanged.connect (sigc::mem_fun(*this, &Editor::ensure_all_elements_drawn));
 #endif
        current_mixer_strip->set_embedded (true);
@@ -273,7 +273,7 @@ Editor::maybe_add_mixer_strip_width (XMLNode& node)
 void
 Editor::mixer_strip_width_changed ()
 {
-#ifdef GTKOSX
+#ifdef __APPLE__
        ensure_all_elements_drawn ();
 #endif
 
index 3b992535d1d90fc0c607930cbaa28a7b9e952f85..45f91a681f593eb9c12003b17bb4d954c4b19815 100644 (file)
@@ -439,7 +439,7 @@ Editor::update_ruler_visibility ()
        double tbgpos = 0.0;
        double old_unit_pos;
 
-#ifdef GTKOSX
+#ifdef __APPLE__
        /* gtk update probs require this (damn) */
        meter_label.hide();
        tempo_label.hide();
index 6181e41e848ad1401cec6a9c569797b3446599bc..bdf40e680cdcef04ac512265a016b11ef46d2519 100644 (file)
@@ -38,7 +38,7 @@ using namespace PBD;
 using namespace ARDOUR;
 using Gtkmm2ext::Keyboard;
 
-#ifdef GTKOSX
+#ifdef __APPLE__
 guint ArdourKeyboard::constraint_mod = Keyboard::PrimaryModifier;
 #else
 guint ArdourKeyboard::constraint_mod = Keyboard::SecondaryModifier;
index ddce059328707f2d0baf8ed3b9d50e65be8beaaa..762e7599aeb947b8391e90954b1f86d9c5ac84c2 100644 (file)
@@ -228,7 +228,13 @@ Mixer_UI::Mixer_UI ()
        list_vpacker.pack_start (rhs_pane2, true, true);
 
        global_hpacker.pack_start (scroller, true, true);
+
+#ifdef __APPLE__
+       /* current gtk-quartz has dirty updates on borders like this one */
        global_hpacker.pack_start (out_packer, false, false, 0);
+#else
+       global_hpacker.pack_start (out_packer, false, false, 12);
+#endif
 
        list_hpane.pack1(list_vpacker, false, true);
        list_hpane.pack2(global_hpacker, true, false);
@@ -1240,7 +1246,7 @@ Mixer_UI::strip_width_changed ()
 {
        _group_tabs->set_dirty ();
 
-#ifdef GTKOSX
+#ifdef __APPLE__
        TreeModel::Children rows = track_model->children();
        TreeModel::Children::iterator i;
        long order;
@@ -1345,7 +1351,7 @@ Mixer_UI::strip_property_changed (const PropertyChange& what_changed, MixerStrip
                }
        }
 
-       error << _("track display list item for renamed strip not found!") << endmsg;
+x      error << _("track display list item for renamed strip not found!") << endmsg;
 }
 
 bool
@@ -1379,7 +1385,7 @@ Mixer_UI::group_display_button_press (GdkEventButton* ev)
                if (Keyboard::is_edit_event (ev)) {
                        if (group) {
                                // edit_route_group (group);
-#ifdef GTKOSX
+#ifdef __APPLE__
                                group_display.queue_draw();
 #endif
                                return true;
@@ -1391,7 +1397,7 @@ Mixer_UI::group_display_button_press (GdkEventButton* ev)
        {
                bool visible = (*iter)[group_columns.visible];
                (*iter)[group_columns.visible] = !visible;
-#ifdef GTKOSX
+#ifdef __APPLE__
                group_display.queue_draw();
 #endif
                return true;
index 81dd347ed3ce2a67593b185fe5501ac80713943e..b1af891217ae8c174307d45b6b266c709502999d 100644 (file)
@@ -178,7 +178,7 @@ PluginUIWindow::on_show ()
        }
 
        if (_pluginui) {
-#if defined (HAVE_AUDIOUNITS) && defined(GTKOSX)
+#if defined (HAVE_AUDIOUNITS) && defined(__APPLE__)
                 if (pre_deactivate_x >= 0) {
                         move (pre_deactivate_x, pre_deactivate_y);
                 }
@@ -193,7 +193,7 @@ PluginUIWindow::on_show ()
 void
 PluginUIWindow::on_hide ()
 {
-#if defined (HAVE_AUDIOUNITS) && defined(GTKOSX)
+#if defined (HAVE_AUDIOUNITS) && defined(__APPLE__)
         get_position (pre_deactivate_x, pre_deactivate_y);
 #endif
 
@@ -293,7 +293,7 @@ PluginUIWindow::create_audiounit_editor (boost::shared_ptr<PluginInsert>)
 }
 
 void
-#ifdef GTKOSX
+#ifdef __APPLE__
 PluginUIWindow::app_activated (bool yn)
 #else
 PluginUIWindow::app_activated (bool)
index fec73f8d63d99199d121e1932f3bc3a998cef09c..95b21c826c085be96addaaebbe9eb42d7a566b78 100644 (file)
@@ -1693,7 +1693,7 @@ ProcessorBox::processor_button_release_event (GdkEventButton *ev, ProcessorEntry
                                boost::weak_ptr<Processor>(processor)));
 
        } else if (processor && Keyboard::is_button2_event (ev)
-#ifndef GTKOSX
+#ifndef __APPLE__
                   && (Keyboard::no_modifier_keys_pressed (ev) && ((ev->state & Gdk::BUTTON2_MASK) == Gdk::BUTTON2_MASK))
 #endif
                ) {
index 9a43ca4761cca04744096f7220b6f77340eeb177..c828a7074c5e5691a0f76835eaf11c9555f2d744 100644 (file)
@@ -327,7 +327,7 @@ static const struct {
 
        { "Unmodified", 0 },
 
-#ifdef GTKOSX
+#ifdef __APPLE__
 
        /* Command = Meta
           Option/Alt = Mod1
@@ -515,7 +515,7 @@ public:
                _copy_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::copy_modifier_chosen));
                Gtkmm2ext::UI::instance()->set_tip (_copy_modifier_combo,
                                                    (string_compose (_("<b>Recommended Setting: %1</b>%2"),
-#ifdef GTKOSX
+#ifdef __APPLE__
                                                                     Keyboard::secondary_modifier_name (),
 #else
                                                                     Keyboard::primary_modifier_name (),
@@ -542,7 +542,7 @@ public:
                _constraint_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::constraint_modifier_chosen));
                Gtkmm2ext::UI::instance()->set_tip (_constraint_modifier_combo,
                                                    (string_compose (_("<b>Recommended Setting: %1</b>%2"),
-#ifdef GTKOSX
+#ifdef __APPLE__
                                                                     Keyboard::primary_modifier_name (),
 #else
                                                                     Keyboard::secondary_modifier_name (),
@@ -666,7 +666,7 @@ public:
                /* ignore snap */
                set_popdown_strings (_snap_modifier_combo, dumb);
                _snap_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen));
-#ifdef GTKOSX
+#ifdef __APPLE__
                Glib::ustring mod_str = string_compose (X_("%1-%2"), Keyboard::level4_modifier_name (), Keyboard::tertiary_modifier_name ());
 #else
                Glib::ustring mod_str = Keyboard::secondary_modifier_name();
@@ -692,7 +692,7 @@ public:
                /* snap delta */
                set_popdown_strings (_snap_delta_combo, dumb);
                _snap_delta_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_delta_modifier_chosen));
-#ifdef GTKOSX
+#ifdef __APPLE__
                mod_str = Keyboard::level4_modifier_name ();
 #else
                mod_str = string_compose (X_("%1-%2"), Keyboard::secondary_modifier_name (), Keyboard::level4_modifier_name ());
@@ -2902,7 +2902,12 @@ if (!Profile->get_mixbus()) {
                     sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_name_highlight)
                     ));
 
-       add_option (S_("GUI"),
+#ifndef __APPLE__
+       /* font scaling does nothing with GDK/Quartz */
+       add_option (S_("Preferences|GUI"), new FontScalingOptions ());
+#endif
+
+       add_option (S_("Preferences|GUI"),
                    new BoolOption (
                            "super-rapid-clock-update",
                            _("Update transport clock display at FPS instead of every 100ms"),
index 104d0912b7c11f91c43afd4e536fd5dc1c7a0f07..d8a88438490ddff9608bca0fafedc854df9fe721 100644 (file)
@@ -560,7 +560,7 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
        , gm (0)
 {
 
-#ifdef GTKOSX
+#ifdef __APPLE__
        try {
                /* add_shortcut_folder throws an exception if the folder being added already has a shortcut */
                chooser.add_shortcut_folder_uri("file:///Library/GarageBand/Apple Loops");
@@ -597,7 +597,7 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
        chooser.signal_update_preview().connect(sigc::mem_fun(*this, &SoundFileBrowser::update_preview));
        chooser.signal_file_activated().connect (sigc::mem_fun (*this, &SoundFileBrowser::chooser_file_activated));
 
-#ifdef GTKOSX
+#ifdef __APPLE__
        /* some broken redraw behaviour - this is a bandaid */
        chooser.signal_selection_changed().connect (mem_fun (chooser, &Widget::queue_draw));
 #endif
@@ -1091,7 +1091,7 @@ SoundFileBrowser::freesound_search()
        std::string theString = mootcher.searchText(
                        search_string,
                        freesound_page,
-#ifdef GTKOSX
+#ifdef __APPLE__
                        "", // OSX eats anything incl mp3
 #else
                        "type:wav OR type:aiff OR type:flac OR type:aif OR type:ogg OR type:oga",
index 64b63e6887462f34d691f7d50c5d4dae71888cb6..92ea7ee1bc2c4f531f8d1385071927133d5a39d1 100644 (file)
@@ -475,13 +475,10 @@ def build(bld):
         ]
     obj.install_path = bld.env['DLLDIR']
     obj.linkflags    = ''
-    obj.uselib       = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL'
-    obj.uselib       += ' GTKMM CANVAS FFTW3F'
-    obj.uselib       += ' AUDIOUNITS OSX GTKOSX LO '
-    obj.uselib       += ' TAGLIB '
+    obj.uselib       = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL GTKMM CANVAS FFTW3F LO TAGLIB '
 
     if sys.platform == 'darwin':
-        obj.uselib += ' AUDIOUNITS OSX GTKOSX'
+        obj.uselib += ' AUDIOUNITS OSX '
         obj.use    += ' libappleutility'
         obj.source += [ 'cocoacarbon.mm', 'bundle_env_cocoa.cc' ]
     elif bld.env['build_target'] == 'mingw':
@@ -578,7 +575,7 @@ def build(bld):
     base_font       = ""
 
     # Set up font sizes
-    if bld.is_defined('GTKOSX'): # OS X fonts
+    if sys.platform == 'darwin':
         basefont = ""
         font_sizes = {
                 'SMALLER' : '9',
diff --git a/wscript b/wscript
index 06882ecca061d8ab58ecc2b505524e22482fb9ba..c0c70377c2049c3cf55fe6ce5c233353ade8071f 100644 (file)
--- a/wscript
+++ b/wscript
@@ -846,9 +846,7 @@ def configure(conf):
         conf.define ('HAVE_COREAUDIO', 1)
         conf.define ('AUDIOUNIT_SUPPORT', 1)
 
-        conf.define ('GTKOSX', 1)
         conf.define ('TOP_MENUBAR',1)
-        conf.define ('GTKOSX',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