aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeni Golov <evgeni@debian.org>2010-07-14 10:14:20 +0200
committerEvgeni Golov <evgeni@debian.org>2010-07-14 10:14:20 +0200
commit674342c670052bcfcc92b7638de9af482ae2a856 (patch)
tree0432b0802a7b35beaac76d51d797219a4b586d80
parent6830905830ac78271515c586442a090cf7a0e3ff (diff)
parent271f62baede153472711c3dcf2388df3acffa006 (diff)
downloadlibdbusmenu-674342c670052bcfcc92b7638de9af482ae2a856.tar.gz
libdbusmenu-674342c670052bcfcc92b7638de9af482ae2a856.tar.bz2
libdbusmenu-674342c670052bcfcc92b7638de9af482ae2a856.zip
Merged lp:~ubuntu-desktop/dbusmenu/ubuntu
* New upstream release. ∘ Protect against NULL nodes (LP: #602444) ∘ Remove extra warnings and messages ∘ Handle not having a session bus better (LP: #598715) * New upstream release. * Block building submenus on separators (LP: #598620) * Adding more through JSON support for testing * Fixing up value handling in dbusmenu-dumper * debian/control, debian/libdbusmenu-jsonloader*install: Adding two binary packages for the jsonloader test library. * Merge Ubuntu. Preserve Maintainer and Vcs-* fields. * Standards-Version: 3.9.0 * Source-Format: 1.0 for now - -doc packages are Arch:all
-rwxr-xr-xconfigure53
-rw-r--r--configure.ac11
-rw-r--r--debian/changelog32
-rw-r--r--debian/control44
-rw-r--r--debian/libdbusmenu-jsonloader-dev.install4
-rw-r--r--debian/libdbusmenu-jsonloader1.install1
-rw-r--r--debian/source/format1
-rw-r--r--docs/libdbusmenu-glib/reference/html/ch01.html2
-rw-r--r--docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html1
-rw-r--r--docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html2
-rw-r--r--docs/libdbusmenu-glib/reference/tmpl/client-menuitem.sgml2
-rw-r--r--docs/libdbusmenu-glib/reference/tmpl/client.sgml3
-rw-r--r--docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml2
-rw-r--r--docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml3
-rw-r--r--docs/libdbusmenu-glib/reference/tmpl/server.sgml2
-rw-r--r--docs/libdbusmenu-glib/reference/version.xml2
-rw-r--r--docs/libdbusmenu-glib/reference/xml/client.xml1
-rw-r--r--docs/libdbusmenu-glib/reference/xml/menuitem.xml2
-rw-r--r--docs/libdbusmenu-gtk/reference/html/ch01.html2
-rw-r--r--docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html36
-rw-r--r--docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkMenu.html6
-rw-r--r--docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html12
-rw-r--r--docs/libdbusmenu-gtk/reference/tmpl/client.sgml2
-rw-r--r--docs/libdbusmenu-gtk/reference/tmpl/genericmenuitem.sgml2
-rw-r--r--docs/libdbusmenu-gtk/reference/tmpl/menu.sgml2
-rw-r--r--docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml2
-rw-r--r--docs/libdbusmenu-gtk/reference/version.xml2
-rw-r--r--libdbusmenu-glib/client.c7
-rw-r--r--libdbusmenu-glib/server.c15
-rw-r--r--libdbusmenu-gtk/client.c3
-rw-r--r--libdbusmenu-gtk/menuitem.c7
-rw-r--r--tests/Makefile.am93
-rw-r--r--tests/Makefile.in368
-rw-r--r--tests/dbusmenu-jsonloader.pc.in14
-rw-r--r--tests/json-loader.c220
-rw-r--r--tests/json-loader.h31
-rw-r--r--tests/test-gtk-label-server.c71
-rw-r--r--tests/test-json-01.json4023
-rw-r--r--tests/test-json-client.c75
-rw-r--r--tests/test-json-server.c81
-rw-r--r--tools/dbusmenu-dumper.c111
41 files changed, 5126 insertions, 227 deletions
diff --git a/configure b/configure
index 67253f8..daea5a7 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for libdbusmenu 0.3.3.
+# Generated by GNU Autoconf 2.65 for libdbusmenu 0.3.5.
#
# Report bugs to <ted@canonical.com>.
#
@@ -703,8 +703,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libdbusmenu'
PACKAGE_TARNAME='libdbusmenu'
-PACKAGE_VERSION='0.3.3'
-PACKAGE_STRING='libdbusmenu 0.3.3'
+PACKAGE_VERSION='0.3.5'
+PACKAGE_STRING='libdbusmenu 0.3.5'
PACKAGE_BUGREPORT='ted@canonical.com'
PACKAGE_URL=''
@@ -1524,7 +1524,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libdbusmenu 0.3.3 to adapt to many kinds of systems.
+\`configure' configures libdbusmenu 0.3.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1594,7 +1594,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libdbusmenu 0.3.3:";;
+ short | recursive ) echo "Configuration of libdbusmenu 0.3.5:";;
esac
cat <<\_ACEOF
@@ -1724,7 +1724,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libdbusmenu configure 0.3.3
+libdbusmenu configure 0.3.5
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2097,7 +2097,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libdbusmenu $as_me 0.3.3, which was
+It was created by libdbusmenu $as_me 0.3.5, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2911,7 +2911,7 @@ fi
# Define the identity of the package.
PACKAGE=libdbusmenu
- VERSION=0.3.3
+ VERSION=0.3.5
# Some tools Automake needs.
@@ -12684,6 +12684,7 @@ fi
###########################
JSON_GLIB_REQUIRED_VERSION=0.6.0
+GIO_UNIX_REQUIRED_VERSION=2.24
pkg_failed=no
@@ -12695,12 +12696,15 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_DBUSMENUTESTS_CFLAGS="$DBUSMENUTESTS_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-glib-1.0 >= \$JSON_GLIB_REQUIRED_VERSION\""; } >&5
- ($PKG_CONFIG --exists --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-glib-1.0 >= \$JSON_GLIB_REQUIRED_VERSION
+ gio-unix-2.0 >= \$GIO_UNIX_REQUIRED_VERSION\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_DBUSMENUTESTS_CFLAGS=`$PKG_CONFIG --cflags "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION" 2>/dev/null`
+ pkg_cv_DBUSMENUTESTS_CFLAGS=`$PKG_CONFIG --cflags "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -12713,12 +12717,15 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_DBUSMENUTESTS_LIBS="$DBUSMENUTESTS_LIBS"
else
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-glib-1.0 >= \$JSON_GLIB_REQUIRED_VERSION\""; } >&5
- ($PKG_CONFIG --exists --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-glib-1.0 >= \$JSON_GLIB_REQUIRED_VERSION
+ gio-unix-2.0 >= \$GIO_UNIX_REQUIRED_VERSION\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_DBUSMENUTESTS_LIBS=`$PKG_CONFIG --libs "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION" 2>/dev/null`
+ pkg_cv_DBUSMENUTESTS_LIBS=`$PKG_CONFIG --libs "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -12737,14 +12744,17 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- DBUSMENUTESTS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION"`
+ DBUSMENUTESTS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION"`
else
- DBUSMENUTESTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION"`
+ DBUSMENUTESTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION"`
fi
# Put the nasty error message in config.log where it belongs
echo "$DBUSMENUTESTS_PKG_ERRORS" >&5
- as_fn_error "Package requirements (json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION) were not met:
+ as_fn_error "Package requirements (json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION) were not met:
$DBUSMENUTESTS_PKG_ERRORS
@@ -12927,7 +12937,7 @@ fi
###########################
LIBDBUSMENU_CURRENT=1
-LIBDBUSMENU_REVISION=8
+LIBDBUSMENU_REVISION=10
LIBDBUSMENU_AGE=0
@@ -13673,7 +13683,7 @@ fi
# Files
###########################
-ac_config_files="$ac_config_files Makefile po/Makefile.in libdbusmenu-glib/Makefile libdbusmenu-glib/dbusmenu-glib.pc libdbusmenu-gtk/Makefile libdbusmenu-gtk/dbusmenu-gtk.pc tools/Makefile tools/testapp/Makefile tests/Makefile docs/Makefile docs/libdbusmenu-glib/Makefile docs/libdbusmenu-glib/reference/Makefile docs/libdbusmenu-glib/reference/version.xml docs/libdbusmenu-gtk/Makefile docs/libdbusmenu-gtk/reference/Makefile docs/libdbusmenu-gtk/reference/version.xml"
+ac_config_files="$ac_config_files Makefile po/Makefile.in libdbusmenu-glib/Makefile libdbusmenu-glib/dbusmenu-glib.pc libdbusmenu-gtk/Makefile libdbusmenu-gtk/dbusmenu-gtk.pc tools/Makefile tools/testapp/Makefile tests/Makefile tests/dbusmenu-jsonloader.pc docs/Makefile docs/libdbusmenu-glib/Makefile docs/libdbusmenu-glib/reference/Makefile docs/libdbusmenu-glib/reference/version.xml docs/libdbusmenu-gtk/Makefile docs/libdbusmenu-gtk/reference/Makefile docs/libdbusmenu-gtk/reference/version.xml"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -14240,7 +14250,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libdbusmenu $as_me 0.3.3, which was
+This file was extended by libdbusmenu $as_me 0.3.5, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14306,7 +14316,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libdbusmenu config.status 0.3.3
+libdbusmenu config.status 0.3.5
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
@@ -14698,6 +14708,7 @@ do
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
"tools/testapp/Makefile") CONFIG_FILES="$CONFIG_FILES tools/testapp/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+ "tests/dbusmenu-jsonloader.pc") CONFIG_FILES="$CONFIG_FILES tests/dbusmenu-jsonloader.pc" ;;
"docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
"docs/libdbusmenu-glib/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libdbusmenu-glib/Makefile" ;;
"docs/libdbusmenu-glib/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libdbusmenu-glib/reference/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 80c4b8b..7ec994b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(libdbusmenu, 0.3.3, ted@canonical.com)
+AC_INIT(libdbusmenu, 0.3.5, ted@canonical.com)
AC_COPYRIGHT([Copyright 2009,2010 Canonical])
AC_PREREQ(2.62)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libdbusmenu, 0.3.3, [-Wno-portability])
+AM_INIT_AUTOMAKE(libdbusmenu, 0.3.5, [-Wno-portability])
AM_MAINTAINER_MODE
@@ -62,8 +62,10 @@ AC_SUBST(DBUSMENUGTK_LIBS)
###########################
JSON_GLIB_REQUIRED_VERSION=0.6.0
+GIO_UNIX_REQUIRED_VERSION=2.24
-PKG_CHECK_MODULES(DBUSMENUTESTS, json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION)
+PKG_CHECK_MODULES(DBUSMENUTESTS, json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION)
AC_SUBST(DBUSMENUTESTS_CFLAGS)
AC_SUBST(DBUSMENUTESTS_LIBS)
@@ -85,7 +87,7 @@ AC_PATH_PROG([VALA_API_GEN], [vapigen])
###########################
LIBDBUSMENU_CURRENT=1
-LIBDBUSMENU_REVISION=8
+LIBDBUSMENU_REVISION=10
LIBDBUSMENU_AGE=0
AC_SUBST(LIBDBUSMENU_CURRENT)
@@ -126,6 +128,7 @@ libdbusmenu-gtk/dbusmenu-gtk.pc
tools/Makefile
tools/testapp/Makefile
tests/Makefile
+tests/dbusmenu-jsonloader.pc
docs/Makefile
docs/libdbusmenu-glib/Makefile
docs/libdbusmenu-glib/reference/Makefile
diff --git a/debian/changelog b/debian/changelog
index d6a12b5..84cafc7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,32 @@
+libdbusmenu (0.3.5-0ubuntu1) maverick; urgency=low
+
+ * New upstream release.
+ ∘ Protect against NULL nodes (LP: #602444)
+ ∘ Remove extra warnings and messages
+ ∘ Handle not having a session bus better (LP: #598715)
+
+ -- Ted Gould <ted@ubuntu.com> Thu, 08 Jul 2010 10:24:18 -0500
+
+libdbusmenu (0.3.4-0ubuntu1) maverick; urgency=low
+
+ * New upstream release.
+ * Block building submenus on separators (LP: #598620)
+ * Adding more through JSON support for testing
+ * Fixing up value handling in dbusmenu-dumper
+ * debian/control, debian/libdbusmenu-jsonloader*install: Adding
+ two binary packages for the jsonloader test library.
+
+ -- Ted Gould <ted@ubuntu.com> Thu, 01 Jul 2010 09:00:16 -0500
+
+libdbusmenu (0.3.3-1) unstable; urgency=low
+
+ * Merge Ubuntu.
+ Preserve Maintainer and Vcs-* fields.
+ * Standards-Version: 3.9.0
+ * Source-Format: 1.0 for now
+
+ -- Evgeni Golov <evgeni@debian.org> Thu, 01 Jul 2010 11:42:23 +0200
+
libdbusmenu (0.3.3-0ubuntu1) maverick; urgency=low
* New upstream release.
@@ -23,12 +52,13 @@ libdbusmenu (0.3.2-1) unstable; urgency=low
- Standards-Version: 3.8.4
- Fix Homepage URL.
- Update Vcs-* fields.
+ - -doc packages are Arch:all
* debian/copyright:
- Convert to DEP5 format.
- Add Ken and Sebastien, according to changelog.
- Add Aurélien Gâteau, according to headers.
- -- Evgeni Golov <evgeni@debian.org> Wed, 16 Jun 2010 11:37:08 +0200
+ -- Evgeni Golov <evgeni@debian.org> Sun, 20 Jun 2010 13:56:00 +0200
libdbusmenu (0.3.2-0ubuntu1) maverick; urgency=low
diff --git a/debian/control b/debian/control
index 18222ae..fea73b2 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,7 @@ Build-Depends: debhelper (>= 5.0),
gir1.0-glib-2.0,
gir1.0-gtk-2.0,
valac
-Standards-Version: 3.8.4
+Standards-Version: 3.9.0
Homepage: https://launchpad.net/dbusmenu
Vcs-Bzr: https://code.launchpad.net/~dbusmenu-team/dbusmenu/ubuntu
Vcs-Browser: http://bazaar.launchpad.net/~dbusmenu-team/dbusmenu/ubuntu
@@ -60,12 +60,12 @@ Section: libs
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends}
-Description: library for passing menus over DBus - GTK version
+Description: library for passing menus over DBus - GTK+ version
libdbusmenu passes a menu structure across DBus so that a program can
create a menu simply without worrying about how it is displayed on the
other side of the bus.
.
- This package contains shared libraries to be used by GTK applications.
+ This package contains shared libraries to be used by GTK+ applications.
Package: libdbusmenu-gtk-dev
Section: libdevel
@@ -76,12 +76,12 @@ Depends: ${shlibs:Depends},
libdbus-glib-1-dev (>= 0.76),
libgtk2.0-dev (>= 2.12.0),
libdbusmenu-glib-dev
-Description: library for passing menus over DBus - GTK version developement files
+Description: library for passing menus over DBus - GTK+ version developement files
libdbusmenu passes a menu structure across DBus so that a program can
create a menu simply without worrying about how it is displayed on the
other side of the bus.
.
- This package contains files that are needed to build GTK applications.
+ This package contains files that are needed to build GTK+ applications.
Package: libdbusmenu-tools
Section: devel
@@ -129,7 +129,7 @@ Description: typelib file for libdbusmenu-gtk1
Package: libdbusmenu-glib-doc
Section: doc
-Architecture: any
+Architecture: all
Depends: ${misc:Depends}
Description: library for passing menus over DBus - documentation
libdbusmenu passes a menu structure across DBus so that a program can
@@ -140,12 +140,40 @@ Description: library for passing menus over DBus - documentation
Package: libdbusmenu-gtk-doc
Section: doc
-Architecture: any
+Architecture: all
Depends: ${misc:Depends}
-Description: library for passing menus over DBus - GTK version documentation
+Description: library for passing menus over DBus - GTK+ version documentation
libdbusmenu passes a menu structure across DBus so that a program can
create a menu simply without worrying about how it is displayed on the
other side of the bus.
.
This package contains developer documentation for libdbusmenu-gtk.
+Package: libdbusmenu-jsonloader1
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends},
+ ${misc:Depends}
+Description: library for passing menus over DBus - Test lib
+ libdbusmenu passes a menu structure across DBus so that a program can
+ create a menu simply without worrying about how it is displayed on the
+ other side of the bus.
+ .
+ This package contains shared libraries to be by test suites in applications
+ or libraries using dbusmenu.
+
+Package: libdbusmenu-jsonloader-dev
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ libdbus-glib-1-dev (>= 0.76),
+ libdbusmenu-glib-dev (= ${binary:Version}),
+ libjson-glib-dev
+Description: library for passing menus over DBus - Test lib
+ libdbusmenu passes a menu structure across DBus so that a program can
+ create a menu simply without worrying about how it is displayed on the
+ other side of the bus.
+ .
+ This package contains files that are needed to build test suites in
+ applications or libraries using dbusmenu.
diff --git a/debian/libdbusmenu-jsonloader-dev.install b/debian/libdbusmenu-jsonloader-dev.install
new file mode 100644
index 0000000..27c41a5
--- /dev/null
+++ b/debian/libdbusmenu-jsonloader-dev.install
@@ -0,0 +1,4 @@
+debian/tmp/usr/include/libdbusmenu-0.1/libdbusmenu-jsonloader/*
+debian/tmp/usr/lib/pkgconfig/dbusmenu-jsonloader.pc
+debian/tmp/usr/lib/libdbusmenu-jsonloader.a
+debian/tmp/usr/lib/libdbusmenu-jsonloader.so
diff --git a/debian/libdbusmenu-jsonloader1.install b/debian/libdbusmenu-jsonloader1.install
new file mode 100644
index 0000000..bff47f5
--- /dev/null
+++ b/debian/libdbusmenu-jsonloader1.install
@@ -0,0 +1 @@
+debian/tmp/usr/lib/libdbusmenu-jsonloader.so.*
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..d3827e7
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+1.0
diff --git a/docs/libdbusmenu-glib/reference/html/ch01.html b/docs/libdbusmenu-glib/reference/html/ch01.html
index 286064d..e313534 100644
--- a/docs/libdbusmenu-glib/reference/html/ch01.html
+++ b/docs/libdbusmenu-glib/reference/html/ch01.html
@@ -21,7 +21,7 @@
</tr></table>
<div class="chapter" title="API">
<div class="titlepage"><div><div><h2 class="title">
-<a name="id339465"></a>API</h2></div></div></div>
+<a name="id390460"></a>API</h2></div></div></div>
<div class="toc"><dl>
<dt>
<span class="refentrytitle"><a href="libdbusmenu-glib-DbusmenuServer.html">DbusmenuServer</a></span><span class="refpurpose"></span>
diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html
index c924a0d..1b41d8b 100644
--- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html
+++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html
@@ -455,6 +455,7 @@ This function connects into the type handling of the <a class="link" href="libdb
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>
<em class="parameter"><code>gpointer</code></em> user_data:
+<em class="parameter"><code>gpointer</code></em> user_data:
</td>
</tr>
<tr>
diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html
index 47f8f77..23a4e0d 100644
--- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html
+++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html
@@ -287,7 +287,7 @@ objects and handled appropriately.
<hr>
<div class="refsect2" title="DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY">
<a name="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS"></a><h3>DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</h3>
-<pre class="programlisting">#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "child-display"
+<pre class="programlisting">#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "children-display"
</pre>
<p>
</p>
diff --git a/docs/libdbusmenu-glib/reference/tmpl/client-menuitem.sgml b/docs/libdbusmenu-glib/reference/tmpl/client-menuitem.sgml
index b6039ee..53426a7 100644
--- a/docs/libdbusmenu-glib/reference/tmpl/client-menuitem.sgml
+++ b/docs/libdbusmenu-glib/reference/tmpl/client-menuitem.sgml
@@ -9,13 +9,11 @@ DbusmenuClientMenuitem
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-glib/reference/tmpl/client.sgml b/docs/libdbusmenu-glib/reference/tmpl/client.sgml
index 23ebf50..c8264e3 100644
--- a/docs/libdbusmenu-glib/reference/tmpl/client.sgml
+++ b/docs/libdbusmenu-glib/reference/tmpl/client.sgml
@@ -9,13 +9,11 @@ DbusmenuClient
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -159,6 +157,7 @@ DbusmenuClient
@client:
@id:
+@gpointer user_data:
@gpointer user_data:
@cb_data:
diff --git a/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml b/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml
index a56e503..c76017b 100644
--- a/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml
+++ b/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml
@@ -9,13 +9,11 @@ DbusmenuMenuitemProxy
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml b/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml
index ff2f08a..ad26442 100644
--- a/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml
+++ b/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml
@@ -9,13 +9,11 @@ DbusmenuMenuitem
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
@@ -507,6 +505,7 @@ DbusmenuMenuitem
</para>
@mi:
+@DbusmenuMenuitem * mi, gpointer data:
@DbusmenuMenuitem * mi, gpointer data:
@data:
diff --git a/docs/libdbusmenu-glib/reference/tmpl/server.sgml b/docs/libdbusmenu-glib/reference/tmpl/server.sgml
index 111e2eb..426acc6 100644
--- a/docs/libdbusmenu-glib/reference/tmpl/server.sgml
+++ b/docs/libdbusmenu-glib/reference/tmpl/server.sgml
@@ -9,13 +9,11 @@ DbusmenuServer
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-glib/reference/version.xml b/docs/libdbusmenu-glib/reference/version.xml
index 1c09c74..c2c0004 100644
--- a/docs/libdbusmenu-glib/reference/version.xml
+++ b/docs/libdbusmenu-glib/reference/version.xml
@@ -1 +1 @@
-0.3.3
+0.3.5
diff --git a/docs/libdbusmenu-glib/reference/xml/client.xml b/docs/libdbusmenu-glib/reference/xml/client.xml
index 19e5767..b16de17 100644
--- a/docs/libdbusmenu-glib/reference/xml/client.xml
+++ b/docs/libdbusmenu-glib/reference/xml/client.xml
@@ -342,6 +342,7 @@ This function connects into the type handling of the <link linkend="DbusmenuClie
<varlistentry><term><parameter>id</parameter>&#160;:</term>
<listitem><simpara>
<parameter>gpointer</parameter> user_data:
+<parameter>gpointer</parameter> user_data:
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb_data</parameter>&#160;:</term>
<listitem><simpara>
diff --git a/docs/libdbusmenu-glib/reference/xml/menuitem.xml b/docs/libdbusmenu-glib/reference/xml/menuitem.xml
index e86d3c1..44b7a51 100644
--- a/docs/libdbusmenu-glib/reference/xml/menuitem.xml
+++ b/docs/libdbusmenu-glib/reference/xml/menuitem.xml
@@ -257,7 +257,7 @@ objects and handled appropriately.
<refsect2 id="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS"><primary>DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</primary></indexterm>
-<programlisting>#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "child-display"
+<programlisting>#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "children-display"
</programlisting>
<para>
</para></refsect2>
diff --git a/docs/libdbusmenu-gtk/reference/html/ch01.html b/docs/libdbusmenu-gtk/reference/html/ch01.html
index 2853880..d5d9d05 100644
--- a/docs/libdbusmenu-gtk/reference/html/ch01.html
+++ b/docs/libdbusmenu-gtk/reference/html/ch01.html
@@ -21,7 +21,7 @@
</tr></table>
<div class="chapter" title="API">
<div class="titlepage"><div><div><h2 class="title">
-<a name="id422170"></a>API</h2></div></div></div>
+<a name="id512726"></a>API</h2></div></div></div>
<div class="toc"><dl>
<dt>
<span class="refentrytitle"><a href="libdbusmenu-gtk-DbusmenuGtkMenu.html">DbusmenuGtkMenu</a></span><span class="refpurpose"></span>
diff --git a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html
index 6e1d921..91ded1b 100644
--- a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html
+++ b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html
@@ -43,14 +43,14 @@
<span class="returnvalue">DbusmenuGtkClient</span> * <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-new" title="dbusmenu_gtkclient_new ()">dbusmenu_gtkclient_new</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_name</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_object</code></em>);
<a href="/usr/share/gtk-doc/html/gtk/GtkMenuItem.html"><span class="returnvalue">GtkMenuItem</span></a> * <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-menuitem-get" title="dbusmenu_gtkclient_menuitem_get ()">dbusmenu_gtkclient_menuitem_get</a> (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>,
- <em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *item</code></em>);
+ <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>);
<a href="/usr/share/gtk-doc/html/gtk/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-menuitem-get-submenu" title="dbusmenu_gtkclient_menuitem_get_submenu ()">dbusmenu_gtkclient_menuitem_get_submenu</a>
(<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>,
- <em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *item</code></em>);
+ <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libdbusmenu-gtk-DbusmenuGtkClient.html#dbusmenu-gtkclient-newitem-base" title="dbusmenu_gtkclient_newitem_base ()">dbusmenu_gtkclient_newitem_base</a> (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>,
- <em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *item</code></em>,
+ <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gtk/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> *gmi</code></em>,
- <em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *parent</code></em>);
+ <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *parent</code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
@@ -95,7 +95,7 @@
<col align="left" valign="top">
<tbody>
<tr>
-<td><p><span class="term"><span class="type">DbusmenuClientClass</span> <em class="structfield"><code><a name="DbusmenuGtkClientClass.parent-class"></a>parent_class</code></em>;</span></p></td>
+<td><p><span class="term"><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuClient.html#DbusmenuClientClass"><span class="type">DbusmenuClientClass</span></a> <em class="structfield"><code><a name="DbusmenuGtkClientClass.parent-class"></a>parent_class</code></em>;</span></p></td>
<td>
<span class="type">GtkMenuClass</span>
</td>
@@ -134,15 +134,15 @@
<pre class="programlisting"><span class="returnvalue">DbusmenuGtkClient</span> * dbusmenu_gtkclient_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_name</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_object</code></em>);</pre>
<p>
-Creates a new <span class="type">DbusmenuGtkClient</span> object and creates a <span class="type">DbusmenuClient</span>
- that connects across DBus to a <span class="type">DbusmenuServer</span>.
+Creates a new <span class="type">DbusmenuGtkClient</span> object and creates a <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient"><span class="type">DbusmenuClient</span></a>
+ that connects across DBus to a <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuServer.html#DbusmenuServer"><span class="type">DbusmenuServer</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dbus_name</code></em> :</span></p></td>
-<td>Name of the <span class="type">DbusmenuServer</span> on DBus
+<td>Name of the <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuServer.html#DbusmenuServer"><span class="type">DbusmenuServer</span></a> on DBus
</td>
</tr>
<tr>
@@ -162,10 +162,10 @@ Creates a new <span class="type">DbusmenuGtkClient</span> object and creates a <
<div class="refsect2" title="dbusmenu_gtkclient_menuitem_get ()">
<a name="dbusmenu-gtkclient-menuitem-get"></a><h3>dbusmenu_gtkclient_menuitem_get ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gtk/GtkMenuItem.html"><span class="returnvalue">GtkMenuItem</span></a> * dbusmenu_gtkclient_menuitem_get (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>,
- <em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *item</code></em>);</pre>
+ <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>);</pre>
<p>
This grabs the <a href="/usr/share/gtk-doc/html/gtk/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> that is associated with the
- <span class="type">DbusmenuMenuitem</span>.
+ <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -178,7 +178,7 @@ This grabs the <a href="/usr/share/gtk-doc/html/gtk/GtkMenuItem.html"><span clas
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>
-<span class="type">DbusmenuMenuitem</span> to get associated <a href="/usr/share/gtk-doc/html/gtk/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> on.
+<a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> to get associated <a href="/usr/share/gtk-doc/html/gtk/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> on.
</td>
</tr>
<tr>
@@ -194,7 +194,7 @@ This grabs the <a href="/usr/share/gtk-doc/html/gtk/GtkMenuItem.html"><span clas
<a name="dbusmenu-gtkclient-menuitem-get-submenu"></a><h3>dbusmenu_gtkclient_menuitem_get_submenu ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gtk/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * dbusmenu_gtkclient_menuitem_get_submenu
(<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>,
- <em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *item</code></em>);</pre>
+ <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>);</pre>
<p>
This grabs the submenu associated with the menuitem.
</p>
@@ -209,7 +209,7 @@ This grabs the submenu associated with the menuitem.
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>
-<span class="type">DbusmenuMenuitem</span> to get associated <a href="/usr/share/gtk-doc/html/gtk/GtkMenu.html"><span class="type">GtkMenu</span></a> on.
+<a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> to get associated <a href="/usr/share/gtk-doc/html/gtk/GtkMenu.html"><span class="type">GtkMenu</span></a> on.
</td>
</tr>
<tr>
@@ -224,9 +224,9 @@ This grabs the submenu associated with the menuitem.
<div class="refsect2" title="dbusmenu_gtkclient_newitem_base ()">
<a name="dbusmenu-gtkclient-newitem-base"></a><h3>dbusmenu_gtkclient_newitem_base ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> dbusmenu_gtkclient_newitem_base (<em class="parameter"><code><span class="type">DbusmenuGtkClient</span> *client</code></em>,
- <em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *item</code></em>,
+ <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *item</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gtk/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> *gmi</code></em>,
- <em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *parent</code></em>);</pre>
+ <em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *parent</code></em>);</pre>
<p>
This function provides some of the basic connectivity for being in
the GTK world. Things like visibility and sensitivity of the item are
@@ -236,7 +236,7 @@ This function provides some of the basic connectivity for being in
</p>
<p>
This also handles passing the "activate" signal back to the
- <span class="type">DbusmenuMenuitem</span> side of thing.
+ <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> side of thing.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
@@ -248,7 +248,7 @@ This function provides some of the basic connectivity for being in
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
-<td>The <span class="type">DbusmenuMenuitem</span> to attach the GTK-isms to
+<td>The <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> to attach the GTK-isms to
</td>
</tr>
<tr>
@@ -258,7 +258,7 @@ This function provides some of the basic connectivity for being in
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
-<td>The parent <span class="type">DbusmenuMenuitem</span>
+<td>The parent <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a>
</td>
</tr>
</tbody>
diff --git a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkMenu.html b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkMenu.html
index 740da74..3a17317 100644
--- a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkMenu.html
+++ b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkMenu.html
@@ -109,15 +109,15 @@
<pre class="programlisting"><span class="returnvalue">DbusmenuGtkMenu</span> * dbusmenu_gtkmenu_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_name</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dbus_object</code></em>);</pre>
<p>
-Creates a new <span class="type">DbusmenuGtkMenu</span> object and creates a <span class="type">DbusmenuClient</span>
- that connects across DBus to a <span class="type">DbusmenuServer</span>.
+Creates a new <span class="type">DbusmenuGtkMenu</span> object and creates a <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient"><span class="type">DbusmenuClient</span></a>
+ that connects across DBus to a <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuServer.html#DbusmenuServer"><span class="type">DbusmenuServer</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dbus_name</code></em> :</span></p></td>
-<td>Name of the <span class="type">DbusmenuServer</span> on DBus
+<td>Name of the <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuServer.html#DbusmenuServer"><span class="type">DbusmenuServer</span></a> on DBus
</td>
</tr>
<tr>
diff --git a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html
index c31d589..dba1652 100644
--- a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html
+++ b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html
@@ -38,11 +38,11 @@
<div class="refsynopsisdiv" title="Synopsis">
<a name="libdbusmenu-gtk-menuitem.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libdbusmenu-gtk-menuitem.html#dbusmenu-menuitem-property-set-image" title="dbusmenu_menuitem_property_set_image ()">dbusmenu_menuitem_property_set_image</a>
- (<em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *menuitem</code></em>,
+ (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *data</code></em>);
<a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="libdbusmenu-gtk-menuitem.html#dbusmenu-menuitem-property-get-image" title="dbusmenu_menuitem_property_get_image ()">dbusmenu_menuitem_property_get_image</a>
- (<em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *menuitem</code></em>,
+ (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>);
</pre>
</div>
@@ -56,20 +56,20 @@
<div class="refsect2" title="dbusmenu_menuitem_property_set_image ()">
<a name="dbusmenu-menuitem-property-set-image"></a><h3>dbusmenu_menuitem_property_set_image ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> dbusmenu_menuitem_property_set_image
- (<em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *menuitem</code></em>,
+ (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *data</code></em>);</pre>
<p>
This function takes the pixbuf that is stored in <em class="parameter"><code>data</code></em> and
turns it into a base64 encoded PNG so that it can be placed
- onto a standard <span class="type">DbusmenuMenuitem</span> property.
+ onto a standard <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> property.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menuitem</code></em> :</span></p></td>
-<td>The <span class="type">DbusmenuMenuitem</span> to set the property on.
+<td>The <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> to set the property on.
</td>
</tr>
<tr>
@@ -95,7 +95,7 @@ This function takes the pixbuf that is stored in <em class="parameter"><code>dat
<div class="refsect2" title="dbusmenu_menuitem_property_get_image ()">
<a name="dbusmenu-menuitem-property-get-image"></a><h3>dbusmenu_menuitem_property_get_image ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * dbusmenu_menuitem_property_get_image
- (<em class="parameter"><code><span class="type">DbusmenuMenuitem</span> *menuitem</code></em>,
+ (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property</code></em>);</pre>
<p>
This function looks on the menu item for a property by the
diff --git a/docs/libdbusmenu-gtk/reference/tmpl/client.sgml b/docs/libdbusmenu-gtk/reference/tmpl/client.sgml
index 6aedcc6..c848753 100644
--- a/docs/libdbusmenu-gtk/reference/tmpl/client.sgml
+++ b/docs/libdbusmenu-gtk/reference/tmpl/client.sgml
@@ -9,13 +9,11 @@ DbusmenuGtkClient
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-gtk/reference/tmpl/genericmenuitem.sgml b/docs/libdbusmenu-gtk/reference/tmpl/genericmenuitem.sgml
index 91b4673..0b8d98c 100644
--- a/docs/libdbusmenu-gtk/reference/tmpl/genericmenuitem.sgml
+++ b/docs/libdbusmenu-gtk/reference/tmpl/genericmenuitem.sgml
@@ -9,13 +9,11 @@ Genericmenuitem
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-gtk/reference/tmpl/menu.sgml b/docs/libdbusmenu-gtk/reference/tmpl/menu.sgml
index a493a08..a5ada47 100644
--- a/docs/libdbusmenu-gtk/reference/tmpl/menu.sgml
+++ b/docs/libdbusmenu-gtk/reference/tmpl/menu.sgml
@@ -9,13 +9,11 @@ DbusmenuGtkMenu
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml b/docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml
index 9325510..437df8d 100644
--- a/docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml
+++ b/docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml
@@ -9,13 +9,11 @@ menuitem
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/docs/libdbusmenu-gtk/reference/version.xml b/docs/libdbusmenu-gtk/reference/version.xml
index 1c09c74..c2c0004 100644
--- a/docs/libdbusmenu-gtk/reference/version.xml
+++ b/docs/libdbusmenu-gtk/reference/version.xml
@@ -1 +1 @@
-0.3.3
+0.3.5
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index fa233a4..871170a 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -561,6 +561,9 @@ build_proxies (DbusmenuClient * client)
static gint
parse_node_get_id (xmlNodePtr node)
{
+ if (node == NULL) {
+ return -1;
+ }
if (node->type != XML_ELEMENT_NODE) {
return -1;
}
@@ -886,6 +889,10 @@ parse_layout (DbusmenuClient * client, const gchar * layout)
xmlNodePtr root = xmlDocGetRootElement(xmldoc);
+ if (root == NULL) {
+ g_warning("Unable to get root node of menu XML");
+ }
+
DbusmenuMenuitem * oldroot = priv->root;
priv->root = parse_layout_xml(client, root, priv->root, NULL, priv->menuproxy);
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 0da66cc..13c2843 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -225,15 +225,22 @@ static void
set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec)
{
DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(obj);
+ GError * error = NULL;
switch (id) {
case PROP_DBUS_OBJECT:
g_return_if_fail(priv->dbusobject == NULL);
priv->dbusobject = g_value_dup_string(value);
- DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
- dbus_g_connection_register_g_object(connection,
- priv->dbusobject,
- obj);
+ DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+
+ if (connection == NULL || error != NULL) {
+ g_warning("Unable to get session bus: %s", error == NULL ? "No message" : error->message);
+ if (error != NULL) { g_error_free(error); }
+ } else {
+ dbus_g_connection_register_g_object(connection,
+ priv->dbusobject,
+ obj);
+ }
break;
case PROP_ROOT_NODE:
if (priv->root != NULL) {
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index c73c90f..b406697 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -148,7 +148,9 @@ do_swap_agroup (DbusmenuMenuitem * mi, gpointer userdata) {
return FALSE;
}
+ #ifdef MASSIVEDEBUGGING
g_debug("Setting shortcut on '%s': %d %X", dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_LABEL), key, modifiers);
+ #endif
GtkMenuItem * gmi = dbusmenu_gtkclient_menuitem_get(data->client, mi);
if (gmi == NULL) {
@@ -503,6 +505,7 @@ new_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint position, Dbus
#endif
if (dbusmenu_menuitem_get_root(mi)) { return; }
+ if (g_strcmp0(dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_TYPE), DBUSMENU_CLIENT_TYPES_SEPARATOR) == 0) { return; }
gpointer ann_menu = g_object_get_data(G_OBJECT(mi), data_menu);
GtkMenu * menu = GTK_MENU(ann_menu);
diff --git a/libdbusmenu-gtk/menuitem.c b/libdbusmenu-gtk/menuitem.c
index 9924546..5846aa7 100644
--- a/libdbusmenu-gtk/menuitem.c
+++ b/libdbusmenu-gtk/menuitem.c
@@ -264,9 +264,10 @@ dbusmenu_menuitem_property_set_shortcut_menuitem (DbusmenuMenuitem * menuitem, c
GtkAccelGroup * group = gtk_accel_group_from_accel_closure(closure);
- /* Seriously, if this returns NULL something is seriously
- wrong in GTK. */
- g_return_val_if_fail(group != NULL, FALSE);
+ /* Apparently this is more common than I thought. */
+ if (group == NULL) {
+ return FALSE;
+ }
GtkAccelKey * key = gtk_accel_group_find(group, find_closure, closure);
/* Again, not much we can do except complain loudly. */
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 66f286b..63857a2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,14 +1,17 @@
DBUS_RUNNER=dbus-test-runner
+CLEANFILES=
+
TESTS = \
test-glib-objects-test \
test-glib-layout \
test-glib-properties \
test-glib-proxy \
test-glib-simple-items \
- test-gtk-objects-test \
test-glib-submenu \
+ test-json \
+ test-gtk-objects-test \
test-gtk-label \
test-gtk-shortcut \
test-gtk-reorder
@@ -31,11 +34,50 @@ check_PROGRAMS = \
test-gtk-shortcut-client \
test-gtk-shortcut-server \
test-glib-simple-items \
- test-gtk-reorder-server
+ test-gtk-reorder-server \
+ test-json-client \
+ test-json-server
XVFB_RUN=". $(srcdir)/run-xvfb.sh"
######################
+# JSON Loader lib
+######################
+
+lib_LTLIBRARIES = libdbusmenu-jsonloader.la
+
+libdbusmenu_jsonloaderincludedir=$(includedir)/libdbusmenu-0.1/libdbusmenu-jsonloader/
+
+libdbusmenu_jsonloaderinclude_HEADERS = \
+ json-loader.h
+
+libdbusmenu_jsonloader_la_SOURCES = \
+ json-loader.h \
+ json-loader.c
+
+libdbusmenu_jsonloader_la_LDFLAGS = \
+ -version-info $(LIBDBUSMENU_CURRENT):$(LIBDBUSMENU_REVISION):$(LIBDBUSMENU_AGE) \
+ -no-undefined \
+ -export-symbols-regex "^[^_].*"
+
+libdbusmenu_jsonloader_la_CFLAGS = \
+ $(DBUSMENUGLIB_CFLAGS) \
+ $(DBUSMENUTESTS_CFLAGS) \
+ -I $(srcdir)/.. \
+ -Wall \
+ -Werror \
+ -DG_DISABLE_DEPRECATED \
+ -DG_LOG_DOMAIN="\"LIBDBUSMENU-JSONLOADER\""
+
+libdbusmenu_jsonloader_la_LIBADD = \
+ ../libdbusmenu-glib/libdbusmenu-glib.la \
+ $(DBUSMENUGLIB_LIBS) \
+ $(DBUSMENUTESTS_LIBS)
+
+pkgconfig_DATA = dbusmenu-jsonloader.pc
+pkgconfigdir = $(libdir)/pkgconfig
+
+######################
# Test GLib server
######################
@@ -84,6 +126,47 @@ test_glib_layout_client_LDADD = \
$(DBUSMENUGLIB_LIBS)
######################
+# Test JSON
+######################
+
+test-json: test-json-client test-json-server Makefile.am
+ @echo "#!/bin/bash" > $@
+ @echo $(XVFB_RUN) >> $@
+ @echo $(DBUS_RUNNER) --task ./test-json-client --task-name Client --parameter $(top_builddir)/tools/dbusmenu-dumper --parameter test-json-01.output.json --ignore-return --task ./test-json-server --task-name Server --parameter $(srcdir)/test-json-01.json --ignore-return >> $@
+ @echo diff $(srcdir)/test-json-01.json test-json-01.output.json \> /dev/null >> $@
+ @chmod +x $@
+
+CLEANFILES += test-json-01.output.json
+
+test_json_server_SOURCES = \
+ test-json-server.c
+
+test_json_server_CFLAGS = \
+ -I $(srcdir)/.. \
+ -I $(srcdir) \
+ $(DBUSMENUGLIB_CFLAGS) \
+ $(DBUSMENUTESTS_CFLAGS) \
+ -Wall -Werror
+
+test_json_server_LDADD = \
+ ../libdbusmenu-glib/libdbusmenu-glib.la \
+ libdbusmenu-jsonloader.la \
+ $(DBUSMENUTESTS_LIBS) \
+ $(DBUSMENUGLIB_LIBS)
+
+test_json_client_SOURCES = \
+ test-json-client.c
+
+test_json_client_CFLAGS = \
+ -I $(srcdir)/.. \
+ $(DBUSMENUGLIB_CFLAGS) -Wall -Werror
+
+test_json_client_LDADD = \
+ ../libdbusmenu-glib/libdbusmenu-glib.la \
+ $(DBUSMENUTESTS_LIBS) \
+ $(DBUSMENUGLIB_LIBS)
+
+######################
# Test Glib Submenu
######################
@@ -286,6 +369,7 @@ test_gtk_label_server_CFLAGS = \
test_gtk_label_server_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ libdbusmenu-jsonloader.la \
$(DBUSMENUGTK_LIBS) \
$(DBUSMENUTESTS_LIBS)
@@ -421,9 +505,10 @@ EXTRA_DIST = \
dbusmenu-gtk/mago_tests/data/several_submenus_recursive.json \
dbusmenu-gtk/mago_tests/data/several_submenus_utf8.json \
dbusmenu-gtk/mago_tests/data/static.json \
- dbusmenu-gtk/mago_tests/data/test-gtk-label.json
+ dbusmenu-gtk/mago_tests/data/test-gtk-label.json \
+ test-json-01.json
-CLEANFILES = \
+CLEANFILES += \
dbusmenu-gtk/mago_tests/dbusmenu.pyc
distclean-local:
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 9fb9bc6..1f4806d 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -15,6 +15,8 @@
@SET_MAKE@
+
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -36,8 +38,8 @@ build_triplet = @build@
host_triplet = @host@
TESTS = test-glib-objects-test test-glib-layout test-glib-properties \
test-glib-proxy test-glib-simple-items$(EXEEXT) \
- test-gtk-objects-test test-glib-submenu test-gtk-label \
- test-gtk-shortcut test-gtk-reorder
+ test-glib-submenu test-json test-gtk-objects-test \
+ test-gtk-label test-gtk-shortcut test-gtk-reorder
check_PROGRAMS = glib-server-nomenu$(EXEEXT) \
test-glib-objects$(EXEEXT) test-glib-layout-client$(EXEEXT) \
test-glib-layout-server$(EXEEXT) \
@@ -51,26 +53,65 @@ check_PROGRAMS = glib-server-nomenu$(EXEEXT) \
test-gtk-shortcut-client$(EXEEXT) \
test-gtk-shortcut-server$(EXEEXT) \
test-glib-simple-items$(EXEEXT) \
- test-gtk-reorder-server$(EXEEXT)
+ test-gtk-reorder-server$(EXEEXT) test-json-client$(EXEEXT) \
+ test-json-server$(EXEEXT)
subdir = tests
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(libdbusmenu_jsonloaderinclude_HEADERS) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/dbusmenu-jsonloader.pc.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = dbusmenu-jsonloader.pc
CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(examplesdir)" \
+ "$(DESTDIR)$(jsondir)" "$(DESTDIR)$(pkgconfigdir)" \
+ "$(DESTDIR)$(libdbusmenu_jsonloaderincludedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libdbusmenu_jsonloader_la_DEPENDENCIES = \
+ ../libdbusmenu-glib/libdbusmenu-glib.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_libdbusmenu_jsonloader_la_OBJECTS = \
+ libdbusmenu_jsonloader_la-json-loader.lo
+libdbusmenu_jsonloader_la_OBJECTS = \
+ $(am_libdbusmenu_jsonloader_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libdbusmenu_jsonloader_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(libdbusmenu_jsonloader_la_CFLAGS) $(CFLAGS) \
+ $(libdbusmenu_jsonloader_la_LDFLAGS) $(LDFLAGS) -o $@
am_glib_server_nomenu_OBJECTS = \
glib_server_nomenu-glib-server-nomenu.$(OBJEXT)
glib_server_nomenu_OBJECTS = $(am_glib_server_nomenu_OBJECTS)
-am__DEPENDENCIES_1 =
glib_server_nomenu_DEPENDENCIES = \
../libdbusmenu-glib/libdbusmenu-glib.la $(am__DEPENDENCIES_1)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
-am__v_lt_0 = --silent
glib_server_nomenu_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(glib_server_nomenu_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
@@ -194,7 +235,8 @@ am_test_gtk_label_server_OBJECTS = \
test_gtk_label_server_OBJECTS = $(am_test_gtk_label_server_OBJECTS)
test_gtk_label_server_DEPENDENCIES = \
../libdbusmenu-glib/libdbusmenu-glib.la \
- ../libdbusmenu-gtk/libdbusmenu-gtk.la $(am__DEPENDENCIES_1) \
+ ../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ libdbusmenu-jsonloader.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
test_gtk_label_server_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -247,6 +289,27 @@ test_gtk_shortcut_server_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(test_gtk_shortcut_server_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
+am_test_json_client_OBJECTS = \
+ test_json_client-test-json-client.$(OBJEXT)
+test_json_client_OBJECTS = $(am_test_json_client_OBJECTS)
+test_json_client_DEPENDENCIES = \
+ ../libdbusmenu-glib/libdbusmenu-glib.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+test_json_client_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(test_json_client_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+am_test_json_server_OBJECTS = \
+ test_json_server-test-json-server.$(OBJEXT)
+test_json_server_OBJECTS = $(am_test_json_server_OBJECTS)
+test_json_server_DEPENDENCIES = \
+ ../libdbusmenu-glib/libdbusmenu-glib.la \
+ libdbusmenu-jsonloader.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+test_json_server_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(test_json_server_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -273,7 +336,8 @@ am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(glib_server_nomenu_SOURCES) \
+SOURCES = $(libdbusmenu_jsonloader_la_SOURCES) \
+ $(glib_server_nomenu_SOURCES) \
$(test_glib_layout_client_SOURCES) \
$(test_glib_layout_server_SOURCES) \
$(test_glib_objects_SOURCES) \
@@ -289,8 +353,10 @@ SOURCES = $(glib_server_nomenu_SOURCES) \
$(test_gtk_label_server_SOURCES) $(test_gtk_objects_SOURCES) \
$(test_gtk_reorder_server_SOURCES) \
$(test_gtk_shortcut_client_SOURCES) \
- $(test_gtk_shortcut_server_SOURCES)
-DIST_SOURCES = $(glib_server_nomenu_SOURCES) \
+ $(test_gtk_shortcut_server_SOURCES) \
+ $(test_json_client_SOURCES) $(test_json_server_SOURCES)
+DIST_SOURCES = $(libdbusmenu_jsonloader_la_SOURCES) \
+ $(glib_server_nomenu_SOURCES) \
$(test_glib_layout_client_SOURCES) \
$(test_glib_layout_server_SOURCES) \
$(test_glib_objects_SOURCES) \
@@ -306,30 +372,10 @@ DIST_SOURCES = $(glib_server_nomenu_SOURCES) \
$(test_gtk_label_server_SOURCES) $(test_gtk_objects_SOURCES) \
$(test_gtk_reorder_server_SOURCES) \
$(test_gtk_shortcut_client_SOURCES) \
- $(test_gtk_shortcut_server_SOURCES)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(jsondir)"
-DATA = $(examples_DATA) $(json_DATA)
+ $(test_gtk_shortcut_server_SOURCES) \
+ $(test_json_client_SOURCES) $(test_json_server_SOURCES)
+DATA = $(examples_DATA) $(json_DATA) $(pkgconfig_DATA)
+HEADERS = $(libdbusmenu_jsonloaderinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
am__tty_colors = \
@@ -499,9 +545,45 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
DBUS_RUNNER = dbus-test-runner
+CLEANFILES = test-json-01.output.json \
+ dbusmenu-gtk/mago_tests/dbusmenu.pyc
XVFB_RUN = ". $(srcdir)/run-xvfb.sh"
######################
+# JSON Loader lib
+######################
+lib_LTLIBRARIES = libdbusmenu-jsonloader.la
+libdbusmenu_jsonloaderincludedir = $(includedir)/libdbusmenu-0.1/libdbusmenu-jsonloader/
+libdbusmenu_jsonloaderinclude_HEADERS = \
+ json-loader.h
+
+libdbusmenu_jsonloader_la_SOURCES = \
+ json-loader.h \
+ json-loader.c
+
+libdbusmenu_jsonloader_la_LDFLAGS = \
+ -version-info $(LIBDBUSMENU_CURRENT):$(LIBDBUSMENU_REVISION):$(LIBDBUSMENU_AGE) \
+ -no-undefined \
+ -export-symbols-regex "^[^_].*"
+
+libdbusmenu_jsonloader_la_CFLAGS = \
+ $(DBUSMENUGLIB_CFLAGS) \
+ $(DBUSMENUTESTS_CFLAGS) \
+ -I $(srcdir)/.. \
+ -Wall \
+ -Werror \
+ -DG_DISABLE_DEPRECATED \
+ -DG_LOG_DOMAIN="\"LIBDBUSMENU-JSONLOADER\""
+
+libdbusmenu_jsonloader_la_LIBADD = \
+ ../libdbusmenu-glib/libdbusmenu-glib.la \
+ $(DBUSMENUGLIB_LIBS) \
+ $(DBUSMENUTESTS_LIBS)
+
+pkgconfig_DATA = dbusmenu-jsonloader.pc
+pkgconfigdir = $(libdir)/pkgconfig
+
+######################
# Test GLib server
######################
glib_server_nomenu_SOURCES = \
@@ -539,6 +621,34 @@ test_glib_layout_client_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
$(DBUSMENUGLIB_LIBS)
+test_json_server_SOURCES = \
+ test-json-server.c
+
+test_json_server_CFLAGS = \
+ -I $(srcdir)/.. \
+ -I $(srcdir) \
+ $(DBUSMENUGLIB_CFLAGS) \
+ $(DBUSMENUTESTS_CFLAGS) \
+ -Wall -Werror
+
+test_json_server_LDADD = \
+ ../libdbusmenu-glib/libdbusmenu-glib.la \
+ libdbusmenu-jsonloader.la \
+ $(DBUSMENUTESTS_LIBS) \
+ $(DBUSMENUGLIB_LIBS)
+
+test_json_client_SOURCES = \
+ test-json-client.c
+
+test_json_client_CFLAGS = \
+ -I $(srcdir)/.. \
+ $(DBUSMENUGLIB_CFLAGS) -Wall -Werror
+
+test_json_client_LDADD = \
+ ../libdbusmenu-glib/libdbusmenu-glib.la \
+ $(DBUSMENUTESTS_LIBS) \
+ $(DBUSMENUGLIB_LIBS)
+
test_glib_submenu_server_SOURCES = \
test-glib-submenu.h \
test-glib-submenu-server.c
@@ -687,6 +797,7 @@ test_gtk_label_server_CFLAGS = \
test_gtk_label_server_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ libdbusmenu-jsonloader.la \
$(DBUSMENUGTK_LIBS) \
$(DBUSMENUTESTS_LIBS)
@@ -785,10 +896,8 @@ EXTRA_DIST = \
dbusmenu-gtk/mago_tests/data/several_submenus_recursive.json \
dbusmenu-gtk/mago_tests/data/several_submenus_utf8.json \
dbusmenu-gtk/mago_tests/data/static.json \
- dbusmenu-gtk/mago_tests/data/test-gtk-label.json
-
-CLEANFILES = \
- dbusmenu-gtk/mago_tests/dbusmenu.pyc
+ dbusmenu-gtk/mago_tests/data/test-gtk-label.json \
+ test-json-01.json
DISTCLEANFILES = \
$(TESTS) \
@@ -829,6 +938,41 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+dbusmenu-jsonloader.pc: $(top_builddir)/config.status $(srcdir)/dbusmenu-jsonloader.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libdbusmenu-jsonloader.la: $(libdbusmenu_jsonloader_la_OBJECTS) $(libdbusmenu_jsonloader_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libdbusmenu_jsonloader_la_LINK) -rpath $(libdir) $(libdbusmenu_jsonloader_la_OBJECTS) $(libdbusmenu_jsonloader_la_LIBADD) $(LIBS)
clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
@@ -892,6 +1036,12 @@ test-gtk-shortcut-client$(EXEEXT): $(test_gtk_shortcut_client_OBJECTS) $(test_gt
test-gtk-shortcut-server$(EXEEXT): $(test_gtk_shortcut_server_OBJECTS) $(test_gtk_shortcut_server_DEPENDENCIES)
@rm -f test-gtk-shortcut-server$(EXEEXT)
$(AM_V_CCLD)$(test_gtk_shortcut_server_LINK) $(test_gtk_shortcut_server_OBJECTS) $(test_gtk_shortcut_server_LDADD) $(LIBS)
+test-json-client$(EXEEXT): $(test_json_client_OBJECTS) $(test_json_client_DEPENDENCIES)
+ @rm -f test-json-client$(EXEEXT)
+ $(AM_V_CCLD)$(test_json_client_LINK) $(test_json_client_OBJECTS) $(test_json_client_LDADD) $(LIBS)
+test-json-server$(EXEEXT): $(test_json_server_OBJECTS) $(test_json_server_DEPENDENCIES)
+ @rm -f test-json-server$(EXEEXT)
+ $(AM_V_CCLD)$(test_json_server_LINK) $(test_json_server_OBJECTS) $(test_json_server_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -900,6 +1050,7 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glib_server_nomenu-glib-server-nomenu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_jsonloader_la-json-loader.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib_layout_client-test-glib-layout-client.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib_layout_server-test-glib-layout-server.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib_objects-test-glib-objects.Po@am__quote@
@@ -917,6 +1068,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gtk_reorder_server-test-gtk-reorder-server.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gtk_shortcut_client-test-gtk-shortcut-client.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gtk_shortcut_server-test-gtk-shortcut-server.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_json_client-test-json-client.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_json_server-test-json-server.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -942,6 +1095,14 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+libdbusmenu_jsonloader_la-json-loader.lo: json-loader.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_jsonloader_la_CFLAGS) $(CFLAGS) -MT libdbusmenu_jsonloader_la-json-loader.lo -MD -MP -MF $(DEPDIR)/libdbusmenu_jsonloader_la-json-loader.Tpo -c -o libdbusmenu_jsonloader_la-json-loader.lo `test -f 'json-loader.c' || echo '$(srcdir)/'`json-loader.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbusmenu_jsonloader_la-json-loader.Tpo $(DEPDIR)/libdbusmenu_jsonloader_la-json-loader.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='json-loader.c' object='libdbusmenu_jsonloader_la-json-loader.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_jsonloader_la_CFLAGS) $(CFLAGS) -c -o libdbusmenu_jsonloader_la-json-loader.lo `test -f 'json-loader.c' || echo '$(srcdir)/'`json-loader.c
+
glib_server_nomenu-glib-server-nomenu.o: glib-server-nomenu.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(glib_server_nomenu_CFLAGS) $(CFLAGS) -MT glib_server_nomenu-glib-server-nomenu.o -MD -MP -MF $(DEPDIR)/glib_server_nomenu-glib-server-nomenu.Tpo -c -o glib_server_nomenu-glib-server-nomenu.o `test -f 'glib-server-nomenu.c' || echo '$(srcdir)/'`glib-server-nomenu.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/glib_server_nomenu-glib-server-nomenu.Tpo $(DEPDIR)/glib_server_nomenu-glib-server-nomenu.Po
@@ -1230,6 +1391,38 @@ test_gtk_shortcut_server-test-gtk-shortcut-server.obj: test-gtk-shortcut-server.
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gtk_shortcut_server_CFLAGS) $(CFLAGS) -c -o test_gtk_shortcut_server-test-gtk-shortcut-server.obj `if test -f 'test-gtk-shortcut-server.c'; then $(CYGPATH_W) 'test-gtk-shortcut-server.c'; else $(CYGPATH_W) '$(srcdir)/test-gtk-shortcut-server.c'; fi`
+test_json_client-test-json-client.o: test-json-client.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_json_client_CFLAGS) $(CFLAGS) -MT test_json_client-test-json-client.o -MD -MP -MF $(DEPDIR)/test_json_client-test-json-client.Tpo -c -o test_json_client-test-json-client.o `test -f 'test-json-client.c' || echo '$(srcdir)/'`test-json-client.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_json_client-test-json-client.Tpo $(DEPDIR)/test_json_client-test-json-client.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-json-client.c' object='test_json_client-test-json-client.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_json_client_CFLAGS) $(CFLAGS) -c -o test_json_client-test-json-client.o `test -f 'test-json-client.c' || echo '$(srcdir)/'`test-json-client.c
+
+test_json_client-test-json-client.obj: test-json-client.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_json_client_CFLAGS) $(CFLAGS) -MT test_json_client-test-json-client.obj -MD -MP -MF $(DEPDIR)/test_json_client-test-json-client.Tpo -c -o test_json_client-test-json-client.obj `if test -f 'test-json-client.c'; then $(CYGPATH_W) 'test-json-client.c'; else $(CYGPATH_W) '$(srcdir)/test-json-client.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_json_client-test-json-client.Tpo $(DEPDIR)/test_json_client-test-json-client.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-json-client.c' object='test_json_client-test-json-client.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_json_client_CFLAGS) $(CFLAGS) -c -o test_json_client-test-json-client.obj `if test -f 'test-json-client.c'; then $(CYGPATH_W) 'test-json-client.c'; else $(CYGPATH_W) '$(srcdir)/test-json-client.c'; fi`
+
+test_json_server-test-json-server.o: test-json-server.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_json_server_CFLAGS) $(CFLAGS) -MT test_json_server-test-json-server.o -MD -MP -MF $(DEPDIR)/test_json_server-test-json-server.Tpo -c -o test_json_server-test-json-server.o `test -f 'test-json-server.c' || echo '$(srcdir)/'`test-json-server.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_json_server-test-json-server.Tpo $(DEPDIR)/test_json_server-test-json-server.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-json-server.c' object='test_json_server-test-json-server.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_json_server_CFLAGS) $(CFLAGS) -c -o test_json_server-test-json-server.o `test -f 'test-json-server.c' || echo '$(srcdir)/'`test-json-server.c
+
+test_json_server-test-json-server.obj: test-json-server.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_json_server_CFLAGS) $(CFLAGS) -MT test_json_server-test-json-server.obj -MD -MP -MF $(DEPDIR)/test_json_server-test-json-server.Tpo -c -o test_json_server-test-json-server.obj `if test -f 'test-json-server.c'; then $(CYGPATH_W) 'test-json-server.c'; else $(CYGPATH_W) '$(srcdir)/test-json-server.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_json_server-test-json-server.Tpo $(DEPDIR)/test_json_server-test-json-server.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-json-server.c' object='test_json_server-test-json-server.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_json_server_CFLAGS) $(CFLAGS) -c -o test_json_server-test-json-server.obj `if test -f 'test-json-server.c'; then $(CYGPATH_W) 'test-json-server.c'; else $(CYGPATH_W) '$(srcdir)/test-json-server.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -1275,6 +1468,46 @@ uninstall-jsonDATA:
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(jsondir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(jsondir)" && rm -f $$files
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+install-libdbusmenu_jsonloaderincludeHEADERS: $(libdbusmenu_jsonloaderinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdbusmenu_jsonloaderincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libdbusmenu_jsonloaderincludedir)"
+ @list='$(libdbusmenu_jsonloaderinclude_HEADERS)'; test -n "$(libdbusmenu_jsonloaderincludedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libdbusmenu_jsonloaderincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libdbusmenu_jsonloaderincludedir)" || exit $$?; \
+ done
+
+uninstall-libdbusmenu_jsonloaderincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libdbusmenu_jsonloaderinclude_HEADERS)'; test -n "$(libdbusmenu_jsonloaderincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libdbusmenu_jsonloaderincludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libdbusmenu_jsonloaderincludedir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -1454,9 +1687,9 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
-all-am: Makefile $(DATA)
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
installdirs:
- for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(jsondir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(jsondir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libdbusmenu_jsonloaderincludedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -1488,8 +1721,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
- mostlyclean-am
+clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
+ clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -1509,13 +1742,15 @@ info: info-am
info-am:
-install-data-am: install-examplesDATA install-jsonDATA
+install-data-am: install-examplesDATA install-jsonDATA \
+ install-libdbusmenu_jsonloaderincludeHEADERS \
+ install-pkgconfigDATA
install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am:
+install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
@@ -1555,24 +1790,32 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-examplesDATA uninstall-jsonDATA
+uninstall-am: uninstall-examplesDATA uninstall-jsonDATA \
+ uninstall-libLTLIBRARIES \
+ uninstall-libdbusmenu_jsonloaderincludeHEADERS \
+ uninstall-pkgconfigDATA
.MAKE: check-am install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
- clean-checkPROGRAMS clean-generic clean-libtool ctags \
- distclean distclean-compile distclean-generic \
- distclean-libtool distclean-local distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-examplesDATA install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-jsonDATA \
- install-man install-pdf install-pdf-am install-ps \
+ clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
+ clean-libtool ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-local \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-examplesDATA install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-jsonDATA install-libLTLIBRARIES \
+ install-libdbusmenu_jsonloaderincludeHEADERS install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-examplesDATA uninstall-jsonDATA
+ uninstall-am uninstall-examplesDATA uninstall-jsonDATA \
+ uninstall-libLTLIBRARIES \
+ uninstall-libdbusmenu_jsonloaderincludeHEADERS \
+ uninstall-pkgconfigDATA
######################
@@ -1585,6 +1828,17 @@ test-glib-layout: test-glib-layout-client test-glib-layout-server Makefile.am
@chmod +x $@
######################
+# Test JSON
+######################
+
+test-json: test-json-client test-json-server Makefile.am
+ @echo "#!/bin/bash" > $@
+ @echo $(XVFB_RUN) >> $@
+ @echo $(DBUS_RUNNER) --task ./test-json-client --task-name Client --parameter $(top_builddir)/tools/dbusmenu-dumper --parameter test-json-01.output.json --ignore-return --task ./test-json-server --task-name Server --parameter $(srcdir)/test-json-01.json --ignore-return >> $@
+ @echo diff $(srcdir)/test-json-01.json test-json-01.output.json \> /dev/null >> $@
+ @chmod +x $@
+
+######################
# Test Glib Submenu
######################
diff --git a/tests/dbusmenu-jsonloader.pc.in b/tests/dbusmenu-jsonloader.pc.in
new file mode 100644
index 0000000..d042132
--- /dev/null
+++ b/tests/dbusmenu-jsonloader.pc.in
@@ -0,0 +1,14 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+bindir=@bindir@
+includedir=@includedir@
+
+Cflags: -I${includedir}/libdbusmenu-0.1
+Requires: dbus-glib-1,dbusmenu-glib,json-glib-1.0
+Libs: -L${libdir} -ldbusmenu-jsonloader
+
+Name: libdbusmenu-jsonloader
+Description: A small library to load JSON descriptions of menus. Mostly for testing.
+Version: @VERSION@
+
diff --git a/tests/json-loader.c b/tests/json-loader.c
new file mode 100644
index 0000000..aad4295
--- /dev/null
+++ b/tests/json-loader.c
@@ -0,0 +1,220 @@
+/*
+A loader to turn JSON into dbusmenu menuitems
+
+Copyright 2010 Canonical Ltd.
+
+Authors:
+ Ted Gould <ted@canonical.com>
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 3, as published
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranties of
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "json-loader.h"
+#include <dbus/dbus-gtype-specialized.h>
+
+static GValue *
+node2value (JsonNode * node)
+{
+ if (node == NULL) {
+ return NULL;
+ }
+
+ GValue * value = g_new0(GValue, 1);
+
+ if (JSON_NODE_TYPE(node) == JSON_NODE_VALUE) {
+ json_node_get_value(node, value);
+ return value;
+ }
+
+ if (JSON_NODE_TYPE(node) == JSON_NODE_ARRAY) {
+ JsonArray * array = json_node_get_array(node);
+ JsonNode * first = json_array_get_element(array, 0);
+
+ if (JSON_NODE_TYPE(first) == JSON_NODE_VALUE) {
+ GValue subvalue = {0};
+ json_node_get_value(first, &subvalue);
+
+ if (G_VALUE_TYPE(&subvalue) == G_TYPE_STRING) {
+ GArray * garray = g_array_sized_new(TRUE, TRUE, sizeof(gchar *), json_array_get_length(array));
+ g_value_init(value, G_TYPE_STRV);
+ g_value_take_boxed(value, garray->data);
+
+ int i;
+ for (i = 0; i < json_array_get_length(array); i++) {
+ const gchar * str = json_node_get_string(json_array_get_element(array, i));
+ gchar * dupstr = g_strdup(str);
+ g_array_append_val(garray, dupstr);
+ }
+
+ g_array_free(garray, FALSE);
+ } else {
+ GValueArray * varray = g_value_array_new(json_array_get_length(array));
+ g_value_init(value, G_TYPE_VALUE_ARRAY);
+ g_value_take_boxed(value, varray);
+
+ g_value_array_append(varray, &subvalue);
+ g_value_unset(&subvalue);
+
+ int i;
+ for (i = 1; i < json_array_get_length(array); i++) {
+ json_node_get_value(first, &subvalue);
+ g_value_array_append(varray, &subvalue);
+ g_value_unset(&subvalue);
+ }
+ }
+
+ } else {
+ GValue * subvalue = node2value(first);
+ GType type = dbus_g_type_get_collection("GPtrArray", G_VALUE_TYPE(subvalue));
+ gpointer * wrapper = dbus_g_type_specialized_construct(type);
+
+ g_value_init(value, type);
+ g_value_take_boxed(value, wrapper);
+
+ DBusGTypeSpecializedAppendContext ctx;
+ dbus_g_type_specialized_init_append(value, &ctx);
+
+ dbus_g_type_specialized_collection_append(&ctx, subvalue);
+ int i;
+ for (i = 1; i < json_array_get_length(array); i++) {
+ GValue * subvalue = node2value(node);
+ dbus_g_type_specialized_collection_append(&ctx, subvalue);
+ }
+
+ dbus_g_type_specialized_collection_end_append(&ctx);
+ }
+ }
+
+ if (JSON_NODE_TYPE(node) == JSON_NODE_OBJECT) {
+ JsonObject * obj = json_node_get_object(node);
+
+ GType type = dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE);
+ GHashTable * hash = (GHashTable *)dbus_g_type_specialized_construct(type);
+
+ g_value_init(value, type);
+ g_value_take_boxed(value, hash);
+
+ DBusGTypeSpecializedAppendContext ctx;
+ dbus_g_type_specialized_init_append(value, &ctx);
+
+ GList * members = NULL;
+ for (members = json_object_get_members(obj); members != NULL; members = g_list_next(members)) {
+ const gchar * member = members->data;
+
+ JsonNode * lnode = json_object_get_member(obj, member);
+ GValue * value = node2value(lnode);
+
+ if (value != NULL) {
+ GValue name = {0};
+ g_value_init(&name, G_TYPE_STRING);
+ g_value_set_static_string(&name, member);
+
+ dbus_g_type_specialized_map_append(&ctx, &name, value);
+
+ g_value_unset(&name);
+ g_value_unset(value);
+ g_free(value);
+ }
+ }
+ }
+
+ return value;
+}
+
+static void
+set_props (DbusmenuMenuitem * mi, JsonObject * node)
+{
+ if (node == NULL) return;
+
+ GList * members = NULL;
+ for (members = json_object_get_members(node); members != NULL; members = g_list_next(members)) {
+ const gchar * member = members->data;
+
+ if (!g_strcmp0(member, "id")) { continue; }
+ if (!g_strcmp0(member, "submenu")) { continue; }
+
+ JsonNode * lnode = json_object_get_member(node, member);
+ GValue * value = node2value(lnode);
+
+ if (value != NULL) {
+ dbusmenu_menuitem_property_set_value(mi, member, value);
+ g_value_unset(value);
+ g_free(value);
+ }
+ }
+
+ return;
+}
+
+DbusmenuMenuitem *
+dbusmenu_json_build_from_node (const JsonNode * cnode)
+{
+ JsonNode * node = (JsonNode *)cnode; /* To match the jsonglib API :( */
+
+ if (node == NULL) return NULL;
+ if (JSON_NODE_TYPE(node) != JSON_NODE_OBJECT) return NULL;
+
+ JsonObject * layout = json_node_get_object(node);
+
+ DbusmenuMenuitem * local = NULL;
+ if (json_object_has_member(layout, "id")) {
+ JsonNode * node = json_object_get_member(layout, "id");
+ g_return_val_if_fail(JSON_NODE_TYPE(node) == JSON_NODE_VALUE, NULL);
+ local = dbusmenu_menuitem_new_with_id(json_node_get_int(node));
+ } else {
+ local = dbusmenu_menuitem_new();
+ }
+
+ set_props(local, layout);
+
+ if (json_object_has_member(layout, "submenu")) {
+ JsonNode * node = json_object_get_member(layout, "submenu");
+ g_return_val_if_fail(JSON_NODE_TYPE(node) == JSON_NODE_ARRAY, local);
+ JsonArray * array = json_node_get_array(node);
+ guint count;
+ for (count = 0; count < json_array_get_length(array); count++) {
+ DbusmenuMenuitem * child = dbusmenu_json_build_from_node(json_array_get_element(array, count));
+ if (child != NULL) {
+ dbusmenu_menuitem_child_append(local, child);
+ }
+ }
+ }
+
+ /* g_debug("Layout to menu return: 0x%X", (unsigned int)local); */
+ return local;
+}
+
+DbusmenuMenuitem *
+dbusmenu_json_build_from_file (const gchar * filename)
+{
+ JsonParser * parser = json_parser_new();
+
+ GError * error = NULL;
+ if (!json_parser_load_from_file(parser, filename, &error)) {
+ g_warning("Failed parsing file %s because: %s", filename, error->message);
+ g_error_free(error);
+ return NULL;
+ }
+
+ JsonNode * root_node = json_parser_get_root(parser);
+ if (JSON_NODE_TYPE(root_node) != JSON_NODE_OBJECT) {
+ g_warning("Root node is not an object, fail. It's an: %s", json_node_type_name(root_node));
+ return NULL;
+ }
+
+ DbusmenuMenuitem * mi = dbusmenu_json_build_from_node(root_node);
+
+ g_object_unref(parser);
+
+ return mi;
+}
diff --git a/tests/json-loader.h b/tests/json-loader.h
new file mode 100644
index 0000000..666bb6e
--- /dev/null
+++ b/tests/json-loader.h
@@ -0,0 +1,31 @@
+/*
+A loader to turn JSON into dbusmenu menuitems
+
+Copyright 2010 Canonical Ltd.
+
+Authors:
+ Ted Gould <ted@canonical.com>
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 3, as published
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranties of
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __DBUSMENU_JSON_LOADER_H__
+#define __DBUSMENU_JSON_LOADER_H__
+
+#include <libdbusmenu-glib/menuitem.h>
+#include <json-glib/json-glib.h>
+
+DbusmenuMenuitem * dbusmenu_json_build_from_node (const JsonNode * node);
+DbusmenuMenuitem * dbusmenu_json_build_from_file (const gchar * filename);
+
+#endif /* __DBUSMENU_JSON_LOADER_H__ */
diff --git a/tests/test-gtk-label-server.c b/tests/test-gtk-label-server.c
index 32d7a43..32572fc 100644
--- a/tests/test-gtk-label-server.c
+++ b/tests/test-gtk-label-server.c
@@ -30,74 +30,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libdbusmenu-glib/server.h>
#include <json-glib/json-glib.h>
-
-static void
-menuitem_click(DbusmenuMenuitem * mi, guint32 time, gpointer user_data)
-{
- g_debug("Clicked on: %d @ %d", dbusmenu_menuitem_get_id(mi), time);
- return;
-}
-
-static void
-set_props (DbusmenuMenuitem * mi, JsonObject * node)
-{
- if (node == NULL) return;
-
- GList * members = NULL;
- for (members = json_object_get_members(node); members != NULL; members = g_list_next(members)) {
- const gchar * member = members->data;
-
- if (!g_strcmp0(member, "id")) { continue; }
- if (!g_strcmp0(member, "submenu")) { continue; }
-
- JsonNode * lnode = json_object_get_member(node, member);
- if (JSON_NODE_TYPE(lnode) != JSON_NODE_VALUE) { continue; }
-
- GValue value = {0};
- json_node_get_value(lnode, &value);
- dbusmenu_menuitem_property_set_value(mi, member, &value);
- g_value_unset(&value);
- }
-
- return;
-}
-
-static DbusmenuMenuitem *
-layout2menuitem (JsonNode * inlayout)
-{
- if (inlayout == NULL) return NULL;
- if (JSON_NODE_TYPE(inlayout) != JSON_NODE_OBJECT) return NULL;
-
- JsonObject * layout = json_node_get_object(inlayout);
-
- DbusmenuMenuitem * local = NULL;
- if (json_object_has_member(layout, "id")) {
- JsonNode * node = json_object_get_member(layout, "id");
- g_return_val_if_fail(JSON_NODE_TYPE(node) == JSON_NODE_VALUE, NULL);
- local = dbusmenu_menuitem_new_with_id(json_node_get_int(node));
- } else {
- local = dbusmenu_menuitem_new();
- }
- g_signal_connect(G_OBJECT(local), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(menuitem_click), NULL);
-
- set_props(local, layout);
-
- if (json_object_has_member(layout, "submenu")) {
- JsonNode * node = json_object_get_member(layout, "submenu");
- g_return_val_if_fail(JSON_NODE_TYPE(node) == JSON_NODE_ARRAY, local);
- JsonArray * array = json_node_get_array(node);
- guint count;
- for (count = 0; count < json_array_get_length(array); count++) {
- DbusmenuMenuitem * child = layout2menuitem(json_array_get_element(array, count));
- if (child != NULL) {
- dbusmenu_menuitem_child_append(local, child);
- }
- }
- }
-
- /* g_debug("Layout to menu return: 0x%X", (unsigned int)local); */
- return local;
-}
+#include "json-loader.h"
static JsonArray * root_array = NULL;
static guint layouton = 0;
@@ -114,7 +47,7 @@ timer_func (gpointer data)
}
g_debug("Updating to Layout %d", layouton);
- dbusmenu_server_set_root(server, layout2menuitem(json_array_get_element(root_array, layouton)));
+ dbusmenu_server_set_root(server, dbusmenu_json_build_from_node(json_array_get_element(root_array, layouton)));
layouton++;
return TRUE;
diff --git a/tests/test-json-01.json b/tests/test-json-01.json
new file mode 100644
index 0000000..88e1cbf
--- /dev/null
+++ b/tests/test-json-01.json
@@ -0,0 +1,4023 @@
+{
+ "id": 0,
+ "children-display": "submenu",
+ "submenu": [
+ {
+ "id": 5,
+ "enabled": true,
+ "label": "File",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 6,
+ "shortcut": [["Control", "q"]],
+ "enabled": true,
+ "label": "Quit",
+ "visible": true
+ },
+ {
+ "id": 7,
+ "shortcut": [["Control", "Shift", "w"]],
+ "enabled": true,
+ "label": "Close all",
+ "visible": true
+ },
+ {
+ "id": 8,
+ "shortcut": [["Control", "w"]],
+ "enabled": true,
+ "label": "Close",
+ "visible": true
+ },
+ {
+ "id": 9,
+ "type": "separator"
+ },
+ {
+ "id": 10,
+ "enabled": true,
+ "label": "Send by Email...",
+ "visible": true
+ },
+ {
+ "id": 11,
+ "shortcut": [["Control", "p"]],
+ "enabled": true,
+ "label": "Print...",
+ "visible": true
+ },
+ {
+ "id": 12,
+ "enabled": true,
+ "label": "Page Setup",
+ "visible": true
+ },
+ {
+ "id": 13,
+ "type": "separator"
+ },
+ {
+ "id": 14,
+ "enabled": true,
+ "label": "Revert",
+ "visible": true
+ },
+ {
+ "id": 15,
+ "enabled": true,
+ "label": "Save as Template...",
+ "visible": true
+ },
+ {
+ "id": 16,
+ "enabled": true,
+ "label": "Save a Copy...",
+ "visible": true
+ },
+ {
+ "id": 17,
+ "shortcut": [["Control", "Shift", "s"]],
+ "enabled": true,
+ "label": "Save As...",
+ "visible": true
+ },
+ {
+ "id": 18,
+ "shortcut": [["Control", "s"]],
+ "enabled": true,
+ "label": "Save",
+ "visible": true
+ },
+ {
+ "id": 19,
+ "type": "separator"
+ },
+ {
+ "id": 20,
+ "enabled": true,
+ "label": "Open Recent",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 21,
+ "enabled": true,
+ "label": "Document History",
+ "visible": true
+ },
+ {
+ "id": 22,
+ "type": "separator"
+ },
+ {
+ "id": 23,
+ "shortcut": [["Control", "2"]],
+ "enabled": true,
+ "label": "giggity.jpg",
+ "visible": true
+ },
+ {
+ "id": 24,
+ "shortcut": [["Control", "1"]],
+ "enabled": true,
+ "label": "Icon Height.svg",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 25,
+ "enabled": true,
+ "label": "Open Location...",
+ "visible": true
+ },
+ {
+ "id": 26,
+ "shortcut": [["Control", "Alt", "o"]],
+ "enabled": true,
+ "label": "Open as Layers...",
+ "visible": true
+ },
+ {
+ "id": 27,
+ "shortcut": [["Control", "o"]],
+ "enabled": true,
+ "label": "Open...",
+ "visible": true
+ },
+ {
+ "id": 28,
+ "enabled": true,
+ "label": "Create",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 29,
+ "enabled": true,
+ "label": "Web Page Themes",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 30,
+ "enabled": true,
+ "label": "Classic.Gimp.Org",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 31,
+ "enabled": true,
+ "label": "Tube Sub-Sub-Button Label...",
+ "visible": true
+ },
+ {
+ "id": 32,
+ "enabled": true,
+ "label": "Tube Sub-Button Label...",
+ "visible": true
+ },
+ {
+ "id": 33,
+ "enabled": true,
+ "label": "Tube Button Label...",
+ "visible": true
+ },
+ {
+ "id": 34,
+ "enabled": true,
+ "label": "Small Header...",
+ "visible": true
+ },
+ {
+ "id": 35,
+ "enabled": true,
+ "label": "General Tube Labels...",
+ "visible": true
+ },
+ {
+ "id": 36,
+ "enabled": true,
+ "label": "Big Header...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 37,
+ "enabled": true,
+ "label": "Beveled Pattern",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 38,
+ "enabled": true,
+ "label": "Hrule...",
+ "visible": true
+ },
+ {
+ "id": 39,
+ "enabled": true,
+ "label": "Heading...",
+ "visible": true
+ },
+ {
+ "id": 40,
+ "enabled": true,
+ "label": "Button...",
+ "visible": true
+ },
+ {
+ "id": 41,
+ "enabled": true,
+ "label": "Bullet...",
+ "visible": true
+ },
+ {
+ "id": 42,
+ "enabled": true,
+ "label": "Arrow...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 43,
+ "enabled": true,
+ "label": "Alien Glow",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 44,
+ "enabled": true,
+ "label": "Hrule...",
+ "visible": true
+ },
+ {
+ "id": 45,
+ "enabled": true,
+ "label": "Button...",
+ "visible": true
+ },
+ {
+ "id": 46,
+ "enabled": true,
+ "label": "Bullet...",
+ "visible": true
+ },
+ {
+ "id": 47,
+ "enabled": true,
+ "label": "Arrow...",
+ "visible": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": 48,
+ "enabled": true,
+ "label": "Patterns",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 49,
+ "enabled": true,
+ "label": "Truchet...",
+ "visible": true
+ },
+ {
+ "id": 50,
+ "enabled": true,
+ "label": "Swirly...",
+ "visible": true
+ },
+ {
+ "id": 51,
+ "enabled": true,
+ "label": "Swirl-Tile...",
+ "visible": true
+ },
+ {
+ "id": 52,
+ "enabled": true,
+ "label": "Render Map...",
+ "visible": true
+ },
+ {
+ "id": 53,
+ "enabled": true,
+ "label": "Land...",
+ "visible": true
+ },
+ {
+ "id": 54,
+ "enabled": true,
+ "label": "Flatland...",
+ "visible": true
+ },
+ {
+ "id": 55,
+ "enabled": true,
+ "label": "Camouflage...",
+ "visible": true
+ },
+ {
+ "id": 56,
+ "enabled": true,
+ "label": "3D Truchet...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 57,
+ "enabled": true,
+ "label": "Logos",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 58,
+ "enabled": true,
+ "label": "Web Title Header...",
+ "visible": true
+ },
+ {
+ "id": 59,
+ "enabled": true,
+ "label": "Textured...",
+ "visible": true
+ },
+ {
+ "id": 60,
+ "enabled": true,
+ "label": "Text Circle...",
+ "visible": true
+ },
+ {
+ "id": 61,
+ "enabled": true,
+ "label": "Starscape...",
+ "visible": true
+ },
+ {
+ "id": 62,
+ "enabled": true,
+ "label": "Speed Text...",
+ "visible": true
+ },
+ {
+ "id": 63,
+ "enabled": true,
+ "label": "SOTA Chrome...",
+ "visible": true
+ },
+ {
+ "id": 64,
+ "enabled": true,
+ "label": "Particle Trace...",
+ "visible": true
+ },
+ {
+ "id": 65,
+ "enabled": true,
+ "label": "Newsprint Text...",
+ "visible": true
+ },
+ {
+ "id": 66,
+ "enabled": true,
+ "label": "Neon...",
+ "visible": true
+ },
+ {
+ "id": 67,
+ "enabled": true,
+ "label": "Imigre-26...",
+ "visible": true
+ },
+ {
+ "id": 68,
+ "enabled": true,
+ "label": "Gradient Bevel...",
+ "visible": true
+ },
+ {
+ "id": 69,
+ "enabled": true,
+ "label": "Glowing Hot...",
+ "visible": true
+ },
+ {
+ "id": 70,
+ "enabled": true,
+ "label": "Glossy...",
+ "visible": true
+ },
+ {
+ "id": 71,
+ "enabled": true,
+ "label": "Frosty...",
+ "visible": true
+ },
+ {
+ "id": 72,
+ "enabled": true,
+ "label": "Crystal...",
+ "visible": true
+ },
+ {
+ "id": 73,
+ "enabled": true,
+ "label": "Cool Metal...",
+ "visible": true
+ },
+ {
+ "id": 74,
+ "enabled": true,
+ "label": "Comic Book...",
+ "visible": true
+ },
+ {
+ "id": 75,
+ "enabled": true,
+ "label": "Chrome...",
+ "visible": true
+ },
+ {
+ "id": 76,
+ "enabled": true,
+ "label": "Chip Away...",
+ "visible": true
+ },
+ {
+ "id": 77,
+ "enabled": true,
+ "label": "Chalk...",
+ "visible": true
+ },
+ {
+ "id": 78,
+ "enabled": true,
+ "label": "Carved...",
+ "visible": true
+ },
+ {
+ "id": 79,
+ "enabled": true,
+ "label": "Bovination...",
+ "visible": true
+ },
+ {
+ "id": 80,
+ "enabled": true,
+ "label": "Blended...",
+ "visible": true
+ },
+ {
+ "id": 81,
+ "enabled": true,
+ "label": "Basic I...",
+ "visible": true
+ },
+ {
+ "id": 82,
+ "enabled": true,
+ "label": "Basic II...",
+ "visible": true
+ },
+ {
+ "id": 83,
+ "enabled": true,
+ "label": "Alien Neon...",
+ "visible": true
+ },
+ {
+ "id": 84,
+ "enabled": true,
+ "label": "Alien Glow...",
+ "visible": true
+ },
+ {
+ "id": 85,
+ "enabled": true,
+ "label": "3D Outline...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 86,
+ "enabled": true,
+ "label": "Buttons",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 87,
+ "enabled": true,
+ "label": "Simple Beveled Button...",
+ "visible": true
+ },
+ {
+ "id": 88,
+ "enabled": true,
+ "label": "Round Button...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 89,
+ "type": "separator"
+ },
+ {
+ "id": 90,
+ "enabled": true,
+ "label": "xscanimage",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 91,
+ "enabled": false,
+ "label": "Device dialog...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 92,
+ "enabled": true,
+ "label": "Screenshot...",
+ "visible": true
+ },
+ {
+ "id": 93,
+ "shortcut": [["Control", "Shift", "v"]],
+ "enabled": true,
+ "label": "From Clipboard",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 94,
+ "shortcut": [["Control", "n"]],
+ "enabled": true,
+ "label": "New...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 95,
+ "enabled": true,
+ "label": "Edit",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 96,
+ "enabled": true,
+ "label": "Units",
+ "visible": true
+ },
+ {
+ "id": 97,
+ "enabled": true,
+ "label": "Modules",
+ "visible": true
+ },
+ {
+ "id": 98,
+ "enabled": true,
+ "label": "Keyboard Shortcuts",
+ "visible": true
+ },
+ {
+ "id": 99,
+ "enabled": true,
+ "label": "Preferences",
+ "visible": true
+ },
+ {
+ "id": 100,
+ "type": "separator"
+ },
+ {
+ "id": 101,
+ "enabled": false,
+ "label": "Stroke Path...",
+ "visible": true
+ },
+ {
+ "id": 102,
+ "enabled": false,
+ "label": "Stroke Selection...",
+ "visible": true
+ },
+ {
+ "id": 103,
+ "shortcut": [["Control", "semicolon"]],
+ "enabled": true,
+ "label": "Fill with Pattern",
+ "visible": true
+ },
+ {
+ "id": 104,
+ "shortcut": [["Control", "period"]],
+ "enabled": true,
+ "label": "Fill with BG Color",
+ "visible": true
+ },
+ {
+ "id": 105,
+ "shortcut": [["Control", "comma"]],
+ "enabled": true,
+ "label": "Fill with FG Color",
+ "visible": true
+ },
+ {
+ "id": 106,
+ "shortcut": [["Delete"]],
+ "enabled": true,
+ "label": "Clear",
+ "visible": true
+ },
+ {
+ "id": 107,
+ "type": "separator"
+ },
+ {
+ "id": 108,
+ "enabled": true,
+ "label": "Buffer",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 109,
+ "enabled": true,
+ "label": "Paste Named...",
+ "visible": true
+ },
+ {
+ "id": 110,
+ "enabled": true,
+ "label": "Copy Visible Named...",
+ "visible": true
+ },
+ {
+ "id": 111,
+ "enabled": true,
+ "label": "Copy Named...",
+ "visible": true
+ },
+ {
+ "id": 112,
+ "enabled": true,
+ "label": "Cut Named...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 113,
+ "enabled": true,
+ "label": "Paste as",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 114,
+ "enabled": true,
+ "label": "New Pattern...",
+ "visible": true
+ },
+ {
+ "id": 115,
+ "enabled": true,
+ "label": "New Brush...",
+ "visible": true
+ },
+ {
+ "id": 116,
+ "enabled": true,
+ "label": "New Layer",
+ "visible": true
+ },
+ {
+ "id": 117,
+ "shortcut": [["Control", "Shift", "v"]],
+ "enabled": true,
+ "label": "New Image",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 118,
+ "enabled": true,
+ "label": "Paste Into",
+ "visible": true
+ },
+ {
+ "id": 119,
+ "shortcut": [["Control", "v"]],
+ "enabled": true,
+ "label": "Paste",
+ "visible": true
+ },
+ {
+ "id": 120,
+ "shortcut": [["Control", "Shift", "c"]],
+ "enabled": true,
+ "label": "Copy Visible",
+ "visible": true
+ },
+ {
+ "id": 121,
+ "shortcut": [["Control", "c"]],
+ "enabled": true,
+ "label": "Copy",
+ "visible": true
+ },
+ {
+ "id": 122,
+ "shortcut": [["Control", "x"]],
+ "enabled": true,
+ "label": "Cut",
+ "visible": true
+ },
+ {
+ "id": 123,
+ "type": "separator"
+ },
+ {
+ "id": 124,
+ "enabled": true,
+ "label": "Undo History",
+ "visible": true
+ },
+ {
+ "id": 3,
+ "enabled": false,
+ "label": "_Fade...",
+ "visible": true
+ },
+ {
+ "id": 2,
+ "shortcut": [["Control", "y"]],
+ "enabled": false,
+ "label": "_Redo",
+ "visible": true
+ },
+ {
+ "id": 1,
+ "shortcut": [["Control", "z"]],
+ "enabled": false,
+ "label": "_Undo",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 125,
+ "enabled": true,
+ "label": "Select",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 126,
+ "enabled": false,
+ "label": "To Path",
+ "visible": true
+ },
+ {
+ "id": 127,
+ "enabled": true,
+ "label": "Save to Channel",
+ "visible": true
+ },
+ {
+ "id": 128,
+ "shortcut": [["Shift", "q"]],
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Toggle Quick Mask",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 129,
+ "type": "separator"
+ },
+ {
+ "id": 130,
+ "enabled": true,
+ "label": "Distort...",
+ "visible": true
+ },
+ {
+ "id": 131,
+ "enabled": false,
+ "label": "Border...",
+ "visible": true
+ },
+ {
+ "id": 132,
+ "enabled": false,
+ "label": "Grow...",
+ "visible": true
+ },
+ {
+ "id": 133,
+ "enabled": false,
+ "label": "Shrink...",
+ "visible": true
+ },
+ {
+ "id": 134,
+ "enabled": false,
+ "label": "Sharpen",
+ "visible": true
+ },
+ {
+ "id": 135,
+ "enabled": false,
+ "label": "Feather...",
+ "visible": true
+ },
+ {
+ "id": 136,
+ "type": "separator"
+ },
+ {
+ "id": 137,
+ "enabled": true,
+ "label": "Selection Editor",
+ "visible": true
+ },
+ {
+ "id": 138,
+ "shortcut": [["Shift", "v"]],
+ "enabled": false,
+ "label": "From Path",
+ "visible": true
+ },
+ {
+ "id": 139,
+ "shortcut": [["Shift", "o"]],
+ "enabled": true,
+ "label": "By Color",
+ "visible": true
+ },
+ {
+ "id": 140,
+ "shortcut": [["Control", "Shift", "l"]],
+ "enabled": false,
+ "label": "Float",
+ "visible": true
+ },
+ {
+ "id": 141,
+ "shortcut": [["Control", "i"]],
+ "enabled": true,
+ "label": "Invert",
+ "visible": true
+ },
+ {
+ "id": 142,
+ "shortcut": [["Control", "Shift", "a"]],
+ "enabled": false,
+ "label": "None",
+ "visible": true
+ },
+ {
+ "id": 143,
+ "shortcut": [["Control", "a"]],
+ "enabled": true,
+ "label": "All",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 144,
+ "enabled": true,
+ "label": "View",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 145,
+ "enabled": true,
+ "toggle-state": 1,
+ "label": "Show Statusbar",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 146,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Show Scrollbars",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 147,
+ "shortcut": [["Control", "Shift", "r"]],
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Show Rulers",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 148,
+ "enabled": true,
+ "toggle-state": 1,
+ "label": "Show Menubar",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 149,
+ "enabled": true,
+ "label": "Padding Color",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 150,
+ "enabled": true,
+ "label": "As in Preferences",
+ "visible": true
+ },
+ {
+ "id": 151,
+ "type": "separator"
+ },
+ {
+ "id": 152,
+ "enabled": true,
+ "label": "Select Custom Color...",
+ "visible": true
+ },
+ {
+ "id": 153,
+ "enabled": true,
+ "label": "Dark Check Color",
+ "visible": true
+ },
+ {
+ "id": 154,
+ "enabled": true,
+ "label": "Light Check Color",
+ "visible": true
+ },
+ {
+ "id": 155,
+ "enabled": true,
+ "label": "From Theme",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 156,
+ "type": "separator"
+ },
+ {
+ "id": 157,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Snap to Active Path",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 158,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Snap to Canvas Edges",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 159,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Snap to Grid",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 160,
+ "enabled": true,
+ "toggle-state": 1,
+ "label": "Snap to Guides",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 161,
+ "type": "separator"
+ },
+ {
+ "id": 162,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Show Sample Points",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 163,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Show Grid",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 164,
+ "shortcut": [["Control", "Shift", "t"]],
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Show Guides",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 165,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Show Layer Boundary",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 166,
+ "shortcut": [["Control", "t"]],
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Show Selection",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 167,
+ "type": "separator"
+ },
+ {
+ "id": 168,
+ "enabled": true,
+ "label": "Display Filters...",
+ "visible": true
+ },
+ {
+ "id": 169,
+ "enabled": true,
+ "label": "Navigation Window",
+ "visible": true
+ },
+ {
+ "id": 170,
+ "type": "separator"
+ },
+ {
+ "id": 171,
+ "enabled": true,
+ "shortcut": [["F11"]],
+ "toggle-state": 0,
+ "label": "Fullscreen",
+ "toggle-type": "checkmark",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 172,
+ "enabled": true,
+ "label": "Open Display...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 173,
+ "shortcut": [["Control", "e"]],
+ "enabled": true,
+ "label": "Shrink Wrap",
+ "visible": true
+ },
+ {
+ "id": 174,
+ "type": "separator"
+ },
+ {
+ "id": 175,
+ "enabled": true,
+ "label": "_Zoom (67%)",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 176,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Othe_r (67%)...",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 177,
+ "type": "separator"
+ },
+ {
+ "id": 178,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "1:16 (6.25%)",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 179,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "1:8 (12.5%)",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 180,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "1:4 (25%)",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 181,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "1:2 (50%)",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 182,
+ "shortcut": [["1"]],
+ "enabled": true,
+ "toggle-state": 1,
+ "label": "1:1 (100%)",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 183,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "2:1 (200%)",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 184,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "4:1 (400%)",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 185,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "8:1 (800%)",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 186,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "16:1 (1600%)",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 187,
+ "type": "separator"
+ },
+ {
+ "id": 188,
+ "enabled": true,
+ "label": "Fill Window",
+ "visible": true
+ },
+ {
+ "id": 189,
+ "shortcut": [["Control", "Shift", "e"]],
+ "enabled": true,
+ "label": "Fit Image in Window",
+ "visible": true
+ },
+ {
+ "id": 190,
+ "shortcut": [["plus"]],
+ "enabled": true,
+ "label": "Zoom In",
+ "visible": true
+ },
+ {
+ "id": 191,
+ "shortcut": [["minus"]],
+ "enabled": true,
+ "label": "Zoom Out",
+ "visible": true
+ },
+ {
+ "id": 4,
+ "shortcut": [["grave"]],
+ "enabled": true,
+ "label": "Re_vert Zoom (67%)",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 192,
+ "enabled": true,
+ "toggle-state": 1,
+ "label": "Dot for Dot",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 193,
+ "enabled": true,
+ "label": "New View",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 194,
+ "enabled": true,
+ "label": "Image",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 195,
+ "shortcut": [["Alt", "Return"]],
+ "enabled": true,
+ "label": "Image Properties",
+ "visible": true
+ },
+ {
+ "id": 196,
+ "enabled": true,
+ "label": "Configure Grid...",
+ "visible": true
+ },
+ {
+ "id": 197,
+ "enabled": true,
+ "label": "Guides",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 198,
+ "enabled": true,
+ "label": "Remove all Guides",
+ "visible": true
+ },
+ {
+ "id": 199,
+ "enabled": true,
+ "label": "New Guides from Selection",
+ "visible": true
+ },
+ {
+ "id": 200,
+ "enabled": true,
+ "label": "New Guide...",
+ "visible": true
+ },
+ {
+ "id": 201,
+ "enabled": true,
+ "label": "New Guide (by Percent)...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 202,
+ "type": "separator"
+ },
+ {
+ "id": 203,
+ "enabled": true,
+ "label": "Align Visible Layers...",
+ "visible": true
+ },
+ {
+ "id": 204,
+ "enabled": true,
+ "label": "Flatten Image",
+ "visible": true
+ },
+ {
+ "id": 205,
+ "shortcut": [["Control", "m"]],
+ "enabled": true,
+ "label": "Merge Visible Layers...",
+ "visible": true
+ },
+ {
+ "id": 206,
+ "type": "separator"
+ },
+ {
+ "id": 207,
+ "enabled": true,
+ "label": "Zealous Crop",
+ "visible": true
+ },
+ {
+ "id": 208,
+ "enabled": true,
+ "label": "Autocrop Image",
+ "visible": true
+ },
+ {
+ "id": 209,
+ "enabled": false,
+ "label": "Crop to Selection",
+ "visible": true
+ },
+ {
+ "id": 210,
+ "type": "separator"
+ },
+ {
+ "id": 211,
+ "enabled": true,
+ "label": "Scale Image...",
+ "visible": true
+ },
+ {
+ "id": 212,
+ "enabled": true,
+ "label": "Print Size...",
+ "visible": true
+ },
+ {
+ "id": 213,
+ "enabled": false,
+ "label": "Fit Canvas to Selection",
+ "visible": true
+ },
+ {
+ "id": 214,
+ "enabled": true,
+ "label": "Fit Canvas to Layers",
+ "visible": true
+ },
+ {
+ "id": 215,
+ "enabled": true,
+ "label": "Canvas Size...",
+ "visible": true
+ },
+ {
+ "id": 216,
+ "type": "separator"
+ },
+ {
+ "id": 217,
+ "enabled": true,
+ "label": "Transform",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 218,
+ "enabled": true,
+ "label": "Guillotine",
+ "visible": true
+ },
+ {
+ "id": 219,
+ "type": "separator"
+ },
+ {
+ "id": 220,
+ "enabled": true,
+ "label": "Rotate 180\302\260",
+ "visible": true
+ },
+ {
+ "id": 221,
+ "enabled": true,
+ "label": "Rotate 90\302\260 counter-clockwise",
+ "visible": true
+ },
+ {
+ "id": 222,
+ "enabled": true,
+ "label": "Rotate 90\302\260 clockwise",
+ "visible": true
+ },
+ {
+ "id": 223,
+ "type": "separator"
+ },
+ {
+ "id": 224,
+ "enabled": true,
+ "label": "Flip Vertically",
+ "visible": true
+ },
+ {
+ "id": 225,
+ "enabled": true,
+ "label": "Flip Horizontally",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 226,
+ "enabled": true,
+ "label": "Mode",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 227,
+ "enabled": true,
+ "label": "Convert to Color Profile...",
+ "visible": true
+ },
+ {
+ "id": 228,
+ "enabled": true,
+ "label": "Assign Color Profile...",
+ "visible": true
+ },
+ {
+ "id": 229,
+ "type": "separator"
+ },
+ {
+ "id": 230,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Indexed...",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 231,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Grayscale",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 232,
+ "enabled": true,
+ "toggle-state": 1,
+ "label": "RGB",
+ "toggle-type": "checkmark",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 233,
+ "shortcut": [["Control", "d"]],
+ "enabled": true,
+ "label": "Duplicate",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 234,
+ "enabled": true,
+ "label": "Layer",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 235,
+ "enabled": true,
+ "label": "Autocrop Layer",
+ "visible": true
+ },
+ {
+ "id": 236,
+ "enabled": false,
+ "label": "Crop to Selection",
+ "visible": true
+ },
+ {
+ "id": 237,
+ "enabled": true,
+ "label": "Scale Layer...",
+ "visible": true
+ },
+ {
+ "id": 238,
+ "enabled": true,
+ "label": "Layer to Image Size",
+ "visible": true
+ },
+ {
+ "id": 239,
+ "enabled": true,
+ "label": "Layer Boundary Size...",
+ "visible": true
+ },
+ {
+ "id": 240,
+ "type": "separator"
+ },
+ {
+ "id": 241,
+ "enabled": true,
+ "label": "Transform",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 242,
+ "shortcut": [["Control", "Shift", "o"]],
+ "enabled": true,
+ "label": "Offset...",
+ "visible": true
+ },
+ {
+ "id": 243,
+ "type": "separator"
+ },
+ {
+ "id": 244,
+ "enabled": true,
+ "label": "Arbitrary Rotation...",
+ "visible": true
+ },
+ {
+ "id": 245,
+ "enabled": true,
+ "label": "Rotate 180\302\260",
+ "visible": true
+ },
+ {
+ "id": 246,
+ "enabled": true,
+ "label": "Rotate 90\302\260 counter-clockwise",
+ "visible": true
+ },
+ {
+ "id": 247,
+ "enabled": true,
+ "label": "Rotate 90\302\260 clockwise",
+ "visible": true
+ },
+ {
+ "id": 248,
+ "type": "separator"
+ },
+ {
+ "id": 249,
+ "enabled": true,
+ "label": "Flip Vertically",
+ "visible": true
+ },
+ {
+ "id": 250,
+ "enabled": true,
+ "label": "Flip Horizontally",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 251,
+ "enabled": true,
+ "label": "Transparency",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 252,
+ "enabled": true,
+ "label": "Intersect with Selection",
+ "visible": true
+ },
+ {
+ "id": 253,
+ "enabled": true,
+ "label": "Subtract from Selection",
+ "visible": true
+ },
+ {
+ "id": 254,
+ "enabled": true,
+ "label": "Add to Selection",
+ "visible": true
+ },
+ {
+ "id": 255,
+ "enabled": true,
+ "label": "Alpha to Selection",
+ "visible": true
+ },
+ {
+ "id": 256,
+ "type": "separator"
+ },
+ {
+ "id": 257,
+ "enabled": true,
+ "label": "Threshold Alpha...",
+ "visible": true
+ },
+ {
+ "id": 258,
+ "enabled": true,
+ "label": "Semi-Flatten",
+ "visible": true
+ },
+ {
+ "id": 259,
+ "enabled": true,
+ "label": "Color to Alpha...",
+ "visible": true
+ },
+ {
+ "id": 260,
+ "enabled": true,
+ "label": "Remove Alpha Channel",
+ "visible": true
+ },
+ {
+ "id": 261,
+ "enabled": false,
+ "label": "Add Alpha Channel",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 262,
+ "enabled": true,
+ "label": "Mask",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 263,
+ "enabled": false,
+ "label": "Intersect with Selection",
+ "visible": true
+ },
+ {
+ "id": 264,
+ "enabled": false,
+ "label": "Subtract from Selection",
+ "visible": true
+ },
+ {
+ "id": 265,
+ "enabled": false,
+ "label": "Add to Selection",
+ "visible": true
+ },
+ {
+ "id": 266,
+ "enabled": false,
+ "label": "Mask to Selection",
+ "visible": true
+ },
+ {
+ "id": 267,
+ "type": "separator"
+ },
+ {
+ "id": 268,
+ "enabled": false,
+ "toggle-state": 0,
+ "label": "Disable Layer Mask",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 269,
+ "enabled": false,
+ "toggle-state": 0,
+ "label": "Edit Layer Mask",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 270,
+ "enabled": false,
+ "toggle-state": 0,
+ "label": "Show Layer Mask",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 271,
+ "type": "separator"
+ },
+ {
+ "id": 272,
+ "enabled": false,
+ "label": "Delete Layer Mask",
+ "visible": true
+ },
+ {
+ "id": 273,
+ "enabled": false,
+ "label": "Apply Layer Mask",
+ "visible": true
+ },
+ {
+ "id": 274,
+ "enabled": true,
+ "label": "Add Layer Mask...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 275,
+ "enabled": true,
+ "label": "Stack",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 276,
+ "enabled": true,
+ "label": "Reverse Layer Order",
+ "visible": true
+ },
+ {
+ "id": 277,
+ "type": "separator"
+ },
+ {
+ "id": 278,
+ "enabled": false,
+ "label": "Layer to Bottom",
+ "visible": true
+ },
+ {
+ "id": 279,
+ "enabled": false,
+ "label": "Layer to Top",
+ "visible": true
+ },
+ {
+ "id": 280,
+ "enabled": false,
+ "label": "Lower Layer",
+ "visible": true
+ },
+ {
+ "id": 281,
+ "enabled": false,
+ "label": "Raise Layer",
+ "visible": true
+ },
+ {
+ "id": 282,
+ "type": "separator"
+ },
+ {
+ "id": 283,
+ "shortcut": [["End"]],
+ "enabled": false,
+ "label": "Select Bottom Layer",
+ "visible": true
+ },
+ {
+ "id": 284,
+ "shortcut": [["Home"]],
+ "enabled": false,
+ "label": "Select Top Layer",
+ "visible": true
+ },
+ {
+ "id": 285,
+ "shortcut": [["Page_Down"]],
+ "enabled": false,
+ "label": "Select Next Layer",
+ "visible": true
+ },
+ {
+ "id": 286,
+ "shortcut": [["Page_Up"]],
+ "enabled": false,
+ "label": "Select Previous Layer",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 287,
+ "type": "separator",
+ "children-display": "submenu",
+ "submenu": [
+ {
+ "id": 288,
+ "enabled": false,
+ "label": "Empty",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 289,
+ "enabled": true,
+ "label": "Delete Layer",
+ "visible": true
+ },
+ {
+ "id": 290,
+ "enabled": false,
+ "label": "Merge Down",
+ "visible": true
+ },
+ {
+ "id": 291,
+ "shortcut": [["Control", "h"]],
+ "enabled": false,
+ "label": "Anchor Layer",
+ "visible": true
+ },
+ {
+ "id": 292,
+ "shortcut": [["Control", "Shift", "d"]],
+ "enabled": true,
+ "label": "Duplicate Layer",
+ "visible": true
+ },
+ {
+ "id": 293,
+ "enabled": true,
+ "label": "New from Visible",
+ "visible": true
+ },
+ {
+ "id": 294,
+ "shortcut": [["Control", "Shift", "n"]],
+ "enabled": true,
+ "label": "New Layer...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 295,
+ "enabled": true,
+ "label": "Colors",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 296,
+ "enabled": true,
+ "label": "Retinex...",
+ "visible": true
+ },
+ {
+ "id": 297,
+ "enabled": true,
+ "label": "Maximum RGB...",
+ "visible": true
+ },
+ {
+ "id": 298,
+ "enabled": false,
+ "label": "Hot...",
+ "visible": true
+ },
+ {
+ "id": 299,
+ "enabled": true,
+ "label": "Filter Pack...",
+ "visible": true
+ },
+ {
+ "id": 300,
+ "enabled": true,
+ "label": "Color to Alpha...",
+ "visible": true
+ },
+ {
+ "id": 301,
+ "enabled": true,
+ "label": "Colorify...",
+ "visible": true
+ },
+ {
+ "id": 302,
+ "type": "separator"
+ },
+ {
+ "id": 303,
+ "enabled": true,
+ "label": "Info",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 304,
+ "enabled": true,
+ "label": "Smooth Palette...",
+ "visible": true
+ },
+ {
+ "id": 305,
+ "enabled": true,
+ "label": "Colorcube Analysis...",
+ "visible": true
+ },
+ {
+ "id": 306,
+ "enabled": true,
+ "label": "Border Average...",
+ "visible": true
+ },
+ {
+ "id": 307,
+ "enabled": true,
+ "label": "Histogram",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 308,
+ "enabled": true,
+ "label": "Map",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 309,
+ "enabled": true,
+ "label": "Sample Colorize...",
+ "visible": true
+ },
+ {
+ "id": 310,
+ "enabled": true,
+ "label": "Rotate Colors...",
+ "visible": true
+ },
+ {
+ "id": 311,
+ "enabled": true,
+ "label": "Palette Map",
+ "visible": true
+ },
+ {
+ "id": 312,
+ "enabled": true,
+ "label": "Gradient Map",
+ "visible": true
+ },
+ {
+ "id": 313,
+ "enabled": true,
+ "label": "Color Exchange...",
+ "visible": true
+ },
+ {
+ "id": 314,
+ "enabled": true,
+ "label": "Alien Map...",
+ "visible": true
+ },
+ {
+ "id": 315,
+ "type": "separator"
+ },
+ {
+ "id": 316,
+ "enabled": false,
+ "label": "Set Colormap...",
+ "visible": true
+ },
+ {
+ "id": 317,
+ "enabled": false,
+ "label": "Rearrange Colormap...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 318,
+ "enabled": true,
+ "label": "Components",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 319,
+ "enabled": false,
+ "label": "Recompose",
+ "visible": true
+ },
+ {
+ "id": 320,
+ "enabled": true,
+ "label": "Decompose...",
+ "visible": true
+ },
+ {
+ "id": 321,
+ "enabled": false,
+ "label": "Compose...",
+ "visible": true
+ },
+ {
+ "id": 322,
+ "enabled": true,
+ "label": "Channel Mixer...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 323,
+ "enabled": true,
+ "label": "Auto",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 324,
+ "enabled": true,
+ "label": "Stretch HSV",
+ "visible": true
+ },
+ {
+ "id": 325,
+ "enabled": true,
+ "label": "Stretch Contrast",
+ "visible": true
+ },
+ {
+ "id": 326,
+ "enabled": true,
+ "label": "Normalize",
+ "visible": true
+ },
+ {
+ "id": 327,
+ "enabled": true,
+ "label": "Color Enhance",
+ "visible": true
+ },
+ {
+ "id": 328,
+ "enabled": true,
+ "label": "White Balance",
+ "visible": true
+ },
+ {
+ "id": 329,
+ "enabled": true,
+ "label": "Equalize",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 330,
+ "type": "separator"
+ },
+ {
+ "id": 331,
+ "enabled": true,
+ "toggle-state": 0,
+ "label": "Use GEGL",
+ "toggle-type": "checkmark",
+ "visible": true
+ },
+ {
+ "id": 332,
+ "type": "separator"
+ },
+ {
+ "id": 333,
+ "enabled": true,
+ "label": "Value Invert",
+ "visible": true
+ },
+ {
+ "id": 334,
+ "enabled": true,
+ "label": "Invert",
+ "visible": true
+ },
+ {
+ "id": 335,
+ "type": "separator"
+ },
+ {
+ "id": 336,
+ "enabled": true,
+ "label": "Desaturate...",
+ "visible": true
+ },
+ {
+ "id": 337,
+ "enabled": true,
+ "label": "Posterize...",
+ "visible": true
+ },
+ {
+ "id": 338,
+ "enabled": true,
+ "label": "Curves...",
+ "visible": true
+ },
+ {
+ "id": 339,
+ "enabled": true,
+ "label": "Levels...",
+ "visible": true
+ },
+ {
+ "id": 340,
+ "enabled": true,
+ "label": "Threshold...",
+ "visible": true
+ },
+ {
+ "id": 341,
+ "enabled": true,
+ "label": "Brightness-Contrast...",
+ "visible": true
+ },
+ {
+ "id": 342,
+ "enabled": true,
+ "label": "Colorize...",
+ "visible": true
+ },
+ {
+ "id": 343,
+ "enabled": true,
+ "label": "Hue-Saturation...",
+ "visible": true
+ },
+ {
+ "id": 344,
+ "enabled": true,
+ "label": "Color Balance...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 345,
+ "enabled": true,
+ "label": "Tools",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 346,
+ "shortcut": [["x"]],
+ "enabled": true,
+ "label": "Swap Colors",
+ "visible": true
+ },
+ {
+ "id": 347,
+ "shortcut": [["d"]],
+ "enabled": true,
+ "label": "Default Colors",
+ "visible": true
+ },
+ {
+ "id": 348,
+ "shortcut": [["Control", "b"]],
+ "enabled": true,
+ "label": "Toolbox",
+ "visible": true
+ },
+ {
+ "id": 349,
+ "type": "separator"
+ },
+ {
+ "id": 350,
+ "enabled": true,
+ "label": "GEGL Operation...",
+ "visible": true
+ },
+ {
+ "id": 351,
+ "shortcut": [["t"]],
+ "enabled": true,
+ "label": "Text",
+ "visible": true
+ },
+ {
+ "id": 352,
+ "shortcut": [["Shift", "m"]],
+ "enabled": true,
+ "label": "Measure",
+ "visible": true
+ },
+ {
+ "id": 353,
+ "shortcut": [["z"]],
+ "enabled": true,
+ "label": "Zoom",
+ "visible": true
+ },
+ {
+ "id": 354,
+ "shortcut": [["o"]],
+ "enabled": true,
+ "label": "Color Picker",
+ "visible": true
+ },
+ {
+ "id": 355,
+ "shortcut": [["b"]],
+ "enabled": true,
+ "label": "Paths",
+ "visible": true
+ },
+ {
+ "id": 356,
+ "enabled": true,
+ "label": "Color Tools",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 357,
+ "enabled": true,
+ "label": "Desaturate...",
+ "visible": true
+ },
+ {
+ "id": 358,
+ "enabled": true,
+ "label": "Posterize...",
+ "visible": true
+ },
+ {
+ "id": 359,
+ "enabled": true,
+ "label": "Curves...",
+ "visible": true
+ },
+ {
+ "id": 360,
+ "enabled": true,
+ "label": "Levels...",
+ "visible": true
+ },
+ {
+ "id": 361,
+ "enabled": true,
+ "label": "Threshold...",
+ "visible": true
+ },
+ {
+ "id": 362,
+ "enabled": true,
+ "label": "Brightness-Contrast...",
+ "visible": true
+ },
+ {
+ "id": 363,
+ "enabled": true,
+ "label": "Colorize...",
+ "visible": true
+ },
+ {
+ "id": 364,
+ "enabled": true,
+ "label": "Hue-Saturation...",
+ "visible": true
+ },
+ {
+ "id": 365,
+ "enabled": true,
+ "label": "Color Balance...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 366,
+ "enabled": true,
+ "label": "Transform Tools",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 367,
+ "shortcut": [["Shift", "f"]],
+ "enabled": true,
+ "label": "Flip",
+ "visible": true
+ },
+ {
+ "id": 368,
+ "shortcut": [["Shift", "p"]],
+ "enabled": true,
+ "label": "Perspective",
+ "visible": true
+ },
+ {
+ "id": 369,
+ "shortcut": [["Shift", "s"]],
+ "enabled": true,
+ "label": "Shear",
+ "visible": true
+ },
+ {
+ "id": 370,
+ "shortcut": [["Shift", "t"]],
+ "enabled": true,
+ "label": "Scale",
+ "visible": true
+ },
+ {
+ "id": 371,
+ "shortcut": [["Shift", "r"]],
+ "enabled": true,
+ "label": "Rotate",
+ "visible": true
+ },
+ {
+ "id": 372,
+ "shortcut": [["Shift", "c"]],
+ "enabled": true,
+ "label": "Crop",
+ "visible": true
+ },
+ {
+ "id": 373,
+ "shortcut": [["m"]],
+ "enabled": true,
+ "label": "Move",
+ "visible": true
+ },
+ {
+ "id": 374,
+ "shortcut": [["q"]],
+ "enabled": true,
+ "label": "Align",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 375,
+ "enabled": true,
+ "label": "Paint Tools",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 376,
+ "shortcut": [["Shift", "d"]],
+ "enabled": true,
+ "label": "Dodge / Burn",
+ "visible": true
+ },
+ {
+ "id": 377,
+ "shortcut": [["s"]],
+ "enabled": true,
+ "label": "Smudge",
+ "visible": true
+ },
+ {
+ "id": 378,
+ "shortcut": [["Shift", "u"]],
+ "enabled": true,
+ "label": "Blur / Sharpen",
+ "visible": true
+ },
+ {
+ "id": 379,
+ "enabled": true,
+ "label": "Perspective Clone",
+ "visible": true
+ },
+ {
+ "id": 380,
+ "shortcut": [["h"]],
+ "enabled": true,
+ "label": "Heal",
+ "visible": true
+ },
+ {
+ "id": 381,
+ "shortcut": [["c"]],
+ "enabled": true,
+ "label": "Clone",
+ "visible": true
+ },
+ {
+ "id": 382,
+ "shortcut": [["k"]],
+ "enabled": true,
+ "label": "Ink",
+ "visible": true
+ },
+ {
+ "id": 383,
+ "shortcut": [["a"]],
+ "enabled": true,
+ "label": "Airbrush",
+ "visible": true
+ },
+ {
+ "id": 384,
+ "shortcut": [["Shift", "e"]],
+ "enabled": true,
+ "label": "Eraser",
+ "visible": true
+ },
+ {
+ "id": 385,
+ "shortcut": [["p"]],
+ "enabled": true,
+ "label": "Paintbrush",
+ "visible": true
+ },
+ {
+ "id": 386,
+ "shortcut": [["n"]],
+ "enabled": true,
+ "label": "Pencil",
+ "visible": true
+ },
+ {
+ "id": 387,
+ "shortcut": [["l"]],
+ "enabled": true,
+ "label": "Blend",
+ "visible": true
+ },
+ {
+ "id": 388,
+ "shortcut": [["Shift", "b"]],
+ "enabled": true,
+ "label": "Bucket Fill",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 389,
+ "enabled": true,
+ "label": "Selection Tools",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 390,
+ "shortcut": [["i"]],
+ "enabled": true,
+ "label": "Intelligent Scissors",
+ "visible": true
+ },
+ {
+ "id": 391,
+ "shortcut": [["Shift", "o"]],
+ "enabled": true,
+ "label": "By Color Select",
+ "visible": true
+ },
+ {
+ "id": 392,
+ "shortcut": [["u"]],
+ "enabled": true,
+ "label": "Fuzzy Select",
+ "visible": true
+ },
+ {
+ "id": 393,
+ "enabled": true,
+ "label": "Foreground Select",
+ "visible": true
+ },
+ {
+ "id": 394,
+ "shortcut": [["f"]],
+ "enabled": true,
+ "label": "Free Select",
+ "visible": true
+ },
+ {
+ "id": 395,
+ "shortcut": [["e"]],
+ "enabled": true,
+ "label": "Ellipse Select",
+ "visible": true
+ },
+ {
+ "id": 396,
+ "shortcut": [["r"]],
+ "enabled": true,
+ "label": "Rectangle Select",
+ "visible": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": 397,
+ "enabled": true,
+ "label": "Filters",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 398,
+ "enabled": true,
+ "label": "Script-Fu",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 399,
+ "enabled": true,
+ "label": "Start Server...",
+ "visible": true
+ },
+ {
+ "id": 400,
+ "enabled": true,
+ "label": "Refresh Scripts",
+ "visible": true
+ },
+ {
+ "id": 401,
+ "enabled": true,
+ "label": "Console",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 402,
+ "enabled": true,
+ "label": "Python-Fu",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 403,
+ "enabled": true,
+ "label": "Console",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 404,
+ "type": "separator"
+ },
+ {
+ "id": 405,
+ "enabled": true,
+ "label": "Alpha to Logo",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 406,
+ "enabled": true,
+ "label": "Textured...",
+ "visible": true
+ },
+ {
+ "id": 407,
+ "enabled": true,
+ "label": "Particle Trace...",
+ "visible": true
+ },
+ {
+ "id": 408,
+ "enabled": true,
+ "label": "Neon...",
+ "visible": true
+ },
+ {
+ "id": 409,
+ "enabled": true,
+ "label": "Gradient Bevel...",
+ "visible": true
+ },
+ {
+ "id": 410,
+ "enabled": true,
+ "label": "Glowing Hot...",
+ "visible": true
+ },
+ {
+ "id": 411,
+ "enabled": true,
+ "label": "Glossy...",
+ "visible": true
+ },
+ {
+ "id": 412,
+ "enabled": true,
+ "label": "Frosty...",
+ "visible": true
+ },
+ {
+ "id": 413,
+ "enabled": true,
+ "label": "Cool Metal...",
+ "visible": true
+ },
+ {
+ "id": 414,
+ "enabled": true,
+ "label": "Comic Book...",
+ "visible": true
+ },
+ {
+ "id": 415,
+ "enabled": true,
+ "label": "Chrome...",
+ "visible": true
+ },
+ {
+ "id": 416,
+ "enabled": true,
+ "label": "Chip Away...",
+ "visible": true
+ },
+ {
+ "id": 417,
+ "enabled": true,
+ "label": "Chalk...",
+ "visible": true
+ },
+ {
+ "id": 418,
+ "enabled": true,
+ "label": "Bovination...",
+ "visible": true
+ },
+ {
+ "id": 419,
+ "enabled": true,
+ "label": "Blended...",
+ "visible": true
+ },
+ {
+ "id": 420,
+ "enabled": true,
+ "label": "Basic I...",
+ "visible": true
+ },
+ {
+ "id": 421,
+ "enabled": true,
+ "label": "Basic II...",
+ "visible": true
+ },
+ {
+ "id": 422,
+ "enabled": true,
+ "label": "Alien Neon...",
+ "visible": true
+ },
+ {
+ "id": 423,
+ "enabled": true,
+ "label": "Alien Glow...",
+ "visible": true
+ },
+ {
+ "id": 424,
+ "enabled": true,
+ "label": "3D Outline...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 425,
+ "type": "separator"
+ },
+ {
+ "id": 426,
+ "enabled": true,
+ "label": "Animation",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 427,
+ "enabled": true,
+ "label": "Unoptimize",
+ "visible": true
+ },
+ {
+ "id": 428,
+ "enabled": true,
+ "label": "Playback...",
+ "visible": true
+ },
+ {
+ "id": 429,
+ "enabled": true,
+ "label": "Optimize (for GIF)",
+ "visible": true
+ },
+ {
+ "id": 430,
+ "enabled": true,
+ "label": "Optimize (Difference)",
+ "visible": true
+ },
+ {
+ "id": 431,
+ "type": "separator"
+ },
+ {
+ "id": 432,
+ "enabled": true,
+ "label": "Waves...",
+ "visible": true
+ },
+ {
+ "id": 433,
+ "enabled": true,
+ "label": "Spinning Globe...",
+ "visible": true
+ },
+ {
+ "id": 434,
+ "enabled": true,
+ "label": "Rippling...",
+ "visible": true
+ },
+ {
+ "id": 435,
+ "enabled": true,
+ "label": "Burn-In...",
+ "visible": true
+ },
+ {
+ "id": 436,
+ "enabled": true,
+ "label": "Blend...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 437,
+ "enabled": true,
+ "label": "Web",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 438,
+ "enabled": true,
+ "label": "Slice...",
+ "visible": true
+ },
+ {
+ "id": 439,
+ "enabled": true,
+ "label": "Semi-Flatten",
+ "visible": true
+ },
+ {
+ "id": 440,
+ "enabled": true,
+ "label": "Image Map...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 441,
+ "enabled": true,
+ "label": "Render",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 442,
+ "enabled": true,
+ "label": "Spyrogimp...",
+ "visible": true
+ },
+ {
+ "id": 443,
+ "enabled": true,
+ "label": "Sphere Designer...",
+ "visible": true
+ },
+ {
+ "id": 444,
+ "enabled": true,
+ "label": "Line Nova...",
+ "visible": true
+ },
+ {
+ "id": 445,
+ "enabled": true,
+ "label": "Lava...",
+ "visible": true
+ },
+ {
+ "id": 446,
+ "enabled": true,
+ "label": "Gfig...",
+ "visible": true
+ },
+ {
+ "id": 447,
+ "enabled": true,
+ "label": "Fractal Explorer...",
+ "visible": true
+ },
+ {
+ "id": 448,
+ "enabled": true,
+ "label": "Circuit...",
+ "visible": true
+ },
+ {
+ "id": 449,
+ "type": "separator"
+ },
+ {
+ "id": 450,
+ "enabled": true,
+ "label": "Pattern",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 451,
+ "enabled": true,
+ "label": "Sinus...",
+ "visible": true
+ },
+ {
+ "id": 452,
+ "enabled": true,
+ "label": "Qbist...",
+ "visible": true
+ },
+ {
+ "id": 453,
+ "enabled": true,
+ "label": "Maze...",
+ "visible": true
+ },
+ {
+ "id": 454,
+ "enabled": true,
+ "label": "Jigsaw...",
+ "visible": true
+ },
+ {
+ "id": 455,
+ "enabled": true,
+ "label": "Grid...",
+ "visible": true
+ },
+ {
+ "id": 456,
+ "enabled": true,
+ "label": "Diffraction Patterns...",
+ "visible": true
+ },
+ {
+ "id": 457,
+ "enabled": true,
+ "label": "CML Explorer...",
+ "visible": true
+ },
+ {
+ "id": 458,
+ "enabled": true,
+ "label": "Checkerboard...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 459,
+ "enabled": true,
+ "label": "Nature",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 460,
+ "enabled": true,
+ "label": "IFS Fractal...",
+ "visible": true
+ },
+ {
+ "id": 461,
+ "enabled": true,
+ "label": "Flame...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 462,
+ "enabled": true,
+ "label": "Clouds",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 463,
+ "enabled": true,
+ "label": "Solid Noise...",
+ "visible": true
+ },
+ {
+ "id": 464,
+ "enabled": true,
+ "label": "Plasma...",
+ "visible": true
+ },
+ {
+ "id": 465,
+ "enabled": true,
+ "label": "Fog...",
+ "visible": true
+ },
+ {
+ "id": 466,
+ "enabled": true,
+ "label": "Difference Clouds...",
+ "visible": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": 467,
+ "enabled": true,
+ "label": "Map",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 468,
+ "enabled": true,
+ "label": "Warp...",
+ "visible": true
+ },
+ {
+ "id": 469,
+ "enabled": true,
+ "label": "Tile...",
+ "visible": true
+ },
+ {
+ "id": 470,
+ "enabled": true,
+ "label": "Small Tiles...",
+ "visible": true
+ },
+ {
+ "id": 471,
+ "enabled": true,
+ "label": "Paper Tile...",
+ "visible": true
+ },
+ {
+ "id": 472,
+ "enabled": true,
+ "label": "Map Object...",
+ "visible": true
+ },
+ {
+ "id": 473,
+ "enabled": true,
+ "label": "Make Seamless",
+ "visible": true
+ },
+ {
+ "id": 474,
+ "enabled": true,
+ "label": "Illusion...",
+ "visible": true
+ },
+ {
+ "id": 475,
+ "enabled": true,
+ "label": "Fractal Trace...",
+ "visible": true
+ },
+ {
+ "id": 476,
+ "enabled": true,
+ "label": "Displace...",
+ "visible": true
+ },
+ {
+ "id": 477,
+ "enabled": true,
+ "label": "Bump Map...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 478,
+ "enabled": true,
+ "label": "Decor",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 479,
+ "enabled": false,
+ "label": "Stencil Chrome...",
+ "visible": true
+ },
+ {
+ "id": 480,
+ "enabled": false,
+ "label": "Stencil Carve...",
+ "visible": true
+ },
+ {
+ "id": 481,
+ "enabled": false,
+ "label": "Slide...",
+ "visible": true
+ },
+ {
+ "id": 482,
+ "enabled": false,
+ "label": "Round Corners...",
+ "visible": true
+ },
+ {
+ "id": 483,
+ "enabled": true,
+ "label": "Old Photo...",
+ "visible": true
+ },
+ {
+ "id": 484,
+ "enabled": true,
+ "label": "Fuzzy Border...",
+ "visible": true
+ },
+ {
+ "id": 485,
+ "enabled": true,
+ "label": "Coffee Stain...",
+ "visible": true
+ },
+ {
+ "id": 486,
+ "enabled": true,
+ "label": "Add Border...",
+ "visible": true
+ },
+ {
+ "id": 487,
+ "enabled": true,
+ "label": "Add Bevel...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 488,
+ "enabled": true,
+ "label": "Artistic",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 489,
+ "enabled": true,
+ "label": "Weave...",
+ "visible": true
+ },
+ {
+ "id": 490,
+ "enabled": true,
+ "label": "Van Gogh (LIC)...",
+ "visible": true
+ },
+ {
+ "id": 491,
+ "enabled": true,
+ "label": "Softglow...",
+ "visible": true
+ },
+ {
+ "id": 492,
+ "enabled": true,
+ "label": "Predator...",
+ "visible": true
+ },
+ {
+ "id": 493,
+ "enabled": true,
+ "label": "Photocopy...",
+ "visible": true
+ },
+ {
+ "id": 494,
+ "enabled": true,
+ "label": "Oilify...",
+ "visible": true
+ },
+ {
+ "id": 495,
+ "enabled": true,
+ "label": "GIMPressionist...",
+ "visible": true
+ },
+ {
+ "id": 496,
+ "enabled": true,
+ "label": "Cubism...",
+ "visible": true
+ },
+ {
+ "id": 497,
+ "enabled": true,
+ "label": "Clothify...",
+ "visible": true
+ },
+ {
+ "id": 498,
+ "enabled": true,
+ "label": "Cartoon...",
+ "visible": true
+ },
+ {
+ "id": 499,
+ "enabled": true,
+ "label": "Apply Canvas...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 500,
+ "enabled": true,
+ "label": "Combine",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 501,
+ "enabled": true,
+ "label": "Filmstrip...",
+ "visible": true
+ },
+ {
+ "id": 502,
+ "enabled": true,
+ "label": "Depth Merge...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 503,
+ "enabled": true,
+ "label": "Generic",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 504,
+ "enabled": true,
+ "label": "Erode",
+ "visible": true
+ },
+ {
+ "id": 505,
+ "enabled": true,
+ "label": "Dilate",
+ "visible": true
+ },
+ {
+ "id": 506,
+ "enabled": true,
+ "label": "Convolution Matrix...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 507,
+ "enabled": true,
+ "label": "Edge-Detect",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 508,
+ "enabled": true,
+ "label": "Sobel...",
+ "visible": true
+ },
+ {
+ "id": 509,
+ "enabled": true,
+ "label": "Neon...",
+ "visible": true
+ },
+ {
+ "id": 510,
+ "enabled": true,
+ "label": "Laplace",
+ "visible": true
+ },
+ {
+ "id": 511,
+ "enabled": true,
+ "label": "Edge...",
+ "visible": true
+ },
+ {
+ "id": 512,
+ "enabled": true,
+ "label": "Difference of Gaussians...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 513,
+ "enabled": true,
+ "label": "Noise",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 514,
+ "enabled": true,
+ "label": "Spread...",
+ "visible": true
+ },
+ {
+ "id": 515,
+ "enabled": true,
+ "label": "Slur...",
+ "visible": true
+ },
+ {
+ "id": 516,
+ "enabled": true,
+ "label": "RGB Noise...",
+ "visible": true
+ },
+ {
+ "id": 517,
+ "enabled": true,
+ "label": "Pick...",
+ "visible": true
+ },
+ {
+ "id": 518,
+ "enabled": true,
+ "label": "Hurl...",
+ "visible": true
+ },
+ {
+ "id": 519,
+ "enabled": true,
+ "label": "HSV Noise...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 520,
+ "enabled": true,
+ "label": "Light and Shadow",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 521,
+ "enabled": true,
+ "label": "Glass Tile...",
+ "visible": true
+ },
+ {
+ "id": 522,
+ "enabled": true,
+ "label": "Apply Lens...",
+ "visible": true
+ },
+ {
+ "id": 523,
+ "type": "separator"
+ },
+ {
+ "id": 524,
+ "enabled": true,
+ "label": "Xach-Effect...",
+ "visible": true
+ },
+ {
+ "id": 525,
+ "enabled": true,
+ "label": "Perspective...",
+ "visible": true
+ },
+ {
+ "id": 526,
+ "enabled": true,
+ "label": "Drop Shadow...",
+ "visible": true
+ },
+ {
+ "id": 527,
+ "type": "separator"
+ },
+ {
+ "id": 528,
+ "enabled": true,
+ "label": "Supernova...",
+ "visible": true
+ },
+ {
+ "id": 529,
+ "enabled": true,
+ "label": "Sparkle...",
+ "visible": true
+ },
+ {
+ "id": 530,
+ "enabled": true,
+ "label": "Lighting Effects...",
+ "visible": true
+ },
+ {
+ "id": 531,
+ "enabled": true,
+ "label": "Lens Flare...",
+ "visible": true
+ },
+ {
+ "id": 532,
+ "enabled": true,
+ "label": "Gradient Flare...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 533,
+ "enabled": true,
+ "label": "Distorts",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 534,
+ "enabled": true,
+ "label": "Wind...",
+ "visible": true
+ },
+ {
+ "id": 535,
+ "enabled": true,
+ "label": "Whirl and Pinch...",
+ "visible": true
+ },
+ {
+ "id": 536,
+ "enabled": true,
+ "label": "Waves...",
+ "visible": true
+ },
+ {
+ "id": 537,
+ "enabled": true,
+ "label": "Video...",
+ "visible": true
+ },
+ {
+ "id": 538,
+ "enabled": true,
+ "label": "Value Propagate...",
+ "visible": true
+ },
+ {
+ "id": 539,
+ "enabled": true,
+ "label": "Shift...",
+ "visible": true
+ },
+ {
+ "id": 540,
+ "enabled": true,
+ "label": "Ripple...",
+ "visible": true
+ },
+ {
+ "id": 541,
+ "enabled": true,
+ "label": "Polar Coordinates...",
+ "visible": true
+ },
+ {
+ "id": 542,
+ "enabled": true,
+ "label": "Pagecurl...",
+ "visible": true
+ },
+ {
+ "id": 543,
+ "enabled": true,
+ "label": "Newsprint...",
+ "visible": true
+ },
+ {
+ "id": 544,
+ "enabled": true,
+ "label": "Mosaic...",
+ "visible": true
+ },
+ {
+ "id": 545,
+ "enabled": true,
+ "label": "Lens Distortion...",
+ "visible": true
+ },
+ {
+ "id": 546,
+ "enabled": true,
+ "label": "IWarp...",
+ "visible": true
+ },
+ {
+ "id": 547,
+ "enabled": true,
+ "label": "Erase Every Other Row...",
+ "visible": true
+ },
+ {
+ "id": 548,
+ "enabled": true,
+ "label": "Engrave...",
+ "visible": true
+ },
+ {
+ "id": 549,
+ "enabled": true,
+ "label": "Emboss...",
+ "visible": true
+ },
+ {
+ "id": 550,
+ "enabled": true,
+ "label": "Curve Bend...",
+ "visible": true
+ },
+ {
+ "id": 551,
+ "enabled": true,
+ "label": "Blinds...",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 552,
+ "enabled": true,
+ "label": "Enhance",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 553,
+ "enabled": true,
+ "label": "Unsharp Mask...",
+ "visible": true
+ },
+ {
+ "id": 554,
+ "enabled": true,
+ "label": "Sharpen...",
+ "visible": true
+ },
+ {
+ "id": 555,
+ "enabled": true,
+ "label": "Red Eye Removal...",
+ "visible": true
+ },
+ {
+ "id": 556,
+ "enabled": false,
+ "label": "NL Filter...",
+ "visible": true
+ },
+ {
+ "id": 557,
+ "enabled": true,
+ "label": "Destripe...",
+ "visible": true
+ },
+ {
+ "id": 558,
+ "enabled": true,
+ "label": "Despeckle...",
+ "visible": true
+ },
+ {
+ "id": 559,
+ "enabled": true,
+ "label": "Deinterlace...",
+ "visible": true
+ },
+ {
+ "id": 560,
+ "enabled": true,
+ "label": "Antialias",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 561,
+ "enabled": true,
+ "label": "Blur",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 562,
+ "enabled": true,
+ "label": "Tileable Blur...",
+ "visible": true
+ },
+ {
+ "id": 563,
+ "enabled": true,
+ "label": "Selective Gaussian Blur...",
+ "visible": true
+ },
+ {
+ "id": 564,
+ "enabled": true,
+ "label": "Pixelize...",
+ "visible": true
+ },
+ {
+ "id": 565,
+ "enabled": true,
+ "label": "Motion Blur...",
+ "visible": true
+ },
+ {
+ "id": 566,
+ "enabled": true,
+ "label": "Gaussian Blur...",
+ "visible": true
+ },
+ {
+ "id": 567,
+ "enabled": true,
+ "label": "Blur",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 568,
+ "type": "separator"
+ },
+ {
+ "id": 569,
+ "enabled": true,
+ "label": "Reset all Filters",
+ "visible": true
+ },
+ {
+ "id": 570,
+ "shortcut": [["Control", "Shift", "f"]],
+ "enabled": false,
+ "label": "Re-Show Last",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 571,
+ "enabled": false,
+ "label": "Empty",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 572,
+ "shortcut": [["Control", "f"]],
+ "enabled": false,
+ "label": "Repeat Last",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 573,
+ "enabled": true,
+ "label": "Windows",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 574,
+ "shortcut": [["Control", "b"]],
+ "enabled": true,
+ "label": "Toolbox",
+ "visible": true
+ },
+ {
+ "id": 575,
+ "type": "separator"
+ },
+ {
+ "id": 576,
+ "enabled": true,
+ "label": "Dockable Dialogs",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 577,
+ "enabled": true,
+ "label": "Error Console",
+ "visible": true
+ },
+ {
+ "id": 578,
+ "enabled": true,
+ "label": "Tools",
+ "visible": true
+ },
+ {
+ "id": 579,
+ "enabled": true,
+ "label": "Templates",
+ "visible": true
+ },
+ {
+ "id": 580,
+ "enabled": true,
+ "label": "Document History",
+ "visible": true
+ },
+ {
+ "id": 581,
+ "enabled": true,
+ "label": "Images",
+ "visible": true
+ },
+ {
+ "id": 582,
+ "type": "separator"
+ },
+ {
+ "id": 583,
+ "enabled": true,
+ "label": "Buffers",
+ "visible": true
+ },
+ {
+ "id": 584,
+ "enabled": true,
+ "label": "Fonts",
+ "visible": true
+ },
+ {
+ "id": 585,
+ "enabled": true,
+ "label": "Palettes",
+ "visible": true
+ },
+ {
+ "id": 586,
+ "shortcut": [["Control", "g"]],
+ "enabled": true,
+ "label": "Gradients",
+ "visible": true
+ },
+ {
+ "id": 587,
+ "shortcut": [["Control", "Shift", "p"]],
+ "enabled": true,
+ "label": "Patterns",
+ "visible": true
+ },
+ {
+ "id": 588,
+ "shortcut": [["Control", "Shift", "b"]],
+ "enabled": true,
+ "label": "Brushes",
+ "visible": true
+ },
+ {
+ "id": 589,
+ "enabled": true,
+ "label": "Colors",
+ "visible": true
+ },
+ {
+ "id": 590,
+ "type": "separator"
+ },
+ {
+ "id": 591,
+ "enabled": true,
+ "label": "Sample Points",
+ "visible": true
+ },
+ {
+ "id": 592,
+ "enabled": true,
+ "label": "Pointer",
+ "visible": true
+ },
+ {
+ "id": 593,
+ "enabled": true,
+ "label": "Undo History",
+ "visible": true
+ },
+ {
+ "id": 594,
+ "enabled": true,
+ "label": "Navigation",
+ "visible": true
+ },
+ {
+ "id": 595,
+ "enabled": true,
+ "label": "Selection Editor",
+ "visible": true
+ },
+ {
+ "id": 596,
+ "enabled": true,
+ "label": "Histogram",
+ "visible": true
+ },
+ {
+ "id": 597,
+ "enabled": true,
+ "label": "Colormap",
+ "visible": true
+ },
+ {
+ "id": 598,
+ "enabled": true,
+ "label": "Paths",
+ "visible": true
+ },
+ {
+ "id": 599,
+ "enabled": true,
+ "label": "Channels",
+ "visible": true
+ },
+ {
+ "id": 600,
+ "shortcut": [["Control", "l"]],
+ "enabled": true,
+ "label": "Layers",
+ "visible": true
+ },
+ {
+ "id": 601,
+ "type": "separator"
+ },
+ {
+ "id": 602,
+ "enabled": true,
+ "label": "Device Status",
+ "visible": true
+ },
+ {
+ "id": 603,
+ "enabled": true,
+ "label": "Tool Options",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 604,
+ "enabled": true,
+ "label": "Recently Closed Docks",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 605,
+ "enabled": false,
+ "label": "Empty",
+ "visible": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": 606,
+ "enabled": true,
+ "label": "Help",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 607,
+ "enabled": true,
+ "label": "User Manual",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 608,
+ "enabled": true,
+ "label": "Working with Digital Camera Photos",
+ "visible": true
+ },
+ {
+ "id": 609,
+ "enabled": true,
+ "label": "Using Paths",
+ "visible": true
+ },
+ {
+ "id": 610,
+ "enabled": true,
+ "label": "Preparing your Images for the Web",
+ "visible": true
+ },
+ {
+ "id": 611,
+ "enabled": true,
+ "label": "How to Use Dialogs",
+ "visible": true
+ },
+ {
+ "id": 612,
+ "enabled": true,
+ "label": "Drawing Simple Objects",
+ "visible": true
+ },
+ {
+ "id": 613,
+ "enabled": true,
+ "label": "Create, Open and Save Files",
+ "visible": true
+ },
+ {
+ "id": 614,
+ "enabled": true,
+ "label": "Basic Concepts",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 615,
+ "enabled": true,
+ "label": "GIMP Online",
+ "children-display": "submenu",
+ "visible": true,
+ "submenu": [
+ {
+ "id": 616,
+ "enabled": true,
+ "label": "User Manual Web Site",
+ "visible": true
+ },
+ {
+ "id": 617,
+ "enabled": true,
+ "label": "Plug-in Registry",
+ "visible": true
+ },
+ {
+ "id": 618,
+ "enabled": true,
+ "label": "Main Web Site",
+ "visible": true
+ },
+ {
+ "id": 619,
+ "enabled": true,
+ "label": "Developer Web Site",
+ "visible": true
+ }
+ ]
+ },
+ {
+ "id": 620,
+ "type": "separator"
+ },
+ {
+ "id": 621,
+ "enabled": true,
+ "label": "Procedure Browser",
+ "visible": true
+ },
+ {
+ "id": 622,
+ "enabled": true,
+ "label": "Plug-In Browser",
+ "visible": true
+ },
+ {
+ "id": 623,
+ "type": "separator"
+ },
+ {
+ "id": 624,
+ "enabled": true,
+ "label": "About",
+ "visible": true
+ },
+ {
+ "id": 625,
+ "enabled": true,
+ "label": "Tip of the Day",
+ "visible": true
+ },
+ {
+ "id": 626,
+ "shortcut": [["Shift", "F1"]],
+ "enabled": true,
+ "label": "Context Help",
+ "visible": true
+ },
+ {
+ "id": 627,
+ "shortcut": [["F1"]],
+ "enabled": true,
+ "label": "Help",
+ "visible": true
+ }
+ ]
+ }
+ ]
+}
diff --git a/tests/test-json-client.c b/tests/test-json-client.c
new file mode 100644
index 0000000..f9da55e
--- /dev/null
+++ b/tests/test-json-client.c
@@ -0,0 +1,75 @@
+/*
+Test to check the json-loader and dbusmenu-dumper
+
+Copyright 2010 Canonical Ltd.
+
+Authors:
+ Ted Gould <ted@canonical.com>
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 3, as published
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranties of
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <glib.h>
+#include <gio/gio.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-bindings.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+GMainLoop * mainloop = NULL;
+
+int
+main (int argc, char ** argv)
+{
+ g_type_init();
+ g_debug("Wait for friends");
+
+ GError * error = NULL;
+ DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+ if (error != NULL) {
+ g_error("Unable to get session bus: %s", error->message);
+ return 1;
+ }
+
+ DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
+
+ gboolean has_owner = FALSE;
+ gint owner_count = 0;
+ while (!has_owner && owner_count < 10000) {
+ org_freedesktop_DBus_name_has_owner(bus_proxy, "org.dbusmenu.test", &has_owner, NULL);
+ owner_count++;
+ }
+
+ if (owner_count == 10000) {
+ g_error("Unable to get name owner after 10000 tries");
+ return 1;
+ }
+
+ g_usleep(500000);
+
+ g_debug("Initing");
+
+ gchar * command = g_strdup_printf("%s --dbus-name=org.dbusmenu.test --dbus-object=/org/test", argv[1]);
+ g_debug("Executing: %s", command);
+
+ gchar * output;
+ g_spawn_command_line_sync(command, &output, NULL, NULL, NULL);
+
+ GFile * ofile = g_file_new_for_commandline_arg(argv[2]);
+ if (ofile != NULL) {
+ g_file_replace_contents(ofile, output, g_utf8_strlen(output, -1), NULL, FALSE, 0, NULL, NULL, NULL);
+ }
+
+ g_debug("Exiting");
+
+ return 0;
+}
diff --git a/tests/test-json-server.c b/tests/test-json-server.c
new file mode 100644
index 0000000..fe9507a
--- /dev/null
+++ b/tests/test-json-server.c
@@ -0,0 +1,81 @@
+/*
+Test to check the json-loader and dbusmenu-dumper
+
+Copyright 2010 Canonical Ltd.
+
+Authors:
+ Ted Gould <ted@canonical.com>
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 3, as published
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranties of
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <glib.h>
+
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
+#include <dbus/dbus-glib-bindings.h>
+
+#include <libdbusmenu-glib/server.h>
+#include <libdbusmenu-glib/menuitem.h>
+
+#include "json-loader.h"
+
+static GMainLoop * mainloop = NULL;
+
+static gboolean
+timer_func (gpointer data)
+{
+ g_main_loop_quit(mainloop);
+ return FALSE;
+}
+
+int
+main (int argc, char ** argv)
+{
+ GError * error = NULL;
+
+ g_type_init();
+
+ DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
+ g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL))));
+
+ DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
+ guint nameret = 0;
+
+ if (!org_freedesktop_DBus_request_name(bus_proxy, "org.dbusmenu.test", 0, &nameret, &error)) {
+ g_error("Unable to call to request name");
+ return 1;
+ }
+
+ if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
+ g_error("Unable to get name");
+ return 1;
+ }
+
+ DbusmenuServer * server = dbusmenu_server_new("/org/test");
+
+ DbusmenuMenuitem * root = dbusmenu_json_build_from_file(argv[1]);
+ g_return_val_if_fail(root!=NULL, 1);
+
+ dbusmenu_server_set_root(server, root);
+
+ g_timeout_add(10000, timer_func, NULL);
+
+ mainloop = g_main_loop_new(NULL, FALSE);
+ g_main_loop_run(mainloop);
+
+ g_debug("Quiting");
+
+ return 0;
+}
diff --git a/tools/dbusmenu-dumper.c b/tools/dbusmenu-dumper.c
index 55d631e..6ce9655 100644
--- a/tools/dbusmenu-dumper.c
+++ b/tools/dbusmenu-dumper.c
@@ -25,8 +25,110 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libdbusmenu-glib/client.h>
#include <libdbusmenu-glib/menuitem.h>
+#include <dbus/dbus-gtype-specialized.h>
+
static GMainLoop * mainloop = NULL;
+static gchar * value2string (const GValue * value, int depth);
+
+static gchar *
+strv_dumper(const GValue * value)
+{
+ gchar ** strv = (gchar **)g_value_get_boxed(value);
+
+ gchar * joined = g_strjoinv("\", \"", strv);
+ gchar * retval = g_strdup_printf("[\"%s\"]", joined);
+ g_free(joined);
+ return retval;
+}
+
+typedef struct _collection_iterator_t collection_iterator_t;
+struct _collection_iterator_t {
+ gchar * space;
+ GPtrArray * array;
+ gboolean first;
+ int depth;
+};
+
+static void
+collection_iterate (const GValue * value, gpointer user_data)
+{
+ collection_iterator_t * iter = (collection_iterator_t *)user_data;
+
+ gchar * str = value2string(value, iter->depth);
+ gchar * retval = NULL;
+
+ if (iter->first) {
+ iter->first = FALSE;
+ retval = g_strdup_printf("\n%s%s", iter->space, str);
+ } else {
+ retval = g_strdup_printf(",\n%s%s", iter->space, str);
+ }
+
+ g_ptr_array_add(iter->array, retval);
+ g_free(str);
+
+ return;
+}
+
+static gchar *
+collection_dumper (const GValue * value, int depth)
+{
+ gchar * space = g_strnfill(depth, ' ');
+ GPtrArray * array = g_ptr_array_new_with_free_func(g_free);
+
+ g_ptr_array_add(array, g_strdup("["));
+
+ collection_iterator_t iter;
+ iter.space = space;
+ iter.array = array;
+ iter.first = TRUE;
+ iter.depth = depth + 2;
+
+ dbus_g_type_collection_value_iterate(value, collection_iterate, &iter);
+
+ g_ptr_array_add(array, g_strdup_printf("\n%s]", space));
+
+ g_free(space);
+
+ gchar * retstr = NULL;
+ if (array->len == 3) {
+ retstr = g_strdup_printf("[%s]", ((gchar *)array->pdata[1]) + depth + 1/*for newline*/);
+ } else {
+ retstr = g_strjoinv(NULL, (gchar **)array->pdata);
+ }
+
+ g_ptr_array_free(array, TRUE);
+
+ return retstr;
+}
+
+static gchar *
+value2string (const GValue * value, int depth)
+{
+ gchar * str = NULL;
+
+ if (value == NULL) {
+ return g_strdup("(null)");
+ }
+
+ if (dbus_g_type_is_collection(G_VALUE_TYPE(value))) {
+ str = collection_dumper(value, depth);
+ } else if (G_VALUE_TYPE(value) == G_TYPE_STRV) {
+ str = strv_dumper(value);
+ } else if (G_VALUE_TYPE(value) == G_TYPE_BOOLEAN) {
+ if (g_value_get_boolean(value)) {
+ str = g_strdup("true");
+ } else {
+ str = g_strdup("false");
+ }
+ } else {
+ str = g_strdup_value_contents(value);
+ }
+
+ return str;
+}
+
static void
print_menuitem (DbusmenuMenuitem * item, int depth)
{
@@ -36,11 +138,10 @@ print_menuitem (DbusmenuMenuitem * item, int depth)
GList * properties = dbusmenu_menuitem_properties_list(item);
GList * property;
for (property = properties; property != NULL; property = g_list_next(property)) {
- GValue value = {0};
- g_value_init(&value, G_TYPE_STRING);
- g_value_transform(dbusmenu_menuitem_property_get_value(item, (gchar *)property->data), &value);
- g_print(",\n%s\"%s\": \"%s\"", space, (gchar *)property->data, g_value_get_string(&value));
- g_value_unset(&value);
+ const GValue * value = dbusmenu_menuitem_property_get_value(item, (gchar *)property->data);
+ gchar * str = value2string(value, depth + g_utf8_strlen((gchar *)property->data, -1) + 2 /*quotes*/ + 2 /*: */);
+ g_print(",\n%s\"%s\": %s", space, (gchar *)property->data, str);
+ g_free(str);
}
g_list_free(properties);