aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-07-20 16:04:00 -0500
committerTed Gould <ted@canonical.com>2009-07-20 16:04:00 -0500
commitdcc157b7cc95a8c6958b9a324dd6d2e0d0aff065 (patch)
tree98fe5ab98c2333a2a9110b5dd6d2b852ce9e223c /tests
parente8393a9d2fd78c79f50ab003de728665f74d4e5e (diff)
downloadlibdbusmenu-dcc157b7cc95a8c6958b9a324dd6d2e0d0aff065.tar.gz
libdbusmenu-dcc157b7cc95a8c6958b9a324dd6d2e0d0aff065.tar.bz2
libdbusmenu-dcc157b7cc95a8c6958b9a324dd6d2e0d0aff065.zip
Print on click
Diffstat (limited to 'tests')
-rw-r--r--tests/test-gtk-label-server.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test-gtk-label-server.c b/tests/test-gtk-label-server.c
index ee750ad..7730fe2 100644
--- a/tests/test-gtk-label-server.c
+++ b/tests/test-gtk-label-server.c
@@ -32,6 +32,13 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <json-glib/json-glib.h>
static void
+menuitem_click(DbusmenuMenuitem * mi, gpointer user_data)
+{
+ g_debug("Clicked on: %d", dbusmenu_menuitem_get_id(mi));
+ return;
+}
+
+static void
set_props (DbusmenuMenuitem * mi, JsonObject * node)
{
if (node == NULL) return;
@@ -68,6 +75,7 @@ layout2menuitem (JsonNode * inlayout)
} else {
local = dbusmenu_menuitem_new();
}
+ g_signal_connect(G_OBJECT(local), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(menuitem_click), NULL);
set_props(local, layout);