aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libayatana-indicator/indicator-ng.c5
-rw-r--r--tests/Makefile.am16
2 files changed, 18 insertions, 3 deletions
diff --git a/libayatana-indicator/indicator-ng.c b/libayatana-indicator/indicator-ng.c
index bd2176e..f4db2e6 100644
--- a/libayatana-indicator/indicator-ng.c
+++ b/libayatana-indicator/indicator-ng.c
@@ -547,7 +547,10 @@ static void indicator_ng_set_label(IndicatorNg *self, const gchar *label)
gtk_css_provider_load_from_data(pCssProvider, sCss, -1, NULL);
g_free(sCss);
g_object_unref(pCssProvider);
- gtk_box_set_spacing(GTK_BOX(pParent), nSpacing);
+ if (GTK_IS_BOX(pParent))
+ {
+ gtk_box_set_spacing(GTK_BOX(pParent), nSpacing);
+ }
gtk_label_set_label(GTK_LABEL (self->entry.label), sLabel);
if (label)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3d7ea3b..87430f6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -499,8 +499,20 @@ test_indicator_ng_LDADD = \
-L$(top_builddir)/libayatana-indicator/.libs \
$(INDICATOR_LIB)
-TESTS += test-indicator-ng
-DISTCLEANFILES += test-indicator-ng
+
+test-indicator-ng-dbus-runner: test-indicator-ng Makefile.am
+ @echo "#!/bin/sh" > $@
+ @echo $(DBUS_RUNNER) --task ./test-indicator-ng >> $@
+ @chmod +x $@
+
+test-indicator-ng-tester: test-indicator-ng-dbus-runner Makefile.am
+ @echo "#!/bin/bash" > $@
+ @echo $(XVFB_RUN) >> $@
+ @echo gtester -k --verbose -o=$(XML_REPORT) ./test-indicator-ng-dbus-runner >> $@
+ @chmod +x $@
+
+TESTS += test-indicator-ng-tester
+DISTCLEANFILES += test-indicator-ng-tester test-indicator-ng-dbus-runner test-indicator-ng
# Mock indicator service
check_PROGRAMS += indicator-test-service