aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--libdbusmenu-glib/Makefile.am6
-rw-r--r--libdbusmenu-glib/enum-types.h.in2
-rw-r--r--libdbusmenu-gtk/Makefile.am8
-rw-r--r--libdbusmenu-gtk/genericmenuitem-enum-types.h.in2
-rw-r--r--libdbusmenu-gtk/genericmenuitem.c4
-rw-r--r--tests/Makefile.am4
7 files changed, 17 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 94bba0c..608e80d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,7 +121,8 @@ PKG_CHECK_MODULES(DBUSMENUTESTS, json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION,
[have_tests=yes]
)
-PKG_CHECK_MODULES(DBUSMENUTESTSVALGRIND, valgrind)
+PKG_CHECK_MODULES(DBUSMENUTESTSVALGRIND, valgrind, have_valgrind=yes, have_valgrind=no)
+AM_CONDITIONAL([HAVE_VALGRIND], [test "x$have_valgrind" = "xyes"])
])
AC_SUBST(DBUSMENUTESTS_CFLAGS)
diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am
index b2e796c..7fe8030 100644
--- a/libdbusmenu-glib/Makefile.am
+++ b/libdbusmenu-glib/Makefile.am
@@ -216,10 +216,10 @@ if HAVE_VALA
if HAVE_INTROSPECTION
vapidir = $(datadir)/vala/vapi
-vapi_DATA = Dbusmenu-0.4.vapi
+vapi_DATA = dbusmenu-glib-0.4.vapi
-Dbusmenu-0.4.vapi: Dbusmenu-0.4.gir
- $(VALA_API_GEN) --library=Dbusmenu-0.4 $<
+dbusmenu-glib-0.4.vapi: Dbusmenu-0.4.gir
+ $(VALA_API_GEN) --library=dbusmenu-glib-0.4 $<
CLEANFILES += $(vapi_DATA)
diff --git a/libdbusmenu-glib/enum-types.h.in b/libdbusmenu-glib/enum-types.h.in
index 5758438..afd9132 100644
--- a/libdbusmenu-glib/enum-types.h.in
+++ b/libdbusmenu-glib/enum-types.h.in
@@ -43,7 +43,7 @@ G_END_DECLS
/*** END file-tail ***/
/*** BEGIN file-production ***/
-/* Enumerations from file: "@filename@" */
+/* Enumerations from file: "@basename@" */
#include "@basename@"
/*** END file-production ***/
diff --git a/libdbusmenu-gtk/Makefile.am b/libdbusmenu-gtk/Makefile.am
index b52098f..a255a69 100644
--- a/libdbusmenu-gtk/Makefile.am
+++ b/libdbusmenu-gtk/Makefile.am
@@ -160,14 +160,14 @@ if HAVE_VALA
if HAVE_INTROSPECTION
vapidir = $(datadir)/vala/vapi
-vapi_DATA = DbusmenuGtk$(VER)-0.4.vapi
+vapi_DATA = dbusmenu-gtk$(VER)-0.4.vapi
-DbusmenuGtk$(VER)-0.4.vapi: DbusmenuGtk$(VER)-0.4.tmp.gir Makefile.am
- $(VALA_API_GEN) --library=DbusmenuGtk$(VER)-0.4 \
+dbusmenu-gtk$(VER)-0.4.vapi: DbusmenuGtk$(VER)-0.4.tmp.gir Makefile.am
+ $(VALA_API_GEN) --library=dbusmenu-gtk$(VER)-0.4 \
--pkg gdk-pixbuf-2.0 \
--pkg $(GTKVALA) \
--pkg atk \
- --pkg Dbusmenu-0.4 \
+ --pkg dbusmenu-glib-0.4 \
--vapidir=$(top_builddir)/libdbusmenu-glib \
$<
diff --git a/libdbusmenu-gtk/genericmenuitem-enum-types.h.in b/libdbusmenu-gtk/genericmenuitem-enum-types.h.in
index 5758438..afd9132 100644
--- a/libdbusmenu-gtk/genericmenuitem-enum-types.h.in
+++ b/libdbusmenu-gtk/genericmenuitem-enum-types.h.in
@@ -43,7 +43,7 @@ G_END_DECLS
/*** END file-tail ***/
/*** BEGIN file-production ***/
-/* Enumerations from file: "@filename@" */
+/* Enumerations from file: "@basename@" */
#include "@basename@"
/*** END file-production ***/
diff --git a/libdbusmenu-gtk/genericmenuitem.c b/libdbusmenu-gtk/genericmenuitem.c
index 348a972..ae6d4c0 100644
--- a/libdbusmenu-gtk/genericmenuitem.c
+++ b/libdbusmenu-gtk/genericmenuitem.c
@@ -242,7 +242,7 @@ has_mnemonic (const gchar * string, gboolean previous_underscore)
}
/* Sanitize the label by removing "__" meaning "_" */
-gchar *
+static gchar *
sanitize_label (const gchar * in_label)
{
static GRegex * underscore_regex = NULL;
@@ -279,7 +279,7 @@ set_label (GtkMenuItem * menu_item, const gchar * in_label)
gchar * local_label = NULL;
switch (GENERICMENUITEM(menu_item)->priv->disposition) {
case GENERICMENUITEM_DISPOSITION_NORMAL:
- local_label = g_strdup(in_label);
+ local_label = g_markup_escape_text(in_label, -1);
break;
case GENERICMENUITEM_DISPOSITION_INFORMATIONAL:
case GENERICMENUITEM_DISPOSITION_WARNING:
diff --git a/tests/Makefile.am b/tests/Makefile.am
index df87dc8..c375562 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -16,10 +16,12 @@ TESTS = \
test-glib-submenu
if WANT_DBUSMENUDUMPER
+if HAVE_VALGRIND
TESTS += \
test-json \
test-json-instruction
endif
+endif
if WANT_LIBDBUSMENUGTK
TESTS += \
@@ -59,10 +61,12 @@ check_PROGRAMS = \
test-glib-simple-items
if WANT_DBUSMENUDUMPER
+if HAVE_VALGRIND
check_PROGRAMS += \
test-json-client \
test-json-server
endif
+endif
if WANT_LIBDBUSMENUGTK
check_PROGRAMS += \