mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 18:03:47 +01:00
Merge branch 'feature/osx_integration' into 'develop'
enable OSX dock integration See merge request pwmt/zathura!34
This commit is contained in:
commit
bf3d1d820d
15
meson.build
15
meson.build
@ -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',
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* 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();
|
||||
|
||||
|
8
zathura/os-dependency.h.in
Normal file
8
zathura/os-dependency.h.in
Normal file
@ -0,0 +1,8 @@
|
||||
/* SPDX-License-Identifier: Zlib */
|
||||
|
||||
#mesondefine GTKOSXAPPLICATION
|
||||
|
||||
#ifdef GTKOSXAPPLICATION
|
||||
#include <gtkosxapplication.h>
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user