Commit bf3d1d82 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Merge branch 'feature/osx_integration' into 'develop'

enable OSX dock integration

See merge request !34
parents f0796be3 38ac9bd4
Pipeline #342 passed with stages
in 1 minute and 48 seconds
......@@ -47,6 +47,13 @@ cairo = dependency('cairo')
build_dependencies = [libm, girara, glib, gio, gthread, gmodule, gtk3, cairo]
if host_machine.system() == 'darwin'
gtk_mac_integration = dependency('gtk-mac-integration-gtk3')
build_dependencies += gtk_mac_integration
conf_data.set('GTKOSXAPPLICATION', true)
endif
# defines
defines = [
'-DGETTEXT_PACKAGE="zathura"',
......@@ -101,6 +108,13 @@ version_header = configure_file(
output: 'zathura-version.h',
configuration: conf_data
)
os_dependency_header = configure_file(
input: 'zathura/os-dependency.h.in',
output: 'zathura-os-dependency.h',
configuration: conf_data
)
include_directories = [
include_directories('.')
]
......@@ -153,6 +167,7 @@ headers = files(
'zathura/types.h',
)
headers += version_header
headers += os_dependency_header
# zathura helper library
libzathura = static_library('zathura',
......
/* SPDX-License-Identifier: Zlib */
#include "zathura-os-dependency.h"
#include <girara/settings.h>
#include <girara/log.h>
......@@ -307,6 +308,19 @@ main(int argc, char* argv[])
goto free_and_ret;
}
#ifdef GTKOSXAPPLICATION
GtkosxApplication *zathuraApp;
zathuraApp = g_object_new (GTKOSX_TYPE_APPLICATION, NULL);
gtkosx_application_set_use_quartz_accelerators (zathuraApp, FALSE);
gtkosx_application_ready (zathuraApp);
{
const gchar *id = gtkosx_application_get_bundle_id ();
if (id != NULL)
{
g_print ("TestIntegration Error! Bundle Has ID %s\n", id);
}
}
#endif //GTKOSXAPPLICATION
/* run zathura */
gtk_main();
......
/* SPDX-License-Identifier: Zlib */
#mesondefine GTKOSXAPPLICATION
#ifdef GTKOSXAPPLICATION
#include <gtkosxapplication.h>
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment