From 943f6c9d28714f6a798aad32329351c08c19289d Mon Sep 17 00:00:00 2001 From: Phillip Wood Date: Thu, 18 Sep 2014 12:15:06 +0100 Subject: [PATCH] Generate GDBus proxy object for org.gtk.Application Having a proxy object will make it easier to monitor the application's busy state. This adds a dependency on gdbus-codegen https://bugzilla.gnome.org/show_bug.cgi?id=736492 --- configure.ac | 6 ++++++ src/Makefile.am | 14 +++++++++++++- src/org.gtk.Application.xml | 19 +++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 src/org.gtk.Application.xml diff --git a/configure.ac b/configure.ac index ba173cedf..b392f4990 100644 --- a/configure.ac +++ b/configure.ac @@ -237,6 +237,12 @@ if test -z "${BROWSER_PLUGIN_DIR}"; then fi AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to]) +AC_ARG_VAR([GDBUS_CODEGEN],[the gdbus-codegen programme]) +AC_PATH_PROG([GDBUS_CODEGEN],[gdbus-codegen],[]) +if test -z "$GDBUS_CODEGEN"; then + AC_MSG_ERROR([gdbus-codegen not found]) +fi + AC_CONFIG_FILES([ Makefile data/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index a73eaaedf..dda1061e8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -51,6 +51,12 @@ gnome-shell-extension-tool: gnome-shell-extension-tool.in Makefile gnome-shell-perf-tool: gnome-shell-perf-tool.in Makefile $(AM_V_GEN) sed $(generated_script_substitutions) $< > $@.tmp && mv $@.tmp $@ && chmod a+x $@ +org-gtk-application.c org-gtk-application.h: org.gtk.Application.xml Makefile + $(AM_V_GEN) $(GDBUS_CODEGEN) \ + --generate-c-code org-gtk-application \ + --c-namespace Shell \ + $< + CLEANFILES += gnome-shell $(bin_SCRIPTS) include Makefile-st.am @@ -75,6 +81,8 @@ privlib_LTLIBRARIES = libgnome-shell-js.la libgnome-shell-menu.la libgnome-shell noinst_LTLIBRARIES += libgnome-shell-base.la shell_built_sources = \ + org-gtk-application.h \ + org-gtk-application.c \ shell-enum-types.h \ shell-enum-types.c @@ -178,8 +186,12 @@ libgnome_shell_built_sources = \ libgnome_shell_la_SOURCES = $(libgnome_shell_sources) nodist_libgnome_shell_la_SOURCES = $(libgnome_shell_built_sources) +shell_no_gir_sources = \ + org-gtk-application.h \ + org-gtk-application.c + libgnome_shell_la_gir_sources = \ - $(filter-out %-private.h $(shell_private_sources), $(shell_public_headers_h) $(libgnome_shell_base_la_SOURCES) $(libgnome_shell_sources) $(libgnome_shell_built_sources)) + $(filter-out %-private.h $(shell_private_sources) $(shell_no_gir_sources), $(shell_public_headers_h) $(libgnome_shell_base_la_SOURCES) $(libgnome_shell_sources) $(libgnome_shell_built_sources)) gnome_shell_SOURCES = main.c gnome_shell_CPPFLAGS = \ diff --git a/src/org.gtk.Application.xml b/src/org.gtk.Application.xml new file mode 100644 index 000000000..161aa1d2b --- /dev/null +++ b/src/org.gtk.Application.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + +