enable dock integration

This commit is contained in:
slamet kristanto 2020-05-17 12:18:09 +09:00
parent 67818f90e8
commit 2315f45eea
2 changed files with 39 additions and 1 deletions

View file

@ -44,8 +44,9 @@ gthread = dependency('gthread-2.0', version: '>=2.50')
gmodule = dependency('gmodule-no-export-2.0', version: '>=2.50')
gtk3 = dependency('gtk+-3.0', version: '>=3.22')
cairo = dependency('cairo')
gtk_mac_integration = dependency('gtk-mac-integration-gtk3')
build_dependencies = [libm, girara, glib, gio, gthread, gmodule, gtk3, cairo]
build_dependencies = [libm, girara, glib, gio, gthread, gmodule, gtk3, cairo, gtk_mac_integration]
# defines
defines = [

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: Zlib */
#include <gtkosxapplication.h>
#include <girara/settings.h>
#include <girara/log.h>
@ -19,6 +20,23 @@
#include "synctex.h"
#endif
/* Uncomment ONE of these to test menu-mangling: */
//#define GTKMACINTEGRATION
#define GTKOSXAPPLICATION
/* These others are optional */
#define GTK_DISABLE_DEPRECATION_WARNINGS 1
#define BUILT_UI //The built UI uses deprecated functions
//#define QUARTZ_HANDLERS
/* GTKMACINTEGRATION uses Carbon, which isn't available for 64-bit builds. */
#ifdef __x86_64__
#undef GTKMACINTEGRATION
# ifndef GTKOSXAPPLICATION
#define GTKOSXAPPLICATION
# endif
#endif //__x86_64__
/* Init locale */
static void
init_locale(void)
@ -300,6 +318,25 @@ main(int argc, char* argv[])
synctex_fwd);
}
#ifdef GTKOSXAPPLICATION
GtkosxApplication *zathuraApp;
#endif //GTKOSXAPPLICATION
zathuraApp = g_object_new (GTKOSX_TYPE_APPLICATION, NULL);
{
gboolean falseval = FALSE;
gboolean trueval = TRUE;
}
# ifndef QUARTZ_HANDLERS
gtkosx_application_set_use_quartz_accelerators (zathuraApp, FALSE);
# endif //QUARTZ_HANDLERS
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);
}
}
/* run zathura */
gtk_main();