aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acinclude.m42
-rwxr-xr-xautogen.sh3
-rw-r--r--bindings/mono/appindicator-sharp-0.1.pc.in2
-rw-r--r--configure.ac4
-rw-r--r--debian/changelog115
-rw-r--r--debian/control3
-rw-r--r--debian/gir1.2-appindicator-0.1.install2
-rw-r--r--debian/gir1.2-appindicator3-0.1.install2
-rw-r--r--debian/libappindicator0.1-cil-dev.install2
-rwxr-xr-xdebian/rules13
-rw-r--r--docs/reference/Makefile.am24
-rw-r--r--docs/reference/tmpl/libappindicator-unused.sgml42
-rw-r--r--gtk-doc.local.make194
-rw-r--r--src/app-indicator.c32
-rw-r--r--src/generate-id.c2
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/test-libappindicator-dbus-client.c2
-rw-r--r--tests/test-libappindicator-fallback-item.c2
-rw-r--r--tests/test-libappindicator-fallback-watcher.c5
-rw-r--r--tests/test-libappindicator-status-client.c6
-rw-r--r--tests/test-libappindicator-status-server.c37
-rw-r--r--tests/test-libappindicator.c28
-rw-r--r--tests/test-simple-app.c2
23 files changed, 213 insertions, 317 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 3e98bd3..8c75106 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -230,7 +230,7 @@ AC_MSG_CHECKING(for headers required to compile python extensions)
dnl deduce PYTHON_INCLUDES
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+PYTHON_INCLUDES="`$PYTHON-config --includes`"
if test "$py_prefix" != "$py_exec_prefix"; then
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
fi
diff --git a/autogen.sh b/autogen.sh
index 2058d34..43d2d98 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,12 +1,13 @@
#!/bin/sh
-PKG_NAME="liappindicator"
+PKG_NAME="libappindicator"
which gnome-autogen.sh || {
echo "You need gnome-common from GNOME SVN"
exit 1
}
+gtkdocize || exit 1
USE_GNOME2_MACROS=1 \
USE_COMMON_DOC_BUILD=yes \
gnome-autogen.sh --enable-gtk-doc $@
diff --git a/bindings/mono/appindicator-sharp-0.1.pc.in b/bindings/mono/appindicator-sharp-0.1.pc.in
index 11ae719..f63c01e 100644
--- a/bindings/mono/appindicator-sharp-0.1.pc.in
+++ b/bindings/mono/appindicator-sharp-0.1.pc.in
@@ -1,7 +1,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-assemblies_dir=${libdir}/cli/appindicator-sharp-0.1
+assemblies_dir=${prefix}/lib/cli/appindicator-sharp-0.1
Name: appindicator-sharp
Description: application indicators for .NET
diff --git a/configure.ac b/configure.ac
index ee03390..d131c9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ PKG_PROG_PKG_CONFIG
# GTK Doc
###########################
-GTK_DOC_CHECK([1.9])
+GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
###########################
@@ -42,7 +42,7 @@ GTK_DOC_CHECK([1.9])
GTK_REQUIRED_VERSION=2.18
GTK3_REQUIRED_VERSION=2.91
-GLIB_REQUIRED_VERSION=2.26
+GLIB_REQUIRED_VERSION=2.35.4
GIO_REQUIRED_VERSION=2.26
INDICATOR_REQUIRED_VERSION=0.4.93
DBUSMENUGTK_REQUIRED_VERSION=0.5.90
diff --git a/debian/changelog b/debian/changelog
index 7643608..33925a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,83 @@
-libappindicator (12.10.1-0ubuntu1) UNRELEASED; urgency=low
+libappindicator (12.10.1daily13.05.02-0ubuntu1) saucy; urgency=low
+ [ Mathieu Trudel-Lapierre ]
+ * debian/rules: drop the "clean" target, it's superfluous.
+
+ [ Ubuntu daily release ]
+ * Automatic snapshot from revision 261
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 02 May 2013 22:59:05 +0000
+
+libappindicator (12.10.1daily13.04.15-0ubuntu1) raring; urgency=low
+
+ * Automatic snapshot from revision 258
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 15 Apr 2013 02:02:56 +0000
+
+libappindicator (12.10.1daily13.04.12-0ubuntu1) raring; urgency=low
+
+ [ Iain Lane ]
+ * Install appindicator-sharp's pcfile into /usr/share/pkgconfig as this is
+ an arch:all package and library. Update the assemblydir variable in this
+ pcfile to refer to the correct location for the library instead of an
+ incorrect multiarch directory.
+
+ [ Ubuntu daily release ]
+ * Automatic snapshot from revision 258
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 12 Apr 2013 02:03:18 +0000
+
+libappindicator (12.10.1daily13.04.09-0ubuntu1) raring; urgency=low
+
+ * Automatic snapshot from revision 258
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 09 Apr 2013 02:02:28 +0000
+
+libappindicator (12.10.1daily13.04.08-0ubuntu1) raring; urgency=low
+
+ [ Mathieu Trudel-Lapierre ]
+ * debian/rules: reverse the order of dh_clean and dh_autoreconf_clean,
+ this fixes issues where clean removes files used by dh_autoreconf_clean.
+
+ [ Ubuntu daily release ]
+ * Automatic snapshot from revision 257
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 08 Apr 2013 02:02:59 +0000
+
+libappindicator (12.10.1daily13.03.13-0ubuntu1) raring; urgency=low
+
+ [ Sebastien Bacher ]
+ * stop build-depending on libindicate, it's deprecated and not used
+ there
+
+ [ Ubuntu daily release ]
+ * Automatic snapshot from revision 255
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 13 Mar 2013 02:02:14 +0000
+
+libappindicator (12.10.1daily13.02.15-0ubuntu1) raring; urgency=low
+
+ [ Charles Kerr ]
+ * Race condition in app_indicator_init() causes application crash (LP:
+ #1122596)
+
+ [ Iain Lane ]
+ * [raring] Python appindicators broken by the latest libappindicator
+ update (12.10.1daily13.02.13-0ubuntu1) with "ERROR:root:Could not
+ find any typelib for AppIndicator3" (LP: #1124941)
+
+ [ John Vert ]
+ * Race condition in app_indicator_init() causes application crash (LP:
+ #1122596)
+
+ [ Automatic PS uploader ]
+ * Automatic snapshot from revision 253
+
+ -- Automatic PS uploader <ps-jenkins@lists.canonical.com> Fri, 15 Feb 2013 07:46:54 +0000
+
+libappindicator (12.10.1daily13.02.13-0ubuntu1) raring; urgency=low
+
+ [ Mathieu Trudel-Lapierre ]
* debian/control:
- Update style: use trailing commas at the end of dependency lists.
- Reorganize Build-Depends for clarity.
@@ -15,11 +93,42 @@ libappindicator (12.10.1-0ubuntu1) UNRELEASED; urgency=low
- Add and export DPKG_GENSYMBOLS_CHECK_LEVEL.
- Override dh_autoreconf to run autogen.sh and not call configure.
- Override dh_auto_test to run tests per-flavor.
- - Temporarily disable tests.
* debian/*.install:
- Update paths for multiarch and for use with dh9 (remove debian/tmp...)
+ * Fix gtkdoc tests and building of the documentation given a separate build
+ directory.
+
+ [ Chris J Arges ]
+ * acinclude.m4: Fix python multi-arch include issues.
- -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Mon, 26 Nov 2012 11:02:18 -0500
+ [ Mathieu Trudel-Lapierre ]
+ * Automatic snapshot from revision 245 (bootstrap):
+ - Fix Vala classes not being able to inherit from Indicator (LP: #1065310)
+
+ [ Charles Kerr ]
+ * indicators call deprecated glib function g_type_init() (LP:
+ #1103087)
+ * test-libappindicator-status fails with "Toggle count: 99" (LP:
+ #1109128)
+ * Coverity COPY_PASTE_ERROR - CID 10969 (LP: #1102595)
+ * libappindicator-docs.sgml missing links (LP: #1083425)
+ * Coverity INTEGER_OVERFLOW - CID 10970 (LP: #1102589)
+
+ [ Charles Kerr <charles.kerr@canonical.com>, Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>, Michael Terry ]
+ * indicators call deprecated glib function g_type_init() (LP:
+ #1103087)
+ * test-libappindicator-status fails with "Toggle count: 99" (LP:
+ #1109128)
+ * Coverity INTEGER_OVERFLOW - CID 10970 (LP: #1102589)
+ * Coverity COPY_PASTE_ERROR - CID 10969 (LP: #1102595)
+
+ [ Mathieu Trudel-Lapierre ]
+ * Can't inherit from AppIndicator.Indicator in Vala (LP: #1065310)
+
+ [ Automatic PS uploader ]
+ * Automatic snapshot from revision 250
+
+ -- Automatic PS uploader <ps-jenkins@lists.canonical.com> Wed, 13 Feb 2013 02:02:41 +0000
libappindicator (12.10.0-0ubuntu1) quantal; urgency=low
diff --git a/debian/control b/debian/control
index a06d8b4..7ff551b 100644
--- a/debian/control
+++ b/debian/control
@@ -17,14 +17,13 @@ Build-Depends: debhelper (>= 9),
xvfb,
valac-0.16,
mono-devel (>= 2.4.3),
+ libglib2.0-dev (>= 2.35.4),
libgtk-3-dev (>= 2.91.3),
libgtk2.0-dev (>= 2.12.0),
python-gtk2-dev,
gtk-sharp2-gapi,
libgtk2.0-cil-dev,
libdbus-glib-1-dev (>= 0.82),
- libindicate-dev (>= 0.2.0),
- libindicate-gtk-dev (>= 0.2.0),
libindicator-dev (>= 0.3.90),
libindicator3-dev (>= 0.3.90),
libdbusmenu-glib-dev (>= 0.5.90),
diff --git a/debian/gir1.2-appindicator-0.1.install b/debian/gir1.2-appindicator-0.1.install
index 78b7732..00139ac 100644
--- a/debian/gir1.2-appindicator-0.1.install
+++ b/debian/gir1.2-appindicator-0.1.install
@@ -1 +1 @@
-usr/lib/*/girepository-1.0/AppIndicator-0.1.typelib
+usr/lib/*/girepository-1.0/AppIndicator-0.1.typelib usr/lib/girepository-1.0
diff --git a/debian/gir1.2-appindicator3-0.1.install b/debian/gir1.2-appindicator3-0.1.install
index 18925bd..46bb935 100644
--- a/debian/gir1.2-appindicator3-0.1.install
+++ b/debian/gir1.2-appindicator3-0.1.install
@@ -1 +1 @@
-usr/lib/*/girepository-1.0/AppIndicator3-0.1.typelib
+usr/lib/*/girepository-1.0/AppIndicator3-0.1.typelib usr/lib/girepository-1.0
diff --git a/debian/libappindicator0.1-cil-dev.install b/debian/libappindicator0.1-cil-dev.install
index 231bcc4..22bd601 100644
--- a/debian/libappindicator0.1-cil-dev.install
+++ b/debian/libappindicator0.1-cil-dev.install
@@ -1 +1 @@
-usr/lib/*/pkgconfig/appindicator-sharp-0.1.pc
+usr/lib/*/pkgconfig/appindicator-sharp-0.1.pc usr/share/pkgconfig
diff --git a/debian/rules b/debian/rules
index c4f16bc..f730a3f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,10 +17,6 @@ CFLAGS += -fPIC
%:
dh $@ --with autoreconf,python2,cli,gir
-# Note: No cli here so that the pbuilder stuff works
-clean:
- dh_clean
-
override_dh_autoreconf:
NOCONFIGURE=1 dh_autoreconf ./autogen.sh
@@ -72,14 +68,17 @@ override_dh_install:
override_dh_auto_test: $(FLAVORS:%=dotest-%)
dotest-%:
- #dh_auto_test --builddirectory=build/$*
+ dh_auto_test --builddirectory=build/$* --
+
dotest-gtk2: $(PY_VERSIONS:%=dotestgtk2-%)
# GTK2 flavor test was run on a per-python-version basis.
dotestgtk2-%:
- #PYTHON=`which $*` \
- # dh_auto_test --builddirectory=build/gtk2
+ ps -ef
+ env
+ PYTHON=`which $*` \
+ dh_auto_test --builddirectory=build/gtk2 --
override_dh_auto_clean:
dh_auto_clean
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 8f87b34..fd3479c 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -30,7 +30,7 @@ DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# gtk-doc will search all .c & .h files beneath here for inline comments
# documenting the functions and macros.
# e.g. DOC_SOURCE_DIR=../../../gtk
-DOC_SOURCE_DIR=../../src
+DOC_SOURCE_DIR=$(top_srcdir)/src
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
SCANGOBJ_OPTIONS=--nogtkinit --type-init-func="g_type_init()"
@@ -98,11 +98,11 @@ expand_content_files=
# signals and properties.
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
-GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src $(LIBRARY_CFLAGS)
+GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_srcdir)/src $(LIBRARY_CFLAGS)
GTKDOC_LIBS=$(top_builddir)/src/$(APPINDICATORLIB) $(LIBRARY_LIBS)
# This includes the standard gtk-doc make rules, copied by gtkdocize.
-include $(top_srcdir)/gtk-doc.local.make
+include $(top_srcdir)/gtk-doc.make
# Other files to distribute
# e.g. EXTRA_DIST += version.xml.in
@@ -113,13 +113,11 @@ EXTRA_DIST += version.xml.in libappindicator-docs.sgml.in
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
#DISTCLEANFILES +=
-# Comment this out if you want your docs-status tested during 'make check'
-TESTS = gtkdoc-in-srcdir
-
-gtkdoc-in-srcdir: Makefile.am
- @echo "#!/bin/sh" > $@
- @echo "cd \"$(srcdir)\"" >> $@
- @echo "$(GTKDOC_CHECK)" >> $@
- @chmod +x $@
-DISTCLEANFILES = gtkdoc-in-srcdir
-
+# Comment this out if you want 'make check' to test you doc status
+# and run some sanity checks
+if ENABLE_GTK_DOC
+TESTS_ENVIRONMENT = cd $(srcdir) && \
+ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
+ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
+#TESTS = $(GTKDOC_CHECK)
+endif
diff --git a/docs/reference/tmpl/libappindicator-unused.sgml b/docs/reference/tmpl/libappindicator-unused.sgml
deleted file mode 100644
index 789a03f..0000000
--- a/docs/reference/tmpl/libappindicator-unused.sgml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!-- ##### MACRO APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_DESC ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### SIGNAL AppIndicator::new-accessible-desc ##### -->
-<para>
-
-</para>
-
-@appindicator: the object which received the signal.
-@arg1:
-
-<!-- ##### ARG AppIndicator:accessible-desc ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ARG AppIndicator:icon-path ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION app_indicator_get_accessible_desc ##### -->
-<para>
-
-</para>
-
-@self:
-@Returns:
-
-<!-- ##### FUNCTION app_indicator_set_accessible_desc ##### -->
-<para>
-
-</para>
-
-@self:
-@accessible_desc:
-
diff --git a/gtk-doc.local.make b/gtk-doc.local.make
deleted file mode 100644
index 3dcda60..0000000
--- a/gtk-doc.local.make
+++ /dev/null
@@ -1,194 +0,0 @@
-# -*- mode: makefile -*-
-
-####################################
-# Everything below here is generic #
-####################################
-
-if GTK_DOC_USE_LIBTOOL
-GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
-GTKDOC_RUN = $(LIBTOOL) --mode=execute
-else
-GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
-GTKDOC_RUN = sh -c
-endif
-
-# We set GPATH here; this gives us semantics for GNU make
-# which are more like other make's VPATH, when it comes to
-# whether a source that is a target of one rule is then
-# searched for in VPATH/GPATH.
-#
-GPATH = $(srcdir)
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-EXTRA_DIST = \
- $(content_files) \
- $(HTML_IMAGES) \
- $(DOC_MAIN_SGML_FILE)
-
-DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
- $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
-
-SCANOBJ_FILES = \
- $(DOC_MODULE).args \
- $(DOC_MODULE).hierarchy \
- $(DOC_MODULE).interfaces \
- $(DOC_MODULE).prerequisites \
- $(DOC_MODULE).signals
-
-REPORT_FILES = \
- $(DOC_MODULE)-undocumented.txt \
- $(DOC_MODULE)-undeclared.txt \
- $(DOC_MODULE)-unused.txt
-
-CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
-
-if ENABLE_GTK_DOC
-all-local: html-build.stamp
-else
-all-local:
-endif
-
-docs: html-build.stamp
-
-$(REPORT_FILES): sgml-build.stamp
-
-#### scan ####
-
-scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
- @echo 'gtk-doc: Scanning header files'
- @-chmod -R u+w $(srcdir)
- cd $(srcdir) && \
- gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
- if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
- CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
- else \
- cd $(srcdir) ; \
- for i in $(SCANOBJ_FILES) ; do \
- test -f $$i || touch $$i ; \
- done \
- fi
- touch scan-build.stamp
-
-$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
- @true
-
-#### templates ####
-
-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
- @echo 'gtk-doc: Rebuilding template files'
- @-chmod -R u+w $(srcdir)
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
- touch tmpl-build.stamp
-
-tmpl.stamp: tmpl-build.stamp
- @true
-
-tmpl/*.sgml:
- @true
-
-
-#### xml ####
-
-sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
- @echo 'gtk-doc: Building XML'
- @-chmod -R u+w $(srcdir)
- cd $(srcdir) && \
- gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
- touch sgml-build.stamp
-
-sgml.stamp: sgml-build.stamp
- @true
-
-#### html ####
-
-html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
- @echo 'gtk-doc: Building HTML'
- @-chmod -R u+w $(srcdir)
- rm -rf $(srcdir)/html
- mkdir $(srcdir)/html
- mkhtml_options=""; \
- gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
- if test "$(?)" = "0"; then \
- mkhtml_options=--path="$(srcdir)"; \
- fi
- cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
- test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
- @echo 'gtk-doc: Fixing cross-references'
- cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
- touch html-build.stamp
-
-##############
-
-clean-local:
- rm -f *~ *.bak
- rm -rf .libs
-
-distclean-local:
- cd $(srcdir) && \
- rm -rf xml $(REPORT_FILES) \
- $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf xml html
-
-install-data-local:
- installfiles=`echo $(srcdir)/html/*`; \
- if test "$$installfiles" = '$(srcdir)/html/*'; \
- then echo '-- Nothing to install' ; \
- else \
- if test -n "$(DOC_MODULE_VERSION)"; then \
- installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
- else \
- installdir="$(DESTDIR)$(TARGET_DIR)"; \
- fi; \
- $(mkinstalldirs) $${installdir} ; \
- for i in $$installfiles; do \
- echo '-- Installing '$$i ; \
- $(INSTALL_DATA) $$i $${installdir}; \
- done; \
- if test -n "$(DOC_MODULE_VERSION)"; then \
- mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
- $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
- mv -f $${installdir}/$(DOC_MODULE).devhelp \
- $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \
- fi; \
- ! which gtkdoc-rebase >/dev/null 2>&1 || \
- gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \
- fi
-
-uninstall-local:
- if test -n "$(DOC_MODULE_VERSION)"; then \
- installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
- else \
- installdir="$(DESTDIR)$(TARGET_DIR)"; \
- fi; \
- rm -rf $${installdir}
-
-#
-# Require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtkdoc:
-else
-dist-check-gtkdoc:
- @echo "*** gtk-doc must be installed and enabled in order to make dist"
- @false
-endif
-
-dist-hook: dist-check-gtkdoc dist-hook-local
- mkdir $(distdir)/tmpl
- mkdir $(distdir)/xml
- mkdir $(distdir)/html
- -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
- -cp $(srcdir)/xml/*.xml $(distdir)/xml
- -cp $(srcdir)/html/* $(distdir)/html
- -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
- -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
- cd $(distdir) && rm -f $(DISTCLEANFILES)
- ! which gtkdoc-rebase >/dev/null 2>&1 || \
- gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
-
-.PHONY : dist-hook-local docs
diff --git a/src/app-indicator.c b/src/app-indicator.c
index 2e98b48..0fc577d 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -611,6 +611,8 @@ app_indicator_init (AppIndicator *self)
priv->sec_activate_target = NULL;
priv->sec_activate_enabled = FALSE;
+ self->priv = priv;
+
/* Start getting the session bus */
g_object_ref(self); /* ref for the bus creation callback */
g_bus_get(G_BUS_TYPE_SESSION, NULL, bus_creation, self);
@@ -618,8 +620,6 @@ app_indicator_init (AppIndicator *self)
g_signal_connect(G_OBJECT(gtk_icon_theme_get_default()),
"changed", G_CALLBACK(theme_changed_cb), self);
- self->priv = priv;
-
return;
}
@@ -1886,20 +1886,14 @@ app_indicator_set_attention_icon_full (AppIndicator *self, const gchar *icon_nam
gboolean changed = FALSE;
if (g_strcmp0 (self->priv->attention_icon_name, icon_name) != 0) {
- if (self->priv->attention_icon_name) {
- g_free (self->priv->attention_icon_name);
- }
-
- self->priv->attention_icon_name = g_strdup(icon_name);
+ g_free (self->priv->attention_icon_name);
+ self->priv->attention_icon_name = g_strdup (icon_name);
changed = TRUE;
}
if (g_strcmp0(self->priv->att_accessible_desc, icon_desc) != 0) {
- if (self->priv->att_accessible_desc) {
- g_free (self->priv->att_accessible_desc);
- }
-
- self->priv->att_accessible_desc = g_strdup(icon_name);
+ g_free (self->priv->att_accessible_desc);
+ self->priv->att_accessible_desc = g_strdup (icon_desc);
changed = TRUE;
}
@@ -1910,12 +1904,12 @@ app_indicator_set_attention_icon_full (AppIndicator *self, const gchar *icon_nam
GError * error = NULL;
g_dbus_connection_emit_signal(self->priv->connection,
- NULL,
- self->priv->path,
- NOTIFICATION_ITEM_DBUS_IFACE,
- "NewAttentionIcon",
- NULL,
- &error);
+ NULL,
+ self->priv->path,
+ NOTIFICATION_ITEM_DBUS_IFACE,
+ "NewAttentionIcon",
+ NULL,
+ &error);
if (error != NULL) {
g_warning("Unable to send signal for NewAttentionIcon: %s", error->message);
@@ -2485,7 +2479,7 @@ shorty_activated_cb (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data)
g_return_if_fail(priv->shorties != NULL);
- indicator_desktop_shortcuts_nick_exec(priv->shorties, nick);
+ indicator_desktop_shortcuts_nick_exec_with_context(priv->shorties, nick, NULL);
return;
}
diff --git a/src/generate-id.c b/src/generate-id.c
index 6389678..6208997 100644
--- a/src/generate-id.c
+++ b/src/generate-id.c
@@ -65,5 +65,5 @@ _generate_id (const AppIndicatorCategory catenum, const gchar * id)
}
}
- return (((((category * 256) + first) * 256) + second) * 256) + third;
+ return (((((category << 8) + first) << 8) + second) << 8) + third;
}
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a65f320..aed7d7f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -137,6 +137,7 @@ test_libappindicator_fallback_item_LDADD = \
test-libappindicator-fallback: test-libappindicator-fallback-watcher test-libappindicator-fallback-item Makefile.am
@echo "#!/bin/bash" > $@
+ @echo export DISPLAY= >> $@
@echo . $(srcdir)/run-xvfb.sh >> $@
@echo $(DBUS_RUNNER) --task ./test-libappindicator-fallback-watcher --task-name Watcher --ignore-return --task ./test-libappindicator-fallback-item --task-name Item >> $@
@chmod +x $@
@@ -152,6 +153,7 @@ HTML_REPORT = libappindicator-check-results.html
libappindicator-tests: libappindicator-tests-gtester Makefile.am
@echo "#!/bin/bash" > $@
+ @echo export DISPLAY= >> $@
@echo . $(srcdir)/run-xvfb.sh >> $@
@echo export UBUNTU_MENUPROXY= >> $@
@echo $(DBUS_RUNNER) --task ./libappindicator-tests-gtester >> $@
@@ -166,10 +168,11 @@ TESTS += libappindicator-tests
DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT) libappindicator-tests-gtester
-DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf
+DBUS_RUNNER=dbus-test-runner -m 300 --dbus-config /usr/share/dbus-test-runner/session.conf
test-libappindicator-dbus: test-libappindicator-dbus-client test-libappindicator-dbus-server Makefile.am
@echo "#!/bin/bash" > test-libappindicator-dbus
+ @echo export DISPLAY= >> $@
@echo . $(srcdir)/run-xvfb.sh >> $@
@echo $(DBUS_RUNNER) --task ./test-libappindicator-dbus-client --task-name Client --task ./test-libappindicator-dbus-server --task-name Server --ignore-return >> test-libappindicator-dbus
@chmod +x test-libappindicator-dbus
@@ -179,6 +182,7 @@ XFAIL_TESTS = test-libappindicator-dbus
test-libappindicator-status: test-libappindicator-status-client test-libappindicator-status-server Makefile.am
@echo "#!/bin/bash" > test-libappindicator-status
+ @echo export DISPLAY= >> $@
@echo . $(srcdir)/run-xvfb.sh >> $@
@echo $(DBUS_RUNNER) --task ./test-libappindicator-status-client --task-name Client --task ./test-libappindicator-status-server --task-name Server --ignore-return >> test-libappindicator-status
@chmod +x test-libappindicator-status
diff --git a/tests/test-libappindicator-dbus-client.c b/tests/test-libappindicator-dbus-client.c
index 9a51792..18c6946 100644
--- a/tests/test-libappindicator-dbus-client.c
+++ b/tests/test-libappindicator-dbus-client.c
@@ -204,8 +204,6 @@ dbus_filter (DBusConnection * connection, DBusMessage * message, void * user_dat
gint
main (gint argc, gchar * argv[])
{
- g_type_init();
-
GError * error = NULL;
DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
if (error != NULL) {
diff --git a/tests/test-libappindicator-fallback-item.c b/tests/test-libappindicator-fallback-item.c
index 418b779..c87ef8c 100644
--- a/tests/test-libappindicator-fallback-item.c
+++ b/tests/test-libappindicator-fallback-item.c
@@ -138,7 +138,7 @@ main (int argc, char ** argv)
GtkWidget * menu = gtk_menu_new();
app_indicator_set_menu(APP_INDICATOR(item), GTK_MENU(menu));
- g_timeout_add_seconds(2, kill_func, NULL);
+ g_timeout_add_seconds(20, kill_func, NULL);
mainloop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(mainloop);
diff --git a/tests/test-libappindicator-fallback-watcher.c b/tests/test-libappindicator-fallback-watcher.c
index 5494082..2648902 100644
--- a/tests/test-libappindicator-fallback-watcher.c
+++ b/tests/test-libappindicator-fallback-watcher.c
@@ -58,8 +58,6 @@ kill_func (gpointer userdata)
int
main (int argv, char ** argc)
{
- g_type_init();
-
g_debug("Waiting to init.");
@@ -77,6 +75,7 @@ main (int argv, char ** argc)
while (!has_owner && owner_count < 10000) {
org_freedesktop_DBus_name_has_owner(bus_proxy, "org.test", &has_owner, NULL);
owner_count++;
+ g_usleep(500000);
}
if (owner_count == 10000) {
@@ -104,7 +103,7 @@ main (int argv, char ** argc)
/* This is the final kill function. It really shouldn't happen
unless we get an error. */
- g_timeout_add(2000, kill_func, NULL);
+ g_timeout_add_seconds(20, kill_func, NULL);
g_debug("Entering Mainloop");
diff --git a/tests/test-libappindicator-status-client.c b/tests/test-libappindicator-status-client.c
index 9e39ed8..cd60e6c 100644
--- a/tests/test-libappindicator-status-client.c
+++ b/tests/test-libappindicator-status-client.c
@@ -109,8 +109,6 @@ kill_func (gpointer userdata)
gint
main (gint argc, gchar * argv[])
{
- g_type_init();
-
GError * error = NULL;
DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
if (error != NULL) {
@@ -118,7 +116,7 @@ main (gint argc, gchar * argv[])
return 1;
}
- DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
+ DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
guint nameret = 0;
if (!org_freedesktop_DBus_request_name(bus_proxy, NOTIFICATION_WATCHER_DBUS_ADDR, 0, &nameret, &error)) {
@@ -137,7 +135,7 @@ main (gint argc, gchar * argv[])
dbus_bus_add_match(dbus_g_connection_get_connection(session_bus), "type='signal',interface='" NOTIFICATION_ITEM_DBUS_IFACE "',member='NewStatus'", NULL);
watchdog_hit = TRUE;
- g_timeout_add(1000, kill_func, NULL);
+ g_timeout_add_seconds(20, kill_func, NULL);
mainloop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(mainloop);
diff --git a/tests/test-libappindicator-status-server.c b/tests/test-libappindicator-status-server.c
index 8cd5571..9674f61 100644
--- a/tests/test-libappindicator-status-server.c
+++ b/tests/test-libappindicator-status-server.c
@@ -22,34 +22,39 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdlib.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
#include <glib.h>
#include <app-indicator.h>
static GMainLoop * mainloop = NULL;
static gboolean active = FALSE;
static guint toggle_count = 0;
+static GDBusConnection * connection = NULL;
+
+static gboolean
+times_up (gpointer unused G_GNUC_UNUSED)
+{
+ g_dbus_connection_flush_sync (connection, NULL, NULL);
+ g_clear_object (&connection);
+
+ g_main_loop_quit (mainloop);
+ return G_SOURCE_REMOVE;
+}
gboolean
toggle (gpointer userdata)
{
- if (active) {
- app_indicator_set_status (APP_INDICATOR(userdata), APP_INDICATOR_STATUS_ATTENTION);
- active = FALSE;
- } else {
- app_indicator_set_status (APP_INDICATOR(userdata), APP_INDICATOR_STATUS_ACTIVE);
- active = TRUE;
- }
-
- toggle_count++;
+ const AppIndicatorStatus new_status = active ? APP_INDICATOR_STATUS_ATTENTION
+ : APP_INDICATOR_STATUS_ACTIVE;
+ app_indicator_set_status (APP_INDICATOR(userdata), new_status);
+ ++toggle_count;
+ active = !active;
if (toggle_count == 100) {
- g_main_loop_quit(mainloop);
- return FALSE;
+ g_timeout_add (100, times_up, NULL);
+ return G_SOURCE_REMOVE;
}
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
gint
@@ -59,7 +64,8 @@ main (gint argc, gchar * argv[])
g_usleep(100000);
- g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL))));
+ connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+ g_debug("DBus Name: %s", g_dbus_connection_get_unique_name (connection));
AppIndicator * ci = app_indicator_new ("my-id", "my-icon-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
app_indicator_set_attention_icon (ci, "my-attention-icon");
@@ -76,6 +82,7 @@ main (gint argc, gchar * argv[])
g_main_loop_run(mainloop);
g_object_unref(G_OBJECT(ci));
+
g_debug("Quiting");
return 0;
diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c
index 7afd3ba..0c69fde 100644
--- a/tests/test-libappindicator.c
+++ b/tests/test-libappindicator.c
@@ -28,6 +28,16 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libdbusmenu-glib/menuitem.h>
#include <libdbusmenu-glib/server.h>
+static gboolean
+allow_warnings (const gchar *log_domain, GLogLevelFlags log_level,
+ const gchar *message, gpointer user_data)
+{
+ // By default, gtest will fail a test on even a warning message.
+ // But since some of our sub-libraries are noisy (especially at-spi2),
+ // only fail on critical or worse.
+ return ((log_level & G_LOG_LEVEL_MASK) <= G_LOG_LEVEL_CRITICAL);
+}
+
void
test_libappindicator_prop_signals_status_helper (AppIndicator * ci, gchar * status, gboolean * signalactivated)
{
@@ -45,6 +55,8 @@ test_libappindicator_prop_signals_helper (AppIndicator * ci, gboolean * signalac
void
test_libappindicator_prop_signals (void)
{
+ g_test_log_set_fatal_handler (allow_warnings, NULL);
+
AppIndicator * ci = app_indicator_new ("test-app-indicator",
"indicator-messages",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -115,6 +127,8 @@ test_libappindicator_prop_signals (void)
void
test_libappindicator_init_set_props (void)
{
+ g_test_log_set_fatal_handler (allow_warnings, NULL);
+
AppIndicator * ci = app_indicator_new ("my-id",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -139,6 +153,8 @@ test_libappindicator_init_set_props (void)
void
test_libappindicator_init_with_props (void)
{
+ g_test_log_set_fatal_handler (allow_warnings, NULL);
+
AppIndicator * ci = app_indicator_new ("my-id",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -161,6 +177,8 @@ test_libappindicator_init_with_props (void)
void
test_libappindicator_init (void)
{
+ g_test_log_set_fatal_handler (allow_warnings, NULL);
+
AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
g_assert(ci != NULL);
g_object_unref(G_OBJECT(ci));
@@ -170,6 +188,8 @@ test_libappindicator_init (void)
void
test_libappindicator_set_label (void)
{
+ g_test_log_set_fatal_handler (allow_warnings, NULL);
+
AppIndicator * ci = app_indicator_new ("my-id",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -232,6 +252,8 @@ test_libappindicator_set_label (void)
void
test_libappindicator_set_menu (void)
{
+ g_test_log_set_fatal_handler (allow_warnings, NULL);
+
AppIndicator * ci = app_indicator_new ("my-id",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -301,6 +323,8 @@ label_signals_check (void)
void
test_libappindicator_label_signals (void)
{
+ g_test_log_set_fatal_handler (allow_warnings, NULL);
+
gint label_signals_count = 0;
AppIndicator * ci = app_indicator_new ("my-id",
"my-name",
@@ -352,6 +376,8 @@ test_libappindicator_label_signals (void)
void
test_libappindicator_desktop_menu (void)
{
+ g_test_log_set_fatal_handler (allow_warnings, NULL);
+
AppIndicator * ci = app_indicator_new ("my-id-desktop-menu",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -388,6 +414,8 @@ test_libappindicator_desktop_menu (void)
void
test_libappindicator_desktop_menu_bad (void)
{
+ g_test_log_set_fatal_handler (allow_warnings, NULL);
+
AppIndicator * ci = app_indicator_new ("my-id-desktop-menu-bad",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
diff --git a/tests/test-simple-app.c b/tests/test-simple-app.c
index d60d9b9..843466d 100644
--- a/tests/test-simple-app.c
+++ b/tests/test-simple-app.c
@@ -31,8 +31,6 @@ static GMainLoop * mainloop = NULL;
int
main (int argc, char ** argv)
{
- g_type_init();
-
DbusmenuServer * dms = dbusmenu_server_new("/menu");
DbusmenuMenuitem * dmi = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set(dmi, "label", "Bob");