From b29f86be192fda821b7245b6159fa1aefc623a40 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Jun 2010 13:10:18 -0500 Subject: Adding in a new gtester test suite. --- tests/Makefile.am | 32 ++++++++++++++++++++++- tests/test-gtk-objects.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 tests/test-gtk-objects.c (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index cfa1399..6482d09 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,6 +7,7 @@ TESTS = \ test-glib-properties \ test-glib-proxy \ test-glib-simple-items \ + test-gtk-objects-test \ test-gtk-label \ test-gtk-reorder @@ -20,6 +21,7 @@ check_PROGRAMS = \ test-glib-proxy-client \ test-glib-proxy-server \ test-glib-proxy-proxy \ + test-gtk-objects \ test-gtk-label-client \ test-gtk-label-server \ test-glib-simple-items \ @@ -196,6 +198,33 @@ test_glib_simple_items_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGLIB_LIBS) +###################### +# Test GTK Object +###################### + +GTK_OBJECT_XML_REPORT = test-gtk-objects.xml + +test-gtk-objects-test: test-gtk-objects Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task gtester --parameter --verbose --parameter -k --parameter -o --parameter $(GTK_OBJECT_XML_REPORT) --parameter ./test-gtk-objects >> $@ + @chmod +x $@ + +test_gtk_objects_SOURCES = \ + test-gtk-objects.c + +test_gtk_objects_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGLIB_CFLAGS) \ + $(DBUSMENUGTK_CFLAGS) \ + -Wall -Werror + +test_gtk_objects_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGLIB_LIBS) \ + $(DBUSMENUGTK_LIBS) + ######################### # Test GTK Label ######################### @@ -322,5 +351,6 @@ distclean-local: DISTCLEANFILES = \ $(TESTS) \ - $(OBJECT_XML_REPORT) + $(OBJECT_XML_REPORT) \ + $(GTK_OBJECT_XML_REPORT) diff --git a/tests/test-gtk-objects.c b/tests/test-gtk-objects.c new file mode 100644 index 0000000..561f91e --- /dev/null +++ b/tests/test-gtk-objects.c @@ -0,0 +1,67 @@ +/* +Testing for the various objects just by themselves. + +Copyright 2010 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ + +#include +#include + +/* Building the basic menu item, make sure we didn't break + any core GObject stuff */ +static void +test_object_menuitem (void) +{ + /* Build a menu item */ + DbusmenuMenuitem * item = dbusmenu_menuitem_new(); + + /* Test to make sure it's a happy object */ + g_assert(item != NULL); + g_assert(G_IS_OBJECT(item)); + g_assert(DBUSMENU_IS_MENUITEM(item)); + + /* Set up a check to make sure it gets destroyed on unref */ + g_object_add_weak_pointer(G_OBJECT(item), (gpointer *)&item); + g_object_unref(item); + + /* Did it go away? */ + g_assert(item == NULL); + + return; +} + +/* Build the test suite */ +static void +test_gtk_objects_suite (void) +{ + g_test_add_func ("/dbusmenu/gtk/objects/menuitem/base", test_object_menuitem); + return; +} + +gint +main (gint argc, gchar * argv[]) +{ + gtk_init(&argc, &argv); + + g_test_init(&argc, &argv, NULL); + + /* Test suites */ + test_gtk_objects_suite(); + + return g_test_run (); +} -- cgit v1.2.3 From c78d1b4b827e13ee4e498516e14a56571e8a8b5f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Jun 2010 13:29:49 -0500 Subject: Adding a test image --- tests/test-gtk-objects.jpg | Bin 0 -> 14376 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/test-gtk-objects.jpg (limited to 'tests') diff --git a/tests/test-gtk-objects.jpg b/tests/test-gtk-objects.jpg new file mode 100644 index 0000000..478704e Binary files /dev/null and b/tests/test-gtk-objects.jpg differ -- cgit v1.2.3 From ecf64a2f000ee9666a263afe23075d36bf2efe9a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Jun 2010 13:54:12 -0500 Subject: Adding in a test for the pixbuf property --- tests/Makefile.am | 1 + tests/test-gtk-objects.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 6482d09..b21c346 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -217,6 +217,7 @@ test_gtk_objects_CFLAGS = \ -I $(srcdir)/.. \ $(DBUSMENUGLIB_CFLAGS) \ $(DBUSMENUGTK_CFLAGS) \ + -DSRCDIR="\"$(srcdir)\"" \ -Wall -Werror test_gtk_objects_LDADD = \ diff --git a/tests/test-gtk-objects.c b/tests/test-gtk-objects.c index 561f91e..c9f9c4c 100644 --- a/tests/test-gtk-objects.c +++ b/tests/test-gtk-objects.c @@ -22,6 +22,8 @@ with this program. If not, see . #include #include +#define TEST_IMAGE SRCDIR "/" "test-gtk-objects.jpg" + /* Building the basic menu item, make sure we didn't break any core GObject stuff */ static void @@ -45,11 +47,49 @@ test_object_menuitem (void) return; } +/* Setting and getting a pixbuf */ +static void +test_object_prop_pixbuf (void) +{ + const gchar * prop_name = "image-test"; + + /* Build a menu item */ + DbusmenuMenuitem * item = dbusmenu_menuitem_new(); + + /* Test to make sure it's a happy object */ + g_assert(item != NULL); + g_assert(G_IS_OBJECT(item)); + g_assert(DBUSMENU_IS_MENUITEM(item)); + + /* Load our image */ + GdkPixbuf * pixbuf = gdk_pixbuf_new_from_file(TEST_IMAGE, NULL); + g_assert(pixbuf != NULL); + + /* Set the property */ + gboolean success = dbusmenu_menuitem_property_set_image(item, prop_name, pixbuf); + g_assert(success); + g_object_unref(pixbuf); + + /* Check to see if it's set */ + const GValue * val = dbusmenu_menuitem_property_get_value(item, prop_name); + g_assert(val != NULL); + + /* Get the pixbuf back! */ + GdkPixbuf * newpixbuf = dbusmenu_menuitem_property_get_image(item, prop_name); + g_assert(newpixbuf != NULL); + g_object_unref(newpixbuf); + + g_object_unref(item); + + return; +} + /* Build the test suite */ static void test_gtk_objects_suite (void) { g_test_add_func ("/dbusmenu/gtk/objects/menuitem/base", test_object_menuitem); + g_test_add_func ("/dbusmenu/gtk/objects/menuitem/prop_pixbuf", test_object_prop_pixbuf); return; } -- cgit v1.2.3 From 13fd7c6e7182b3142c6951098dcd2172c9ddf4ca Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Jun 2010 14:09:09 -0500 Subject: Add a test to set the shortcut on a menuitem --- tests/test-gtk-objects.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tests') diff --git a/tests/test-gtk-objects.c b/tests/test-gtk-objects.c index c9f9c4c..92f2469 100644 --- a/tests/test-gtk-objects.c +++ b/tests/test-gtk-objects.c @@ -21,6 +21,7 @@ with this program. If not, see . #include #include +#include #define TEST_IMAGE SRCDIR "/" "test-gtk-objects.jpg" @@ -84,12 +85,41 @@ test_object_prop_pixbuf (void) return; } +/* Setting and getting a shortcut */ +static void +test_object_prop_shortcut (void) +{ + /* Build a menu item */ + DbusmenuMenuitem * item = dbusmenu_menuitem_new(); + + /* Test to make sure it's a happy object */ + g_assert(item != NULL); + g_assert(G_IS_OBJECT(item)); + g_assert(DBUSMENU_IS_MENUITEM(item)); + + guint key = GDK_c; + GdkModifierType modifier = GDK_CONTROL_MASK; + + /* Set a shortcut */ + gboolean success = dbusmenu_menuitem_property_set_shortcut(item, key, modifier); + g_assert(success); + + /* Check for value */ + const GValue * val = dbusmenu_menuitem_property_get_value(item, DBUSMENU_MENUITEM_PROP_SHORTCUT); + g_assert(val != NULL); + + g_object_unref(item); + + return; +} + /* Build the test suite */ static void test_gtk_objects_suite (void) { g_test_add_func ("/dbusmenu/gtk/objects/menuitem/base", test_object_menuitem); g_test_add_func ("/dbusmenu/gtk/objects/menuitem/prop_pixbuf", test_object_prop_pixbuf); + g_test_add_func ("/dbusmenu/gtk/objects/menuitem/prop_shortcut", test_object_prop_shortcut); return; } -- cgit v1.2.3 From 01b4ed50a28d5e340462b5371802006260519a11 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Jun 2010 14:20:34 -0500 Subject: Putting more sensible names in the gtester output --- tests/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index b21c346..d608860 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -86,7 +86,7 @@ OBJECT_XML_REPORT = test-glib-objects.xml test-glib-objects-test: test-glib-objects Makefile.am @echo "#!/bin/bash" > $@ - @echo $(DBUS_RUNNER) --task gtester --parameter --verbose --parameter -k --parameter -o --parameter $(OBJECT_XML_REPORT) --parameter ./test-glib-objects >> $@ + @echo $(DBUS_RUNNER) --task gtester --task-name test --parameter --verbose --parameter -k --parameter -o --parameter $(OBJECT_XML_REPORT) --parameter ./test-glib-objects >> $@ @chmod +x $@ test_glib_objects_SOURCES = \ @@ -207,7 +207,7 @@ GTK_OBJECT_XML_REPORT = test-gtk-objects.xml test-gtk-objects-test: test-gtk-objects Makefile.am @echo "#!/bin/bash" > $@ @echo $(XVFB_RUN) >> $@ - @echo $(DBUS_RUNNER) --task gtester --parameter --verbose --parameter -k --parameter -o --parameter $(GTK_OBJECT_XML_REPORT) --parameter ./test-gtk-objects >> $@ + @echo $(DBUS_RUNNER) --task gtester --task-name test --parameter --verbose --parameter -k --parameter -o --parameter $(GTK_OBJECT_XML_REPORT) --parameter ./test-gtk-objects >> $@ @chmod +x $@ test_gtk_objects_SOURCES = \ -- cgit v1.2.3 From ac0a5299c1fe73acb30f34939dfcd6af57c12231 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Jun 2010 14:52:26 -0500 Subject: Testing we can get the modifier back out. --- tests/test-gtk-objects.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/test-gtk-objects.c b/tests/test-gtk-objects.c index 92f2469..726f404 100644 --- a/tests/test-gtk-objects.c +++ b/tests/test-gtk-objects.c @@ -108,6 +108,14 @@ test_object_prop_shortcut (void) const GValue * val = dbusmenu_menuitem_property_get_value(item, DBUSMENU_MENUITEM_PROP_SHORTCUT); g_assert(val != NULL); + /* Check to see if we love it */ + guint newkey = 0; + GdkModifierType newmodifier = 0; + dbusmenu_menuitem_property_get_shortcut(item, &newkey, &newmodifier); + + g_assert(key == newkey); + g_assert(newmodifier == modifier); + g_object_unref(item); return; -- cgit v1.2.3 From 53e80ec1652a9519a7e546d7055527eb7b5ad2aa Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Jun 2010 15:00:57 -0500 Subject: Sending the test image along with the other data. --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index d608860..00297bd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -324,6 +324,7 @@ EXTRA_DIST = \ $(examples_DATA) \ run-xvfb.sh \ $(json_DATA) \ + test-gtk-objects.jpg \ dbusmenu-gtk/dbusMenuTest \ dbusmenu-gtk/mago_tests/dbusmenu.xml \ dbusmenu-gtk/mago_tests/dbusmenu.py \ -- cgit v1.2.3 From d1cf581703855139e5759ed2fd7b3c49157061ad Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Jun 2010 21:04:19 -0500 Subject: Building a shortcut test --- .bzrignore | 3 ++ tests/Makefile.am | 43 +++++++++++++++++ tests/test-gtk-shortcut-client.c | 75 ++++++++++++++++++++++++++++++ tests/test-gtk-shortcut-server.c | 99 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 220 insertions(+) create mode 100644 tests/test-gtk-shortcut-client.c create mode 100644 tests/test-gtk-shortcut-server.c (limited to 'tests') diff --git a/.bzrignore b/.bzrignore index 02b481f..0f5b495 100644 --- a/.bzrignore +++ b/.bzrignore @@ -74,3 +74,6 @@ libdbusmenu-gtk/DbusmenuGtk-0.2.vapi tests/test-gtk-objects tests/test-gtk-objects-test tests/test-gtk-objects.xml +tests/test-gtk-shortcut +tests/test-gtk-shortcut-client +tests/test-gtk-shortcut-server diff --git a/tests/Makefile.am b/tests/Makefile.am index 00297bd..356146f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -9,6 +9,7 @@ TESTS = \ test-glib-simple-items \ test-gtk-objects-test \ test-gtk-label \ + test-gtk-shortcut \ test-gtk-reorder check_PROGRAMS = \ @@ -24,6 +25,8 @@ check_PROGRAMS = \ test-gtk-objects \ test-gtk-label-client \ test-gtk-label-server \ + test-gtk-shortcut-client \ + test-gtk-shortcut-server \ test-glib-simple-items \ test-gtk-reorder-server @@ -266,6 +269,46 @@ test_gtk_label_client_LDADD = \ $(DBUSMENUGTK_LIBS) \ $(DBUSMENUTESTS_LIBS) +######################### +# Test GTK Shortcut +######################### + +test-gtk-shortcut: test-gtk-shortcut-client test-gtk-shortcut-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task ./test-gtk-shortcut-client --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +test_gtk_shortcut_server_SOURCES = \ + test-gtk-shortcut-server.c + +test_gtk_shortcut_server_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_shortcut_server_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + +test_gtk_shortcut_client_SOURCES = \ + test-gtk-shortcut-client.c + +test_gtk_shortcut_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_shortcut_client_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + ######################### # Test GTK Reorder ######################### diff --git a/tests/test-gtk-shortcut-client.c b/tests/test-gtk-shortcut-client.c new file mode 100644 index 0000000..26e1531 --- /dev/null +++ b/tests/test-gtk-shortcut-client.c @@ -0,0 +1,75 @@ +/* +A test for libdbusmenu to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ + +#include +#include +#include + +static GMainLoop * mainloop = NULL; +static gboolean passed = TRUE; +static guint death_timer = 0; + +static gboolean +timer_func (gpointer data) +{ + passed = TRUE; + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char ** argv) +{ + gtk_init(&argc, &argv); + + g_debug("Building Window"); + GtkWidget * window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + GtkWidget * menubar = gtk_menu_bar_new(); + GtkWidget * menuitem = gtk_menu_item_new_with_label("Test"); + + DbusmenuGtkMenu * dmenu = dbusmenu_gtkmenu_new ("glib.label.test", "/org/test"); + DbusmenuGtkClient * dclient = dbusmenu_gtkmenu_get_client(dmenu); + + GtkAccelGroup * agroup = gtk_accel_group_new(); + dbusmenu_gtkclient_set_accel_group(dclient, agroup); + + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(dmenu)); + gtk_widget_show(menuitem); + gtk_menu_bar_append(menubar, menuitem); + gtk_widget_show(menubar); + gtk_container_add(GTK_CONTAINER(window), menubar); + gtk_window_set_title(GTK_WINDOW(window), "libdbusmenu-gtk test"); + gtk_widget_show(window); + + death_timer = g_timeout_add_seconds(10, timer_func, window); + + g_debug("Entering Mainloop"); + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + if (passed) { + g_debug("Quiting"); + return 0; + } else { + g_debug("Quiting as we're a failure"); + return 1; + } +} diff --git a/tests/test-gtk-shortcut-server.c b/tests/test-gtk-shortcut-server.c new file mode 100644 index 0000000..428f558 --- /dev/null +++ b/tests/test-gtk-shortcut-server.c @@ -0,0 +1,99 @@ +/* +A test for libdbusmenu to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +GMainLoop * mainloop = NULL; +DbusmenuServer * server = NULL; + +gboolean +timer_func (gpointer userdata) +{ + g_main_loop_quit(mainloop); + return FALSE; +} + +void +build_menu (void) +{ + DbusmenuMenuitem * item; + + DbusmenuMenuitem * root = dbusmenu_menuitem_new(); + + item = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set(item, DBUSMENU_MENUITEM_PROP_LABEL, "Control-C"); + dbusmenu_menuitem_property_set_shortcut(item, GDK_c, GDK_CONTROL_MASK); + dbusmenu_menuitem_child_append(root, item); + g_object_unref(item); + + + dbusmenu_server_set_root(server, root); + g_object_unref(root); + + return; +} + +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, "glib.label.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; + } + + server = dbusmenu_server_new("/org/test"); + build_menu(); + + g_timeout_add_seconds(10, timer_func, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + g_debug("Quiting"); + + return 0; +} + -- cgit v1.2.3 From 02a8c4e2b1eff14575d1cb78fb35b483f1e35ad7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Jun 2010 23:57:38 -0500 Subject: More robust comparison --- tests/run-xvfb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/run-xvfb.sh b/tests/run-xvfb.sh index 3622dbf..3aa05c1 100644 --- a/tests/run-xvfb.sh +++ b/tests/run-xvfb.sh @@ -1,4 +1,4 @@ -if [ "$DISPLAY" == "" ]; then +if [ "x$DISPLAY" == "x" ]; then Xvfb -ac -noreset -screen 0 800x600x16 -help 2>/dev/null 1>&2 XID=`for id in 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 ; do test -e /tmp/.X$id-lock || { echo $id; exit 0; }; done; exit 1` { Xvfb -ac -noreset -screen 0 800x600x16 :$XID -screen 0 800x600x16 -nolisten tcp -auth /dev/null >/dev/null 2>&1 & trap "kill -15 $! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } -- cgit v1.2.3 From fca6f989e2c563ac071322a0f664bdebdcfdf79e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 15 Jun 2010 14:21:44 -0500 Subject: Making sure the accel group gets added to the window --- tests/test-gtk-shortcut-client.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/test-gtk-shortcut-client.c b/tests/test-gtk-shortcut-client.c index 26e1531..003885c 100644 --- a/tests/test-gtk-shortcut-client.c +++ b/tests/test-gtk-shortcut-client.c @@ -57,6 +57,7 @@ main (int argc, char ** argv) gtk_widget_show(menubar); gtk_container_add(GTK_CONTAINER(window), menubar); gtk_window_set_title(GTK_WINDOW(window), "libdbusmenu-gtk test"); + gtk_window_add_accel_group(GTK_WINDOW(window), agroup); gtk_widget_show(window); death_timer = g_timeout_add_seconds(10, timer_func, window); -- cgit v1.2.3 From 607356d413f548b067020bcabed0aa78337066ef Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 15 Jun 2010 14:42:35 -0500 Subject: Switching to control L just in case --- tests/test-gtk-shortcut-server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test-gtk-shortcut-server.c b/tests/test-gtk-shortcut-server.c index 428f558..3b703a1 100644 --- a/tests/test-gtk-shortcut-server.c +++ b/tests/test-gtk-shortcut-server.c @@ -49,8 +49,8 @@ build_menu (void) DbusmenuMenuitem * root = dbusmenu_menuitem_new(); item = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(item, DBUSMENU_MENUITEM_PROP_LABEL, "Control-C"); - dbusmenu_menuitem_property_set_shortcut(item, GDK_c, GDK_CONTROL_MASK); + dbusmenu_menuitem_property_set(item, DBUSMENU_MENUITEM_PROP_LABEL, "Control-L"); + dbusmenu_menuitem_property_set_shortcut(item, GDK_l, GDK_CONTROL_MASK); dbusmenu_menuitem_child_append(root, item); g_object_unref(item); -- cgit v1.2.3 From 1fa54c12337433455d7e9a65779b28d927050896 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 13:44:43 -0500 Subject: Adding a new testing lib. --- .bzrignore | 3 +++ configure.ac | 1 + tests/Makefile.am | 34 ++++++++++++++++++++++++++++++++++ tests/dbusmenu-jsonloader.pc.in | 14 ++++++++++++++ tests/json-loader.c | 4 ++++ tests/json-loader.h | 3 +++ 6 files changed, 59 insertions(+) create mode 100644 tests/dbusmenu-jsonloader.pc.in create mode 100644 tests/json-loader.c create mode 100644 tests/json-loader.h (limited to 'tests') diff --git a/.bzrignore b/.bzrignore index 986e540..1079d9f 100644 --- a/.bzrignore +++ b/.bzrignore @@ -182,3 +182,6 @@ docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml.bak gtk-doc.make m4/gtk-doc.m4 +tests/dbusmenu-jsonloader.pc +tests/libdbusmenu-jsonloader.la +tests/libdbusmenu_jsonloader_la-json-loader.lo diff --git a/configure.ac b/configure.ac index 80c4b8b..fdc76fb 100644 --- a/configure.ac +++ b/configure.ac @@ -126,6 +126,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/tests/Makefile.am b/tests/Makefile.am index 66f286b..18ca628 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -35,6 +35,40 @@ check_PROGRAMS = \ 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) \ + -I $(srcdir)/.. \ + -Wall \ + -Werror \ + -DG_DISABLE_DEPRECATED \ + -DG_LOG_DOMAIN="\"LIBDBUSMENU-JSONLOADER\"" + +libdbusmenu_jsonloader_la_LIBADD = \ + $(DBUSMENUGLIB_LIBS) + +pkgconfig_DATA = dbusmenu-jsonloader.pc +pkgconfigdir = $(libdir)/pkgconfig + ###################### # Test GLib server ###################### diff --git a/tests/dbusmenu-jsonloader.pc.in b/tests/dbusmenu-jsonloader.pc.in new file mode 100644 index 0000000..6c48f7e --- /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 +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..c2483b6 --- /dev/null +++ b/tests/json-loader.c @@ -0,0 +1,4 @@ + +#include "json-loader.h" + +const gchar * myval = "FIVE"; diff --git a/tests/json-loader.h b/tests/json-loader.h new file mode 100644 index 0000000..b776c15 --- /dev/null +++ b/tests/json-loader.h @@ -0,0 +1,3 @@ + +#include + -- cgit v1.2.3 From 71e4cc90f10559cc675d696c773ed2825a2cbb8d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 15:55:53 -0500 Subject: Moving the JSON parsing code into the library. --- tests/Makefile.am | 2 + tests/json-loader.c | 87 ++++++++++++++++++++++++++++++++++++++++++- tests/json-loader.h | 8 ++++ tests/test-gtk-label-server.c | 71 +---------------------------------- 4 files changed, 98 insertions(+), 70 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 18ca628..d9468bb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -57,6 +57,7 @@ libdbusmenu_jsonloader_la_LDFLAGS = \ libdbusmenu_jsonloader_la_CFLAGS = \ $(DBUSMENUGLIB_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ -I $(srcdir)/.. \ -Wall \ -Werror \ @@ -320,6 +321,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) diff --git a/tests/json-loader.c b/tests/json-loader.c index c2483b6..7cfc7d9 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -1,4 +1,89 @@ #include "json-loader.h" -const gchar * myval = "FIVE"; +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; +} + +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 index b776c15..67e1c8b 100644 --- a/tests/json-loader.h +++ b/tests/json-loader.h @@ -1,3 +1,11 @@ +#ifndef __DBUSMENU_JSON_LOADER_H__ +#define __DBUSMENU_JSON_LOADER_H__ + #include +#include + +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 . #include #include - -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; -- cgit v1.2.3 From fa34ff87fd2149d3c89c8b00fa8713b8a2b9b563 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 16:04:48 -0500 Subject: Make the code behave exactly the same but with a function call in the middle. --- tests/json-loader.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 7cfc7d9..94df096 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -1,6 +1,13 @@ #include "json-loader.h" +static GValue * +handle_complex_types (JsonNode * node) +{ + + return NULL; +} + static void set_props (DbusmenuMenuitem * mi, JsonObject * node) { @@ -14,12 +21,20 @@ set_props (DbusmenuMenuitem * mi, JsonObject * node) 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); + if (JSON_NODE_TYPE(lnode) != JSON_NODE_VALUE) { + GValue * value = handle_complex_types(lnode); + if (value != NULL) { + dbusmenu_menuitem_property_set_value(mi, member, value); + g_value_unset(value); + g_free(value); + } + } else { + GValue value = {0}; + json_node_get_value(lnode, &value); + dbusmenu_menuitem_property_set_value(mi, member, &value); + g_value_unset(&value); + } } return; -- cgit v1.2.3 From fc3ce0689dacf6396b54e51f6a9c9f24a4a6b9ef Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 16:19:57 -0500 Subject: Restructuring a bit to make it more reusable. --- tests/json-loader.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 94df096..aa11aa5 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -2,9 +2,27 @@ #include "json-loader.h" static GValue * -handle_complex_types (JsonNode * node) +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) { + } + + + if (JSON_NODE_TYPE(node) == JSON_NODE_OBJECT) { + } + + g_free(value); return NULL; } @@ -21,19 +39,12 @@ set_props (DbusmenuMenuitem * mi, JsonObject * node) if (!g_strcmp0(member, "submenu")) { continue; } JsonNode * lnode = json_object_get_member(node, member); + GValue * value = node2value(lnode); - if (JSON_NODE_TYPE(lnode) != JSON_NODE_VALUE) { - GValue * value = handle_complex_types(lnode); - if (value != NULL) { - dbusmenu_menuitem_property_set_value(mi, member, value); - g_value_unset(value); - g_free(value); - } - } else { - GValue value = {0}; - json_node_get_value(lnode, &value); - dbusmenu_menuitem_property_set_value(mi, member, &value); - g_value_unset(&value); + if (value != NULL) { + dbusmenu_menuitem_property_set_value(mi, member, value); + g_value_unset(value); + g_free(value); } } -- cgit v1.2.3 From ced63228a6304953dcd57adcc6a1f9906b2d9a21 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 16:54:33 -0500 Subject: Turn objects into hashmaps --- tests/json-loader.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index aa11aa5..e61a49a 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -1,5 +1,6 @@ #include "json-loader.h" +#include static GValue * node2value (JsonNode * node) @@ -17,9 +18,39 @@ node2value (JsonNode * node) if (JSON_NODE_TYPE(node) == JSON_NODE_ARRAY) { } - 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); + } + } + } g_free(value); -- cgit v1.2.3 From ccd36f867b28766e708ab7bdbbd36fda3492a8fd Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 17:13:32 -0500 Subject: Okay, so now we're handling the complex areas. --- tests/json-loader.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index e61a49a..64e1579 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -17,6 +17,31 @@ node2value (JsonNode * node) } 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) { + + } 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) { @@ -50,11 +75,9 @@ node2value (JsonNode * node) g_free(value); } } - } - g_free(value); - return NULL; + return value; } static void -- cgit v1.2.3 From 3bbd2b821624a706b94a297e7e46442b9ae227f9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 17:24:09 -0500 Subject: Okay, now we've got some basic code for dealing with value arrays --- tests/json-loader.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 64e1579..2f27bff 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -21,6 +21,37 @@ node2value (JsonNode * 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(first); + 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); -- cgit v1.2.3 From d2ee9c6261888a13b0f531ad119b008b130daee9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 17:56:45 -0500 Subject: Adding a JSON loader --- .bzrignore | 1 + tests/Makefile.am | 42 +++++++++++++++++++++++++++++++-- tests/test-json-server.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 tests/test-json-server.c (limited to 'tests') diff --git a/.bzrignore b/.bzrignore index 1079d9f..d2d26a9 100644 --- a/.bzrignore +++ b/.bzrignore @@ -185,3 +185,4 @@ m4/gtk-doc.m4 tests/dbusmenu-jsonloader.pc tests/libdbusmenu-jsonloader.la tests/libdbusmenu_jsonloader_la-json-loader.lo +tests/test-json-server diff --git a/tests/Makefile.am b/tests/Makefile.am index d9468bb..9b95db0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,8 +7,9 @@ TESTS = \ 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,7 +32,8 @@ check_PROGRAMS = \ test-gtk-shortcut-client \ test-gtk-shortcut-server \ test-glib-simple-items \ - test-gtk-reorder-server + test-gtk-reorder-server \ + test-json-server XVFB_RUN=". $(srcdir)/run-xvfb.sh" @@ -118,6 +120,42 @@ test_glib_layout_client_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGLIB_LIBS) +###################### +# Test JSON +###################### + +test-json: test-json-client test-json-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(DBUS_RUNNER) --task ./test-json-client --task-name Client --task ./test-json-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +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 \ + $(DBUSMENUGLIB_LIBS) + ###################### # Test Glib Submenu ###################### diff --git a/tests/test-json-server.c b/tests/test-json-server.c new file mode 100644 index 0000000..b2b8341 --- /dev/null +++ b/tests/test-json-server.c @@ -0,0 +1,60 @@ +#include + +#include +#include +#include +#include + +#include +#include + +#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(3000, timer_func, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + g_debug("Quiting"); + + return 0; +} -- cgit v1.2.3 From 3db8acbd9f0fa9bed9519b8db6ab31e08f430962 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 17:59:52 -0500 Subject: Adding in a test json file. --- tests/Makefile.am | 3 +- tests/test-json-01.json | 4023 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 4025 insertions(+), 1 deletion(-) create mode 100644 tests/test-json-01.json (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 9b95db0..2dd2cf7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -495,7 +495,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 + dbusmenu-gtk/mago_tests/data/test-gtk-label.json \ + test-json-01.json CLEANFILES = \ dbusmenu-gtk/mago_tests/dbusmenu.pyc diff --git a/tests/test-json-01.json b/tests/test-json-01.json new file mode 100644 index 0000000..a46a6d6 --- /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, + "shortcut": [["F11"]], + "enabled": TRUE, + "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 + } + ] + } + ] +} -- cgit v1.2.3 From cfa184b0c813bbc286dba830f909d4fbbe023352 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 18:01:17 -0500 Subject: Hmm, bug in dbusmenu-dumper there. --- tests/test-json-01.json | 2296 +++++++++++++++++++++++------------------------ 1 file changed, 1148 insertions(+), 1148 deletions(-) (limited to 'tests') diff --git a/tests/test-json-01.json b/tests/test-json-01.json index a46a6d6..a014548 100644 --- a/tests/test-json-01.json +++ b/tests/test-json-01.json @@ -4,31 +4,31 @@ "submenu": [ { "id": 5, - "enabled": TRUE, + "enabled": true, "label": "File", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 6, "shortcut": [["Control", "q"]], - "enabled": TRUE, + "enabled": true, "label": "Quit", - "visible": TRUE + "visible": true }, { "id": 7, "shortcut": [["Control", "Shift", "w"]], - "enabled": TRUE, + "enabled": true, "label": "Close all", - "visible": TRUE + "visible": true }, { "id": 8, "shortcut": [["Control", "w"]], - "enabled": TRUE, + "enabled": true, "label": "Close", - "visible": TRUE + "visible": true }, { "id": 9, @@ -36,22 +36,22 @@ }, { "id": 10, - "enabled": TRUE, + "enabled": true, "label": "Send by Email...", - "visible": TRUE + "visible": true }, { "id": 11, "shortcut": [["Control", "p"]], - "enabled": TRUE, + "enabled": true, "label": "Print...", - "visible": TRUE + "visible": true }, { "id": 12, - "enabled": TRUE, + "enabled": true, "label": "Page Setup", - "visible": TRUE + "visible": true }, { "id": 13, @@ -59,35 +59,35 @@ }, { "id": 14, - "enabled": TRUE, + "enabled": true, "label": "Revert", - "visible": TRUE + "visible": true }, { "id": 15, - "enabled": TRUE, + "enabled": true, "label": "Save as Template...", - "visible": TRUE + "visible": true }, { "id": 16, - "enabled": TRUE, + "enabled": true, "label": "Save a Copy...", - "visible": TRUE + "visible": true }, { "id": 17, "shortcut": [["Control", "Shift", "s"]], - "enabled": TRUE, + "enabled": true, "label": "Save As...", - "visible": TRUE + "visible": true }, { "id": 18, "shortcut": [["Control", "s"]], - "enabled": TRUE, + "enabled": true, "label": "Save", - "visible": TRUE + "visible": true }, { "id": 19, @@ -95,16 +95,16 @@ }, { "id": 20, - "enabled": TRUE, + "enabled": true, "label": "Open Recent", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 21, - "enabled": TRUE, + "enabled": true, "label": "Document History", - "visible": TRUE + "visible": true }, { "id": 22, @@ -113,167 +113,167 @@ { "id": 23, "shortcut": [["Control", "2"]], - "enabled": TRUE, + "enabled": true, "label": "giggity.jpg", - "visible": TRUE + "visible": true }, { "id": 24, "shortcut": [["Control", "1"]], - "enabled": TRUE, + "enabled": true, "label": "Icon Height.svg", - "visible": TRUE + "visible": true } ] }, { "id": 25, - "enabled": TRUE, + "enabled": true, "label": "Open Location...", - "visible": TRUE + "visible": true }, { "id": 26, "shortcut": [["Control", "Alt", "o"]], - "enabled": TRUE, + "enabled": true, "label": "Open as Layers...", - "visible": TRUE + "visible": true }, { "id": 27, "shortcut": [["Control", "o"]], - "enabled": TRUE, + "enabled": true, "label": "Open...", - "visible": TRUE + "visible": true }, { "id": 28, - "enabled": TRUE, + "enabled": true, "label": "Create", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 29, - "enabled": TRUE, + "enabled": true, "label": "Web Page Themes", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 30, - "enabled": TRUE, + "enabled": true, "label": "Classic.Gimp.Org", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 31, - "enabled": TRUE, + "enabled": true, "label": "Tube Sub-Sub-Button Label...", - "visible": TRUE + "visible": true }, { "id": 32, - "enabled": TRUE, + "enabled": true, "label": "Tube Sub-Button Label...", - "visible": TRUE + "visible": true }, { "id": 33, - "enabled": TRUE, + "enabled": true, "label": "Tube Button Label...", - "visible": TRUE + "visible": true }, { "id": 34, - "enabled": TRUE, + "enabled": true, "label": "Small Header...", - "visible": TRUE + "visible": true }, { "id": 35, - "enabled": TRUE, + "enabled": true, "label": "General Tube Labels...", - "visible": TRUE + "visible": true }, { "id": 36, - "enabled": TRUE, + "enabled": true, "label": "Big Header...", - "visible": TRUE + "visible": true } ] }, { "id": 37, - "enabled": TRUE, + "enabled": true, "label": "Beveled Pattern", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 38, - "enabled": TRUE, + "enabled": true, "label": "Hrule...", - "visible": TRUE + "visible": true }, { "id": 39, - "enabled": TRUE, + "enabled": true, "label": "Heading...", - "visible": TRUE + "visible": true }, { "id": 40, - "enabled": TRUE, + "enabled": true, "label": "Button...", - "visible": TRUE + "visible": true }, { "id": 41, - "enabled": TRUE, + "enabled": true, "label": "Bullet...", - "visible": TRUE + "visible": true }, { "id": 42, - "enabled": TRUE, + "enabled": true, "label": "Arrow...", - "visible": TRUE + "visible": true } ] }, { "id": 43, - "enabled": TRUE, + "enabled": true, "label": "Alien Glow", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 44, - "enabled": TRUE, + "enabled": true, "label": "Hrule...", - "visible": TRUE + "visible": true }, { "id": 45, - "enabled": TRUE, + "enabled": true, "label": "Button...", - "visible": TRUE + "visible": true }, { "id": 46, - "enabled": TRUE, + "enabled": true, "label": "Bullet...", - "visible": TRUE + "visible": true }, { "id": 47, - "enabled": TRUE, + "enabled": true, "label": "Arrow...", - "visible": TRUE + "visible": true } ] } @@ -281,256 +281,256 @@ }, { "id": 48, - "enabled": TRUE, + "enabled": true, "label": "Patterns", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 49, - "enabled": TRUE, + "enabled": true, "label": "Truchet...", - "visible": TRUE + "visible": true }, { "id": 50, - "enabled": TRUE, + "enabled": true, "label": "Swirly...", - "visible": TRUE + "visible": true }, { "id": 51, - "enabled": TRUE, + "enabled": true, "label": "Swirl-Tile...", - "visible": TRUE + "visible": true }, { "id": 52, - "enabled": TRUE, + "enabled": true, "label": "Render Map...", - "visible": TRUE + "visible": true }, { "id": 53, - "enabled": TRUE, + "enabled": true, "label": "Land...", - "visible": TRUE + "visible": true }, { "id": 54, - "enabled": TRUE, + "enabled": true, "label": "Flatland...", - "visible": TRUE + "visible": true }, { "id": 55, - "enabled": TRUE, + "enabled": true, "label": "Camouflage...", - "visible": TRUE + "visible": true }, { "id": 56, - "enabled": TRUE, + "enabled": true, "label": "3D Truchet...", - "visible": TRUE + "visible": true } ] }, { "id": 57, - "enabled": TRUE, + "enabled": true, "label": "Logos", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 58, - "enabled": TRUE, + "enabled": true, "label": "Web Title Header...", - "visible": TRUE + "visible": true }, { "id": 59, - "enabled": TRUE, + "enabled": true, "label": "Textured...", - "visible": TRUE + "visible": true }, { "id": 60, - "enabled": TRUE, + "enabled": true, "label": "Text Circle...", - "visible": TRUE + "visible": true }, { "id": 61, - "enabled": TRUE, + "enabled": true, "label": "Starscape...", - "visible": TRUE + "visible": true }, { "id": 62, - "enabled": TRUE, + "enabled": true, "label": "Speed Text...", - "visible": TRUE + "visible": true }, { "id": 63, - "enabled": TRUE, + "enabled": true, "label": "SOTA Chrome...", - "visible": TRUE + "visible": true }, { "id": 64, - "enabled": TRUE, + "enabled": true, "label": "Particle Trace...", - "visible": TRUE + "visible": true }, { "id": 65, - "enabled": TRUE, + "enabled": true, "label": "Newsprint Text...", - "visible": TRUE + "visible": true }, { "id": 66, - "enabled": TRUE, + "enabled": true, "label": "Neon...", - "visible": TRUE + "visible": true }, { "id": 67, - "enabled": TRUE, + "enabled": true, "label": "Imigre-26...", - "visible": TRUE + "visible": true }, { "id": 68, - "enabled": TRUE, + "enabled": true, "label": "Gradient Bevel...", - "visible": TRUE + "visible": true }, { "id": 69, - "enabled": TRUE, + "enabled": true, "label": "Glowing Hot...", - "visible": TRUE + "visible": true }, { "id": 70, - "enabled": TRUE, + "enabled": true, "label": "Glossy...", - "visible": TRUE + "visible": true }, { "id": 71, - "enabled": TRUE, + "enabled": true, "label": "Frosty...", - "visible": TRUE + "visible": true }, { "id": 72, - "enabled": TRUE, + "enabled": true, "label": "Crystal...", - "visible": TRUE + "visible": true }, { "id": 73, - "enabled": TRUE, + "enabled": true, "label": "Cool Metal...", - "visible": TRUE + "visible": true }, { "id": 74, - "enabled": TRUE, + "enabled": true, "label": "Comic Book...", - "visible": TRUE + "visible": true }, { "id": 75, - "enabled": TRUE, + "enabled": true, "label": "Chrome...", - "visible": TRUE + "visible": true }, { "id": 76, - "enabled": TRUE, + "enabled": true, "label": "Chip Away...", - "visible": TRUE + "visible": true }, { "id": 77, - "enabled": TRUE, + "enabled": true, "label": "Chalk...", - "visible": TRUE + "visible": true }, { "id": 78, - "enabled": TRUE, + "enabled": true, "label": "Carved...", - "visible": TRUE + "visible": true }, { "id": 79, - "enabled": TRUE, + "enabled": true, "label": "Bovination...", - "visible": TRUE + "visible": true }, { "id": 80, - "enabled": TRUE, + "enabled": true, "label": "Blended...", - "visible": TRUE + "visible": true }, { "id": 81, - "enabled": TRUE, + "enabled": true, "label": "Basic I...", - "visible": TRUE + "visible": true }, { "id": 82, - "enabled": TRUE, + "enabled": true, "label": "Basic II...", - "visible": TRUE + "visible": true }, { "id": 83, - "enabled": TRUE, + "enabled": true, "label": "Alien Neon...", - "visible": TRUE + "visible": true }, { "id": 84, - "enabled": TRUE, + "enabled": true, "label": "Alien Glow...", - "visible": TRUE + "visible": true }, { "id": 85, - "enabled": TRUE, + "enabled": true, "label": "3D Outline...", - "visible": TRUE + "visible": true } ] }, { "id": 86, - "enabled": TRUE, + "enabled": true, "label": "Buttons", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 87, - "enabled": TRUE, + "enabled": true, "label": "Simple Beveled Button...", - "visible": TRUE + "visible": true }, { "id": 88, - "enabled": TRUE, + "enabled": true, "label": "Round Button...", - "visible": TRUE + "visible": true } ] }, @@ -540,73 +540,73 @@ }, { "id": 90, - "enabled": TRUE, + "enabled": true, "label": "xscanimage", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 91, - "enabled": FALSE, + "enabled": false, "label": "Device dialog...", - "visible": TRUE + "visible": true } ] }, { "id": 92, - "enabled": TRUE, + "enabled": true, "label": "Screenshot...", - "visible": TRUE + "visible": true }, { "id": 93, "shortcut": [["Control", "Shift", "v"]], - "enabled": TRUE, + "enabled": true, "label": "From Clipboard", - "visible": TRUE + "visible": true } ] }, { "id": 94, "shortcut": [["Control", "n"]], - "enabled": TRUE, + "enabled": true, "label": "New...", - "visible": TRUE + "visible": true } ] }, { "id": 95, - "enabled": TRUE, + "enabled": true, "label": "Edit", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 96, - "enabled": TRUE, + "enabled": true, "label": "Units", - "visible": TRUE + "visible": true }, { "id": 97, - "enabled": TRUE, + "enabled": true, "label": "Modules", - "visible": TRUE + "visible": true }, { "id": 98, - "enabled": TRUE, + "enabled": true, "label": "Keyboard Shortcuts", - "visible": TRUE + "visible": true }, { "id": 99, - "enabled": TRUE, + "enabled": true, "label": "Preferences", - "visible": TRUE + "visible": true }, { "id": 100, @@ -614,43 +614,43 @@ }, { "id": 101, - "enabled": FALSE, + "enabled": false, "label": "Stroke Path...", - "visible": TRUE + "visible": true }, { "id": 102, - "enabled": FALSE, + "enabled": false, "label": "Stroke Selection...", - "visible": TRUE + "visible": true }, { "id": 103, "shortcut": [["Control", "semicolon"]], - "enabled": TRUE, + "enabled": true, "label": "Fill with Pattern", - "visible": TRUE + "visible": true }, { "id": 104, "shortcut": [["Control", "period"]], - "enabled": TRUE, + "enabled": true, "label": "Fill with BG Color", - "visible": TRUE + "visible": true }, { "id": 105, "shortcut": [["Control", "comma"]], - "enabled": TRUE, + "enabled": true, "label": "Fill with FG Color", - "visible": TRUE + "visible": true }, { "id": 106, "shortcut": [["Delete"]], - "enabled": TRUE, + "enabled": true, "label": "Clear", - "visible": TRUE + "visible": true }, { "id": 107, @@ -658,104 +658,104 @@ }, { "id": 108, - "enabled": TRUE, + "enabled": true, "label": "Buffer", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 109, - "enabled": TRUE, + "enabled": true, "label": "Paste Named...", - "visible": TRUE + "visible": true }, { "id": 110, - "enabled": TRUE, + "enabled": true, "label": "Copy Visible Named...", - "visible": TRUE + "visible": true }, { "id": 111, - "enabled": TRUE, + "enabled": true, "label": "Copy Named...", - "visible": TRUE + "visible": true }, { "id": 112, - "enabled": TRUE, + "enabled": true, "label": "Cut Named...", - "visible": TRUE + "visible": true } ] }, { "id": 113, - "enabled": TRUE, + "enabled": true, "label": "Paste as", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 114, - "enabled": TRUE, + "enabled": true, "label": "New Pattern...", - "visible": TRUE + "visible": true }, { "id": 115, - "enabled": TRUE, + "enabled": true, "label": "New Brush...", - "visible": TRUE + "visible": true }, { "id": 116, - "enabled": TRUE, + "enabled": true, "label": "New Layer", - "visible": TRUE + "visible": true }, { "id": 117, "shortcut": [["Control", "Shift", "v"]], - "enabled": TRUE, + "enabled": true, "label": "New Image", - "visible": TRUE + "visible": true } ] }, { "id": 118, - "enabled": TRUE, + "enabled": true, "label": "Paste Into", - "visible": TRUE + "visible": true }, { "id": 119, "shortcut": [["Control", "v"]], - "enabled": TRUE, + "enabled": true, "label": "Paste", - "visible": TRUE + "visible": true }, { "id": 120, "shortcut": [["Control", "Shift", "c"]], - "enabled": TRUE, + "enabled": true, "label": "Copy Visible", - "visible": TRUE + "visible": true }, { "id": 121, "shortcut": [["Control", "c"]], - "enabled": TRUE, + "enabled": true, "label": "Copy", - "visible": TRUE + "visible": true }, { "id": 122, "shortcut": [["Control", "x"]], - "enabled": TRUE, + "enabled": true, "label": "Cut", - "visible": TRUE + "visible": true }, { "id": 123, @@ -763,59 +763,59 @@ }, { "id": 124, - "enabled": TRUE, + "enabled": true, "label": "Undo History", - "visible": TRUE + "visible": true }, { "id": 3, - "enabled": FALSE, + "enabled": false, "label": "_Fade...", - "visible": TRUE + "visible": true }, { "id": 2, "shortcut": [["Control", "y"]], - "enabled": FALSE, + "enabled": false, "label": "_Redo", - "visible": TRUE + "visible": true }, { "id": 1, "shortcut": [["Control", "z"]], - "enabled": FALSE, + "enabled": false, "label": "_Undo", - "visible": TRUE + "visible": true } ] }, { "id": 125, - "enabled": TRUE, + "enabled": true, "label": "Select", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 126, - "enabled": FALSE, + "enabled": false, "label": "To Path", - "visible": TRUE + "visible": true }, { "id": 127, - "enabled": TRUE, + "enabled": true, "label": "Save to Channel", - "visible": TRUE + "visible": true }, { "id": 128, "shortcut": [["Shift", "q"]], - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Toggle Quick Mask", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 129, @@ -823,39 +823,39 @@ }, { "id": 130, - "enabled": TRUE, + "enabled": true, "label": "Distort...", - "visible": TRUE + "visible": true }, { "id": 131, - "enabled": FALSE, + "enabled": false, "label": "Border...", - "visible": TRUE + "visible": true }, { "id": 132, - "enabled": FALSE, + "enabled": false, "label": "Grow...", - "visible": TRUE + "visible": true }, { "id": 133, - "enabled": FALSE, + "enabled": false, "label": "Shrink...", - "visible": TRUE + "visible": true }, { "id": 134, - "enabled": FALSE, + "enabled": false, "label": "Sharpen", - "visible": TRUE + "visible": true }, { "id": 135, - "enabled": FALSE, + "enabled": false, "label": "Feather...", - "visible": TRUE + "visible": true }, { "id": 136, @@ -863,106 +863,106 @@ }, { "id": 137, - "enabled": TRUE, + "enabled": true, "label": "Selection Editor", - "visible": TRUE + "visible": true }, { "id": 138, "shortcut": [["Shift", "v"]], - "enabled": FALSE, + "enabled": false, "label": "From Path", - "visible": TRUE + "visible": true }, { "id": 139, "shortcut": [["Shift", "o"]], - "enabled": TRUE, + "enabled": true, "label": "By Color", - "visible": TRUE + "visible": true }, { "id": 140, "shortcut": [["Control", "Shift", "l"]], - "enabled": FALSE, + "enabled": false, "label": "Float", - "visible": TRUE + "visible": true }, { "id": 141, "shortcut": [["Control", "i"]], - "enabled": TRUE, + "enabled": true, "label": "Invert", - "visible": TRUE + "visible": true }, { "id": 142, "shortcut": [["Control", "Shift", "a"]], - "enabled": FALSE, + "enabled": false, "label": "None", - "visible": TRUE + "visible": true }, { "id": 143, "shortcut": [["Control", "a"]], - "enabled": TRUE, + "enabled": true, "label": "All", - "visible": TRUE + "visible": true } ] }, { "id": 144, - "enabled": TRUE, + "enabled": true, "label": "View", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 145, - "enabled": TRUE, + "enabled": true, "toggle-state": 1, "label": "Show Statusbar", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 146, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Show Scrollbars", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 147, "shortcut": [["Control", "Shift", "r"]], - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Show Rulers", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 148, - "enabled": TRUE, + "enabled": true, "toggle-state": 1, "label": "Show Menubar", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 149, - "enabled": TRUE, + "enabled": true, "label": "Padding Color", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 150, - "enabled": TRUE, + "enabled": true, "label": "As in Preferences", - "visible": TRUE + "visible": true }, { "id": 151, @@ -970,27 +970,27 @@ }, { "id": 152, - "enabled": TRUE, + "enabled": true, "label": "Select Custom Color...", - "visible": TRUE + "visible": true }, { "id": 153, - "enabled": TRUE, + "enabled": true, "label": "Dark Check Color", - "visible": TRUE + "visible": true }, { "id": 154, - "enabled": TRUE, + "enabled": true, "label": "Light Check Color", - "visible": TRUE + "visible": true }, { "id": 155, - "enabled": TRUE, + "enabled": true, "label": "From Theme", - "visible": TRUE + "visible": true } ] }, @@ -1000,35 +1000,35 @@ }, { "id": 157, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Snap to Active Path", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 158, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Snap to Canvas Edges", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 159, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Snap to Grid", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 160, - "enabled": TRUE, + "enabled": true, "toggle-state": 1, "label": "Snap to Guides", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 161, @@ -1036,45 +1036,45 @@ }, { "id": 162, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Show Sample Points", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 163, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Show Grid", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 164, "shortcut": [["Control", "Shift", "t"]], - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Show Guides", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 165, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Show Layer Boundary", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 166, "shortcut": [["Control", "t"]], - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Show Selection", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 167, @@ -1082,15 +1082,15 @@ }, { "id": 168, - "enabled": TRUE, + "enabled": true, "label": "Display Filters...", - "visible": TRUE + "visible": true }, { "id": 169, - "enabled": TRUE, + "enabled": true, "label": "Navigation Window", - "visible": TRUE + "visible": true }, { "id": 170, @@ -1099,27 +1099,27 @@ { "id": 171, "shortcut": [["F11"]], - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Fullscreen", "toggle-type": "checkmark", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 172, - "enabled": TRUE, + "enabled": true, "label": "Open Display...", - "visible": TRUE + "visible": true } ] }, { "id": 173, "shortcut": [["Control", "e"]], - "enabled": TRUE, + "enabled": true, "label": "Shrink Wrap", - "visible": TRUE + "visible": true }, { "id": 174, @@ -1127,18 +1127,18 @@ }, { "id": 175, - "enabled": TRUE, + "enabled": true, "label": "_Zoom (67%)", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 176, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Othe_r (67%)...", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 177, @@ -1146,76 +1146,76 @@ }, { "id": 178, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "1:16 (6.25%)", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 179, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "1:8 (12.5%)", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 180, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "1:4 (25%)", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 181, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "1:2 (50%)", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 182, "shortcut": [["1"]], - "enabled": TRUE, + "enabled": true, "toggle-state": 1, "label": "1:1 (100%)", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 183, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "2:1 (200%)", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 184, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "4:1 (400%)", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 185, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "8:1 (800%)", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 186, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "16:1 (1600%)", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 187, @@ -1223,106 +1223,106 @@ }, { "id": 188, - "enabled": TRUE, + "enabled": true, "label": "Fill Window", - "visible": TRUE + "visible": true }, { "id": 189, "shortcut": [["Control", "Shift", "e"]], - "enabled": TRUE, + "enabled": true, "label": "Fit Image in Window", - "visible": TRUE + "visible": true }, { "id": 190, "shortcut": [["plus"]], - "enabled": TRUE, + "enabled": true, "label": "Zoom In", - "visible": TRUE + "visible": true }, { "id": 191, "shortcut": [["minus"]], - "enabled": TRUE, + "enabled": true, "label": "Zoom Out", - "visible": TRUE + "visible": true }, { "id": 4, "shortcut": [["grave"]], - "enabled": TRUE, + "enabled": true, "label": "Re_vert Zoom (67%)", - "visible": TRUE + "visible": true } ] }, { "id": 192, - "enabled": TRUE, + "enabled": true, "toggle-state": 1, "label": "Dot for Dot", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 193, - "enabled": TRUE, + "enabled": true, "label": "New View", - "visible": TRUE + "visible": true } ] }, { "id": 194, - "enabled": TRUE, + "enabled": true, "label": "Image", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 195, "shortcut": [["Alt", "Return"]], - "enabled": TRUE, + "enabled": true, "label": "Image Properties", - "visible": TRUE + "visible": true }, { "id": 196, - "enabled": TRUE, + "enabled": true, "label": "Configure Grid...", - "visible": TRUE + "visible": true }, { "id": 197, - "enabled": TRUE, + "enabled": true, "label": "Guides", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 198, - "enabled": TRUE, + "enabled": true, "label": "Remove all Guides", - "visible": TRUE + "visible": true }, { "id": 199, - "enabled": TRUE, + "enabled": true, "label": "New Guides from Selection", - "visible": TRUE + "visible": true }, { "id": 200, - "enabled": TRUE, + "enabled": true, "label": "New Guide...", - "visible": TRUE + "visible": true }, { "id": 201, - "enabled": TRUE, + "enabled": true, "label": "New Guide (by Percent)...", - "visible": TRUE + "visible": true } ] }, @@ -1332,22 +1332,22 @@ }, { "id": 203, - "enabled": TRUE, + "enabled": true, "label": "Align Visible Layers...", - "visible": TRUE + "visible": true }, { "id": 204, - "enabled": TRUE, + "enabled": true, "label": "Flatten Image", - "visible": TRUE + "visible": true }, { "id": 205, "shortcut": [["Control", "m"]], - "enabled": TRUE, + "enabled": true, "label": "Merge Visible Layers...", - "visible": TRUE + "visible": true }, { "id": 206, @@ -1355,21 +1355,21 @@ }, { "id": 207, - "enabled": TRUE, + "enabled": true, "label": "Zealous Crop", - "visible": TRUE + "visible": true }, { "id": 208, - "enabled": TRUE, + "enabled": true, "label": "Autocrop Image", - "visible": TRUE + "visible": true }, { "id": 209, - "enabled": FALSE, + "enabled": false, "label": "Crop to Selection", - "visible": TRUE + "visible": true }, { "id": 210, @@ -1377,33 +1377,33 @@ }, { "id": 211, - "enabled": TRUE, + "enabled": true, "label": "Scale Image...", - "visible": TRUE + "visible": true }, { "id": 212, - "enabled": TRUE, + "enabled": true, "label": "Print Size...", - "visible": TRUE + "visible": true }, { "id": 213, - "enabled": FALSE, + "enabled": false, "label": "Fit Canvas to Selection", - "visible": TRUE + "visible": true }, { "id": 214, - "enabled": TRUE, + "enabled": true, "label": "Fit Canvas to Layers", - "visible": TRUE + "visible": true }, { "id": 215, - "enabled": TRUE, + "enabled": true, "label": "Canvas Size...", - "visible": TRUE + "visible": true }, { "id": 216, @@ -1411,16 +1411,16 @@ }, { "id": 217, - "enabled": TRUE, + "enabled": true, "label": "Transform", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 218, - "enabled": TRUE, + "enabled": true, "label": "Guillotine", - "visible": TRUE + "visible": true }, { "id": 219, @@ -1428,21 +1428,21 @@ }, { "id": 220, - "enabled": TRUE, + "enabled": true, "label": "Rotate 180\302\260", - "visible": TRUE + "visible": true }, { "id": 221, - "enabled": TRUE, + "enabled": true, "label": "Rotate 90\302\260 counter-clockwise", - "visible": TRUE + "visible": true }, { "id": 222, - "enabled": TRUE, + "enabled": true, "label": "Rotate 90\302\260 clockwise", - "visible": TRUE + "visible": true }, { "id": 223, @@ -1450,36 +1450,36 @@ }, { "id": 224, - "enabled": TRUE, + "enabled": true, "label": "Flip Vertically", - "visible": TRUE + "visible": true }, { "id": 225, - "enabled": TRUE, + "enabled": true, "label": "Flip Horizontally", - "visible": TRUE + "visible": true } ] }, { "id": 226, - "enabled": TRUE, + "enabled": true, "label": "Mode", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 227, - "enabled": TRUE, + "enabled": true, "label": "Convert to Color Profile...", - "visible": TRUE + "visible": true }, { "id": 228, - "enabled": TRUE, + "enabled": true, "label": "Assign Color Profile...", - "visible": TRUE + "visible": true }, { "id": 229, @@ -1487,75 +1487,75 @@ }, { "id": 230, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Indexed...", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 231, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Grayscale", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 232, - "enabled": TRUE, + "enabled": true, "toggle-state": 1, "label": "RGB", "toggle-type": "checkmark", - "visible": TRUE + "visible": true } ] }, { "id": 233, "shortcut": [["Control", "d"]], - "enabled": TRUE, + "enabled": true, "label": "Duplicate", - "visible": TRUE + "visible": true } ] }, { "id": 234, - "enabled": TRUE, + "enabled": true, "label": "Layer", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 235, - "enabled": TRUE, + "enabled": true, "label": "Autocrop Layer", - "visible": TRUE + "visible": true }, { "id": 236, - "enabled": FALSE, + "enabled": false, "label": "Crop to Selection", - "visible": TRUE + "visible": true }, { "id": 237, - "enabled": TRUE, + "enabled": true, "label": "Scale Layer...", - "visible": TRUE + "visible": true }, { "id": 238, - "enabled": TRUE, + "enabled": true, "label": "Layer to Image Size", - "visible": TRUE + "visible": true }, { "id": 239, - "enabled": TRUE, + "enabled": true, "label": "Layer Boundary Size...", - "visible": TRUE + "visible": true }, { "id": 240, @@ -1563,17 +1563,17 @@ }, { "id": 241, - "enabled": TRUE, + "enabled": true, "label": "Transform", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 242, "shortcut": [["Control", "Shift", "o"]], - "enabled": TRUE, + "enabled": true, "label": "Offset...", - "visible": TRUE + "visible": true }, { "id": 243, @@ -1581,27 +1581,27 @@ }, { "id": 244, - "enabled": TRUE, + "enabled": true, "label": "Arbitrary Rotation...", - "visible": TRUE + "visible": true }, { "id": 245, - "enabled": TRUE, + "enabled": true, "label": "Rotate 180\302\260", - "visible": TRUE + "visible": true }, { "id": 246, - "enabled": TRUE, + "enabled": true, "label": "Rotate 90\302\260 counter-clockwise", - "visible": TRUE + "visible": true }, { "id": 247, - "enabled": TRUE, + "enabled": true, "label": "Rotate 90\302\260 clockwise", - "visible": TRUE + "visible": true }, { "id": 248, @@ -1609,48 +1609,48 @@ }, { "id": 249, - "enabled": TRUE, + "enabled": true, "label": "Flip Vertically", - "visible": TRUE + "visible": true }, { "id": 250, - "enabled": TRUE, + "enabled": true, "label": "Flip Horizontally", - "visible": TRUE + "visible": true } ] }, { "id": 251, - "enabled": TRUE, + "enabled": true, "label": "Transparency", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 252, - "enabled": TRUE, + "enabled": true, "label": "Intersect with Selection", - "visible": TRUE + "visible": true }, { "id": 253, - "enabled": TRUE, + "enabled": true, "label": "Subtract from Selection", - "visible": TRUE + "visible": true }, { "id": 254, - "enabled": TRUE, + "enabled": true, "label": "Add to Selection", - "visible": TRUE + "visible": true }, { "id": 255, - "enabled": TRUE, + "enabled": true, "label": "Alpha to Selection", - "visible": TRUE + "visible": true }, { "id": 256, @@ -1658,66 +1658,66 @@ }, { "id": 257, - "enabled": TRUE, + "enabled": true, "label": "Threshold Alpha...", - "visible": TRUE + "visible": true }, { "id": 258, - "enabled": TRUE, + "enabled": true, "label": "Semi-Flatten", - "visible": TRUE + "visible": true }, { "id": 259, - "enabled": TRUE, + "enabled": true, "label": "Color to Alpha...", - "visible": TRUE + "visible": true }, { "id": 260, - "enabled": TRUE, + "enabled": true, "label": "Remove Alpha Channel", - "visible": TRUE + "visible": true }, { "id": 261, - "enabled": FALSE, + "enabled": false, "label": "Add Alpha Channel", - "visible": TRUE + "visible": true } ] }, { "id": 262, - "enabled": TRUE, + "enabled": true, "label": "Mask", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 263, - "enabled": FALSE, + "enabled": false, "label": "Intersect with Selection", - "visible": TRUE + "visible": true }, { "id": 264, - "enabled": FALSE, + "enabled": false, "label": "Subtract from Selection", - "visible": TRUE + "visible": true }, { "id": 265, - "enabled": FALSE, + "enabled": false, "label": "Add to Selection", - "visible": TRUE + "visible": true }, { "id": 266, - "enabled": FALSE, + "enabled": false, "label": "Mask to Selection", - "visible": TRUE + "visible": true }, { "id": 267, @@ -1725,27 +1725,27 @@ }, { "id": 268, - "enabled": FALSE, + "enabled": false, "toggle-state": 0, "label": "Disable Layer Mask", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 269, - "enabled": FALSE, + "enabled": false, "toggle-state": 0, "label": "Edit Layer Mask", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 270, - "enabled": FALSE, + "enabled": false, "toggle-state": 0, "label": "Show Layer Mask", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 271, @@ -1753,36 +1753,36 @@ }, { "id": 272, - "enabled": FALSE, + "enabled": false, "label": "Delete Layer Mask", - "visible": TRUE + "visible": true }, { "id": 273, - "enabled": FALSE, + "enabled": false, "label": "Apply Layer Mask", - "visible": TRUE + "visible": true }, { "id": 274, - "enabled": TRUE, + "enabled": true, "label": "Add Layer Mask...", - "visible": TRUE + "visible": true } ] }, { "id": 275, - "enabled": TRUE, + "enabled": true, "label": "Stack", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 276, - "enabled": TRUE, + "enabled": true, "label": "Reverse Layer Order", - "visible": TRUE + "visible": true }, { "id": 277, @@ -1790,27 +1790,27 @@ }, { "id": 278, - "enabled": FALSE, + "enabled": false, "label": "Layer to Bottom", - "visible": TRUE + "visible": true }, { "id": 279, - "enabled": FALSE, + "enabled": false, "label": "Layer to Top", - "visible": TRUE + "visible": true }, { "id": 280, - "enabled": FALSE, + "enabled": false, "label": "Lower Layer", - "visible": TRUE + "visible": true }, { "id": 281, - "enabled": FALSE, + "enabled": false, "label": "Raise Layer", - "visible": TRUE + "visible": true }, { "id": 282, @@ -1819,30 +1819,30 @@ { "id": 283, "shortcut": [["End"]], - "enabled": FALSE, + "enabled": false, "label": "Select Bottom Layer", - "visible": TRUE + "visible": true }, { "id": 284, "shortcut": [["Home"]], - "enabled": FALSE, + "enabled": false, "label": "Select Top Layer", - "visible": TRUE + "visible": true }, { "id": 285, "shortcut": [["Page_Down"]], - "enabled": FALSE, + "enabled": false, "label": "Select Next Layer", - "visible": TRUE + "visible": true }, { "id": 286, "shortcut": [["Page_Up"]], - "enabled": FALSE, + "enabled": false, "label": "Select Previous Layer", - "visible": TRUE + "visible": true } ] }, @@ -1853,95 +1853,95 @@ "submenu": [ { "id": 288, - "enabled": FALSE, + "enabled": false, "label": "Empty", - "visible": TRUE + "visible": true } ] }, { "id": 289, - "enabled": TRUE, + "enabled": true, "label": "Delete Layer", - "visible": TRUE + "visible": true }, { "id": 290, - "enabled": FALSE, + "enabled": false, "label": "Merge Down", - "visible": TRUE + "visible": true }, { "id": 291, "shortcut": [["Control", "h"]], - "enabled": FALSE, + "enabled": false, "label": "Anchor Layer", - "visible": TRUE + "visible": true }, { "id": 292, "shortcut": [["Control", "Shift", "d"]], - "enabled": TRUE, + "enabled": true, "label": "Duplicate Layer", - "visible": TRUE + "visible": true }, { "id": 293, - "enabled": TRUE, + "enabled": true, "label": "New from Visible", - "visible": TRUE + "visible": true }, { "id": 294, "shortcut": [["Control", "Shift", "n"]], - "enabled": TRUE, + "enabled": true, "label": "New Layer...", - "visible": TRUE + "visible": true } ] }, { "id": 295, - "enabled": TRUE, + "enabled": true, "label": "Colors", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 296, - "enabled": TRUE, + "enabled": true, "label": "Retinex...", - "visible": TRUE + "visible": true }, { "id": 297, - "enabled": TRUE, + "enabled": true, "label": "Maximum RGB...", - "visible": TRUE + "visible": true }, { "id": 298, - "enabled": FALSE, + "enabled": false, "label": "Hot...", - "visible": TRUE + "visible": true }, { "id": 299, - "enabled": TRUE, + "enabled": true, "label": "Filter Pack...", - "visible": TRUE + "visible": true }, { "id": 300, - "enabled": TRUE, + "enabled": true, "label": "Color to Alpha...", - "visible": TRUE + "visible": true }, { "id": 301, - "enabled": TRUE, + "enabled": true, "label": "Colorify...", - "visible": TRUE + "visible": true }, { "id": 302, @@ -1949,79 +1949,79 @@ }, { "id": 303, - "enabled": TRUE, + "enabled": true, "label": "Info", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 304, - "enabled": TRUE, + "enabled": true, "label": "Smooth Palette...", - "visible": TRUE + "visible": true }, { "id": 305, - "enabled": TRUE, + "enabled": true, "label": "Colorcube Analysis...", - "visible": TRUE + "visible": true }, { "id": 306, - "enabled": TRUE, + "enabled": true, "label": "Border Average...", - "visible": TRUE + "visible": true }, { "id": 307, - "enabled": TRUE, + "enabled": true, "label": "Histogram", - "visible": TRUE + "visible": true } ] }, { "id": 308, - "enabled": TRUE, + "enabled": true, "label": "Map", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 309, - "enabled": TRUE, + "enabled": true, "label": "Sample Colorize...", - "visible": TRUE + "visible": true }, { "id": 310, - "enabled": TRUE, + "enabled": true, "label": "Rotate Colors...", - "visible": TRUE + "visible": true }, { "id": 311, - "enabled": TRUE, + "enabled": true, "label": "Palette Map", - "visible": TRUE + "visible": true }, { "id": 312, - "enabled": TRUE, + "enabled": true, "label": "Gradient Map", - "visible": TRUE + "visible": true }, { "id": 313, - "enabled": TRUE, + "enabled": true, "label": "Color Exchange...", - "visible": TRUE + "visible": true }, { "id": 314, - "enabled": TRUE, + "enabled": true, "label": "Alien Map...", - "visible": TRUE + "visible": true }, { "id": 315, @@ -2029,93 +2029,93 @@ }, { "id": 316, - "enabled": FALSE, + "enabled": false, "label": "Set Colormap...", - "visible": TRUE + "visible": true }, { "id": 317, - "enabled": FALSE, + "enabled": false, "label": "Rearrange Colormap...", - "visible": TRUE + "visible": true } ] }, { "id": 318, - "enabled": TRUE, + "enabled": true, "label": "Components", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 319, - "enabled": FALSE, + "enabled": false, "label": "Recompose", - "visible": TRUE + "visible": true }, { "id": 320, - "enabled": TRUE, + "enabled": true, "label": "Decompose...", - "visible": TRUE + "visible": true }, { "id": 321, - "enabled": FALSE, + "enabled": false, "label": "Compose...", - "visible": TRUE + "visible": true }, { "id": 322, - "enabled": TRUE, + "enabled": true, "label": "Channel Mixer...", - "visible": TRUE + "visible": true } ] }, { "id": 323, - "enabled": TRUE, + "enabled": true, "label": "Auto", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 324, - "enabled": TRUE, + "enabled": true, "label": "Stretch HSV", - "visible": TRUE + "visible": true }, { "id": 325, - "enabled": TRUE, + "enabled": true, "label": "Stretch Contrast", - "visible": TRUE + "visible": true }, { "id": 326, - "enabled": TRUE, + "enabled": true, "label": "Normalize", - "visible": TRUE + "visible": true }, { "id": 327, - "enabled": TRUE, + "enabled": true, "label": "Color Enhance", - "visible": TRUE + "visible": true }, { "id": 328, - "enabled": TRUE, + "enabled": true, "label": "White Balance", - "visible": TRUE + "visible": true }, { "id": 329, - "enabled": TRUE, + "enabled": true, "label": "Equalize", - "visible": TRUE + "visible": true } ] }, @@ -2125,11 +2125,11 @@ }, { "id": 331, - "enabled": TRUE, + "enabled": true, "toggle-state": 0, "label": "Use GEGL", "toggle-type": "checkmark", - "visible": TRUE + "visible": true }, { "id": 332, @@ -2137,15 +2137,15 @@ }, { "id": 333, - "enabled": TRUE, + "enabled": true, "label": "Value Invert", - "visible": TRUE + "visible": true }, { "id": 334, - "enabled": TRUE, + "enabled": true, "label": "Invert", - "visible": TRUE + "visible": true }, { "id": 335, @@ -2153,87 +2153,87 @@ }, { "id": 336, - "enabled": TRUE, + "enabled": true, "label": "Desaturate...", - "visible": TRUE + "visible": true }, { "id": 337, - "enabled": TRUE, + "enabled": true, "label": "Posterize...", - "visible": TRUE + "visible": true }, { "id": 338, - "enabled": TRUE, + "enabled": true, "label": "Curves...", - "visible": TRUE + "visible": true }, { "id": 339, - "enabled": TRUE, + "enabled": true, "label": "Levels...", - "visible": TRUE + "visible": true }, { "id": 340, - "enabled": TRUE, + "enabled": true, "label": "Threshold...", - "visible": TRUE + "visible": true }, { "id": 341, - "enabled": TRUE, + "enabled": true, "label": "Brightness-Contrast...", - "visible": TRUE + "visible": true }, { "id": 342, - "enabled": TRUE, + "enabled": true, "label": "Colorize...", - "visible": TRUE + "visible": true }, { "id": 343, - "enabled": TRUE, + "enabled": true, "label": "Hue-Saturation...", - "visible": TRUE + "visible": true }, { "id": 344, - "enabled": TRUE, + "enabled": true, "label": "Color Balance...", - "visible": TRUE + "visible": true } ] }, { "id": 345, - "enabled": TRUE, + "enabled": true, "label": "Tools", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 346, "shortcut": [["x"]], - "enabled": TRUE, + "enabled": true, "label": "Swap Colors", - "visible": TRUE + "visible": true }, { "id": 347, "shortcut": [["d"]], - "enabled": TRUE, + "enabled": true, "label": "Default Colors", - "visible": TRUE + "visible": true }, { "id": 348, "shortcut": [["Control", "b"]], - "enabled": TRUE, + "enabled": true, "label": "Toolbox", - "visible": TRUE + "visible": true }, { "id": 349, @@ -2241,326 +2241,326 @@ }, { "id": 350, - "enabled": TRUE, + "enabled": true, "label": "GEGL Operation...", - "visible": TRUE + "visible": true }, { "id": 351, "shortcut": [["t"]], - "enabled": TRUE, + "enabled": true, "label": "Text", - "visible": TRUE + "visible": true }, { "id": 352, "shortcut": [["Shift", "m"]], - "enabled": TRUE, + "enabled": true, "label": "Measure", - "visible": TRUE + "visible": true }, { "id": 353, "shortcut": [["z"]], - "enabled": TRUE, + "enabled": true, "label": "Zoom", - "visible": TRUE + "visible": true }, { "id": 354, "shortcut": [["o"]], - "enabled": TRUE, + "enabled": true, "label": "Color Picker", - "visible": TRUE + "visible": true }, { "id": 355, "shortcut": [["b"]], - "enabled": TRUE, + "enabled": true, "label": "Paths", - "visible": TRUE + "visible": true }, { "id": 356, - "enabled": TRUE, + "enabled": true, "label": "Color Tools", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 357, - "enabled": TRUE, + "enabled": true, "label": "Desaturate...", - "visible": TRUE + "visible": true }, { "id": 358, - "enabled": TRUE, + "enabled": true, "label": "Posterize...", - "visible": TRUE + "visible": true }, { "id": 359, - "enabled": TRUE, + "enabled": true, "label": "Curves...", - "visible": TRUE + "visible": true }, { "id": 360, - "enabled": TRUE, + "enabled": true, "label": "Levels...", - "visible": TRUE + "visible": true }, { "id": 361, - "enabled": TRUE, + "enabled": true, "label": "Threshold...", - "visible": TRUE + "visible": true }, { "id": 362, - "enabled": TRUE, + "enabled": true, "label": "Brightness-Contrast...", - "visible": TRUE + "visible": true }, { "id": 363, - "enabled": TRUE, + "enabled": true, "label": "Colorize...", - "visible": TRUE + "visible": true }, { "id": 364, - "enabled": TRUE, + "enabled": true, "label": "Hue-Saturation...", - "visible": TRUE + "visible": true }, { "id": 365, - "enabled": TRUE, + "enabled": true, "label": "Color Balance...", - "visible": TRUE + "visible": true } ] }, { "id": 366, - "enabled": TRUE, + "enabled": true, "label": "Transform Tools", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 367, "shortcut": [["Shift", "f"]], - "enabled": TRUE, + "enabled": true, "label": "Flip", - "visible": TRUE + "visible": true }, { "id": 368, "shortcut": [["Shift", "p"]], - "enabled": TRUE, + "enabled": true, "label": "Perspective", - "visible": TRUE + "visible": true }, { "id": 369, "shortcut": [["Shift", "s"]], - "enabled": TRUE, + "enabled": true, "label": "Shear", - "visible": TRUE + "visible": true }, { "id": 370, "shortcut": [["Shift", "t"]], - "enabled": TRUE, + "enabled": true, "label": "Scale", - "visible": TRUE + "visible": true }, { "id": 371, "shortcut": [["Shift", "r"]], - "enabled": TRUE, + "enabled": true, "label": "Rotate", - "visible": TRUE + "visible": true }, { "id": 372, "shortcut": [["Shift", "c"]], - "enabled": TRUE, + "enabled": true, "label": "Crop", - "visible": TRUE + "visible": true }, { "id": 373, "shortcut": [["m"]], - "enabled": TRUE, + "enabled": true, "label": "Move", - "visible": TRUE + "visible": true }, { "id": 374, "shortcut": [["q"]], - "enabled": TRUE, + "enabled": true, "label": "Align", - "visible": TRUE + "visible": true } ] }, { "id": 375, - "enabled": TRUE, + "enabled": true, "label": "Paint Tools", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 376, "shortcut": [["Shift", "d"]], - "enabled": TRUE, + "enabled": true, "label": "Dodge / Burn", - "visible": TRUE + "visible": true }, { "id": 377, "shortcut": [["s"]], - "enabled": TRUE, + "enabled": true, "label": "Smudge", - "visible": TRUE + "visible": true }, { "id": 378, "shortcut": [["Shift", "u"]], - "enabled": TRUE, + "enabled": true, "label": "Blur / Sharpen", - "visible": TRUE + "visible": true }, { "id": 379, - "enabled": TRUE, + "enabled": true, "label": "Perspective Clone", - "visible": TRUE + "visible": true }, { "id": 380, "shortcut": [["h"]], - "enabled": TRUE, + "enabled": true, "label": "Heal", - "visible": TRUE + "visible": true }, { "id": 381, "shortcut": [["c"]], - "enabled": TRUE, + "enabled": true, "label": "Clone", - "visible": TRUE + "visible": true }, { "id": 382, "shortcut": [["k"]], - "enabled": TRUE, + "enabled": true, "label": "Ink", - "visible": TRUE + "visible": true }, { "id": 383, "shortcut": [["a"]], - "enabled": TRUE, + "enabled": true, "label": "Airbrush", - "visible": TRUE + "visible": true }, { "id": 384, "shortcut": [["Shift", "e"]], - "enabled": TRUE, + "enabled": true, "label": "Eraser", - "visible": TRUE + "visible": true }, { "id": 385, "shortcut": [["p"]], - "enabled": TRUE, + "enabled": true, "label": "Paintbrush", - "visible": TRUE + "visible": true }, { "id": 386, "shortcut": [["n"]], - "enabled": TRUE, + "enabled": true, "label": "Pencil", - "visible": TRUE + "visible": true }, { "id": 387, "shortcut": [["l"]], - "enabled": TRUE, + "enabled": true, "label": "Blend", - "visible": TRUE + "visible": true }, { "id": 388, "shortcut": [["Shift", "b"]], - "enabled": TRUE, + "enabled": true, "label": "Bucket Fill", - "visible": TRUE + "visible": true } ] }, { "id": 389, - "enabled": TRUE, + "enabled": true, "label": "Selection Tools", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 390, "shortcut": [["i"]], - "enabled": TRUE, + "enabled": true, "label": "Intelligent Scissors", - "visible": TRUE + "visible": true }, { "id": 391, "shortcut": [["Shift", "o"]], - "enabled": TRUE, + "enabled": true, "label": "By Color Select", - "visible": TRUE + "visible": true }, { "id": 392, "shortcut": [["u"]], - "enabled": TRUE, + "enabled": true, "label": "Fuzzy Select", - "visible": TRUE + "visible": true }, { "id": 393, - "enabled": TRUE, + "enabled": true, "label": "Foreground Select", - "visible": TRUE + "visible": true }, { "id": 394, "shortcut": [["f"]], - "enabled": TRUE, + "enabled": true, "label": "Free Select", - "visible": TRUE + "visible": true }, { "id": 395, "shortcut": [["e"]], - "enabled": TRUE, + "enabled": true, "label": "Ellipse Select", - "visible": TRUE + "visible": true }, { "id": 396, "shortcut": [["r"]], - "enabled": TRUE, + "enabled": true, "label": "Rectangle Select", - "visible": TRUE + "visible": true } ] } @@ -2568,50 +2568,50 @@ }, { "id": 397, - "enabled": TRUE, + "enabled": true, "label": "Filters", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 398, - "enabled": TRUE, + "enabled": true, "label": "Script-Fu", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 399, - "enabled": TRUE, + "enabled": true, "label": "Start Server...", - "visible": TRUE + "visible": true }, { "id": 400, - "enabled": TRUE, + "enabled": true, "label": "Refresh Scripts", - "visible": TRUE + "visible": true }, { "id": 401, - "enabled": TRUE, + "enabled": true, "label": "Console", - "visible": TRUE + "visible": true } ] }, { "id": 402, - "enabled": TRUE, + "enabled": true, "label": "Python-Fu", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 403, - "enabled": TRUE, + "enabled": true, "label": "Console", - "visible": TRUE + "visible": true } ] }, @@ -2621,124 +2621,124 @@ }, { "id": 405, - "enabled": TRUE, + "enabled": true, "label": "Alpha to Logo", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 406, - "enabled": TRUE, + "enabled": true, "label": "Textured...", - "visible": TRUE + "visible": true }, { "id": 407, - "enabled": TRUE, + "enabled": true, "label": "Particle Trace...", - "visible": TRUE + "visible": true }, { "id": 408, - "enabled": TRUE, + "enabled": true, "label": "Neon...", - "visible": TRUE + "visible": true }, { "id": 409, - "enabled": TRUE, + "enabled": true, "label": "Gradient Bevel...", - "visible": TRUE + "visible": true }, { "id": 410, - "enabled": TRUE, + "enabled": true, "label": "Glowing Hot...", - "visible": TRUE + "visible": true }, { "id": 411, - "enabled": TRUE, + "enabled": true, "label": "Glossy...", - "visible": TRUE + "visible": true }, { "id": 412, - "enabled": TRUE, + "enabled": true, "label": "Frosty...", - "visible": TRUE + "visible": true }, { "id": 413, - "enabled": TRUE, + "enabled": true, "label": "Cool Metal...", - "visible": TRUE + "visible": true }, { "id": 414, - "enabled": TRUE, + "enabled": true, "label": "Comic Book...", - "visible": TRUE + "visible": true }, { "id": 415, - "enabled": TRUE, + "enabled": true, "label": "Chrome...", - "visible": TRUE + "visible": true }, { "id": 416, - "enabled": TRUE, + "enabled": true, "label": "Chip Away...", - "visible": TRUE + "visible": true }, { "id": 417, - "enabled": TRUE, + "enabled": true, "label": "Chalk...", - "visible": TRUE + "visible": true }, { "id": 418, - "enabled": TRUE, + "enabled": true, "label": "Bovination...", - "visible": TRUE + "visible": true }, { "id": 419, - "enabled": TRUE, + "enabled": true, "label": "Blended...", - "visible": TRUE + "visible": true }, { "id": 420, - "enabled": TRUE, + "enabled": true, "label": "Basic I...", - "visible": TRUE + "visible": true }, { "id": 421, - "enabled": TRUE, + "enabled": true, "label": "Basic II...", - "visible": TRUE + "visible": true }, { "id": 422, - "enabled": TRUE, + "enabled": true, "label": "Alien Neon...", - "visible": TRUE + "visible": true }, { "id": 423, - "enabled": TRUE, + "enabled": true, "label": "Alien Glow...", - "visible": TRUE + "visible": true }, { "id": 424, - "enabled": TRUE, + "enabled": true, "label": "3D Outline...", - "visible": TRUE + "visible": true } ] }, @@ -2748,34 +2748,34 @@ }, { "id": 426, - "enabled": TRUE, + "enabled": true, "label": "Animation", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 427, - "enabled": TRUE, + "enabled": true, "label": "Unoptimize", - "visible": TRUE + "visible": true }, { "id": 428, - "enabled": TRUE, + "enabled": true, "label": "Playback...", - "visible": TRUE + "visible": true }, { "id": 429, - "enabled": TRUE, + "enabled": true, "label": "Optimize (for GIF)", - "visible": TRUE + "visible": true }, { "id": 430, - "enabled": TRUE, + "enabled": true, "label": "Optimize (Difference)", - "visible": TRUE + "visible": true }, { "id": 431, @@ -2783,111 +2783,111 @@ }, { "id": 432, - "enabled": TRUE, + "enabled": true, "label": "Waves...", - "visible": TRUE + "visible": true }, { "id": 433, - "enabled": TRUE, + "enabled": true, "label": "Spinning Globe...", - "visible": TRUE + "visible": true }, { "id": 434, - "enabled": TRUE, + "enabled": true, "label": "Rippling...", - "visible": TRUE + "visible": true }, { "id": 435, - "enabled": TRUE, + "enabled": true, "label": "Burn-In...", - "visible": TRUE + "visible": true }, { "id": 436, - "enabled": TRUE, + "enabled": true, "label": "Blend...", - "visible": TRUE + "visible": true } ] }, { "id": 437, - "enabled": TRUE, + "enabled": true, "label": "Web", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 438, - "enabled": TRUE, + "enabled": true, "label": "Slice...", - "visible": TRUE + "visible": true }, { "id": 439, - "enabled": TRUE, + "enabled": true, "label": "Semi-Flatten", - "visible": TRUE + "visible": true }, { "id": 440, - "enabled": TRUE, + "enabled": true, "label": "Image Map...", - "visible": TRUE + "visible": true } ] }, { "id": 441, - "enabled": TRUE, + "enabled": true, "label": "Render", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 442, - "enabled": TRUE, + "enabled": true, "label": "Spyrogimp...", - "visible": TRUE + "visible": true }, { "id": 443, - "enabled": TRUE, + "enabled": true, "label": "Sphere Designer...", - "visible": TRUE + "visible": true }, { "id": 444, - "enabled": TRUE, + "enabled": true, "label": "Line Nova...", - "visible": TRUE + "visible": true }, { "id": 445, - "enabled": TRUE, + "enabled": true, "label": "Lava...", - "visible": TRUE + "visible": true }, { "id": 446, - "enabled": TRUE, + "enabled": true, "label": "Gfig...", - "visible": TRUE + "visible": true }, { "id": 447, - "enabled": TRUE, + "enabled": true, "label": "Fractal Explorer...", - "visible": TRUE + "visible": true }, { "id": 448, - "enabled": TRUE, + "enabled": true, "label": "Circuit...", - "visible": TRUE + "visible": true }, { "id": 449, @@ -2895,112 +2895,112 @@ }, { "id": 450, - "enabled": TRUE, + "enabled": true, "label": "Pattern", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 451, - "enabled": TRUE, + "enabled": true, "label": "Sinus...", - "visible": TRUE + "visible": true }, { "id": 452, - "enabled": TRUE, + "enabled": true, "label": "Qbist...", - "visible": TRUE + "visible": true }, { "id": 453, - "enabled": TRUE, + "enabled": true, "label": "Maze...", - "visible": TRUE + "visible": true }, { "id": 454, - "enabled": TRUE, + "enabled": true, "label": "Jigsaw...", - "visible": TRUE + "visible": true }, { "id": 455, - "enabled": TRUE, + "enabled": true, "label": "Grid...", - "visible": TRUE + "visible": true }, { "id": 456, - "enabled": TRUE, + "enabled": true, "label": "Diffraction Patterns...", - "visible": TRUE + "visible": true }, { "id": 457, - "enabled": TRUE, + "enabled": true, "label": "CML Explorer...", - "visible": TRUE + "visible": true }, { "id": 458, - "enabled": TRUE, + "enabled": true, "label": "Checkerboard...", - "visible": TRUE + "visible": true } ] }, { "id": 459, - "enabled": TRUE, + "enabled": true, "label": "Nature", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 460, - "enabled": TRUE, + "enabled": true, "label": "IFS Fractal...", - "visible": TRUE + "visible": true }, { "id": 461, - "enabled": TRUE, + "enabled": true, "label": "Flame...", - "visible": TRUE + "visible": true } ] }, { "id": 462, - "enabled": TRUE, + "enabled": true, "label": "Clouds", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 463, - "enabled": TRUE, + "enabled": true, "label": "Solid Noise...", - "visible": TRUE + "visible": true }, { "id": 464, - "enabled": TRUE, + "enabled": true, "label": "Plasma...", - "visible": TRUE + "visible": true }, { "id": 465, - "enabled": TRUE, + "enabled": true, "label": "Fog...", - "visible": TRUE + "visible": true }, { "id": 466, - "enabled": TRUE, + "enabled": true, "label": "Difference Clouds...", - "visible": TRUE + "visible": true } ] } @@ -3008,361 +3008,361 @@ }, { "id": 467, - "enabled": TRUE, + "enabled": true, "label": "Map", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 468, - "enabled": TRUE, + "enabled": true, "label": "Warp...", - "visible": TRUE + "visible": true }, { "id": 469, - "enabled": TRUE, + "enabled": true, "label": "Tile...", - "visible": TRUE + "visible": true }, { "id": 470, - "enabled": TRUE, + "enabled": true, "label": "Small Tiles...", - "visible": TRUE + "visible": true }, { "id": 471, - "enabled": TRUE, + "enabled": true, "label": "Paper Tile...", - "visible": TRUE + "visible": true }, { "id": 472, - "enabled": TRUE, + "enabled": true, "label": "Map Object...", - "visible": TRUE + "visible": true }, { "id": 473, - "enabled": TRUE, + "enabled": true, "label": "Make Seamless", - "visible": TRUE + "visible": true }, { "id": 474, - "enabled": TRUE, + "enabled": true, "label": "Illusion...", - "visible": TRUE + "visible": true }, { "id": 475, - "enabled": TRUE, + "enabled": true, "label": "Fractal Trace...", - "visible": TRUE + "visible": true }, { "id": 476, - "enabled": TRUE, + "enabled": true, "label": "Displace...", - "visible": TRUE + "visible": true }, { "id": 477, - "enabled": TRUE, + "enabled": true, "label": "Bump Map...", - "visible": TRUE + "visible": true } ] }, { "id": 478, - "enabled": TRUE, + "enabled": true, "label": "Decor", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 479, - "enabled": FALSE, + "enabled": false, "label": "Stencil Chrome...", - "visible": TRUE + "visible": true }, { "id": 480, - "enabled": FALSE, + "enabled": false, "label": "Stencil Carve...", - "visible": TRUE + "visible": true }, { "id": 481, - "enabled": FALSE, + "enabled": false, "label": "Slide...", - "visible": TRUE + "visible": true }, { "id": 482, - "enabled": FALSE, + "enabled": false, "label": "Round Corners...", - "visible": TRUE + "visible": true }, { "id": 483, - "enabled": TRUE, + "enabled": true, "label": "Old Photo...", - "visible": TRUE + "visible": true }, { "id": 484, - "enabled": TRUE, + "enabled": true, "label": "Fuzzy Border...", - "visible": TRUE + "visible": true }, { "id": 485, - "enabled": TRUE, + "enabled": true, "label": "Coffee Stain...", - "visible": TRUE + "visible": true }, { "id": 486, - "enabled": TRUE, + "enabled": true, "label": "Add Border...", - "visible": TRUE + "visible": true }, { "id": 487, - "enabled": TRUE, + "enabled": true, "label": "Add Bevel...", - "visible": TRUE + "visible": true } ] }, { "id": 488, - "enabled": TRUE, + "enabled": true, "label": "Artistic", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 489, - "enabled": TRUE, + "enabled": true, "label": "Weave...", - "visible": TRUE + "visible": true }, { "id": 490, - "enabled": TRUE, + "enabled": true, "label": "Van Gogh (LIC)...", - "visible": TRUE + "visible": true }, { "id": 491, - "enabled": TRUE, + "enabled": true, "label": "Softglow...", - "visible": TRUE + "visible": true }, { "id": 492, - "enabled": TRUE, + "enabled": true, "label": "Predator...", - "visible": TRUE + "visible": true }, { "id": 493, - "enabled": TRUE, + "enabled": true, "label": "Photocopy...", - "visible": TRUE + "visible": true }, { "id": 494, - "enabled": TRUE, + "enabled": true, "label": "Oilify...", - "visible": TRUE + "visible": true }, { "id": 495, - "enabled": TRUE, + "enabled": true, "label": "GIMPressionist...", - "visible": TRUE + "visible": true }, { "id": 496, - "enabled": TRUE, + "enabled": true, "label": "Cubism...", - "visible": TRUE + "visible": true }, { "id": 497, - "enabled": TRUE, + "enabled": true, "label": "Clothify...", - "visible": TRUE + "visible": true }, { "id": 498, - "enabled": TRUE, + "enabled": true, "label": "Cartoon...", - "visible": TRUE + "visible": true }, { "id": 499, - "enabled": TRUE, + "enabled": true, "label": "Apply Canvas...", - "visible": TRUE + "visible": true } ] }, { "id": 500, - "enabled": TRUE, + "enabled": true, "label": "Combine", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 501, - "enabled": TRUE, + "enabled": true, "label": "Filmstrip...", - "visible": TRUE + "visible": true }, { "id": 502, - "enabled": TRUE, + "enabled": true, "label": "Depth Merge...", - "visible": TRUE + "visible": true } ] }, { "id": 503, - "enabled": TRUE, + "enabled": true, "label": "Generic", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 504, - "enabled": TRUE, + "enabled": true, "label": "Erode", - "visible": TRUE + "visible": true }, { "id": 505, - "enabled": TRUE, + "enabled": true, "label": "Dilate", - "visible": TRUE + "visible": true }, { "id": 506, - "enabled": TRUE, + "enabled": true, "label": "Convolution Matrix...", - "visible": TRUE + "visible": true } ] }, { "id": 507, - "enabled": TRUE, + "enabled": true, "label": "Edge-Detect", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 508, - "enabled": TRUE, + "enabled": true, "label": "Sobel...", - "visible": TRUE + "visible": true }, { "id": 509, - "enabled": TRUE, + "enabled": true, "label": "Neon...", - "visible": TRUE + "visible": true }, { "id": 510, - "enabled": TRUE, + "enabled": true, "label": "Laplace", - "visible": TRUE + "visible": true }, { "id": 511, - "enabled": TRUE, + "enabled": true, "label": "Edge...", - "visible": TRUE + "visible": true }, { "id": 512, - "enabled": TRUE, + "enabled": true, "label": "Difference of Gaussians...", - "visible": TRUE + "visible": true } ] }, { "id": 513, - "enabled": TRUE, + "enabled": true, "label": "Noise", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 514, - "enabled": TRUE, + "enabled": true, "label": "Spread...", - "visible": TRUE + "visible": true }, { "id": 515, - "enabled": TRUE, + "enabled": true, "label": "Slur...", - "visible": TRUE + "visible": true }, { "id": 516, - "enabled": TRUE, + "enabled": true, "label": "RGB Noise...", - "visible": TRUE + "visible": true }, { "id": 517, - "enabled": TRUE, + "enabled": true, "label": "Pick...", - "visible": TRUE + "visible": true }, { "id": 518, - "enabled": TRUE, + "enabled": true, "label": "Hurl...", - "visible": TRUE + "visible": true }, { "id": 519, - "enabled": TRUE, + "enabled": true, "label": "HSV Noise...", - "visible": TRUE + "visible": true } ] }, { "id": 520, - "enabled": TRUE, + "enabled": true, "label": "Light and Shadow", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 521, - "enabled": TRUE, + "enabled": true, "label": "Glass Tile...", - "visible": TRUE + "visible": true }, { "id": 522, - "enabled": TRUE, + "enabled": true, "label": "Apply Lens...", - "visible": TRUE + "visible": true }, { "id": 523, @@ -3370,21 +3370,21 @@ }, { "id": 524, - "enabled": TRUE, + "enabled": true, "label": "Xach-Effect...", - "visible": TRUE + "visible": true }, { "id": 525, - "enabled": TRUE, + "enabled": true, "label": "Perspective...", - "visible": TRUE + "visible": true }, { "id": 526, - "enabled": TRUE, + "enabled": true, "label": "Drop Shadow...", - "visible": TRUE + "visible": true }, { "id": 527, @@ -3392,252 +3392,252 @@ }, { "id": 528, - "enabled": TRUE, + "enabled": true, "label": "Supernova...", - "visible": TRUE + "visible": true }, { "id": 529, - "enabled": TRUE, + "enabled": true, "label": "Sparkle...", - "visible": TRUE + "visible": true }, { "id": 530, - "enabled": TRUE, + "enabled": true, "label": "Lighting Effects...", - "visible": TRUE + "visible": true }, { "id": 531, - "enabled": TRUE, + "enabled": true, "label": "Lens Flare...", - "visible": TRUE + "visible": true }, { "id": 532, - "enabled": TRUE, + "enabled": true, "label": "Gradient Flare...", - "visible": TRUE + "visible": true } ] }, { "id": 533, - "enabled": TRUE, + "enabled": true, "label": "Distorts", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 534, - "enabled": TRUE, + "enabled": true, "label": "Wind...", - "visible": TRUE + "visible": true }, { "id": 535, - "enabled": TRUE, + "enabled": true, "label": "Whirl and Pinch...", - "visible": TRUE + "visible": true }, { "id": 536, - "enabled": TRUE, + "enabled": true, "label": "Waves...", - "visible": TRUE + "visible": true }, { "id": 537, - "enabled": TRUE, + "enabled": true, "label": "Video...", - "visible": TRUE + "visible": true }, { "id": 538, - "enabled": TRUE, + "enabled": true, "label": "Value Propagate...", - "visible": TRUE + "visible": true }, { "id": 539, - "enabled": TRUE, + "enabled": true, "label": "Shift...", - "visible": TRUE + "visible": true }, { "id": 540, - "enabled": TRUE, + "enabled": true, "label": "Ripple...", - "visible": TRUE + "visible": true }, { "id": 541, - "enabled": TRUE, + "enabled": true, "label": "Polar Coordinates...", - "visible": TRUE + "visible": true }, { "id": 542, - "enabled": TRUE, + "enabled": true, "label": "Pagecurl...", - "visible": TRUE + "visible": true }, { "id": 543, - "enabled": TRUE, + "enabled": true, "label": "Newsprint...", - "visible": TRUE + "visible": true }, { "id": 544, - "enabled": TRUE, + "enabled": true, "label": "Mosaic...", - "visible": TRUE + "visible": true }, { "id": 545, - "enabled": TRUE, + "enabled": true, "label": "Lens Distortion...", - "visible": TRUE + "visible": true }, { "id": 546, - "enabled": TRUE, + "enabled": true, "label": "IWarp...", - "visible": TRUE + "visible": true }, { "id": 547, - "enabled": TRUE, + "enabled": true, "label": "Erase Every Other Row...", - "visible": TRUE + "visible": true }, { "id": 548, - "enabled": TRUE, + "enabled": true, "label": "Engrave...", - "visible": TRUE + "visible": true }, { "id": 549, - "enabled": TRUE, + "enabled": true, "label": "Emboss...", - "visible": TRUE + "visible": true }, { "id": 550, - "enabled": TRUE, + "enabled": true, "label": "Curve Bend...", - "visible": TRUE + "visible": true }, { "id": 551, - "enabled": TRUE, + "enabled": true, "label": "Blinds...", - "visible": TRUE + "visible": true } ] }, { "id": 552, - "enabled": TRUE, + "enabled": true, "label": "Enhance", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 553, - "enabled": TRUE, + "enabled": true, "label": "Unsharp Mask...", - "visible": TRUE + "visible": true }, { "id": 554, - "enabled": TRUE, + "enabled": true, "label": "Sharpen...", - "visible": TRUE + "visible": true }, { "id": 555, - "enabled": TRUE, + "enabled": true, "label": "Red Eye Removal...", - "visible": TRUE + "visible": true }, { "id": 556, - "enabled": FALSE, + "enabled": false, "label": "NL Filter...", - "visible": TRUE + "visible": true }, { "id": 557, - "enabled": TRUE, + "enabled": true, "label": "Destripe...", - "visible": TRUE + "visible": true }, { "id": 558, - "enabled": TRUE, + "enabled": true, "label": "Despeckle...", - "visible": TRUE + "visible": true }, { "id": 559, - "enabled": TRUE, + "enabled": true, "label": "Deinterlace...", - "visible": TRUE + "visible": true }, { "id": 560, - "enabled": TRUE, + "enabled": true, "label": "Antialias", - "visible": TRUE + "visible": true } ] }, { "id": 561, - "enabled": TRUE, + "enabled": true, "label": "Blur", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 562, - "enabled": TRUE, + "enabled": true, "label": "Tileable Blur...", - "visible": TRUE + "visible": true }, { "id": 563, - "enabled": TRUE, + "enabled": true, "label": "Selective Gaussian Blur...", - "visible": TRUE + "visible": true }, { "id": 564, - "enabled": TRUE, + "enabled": true, "label": "Pixelize...", - "visible": TRUE + "visible": true }, { "id": 565, - "enabled": TRUE, + "enabled": true, "label": "Motion Blur...", - "visible": TRUE + "visible": true }, { "id": 566, - "enabled": TRUE, + "enabled": true, "label": "Gaussian Blur...", - "visible": TRUE + "visible": true }, { "id": 567, - "enabled": TRUE, + "enabled": true, "label": "Blur", - "visible": TRUE + "visible": true } ] }, @@ -3647,48 +3647,48 @@ }, { "id": 569, - "enabled": TRUE, + "enabled": true, "label": "Reset all Filters", - "visible": TRUE + "visible": true }, { "id": 570, "shortcut": [["Control", "Shift", "f"]], - "enabled": FALSE, + "enabled": false, "label": "Re-Show Last", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 571, - "enabled": FALSE, + "enabled": false, "label": "Empty", - "visible": TRUE + "visible": true } ] }, { "id": 572, "shortcut": [["Control", "f"]], - "enabled": FALSE, + "enabled": false, "label": "Repeat Last", - "visible": TRUE + "visible": true } ] }, { "id": 573, - "enabled": TRUE, + "enabled": true, "label": "Windows", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 574, "shortcut": [["Control", "b"]], - "enabled": TRUE, + "enabled": true, "label": "Toolbox", - "visible": TRUE + "visible": true }, { "id": 575, @@ -3696,40 +3696,40 @@ }, { "id": 576, - "enabled": TRUE, + "enabled": true, "label": "Dockable Dialogs", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 577, - "enabled": TRUE, + "enabled": true, "label": "Error Console", - "visible": TRUE + "visible": true }, { "id": 578, - "enabled": TRUE, + "enabled": true, "label": "Tools", - "visible": TRUE + "visible": true }, { "id": 579, - "enabled": TRUE, + "enabled": true, "label": "Templates", - "visible": TRUE + "visible": true }, { "id": 580, - "enabled": TRUE, + "enabled": true, "label": "Document History", - "visible": TRUE + "visible": true }, { "id": 581, - "enabled": TRUE, + "enabled": true, "label": "Images", - "visible": TRUE + "visible": true }, { "id": 582, @@ -3737,48 +3737,48 @@ }, { "id": 583, - "enabled": TRUE, + "enabled": true, "label": "Buffers", - "visible": TRUE + "visible": true }, { "id": 584, - "enabled": TRUE, + "enabled": true, "label": "Fonts", - "visible": TRUE + "visible": true }, { "id": 585, - "enabled": TRUE, + "enabled": true, "label": "Palettes", - "visible": TRUE + "visible": true }, { "id": 586, "shortcut": [["Control", "g"]], - "enabled": TRUE, + "enabled": true, "label": "Gradients", - "visible": TRUE + "visible": true }, { "id": 587, "shortcut": [["Control", "Shift", "p"]], - "enabled": TRUE, + "enabled": true, "label": "Patterns", - "visible": TRUE + "visible": true }, { "id": 588, "shortcut": [["Control", "Shift", "b"]], - "enabled": TRUE, + "enabled": true, "label": "Brushes", - "visible": TRUE + "visible": true }, { "id": 589, - "enabled": TRUE, + "enabled": true, "label": "Colors", - "visible": TRUE + "visible": true }, { "id": 590, @@ -3786,64 +3786,64 @@ }, { "id": 591, - "enabled": TRUE, + "enabled": true, "label": "Sample Points", - "visible": TRUE + "visible": true }, { "id": 592, - "enabled": TRUE, + "enabled": true, "label": "Pointer", - "visible": TRUE + "visible": true }, { "id": 593, - "enabled": TRUE, + "enabled": true, "label": "Undo History", - "visible": TRUE + "visible": true }, { "id": 594, - "enabled": TRUE, + "enabled": true, "label": "Navigation", - "visible": TRUE + "visible": true }, { "id": 595, - "enabled": TRUE, + "enabled": true, "label": "Selection Editor", - "visible": TRUE + "visible": true }, { "id": 596, - "enabled": TRUE, + "enabled": true, "label": "Histogram", - "visible": TRUE + "visible": true }, { "id": 597, - "enabled": TRUE, + "enabled": true, "label": "Colormap", - "visible": TRUE + "visible": true }, { "id": 598, - "enabled": TRUE, + "enabled": true, "label": "Paths", - "visible": TRUE + "visible": true }, { "id": 599, - "enabled": TRUE, + "enabled": true, "label": "Channels", - "visible": TRUE + "visible": true }, { "id": 600, "shortcut": [["Control", "l"]], - "enabled": TRUE, + "enabled": true, "label": "Layers", - "visible": TRUE + "visible": true }, { "id": 601, @@ -3851,30 +3851,30 @@ }, { "id": 602, - "enabled": TRUE, + "enabled": true, "label": "Device Status", - "visible": TRUE + "visible": true }, { "id": 603, - "enabled": TRUE, + "enabled": true, "label": "Tool Options", - "visible": TRUE + "visible": true } ] }, { "id": 604, - "enabled": TRUE, + "enabled": true, "label": "Recently Closed Docks", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 605, - "enabled": FALSE, + "enabled": false, "label": "Empty", - "visible": TRUE + "visible": true } ] } @@ -3882,92 +3882,92 @@ }, { "id": 606, - "enabled": TRUE, + "enabled": true, "label": "Help", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 607, - "enabled": TRUE, + "enabled": true, "label": "User Manual", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 608, - "enabled": TRUE, + "enabled": true, "label": "Working with Digital Camera Photos", - "visible": TRUE + "visible": true }, { "id": 609, - "enabled": TRUE, + "enabled": true, "label": "Using Paths", - "visible": TRUE + "visible": true }, { "id": 610, - "enabled": TRUE, + "enabled": true, "label": "Preparing your Images for the Web", - "visible": TRUE + "visible": true }, { "id": 611, - "enabled": TRUE, + "enabled": true, "label": "How to Use Dialogs", - "visible": TRUE + "visible": true }, { "id": 612, - "enabled": TRUE, + "enabled": true, "label": "Drawing Simple Objects", - "visible": TRUE + "visible": true }, { "id": 613, - "enabled": TRUE, + "enabled": true, "label": "Create, Open and Save Files", - "visible": TRUE + "visible": true }, { "id": 614, - "enabled": TRUE, + "enabled": true, "label": "Basic Concepts", - "visible": TRUE + "visible": true } ] }, { "id": 615, - "enabled": TRUE, + "enabled": true, "label": "GIMP Online", "children-display": "submenu", - "visible": TRUE, + "visible": true, "submenu": [ { "id": 616, - "enabled": TRUE, + "enabled": true, "label": "User Manual Web Site", - "visible": TRUE + "visible": true }, { "id": 617, - "enabled": TRUE, + "enabled": true, "label": "Plug-in Registry", - "visible": TRUE + "visible": true }, { "id": 618, - "enabled": TRUE, + "enabled": true, "label": "Main Web Site", - "visible": TRUE + "visible": true }, { "id": 619, - "enabled": TRUE, + "enabled": true, "label": "Developer Web Site", - "visible": TRUE + "visible": true } ] }, @@ -3977,15 +3977,15 @@ }, { "id": 621, - "enabled": TRUE, + "enabled": true, "label": "Procedure Browser", - "visible": TRUE + "visible": true }, { "id": 622, - "enabled": TRUE, + "enabled": true, "label": "Plug-In Browser", - "visible": TRUE + "visible": true }, { "id": 623, @@ -3993,29 +3993,29 @@ }, { "id": 624, - "enabled": TRUE, + "enabled": true, "label": "About", - "visible": TRUE + "visible": true }, { "id": 625, - "enabled": TRUE, + "enabled": true, "label": "Tip of the Day", - "visible": TRUE + "visible": true }, { "id": 626, "shortcut": [["Shift", "F1"]], - "enabled": TRUE, + "enabled": true, "label": "Context Help", - "visible": TRUE + "visible": true }, { "id": 627, "shortcut": [["F1"]], - "enabled": TRUE, + "enabled": true, "label": "Help", - "visible": TRUE + "visible": true } ] } -- cgit v1.2.3 From ecfd01992d210f2411d1adac9ed7622837135210 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 18:18:13 -0500 Subject: Adding a test-client bin --- .bzrignore | 1 + tests/Makefile.am | 1 + tests/test-json-client.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 tests/test-json-client.c (limited to 'tests') diff --git a/.bzrignore b/.bzrignore index d2d26a9..e80aadf 100644 --- a/.bzrignore +++ b/.bzrignore @@ -186,3 +186,4 @@ tests/dbusmenu-jsonloader.pc tests/libdbusmenu-jsonloader.la tests/libdbusmenu_jsonloader_la-json-loader.lo tests/test-json-server +tests/test-json-client diff --git a/tests/Makefile.am b/tests/Makefile.am index 2dd2cf7..9dab3eb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -33,6 +33,7 @@ check_PROGRAMS = \ test-gtk-shortcut-server \ test-glib-simple-items \ test-gtk-reorder-server \ + test-json-client \ test-json-server XVFB_RUN=". $(srcdir)/run-xvfb.sh" diff --git a/tests/test-json-client.c b/tests/test-json-client.c new file mode 100644 index 0000000..2d90608 --- /dev/null +++ b/tests/test-json-client.c @@ -0,0 +1,45 @@ +#include +#include +#include +#include + +GMainLoop * mainloop = NULL; + +int +main (int argv, char ** argc) +{ + 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.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"); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + g_debug("Exiting"); + + return 0; +} -- cgit v1.2.3 From dce233d4c70e90cfb0f3862ba66538222ffbb7d6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 18:33:43 -0500 Subject: Starting to link things together... still not working. --- .bzrignore | 1 + tests/Makefile.am | 2 +- tests/test-json-client.c | 8 +++++--- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/.bzrignore b/.bzrignore index e80aadf..ae6fc3d 100644 --- a/.bzrignore +++ b/.bzrignore @@ -187,3 +187,4 @@ tests/libdbusmenu-jsonloader.la tests/libdbusmenu_jsonloader_la-json-loader.lo tests/test-json-server tests/test-json-client +tests/test-json diff --git a/tests/Makefile.am b/tests/Makefile.am index 9dab3eb..3cd4380 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -127,7 +127,7 @@ test_glib_layout_client_LDADD = \ test-json: test-json-client test-json-server Makefile.am @echo "#!/bin/bash" > $@ - @echo $(DBUS_RUNNER) --task ./test-json-client --task-name Client --task ./test-json-server --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) --task ./test-json-client --task-name Client --parameter $(top_builddir)/tools/dbusmenu-dumper --parameter output.json --ignore-return --task ./test-json-server --task-name Server --parameter $(srcdir)/test-json-01.json --ignore-return >> $@ @chmod +x $@ test_json_server_SOURCES = \ diff --git a/tests/test-json-client.c b/tests/test-json-client.c index 2d90608..7208fa8 100644 --- a/tests/test-json-client.c +++ b/tests/test-json-client.c @@ -23,7 +23,7 @@ main (int argv, char ** argc) gboolean has_owner = FALSE; gint owner_count = 0; while (!has_owner && owner_count < 10000) { - org_freedesktop_DBus_name_has_owner(bus_proxy, "org.test", &has_owner, NULL); + org_freedesktop_DBus_name_has_owner(bus_proxy, "org.dbusmenu.test", &has_owner, NULL); owner_count++; } @@ -36,8 +36,10 @@ main (int argv, char ** argc) g_debug("Initing"); - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); + gchar * command = g_strdup_printf("%s --dbus-name=org.dbusmenu.test --dbus-object=/org/test > %s", argc[1], argc[2]); + g_debug("Executing: %s", command); + + g_spawn_command_line_sync(command, NULL, NULL, NULL, NULL); g_debug("Exiting"); -- cgit v1.2.3 From cba3c47e7fe383c6c3496a55158a86fe6994dd35 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 21:47:43 -0500 Subject: Redirecting output to a file. --- configure.ac | 4 +++- tests/Makefile.am | 1 + tests/test-json-client.c | 11 +++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/configure.ac b/configure.ac index fdc76fb..598df4a 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/tests/Makefile.am b/tests/Makefile.am index 3cd4380..1f7e36e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -155,6 +155,7 @@ test_json_client_CFLAGS = \ test_json_client_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ + $(DBUSMENUTESTS_LIBS) \ $(DBUSMENUGLIB_LIBS) ###################### diff --git a/tests/test-json-client.c b/tests/test-json-client.c index 7208fa8..62eb87c 100644 --- a/tests/test-json-client.c +++ b/tests/test-json-client.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -36,10 +37,16 @@ main (int argv, char ** argc) g_debug("Initing"); - gchar * command = g_strdup_printf("%s --dbus-name=org.dbusmenu.test --dbus-object=/org/test > %s", argc[1], argc[2]); + gchar * command = g_strdup_printf("%s --dbus-name=org.dbusmenu.test --dbus-object=/org/test", argc[1]); g_debug("Executing: %s", command); - g_spawn_command_line_sync(command, NULL, NULL, NULL, NULL); + gchar * output; + g_spawn_command_line_sync(command, &output, NULL, NULL, NULL); + + GFile * ofile = g_file_new_for_commandline_arg(argc[2]); + if (ofile != NULL) { + g_file_replace_contents(ofile, output, g_utf8_strlen(output, -1), NULL, FALSE, 0, NULL, NULL, NULL); + } g_debug("Exiting"); -- cgit v1.2.3 From 89f7fb74fba3d5a42603af450f4642fe43ac0406 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 21:51:17 -0500 Subject: Setting timeout longer --- tests/test-json-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-json-server.c b/tests/test-json-server.c index b2b8341..cf6b605 100644 --- a/tests/test-json-server.c +++ b/tests/test-json-server.c @@ -49,7 +49,7 @@ main (int argc, char ** argv) dbusmenu_server_set_root(server, root); - g_timeout_add(3000, timer_func, NULL); + g_timeout_add(10000, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From 8bfa911170eecf8b7c4dda05238777e1c066670f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 22:02:53 -0500 Subject: Comparing at the end and running under Xvfb --- tests/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 1f7e36e..31a8910 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -127,7 +127,9 @@ test_glib_layout_client_LDADD = \ 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 output.json --ignore-return --task ./test-json-server --task-name Server --parameter $(srcdir)/test-json-01.json --ignore-return >> $@ + @echo diff test-json-01.json output.json \> /dev/null >> $@ @chmod +x $@ test_json_server_SOURCES = \ -- cgit v1.2.3 From 35589de9fe87c06f07772d9ffae74c2b8ca9141e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 22:07:57 -0500 Subject: Better name, distcheck fix, cleanup. Good stuff. --- tests/Makefile.am | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 31a8910..521cfbb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,8 @@ DBUS_RUNNER=dbus-test-runner +CLEANFILES= + TESTS = \ test-glib-objects-test \ test-glib-layout \ @@ -128,10 +130,12 @@ test_glib_layout_client_LDADD = \ 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 output.json --ignore-return --task ./test-json-server --task-name Server --parameter $(srcdir)/test-json-01.json --ignore-return >> $@ - @echo diff test-json-01.json output.json \> /dev/null >> $@ + @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 @@ -502,7 +506,7 @@ EXTRA_DIST = \ dbusmenu-gtk/mago_tests/data/test-gtk-label.json \ test-json-01.json -CLEANFILES = \ +CLEANFILES += \ dbusmenu-gtk/mago_tests/dbusmenu.pyc distclean-local: -- cgit v1.2.3 From 65cfbcd1339473de0540ef9037af336ce893d008 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 22:12:07 -0500 Subject: Look at all the values instead of just the first. --- tests/json-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 2f27bff..97f1c13 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -31,7 +31,7 @@ node2value (JsonNode * node) int i; for (i = 0; i < json_array_get_length(array); i++) { - const gchar * str = json_node_get_string(first); + const gchar * str = json_node_get_string(json_array_get_element(array, i)); gchar * dupstr = g_strdup(str); g_array_append_val(garray, dupstr); } -- cgit v1.2.3 From 21eae6d351fc5608d1d312332dd0d93126fa6050 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 22:27:09 -0500 Subject: Not sure why this flipped, but whatever. --- tests/test-json-01.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-json-01.json b/tests/test-json-01.json index a014548..88e1cbf 100644 --- a/tests/test-json-01.json +++ b/tests/test-json-01.json @@ -1098,8 +1098,8 @@ }, { "id": 171, - "shortcut": [["F11"]], "enabled": true, + "shortcut": [["F11"]], "toggle-state": 0, "label": "Fullscreen", "toggle-type": "checkmark", -- cgit v1.2.3 From 511e68461114325f3685bc547517668b179b4914 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 22:39:59 -0500 Subject: Forgot copyright headers --- tests/json-loader.c | 20 ++++++++++++++++++++ tests/json-loader.h | 20 ++++++++++++++++++++ tests/test-json-client.c | 21 +++++++++++++++++++++ tests/test-json-server.c | 21 +++++++++++++++++++++ 4 files changed, 82 insertions(+) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 97f1c13..aad4295 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -1,3 +1,23 @@ +/* +A loader to turn JSON into dbusmenu menuitems + +Copyright 2010 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ #include "json-loader.h" #include diff --git a/tests/json-loader.h b/tests/json-loader.h index 67e1c8b..666bb6e 100644 --- a/tests/json-loader.h +++ b/tests/json-loader.h @@ -1,3 +1,23 @@ +/* +A loader to turn JSON into dbusmenu menuitems + +Copyright 2010 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ #ifndef __DBUSMENU_JSON_LOADER_H__ #define __DBUSMENU_JSON_LOADER_H__ diff --git a/tests/test-json-client.c b/tests/test-json-client.c index 62eb87c..73d64b0 100644 --- a/tests/test-json-client.c +++ b/tests/test-json-client.c @@ -1,3 +1,24 @@ +/* +Test to check the json-loader and dbusmenu-dumper + +Copyright 2010 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ + #include #include #include diff --git a/tests/test-json-server.c b/tests/test-json-server.c index cf6b605..fe9507a 100644 --- a/tests/test-json-server.c +++ b/tests/test-json-server.c @@ -1,3 +1,24 @@ +/* +Test to check the json-loader and dbusmenu-dumper + +Copyright 2010 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ + #include #include -- cgit v1.2.3 From 4df378827e9db26d9fad707224d25c0455e9d312 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 22:44:06 -0500 Subject: Getting the depends in order. --- tests/dbusmenu-jsonloader.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/dbusmenu-jsonloader.pc.in b/tests/dbusmenu-jsonloader.pc.in index 6c48f7e..d042132 100644 --- a/tests/dbusmenu-jsonloader.pc.in +++ b/tests/dbusmenu-jsonloader.pc.in @@ -5,7 +5,7 @@ bindir=@bindir@ includedir=@includedir@ Cflags: -I${includedir}/libdbusmenu-0.1 -Requires: dbus-glib-1 +Requires: dbus-glib-1,dbusmenu-glib,json-glib-1.0 Libs: -L${libdir} -ldbusmenu-jsonloader Name: libdbusmenu-jsonloader -- cgit v1.2.3 From 50b6f428911e3683e66cd2dd352e431815e24eb7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 23:17:13 -0500 Subject: Adding the need libraries for making the library. --- tests/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 521cfbb..0fa15fc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -70,7 +70,8 @@ libdbusmenu_jsonloader_la_CFLAGS = \ -DG_LOG_DOMAIN="\"LIBDBUSMENU-JSONLOADER\"" libdbusmenu_jsonloader_la_LIBADD = \ - $(DBUSMENUGLIB_LIBS) + $(DBUSMENUGLIB_LIBS) \ + $(DBUSMENUTEST_LIBS) pkgconfig_DATA = dbusmenu-jsonloader.pc pkgconfigdir = $(libdir)/pkgconfig -- cgit v1.2.3 From dea48a947149ecc92c99bd084c9c7ea2e32d4577 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 23:20:11 -0500 Subject: Typo --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 0fa15fc..d57a578 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -71,7 +71,7 @@ libdbusmenu_jsonloader_la_CFLAGS = \ libdbusmenu_jsonloader_la_LIBADD = \ $(DBUSMENUGLIB_LIBS) \ - $(DBUSMENUTEST_LIBS) + $(DBUSMENUTESTS_LIBS) pkgconfig_DATA = dbusmenu-jsonloader.pc pkgconfigdir = $(libdir)/pkgconfig -- cgit v1.2.3 From 3b991803b808c158edb3062d2b962cdf9d8ed2d2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 23:22:58 -0500 Subject: Adding in the glib lib too. --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index d57a578..63857a2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -70,6 +70,7 @@ libdbusmenu_jsonloader_la_CFLAGS = \ -DG_LOG_DOMAIN="\"LIBDBUSMENU-JSONLOADER\"" libdbusmenu_jsonloader_la_LIBADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGLIB_LIBS) \ $(DBUSMENUTESTS_LIBS) -- cgit v1.2.3 From fa0aae428c6859bb4aab12368ad92cf9d8274d3f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 30 Jun 2010 11:13:47 -0500 Subject: Flipping argv/c from review --- tests/test-json-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test-json-client.c b/tests/test-json-client.c index 73d64b0..f9da55e 100644 --- a/tests/test-json-client.c +++ b/tests/test-json-client.c @@ -28,7 +28,7 @@ with this program. If not, see . GMainLoop * mainloop = NULL; int -main (int argv, char ** argc) +main (int argc, char ** argv) { g_type_init(); g_debug("Wait for friends"); @@ -58,13 +58,13 @@ main (int argv, char ** argc) g_debug("Initing"); - gchar * command = g_strdup_printf("%s --dbus-name=org.dbusmenu.test --dbus-object=/org/test", argc[1]); + 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(argc[2]); + 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); } -- cgit v1.2.3 From fd7ffaa78b2c75db0b8138903d7272ed15641ce1 Mon Sep 17 00:00:00 2001 From: Aurelien Gateau Date: Thu, 22 Jul 2010 10:44:33 +0200 Subject: Fix menu order in submenus --- libdbusmenu-gtk/client.c | 4 +- tests/Makefile.am | 47 ++++++++++++- tests/test-gtk-reorder-server.c | 19 ++++-- tests/test-gtk-submenu-client.c | 143 ++++++++++++++++++++++++++++++++++++++++ tests/test-gtk-submenu-server.c | 86 ++++++++++++++++++++++++ 5 files changed, 289 insertions(+), 10 deletions(-) create mode 100644 tests/test-gtk-submenu-client.c create mode 100644 tests/test-gtk-submenu-server.c (limited to 'tests') diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index b406697..b5b509f 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -491,7 +491,7 @@ dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * /* Oh, we're a child, let's deal with that */ if (parent != NULL) { - new_child(parent, item, dbusmenu_menuitem_get_position_realized(item, parent), DBUSMENU_GTKCLIENT(client)); + new_child(parent, item, dbusmenu_menuitem_get_position(item, parent), DBUSMENU_GTKCLIENT(client)); } return; @@ -519,7 +519,7 @@ new_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint position, Dbus } GtkMenuItem * childmi = dbusmenu_gtkclient_menuitem_get(gtkclient, child); - gtk_menu_shell_insert(GTK_MENU_SHELL(menu), GTK_WIDGET(childmi), dbusmenu_menuitem_get_position_realized(child, mi)); + gtk_menu_shell_insert(GTK_MENU_SHELL(menu), GTK_WIDGET(childmi), position); gtk_widget_show(GTK_WIDGET(menu)); return; diff --git a/tests/Makefile.am b/tests/Makefile.am index 63857a2..9f621cb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -14,7 +14,8 @@ TESTS = \ test-gtk-objects-test \ test-gtk-label \ test-gtk-shortcut \ - test-gtk-reorder + test-gtk-reorder \ + test-gtk-submenu check_PROGRAMS = \ glib-server-nomenu \ @@ -36,7 +37,9 @@ check_PROGRAMS = \ test-glib-simple-items \ test-gtk-reorder-server \ test-json-client \ - test-json-server + test-json-server \ + test-gtk-submenu-server \ + test-gtk-submenu-client XVFB_RUN=". $(srcdir)/run-xvfb.sh" @@ -453,6 +456,46 @@ test_gtk_reorder_server_LDADD = \ $(DBUSMENUGTK_LIBS) \ $(DBUSMENUTESTS_LIBS) +######################### +# Test GTK Submenu +######################### + +test-gtk-submenu: test-gtk-submenu-client test-gtk-submenu-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task ./test-gtk-submenu-client --task-name Client --task ./test-gtk-submenu-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +test_gtk_submenu_server_SOURCES = \ + test-gtk-submenu-server.c + +test_gtk_submenu_server_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_submenu_server_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + +test_gtk_submenu_client_SOURCES = \ + test-gtk-submenu-client.c + +test_gtk_submenu_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_submenu_client_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + ######################### # Test Mago ######################### diff --git a/tests/test-gtk-reorder-server.c b/tests/test-gtk-reorder-server.c index eee9bb8..a3fadb1 100644 --- a/tests/test-gtk-reorder-server.c +++ b/tests/test-gtk-reorder-server.c @@ -41,17 +41,18 @@ guint ordering [NUMBER_TESTS][NUMBER_ENTRIES] = { }; gchar * names [NUMBER_ENTRIES] = { - "One", "Two", "Three", "Four", "Five" + "0", "1", "2", "3", "4" }; DbusmenuMenuitem * entries[NUMBER_ENTRIES] = {0}; DbusmenuMenuitem * root = NULL; - +DbusmenuMenuitem * parent = NULL; gint test = 0; static DbusmenuServer * server = NULL; static GMainLoop * mainloop = NULL; +#if 0 static gboolean timer_func (gpointer data) { @@ -65,13 +66,14 @@ timer_func (gpointer data) int i; for (i = 0; i < NUMBER_ENTRIES; i++) { g_debug("Putting entry '%d' at position '%d'", i, ordering[test][i]); - dbusmenu_menuitem_child_reorder(root, entries[i], ordering[test][i]); + dbusmenu_menuitem_child_reorder(parent, entries[i], ordering[test][i]); dbusmenu_menuitem_property_set(entries[i], "label", names[ordering[test][i]]); } test++; return TRUE; } +#endif int main (int argc, char ** argv) @@ -101,13 +103,18 @@ main (int argc, char ** argv) dbusmenu_server_set_root(server, root); int i; + parent = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set(parent, "label", "Parent"); + dbusmenu_menuitem_child_append(root, parent); + for (i = 0; i < NUMBER_ENTRIES; i++) { entries[i] = dbusmenu_menuitem_new(); - dbusmenu_menuitem_child_append(root, entries[i]); + dbusmenu_menuitem_property_set(entries[i], "label", names[ordering[test][i]]); + dbusmenu_menuitem_child_append(parent, entries[i]); } - timer_func(NULL); - g_timeout_add_seconds(5, timer_func, NULL); + //timer_func(NULL); + //g_timeout_add_seconds(5, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-gtk-submenu-client.c b/tests/test-gtk-submenu-client.c new file mode 100644 index 0000000..2e1ef7a --- /dev/null +++ b/tests/test-gtk-submenu-client.c @@ -0,0 +1,143 @@ +/* +A test for libdbusmenu to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ + +#include +#include + +static GMainLoop * mainloop = NULL; +static gboolean passed = TRUE; + +static gboolean check_menu_content(GtkMenu * menu, char ** content) +{ + GList * child = gtk_container_get_children(GTK_CONTAINER(menu)); + char ** expected = content; + for (; child != NULL; child = g_list_next(child), ++expected) { + if (*expected == NULL) { + g_warning("Too many gtk items"); + return FALSE; + } + const char * label = gtk_menu_item_get_label(GTK_MENU_ITEM(child->data)); + if (g_strcmp0(label, *expected) != 0) { + g_warning("Expected '%s', got '%s'", *expected, label); + return FALSE; + } + } + if (*expected != NULL) { + g_warning("Not enough gtk items"); + return FALSE; + } + return TRUE; +} + +static void +abort_test(const char * message) +{ + if (message) { + g_warning("%s", message); + } + passed = FALSE; + g_main_loop_quit(mainloop); +} + +static gboolean +timer_func (gpointer data) +{ + static char * root_content[] = { "Folder 1", "Folder 2", NULL }; + static char * folder1_content[] = { "1.1", "1.2", "1.3", NULL }; + static char * folder2_content[] = { "2.1", "2.2", "2.3", NULL }; + + GtkMenuItem * root_item = GTK_MENU_ITEM(data); + GtkMenu * menu = GTK_MENU(gtk_menu_item_get_submenu(root_item)); + + /* Root */ + if (!check_menu_content(menu, root_content)) { + abort_test("Checking root content failed"); + return FALSE; + } + + /* Folder 1 */ + GList * child = gtk_container_get_children(GTK_CONTAINER(menu)); + GtkMenuItem * item = GTK_MENU_ITEM(child->data); + GtkMenu * folder_menu = GTK_MENU(gtk_menu_item_get_submenu(item)); + if (!folder_menu) { + abort_test("Folder 1 has no menu"); + return FALSE; + } + + if (!check_menu_content(folder_menu, folder1_content)) { + abort_test("Checking folder1 content failed"); + return FALSE; + } + + /* Folder 2 */ + child = g_list_next(child); + item = GTK_MENU_ITEM(child->data); + folder_menu = GTK_MENU(gtk_menu_item_get_submenu(item)); + if (!folder_menu) { + abort_test("Folder 2 has no menu"); + return FALSE; + } + + if (!check_menu_content(folder_menu, folder2_content)) { + abort_test("Checking folder2 content failed"); + return FALSE; + } + + passed = TRUE; + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char ** argv) +{ + gtk_init(&argc, &argv); + + g_debug("Client Initialized. Waiting."); + /* Make sure the server starts up and all that */ + g_usleep(500000); + + g_debug("Building Window"); + GtkWidget * window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + GtkWidget * menubar = gtk_menu_bar_new(); + GtkWidget * menuitem = gtk_menu_item_new_with_label("Test"); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(dbusmenu_gtkmenu_new ("glib.label.test", "/org/test"))); + gtk_widget_show(menuitem); + gtk_menu_bar_append(menubar, menuitem); + gtk_widget_show(menubar); + gtk_container_add(GTK_CONTAINER(window), menubar); + gtk_window_set_title(GTK_WINDOW(window), "libdbusmenu-gtk test"); + gtk_widget_show(window); + + g_timeout_add_seconds(1, timer_func, menuitem); + + g_debug("Entering Mainloop"); + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + if (passed) { + g_debug("Quiting"); + return 0; + } else { + g_debug("Quiting as we're a failure"); + return 1; + } +} diff --git a/tests/test-gtk-submenu-server.c b/tests/test-gtk-submenu-server.c new file mode 100644 index 0000000..ed9cf79 --- /dev/null +++ b/tests/test-gtk-submenu-server.c @@ -0,0 +1,86 @@ +/* +A test for libdbusmenu to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ + +#include + +#include +#include +#include +#include + +#include +#include + +DbusmenuMenuitem * +add_item(DbusmenuMenuitem * parent, const char * label) +{ + DbusmenuMenuitem * item = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set(item, "label", label); + dbusmenu_menuitem_child_append(parent, item); + return item; +} + +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, "glib.label.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_menuitem_new(); + dbusmenu_server_set_root(server, root); + + DbusmenuMenuitem * item; + item = add_item(root, "Folder 1"); + add_item(item, "1.1"); + add_item(item, "1.2"); + add_item(item, "1.3"); + + item = add_item(root, "Folder 2"); + add_item(item, "2.1"); + add_item(item, "2.2"); + add_item(item, "2.3"); + + GMainLoop * mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + g_debug("Quiting"); + + return 0; +} + -- cgit v1.2.3 From d96d7282b58e60141cde234e106ab3281f50d7b6 Mon Sep 17 00:00:00 2001 From: Aurelien Gateau Date: Thu, 22 Jul 2010 11:31:48 +0200 Subject: Reverted changes to test-gtk-reorder-server --- tests/test-gtk-reorder-server.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'tests') diff --git a/tests/test-gtk-reorder-server.c b/tests/test-gtk-reorder-server.c index a3fadb1..eee9bb8 100644 --- a/tests/test-gtk-reorder-server.c +++ b/tests/test-gtk-reorder-server.c @@ -41,18 +41,17 @@ guint ordering [NUMBER_TESTS][NUMBER_ENTRIES] = { }; gchar * names [NUMBER_ENTRIES] = { - "0", "1", "2", "3", "4" + "One", "Two", "Three", "Four", "Five" }; DbusmenuMenuitem * entries[NUMBER_ENTRIES] = {0}; DbusmenuMenuitem * root = NULL; -DbusmenuMenuitem * parent = NULL; + gint test = 0; static DbusmenuServer * server = NULL; static GMainLoop * mainloop = NULL; -#if 0 static gboolean timer_func (gpointer data) { @@ -66,14 +65,13 @@ timer_func (gpointer data) int i; for (i = 0; i < NUMBER_ENTRIES; i++) { g_debug("Putting entry '%d' at position '%d'", i, ordering[test][i]); - dbusmenu_menuitem_child_reorder(parent, entries[i], ordering[test][i]); + dbusmenu_menuitem_child_reorder(root, entries[i], ordering[test][i]); dbusmenu_menuitem_property_set(entries[i], "label", names[ordering[test][i]]); } test++; return TRUE; } -#endif int main (int argc, char ** argv) @@ -103,18 +101,13 @@ main (int argc, char ** argv) dbusmenu_server_set_root(server, root); int i; - parent = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(parent, "label", "Parent"); - dbusmenu_menuitem_child_append(root, parent); - for (i = 0; i < NUMBER_ENTRIES; i++) { entries[i] = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(entries[i], "label", names[ordering[test][i]]); - dbusmenu_menuitem_child_append(parent, entries[i]); + dbusmenu_menuitem_child_append(root, entries[i]); } - //timer_func(NULL); - //g_timeout_add_seconds(5, timer_func, NULL); + timer_func(NULL); + g_timeout_add_seconds(5, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From d52e108200e0214e770e9cf151f5b96af5ee41f5 Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Thu, 22 Jul 2010 21:05:53 +0200 Subject: Test fixes. --- tests/Makefile.am | 1 - tests/test-gtk-submenu-server.c | 14 +++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 9f621cb..839305f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -10,7 +10,6 @@ TESTS = \ test-glib-proxy \ test-glib-simple-items \ test-glib-submenu \ - test-json \ test-gtk-objects-test \ test-gtk-label \ test-gtk-shortcut \ diff --git a/tests/test-gtk-submenu-server.c b/tests/test-gtk-submenu-server.c index ed9cf79..ba3993e 100644 --- a/tests/test-gtk-submenu-server.c +++ b/tests/test-gtk-submenu-server.c @@ -29,6 +29,16 @@ with this program. If not, see . #include #include +static GMainLoop *mainloop = NULL; + +static gboolean +timer_func (gpointer data) +{ + g_main_loop_quit (mainloop); + + return FALSE; +} + DbusmenuMenuitem * add_item(DbusmenuMenuitem * parent, const char * label) { @@ -76,7 +86,9 @@ main (int argc, char ** argv) add_item(item, "2.2"); add_item(item, "2.3"); - GMainLoop * mainloop = g_main_loop_new(NULL, FALSE); + g_timeout_add_seconds(3, timer_func, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); g_debug("Quiting"); -- cgit v1.2.3 From 845a83ce74926c1cfc4362cf022035d017242dda Mon Sep 17 00:00:00 2001 From: Aurelien Gateau Date: Thu, 5 Aug 2010 19:34:18 +0200 Subject: Seems the test passes after all --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 839305f..9f621cb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -10,6 +10,7 @@ TESTS = \ test-glib-proxy \ test-glib-simple-items \ test-glib-submenu \ + test-json \ test-gtk-objects-test \ test-gtk-label \ test-gtk-shortcut \ -- cgit v1.2.3 From e22b44483407aac56d6b50705bed890038e469a2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 12 Aug 2010 11:11:13 -0500 Subject: Making the dumper sort the properties to make it more predictable. --- tests/test-json-01.json | 386 ++++++++++++++++++++++++------------------------ tools/dbusmenu-dumper.c | 9 +- 2 files changed, 201 insertions(+), 194 deletions(-) (limited to 'tests') diff --git a/tests/test-json-01.json b/tests/test-json-01.json index 88e1cbf..08e9112 100644 --- a/tests/test-json-01.json +++ b/tests/test-json-01.json @@ -4,30 +4,30 @@ "submenu": [ { "id": 5, + "children-display": "submenu", "enabled": true, "label": "File", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 6, - "shortcut": [["Control", "q"]], "enabled": true, "label": "Quit", + "shortcut": [["Control", "q"]], "visible": true }, { "id": 7, - "shortcut": [["Control", "Shift", "w"]], "enabled": true, "label": "Close all", + "shortcut": [["Control", "Shift", "w"]], "visible": true }, { "id": 8, - "shortcut": [["Control", "w"]], "enabled": true, "label": "Close", + "shortcut": [["Control", "w"]], "visible": true }, { @@ -42,9 +42,9 @@ }, { "id": 11, - "shortcut": [["Control", "p"]], "enabled": true, "label": "Print...", + "shortcut": [["Control", "p"]], "visible": true }, { @@ -77,16 +77,16 @@ }, { "id": 17, - "shortcut": [["Control", "Shift", "s"]], "enabled": true, "label": "Save As...", + "shortcut": [["Control", "Shift", "s"]], "visible": true }, { "id": 18, - "shortcut": [["Control", "s"]], "enabled": true, "label": "Save", + "shortcut": [["Control", "s"]], "visible": true }, { @@ -95,9 +95,9 @@ }, { "id": 20, + "children-display": "submenu", "enabled": true, "label": "Open Recent", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -112,16 +112,16 @@ }, { "id": 23, - "shortcut": [["Control", "2"]], "enabled": true, "label": "giggity.jpg", + "shortcut": [["Control", "2"]], "visible": true }, { "id": 24, - "shortcut": [["Control", "1"]], "enabled": true, "label": "Icon Height.svg", + "shortcut": [["Control", "1"]], "visible": true } ] @@ -134,37 +134,37 @@ }, { "id": 26, - "shortcut": [["Control", "Alt", "o"]], "enabled": true, "label": "Open as Layers...", + "shortcut": [["Control", "Alt", "o"]], "visible": true }, { "id": 27, - "shortcut": [["Control", "o"]], "enabled": true, "label": "Open...", + "shortcut": [["Control", "o"]], "visible": true }, { "id": 28, + "children-display": "submenu", "enabled": true, "label": "Create", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 29, + "children-display": "submenu", "enabled": true, "label": "Web Page Themes", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 30, + "children-display": "submenu", "enabled": true, "label": "Classic.Gimp.Org", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -207,9 +207,9 @@ }, { "id": 37, + "children-display": "submenu", "enabled": true, "label": "Beveled Pattern", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -246,9 +246,9 @@ }, { "id": 43, + "children-display": "submenu", "enabled": true, "label": "Alien Glow", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -281,9 +281,9 @@ }, { "id": 48, + "children-display": "submenu", "enabled": true, "label": "Patterns", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -338,9 +338,9 @@ }, { "id": 57, + "children-display": "submenu", "enabled": true, "label": "Logos", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -515,9 +515,9 @@ }, { "id": 86, + "children-display": "submenu", "enabled": true, "label": "Buttons", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -540,9 +540,9 @@ }, { "id": 90, + "children-display": "submenu", "enabled": true, "label": "xscanimage", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -561,27 +561,27 @@ }, { "id": 93, - "shortcut": [["Control", "Shift", "v"]], "enabled": true, "label": "From Clipboard", + "shortcut": [["Control", "Shift", "v"]], "visible": true } ] }, { "id": 94, - "shortcut": [["Control", "n"]], "enabled": true, "label": "New...", + "shortcut": [["Control", "n"]], "visible": true } ] }, { "id": 95, + "children-display": "submenu", "enabled": true, "label": "Edit", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -626,30 +626,30 @@ }, { "id": 103, - "shortcut": [["Control", "semicolon"]], "enabled": true, "label": "Fill with Pattern", + "shortcut": [["Control", "semicolon"]], "visible": true }, { "id": 104, - "shortcut": [["Control", "period"]], "enabled": true, "label": "Fill with BG Color", + "shortcut": [["Control", "period"]], "visible": true }, { "id": 105, - "shortcut": [["Control", "comma"]], "enabled": true, "label": "Fill with FG Color", + "shortcut": [["Control", "comma"]], "visible": true }, { "id": 106, - "shortcut": [["Delete"]], "enabled": true, "label": "Clear", + "shortcut": [["Delete"]], "visible": true }, { @@ -658,9 +658,9 @@ }, { "id": 108, + "children-display": "submenu", "enabled": true, "label": "Buffer", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -691,9 +691,9 @@ }, { "id": 113, + "children-display": "submenu", "enabled": true, "label": "Paste as", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -716,9 +716,9 @@ }, { "id": 117, - "shortcut": [["Control", "Shift", "v"]], "enabled": true, "label": "New Image", + "shortcut": [["Control", "Shift", "v"]], "visible": true } ] @@ -731,30 +731,30 @@ }, { "id": 119, - "shortcut": [["Control", "v"]], "enabled": true, "label": "Paste", + "shortcut": [["Control", "v"]], "visible": true }, { "id": 120, - "shortcut": [["Control", "Shift", "c"]], "enabled": true, "label": "Copy Visible", + "shortcut": [["Control", "Shift", "c"]], "visible": true }, { "id": 121, - "shortcut": [["Control", "c"]], "enabled": true, "label": "Copy", + "shortcut": [["Control", "c"]], "visible": true }, { "id": 122, - "shortcut": [["Control", "x"]], "enabled": true, "label": "Cut", + "shortcut": [["Control", "x"]], "visible": true }, { @@ -775,25 +775,25 @@ }, { "id": 2, - "shortcut": [["Control", "y"]], "enabled": false, "label": "_Redo", + "shortcut": [["Control", "y"]], "visible": true }, { "id": 1, - "shortcut": [["Control", "z"]], "enabled": false, "label": "_Undo", + "shortcut": [["Control", "z"]], "visible": true } ] }, { "id": 125, + "children-display": "submenu", "enabled": true, "label": "Select", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -810,10 +810,10 @@ }, { "id": 128, - "shortcut": [["Shift", "q"]], "enabled": true, - "toggle-state": 0, "label": "Toggle Quick Mask", + "shortcut": [["Shift", "q"]], + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -869,93 +869,93 @@ }, { "id": 138, - "shortcut": [["Shift", "v"]], "enabled": false, "label": "From Path", + "shortcut": [["Shift", "v"]], "visible": true }, { "id": 139, - "shortcut": [["Shift", "o"]], "enabled": true, "label": "By Color", + "shortcut": [["Shift", "o"]], "visible": true }, { "id": 140, - "shortcut": [["Control", "Shift", "l"]], "enabled": false, "label": "Float", + "shortcut": [["Control", "Shift", "l"]], "visible": true }, { "id": 141, - "shortcut": [["Control", "i"]], "enabled": true, "label": "Invert", + "shortcut": [["Control", "i"]], "visible": true }, { "id": 142, - "shortcut": [["Control", "Shift", "a"]], "enabled": false, "label": "None", + "shortcut": [["Control", "Shift", "a"]], "visible": true }, { "id": 143, - "shortcut": [["Control", "a"]], "enabled": true, "label": "All", + "shortcut": [["Control", "a"]], "visible": true } ] }, { "id": 144, + "children-display": "submenu", "enabled": true, "label": "View", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 145, "enabled": true, - "toggle-state": 1, "label": "Show Statusbar", + "toggle-state": 1, "toggle-type": "checkmark", "visible": true }, { "id": 146, "enabled": true, - "toggle-state": 0, "label": "Show Scrollbars", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 147, - "shortcut": [["Control", "Shift", "r"]], "enabled": true, - "toggle-state": 0, "label": "Show Rulers", + "shortcut": [["Control", "Shift", "r"]], + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 148, "enabled": true, - "toggle-state": 1, "label": "Show Menubar", + "toggle-state": 1, "toggle-type": "checkmark", "visible": true }, { "id": 149, + "children-display": "submenu", "enabled": true, "label": "Padding Color", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1001,32 +1001,32 @@ { "id": 157, "enabled": true, - "toggle-state": 0, "label": "Snap to Active Path", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 158, "enabled": true, - "toggle-state": 0, "label": "Snap to Canvas Edges", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 159, "enabled": true, - "toggle-state": 0, "label": "Snap to Grid", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 160, "enabled": true, - "toggle-state": 1, "label": "Snap to Guides", + "toggle-state": 1, "toggle-type": "checkmark", "visible": true }, @@ -1037,42 +1037,42 @@ { "id": 162, "enabled": true, - "toggle-state": 0, "label": "Show Sample Points", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 163, "enabled": true, - "toggle-state": 0, "label": "Show Grid", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 164, - "shortcut": [["Control", "Shift", "t"]], "enabled": true, - "toggle-state": 0, "label": "Show Guides", + "shortcut": [["Control", "Shift", "t"]], + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 165, "enabled": true, - "toggle-state": 0, "label": "Show Layer Boundary", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 166, - "shortcut": [["Control", "t"]], "enabled": true, - "toggle-state": 0, "label": "Show Selection", + "shortcut": [["Control", "t"]], + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -1098,12 +1098,12 @@ }, { "id": 171, + "children-display": "submenu", "enabled": true, + "label": "Fullscreen", "shortcut": [["F11"]], "toggle-state": 0, - "label": "Fullscreen", "toggle-type": "checkmark", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1116,9 +1116,9 @@ }, { "id": 173, - "shortcut": [["Control", "e"]], "enabled": true, "label": "Shrink Wrap", + "shortcut": [["Control", "e"]], "visible": true }, { @@ -1127,16 +1127,16 @@ }, { "id": 175, + "children-display": "submenu", "enabled": true, "label": "_Zoom (67%)", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 176, "enabled": true, - "toggle-state": 0, "label": "Othe_r (67%)...", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -1147,73 +1147,73 @@ { "id": 178, "enabled": true, - "toggle-state": 0, "label": "1:16 (6.25%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 179, "enabled": true, - "toggle-state": 0, "label": "1:8 (12.5%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 180, "enabled": true, - "toggle-state": 0, "label": "1:4 (25%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 181, "enabled": true, - "toggle-state": 0, "label": "1:2 (50%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 182, - "shortcut": [["1"]], "enabled": true, - "toggle-state": 1, "label": "1:1 (100%)", + "shortcut": [["1"]], + "toggle-state": 1, "toggle-type": "checkmark", "visible": true }, { "id": 183, "enabled": true, - "toggle-state": 0, "label": "2:1 (200%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 184, "enabled": true, - "toggle-state": 0, "label": "4:1 (400%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 185, "enabled": true, - "toggle-state": 0, "label": "8:1 (800%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 186, "enabled": true, - "toggle-state": 0, "label": "16:1 (1600%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -1229,30 +1229,30 @@ }, { "id": 189, - "shortcut": [["Control", "Shift", "e"]], "enabled": true, "label": "Fit Image in Window", + "shortcut": [["Control", "Shift", "e"]], "visible": true }, { "id": 190, - "shortcut": [["plus"]], "enabled": true, "label": "Zoom In", + "shortcut": [["plus"]], "visible": true }, { "id": 191, - "shortcut": [["minus"]], "enabled": true, "label": "Zoom Out", + "shortcut": [["minus"]], "visible": true }, { "id": 4, - "shortcut": [["grave"]], "enabled": true, "label": "Re_vert Zoom (67%)", + "shortcut": [["grave"]], "visible": true } ] @@ -1260,8 +1260,8 @@ { "id": 192, "enabled": true, - "toggle-state": 1, "label": "Dot for Dot", + "toggle-state": 1, "toggle-type": "checkmark", "visible": true }, @@ -1275,16 +1275,16 @@ }, { "id": 194, + "children-display": "submenu", "enabled": true, "label": "Image", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 195, - "shortcut": [["Alt", "Return"]], "enabled": true, "label": "Image Properties", + "shortcut": [["Alt", "Return"]], "visible": true }, { @@ -1295,9 +1295,9 @@ }, { "id": 197, + "children-display": "submenu", "enabled": true, "label": "Guides", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1344,9 +1344,9 @@ }, { "id": 205, - "shortcut": [["Control", "m"]], "enabled": true, "label": "Merge Visible Layers...", + "shortcut": [["Control", "m"]], "visible": true }, { @@ -1411,9 +1411,9 @@ }, { "id": 217, + "children-display": "submenu", "enabled": true, "label": "Transform", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1464,9 +1464,9 @@ }, { "id": 226, + "children-display": "submenu", "enabled": true, "label": "Mode", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1488,24 +1488,24 @@ { "id": 230, "enabled": true, - "toggle-state": 0, "label": "Indexed...", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 231, "enabled": true, - "toggle-state": 0, "label": "Grayscale", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 232, "enabled": true, - "toggle-state": 1, "label": "RGB", + "toggle-state": 1, "toggle-type": "checkmark", "visible": true } @@ -1513,18 +1513,18 @@ }, { "id": 233, - "shortcut": [["Control", "d"]], "enabled": true, "label": "Duplicate", + "shortcut": [["Control", "d"]], "visible": true } ] }, { "id": 234, + "children-display": "submenu", "enabled": true, "label": "Layer", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1563,16 +1563,16 @@ }, { "id": 241, + "children-display": "submenu", "enabled": true, "label": "Transform", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 242, - "shortcut": [["Control", "Shift", "o"]], "enabled": true, "label": "Offset...", + "shortcut": [["Control", "Shift", "o"]], "visible": true }, { @@ -1623,9 +1623,9 @@ }, { "id": 251, + "children-display": "submenu", "enabled": true, "label": "Transparency", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1690,9 +1690,9 @@ }, { "id": 262, + "children-display": "submenu", "enabled": true, "label": "Mask", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1726,24 +1726,24 @@ { "id": 268, "enabled": false, - "toggle-state": 0, "label": "Disable Layer Mask", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 269, "enabled": false, - "toggle-state": 0, "label": "Edit Layer Mask", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 270, "enabled": false, - "toggle-state": 0, "label": "Show Layer Mask", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -1773,9 +1773,9 @@ }, { "id": 275, + "children-display": "submenu", "enabled": true, "label": "Stack", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1818,38 +1818,38 @@ }, { "id": 283, - "shortcut": [["End"]], "enabled": false, "label": "Select Bottom Layer", + "shortcut": [["End"]], "visible": true }, { "id": 284, - "shortcut": [["Home"]], "enabled": false, "label": "Select Top Layer", + "shortcut": [["Home"]], "visible": true }, { "id": 285, - "shortcut": [["Page_Down"]], "enabled": false, "label": "Select Next Layer", + "shortcut": [["Page_Down"]], "visible": true }, { "id": 286, - "shortcut": [["Page_Up"]], "enabled": false, "label": "Select Previous Layer", + "shortcut": [["Page_Up"]], "visible": true } ] }, { "id": 287, - "type": "separator", "children-display": "submenu", + "type": "separator", "submenu": [ { "id": 288, @@ -1873,16 +1873,16 @@ }, { "id": 291, - "shortcut": [["Control", "h"]], "enabled": false, "label": "Anchor Layer", + "shortcut": [["Control", "h"]], "visible": true }, { "id": 292, - "shortcut": [["Control", "Shift", "d"]], "enabled": true, "label": "Duplicate Layer", + "shortcut": [["Control", "Shift", "d"]], "visible": true }, { @@ -1893,18 +1893,18 @@ }, { "id": 294, - "shortcut": [["Control", "Shift", "n"]], "enabled": true, "label": "New Layer...", + "shortcut": [["Control", "Shift", "n"]], "visible": true } ] }, { "id": 295, + "children-display": "submenu", "enabled": true, "label": "Colors", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1949,9 +1949,9 @@ }, { "id": 303, + "children-display": "submenu", "enabled": true, "label": "Info", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1982,9 +1982,9 @@ }, { "id": 308, + "children-display": "submenu", "enabled": true, "label": "Map", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2043,9 +2043,9 @@ }, { "id": 318, + "children-display": "submenu", "enabled": true, "label": "Components", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2076,9 +2076,9 @@ }, { "id": 323, + "children-display": "submenu", "enabled": true, "label": "Auto", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2126,8 +2126,8 @@ { "id": 331, "enabled": true, - "toggle-state": 0, "label": "Use GEGL", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -2209,30 +2209,30 @@ }, { "id": 345, + "children-display": "submenu", "enabled": true, "label": "Tools", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 346, - "shortcut": [["x"]], "enabled": true, "label": "Swap Colors", + "shortcut": [["x"]], "visible": true }, { "id": 347, - "shortcut": [["d"]], "enabled": true, "label": "Default Colors", + "shortcut": [["d"]], "visible": true }, { "id": 348, - "shortcut": [["Control", "b"]], "enabled": true, "label": "Toolbox", + "shortcut": [["Control", "b"]], "visible": true }, { @@ -2247,44 +2247,44 @@ }, { "id": 351, - "shortcut": [["t"]], "enabled": true, "label": "Text", + "shortcut": [["t"]], "visible": true }, { "id": 352, - "shortcut": [["Shift", "m"]], "enabled": true, "label": "Measure", + "shortcut": [["Shift", "m"]], "visible": true }, { "id": 353, - "shortcut": [["z"]], "enabled": true, "label": "Zoom", + "shortcut": [["z"]], "visible": true }, { "id": 354, - "shortcut": [["o"]], "enabled": true, "label": "Color Picker", + "shortcut": [["o"]], "visible": true }, { "id": 355, - "shortcut": [["b"]], "enabled": true, "label": "Paths", + "shortcut": [["b"]], "visible": true }, { "id": 356, + "children-display": "submenu", "enabled": true, "label": "Color Tools", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2345,95 +2345,95 @@ }, { "id": 366, + "children-display": "submenu", "enabled": true, "label": "Transform Tools", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 367, - "shortcut": [["Shift", "f"]], "enabled": true, "label": "Flip", + "shortcut": [["Shift", "f"]], "visible": true }, { "id": 368, - "shortcut": [["Shift", "p"]], "enabled": true, "label": "Perspective", + "shortcut": [["Shift", "p"]], "visible": true }, { "id": 369, - "shortcut": [["Shift", "s"]], "enabled": true, "label": "Shear", + "shortcut": [["Shift", "s"]], "visible": true }, { "id": 370, - "shortcut": [["Shift", "t"]], "enabled": true, "label": "Scale", + "shortcut": [["Shift", "t"]], "visible": true }, { "id": 371, - "shortcut": [["Shift", "r"]], "enabled": true, "label": "Rotate", + "shortcut": [["Shift", "r"]], "visible": true }, { "id": 372, - "shortcut": [["Shift", "c"]], "enabled": true, "label": "Crop", + "shortcut": [["Shift", "c"]], "visible": true }, { "id": 373, - "shortcut": [["m"]], "enabled": true, "label": "Move", + "shortcut": [["m"]], "visible": true }, { "id": 374, - "shortcut": [["q"]], "enabled": true, "label": "Align", + "shortcut": [["q"]], "visible": true } ] }, { "id": 375, + "children-display": "submenu", "enabled": true, "label": "Paint Tools", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 376, - "shortcut": [["Shift", "d"]], "enabled": true, "label": "Dodge / Burn", + "shortcut": [["Shift", "d"]], "visible": true }, { "id": 377, - "shortcut": [["s"]], "enabled": true, "label": "Smudge", + "shortcut": [["s"]], "visible": true }, { "id": 378, - "shortcut": [["Shift", "u"]], "enabled": true, "label": "Blur / Sharpen", + "shortcut": [["Shift", "u"]], "visible": true }, { @@ -2444,95 +2444,95 @@ }, { "id": 380, - "shortcut": [["h"]], "enabled": true, "label": "Heal", + "shortcut": [["h"]], "visible": true }, { "id": 381, - "shortcut": [["c"]], "enabled": true, "label": "Clone", + "shortcut": [["c"]], "visible": true }, { "id": 382, - "shortcut": [["k"]], "enabled": true, "label": "Ink", + "shortcut": [["k"]], "visible": true }, { "id": 383, - "shortcut": [["a"]], "enabled": true, "label": "Airbrush", + "shortcut": [["a"]], "visible": true }, { "id": 384, - "shortcut": [["Shift", "e"]], "enabled": true, "label": "Eraser", + "shortcut": [["Shift", "e"]], "visible": true }, { "id": 385, - "shortcut": [["p"]], "enabled": true, "label": "Paintbrush", + "shortcut": [["p"]], "visible": true }, { "id": 386, - "shortcut": [["n"]], "enabled": true, "label": "Pencil", + "shortcut": [["n"]], "visible": true }, { "id": 387, - "shortcut": [["l"]], "enabled": true, "label": "Blend", + "shortcut": [["l"]], "visible": true }, { "id": 388, - "shortcut": [["Shift", "b"]], "enabled": true, "label": "Bucket Fill", + "shortcut": [["Shift", "b"]], "visible": true } ] }, { "id": 389, + "children-display": "submenu", "enabled": true, "label": "Selection Tools", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 390, - "shortcut": [["i"]], "enabled": true, "label": "Intelligent Scissors", + "shortcut": [["i"]], "visible": true }, { "id": 391, - "shortcut": [["Shift", "o"]], "enabled": true, "label": "By Color Select", + "shortcut": [["Shift", "o"]], "visible": true }, { "id": 392, - "shortcut": [["u"]], "enabled": true, "label": "Fuzzy Select", + "shortcut": [["u"]], "visible": true }, { @@ -2543,23 +2543,23 @@ }, { "id": 394, - "shortcut": [["f"]], "enabled": true, "label": "Free Select", + "shortcut": [["f"]], "visible": true }, { "id": 395, - "shortcut": [["e"]], "enabled": true, "label": "Ellipse Select", + "shortcut": [["e"]], "visible": true }, { "id": 396, - "shortcut": [["r"]], "enabled": true, "label": "Rectangle Select", + "shortcut": [["r"]], "visible": true } ] @@ -2568,16 +2568,16 @@ }, { "id": 397, + "children-display": "submenu", "enabled": true, "label": "Filters", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 398, + "children-display": "submenu", "enabled": true, "label": "Script-Fu", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2602,9 +2602,9 @@ }, { "id": 402, + "children-display": "submenu", "enabled": true, "label": "Python-Fu", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2621,9 +2621,9 @@ }, { "id": 405, + "children-display": "submenu", "enabled": true, "label": "Alpha to Logo", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2748,9 +2748,9 @@ }, { "id": 426, + "children-display": "submenu", "enabled": true, "label": "Animation", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2815,9 +2815,9 @@ }, { "id": 437, + "children-display": "submenu", "enabled": true, "label": "Web", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2842,9 +2842,9 @@ }, { "id": 441, + "children-display": "submenu", "enabled": true, "label": "Render", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2895,9 +2895,9 @@ }, { "id": 450, + "children-display": "submenu", "enabled": true, "label": "Pattern", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2952,9 +2952,9 @@ }, { "id": 459, + "children-display": "submenu", "enabled": true, "label": "Nature", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2973,9 +2973,9 @@ }, { "id": 462, + "children-display": "submenu", "enabled": true, "label": "Clouds", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3008,9 +3008,9 @@ }, { "id": 467, + "children-display": "submenu", "enabled": true, "label": "Map", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3077,9 +3077,9 @@ }, { "id": 478, + "children-display": "submenu", "enabled": true, "label": "Decor", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3140,9 +3140,9 @@ }, { "id": 488, + "children-display": "submenu", "enabled": true, "label": "Artistic", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3215,9 +3215,9 @@ }, { "id": 500, + "children-display": "submenu", "enabled": true, "label": "Combine", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3236,9 +3236,9 @@ }, { "id": 503, + "children-display": "submenu", "enabled": true, "label": "Generic", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3263,9 +3263,9 @@ }, { "id": 507, + "children-display": "submenu", "enabled": true, "label": "Edge-Detect", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3302,9 +3302,9 @@ }, { "id": 513, + "children-display": "submenu", "enabled": true, "label": "Noise", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3347,9 +3347,9 @@ }, { "id": 520, + "children-display": "submenu", "enabled": true, "label": "Light and Shadow", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3424,9 +3424,9 @@ }, { "id": 533, + "children-display": "submenu", "enabled": true, "label": "Distorts", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3541,9 +3541,9 @@ }, { "id": 552, + "children-display": "submenu", "enabled": true, "label": "Enhance", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3598,9 +3598,9 @@ }, { "id": 561, + "children-display": "submenu", "enabled": true, "label": "Blur", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3653,10 +3653,10 @@ }, { "id": 570, - "shortcut": [["Control", "Shift", "f"]], + "children-display": "submenu", "enabled": false, "label": "Re-Show Last", - "children-display": "submenu", + "shortcut": [["Control", "Shift", "f"]], "visible": true, "submenu": [ { @@ -3669,25 +3669,25 @@ }, { "id": 572, - "shortcut": [["Control", "f"]], "enabled": false, "label": "Repeat Last", + "shortcut": [["Control", "f"]], "visible": true } ] }, { "id": 573, + "children-display": "submenu", "enabled": true, "label": "Windows", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 574, - "shortcut": [["Control", "b"]], "enabled": true, "label": "Toolbox", + "shortcut": [["Control", "b"]], "visible": true }, { @@ -3696,9 +3696,9 @@ }, { "id": 576, + "children-display": "submenu", "enabled": true, "label": "Dockable Dialogs", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3755,23 +3755,23 @@ }, { "id": 586, - "shortcut": [["Control", "g"]], "enabled": true, "label": "Gradients", + "shortcut": [["Control", "g"]], "visible": true }, { "id": 587, - "shortcut": [["Control", "Shift", "p"]], "enabled": true, "label": "Patterns", + "shortcut": [["Control", "Shift", "p"]], "visible": true }, { "id": 588, - "shortcut": [["Control", "Shift", "b"]], "enabled": true, "label": "Brushes", + "shortcut": [["Control", "Shift", "b"]], "visible": true }, { @@ -3840,9 +3840,9 @@ }, { "id": 600, - "shortcut": [["Control", "l"]], "enabled": true, "label": "Layers", + "shortcut": [["Control", "l"]], "visible": true }, { @@ -3865,9 +3865,9 @@ }, { "id": 604, + "children-display": "submenu", "enabled": true, "label": "Recently Closed Docks", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3882,16 +3882,16 @@ }, { "id": 606, + "children-display": "submenu", "enabled": true, "label": "Help", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 607, + "children-display": "submenu", "enabled": true, "label": "User Manual", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3940,9 +3940,9 @@ }, { "id": 615, + "children-display": "submenu", "enabled": true, "label": "GIMP Online", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -4005,16 +4005,16 @@ }, { "id": 626, - "shortcut": [["Shift", "F1"]], "enabled": true, "label": "Context Help", + "shortcut": [["Shift", "F1"]], "visible": true }, { "id": 627, - "shortcut": [["F1"]], "enabled": true, "label": "Help", + "shortcut": [["F1"]], "visible": true } ] diff --git a/tools/dbusmenu-dumper.c b/tools/dbusmenu-dumper.c index 9e66236..3256f7e 100644 --- a/tools/dbusmenu-dumper.c +++ b/tools/dbusmenu-dumper.c @@ -135,13 +135,20 @@ value2string (const GValue * value, int depth) return str; } +static gint +list_str_cmp (gconstpointer a, gconstpointer b) +{ + return g_strcmp0((gchar *)a, (gchar *)b); +} + static void print_menuitem (DbusmenuMenuitem * item, int depth) { gchar * space = g_strnfill(depth, ' '); g_print("%s\"id\": %d", space, dbusmenu_menuitem_get_id(item)); - GList * properties = dbusmenu_menuitem_properties_list(item); + GList * properties_raw = dbusmenu_menuitem_properties_list(item); + GList * properties = g_list_sort(properties_raw, list_str_cmp); GList * property; for (property = properties; property != NULL; property = g_list_next(property)) { const GValue * value = dbusmenu_menuitem_property_get_value(item, (gchar *)property->data); -- cgit v1.2.3 From 466fa0fc57ab1bec842a158f549387e141464221 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 12 Aug 2010 16:25:40 -0500 Subject: Increasing timer for ARM to get a build. --- tests/test-glib-properties-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-glib-properties-client.c b/tests/test-glib-properties-client.c index 434465a..ae7b80b 100644 --- a/tests/test-glib-properties-client.c +++ b/tests/test-glib-properties-client.c @@ -121,7 +121,7 @@ static void layout_updated (DbusmenuClient * client, gpointer data) { g_debug("Layout Updated"); - g_timeout_add (250, layout_verify_timer, client); + g_timeout_add (500, layout_verify_timer, client); return; } -- cgit v1.2.3 From b8b16bdfc5f52a306bacaa34776c3d159e16fbc2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 20 Aug 2010 16:52:02 -0500 Subject: Showing items as part of the test to ensure we don't break. --- tests/test-gtk-submenu-client.c | 9 ++++++++- tests/test-gtk-submenu-server.c | 17 ++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test-gtk-submenu-client.c b/tests/test-gtk-submenu-client.c index 2e1ef7a..ec46122 100644 --- a/tests/test-gtk-submenu-client.c +++ b/tests/test-gtk-submenu-client.c @@ -102,6 +102,12 @@ timer_func (gpointer data) } passed = TRUE; + return FALSE; +} + +gboolean +finished_func (gpointer user_data) +{ g_main_loop_quit(mainloop); return FALSE; } @@ -127,7 +133,8 @@ main (int argc, char ** argv) gtk_window_set_title(GTK_WINDOW(window), "libdbusmenu-gtk test"); gtk_widget_show(window); - g_timeout_add_seconds(1, timer_func, menuitem); + g_timeout_add_seconds(2, timer_func, menuitem); + g_timeout_add_seconds(6, finished_func, menuitem); g_debug("Entering Mainloop"); mainloop = g_main_loop_new(NULL, FALSE); diff --git a/tests/test-gtk-submenu-server.c b/tests/test-gtk-submenu-server.c index ba3993e..11cede0 100644 --- a/tests/test-gtk-submenu-server.c +++ b/tests/test-gtk-submenu-server.c @@ -39,6 +39,17 @@ timer_func (gpointer data) return FALSE; } +static gboolean +show_item (gpointer pmi) +{ + DbusmenuMenuitem * mi = DBUSMENU_MENUITEM(pmi); + g_debug("Showing item"); + + dbusmenu_menuitem_show_to_user(mi, 0); + + return FALSE; +} + DbusmenuMenuitem * add_item(DbusmenuMenuitem * parent, const char * label) { @@ -81,12 +92,16 @@ main (int argc, char ** argv) add_item(item, "1.2"); add_item(item, "1.3"); + g_timeout_add_seconds(2, show_item, item); + item = add_item(root, "Folder 2"); add_item(item, "2.1"); add_item(item, "2.2"); add_item(item, "2.3"); - g_timeout_add_seconds(3, timer_func, NULL); + g_timeout_add_seconds(4, show_item, item); + + g_timeout_add_seconds(6, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From db3d95c01f91456d042c507c9dfe91e75276c5e8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 26 Aug 2010 14:17:39 -0500 Subject: Removing death timer message --- tests/test-gtk-label-client.c | 1 - 1 file changed, 1 deletion(-) (limited to 'tests') diff --git a/tests/test-gtk-label-client.c b/tests/test-gtk-label-client.c index 070c278..4316b8e 100644 --- a/tests/test-gtk-label-client.c +++ b/tests/test-gtk-label-client.c @@ -105,7 +105,6 @@ verify_root_to_layout(DbusmenuMenuitem * mi, proplayout_t * layout) static gboolean timer_func (gpointer data) { - g_debug("Death timer. Oops. Got to: %d", layouton); passed = TRUE; g_main_loop_quit(mainloop); return FALSE; -- cgit v1.2.3 From 510263800720ca5f8980ade0a3d0e9d564b3ddff Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 26 Aug 2010 15:18:19 -0500 Subject: Removing unused variable --- tests/test-gtk-label-client.c | 1 - 1 file changed, 1 deletion(-) (limited to 'tests') diff --git a/tests/test-gtk-label-client.c b/tests/test-gtk-label-client.c index 4316b8e..14eb5bd 100644 --- a/tests/test-gtk-label-client.c +++ b/tests/test-gtk-label-client.c @@ -22,7 +22,6 @@ with this program. If not, see . #include #include -static guint layouton = 0; static GMainLoop * mainloop = NULL; static gboolean passed = TRUE; static guint death_timer = 0; -- cgit v1.2.3 From 8a2340c7249a714bf5c7128082b8c0c26f20a05f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Aug 2010 14:31:44 -0500 Subject: Adding in an events test --- .bzrignore | 3 + tests/Makefile.am | 34 ++++++++++++ tests/test-glib-events-client.c | 119 ++++++++++++++++++++++++++++++++++++++++ tests/test-glib-events-server.c | 109 ++++++++++++++++++++++++++++++++++++ 4 files changed, 265 insertions(+) create mode 100644 tests/test-glib-events-client.c create mode 100644 tests/test-glib-events-server.c (limited to 'tests') diff --git a/.bzrignore b/.bzrignore index b21c55f..c1088c1 100644 --- a/.bzrignore +++ b/.bzrignore @@ -191,3 +191,6 @@ tests/test-json libdbusmenu-glib/client-marshal.c libdbusmenu-glib/client-marshal.h libdbusmenu-glib/libdbusmenu_glib_la-client-marshal.lo +tests/test-glib-events +tests/test-glib-events-client +tests/test-glib-events-server diff --git a/tests/Makefile.am b/tests/Makefile.am index 9f621cb..aa79c8f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -5,6 +5,7 @@ CLEANFILES= TESTS = \ test-glib-objects-test \ + test-glib-events \ test-glib-layout \ test-glib-properties \ test-glib-proxy \ @@ -20,6 +21,8 @@ TESTS = \ check_PROGRAMS = \ glib-server-nomenu \ test-glib-objects \ + test-glib-events-client \ + test-glib-events-server \ test-glib-layout-client \ test-glib-layout-server \ test-glib-properties-client \ @@ -128,6 +131,37 @@ test_glib_layout_client_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGLIB_LIBS) +###################### +# Test Glib Events +###################### + +test-glib-events: test-glib-events-client test-glib-events-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(DBUS_RUNNER) --task ./test-glib-events-client --task-name Client --task ./test-glib-events-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +test_glib_events_server_SOURCES = \ + test-glib-events-server.c + +test_glib_events_server_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_glib_events_server_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + $(DBUSMENUGLIB_LIBS) + +test_glib_events_client_SOURCES = \ + test-glib-events-client.c + +test_glib_events_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_glib_events_client_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + $(DBUSMENUGLIB_LIBS) + ###################### # Test JSON ###################### diff --git a/tests/test-glib-events-client.c b/tests/test-glib-events-client.c new file mode 100644 index 0000000..57762cd --- /dev/null +++ b/tests/test-glib-events-client.c @@ -0,0 +1,119 @@ +/* +A test for libdbusmenu to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ + +#include + +#include +#include + +#include "test-glib-submenu.h" + +static guint layouton = 0; +static GMainLoop * mainloop = NULL; +static gboolean passed = TRUE; + +static void +realization (DbusmenuMenuitem * mi) +{ + const gchar * value; + gboolean original = passed; + + value = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY); + + if (layouton % 2 == 0) { + if (value == NULL) { + passed = FALSE; + } + } else { + if (value != NULL) { + passed = FALSE; + } + } + + if (original != passed) { + g_debug("Oops, this is where we failed"); + } + + return; +} + +static void +layout_updated (DbusmenuClient * client, gpointer data) +{ + g_debug("Layout Updated"); + + DbusmenuMenuitem * menuroot = dbusmenu_client_get_root(client); + if (menuroot == NULL) { + g_debug("Root is NULL?"); + return; + } + + GList * children = dbusmenu_menuitem_get_children(menuroot); + if (children == NULL) { + g_debug("No Children on root -- fail"); + passed = FALSE; + } else { + for (; children != NULL; children = g_list_next(children)) { + g_signal_connect(G_OBJECT(children->data), DBUSMENU_MENUITEM_SIGNAL_REALIZED, G_CALLBACK(realization), NULL); + } + } + + layouton++; + + if (layouts[layouton].id == -1) { + g_main_loop_quit(mainloop); + } + + return; +} + +static gboolean +timer_func (gpointer data) +{ + g_debug("Death timer. Oops. Got to: %d", layouton); + passed = FALSE; + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + DbusmenuClient * client = dbusmenu_client_new("org.dbusmenu.test", "/org/test"); + g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL); + + g_timeout_add_seconds(10, timer_func, client); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + g_object_unref(G_OBJECT(client)); + + if (passed) { + g_debug("Quiting"); + return 0; + } else { + g_debug("Quiting as we're a failure"); + return 1; + } +} diff --git a/tests/test-glib-events-server.c b/tests/test-glib-events-server.c new file mode 100644 index 0000000..68f7004 --- /dev/null +++ b/tests/test-glib-events-server.c @@ -0,0 +1,109 @@ +/* +A test for libdbusmenu to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ + +#include + +#include +#include +#include +#include + +#include +#include + +#include "test-glib-submenu.h" + + +static DbusmenuMenuitem * +layout2menuitem (layout_t * layout) +{ + if (layout == NULL || layout->id == 0) return NULL; + + DbusmenuMenuitem * local = dbusmenu_menuitem_new_with_id(layout->id); + + if (layout->submenu != NULL) { + guint count; + for (count = 0; layout->submenu[count].id != -1; count++) { + DbusmenuMenuitem * child = layout2menuitem(&layout->submenu[count]); + if (child != NULL) { + dbusmenu_menuitem_child_append(local, child); + } + } + } + + /* g_debug("Layout to menu return: 0x%X", (unsigned int)local); */ + return local; +} + +static guint layouton = 0; +static DbusmenuServer * server = NULL; +static GMainLoop * mainloop = NULL; + +static gboolean +timer_func (gpointer data) +{ + if (layouts[layouton].id == -1) { + g_main_loop_quit(mainloop); + return FALSE; + } + g_debug("Updating to Layout %d", layouton); + + dbusmenu_server_set_root(server, layout2menuitem(&layouts[layouton])); + layouton++; + + return TRUE; +} + +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; + } + + server = dbusmenu_server_new("/org/test"); + + timer_func(NULL); + g_timeout_add(2500, timer_func, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + g_debug("Quiting"); + + return 0; +} -- cgit v1.2.3 From c0674ee7a6f7a2bf83f19e3c897cdda918c52d6f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Aug 2010 14:50:05 -0500 Subject: First phase of restructuring these tests, now we can move on to testing. --- tests/test-glib-events-client.c | 46 ++------------------------ tests/test-glib-events-server.c | 71 +++++++++++++++++++---------------------- 2 files changed, 35 insertions(+), 82 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-events-client.c b/tests/test-glib-events-client.c index 57762cd..9b05ca6 100644 --- a/tests/test-glib-events-client.c +++ b/tests/test-glib-events-client.c @@ -26,35 +26,9 @@ with this program. If not, see . #include "test-glib-submenu.h" -static guint layouton = 0; static GMainLoop * mainloop = NULL; static gboolean passed = TRUE; -static void -realization (DbusmenuMenuitem * mi) -{ - const gchar * value; - gboolean original = passed; - - value = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY); - - if (layouton % 2 == 0) { - if (value == NULL) { - passed = FALSE; - } - } else { - if (value != NULL) { - passed = FALSE; - } - } - - if (original != passed) { - g_debug("Oops, this is where we failed"); - } - - return; -} - static void layout_updated (DbusmenuClient * client, gpointer data) { @@ -66,21 +40,7 @@ layout_updated (DbusmenuClient * client, gpointer data) return; } - GList * children = dbusmenu_menuitem_get_children(menuroot); - if (children == NULL) { - g_debug("No Children on root -- fail"); - passed = FALSE; - } else { - for (; children != NULL; children = g_list_next(children)) { - g_signal_connect(G_OBJECT(children->data), DBUSMENU_MENUITEM_SIGNAL_REALIZED, G_CALLBACK(realization), NULL); - } - } - - layouton++; - - if (layouts[layouton].id == -1) { - g_main_loop_quit(mainloop); - } + dbusmenu_menuitem_handle_event(menuroot, "clicked", NULL, 0); return; } @@ -88,7 +48,7 @@ layout_updated (DbusmenuClient * client, gpointer data) static gboolean timer_func (gpointer data) { - g_debug("Death timer. Oops. Got to: %d", layouton); + g_debug("Death timer. Oops."); passed = FALSE; g_main_loop_quit(mainloop); return FALSE; @@ -102,7 +62,7 @@ main (int argc, char ** argv) DbusmenuClient * client = dbusmenu_client_new("org.dbusmenu.test", "/org/test"); g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL); - g_timeout_add_seconds(10, timer_func, client); + g_timeout_add_seconds(5, timer_func, client); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-glib-events-server.c b/tests/test-glib-events-server.c index 68f7004..db4f5c5 100644 --- a/tests/test-glib-events-server.c +++ b/tests/test-glib-events-server.c @@ -29,47 +29,24 @@ with this program. If not, see . #include #include -#include "test-glib-submenu.h" - - -static DbusmenuMenuitem * -layout2menuitem (layout_t * layout) -{ - if (layout == NULL || layout->id == 0) return NULL; - - DbusmenuMenuitem * local = dbusmenu_menuitem_new_with_id(layout->id); - - if (layout->submenu != NULL) { - guint count; - for (count = 0; layout->submenu[count].id != -1; count++) { - DbusmenuMenuitem * child = layout2menuitem(&layout->submenu[count]); - if (child != NULL) { - dbusmenu_menuitem_child_append(local, child); - } - } - } - - /* g_debug("Layout to menu return: 0x%X", (unsigned int)local); */ - return local; -} - -static guint layouton = 0; static DbusmenuServer * server = NULL; static GMainLoop * mainloop = NULL; +static gboolean passed = TRUE; + +static void +handle_event (void) { + g_debug("Handle event"); + g_main_loop_quit(mainloop); + return; +} static gboolean timer_func (gpointer data) { - if (layouts[layouton].id == -1) { - g_main_loop_quit(mainloop); - return FALSE; - } - g_debug("Updating to Layout %d", layouton); - - dbusmenu_server_set_root(server, layout2menuitem(&layouts[layouton])); - layouton++; - - return TRUE; + passed = FALSE; + g_debug("Never got a signal"); + g_main_loop_quit(mainloop); + return FALSE; } int @@ -96,14 +73,30 @@ main (int argc, char ** argv) } server = dbusmenu_server_new("/org/test"); + DbusmenuMenuitem * menuitem = dbusmenu_menuitem_new(); + dbusmenu_server_set_root(server, menuitem); - timer_func(NULL); - g_timeout_add(2500, timer_func, NULL); + g_signal_connect(G_OBJECT(menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(handle_event), NULL); + + g_timeout_add_seconds(3, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); - g_debug("Quiting"); + if (passed) { + int i; - return 0; + for (i = 0; i < 10; i++) { + g_debug("Ignoring signals: %d", i); + g_usleep(100 * 1000); + } + } + + if (passed) { + g_debug("Test Passed"); + return 0; + } else { + g_debug("Test Failed"); + return 1; + } } -- cgit v1.2.3 From 6b16918eb4343bbe1c3be8c2806020c8e6c40284 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Aug 2010 15:29:49 -0500 Subject: Fleshing out the test to get all happy --- tests/test-glib-events-client.c | 32 ++++++++++++++++++++++++++++++++ tests/test-glib-events-server.c | 4 ++-- 2 files changed, 34 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-events-client.c b/tests/test-glib-events-client.c index 9b05ca6..688529c 100644 --- a/tests/test-glib-events-client.c +++ b/tests/test-glib-events-client.c @@ -28,6 +28,37 @@ with this program. If not, see . static GMainLoop * mainloop = NULL; static gboolean passed = TRUE; +static gboolean first = TRUE; + +static void +event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GValue * data, guint timestamp, GError * error, gpointer user_data) +{ + g_debug("Event status: %s", error == NULL ? "Sent" : "Error"); + + if (first && error != NULL) { + passed = FALSE; + g_debug("First signal back failed."); + g_main_loop_quit(mainloop); + return; + } + + if (!first && error == NULL) { + passed = FALSE; + g_debug("Second signal didn't fail."); + g_main_loop_quit(mainloop); + return; + } + + if (!first && error != NULL) { + g_debug("Second signal failed: pass."); + g_main_loop_quit(mainloop); + return; + } + + first = FALSE; + dbusmenu_menuitem_handle_event(item, "clicked", NULL, 0); + return; +} static void layout_updated (DbusmenuClient * client, gpointer data) @@ -61,6 +92,7 @@ main (int argc, char ** argv) DbusmenuClient * client = dbusmenu_client_new("org.dbusmenu.test", "/org/test"); g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL); + g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT, G_CALLBACK(event_status), NULL); g_timeout_add_seconds(5, timer_func, client); diff --git a/tests/test-glib-events-server.c b/tests/test-glib-events-server.c index db4f5c5..0d1e0b1 100644 --- a/tests/test-glib-events-server.c +++ b/tests/test-glib-events-server.c @@ -86,9 +86,9 @@ main (int argc, char ** argv) if (passed) { int i; - for (i = 0; i < 10; i++) { + for (i = 0; i < 5; i++) { g_debug("Ignoring signals: %d", i); - g_usleep(100 * 1000); + g_usleep(1000 * 1000); } } -- cgit v1.2.3 From 2f8fef94c6491d501b735aec916055054d5c6d83 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Aug 2010 15:57:42 -0500 Subject: Adding checking of all the parameters in the signature --- tests/test-glib-events-client.c | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-events-client.c b/tests/test-glib-events-client.c index 688529c..97d5caf 100644 --- a/tests/test-glib-events-client.c +++ b/tests/test-glib-events-client.c @@ -26,6 +26,10 @@ with this program. If not, see . #include "test-glib-submenu.h" +#define TIMESTAMP_VALUE 54 +#define DATA_VALUE 32 +#define USER_VALUE 76 + static GMainLoop * mainloop = NULL; static gboolean passed = TRUE; static gboolean first = TRUE; @@ -35,6 +39,27 @@ event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GV { g_debug("Event status: %s", error == NULL ? "Sent" : "Error"); + if (timestamp != TIMESTAMP_VALUE) { + g_debug("Timestamp value pass fail got: %d", timestamp); + passed = FALSE; + g_main_loop_quit(mainloop); + return; + } + + if (g_value_get_int(data) != DATA_VALUE) { + g_debug("Data value pass fail got: %d", g_value_get_int(data)); + passed = FALSE; + g_main_loop_quit(mainloop); + return; + } + + if (GPOINTER_TO_INT(user_data) != USER_VALUE) { + g_debug("User value pass fail got: %d", GPOINTER_TO_INT(user_data)); + passed = FALSE; + g_main_loop_quit(mainloop); + return; + } + if (first && error != NULL) { passed = FALSE; g_debug("First signal back failed."); @@ -56,12 +81,12 @@ event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GV } first = FALSE; - dbusmenu_menuitem_handle_event(item, "clicked", NULL, 0); + dbusmenu_menuitem_handle_event(item, "clicked", data, timestamp); return; } static void -layout_updated (DbusmenuClient * client, gpointer data) +layout_updated (DbusmenuClient * client, gpointer user_data) { g_debug("Layout Updated"); @@ -71,7 +96,11 @@ layout_updated (DbusmenuClient * client, gpointer data) return; } - dbusmenu_menuitem_handle_event(menuroot, "clicked", NULL, 0); + GValue data = {0}; + g_value_init(&data, G_TYPE_INT); + g_value_set_int(&data, DATA_VALUE); + + dbusmenu_menuitem_handle_event(menuroot, "clicked", &data, TIMESTAMP_VALUE); return; } @@ -92,7 +121,7 @@ main (int argc, char ** argv) DbusmenuClient * client = dbusmenu_client_new("org.dbusmenu.test", "/org/test"); g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL); - g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT, G_CALLBACK(event_status), NULL); + g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT, G_CALLBACK(event_status), GINT_TO_POINTER(USER_VALUE)); g_timeout_add_seconds(5, timer_func, client); -- cgit v1.2.3 From a8fc233f37e08f52ed7ca80fbd284277ca1bd33e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 11:23:46 -0600 Subject: Taking out the dbus-glib specialized types for now --- tests/json-loader.c | 51 ++------------------------------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index aad4295..9e67666 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -20,7 +20,6 @@ with this program. If not, see . */ #include "json-loader.h" -#include static GValue * node2value (JsonNode * node) @@ -74,58 +73,12 @@ node2value (JsonNode * node) } } 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); + g_warning("Complex array not supported"); } } 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); - } - } + g_warning("Object nodes are a problem"); } return value; -- cgit v1.2.3 From 94d5da983e2d1d64d6cf4249237b6ba009102286 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 13:46:26 -0600 Subject: Switching to GDBus from dbus-glib --- tests/test-glib-events-server.c | 55 +++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-events-server.c b/tests/test-glib-events-server.c index 0d1e0b1..ab72c6b 100644 --- a/tests/test-glib-events-server.c +++ b/tests/test-glib-events-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -49,35 +45,40 @@ timer_func (gpointer data) return FALSE; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - 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; - } - server = dbusmenu_server_new("/org/test"); DbusmenuMenuitem * menuitem = dbusmenu_menuitem_new(); dbusmenu_server_set_root(server, menuitem); g_signal_connect(G_OBJECT(menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(handle_event), NULL); + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); + g_timeout_add_seconds(3, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); -- cgit v1.2.3 From 6fc56d02acbb80a166837ed226fbe24bd3635fca Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 15:30:39 -0600 Subject: Switching to GDBus for getting the name --- tests/test-glib-layout-server.c | 53 +++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-layout-server.c b/tests/test-glib-layout-server.c index 111e164..e289349 100644 --- a/tests/test-glib-layout-server.c +++ b/tests/test-glib-layout-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -72,33 +68,38 @@ timer_func (gpointer data) return TRUE; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - 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)))); + server = dbusmenu_server_new("/org/test"); - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; + timer_func(NULL); + g_timeout_add(2500, timer_func, NULL); - if (!org_freedesktop_DBus_request_name(bus_proxy, "org.dbusmenu.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } + return; +} - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} - server = dbusmenu_server_new("/org/test"); +int +main (int argc, char ** argv) +{ + g_type_init(); - timer_func(NULL); - g_timeout_add(2500, timer_func, NULL); + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From b09ed309175070d38bc4351d02f23b0ef757008c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 15:47:10 -0600 Subject: More name grabbing porting from dbus-glib to GDBus --- tests/test-glib-properties-server.c | 7 +---- tests/test-glib-proxy-proxy.c | 55 +++++++++++++++++++------------------ tests/test-glib-proxy-server.c | 51 +++++++++++++++++----------------- 3 files changed, 55 insertions(+), 58 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-properties-server.c b/tests/test-glib-properties-server.c index 091e550..4248ea2 100644 --- a/tests/test-glib-properties-server.c +++ b/tests/test-glib-properties-server.c @@ -20,10 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include +#include #include #include @@ -91,8 +88,6 @@ main (int argc, char ** argv) { g_type_init(); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); - server = dbusmenu_server_new("/org/test"); timer_func(NULL); diff --git a/tests/test-glib-proxy-proxy.c b/tests/test-glib-proxy-proxy.c index 722cf1f..b9db620 100644 --- a/tests/test-glib-proxy-proxy.c +++ b/tests/test-glib-proxy-proxy.c @@ -1,9 +1,5 @@ #include - -#include -#include -#include -#include +#include #include #include @@ -32,6 +28,25 @@ root_changed (DbusmenuClient * client, DbusmenuMenuitem * newroot, gpointer user return; } +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + server = dbusmenu_server_new("/org/test"); + client = dbusmenu_client_new((gchar *)user_data, "/org/test"); + + g_signal_connect(client, DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(root_changed), server); + + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + int main (int argc, char ** argv) { @@ -47,28 +62,14 @@ main (int argc, char ** argv) g_debug("I am '%s' and I'm proxying '%s'", whoami, myproxy); - GError * error = NULL; - 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(connection))); - - 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, whoami, 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; - } - - server = dbusmenu_server_new("/org/test"); - client = dbusmenu_client_new(myproxy, "/org/test"); - - g_signal_connect(client, DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(root_changed), server); + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + myproxy, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-glib-proxy-server.c b/tests/test-glib-proxy-server.c index f32b426..c12a584 100644 --- a/tests/test-glib-proxy-server.c +++ b/tests/test-glib-proxy-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -104,31 +100,36 @@ layout_change (DbusmenuMenuitem * oldroot, guint timestamp, gpointer data) return; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - g_type_init(); - - GError * error = NULL; - 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(connection))); + server = dbusmenu_server_new("/org/test"); + layout_change(NULL, 0, NULL); - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; + return; +} - if (!org_freedesktop_DBus_request_name(bus_proxy, "test.proxy.server", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } +int +main (int argc, char ** argv) +{ + g_type_init(); - server = dbusmenu_server_new("/org/test"); - layout_change(NULL, 0, NULL); + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From b0a7118fc4581f07b42c25ce02bda01fd1604097 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 17:16:45 -0600 Subject: Chaning to get dbus names via GDBus --- tests/test-glib-simple-items.c | 3 --- tests/test-glib-submenu-server.c | 53 +++++++++++++++++++------------------- tests/test-gtk-label-server.c | 52 +++++++++++++++++++------------------ tests/test-gtk-reorder-server.c | 55 ++++++++++++++++++++-------------------- tests/test-gtk-shortcut-server.c | 53 +++++++++++++++++++------------------- 5 files changed, 110 insertions(+), 106 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-simple-items.c b/tests/test-glib-simple-items.c index 5b9f538..3ea5480 100644 --- a/tests/test-glib-simple-items.c +++ b/tests/test-glib-simple-items.c @@ -1,6 +1,3 @@ -#include -#include - #include #include diff --git a/tests/test-glib-submenu-server.c b/tests/test-glib-submenu-server.c index 68f7004..73362c1 100644 --- a/tests/test-glib-submenu-server.c +++ b/tests/test-glib-submenu-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -72,33 +68,38 @@ timer_func (gpointer data) return TRUE; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - 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)))); + server = dbusmenu_server_new("/org/test"); - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; + timer_func(NULL); + g_timeout_add(2500, timer_func, NULL); - if (!org_freedesktop_DBus_request_name(bus_proxy, "org.dbusmenu.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } + return; +} - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} - server = dbusmenu_server_new("/org/test"); +int +main (int argc, char ** argv) +{ + g_type_init(); - timer_func(NULL); - g_timeout_add(2500, timer_func, NULL); + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-gtk-label-server.c b/tests/test-gtk-label-server.c index 32572fc..ddf8fcf 100644 --- a/tests/test-gtk-label-server.c +++ b/tests/test-gtk-label-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -53,6 +49,25 @@ timer_func (gpointer data) return TRUE; } +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + server = dbusmenu_server_new("/org/test"); + + timer_func(NULL); + g_timeout_add_seconds(5, timer_func, NULL); + + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + int main (int argc, char ** argv) { @@ -73,26 +88,15 @@ main (int argc, char ** argv) root_array = json_node_get_array(root_node); g_debug("%d layouts in test description '%s'", json_array_get_length(root_array), argv[1]); - 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, "glib.label.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; - } - - server = dbusmenu_server_new("/org/test"); - - timer_func(NULL); - g_timeout_add_seconds(5, timer_func, NULL); + g_bus_own_name(G_BUS_TYPE_SESSION, + "glib.label.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-gtk-reorder-server.c b/tests/test-gtk-reorder-server.c index eee9bb8..44209f1 100644 --- a/tests/test-gtk-reorder-server.c +++ b/tests/test-gtk-reorder-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -73,29 +69,9 @@ timer_func (gpointer data) return TRUE; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - 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, "glib.label.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; - } - server = dbusmenu_server_new("/org/test"); root = dbusmenu_menuitem_new(); dbusmenu_server_set_root(server, root); @@ -109,6 +85,31 @@ main (int argc, char ** argv) timer_func(NULL); g_timeout_add_seconds(5, timer_func, NULL); + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + g_bus_own_name(G_BUS_TYPE_SESSION, + "glib.label.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); + mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-gtk-shortcut-server.c b/tests/test-gtk-shortcut-server.c index 3b703a1..b205d03 100644 --- a/tests/test-gtk-shortcut-server.c +++ b/tests/test-gtk-shortcut-server.c @@ -20,13 +20,9 @@ with this program. If not, see . */ #include +#include #include -#include -#include -#include -#include - #include #include #include @@ -61,33 +57,38 @@ build_menu (void) return; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - 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)))); + server = dbusmenu_server_new("/org/test"); + build_menu(); - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; + g_timeout_add_seconds(10, timer_func, NULL); - if (!org_freedesktop_DBus_request_name(bus_proxy, "glib.label.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } + return; +} - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} - server = dbusmenu_server_new("/org/test"); - build_menu(); +int +main (int argc, char ** argv) +{ + g_type_init(); - g_timeout_add_seconds(10, timer_func, NULL); + g_bus_own_name(G_BUS_TYPE_SESSION, + "glib.label.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From f6108371c958c994b451d9c7c80f530bae4fd7c3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 21:57:32 -0600 Subject: Making a test do a name detection, but kinda making it async at the same time. --- tests/test-json-client.c | 60 ++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 28 deletions(-) (limited to 'tests') diff --git a/tests/test-json-client.c b/tests/test-json-client.c index f9da55e..d4e782b 100644 --- a/tests/test-json-client.c +++ b/tests/test-json-client.c @@ -21,38 +21,21 @@ with this program. If not, see . #include #include -#include -#include -#include GMainLoop * mainloop = NULL; -int -main (int argc, char ** argv) +gboolean +timeout_func (gpointer user_data) { - 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++; - } + g_warning("Timeout without getting name"); + g_main_loop_quit(mainloop); + return FALSE; +} - if (owner_count == 10000) { - g_error("Unable to get name owner after 10000 tries"); - return 1; - } +void +name_appeared (GDBusConnection * connection, const gchar * name, const gchar * owner, gpointer user_data) +{ + char ** argv = (char **)user_data; g_usleep(500000); @@ -69,7 +52,28 @@ main (int argc, char ** argv) g_file_replace_contents(ofile, output, g_utf8_strlen(output, -1), NULL, FALSE, 0, NULL, NULL, NULL); } - g_debug("Exiting"); + g_main_loop_quit(mainloop); + return; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + g_debug("Wait for friends"); + + g_bus_watch_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_WATCHER_FLAGS_NONE, + name_appeared, + NULL, + argv, + NULL); + + g_timeout_add_seconds(2, timeout_func, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); return 0; } -- cgit v1.2.3 From 1100e05ca534449b557a1f2993c405f01781bd72 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 22:04:47 -0600 Subject: Getting names the GDBus way --- tests/test-gtk-submenu-server.c | 55 +++++++++++++++++++------------------ tests/test-json-server.c | 61 +++++++++++++++++++++++------------------ 2 files changed, 62 insertions(+), 54 deletions(-) (limited to 'tests') diff --git a/tests/test-gtk-submenu-server.c b/tests/test-gtk-submenu-server.c index 11cede0..9c4d7d4 100644 --- a/tests/test-gtk-submenu-server.c +++ b/tests/test-gtk-submenu-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -59,29 +55,9 @@ add_item(DbusmenuMenuitem * parent, const char * label) return item; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - 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, "glib.label.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_menuitem_new(); dbusmenu_server_set_root(server, root); @@ -101,6 +77,31 @@ main (int argc, char ** argv) g_timeout_add_seconds(4, show_item, item); + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + g_bus_own_name(G_BUS_TYPE_SESSION, + "glib.label.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); + g_timeout_add_seconds(6, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); diff --git a/tests/test-json-server.c b/tests/test-json-server.c index fe9507a..083de60 100644 --- a/tests/test-json-server.c +++ b/tests/test-json-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -40,38 +36,49 @@ timer_func (gpointer data) return FALSE; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - 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; - } + gchar ** argv = (gchar **)user_data; DbusmenuServer * server = dbusmenu_server_new("/org/test"); DbusmenuMenuitem * root = dbusmenu_json_build_from_file(argv[1]); - g_return_val_if_fail(root!=NULL, 1); + if (root == NULL) { + g_warning("Unable to build root"); + g_main_loop_quit(mainloop); + return; + } dbusmenu_server_set_root(server, root); g_timeout_add(10000, timer_func, NULL); + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + argv, + NULL); + mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From aabdcffea6b311cda25ad2937466d65fc4e36381 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 17 Nov 2010 21:23:27 -0600 Subject: Moving the GValues over to GVariant --- tests/test-glib-events-client.c | 14 ++++++-------- tests/test-glib-objects.c | 24 ++++++++++++------------ tests/test-glib-proxy-client.c | 7 +++---- tests/test-gtk-objects.c | 4 ++-- 4 files changed, 23 insertions(+), 26 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-events-client.c b/tests/test-glib-events-client.c index 97d5caf..ee0b821 100644 --- a/tests/test-glib-events-client.c +++ b/tests/test-glib-events-client.c @@ -35,7 +35,7 @@ static gboolean passed = TRUE; static gboolean first = TRUE; static void -event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GValue * data, guint timestamp, GError * error, gpointer user_data) +event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GVariant * data, guint timestamp, GError * error, gpointer user_data) { g_debug("Event status: %s", error == NULL ? "Sent" : "Error"); @@ -46,8 +46,8 @@ event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GV return; } - if (g_value_get_int(data) != DATA_VALUE) { - g_debug("Data value pass fail got: %d", g_value_get_int(data)); + if (g_variant_get_int32(data) != DATA_VALUE) { + g_debug("Data value pass fail got: %d", g_variant_get_int32(data)); passed = FALSE; g_main_loop_quit(mainloop); return; @@ -96,11 +96,9 @@ layout_updated (DbusmenuClient * client, gpointer user_data) return; } - GValue data = {0}; - g_value_init(&data, G_TYPE_INT); - g_value_set_int(&data, DATA_VALUE); - - dbusmenu_menuitem_handle_event(menuroot, "clicked", &data, TIMESTAMP_VALUE); + GVariant * data = g_variant_new("i", DATA_VALUE); + dbusmenu_menuitem_handle_event(menuroot, "clicked", data, TIMESTAMP_VALUE); + g_variant_unref(data); return; } diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index 1d4f673..c6a8dc9 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -77,17 +77,17 @@ test_object_menuitem_props_string (void) { /* Build a menu item */ DbusmenuMenuitem * item = dbusmenu_menuitem_new(); - const GValue * out = NULL; + GVariant * out = NULL; /* Test to make sure it's a happy object */ g_assert(item != NULL); /* Setting a string */ dbusmenu_menuitem_property_set(item, "string", "value"); - out = dbusmenu_menuitem_property_get_value(item, "string"); + out = dbusmenu_menuitem_property_get_variant(item, "string"); g_assert(out != NULL); - g_assert(G_VALUE_TYPE(out) == G_TYPE_STRING); - g_assert(!g_strcmp0(g_value_get_string(out), "value")); + g_assert(g_variant_type_equal(g_variant_get_type(out), G_VARIANT_TYPE_STRING)); + g_assert(!g_strcmp0(g_variant_get_string(out, NULL), "value")); g_assert(!g_strcmp0(dbusmenu_menuitem_property_get(item, "string"), "value")); g_object_unref(item); @@ -101,17 +101,17 @@ test_object_menuitem_props_int (void) { /* Build a menu item */ DbusmenuMenuitem * item = dbusmenu_menuitem_new(); - const GValue * out = NULL; + GVariant * out = NULL; /* Test to make sure it's a happy object */ g_assert(item != NULL); /* Setting a string */ dbusmenu_menuitem_property_set_int(item, "int", 12345); - out = dbusmenu_menuitem_property_get_value(item, "int"); + out = dbusmenu_menuitem_property_get_variant(item, "int"); g_assert(out != NULL); - g_assert(G_VALUE_TYPE(out) == G_TYPE_INT); - g_assert(g_value_get_int(out) == 12345); + g_assert(g_variant_type_equal(g_variant_get_type(out), G_VARIANT_TYPE_INT32)); + g_assert(g_variant_get_int32(out) == 12345); g_assert(dbusmenu_menuitem_property_get_int(item, "int") == 12345); g_object_unref(item); @@ -125,17 +125,17 @@ test_object_menuitem_props_bool (void) { /* Build a menu item */ DbusmenuMenuitem * item = dbusmenu_menuitem_new(); - const GValue * out = NULL; + GVariant * out = NULL; /* Test to make sure it's a happy object */ g_assert(item != NULL); /* Setting a string */ dbusmenu_menuitem_property_set_bool(item, "boolean", TRUE); - out = dbusmenu_menuitem_property_get_value(item, "boolean"); + out = dbusmenu_menuitem_property_get_variant(item, "boolean"); g_assert(out != NULL); - g_assert(G_VALUE_TYPE(out) == G_TYPE_BOOLEAN); - g_assert(g_value_get_boolean(out)); + g_assert(g_variant_type_equal(g_variant_get_type(out), G_VARIANT_TYPE_BOOLEAN)); + g_assert(g_variant_get_boolean(out)); g_assert(dbusmenu_menuitem_property_get_int(item, "boolean")); g_object_unref(item); diff --git a/tests/test-glib-proxy-client.c b/tests/test-glib-proxy-client.c index 0ae2e20..2e1e2d2 100644 --- a/tests/test-glib-proxy-client.c +++ b/tests/test-glib-proxy-client.c @@ -150,10 +150,9 @@ layout_verify_timer (gpointer data) g_main_loop_quit(mainloop); } - GValue value = {0}; - g_value_init(&value, G_TYPE_INT); - g_value_set_int(&value, 0); - dbusmenu_menuitem_handle_event(menuroot, "clicked", &value, layouton); + GVariant * value = g_variant_new("i", 0); + dbusmenu_menuitem_handle_event(menuroot, "clicked", value, layouton); + g_variant_unref(value); return FALSE; } diff --git a/tests/test-gtk-objects.c b/tests/test-gtk-objects.c index 726f404..30fc022 100644 --- a/tests/test-gtk-objects.c +++ b/tests/test-gtk-objects.c @@ -72,7 +72,7 @@ test_object_prop_pixbuf (void) g_object_unref(pixbuf); /* Check to see if it's set */ - const GValue * val = dbusmenu_menuitem_property_get_value(item, prop_name); + GVariant * val = dbusmenu_menuitem_property_get_variant(item, prop_name); g_assert(val != NULL); /* Get the pixbuf back! */ @@ -105,7 +105,7 @@ test_object_prop_shortcut (void) g_assert(success); /* Check for value */ - const GValue * val = dbusmenu_menuitem_property_get_value(item, DBUSMENU_MENUITEM_PROP_SHORTCUT); + GVariant * val = dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_SHORTCUT); g_assert(val != NULL); /* Check to see if we love it */ -- cgit v1.2.3 From cd8988a8dfd03a585860eabfc97c0e0aa8c6e912 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 18 Nov 2010 08:59:50 -0600 Subject: Switching to variants in the property changed signals --- tests/test-glib-objects.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index c6a8dc9..6afbe57 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -177,7 +177,7 @@ test_object_menuitem_props_swap (void) /* A helper to put a value into a pointer for eval. */ static void -test_object_menuitem_props_signals_helper (DbusmenuMenuitem * mi, gchar * property, GValue * value, GValue ** out) +test_object_menuitem_props_signals_helper (DbusmenuMenuitem * mi, gchar * property, GVariant * value, GVariant ** out) { if (!g_strcmp0(property, "swapper")) { *out = value; @@ -194,7 +194,7 @@ test_object_menuitem_props_signals (void) { /* Build a menu item */ DbusmenuMenuitem * item = dbusmenu_menuitem_new(); - GValue * out = NULL; + GVariant * out = NULL; /* Test to make sure it's a happy object */ g_assert(item != NULL); @@ -205,25 +205,25 @@ test_object_menuitem_props_signals (void) /* Setting a boolean */ dbusmenu_menuitem_property_set_bool(item, "swapper", TRUE); g_assert(out != NULL); - g_assert(g_value_get_boolean(out)); + g_assert(g_variant_get_boolean(out)); out = NULL; /* Setting a int */ dbusmenu_menuitem_property_set_int(item, "swapper", 5432); g_assert(out != NULL); - g_assert(g_value_get_int(out) == 5432); + g_assert(g_variant_get_int32(out) == 5432); out = NULL; /* Setting a string */ dbusmenu_menuitem_property_set(item, "swapper", "mystring"); g_assert(out != NULL); - g_assert(!g_strcmp0(g_value_get_string(out), "mystring")); + g_assert(!g_strcmp0(g_variant_get_string(out, NULL), "mystring")); out = NULL; /* Setting a boolean */ dbusmenu_menuitem_property_set_bool(item, "swapper", FALSE); g_assert(out != NULL); - g_assert(!g_value_get_boolean(out)); + g_assert(!g_variant_get_boolean(out)); out = NULL; g_object_unref(item); -- cgit v1.2.3 From 24ecbd99558d2ae2a65ad7407f547c55ffed2e4e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 18 Nov 2010 09:00:45 -0600 Subject: This now generates a warning, but unfortunately gtester fails that. --- tests/test-glib-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index 6afbe57..7143814 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -136,7 +136,7 @@ test_object_menuitem_props_bool (void) g_assert(out != NULL); g_assert(g_variant_type_equal(g_variant_get_type(out), G_VARIANT_TYPE_BOOLEAN)); g_assert(g_variant_get_boolean(out)); - g_assert(dbusmenu_menuitem_property_get_int(item, "boolean")); + /* g_assert(dbusmenu_menuitem_property_get_int(item, "boolean") == 0); */ g_object_unref(item); -- cgit v1.2.3 From 7380d970e2187af5e153250565d784abbe469bc8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 18 Nov 2010 14:42:25 -0600 Subject: Don't unref the variant we send and fix up debugging messages. --- tests/test-glib-events-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-events-client.c b/tests/test-glib-events-client.c index ee0b821..2cc5439 100644 --- a/tests/test-glib-events-client.c +++ b/tests/test-glib-events-client.c @@ -47,7 +47,7 @@ event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GV } if (g_variant_get_int32(data) != DATA_VALUE) { - g_debug("Data value pass fail got: %d", g_variant_get_int32(data)); + g_debug("Data value pass fail got: %d", g_variant_get_int32(g_variant_get_child_value(data, 0))); passed = FALSE; g_main_loop_quit(mainloop); return; @@ -96,9 +96,8 @@ layout_updated (DbusmenuClient * client, gpointer user_data) return; } - GVariant * data = g_variant_new("i", DATA_VALUE); + GVariant * data = g_variant_new_int32(DATA_VALUE); dbusmenu_menuitem_handle_event(menuroot, "clicked", data, TIMESTAMP_VALUE); - g_variant_unref(data); return; } @@ -126,6 +125,7 @@ main (int argc, char ** argv) mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); + g_debug("Main loop complete"); g_object_unref(G_OBJECT(client)); if (passed) { -- cgit v1.2.3 From c2953a6f3f099db35bc79415f2bb0c767f325c44 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 18 Nov 2010 15:07:00 -0600 Subject: Using the name assigned instead of a default. --- tests/test-glib-proxy-proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-glib-proxy-proxy.c b/tests/test-glib-proxy-proxy.c index b9db620..38c59e2 100644 --- a/tests/test-glib-proxy-proxy.c +++ b/tests/test-glib-proxy-proxy.c @@ -63,7 +63,7 @@ main (int argc, char ** argv) g_debug("I am '%s' and I'm proxying '%s'", whoami, myproxy); g_bus_own_name(G_BUS_TYPE_SESSION, - "org.dbusmenu.test", + whoami, G_BUS_NAME_OWNER_FLAGS_NONE, on_bus, NULL, -- cgit v1.2.3 From f5cc5d5809ac1bc60ed2f90424e95988f84194db Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 19 Nov 2010 17:08:52 -0600 Subject: Wrong bus name --- tests/test-glib-proxy-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-glib-proxy-server.c b/tests/test-glib-proxy-server.c index c12a584..a5dfd4e 100644 --- a/tests/test-glib-proxy-server.c +++ b/tests/test-glib-proxy-server.c @@ -123,7 +123,7 @@ main (int argc, char ** argv) g_type_init(); g_bus_own_name(G_BUS_TYPE_SESSION, - "org.dbusmenu.test", + "test.proxy.server", G_BUS_NAME_OWNER_FLAGS_NONE, on_bus, NULL, -- cgit v1.2.3 From e811c4f900545d37aecdf18cbce911ff23e684cd Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 23 Nov 2010 13:27:13 -0600 Subject: Exporting the server before getting the name --- tests/test-glib-proxy-proxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-glib-proxy-proxy.c b/tests/test-glib-proxy-proxy.c index 38c59e2..8a17ead 100644 --- a/tests/test-glib-proxy-proxy.c +++ b/tests/test-glib-proxy-proxy.c @@ -31,7 +31,6 @@ root_changed (DbusmenuClient * client, DbusmenuMenuitem * newroot, gpointer user static void on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - server = dbusmenu_server_new("/org/test"); client = dbusmenu_client_new((gchar *)user_data, "/org/test"); g_signal_connect(client, DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(root_changed), server); @@ -62,6 +61,8 @@ main (int argc, char ** argv) g_debug("I am '%s' and I'm proxying '%s'", whoami, myproxy); + server = dbusmenu_server_new("/org/test"); + g_bus_own_name(G_BUS_TYPE_SESSION, whoami, G_BUS_NAME_OWNER_FLAGS_NONE, -- cgit v1.2.3 From 784522930b3102d044000ef1dd6af1854548e3be Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 23 Nov 2010 14:40:11 -0600 Subject: Convert json loader to using variants --- tests/json-loader.c | 107 ++++++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 50 deletions(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 9e67666..4d3e6aa 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -21,67 +21,75 @@ with this program. If not, see . #include "json-loader.h" -static GValue * -node2value (JsonNode * node) +static GVariant * node2variant (JsonNode * node); + +static void +array_foreach (JsonArray * array, guint index, JsonNode * node, gpointer user_data) +{ + GVariantBuilder * builder = (GVariantBuilder *)user_data; + GVariant * variant = node2variant(node); + if (variant != NULL) { + g_variant_builder_add_value(builder, variant); + } + return; +} + +static void +object_foreach (JsonObject * array, const gchar * member, JsonNode * node, gpointer user_data) +{ + GVariantBuilder * builder = (GVariantBuilder *)user_data; + GVariant * variant = node2variant(node); + if (variant != NULL) { + g_variant_builder_add(builder, "{sv}", member, variant); + } + return; +} + +static GVariant * +node2variant (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; + switch (json_node_get_value_type(node)) { + case G_TYPE_INT: + case G_TYPE_INT64: + return g_variant_new_int64(json_node_get_int(node)); + case G_TYPE_DOUBLE: + case G_TYPE_FLOAT: + return g_variant_new_double(json_node_get_double(node)); + case G_TYPE_BOOLEAN: + return g_variant_new_boolean(json_node_get_boolean(node)); + case G_TYPE_STRING: + return g_variant_new_string(json_node_get_string(node)); + default: + g_assert_not_reached(); + } } if (JSON_NODE_TYPE(node) == JSON_NODE_ARRAY) { + GVariantBuilder builder; + g_variant_builder_init(&builder, G_VARIANT_TYPE_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); - } - } + json_array_foreach_element(array, array_foreach, &builder); - } else { - g_warning("Complex array not supported"); - } + return g_variant_builder_end(&builder); } if (JSON_NODE_TYPE(node) == JSON_NODE_OBJECT) { - g_warning("Object nodes are a problem"); + GVariantBuilder builder; + g_variant_builder_init(&builder, G_VARIANT_TYPE_DICTIONARY); + + JsonObject * array = json_node_get_object(node); + json_object_foreach_member(array, object_foreach, &builder); + + return g_variant_builder_end(&builder); } - return value; + return NULL; } static void @@ -97,12 +105,11 @@ set_props (DbusmenuMenuitem * mi, JsonObject * node) if (!g_strcmp0(member, "submenu")) { continue; } JsonNode * lnode = json_object_get_member(node, member); - GValue * value = node2value(lnode); + GVariant * variant = node2variant(lnode); - if (value != NULL) { - dbusmenu_menuitem_property_set_value(mi, member, value); - g_value_unset(value); - g_free(value); + if (variant != NULL) { + dbusmenu_menuitem_property_set_variant(mi, member, variant); + g_variant_unref(variant); } } -- cgit v1.2.3 From cd6960896d1f3b6143737eadd53ba69561eba2a8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 1 Dec 2010 15:48:08 -0600 Subject: Changing the quoting so that the test passes --- tests/test-json-01.json | 1644 +++++++++++++++++++++++------------------------ 1 file changed, 822 insertions(+), 822 deletions(-) (limited to 'tests') diff --git a/tests/test-json-01.json b/tests/test-json-01.json index 08e9112..b626d20 100644 --- a/tests/test-json-01.json +++ b/tests/test-json-01.json @@ -1,127 +1,127 @@ { "id": 0, - "children-display": "submenu", + "children-display": 'submenu', "submenu": [ { "id": 5, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "File", + "label": 'File', "visible": true, "submenu": [ { "id": 6, "enabled": true, - "label": "Quit", - "shortcut": [["Control", "q"]], + "label": 'Quit', + "shortcut": [['Control', 'q']], "visible": true }, { "id": 7, "enabled": true, - "label": "Close all", - "shortcut": [["Control", "Shift", "w"]], + "label": 'Close all', + "shortcut": [['Control', 'Shift', 'w']], "visible": true }, { "id": 8, "enabled": true, - "label": "Close", - "shortcut": [["Control", "w"]], + "label": 'Close', + "shortcut": [['Control', 'w']], "visible": true }, { "id": 9, - "type": "separator" + "type": 'separator' }, { "id": 10, "enabled": true, - "label": "Send by Email...", + "label": 'Send by Email...', "visible": true }, { "id": 11, "enabled": true, - "label": "Print...", - "shortcut": [["Control", "p"]], + "label": 'Print...', + "shortcut": [['Control', 'p']], "visible": true }, { "id": 12, "enabled": true, - "label": "Page Setup", + "label": 'Page Setup', "visible": true }, { "id": 13, - "type": "separator" + "type": 'separator' }, { "id": 14, "enabled": true, - "label": "Revert", + "label": 'Revert', "visible": true }, { "id": 15, "enabled": true, - "label": "Save as Template...", + "label": 'Save as Template...', "visible": true }, { "id": 16, "enabled": true, - "label": "Save a Copy...", + "label": 'Save a Copy...', "visible": true }, { "id": 17, "enabled": true, - "label": "Save As...", - "shortcut": [["Control", "Shift", "s"]], + "label": 'Save As...', + "shortcut": [['Control', 'Shift', 's']], "visible": true }, { "id": 18, "enabled": true, - "label": "Save", - "shortcut": [["Control", "s"]], + "label": 'Save', + "shortcut": [['Control', 's']], "visible": true }, { "id": 19, - "type": "separator" + "type": 'separator' }, { "id": 20, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Open Recent", + "label": 'Open Recent', "visible": true, "submenu": [ { "id": 21, "enabled": true, - "label": "Document History", + "label": 'Document History', "visible": true }, { "id": 22, - "type": "separator" + "type": 'separator' }, { "id": 23, "enabled": true, - "label": "giggity.jpg", - "shortcut": [["Control", "2"]], + "label": 'giggity.jpg', + "shortcut": [['Control', '2']], "visible": true }, { "id": 24, "enabled": true, - "label": "Icon Height.svg", - "shortcut": [["Control", "1"]], + "label": 'Icon Height.svg', + "shortcut": [['Control', '1']], "visible": true } ] @@ -129,150 +129,150 @@ { "id": 25, "enabled": true, - "label": "Open Location...", + "label": 'Open Location...', "visible": true }, { "id": 26, "enabled": true, - "label": "Open as Layers...", - "shortcut": [["Control", "Alt", "o"]], + "label": 'Open as Layers...', + "shortcut": [['Control', 'Alt', 'o']], "visible": true }, { "id": 27, "enabled": true, - "label": "Open...", - "shortcut": [["Control", "o"]], + "label": 'Open...', + "shortcut": [['Control', 'o']], "visible": true }, { "id": 28, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Create", + "label": 'Create', "visible": true, "submenu": [ { "id": 29, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Web Page Themes", + "label": 'Web Page Themes', "visible": true, "submenu": [ { "id": 30, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Classic.Gimp.Org", + "label": 'Classic.Gimp.Org', "visible": true, "submenu": [ { "id": 31, "enabled": true, - "label": "Tube Sub-Sub-Button Label...", + "label": 'Tube Sub-Sub-Button Label...', "visible": true }, { "id": 32, "enabled": true, - "label": "Tube Sub-Button Label...", + "label": 'Tube Sub-Button Label...', "visible": true }, { "id": 33, "enabled": true, - "label": "Tube Button Label...", + "label": 'Tube Button Label...', "visible": true }, { "id": 34, "enabled": true, - "label": "Small Header...", + "label": 'Small Header...', "visible": true }, { "id": 35, "enabled": true, - "label": "General Tube Labels...", + "label": 'General Tube Labels...', "visible": true }, { "id": 36, "enabled": true, - "label": "Big Header...", + "label": 'Big Header...', "visible": true } ] }, { "id": 37, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Beveled Pattern", + "label": 'Beveled Pattern', "visible": true, "submenu": [ { "id": 38, "enabled": true, - "label": "Hrule...", + "label": 'Hrule...', "visible": true }, { "id": 39, "enabled": true, - "label": "Heading...", + "label": 'Heading...', "visible": true }, { "id": 40, "enabled": true, - "label": "Button...", + "label": 'Button...', "visible": true }, { "id": 41, "enabled": true, - "label": "Bullet...", + "label": 'Bullet...', "visible": true }, { "id": 42, "enabled": true, - "label": "Arrow...", + "label": 'Arrow...', "visible": true } ] }, { "id": 43, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Alien Glow", + "label": 'Alien Glow', "visible": true, "submenu": [ { "id": 44, "enabled": true, - "label": "Hrule...", + "label": 'Hrule...', "visible": true }, { "id": 45, "enabled": true, - "label": "Button...", + "label": 'Button...', "visible": true }, { "id": 46, "enabled": true, - "label": "Bullet...", + "label": 'Bullet...', "visible": true }, { "id": 47, "enabled": true, - "label": "Arrow...", + "label": 'Arrow...', "visible": true } ] @@ -281,274 +281,274 @@ }, { "id": 48, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Patterns", + "label": 'Patterns', "visible": true, "submenu": [ { "id": 49, "enabled": true, - "label": "Truchet...", + "label": 'Truchet...', "visible": true }, { "id": 50, "enabled": true, - "label": "Swirly...", + "label": 'Swirly...', "visible": true }, { "id": 51, "enabled": true, - "label": "Swirl-Tile...", + "label": 'Swirl-Tile...', "visible": true }, { "id": 52, "enabled": true, - "label": "Render Map...", + "label": 'Render Map...', "visible": true }, { "id": 53, "enabled": true, - "label": "Land...", + "label": 'Land...', "visible": true }, { "id": 54, "enabled": true, - "label": "Flatland...", + "label": 'Flatland...', "visible": true }, { "id": 55, "enabled": true, - "label": "Camouflage...", + "label": 'Camouflage...', "visible": true }, { "id": 56, "enabled": true, - "label": "3D Truchet...", + "label": '3D Truchet...', "visible": true } ] }, { "id": 57, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Logos", + "label": 'Logos', "visible": true, "submenu": [ { "id": 58, "enabled": true, - "label": "Web Title Header...", + "label": 'Web Title Header...', "visible": true }, { "id": 59, "enabled": true, - "label": "Textured...", + "label": 'Textured...', "visible": true }, { "id": 60, "enabled": true, - "label": "Text Circle...", + "label": 'Text Circle...', "visible": true }, { "id": 61, "enabled": true, - "label": "Starscape...", + "label": 'Starscape...', "visible": true }, { "id": 62, "enabled": true, - "label": "Speed Text...", + "label": 'Speed Text...', "visible": true }, { "id": 63, "enabled": true, - "label": "SOTA Chrome...", + "label": 'SOTA Chrome...', "visible": true }, { "id": 64, "enabled": true, - "label": "Particle Trace...", + "label": 'Particle Trace...', "visible": true }, { "id": 65, "enabled": true, - "label": "Newsprint Text...", + "label": 'Newsprint Text...', "visible": true }, { "id": 66, "enabled": true, - "label": "Neon...", + "label": 'Neon...', "visible": true }, { "id": 67, "enabled": true, - "label": "Imigre-26...", + "label": 'Imigre-26...', "visible": true }, { "id": 68, "enabled": true, - "label": "Gradient Bevel...", + "label": 'Gradient Bevel...', "visible": true }, { "id": 69, "enabled": true, - "label": "Glowing Hot...", + "label": 'Glowing Hot...', "visible": true }, { "id": 70, "enabled": true, - "label": "Glossy...", + "label": 'Glossy...', "visible": true }, { "id": 71, "enabled": true, - "label": "Frosty...", + "label": 'Frosty...', "visible": true }, { "id": 72, "enabled": true, - "label": "Crystal...", + "label": 'Crystal...', "visible": true }, { "id": 73, "enabled": true, - "label": "Cool Metal...", + "label": 'Cool Metal...', "visible": true }, { "id": 74, "enabled": true, - "label": "Comic Book...", + "label": 'Comic Book...', "visible": true }, { "id": 75, "enabled": true, - "label": "Chrome...", + "label": 'Chrome...', "visible": true }, { "id": 76, "enabled": true, - "label": "Chip Away...", + "label": 'Chip Away...', "visible": true }, { "id": 77, "enabled": true, - "label": "Chalk...", + "label": 'Chalk...', "visible": true }, { "id": 78, "enabled": true, - "label": "Carved...", + "label": 'Carved...', "visible": true }, { "id": 79, "enabled": true, - "label": "Bovination...", + "label": 'Bovination...', "visible": true }, { "id": 80, "enabled": true, - "label": "Blended...", + "label": 'Blended...', "visible": true }, { "id": 81, "enabled": true, - "label": "Basic I...", + "label": 'Basic I...', "visible": true }, { "id": 82, "enabled": true, - "label": "Basic II...", + "label": 'Basic II...', "visible": true }, { "id": 83, "enabled": true, - "label": "Alien Neon...", + "label": 'Alien Neon...', "visible": true }, { "id": 84, "enabled": true, - "label": "Alien Glow...", + "label": 'Alien Glow...', "visible": true }, { "id": 85, "enabled": true, - "label": "3D Outline...", + "label": '3D Outline...', "visible": true } ] }, { "id": 86, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Buttons", + "label": 'Buttons', "visible": true, "submenu": [ { "id": 87, "enabled": true, - "label": "Simple Beveled Button...", + "label": 'Simple Beveled Button...', "visible": true }, { "id": 88, "enabled": true, - "label": "Round Button...", + "label": 'Round Button...', "visible": true } ] }, { "id": 89, - "type": "separator" + "type": 'separator' }, { "id": 90, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "xscanimage", + "label": 'xscanimage', "visible": true, "submenu": [ { "id": 91, "enabled": false, - "label": "Device dialog...", + "label": 'Device dialog...', "visible": true } ] @@ -556,14 +556,14 @@ { "id": 92, "enabled": true, - "label": "Screenshot...", + "label": 'Screenshot...', "visible": true }, { "id": 93, "enabled": true, - "label": "From Clipboard", - "shortcut": [["Control", "Shift", "v"]], + "label": 'From Clipboard', + "shortcut": [['Control', 'Shift', 'v']], "visible": true } ] @@ -571,154 +571,154 @@ { "id": 94, "enabled": true, - "label": "New...", - "shortcut": [["Control", "n"]], + "label": 'New...', + "shortcut": [['Control', 'n']], "visible": true } ] }, { "id": 95, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Edit", + "label": 'Edit', "visible": true, "submenu": [ { "id": 96, "enabled": true, - "label": "Units", + "label": 'Units', "visible": true }, { "id": 97, "enabled": true, - "label": "Modules", + "label": 'Modules', "visible": true }, { "id": 98, "enabled": true, - "label": "Keyboard Shortcuts", + "label": 'Keyboard Shortcuts', "visible": true }, { "id": 99, "enabled": true, - "label": "Preferences", + "label": 'Preferences', "visible": true }, { "id": 100, - "type": "separator" + "type": 'separator' }, { "id": 101, "enabled": false, - "label": "Stroke Path...", + "label": 'Stroke Path...', "visible": true }, { "id": 102, "enabled": false, - "label": "Stroke Selection...", + "label": 'Stroke Selection...', "visible": true }, { "id": 103, "enabled": true, - "label": "Fill with Pattern", - "shortcut": [["Control", "semicolon"]], + "label": 'Fill with Pattern', + "shortcut": [['Control', 'semicolon']], "visible": true }, { "id": 104, "enabled": true, - "label": "Fill with BG Color", - "shortcut": [["Control", "period"]], + "label": 'Fill with BG Color', + "shortcut": [['Control', 'period']], "visible": true }, { "id": 105, "enabled": true, - "label": "Fill with FG Color", - "shortcut": [["Control", "comma"]], + "label": 'Fill with FG Color', + "shortcut": [['Control', 'comma']], "visible": true }, { "id": 106, "enabled": true, - "label": "Clear", - "shortcut": [["Delete"]], + "label": 'Clear', + "shortcut": [['Delete']], "visible": true }, { "id": 107, - "type": "separator" + "type": 'separator' }, { "id": 108, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Buffer", + "label": 'Buffer', "visible": true, "submenu": [ { "id": 109, "enabled": true, - "label": "Paste Named...", + "label": 'Paste Named...', "visible": true }, { "id": 110, "enabled": true, - "label": "Copy Visible Named...", + "label": 'Copy Visible Named...', "visible": true }, { "id": 111, "enabled": true, - "label": "Copy Named...", + "label": 'Copy Named...', "visible": true }, { "id": 112, "enabled": true, - "label": "Cut Named...", + "label": 'Cut Named...', "visible": true } ] }, { "id": 113, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Paste as", + "label": 'Paste as', "visible": true, "submenu": [ { "id": 114, "enabled": true, - "label": "New Pattern...", + "label": 'New Pattern...', "visible": true }, { "id": 115, "enabled": true, - "label": "New Brush...", + "label": 'New Brush...', "visible": true }, { "id": 116, "enabled": true, - "label": "New Layer", + "label": 'New Layer', "visible": true }, { "id": 117, "enabled": true, - "label": "New Image", - "shortcut": [["Control", "Shift", "v"]], + "label": 'New Image', + "shortcut": [['Control', 'Shift', 'v']], "visible": true } ] @@ -726,390 +726,390 @@ { "id": 118, "enabled": true, - "label": "Paste Into", + "label": 'Paste Into', "visible": true }, { "id": 119, "enabled": true, - "label": "Paste", - "shortcut": [["Control", "v"]], + "label": 'Paste', + "shortcut": [['Control', 'v']], "visible": true }, { "id": 120, "enabled": true, - "label": "Copy Visible", - "shortcut": [["Control", "Shift", "c"]], + "label": 'Copy Visible', + "shortcut": [['Control', 'Shift', 'c']], "visible": true }, { "id": 121, "enabled": true, - "label": "Copy", - "shortcut": [["Control", "c"]], + "label": 'Copy', + "shortcut": [['Control', 'c']], "visible": true }, { "id": 122, "enabled": true, - "label": "Cut", - "shortcut": [["Control", "x"]], + "label": 'Cut', + "shortcut": [['Control', 'x']], "visible": true }, { "id": 123, - "type": "separator" + "type": 'separator' }, { "id": 124, "enabled": true, - "label": "Undo History", + "label": 'Undo History', "visible": true }, { "id": 3, "enabled": false, - "label": "_Fade...", + "label": '_Fade...', "visible": true }, { "id": 2, "enabled": false, - "label": "_Redo", - "shortcut": [["Control", "y"]], + "label": '_Redo', + "shortcut": [['Control', 'y']], "visible": true }, { "id": 1, "enabled": false, - "label": "_Undo", - "shortcut": [["Control", "z"]], + "label": '_Undo', + "shortcut": [['Control', 'z']], "visible": true } ] }, { "id": 125, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Select", + "label": 'Select', "visible": true, "submenu": [ { "id": 126, "enabled": false, - "label": "To Path", + "label": 'To Path', "visible": true }, { "id": 127, "enabled": true, - "label": "Save to Channel", + "label": 'Save to Channel', "visible": true }, { "id": 128, "enabled": true, - "label": "Toggle Quick Mask", - "shortcut": [["Shift", "q"]], + "label": 'Toggle Quick Mask', + "shortcut": [['Shift', 'q']], "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 129, - "type": "separator" + "type": 'separator' }, { "id": 130, "enabled": true, - "label": "Distort...", + "label": 'Distort...', "visible": true }, { "id": 131, "enabled": false, - "label": "Border...", + "label": 'Border...', "visible": true }, { "id": 132, "enabled": false, - "label": "Grow...", + "label": 'Grow...', "visible": true }, { "id": 133, "enabled": false, - "label": "Shrink...", + "label": 'Shrink...', "visible": true }, { "id": 134, "enabled": false, - "label": "Sharpen", + "label": 'Sharpen', "visible": true }, { "id": 135, "enabled": false, - "label": "Feather...", + "label": 'Feather...', "visible": true }, { "id": 136, - "type": "separator" + "type": 'separator' }, { "id": 137, "enabled": true, - "label": "Selection Editor", + "label": 'Selection Editor', "visible": true }, { "id": 138, "enabled": false, - "label": "From Path", - "shortcut": [["Shift", "v"]], + "label": 'From Path', + "shortcut": [['Shift', 'v']], "visible": true }, { "id": 139, "enabled": true, - "label": "By Color", - "shortcut": [["Shift", "o"]], + "label": 'By Color', + "shortcut": [['Shift', 'o']], "visible": true }, { "id": 140, "enabled": false, - "label": "Float", - "shortcut": [["Control", "Shift", "l"]], + "label": 'Float', + "shortcut": [['Control', 'Shift', 'l']], "visible": true }, { "id": 141, "enabled": true, - "label": "Invert", - "shortcut": [["Control", "i"]], + "label": 'Invert', + "shortcut": [['Control', 'i']], "visible": true }, { "id": 142, "enabled": false, - "label": "None", - "shortcut": [["Control", "Shift", "a"]], + "label": 'None', + "shortcut": [['Control', 'Shift', 'a']], "visible": true }, { "id": 143, "enabled": true, - "label": "All", - "shortcut": [["Control", "a"]], + "label": 'All', + "shortcut": [['Control', 'a']], "visible": true } ] }, { "id": 144, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "View", + "label": 'View', "visible": true, "submenu": [ { "id": 145, "enabled": true, - "label": "Show Statusbar", + "label": 'Show Statusbar', "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 146, "enabled": true, - "label": "Show Scrollbars", + "label": 'Show Scrollbars', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 147, "enabled": true, - "label": "Show Rulers", - "shortcut": [["Control", "Shift", "r"]], + "label": 'Show Rulers', + "shortcut": [['Control', 'Shift', 'r']], "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 148, "enabled": true, - "label": "Show Menubar", + "label": 'Show Menubar', "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 149, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Padding Color", + "label": 'Padding Color', "visible": true, "submenu": [ { "id": 150, "enabled": true, - "label": "As in Preferences", + "label": 'As in Preferences', "visible": true }, { "id": 151, - "type": "separator" + "type": 'separator' }, { "id": 152, "enabled": true, - "label": "Select Custom Color...", + "label": 'Select Custom Color...', "visible": true }, { "id": 153, "enabled": true, - "label": "Dark Check Color", + "label": 'Dark Check Color', "visible": true }, { "id": 154, "enabled": true, - "label": "Light Check Color", + "label": 'Light Check Color', "visible": true }, { "id": 155, "enabled": true, - "label": "From Theme", + "label": 'From Theme', "visible": true } ] }, { "id": 156, - "type": "separator" + "type": 'separator' }, { "id": 157, "enabled": true, - "label": "Snap to Active Path", + "label": 'Snap to Active Path', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 158, "enabled": true, - "label": "Snap to Canvas Edges", + "label": 'Snap to Canvas Edges', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 159, "enabled": true, - "label": "Snap to Grid", + "label": 'Snap to Grid', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 160, "enabled": true, - "label": "Snap to Guides", + "label": 'Snap to Guides', "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 161, - "type": "separator" + "type": 'separator' }, { "id": 162, "enabled": true, - "label": "Show Sample Points", + "label": 'Show Sample Points', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 163, "enabled": true, - "label": "Show Grid", + "label": 'Show Grid', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 164, "enabled": true, - "label": "Show Guides", - "shortcut": [["Control", "Shift", "t"]], + "label": 'Show Guides', + "shortcut": [['Control', 'Shift', 't']], "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 165, "enabled": true, - "label": "Show Layer Boundary", + "label": 'Show Layer Boundary', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 166, "enabled": true, - "label": "Show Selection", - "shortcut": [["Control", "t"]], + "label": 'Show Selection', + "shortcut": [['Control', 't']], "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 167, - "type": "separator" + "type": 'separator' }, { "id": 168, "enabled": true, - "label": "Display Filters...", + "label": 'Display Filters...', "visible": true }, { "id": 169, "enabled": true, - "label": "Navigation Window", + "label": 'Navigation Window', "visible": true }, { "id": 170, - "type": "separator" + "type": 'separator' }, { "id": 171, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Fullscreen", - "shortcut": [["F11"]], + "label": 'Fullscreen', + "shortcut": [['F11']], "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true, "submenu": [ { "id": 172, "enabled": true, - "label": "Open Display...", + "label": 'Open Display...', "visible": true } ] @@ -1117,142 +1117,142 @@ { "id": 173, "enabled": true, - "label": "Shrink Wrap", - "shortcut": [["Control", "e"]], + "label": 'Shrink Wrap', + "shortcut": [['Control', 'e']], "visible": true }, { "id": 174, - "type": "separator" + "type": 'separator' }, { "id": 175, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "_Zoom (67%)", + "label": '_Zoom (67%)', "visible": true, "submenu": [ { "id": 176, "enabled": true, - "label": "Othe_r (67%)...", + "label": 'Othe_r (67%)...', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 177, - "type": "separator" + "type": 'separator' }, { "id": 178, "enabled": true, - "label": "1:16 (6.25%)", + "label": '1:16 (6.25%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 179, "enabled": true, - "label": "1:8 (12.5%)", + "label": '1:8 (12.5%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 180, "enabled": true, - "label": "1:4 (25%)", + "label": '1:4 (25%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 181, "enabled": true, - "label": "1:2 (50%)", + "label": '1:2 (50%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 182, "enabled": true, - "label": "1:1 (100%)", - "shortcut": [["1"]], + "label": '1:1 (100%)', + "shortcut": [['1']], "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 183, "enabled": true, - "label": "2:1 (200%)", + "label": '2:1 (200%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 184, "enabled": true, - "label": "4:1 (400%)", + "label": '4:1 (400%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 185, "enabled": true, - "label": "8:1 (800%)", + "label": '8:1 (800%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 186, "enabled": true, - "label": "16:1 (1600%)", + "label": '16:1 (1600%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 187, - "type": "separator" + "type": 'separator' }, { "id": 188, "enabled": true, - "label": "Fill Window", + "label": 'Fill Window', "visible": true }, { "id": 189, "enabled": true, - "label": "Fit Image in Window", - "shortcut": [["Control", "Shift", "e"]], + "label": 'Fit Image in Window', + "shortcut": [['Control', 'Shift', 'e']], "visible": true }, { "id": 190, "enabled": true, - "label": "Zoom In", - "shortcut": [["plus"]], + "label": 'Zoom In', + "shortcut": [['plus']], "visible": true }, { "id": 191, "enabled": true, - "label": "Zoom Out", - "shortcut": [["minus"]], + "label": 'Zoom Out', + "shortcut": [['minus']], "visible": true }, { "id": 4, "enabled": true, - "label": "Re_vert Zoom (67%)", - "shortcut": [["grave"]], + "label": 'Re_vert Zoom (67%)', + "shortcut": [['grave']], "visible": true } ] @@ -1260,253 +1260,253 @@ { "id": 192, "enabled": true, - "label": "Dot for Dot", + "label": 'Dot for Dot', "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 193, "enabled": true, - "label": "New View", + "label": 'New View', "visible": true } ] }, { "id": 194, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Image", + "label": 'Image', "visible": true, "submenu": [ { "id": 195, "enabled": true, - "label": "Image Properties", - "shortcut": [["Alt", "Return"]], + "label": 'Image Properties', + "shortcut": [['Alt', 'Return']], "visible": true }, { "id": 196, "enabled": true, - "label": "Configure Grid...", + "label": 'Configure Grid...', "visible": true }, { "id": 197, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Guides", + "label": 'Guides', "visible": true, "submenu": [ { "id": 198, "enabled": true, - "label": "Remove all Guides", + "label": 'Remove all Guides', "visible": true }, { "id": 199, "enabled": true, - "label": "New Guides from Selection", + "label": 'New Guides from Selection', "visible": true }, { "id": 200, "enabled": true, - "label": "New Guide...", + "label": 'New Guide...', "visible": true }, { "id": 201, "enabled": true, - "label": "New Guide (by Percent)...", + "label": 'New Guide (by Percent)...', "visible": true } ] }, { "id": 202, - "type": "separator" + "type": 'separator' }, { "id": 203, "enabled": true, - "label": "Align Visible Layers...", + "label": 'Align Visible Layers...', "visible": true }, { "id": 204, "enabled": true, - "label": "Flatten Image", + "label": 'Flatten Image', "visible": true }, { "id": 205, "enabled": true, - "label": "Merge Visible Layers...", - "shortcut": [["Control", "m"]], + "label": 'Merge Visible Layers...', + "shortcut": [['Control', 'm']], "visible": true }, { "id": 206, - "type": "separator" + "type": 'separator' }, { "id": 207, "enabled": true, - "label": "Zealous Crop", + "label": 'Zealous Crop', "visible": true }, { "id": 208, "enabled": true, - "label": "Autocrop Image", + "label": 'Autocrop Image', "visible": true }, { "id": 209, "enabled": false, - "label": "Crop to Selection", + "label": 'Crop to Selection', "visible": true }, { "id": 210, - "type": "separator" + "type": 'separator' }, { "id": 211, "enabled": true, - "label": "Scale Image...", + "label": 'Scale Image...', "visible": true }, { "id": 212, "enabled": true, - "label": "Print Size...", + "label": 'Print Size...', "visible": true }, { "id": 213, "enabled": false, - "label": "Fit Canvas to Selection", + "label": 'Fit Canvas to Selection', "visible": true }, { "id": 214, "enabled": true, - "label": "Fit Canvas to Layers", + "label": 'Fit Canvas to Layers', "visible": true }, { "id": 215, "enabled": true, - "label": "Canvas Size...", + "label": 'Canvas Size...', "visible": true }, { "id": 216, - "type": "separator" + "type": 'separator' }, { "id": 217, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Transform", + "label": 'Transform', "visible": true, "submenu": [ { "id": 218, "enabled": true, - "label": "Guillotine", + "label": 'Guillotine', "visible": true }, { "id": 219, - "type": "separator" + "type": 'separator' }, { "id": 220, "enabled": true, - "label": "Rotate 180\302\260", + "label": 'Rotate 180?', "visible": true }, { "id": 221, "enabled": true, - "label": "Rotate 90\302\260 counter-clockwise", + "label": 'Rotate 90? counter-clockwise', "visible": true }, { "id": 222, "enabled": true, - "label": "Rotate 90\302\260 clockwise", + "label": 'Rotate 90? clockwise', "visible": true }, { "id": 223, - "type": "separator" + "type": 'separator' }, { "id": 224, "enabled": true, - "label": "Flip Vertically", + "label": 'Flip Vertically', "visible": true }, { "id": 225, "enabled": true, - "label": "Flip Horizontally", + "label": 'Flip Horizontally', "visible": true } ] }, { "id": 226, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Mode", + "label": 'Mode', "visible": true, "submenu": [ { "id": 227, "enabled": true, - "label": "Convert to Color Profile...", + "label": 'Convert to Color Profile...', "visible": true }, { "id": 228, "enabled": true, - "label": "Assign Color Profile...", + "label": 'Assign Color Profile...', "visible": true }, { "id": 229, - "type": "separator" + "type": 'separator' }, { "id": 230, "enabled": true, - "label": "Indexed...", + "label": 'Indexed...', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 231, "enabled": true, - "label": "Grayscale", + "label": 'Grayscale', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 232, "enabled": true, - "label": "RGB", + "label": 'RGB', "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true } ] @@ -1514,347 +1514,347 @@ { "id": 233, "enabled": true, - "label": "Duplicate", - "shortcut": [["Control", "d"]], + "label": 'Duplicate', + "shortcut": [['Control', 'd']], "visible": true } ] }, { "id": 234, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Layer", + "label": 'Layer', "visible": true, "submenu": [ { "id": 235, "enabled": true, - "label": "Autocrop Layer", + "label": 'Autocrop Layer', "visible": true }, { "id": 236, "enabled": false, - "label": "Crop to Selection", + "label": 'Crop to Selection', "visible": true }, { "id": 237, "enabled": true, - "label": "Scale Layer...", + "label": 'Scale Layer...', "visible": true }, { "id": 238, "enabled": true, - "label": "Layer to Image Size", + "label": 'Layer to Image Size', "visible": true }, { "id": 239, "enabled": true, - "label": "Layer Boundary Size...", + "label": 'Layer Boundary Size...', "visible": true }, { "id": 240, - "type": "separator" + "type": 'separator' }, { "id": 241, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Transform", + "label": 'Transform', "visible": true, "submenu": [ { "id": 242, "enabled": true, - "label": "Offset...", - "shortcut": [["Control", "Shift", "o"]], + "label": 'Offset...', + "shortcut": [['Control', 'Shift', 'o']], "visible": true }, { "id": 243, - "type": "separator" + "type": 'separator' }, { "id": 244, "enabled": true, - "label": "Arbitrary Rotation...", + "label": 'Arbitrary Rotation...', "visible": true }, { "id": 245, "enabled": true, - "label": "Rotate 180\302\260", + "label": 'Rotate 180?', "visible": true }, { "id": 246, "enabled": true, - "label": "Rotate 90\302\260 counter-clockwise", + "label": 'Rotate 90? counter-clockwise', "visible": true }, { "id": 247, "enabled": true, - "label": "Rotate 90\302\260 clockwise", + "label": 'Rotate 90? clockwise', "visible": true }, { "id": 248, - "type": "separator" + "type": 'separator' }, { "id": 249, "enabled": true, - "label": "Flip Vertically", + "label": 'Flip Vertically', "visible": true }, { "id": 250, "enabled": true, - "label": "Flip Horizontally", + "label": 'Flip Horizontally', "visible": true } ] }, { "id": 251, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Transparency", + "label": 'Transparency', "visible": true, "submenu": [ { "id": 252, "enabled": true, - "label": "Intersect with Selection", + "label": 'Intersect with Selection', "visible": true }, { "id": 253, "enabled": true, - "label": "Subtract from Selection", + "label": 'Subtract from Selection', "visible": true }, { "id": 254, "enabled": true, - "label": "Add to Selection", + "label": 'Add to Selection', "visible": true }, { "id": 255, "enabled": true, - "label": "Alpha to Selection", + "label": 'Alpha to Selection', "visible": true }, { "id": 256, - "type": "separator" + "type": 'separator' }, { "id": 257, "enabled": true, - "label": "Threshold Alpha...", + "label": 'Threshold Alpha...', "visible": true }, { "id": 258, "enabled": true, - "label": "Semi-Flatten", + "label": 'Semi-Flatten', "visible": true }, { "id": 259, "enabled": true, - "label": "Color to Alpha...", + "label": 'Color to Alpha...', "visible": true }, { "id": 260, "enabled": true, - "label": "Remove Alpha Channel", + "label": 'Remove Alpha Channel', "visible": true }, { "id": 261, "enabled": false, - "label": "Add Alpha Channel", + "label": 'Add Alpha Channel', "visible": true } ] }, { "id": 262, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Mask", + "label": 'Mask', "visible": true, "submenu": [ { "id": 263, "enabled": false, - "label": "Intersect with Selection", + "label": 'Intersect with Selection', "visible": true }, { "id": 264, "enabled": false, - "label": "Subtract from Selection", + "label": 'Subtract from Selection', "visible": true }, { "id": 265, "enabled": false, - "label": "Add to Selection", + "label": 'Add to Selection', "visible": true }, { "id": 266, "enabled": false, - "label": "Mask to Selection", + "label": 'Mask to Selection', "visible": true }, { "id": 267, - "type": "separator" + "type": 'separator' }, { "id": 268, "enabled": false, - "label": "Disable Layer Mask", + "label": 'Disable Layer Mask', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 269, "enabled": false, - "label": "Edit Layer Mask", + "label": 'Edit Layer Mask', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 270, "enabled": false, - "label": "Show Layer Mask", + "label": 'Show Layer Mask', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 271, - "type": "separator" + "type": 'separator' }, { "id": 272, "enabled": false, - "label": "Delete Layer Mask", + "label": 'Delete Layer Mask', "visible": true }, { "id": 273, "enabled": false, - "label": "Apply Layer Mask", + "label": 'Apply Layer Mask', "visible": true }, { "id": 274, "enabled": true, - "label": "Add Layer Mask...", + "label": 'Add Layer Mask...', "visible": true } ] }, { "id": 275, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Stack", + "label": 'Stack', "visible": true, "submenu": [ { "id": 276, "enabled": true, - "label": "Reverse Layer Order", + "label": 'Reverse Layer Order', "visible": true }, { "id": 277, - "type": "separator" + "type": 'separator' }, { "id": 278, "enabled": false, - "label": "Layer to Bottom", + "label": 'Layer to Bottom', "visible": true }, { "id": 279, "enabled": false, - "label": "Layer to Top", + "label": 'Layer to Top', "visible": true }, { "id": 280, "enabled": false, - "label": "Lower Layer", + "label": 'Lower Layer', "visible": true }, { "id": 281, "enabled": false, - "label": "Raise Layer", + "label": 'Raise Layer', "visible": true }, { "id": 282, - "type": "separator" + "type": 'separator' }, { "id": 283, "enabled": false, - "label": "Select Bottom Layer", - "shortcut": [["End"]], + "label": 'Select Bottom Layer', + "shortcut": [['End']], "visible": true }, { "id": 284, "enabled": false, - "label": "Select Top Layer", - "shortcut": [["Home"]], + "label": 'Select Top Layer', + "shortcut": [['Home']], "visible": true }, { "id": 285, "enabled": false, - "label": "Select Next Layer", - "shortcut": [["Page_Down"]], + "label": 'Select Next Layer', + "shortcut": [['Page_Down']], "visible": true }, { "id": 286, "enabled": false, - "label": "Select Previous Layer", - "shortcut": [["Page_Up"]], + "label": 'Select Previous Layer', + "shortcut": [['Page_Up']], "visible": true } ] }, { "id": 287, - "children-display": "submenu", - "type": "separator", + "children-display": 'submenu', + "type": 'separator', "submenu": [ { "id": 288, "enabled": false, - "label": "Empty", + "label": 'Empty', "visible": true } ] @@ -1862,704 +1862,704 @@ { "id": 289, "enabled": true, - "label": "Delete Layer", + "label": 'Delete Layer', "visible": true }, { "id": 290, "enabled": false, - "label": "Merge Down", + "label": 'Merge Down', "visible": true }, { "id": 291, "enabled": false, - "label": "Anchor Layer", - "shortcut": [["Control", "h"]], + "label": 'Anchor Layer', + "shortcut": [['Control', 'h']], "visible": true }, { "id": 292, "enabled": true, - "label": "Duplicate Layer", - "shortcut": [["Control", "Shift", "d"]], + "label": 'Duplicate Layer', + "shortcut": [['Control', 'Shift', 'd']], "visible": true }, { "id": 293, "enabled": true, - "label": "New from Visible", + "label": 'New from Visible', "visible": true }, { "id": 294, "enabled": true, - "label": "New Layer...", - "shortcut": [["Control", "Shift", "n"]], + "label": 'New Layer...', + "shortcut": [['Control', 'Shift', 'n']], "visible": true } ] }, { "id": 295, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Colors", + "label": 'Colors', "visible": true, "submenu": [ { "id": 296, "enabled": true, - "label": "Retinex...", + "label": 'Retinex...', "visible": true }, { "id": 297, "enabled": true, - "label": "Maximum RGB...", + "label": 'Maximum RGB...', "visible": true }, { "id": 298, "enabled": false, - "label": "Hot...", + "label": 'Hot...', "visible": true }, { "id": 299, "enabled": true, - "label": "Filter Pack...", + "label": 'Filter Pack...', "visible": true }, { "id": 300, "enabled": true, - "label": "Color to Alpha...", + "label": 'Color to Alpha...', "visible": true }, { "id": 301, "enabled": true, - "label": "Colorify...", + "label": 'Colorify...', "visible": true }, { "id": 302, - "type": "separator" + "type": 'separator' }, { "id": 303, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Info", + "label": 'Info', "visible": true, "submenu": [ { "id": 304, "enabled": true, - "label": "Smooth Palette...", + "label": 'Smooth Palette...', "visible": true }, { "id": 305, "enabled": true, - "label": "Colorcube Analysis...", + "label": 'Colorcube Analysis...', "visible": true }, { "id": 306, "enabled": true, - "label": "Border Average...", + "label": 'Border Average...', "visible": true }, { "id": 307, "enabled": true, - "label": "Histogram", + "label": 'Histogram', "visible": true } ] }, { "id": 308, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Map", + "label": 'Map', "visible": true, "submenu": [ { "id": 309, "enabled": true, - "label": "Sample Colorize...", + "label": 'Sample Colorize...', "visible": true }, { "id": 310, "enabled": true, - "label": "Rotate Colors...", + "label": 'Rotate Colors...', "visible": true }, { "id": 311, "enabled": true, - "label": "Palette Map", + "label": 'Palette Map', "visible": true }, { "id": 312, "enabled": true, - "label": "Gradient Map", + "label": 'Gradient Map', "visible": true }, { "id": 313, "enabled": true, - "label": "Color Exchange...", + "label": 'Color Exchange...', "visible": true }, { "id": 314, "enabled": true, - "label": "Alien Map...", + "label": 'Alien Map...', "visible": true }, { "id": 315, - "type": "separator" + "type": 'separator' }, { "id": 316, "enabled": false, - "label": "Set Colormap...", + "label": 'Set Colormap...', "visible": true }, { "id": 317, "enabled": false, - "label": "Rearrange Colormap...", + "label": 'Rearrange Colormap...', "visible": true } ] }, { "id": 318, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Components", + "label": 'Components', "visible": true, "submenu": [ { "id": 319, "enabled": false, - "label": "Recompose", + "label": 'Recompose', "visible": true }, { "id": 320, "enabled": true, - "label": "Decompose...", + "label": 'Decompose...', "visible": true }, { "id": 321, "enabled": false, - "label": "Compose...", + "label": 'Compose...', "visible": true }, { "id": 322, "enabled": true, - "label": "Channel Mixer...", + "label": 'Channel Mixer...', "visible": true } ] }, { "id": 323, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Auto", + "label": 'Auto', "visible": true, "submenu": [ { "id": 324, "enabled": true, - "label": "Stretch HSV", + "label": 'Stretch HSV', "visible": true }, { "id": 325, "enabled": true, - "label": "Stretch Contrast", + "label": 'Stretch Contrast', "visible": true }, { "id": 326, "enabled": true, - "label": "Normalize", + "label": 'Normalize', "visible": true }, { "id": 327, "enabled": true, - "label": "Color Enhance", + "label": 'Color Enhance', "visible": true }, { "id": 328, "enabled": true, - "label": "White Balance", + "label": 'White Balance', "visible": true }, { "id": 329, "enabled": true, - "label": "Equalize", + "label": 'Equalize', "visible": true } ] }, { "id": 330, - "type": "separator" + "type": 'separator' }, { "id": 331, "enabled": true, - "label": "Use GEGL", + "label": 'Use GEGL', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 332, - "type": "separator" + "type": 'separator' }, { "id": 333, "enabled": true, - "label": "Value Invert", + "label": 'Value Invert', "visible": true }, { "id": 334, "enabled": true, - "label": "Invert", + "label": 'Invert', "visible": true }, { "id": 335, - "type": "separator" + "type": 'separator' }, { "id": 336, "enabled": true, - "label": "Desaturate...", + "label": 'Desaturate...', "visible": true }, { "id": 337, "enabled": true, - "label": "Posterize...", + "label": 'Posterize...', "visible": true }, { "id": 338, "enabled": true, - "label": "Curves...", + "label": 'Curves...', "visible": true }, { "id": 339, "enabled": true, - "label": "Levels...", + "label": 'Levels...', "visible": true }, { "id": 340, "enabled": true, - "label": "Threshold...", + "label": 'Threshold...', "visible": true }, { "id": 341, "enabled": true, - "label": "Brightness-Contrast...", + "label": 'Brightness-Contrast...', "visible": true }, { "id": 342, "enabled": true, - "label": "Colorize...", + "label": 'Colorize...', "visible": true }, { "id": 343, "enabled": true, - "label": "Hue-Saturation...", + "label": 'Hue-Saturation...', "visible": true }, { "id": 344, "enabled": true, - "label": "Color Balance...", + "label": 'Color Balance...', "visible": true } ] }, { "id": 345, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Tools", + "label": 'Tools', "visible": true, "submenu": [ { "id": 346, "enabled": true, - "label": "Swap Colors", - "shortcut": [["x"]], + "label": 'Swap Colors', + "shortcut": [['x']], "visible": true }, { "id": 347, "enabled": true, - "label": "Default Colors", - "shortcut": [["d"]], + "label": 'Default Colors', + "shortcut": [['d']], "visible": true }, { "id": 348, "enabled": true, - "label": "Toolbox", - "shortcut": [["Control", "b"]], + "label": 'Toolbox', + "shortcut": [['Control', 'b']], "visible": true }, { "id": 349, - "type": "separator" + "type": 'separator' }, { "id": 350, "enabled": true, - "label": "GEGL Operation...", + "label": 'GEGL Operation...', "visible": true }, { "id": 351, "enabled": true, - "label": "Text", - "shortcut": [["t"]], + "label": 'Text', + "shortcut": [['t']], "visible": true }, { "id": 352, "enabled": true, - "label": "Measure", - "shortcut": [["Shift", "m"]], + "label": 'Measure', + "shortcut": [['Shift', 'm']], "visible": true }, { "id": 353, "enabled": true, - "label": "Zoom", - "shortcut": [["z"]], + "label": 'Zoom', + "shortcut": [['z']], "visible": true }, { "id": 354, "enabled": true, - "label": "Color Picker", - "shortcut": [["o"]], + "label": 'Color Picker', + "shortcut": [['o']], "visible": true }, { "id": 355, "enabled": true, - "label": "Paths", - "shortcut": [["b"]], + "label": 'Paths', + "shortcut": [['b']], "visible": true }, { "id": 356, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Color Tools", + "label": 'Color Tools', "visible": true, "submenu": [ { "id": 357, "enabled": true, - "label": "Desaturate...", + "label": 'Desaturate...', "visible": true }, { "id": 358, "enabled": true, - "label": "Posterize...", + "label": 'Posterize...', "visible": true }, { "id": 359, "enabled": true, - "label": "Curves...", + "label": 'Curves...', "visible": true }, { "id": 360, "enabled": true, - "label": "Levels...", + "label": 'Levels...', "visible": true }, { "id": 361, "enabled": true, - "label": "Threshold...", + "label": 'Threshold...', "visible": true }, { "id": 362, "enabled": true, - "label": "Brightness-Contrast...", + "label": 'Brightness-Contrast...', "visible": true }, { "id": 363, "enabled": true, - "label": "Colorize...", + "label": 'Colorize...', "visible": true }, { "id": 364, "enabled": true, - "label": "Hue-Saturation...", + "label": 'Hue-Saturation...', "visible": true }, { "id": 365, "enabled": true, - "label": "Color Balance...", + "label": 'Color Balance...', "visible": true } ] }, { "id": 366, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Transform Tools", + "label": 'Transform Tools', "visible": true, "submenu": [ { "id": 367, "enabled": true, - "label": "Flip", - "shortcut": [["Shift", "f"]], + "label": 'Flip', + "shortcut": [['Shift', 'f']], "visible": true }, { "id": 368, "enabled": true, - "label": "Perspective", - "shortcut": [["Shift", "p"]], + "label": 'Perspective', + "shortcut": [['Shift', 'p']], "visible": true }, { "id": 369, "enabled": true, - "label": "Shear", - "shortcut": [["Shift", "s"]], + "label": 'Shear', + "shortcut": [['Shift', 's']], "visible": true }, { "id": 370, "enabled": true, - "label": "Scale", - "shortcut": [["Shift", "t"]], + "label": 'Scale', + "shortcut": [['Shift', 't']], "visible": true }, { "id": 371, "enabled": true, - "label": "Rotate", - "shortcut": [["Shift", "r"]], + "label": 'Rotate', + "shortcut": [['Shift', 'r']], "visible": true }, { "id": 372, "enabled": true, - "label": "Crop", - "shortcut": [["Shift", "c"]], + "label": 'Crop', + "shortcut": [['Shift', 'c']], "visible": true }, { "id": 373, "enabled": true, - "label": "Move", - "shortcut": [["m"]], + "label": 'Move', + "shortcut": [['m']], "visible": true }, { "id": 374, "enabled": true, - "label": "Align", - "shortcut": [["q"]], + "label": 'Align', + "shortcut": [['q']], "visible": true } ] }, { "id": 375, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Paint Tools", + "label": 'Paint Tools', "visible": true, "submenu": [ { "id": 376, "enabled": true, - "label": "Dodge / Burn", - "shortcut": [["Shift", "d"]], + "label": 'Dodge / Burn', + "shortcut": [['Shift', 'd']], "visible": true }, { "id": 377, "enabled": true, - "label": "Smudge", - "shortcut": [["s"]], + "label": 'Smudge', + "shortcut": [['s']], "visible": true }, { "id": 378, "enabled": true, - "label": "Blur / Sharpen", - "shortcut": [["Shift", "u"]], + "label": 'Blur / Sharpen', + "shortcut": [['Shift', 'u']], "visible": true }, { "id": 379, "enabled": true, - "label": "Perspective Clone", + "label": 'Perspective Clone', "visible": true }, { "id": 380, "enabled": true, - "label": "Heal", - "shortcut": [["h"]], + "label": 'Heal', + "shortcut": [['h']], "visible": true }, { "id": 381, "enabled": true, - "label": "Clone", - "shortcut": [["c"]], + "label": 'Clone', + "shortcut": [['c']], "visible": true }, { "id": 382, "enabled": true, - "label": "Ink", - "shortcut": [["k"]], + "label": 'Ink', + "shortcut": [['k']], "visible": true }, { "id": 383, "enabled": true, - "label": "Airbrush", - "shortcut": [["a"]], + "label": 'Airbrush', + "shortcut": [['a']], "visible": true }, { "id": 384, "enabled": true, - "label": "Eraser", - "shortcut": [["Shift", "e"]], + "label": 'Eraser', + "shortcut": [['Shift', 'e']], "visible": true }, { "id": 385, "enabled": true, - "label": "Paintbrush", - "shortcut": [["p"]], + "label": 'Paintbrush', + "shortcut": [['p']], "visible": true }, { "id": 386, "enabled": true, - "label": "Pencil", - "shortcut": [["n"]], + "label": 'Pencil', + "shortcut": [['n']], "visible": true }, { "id": 387, "enabled": true, - "label": "Blend", - "shortcut": [["l"]], + "label": 'Blend', + "shortcut": [['l']], "visible": true }, { "id": 388, "enabled": true, - "label": "Bucket Fill", - "shortcut": [["Shift", "b"]], + "label": 'Bucket Fill', + "shortcut": [['Shift', 'b']], "visible": true } ] }, { "id": 389, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Selection Tools", + "label": 'Selection Tools', "visible": true, "submenu": [ { "id": 390, "enabled": true, - "label": "Intelligent Scissors", - "shortcut": [["i"]], + "label": 'Intelligent Scissors', + "shortcut": [['i']], "visible": true }, { "id": 391, "enabled": true, - "label": "By Color Select", - "shortcut": [["Shift", "o"]], + "label": 'By Color Select', + "shortcut": [['Shift', 'o']], "visible": true }, { "id": 392, "enabled": true, - "label": "Fuzzy Select", - "shortcut": [["u"]], + "label": 'Fuzzy Select', + "shortcut": [['u']], "visible": true }, { "id": 393, "enabled": true, - "label": "Foreground Select", + "label": 'Foreground Select', "visible": true }, { "id": 394, "enabled": true, - "label": "Free Select", - "shortcut": [["f"]], + "label": 'Free Select', + "shortcut": [['f']], "visible": true }, { "id": 395, "enabled": true, - "label": "Ellipse Select", - "shortcut": [["e"]], + "label": 'Ellipse Select', + "shortcut": [['e']], "visible": true }, { "id": 396, "enabled": true, - "label": "Rectangle Select", - "shortcut": [["r"]], + "label": 'Rectangle Select', + "shortcut": [['r']], "visible": true } ] @@ -2568,438 +2568,438 @@ }, { "id": 397, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Filters", + "label": 'Filters', "visible": true, "submenu": [ { "id": 398, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Script-Fu", + "label": 'Script-Fu', "visible": true, "submenu": [ { "id": 399, "enabled": true, - "label": "Start Server...", + "label": 'Start Server...', "visible": true }, { "id": 400, "enabled": true, - "label": "Refresh Scripts", + "label": 'Refresh Scripts', "visible": true }, { "id": 401, "enabled": true, - "label": "Console", + "label": 'Console', "visible": true } ] }, { "id": 402, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Python-Fu", + "label": 'Python-Fu', "visible": true, "submenu": [ { "id": 403, "enabled": true, - "label": "Console", + "label": 'Console', "visible": true } ] }, { "id": 404, - "type": "separator" + "type": 'separator' }, { "id": 405, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Alpha to Logo", + "label": 'Alpha to Logo', "visible": true, "submenu": [ { "id": 406, "enabled": true, - "label": "Textured...", + "label": 'Textured...', "visible": true }, { "id": 407, "enabled": true, - "label": "Particle Trace...", + "label": 'Particle Trace...', "visible": true }, { "id": 408, "enabled": true, - "label": "Neon...", + "label": 'Neon...', "visible": true }, { "id": 409, "enabled": true, - "label": "Gradient Bevel...", + "label": 'Gradient Bevel...', "visible": true }, { "id": 410, "enabled": true, - "label": "Glowing Hot...", + "label": 'Glowing Hot...', "visible": true }, { "id": 411, "enabled": true, - "label": "Glossy...", + "label": 'Glossy...', "visible": true }, { "id": 412, "enabled": true, - "label": "Frosty...", + "label": 'Frosty...', "visible": true }, { "id": 413, "enabled": true, - "label": "Cool Metal...", + "label": 'Cool Metal...', "visible": true }, { "id": 414, "enabled": true, - "label": "Comic Book...", + "label": 'Comic Book...', "visible": true }, { "id": 415, "enabled": true, - "label": "Chrome...", + "label": 'Chrome...', "visible": true }, { "id": 416, "enabled": true, - "label": "Chip Away...", + "label": 'Chip Away...', "visible": true }, { "id": 417, "enabled": true, - "label": "Chalk...", + "label": 'Chalk...', "visible": true }, { "id": 418, "enabled": true, - "label": "Bovination...", + "label": 'Bovination...', "visible": true }, { "id": 419, "enabled": true, - "label": "Blended...", + "label": 'Blended...', "visible": true }, { "id": 420, "enabled": true, - "label": "Basic I...", + "label": 'Basic I...', "visible": true }, { "id": 421, "enabled": true, - "label": "Basic II...", + "label": 'Basic II...', "visible": true }, { "id": 422, "enabled": true, - "label": "Alien Neon...", + "label": 'Alien Neon...', "visible": true }, { "id": 423, "enabled": true, - "label": "Alien Glow...", + "label": 'Alien Glow...', "visible": true }, { "id": 424, "enabled": true, - "label": "3D Outline...", + "label": '3D Outline...', "visible": true } ] }, { "id": 425, - "type": "separator" + "type": 'separator' }, { "id": 426, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Animation", + "label": 'Animation', "visible": true, "submenu": [ { "id": 427, "enabled": true, - "label": "Unoptimize", + "label": 'Unoptimize', "visible": true }, { "id": 428, "enabled": true, - "label": "Playback...", + "label": 'Playback...', "visible": true }, { "id": 429, "enabled": true, - "label": "Optimize (for GIF)", + "label": 'Optimize (for GIF)', "visible": true }, { "id": 430, "enabled": true, - "label": "Optimize (Difference)", + "label": 'Optimize (Difference)', "visible": true }, { "id": 431, - "type": "separator" + "type": 'separator' }, { "id": 432, "enabled": true, - "label": "Waves...", + "label": 'Waves...', "visible": true }, { "id": 433, "enabled": true, - "label": "Spinning Globe...", + "label": 'Spinning Globe...', "visible": true }, { "id": 434, "enabled": true, - "label": "Rippling...", + "label": 'Rippling...', "visible": true }, { "id": 435, "enabled": true, - "label": "Burn-In...", + "label": 'Burn-In...', "visible": true }, { "id": 436, "enabled": true, - "label": "Blend...", + "label": 'Blend...', "visible": true } ] }, { "id": 437, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Web", + "label": 'Web', "visible": true, "submenu": [ { "id": 438, "enabled": true, - "label": "Slice...", + "label": 'Slice...', "visible": true }, { "id": 439, "enabled": true, - "label": "Semi-Flatten", + "label": 'Semi-Flatten', "visible": true }, { "id": 440, "enabled": true, - "label": "Image Map...", + "label": 'Image Map...', "visible": true } ] }, { "id": 441, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Render", + "label": 'Render', "visible": true, "submenu": [ { "id": 442, "enabled": true, - "label": "Spyrogimp...", + "label": 'Spyrogimp...', "visible": true }, { "id": 443, "enabled": true, - "label": "Sphere Designer...", + "label": 'Sphere Designer...', "visible": true }, { "id": 444, "enabled": true, - "label": "Line Nova...", + "label": 'Line Nova...', "visible": true }, { "id": 445, "enabled": true, - "label": "Lava...", + "label": 'Lava...', "visible": true }, { "id": 446, "enabled": true, - "label": "Gfig...", + "label": 'Gfig...', "visible": true }, { "id": 447, "enabled": true, - "label": "Fractal Explorer...", + "label": 'Fractal Explorer...', "visible": true }, { "id": 448, "enabled": true, - "label": "Circuit...", + "label": 'Circuit...', "visible": true }, { "id": 449, - "type": "separator" + "type": 'separator' }, { "id": 450, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Pattern", + "label": 'Pattern', "visible": true, "submenu": [ { "id": 451, "enabled": true, - "label": "Sinus...", + "label": 'Sinus...', "visible": true }, { "id": 452, "enabled": true, - "label": "Qbist...", + "label": 'Qbist...', "visible": true }, { "id": 453, "enabled": true, - "label": "Maze...", + "label": 'Maze...', "visible": true }, { "id": 454, "enabled": true, - "label": "Jigsaw...", + "label": 'Jigsaw...', "visible": true }, { "id": 455, "enabled": true, - "label": "Grid...", + "label": 'Grid...', "visible": true }, { "id": 456, "enabled": true, - "label": "Diffraction Patterns...", + "label": 'Diffraction Patterns...', "visible": true }, { "id": 457, "enabled": true, - "label": "CML Explorer...", + "label": 'CML Explorer...', "visible": true }, { "id": 458, "enabled": true, - "label": "Checkerboard...", + "label": 'Checkerboard...', "visible": true } ] }, { "id": 459, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Nature", + "label": 'Nature', "visible": true, "submenu": [ { "id": 460, "enabled": true, - "label": "IFS Fractal...", + "label": 'IFS Fractal...', "visible": true }, { "id": 461, "enabled": true, - "label": "Flame...", + "label": 'Flame...', "visible": true } ] }, { "id": 462, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Clouds", + "label": 'Clouds', "visible": true, "submenu": [ { "id": 463, "enabled": true, - "label": "Solid Noise...", + "label": 'Solid Noise...', "visible": true }, { "id": 464, "enabled": true, - "label": "Plasma...", + "label": 'Plasma...', "visible": true }, { "id": 465, "enabled": true, - "label": "Fog...", + "label": 'Fog...', "visible": true }, { "id": 466, "enabled": true, - "label": "Difference Clouds...", + "label": 'Difference Clouds...', "visible": true } ] @@ -3008,661 +3008,661 @@ }, { "id": 467, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Map", + "label": 'Map', "visible": true, "submenu": [ { "id": 468, "enabled": true, - "label": "Warp...", + "label": 'Warp...', "visible": true }, { "id": 469, "enabled": true, - "label": "Tile...", + "label": 'Tile...', "visible": true }, { "id": 470, "enabled": true, - "label": "Small Tiles...", + "label": 'Small Tiles...', "visible": true }, { "id": 471, "enabled": true, - "label": "Paper Tile...", + "label": 'Paper Tile...', "visible": true }, { "id": 472, "enabled": true, - "label": "Map Object...", + "label": 'Map Object...', "visible": true }, { "id": 473, "enabled": true, - "label": "Make Seamless", + "label": 'Make Seamless', "visible": true }, { "id": 474, "enabled": true, - "label": "Illusion...", + "label": 'Illusion...', "visible": true }, { "id": 475, "enabled": true, - "label": "Fractal Trace...", + "label": 'Fractal Trace...', "visible": true }, { "id": 476, "enabled": true, - "label": "Displace...", + "label": 'Displace...', "visible": true }, { "id": 477, "enabled": true, - "label": "Bump Map...", + "label": 'Bump Map...', "visible": true } ] }, { "id": 478, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Decor", + "label": 'Decor', "visible": true, "submenu": [ { "id": 479, "enabled": false, - "label": "Stencil Chrome...", + "label": 'Stencil Chrome...', "visible": true }, { "id": 480, "enabled": false, - "label": "Stencil Carve...", + "label": 'Stencil Carve...', "visible": true }, { "id": 481, "enabled": false, - "label": "Slide...", + "label": 'Slide...', "visible": true }, { "id": 482, "enabled": false, - "label": "Round Corners...", + "label": 'Round Corners...', "visible": true }, { "id": 483, "enabled": true, - "label": "Old Photo...", + "label": 'Old Photo...', "visible": true }, { "id": 484, "enabled": true, - "label": "Fuzzy Border...", + "label": 'Fuzzy Border...', "visible": true }, { "id": 485, "enabled": true, - "label": "Coffee Stain...", + "label": 'Coffee Stain...', "visible": true }, { "id": 486, "enabled": true, - "label": "Add Border...", + "label": 'Add Border...', "visible": true }, { "id": 487, "enabled": true, - "label": "Add Bevel...", + "label": 'Add Bevel...', "visible": true } ] }, { "id": 488, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Artistic", + "label": 'Artistic', "visible": true, "submenu": [ { "id": 489, "enabled": true, - "label": "Weave...", + "label": 'Weave...', "visible": true }, { "id": 490, "enabled": true, - "label": "Van Gogh (LIC)...", + "label": 'Van Gogh (LIC)...', "visible": true }, { "id": 491, "enabled": true, - "label": "Softglow...", + "label": 'Softglow...', "visible": true }, { "id": 492, "enabled": true, - "label": "Predator...", + "label": 'Predator...', "visible": true }, { "id": 493, "enabled": true, - "label": "Photocopy...", + "label": 'Photocopy...', "visible": true }, { "id": 494, "enabled": true, - "label": "Oilify...", + "label": 'Oilify...', "visible": true }, { "id": 495, "enabled": true, - "label": "GIMPressionist...", + "label": 'GIMPressionist...', "visible": true }, { "id": 496, "enabled": true, - "label": "Cubism...", + "label": 'Cubism...', "visible": true }, { "id": 497, "enabled": true, - "label": "Clothify...", + "label": 'Clothify...', "visible": true }, { "id": 498, "enabled": true, - "label": "Cartoon...", + "label": 'Cartoon...', "visible": true }, { "id": 499, "enabled": true, - "label": "Apply Canvas...", + "label": 'Apply Canvas...', "visible": true } ] }, { "id": 500, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Combine", + "label": 'Combine', "visible": true, "submenu": [ { "id": 501, "enabled": true, - "label": "Filmstrip...", + "label": 'Filmstrip...', "visible": true }, { "id": 502, "enabled": true, - "label": "Depth Merge...", + "label": 'Depth Merge...', "visible": true } ] }, { "id": 503, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Generic", + "label": 'Generic', "visible": true, "submenu": [ { "id": 504, "enabled": true, - "label": "Erode", + "label": 'Erode', "visible": true }, { "id": 505, "enabled": true, - "label": "Dilate", + "label": 'Dilate', "visible": true }, { "id": 506, "enabled": true, - "label": "Convolution Matrix...", + "label": 'Convolution Matrix...', "visible": true } ] }, { "id": 507, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Edge-Detect", + "label": 'Edge-Detect', "visible": true, "submenu": [ { "id": 508, "enabled": true, - "label": "Sobel...", + "label": 'Sobel...', "visible": true }, { "id": 509, "enabled": true, - "label": "Neon...", + "label": 'Neon...', "visible": true }, { "id": 510, "enabled": true, - "label": "Laplace", + "label": 'Laplace', "visible": true }, { "id": 511, "enabled": true, - "label": "Edge...", + "label": 'Edge...', "visible": true }, { "id": 512, "enabled": true, - "label": "Difference of Gaussians...", + "label": 'Difference of Gaussians...', "visible": true } ] }, { "id": 513, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Noise", + "label": 'Noise', "visible": true, "submenu": [ { "id": 514, "enabled": true, - "label": "Spread...", + "label": 'Spread...', "visible": true }, { "id": 515, "enabled": true, - "label": "Slur...", + "label": 'Slur...', "visible": true }, { "id": 516, "enabled": true, - "label": "RGB Noise...", + "label": 'RGB Noise...', "visible": true }, { "id": 517, "enabled": true, - "label": "Pick...", + "label": 'Pick...', "visible": true }, { "id": 518, "enabled": true, - "label": "Hurl...", + "label": 'Hurl...', "visible": true }, { "id": 519, "enabled": true, - "label": "HSV Noise...", + "label": 'HSV Noise...', "visible": true } ] }, { "id": 520, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Light and Shadow", + "label": 'Light and Shadow', "visible": true, "submenu": [ { "id": 521, "enabled": true, - "label": "Glass Tile...", + "label": 'Glass Tile...', "visible": true }, { "id": 522, "enabled": true, - "label": "Apply Lens...", + "label": 'Apply Lens...', "visible": true }, { "id": 523, - "type": "separator" + "type": 'separator' }, { "id": 524, "enabled": true, - "label": "Xach-Effect...", + "label": 'Xach-Effect...', "visible": true }, { "id": 525, "enabled": true, - "label": "Perspective...", + "label": 'Perspective...', "visible": true }, { "id": 526, "enabled": true, - "label": "Drop Shadow...", + "label": 'Drop Shadow...', "visible": true }, { "id": 527, - "type": "separator" + "type": 'separator' }, { "id": 528, "enabled": true, - "label": "Supernova...", + "label": 'Supernova...', "visible": true }, { "id": 529, "enabled": true, - "label": "Sparkle...", + "label": 'Sparkle...', "visible": true }, { "id": 530, "enabled": true, - "label": "Lighting Effects...", + "label": 'Lighting Effects...', "visible": true }, { "id": 531, "enabled": true, - "label": "Lens Flare...", + "label": 'Lens Flare...', "visible": true }, { "id": 532, "enabled": true, - "label": "Gradient Flare...", + "label": 'Gradient Flare...', "visible": true } ] }, { "id": 533, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Distorts", + "label": 'Distorts', "visible": true, "submenu": [ { "id": 534, "enabled": true, - "label": "Wind...", + "label": 'Wind...', "visible": true }, { "id": 535, "enabled": true, - "label": "Whirl and Pinch...", + "label": 'Whirl and Pinch...', "visible": true }, { "id": 536, "enabled": true, - "label": "Waves...", + "label": 'Waves...', "visible": true }, { "id": 537, "enabled": true, - "label": "Video...", + "label": 'Video...', "visible": true }, { "id": 538, "enabled": true, - "label": "Value Propagate...", + "label": 'Value Propagate...', "visible": true }, { "id": 539, "enabled": true, - "label": "Shift...", + "label": 'Shift...', "visible": true }, { "id": 540, "enabled": true, - "label": "Ripple...", + "label": 'Ripple...', "visible": true }, { "id": 541, "enabled": true, - "label": "Polar Coordinates...", + "label": 'Polar Coordinates...', "visible": true }, { "id": 542, "enabled": true, - "label": "Pagecurl...", + "label": 'Pagecurl...', "visible": true }, { "id": 543, "enabled": true, - "label": "Newsprint...", + "label": 'Newsprint...', "visible": true }, { "id": 544, "enabled": true, - "label": "Mosaic...", + "label": 'Mosaic...', "visible": true }, { "id": 545, "enabled": true, - "label": "Lens Distortion...", + "label": 'Lens Distortion...', "visible": true }, { "id": 546, "enabled": true, - "label": "IWarp...", + "label": 'IWarp...', "visible": true }, { "id": 547, "enabled": true, - "label": "Erase Every Other Row...", + "label": 'Erase Every Other Row...', "visible": true }, { "id": 548, "enabled": true, - "label": "Engrave...", + "label": 'Engrave...', "visible": true }, { "id": 549, "enabled": true, - "label": "Emboss...", + "label": 'Emboss...', "visible": true }, { "id": 550, "enabled": true, - "label": "Curve Bend...", + "label": 'Curve Bend...', "visible": true }, { "id": 551, "enabled": true, - "label": "Blinds...", + "label": 'Blinds...', "visible": true } ] }, { "id": 552, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Enhance", + "label": 'Enhance', "visible": true, "submenu": [ { "id": 553, "enabled": true, - "label": "Unsharp Mask...", + "label": 'Unsharp Mask...', "visible": true }, { "id": 554, "enabled": true, - "label": "Sharpen...", + "label": 'Sharpen...', "visible": true }, { "id": 555, "enabled": true, - "label": "Red Eye Removal...", + "label": 'Red Eye Removal...', "visible": true }, { "id": 556, "enabled": false, - "label": "NL Filter...", + "label": 'NL Filter...', "visible": true }, { "id": 557, "enabled": true, - "label": "Destripe...", + "label": 'Destripe...', "visible": true }, { "id": 558, "enabled": true, - "label": "Despeckle...", + "label": 'Despeckle...', "visible": true }, { "id": 559, "enabled": true, - "label": "Deinterlace...", + "label": 'Deinterlace...', "visible": true }, { "id": 560, "enabled": true, - "label": "Antialias", + "label": 'Antialias', "visible": true } ] }, { "id": 561, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Blur", + "label": 'Blur', "visible": true, "submenu": [ { "id": 562, "enabled": true, - "label": "Tileable Blur...", + "label": 'Tileable Blur...', "visible": true }, { "id": 563, "enabled": true, - "label": "Selective Gaussian Blur...", + "label": 'Selective Gaussian Blur...', "visible": true }, { "id": 564, "enabled": true, - "label": "Pixelize...", + "label": 'Pixelize...', "visible": true }, { "id": 565, "enabled": true, - "label": "Motion Blur...", + "label": 'Motion Blur...', "visible": true }, { "id": 566, "enabled": true, - "label": "Gaussian Blur...", + "label": 'Gaussian Blur...', "visible": true }, { "id": 567, "enabled": true, - "label": "Blur", + "label": 'Blur', "visible": true } ] }, { "id": 568, - "type": "separator" + "type": 'separator' }, { "id": 569, "enabled": true, - "label": "Reset all Filters", + "label": 'Reset all Filters', "visible": true }, { "id": 570, - "children-display": "submenu", + "children-display": 'submenu', "enabled": false, - "label": "Re-Show Last", - "shortcut": [["Control", "Shift", "f"]], + "label": 'Re-Show Last', + "shortcut": [['Control', 'Shift', 'f']], "visible": true, "submenu": [ { "id": 571, "enabled": false, - "label": "Empty", + "label": 'Empty', "visible": true } ] @@ -3670,210 +3670,210 @@ { "id": 572, "enabled": false, - "label": "Repeat Last", - "shortcut": [["Control", "f"]], + "label": 'Repeat Last', + "shortcut": [['Control', 'f']], "visible": true } ] }, { "id": 573, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Windows", + "label": 'Windows', "visible": true, "submenu": [ { "id": 574, "enabled": true, - "label": "Toolbox", - "shortcut": [["Control", "b"]], + "label": 'Toolbox', + "shortcut": [['Control', 'b']], "visible": true }, { "id": 575, - "type": "separator" + "type": 'separator' }, { "id": 576, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Dockable Dialogs", + "label": 'Dockable Dialogs', "visible": true, "submenu": [ { "id": 577, "enabled": true, - "label": "Error Console", + "label": 'Error Console', "visible": true }, { "id": 578, "enabled": true, - "label": "Tools", + "label": 'Tools', "visible": true }, { "id": 579, "enabled": true, - "label": "Templates", + "label": 'Templates', "visible": true }, { "id": 580, "enabled": true, - "label": "Document History", + "label": 'Document History', "visible": true }, { "id": 581, "enabled": true, - "label": "Images", + "label": 'Images', "visible": true }, { "id": 582, - "type": "separator" + "type": 'separator' }, { "id": 583, "enabled": true, - "label": "Buffers", + "label": 'Buffers', "visible": true }, { "id": 584, "enabled": true, - "label": "Fonts", + "label": 'Fonts', "visible": true }, { "id": 585, "enabled": true, - "label": "Palettes", + "label": 'Palettes', "visible": true }, { "id": 586, "enabled": true, - "label": "Gradients", - "shortcut": [["Control", "g"]], + "label": 'Gradients', + "shortcut": [['Control', 'g']], "visible": true }, { "id": 587, "enabled": true, - "label": "Patterns", - "shortcut": [["Control", "Shift", "p"]], + "label": 'Patterns', + "shortcut": [['Control', 'Shift', 'p']], "visible": true }, { "id": 588, "enabled": true, - "label": "Brushes", - "shortcut": [["Control", "Shift", "b"]], + "label": 'Brushes', + "shortcut": [['Control', 'Shift', 'b']], "visible": true }, { "id": 589, "enabled": true, - "label": "Colors", + "label": 'Colors', "visible": true }, { "id": 590, - "type": "separator" + "type": 'separator' }, { "id": 591, "enabled": true, - "label": "Sample Points", + "label": 'Sample Points', "visible": true }, { "id": 592, "enabled": true, - "label": "Pointer", + "label": 'Pointer', "visible": true }, { "id": 593, "enabled": true, - "label": "Undo History", + "label": 'Undo History', "visible": true }, { "id": 594, "enabled": true, - "label": "Navigation", + "label": 'Navigation', "visible": true }, { "id": 595, "enabled": true, - "label": "Selection Editor", + "label": 'Selection Editor', "visible": true }, { "id": 596, "enabled": true, - "label": "Histogram", + "label": 'Histogram', "visible": true }, { "id": 597, "enabled": true, - "label": "Colormap", + "label": 'Colormap', "visible": true }, { "id": 598, "enabled": true, - "label": "Paths", + "label": 'Paths', "visible": true }, { "id": 599, "enabled": true, - "label": "Channels", + "label": 'Channels', "visible": true }, { "id": 600, "enabled": true, - "label": "Layers", - "shortcut": [["Control", "l"]], + "label": 'Layers', + "shortcut": [['Control', 'l']], "visible": true }, { "id": 601, - "type": "separator" + "type": 'separator' }, { "id": 602, "enabled": true, - "label": "Device Status", + "label": 'Device Status', "visible": true }, { "id": 603, "enabled": true, - "label": "Tool Options", + "label": 'Tool Options', "visible": true } ] }, { "id": 604, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Recently Closed Docks", + "label": 'Recently Closed Docks', "visible": true, "submenu": [ { "id": 605, "enabled": false, - "label": "Empty", + "label": 'Empty', "visible": true } ] @@ -3882,139 +3882,139 @@ }, { "id": 606, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Help", + "label": 'Help', "visible": true, "submenu": [ { "id": 607, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "User Manual", + "label": 'User Manual', "visible": true, "submenu": [ { "id": 608, "enabled": true, - "label": "Working with Digital Camera Photos", + "label": 'Working with Digital Camera Photos', "visible": true }, { "id": 609, "enabled": true, - "label": "Using Paths", + "label": 'Using Paths', "visible": true }, { "id": 610, "enabled": true, - "label": "Preparing your Images for the Web", + "label": 'Preparing your Images for the Web', "visible": true }, { "id": 611, "enabled": true, - "label": "How to Use Dialogs", + "label": 'How to Use Dialogs', "visible": true }, { "id": 612, "enabled": true, - "label": "Drawing Simple Objects", + "label": 'Drawing Simple Objects', "visible": true }, { "id": 613, "enabled": true, - "label": "Create, Open and Save Files", + "label": 'Create, Open and Save Files', "visible": true }, { "id": 614, "enabled": true, - "label": "Basic Concepts", + "label": 'Basic Concepts', "visible": true } ] }, { "id": 615, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "GIMP Online", + "label": 'GIMP Online', "visible": true, "submenu": [ { "id": 616, "enabled": true, - "label": "User Manual Web Site", + "label": 'User Manual Web Site', "visible": true }, { "id": 617, "enabled": true, - "label": "Plug-in Registry", + "label": 'Plug-in Registry', "visible": true }, { "id": 618, "enabled": true, - "label": "Main Web Site", + "label": 'Main Web Site', "visible": true }, { "id": 619, "enabled": true, - "label": "Developer Web Site", + "label": 'Developer Web Site', "visible": true } ] }, { "id": 620, - "type": "separator" + "type": 'separator' }, { "id": 621, "enabled": true, - "label": "Procedure Browser", + "label": 'Procedure Browser', "visible": true }, { "id": 622, "enabled": true, - "label": "Plug-In Browser", + "label": 'Plug-In Browser', "visible": true }, { "id": 623, - "type": "separator" + "type": 'separator' }, { "id": 624, "enabled": true, - "label": "About", + "label": 'About', "visible": true }, { "id": 625, "enabled": true, - "label": "Tip of the Day", + "label": 'Tip of the Day', "visible": true }, { "id": 626, "enabled": true, - "label": "Context Help", - "shortcut": [["Shift", "F1"]], + "label": 'Context Help', + "shortcut": [['Shift', 'F1']], "visible": true }, { "id": 627, "enabled": true, - "label": "Help", - "shortcut": [["F1"]], + "label": 'Help', + "shortcut": [['F1']], "visible": true } ] -- cgit v1.2.3 From 4bf64d184cb6eb7ac89d91705e947aedd2aa981a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 1 Dec 2010 21:35:46 -0600 Subject: Making the ints from the JSON file int32s --- tests/json-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 4d3e6aa..14e90e0 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -56,7 +56,7 @@ node2variant (JsonNode * node) switch (json_node_get_value_type(node)) { case G_TYPE_INT: case G_TYPE_INT64: - return g_variant_new_int64(json_node_get_int(node)); + return g_variant_new_int32(json_node_get_int(node)); case G_TYPE_DOUBLE: case G_TYPE_FLOAT: return g_variant_new_double(json_node_get_double(node)); -- cgit v1.2.3 From 837d3645ef5860c92dd5c1c82420c60a581b341f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 2 Dec 2010 14:01:47 -0600 Subject: Renaming the jsonloader pc file --- configure.ac | 2 +- tests/Makefile.am | 2 +- tests/dbusmenu-jsonloader-0.4.pc.in | 14 ++++++++++++++ tests/dbusmenu-jsonloader.pc.in | 14 -------------- 4 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 tests/dbusmenu-jsonloader-0.4.pc.in delete mode 100644 tests/dbusmenu-jsonloader.pc.in (limited to 'tests') diff --git a/configure.ac b/configure.ac index c17b293..9aff3ce 100644 --- a/configure.ac +++ b/configure.ac @@ -172,7 +172,7 @@ libdbusmenu-gtk/dbusmenu-gtk3-0.4.pc tools/Makefile tools/testapp/Makefile tests/Makefile -tests/dbusmenu-jsonloader.pc +tests/dbusmenu-jsonloader-0.4.pc docs/Makefile docs/libdbusmenu-glib/Makefile docs/libdbusmenu-glib/reference/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index aa79c8f..df2a364 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -80,7 +80,7 @@ libdbusmenu_jsonloader_la_LIBADD = \ $(DBUSMENUGLIB_LIBS) \ $(DBUSMENUTESTS_LIBS) -pkgconfig_DATA = dbusmenu-jsonloader.pc +pkgconfig_DATA = dbusmenu-jsonloader-0.4.pc pkgconfigdir = $(libdir)/pkgconfig ###################### diff --git a/tests/dbusmenu-jsonloader-0.4.pc.in b/tests/dbusmenu-jsonloader-0.4.pc.in new file mode 100644 index 0000000..d042132 --- /dev/null +++ b/tests/dbusmenu-jsonloader-0.4.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/dbusmenu-jsonloader.pc.in b/tests/dbusmenu-jsonloader.pc.in deleted file mode 100644 index d042132..0000000 --- a/tests/dbusmenu-jsonloader.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -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@ - -- cgit v1.2.3 From 58c157738e5aae7a01422b21a3b1f0a6e3ca2ed9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 7 Dec 2010 21:17:43 -0600 Subject: Wrong directory for jsonloader header files. --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index df2a364..17b44d1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -52,7 +52,7 @@ XVFB_RUN=". $(srcdir)/run-xvfb.sh" lib_LTLIBRARIES = libdbusmenu-jsonloader.la -libdbusmenu_jsonloaderincludedir=$(includedir)/libdbusmenu-0.1/libdbusmenu-jsonloader/ +libdbusmenu_jsonloaderincludedir=$(includedir)/libdbusmenu-0.4/libdbusmenu-jsonloader/ libdbusmenu_jsonloaderinclude_HEADERS = \ json-loader.h -- cgit v1.2.3 From 1a73825600508b5d7f027641b05a682a8ac81f5e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 8 Dec 2010 09:27:48 -0600 Subject: Fixing the requires in the pc files --- libdbusmenu-glib/dbusmenu-glib-0.4.pc.in | 2 +- libdbusmenu-gtk/dbusmenu-gtk-0.4.pc.in | 2 +- libdbusmenu-gtk/dbusmenu-gtk3-0.4.pc.in | 2 +- tests/dbusmenu-jsonloader-0.4.pc.in | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/libdbusmenu-glib/dbusmenu-glib-0.4.pc.in b/libdbusmenu-glib/dbusmenu-glib-0.4.pc.in index 3f31664..31a1eac 100644 --- a/libdbusmenu-glib/dbusmenu-glib-0.4.pc.in +++ b/libdbusmenu-glib/dbusmenu-glib-0.4.pc.in @@ -5,7 +5,7 @@ bindir=@bindir@ includedir=@includedir@ Cflags: -I${includedir}/libdbusmenu-0.4 -Requires: dbus-glib-1 +Requires: Libs: -L${libdir} -ldbusmenu-glib Name: libdbusmenu-glib diff --git a/libdbusmenu-gtk/dbusmenu-gtk-0.4.pc.in b/libdbusmenu-gtk/dbusmenu-gtk-0.4.pc.in index f35c621..8784556 100644 --- a/libdbusmenu-gtk/dbusmenu-gtk-0.4.pc.in +++ b/libdbusmenu-gtk/dbusmenu-gtk-0.4.pc.in @@ -5,7 +5,7 @@ bindir=@bindir@ includedir=@includedir@ Cflags: -I${includedir}/libdbusmenu-0.4 -Requires: dbus-glib-1 dbusmenu-glib +Requires: dbusmenu-glib-0.4 Libs: -L${libdir} -ldbusmenu-gtk Name: libdbusmenu-gtk diff --git a/libdbusmenu-gtk/dbusmenu-gtk3-0.4.pc.in b/libdbusmenu-gtk/dbusmenu-gtk3-0.4.pc.in index 033c390..804b13e 100644 --- a/libdbusmenu-gtk/dbusmenu-gtk3-0.4.pc.in +++ b/libdbusmenu-gtk/dbusmenu-gtk3-0.4.pc.in @@ -5,7 +5,7 @@ bindir=@bindir@ includedir=@includedir@ Cflags: -I${includedir}/libdbusmenu-0.4 -Requires: dbus-glib-1 dbusmenu-glib +Requires: dbusmenu-glib-0.4 Libs: -L${libdir} -ldbusmenu-gtk3 Name: libdbusmenu-gtk3 diff --git a/tests/dbusmenu-jsonloader-0.4.pc.in b/tests/dbusmenu-jsonloader-0.4.pc.in index d042132..62bfeb2 100644 --- a/tests/dbusmenu-jsonloader-0.4.pc.in +++ b/tests/dbusmenu-jsonloader-0.4.pc.in @@ -5,7 +5,7 @@ bindir=@bindir@ includedir=@includedir@ Cflags: -I${includedir}/libdbusmenu-0.1 -Requires: dbus-glib-1,dbusmenu-glib,json-glib-1.0 +Requires: dbusmenu-glib-0.4 json-glib-1.0 Libs: -L${libdir} -ldbusmenu-jsonloader Name: libdbusmenu-jsonloader -- cgit v1.2.3 From e5f53f91d929c46914b4a02336e31724fb54ec95 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 5 Jan 2011 20:47:09 -0600 Subject: Adding a test to test removing of properties --- tests/test-glib-objects.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests') diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index 7143814..2c8eda9 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -274,6 +274,29 @@ test_object_menuitem_props_boolstr (void) return; } +/* Set and then remove a prop */ +static void +test_object_menuitem_props_removal (void) +{ + /* Build a menu item */ + DbusmenuMenuitem * item = dbusmenu_menuitem_new(); + + /* Test to make sure it's a happy object */ + g_assert(item != NULL); + + /* Set the property and ensure that it's set */ + dbusmenu_menuitem_property_set_variant(item, "myprop", g_variant_new_int32(34)); + g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") != NULL); + + /* Remove the property and ensure it goes away */ + dbusmenu_menuitem_property_set_variant(item, "myprop", NULL); + g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") == NULL); + + g_object_unref(item); + + return; +} + /* Build the test suite */ static void test_glib_objects_suite (void) @@ -286,6 +309,7 @@ test_glib_objects_suite (void) g_test_add_func ("/dbusmenu/glib/objects/menuitem/props_swap", test_object_menuitem_props_swap); g_test_add_func ("/dbusmenu/glib/objects/menuitem/props_signals", test_object_menuitem_props_signals); g_test_add_func ("/dbusmenu/glib/objects/menuitem/props_boolstr", test_object_menuitem_props_boolstr); + g_test_add_func ("/dbusmenu/glib/objects/menuitem/props_removal", test_object_menuitem_props_removal); return; } -- cgit v1.2.3 From 0c50ae11cafdd7ca04ae6d2a69390903d16daedd Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 5 Jan 2011 20:49:47 -0600 Subject: Adding a test for removal by string being NULL --- tests/test-glib-objects.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index 2c8eda9..9c99280 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -292,6 +292,14 @@ test_object_menuitem_props_removal (void) dbusmenu_menuitem_property_set_variant(item, "myprop", NULL); g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") == NULL); + /* Set the property again */ + dbusmenu_menuitem_property_set_variant(item, "myprop", g_variant_new_int32(34)); + g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") != NULL); + + /* Remove the property with a NULL string */ + dbusmenu_menuitem_property_set(item, "myprop", NULL); + g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") == NULL); + g_object_unref(item); return; -- cgit v1.2.3 From fda2b25645a35ec7b3baddc366e483a8a9b83e58 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 23 Jan 2011 13:30:00 -0600 Subject: Adding in a basic test that just ensures the parser isn't entirely broken --- .bzrignore | 3 +++ tests/Makefile.am | 35 +++++++++++++++++++++++++++-- tests/test-gtk-parser.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 tests/test-gtk-parser.c (limited to 'tests') diff --git a/.bzrignore b/.bzrignore index e0fd93e..df33247 100644 --- a/.bzrignore +++ b/.bzrignore @@ -221,3 +221,6 @@ libdbusmenu-gtk/DbusmenuGtk-0.4.vapi libdbusmenu-gtk/dbusmenu-gtk-0.4.pc libdbusmenu-gtk/dbusmenu-gtk3-0.4.pc libdbusmenu-gtk/libdbusmenu_gtk_la-parser.lo +test-gtk-parser +test-gtk-parser-test +test-gtk-parser.xml diff --git a/tests/Makefile.am b/tests/Makefile.am index 17b44d1..62142dc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,7 +16,8 @@ TESTS = \ test-gtk-label \ test-gtk-shortcut \ test-gtk-reorder \ - test-gtk-submenu + test-gtk-submenu \ + test-gtk-parser-test check_PROGRAMS = \ glib-server-nomenu \ @@ -42,7 +43,8 @@ check_PROGRAMS = \ test-json-client \ test-json-server \ test-gtk-submenu-server \ - test-gtk-submenu-client + test-gtk-submenu-client \ + test-gtk-parser XVFB_RUN=". $(srcdir)/run-xvfb.sh" @@ -384,6 +386,35 @@ test_gtk_objects_LDADD = \ $(DBUSMENUGLIB_LIBS) \ $(DBUSMENUGTK_LIBS) +###################### +# Test GTK Parser +###################### + +GTK_PARSER_XML_REPORT = test-gtk-parser.xml + +test-gtk-parser-test: test-gtk-parser Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo gtester --verbose -k -o $(GTK_PARSER_XML_REPORT) ./test-gtk-parser >> $@ + @chmod +x $@ + +test_gtk_parser_SOURCES = \ + test-gtk-parser.c + +test_gtk_parser_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGLIB_CFLAGS) \ + $(DBUSMENUGTK_CFLAGS) \ + -DSRCDIR="\"$(srcdir)\"" \ + -Wall -Werror + +test_gtk_parser_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGLIB_LIBS) \ + $(DBUSMENUGTK_LIBS) + + ######################### # Test GTK Label ######################### diff --git a/tests/test-gtk-parser.c b/tests/test-gtk-parser.c new file mode 100644 index 0000000..74ff9b8 --- /dev/null +++ b/tests/test-gtk-parser.c @@ -0,0 +1,58 @@ +/* +Testing for the various objects just by themselves. + +Copyright 2011 Canonical Ltd. + +Authors: + Ted Gould + +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 . +*/ + +#include + +/* Just makes sure we can connect here people */ +static void +test_parser_runs (void) +{ + GtkWidget * gmi = gtk_menu_item_new_with_label("Test Item"); + g_assert(gmi != NULL); + DbusmenuMenuitem * mi = dbusmenu_gtk_parse_menu_structure(gmi); + g_assert(mi != NULL); + + g_object_unref(gmi); + g_object_unref(mi); + + return; +} + +/* Build the test suite */ +static void +test_gtk_parser_suite (void) +{ + g_test_add_func ("/dbusmenu/gtk/parser/base", test_parser_runs); + return; +} + +gint +main (gint argc, gchar * argv[]) +{ + gtk_init(&argc, &argv); + g_test_init(&argc, &argv, NULL); + + /* Test suites */ + test_gtk_parser_suite(); + + + return g_test_run (); +} -- cgit v1.2.3 From 0ab1ae08ad882569f301b00b174d1c823adb9674 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 23 Jan 2011 14:00:19 -0600 Subject: Adding a child test, but it's failing to make the children. --- tests/test-gtk-parser.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'tests') diff --git a/tests/test-gtk-parser.c b/tests/test-gtk-parser.c index 74ff9b8..e6d5385 100644 --- a/tests/test-gtk-parser.c +++ b/tests/test-gtk-parser.c @@ -36,11 +36,62 @@ test_parser_runs (void) return; } +const gchar * test_parser_children_builder = +"" +"" +"" +/* Start menu bar */ +"True" +/* Child 1 */ +"TrueChild One" +/* Child 2 */ +"TrueChild Two" +/* Child 3 */ +"TrueChild Three" +/* Child 4 */ +"TrueChild Four" +/* Stop menubar */ +"" +""; + +/* Ensure the parser can find children */ +static void +test_parser_children (void) { + GtkBuilder * builder = gtk_builder_new(); + g_assert(builder != NULL); + + GError * error = NULL; + gtk_builder_add_from_string(builder, test_parser_children_builder, -1, &error); + if (error != NULL) { + g_error("Unable to parse UI definition: %s", error->message); + g_error_free(error); + error = NULL; + } + + GtkWidget * menu = GTK_WIDGET(gtk_builder_get_object(builder, "menubar")); + g_assert(menu != NULL); + + DbusmenuMenuitem * mi = dbusmenu_gtk_parse_menu_structure(menu); + g_assert(mi != NULL); + + GList * children = dbusmenu_menuitem_get_children(mi); + g_assert(children != NULL); + + g_assert(g_list_length(children) == 4); + + g_object_unref(mi); + g_object_unref(menu); + g_object_unref(builder); + + return; +} + /* Build the test suite */ static void test_gtk_parser_suite (void) { g_test_add_func ("/dbusmenu/gtk/parser/base", test_parser_runs); + g_test_add_func ("/dbusmenu/gtk/parser/children", test_parser_children); return; } -- cgit v1.2.3 From 90cc7e167c0fc9c709379afa1f22e0a2c494c347 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 23 Jan 2011 14:10:43 -0600 Subject: Adding some debug code, commented out. --- tests/test-gtk-parser.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/test-gtk-parser.c b/tests/test-gtk-parser.c index e6d5385..ee608ae 100644 --- a/tests/test-gtk-parser.c +++ b/tests/test-gtk-parser.c @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include #include /* Just makes sure we can connect here people */ @@ -74,6 +75,12 @@ test_parser_children (void) { DbusmenuMenuitem * mi = dbusmenu_gtk_parse_menu_structure(menu); g_assert(mi != NULL); +/* + GPtrArray * xmlarray = g_ptr_array_new(); + dbusmenu_menuitem_buildxml(mi, xmlarray); + g_debug("XML: %s", g_strjoinv("", (gchar **)xmlarray->pdata)); +*/ + GList * children = dbusmenu_menuitem_get_children(mi); g_assert(children != NULL); -- cgit v1.2.3 From f9cca3a5b9f42963b43b78670720f0cecd7843ea Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 23 Jan 2011 15:10:08 -0600 Subject: For some reason this isn't an object, seems like a builder error, but we're not checking for those really. --- tests/test-gtk-parser.c | 1 - 1 file changed, 1 deletion(-) (limited to 'tests') diff --git a/tests/test-gtk-parser.c b/tests/test-gtk-parser.c index ee608ae..b66b46a 100644 --- a/tests/test-gtk-parser.c +++ b/tests/test-gtk-parser.c @@ -88,7 +88,6 @@ test_parser_children (void) { g_object_unref(mi); g_object_unref(menu); - g_object_unref(builder); return; } -- cgit v1.2.3 From 3cebed3db50dd6325c725d87a6ec5eabc21d2ba3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Feb 2011 22:33:02 -0600 Subject: Making sure the root isn't NULL before continuing --- tests/test-glib-layout-client.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/test-glib-layout-client.c b/tests/test-glib-layout-client.c index 5ea0cf8..3afe042 100644 --- a/tests/test-glib-layout-client.c +++ b/tests/test-glib-layout-client.c @@ -81,6 +81,11 @@ layout_updated (DbusmenuClient * client, gpointer data) g_debug("Layout Updated"); DbusmenuMenuitem * menuroot = dbusmenu_client_get_root(client); + if (menuroot == NULL) { + g_debug("Root NULL, waiting"); + return; + } + layout_t * layout = &layouts[layouton]; if (!verify_root_to_layout(menuroot, layout)) { -- cgit v1.2.3 From e1094452eda0314065bb1b02d616d573c0367a74 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 15 Feb 2011 11:50:54 -0600 Subject: Don't unref the variant as we don't really have a ref to it, it's still floating --- tests/json-loader.c | 1 - 1 file changed, 1 deletion(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 14e90e0..36157dc 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -109,7 +109,6 @@ set_props (DbusmenuMenuitem * mi, JsonObject * node) if (variant != NULL) { dbusmenu_menuitem_property_set_variant(mi, member, variant); - g_variant_unref(variant); } } -- cgit v1.2.3 From fd71ffff45749bc72cabcd4c5fd8b258d7d25c72 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 15 Feb 2011 15:06:42 -0600 Subject: Make sure to clean up the reports --- tests/Makefile.am | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 62142dc..32c8437 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,6 +2,7 @@ DBUS_RUNNER=dbus-test-runner CLEANFILES= +DISTCLEANFILES= TESTS = \ test-glib-objects-test \ @@ -260,6 +261,8 @@ test_glib_objects_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGLIB_LIBS) +DISTCLEANFILES += $(OBJECT_XML_REPORT) + ###################### # Test Glib Properties ###################### @@ -386,6 +389,8 @@ test_gtk_objects_LDADD = \ $(DBUSMENUGLIB_LIBS) \ $(DBUSMENUGTK_LIBS) +DISTCLEANFILES += $(GTK_OBJECT_XML_REPORT) + ###################### # Test GTK Parser ###################### @@ -414,6 +419,7 @@ test_gtk_parser_LDADD = \ $(DBUSMENUGLIB_LIBS) \ $(DBUSMENUGTK_LIBS) +DISTCLEANFILES += $(GTK_PARSER_XML_REPORT) ######################### # Test GTK Label @@ -622,8 +628,6 @@ CLEANFILES += \ distclean-local: -rm -rf $(builddir)/mago.results -DISTCLEANFILES = \ - $(TESTS) \ - $(OBJECT_XML_REPORT) \ - $(GTK_OBJECT_XML_REPORT) +DISTCLEANFILES += \ + $(TESTS) -- cgit v1.2.3 From 52e9e4c8125943abc8d7513501aad1698ab4d7f6 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 21 Feb 2011 11:30:50 +0100 Subject: add test-glib-simple-items.py Python GI test This replicates tests/test-glib-simple-items.c using Python and GI. Update the Makefile to use the locally generated GI typelibs for the tests. --- tests/Makefile.am | 8 ++++++-- tests/test-glib-simple-items.py | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100755 tests/test-glib-simple-items.py (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 62142dc..9259ed1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,7 +17,8 @@ TESTS = \ test-gtk-shortcut \ test-gtk-reorder \ test-gtk-submenu \ - test-gtk-parser-test + test-gtk-parser-test \ + test-glib-simple-items.py check_PROGRAMS = \ glib-server-nomenu \ @@ -48,6 +49,9 @@ check_PROGRAMS = \ XVFB_RUN=". $(srcdir)/run-xvfb.sh" +# for the GI tests, prefer/use the typelibs from the local build tree +TESTS_ENVIRONMENT = env GI_TYPELIB_PATH=$(top_builddir)/libdbusmenu-glib:$(top_builddir)/libdbusmenu-gtk:$(GI_TYPELIB_PATH) + ###################### # JSON Loader lib ###################### @@ -623,7 +627,7 @@ distclean-local: -rm -rf $(builddir)/mago.results DISTCLEANFILES = \ - $(TESTS) \ + $(filter-out %.py, $(TESTS)) \ $(OBJECT_XML_REPORT) \ $(GTK_OBJECT_XML_REPORT) diff --git a/tests/test-glib-simple-items.py b/tests/test-glib-simple-items.py new file mode 100755 index 0000000..d7ad7d7 --- /dev/null +++ b/tests/test-glib-simple-items.py @@ -0,0 +1,35 @@ +#!/usr/bin/python +# This is the Python GI version of test-glib-simple-items.c + +import gobject +from gi.repository import Dbusmenu + +dummies = ['Bob', 'Jim', 'Alvin', 'Mary'] + +def dummy_users(root): + count = 0 + for user in dummies: + mi = Dbusmenu.Menuitem() + print 'Creating item: %d %s' % (mi.get_id(), user) + print '\tRoot ID:', root.get_id() + mi.property_set('label', user) + root.child_add_position(mi, count) + assert mi.property_get('label') == user + count += 1 + +def quititall(mainloop): + mainloop.quit() + return False + +# main + +server = Dbusmenu.Server.new('/test/object') +root_menuitem = Dbusmenu.Menuitem() +server.set_root(root_menuitem) +print 'Root ID:', root_menuitem.get_id() + +dummy_users(root_menuitem) + +mainloop = gobject.MainLoop() +gobject.timeout_add_seconds(1, quititall, mainloop) +mainloop.run() -- cgit v1.2.3 From 83a270fd9db6cda2dbff19335c97361aa4ad6781 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 21 Feb 2011 14:06:43 +0100 Subject: add test-gtk-shortcut-client.py Python GI test This replicates tests/test-gtk-shortcut-client.c using Python and GI. --- tests/Makefile.am | 7 ++++++ tests/test-gtk-shortcut-client.py | 52 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100755 tests/test-gtk-shortcut-client.py (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index c0081b0..f9102ed 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,6 +16,7 @@ TESTS = \ test-gtk-objects-test \ test-gtk-label \ test-gtk-shortcut \ + test-gtk-shortcut-python \ test-gtk-reorder \ test-gtk-submenu \ test-gtk-parser-test \ @@ -476,6 +477,12 @@ test-gtk-shortcut: test-gtk-shortcut-client test-gtk-shortcut-server Makefile.am @echo $(DBUS_RUNNER) --task ./test-gtk-shortcut-client --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ @chmod +x $@ +test-gtk-shortcut-python: test-gtk-shortcut-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task ./test-gtk-shortcut-client.py --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + test_gtk_shortcut_server_SOURCES = \ test-gtk-shortcut-server.c diff --git a/tests/test-gtk-shortcut-client.py b/tests/test-gtk-shortcut-client.py new file mode 100755 index 0000000..885d227 --- /dev/null +++ b/tests/test-gtk-shortcut-client.py @@ -0,0 +1,52 @@ +#!/usr/bin/python + +# A test for libdbusmenu to ensure its quality. This is the Python GI version +# of test-gtk-shortcut-client.c +# +# Copyright 2011 Canonical Ltd. +# Authors: +# Martin Pitt + +import sys +import gobject +from gi.repository import Gtk, DbusmenuGtk +Gtk.require_version('2.0') + +passed = True +main_loop = gobject.MainLoop() + +def timer_func(data): + passed = True + main_loop.quit() + return False + +# main +print 'Building Window' +window = Gtk.Window(type=Gtk.WindowType.TOPLEVEL) +menubar = Gtk.MenuBar() +menuitem = Gtk.MenuItem(label='Test') + +dmenu = DbusmenuGtk.Menu(dbus_name='glib.label.test', dbus_object='/org/test') +dclient = dmenu.get_client() +agroup = Gtk.AccelGroup() +dclient.set_accel_group(agroup) + +menuitem.set_submenu(dmenu) +menuitem.show() +menubar.append(menuitem) +menubar.show() +window.add(menubar) +window.set_title('libdbusmenu-gtk test') +window.add_accel_group(agroup) +window.show_all() + +gobject.timeout_add_seconds(10, timer_func, window) + +print 'Entering Mainloop' +main_loop.run() + +if passed: + print 'Quiting' +else: + print "Quiting as we're a failure" + sys.exit(1) -- cgit v1.2.3 From f3eb3cbb4623b9e996d2cc62a21b6fcc4a2331c7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 21 Feb 2011 10:18:48 -0600 Subject: Fixing distcheck by including py file and cleaning up it's pyc --- tests/Makefile.am | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index f9102ed..1f8faec 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,6 +3,7 @@ DBUS_RUNNER=dbus-test-runner CLEANFILES= DISTCLEANFILES= +EXTRA_DIST = TESTS = \ test-glib-objects-test \ @@ -477,12 +478,6 @@ test-gtk-shortcut: test-gtk-shortcut-client test-gtk-shortcut-server Makefile.am @echo $(DBUS_RUNNER) --task ./test-gtk-shortcut-client --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ @chmod +x $@ -test-gtk-shortcut-python: test-gtk-shortcut-server Makefile.am - @echo "#!/bin/bash" > $@ - @echo $(XVFB_RUN) >> $@ - @echo $(DBUS_RUNNER) --task ./test-gtk-shortcut-client.py --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ - @chmod +x $@ - test_gtk_shortcut_server_SOURCES = \ test-gtk-shortcut-server.c @@ -513,6 +508,19 @@ test_gtk_shortcut_client_LDADD = \ $(DBUSMENUGTK_LIBS) \ $(DBUSMENUTESTS_LIBS) +######################### +# Test GTK Shortcut Python +######################### + +test-gtk-shortcut-python: test-gtk-shortcut-server test-gtk-shortcut-client.py Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task ./test-gtk-shortcut-client.py --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +EXTRA_DIST += test-gtk-shortcut-client.py +CLEANFILES += test-gtk-shortcut-client.pyc + ######################### # Test GTK Reorder ######################### @@ -607,7 +615,7 @@ jsondir = $(datadir)/${PACKAGE}/json/ json_DATA = \ test-gtk-label.json -EXTRA_DIST = \ +EXTRA_DIST += \ $(examples_DATA) \ run-xvfb.sh \ $(json_DATA) \ -- cgit v1.2.3 From dcf34291bd1cc3f58652c96bd37de3162497b269 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 21 Feb 2011 10:22:35 -0600 Subject: Bringing along the simple items test as well --- tests/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 1f8faec..09bc4c5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -367,6 +367,8 @@ test_glib_simple_items_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGLIB_LIBS) +EXTRA_DIST += test-glib-simple-items.py + ###################### # Test GTK Object ###################### -- cgit v1.2.3 From 5b9418cb4be5823df8eb7c01f854eed0a13a2c9f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 21 Feb 2011 10:50:34 -0600 Subject: Fixing the path of the python in the test --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 09bc4c5..61b3e69 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -517,7 +517,7 @@ test_gtk_shortcut_client_LDADD = \ test-gtk-shortcut-python: test-gtk-shortcut-server test-gtk-shortcut-client.py Makefile.am @echo "#!/bin/bash" > $@ @echo $(XVFB_RUN) >> $@ - @echo $(DBUS_RUNNER) --task ./test-gtk-shortcut-client.py --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) --task $(srcdir)/test-gtk-shortcut-client.py --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ @chmod +x $@ EXTRA_DIST += test-gtk-shortcut-client.py -- cgit v1.2.3