aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am122
-rw-r--r--tests/dbusmenu-jsonloader-0.4.pc.in (renamed from tests/dbusmenu-jsonloader.pc.in)2
-rw-r--r--tests/json-loader.c153
-rw-r--r--tests/test-glib-events-client.c14
-rw-r--r--tests/test-glib-events-server.c55
-rw-r--r--tests/test-glib-layout-client.c5
-rw-r--r--tests/test-glib-layout-server.c53
-rw-r--r--tests/test-glib-objects.c70
-rw-r--r--tests/test-glib-properties-server.c7
-rw-r--r--tests/test-glib-proxy-client.c7
-rw-r--r--tests/test-glib-proxy-proxy.c52
-rw-r--r--tests/test-glib-proxy-server.c51
-rw-r--r--tests/test-glib-simple-items.c3
-rwxr-xr-xtests/test-glib-simple-items.py35
-rw-r--r--tests/test-glib-submenu-server.c53
-rw-r--r--tests/test-gtk-label-client.c2
-rw-r--r--tests/test-gtk-label-server.c52
-rw-r--r--tests/test-gtk-label.json79
-rw-r--r--tests/test-gtk-objects.c8
-rw-r--r--tests/test-gtk-parser.c129
-rw-r--r--tests/test-gtk-reorder-server.c55
-rw-r--r--tests/test-gtk-shortcut-client.c2
-rwxr-xr-xtests/test-gtk-shortcut-client.py52
-rw-r--r--tests/test-gtk-shortcut-server.c57
-rw-r--r--tests/test-gtk-submenu-client.c2
-rw-r--r--tests/test-gtk-submenu-server.c55
-rw-r--r--tests/test-json-01.json2739
-rw-r--r--tests/test-json-client.c60
-rw-r--r--tests/test-json-server.c61
29 files changed, 1652 insertions, 2383 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index aa79c8f..e6882af 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,6 +2,8 @@
DBUS_RUNNER=dbus-test-runner
CLEANFILES=
+DISTCLEANFILES=
+EXTRA_DIST =
TESTS = \
test-glib-objects-test \
@@ -11,12 +13,28 @@ TESTS = \
test-glib-proxy \
test-glib-simple-items \
test-glib-submenu \
- test-json \
+ test-json
+
+if WANT_LIBDBUSMENUGTK
+TESTS += \
test-gtk-objects-test \
test-gtk-label \
test-gtk-shortcut \
test-gtk-reorder \
- test-gtk-submenu
+ test-gtk-submenu \
+ test-gtk-parser-test
+endif
+
+XFAIL_TESTS = \
+ test-glib-proxy
+
+# The Python test only work on the system copy of
+# dbusmenu, so while they can be usefule they're not
+# good tests of what you're currently building. Handy
+# to check GI support though. FIXME!
+PYTHON_TESTS = \
+ test-gtk-shortcut-python \
+ test-glib-simple-items.py
check_PROGRAMS = \
glib-server-nomenu \
@@ -30,29 +48,37 @@ check_PROGRAMS = \
test-glib-proxy-client \
test-glib-proxy-server \
test-glib-proxy-proxy \
- test-gtk-objects \
test-glib-submenu-client \
test-glib-submenu-server \
+ test-glib-simple-items \
+ test-json-client \
+ test-json-server
+
+if WANT_LIBDBUSMENUGTK
+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 \
- test-json-client \
- test-json-server \
test-gtk-submenu-server \
- test-gtk-submenu-client
+ test-gtk-submenu-client \
+ test-gtk-parser
+endif
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
######################
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
@@ -80,7 +106,7 @@ libdbusmenu_jsonloader_la_LIBADD = \
$(DBUSMENUGLIB_LIBS) \
$(DBUSMENUTESTS_LIBS)
-pkgconfig_DATA = dbusmenu-jsonloader.pc
+pkgconfig_DATA = dbusmenu-jsonloader-0.4.pc
pkgconfigdir = $(libdir)/pkgconfig
######################
@@ -258,6 +284,8 @@ test_glib_objects_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
$(DBUSMENUGLIB_LIBS)
+DISTCLEANFILES += $(OBJECT_XML_REPORT)
+
######################
# Test Glib Properties
######################
@@ -356,6 +384,8 @@ test_glib_simple_items_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
$(DBUSMENUGLIB_LIBS)
+EXTRA_DIST += test-glib-simple-items.py
+
######################
# Test GTK Object
######################
@@ -380,10 +410,42 @@ test_gtk_objects_CFLAGS = \
test_gtk_objects_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
- ../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ ../libdbusmenu-gtk/libdbusmenu-gtk$(VER).la \
+ $(DBUSMENUGLIB_LIBS) \
+ $(DBUSMENUGTK_LIBS)
+
+DISTCLEANFILES += $(GTK_OBJECT_XML_REPORT)
+
+######################
+# 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$(VER).la \
$(DBUSMENUGLIB_LIBS) \
$(DBUSMENUGTK_LIBS)
+DISTCLEANFILES += $(GTK_PARSER_XML_REPORT)
+
#########################
# Test GTK Label
#########################
@@ -405,7 +467,7 @@ test_gtk_label_server_CFLAGS = \
test_gtk_label_server_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
- ../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ ../libdbusmenu-gtk/libdbusmenu-gtk$(VER).la \
libdbusmenu-jsonloader.la \
$(DBUSMENUGTK_LIBS) \
$(DBUSMENUTESTS_LIBS)
@@ -421,7 +483,7 @@ test_gtk_label_client_CFLAGS = \
test_gtk_label_client_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
- ../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ ../libdbusmenu-gtk/libdbusmenu-gtk$(VER).la \
$(DBUSMENUGTK_LIBS) \
$(DBUSMENUTESTS_LIBS)
@@ -446,7 +508,7 @@ test_gtk_shortcut_server_CFLAGS = \
test_gtk_shortcut_server_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
- ../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ ../libdbusmenu-gtk/libdbusmenu-gtk$(VER).la \
$(DBUSMENUGTK_LIBS) \
$(DBUSMENUTESTS_LIBS)
@@ -461,11 +523,24 @@ test_gtk_shortcut_client_CFLAGS = \
test_gtk_shortcut_client_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
- ../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ ../libdbusmenu-gtk/libdbusmenu-gtk$(VER).la \
$(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 $(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
+CLEANFILES += test-gtk-shortcut-client.pyc
+
+#########################
# Test GTK Reorder
#########################
@@ -486,7 +561,7 @@ test_gtk_reorder_server_CFLAGS = \
test_gtk_reorder_server_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
- ../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ ../libdbusmenu-gtk/libdbusmenu-gtk$(VER).la \
$(DBUSMENUGTK_LIBS) \
$(DBUSMENUTESTS_LIBS)
@@ -511,7 +586,7 @@ test_gtk_submenu_server_CFLAGS = \
test_gtk_submenu_server_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
- ../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ ../libdbusmenu-gtk/libdbusmenu-gtk$(VER).la \
$(DBUSMENUGTK_LIBS) \
$(DBUSMENUTESTS_LIBS)
@@ -526,7 +601,7 @@ test_gtk_submenu_client_CFLAGS = \
test_gtk_submenu_client_LDADD = \
../libdbusmenu-glib/libdbusmenu-glib.la \
- ../libdbusmenu-gtk/libdbusmenu-gtk.la \
+ ../libdbusmenu-gtk/libdbusmenu-gtk$(VER).la \
$(DBUSMENUGTK_LIBS) \
$(DBUSMENUTESTS_LIBS)
@@ -559,7 +634,7 @@ jsondir = $(datadir)/${PACKAGE}/json/
json_DATA = \
test-gtk-label.json
-EXTRA_DIST = \
+EXTRA_DIST += \
$(examples_DATA) \
run-xvfb.sh \
$(json_DATA) \
@@ -591,8 +666,11 @@ CLEANFILES += \
distclean-local:
-rm -rf $(builddir)/mago.results
-DISTCLEANFILES = \
- $(TESTS) \
- $(OBJECT_XML_REPORT) \
- $(GTK_OBJECT_XML_REPORT)
+DISTCLEANFILES += \
+ $(filter-out %.py, $(TESTS))
+if USE_GTK3
+VER=3
+else
+VER=
+endif
diff --git a/tests/dbusmenu-jsonloader.pc.in b/tests/dbusmenu-jsonloader-0.4.pc.in
index d042132..62bfeb2 100644
--- a/tests/dbusmenu-jsonloader.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
diff --git a/tests/json-loader.c b/tests/json-loader.c
index aad4295..36157dc 100644
--- a/tests/json-loader.c
+++ b/tests/json-loader.c
@@ -20,115 +20,76 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "json-loader.h"
-#include <dbus/dbus-gtype-specialized.h>
-static GValue *
-node2value (JsonNode * node)
+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_int32(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) {
- JsonArray * array = json_node_get_array(node);
- JsonNode * first = json_array_get_element(array, 0);
-
- if (JSON_NODE_TYPE(first) == JSON_NODE_VALUE) {
- GValue subvalue = {0};
- json_node_get_value(first, &subvalue);
-
- if (G_VALUE_TYPE(&subvalue) == G_TYPE_STRING) {
- GArray * garray = g_array_sized_new(TRUE, TRUE, sizeof(gchar *), json_array_get_length(array));
- g_value_init(value, G_TYPE_STRV);
- g_value_take_boxed(value, garray->data);
-
- int i;
- for (i = 0; i < json_array_get_length(array); i++) {
- const gchar * str = json_node_get_string(json_array_get_element(array, i));
- gchar * dupstr = g_strdup(str);
- g_array_append_val(garray, dupstr);
- }
-
- g_array_free(garray, FALSE);
- } else {
- GValueArray * varray = g_value_array_new(json_array_get_length(array));
- g_value_init(value, G_TYPE_VALUE_ARRAY);
- g_value_take_boxed(value, varray);
-
- g_value_array_append(varray, &subvalue);
- g_value_unset(&subvalue);
-
- int i;
- for (i = 1; i < json_array_get_length(array); i++) {
- json_node_get_value(first, &subvalue);
- g_value_array_append(varray, &subvalue);
- g_value_unset(&subvalue);
- }
- }
-
- } else {
- GValue * subvalue = node2value(first);
- GType type = dbus_g_type_get_collection("GPtrArray", G_VALUE_TYPE(subvalue));
- gpointer * wrapper = dbus_g_type_specialized_construct(type);
+ GVariantBuilder builder;
+ g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
- 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);
- }
+ JsonArray * array = json_node_get_array(node);
+ json_array_foreach_element(array, array_foreach, &builder);
- dbus_g_type_specialized_collection_end_append(&ctx);
- }
+ return g_variant_builder_end(&builder);
}
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);
- }
- }
+ 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
@@ -144,12 +105,10 @@ 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);
}
}
diff --git a/tests/test-glib-events-client.c b/tests/test-glib-events-client.c
index 97d5caf..2cc5439 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(g_variant_get_child_value(data, 0)));
passed = FALSE;
g_main_loop_quit(mainloop);
return;
@@ -96,11 +96,8 @@ 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_int32(DATA_VALUE);
+ dbusmenu_menuitem_handle_event(menuroot, "clicked", data, TIMESTAMP_VALUE);
return;
}
@@ -128,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) {
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 <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib-bindings.h>
+#include <gio/gio.h>
#include <libdbusmenu-glib/server.h>
#include <libdbusmenu-glib/menuitem.h>
@@ -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);
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)) {
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 <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib-bindings.h>
+#include <gio/gio.h>
#include <libdbusmenu-glib/server.h>
#include <libdbusmenu-glib/menuitem.h>
@@ -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-glib-objects.c b/tests/test-glib-objects.c
index 1d4f673..9c99280 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,18 +125,18 @@ 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(dbusmenu_menuitem_property_get_int(item, "boolean"));
+ 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") == 0); */
g_object_unref(item);
@@ -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);
@@ -274,6 +274,37 @@ 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);
+
+ /* 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;
+}
+
/* Build the test suite */
static void
test_glib_objects_suite (void)
@@ -286,6 +317,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;
}
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 <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
+#include <gio/gio.h>
#include <libdbusmenu-glib/menuitem.h>
#include <libdbusmenu-glib/server.h>
@@ -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-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-glib-proxy-proxy.c b/tests/test-glib-proxy-proxy.c
index 722cf1f..8a17ead 100644
--- a/tests/test-glib-proxy-proxy.c
+++ b/tests/test-glib-proxy-proxy.c
@@ -1,9 +1,5 @@
#include <glib.h>
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib-bindings.h>
+#include <gio/gio.h>
#include <libdbusmenu-glib/menuitem.h>
#include <libdbusmenu-glib/menuitem-proxy.h>
@@ -32,6 +28,24 @@ root_changed (DbusmenuClient * client, DbusmenuMenuitem * newroot, gpointer user
return;
}
+static void
+on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data)
+{
+ 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 +61,16 @@ 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,
+ whoami,
+ 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..a5dfd4e 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 <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib-bindings.h>
+#include <gio/gio.h>
#include <libdbusmenu-glib/menuitem.h>
#include <libdbusmenu-glib/server.h>
@@ -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,
+ "test.proxy.server",
+ 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-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 <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-bindings.h>
-
#include <libdbusmenu-glib/server.h>
#include <libdbusmenu-glib/menuitem.h>
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()
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 <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib-bindings.h>
+#include <gio/gio.h>
#include <libdbusmenu-glib/server.h>
#include <libdbusmenu-glib/menuitem.h>
@@ -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-client.c b/tests/test-gtk-label-client.c
index 14eb5bd..415c6b0 100644
--- a/tests/test-gtk-label-client.c
+++ b/tests/test-gtk-label-client.c
@@ -160,7 +160,7 @@ main (int argc, char ** argv)
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_menu_shell_append(GTK_MENU_SHELL(menubar), menuitem);
gtk_widget_show(menubar);
gtk_container_add(GTK_CONTAINER(window), menubar);
gtk_window_set_title(GTK_WINDOW(window), "libdbusmenu-gtk test");
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 <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib-bindings.h>
+#include <gio/gio.h>
#include <libdbusmenu-glib/menuitem.h>
#include <libdbusmenu-glib/server.h>
@@ -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-label.json b/tests/test-gtk-label.json
index 755bd44..86d18e8 100644
--- a/tests/test-gtk-label.json
+++ b/tests/test-gtk-label.json
@@ -45,7 +45,7 @@
"label": "value27"},
{"id": 28, "type": "standard",
"label": "value28"},
- {"id": 29, "type": "standard", "visible": "false",
+ {"id": 29, "type": "standard", "visible": false,
"label": "value29"}
]
},
@@ -54,45 +54,45 @@
"submenu": [
{"id": 40,
"type": "standard",
- "enabled": "true",
+ "enabled": true,
"label": "value40"},
{"id": 41,
"type": "standard",
- "enabled": "false",
+ "enabled": false,
"label": "value41"},
{"id": 42,
"type": "standard",
- "enabled": "true",
+ "enabled": true,
"label": "value42"},
{"id": 43,
"type": "standard",
- "enabled": "false",
+ "enabled": false,
"label": "value43"},
{"id": 44,
"type": "standard",
- "enabled": "true",
+ "enabled": true,
"label": "value44"},
{"id": 45,
"type": "standard",
- "enabled": "false",
+ "enabled": false,
"label": "value45"},
{"id": 46,
"type": "standard",
- "enabled": "true",
+ "enabled": true,
"label": "value46"},
{"id": 47,
"type": "standard",
- "enabled": "false",
+ "enabled": false,
"label": "value47"},
{"id": 48,
"type": "standard",
- "enabled": "true",
+ "enabled": true,
"label": "value48"},
{"id": 49,
"type": "standard",
- "visible": "false",
- "enabled": "false",
- "label": "value49"}
+ "visible": false,
+ "enabled": false,
+ "label": "value49 - hidden"}
]
},
{"id": 3, "type": "standard",
@@ -367,5 +367,58 @@ QmCC",
"toggle-state": -1
}
]
+ },
+ {"id": 1, "type": "standard",
+ "label": "value1",
+ "submenu": [
+ {"id": 60,
+ "label": "Disposition Normal",
+ "disposition": "normal"
+ },
+ {"id": 61,
+ "label": "Disposition Info",
+ "disposition": "informational"
+ },
+ {"id": 62,
+ "label": "Disposition Warning",
+ "disposition": "warning"
+ },
+ {"id": 63,
+ "label": "Disposition Alert",
+ "disposition": "alert"
+ }
+ ]
+ },
+ {"id": 1, "type": "standard",
+ "label": "value1",
+ "submenu": [
+ {"id": 70,
+ "label": "_Mnemonic"
+ },
+ {"id": 71,
+ "label": "M_nemonic"
+ },
+ {"id": 72,
+ "label": "Mn_emonic"
+ },
+ {"id": 73,
+ "label": "Mne_monic"
+ },
+ {"id": 74,
+ "label": "Mnem_onic"
+ },
+ {"id": 75,
+ "label": "Mnemo_nic"
+ },
+ {"id": 76,
+ "label": "Mnemon_ic"
+ },
+ {"id": 77,
+ "label": "Mnemoni_c"
+ },
+ {"id": 78,
+ "label": "__Underline__"
+ }
+ ]
}
]
diff --git a/tests/test-gtk-objects.c b/tests/test-gtk-objects.c
index 726f404..4bd26d3 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! */
@@ -97,7 +97,11 @@ test_object_prop_shortcut (void)
g_assert(G_IS_OBJECT(item));
g_assert(DBUSMENU_IS_MENUITEM(item));
+#if GTK_CHECK_VERSION(3,0,0)
+ guint key = GDK_KEY_c;
+#else
guint key = GDK_c;
+#endif
GdkModifierType modifier = GDK_CONTROL_MASK;
/* Set a shortcut */
@@ -105,7 +109,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 */
diff --git a/tests/test-gtk-parser.c b/tests/test-gtk-parser.c
new file mode 100644
index 0000000..87b0a7f
--- /dev/null
+++ b/tests/test-gtk-parser.c
@@ -0,0 +1,129 @@
+/*
+Testing for the various objects just by themselves.
+
+Copyright 2011 Canonical Ltd.
+
+Authors:
+ Ted Gould <ted@canonical.com>
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 3, as published
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranties of
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <libdbusmenu-glib/menuitem-private.h>
+#include <libdbusmenu-gtk/parser.h>
+
+/* 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;
+}
+
+const gchar * test_parser_children_builder =
+"<?xml version=\"1.0\"?>"
+"<interface>"
+"<requires lib=\"gtk+\" version=\"2.16\"/>"
+/* Start menu bar */
+"<object class=\"GtkMenuBar\" id=\"menubar\"><property name=\"visible\">True</property>"
+/* Child 1 */
+"<child><object class=\"GtkMenuItem\" id=\"child_one\"><property name=\"visible\">True</property><property name=\"label\">Child One</property></object></child>"
+/* Child 2 */
+"<child><object class=\"GtkMenuItem\" id=\"child_two\"><property name=\"visible\">True</property><property name=\"label\">Child Two</property></object></child>"
+/* Child 3 */
+"<child><object class=\"GtkMenuItem\" id=\"child_three\"><property name=\"visible\">True</property><property name=\"label\">Child Three</property></object></child>"
+/* Child 4 */
+"<child><object class=\"GtkMenuItem\" id=\"child_four\"><property name=\"visible\">True</property><property name=\"label\">Child Four</property></object></child>"
+/* Stop menubar */
+"</object>"
+"</interface>";
+
+/* Checks the log level to let warnings not stop the program */
+static gboolean
+test_parser_children_log_handler (const gchar * domain, GLogLevelFlags level, const gchar * message, gpointer user_data)
+{
+ if (level & (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG)) {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/* Ensure the parser can find children */
+static void
+test_parser_children (void) {
+ /* Hide GTK errors */
+ g_test_log_set_fatal_handler(test_parser_children_log_handler, NULL);
+
+ 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);
+
+/*
+ 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);
+
+ g_assert(g_list_length(children) == 4);
+
+ g_object_unref(mi);
+ g_object_unref(menu);
+
+ 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;
+}
+
+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 ();
+}
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 <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib-bindings.h>
+#include <gio/gio.h>
#include <libdbusmenu-glib/menuitem.h>
#include <libdbusmenu-glib/server.h>
@@ -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-client.c b/tests/test-gtk-shortcut-client.c
index 003885c..259e177 100644
--- a/tests/test-gtk-shortcut-client.c
+++ b/tests/test-gtk-shortcut-client.c
@@ -53,7 +53,7 @@ main (int argc, char ** argv)
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(dmenu));
gtk_widget_show(menuitem);
- gtk_menu_bar_append(menubar, menuitem);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menubar), menuitem);
gtk_widget_show(menubar);
gtk_container_add(GTK_CONTAINER(window), menubar);
gtk_window_set_title(GTK_WINDOW(window), "libdbusmenu-gtk test");
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 <martin.pitt@ubuntu.com>
+
+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)
diff --git a/tests/test-gtk-shortcut-server.c b/tests/test-gtk-shortcut-server.c
index 3b703a1..5df4881 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 <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
+#include <gio/gio.h>
#include <gdk/gdkkeysyms.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib-bindings.h>
-
#include <libdbusmenu-glib/menuitem.h>
#include <libdbusmenu-glib/server.h>
#include <libdbusmenu-gtk/menuitem.h>
@@ -50,7 +46,11 @@ build_menu (void)
item = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set(item, DBUSMENU_MENUITEM_PROP_LABEL, "Control-L");
+#if GTK_CHECK_VERSION(3,0,0)
+ dbusmenu_menuitem_property_set_shortcut(item, GDK_KEY_l, GDK_CONTROL_MASK);
+#else
dbusmenu_menuitem_property_set_shortcut(item, GDK_l, GDK_CONTROL_MASK);
+#endif
dbusmenu_menuitem_child_append(root, item);
g_object_unref(item);
@@ -61,33 +61,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);
diff --git a/tests/test-gtk-submenu-client.c b/tests/test-gtk-submenu-client.c
index ec46122..81637f1 100644
--- a/tests/test-gtk-submenu-client.c
+++ b/tests/test-gtk-submenu-client.c
@@ -127,7 +127,7 @@ main (int argc, char ** argv)
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_menu_shell_append(GTK_MENU_SHELL(menubar), menuitem);
gtk_widget_show(menubar);
gtk_container_add(GTK_CONTAINER(window), menubar);
gtk_window_set_title(GTK_WINDOW(window), "libdbusmenu-gtk test");
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 <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib-bindings.h>
+#include <gio/gio.h>
#include <libdbusmenu-glib/menuitem.h>
#include <libdbusmenu-glib/server.h>
@@ -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-01.json b/tests/test-json-01.json
index 08e9112..e3b1e17 100644
--- a/tests/test-json-01.json
+++ b/tests/test-json-01.json
@@ -1,279 +1,201 @@
{
"id": 0,
- "children-display": "submenu",
+ "children-display": 'submenu',
"submenu": [
{
"id": 5,
- "children-display": "submenu",
- "enabled": true,
- "label": "File",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'File',
"submenu": [
{
"id": 6,
- "enabled": true,
- "label": "Quit",
- "shortcut": [["Control", "q"]],
- "visible": true
+ "label": 'Quit',
+ "shortcut": [['Control', 'q']]
},
{
"id": 7,
- "enabled": true,
- "label": "Close all",
- "shortcut": [["Control", "Shift", "w"]],
- "visible": true
+ "label": 'Close all',
+ "shortcut": [['Control', 'Shift', 'w']]
},
{
"id": 8,
- "enabled": true,
- "label": "Close",
- "shortcut": [["Control", "w"]],
- "visible": true
+ "label": 'Close',
+ "shortcut": [['Control', 'w']]
},
{
"id": 9,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 10,
- "enabled": true,
- "label": "Send by Email...",
- "visible": true
+ "label": 'Send by Email...'
},
{
"id": 11,
- "enabled": true,
- "label": "Print...",
- "shortcut": [["Control", "p"]],
- "visible": true
+ "label": 'Print...',
+ "shortcut": [['Control', 'p']]
},
{
"id": 12,
- "enabled": true,
- "label": "Page Setup",
- "visible": true
+ "label": 'Page Setup'
},
{
"id": 13,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 14,
- "enabled": true,
- "label": "Revert",
- "visible": true
+ "label": 'Revert'
},
{
"id": 15,
- "enabled": true,
- "label": "Save as Template...",
- "visible": true
+ "label": 'Save as Template...'
},
{
"id": 16,
- "enabled": true,
- "label": "Save a Copy...",
- "visible": true
+ "label": 'Save a Copy...'
},
{
"id": 17,
- "enabled": true,
- "label": "Save As...",
- "shortcut": [["Control", "Shift", "s"]],
- "visible": true
+ "label": 'Save As...',
+ "shortcut": [['Control', 'Shift', 's']]
},
{
"id": 18,
- "enabled": true,
- "label": "Save",
- "shortcut": [["Control", "s"]],
- "visible": true
+ "label": 'Save',
+ "shortcut": [['Control', 's']]
},
{
"id": 19,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 20,
- "children-display": "submenu",
- "enabled": true,
- "label": "Open Recent",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Open Recent',
"submenu": [
{
"id": 21,
- "enabled": true,
- "label": "Document History",
- "visible": true
+ "label": 'Document History'
},
{
"id": 22,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 23,
- "enabled": true,
- "label": "giggity.jpg",
- "shortcut": [["Control", "2"]],
- "visible": true
+ "label": 'giggity.jpg',
+ "shortcut": [['Control', '2']]
},
{
"id": 24,
- "enabled": true,
- "label": "Icon Height.svg",
- "shortcut": [["Control", "1"]],
- "visible": true
+ "label": 'Icon Height.svg',
+ "shortcut": [['Control', '1']]
}
]
},
{
"id": 25,
- "enabled": true,
- "label": "Open Location...",
- "visible": true
+ "label": 'Open Location...'
},
{
"id": 26,
- "enabled": true,
- "label": "Open as Layers...",
- "shortcut": [["Control", "Alt", "o"]],
- "visible": true
+ "label": 'Open as Layers...',
+ "shortcut": [['Control', 'Alt', 'o']]
},
{
"id": 27,
- "enabled": true,
- "label": "Open...",
- "shortcut": [["Control", "o"]],
- "visible": true
+ "label": 'Open...',
+ "shortcut": [['Control', 'o']]
},
{
"id": 28,
- "children-display": "submenu",
- "enabled": true,
- "label": "Create",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Create',
"submenu": [
{
"id": 29,
- "children-display": "submenu",
- "enabled": true,
- "label": "Web Page Themes",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Web Page Themes',
"submenu": [
{
"id": 30,
- "children-display": "submenu",
- "enabled": true,
- "label": "Classic.Gimp.Org",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Classic.Gimp.Org',
"submenu": [
{
"id": 31,
- "enabled": true,
- "label": "Tube Sub-Sub-Button Label...",
- "visible": true
+ "label": 'Tube Sub-Sub-Button Label...'
},
{
"id": 32,
- "enabled": true,
- "label": "Tube Sub-Button Label...",
- "visible": true
+ "label": 'Tube Sub-Button Label...'
},
{
"id": 33,
- "enabled": true,
- "label": "Tube Button Label...",
- "visible": true
+ "label": 'Tube Button Label...'
},
{
"id": 34,
- "enabled": true,
- "label": "Small Header...",
- "visible": true
+ "label": 'Small Header...'
},
{
"id": 35,
- "enabled": true,
- "label": "General Tube Labels...",
- "visible": true
+ "label": 'General Tube Labels...'
},
{
"id": 36,
- "enabled": true,
- "label": "Big Header...",
- "visible": true
+ "label": 'Big Header...'
}
]
},
{
"id": 37,
- "children-display": "submenu",
- "enabled": true,
- "label": "Beveled Pattern",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Beveled Pattern',
"submenu": [
{
"id": 38,
- "enabled": true,
- "label": "Hrule...",
- "visible": true
+ "label": 'Hrule...'
},
{
"id": 39,
- "enabled": true,
- "label": "Heading...",
- "visible": true
+ "label": 'Heading...'
},
{
"id": 40,
- "enabled": true,
- "label": "Button...",
- "visible": true
+ "label": 'Button...'
},
{
"id": 41,
- "enabled": true,
- "label": "Bullet...",
- "visible": true
+ "label": 'Bullet...'
},
{
"id": 42,
- "enabled": true,
- "label": "Arrow...",
- "visible": true
+ "label": 'Arrow...'
}
]
},
{
"id": 43,
- "children-display": "submenu",
- "enabled": true,
- "label": "Alien Glow",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Alien Glow',
"submenu": [
{
"id": 44,
- "enabled": true,
- "label": "Hrule...",
- "visible": true
+ "label": 'Hrule...'
},
{
"id": 45,
- "enabled": true,
- "label": "Button...",
- "visible": true
+ "label": 'Button...'
},
{
"id": 46,
- "enabled": true,
- "label": "Bullet...",
- "visible": true
+ "label": 'Bullet...'
},
{
"id": 47,
- "enabled": true,
- "label": "Arrow...",
- "visible": true
+ "label": 'Arrow...'
}
]
}
@@ -281,2286 +203,1696 @@
},
{
"id": 48,
- "children-display": "submenu",
- "enabled": true,
- "label": "Patterns",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Patterns',
"submenu": [
{
"id": 49,
- "enabled": true,
- "label": "Truchet...",
- "visible": true
+ "label": 'Truchet...'
},
{
"id": 50,
- "enabled": true,
- "label": "Swirly...",
- "visible": true
+ "label": 'Swirly...'
},
{
"id": 51,
- "enabled": true,
- "label": "Swirl-Tile...",
- "visible": true
+ "label": 'Swirl-Tile...'
},
{
"id": 52,
- "enabled": true,
- "label": "Render Map...",
- "visible": true
+ "label": 'Render Map...'
},
{
"id": 53,
- "enabled": true,
- "label": "Land...",
- "visible": true
+ "label": 'Land...'
},
{
"id": 54,
- "enabled": true,
- "label": "Flatland...",
- "visible": true
+ "label": 'Flatland...'
},
{
"id": 55,
- "enabled": true,
- "label": "Camouflage...",
- "visible": true
+ "label": 'Camouflage...'
},
{
"id": 56,
- "enabled": true,
- "label": "3D Truchet...",
- "visible": true
+ "label": '3D Truchet...'
}
]
},
{
"id": 57,
- "children-display": "submenu",
- "enabled": true,
- "label": "Logos",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Logos',
"submenu": [
{
"id": 58,
- "enabled": true,
- "label": "Web Title Header...",
- "visible": true
+ "label": 'Web Title Header...'
},
{
"id": 59,
- "enabled": true,
- "label": "Textured...",
- "visible": true
+ "label": 'Textured...'
},
{
"id": 60,
- "enabled": true,
- "label": "Text Circle...",
- "visible": true
+ "label": 'Text Circle...'
},
{
"id": 61,
- "enabled": true,
- "label": "Starscape...",
- "visible": true
+ "label": 'Starscape...'
},
{
"id": 62,
- "enabled": true,
- "label": "Speed Text...",
- "visible": true
+ "label": 'Speed Text...'
},
{
"id": 63,
- "enabled": true,
- "label": "SOTA Chrome...",
- "visible": true
+ "label": 'SOTA Chrome...'
},
{
"id": 64,
- "enabled": true,
- "label": "Particle Trace...",
- "visible": true
+ "label": 'Particle Trace...'
},
{
"id": 65,
- "enabled": true,
- "label": "Newsprint Text...",
- "visible": true
+ "label": 'Newsprint Text...'
},
{
"id": 66,
- "enabled": true,
- "label": "Neon...",
- "visible": true
+ "label": 'Neon...'
},
{
"id": 67,
- "enabled": true,
- "label": "Imigre-26...",
- "visible": true
+ "label": 'Imigre-26...'
},
{
"id": 68,
- "enabled": true,
- "label": "Gradient Bevel...",
- "visible": true
+ "label": 'Gradient Bevel...'
},
{
"id": 69,
- "enabled": true,
- "label": "Glowing Hot...",
- "visible": true
+ "label": 'Glowing Hot...'
},
{
"id": 70,
- "enabled": true,
- "label": "Glossy...",
- "visible": true
+ "label": 'Glossy...'
},
{
"id": 71,
- "enabled": true,
- "label": "Frosty...",
- "visible": true
+ "label": 'Frosty...'
},
{
"id": 72,
- "enabled": true,
- "label": "Crystal...",
- "visible": true
+ "label": 'Crystal...'
},
{
"id": 73,
- "enabled": true,
- "label": "Cool Metal...",
- "visible": true
+ "label": 'Cool Metal...'
},
{
"id": 74,
- "enabled": true,
- "label": "Comic Book...",
- "visible": true
+ "label": 'Comic Book...'
},
{
"id": 75,
- "enabled": true,
- "label": "Chrome...",
- "visible": true
+ "label": 'Chrome...'
},
{
"id": 76,
- "enabled": true,
- "label": "Chip Away...",
- "visible": true
+ "label": 'Chip Away...'
},
{
"id": 77,
- "enabled": true,
- "label": "Chalk...",
- "visible": true
+ "label": 'Chalk...'
},
{
"id": 78,
- "enabled": true,
- "label": "Carved...",
- "visible": true
+ "label": 'Carved...'
},
{
"id": 79,
- "enabled": true,
- "label": "Bovination...",
- "visible": true
+ "label": 'Bovination...'
},
{
"id": 80,
- "enabled": true,
- "label": "Blended...",
- "visible": true
+ "label": 'Blended...'
},
{
"id": 81,
- "enabled": true,
- "label": "Basic I...",
- "visible": true
+ "label": 'Basic I...'
},
{
"id": 82,
- "enabled": true,
- "label": "Basic II...",
- "visible": true
+ "label": 'Basic II...'
},
{
"id": 83,
- "enabled": true,
- "label": "Alien Neon...",
- "visible": true
+ "label": 'Alien Neon...'
},
{
"id": 84,
- "enabled": true,
- "label": "Alien Glow...",
- "visible": true
+ "label": 'Alien Glow...'
},
{
"id": 85,
- "enabled": true,
- "label": "3D Outline...",
- "visible": true
+ "label": '3D Outline...'
}
]
},
{
"id": 86,
- "children-display": "submenu",
- "enabled": true,
- "label": "Buttons",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Buttons',
"submenu": [
{
"id": 87,
- "enabled": true,
- "label": "Simple Beveled Button...",
- "visible": true
+ "label": 'Simple Beveled Button...'
},
{
"id": 88,
- "enabled": true,
- "label": "Round Button...",
- "visible": true
+ "label": 'Round Button...'
}
]
},
{
"id": 89,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 90,
- "children-display": "submenu",
- "enabled": true,
- "label": "xscanimage",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'xscanimage',
"submenu": [
{
"id": 91,
"enabled": false,
- "label": "Device dialog...",
- "visible": true
+ "label": 'Device dialog...'
}
]
},
{
"id": 92,
- "enabled": true,
- "label": "Screenshot...",
- "visible": true
+ "label": 'Screenshot...'
},
{
"id": 93,
- "enabled": true,
- "label": "From Clipboard",
- "shortcut": [["Control", "Shift", "v"]],
- "visible": true
+ "label": 'From Clipboard',
+ "shortcut": [['Control', 'Shift', 'v']]
}
]
},
{
"id": 94,
- "enabled": true,
- "label": "New...",
- "shortcut": [["Control", "n"]],
- "visible": true
+ "label": 'New...',
+ "shortcut": [['Control', 'n']]
}
]
},
{
"id": 95,
- "children-display": "submenu",
- "enabled": true,
- "label": "Edit",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Edit',
"submenu": [
{
"id": 96,
- "enabled": true,
- "label": "Units",
- "visible": true
+ "label": 'Units'
},
{
"id": 97,
- "enabled": true,
- "label": "Modules",
- "visible": true
+ "label": 'Modules'
},
{
"id": 98,
- "enabled": true,
- "label": "Keyboard Shortcuts",
- "visible": true
+ "label": 'Keyboard Shortcuts'
},
{
"id": 99,
- "enabled": true,
- "label": "Preferences",
- "visible": true
+ "label": 'Preferences'
},
{
"id": 100,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 101,
"enabled": false,
- "label": "Stroke Path...",
- "visible": true
+ "label": 'Stroke Path...'
},
{
"id": 102,
"enabled": false,
- "label": "Stroke Selection...",
- "visible": true
+ "label": 'Stroke Selection...'
},
{
"id": 103,
- "enabled": true,
- "label": "Fill with Pattern",
- "shortcut": [["Control", "semicolon"]],
- "visible": true
+ "label": 'Fill with Pattern',
+ "shortcut": [['Control', 'semicolon']]
},
{
"id": 104,
- "enabled": true,
- "label": "Fill with BG Color",
- "shortcut": [["Control", "period"]],
- "visible": true
+ "label": 'Fill with BG Color',
+ "shortcut": [['Control', 'period']]
},
{
"id": 105,
- "enabled": true,
- "label": "Fill with FG Color",
- "shortcut": [["Control", "comma"]],
- "visible": true
+ "label": 'Fill with FG Color',
+ "shortcut": [['Control', 'comma']]
},
{
"id": 106,
- "enabled": true,
- "label": "Clear",
- "shortcut": [["Delete"]],
- "visible": true
+ "label": 'Clear',
+ "shortcut": [['Delete']]
},
{
"id": 107,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 108,
- "children-display": "submenu",
- "enabled": true,
- "label": "Buffer",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Buffer',
"submenu": [
{
"id": 109,
- "enabled": true,
- "label": "Paste Named...",
- "visible": true
+ "label": 'Paste Named...'
},
{
"id": 110,
- "enabled": true,
- "label": "Copy Visible Named...",
- "visible": true
+ "label": 'Copy Visible Named...'
},
{
"id": 111,
- "enabled": true,
- "label": "Copy Named...",
- "visible": true
+ "label": 'Copy Named...'
},
{
"id": 112,
- "enabled": true,
- "label": "Cut Named...",
- "visible": true
+ "label": 'Cut Named...'
}
]
},
{
"id": 113,
- "children-display": "submenu",
- "enabled": true,
- "label": "Paste as",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Paste as',
"submenu": [
{
"id": 114,
- "enabled": true,
- "label": "New Pattern...",
- "visible": true
+ "label": 'New Pattern...'
},
{
"id": 115,
- "enabled": true,
- "label": "New Brush...",
- "visible": true
+ "label": 'New Brush...'
},
{
"id": 116,
- "enabled": true,
- "label": "New Layer",
- "visible": true
+ "label": 'New Layer'
},
{
"id": 117,
- "enabled": true,
- "label": "New Image",
- "shortcut": [["Control", "Shift", "v"]],
- "visible": true
+ "label": 'New Image',
+ "shortcut": [['Control', 'Shift', 'v']]
}
]
},
{
"id": 118,
- "enabled": true,
- "label": "Paste Into",
- "visible": true
+ "label": 'Paste Into'
},
{
"id": 119,
- "enabled": true,
- "label": "Paste",
- "shortcut": [["Control", "v"]],
- "visible": true
+ "label": 'Paste',
+ "shortcut": [['Control', 'v']]
},
{
"id": 120,
- "enabled": true,
- "label": "Copy Visible",
- "shortcut": [["Control", "Shift", "c"]],
- "visible": true
+ "label": 'Copy Visible',
+ "shortcut": [['Control', 'Shift', 'c']]
},
{
"id": 121,
- "enabled": true,
- "label": "Copy",
- "shortcut": [["Control", "c"]],
- "visible": true
+ "label": 'Copy',
+ "shortcut": [['Control', 'c']]
},
{
"id": 122,
- "enabled": true,
- "label": "Cut",
- "shortcut": [["Control", "x"]],
- "visible": true
+ "label": 'Cut',
+ "shortcut": [['Control', 'x']]
},
{
"id": 123,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 124,
- "enabled": true,
- "label": "Undo History",
- "visible": true
+ "label": 'Undo History'
},
{
"id": 3,
"enabled": false,
- "label": "_Fade...",
- "visible": true
+ "label": '_Fade...'
},
{
"id": 2,
"enabled": false,
- "label": "_Redo",
- "shortcut": [["Control", "y"]],
- "visible": true
+ "label": '_Redo',
+ "shortcut": [['Control', 'y']]
},
{
"id": 1,
"enabled": false,
- "label": "_Undo",
- "shortcut": [["Control", "z"]],
- "visible": true
+ "label": '_Undo',
+ "shortcut": [['Control', 'z']]
}
]
},
{
"id": 125,
- "children-display": "submenu",
- "enabled": true,
- "label": "Select",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Select',
"submenu": [
{
"id": 126,
"enabled": false,
- "label": "To Path",
- "visible": true
+ "label": 'To Path'
},
{
"id": 127,
- "enabled": true,
- "label": "Save to Channel",
- "visible": true
+ "label": 'Save to Channel'
},
{
"id": 128,
- "enabled": true,
- "label": "Toggle Quick Mask",
- "shortcut": [["Shift", "q"]],
+ "label": 'Toggle Quick Mask',
+ "shortcut": [['Shift', 'q']],
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 129,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 130,
- "enabled": true,
- "label": "Distort...",
- "visible": true
+ "label": 'Distort...'
},
{
"id": 131,
"enabled": false,
- "label": "Border...",
- "visible": true
+ "label": 'Border...'
},
{
"id": 132,
"enabled": false,
- "label": "Grow...",
- "visible": true
+ "label": 'Grow...'
},
{
"id": 133,
"enabled": false,
- "label": "Shrink...",
- "visible": true
+ "label": 'Shrink...'
},
{
"id": 134,
"enabled": false,
- "label": "Sharpen",
- "visible": true
+ "label": 'Sharpen'
},
{
"id": 135,
"enabled": false,
- "label": "Feather...",
- "visible": true
+ "label": 'Feather...'
},
{
"id": 136,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 137,
- "enabled": true,
- "label": "Selection Editor",
- "visible": true
+ "label": 'Selection Editor'
},
{
"id": 138,
"enabled": false,
- "label": "From Path",
- "shortcut": [["Shift", "v"]],
- "visible": true
+ "label": 'From Path',
+ "shortcut": [['Shift', 'v']]
},
{
"id": 139,
- "enabled": true,
- "label": "By Color",
- "shortcut": [["Shift", "o"]],
- "visible": true
+ "label": 'By Color',
+ "shortcut": [['Shift', 'o']]
},
{
"id": 140,
"enabled": false,
- "label": "Float",
- "shortcut": [["Control", "Shift", "l"]],
- "visible": true
+ "label": 'Float',
+ "shortcut": [['Control', 'Shift', 'l']]
},
{
"id": 141,
- "enabled": true,
- "label": "Invert",
- "shortcut": [["Control", "i"]],
- "visible": true
+ "label": 'Invert',
+ "shortcut": [['Control', 'i']]
},
{
"id": 142,
"enabled": false,
- "label": "None",
- "shortcut": [["Control", "Shift", "a"]],
- "visible": true
+ "label": 'None',
+ "shortcut": [['Control', 'Shift', 'a']]
},
{
"id": 143,
- "enabled": true,
- "label": "All",
- "shortcut": [["Control", "a"]],
- "visible": true
+ "label": 'All',
+ "shortcut": [['Control', 'a']]
}
]
},
{
"id": 144,
- "children-display": "submenu",
- "enabled": true,
- "label": "View",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'View',
"submenu": [
{
"id": 145,
- "enabled": true,
- "label": "Show Statusbar",
+ "label": 'Show Statusbar',
"toggle-state": 1,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 146,
- "enabled": true,
- "label": "Show Scrollbars",
+ "label": 'Show Scrollbars',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 147,
- "enabled": true,
- "label": "Show Rulers",
- "shortcut": [["Control", "Shift", "r"]],
+ "label": 'Show Rulers',
+ "shortcut": [['Control', 'Shift', 'r']],
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 148,
- "enabled": true,
- "label": "Show Menubar",
+ "label": 'Show Menubar',
"toggle-state": 1,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 149,
- "children-display": "submenu",
- "enabled": true,
- "label": "Padding Color",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Padding Color',
"submenu": [
{
"id": 150,
- "enabled": true,
- "label": "As in Preferences",
- "visible": true
+ "label": 'As in Preferences'
},
{
"id": 151,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 152,
- "enabled": true,
- "label": "Select Custom Color...",
- "visible": true
+ "label": 'Select Custom Color...'
},
{
"id": 153,
- "enabled": true,
- "label": "Dark Check Color",
- "visible": true
+ "label": 'Dark Check Color'
},
{
"id": 154,
- "enabled": true,
- "label": "Light Check Color",
- "visible": true
+ "label": 'Light Check Color'
},
{
"id": 155,
- "enabled": true,
- "label": "From Theme",
- "visible": true
+ "label": 'From Theme'
}
]
},
{
"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",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 158,
- "enabled": true,
- "label": "Snap to Canvas Edges",
+ "label": 'Snap to Canvas Edges',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 159,
- "enabled": true,
- "label": "Snap to Grid",
+ "label": 'Snap to Grid',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 160,
- "enabled": true,
- "label": "Snap to Guides",
+ "label": 'Snap to Guides',
"toggle-state": 1,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 161,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 162,
- "enabled": true,
- "label": "Show Sample Points",
+ "label": 'Show Sample Points',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 163,
- "enabled": true,
- "label": "Show Grid",
+ "label": 'Show Grid',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 164,
- "enabled": true,
- "label": "Show Guides",
- "shortcut": [["Control", "Shift", "t"]],
+ "label": 'Show Guides',
+ "shortcut": [['Control', 'Shift', 't']],
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 165,
- "enabled": true,
- "label": "Show Layer Boundary",
+ "label": 'Show Layer Boundary',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 166,
- "enabled": true,
- "label": "Show Selection",
- "shortcut": [["Control", "t"]],
+ "label": 'Show Selection',
+ "shortcut": [['Control', 't']],
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 167,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 168,
- "enabled": true,
- "label": "Display Filters...",
- "visible": true
+ "label": 'Display Filters...'
},
{
"id": 169,
- "enabled": true,
- "label": "Navigation Window",
- "visible": true
+ "label": 'Navigation Window'
},
{
"id": 170,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 171,
- "children-display": "submenu",
- "enabled": true,
- "label": "Fullscreen",
- "shortcut": [["F11"]],
+ "children-display": 'submenu',
+ "label": 'Fullscreen',
+ "shortcut": [['F11']],
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true,
+ "toggle-type": 'checkmark',
"submenu": [
{
"id": 172,
- "enabled": true,
- "label": "Open Display...",
- "visible": true
+ "label": 'Open Display...'
}
]
},
{
"id": 173,
- "enabled": true,
- "label": "Shrink Wrap",
- "shortcut": [["Control", "e"]],
- "visible": true
+ "label": 'Shrink Wrap',
+ "shortcut": [['Control', 'e']]
},
{
"id": 174,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 175,
- "children-display": "submenu",
- "enabled": true,
- "label": "_Zoom (67%)",
- "visible": true,
+ "children-display": 'submenu',
+ "label": '_Zoom (67%)',
"submenu": [
{
"id": 176,
- "enabled": true,
- "label": "Othe_r (67%)...",
+ "label": 'Othe_r (67%)...',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"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",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 179,
- "enabled": true,
- "label": "1:8 (12.5%)",
+ "label": '1:8 (12.5%)',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 180,
- "enabled": true,
- "label": "1:4 (25%)",
+ "label": '1:4 (25%)',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 181,
- "enabled": true,
- "label": "1:2 (50%)",
+ "label": '1:2 (50%)',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 182,
- "enabled": true,
- "label": "1:1 (100%)",
- "shortcut": [["1"]],
+ "label": '1:1 (100%)',
+ "shortcut": [['1']],
"toggle-state": 1,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 183,
- "enabled": true,
- "label": "2:1 (200%)",
+ "label": '2:1 (200%)',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 184,
- "enabled": true,
- "label": "4:1 (400%)",
+ "label": '4:1 (400%)',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 185,
- "enabled": true,
- "label": "8:1 (800%)",
+ "label": '8:1 (800%)',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 186,
- "enabled": true,
- "label": "16:1 (1600%)",
+ "label": '16:1 (1600%)',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 187,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 188,
- "enabled": true,
- "label": "Fill Window",
- "visible": true
+ "label": 'Fill Window'
},
{
"id": 189,
- "enabled": true,
- "label": "Fit Image in Window",
- "shortcut": [["Control", "Shift", "e"]],
- "visible": true
+ "label": 'Fit Image in Window',
+ "shortcut": [['Control', 'Shift', 'e']]
},
{
"id": 190,
- "enabled": true,
- "label": "Zoom In",
- "shortcut": [["plus"]],
- "visible": true
+ "label": 'Zoom In',
+ "shortcut": [['plus']]
},
{
"id": 191,
- "enabled": true,
- "label": "Zoom Out",
- "shortcut": [["minus"]],
- "visible": true
+ "label": 'Zoom Out',
+ "shortcut": [['minus']]
},
{
"id": 4,
- "enabled": true,
- "label": "Re_vert Zoom (67%)",
- "shortcut": [["grave"]],
- "visible": true
+ "label": 'Re_vert Zoom (67%)',
+ "shortcut": [['grave']]
}
]
},
{
"id": 192,
- "enabled": true,
- "label": "Dot for Dot",
+ "label": 'Dot for Dot',
"toggle-state": 1,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 193,
- "enabled": true,
- "label": "New View",
- "visible": true
+ "label": 'New View'
}
]
},
{
"id": 194,
- "children-display": "submenu",
- "enabled": true,
- "label": "Image",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Image',
"submenu": [
{
"id": 195,
- "enabled": true,
- "label": "Image Properties",
- "shortcut": [["Alt", "Return"]],
- "visible": true
+ "label": 'Image Properties',
+ "shortcut": [['Alt', 'Return']]
},
{
"id": 196,
- "enabled": true,
- "label": "Configure Grid...",
- "visible": true
+ "label": 'Configure Grid...'
},
{
"id": 197,
- "children-display": "submenu",
- "enabled": true,
- "label": "Guides",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Guides',
"submenu": [
{
"id": 198,
- "enabled": true,
- "label": "Remove all Guides",
- "visible": true
+ "label": 'Remove all Guides'
},
{
"id": 199,
- "enabled": true,
- "label": "New Guides from Selection",
- "visible": true
+ "label": 'New Guides from Selection'
},
{
"id": 200,
- "enabled": true,
- "label": "New Guide...",
- "visible": true
+ "label": 'New Guide...'
},
{
"id": 201,
- "enabled": true,
- "label": "New Guide (by Percent)...",
- "visible": true
+ "label": 'New Guide (by Percent)...'
}
]
},
{
"id": 202,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 203,
- "enabled": true,
- "label": "Align Visible Layers...",
- "visible": true
+ "label": 'Align Visible Layers...'
},
{
"id": 204,
- "enabled": true,
- "label": "Flatten Image",
- "visible": true
+ "label": 'Flatten Image'
},
{
"id": 205,
- "enabled": true,
- "label": "Merge Visible Layers...",
- "shortcut": [["Control", "m"]],
- "visible": true
+ "label": 'Merge Visible Layers...',
+ "shortcut": [['Control', 'm']]
},
{
"id": 206,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 207,
- "enabled": true,
- "label": "Zealous Crop",
- "visible": true
+ "label": 'Zealous Crop'
},
{
"id": 208,
- "enabled": true,
- "label": "Autocrop Image",
- "visible": true
+ "label": 'Autocrop Image'
},
{
"id": 209,
"enabled": false,
- "label": "Crop to Selection",
- "visible": true
+ "label": 'Crop to Selection'
},
{
"id": 210,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 211,
- "enabled": true,
- "label": "Scale Image...",
- "visible": true
+ "label": 'Scale Image...'
},
{
"id": 212,
- "enabled": true,
- "label": "Print Size...",
- "visible": true
+ "label": 'Print Size...'
},
{
"id": 213,
"enabled": false,
- "label": "Fit Canvas to Selection",
- "visible": true
+ "label": 'Fit Canvas to Selection'
},
{
"id": 214,
- "enabled": true,
- "label": "Fit Canvas to Layers",
- "visible": true
+ "label": 'Fit Canvas to Layers'
},
{
"id": 215,
- "enabled": true,
- "label": "Canvas Size...",
- "visible": true
+ "label": 'Canvas Size...'
},
{
"id": 216,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 217,
- "children-display": "submenu",
- "enabled": true,
- "label": "Transform",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Transform',
"submenu": [
{
"id": 218,
- "enabled": true,
- "label": "Guillotine",
- "visible": true
+ "label": 'Guillotine'
},
{
"id": 219,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 220,
- "enabled": true,
- "label": "Rotate 180\302\260",
- "visible": true
+ "label": 'Rotate 180?'
},
{
"id": 221,
- "enabled": true,
- "label": "Rotate 90\302\260 counter-clockwise",
- "visible": true
+ "label": 'Rotate 90? counter-clockwise'
},
{
"id": 222,
- "enabled": true,
- "label": "Rotate 90\302\260 clockwise",
- "visible": true
+ "label": 'Rotate 90? clockwise'
},
{
"id": 223,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 224,
- "enabled": true,
- "label": "Flip Vertically",
- "visible": true
+ "label": 'Flip Vertically'
},
{
"id": 225,
- "enabled": true,
- "label": "Flip Horizontally",
- "visible": true
+ "label": 'Flip Horizontally'
}
]
},
{
"id": 226,
- "children-display": "submenu",
- "enabled": true,
- "label": "Mode",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Mode',
"submenu": [
{
"id": 227,
- "enabled": true,
- "label": "Convert to Color Profile...",
- "visible": true
+ "label": 'Convert to Color Profile...'
},
{
"id": 228,
- "enabled": true,
- "label": "Assign Color Profile...",
- "visible": true
+ "label": 'Assign Color Profile...'
},
{
"id": 229,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 230,
- "enabled": true,
- "label": "Indexed...",
+ "label": 'Indexed...',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 231,
- "enabled": true,
- "label": "Grayscale",
+ "label": 'Grayscale',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 232,
- "enabled": true,
- "label": "RGB",
+ "label": 'RGB',
"toggle-state": 1,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
}
]
},
{
"id": 233,
- "enabled": true,
- "label": "Duplicate",
- "shortcut": [["Control", "d"]],
- "visible": true
+ "label": 'Duplicate',
+ "shortcut": [['Control', 'd']]
}
]
},
{
"id": 234,
- "children-display": "submenu",
- "enabled": true,
- "label": "Layer",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Layer',
"submenu": [
{
"id": 235,
- "enabled": true,
- "label": "Autocrop Layer",
- "visible": true
+ "label": 'Autocrop Layer'
},
{
"id": 236,
"enabled": false,
- "label": "Crop to Selection",
- "visible": true
+ "label": 'Crop to Selection'
},
{
"id": 237,
- "enabled": true,
- "label": "Scale Layer...",
- "visible": true
+ "label": 'Scale Layer...'
},
{
"id": 238,
- "enabled": true,
- "label": "Layer to Image Size",
- "visible": true
+ "label": 'Layer to Image Size'
},
{
"id": 239,
- "enabled": true,
- "label": "Layer Boundary Size...",
- "visible": true
+ "label": 'Layer Boundary Size...'
},
{
"id": 240,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 241,
- "children-display": "submenu",
- "enabled": true,
- "label": "Transform",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Transform',
"submenu": [
{
"id": 242,
- "enabled": true,
- "label": "Offset...",
- "shortcut": [["Control", "Shift", "o"]],
- "visible": true
+ "label": 'Offset...',
+ "shortcut": [['Control', 'Shift', 'o']]
},
{
"id": 243,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 244,
- "enabled": true,
- "label": "Arbitrary Rotation...",
- "visible": true
+ "label": 'Arbitrary Rotation...'
},
{
"id": 245,
- "enabled": true,
- "label": "Rotate 180\302\260",
- "visible": true
+ "label": 'Rotate 180?'
},
{
"id": 246,
- "enabled": true,
- "label": "Rotate 90\302\260 counter-clockwise",
- "visible": true
+ "label": 'Rotate 90? counter-clockwise'
},
{
"id": 247,
- "enabled": true,
- "label": "Rotate 90\302\260 clockwise",
- "visible": true
+ "label": 'Rotate 90? clockwise'
},
{
"id": 248,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 249,
- "enabled": true,
- "label": "Flip Vertically",
- "visible": true
+ "label": 'Flip Vertically'
},
{
"id": 250,
- "enabled": true,
- "label": "Flip Horizontally",
- "visible": true
+ "label": 'Flip Horizontally'
}
]
},
{
"id": 251,
- "children-display": "submenu",
- "enabled": true,
- "label": "Transparency",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Transparency',
"submenu": [
{
"id": 252,
- "enabled": true,
- "label": "Intersect with Selection",
- "visible": true
+ "label": 'Intersect with Selection'
},
{
"id": 253,
- "enabled": true,
- "label": "Subtract from Selection",
- "visible": true
+ "label": 'Subtract from Selection'
},
{
"id": 254,
- "enabled": true,
- "label": "Add to Selection",
- "visible": true
+ "label": 'Add to Selection'
},
{
"id": 255,
- "enabled": true,
- "label": "Alpha to Selection",
- "visible": true
+ "label": 'Alpha to Selection'
},
{
"id": 256,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 257,
- "enabled": true,
- "label": "Threshold Alpha...",
- "visible": true
+ "label": 'Threshold Alpha...'
},
{
"id": 258,
- "enabled": true,
- "label": "Semi-Flatten",
- "visible": true
+ "label": 'Semi-Flatten'
},
{
"id": 259,
- "enabled": true,
- "label": "Color to Alpha...",
- "visible": true
+ "label": 'Color to Alpha...'
},
{
"id": 260,
- "enabled": true,
- "label": "Remove Alpha Channel",
- "visible": true
+ "label": 'Remove Alpha Channel'
},
{
"id": 261,
"enabled": false,
- "label": "Add Alpha Channel",
- "visible": true
+ "label": 'Add Alpha Channel'
}
]
},
{
"id": 262,
- "children-display": "submenu",
- "enabled": true,
- "label": "Mask",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Mask',
"submenu": [
{
"id": 263,
"enabled": false,
- "label": "Intersect with Selection",
- "visible": true
+ "label": 'Intersect with Selection'
},
{
"id": 264,
"enabled": false,
- "label": "Subtract from Selection",
- "visible": true
+ "label": 'Subtract from Selection'
},
{
"id": 265,
"enabled": false,
- "label": "Add to Selection",
- "visible": true
+ "label": 'Add to Selection'
},
{
"id": 266,
"enabled": false,
- "label": "Mask to Selection",
- "visible": true
+ "label": 'Mask to Selection'
},
{
"id": 267,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 268,
"enabled": false,
- "label": "Disable Layer Mask",
+ "label": 'Disable Layer Mask',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 269,
"enabled": false,
- "label": "Edit Layer Mask",
+ "label": 'Edit Layer Mask',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 270,
"enabled": false,
- "label": "Show Layer Mask",
+ "label": 'Show Layer Mask',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 271,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 272,
"enabled": false,
- "label": "Delete Layer Mask",
- "visible": true
+ "label": 'Delete Layer Mask'
},
{
"id": 273,
"enabled": false,
- "label": "Apply Layer Mask",
- "visible": true
+ "label": 'Apply Layer Mask'
},
{
"id": 274,
- "enabled": true,
- "label": "Add Layer Mask...",
- "visible": true
+ "label": 'Add Layer Mask...'
}
]
},
{
"id": 275,
- "children-display": "submenu",
- "enabled": true,
- "label": "Stack",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Stack',
"submenu": [
{
"id": 276,
- "enabled": true,
- "label": "Reverse Layer Order",
- "visible": true
+ "label": 'Reverse Layer Order'
},
{
"id": 277,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 278,
"enabled": false,
- "label": "Layer to Bottom",
- "visible": true
+ "label": 'Layer to Bottom'
},
{
"id": 279,
"enabled": false,
- "label": "Layer to Top",
- "visible": true
+ "label": 'Layer to Top'
},
{
"id": 280,
"enabled": false,
- "label": "Lower Layer",
- "visible": true
+ "label": 'Lower Layer'
},
{
"id": 281,
"enabled": false,
- "label": "Raise Layer",
- "visible": true
+ "label": 'Raise Layer'
},
{
"id": 282,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 283,
"enabled": false,
- "label": "Select Bottom Layer",
- "shortcut": [["End"]],
- "visible": true
+ "label": 'Select Bottom Layer',
+ "shortcut": [['End']]
},
{
"id": 284,
"enabled": false,
- "label": "Select Top Layer",
- "shortcut": [["Home"]],
- "visible": true
+ "label": 'Select Top Layer',
+ "shortcut": [['Home']]
},
{
"id": 285,
"enabled": false,
- "label": "Select Next Layer",
- "shortcut": [["Page_Down"]],
- "visible": true
+ "label": 'Select Next Layer',
+ "shortcut": [['Page_Down']]
},
{
"id": 286,
"enabled": false,
- "label": "Select Previous Layer",
- "shortcut": [["Page_Up"]],
- "visible": true
+ "label": 'Select Previous Layer',
+ "shortcut": [['Page_Up']]
}
]
},
{
"id": 287,
- "children-display": "submenu",
- "type": "separator",
+ "children-display": 'submenu',
+ "type": 'separator',
"submenu": [
{
"id": 288,
"enabled": false,
- "label": "Empty",
- "visible": true
+ "label": 'Empty'
}
]
},
{
"id": 289,
- "enabled": true,
- "label": "Delete Layer",
- "visible": true
+ "label": 'Delete Layer'
},
{
"id": 290,
"enabled": false,
- "label": "Merge Down",
- "visible": true
+ "label": 'Merge Down'
},
{
"id": 291,
"enabled": false,
- "label": "Anchor Layer",
- "shortcut": [["Control", "h"]],
- "visible": true
+ "label": 'Anchor Layer',
+ "shortcut": [['Control', 'h']]
},
{
"id": 292,
- "enabled": true,
- "label": "Duplicate Layer",
- "shortcut": [["Control", "Shift", "d"]],
- "visible": true
+ "label": 'Duplicate Layer',
+ "shortcut": [['Control', 'Shift', 'd']]
},
{
"id": 293,
- "enabled": true,
- "label": "New from Visible",
- "visible": true
+ "label": 'New from Visible'
},
{
"id": 294,
- "enabled": true,
- "label": "New Layer...",
- "shortcut": [["Control", "Shift", "n"]],
- "visible": true
+ "label": 'New Layer...',
+ "shortcut": [['Control', 'Shift', 'n']]
}
]
},
{
"id": 295,
- "children-display": "submenu",
- "enabled": true,
- "label": "Colors",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Colors',
"submenu": [
{
"id": 296,
- "enabled": true,
- "label": "Retinex...",
- "visible": true
+ "label": 'Retinex...'
},
{
"id": 297,
- "enabled": true,
- "label": "Maximum RGB...",
- "visible": true
+ "label": 'Maximum RGB...'
},
{
"id": 298,
"enabled": false,
- "label": "Hot...",
- "visible": true
+ "label": 'Hot...'
},
{
"id": 299,
- "enabled": true,
- "label": "Filter Pack...",
- "visible": true
+ "label": 'Filter Pack...'
},
{
"id": 300,
- "enabled": true,
- "label": "Color to Alpha...",
- "visible": true
+ "label": 'Color to Alpha...'
},
{
"id": 301,
- "enabled": true,
- "label": "Colorify...",
- "visible": true
+ "label": 'Colorify...'
},
{
"id": 302,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 303,
- "children-display": "submenu",
- "enabled": true,
- "label": "Info",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Info',
"submenu": [
{
"id": 304,
- "enabled": true,
- "label": "Smooth Palette...",
- "visible": true
+ "label": 'Smooth Palette...'
},
{
"id": 305,
- "enabled": true,
- "label": "Colorcube Analysis...",
- "visible": true
+ "label": 'Colorcube Analysis...'
},
{
"id": 306,
- "enabled": true,
- "label": "Border Average...",
- "visible": true
+ "label": 'Border Average...'
},
{
"id": 307,
- "enabled": true,
- "label": "Histogram",
- "visible": true
+ "label": 'Histogram'
}
]
},
{
"id": 308,
- "children-display": "submenu",
- "enabled": true,
- "label": "Map",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Map',
"submenu": [
{
"id": 309,
- "enabled": true,
- "label": "Sample Colorize...",
- "visible": true
+ "label": 'Sample Colorize...'
},
{
"id": 310,
- "enabled": true,
- "label": "Rotate Colors...",
- "visible": true
+ "label": 'Rotate Colors...'
},
{
"id": 311,
- "enabled": true,
- "label": "Palette Map",
- "visible": true
+ "label": 'Palette Map'
},
{
"id": 312,
- "enabled": true,
- "label": "Gradient Map",
- "visible": true
+ "label": 'Gradient Map'
},
{
"id": 313,
- "enabled": true,
- "label": "Color Exchange...",
- "visible": true
+ "label": 'Color Exchange...'
},
{
"id": 314,
- "enabled": true,
- "label": "Alien Map...",
- "visible": true
+ "label": 'Alien Map...'
},
{
"id": 315,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 316,
"enabled": false,
- "label": "Set Colormap...",
- "visible": true
+ "label": 'Set Colormap...'
},
{
"id": 317,
"enabled": false,
- "label": "Rearrange Colormap...",
- "visible": true
+ "label": 'Rearrange Colormap...'
}
]
},
{
"id": 318,
- "children-display": "submenu",
- "enabled": true,
- "label": "Components",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Components',
"submenu": [
{
"id": 319,
"enabled": false,
- "label": "Recompose",
- "visible": true
+ "label": 'Recompose'
},
{
"id": 320,
- "enabled": true,
- "label": "Decompose...",
- "visible": true
+ "label": 'Decompose...'
},
{
"id": 321,
"enabled": false,
- "label": "Compose...",
- "visible": true
+ "label": 'Compose...'
},
{
"id": 322,
- "enabled": true,
- "label": "Channel Mixer...",
- "visible": true
+ "label": 'Channel Mixer...'
}
]
},
{
"id": 323,
- "children-display": "submenu",
- "enabled": true,
- "label": "Auto",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Auto',
"submenu": [
{
"id": 324,
- "enabled": true,
- "label": "Stretch HSV",
- "visible": true
+ "label": 'Stretch HSV'
},
{
"id": 325,
- "enabled": true,
- "label": "Stretch Contrast",
- "visible": true
+ "label": 'Stretch Contrast'
},
{
"id": 326,
- "enabled": true,
- "label": "Normalize",
- "visible": true
+ "label": 'Normalize'
},
{
"id": 327,
- "enabled": true,
- "label": "Color Enhance",
- "visible": true
+ "label": 'Color Enhance'
},
{
"id": 328,
- "enabled": true,
- "label": "White Balance",
- "visible": true
+ "label": 'White Balance'
},
{
"id": 329,
- "enabled": true,
- "label": "Equalize",
- "visible": true
+ "label": 'Equalize'
}
]
},
{
"id": 330,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 331,
- "enabled": true,
- "label": "Use GEGL",
+ "label": 'Use GEGL',
"toggle-state": 0,
- "toggle-type": "checkmark",
- "visible": true
+ "toggle-type": 'checkmark'
},
{
"id": 332,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 333,
- "enabled": true,
- "label": "Value Invert",
- "visible": true
+ "label": 'Value Invert'
},
{
"id": 334,
- "enabled": true,
- "label": "Invert",
- "visible": true
+ "label": 'Invert'
},
{
"id": 335,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 336,
- "enabled": true,
- "label": "Desaturate...",
- "visible": true
+ "label": 'Desaturate...'
},
{
"id": 337,
- "enabled": true,
- "label": "Posterize...",
- "visible": true
+ "label": 'Posterize...'
},
{
"id": 338,
- "enabled": true,
- "label": "Curves...",
- "visible": true
+ "label": 'Curves...'
},
{
"id": 339,
- "enabled": true,
- "label": "Levels...",
- "visible": true
+ "label": 'Levels...'
},
{
"id": 340,
- "enabled": true,
- "label": "Threshold...",
- "visible": true
+ "label": 'Threshold...'
},
{
"id": 341,
- "enabled": true,
- "label": "Brightness-Contrast...",
- "visible": true
+ "label": 'Brightness-Contrast...'
},
{
"id": 342,
- "enabled": true,
- "label": "Colorize...",
- "visible": true
+ "label": 'Colorize...'
},
{
"id": 343,
- "enabled": true,
- "label": "Hue-Saturation...",
- "visible": true
+ "label": 'Hue-Saturation...'
},
{
"id": 344,
- "enabled": true,
- "label": "Color Balance...",
- "visible": true
+ "label": 'Color Balance...'
}
]
},
{
"id": 345,
- "children-display": "submenu",
- "enabled": true,
- "label": "Tools",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Tools',
"submenu": [
{
"id": 346,
- "enabled": true,
- "label": "Swap Colors",
- "shortcut": [["x"]],
- "visible": true
+ "label": 'Swap Colors',
+ "shortcut": [['x']]
},
{
"id": 347,
- "enabled": true,
- "label": "Default Colors",
- "shortcut": [["d"]],
- "visible": true
+ "label": 'Default Colors',
+ "shortcut": [['d']]
},
{
"id": 348,
- "enabled": true,
- "label": "Toolbox",
- "shortcut": [["Control", "b"]],
- "visible": true
+ "label": 'Toolbox',
+ "shortcut": [['Control', 'b']]
},
{
"id": 349,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 350,
- "enabled": true,
- "label": "GEGL Operation...",
- "visible": true
+ "label": 'GEGL Operation...'
},
{
"id": 351,
- "enabled": true,
- "label": "Text",
- "shortcut": [["t"]],
- "visible": true
+ "label": 'Text',
+ "shortcut": [['t']]
},
{
"id": 352,
- "enabled": true,
- "label": "Measure",
- "shortcut": [["Shift", "m"]],
- "visible": true
+ "label": 'Measure',
+ "shortcut": [['Shift', 'm']]
},
{
"id": 353,
- "enabled": true,
- "label": "Zoom",
- "shortcut": [["z"]],
- "visible": true
+ "label": 'Zoom',
+ "shortcut": [['z']]
},
{
"id": 354,
- "enabled": true,
- "label": "Color Picker",
- "shortcut": [["o"]],
- "visible": true
+ "label": 'Color Picker',
+ "shortcut": [['o']]
},
{
"id": 355,
- "enabled": true,
- "label": "Paths",
- "shortcut": [["b"]],
- "visible": true
+ "label": 'Paths',
+ "shortcut": [['b']]
},
{
"id": 356,
- "children-display": "submenu",
- "enabled": true,
- "label": "Color Tools",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Color Tools',
"submenu": [
{
"id": 357,
- "enabled": true,
- "label": "Desaturate...",
- "visible": true
+ "label": 'Desaturate...'
},
{
"id": 358,
- "enabled": true,
- "label": "Posterize...",
- "visible": true
+ "label": 'Posterize...'
},
{
"id": 359,
- "enabled": true,
- "label": "Curves...",
- "visible": true
+ "label": 'Curves...'
},
{
"id": 360,
- "enabled": true,
- "label": "Levels...",
- "visible": true
+ "label": 'Levels...'
},
{
"id": 361,
- "enabled": true,
- "label": "Threshold...",
- "visible": true
+ "label": 'Threshold...'
},
{
"id": 362,
- "enabled": true,
- "label": "Brightness-Contrast...",
- "visible": true
+ "label": 'Brightness-Contrast...'
},
{
"id": 363,
- "enabled": true,
- "label": "Colorize...",
- "visible": true
+ "label": 'Colorize...'
},
{
"id": 364,
- "enabled": true,
- "label": "Hue-Saturation...",
- "visible": true
+ "label": 'Hue-Saturation...'
},
{
"id": 365,
- "enabled": true,
- "label": "Color Balance...",
- "visible": true
+ "label": 'Color Balance...'
}
]
},
{
"id": 366,
- "children-display": "submenu",
- "enabled": true,
- "label": "Transform Tools",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Transform Tools',
"submenu": [
{
"id": 367,
- "enabled": true,
- "label": "Flip",
- "shortcut": [["Shift", "f"]],
- "visible": true
+ "label": 'Flip',
+ "shortcut": [['Shift', 'f']]
},
{
"id": 368,
- "enabled": true,
- "label": "Perspective",
- "shortcut": [["Shift", "p"]],
- "visible": true
+ "label": 'Perspective',
+ "shortcut": [['Shift', 'p']]
},
{
"id": 369,
- "enabled": true,
- "label": "Shear",
- "shortcut": [["Shift", "s"]],
- "visible": true
+ "label": 'Shear',
+ "shortcut": [['Shift', 's']]
},
{
"id": 370,
- "enabled": true,
- "label": "Scale",
- "shortcut": [["Shift", "t"]],
- "visible": true
+ "label": 'Scale',
+ "shortcut": [['Shift', 't']]
},
{
"id": 371,
- "enabled": true,
- "label": "Rotate",
- "shortcut": [["Shift", "r"]],
- "visible": true
+ "label": 'Rotate',
+ "shortcut": [['Shift', 'r']]
},
{
"id": 372,
- "enabled": true,
- "label": "Crop",
- "shortcut": [["Shift", "c"]],
- "visible": true
+ "label": 'Crop',
+ "shortcut": [['Shift', 'c']]
},
{
"id": 373,
- "enabled": true,
- "label": "Move",
- "shortcut": [["m"]],
- "visible": true
+ "label": 'Move',
+ "shortcut": [['m']]
},
{
"id": 374,
- "enabled": true,
- "label": "Align",
- "shortcut": [["q"]],
- "visible": true
+ "label": 'Align',
+ "shortcut": [['q']]
}
]
},
{
"id": 375,
- "children-display": "submenu",
- "enabled": true,
- "label": "Paint Tools",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Paint Tools',
"submenu": [
{
"id": 376,
- "enabled": true,
- "label": "Dodge / Burn",
- "shortcut": [["Shift", "d"]],
- "visible": true
+ "label": 'Dodge / Burn',
+ "shortcut": [['Shift', 'd']]
},
{
"id": 377,
- "enabled": true,
- "label": "Smudge",
- "shortcut": [["s"]],
- "visible": true
+ "label": 'Smudge',
+ "shortcut": [['s']]
},
{
"id": 378,
- "enabled": true,
- "label": "Blur / Sharpen",
- "shortcut": [["Shift", "u"]],
- "visible": true
+ "label": 'Blur / Sharpen',
+ "shortcut": [['Shift', 'u']]
},
{
"id": 379,
- "enabled": true,
- "label": "Perspective Clone",
- "visible": true
+ "label": 'Perspective Clone'
},
{
"id": 380,
- "enabled": true,
- "label": "Heal",
- "shortcut": [["h"]],
- "visible": true
+ "label": 'Heal',
+ "shortcut": [['h']]
},
{
"id": 381,
- "enabled": true,
- "label": "Clone",
- "shortcut": [["c"]],
- "visible": true
+ "label": 'Clone',
+ "shortcut": [['c']]
},
{
"id": 382,
- "enabled": true,
- "label": "Ink",
- "shortcut": [["k"]],
- "visible": true
+ "label": 'Ink',
+ "shortcut": [['k']]
},
{
"id": 383,
- "enabled": true,
- "label": "Airbrush",
- "shortcut": [["a"]],
- "visible": true
+ "label": 'Airbrush',
+ "shortcut": [['a']]
},
{
"id": 384,
- "enabled": true,
- "label": "Eraser",
- "shortcut": [["Shift", "e"]],
- "visible": true
+ "label": 'Eraser',
+ "shortcut": [['Shift', 'e']]
},
{
"id": 385,
- "enabled": true,
- "label": "Paintbrush",
- "shortcut": [["p"]],
- "visible": true
+ "label": 'Paintbrush',
+ "shortcut": [['p']]
},
{
"id": 386,
- "enabled": true,
- "label": "Pencil",
- "shortcut": [["n"]],
- "visible": true
+ "label": 'Pencil',
+ "shortcut": [['n']]
},
{
"id": 387,
- "enabled": true,
- "label": "Blend",
- "shortcut": [["l"]],
- "visible": true
+ "label": 'Blend',
+ "shortcut": [['l']]
},
{
"id": 388,
- "enabled": true,
- "label": "Bucket Fill",
- "shortcut": [["Shift", "b"]],
- "visible": true
+ "label": 'Bucket Fill',
+ "shortcut": [['Shift', 'b']]
}
]
},
{
"id": 389,
- "children-display": "submenu",
- "enabled": true,
- "label": "Selection Tools",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Selection Tools',
"submenu": [
{
"id": 390,
- "enabled": true,
- "label": "Intelligent Scissors",
- "shortcut": [["i"]],
- "visible": true
+ "label": 'Intelligent Scissors',
+ "shortcut": [['i']]
},
{
"id": 391,
- "enabled": true,
- "label": "By Color Select",
- "shortcut": [["Shift", "o"]],
- "visible": true
+ "label": 'By Color Select',
+ "shortcut": [['Shift', 'o']]
},
{
"id": 392,
- "enabled": true,
- "label": "Fuzzy Select",
- "shortcut": [["u"]],
- "visible": true
+ "label": 'Fuzzy Select',
+ "shortcut": [['u']]
},
{
"id": 393,
- "enabled": true,
- "label": "Foreground Select",
- "visible": true
+ "label": 'Foreground Select'
},
{
"id": 394,
- "enabled": true,
- "label": "Free Select",
- "shortcut": [["f"]],
- "visible": true
+ "label": 'Free Select',
+ "shortcut": [['f']]
},
{
"id": 395,
- "enabled": true,
- "label": "Ellipse Select",
- "shortcut": [["e"]],
- "visible": true
+ "label": 'Ellipse Select',
+ "shortcut": [['e']]
},
{
"id": 396,
- "enabled": true,
- "label": "Rectangle Select",
- "shortcut": [["r"]],
- "visible": true
+ "label": 'Rectangle Select',
+ "shortcut": [['r']]
}
]
}
@@ -2568,439 +1900,307 @@
},
{
"id": 397,
- "children-display": "submenu",
- "enabled": true,
- "label": "Filters",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Filters',
"submenu": [
{
"id": 398,
- "children-display": "submenu",
- "enabled": true,
- "label": "Script-Fu",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Script-Fu',
"submenu": [
{
"id": 399,
- "enabled": true,
- "label": "Start Server...",
- "visible": true
+ "label": 'Start Server...'
},
{
"id": 400,
- "enabled": true,
- "label": "Refresh Scripts",
- "visible": true
+ "label": 'Refresh Scripts'
},
{
"id": 401,
- "enabled": true,
- "label": "Console",
- "visible": true
+ "label": 'Console'
}
]
},
{
"id": 402,
- "children-display": "submenu",
- "enabled": true,
- "label": "Python-Fu",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Python-Fu',
"submenu": [
{
"id": 403,
- "enabled": true,
- "label": "Console",
- "visible": true
+ "label": 'Console'
}
]
},
{
"id": 404,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 405,
- "children-display": "submenu",
- "enabled": true,
- "label": "Alpha to Logo",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Alpha to Logo',
"submenu": [
{
"id": 406,
- "enabled": true,
- "label": "Textured...",
- "visible": true
+ "label": 'Textured...'
},
{
"id": 407,
- "enabled": true,
- "label": "Particle Trace...",
- "visible": true
+ "label": 'Particle Trace...'
},
{
"id": 408,
- "enabled": true,
- "label": "Neon...",
- "visible": true
+ "label": 'Neon...'
},
{
"id": 409,
- "enabled": true,
- "label": "Gradient Bevel...",
- "visible": true
+ "label": 'Gradient Bevel...'
},
{
"id": 410,
- "enabled": true,
- "label": "Glowing Hot...",
- "visible": true
+ "label": 'Glowing Hot...'
},
{
"id": 411,
- "enabled": true,
- "label": "Glossy...",
- "visible": true
+ "label": 'Glossy...'
},
{
"id": 412,
- "enabled": true,
- "label": "Frosty...",
- "visible": true
+ "label": 'Frosty...'
},
{
"id": 413,
- "enabled": true,
- "label": "Cool Metal...",
- "visible": true
+ "label": 'Cool Metal...'
},
{
"id": 414,
- "enabled": true,
- "label": "Comic Book...",
- "visible": true
+ "label": 'Comic Book...'
},
{
"id": 415,
- "enabled": true,
- "label": "Chrome...",
- "visible": true
+ "label": 'Chrome...'
},
{
"id": 416,
- "enabled": true,
- "label": "Chip Away...",
- "visible": true
+ "label": 'Chip Away...'
},
{
"id": 417,
- "enabled": true,
- "label": "Chalk...",
- "visible": true
+ "label": 'Chalk...'
},
{
"id": 418,
- "enabled": true,
- "label": "Bovination...",
- "visible": true
+ "label": 'Bovination...'
},
{
"id": 419,
- "enabled": true,
- "label": "Blended...",
- "visible": true
+ "label": 'Blended...'
},
{
"id": 420,
- "enabled": true,
- "label": "Basic I...",
- "visible": true
+ "label": 'Basic I...'
},
{
"id": 421,
- "enabled": true,
- "label": "Basic II...",
- "visible": true
+ "label": 'Basic II...'
},
{
"id": 422,
- "enabled": true,
- "label": "Alien Neon...",
- "visible": true
+ "label": 'Alien Neon...'
},
{
"id": 423,
- "enabled": true,
- "label": "Alien Glow...",
- "visible": true
+ "label": 'Alien Glow...'
},
{
"id": 424,
- "enabled": true,
- "label": "3D Outline...",
- "visible": true
+ "label": '3D Outline...'
}
]
},
{
"id": 425,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 426,
- "children-display": "submenu",
- "enabled": true,
- "label": "Animation",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Animation',
"submenu": [
{
"id": 427,
- "enabled": true,
- "label": "Unoptimize",
- "visible": true
+ "label": 'Unoptimize'
},
{
"id": 428,
- "enabled": true,
- "label": "Playback...",
- "visible": true
+ "label": 'Playback...'
},
{
"id": 429,
- "enabled": true,
- "label": "Optimize (for GIF)",
- "visible": true
+ "label": 'Optimize (for GIF)'
},
{
"id": 430,
- "enabled": true,
- "label": "Optimize (Difference)",
- "visible": true
+ "label": 'Optimize (Difference)'
},
{
"id": 431,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 432,
- "enabled": true,
- "label": "Waves...",
- "visible": true
+ "label": 'Waves...'
},
{
"id": 433,
- "enabled": true,
- "label": "Spinning Globe...",
- "visible": true
+ "label": 'Spinning Globe...'
},
{
"id": 434,
- "enabled": true,
- "label": "Rippling...",
- "visible": true
+ "label": 'Rippling...'
},
{
"id": 435,
- "enabled": true,
- "label": "Burn-In...",
- "visible": true
+ "label": 'Burn-In...'
},
{
"id": 436,
- "enabled": true,
- "label": "Blend...",
- "visible": true
+ "label": 'Blend...'
}
]
},
{
"id": 437,
- "children-display": "submenu",
- "enabled": true,
- "label": "Web",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Web',
"submenu": [
{
"id": 438,
- "enabled": true,
- "label": "Slice...",
- "visible": true
+ "label": 'Slice...'
},
{
"id": 439,
- "enabled": true,
- "label": "Semi-Flatten",
- "visible": true
+ "label": 'Semi-Flatten'
},
{
"id": 440,
- "enabled": true,
- "label": "Image Map...",
- "visible": true
+ "label": 'Image Map...'
}
]
},
{
"id": 441,
- "children-display": "submenu",
- "enabled": true,
- "label": "Render",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Render',
"submenu": [
{
"id": 442,
- "enabled": true,
- "label": "Spyrogimp...",
- "visible": true
+ "label": 'Spyrogimp...'
},
{
"id": 443,
- "enabled": true,
- "label": "Sphere Designer...",
- "visible": true
+ "label": 'Sphere Designer...'
},
{
"id": 444,
- "enabled": true,
- "label": "Line Nova...",
- "visible": true
+ "label": 'Line Nova...'
},
{
"id": 445,
- "enabled": true,
- "label": "Lava...",
- "visible": true
+ "label": 'Lava...'
},
{
"id": 446,
- "enabled": true,
- "label": "Gfig...",
- "visible": true
+ "label": 'Gfig...'
},
{
"id": 447,
- "enabled": true,
- "label": "Fractal Explorer...",
- "visible": true
+ "label": 'Fractal Explorer...'
},
{
"id": 448,
- "enabled": true,
- "label": "Circuit...",
- "visible": true
+ "label": 'Circuit...'
},
{
"id": 449,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 450,
- "children-display": "submenu",
- "enabled": true,
- "label": "Pattern",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Pattern',
"submenu": [
{
"id": 451,
- "enabled": true,
- "label": "Sinus...",
- "visible": true
+ "label": 'Sinus...'
},
{
"id": 452,
- "enabled": true,
- "label": "Qbist...",
- "visible": true
+ "label": 'Qbist...'
},
{
"id": 453,
- "enabled": true,
- "label": "Maze...",
- "visible": true
+ "label": 'Maze...'
},
{
"id": 454,
- "enabled": true,
- "label": "Jigsaw...",
- "visible": true
+ "label": 'Jigsaw...'
},
{
"id": 455,
- "enabled": true,
- "label": "Grid...",
- "visible": true
+ "label": 'Grid...'
},
{
"id": 456,
- "enabled": true,
- "label": "Diffraction Patterns...",
- "visible": true
+ "label": 'Diffraction Patterns...'
},
{
"id": 457,
- "enabled": true,
- "label": "CML Explorer...",
- "visible": true
+ "label": 'CML Explorer...'
},
{
"id": 458,
- "enabled": true,
- "label": "Checkerboard...",
- "visible": true
+ "label": 'Checkerboard...'
}
]
},
{
"id": 459,
- "children-display": "submenu",
- "enabled": true,
- "label": "Nature",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Nature',
"submenu": [
{
"id": 460,
- "enabled": true,
- "label": "IFS Fractal...",
- "visible": true
+ "label": 'IFS Fractal...'
},
{
"id": 461,
- "enabled": true,
- "label": "Flame...",
- "visible": true
+ "label": 'Flame...'
}
]
},
{
"id": 462,
- "children-display": "submenu",
- "enabled": true,
- "label": "Clouds",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Clouds',
"submenu": [
{
"id": 463,
- "enabled": true,
- "label": "Solid Noise...",
- "visible": true
+ "label": 'Solid Noise...'
},
{
"id": 464,
- "enabled": true,
- "label": "Plasma...",
- "visible": true
+ "label": 'Plasma...'
},
{
"id": 465,
- "enabled": true,
- "label": "Fog...",
- "visible": true
+ "label": 'Fog...'
},
{
"id": 466,
- "enabled": true,
- "label": "Difference Clouds...",
- "visible": true
+ "label": 'Difference Clouds...'
}
]
}
@@ -3008,873 +2208,618 @@
},
{
"id": 467,
- "children-display": "submenu",
- "enabled": true,
- "label": "Map",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Map',
"submenu": [
{
"id": 468,
- "enabled": true,
- "label": "Warp...",
- "visible": true
+ "label": 'Warp...'
},
{
"id": 469,
- "enabled": true,
- "label": "Tile...",
- "visible": true
+ "label": 'Tile...'
},
{
"id": 470,
- "enabled": true,
- "label": "Small Tiles...",
- "visible": true
+ "label": 'Small Tiles...'
},
{
"id": 471,
- "enabled": true,
- "label": "Paper Tile...",
- "visible": true
+ "label": 'Paper Tile...'
},
{
"id": 472,
- "enabled": true,
- "label": "Map Object...",
- "visible": true
+ "label": 'Map Object...'
},
{
"id": 473,
- "enabled": true,
- "label": "Make Seamless",
- "visible": true
+ "label": 'Make Seamless'
},
{
"id": 474,
- "enabled": true,
- "label": "Illusion...",
- "visible": true
+ "label": 'Illusion...'
},
{
"id": 475,
- "enabled": true,
- "label": "Fractal Trace...",
- "visible": true
+ "label": 'Fractal Trace...'
},
{
"id": 476,
- "enabled": true,
- "label": "Displace...",
- "visible": true
+ "label": 'Displace...'
},
{
"id": 477,
- "enabled": true,
- "label": "Bump Map...",
- "visible": true
+ "label": 'Bump Map...'
}
]
},
{
"id": 478,
- "children-display": "submenu",
- "enabled": true,
- "label": "Decor",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Decor',
"submenu": [
{
"id": 479,
"enabled": false,
- "label": "Stencil Chrome...",
- "visible": true
+ "label": 'Stencil Chrome...'
},
{
"id": 480,
"enabled": false,
- "label": "Stencil Carve...",
- "visible": true
+ "label": 'Stencil Carve...'
},
{
"id": 481,
"enabled": false,
- "label": "Slide...",
- "visible": true
+ "label": 'Slide...'
},
{
"id": 482,
"enabled": false,
- "label": "Round Corners...",
- "visible": true
+ "label": 'Round Corners...'
},
{
"id": 483,
- "enabled": true,
- "label": "Old Photo...",
- "visible": true
+ "label": 'Old Photo...'
},
{
"id": 484,
- "enabled": true,
- "label": "Fuzzy Border...",
- "visible": true
+ "label": 'Fuzzy Border...'
},
{
"id": 485,
- "enabled": true,
- "label": "Coffee Stain...",
- "visible": true
+ "label": 'Coffee Stain...'
},
{
"id": 486,
- "enabled": true,
- "label": "Add Border...",
- "visible": true
+ "label": 'Add Border...'
},
{
"id": 487,
- "enabled": true,
- "label": "Add Bevel...",
- "visible": true
+ "label": 'Add Bevel...'
}
]
},
{
"id": 488,
- "children-display": "submenu",
- "enabled": true,
- "label": "Artistic",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Artistic',
"submenu": [
{
"id": 489,
- "enabled": true,
- "label": "Weave...",
- "visible": true
+ "label": 'Weave...'
},
{
"id": 490,
- "enabled": true,
- "label": "Van Gogh (LIC)...",
- "visible": true
+ "label": 'Van Gogh (LIC)...'
},
{
"id": 491,
- "enabled": true,
- "label": "Softglow...",
- "visible": true
+ "label": 'Softglow...'
},
{
"id": 492,
- "enabled": true,
- "label": "Predator...",
- "visible": true
+ "label": 'Predator...'
},
{
"id": 493,
- "enabled": true,
- "label": "Photocopy...",
- "visible": true
+ "label": 'Photocopy...'
},
{
"id": 494,
- "enabled": true,
- "label": "Oilify...",
- "visible": true
+ "label": 'Oilify...'
},
{
"id": 495,
- "enabled": true,
- "label": "GIMPressionist...",
- "visible": true
+ "label": 'GIMPressionist...'
},
{
"id": 496,
- "enabled": true,
- "label": "Cubism...",
- "visible": true
+ "label": 'Cubism...'
},
{
"id": 497,
- "enabled": true,
- "label": "Clothify...",
- "visible": true
+ "label": 'Clothify...'
},
{
"id": 498,
- "enabled": true,
- "label": "Cartoon...",
- "visible": true
+ "label": 'Cartoon...'
},
{
"id": 499,
- "enabled": true,
- "label": "Apply Canvas...",
- "visible": true
+ "label": 'Apply Canvas...'
}
]
},
{
"id": 500,
- "children-display": "submenu",
- "enabled": true,
- "label": "Combine",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Combine',
"submenu": [
{
"id": 501,
- "enabled": true,
- "label": "Filmstrip...",
- "visible": true
+ "label": 'Filmstrip...'
},
{
"id": 502,
- "enabled": true,
- "label": "Depth Merge...",
- "visible": true
+ "label": 'Depth Merge...'
}
]
},
{
"id": 503,
- "children-display": "submenu",
- "enabled": true,
- "label": "Generic",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Generic',
"submenu": [
{
"id": 504,
- "enabled": true,
- "label": "Erode",
- "visible": true
+ "label": 'Erode'
},
{
"id": 505,
- "enabled": true,
- "label": "Dilate",
- "visible": true
+ "label": 'Dilate'
},
{
"id": 506,
- "enabled": true,
- "label": "Convolution Matrix...",
- "visible": true
+ "label": 'Convolution Matrix...'
}
]
},
{
"id": 507,
- "children-display": "submenu",
- "enabled": true,
- "label": "Edge-Detect",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Edge-Detect',
"submenu": [
{
"id": 508,
- "enabled": true,
- "label": "Sobel...",
- "visible": true
+ "label": 'Sobel...'
},
{
"id": 509,
- "enabled": true,
- "label": "Neon...",
- "visible": true
+ "label": 'Neon...'
},
{
"id": 510,
- "enabled": true,
- "label": "Laplace",
- "visible": true
+ "label": 'Laplace'
},
{
"id": 511,
- "enabled": true,
- "label": "Edge...",
- "visible": true
+ "label": 'Edge...'
},
{
"id": 512,
- "enabled": true,
- "label": "Difference of Gaussians...",
- "visible": true
+ "label": 'Difference of Gaussians...'
}
]
},
{
"id": 513,
- "children-display": "submenu",
- "enabled": true,
- "label": "Noise",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Noise',
"submenu": [
{
"id": 514,
- "enabled": true,
- "label": "Spread...",
- "visible": true
+ "label": 'Spread...'
},
{
"id": 515,
- "enabled": true,
- "label": "Slur...",
- "visible": true
+ "label": 'Slur...'
},
{
"id": 516,
- "enabled": true,
- "label": "RGB Noise...",
- "visible": true
+ "label": 'RGB Noise...'
},
{
"id": 517,
- "enabled": true,
- "label": "Pick...",
- "visible": true
+ "label": 'Pick...'
},
{
"id": 518,
- "enabled": true,
- "label": "Hurl...",
- "visible": true
+ "label": 'Hurl...'
},
{
"id": 519,
- "enabled": true,
- "label": "HSV Noise...",
- "visible": true
+ "label": 'HSV Noise...'
}
]
},
{
"id": 520,
- "children-display": "submenu",
- "enabled": true,
- "label": "Light and Shadow",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Light and Shadow',
"submenu": [
{
"id": 521,
- "enabled": true,
- "label": "Glass Tile...",
- "visible": true
+ "label": 'Glass Tile...'
},
{
"id": 522,
- "enabled": true,
- "label": "Apply Lens...",
- "visible": true
+ "label": 'Apply Lens...'
},
{
"id": 523,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 524,
- "enabled": true,
- "label": "Xach-Effect...",
- "visible": true
+ "label": 'Xach-Effect...'
},
{
"id": 525,
- "enabled": true,
- "label": "Perspective...",
- "visible": true
+ "label": 'Perspective...'
},
{
"id": 526,
- "enabled": true,
- "label": "Drop Shadow...",
- "visible": true
+ "label": 'Drop Shadow...'
},
{
"id": 527,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 528,
- "enabled": true,
- "label": "Supernova...",
- "visible": true
+ "label": 'Supernova...'
},
{
"id": 529,
- "enabled": true,
- "label": "Sparkle...",
- "visible": true
+ "label": 'Sparkle...'
},
{
"id": 530,
- "enabled": true,
- "label": "Lighting Effects...",
- "visible": true
+ "label": 'Lighting Effects...'
},
{
"id": 531,
- "enabled": true,
- "label": "Lens Flare...",
- "visible": true
+ "label": 'Lens Flare...'
},
{
"id": 532,
- "enabled": true,
- "label": "Gradient Flare...",
- "visible": true
+ "label": 'Gradient Flare...'
}
]
},
{
"id": 533,
- "children-display": "submenu",
- "enabled": true,
- "label": "Distorts",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Distorts',
"submenu": [
{
"id": 534,
- "enabled": true,
- "label": "Wind...",
- "visible": true
+ "label": 'Wind...'
},
{
"id": 535,
- "enabled": true,
- "label": "Whirl and Pinch...",
- "visible": true
+ "label": 'Whirl and Pinch...'
},
{
"id": 536,
- "enabled": true,
- "label": "Waves...",
- "visible": true
+ "label": 'Waves...'
},
{
"id": 537,
- "enabled": true,
- "label": "Video...",
- "visible": true
+ "label": 'Video...'
},
{
"id": 538,
- "enabled": true,
- "label": "Value Propagate...",
- "visible": true
+ "label": 'Value Propagate...'
},
{
"id": 539,
- "enabled": true,
- "label": "Shift...",
- "visible": true
+ "label": 'Shift...'
},
{
"id": 540,
- "enabled": true,
- "label": "Ripple...",
- "visible": true
+ "label": 'Ripple...'
},
{
"id": 541,
- "enabled": true,
- "label": "Polar Coordinates...",
- "visible": true
+ "label": 'Polar Coordinates...'
},
{
"id": 542,
- "enabled": true,
- "label": "Pagecurl...",
- "visible": true
+ "label": 'Pagecurl...'
},
{
"id": 543,
- "enabled": true,
- "label": "Newsprint...",
- "visible": true
+ "label": 'Newsprint...'
},
{
"id": 544,
- "enabled": true,
- "label": "Mosaic...",
- "visible": true
+ "label": 'Mosaic...'
},
{
"id": 545,
- "enabled": true,
- "label": "Lens Distortion...",
- "visible": true
+ "label": 'Lens Distortion...'
},
{
"id": 546,
- "enabled": true,
- "label": "IWarp...",
- "visible": true
+ "label": 'IWarp...'
},
{
"id": 547,
- "enabled": true,
- "label": "Erase Every Other Row...",
- "visible": true
+ "label": 'Erase Every Other Row...'
},
{
"id": 548,
- "enabled": true,
- "label": "Engrave...",
- "visible": true
+ "label": 'Engrave...'
},
{
"id": 549,
- "enabled": true,
- "label": "Emboss...",
- "visible": true
+ "label": 'Emboss...'
},
{
"id": 550,
- "enabled": true,
- "label": "Curve Bend...",
- "visible": true
+ "label": 'Curve Bend...'
},
{
"id": 551,
- "enabled": true,
- "label": "Blinds...",
- "visible": true
+ "label": 'Blinds...'
}
]
},
{
"id": 552,
- "children-display": "submenu",
- "enabled": true,
- "label": "Enhance",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Enhance',
"submenu": [
{
"id": 553,
- "enabled": true,
- "label": "Unsharp Mask...",
- "visible": true
+ "label": 'Unsharp Mask...'
},
{
"id": 554,
- "enabled": true,
- "label": "Sharpen...",
- "visible": true
+ "label": 'Sharpen...'
},
{
"id": 555,
- "enabled": true,
- "label": "Red Eye Removal...",
- "visible": true
+ "label": 'Red Eye Removal...'
},
{
"id": 556,
"enabled": false,
- "label": "NL Filter...",
- "visible": true
+ "label": 'NL Filter...'
},
{
"id": 557,
- "enabled": true,
- "label": "Destripe...",
- "visible": true
+ "label": 'Destripe...'
},
{
"id": 558,
- "enabled": true,
- "label": "Despeckle...",
- "visible": true
+ "label": 'Despeckle...'
},
{
"id": 559,
- "enabled": true,
- "label": "Deinterlace...",
- "visible": true
+ "label": 'Deinterlace...'
},
{
"id": 560,
- "enabled": true,
- "label": "Antialias",
- "visible": true
+ "label": 'Antialias'
}
]
},
{
"id": 561,
- "children-display": "submenu",
- "enabled": true,
- "label": "Blur",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Blur',
"submenu": [
{
"id": 562,
- "enabled": true,
- "label": "Tileable Blur...",
- "visible": true
+ "label": 'Tileable Blur...'
},
{
"id": 563,
- "enabled": true,
- "label": "Selective Gaussian Blur...",
- "visible": true
+ "label": 'Selective Gaussian Blur...'
},
{
"id": 564,
- "enabled": true,
- "label": "Pixelize...",
- "visible": true
+ "label": 'Pixelize...'
},
{
"id": 565,
- "enabled": true,
- "label": "Motion Blur...",
- "visible": true
+ "label": 'Motion Blur...'
},
{
"id": 566,
- "enabled": true,
- "label": "Gaussian Blur...",
- "visible": true
+ "label": 'Gaussian Blur...'
},
{
"id": 567,
- "enabled": true,
- "label": "Blur",
- "visible": true
+ "label": 'Blur'
}
]
},
{
"id": 568,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 569,
- "enabled": true,
- "label": "Reset all Filters",
- "visible": true
+ "label": 'Reset all Filters'
},
{
"id": 570,
- "children-display": "submenu",
+ "children-display": 'submenu',
"enabled": false,
- "label": "Re-Show Last",
- "shortcut": [["Control", "Shift", "f"]],
- "visible": true,
+ "label": 'Re-Show Last',
+ "shortcut": [['Control', 'Shift', 'f']],
"submenu": [
{
"id": 571,
"enabled": false,
- "label": "Empty",
- "visible": true
+ "label": 'Empty'
}
]
},
{
"id": 572,
"enabled": false,
- "label": "Repeat Last",
- "shortcut": [["Control", "f"]],
- "visible": true
+ "label": 'Repeat Last',
+ "shortcut": [['Control', 'f']]
}
]
},
{
"id": 573,
- "children-display": "submenu",
- "enabled": true,
- "label": "Windows",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Windows',
"submenu": [
{
"id": 574,
- "enabled": true,
- "label": "Toolbox",
- "shortcut": [["Control", "b"]],
- "visible": true
+ "label": 'Toolbox',
+ "shortcut": [['Control', 'b']]
},
{
"id": 575,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 576,
- "children-display": "submenu",
- "enabled": true,
- "label": "Dockable Dialogs",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Dockable Dialogs',
"submenu": [
{
"id": 577,
- "enabled": true,
- "label": "Error Console",
- "visible": true
+ "label": 'Error Console'
},
{
"id": 578,
- "enabled": true,
- "label": "Tools",
- "visible": true
+ "label": 'Tools'
},
{
"id": 579,
- "enabled": true,
- "label": "Templates",
- "visible": true
+ "label": 'Templates'
},
{
"id": 580,
- "enabled": true,
- "label": "Document History",
- "visible": true
+ "label": 'Document History'
},
{
"id": 581,
- "enabled": true,
- "label": "Images",
- "visible": true
+ "label": 'Images'
},
{
"id": 582,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 583,
- "enabled": true,
- "label": "Buffers",
- "visible": true
+ "label": 'Buffers'
},
{
"id": 584,
- "enabled": true,
- "label": "Fonts",
- "visible": true
+ "label": 'Fonts'
},
{
"id": 585,
- "enabled": true,
- "label": "Palettes",
- "visible": true
+ "label": 'Palettes'
},
{
"id": 586,
- "enabled": true,
- "label": "Gradients",
- "shortcut": [["Control", "g"]],
- "visible": true
+ "label": 'Gradients',
+ "shortcut": [['Control', 'g']]
},
{
"id": 587,
- "enabled": true,
- "label": "Patterns",
- "shortcut": [["Control", "Shift", "p"]],
- "visible": true
+ "label": 'Patterns',
+ "shortcut": [['Control', 'Shift', 'p']]
},
{
"id": 588,
- "enabled": true,
- "label": "Brushes",
- "shortcut": [["Control", "Shift", "b"]],
- "visible": true
+ "label": 'Brushes',
+ "shortcut": [['Control', 'Shift', 'b']]
},
{
"id": 589,
- "enabled": true,
- "label": "Colors",
- "visible": true
+ "label": 'Colors'
},
{
"id": 590,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 591,
- "enabled": true,
- "label": "Sample Points",
- "visible": true
+ "label": 'Sample Points'
},
{
"id": 592,
- "enabled": true,
- "label": "Pointer",
- "visible": true
+ "label": 'Pointer'
},
{
"id": 593,
- "enabled": true,
- "label": "Undo History",
- "visible": true
+ "label": 'Undo History'
},
{
"id": 594,
- "enabled": true,
- "label": "Navigation",
- "visible": true
+ "label": 'Navigation'
},
{
"id": 595,
- "enabled": true,
- "label": "Selection Editor",
- "visible": true
+ "label": 'Selection Editor'
},
{
"id": 596,
- "enabled": true,
- "label": "Histogram",
- "visible": true
+ "label": 'Histogram'
},
{
"id": 597,
- "enabled": true,
- "label": "Colormap",
- "visible": true
+ "label": 'Colormap'
},
{
"id": 598,
- "enabled": true,
- "label": "Paths",
- "visible": true
+ "label": 'Paths'
},
{
"id": 599,
- "enabled": true,
- "label": "Channels",
- "visible": true
+ "label": 'Channels'
},
{
"id": 600,
- "enabled": true,
- "label": "Layers",
- "shortcut": [["Control", "l"]],
- "visible": true
+ "label": 'Layers',
+ "shortcut": [['Control', 'l']]
},
{
"id": 601,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 602,
- "enabled": true,
- "label": "Device Status",
- "visible": true
+ "label": 'Device Status'
},
{
"id": 603,
- "enabled": true,
- "label": "Tool Options",
- "visible": true
+ "label": 'Tool Options'
}
]
},
{
"id": 604,
- "children-display": "submenu",
- "enabled": true,
- "label": "Recently Closed Docks",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Recently Closed Docks',
"submenu": [
{
"id": 605,
"enabled": false,
- "label": "Empty",
- "visible": true
+ "label": 'Empty'
}
]
}
@@ -3882,140 +2827,100 @@
},
{
"id": 606,
- "children-display": "submenu",
- "enabled": true,
- "label": "Help",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'Help',
"submenu": [
{
"id": 607,
- "children-display": "submenu",
- "enabled": true,
- "label": "User Manual",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'User Manual',
"submenu": [
{
"id": 608,
- "enabled": true,
- "label": "Working with Digital Camera Photos",
- "visible": true
+ "label": 'Working with Digital Camera Photos'
},
{
"id": 609,
- "enabled": true,
- "label": "Using Paths",
- "visible": true
+ "label": 'Using Paths'
},
{
"id": 610,
- "enabled": true,
- "label": "Preparing your Images for the Web",
- "visible": true
+ "label": 'Preparing your Images for the Web'
},
{
"id": 611,
- "enabled": true,
- "label": "How to Use Dialogs",
- "visible": true
+ "label": 'How to Use Dialogs'
},
{
"id": 612,
- "enabled": true,
- "label": "Drawing Simple Objects",
- "visible": true
+ "label": 'Drawing Simple Objects'
},
{
"id": 613,
- "enabled": true,
- "label": "Create, Open and Save Files",
- "visible": true
+ "label": 'Create, Open and Save Files'
},
{
"id": 614,
- "enabled": true,
- "label": "Basic Concepts",
- "visible": true
+ "label": 'Basic Concepts'
}
]
},
{
"id": 615,
- "children-display": "submenu",
- "enabled": true,
- "label": "GIMP Online",
- "visible": true,
+ "children-display": 'submenu',
+ "label": 'GIMP Online',
"submenu": [
{
"id": 616,
- "enabled": true,
- "label": "User Manual Web Site",
- "visible": true
+ "label": 'User Manual Web Site'
},
{
"id": 617,
- "enabled": true,
- "label": "Plug-in Registry",
- "visible": true
+ "label": 'Plug-in Registry'
},
{
"id": 618,
- "enabled": true,
- "label": "Main Web Site",
- "visible": true
+ "label": 'Main Web Site'
},
{
"id": 619,
- "enabled": true,
- "label": "Developer Web Site",
- "visible": true
+ "label": 'Developer Web Site'
}
]
},
{
"id": 620,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 621,
- "enabled": true,
- "label": "Procedure Browser",
- "visible": true
+ "label": 'Procedure Browser'
},
{
"id": 622,
- "enabled": true,
- "label": "Plug-In Browser",
- "visible": true
+ "label": 'Plug-In Browser'
},
{
"id": 623,
- "type": "separator"
+ "type": 'separator'
},
{
"id": 624,
- "enabled": true,
- "label": "About",
- "visible": true
+ "label": 'About'
},
{
"id": 625,
- "enabled": true,
- "label": "Tip of the Day",
- "visible": true
+ "label": 'Tip of the Day'
},
{
"id": 626,
- "enabled": true,
- "label": "Context Help",
- "shortcut": [["Shift", "F1"]],
- "visible": true
+ "label": 'Context Help',
+ "shortcut": [['Shift', 'F1']]
},
{
"id": 627,
- "enabled": true,
- "label": "Help",
- "shortcut": [["F1"]],
- "visible": true
+ "label": 'Help',
+ "shortcut": [['F1']]
}
]
}
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 <http://www.gnu.org/licenses/>.
#include <glib.h>
#include <gio/gio.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-bindings.h>
-#include <dbus/dbus-glib-lowlevel.h>
GMainLoop * mainloop = NULL;
-int
-main (int argc, char ** argv)
+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;
}
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 <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib-bindings.h>
+#include <gio/gio.h>
#include <libdbusmenu-glib/server.h>
#include <libdbusmenu-glib/menuitem.h>
@@ -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);