From a8fc233f37e08f52ed7ca80fbd284277ca1bd33e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 11:23:46 -0600 Subject: Taking out the dbus-glib specialized types for now --- tests/json-loader.c | 51 ++------------------------------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index aad4295..9e67666 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -20,7 +20,6 @@ with this program. If not, see . */ #include "json-loader.h" -#include static GValue * node2value (JsonNode * node) @@ -74,58 +73,12 @@ node2value (JsonNode * node) } } else { - GValue * subvalue = node2value(first); - GType type = dbus_g_type_get_collection("GPtrArray", G_VALUE_TYPE(subvalue)); - gpointer * wrapper = dbus_g_type_specialized_construct(type); - - g_value_init(value, type); - g_value_take_boxed(value, wrapper); - - DBusGTypeSpecializedAppendContext ctx; - dbus_g_type_specialized_init_append(value, &ctx); - - dbus_g_type_specialized_collection_append(&ctx, subvalue); - int i; - for (i = 1; i < json_array_get_length(array); i++) { - GValue * subvalue = node2value(node); - dbus_g_type_specialized_collection_append(&ctx, subvalue); - } - - dbus_g_type_specialized_collection_end_append(&ctx); + g_warning("Complex array not supported"); } } if (JSON_NODE_TYPE(node) == JSON_NODE_OBJECT) { - JsonObject * obj = json_node_get_object(node); - - GType type = dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE); - GHashTable * hash = (GHashTable *)dbus_g_type_specialized_construct(type); - - g_value_init(value, type); - g_value_take_boxed(value, hash); - - DBusGTypeSpecializedAppendContext ctx; - dbus_g_type_specialized_init_append(value, &ctx); - - GList * members = NULL; - for (members = json_object_get_members(obj); members != NULL; members = g_list_next(members)) { - const gchar * member = members->data; - - JsonNode * lnode = json_object_get_member(obj, member); - GValue * value = node2value(lnode); - - if (value != NULL) { - GValue name = {0}; - g_value_init(&name, G_TYPE_STRING); - g_value_set_static_string(&name, member); - - dbus_g_type_specialized_map_append(&ctx, &name, value); - - g_value_unset(&name); - g_value_unset(value); - g_free(value); - } - } + g_warning("Object nodes are a problem"); } return value; -- cgit v1.2.3 From 94d5da983e2d1d64d6cf4249237b6ba009102286 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 13:46:26 -0600 Subject: Switching to GDBus from dbus-glib --- tests/test-glib-events-server.c | 55 +++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-events-server.c b/tests/test-glib-events-server.c index 0d1e0b1..ab72c6b 100644 --- a/tests/test-glib-events-server.c +++ b/tests/test-glib-events-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -49,35 +45,40 @@ timer_func (gpointer data) return FALSE; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - GError * error = NULL; - - g_type_init(); - - DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); - - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; - - if (!org_freedesktop_DBus_request_name(bus_proxy, "org.dbusmenu.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } - - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } - server = dbusmenu_server_new("/org/test"); DbusmenuMenuitem * menuitem = dbusmenu_menuitem_new(); dbusmenu_server_set_root(server, menuitem); g_signal_connect(G_OBJECT(menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(handle_event), NULL); + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); + g_timeout_add_seconds(3, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); -- cgit v1.2.3 From 6fc56d02acbb80a166837ed226fbe24bd3635fca Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 15:30:39 -0600 Subject: Switching to GDBus for getting the name --- tests/test-glib-layout-server.c | 53 +++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-layout-server.c b/tests/test-glib-layout-server.c index 111e164..e289349 100644 --- a/tests/test-glib-layout-server.c +++ b/tests/test-glib-layout-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -72,33 +68,38 @@ timer_func (gpointer data) return TRUE; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - GError * error = NULL; - - g_type_init(); - - DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); + server = dbusmenu_server_new("/org/test"); - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; + timer_func(NULL); + g_timeout_add(2500, timer_func, NULL); - if (!org_freedesktop_DBus_request_name(bus_proxy, "org.dbusmenu.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } + return; +} - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} - server = dbusmenu_server_new("/org/test"); +int +main (int argc, char ** argv) +{ + g_type_init(); - timer_func(NULL); - g_timeout_add(2500, timer_func, NULL); + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From b09ed309175070d38bc4351d02f23b0ef757008c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 15:47:10 -0600 Subject: More name grabbing porting from dbus-glib to GDBus --- tests/test-glib-properties-server.c | 7 +---- tests/test-glib-proxy-proxy.c | 55 +++++++++++++++++++------------------ tests/test-glib-proxy-server.c | 51 +++++++++++++++++----------------- 3 files changed, 55 insertions(+), 58 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-properties-server.c b/tests/test-glib-properties-server.c index 091e550..4248ea2 100644 --- a/tests/test-glib-properties-server.c +++ b/tests/test-glib-properties-server.c @@ -20,10 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include +#include #include #include @@ -91,8 +88,6 @@ main (int argc, char ** argv) { g_type_init(); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); - server = dbusmenu_server_new("/org/test"); timer_func(NULL); diff --git a/tests/test-glib-proxy-proxy.c b/tests/test-glib-proxy-proxy.c index 722cf1f..b9db620 100644 --- a/tests/test-glib-proxy-proxy.c +++ b/tests/test-glib-proxy-proxy.c @@ -1,9 +1,5 @@ #include - -#include -#include -#include -#include +#include #include #include @@ -32,6 +28,25 @@ root_changed (DbusmenuClient * client, DbusmenuMenuitem * newroot, gpointer user return; } +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + server = dbusmenu_server_new("/org/test"); + client = dbusmenu_client_new((gchar *)user_data, "/org/test"); + + g_signal_connect(client, DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(root_changed), server); + + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + int main (int argc, char ** argv) { @@ -47,28 +62,14 @@ main (int argc, char ** argv) g_debug("I am '%s' and I'm proxying '%s'", whoami, myproxy); - GError * error = NULL; - DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(connection))); - - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; - - if (!org_freedesktop_DBus_request_name(bus_proxy, whoami, 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } - - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } - - server = dbusmenu_server_new("/org/test"); - client = dbusmenu_client_new(myproxy, "/org/test"); - - g_signal_connect(client, DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(root_changed), server); + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + myproxy, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-glib-proxy-server.c b/tests/test-glib-proxy-server.c index f32b426..c12a584 100644 --- a/tests/test-glib-proxy-server.c +++ b/tests/test-glib-proxy-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -104,31 +100,36 @@ layout_change (DbusmenuMenuitem * oldroot, guint timestamp, gpointer data) return; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - g_type_init(); - - GError * error = NULL; - DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(connection))); + server = dbusmenu_server_new("/org/test"); + layout_change(NULL, 0, NULL); - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; + return; +} - if (!org_freedesktop_DBus_request_name(bus_proxy, "test.proxy.server", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } +int +main (int argc, char ** argv) +{ + g_type_init(); - server = dbusmenu_server_new("/org/test"); - layout_change(NULL, 0, NULL); + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From b0a7118fc4581f07b42c25ce02bda01fd1604097 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 17:16:45 -0600 Subject: Chaning to get dbus names via GDBus --- tests/test-glib-simple-items.c | 3 --- tests/test-glib-submenu-server.c | 53 +++++++++++++++++++------------------- tests/test-gtk-label-server.c | 52 +++++++++++++++++++------------------ tests/test-gtk-reorder-server.c | 55 ++++++++++++++++++++-------------------- tests/test-gtk-shortcut-server.c | 53 +++++++++++++++++++------------------- 5 files changed, 110 insertions(+), 106 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-simple-items.c b/tests/test-glib-simple-items.c index 5b9f538..3ea5480 100644 --- a/tests/test-glib-simple-items.c +++ b/tests/test-glib-simple-items.c @@ -1,6 +1,3 @@ -#include -#include - #include #include diff --git a/tests/test-glib-submenu-server.c b/tests/test-glib-submenu-server.c index 68f7004..73362c1 100644 --- a/tests/test-glib-submenu-server.c +++ b/tests/test-glib-submenu-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -72,33 +68,38 @@ timer_func (gpointer data) return TRUE; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - GError * error = NULL; - - g_type_init(); - - DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); + server = dbusmenu_server_new("/org/test"); - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; + timer_func(NULL); + g_timeout_add(2500, timer_func, NULL); - if (!org_freedesktop_DBus_request_name(bus_proxy, "org.dbusmenu.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } + return; +} - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} - server = dbusmenu_server_new("/org/test"); +int +main (int argc, char ** argv) +{ + g_type_init(); - timer_func(NULL); - g_timeout_add(2500, timer_func, NULL); + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-gtk-label-server.c b/tests/test-gtk-label-server.c index 32572fc..ddf8fcf 100644 --- a/tests/test-gtk-label-server.c +++ b/tests/test-gtk-label-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -53,6 +49,25 @@ timer_func (gpointer data) return TRUE; } +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + server = dbusmenu_server_new("/org/test"); + + timer_func(NULL); + g_timeout_add_seconds(5, timer_func, NULL); + + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + int main (int argc, char ** argv) { @@ -73,26 +88,15 @@ main (int argc, char ** argv) root_array = json_node_get_array(root_node); g_debug("%d layouts in test description '%s'", json_array_get_length(root_array), argv[1]); - DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; - - if (!org_freedesktop_DBus_request_name(bus_proxy, "glib.label.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } - - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } - - server = dbusmenu_server_new("/org/test"); - - timer_func(NULL); - g_timeout_add_seconds(5, timer_func, NULL); + g_bus_own_name(G_BUS_TYPE_SESSION, + "glib.label.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-gtk-reorder-server.c b/tests/test-gtk-reorder-server.c index eee9bb8..44209f1 100644 --- a/tests/test-gtk-reorder-server.c +++ b/tests/test-gtk-reorder-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -73,29 +69,9 @@ timer_func (gpointer data) return TRUE; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - GError * error = NULL; - - g_type_init(); - - DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); - - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; - - if (!org_freedesktop_DBus_request_name(bus_proxy, "glib.label.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } - - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } - server = dbusmenu_server_new("/org/test"); root = dbusmenu_menuitem_new(); dbusmenu_server_set_root(server, root); @@ -109,6 +85,31 @@ main (int argc, char ** argv) timer_func(NULL); g_timeout_add_seconds(5, timer_func, NULL); + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + g_bus_own_name(G_BUS_TYPE_SESSION, + "glib.label.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); + mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-gtk-shortcut-server.c b/tests/test-gtk-shortcut-server.c index 3b703a1..b205d03 100644 --- a/tests/test-gtk-shortcut-server.c +++ b/tests/test-gtk-shortcut-server.c @@ -20,13 +20,9 @@ with this program. If not, see . */ #include +#include #include -#include -#include -#include -#include - #include #include #include @@ -61,33 +57,38 @@ build_menu (void) return; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - GError * error = NULL; - - g_type_init(); - - DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); + server = dbusmenu_server_new("/org/test"); + build_menu(); - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; + g_timeout_add_seconds(10, timer_func, NULL); - if (!org_freedesktop_DBus_request_name(bus_proxy, "glib.label.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } + return; +} - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} - server = dbusmenu_server_new("/org/test"); - build_menu(); +int +main (int argc, char ** argv) +{ + g_type_init(); - g_timeout_add_seconds(10, timer_func, NULL); + g_bus_own_name(G_BUS_TYPE_SESSION, + "glib.label.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From f6108371c958c994b451d9c7c80f530bae4fd7c3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 21:57:32 -0600 Subject: Making a test do a name detection, but kinda making it async at the same time. --- tests/test-json-client.c | 60 ++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 28 deletions(-) (limited to 'tests') diff --git a/tests/test-json-client.c b/tests/test-json-client.c index f9da55e..d4e782b 100644 --- a/tests/test-json-client.c +++ b/tests/test-json-client.c @@ -21,38 +21,21 @@ with this program. If not, see . #include #include -#include -#include -#include GMainLoop * mainloop = NULL; -int -main (int argc, char ** argv) +gboolean +timeout_func (gpointer user_data) { - g_type_init(); - g_debug("Wait for friends"); - - GError * error = NULL; - DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error); - if (error != NULL) { - g_error("Unable to get session bus: %s", error->message); - return 1; - } - - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - - gboolean has_owner = FALSE; - gint owner_count = 0; - while (!has_owner && owner_count < 10000) { - org_freedesktop_DBus_name_has_owner(bus_proxy, "org.dbusmenu.test", &has_owner, NULL); - owner_count++; - } + g_warning("Timeout without getting name"); + g_main_loop_quit(mainloop); + return FALSE; +} - if (owner_count == 10000) { - g_error("Unable to get name owner after 10000 tries"); - return 1; - } +void +name_appeared (GDBusConnection * connection, const gchar * name, const gchar * owner, gpointer user_data) +{ + char ** argv = (char **)user_data; g_usleep(500000); @@ -69,7 +52,28 @@ main (int argc, char ** argv) g_file_replace_contents(ofile, output, g_utf8_strlen(output, -1), NULL, FALSE, 0, NULL, NULL, NULL); } - g_debug("Exiting"); + g_main_loop_quit(mainloop); + return; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + g_debug("Wait for friends"); + + g_bus_watch_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_WATCHER_FLAGS_NONE, + name_appeared, + NULL, + argv, + NULL); + + g_timeout_add_seconds(2, timeout_func, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); return 0; } -- cgit v1.2.3 From 1100e05ca534449b557a1f2993c405f01781bd72 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 16 Nov 2010 22:04:47 -0600 Subject: Getting names the GDBus way --- tests/test-gtk-submenu-server.c | 55 +++++++++++++++++++------------------ tests/test-json-server.c | 61 +++++++++++++++++++++++------------------ 2 files changed, 62 insertions(+), 54 deletions(-) (limited to 'tests') diff --git a/tests/test-gtk-submenu-server.c b/tests/test-gtk-submenu-server.c index 11cede0..9c4d7d4 100644 --- a/tests/test-gtk-submenu-server.c +++ b/tests/test-gtk-submenu-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -59,29 +55,9 @@ add_item(DbusmenuMenuitem * parent, const char * label) return item; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - GError * error = NULL; - - g_type_init(); - - DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); - - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; - - if (!org_freedesktop_DBus_request_name(bus_proxy, "glib.label.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } - - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } - DbusmenuServer * server = dbusmenu_server_new("/org/test"); DbusmenuMenuitem * root = dbusmenu_menuitem_new(); dbusmenu_server_set_root(server, root); @@ -101,6 +77,31 @@ main (int argc, char ** argv) g_timeout_add_seconds(4, show_item, item); + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + g_bus_own_name(G_BUS_TYPE_SESSION, + "glib.label.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + NULL, + NULL); + g_timeout_add_seconds(6, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); diff --git a/tests/test-json-server.c b/tests/test-json-server.c index fe9507a..083de60 100644 --- a/tests/test-json-server.c +++ b/tests/test-json-server.c @@ -20,11 +20,7 @@ with this program. If not, see . */ #include - -#include -#include -#include -#include +#include #include #include @@ -40,38 +36,49 @@ timer_func (gpointer data) return FALSE; } -int -main (int argc, char ** argv) +static void +on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - GError * error = NULL; - - g_type_init(); - - DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); - - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - guint nameret = 0; - - if (!org_freedesktop_DBus_request_name(bus_proxy, "org.dbusmenu.test", 0, &nameret, &error)) { - g_error("Unable to call to request name"); - return 1; - } - - if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_error("Unable to get name"); - return 1; - } + gchar ** argv = (gchar **)user_data; DbusmenuServer * server = dbusmenu_server_new("/org/test"); DbusmenuMenuitem * root = dbusmenu_json_build_from_file(argv[1]); - g_return_val_if_fail(root!=NULL, 1); + if (root == NULL) { + g_warning("Unable to build root"); + g_main_loop_quit(mainloop); + return; + } dbusmenu_server_set_root(server, root); g_timeout_add(10000, timer_func, NULL); + return; +} + +static void +name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data) +{ + g_error("Unable to get name '%s' on DBus", name); + g_main_loop_quit(mainloop); + return; +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + g_bus_own_name(G_BUS_TYPE_SESSION, + "org.dbusmenu.test", + G_BUS_NAME_OWNER_FLAGS_NONE, + on_bus, + NULL, + name_lost, + argv, + NULL); + mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From aabdcffea6b311cda25ad2937466d65fc4e36381 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 17 Nov 2010 21:23:27 -0600 Subject: Moving the GValues over to GVariant --- tests/test-glib-events-client.c | 14 ++++++-------- tests/test-glib-objects.c | 24 ++++++++++++------------ tests/test-glib-proxy-client.c | 7 +++---- tests/test-gtk-objects.c | 4 ++-- 4 files changed, 23 insertions(+), 26 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-events-client.c b/tests/test-glib-events-client.c index 97d5caf..ee0b821 100644 --- a/tests/test-glib-events-client.c +++ b/tests/test-glib-events-client.c @@ -35,7 +35,7 @@ static gboolean passed = TRUE; static gboolean first = TRUE; static void -event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GValue * data, guint timestamp, GError * error, gpointer user_data) +event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GVariant * data, guint timestamp, GError * error, gpointer user_data) { g_debug("Event status: %s", error == NULL ? "Sent" : "Error"); @@ -46,8 +46,8 @@ event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GV return; } - if (g_value_get_int(data) != DATA_VALUE) { - g_debug("Data value pass fail got: %d", g_value_get_int(data)); + if (g_variant_get_int32(data) != DATA_VALUE) { + g_debug("Data value pass fail got: %d", g_variant_get_int32(data)); passed = FALSE; g_main_loop_quit(mainloop); return; @@ -96,11 +96,9 @@ layout_updated (DbusmenuClient * client, gpointer user_data) return; } - GValue data = {0}; - g_value_init(&data, G_TYPE_INT); - g_value_set_int(&data, DATA_VALUE); - - dbusmenu_menuitem_handle_event(menuroot, "clicked", &data, TIMESTAMP_VALUE); + GVariant * data = g_variant_new("i", DATA_VALUE); + dbusmenu_menuitem_handle_event(menuroot, "clicked", data, TIMESTAMP_VALUE); + g_variant_unref(data); return; } diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index 1d4f673..c6a8dc9 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -77,17 +77,17 @@ test_object_menuitem_props_string (void) { /* Build a menu item */ DbusmenuMenuitem * item = dbusmenu_menuitem_new(); - const GValue * out = NULL; + GVariant * out = NULL; /* Test to make sure it's a happy object */ g_assert(item != NULL); /* Setting a string */ dbusmenu_menuitem_property_set(item, "string", "value"); - out = dbusmenu_menuitem_property_get_value(item, "string"); + out = dbusmenu_menuitem_property_get_variant(item, "string"); g_assert(out != NULL); - g_assert(G_VALUE_TYPE(out) == G_TYPE_STRING); - g_assert(!g_strcmp0(g_value_get_string(out), "value")); + g_assert(g_variant_type_equal(g_variant_get_type(out), G_VARIANT_TYPE_STRING)); + g_assert(!g_strcmp0(g_variant_get_string(out, NULL), "value")); g_assert(!g_strcmp0(dbusmenu_menuitem_property_get(item, "string"), "value")); g_object_unref(item); @@ -101,17 +101,17 @@ test_object_menuitem_props_int (void) { /* Build a menu item */ DbusmenuMenuitem * item = dbusmenu_menuitem_new(); - const GValue * out = NULL; + GVariant * out = NULL; /* Test to make sure it's a happy object */ g_assert(item != NULL); /* Setting a string */ dbusmenu_menuitem_property_set_int(item, "int", 12345); - out = dbusmenu_menuitem_property_get_value(item, "int"); + out = dbusmenu_menuitem_property_get_variant(item, "int"); g_assert(out != NULL); - g_assert(G_VALUE_TYPE(out) == G_TYPE_INT); - g_assert(g_value_get_int(out) == 12345); + g_assert(g_variant_type_equal(g_variant_get_type(out), G_VARIANT_TYPE_INT32)); + g_assert(g_variant_get_int32(out) == 12345); g_assert(dbusmenu_menuitem_property_get_int(item, "int") == 12345); g_object_unref(item); @@ -125,17 +125,17 @@ test_object_menuitem_props_bool (void) { /* Build a menu item */ DbusmenuMenuitem * item = dbusmenu_menuitem_new(); - const GValue * out = NULL; + GVariant * out = NULL; /* Test to make sure it's a happy object */ g_assert(item != NULL); /* Setting a string */ dbusmenu_menuitem_property_set_bool(item, "boolean", TRUE); - out = dbusmenu_menuitem_property_get_value(item, "boolean"); + out = dbusmenu_menuitem_property_get_variant(item, "boolean"); g_assert(out != NULL); - g_assert(G_VALUE_TYPE(out) == G_TYPE_BOOLEAN); - g_assert(g_value_get_boolean(out)); + g_assert(g_variant_type_equal(g_variant_get_type(out), G_VARIANT_TYPE_BOOLEAN)); + g_assert(g_variant_get_boolean(out)); g_assert(dbusmenu_menuitem_property_get_int(item, "boolean")); g_object_unref(item); diff --git a/tests/test-glib-proxy-client.c b/tests/test-glib-proxy-client.c index 0ae2e20..2e1e2d2 100644 --- a/tests/test-glib-proxy-client.c +++ b/tests/test-glib-proxy-client.c @@ -150,10 +150,9 @@ layout_verify_timer (gpointer data) g_main_loop_quit(mainloop); } - GValue value = {0}; - g_value_init(&value, G_TYPE_INT); - g_value_set_int(&value, 0); - dbusmenu_menuitem_handle_event(menuroot, "clicked", &value, layouton); + GVariant * value = g_variant_new("i", 0); + dbusmenu_menuitem_handle_event(menuroot, "clicked", value, layouton); + g_variant_unref(value); return FALSE; } diff --git a/tests/test-gtk-objects.c b/tests/test-gtk-objects.c index 726f404..30fc022 100644 --- a/tests/test-gtk-objects.c +++ b/tests/test-gtk-objects.c @@ -72,7 +72,7 @@ test_object_prop_pixbuf (void) g_object_unref(pixbuf); /* Check to see if it's set */ - const GValue * val = dbusmenu_menuitem_property_get_value(item, prop_name); + GVariant * val = dbusmenu_menuitem_property_get_variant(item, prop_name); g_assert(val != NULL); /* Get the pixbuf back! */ @@ -105,7 +105,7 @@ test_object_prop_shortcut (void) g_assert(success); /* Check for value */ - const GValue * val = dbusmenu_menuitem_property_get_value(item, DBUSMENU_MENUITEM_PROP_SHORTCUT); + GVariant * val = dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_SHORTCUT); g_assert(val != NULL); /* Check to see if we love it */ -- cgit v1.2.3 From cd8988a8dfd03a585860eabfc97c0e0aa8c6e912 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 18 Nov 2010 08:59:50 -0600 Subject: Switching to variants in the property changed signals --- tests/test-glib-objects.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index c6a8dc9..6afbe57 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -177,7 +177,7 @@ test_object_menuitem_props_swap (void) /* A helper to put a value into a pointer for eval. */ static void -test_object_menuitem_props_signals_helper (DbusmenuMenuitem * mi, gchar * property, GValue * value, GValue ** out) +test_object_menuitem_props_signals_helper (DbusmenuMenuitem * mi, gchar * property, GVariant * value, GVariant ** out) { if (!g_strcmp0(property, "swapper")) { *out = value; @@ -194,7 +194,7 @@ test_object_menuitem_props_signals (void) { /* Build a menu item */ DbusmenuMenuitem * item = dbusmenu_menuitem_new(); - GValue * out = NULL; + GVariant * out = NULL; /* Test to make sure it's a happy object */ g_assert(item != NULL); @@ -205,25 +205,25 @@ test_object_menuitem_props_signals (void) /* Setting a boolean */ dbusmenu_menuitem_property_set_bool(item, "swapper", TRUE); g_assert(out != NULL); - g_assert(g_value_get_boolean(out)); + g_assert(g_variant_get_boolean(out)); out = NULL; /* Setting a int */ dbusmenu_menuitem_property_set_int(item, "swapper", 5432); g_assert(out != NULL); - g_assert(g_value_get_int(out) == 5432); + g_assert(g_variant_get_int32(out) == 5432); out = NULL; /* Setting a string */ dbusmenu_menuitem_property_set(item, "swapper", "mystring"); g_assert(out != NULL); - g_assert(!g_strcmp0(g_value_get_string(out), "mystring")); + g_assert(!g_strcmp0(g_variant_get_string(out, NULL), "mystring")); out = NULL; /* Setting a boolean */ dbusmenu_menuitem_property_set_bool(item, "swapper", FALSE); g_assert(out != NULL); - g_assert(!g_value_get_boolean(out)); + g_assert(!g_variant_get_boolean(out)); out = NULL; g_object_unref(item); -- cgit v1.2.3 From 24ecbd99558d2ae2a65ad7407f547c55ffed2e4e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 18 Nov 2010 09:00:45 -0600 Subject: This now generates a warning, but unfortunately gtester fails that. --- tests/test-glib-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index 6afbe57..7143814 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -136,7 +136,7 @@ test_object_menuitem_props_bool (void) g_assert(out != NULL); g_assert(g_variant_type_equal(g_variant_get_type(out), G_VARIANT_TYPE_BOOLEAN)); g_assert(g_variant_get_boolean(out)); - g_assert(dbusmenu_menuitem_property_get_int(item, "boolean")); + /* g_assert(dbusmenu_menuitem_property_get_int(item, "boolean") == 0); */ g_object_unref(item); -- cgit v1.2.3 From 7380d970e2187af5e153250565d784abbe469bc8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 18 Nov 2010 14:42:25 -0600 Subject: Don't unref the variant we send and fix up debugging messages. --- tests/test-glib-events-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test-glib-events-client.c b/tests/test-glib-events-client.c index ee0b821..2cc5439 100644 --- a/tests/test-glib-events-client.c +++ b/tests/test-glib-events-client.c @@ -47,7 +47,7 @@ event_status (DbusmenuClient * client, DbusmenuMenuitem * item, gchar * name, GV } if (g_variant_get_int32(data) != DATA_VALUE) { - g_debug("Data value pass fail got: %d", g_variant_get_int32(data)); + g_debug("Data value pass fail got: %d", g_variant_get_int32(g_variant_get_child_value(data, 0))); passed = FALSE; g_main_loop_quit(mainloop); return; @@ -96,9 +96,8 @@ layout_updated (DbusmenuClient * client, gpointer user_data) return; } - GVariant * data = g_variant_new("i", DATA_VALUE); + GVariant * data = g_variant_new_int32(DATA_VALUE); dbusmenu_menuitem_handle_event(menuroot, "clicked", data, TIMESTAMP_VALUE); - g_variant_unref(data); return; } @@ -126,6 +125,7 @@ main (int argc, char ** argv) mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); + g_debug("Main loop complete"); g_object_unref(G_OBJECT(client)); if (passed) { -- cgit v1.2.3 From c2953a6f3f099db35bc79415f2bb0c767f325c44 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 18 Nov 2010 15:07:00 -0600 Subject: Using the name assigned instead of a default. --- tests/test-glib-proxy-proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-glib-proxy-proxy.c b/tests/test-glib-proxy-proxy.c index b9db620..38c59e2 100644 --- a/tests/test-glib-proxy-proxy.c +++ b/tests/test-glib-proxy-proxy.c @@ -63,7 +63,7 @@ main (int argc, char ** argv) g_debug("I am '%s' and I'm proxying '%s'", whoami, myproxy); g_bus_own_name(G_BUS_TYPE_SESSION, - "org.dbusmenu.test", + whoami, G_BUS_NAME_OWNER_FLAGS_NONE, on_bus, NULL, -- cgit v1.2.3 From f5cc5d5809ac1bc60ed2f90424e95988f84194db Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 19 Nov 2010 17:08:52 -0600 Subject: Wrong bus name --- tests/test-glib-proxy-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-glib-proxy-server.c b/tests/test-glib-proxy-server.c index c12a584..a5dfd4e 100644 --- a/tests/test-glib-proxy-server.c +++ b/tests/test-glib-proxy-server.c @@ -123,7 +123,7 @@ main (int argc, char ** argv) g_type_init(); g_bus_own_name(G_BUS_TYPE_SESSION, - "org.dbusmenu.test", + "test.proxy.server", G_BUS_NAME_OWNER_FLAGS_NONE, on_bus, NULL, -- cgit v1.2.3 From e811c4f900545d37aecdf18cbce911ff23e684cd Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 23 Nov 2010 13:27:13 -0600 Subject: Exporting the server before getting the name --- tests/test-glib-proxy-proxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-glib-proxy-proxy.c b/tests/test-glib-proxy-proxy.c index 38c59e2..8a17ead 100644 --- a/tests/test-glib-proxy-proxy.c +++ b/tests/test-glib-proxy-proxy.c @@ -31,7 +31,6 @@ root_changed (DbusmenuClient * client, DbusmenuMenuitem * newroot, gpointer user static void on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) { - server = dbusmenu_server_new("/org/test"); client = dbusmenu_client_new((gchar *)user_data, "/org/test"); g_signal_connect(client, DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(root_changed), server); @@ -62,6 +61,8 @@ main (int argc, char ** argv) g_debug("I am '%s' and I'm proxying '%s'", whoami, myproxy); + server = dbusmenu_server_new("/org/test"); + g_bus_own_name(G_BUS_TYPE_SESSION, whoami, G_BUS_NAME_OWNER_FLAGS_NONE, -- cgit v1.2.3 From 784522930b3102d044000ef1dd6af1854548e3be Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 23 Nov 2010 14:40:11 -0600 Subject: Convert json loader to using variants --- tests/json-loader.c | 107 ++++++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 50 deletions(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 9e67666..4d3e6aa 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -21,67 +21,75 @@ with this program. If not, see . #include "json-loader.h" -static GValue * -node2value (JsonNode * node) +static GVariant * node2variant (JsonNode * node); + +static void +array_foreach (JsonArray * array, guint index, JsonNode * node, gpointer user_data) +{ + GVariantBuilder * builder = (GVariantBuilder *)user_data; + GVariant * variant = node2variant(node); + if (variant != NULL) { + g_variant_builder_add_value(builder, variant); + } + return; +} + +static void +object_foreach (JsonObject * array, const gchar * member, JsonNode * node, gpointer user_data) +{ + GVariantBuilder * builder = (GVariantBuilder *)user_data; + GVariant * variant = node2variant(node); + if (variant != NULL) { + g_variant_builder_add(builder, "{sv}", member, variant); + } + return; +} + +static GVariant * +node2variant (JsonNode * node) { if (node == NULL) { return NULL; } - GValue * value = g_new0(GValue, 1); - if (JSON_NODE_TYPE(node) == JSON_NODE_VALUE) { - json_node_get_value(node, value); - return value; + switch (json_node_get_value_type(node)) { + case G_TYPE_INT: + case G_TYPE_INT64: + return g_variant_new_int64(json_node_get_int(node)); + case G_TYPE_DOUBLE: + case G_TYPE_FLOAT: + return g_variant_new_double(json_node_get_double(node)); + case G_TYPE_BOOLEAN: + return g_variant_new_boolean(json_node_get_boolean(node)); + case G_TYPE_STRING: + return g_variant_new_string(json_node_get_string(node)); + default: + g_assert_not_reached(); + } } if (JSON_NODE_TYPE(node) == JSON_NODE_ARRAY) { + GVariantBuilder builder; + g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY); + JsonArray * array = json_node_get_array(node); - JsonNode * first = json_array_get_element(array, 0); - - if (JSON_NODE_TYPE(first) == JSON_NODE_VALUE) { - GValue subvalue = {0}; - json_node_get_value(first, &subvalue); - - if (G_VALUE_TYPE(&subvalue) == G_TYPE_STRING) { - GArray * garray = g_array_sized_new(TRUE, TRUE, sizeof(gchar *), json_array_get_length(array)); - g_value_init(value, G_TYPE_STRV); - g_value_take_boxed(value, garray->data); - - int i; - for (i = 0; i < json_array_get_length(array); i++) { - const gchar * str = json_node_get_string(json_array_get_element(array, i)); - gchar * dupstr = g_strdup(str); - g_array_append_val(garray, dupstr); - } - - g_array_free(garray, FALSE); - } else { - GValueArray * varray = g_value_array_new(json_array_get_length(array)); - g_value_init(value, G_TYPE_VALUE_ARRAY); - g_value_take_boxed(value, varray); - - g_value_array_append(varray, &subvalue); - g_value_unset(&subvalue); - - int i; - for (i = 1; i < json_array_get_length(array); i++) { - json_node_get_value(first, &subvalue); - g_value_array_append(varray, &subvalue); - g_value_unset(&subvalue); - } - } + json_array_foreach_element(array, array_foreach, &builder); - } else { - g_warning("Complex array not supported"); - } + return g_variant_builder_end(&builder); } if (JSON_NODE_TYPE(node) == JSON_NODE_OBJECT) { - g_warning("Object nodes are a problem"); + GVariantBuilder builder; + g_variant_builder_init(&builder, G_VARIANT_TYPE_DICTIONARY); + + JsonObject * array = json_node_get_object(node); + json_object_foreach_member(array, object_foreach, &builder); + + return g_variant_builder_end(&builder); } - return value; + return NULL; } static void @@ -97,12 +105,11 @@ set_props (DbusmenuMenuitem * mi, JsonObject * node) if (!g_strcmp0(member, "submenu")) { continue; } JsonNode * lnode = json_object_get_member(node, member); - GValue * value = node2value(lnode); + GVariant * variant = node2variant(lnode); - if (value != NULL) { - dbusmenu_menuitem_property_set_value(mi, member, value); - g_value_unset(value); - g_free(value); + if (variant != NULL) { + dbusmenu_menuitem_property_set_variant(mi, member, variant); + g_variant_unref(variant); } } -- cgit v1.2.3 From cd6960896d1f3b6143737eadd53ba69561eba2a8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 1 Dec 2010 15:48:08 -0600 Subject: Changing the quoting so that the test passes --- tests/test-json-01.json | 1644 +++++++++++++++++++++++------------------------ 1 file changed, 822 insertions(+), 822 deletions(-) (limited to 'tests') diff --git a/tests/test-json-01.json b/tests/test-json-01.json index 08e9112..b626d20 100644 --- a/tests/test-json-01.json +++ b/tests/test-json-01.json @@ -1,127 +1,127 @@ { "id": 0, - "children-display": "submenu", + "children-display": 'submenu', "submenu": [ { "id": 5, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "File", + "label": 'File', "visible": true, "submenu": [ { "id": 6, "enabled": true, - "label": "Quit", - "shortcut": [["Control", "q"]], + "label": 'Quit', + "shortcut": [['Control', 'q']], "visible": true }, { "id": 7, "enabled": true, - "label": "Close all", - "shortcut": [["Control", "Shift", "w"]], + "label": 'Close all', + "shortcut": [['Control', 'Shift', 'w']], "visible": true }, { "id": 8, "enabled": true, - "label": "Close", - "shortcut": [["Control", "w"]], + "label": 'Close', + "shortcut": [['Control', 'w']], "visible": true }, { "id": 9, - "type": "separator" + "type": 'separator' }, { "id": 10, "enabled": true, - "label": "Send by Email...", + "label": 'Send by Email...', "visible": true }, { "id": 11, "enabled": true, - "label": "Print...", - "shortcut": [["Control", "p"]], + "label": 'Print...', + "shortcut": [['Control', 'p']], "visible": true }, { "id": 12, "enabled": true, - "label": "Page Setup", + "label": 'Page Setup', "visible": true }, { "id": 13, - "type": "separator" + "type": 'separator' }, { "id": 14, "enabled": true, - "label": "Revert", + "label": 'Revert', "visible": true }, { "id": 15, "enabled": true, - "label": "Save as Template...", + "label": 'Save as Template...', "visible": true }, { "id": 16, "enabled": true, - "label": "Save a Copy...", + "label": 'Save a Copy...', "visible": true }, { "id": 17, "enabled": true, - "label": "Save As...", - "shortcut": [["Control", "Shift", "s"]], + "label": 'Save As...', + "shortcut": [['Control', 'Shift', 's']], "visible": true }, { "id": 18, "enabled": true, - "label": "Save", - "shortcut": [["Control", "s"]], + "label": 'Save', + "shortcut": [['Control', 's']], "visible": true }, { "id": 19, - "type": "separator" + "type": 'separator' }, { "id": 20, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Open Recent", + "label": 'Open Recent', "visible": true, "submenu": [ { "id": 21, "enabled": true, - "label": "Document History", + "label": 'Document History', "visible": true }, { "id": 22, - "type": "separator" + "type": 'separator' }, { "id": 23, "enabled": true, - "label": "giggity.jpg", - "shortcut": [["Control", "2"]], + "label": 'giggity.jpg', + "shortcut": [['Control', '2']], "visible": true }, { "id": 24, "enabled": true, - "label": "Icon Height.svg", - "shortcut": [["Control", "1"]], + "label": 'Icon Height.svg', + "shortcut": [['Control', '1']], "visible": true } ] @@ -129,150 +129,150 @@ { "id": 25, "enabled": true, - "label": "Open Location...", + "label": 'Open Location...', "visible": true }, { "id": 26, "enabled": true, - "label": "Open as Layers...", - "shortcut": [["Control", "Alt", "o"]], + "label": 'Open as Layers...', + "shortcut": [['Control', 'Alt', 'o']], "visible": true }, { "id": 27, "enabled": true, - "label": "Open...", - "shortcut": [["Control", "o"]], + "label": 'Open...', + "shortcut": [['Control', 'o']], "visible": true }, { "id": 28, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Create", + "label": 'Create', "visible": true, "submenu": [ { "id": 29, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Web Page Themes", + "label": 'Web Page Themes', "visible": true, "submenu": [ { "id": 30, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Classic.Gimp.Org", + "label": 'Classic.Gimp.Org', "visible": true, "submenu": [ { "id": 31, "enabled": true, - "label": "Tube Sub-Sub-Button Label...", + "label": 'Tube Sub-Sub-Button Label...', "visible": true }, { "id": 32, "enabled": true, - "label": "Tube Sub-Button Label...", + "label": 'Tube Sub-Button Label...', "visible": true }, { "id": 33, "enabled": true, - "label": "Tube Button Label...", + "label": 'Tube Button Label...', "visible": true }, { "id": 34, "enabled": true, - "label": "Small Header...", + "label": 'Small Header...', "visible": true }, { "id": 35, "enabled": true, - "label": "General Tube Labels...", + "label": 'General Tube Labels...', "visible": true }, { "id": 36, "enabled": true, - "label": "Big Header...", + "label": 'Big Header...', "visible": true } ] }, { "id": 37, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Beveled Pattern", + "label": 'Beveled Pattern', "visible": true, "submenu": [ { "id": 38, "enabled": true, - "label": "Hrule...", + "label": 'Hrule...', "visible": true }, { "id": 39, "enabled": true, - "label": "Heading...", + "label": 'Heading...', "visible": true }, { "id": 40, "enabled": true, - "label": "Button...", + "label": 'Button...', "visible": true }, { "id": 41, "enabled": true, - "label": "Bullet...", + "label": 'Bullet...', "visible": true }, { "id": 42, "enabled": true, - "label": "Arrow...", + "label": 'Arrow...', "visible": true } ] }, { "id": 43, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Alien Glow", + "label": 'Alien Glow', "visible": true, "submenu": [ { "id": 44, "enabled": true, - "label": "Hrule...", + "label": 'Hrule...', "visible": true }, { "id": 45, "enabled": true, - "label": "Button...", + "label": 'Button...', "visible": true }, { "id": 46, "enabled": true, - "label": "Bullet...", + "label": 'Bullet...', "visible": true }, { "id": 47, "enabled": true, - "label": "Arrow...", + "label": 'Arrow...', "visible": true } ] @@ -281,274 +281,274 @@ }, { "id": 48, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Patterns", + "label": 'Patterns', "visible": true, "submenu": [ { "id": 49, "enabled": true, - "label": "Truchet...", + "label": 'Truchet...', "visible": true }, { "id": 50, "enabled": true, - "label": "Swirly...", + "label": 'Swirly...', "visible": true }, { "id": 51, "enabled": true, - "label": "Swirl-Tile...", + "label": 'Swirl-Tile...', "visible": true }, { "id": 52, "enabled": true, - "label": "Render Map...", + "label": 'Render Map...', "visible": true }, { "id": 53, "enabled": true, - "label": "Land...", + "label": 'Land...', "visible": true }, { "id": 54, "enabled": true, - "label": "Flatland...", + "label": 'Flatland...', "visible": true }, { "id": 55, "enabled": true, - "label": "Camouflage...", + "label": 'Camouflage...', "visible": true }, { "id": 56, "enabled": true, - "label": "3D Truchet...", + "label": '3D Truchet...', "visible": true } ] }, { "id": 57, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Logos", + "label": 'Logos', "visible": true, "submenu": [ { "id": 58, "enabled": true, - "label": "Web Title Header...", + "label": 'Web Title Header...', "visible": true }, { "id": 59, "enabled": true, - "label": "Textured...", + "label": 'Textured...', "visible": true }, { "id": 60, "enabled": true, - "label": "Text Circle...", + "label": 'Text Circle...', "visible": true }, { "id": 61, "enabled": true, - "label": "Starscape...", + "label": 'Starscape...', "visible": true }, { "id": 62, "enabled": true, - "label": "Speed Text...", + "label": 'Speed Text...', "visible": true }, { "id": 63, "enabled": true, - "label": "SOTA Chrome...", + "label": 'SOTA Chrome...', "visible": true }, { "id": 64, "enabled": true, - "label": "Particle Trace...", + "label": 'Particle Trace...', "visible": true }, { "id": 65, "enabled": true, - "label": "Newsprint Text...", + "label": 'Newsprint Text...', "visible": true }, { "id": 66, "enabled": true, - "label": "Neon...", + "label": 'Neon...', "visible": true }, { "id": 67, "enabled": true, - "label": "Imigre-26...", + "label": 'Imigre-26...', "visible": true }, { "id": 68, "enabled": true, - "label": "Gradient Bevel...", + "label": 'Gradient Bevel...', "visible": true }, { "id": 69, "enabled": true, - "label": "Glowing Hot...", + "label": 'Glowing Hot...', "visible": true }, { "id": 70, "enabled": true, - "label": "Glossy...", + "label": 'Glossy...', "visible": true }, { "id": 71, "enabled": true, - "label": "Frosty...", + "label": 'Frosty...', "visible": true }, { "id": 72, "enabled": true, - "label": "Crystal...", + "label": 'Crystal...', "visible": true }, { "id": 73, "enabled": true, - "label": "Cool Metal...", + "label": 'Cool Metal...', "visible": true }, { "id": 74, "enabled": true, - "label": "Comic Book...", + "label": 'Comic Book...', "visible": true }, { "id": 75, "enabled": true, - "label": "Chrome...", + "label": 'Chrome...', "visible": true }, { "id": 76, "enabled": true, - "label": "Chip Away...", + "label": 'Chip Away...', "visible": true }, { "id": 77, "enabled": true, - "label": "Chalk...", + "label": 'Chalk...', "visible": true }, { "id": 78, "enabled": true, - "label": "Carved...", + "label": 'Carved...', "visible": true }, { "id": 79, "enabled": true, - "label": "Bovination...", + "label": 'Bovination...', "visible": true }, { "id": 80, "enabled": true, - "label": "Blended...", + "label": 'Blended...', "visible": true }, { "id": 81, "enabled": true, - "label": "Basic I...", + "label": 'Basic I...', "visible": true }, { "id": 82, "enabled": true, - "label": "Basic II...", + "label": 'Basic II...', "visible": true }, { "id": 83, "enabled": true, - "label": "Alien Neon...", + "label": 'Alien Neon...', "visible": true }, { "id": 84, "enabled": true, - "label": "Alien Glow...", + "label": 'Alien Glow...', "visible": true }, { "id": 85, "enabled": true, - "label": "3D Outline...", + "label": '3D Outline...', "visible": true } ] }, { "id": 86, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Buttons", + "label": 'Buttons', "visible": true, "submenu": [ { "id": 87, "enabled": true, - "label": "Simple Beveled Button...", + "label": 'Simple Beveled Button...', "visible": true }, { "id": 88, "enabled": true, - "label": "Round Button...", + "label": 'Round Button...', "visible": true } ] }, { "id": 89, - "type": "separator" + "type": 'separator' }, { "id": 90, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "xscanimage", + "label": 'xscanimage', "visible": true, "submenu": [ { "id": 91, "enabled": false, - "label": "Device dialog...", + "label": 'Device dialog...', "visible": true } ] @@ -556,14 +556,14 @@ { "id": 92, "enabled": true, - "label": "Screenshot...", + "label": 'Screenshot...', "visible": true }, { "id": 93, "enabled": true, - "label": "From Clipboard", - "shortcut": [["Control", "Shift", "v"]], + "label": 'From Clipboard', + "shortcut": [['Control', 'Shift', 'v']], "visible": true } ] @@ -571,154 +571,154 @@ { "id": 94, "enabled": true, - "label": "New...", - "shortcut": [["Control", "n"]], + "label": 'New...', + "shortcut": [['Control', 'n']], "visible": true } ] }, { "id": 95, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Edit", + "label": 'Edit', "visible": true, "submenu": [ { "id": 96, "enabled": true, - "label": "Units", + "label": 'Units', "visible": true }, { "id": 97, "enabled": true, - "label": "Modules", + "label": 'Modules', "visible": true }, { "id": 98, "enabled": true, - "label": "Keyboard Shortcuts", + "label": 'Keyboard Shortcuts', "visible": true }, { "id": 99, "enabled": true, - "label": "Preferences", + "label": 'Preferences', "visible": true }, { "id": 100, - "type": "separator" + "type": 'separator' }, { "id": 101, "enabled": false, - "label": "Stroke Path...", + "label": 'Stroke Path...', "visible": true }, { "id": 102, "enabled": false, - "label": "Stroke Selection...", + "label": 'Stroke Selection...', "visible": true }, { "id": 103, "enabled": true, - "label": "Fill with Pattern", - "shortcut": [["Control", "semicolon"]], + "label": 'Fill with Pattern', + "shortcut": [['Control', 'semicolon']], "visible": true }, { "id": 104, "enabled": true, - "label": "Fill with BG Color", - "shortcut": [["Control", "period"]], + "label": 'Fill with BG Color', + "shortcut": [['Control', 'period']], "visible": true }, { "id": 105, "enabled": true, - "label": "Fill with FG Color", - "shortcut": [["Control", "comma"]], + "label": 'Fill with FG Color', + "shortcut": [['Control', 'comma']], "visible": true }, { "id": 106, "enabled": true, - "label": "Clear", - "shortcut": [["Delete"]], + "label": 'Clear', + "shortcut": [['Delete']], "visible": true }, { "id": 107, - "type": "separator" + "type": 'separator' }, { "id": 108, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Buffer", + "label": 'Buffer', "visible": true, "submenu": [ { "id": 109, "enabled": true, - "label": "Paste Named...", + "label": 'Paste Named...', "visible": true }, { "id": 110, "enabled": true, - "label": "Copy Visible Named...", + "label": 'Copy Visible Named...', "visible": true }, { "id": 111, "enabled": true, - "label": "Copy Named...", + "label": 'Copy Named...', "visible": true }, { "id": 112, "enabled": true, - "label": "Cut Named...", + "label": 'Cut Named...', "visible": true } ] }, { "id": 113, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Paste as", + "label": 'Paste as', "visible": true, "submenu": [ { "id": 114, "enabled": true, - "label": "New Pattern...", + "label": 'New Pattern...', "visible": true }, { "id": 115, "enabled": true, - "label": "New Brush...", + "label": 'New Brush...', "visible": true }, { "id": 116, "enabled": true, - "label": "New Layer", + "label": 'New Layer', "visible": true }, { "id": 117, "enabled": true, - "label": "New Image", - "shortcut": [["Control", "Shift", "v"]], + "label": 'New Image', + "shortcut": [['Control', 'Shift', 'v']], "visible": true } ] @@ -726,390 +726,390 @@ { "id": 118, "enabled": true, - "label": "Paste Into", + "label": 'Paste Into', "visible": true }, { "id": 119, "enabled": true, - "label": "Paste", - "shortcut": [["Control", "v"]], + "label": 'Paste', + "shortcut": [['Control', 'v']], "visible": true }, { "id": 120, "enabled": true, - "label": "Copy Visible", - "shortcut": [["Control", "Shift", "c"]], + "label": 'Copy Visible', + "shortcut": [['Control', 'Shift', 'c']], "visible": true }, { "id": 121, "enabled": true, - "label": "Copy", - "shortcut": [["Control", "c"]], + "label": 'Copy', + "shortcut": [['Control', 'c']], "visible": true }, { "id": 122, "enabled": true, - "label": "Cut", - "shortcut": [["Control", "x"]], + "label": 'Cut', + "shortcut": [['Control', 'x']], "visible": true }, { "id": 123, - "type": "separator" + "type": 'separator' }, { "id": 124, "enabled": true, - "label": "Undo History", + "label": 'Undo History', "visible": true }, { "id": 3, "enabled": false, - "label": "_Fade...", + "label": '_Fade...', "visible": true }, { "id": 2, "enabled": false, - "label": "_Redo", - "shortcut": [["Control", "y"]], + "label": '_Redo', + "shortcut": [['Control', 'y']], "visible": true }, { "id": 1, "enabled": false, - "label": "_Undo", - "shortcut": [["Control", "z"]], + "label": '_Undo', + "shortcut": [['Control', 'z']], "visible": true } ] }, { "id": 125, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Select", + "label": 'Select', "visible": true, "submenu": [ { "id": 126, "enabled": false, - "label": "To Path", + "label": 'To Path', "visible": true }, { "id": 127, "enabled": true, - "label": "Save to Channel", + "label": 'Save to Channel', "visible": true }, { "id": 128, "enabled": true, - "label": "Toggle Quick Mask", - "shortcut": [["Shift", "q"]], + "label": 'Toggle Quick Mask', + "shortcut": [['Shift', 'q']], "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 129, - "type": "separator" + "type": 'separator' }, { "id": 130, "enabled": true, - "label": "Distort...", + "label": 'Distort...', "visible": true }, { "id": 131, "enabled": false, - "label": "Border...", + "label": 'Border...', "visible": true }, { "id": 132, "enabled": false, - "label": "Grow...", + "label": 'Grow...', "visible": true }, { "id": 133, "enabled": false, - "label": "Shrink...", + "label": 'Shrink...', "visible": true }, { "id": 134, "enabled": false, - "label": "Sharpen", + "label": 'Sharpen', "visible": true }, { "id": 135, "enabled": false, - "label": "Feather...", + "label": 'Feather...', "visible": true }, { "id": 136, - "type": "separator" + "type": 'separator' }, { "id": 137, "enabled": true, - "label": "Selection Editor", + "label": 'Selection Editor', "visible": true }, { "id": 138, "enabled": false, - "label": "From Path", - "shortcut": [["Shift", "v"]], + "label": 'From Path', + "shortcut": [['Shift', 'v']], "visible": true }, { "id": 139, "enabled": true, - "label": "By Color", - "shortcut": [["Shift", "o"]], + "label": 'By Color', + "shortcut": [['Shift', 'o']], "visible": true }, { "id": 140, "enabled": false, - "label": "Float", - "shortcut": [["Control", "Shift", "l"]], + "label": 'Float', + "shortcut": [['Control', 'Shift', 'l']], "visible": true }, { "id": 141, "enabled": true, - "label": "Invert", - "shortcut": [["Control", "i"]], + "label": 'Invert', + "shortcut": [['Control', 'i']], "visible": true }, { "id": 142, "enabled": false, - "label": "None", - "shortcut": [["Control", "Shift", "a"]], + "label": 'None', + "shortcut": [['Control', 'Shift', 'a']], "visible": true }, { "id": 143, "enabled": true, - "label": "All", - "shortcut": [["Control", "a"]], + "label": 'All', + "shortcut": [['Control', 'a']], "visible": true } ] }, { "id": 144, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "View", + "label": 'View', "visible": true, "submenu": [ { "id": 145, "enabled": true, - "label": "Show Statusbar", + "label": 'Show Statusbar', "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 146, "enabled": true, - "label": "Show Scrollbars", + "label": 'Show Scrollbars', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 147, "enabled": true, - "label": "Show Rulers", - "shortcut": [["Control", "Shift", "r"]], + "label": 'Show Rulers', + "shortcut": [['Control', 'Shift', 'r']], "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 148, "enabled": true, - "label": "Show Menubar", + "label": 'Show Menubar', "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 149, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Padding Color", + "label": 'Padding Color', "visible": true, "submenu": [ { "id": 150, "enabled": true, - "label": "As in Preferences", + "label": 'As in Preferences', "visible": true }, { "id": 151, - "type": "separator" + "type": 'separator' }, { "id": 152, "enabled": true, - "label": "Select Custom Color...", + "label": 'Select Custom Color...', "visible": true }, { "id": 153, "enabled": true, - "label": "Dark Check Color", + "label": 'Dark Check Color', "visible": true }, { "id": 154, "enabled": true, - "label": "Light Check Color", + "label": 'Light Check Color', "visible": true }, { "id": 155, "enabled": true, - "label": "From Theme", + "label": 'From Theme', "visible": true } ] }, { "id": 156, - "type": "separator" + "type": 'separator' }, { "id": 157, "enabled": true, - "label": "Snap to Active Path", + "label": 'Snap to Active Path', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 158, "enabled": true, - "label": "Snap to Canvas Edges", + "label": 'Snap to Canvas Edges', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 159, "enabled": true, - "label": "Snap to Grid", + "label": 'Snap to Grid', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 160, "enabled": true, - "label": "Snap to Guides", + "label": 'Snap to Guides', "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 161, - "type": "separator" + "type": 'separator' }, { "id": 162, "enabled": true, - "label": "Show Sample Points", + "label": 'Show Sample Points', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 163, "enabled": true, - "label": "Show Grid", + "label": 'Show Grid', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 164, "enabled": true, - "label": "Show Guides", - "shortcut": [["Control", "Shift", "t"]], + "label": 'Show Guides', + "shortcut": [['Control', 'Shift', 't']], "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 165, "enabled": true, - "label": "Show Layer Boundary", + "label": 'Show Layer Boundary', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 166, "enabled": true, - "label": "Show Selection", - "shortcut": [["Control", "t"]], + "label": 'Show Selection', + "shortcut": [['Control', 't']], "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 167, - "type": "separator" + "type": 'separator' }, { "id": 168, "enabled": true, - "label": "Display Filters...", + "label": 'Display Filters...', "visible": true }, { "id": 169, "enabled": true, - "label": "Navigation Window", + "label": 'Navigation Window', "visible": true }, { "id": 170, - "type": "separator" + "type": 'separator' }, { "id": 171, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Fullscreen", - "shortcut": [["F11"]], + "label": 'Fullscreen', + "shortcut": [['F11']], "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true, "submenu": [ { "id": 172, "enabled": true, - "label": "Open Display...", + "label": 'Open Display...', "visible": true } ] @@ -1117,142 +1117,142 @@ { "id": 173, "enabled": true, - "label": "Shrink Wrap", - "shortcut": [["Control", "e"]], + "label": 'Shrink Wrap', + "shortcut": [['Control', 'e']], "visible": true }, { "id": 174, - "type": "separator" + "type": 'separator' }, { "id": 175, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "_Zoom (67%)", + "label": '_Zoom (67%)', "visible": true, "submenu": [ { "id": 176, "enabled": true, - "label": "Othe_r (67%)...", + "label": 'Othe_r (67%)...', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 177, - "type": "separator" + "type": 'separator' }, { "id": 178, "enabled": true, - "label": "1:16 (6.25%)", + "label": '1:16 (6.25%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 179, "enabled": true, - "label": "1:8 (12.5%)", + "label": '1:8 (12.5%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 180, "enabled": true, - "label": "1:4 (25%)", + "label": '1:4 (25%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 181, "enabled": true, - "label": "1:2 (50%)", + "label": '1:2 (50%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 182, "enabled": true, - "label": "1:1 (100%)", - "shortcut": [["1"]], + "label": '1:1 (100%)', + "shortcut": [['1']], "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 183, "enabled": true, - "label": "2:1 (200%)", + "label": '2:1 (200%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 184, "enabled": true, - "label": "4:1 (400%)", + "label": '4:1 (400%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 185, "enabled": true, - "label": "8:1 (800%)", + "label": '8:1 (800%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 186, "enabled": true, - "label": "16:1 (1600%)", + "label": '16:1 (1600%)', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 187, - "type": "separator" + "type": 'separator' }, { "id": 188, "enabled": true, - "label": "Fill Window", + "label": 'Fill Window', "visible": true }, { "id": 189, "enabled": true, - "label": "Fit Image in Window", - "shortcut": [["Control", "Shift", "e"]], + "label": 'Fit Image in Window', + "shortcut": [['Control', 'Shift', 'e']], "visible": true }, { "id": 190, "enabled": true, - "label": "Zoom In", - "shortcut": [["plus"]], + "label": 'Zoom In', + "shortcut": [['plus']], "visible": true }, { "id": 191, "enabled": true, - "label": "Zoom Out", - "shortcut": [["minus"]], + "label": 'Zoom Out', + "shortcut": [['minus']], "visible": true }, { "id": 4, "enabled": true, - "label": "Re_vert Zoom (67%)", - "shortcut": [["grave"]], + "label": 'Re_vert Zoom (67%)', + "shortcut": [['grave']], "visible": true } ] @@ -1260,253 +1260,253 @@ { "id": 192, "enabled": true, - "label": "Dot for Dot", + "label": 'Dot for Dot', "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 193, "enabled": true, - "label": "New View", + "label": 'New View', "visible": true } ] }, { "id": 194, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Image", + "label": 'Image', "visible": true, "submenu": [ { "id": 195, "enabled": true, - "label": "Image Properties", - "shortcut": [["Alt", "Return"]], + "label": 'Image Properties', + "shortcut": [['Alt', 'Return']], "visible": true }, { "id": 196, "enabled": true, - "label": "Configure Grid...", + "label": 'Configure Grid...', "visible": true }, { "id": 197, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Guides", + "label": 'Guides', "visible": true, "submenu": [ { "id": 198, "enabled": true, - "label": "Remove all Guides", + "label": 'Remove all Guides', "visible": true }, { "id": 199, "enabled": true, - "label": "New Guides from Selection", + "label": 'New Guides from Selection', "visible": true }, { "id": 200, "enabled": true, - "label": "New Guide...", + "label": 'New Guide...', "visible": true }, { "id": 201, "enabled": true, - "label": "New Guide (by Percent)...", + "label": 'New Guide (by Percent)...', "visible": true } ] }, { "id": 202, - "type": "separator" + "type": 'separator' }, { "id": 203, "enabled": true, - "label": "Align Visible Layers...", + "label": 'Align Visible Layers...', "visible": true }, { "id": 204, "enabled": true, - "label": "Flatten Image", + "label": 'Flatten Image', "visible": true }, { "id": 205, "enabled": true, - "label": "Merge Visible Layers...", - "shortcut": [["Control", "m"]], + "label": 'Merge Visible Layers...', + "shortcut": [['Control', 'm']], "visible": true }, { "id": 206, - "type": "separator" + "type": 'separator' }, { "id": 207, "enabled": true, - "label": "Zealous Crop", + "label": 'Zealous Crop', "visible": true }, { "id": 208, "enabled": true, - "label": "Autocrop Image", + "label": 'Autocrop Image', "visible": true }, { "id": 209, "enabled": false, - "label": "Crop to Selection", + "label": 'Crop to Selection', "visible": true }, { "id": 210, - "type": "separator" + "type": 'separator' }, { "id": 211, "enabled": true, - "label": "Scale Image...", + "label": 'Scale Image...', "visible": true }, { "id": 212, "enabled": true, - "label": "Print Size...", + "label": 'Print Size...', "visible": true }, { "id": 213, "enabled": false, - "label": "Fit Canvas to Selection", + "label": 'Fit Canvas to Selection', "visible": true }, { "id": 214, "enabled": true, - "label": "Fit Canvas to Layers", + "label": 'Fit Canvas to Layers', "visible": true }, { "id": 215, "enabled": true, - "label": "Canvas Size...", + "label": 'Canvas Size...', "visible": true }, { "id": 216, - "type": "separator" + "type": 'separator' }, { "id": 217, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Transform", + "label": 'Transform', "visible": true, "submenu": [ { "id": 218, "enabled": true, - "label": "Guillotine", + "label": 'Guillotine', "visible": true }, { "id": 219, - "type": "separator" + "type": 'separator' }, { "id": 220, "enabled": true, - "label": "Rotate 180\302\260", + "label": 'Rotate 180?', "visible": true }, { "id": 221, "enabled": true, - "label": "Rotate 90\302\260 counter-clockwise", + "label": 'Rotate 90? counter-clockwise', "visible": true }, { "id": 222, "enabled": true, - "label": "Rotate 90\302\260 clockwise", + "label": 'Rotate 90? clockwise', "visible": true }, { "id": 223, - "type": "separator" + "type": 'separator' }, { "id": 224, "enabled": true, - "label": "Flip Vertically", + "label": 'Flip Vertically', "visible": true }, { "id": 225, "enabled": true, - "label": "Flip Horizontally", + "label": 'Flip Horizontally', "visible": true } ] }, { "id": 226, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Mode", + "label": 'Mode', "visible": true, "submenu": [ { "id": 227, "enabled": true, - "label": "Convert to Color Profile...", + "label": 'Convert to Color Profile...', "visible": true }, { "id": 228, "enabled": true, - "label": "Assign Color Profile...", + "label": 'Assign Color Profile...', "visible": true }, { "id": 229, - "type": "separator" + "type": 'separator' }, { "id": 230, "enabled": true, - "label": "Indexed...", + "label": 'Indexed...', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 231, "enabled": true, - "label": "Grayscale", + "label": 'Grayscale', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 232, "enabled": true, - "label": "RGB", + "label": 'RGB', "toggle-state": 1, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true } ] @@ -1514,347 +1514,347 @@ { "id": 233, "enabled": true, - "label": "Duplicate", - "shortcut": [["Control", "d"]], + "label": 'Duplicate', + "shortcut": [['Control', 'd']], "visible": true } ] }, { "id": 234, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Layer", + "label": 'Layer', "visible": true, "submenu": [ { "id": 235, "enabled": true, - "label": "Autocrop Layer", + "label": 'Autocrop Layer', "visible": true }, { "id": 236, "enabled": false, - "label": "Crop to Selection", + "label": 'Crop to Selection', "visible": true }, { "id": 237, "enabled": true, - "label": "Scale Layer...", + "label": 'Scale Layer...', "visible": true }, { "id": 238, "enabled": true, - "label": "Layer to Image Size", + "label": 'Layer to Image Size', "visible": true }, { "id": 239, "enabled": true, - "label": "Layer Boundary Size...", + "label": 'Layer Boundary Size...', "visible": true }, { "id": 240, - "type": "separator" + "type": 'separator' }, { "id": 241, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Transform", + "label": 'Transform', "visible": true, "submenu": [ { "id": 242, "enabled": true, - "label": "Offset...", - "shortcut": [["Control", "Shift", "o"]], + "label": 'Offset...', + "shortcut": [['Control', 'Shift', 'o']], "visible": true }, { "id": 243, - "type": "separator" + "type": 'separator' }, { "id": 244, "enabled": true, - "label": "Arbitrary Rotation...", + "label": 'Arbitrary Rotation...', "visible": true }, { "id": 245, "enabled": true, - "label": "Rotate 180\302\260", + "label": 'Rotate 180?', "visible": true }, { "id": 246, "enabled": true, - "label": "Rotate 90\302\260 counter-clockwise", + "label": 'Rotate 90? counter-clockwise', "visible": true }, { "id": 247, "enabled": true, - "label": "Rotate 90\302\260 clockwise", + "label": 'Rotate 90? clockwise', "visible": true }, { "id": 248, - "type": "separator" + "type": 'separator' }, { "id": 249, "enabled": true, - "label": "Flip Vertically", + "label": 'Flip Vertically', "visible": true }, { "id": 250, "enabled": true, - "label": "Flip Horizontally", + "label": 'Flip Horizontally', "visible": true } ] }, { "id": 251, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Transparency", + "label": 'Transparency', "visible": true, "submenu": [ { "id": 252, "enabled": true, - "label": "Intersect with Selection", + "label": 'Intersect with Selection', "visible": true }, { "id": 253, "enabled": true, - "label": "Subtract from Selection", + "label": 'Subtract from Selection', "visible": true }, { "id": 254, "enabled": true, - "label": "Add to Selection", + "label": 'Add to Selection', "visible": true }, { "id": 255, "enabled": true, - "label": "Alpha to Selection", + "label": 'Alpha to Selection', "visible": true }, { "id": 256, - "type": "separator" + "type": 'separator' }, { "id": 257, "enabled": true, - "label": "Threshold Alpha...", + "label": 'Threshold Alpha...', "visible": true }, { "id": 258, "enabled": true, - "label": "Semi-Flatten", + "label": 'Semi-Flatten', "visible": true }, { "id": 259, "enabled": true, - "label": "Color to Alpha...", + "label": 'Color to Alpha...', "visible": true }, { "id": 260, "enabled": true, - "label": "Remove Alpha Channel", + "label": 'Remove Alpha Channel', "visible": true }, { "id": 261, "enabled": false, - "label": "Add Alpha Channel", + "label": 'Add Alpha Channel', "visible": true } ] }, { "id": 262, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Mask", + "label": 'Mask', "visible": true, "submenu": [ { "id": 263, "enabled": false, - "label": "Intersect with Selection", + "label": 'Intersect with Selection', "visible": true }, { "id": 264, "enabled": false, - "label": "Subtract from Selection", + "label": 'Subtract from Selection', "visible": true }, { "id": 265, "enabled": false, - "label": "Add to Selection", + "label": 'Add to Selection', "visible": true }, { "id": 266, "enabled": false, - "label": "Mask to Selection", + "label": 'Mask to Selection', "visible": true }, { "id": 267, - "type": "separator" + "type": 'separator' }, { "id": 268, "enabled": false, - "label": "Disable Layer Mask", + "label": 'Disable Layer Mask', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 269, "enabled": false, - "label": "Edit Layer Mask", + "label": 'Edit Layer Mask', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 270, "enabled": false, - "label": "Show Layer Mask", + "label": 'Show Layer Mask', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 271, - "type": "separator" + "type": 'separator' }, { "id": 272, "enabled": false, - "label": "Delete Layer Mask", + "label": 'Delete Layer Mask', "visible": true }, { "id": 273, "enabled": false, - "label": "Apply Layer Mask", + "label": 'Apply Layer Mask', "visible": true }, { "id": 274, "enabled": true, - "label": "Add Layer Mask...", + "label": 'Add Layer Mask...', "visible": true } ] }, { "id": 275, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Stack", + "label": 'Stack', "visible": true, "submenu": [ { "id": 276, "enabled": true, - "label": "Reverse Layer Order", + "label": 'Reverse Layer Order', "visible": true }, { "id": 277, - "type": "separator" + "type": 'separator' }, { "id": 278, "enabled": false, - "label": "Layer to Bottom", + "label": 'Layer to Bottom', "visible": true }, { "id": 279, "enabled": false, - "label": "Layer to Top", + "label": 'Layer to Top', "visible": true }, { "id": 280, "enabled": false, - "label": "Lower Layer", + "label": 'Lower Layer', "visible": true }, { "id": 281, "enabled": false, - "label": "Raise Layer", + "label": 'Raise Layer', "visible": true }, { "id": 282, - "type": "separator" + "type": 'separator' }, { "id": 283, "enabled": false, - "label": "Select Bottom Layer", - "shortcut": [["End"]], + "label": 'Select Bottom Layer', + "shortcut": [['End']], "visible": true }, { "id": 284, "enabled": false, - "label": "Select Top Layer", - "shortcut": [["Home"]], + "label": 'Select Top Layer', + "shortcut": [['Home']], "visible": true }, { "id": 285, "enabled": false, - "label": "Select Next Layer", - "shortcut": [["Page_Down"]], + "label": 'Select Next Layer', + "shortcut": [['Page_Down']], "visible": true }, { "id": 286, "enabled": false, - "label": "Select Previous Layer", - "shortcut": [["Page_Up"]], + "label": 'Select Previous Layer', + "shortcut": [['Page_Up']], "visible": true } ] }, { "id": 287, - "children-display": "submenu", - "type": "separator", + "children-display": 'submenu', + "type": 'separator', "submenu": [ { "id": 288, "enabled": false, - "label": "Empty", + "label": 'Empty', "visible": true } ] @@ -1862,704 +1862,704 @@ { "id": 289, "enabled": true, - "label": "Delete Layer", + "label": 'Delete Layer', "visible": true }, { "id": 290, "enabled": false, - "label": "Merge Down", + "label": 'Merge Down', "visible": true }, { "id": 291, "enabled": false, - "label": "Anchor Layer", - "shortcut": [["Control", "h"]], + "label": 'Anchor Layer', + "shortcut": [['Control', 'h']], "visible": true }, { "id": 292, "enabled": true, - "label": "Duplicate Layer", - "shortcut": [["Control", "Shift", "d"]], + "label": 'Duplicate Layer', + "shortcut": [['Control', 'Shift', 'd']], "visible": true }, { "id": 293, "enabled": true, - "label": "New from Visible", + "label": 'New from Visible', "visible": true }, { "id": 294, "enabled": true, - "label": "New Layer...", - "shortcut": [["Control", "Shift", "n"]], + "label": 'New Layer...', + "shortcut": [['Control', 'Shift', 'n']], "visible": true } ] }, { "id": 295, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Colors", + "label": 'Colors', "visible": true, "submenu": [ { "id": 296, "enabled": true, - "label": "Retinex...", + "label": 'Retinex...', "visible": true }, { "id": 297, "enabled": true, - "label": "Maximum RGB...", + "label": 'Maximum RGB...', "visible": true }, { "id": 298, "enabled": false, - "label": "Hot...", + "label": 'Hot...', "visible": true }, { "id": 299, "enabled": true, - "label": "Filter Pack...", + "label": 'Filter Pack...', "visible": true }, { "id": 300, "enabled": true, - "label": "Color to Alpha...", + "label": 'Color to Alpha...', "visible": true }, { "id": 301, "enabled": true, - "label": "Colorify...", + "label": 'Colorify...', "visible": true }, { "id": 302, - "type": "separator" + "type": 'separator' }, { "id": 303, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Info", + "label": 'Info', "visible": true, "submenu": [ { "id": 304, "enabled": true, - "label": "Smooth Palette...", + "label": 'Smooth Palette...', "visible": true }, { "id": 305, "enabled": true, - "label": "Colorcube Analysis...", + "label": 'Colorcube Analysis...', "visible": true }, { "id": 306, "enabled": true, - "label": "Border Average...", + "label": 'Border Average...', "visible": true }, { "id": 307, "enabled": true, - "label": "Histogram", + "label": 'Histogram', "visible": true } ] }, { "id": 308, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Map", + "label": 'Map', "visible": true, "submenu": [ { "id": 309, "enabled": true, - "label": "Sample Colorize...", + "label": 'Sample Colorize...', "visible": true }, { "id": 310, "enabled": true, - "label": "Rotate Colors...", + "label": 'Rotate Colors...', "visible": true }, { "id": 311, "enabled": true, - "label": "Palette Map", + "label": 'Palette Map', "visible": true }, { "id": 312, "enabled": true, - "label": "Gradient Map", + "label": 'Gradient Map', "visible": true }, { "id": 313, "enabled": true, - "label": "Color Exchange...", + "label": 'Color Exchange...', "visible": true }, { "id": 314, "enabled": true, - "label": "Alien Map...", + "label": 'Alien Map...', "visible": true }, { "id": 315, - "type": "separator" + "type": 'separator' }, { "id": 316, "enabled": false, - "label": "Set Colormap...", + "label": 'Set Colormap...', "visible": true }, { "id": 317, "enabled": false, - "label": "Rearrange Colormap...", + "label": 'Rearrange Colormap...', "visible": true } ] }, { "id": 318, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Components", + "label": 'Components', "visible": true, "submenu": [ { "id": 319, "enabled": false, - "label": "Recompose", + "label": 'Recompose', "visible": true }, { "id": 320, "enabled": true, - "label": "Decompose...", + "label": 'Decompose...', "visible": true }, { "id": 321, "enabled": false, - "label": "Compose...", + "label": 'Compose...', "visible": true }, { "id": 322, "enabled": true, - "label": "Channel Mixer...", + "label": 'Channel Mixer...', "visible": true } ] }, { "id": 323, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Auto", + "label": 'Auto', "visible": true, "submenu": [ { "id": 324, "enabled": true, - "label": "Stretch HSV", + "label": 'Stretch HSV', "visible": true }, { "id": 325, "enabled": true, - "label": "Stretch Contrast", + "label": 'Stretch Contrast', "visible": true }, { "id": 326, "enabled": true, - "label": "Normalize", + "label": 'Normalize', "visible": true }, { "id": 327, "enabled": true, - "label": "Color Enhance", + "label": 'Color Enhance', "visible": true }, { "id": 328, "enabled": true, - "label": "White Balance", + "label": 'White Balance', "visible": true }, { "id": 329, "enabled": true, - "label": "Equalize", + "label": 'Equalize', "visible": true } ] }, { "id": 330, - "type": "separator" + "type": 'separator' }, { "id": 331, "enabled": true, - "label": "Use GEGL", + "label": 'Use GEGL', "toggle-state": 0, - "toggle-type": "checkmark", + "toggle-type": 'checkmark', "visible": true }, { "id": 332, - "type": "separator" + "type": 'separator' }, { "id": 333, "enabled": true, - "label": "Value Invert", + "label": 'Value Invert', "visible": true }, { "id": 334, "enabled": true, - "label": "Invert", + "label": 'Invert', "visible": true }, { "id": 335, - "type": "separator" + "type": 'separator' }, { "id": 336, "enabled": true, - "label": "Desaturate...", + "label": 'Desaturate...', "visible": true }, { "id": 337, "enabled": true, - "label": "Posterize...", + "label": 'Posterize...', "visible": true }, { "id": 338, "enabled": true, - "label": "Curves...", + "label": 'Curves...', "visible": true }, { "id": 339, "enabled": true, - "label": "Levels...", + "label": 'Levels...', "visible": true }, { "id": 340, "enabled": true, - "label": "Threshold...", + "label": 'Threshold...', "visible": true }, { "id": 341, "enabled": true, - "label": "Brightness-Contrast...", + "label": 'Brightness-Contrast...', "visible": true }, { "id": 342, "enabled": true, - "label": "Colorize...", + "label": 'Colorize...', "visible": true }, { "id": 343, "enabled": true, - "label": "Hue-Saturation...", + "label": 'Hue-Saturation...', "visible": true }, { "id": 344, "enabled": true, - "label": "Color Balance...", + "label": 'Color Balance...', "visible": true } ] }, { "id": 345, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Tools", + "label": 'Tools', "visible": true, "submenu": [ { "id": 346, "enabled": true, - "label": "Swap Colors", - "shortcut": [["x"]], + "label": 'Swap Colors', + "shortcut": [['x']], "visible": true }, { "id": 347, "enabled": true, - "label": "Default Colors", - "shortcut": [["d"]], + "label": 'Default Colors', + "shortcut": [['d']], "visible": true }, { "id": 348, "enabled": true, - "label": "Toolbox", - "shortcut": [["Control", "b"]], + "label": 'Toolbox', + "shortcut": [['Control', 'b']], "visible": true }, { "id": 349, - "type": "separator" + "type": 'separator' }, { "id": 350, "enabled": true, - "label": "GEGL Operation...", + "label": 'GEGL Operation...', "visible": true }, { "id": 351, "enabled": true, - "label": "Text", - "shortcut": [["t"]], + "label": 'Text', + "shortcut": [['t']], "visible": true }, { "id": 352, "enabled": true, - "label": "Measure", - "shortcut": [["Shift", "m"]], + "label": 'Measure', + "shortcut": [['Shift', 'm']], "visible": true }, { "id": 353, "enabled": true, - "label": "Zoom", - "shortcut": [["z"]], + "label": 'Zoom', + "shortcut": [['z']], "visible": true }, { "id": 354, "enabled": true, - "label": "Color Picker", - "shortcut": [["o"]], + "label": 'Color Picker', + "shortcut": [['o']], "visible": true }, { "id": 355, "enabled": true, - "label": "Paths", - "shortcut": [["b"]], + "label": 'Paths', + "shortcut": [['b']], "visible": true }, { "id": 356, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Color Tools", + "label": 'Color Tools', "visible": true, "submenu": [ { "id": 357, "enabled": true, - "label": "Desaturate...", + "label": 'Desaturate...', "visible": true }, { "id": 358, "enabled": true, - "label": "Posterize...", + "label": 'Posterize...', "visible": true }, { "id": 359, "enabled": true, - "label": "Curves...", + "label": 'Curves...', "visible": true }, { "id": 360, "enabled": true, - "label": "Levels...", + "label": 'Levels...', "visible": true }, { "id": 361, "enabled": true, - "label": "Threshold...", + "label": 'Threshold...', "visible": true }, { "id": 362, "enabled": true, - "label": "Brightness-Contrast...", + "label": 'Brightness-Contrast...', "visible": true }, { "id": 363, "enabled": true, - "label": "Colorize...", + "label": 'Colorize...', "visible": true }, { "id": 364, "enabled": true, - "label": "Hue-Saturation...", + "label": 'Hue-Saturation...', "visible": true }, { "id": 365, "enabled": true, - "label": "Color Balance...", + "label": 'Color Balance...', "visible": true } ] }, { "id": 366, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Transform Tools", + "label": 'Transform Tools', "visible": true, "submenu": [ { "id": 367, "enabled": true, - "label": "Flip", - "shortcut": [["Shift", "f"]], + "label": 'Flip', + "shortcut": [['Shift', 'f']], "visible": true }, { "id": 368, "enabled": true, - "label": "Perspective", - "shortcut": [["Shift", "p"]], + "label": 'Perspective', + "shortcut": [['Shift', 'p']], "visible": true }, { "id": 369, "enabled": true, - "label": "Shear", - "shortcut": [["Shift", "s"]], + "label": 'Shear', + "shortcut": [['Shift', 's']], "visible": true }, { "id": 370, "enabled": true, - "label": "Scale", - "shortcut": [["Shift", "t"]], + "label": 'Scale', + "shortcut": [['Shift', 't']], "visible": true }, { "id": 371, "enabled": true, - "label": "Rotate", - "shortcut": [["Shift", "r"]], + "label": 'Rotate', + "shortcut": [['Shift', 'r']], "visible": true }, { "id": 372, "enabled": true, - "label": "Crop", - "shortcut": [["Shift", "c"]], + "label": 'Crop', + "shortcut": [['Shift', 'c']], "visible": true }, { "id": 373, "enabled": true, - "label": "Move", - "shortcut": [["m"]], + "label": 'Move', + "shortcut": [['m']], "visible": true }, { "id": 374, "enabled": true, - "label": "Align", - "shortcut": [["q"]], + "label": 'Align', + "shortcut": [['q']], "visible": true } ] }, { "id": 375, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Paint Tools", + "label": 'Paint Tools', "visible": true, "submenu": [ { "id": 376, "enabled": true, - "label": "Dodge / Burn", - "shortcut": [["Shift", "d"]], + "label": 'Dodge / Burn', + "shortcut": [['Shift', 'd']], "visible": true }, { "id": 377, "enabled": true, - "label": "Smudge", - "shortcut": [["s"]], + "label": 'Smudge', + "shortcut": [['s']], "visible": true }, { "id": 378, "enabled": true, - "label": "Blur / Sharpen", - "shortcut": [["Shift", "u"]], + "label": 'Blur / Sharpen', + "shortcut": [['Shift', 'u']], "visible": true }, { "id": 379, "enabled": true, - "label": "Perspective Clone", + "label": 'Perspective Clone', "visible": true }, { "id": 380, "enabled": true, - "label": "Heal", - "shortcut": [["h"]], + "label": 'Heal', + "shortcut": [['h']], "visible": true }, { "id": 381, "enabled": true, - "label": "Clone", - "shortcut": [["c"]], + "label": 'Clone', + "shortcut": [['c']], "visible": true }, { "id": 382, "enabled": true, - "label": "Ink", - "shortcut": [["k"]], + "label": 'Ink', + "shortcut": [['k']], "visible": true }, { "id": 383, "enabled": true, - "label": "Airbrush", - "shortcut": [["a"]], + "label": 'Airbrush', + "shortcut": [['a']], "visible": true }, { "id": 384, "enabled": true, - "label": "Eraser", - "shortcut": [["Shift", "e"]], + "label": 'Eraser', + "shortcut": [['Shift', 'e']], "visible": true }, { "id": 385, "enabled": true, - "label": "Paintbrush", - "shortcut": [["p"]], + "label": 'Paintbrush', + "shortcut": [['p']], "visible": true }, { "id": 386, "enabled": true, - "label": "Pencil", - "shortcut": [["n"]], + "label": 'Pencil', + "shortcut": [['n']], "visible": true }, { "id": 387, "enabled": true, - "label": "Blend", - "shortcut": [["l"]], + "label": 'Blend', + "shortcut": [['l']], "visible": true }, { "id": 388, "enabled": true, - "label": "Bucket Fill", - "shortcut": [["Shift", "b"]], + "label": 'Bucket Fill', + "shortcut": [['Shift', 'b']], "visible": true } ] }, { "id": 389, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Selection Tools", + "label": 'Selection Tools', "visible": true, "submenu": [ { "id": 390, "enabled": true, - "label": "Intelligent Scissors", - "shortcut": [["i"]], + "label": 'Intelligent Scissors', + "shortcut": [['i']], "visible": true }, { "id": 391, "enabled": true, - "label": "By Color Select", - "shortcut": [["Shift", "o"]], + "label": 'By Color Select', + "shortcut": [['Shift', 'o']], "visible": true }, { "id": 392, "enabled": true, - "label": "Fuzzy Select", - "shortcut": [["u"]], + "label": 'Fuzzy Select', + "shortcut": [['u']], "visible": true }, { "id": 393, "enabled": true, - "label": "Foreground Select", + "label": 'Foreground Select', "visible": true }, { "id": 394, "enabled": true, - "label": "Free Select", - "shortcut": [["f"]], + "label": 'Free Select', + "shortcut": [['f']], "visible": true }, { "id": 395, "enabled": true, - "label": "Ellipse Select", - "shortcut": [["e"]], + "label": 'Ellipse Select', + "shortcut": [['e']], "visible": true }, { "id": 396, "enabled": true, - "label": "Rectangle Select", - "shortcut": [["r"]], + "label": 'Rectangle Select', + "shortcut": [['r']], "visible": true } ] @@ -2568,438 +2568,438 @@ }, { "id": 397, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Filters", + "label": 'Filters', "visible": true, "submenu": [ { "id": 398, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Script-Fu", + "label": 'Script-Fu', "visible": true, "submenu": [ { "id": 399, "enabled": true, - "label": "Start Server...", + "label": 'Start Server...', "visible": true }, { "id": 400, "enabled": true, - "label": "Refresh Scripts", + "label": 'Refresh Scripts', "visible": true }, { "id": 401, "enabled": true, - "label": "Console", + "label": 'Console', "visible": true } ] }, { "id": 402, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Python-Fu", + "label": 'Python-Fu', "visible": true, "submenu": [ { "id": 403, "enabled": true, - "label": "Console", + "label": 'Console', "visible": true } ] }, { "id": 404, - "type": "separator" + "type": 'separator' }, { "id": 405, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Alpha to Logo", + "label": 'Alpha to Logo', "visible": true, "submenu": [ { "id": 406, "enabled": true, - "label": "Textured...", + "label": 'Textured...', "visible": true }, { "id": 407, "enabled": true, - "label": "Particle Trace...", + "label": 'Particle Trace...', "visible": true }, { "id": 408, "enabled": true, - "label": "Neon...", + "label": 'Neon...', "visible": true }, { "id": 409, "enabled": true, - "label": "Gradient Bevel...", + "label": 'Gradient Bevel...', "visible": true }, { "id": 410, "enabled": true, - "label": "Glowing Hot...", + "label": 'Glowing Hot...', "visible": true }, { "id": 411, "enabled": true, - "label": "Glossy...", + "label": 'Glossy...', "visible": true }, { "id": 412, "enabled": true, - "label": "Frosty...", + "label": 'Frosty...', "visible": true }, { "id": 413, "enabled": true, - "label": "Cool Metal...", + "label": 'Cool Metal...', "visible": true }, { "id": 414, "enabled": true, - "label": "Comic Book...", + "label": 'Comic Book...', "visible": true }, { "id": 415, "enabled": true, - "label": "Chrome...", + "label": 'Chrome...', "visible": true }, { "id": 416, "enabled": true, - "label": "Chip Away...", + "label": 'Chip Away...', "visible": true }, { "id": 417, "enabled": true, - "label": "Chalk...", + "label": 'Chalk...', "visible": true }, { "id": 418, "enabled": true, - "label": "Bovination...", + "label": 'Bovination...', "visible": true }, { "id": 419, "enabled": true, - "label": "Blended...", + "label": 'Blended...', "visible": true }, { "id": 420, "enabled": true, - "label": "Basic I...", + "label": 'Basic I...', "visible": true }, { "id": 421, "enabled": true, - "label": "Basic II...", + "label": 'Basic II...', "visible": true }, { "id": 422, "enabled": true, - "label": "Alien Neon...", + "label": 'Alien Neon...', "visible": true }, { "id": 423, "enabled": true, - "label": "Alien Glow...", + "label": 'Alien Glow...', "visible": true }, { "id": 424, "enabled": true, - "label": "3D Outline...", + "label": '3D Outline...', "visible": true } ] }, { "id": 425, - "type": "separator" + "type": 'separator' }, { "id": 426, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Animation", + "label": 'Animation', "visible": true, "submenu": [ { "id": 427, "enabled": true, - "label": "Unoptimize", + "label": 'Unoptimize', "visible": true }, { "id": 428, "enabled": true, - "label": "Playback...", + "label": 'Playback...', "visible": true }, { "id": 429, "enabled": true, - "label": "Optimize (for GIF)", + "label": 'Optimize (for GIF)', "visible": true }, { "id": 430, "enabled": true, - "label": "Optimize (Difference)", + "label": 'Optimize (Difference)', "visible": true }, { "id": 431, - "type": "separator" + "type": 'separator' }, { "id": 432, "enabled": true, - "label": "Waves...", + "label": 'Waves...', "visible": true }, { "id": 433, "enabled": true, - "label": "Spinning Globe...", + "label": 'Spinning Globe...', "visible": true }, { "id": 434, "enabled": true, - "label": "Rippling...", + "label": 'Rippling...', "visible": true }, { "id": 435, "enabled": true, - "label": "Burn-In...", + "label": 'Burn-In...', "visible": true }, { "id": 436, "enabled": true, - "label": "Blend...", + "label": 'Blend...', "visible": true } ] }, { "id": 437, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Web", + "label": 'Web', "visible": true, "submenu": [ { "id": 438, "enabled": true, - "label": "Slice...", + "label": 'Slice...', "visible": true }, { "id": 439, "enabled": true, - "label": "Semi-Flatten", + "label": 'Semi-Flatten', "visible": true }, { "id": 440, "enabled": true, - "label": "Image Map...", + "label": 'Image Map...', "visible": true } ] }, { "id": 441, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Render", + "label": 'Render', "visible": true, "submenu": [ { "id": 442, "enabled": true, - "label": "Spyrogimp...", + "label": 'Spyrogimp...', "visible": true }, { "id": 443, "enabled": true, - "label": "Sphere Designer...", + "label": 'Sphere Designer...', "visible": true }, { "id": 444, "enabled": true, - "label": "Line Nova...", + "label": 'Line Nova...', "visible": true }, { "id": 445, "enabled": true, - "label": "Lava...", + "label": 'Lava...', "visible": true }, { "id": 446, "enabled": true, - "label": "Gfig...", + "label": 'Gfig...', "visible": true }, { "id": 447, "enabled": true, - "label": "Fractal Explorer...", + "label": 'Fractal Explorer...', "visible": true }, { "id": 448, "enabled": true, - "label": "Circuit...", + "label": 'Circuit...', "visible": true }, { "id": 449, - "type": "separator" + "type": 'separator' }, { "id": 450, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Pattern", + "label": 'Pattern', "visible": true, "submenu": [ { "id": 451, "enabled": true, - "label": "Sinus...", + "label": 'Sinus...', "visible": true }, { "id": 452, "enabled": true, - "label": "Qbist...", + "label": 'Qbist...', "visible": true }, { "id": 453, "enabled": true, - "label": "Maze...", + "label": 'Maze...', "visible": true }, { "id": 454, "enabled": true, - "label": "Jigsaw...", + "label": 'Jigsaw...', "visible": true }, { "id": 455, "enabled": true, - "label": "Grid...", + "label": 'Grid...', "visible": true }, { "id": 456, "enabled": true, - "label": "Diffraction Patterns...", + "label": 'Diffraction Patterns...', "visible": true }, { "id": 457, "enabled": true, - "label": "CML Explorer...", + "label": 'CML Explorer...', "visible": true }, { "id": 458, "enabled": true, - "label": "Checkerboard...", + "label": 'Checkerboard...', "visible": true } ] }, { "id": 459, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Nature", + "label": 'Nature', "visible": true, "submenu": [ { "id": 460, "enabled": true, - "label": "IFS Fractal...", + "label": 'IFS Fractal...', "visible": true }, { "id": 461, "enabled": true, - "label": "Flame...", + "label": 'Flame...', "visible": true } ] }, { "id": 462, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Clouds", + "label": 'Clouds', "visible": true, "submenu": [ { "id": 463, "enabled": true, - "label": "Solid Noise...", + "label": 'Solid Noise...', "visible": true }, { "id": 464, "enabled": true, - "label": "Plasma...", + "label": 'Plasma...', "visible": true }, { "id": 465, "enabled": true, - "label": "Fog...", + "label": 'Fog...', "visible": true }, { "id": 466, "enabled": true, - "label": "Difference Clouds...", + "label": 'Difference Clouds...', "visible": true } ] @@ -3008,661 +3008,661 @@ }, { "id": 467, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Map", + "label": 'Map', "visible": true, "submenu": [ { "id": 468, "enabled": true, - "label": "Warp...", + "label": 'Warp...', "visible": true }, { "id": 469, "enabled": true, - "label": "Tile...", + "label": 'Tile...', "visible": true }, { "id": 470, "enabled": true, - "label": "Small Tiles...", + "label": 'Small Tiles...', "visible": true }, { "id": 471, "enabled": true, - "label": "Paper Tile...", + "label": 'Paper Tile...', "visible": true }, { "id": 472, "enabled": true, - "label": "Map Object...", + "label": 'Map Object...', "visible": true }, { "id": 473, "enabled": true, - "label": "Make Seamless", + "label": 'Make Seamless', "visible": true }, { "id": 474, "enabled": true, - "label": "Illusion...", + "label": 'Illusion...', "visible": true }, { "id": 475, "enabled": true, - "label": "Fractal Trace...", + "label": 'Fractal Trace...', "visible": true }, { "id": 476, "enabled": true, - "label": "Displace...", + "label": 'Displace...', "visible": true }, { "id": 477, "enabled": true, - "label": "Bump Map...", + "label": 'Bump Map...', "visible": true } ] }, { "id": 478, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Decor", + "label": 'Decor', "visible": true, "submenu": [ { "id": 479, "enabled": false, - "label": "Stencil Chrome...", + "label": 'Stencil Chrome...', "visible": true }, { "id": 480, "enabled": false, - "label": "Stencil Carve...", + "label": 'Stencil Carve...', "visible": true }, { "id": 481, "enabled": false, - "label": "Slide...", + "label": 'Slide...', "visible": true }, { "id": 482, "enabled": false, - "label": "Round Corners...", + "label": 'Round Corners...', "visible": true }, { "id": 483, "enabled": true, - "label": "Old Photo...", + "label": 'Old Photo...', "visible": true }, { "id": 484, "enabled": true, - "label": "Fuzzy Border...", + "label": 'Fuzzy Border...', "visible": true }, { "id": 485, "enabled": true, - "label": "Coffee Stain...", + "label": 'Coffee Stain...', "visible": true }, { "id": 486, "enabled": true, - "label": "Add Border...", + "label": 'Add Border...', "visible": true }, { "id": 487, "enabled": true, - "label": "Add Bevel...", + "label": 'Add Bevel...', "visible": true } ] }, { "id": 488, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Artistic", + "label": 'Artistic', "visible": true, "submenu": [ { "id": 489, "enabled": true, - "label": "Weave...", + "label": 'Weave...', "visible": true }, { "id": 490, "enabled": true, - "label": "Van Gogh (LIC)...", + "label": 'Van Gogh (LIC)...', "visible": true }, { "id": 491, "enabled": true, - "label": "Softglow...", + "label": 'Softglow...', "visible": true }, { "id": 492, "enabled": true, - "label": "Predator...", + "label": 'Predator...', "visible": true }, { "id": 493, "enabled": true, - "label": "Photocopy...", + "label": 'Photocopy...', "visible": true }, { "id": 494, "enabled": true, - "label": "Oilify...", + "label": 'Oilify...', "visible": true }, { "id": 495, "enabled": true, - "label": "GIMPressionist...", + "label": 'GIMPressionist...', "visible": true }, { "id": 496, "enabled": true, - "label": "Cubism...", + "label": 'Cubism...', "visible": true }, { "id": 497, "enabled": true, - "label": "Clothify...", + "label": 'Clothify...', "visible": true }, { "id": 498, "enabled": true, - "label": "Cartoon...", + "label": 'Cartoon...', "visible": true }, { "id": 499, "enabled": true, - "label": "Apply Canvas...", + "label": 'Apply Canvas...', "visible": true } ] }, { "id": 500, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Combine", + "label": 'Combine', "visible": true, "submenu": [ { "id": 501, "enabled": true, - "label": "Filmstrip...", + "label": 'Filmstrip...', "visible": true }, { "id": 502, "enabled": true, - "label": "Depth Merge...", + "label": 'Depth Merge...', "visible": true } ] }, { "id": 503, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Generic", + "label": 'Generic', "visible": true, "submenu": [ { "id": 504, "enabled": true, - "label": "Erode", + "label": 'Erode', "visible": true }, { "id": 505, "enabled": true, - "label": "Dilate", + "label": 'Dilate', "visible": true }, { "id": 506, "enabled": true, - "label": "Convolution Matrix...", + "label": 'Convolution Matrix...', "visible": true } ] }, { "id": 507, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Edge-Detect", + "label": 'Edge-Detect', "visible": true, "submenu": [ { "id": 508, "enabled": true, - "label": "Sobel...", + "label": 'Sobel...', "visible": true }, { "id": 509, "enabled": true, - "label": "Neon...", + "label": 'Neon...', "visible": true }, { "id": 510, "enabled": true, - "label": "Laplace", + "label": 'Laplace', "visible": true }, { "id": 511, "enabled": true, - "label": "Edge...", + "label": 'Edge...', "visible": true }, { "id": 512, "enabled": true, - "label": "Difference of Gaussians...", + "label": 'Difference of Gaussians...', "visible": true } ] }, { "id": 513, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Noise", + "label": 'Noise', "visible": true, "submenu": [ { "id": 514, "enabled": true, - "label": "Spread...", + "label": 'Spread...', "visible": true }, { "id": 515, "enabled": true, - "label": "Slur...", + "label": 'Slur...', "visible": true }, { "id": 516, "enabled": true, - "label": "RGB Noise...", + "label": 'RGB Noise...', "visible": true }, { "id": 517, "enabled": true, - "label": "Pick...", + "label": 'Pick...', "visible": true }, { "id": 518, "enabled": true, - "label": "Hurl...", + "label": 'Hurl...', "visible": true }, { "id": 519, "enabled": true, - "label": "HSV Noise...", + "label": 'HSV Noise...', "visible": true } ] }, { "id": 520, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Light and Shadow", + "label": 'Light and Shadow', "visible": true, "submenu": [ { "id": 521, "enabled": true, - "label": "Glass Tile...", + "label": 'Glass Tile...', "visible": true }, { "id": 522, "enabled": true, - "label": "Apply Lens...", + "label": 'Apply Lens...', "visible": true }, { "id": 523, - "type": "separator" + "type": 'separator' }, { "id": 524, "enabled": true, - "label": "Xach-Effect...", + "label": 'Xach-Effect...', "visible": true }, { "id": 525, "enabled": true, - "label": "Perspective...", + "label": 'Perspective...', "visible": true }, { "id": 526, "enabled": true, - "label": "Drop Shadow...", + "label": 'Drop Shadow...', "visible": true }, { "id": 527, - "type": "separator" + "type": 'separator' }, { "id": 528, "enabled": true, - "label": "Supernova...", + "label": 'Supernova...', "visible": true }, { "id": 529, "enabled": true, - "label": "Sparkle...", + "label": 'Sparkle...', "visible": true }, { "id": 530, "enabled": true, - "label": "Lighting Effects...", + "label": 'Lighting Effects...', "visible": true }, { "id": 531, "enabled": true, - "label": "Lens Flare...", + "label": 'Lens Flare...', "visible": true }, { "id": 532, "enabled": true, - "label": "Gradient Flare...", + "label": 'Gradient Flare...', "visible": true } ] }, { "id": 533, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Distorts", + "label": 'Distorts', "visible": true, "submenu": [ { "id": 534, "enabled": true, - "label": "Wind...", + "label": 'Wind...', "visible": true }, { "id": 535, "enabled": true, - "label": "Whirl and Pinch...", + "label": 'Whirl and Pinch...', "visible": true }, { "id": 536, "enabled": true, - "label": "Waves...", + "label": 'Waves...', "visible": true }, { "id": 537, "enabled": true, - "label": "Video...", + "label": 'Video...', "visible": true }, { "id": 538, "enabled": true, - "label": "Value Propagate...", + "label": 'Value Propagate...', "visible": true }, { "id": 539, "enabled": true, - "label": "Shift...", + "label": 'Shift...', "visible": true }, { "id": 540, "enabled": true, - "label": "Ripple...", + "label": 'Ripple...', "visible": true }, { "id": 541, "enabled": true, - "label": "Polar Coordinates...", + "label": 'Polar Coordinates...', "visible": true }, { "id": 542, "enabled": true, - "label": "Pagecurl...", + "label": 'Pagecurl...', "visible": true }, { "id": 543, "enabled": true, - "label": "Newsprint...", + "label": 'Newsprint...', "visible": true }, { "id": 544, "enabled": true, - "label": "Mosaic...", + "label": 'Mosaic...', "visible": true }, { "id": 545, "enabled": true, - "label": "Lens Distortion...", + "label": 'Lens Distortion...', "visible": true }, { "id": 546, "enabled": true, - "label": "IWarp...", + "label": 'IWarp...', "visible": true }, { "id": 547, "enabled": true, - "label": "Erase Every Other Row...", + "label": 'Erase Every Other Row...', "visible": true }, { "id": 548, "enabled": true, - "label": "Engrave...", + "label": 'Engrave...', "visible": true }, { "id": 549, "enabled": true, - "label": "Emboss...", + "label": 'Emboss...', "visible": true }, { "id": 550, "enabled": true, - "label": "Curve Bend...", + "label": 'Curve Bend...', "visible": true }, { "id": 551, "enabled": true, - "label": "Blinds...", + "label": 'Blinds...', "visible": true } ] }, { "id": 552, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Enhance", + "label": 'Enhance', "visible": true, "submenu": [ { "id": 553, "enabled": true, - "label": "Unsharp Mask...", + "label": 'Unsharp Mask...', "visible": true }, { "id": 554, "enabled": true, - "label": "Sharpen...", + "label": 'Sharpen...', "visible": true }, { "id": 555, "enabled": true, - "label": "Red Eye Removal...", + "label": 'Red Eye Removal...', "visible": true }, { "id": 556, "enabled": false, - "label": "NL Filter...", + "label": 'NL Filter...', "visible": true }, { "id": 557, "enabled": true, - "label": "Destripe...", + "label": 'Destripe...', "visible": true }, { "id": 558, "enabled": true, - "label": "Despeckle...", + "label": 'Despeckle...', "visible": true }, { "id": 559, "enabled": true, - "label": "Deinterlace...", + "label": 'Deinterlace...', "visible": true }, { "id": 560, "enabled": true, - "label": "Antialias", + "label": 'Antialias', "visible": true } ] }, { "id": 561, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Blur", + "label": 'Blur', "visible": true, "submenu": [ { "id": 562, "enabled": true, - "label": "Tileable Blur...", + "label": 'Tileable Blur...', "visible": true }, { "id": 563, "enabled": true, - "label": "Selective Gaussian Blur...", + "label": 'Selective Gaussian Blur...', "visible": true }, { "id": 564, "enabled": true, - "label": "Pixelize...", + "label": 'Pixelize...', "visible": true }, { "id": 565, "enabled": true, - "label": "Motion Blur...", + "label": 'Motion Blur...', "visible": true }, { "id": 566, "enabled": true, - "label": "Gaussian Blur...", + "label": 'Gaussian Blur...', "visible": true }, { "id": 567, "enabled": true, - "label": "Blur", + "label": 'Blur', "visible": true } ] }, { "id": 568, - "type": "separator" + "type": 'separator' }, { "id": 569, "enabled": true, - "label": "Reset all Filters", + "label": 'Reset all Filters', "visible": true }, { "id": 570, - "children-display": "submenu", + "children-display": 'submenu', "enabled": false, - "label": "Re-Show Last", - "shortcut": [["Control", "Shift", "f"]], + "label": 'Re-Show Last', + "shortcut": [['Control', 'Shift', 'f']], "visible": true, "submenu": [ { "id": 571, "enabled": false, - "label": "Empty", + "label": 'Empty', "visible": true } ] @@ -3670,210 +3670,210 @@ { "id": 572, "enabled": false, - "label": "Repeat Last", - "shortcut": [["Control", "f"]], + "label": 'Repeat Last', + "shortcut": [['Control', 'f']], "visible": true } ] }, { "id": 573, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Windows", + "label": 'Windows', "visible": true, "submenu": [ { "id": 574, "enabled": true, - "label": "Toolbox", - "shortcut": [["Control", "b"]], + "label": 'Toolbox', + "shortcut": [['Control', 'b']], "visible": true }, { "id": 575, - "type": "separator" + "type": 'separator' }, { "id": 576, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Dockable Dialogs", + "label": 'Dockable Dialogs', "visible": true, "submenu": [ { "id": 577, "enabled": true, - "label": "Error Console", + "label": 'Error Console', "visible": true }, { "id": 578, "enabled": true, - "label": "Tools", + "label": 'Tools', "visible": true }, { "id": 579, "enabled": true, - "label": "Templates", + "label": 'Templates', "visible": true }, { "id": 580, "enabled": true, - "label": "Document History", + "label": 'Document History', "visible": true }, { "id": 581, "enabled": true, - "label": "Images", + "label": 'Images', "visible": true }, { "id": 582, - "type": "separator" + "type": 'separator' }, { "id": 583, "enabled": true, - "label": "Buffers", + "label": 'Buffers', "visible": true }, { "id": 584, "enabled": true, - "label": "Fonts", + "label": 'Fonts', "visible": true }, { "id": 585, "enabled": true, - "label": "Palettes", + "label": 'Palettes', "visible": true }, { "id": 586, "enabled": true, - "label": "Gradients", - "shortcut": [["Control", "g"]], + "label": 'Gradients', + "shortcut": [['Control', 'g']], "visible": true }, { "id": 587, "enabled": true, - "label": "Patterns", - "shortcut": [["Control", "Shift", "p"]], + "label": 'Patterns', + "shortcut": [['Control', 'Shift', 'p']], "visible": true }, { "id": 588, "enabled": true, - "label": "Brushes", - "shortcut": [["Control", "Shift", "b"]], + "label": 'Brushes', + "shortcut": [['Control', 'Shift', 'b']], "visible": true }, { "id": 589, "enabled": true, - "label": "Colors", + "label": 'Colors', "visible": true }, { "id": 590, - "type": "separator" + "type": 'separator' }, { "id": 591, "enabled": true, - "label": "Sample Points", + "label": 'Sample Points', "visible": true }, { "id": 592, "enabled": true, - "label": "Pointer", + "label": 'Pointer', "visible": true }, { "id": 593, "enabled": true, - "label": "Undo History", + "label": 'Undo History', "visible": true }, { "id": 594, "enabled": true, - "label": "Navigation", + "label": 'Navigation', "visible": true }, { "id": 595, "enabled": true, - "label": "Selection Editor", + "label": 'Selection Editor', "visible": true }, { "id": 596, "enabled": true, - "label": "Histogram", + "label": 'Histogram', "visible": true }, { "id": 597, "enabled": true, - "label": "Colormap", + "label": 'Colormap', "visible": true }, { "id": 598, "enabled": true, - "label": "Paths", + "label": 'Paths', "visible": true }, { "id": 599, "enabled": true, - "label": "Channels", + "label": 'Channels', "visible": true }, { "id": 600, "enabled": true, - "label": "Layers", - "shortcut": [["Control", "l"]], + "label": 'Layers', + "shortcut": [['Control', 'l']], "visible": true }, { "id": 601, - "type": "separator" + "type": 'separator' }, { "id": 602, "enabled": true, - "label": "Device Status", + "label": 'Device Status', "visible": true }, { "id": 603, "enabled": true, - "label": "Tool Options", + "label": 'Tool Options', "visible": true } ] }, { "id": 604, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Recently Closed Docks", + "label": 'Recently Closed Docks', "visible": true, "submenu": [ { "id": 605, "enabled": false, - "label": "Empty", + "label": 'Empty', "visible": true } ] @@ -3882,139 +3882,139 @@ }, { "id": 606, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "Help", + "label": 'Help', "visible": true, "submenu": [ { "id": 607, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "User Manual", + "label": 'User Manual', "visible": true, "submenu": [ { "id": 608, "enabled": true, - "label": "Working with Digital Camera Photos", + "label": 'Working with Digital Camera Photos', "visible": true }, { "id": 609, "enabled": true, - "label": "Using Paths", + "label": 'Using Paths', "visible": true }, { "id": 610, "enabled": true, - "label": "Preparing your Images for the Web", + "label": 'Preparing your Images for the Web', "visible": true }, { "id": 611, "enabled": true, - "label": "How to Use Dialogs", + "label": 'How to Use Dialogs', "visible": true }, { "id": 612, "enabled": true, - "label": "Drawing Simple Objects", + "label": 'Drawing Simple Objects', "visible": true }, { "id": 613, "enabled": true, - "label": "Create, Open and Save Files", + "label": 'Create, Open and Save Files', "visible": true }, { "id": 614, "enabled": true, - "label": "Basic Concepts", + "label": 'Basic Concepts', "visible": true } ] }, { "id": 615, - "children-display": "submenu", + "children-display": 'submenu', "enabled": true, - "label": "GIMP Online", + "label": 'GIMP Online', "visible": true, "submenu": [ { "id": 616, "enabled": true, - "label": "User Manual Web Site", + "label": 'User Manual Web Site', "visible": true }, { "id": 617, "enabled": true, - "label": "Plug-in Registry", + "label": 'Plug-in Registry', "visible": true }, { "id": 618, "enabled": true, - "label": "Main Web Site", + "label": 'Main Web Site', "visible": true }, { "id": 619, "enabled": true, - "label": "Developer Web Site", + "label": 'Developer Web Site', "visible": true } ] }, { "id": 620, - "type": "separator" + "type": 'separator' }, { "id": 621, "enabled": true, - "label": "Procedure Browser", + "label": 'Procedure Browser', "visible": true }, { "id": 622, "enabled": true, - "label": "Plug-In Browser", + "label": 'Plug-In Browser', "visible": true }, { "id": 623, - "type": "separator" + "type": 'separator' }, { "id": 624, "enabled": true, - "label": "About", + "label": 'About', "visible": true }, { "id": 625, "enabled": true, - "label": "Tip of the Day", + "label": 'Tip of the Day', "visible": true }, { "id": 626, "enabled": true, - "label": "Context Help", - "shortcut": [["Shift", "F1"]], + "label": 'Context Help', + "shortcut": [['Shift', 'F1']], "visible": true }, { "id": 627, "enabled": true, - "label": "Help", - "shortcut": [["F1"]], + "label": 'Help', + "shortcut": [['F1']], "visible": true } ] -- cgit v1.2.3 From 4bf64d184cb6eb7ac89d91705e947aedd2aa981a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 1 Dec 2010 21:35:46 -0600 Subject: Making the ints from the JSON file int32s --- tests/json-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 4d3e6aa..14e90e0 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -56,7 +56,7 @@ node2variant (JsonNode * node) switch (json_node_get_value_type(node)) { case G_TYPE_INT: case G_TYPE_INT64: - return g_variant_new_int64(json_node_get_int(node)); + return g_variant_new_int32(json_node_get_int(node)); case G_TYPE_DOUBLE: case G_TYPE_FLOAT: return g_variant_new_double(json_node_get_double(node)); -- cgit v1.2.3 From 837d3645ef5860c92dd5c1c82420c60a581b341f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 2 Dec 2010 14:01:47 -0600 Subject: Renaming the jsonloader pc file --- tests/Makefile.am | 2 +- tests/dbusmenu-jsonloader-0.4.pc.in | 14 ++++++++++++++ tests/dbusmenu-jsonloader.pc.in | 14 -------------- 3 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 tests/dbusmenu-jsonloader-0.4.pc.in delete mode 100644 tests/dbusmenu-jsonloader.pc.in (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index aa79c8f..df2a364 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -80,7 +80,7 @@ libdbusmenu_jsonloader_la_LIBADD = \ $(DBUSMENUGLIB_LIBS) \ $(DBUSMENUTESTS_LIBS) -pkgconfig_DATA = dbusmenu-jsonloader.pc +pkgconfig_DATA = dbusmenu-jsonloader-0.4.pc pkgconfigdir = $(libdir)/pkgconfig ###################### diff --git a/tests/dbusmenu-jsonloader-0.4.pc.in b/tests/dbusmenu-jsonloader-0.4.pc.in new file mode 100644 index 0000000..d042132 --- /dev/null +++ b/tests/dbusmenu-jsonloader-0.4.pc.in @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +bindir=@bindir@ +includedir=@includedir@ + +Cflags: -I${includedir}/libdbusmenu-0.1 +Requires: dbus-glib-1,dbusmenu-glib,json-glib-1.0 +Libs: -L${libdir} -ldbusmenu-jsonloader + +Name: libdbusmenu-jsonloader +Description: A small library to load JSON descriptions of menus. Mostly for testing. +Version: @VERSION@ + diff --git a/tests/dbusmenu-jsonloader.pc.in b/tests/dbusmenu-jsonloader.pc.in deleted file mode 100644 index d042132..0000000 --- a/tests/dbusmenu-jsonloader.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -bindir=@bindir@ -includedir=@includedir@ - -Cflags: -I${includedir}/libdbusmenu-0.1 -Requires: dbus-glib-1,dbusmenu-glib,json-glib-1.0 -Libs: -L${libdir} -ldbusmenu-jsonloader - -Name: libdbusmenu-jsonloader -Description: A small library to load JSON descriptions of menus. Mostly for testing. -Version: @VERSION@ - -- cgit v1.2.3 From 58c157738e5aae7a01422b21a3b1f0a6e3ca2ed9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 7 Dec 2010 21:17:43 -0600 Subject: Wrong directory for jsonloader header files. --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index df2a364..17b44d1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -52,7 +52,7 @@ XVFB_RUN=". $(srcdir)/run-xvfb.sh" lib_LTLIBRARIES = libdbusmenu-jsonloader.la -libdbusmenu_jsonloaderincludedir=$(includedir)/libdbusmenu-0.1/libdbusmenu-jsonloader/ +libdbusmenu_jsonloaderincludedir=$(includedir)/libdbusmenu-0.4/libdbusmenu-jsonloader/ libdbusmenu_jsonloaderinclude_HEADERS = \ json-loader.h -- cgit v1.2.3 From 1a73825600508b5d7f027641b05a682a8ac81f5e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 8 Dec 2010 09:27:48 -0600 Subject: Fixing the requires in the pc files --- tests/dbusmenu-jsonloader-0.4.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/dbusmenu-jsonloader-0.4.pc.in b/tests/dbusmenu-jsonloader-0.4.pc.in index d042132..62bfeb2 100644 --- a/tests/dbusmenu-jsonloader-0.4.pc.in +++ b/tests/dbusmenu-jsonloader-0.4.pc.in @@ -5,7 +5,7 @@ bindir=@bindir@ includedir=@includedir@ Cflags: -I${includedir}/libdbusmenu-0.1 -Requires: dbus-glib-1,dbusmenu-glib,json-glib-1.0 +Requires: dbusmenu-glib-0.4 json-glib-1.0 Libs: -L${libdir} -ldbusmenu-jsonloader Name: libdbusmenu-jsonloader -- cgit v1.2.3 From e5f53f91d929c46914b4a02336e31724fb54ec95 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 5 Jan 2011 20:47:09 -0600 Subject: Adding a test to test removing of properties --- tests/test-glib-objects.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests') diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index 7143814..2c8eda9 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -274,6 +274,29 @@ test_object_menuitem_props_boolstr (void) return; } +/* Set and then remove a prop */ +static void +test_object_menuitem_props_removal (void) +{ + /* Build a menu item */ + DbusmenuMenuitem * item = dbusmenu_menuitem_new(); + + /* Test to make sure it's a happy object */ + g_assert(item != NULL); + + /* Set the property and ensure that it's set */ + dbusmenu_menuitem_property_set_variant(item, "myprop", g_variant_new_int32(34)); + g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") != NULL); + + /* Remove the property and ensure it goes away */ + dbusmenu_menuitem_property_set_variant(item, "myprop", NULL); + g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") == NULL); + + g_object_unref(item); + + return; +} + /* Build the test suite */ static void test_glib_objects_suite (void) @@ -286,6 +309,7 @@ test_glib_objects_suite (void) g_test_add_func ("/dbusmenu/glib/objects/menuitem/props_swap", test_object_menuitem_props_swap); g_test_add_func ("/dbusmenu/glib/objects/menuitem/props_signals", test_object_menuitem_props_signals); g_test_add_func ("/dbusmenu/glib/objects/menuitem/props_boolstr", test_object_menuitem_props_boolstr); + g_test_add_func ("/dbusmenu/glib/objects/menuitem/props_removal", test_object_menuitem_props_removal); return; } -- cgit v1.2.3 From 0c50ae11cafdd7ca04ae6d2a69390903d16daedd Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 5 Jan 2011 20:49:47 -0600 Subject: Adding a test for removal by string being NULL --- tests/test-glib-objects.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index 2c8eda9..9c99280 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -292,6 +292,14 @@ test_object_menuitem_props_removal (void) dbusmenu_menuitem_property_set_variant(item, "myprop", NULL); g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") == NULL); + /* Set the property again */ + dbusmenu_menuitem_property_set_variant(item, "myprop", g_variant_new_int32(34)); + g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") != NULL); + + /* Remove the property with a NULL string */ + dbusmenu_menuitem_property_set(item, "myprop", NULL); + g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") == NULL); + g_object_unref(item); return; -- cgit v1.2.3