summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-29 12:29:55 +0100
committerDavid Robillard <d@drobilla.net>2020-12-16 18:42:47 +0100
commit1936aace80b5594078d874e9b661a9a91e461279 (patch)
tree8ba47e28e09431f613f310a7f1d0539f72052a9c /src
parentdd72175482f433f90e2eb90ae31cd73c67c33997 (diff)
downloadpatchage-1936aace80b5594078d874e9b661a9a91e461279.tar.gz
patchage-1936aace80b5594078d874e9b661a9a91e461279.tar.bz2
patchage-1936aace80b5594078d874e9b661a9a91e461279.zip
Fix build on MacOS
Diffstat (limited to 'src')
-rw-r--r--src/Patchage.cpp12
-rw-r--r--src/main.cpp2
2 files changed, 8 insertions, 6 deletions
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 <gtkmm/main.h>
# include <gtkosxapplication.h>
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<patchage::Patchage*>(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<GtkosxApplication*>(
+ g_object_new(GTKOSX_TYPE_APPLICATION, nullptr));
+
_menubar->hide();
_menu_file_quit->hide();
gtkosx_application_set_menu_bar(osxapp, GTK_MENU_SHELL(_menubar->gobj()));
diff --git a/src/main.cpp b/src/main.cpp
index fb1744c..c677e01 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -44,7 +44,7 @@ namespace {
void
set_bundle_environment()
{
- const std::string bundle = bundle_location();
+ const std::string bundle = patchage::bundle_location();
const std::string lib_path = bundle + "/lib";
if (!Glib::file_test(lib_path, Glib::FILE_TEST_EXISTS)) {
// If lib does not exist, we have not been bundleified, do nothing