Merge lp:~indicator-applet-developers/ubuntu/precise/indicator-power/upstream into lp:~ubuntu-desktop/indicator-power/ubuntu

Proposed by Charles Kerr
Status: Merged
Merged at revision: 101
Proposed branch: lp:~indicator-applet-developers/ubuntu/precise/indicator-power/upstream
Merge into: lp:~ubuntu-desktop/indicator-power/ubuntu
Diff against target: 720 lines (+272/-158)
9 files modified
ChangeLog (+36/-0)
Makefile.am (+1/-35)
Makefile.am.coverage (+48/-0)
Makefile.in (+47/-40)
configure (+101/-63)
configure.ac (+4/-1)
debian/changelog (+8/-0)
m4/gcov.m4 (+13/-10)
src/indicator-power.c (+14/-9)
To merge this branch: bzr merge lp:~indicator-applet-developers/ubuntu/precise/indicator-power/upstream
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+101585@code.launchpad.net

Description of the change

indicator-power 2.0

  * Make menu items accessible with Orca Screen reader (LP: #953176)
  * Plug memory leaks when updating our icons

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2012-03-21 17:45:36 +0000
+++ ChangeLog 2012-04-11 15:22:35 +0000
@@ -1,5 +1,41 @@
1# Generated by Makefile. Do not edit.1# Generated by Makefile. Do not edit.
22
32012-04-11 Charles Kerr <charles.kerr@canonical.com>
4
5 2.0
6
72012-04-10 Charles Kerr <charles.kerr@canonical.com>
8
9 merge lp:~allanlesage/indicator-power/TDD to improve our gcov fules in autotools
10
112012-03-27 Allan LeSage <allanlesage@gmail.com>
12
13 Pedantic name change for gcovr xml results.
14
152012-03-27 Allan LeSage <allanlesage@gmail.com>
16
17 Added gcov coverage tooling.
18
192012-04-09 Charles Kerr <charles.kerr@canonical.com>
20
21 use atk_object_set_name(foo,bar)" instead of g_object_set(foo,"accessible-name",bar,NULL)"
22
232012-04-09 Charles Kerr <charles.kerr@canonical.com>
24
25 leak fix 3 of 3: don't leak the GIcons returned by get_device_icon()
26
272012-04-09 Charles Kerr <charles.kerr@canonical.com>
28
29 leak fix 2 of 3: fix leaky fallback GIcon in get_device_icon()
30
312012-04-09 Charles Kerr <charles.kerr@canonical.com>
32
33 leak fix 1 of 3: don't leak object_path and device_icon if kind == UP_DEVICE_KIND_LINE_POWER
34
352012-04-09 Charles Kerr <charles.kerr@canonical.com>
36
37 if possible, set the device menuitems' accessible names.
38
32012-03-21 Charles Kerr <charles.kerr@canonical.com>392012-03-21 Charles Kerr <charles.kerr@canonical.com>
440
5 1.9341 1.93
642
=== modified file 'Makefile.am'
--- Makefile.am 2012-02-14 22:06:04 +0000
+++ Makefile.am 2012-04-11 15:22:35 +0000
@@ -61,38 +61,4 @@
61 echo Failed to generate AUTHORS: not a branch >&2; \61 echo Failed to generate AUTHORS: not a branch >&2; \
62 fi62 fi
6363
6464include $(top_srcdir)/Makefile.am.coverage
65# Coverage targets
66
67.PHONY: clean-gcda
68clean-gcda:
69 @echo Removing old coverage results
70 -find -name '*.gcda' -print | xargs -r rm
71
72.PHONY: coverage-html generate-coverage-html clean-coverage-html
73coverage-html: clean-gcda
74 -$(MAKE) $(AM_MAKEFLAGS) -k check
75 $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
76
77generate-coverage-html:
78 @echo Collecting coverage data
79 $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
80 LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
81
82clean-coverage-html: clean-gcda
83 -$(LCOV) --directory $(top_builddir) -z
84 -rm -rf coverage.info coveragereport
85
86.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml
87coverage-xml: clean-gcda
88 -$(MAKE) $(AM_MAKEFLAGS) -k check
89 $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml
90
91generate-coverage-xml:
92 @echo Generating coverage XML report
93 $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
94
95clean-coverage-xml: clean-gcda
96 -rm -rf $(top_builddir)/coverage.xml
97
98clean-local: clean-coverage-html clean-coverage-xml
9965
=== added file 'Makefile.am.coverage'
--- Makefile.am.coverage 1970-01-01 00:00:00 +0000
+++ Makefile.am.coverage 2012-04-11 15:22:35 +0000
@@ -0,0 +1,48 @@
1
2# Coverage targets
3
4.PHONY: clean-gcno clean-gcda \
5 coverage-html generate-coverage-html clean-coverage-html \
6 coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr
7
8clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr
9
10if HAVE_GCOV
11
12clean-gcno:
13 @echo Removing old coverage instrumentation
14 -find -name '*.gcno' -print | xargs -r rm
15
16clean-gcda:
17 @echo Removing old coverage results
18 -find -name '*.gcda' -print | xargs -r rm
19
20coverage-html: clean-gcda
21 -$(MAKE) $(AM_MAKEFLAGS) -k check
22 $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
23
24generate-coverage-html:
25 @echo Collecting coverage data
26 $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
27 LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
28
29clean-coverage-html: clean-gcda
30 -$(LCOV) --directory $(top_builddir) -z
31 -rm -rf coverage.info coveragereport
32
33if HAVE_GCOVR
34
35coverage-gcovr: clean-gcda
36 -$(MAKE) $(AM_MAKEFLAGS) -k check
37 $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr
38
39generate-coverage-gcovr:
40 @echo Generating coverage GCOVR report
41 $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
42
43clean-coverage-gcovr: clean-gcda
44 -rm -rf $(top_builddir)/coverage.xml
45
46endif # HAVE_GCOVR
47
48endif # HAVE_GCOV
049
=== modified file 'Makefile.in'
--- Makefile.in 2012-02-14 22:25:10 +0000
+++ Makefile.in 2012-04-11 15:22:35 +0000
@@ -15,6 +15,8 @@
1515
16@SET_MAKE@16@SET_MAKE@
1717
18# Coverage targets
19
1820
19VPATH = @srcdir@21VPATH = @srcdir@
20pkgdatadir = $(datadir)/@PACKAGE@22pkgdatadir = $(datadir)/@PACKAGE@
@@ -35,13 +37,14 @@
35POST_UNINSTALL = :37POST_UNINSTALL = :
36build_triplet = @build@38build_triplet = @build@
37host_triplet = @host@39host_triplet = @host@
38subdir = .
39DIST_COMMON = $(am__configure_deps) $(dist_noinst_SCRIPTS) \40DIST_COMMON = $(am__configure_deps) $(dist_noinst_SCRIPTS) \
40 $(srcdir)/Makefile.am $(srcdir)/Makefile.in \41 $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
41 $(srcdir)/config.h.in $(top_srcdir)/configure ABOUT-NLS \42 $(srcdir)/config.h.in $(top_srcdir)/Makefile.am.coverage \
42 COPYING build-aux/compile build-aux/config.guess \43 $(top_srcdir)/configure ABOUT-NLS COPYING build-aux/compile \
43 build-aux/config.rpath build-aux/config.sub build-aux/depcomp \44 build-aux/config.guess build-aux/config.rpath \
44 build-aux/install-sh build-aux/ltmain.sh build-aux/missing45 build-aux/config.sub build-aux/depcomp build-aux/install-sh \
46 build-aux/ltmain.sh build-aux/missing
47subdir = .
45ACLOCAL_M4 = $(top_srcdir)/aclocal.m448ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
46am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \49am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
47 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \50 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
@@ -393,7 +396,7 @@
393.SUFFIXES: .c .lo .o .obj396.SUFFIXES: .c .lo .o .obj
394am--refresh: Makefile397am--refresh: Makefile
395 @:398 @:
396$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)399$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.coverage $(am__configure_deps)
397 @for dep in $?; do \400 @for dep in $?; do \
398 case '$(am__configure_deps)' in \401 case '$(am__configure_deps)' in \
399 *$$dep*) \402 *$$dep*) \
@@ -416,6 +419,7 @@
416 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \419 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
417 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \420 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
418 esac;421 esac;
422$(top_srcdir)/Makefile.am.coverage:
419423
420$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)424$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
421 $(SHELL) ./config.status --recheck425 $(SHELL) ./config.status --recheck
@@ -1026,40 +1030,43 @@
1026 echo Failed to generate AUTHORS: not a branch >&2; \1030 echo Failed to generate AUTHORS: not a branch >&2; \
1027 fi1031 fi
10281032
1029# Coverage targets1033.PHONY: clean-gcno clean-gcda \
10301034 coverage-html generate-coverage-html clean-coverage-html \
1031.PHONY: clean-gcda1035 coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr
1032clean-gcda:1036
1033 @echo Removing old coverage results1037clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr
1034 -find -name '*.gcda' -print | xargs -r rm1038
10351039@HAVE_GCOV_TRUE@clean-gcno:
1036.PHONY: coverage-html generate-coverage-html clean-coverage-html1040@HAVE_GCOV_TRUE@ @echo Removing old coverage instrumentation
1037coverage-html: clean-gcda1041@HAVE_GCOV_TRUE@ -find -name '*.gcno' -print | xargs -r rm
1038 -$(MAKE) $(AM_MAKEFLAGS) -k check1042
1039 $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html1043@HAVE_GCOV_TRUE@clean-gcda:
10401044@HAVE_GCOV_TRUE@ @echo Removing old coverage results
1041generate-coverage-html:1045@HAVE_GCOV_TRUE@ -find -name '*.gcda' -print | xargs -r rm
1042 @echo Collecting coverage data1046
1043 $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool1047@HAVE_GCOV_TRUE@coverage-html: clean-gcda
1044 LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info1048@HAVE_GCOV_TRUE@ -$(MAKE) $(AM_MAKEFLAGS) -k check
10451049@HAVE_GCOV_TRUE@ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
1046clean-coverage-html: clean-gcda1050
1047 -$(LCOV) --directory $(top_builddir) -z1051@HAVE_GCOV_TRUE@generate-coverage-html:
1048 -rm -rf coverage.info coveragereport1052@HAVE_GCOV_TRUE@ @echo Collecting coverage data
10491053@HAVE_GCOV_TRUE@ $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
1050.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml1054@HAVE_GCOV_TRUE@ LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
1051coverage-xml: clean-gcda1055
1052 -$(MAKE) $(AM_MAKEFLAGS) -k check1056@HAVE_GCOV_TRUE@clean-coverage-html: clean-gcda
1053 $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml1057@HAVE_GCOV_TRUE@ -$(LCOV) --directory $(top_builddir) -z
10541058@HAVE_GCOV_TRUE@ -rm -rf coverage.info coveragereport
1055generate-coverage-xml:1059
1056 @echo Generating coverage XML report1060@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@coverage-gcovr: clean-gcda
1057 $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml1061@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ -$(MAKE) $(AM_MAKEFLAGS) -k check
10581062@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr
1059clean-coverage-xml: clean-gcda1063
1060 -rm -rf $(top_builddir)/coverage.xml1064@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@generate-coverage-gcovr:
10611065@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ @echo Generating coverage GCOVR report
1062clean-local: clean-coverage-html clean-coverage-xml1066@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
1067
1068@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@clean-coverage-gcovr: clean-gcda
1069@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ -rm -rf $(top_builddir)/coverage.xml
10631070
1064# Tell versions [3.59,3.63) of GNU make to not export all variables.1071# Tell versions [3.59,3.63) of GNU make to not export all variables.
1065# Otherwise a system limit (for SysV at least) may be exceeded.1072# Otherwise a system limit (for SysV at least) may be exceeded.
10661073
=== modified file 'configure'
--- configure 2012-03-21 17:45:36 +0000
+++ configure 2012-04-11 15:22:35 +0000
@@ -1,6 +1,6 @@
1#! /bin/sh1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.68 for indicator-power 1.93.3# Generated by GNU Autoconf 2.68 for indicator-power 2.0.
4#4#
5# Report bugs to <http://bugs.launchpad.net/indicator-power>.5# Report bugs to <http://bugs.launchpad.net/indicator-power>.
6#6#
@@ -570,8 +570,8 @@
570# Identity of this package.570# Identity of this package.
571PACKAGE_NAME='indicator-power'571PACKAGE_NAME='indicator-power'
572PACKAGE_TARNAME='indicator-power'572PACKAGE_TARNAME='indicator-power'
573PACKAGE_VERSION='1.93'573PACKAGE_VERSION='2.0'
574PACKAGE_STRING='indicator-power 1.93'574PACKAGE_STRING='indicator-power 2.0'
575PACKAGE_BUGREPORT='http://bugs.launchpad.net/indicator-power'575PACKAGE_BUGREPORT='http://bugs.launchpad.net/indicator-power'
576PACKAGE_URL='http://launchpad.net/indicator-power'576PACKAGE_URL='http://launchpad.net/indicator-power'
577577
@@ -671,6 +671,12 @@
671COVERAGE_LDFLAGS671COVERAGE_LDFLAGS
672COVERAGE_CXXFLAGS672COVERAGE_CXXFLAGS
673COVERAGE_CFLAGS673COVERAGE_CFLAGS
674HAVE_GCOVR_FALSE
675HAVE_GCOVR_TRUE
676HAVE_LCOV_FALSE
677HAVE_LCOV_TRUE
678HAVE_GCOV_FALSE
679HAVE_GCOV_TRUE
674GCOVR680GCOVR
675GENHTML681GENHTML
676LCOV682LCOV
@@ -1384,7 +1390,7 @@
1384 # Omit some internal or obsolete options to make the list less imposing.1390 # Omit some internal or obsolete options to make the list less imposing.
1385 # This message is too long to be a string in the A/UX 3.1 sh.1391 # This message is too long to be a string in the A/UX 3.1 sh.
1386 cat <<_ACEOF1392 cat <<_ACEOF
1387\`configure' configures indicator-power 1.93 to adapt to many kinds of systems.1393\`configure' configures indicator-power 2.0 to adapt to many kinds of systems.
13881394
1389Usage: $0 [OPTION]... [VAR=VALUE]...1395Usage: $0 [OPTION]... [VAR=VALUE]...
13901396
@@ -1454,7 +1460,7 @@
14541460
1455if test -n "$ac_init_help"; then1461if test -n "$ac_init_help"; then
1456 case $ac_init_help in1462 case $ac_init_help in
1457 short | recursive ) echo "Configuration of indicator-power 1.93:";;1463 short | recursive ) echo "Configuration of indicator-power 2.0:";;
1458 esac1464 esac
1459 cat <<\_ACEOF1465 cat <<\_ACEOF
14601466
@@ -1586,7 +1592,7 @@
1586test -n "$ac_init_help" && exit $ac_status1592test -n "$ac_init_help" && exit $ac_status
1587if $ac_init_version; then1593if $ac_init_version; then
1588 cat <<\_ACEOF1594 cat <<\_ACEOF
1589indicator-power configure 1.931595indicator-power configure 2.0
1590generated by GNU Autoconf 2.681596generated by GNU Autoconf 2.68
15911597
1592Copyright (C) 2010 Free Software Foundation, Inc.1598Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1864,7 +1870,7 @@
1864This file contains any messages produced by compilers while1870This file contains any messages produced by compilers while
1865running configure, to aid debugging if configure makes a mistake.1871running configure, to aid debugging if configure makes a mistake.
18661872
1867It was created by indicator-power $as_me 1.93, which was1873It was created by indicator-power $as_me 2.0, which was
1868generated by GNU Autoconf 2.68. Invocation command line was1874generated by GNU Autoconf 2.68. Invocation command line was
18691875
1870 $ $0 $@1876 $ $0 $@
@@ -2688,7 +2694,7 @@
26882694
2689# Define the identity of the package.2695# Define the identity of the package.
2690 PACKAGE='indicator-power'2696 PACKAGE='indicator-power'
2691 VERSION='1.93'2697 VERSION='2.0'
26922698
26932699
2694cat >>confdefs.h <<_ACEOF2700cat >>confdefs.h <<_ACEOF
@@ -12193,13 +12199,7 @@
12193 # AC_TDD_GCOV12199 # AC_TDD_GCOV
1219412200
1219512201
12196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether code coverage tools are available" >&512202 # Check whether --enable-gcov was given.
12197$as_echo_n "checking whether code coverage tools are available... " >&6; }
12198if ${ac_cv_check_gcov+:} false; then :
12199 $as_echo_n "(cached) " >&6
12200else
12201
12202# Check whether --enable-gcov was given.
12203if test "${enable_gcov+set}" = set; then :12203if test "${enable_gcov+set}" = set; then :
12204 enableval=$enable_gcov; use_gcov=$enableval12204 enableval=$enable_gcov; use_gcov=$enableval
12205else12205else
@@ -12335,43 +12335,6 @@
12335fi12335fi
1233612336
1233712337
12338 # Extract the first word of "gcovr", so it can be a program name with args.
12339set dummy gcovr; ac_word=$2
12340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12341$as_echo_n "checking for $ac_word... " >&6; }
12342if ${ac_cv_prog_GCOVR+:} false; then :
12343 $as_echo_n "(cached) " >&6
12344else
12345 if test -n "$GCOVR"; then
12346 ac_cv_prog_GCOVR="$GCOVR" # Let the user override the test.
12347else
12348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12349for as_dir in $PATH
12350do
12351 IFS=$as_save_IFS
12352 test -z "$as_dir" && as_dir=.
12353 for ac_exec_ext in '' $ac_executable_extensions; do
12354 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12355 ac_cv_prog_GCOVR="gcovr"
12356 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12357 break 2
12358 fi
12359done
12360 done
12361IFS=$as_save_IFS
12362
12363fi
12364fi
12365GCOVR=$ac_cv_prog_GCOVR
12366if test -n "$GCOVR"; then
12367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOVR" >&5
12368$as_echo "$GCOVR" >&6; }
12369else
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12371$as_echo "no" >&6; }
12372fi
12373
12374
1237512338
12376 if test "$LCOV"; then12339 if test "$LCOV"; then
12377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&512340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5
@@ -12408,10 +12371,8 @@
12408 as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 512371 as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5
12409 fi12372 fi
1241012373
12411 if test -z "$GCOVR"; then12374 ac_cv_check_gcov=yes
12412 as_fn_error $? "Could not find gcovr; easy_install (or pip) gcovr" "$LINENO" 512375 ac_cv_check_lcov=yes
12413 fi
12414
1241512376
12416 # Remove all optimization flags from CFLAGS12377 # Remove all optimization flags from CFLAGS
1241712378
@@ -12423,11 +12384,76 @@
12423 COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage"12384 COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage"
12424 COVERAGE_LDFLAGS="-lgcov"12385 COVERAGE_LDFLAGS="-lgcov"
1242512386
12426fi12387 # Check availability of gcovr
1242712388 # Extract the first word of "gcovr", so it can be a program name with args.
12428fi12389set dummy gcovr; ac_word=$2
12429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_check_gcov" >&512390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12430$as_echo "$ac_cv_check_gcov" >&6; }12391$as_echo_n "checking for $ac_word... " >&6; }
12392if ${ac_cv_prog_GCOVR+:} false; then :
12393 $as_echo_n "(cached) " >&6
12394else
12395 if test -n "$GCOVR"; then
12396 ac_cv_prog_GCOVR="$GCOVR" # Let the user override the test.
12397else
12398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12399for as_dir in $PATH
12400do
12401 IFS=$as_save_IFS
12402 test -z "$as_dir" && as_dir=.
12403 for ac_exec_ext in '' $ac_executable_extensions; do
12404 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12405 ac_cv_prog_GCOVR="gcovr"
12406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12407 break 2
12408 fi
12409done
12410 done
12411IFS=$as_save_IFS
12412
12413fi
12414fi
12415GCOVR=$ac_cv_prog_GCOVR
12416if test -n "$GCOVR"; then
12417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOVR" >&5
12418$as_echo "$GCOVR" >&6; }
12419else
12420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12421$as_echo "no" >&6; }
12422fi
12423
12424
12425 if test -z "$GCOVR"; then
12426 ac_cv_check_gcovr=no
12427 else
12428 ac_cv_check_gcovr=yes
12429 fi
12430
12431fi
12432
12433 if test "x$ac_cv_check_gcov" = xyes; then
12434 HAVE_GCOV_TRUE=
12435 HAVE_GCOV_FALSE='#'
12436else
12437 HAVE_GCOV_TRUE='#'
12438 HAVE_GCOV_FALSE=
12439fi
12440
12441 if test "x$ac_cv_check_lcov" = xyes; then
12442 HAVE_LCOV_TRUE=
12443 HAVE_LCOV_FALSE='#'
12444else
12445 HAVE_LCOV_TRUE='#'
12446 HAVE_LCOV_FALSE=
12447fi
12448
12449 if test "x$ac_cv_check_gcovr" = xyes; then
12450 HAVE_GCOVR_TRUE=
12451 HAVE_GCOVR_FALSE='#'
12452else
12453 HAVE_GCOVR_TRUE='#'
12454 HAVE_GCOVR_FALSE=
12455fi
12456
1243112457
1243212458
1243312459
@@ -15081,6 +15107,18 @@
15081 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.15107 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
15082Usually this means the macro was only invoked conditionally." "$LINENO" 515108Usually this means the macro was only invoked conditionally." "$LINENO" 5
15083fi15109fi
15110if test -z "${HAVE_GCOV_TRUE}" && test -z "${HAVE_GCOV_FALSE}"; then
15111 as_fn_error $? "conditional \"HAVE_GCOV\" was never defined.
15112Usually this means the macro was only invoked conditionally." "$LINENO" 5
15113fi
15114if test -z "${HAVE_LCOV_TRUE}" && test -z "${HAVE_LCOV_FALSE}"; then
15115 as_fn_error $? "conditional \"HAVE_LCOV\" was never defined.
15116Usually this means the macro was only invoked conditionally." "$LINENO" 5
15117fi
15118if test -z "${HAVE_GCOVR_TRUE}" && test -z "${HAVE_GCOVR_FALSE}"; then
15119 as_fn_error $? "conditional \"HAVE_GCOVR\" was never defined.
15120Usually this means the macro was only invoked conditionally." "$LINENO" 5
15121fi
1508415122
15085 ac_config_commands="$ac_config_commands po/stamp-it"15123 ac_config_commands="$ac_config_commands po/stamp-it"
1508615124
@@ -15494,7 +15532,7 @@
15494# report actual input values of CONFIG_FILES etc. instead of their15532# report actual input values of CONFIG_FILES etc. instead of their
15495# values after options handling.15533# values after options handling.
15496ac_log="15534ac_log="
15497This file was extended by indicator-power $as_me 1.93, which was15535This file was extended by indicator-power $as_me 2.0, which was
15498generated by GNU Autoconf 2.68. Invocation command line was15536generated by GNU Autoconf 2.68. Invocation command line was
1549915537
15500 CONFIG_FILES = $CONFIG_FILES15538 CONFIG_FILES = $CONFIG_FILES
@@ -15561,7 +15599,7 @@
15561cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=115599cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15562ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"15600ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15563ac_cs_version="\\15601ac_cs_version="\\
15564indicator-power config.status 1.9315602indicator-power config.status 2.0
15565configured by $0, generated by GNU Autoconf 2.68,15603configured by $0, generated by GNU Autoconf 2.68,
15566 with options \\"\$ac_cs_config\\"15604 with options \\"\$ac_cs_config\\"
1556715605
1556815606
=== modified file 'configure.ac'
--- configure.ac 2012-03-21 17:46:42 +0000
+++ configure.ac 2012-04-11 15:22:35 +0000
@@ -1,5 +1,5 @@
1AC_INIT([indicator-power],1AC_INIT([indicator-power],
2 [1.93],2 [2.0],
3 [http://bugs.launchpad.net/indicator-power],3 [http://bugs.launchpad.net/indicator-power],
4 [indicator-power],4 [indicator-power],
5 [http://launchpad.net/indicator-power])5 [http://launchpad.net/indicator-power])
@@ -53,6 +53,9 @@
5353
54m4_include([m4/gcov.m4])54m4_include([m4/gcov.m4])
55AC_TDD_GCOV55AC_TDD_GCOV
56AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes])
57AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes])
58AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes])
56AC_SUBST(COVERAGE_CFLAGS)59AC_SUBST(COVERAGE_CFLAGS)
57AC_SUBST(COVERAGE_CXXFLAGS)60AC_SUBST(COVERAGE_CXXFLAGS)
58AC_SUBST(COVERAGE_LDFLAGS)61AC_SUBST(COVERAGE_LDFLAGS)
5962
=== modified file 'debian/changelog'
--- debian/changelog 2012-03-21 19:29:32 +0000
+++ debian/changelog 2012-04-11 15:22:35 +0000
@@ -1,3 +1,11 @@
1indicator-power (2.0-0ubuntu1~ppa1) precise; urgency=low
2
3 * New upstream release.
4 * Make menu items accessible with Orca Screen reader (LP: #953176)
5 * Plug memory leaks when updating our icons
6
7 -- Charles Kerr <charles.kerr@canonical.com> Wed, 11 Apr 2012 10:12:54 -0500
8
1indicator-power (1.93-0ubuntu1) precise; urgency=low9indicator-power (1.93-0ubuntu1) precise; urgency=low
210
3 * New upstream release.11 * New upstream release.
412
=== modified file 'm4/gcov.m4'
--- m4/gcov.m4 2011-12-07 01:04:27 +0000
+++ m4/gcov.m4 2012-04-11 15:22:35 +0000
@@ -5,11 +5,10 @@
5# * gcovr5# * gcovr
6# 6#
7# Sets ac_cv_check_gcov to yes if tooling is present7# Sets ac_cv_check_gcov to yes if tooling is present
8# and reports the executables to the variables LCOV, GCOVR and GENHTML. 8# and reports the executables to the variables LCOV, GCOVR and GENHTML.
9AC_DEFUN([AC_TDD_GCOV],9AC_DEFUN([AC_TDD_GCOV],
10[AC_CACHE_CHECK([whether code coverage tools are available], ac_cv_check_gcov,
11[10[
12AC_ARG_ENABLE(gcov,11 AC_ARG_ENABLE(gcov,
13 AS_HELP_STRING([--enable-gcov],12 AS_HELP_STRING([--enable-gcov],
14 [enable coverage testing with gcov]),13 [enable coverage testing with gcov]),
15 [use_gcov=$enableval], [use_gcov=no])14 [use_gcov=$enableval], [use_gcov=no])
@@ -34,7 +33,6 @@
34 lcov_version_list="1.6 1.7 1.8 1.9"33 lcov_version_list="1.6 1.7 1.8 1.9"
35 AC_CHECK_PROG(LCOV, lcov, lcov)34 AC_CHECK_PROG(LCOV, lcov, lcov)
36 AC_CHECK_PROG(GENHTML, genhtml, genhtml)35 AC_CHECK_PROG(GENHTML, genhtml, genhtml)
37 AC_CHECK_PROG(GCOVR, gcovr, gcovr)
3836
39 if test "$LCOV"; then37 if test "$LCOV"; then
40 AC_CACHE_CHECK([for lcov version], glib_cv_lcov_version, [38 AC_CACHE_CHECK([for lcov version], glib_cv_lcov_version, [
@@ -63,10 +61,8 @@
63 AC_MSG_ERROR([Could not find genhtml from the lcov package])61 AC_MSG_ERROR([Could not find genhtml from the lcov package])
64 fi62 fi
6563
66 if test -z "$GCOVR"; then64 ac_cv_check_gcov=yes
67 AC_MSG_ERROR([Could not find gcovr; easy_install (or pip) gcovr])65 ac_cv_check_lcov=yes
68 fi
69
7066
71 # Remove all optimization flags from CFLAGS67 # Remove all optimization flags from CFLAGS
72 changequote({,})68 changequote({,})
@@ -78,6 +74,13 @@
78 COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" 74 COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage"
79 COVERAGE_LDFLAGS="-lgcov"75 COVERAGE_LDFLAGS="-lgcov"
8076
77 # Check availability of gcovr
78 AC_CHECK_PROG(GCOVR, gcovr, gcovr)
79 if test -z "$GCOVR"; then
80 ac_cv_check_gcovr=no
81 else
82 ac_cv_check_gcovr=yes
83 fi
84
81fi85fi
82])]) # AC_TDD_GCOV86]) # AC_TDD_GCOV
83
8487
=== modified file 'src/indicator-power.c'
--- src/indicator-power.c 2012-02-23 06:34:06 +0000
+++ src/indicator-power.c 2012-04-11 15:22:35 +0000
@@ -510,11 +510,9 @@
510get_device_icon (UpDeviceKind kind,510get_device_icon (UpDeviceKind kind,
511 UpDeviceState state,511 UpDeviceState state,
512 guint64 time_sec,512 guint64 time_sec,
513 gchar *device_icon)513 const gchar *device_icon)
514{514{
515 GIcon *gicon;515 GIcon *gicon = NULL;
516
517 gicon = g_icon_new_for_string (device_icon, NULL);
518516
519 if (kind == UP_DEVICE_KIND_BATTERY &&517 if (kind == UP_DEVICE_KIND_BATTERY &&
520 (state == UP_DEVICE_STATE_FULLY_CHARGED ||518 (state == UP_DEVICE_STATE_FULLY_CHARGED ||
@@ -538,6 +536,9 @@
538 }536 }
539 }537 }
540538
539 if (gicon == NULL)
540 gicon = g_icon_new_for_string (device_icon, NULL);
541
541 return gicon;542 return gicon;
542}543}
543544
@@ -553,20 +554,21 @@
553 GtkWidget *details_label;554 GtkWidget *details_label;
554 GtkWidget *grid;555 GtkWidget *grid;
555 GIcon *device_gicons;556 GIcon *device_gicons;
556 gchar *device_icon = NULL;557 const gchar *device_icon = NULL;
557 gchar *object_path = NULL;558 const gchar *object_path = NULL;
558 gdouble percentage;559 gdouble percentage;
559 guint64 time;560 guint64 time;
560 const gchar *device_name;561 const gchar *device_name;
561 gchar *short_details = NULL;562 gchar *short_details = NULL;
562 gchar *details = NULL;563 gchar *details = NULL;
563 gchar *accessible_name = NULL;564 gchar *accessible_name = NULL;
565 AtkObject *atk_object;
564566
565 if (device == NULL)567 if (device == NULL)
566 return;568 return;
567569
568 g_variant_get (device,570 g_variant_get (device,
569 "(susdut)",571 "(&su&sdut)",
570 &object_path,572 &object_path,
571 &kind,573 &kind,
572 &device_icon,574 &device_icon,
@@ -583,6 +585,7 @@
583 device_gicons = get_device_icon (kind, state, time, device_icon);585 device_gicons = get_device_icon (kind, state, time, device_icon);
584 icon = gtk_image_new_from_gicon (device_gicons,586 icon = gtk_image_new_from_gicon (device_gicons,
585 GTK_ICON_SIZE_SMALL_TOOLBAR);587 GTK_ICON_SIZE_SMALL_TOOLBAR);
588 g_clear_object (&device_gicons);
586589
587 device_name = device_kind_to_localised_string (kind);590 device_name = device_kind_to_localised_string (kind);
588591
@@ -590,6 +593,9 @@
590593
591 /* Create menu item */594 /* Create menu item */
592 item = gtk_image_menu_item_new ();595 item = gtk_image_menu_item_new ();
596 atk_object = gtk_widget_get_accessible(item);
597 if (atk_object != NULL)
598 atk_object_set_name (atk_object, accessible_name);
593599
594 grid = gtk_grid_new ();600 grid = gtk_grid_new ();
595 gtk_grid_set_column_spacing (GTK_GRID (grid), 6);601 gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
@@ -607,8 +613,6 @@
607 g_free (short_details);613 g_free (short_details);
608 g_free (details);614 g_free (details);
609 g_free (accessible_name);615 g_free (accessible_name);
610 g_free (device_icon);
611 g_free (object_path);
612}616}
613617
614static gsize618static gsize
@@ -808,6 +812,7 @@
808 gtk_image_set_from_gicon (self->status_image,812 gtk_image_set_from_gicon (self->status_image,
809 device_gicons,813 device_gicons,
810 GTK_ICON_SIZE_LARGE_TOOLBAR);814 GTK_ICON_SIZE_LARGE_TOOLBAR);
815 g_clear_object (&device_gicons);
811 gtk_widget_show (GTK_WIDGET (self->status_image));816 gtk_widget_show (GTK_WIDGET (self->status_image));
812817
813818

Subscribers

People subscribed via source and target branches