From 1936aace80b5594078d874e9b661a9a91e461279 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 29 Nov 2020 12:29:55 +0100 Subject: Fix build on MacOS --- src/Patchage.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/Patchage.cpp') diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 56f3ff2..7207567 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -101,20 +101,21 @@ PATCHAGE_RESTORE_WARNINGS #ifdef PATCHAGE_GTK_OSX +# include # include namespace { gboolean -can_activate_cb(GtkWidget* widget, guint signal_id, gpointer data) +can_activate_cb(GtkWidget* widget, guint, gpointer) { return gtk_widget_is_sensitive(widget); } void -terminate_cb(GtkosxApplication* app, gpointer data) +terminate_cb(GtkosxApplication*, gpointer data) { - Patchage* patchage = (Patchage*)data; + auto* patchage = static_cast(data); patchage->save(); Gtk::Main::quit(); } @@ -379,8 +380,9 @@ Patchage::Patchage(Options options) #ifdef PATCHAGE_GTK_OSX // Set up Mac menu bar - GtkosxApplication* osxapp = - (GtkosxApplication*)g_object_new(GTKOSX_TYPE_APPLICATION, nullptr); + GtkosxApplication* osxapp = static_cast( + g_object_new(GTKOSX_TYPE_APPLICATION, nullptr)); + _menubar->hide(); _menu_file_quit->hide(); gtkosx_application_set_menu_bar(osxapp, GTK_MENU_SHELL(_menubar->gobj())); -- cgit v1.2.1