Merge lp:~indicator-applet-developers/ubuntu/precise/indicator-power/upstream into lp:~ubuntu-desktop/indicator-power/ubuntu
- Precise (12.04)
- upstream
- Merge into 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 | ||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ken VanDine | Pending | ||
Review via email: mp+101585@code.launchpad.net |
Commit message
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
1 | === modified file 'ChangeLog' |
2 | --- ChangeLog 2012-03-21 17:45:36 +0000 |
3 | +++ ChangeLog 2012-04-11 15:22:35 +0000 |
4 | @@ -1,5 +1,41 @@ |
5 | # Generated by Makefile. Do not edit. |
6 | |
7 | +2012-04-11 Charles Kerr <charles.kerr@canonical.com> |
8 | + |
9 | + 2.0 |
10 | + |
11 | +2012-04-10 Charles Kerr <charles.kerr@canonical.com> |
12 | + |
13 | + merge lp:~allanlesage/indicator-power/TDD to improve our gcov fules in autotools |
14 | + |
15 | +2012-03-27 Allan LeSage <allanlesage@gmail.com> |
16 | + |
17 | + Pedantic name change for gcovr xml results. |
18 | + |
19 | +2012-03-27 Allan LeSage <allanlesage@gmail.com> |
20 | + |
21 | + Added gcov coverage tooling. |
22 | + |
23 | +2012-04-09 Charles Kerr <charles.kerr@canonical.com> |
24 | + |
25 | + use atk_object_set_name(foo,bar)" instead of g_object_set(foo,"accessible-name",bar,NULL)" |
26 | + |
27 | +2012-04-09 Charles Kerr <charles.kerr@canonical.com> |
28 | + |
29 | + leak fix 3 of 3: don't leak the GIcons returned by get_device_icon() |
30 | + |
31 | +2012-04-09 Charles Kerr <charles.kerr@canonical.com> |
32 | + |
33 | + leak fix 2 of 3: fix leaky fallback GIcon in get_device_icon() |
34 | + |
35 | +2012-04-09 Charles Kerr <charles.kerr@canonical.com> |
36 | + |
37 | + leak fix 1 of 3: don't leak object_path and device_icon if kind == UP_DEVICE_KIND_LINE_POWER |
38 | + |
39 | +2012-04-09 Charles Kerr <charles.kerr@canonical.com> |
40 | + |
41 | + if possible, set the device menuitems' accessible names. |
42 | + |
43 | 2012-03-21 Charles Kerr <charles.kerr@canonical.com> |
44 | |
45 | 1.93 |
46 | |
47 | === modified file 'Makefile.am' |
48 | --- Makefile.am 2012-02-14 22:06:04 +0000 |
49 | +++ Makefile.am 2012-04-11 15:22:35 +0000 |
50 | @@ -61,38 +61,4 @@ |
51 | echo Failed to generate AUTHORS: not a branch >&2; \ |
52 | fi |
53 | |
54 | - |
55 | -# Coverage targets |
56 | - |
57 | -.PHONY: clean-gcda |
58 | -clean-gcda: |
59 | - @echo Removing old coverage results |
60 | - -find -name '*.gcda' -print | xargs -r rm |
61 | - |
62 | -.PHONY: coverage-html generate-coverage-html clean-coverage-html |
63 | -coverage-html: clean-gcda |
64 | - -$(MAKE) $(AM_MAKEFLAGS) -k check |
65 | - $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html |
66 | - |
67 | -generate-coverage-html: |
68 | - @echo Collecting coverage data |
69 | - $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool |
70 | - LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info |
71 | - |
72 | -clean-coverage-html: clean-gcda |
73 | - -$(LCOV) --directory $(top_builddir) -z |
74 | - -rm -rf coverage.info coveragereport |
75 | - |
76 | -.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml |
77 | -coverage-xml: clean-gcda |
78 | - -$(MAKE) $(AM_MAKEFLAGS) -k check |
79 | - $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml |
80 | - |
81 | -generate-coverage-xml: |
82 | - @echo Generating coverage XML report |
83 | - $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml |
84 | - |
85 | -clean-coverage-xml: clean-gcda |
86 | - -rm -rf $(top_builddir)/coverage.xml |
87 | - |
88 | -clean-local: clean-coverage-html clean-coverage-xml |
89 | +include $(top_srcdir)/Makefile.am.coverage |
90 | |
91 | === added file 'Makefile.am.coverage' |
92 | --- Makefile.am.coverage 1970-01-01 00:00:00 +0000 |
93 | +++ Makefile.am.coverage 2012-04-11 15:22:35 +0000 |
94 | @@ -0,0 +1,48 @@ |
95 | + |
96 | +# Coverage targets |
97 | + |
98 | +.PHONY: clean-gcno clean-gcda \ |
99 | + coverage-html generate-coverage-html clean-coverage-html \ |
100 | + coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr |
101 | + |
102 | +clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr |
103 | + |
104 | +if HAVE_GCOV |
105 | + |
106 | +clean-gcno: |
107 | + @echo Removing old coverage instrumentation |
108 | + -find -name '*.gcno' -print | xargs -r rm |
109 | + |
110 | +clean-gcda: |
111 | + @echo Removing old coverage results |
112 | + -find -name '*.gcda' -print | xargs -r rm |
113 | + |
114 | +coverage-html: clean-gcda |
115 | + -$(MAKE) $(AM_MAKEFLAGS) -k check |
116 | + $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html |
117 | + |
118 | +generate-coverage-html: |
119 | + @echo Collecting coverage data |
120 | + $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool |
121 | + LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info |
122 | + |
123 | +clean-coverage-html: clean-gcda |
124 | + -$(LCOV) --directory $(top_builddir) -z |
125 | + -rm -rf coverage.info coveragereport |
126 | + |
127 | +if HAVE_GCOVR |
128 | + |
129 | +coverage-gcovr: clean-gcda |
130 | + -$(MAKE) $(AM_MAKEFLAGS) -k check |
131 | + $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr |
132 | + |
133 | +generate-coverage-gcovr: |
134 | + @echo Generating coverage GCOVR report |
135 | + $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml |
136 | + |
137 | +clean-coverage-gcovr: clean-gcda |
138 | + -rm -rf $(top_builddir)/coverage.xml |
139 | + |
140 | +endif # HAVE_GCOVR |
141 | + |
142 | +endif # HAVE_GCOV |
143 | |
144 | === modified file 'Makefile.in' |
145 | --- Makefile.in 2012-02-14 22:25:10 +0000 |
146 | +++ Makefile.in 2012-04-11 15:22:35 +0000 |
147 | @@ -15,6 +15,8 @@ |
148 | |
149 | @SET_MAKE@ |
150 | |
151 | +# Coverage targets |
152 | + |
153 | |
154 | VPATH = @srcdir@ |
155 | pkgdatadir = $(datadir)/@PACKAGE@ |
156 | @@ -35,13 +37,14 @@ |
157 | POST_UNINSTALL = : |
158 | build_triplet = @build@ |
159 | host_triplet = @host@ |
160 | -subdir = . |
161 | DIST_COMMON = $(am__configure_deps) $(dist_noinst_SCRIPTS) \ |
162 | $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ |
163 | - $(srcdir)/config.h.in $(top_srcdir)/configure ABOUT-NLS \ |
164 | - COPYING build-aux/compile build-aux/config.guess \ |
165 | - build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ |
166 | - build-aux/install-sh build-aux/ltmain.sh build-aux/missing |
167 | + $(srcdir)/config.h.in $(top_srcdir)/Makefile.am.coverage \ |
168 | + $(top_srcdir)/configure ABOUT-NLS COPYING build-aux/compile \ |
169 | + build-aux/config.guess build-aux/config.rpath \ |
170 | + build-aux/config.sub build-aux/depcomp build-aux/install-sh \ |
171 | + build-aux/ltmain.sh build-aux/missing |
172 | +subdir = . |
173 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
174 | am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ |
175 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ |
176 | @@ -393,7 +396,7 @@ |
177 | .SUFFIXES: .c .lo .o .obj |
178 | am--refresh: Makefile |
179 | @: |
180 | -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) |
181 | +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.coverage $(am__configure_deps) |
182 | @for dep in $?; do \ |
183 | case '$(am__configure_deps)' in \ |
184 | *$$dep*) \ |
185 | @@ -416,6 +419,7 @@ |
186 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ |
187 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ |
188 | esac; |
189 | +$(top_srcdir)/Makefile.am.coverage: |
190 | |
191 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
192 | $(SHELL) ./config.status --recheck |
193 | @@ -1026,40 +1030,43 @@ |
194 | echo Failed to generate AUTHORS: not a branch >&2; \ |
195 | fi |
196 | |
197 | -# Coverage targets |
198 | - |
199 | -.PHONY: clean-gcda |
200 | -clean-gcda: |
201 | - @echo Removing old coverage results |
202 | - -find -name '*.gcda' -print | xargs -r rm |
203 | - |
204 | -.PHONY: coverage-html generate-coverage-html clean-coverage-html |
205 | -coverage-html: clean-gcda |
206 | - -$(MAKE) $(AM_MAKEFLAGS) -k check |
207 | - $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html |
208 | - |
209 | -generate-coverage-html: |
210 | - @echo Collecting coverage data |
211 | - $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool |
212 | - LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info |
213 | - |
214 | -clean-coverage-html: clean-gcda |
215 | - -$(LCOV) --directory $(top_builddir) -z |
216 | - -rm -rf coverage.info coveragereport |
217 | - |
218 | -.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml |
219 | -coverage-xml: clean-gcda |
220 | - -$(MAKE) $(AM_MAKEFLAGS) -k check |
221 | - $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml |
222 | - |
223 | -generate-coverage-xml: |
224 | - @echo Generating coverage XML report |
225 | - $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml |
226 | - |
227 | -clean-coverage-xml: clean-gcda |
228 | - -rm -rf $(top_builddir)/coverage.xml |
229 | - |
230 | -clean-local: clean-coverage-html clean-coverage-xml |
231 | +.PHONY: clean-gcno clean-gcda \ |
232 | + coverage-html generate-coverage-html clean-coverage-html \ |
233 | + coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr |
234 | + |
235 | +clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr |
236 | + |
237 | +@HAVE_GCOV_TRUE@clean-gcno: |
238 | +@HAVE_GCOV_TRUE@ @echo Removing old coverage instrumentation |
239 | +@HAVE_GCOV_TRUE@ -find -name '*.gcno' -print | xargs -r rm |
240 | + |
241 | +@HAVE_GCOV_TRUE@clean-gcda: |
242 | +@HAVE_GCOV_TRUE@ @echo Removing old coverage results |
243 | +@HAVE_GCOV_TRUE@ -find -name '*.gcda' -print | xargs -r rm |
244 | + |
245 | +@HAVE_GCOV_TRUE@coverage-html: clean-gcda |
246 | +@HAVE_GCOV_TRUE@ -$(MAKE) $(AM_MAKEFLAGS) -k check |
247 | +@HAVE_GCOV_TRUE@ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html |
248 | + |
249 | +@HAVE_GCOV_TRUE@generate-coverage-html: |
250 | +@HAVE_GCOV_TRUE@ @echo Collecting coverage data |
251 | +@HAVE_GCOV_TRUE@ $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool |
252 | +@HAVE_GCOV_TRUE@ LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info |
253 | + |
254 | +@HAVE_GCOV_TRUE@clean-coverage-html: clean-gcda |
255 | +@HAVE_GCOV_TRUE@ -$(LCOV) --directory $(top_builddir) -z |
256 | +@HAVE_GCOV_TRUE@ -rm -rf coverage.info coveragereport |
257 | + |
258 | +@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@coverage-gcovr: clean-gcda |
259 | +@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ -$(MAKE) $(AM_MAKEFLAGS) -k check |
260 | +@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr |
261 | + |
262 | +@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@generate-coverage-gcovr: |
263 | +@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ @echo Generating coverage GCOVR report |
264 | +@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml |
265 | + |
266 | +@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@clean-coverage-gcovr: clean-gcda |
267 | +@HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ -rm -rf $(top_builddir)/coverage.xml |
268 | |
269 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
270 | # Otherwise a system limit (for SysV at least) may be exceeded. |
271 | |
272 | === modified file 'configure' |
273 | --- configure 2012-03-21 17:45:36 +0000 |
274 | +++ configure 2012-04-11 15:22:35 +0000 |
275 | @@ -1,6 +1,6 @@ |
276 | #! /bin/sh |
277 | # Guess values for system-dependent variables and create Makefiles. |
278 | -# Generated by GNU Autoconf 2.68 for indicator-power 1.93. |
279 | +# Generated by GNU Autoconf 2.68 for indicator-power 2.0. |
280 | # |
281 | # Report bugs to <http://bugs.launchpad.net/indicator-power>. |
282 | # |
283 | @@ -570,8 +570,8 @@ |
284 | # Identity of this package. |
285 | PACKAGE_NAME='indicator-power' |
286 | PACKAGE_TARNAME='indicator-power' |
287 | -PACKAGE_VERSION='1.93' |
288 | -PACKAGE_STRING='indicator-power 1.93' |
289 | +PACKAGE_VERSION='2.0' |
290 | +PACKAGE_STRING='indicator-power 2.0' |
291 | PACKAGE_BUGREPORT='http://bugs.launchpad.net/indicator-power' |
292 | PACKAGE_URL='http://launchpad.net/indicator-power' |
293 | |
294 | @@ -671,6 +671,12 @@ |
295 | COVERAGE_LDFLAGS |
296 | COVERAGE_CXXFLAGS |
297 | COVERAGE_CFLAGS |
298 | +HAVE_GCOVR_FALSE |
299 | +HAVE_GCOVR_TRUE |
300 | +HAVE_LCOV_FALSE |
301 | +HAVE_LCOV_TRUE |
302 | +HAVE_GCOV_FALSE |
303 | +HAVE_GCOV_TRUE |
304 | GCOVR |
305 | GENHTML |
306 | LCOV |
307 | @@ -1384,7 +1390,7 @@ |
308 | # Omit some internal or obsolete options to make the list less imposing. |
309 | # This message is too long to be a string in the A/UX 3.1 sh. |
310 | cat <<_ACEOF |
311 | -\`configure' configures indicator-power 1.93 to adapt to many kinds of systems. |
312 | +\`configure' configures indicator-power 2.0 to adapt to many kinds of systems. |
313 | |
314 | Usage: $0 [OPTION]... [VAR=VALUE]... |
315 | |
316 | @@ -1454,7 +1460,7 @@ |
317 | |
318 | if test -n "$ac_init_help"; then |
319 | case $ac_init_help in |
320 | - short | recursive ) echo "Configuration of indicator-power 1.93:";; |
321 | + short | recursive ) echo "Configuration of indicator-power 2.0:";; |
322 | esac |
323 | cat <<\_ACEOF |
324 | |
325 | @@ -1586,7 +1592,7 @@ |
326 | test -n "$ac_init_help" && exit $ac_status |
327 | if $ac_init_version; then |
328 | cat <<\_ACEOF |
329 | -indicator-power configure 1.93 |
330 | +indicator-power configure 2.0 |
331 | generated by GNU Autoconf 2.68 |
332 | |
333 | Copyright (C) 2010 Free Software Foundation, Inc. |
334 | @@ -1864,7 +1870,7 @@ |
335 | This file contains any messages produced by compilers while |
336 | running configure, to aid debugging if configure makes a mistake. |
337 | |
338 | -It was created by indicator-power $as_me 1.93, which was |
339 | +It was created by indicator-power $as_me 2.0, which was |
340 | generated by GNU Autoconf 2.68. Invocation command line was |
341 | |
342 | $ $0 $@ |
343 | @@ -2688,7 +2694,7 @@ |
344 | |
345 | # Define the identity of the package. |
346 | PACKAGE='indicator-power' |
347 | - VERSION='1.93' |
348 | + VERSION='2.0' |
349 | |
350 | |
351 | cat >>confdefs.h <<_ACEOF |
352 | @@ -12193,13 +12199,7 @@ |
353 | # AC_TDD_GCOV |
354 | |
355 | |
356 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether code coverage tools are available" >&5 |
357 | -$as_echo_n "checking whether code coverage tools are available... " >&6; } |
358 | -if ${ac_cv_check_gcov+:} false; then : |
359 | - $as_echo_n "(cached) " >&6 |
360 | -else |
361 | - |
362 | -# Check whether --enable-gcov was given. |
363 | + # Check whether --enable-gcov was given. |
364 | if test "${enable_gcov+set}" = set; then : |
365 | enableval=$enable_gcov; use_gcov=$enableval |
366 | else |
367 | @@ -12335,43 +12335,6 @@ |
368 | fi |
369 | |
370 | |
371 | - # Extract the first word of "gcovr", so it can be a program name with args. |
372 | -set dummy gcovr; ac_word=$2 |
373 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
374 | -$as_echo_n "checking for $ac_word... " >&6; } |
375 | -if ${ac_cv_prog_GCOVR+:} false; then : |
376 | - $as_echo_n "(cached) " >&6 |
377 | -else |
378 | - if test -n "$GCOVR"; then |
379 | - ac_cv_prog_GCOVR="$GCOVR" # Let the user override the test. |
380 | -else |
381 | -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
382 | -for as_dir in $PATH |
383 | -do |
384 | - IFS=$as_save_IFS |
385 | - test -z "$as_dir" && as_dir=. |
386 | - for ac_exec_ext in '' $ac_executable_extensions; do |
387 | - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
388 | - ac_cv_prog_GCOVR="gcovr" |
389 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
390 | - break 2 |
391 | - fi |
392 | -done |
393 | - done |
394 | -IFS=$as_save_IFS |
395 | - |
396 | -fi |
397 | -fi |
398 | -GCOVR=$ac_cv_prog_GCOVR |
399 | -if test -n "$GCOVR"; then |
400 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOVR" >&5 |
401 | -$as_echo "$GCOVR" >&6; } |
402 | -else |
403 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
404 | -$as_echo "no" >&6; } |
405 | -fi |
406 | - |
407 | - |
408 | |
409 | if test "$LCOV"; then |
410 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5 |
411 | @@ -12408,10 +12371,8 @@ |
412 | as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 |
413 | fi |
414 | |
415 | - if test -z "$GCOVR"; then |
416 | - as_fn_error $? "Could not find gcovr; easy_install (or pip) gcovr" "$LINENO" 5 |
417 | - fi |
418 | - |
419 | + ac_cv_check_gcov=yes |
420 | + ac_cv_check_lcov=yes |
421 | |
422 | # Remove all optimization flags from CFLAGS |
423 | |
424 | @@ -12423,11 +12384,76 @@ |
425 | COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" |
426 | COVERAGE_LDFLAGS="-lgcov" |
427 | |
428 | -fi |
429 | - |
430 | -fi |
431 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_check_gcov" >&5 |
432 | -$as_echo "$ac_cv_check_gcov" >&6; } |
433 | + # Check availability of gcovr |
434 | + # Extract the first word of "gcovr", so it can be a program name with args. |
435 | +set dummy gcovr; ac_word=$2 |
436 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
437 | +$as_echo_n "checking for $ac_word... " >&6; } |
438 | +if ${ac_cv_prog_GCOVR+:} false; then : |
439 | + $as_echo_n "(cached) " >&6 |
440 | +else |
441 | + if test -n "$GCOVR"; then |
442 | + ac_cv_prog_GCOVR="$GCOVR" # Let the user override the test. |
443 | +else |
444 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
445 | +for as_dir in $PATH |
446 | +do |
447 | + IFS=$as_save_IFS |
448 | + test -z "$as_dir" && as_dir=. |
449 | + for ac_exec_ext in '' $ac_executable_extensions; do |
450 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
451 | + ac_cv_prog_GCOVR="gcovr" |
452 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
453 | + break 2 |
454 | + fi |
455 | +done |
456 | + done |
457 | +IFS=$as_save_IFS |
458 | + |
459 | +fi |
460 | +fi |
461 | +GCOVR=$ac_cv_prog_GCOVR |
462 | +if test -n "$GCOVR"; then |
463 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOVR" >&5 |
464 | +$as_echo "$GCOVR" >&6; } |
465 | +else |
466 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
467 | +$as_echo "no" >&6; } |
468 | +fi |
469 | + |
470 | + |
471 | + if test -z "$GCOVR"; then |
472 | + ac_cv_check_gcovr=no |
473 | + else |
474 | + ac_cv_check_gcovr=yes |
475 | + fi |
476 | + |
477 | +fi |
478 | + |
479 | + if test "x$ac_cv_check_gcov" = xyes; then |
480 | + HAVE_GCOV_TRUE= |
481 | + HAVE_GCOV_FALSE='#' |
482 | +else |
483 | + HAVE_GCOV_TRUE='#' |
484 | + HAVE_GCOV_FALSE= |
485 | +fi |
486 | + |
487 | + if test "x$ac_cv_check_lcov" = xyes; then |
488 | + HAVE_LCOV_TRUE= |
489 | + HAVE_LCOV_FALSE='#' |
490 | +else |
491 | + HAVE_LCOV_TRUE='#' |
492 | + HAVE_LCOV_FALSE= |
493 | +fi |
494 | + |
495 | + if test "x$ac_cv_check_gcovr" = xyes; then |
496 | + HAVE_GCOVR_TRUE= |
497 | + HAVE_GCOVR_FALSE='#' |
498 | +else |
499 | + HAVE_GCOVR_TRUE='#' |
500 | + HAVE_GCOVR_FALSE= |
501 | +fi |
502 | + |
503 | |
504 | |
505 | |
506 | @@ -15081,6 +15107,18 @@ |
507 | as_fn_error $? "conditional \"am__fastdepCC\" was never defined. |
508 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
509 | fi |
510 | +if test -z "${HAVE_GCOV_TRUE}" && test -z "${HAVE_GCOV_FALSE}"; then |
511 | + as_fn_error $? "conditional \"HAVE_GCOV\" was never defined. |
512 | +Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
513 | +fi |
514 | +if test -z "${HAVE_LCOV_TRUE}" && test -z "${HAVE_LCOV_FALSE}"; then |
515 | + as_fn_error $? "conditional \"HAVE_LCOV\" was never defined. |
516 | +Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
517 | +fi |
518 | +if test -z "${HAVE_GCOVR_TRUE}" && test -z "${HAVE_GCOVR_FALSE}"; then |
519 | + as_fn_error $? "conditional \"HAVE_GCOVR\" was never defined. |
520 | +Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
521 | +fi |
522 | |
523 | ac_config_commands="$ac_config_commands po/stamp-it" |
524 | |
525 | @@ -15494,7 +15532,7 @@ |
526 | # report actual input values of CONFIG_FILES etc. instead of their |
527 | # values after options handling. |
528 | ac_log=" |
529 | -This file was extended by indicator-power $as_me 1.93, which was |
530 | +This file was extended by indicator-power $as_me 2.0, which was |
531 | generated by GNU Autoconf 2.68. Invocation command line was |
532 | |
533 | CONFIG_FILES = $CONFIG_FILES |
534 | @@ -15561,7 +15599,7 @@ |
535 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
536 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
537 | ac_cs_version="\\ |
538 | -indicator-power config.status 1.93 |
539 | +indicator-power config.status 2.0 |
540 | configured by $0, generated by GNU Autoconf 2.68, |
541 | with options \\"\$ac_cs_config\\" |
542 | |
543 | |
544 | === modified file 'configure.ac' |
545 | --- configure.ac 2012-03-21 17:46:42 +0000 |
546 | +++ configure.ac 2012-04-11 15:22:35 +0000 |
547 | @@ -1,5 +1,5 @@ |
548 | AC_INIT([indicator-power], |
549 | - [1.93], |
550 | + [2.0], |
551 | [http://bugs.launchpad.net/indicator-power], |
552 | [indicator-power], |
553 | [http://launchpad.net/indicator-power]) |
554 | @@ -53,6 +53,9 @@ |
555 | |
556 | m4_include([m4/gcov.m4]) |
557 | AC_TDD_GCOV |
558 | +AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes]) |
559 | +AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes]) |
560 | +AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes]) |
561 | AC_SUBST(COVERAGE_CFLAGS) |
562 | AC_SUBST(COVERAGE_CXXFLAGS) |
563 | AC_SUBST(COVERAGE_LDFLAGS) |
564 | |
565 | === modified file 'debian/changelog' |
566 | --- debian/changelog 2012-03-21 19:29:32 +0000 |
567 | +++ debian/changelog 2012-04-11 15:22:35 +0000 |
568 | @@ -1,3 +1,11 @@ |
569 | +indicator-power (2.0-0ubuntu1~ppa1) precise; urgency=low |
570 | + |
571 | + * New upstream release. |
572 | + * Make menu items accessible with Orca Screen reader (LP: #953176) |
573 | + * Plug memory leaks when updating our icons |
574 | + |
575 | + -- Charles Kerr <charles.kerr@canonical.com> Wed, 11 Apr 2012 10:12:54 -0500 |
576 | + |
577 | indicator-power (1.93-0ubuntu1) precise; urgency=low |
578 | |
579 | * New upstream release. |
580 | |
581 | === modified file 'm4/gcov.m4' |
582 | --- m4/gcov.m4 2011-12-07 01:04:27 +0000 |
583 | +++ m4/gcov.m4 2012-04-11 15:22:35 +0000 |
584 | @@ -5,11 +5,10 @@ |
585 | # * gcovr |
586 | # |
587 | # Sets ac_cv_check_gcov to yes if tooling is present |
588 | -# and reports the executables to the variables LCOV, GCOVR and GENHTML. |
589 | +# and reports the executables to the variables LCOV, GCOVR and GENHTML. |
590 | AC_DEFUN([AC_TDD_GCOV], |
591 | -[AC_CACHE_CHECK([whether code coverage tools are available], ac_cv_check_gcov, |
592 | [ |
593 | -AC_ARG_ENABLE(gcov, |
594 | + AC_ARG_ENABLE(gcov, |
595 | AS_HELP_STRING([--enable-gcov], |
596 | [enable coverage testing with gcov]), |
597 | [use_gcov=$enableval], [use_gcov=no]) |
598 | @@ -34,7 +33,6 @@ |
599 | lcov_version_list="1.6 1.7 1.8 1.9" |
600 | AC_CHECK_PROG(LCOV, lcov, lcov) |
601 | AC_CHECK_PROG(GENHTML, genhtml, genhtml) |
602 | - AC_CHECK_PROG(GCOVR, gcovr, gcovr) |
603 | |
604 | if test "$LCOV"; then |
605 | AC_CACHE_CHECK([for lcov version], glib_cv_lcov_version, [ |
606 | @@ -63,10 +61,8 @@ |
607 | AC_MSG_ERROR([Could not find genhtml from the lcov package]) |
608 | fi |
609 | |
610 | - if test -z "$GCOVR"; then |
611 | - AC_MSG_ERROR([Could not find gcovr; easy_install (or pip) gcovr]) |
612 | - fi |
613 | - |
614 | + ac_cv_check_gcov=yes |
615 | + ac_cv_check_lcov=yes |
616 | |
617 | # Remove all optimization flags from CFLAGS |
618 | changequote({,}) |
619 | @@ -78,6 +74,13 @@ |
620 | COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" |
621 | COVERAGE_LDFLAGS="-lgcov" |
622 | |
623 | + # Check availability of gcovr |
624 | + AC_CHECK_PROG(GCOVR, gcovr, gcovr) |
625 | + if test -z "$GCOVR"; then |
626 | + ac_cv_check_gcovr=no |
627 | + else |
628 | + ac_cv_check_gcovr=yes |
629 | + fi |
630 | + |
631 | fi |
632 | -])]) # AC_TDD_GCOV |
633 | - |
634 | +]) # AC_TDD_GCOV |
635 | |
636 | === modified file 'src/indicator-power.c' |
637 | --- src/indicator-power.c 2012-02-23 06:34:06 +0000 |
638 | +++ src/indicator-power.c 2012-04-11 15:22:35 +0000 |
639 | @@ -510,11 +510,9 @@ |
640 | get_device_icon (UpDeviceKind kind, |
641 | UpDeviceState state, |
642 | guint64 time_sec, |
643 | - gchar *device_icon) |
644 | + const gchar *device_icon) |
645 | { |
646 | - GIcon *gicon; |
647 | - |
648 | - gicon = g_icon_new_for_string (device_icon, NULL); |
649 | + GIcon *gicon = NULL; |
650 | |
651 | if (kind == UP_DEVICE_KIND_BATTERY && |
652 | (state == UP_DEVICE_STATE_FULLY_CHARGED || |
653 | @@ -538,6 +536,9 @@ |
654 | } |
655 | } |
656 | |
657 | + if (gicon == NULL) |
658 | + gicon = g_icon_new_for_string (device_icon, NULL); |
659 | + |
660 | return gicon; |
661 | } |
662 | |
663 | @@ -553,20 +554,21 @@ |
664 | GtkWidget *details_label; |
665 | GtkWidget *grid; |
666 | GIcon *device_gicons; |
667 | - gchar *device_icon = NULL; |
668 | - gchar *object_path = NULL; |
669 | + const gchar *device_icon = NULL; |
670 | + const gchar *object_path = NULL; |
671 | gdouble percentage; |
672 | guint64 time; |
673 | const gchar *device_name; |
674 | gchar *short_details = NULL; |
675 | gchar *details = NULL; |
676 | gchar *accessible_name = NULL; |
677 | + AtkObject *atk_object; |
678 | |
679 | if (device == NULL) |
680 | return; |
681 | |
682 | g_variant_get (device, |
683 | - "(susdut)", |
684 | + "(&su&sdut)", |
685 | &object_path, |
686 | &kind, |
687 | &device_icon, |
688 | @@ -583,6 +585,7 @@ |
689 | device_gicons = get_device_icon (kind, state, time, device_icon); |
690 | icon = gtk_image_new_from_gicon (device_gicons, |
691 | GTK_ICON_SIZE_SMALL_TOOLBAR); |
692 | + g_clear_object (&device_gicons); |
693 | |
694 | device_name = device_kind_to_localised_string (kind); |
695 | |
696 | @@ -590,6 +593,9 @@ |
697 | |
698 | /* Create menu item */ |
699 | item = gtk_image_menu_item_new (); |
700 | + atk_object = gtk_widget_get_accessible(item); |
701 | + if (atk_object != NULL) |
702 | + atk_object_set_name (atk_object, accessible_name); |
703 | |
704 | grid = gtk_grid_new (); |
705 | gtk_grid_set_column_spacing (GTK_GRID (grid), 6); |
706 | @@ -607,8 +613,6 @@ |
707 | g_free (short_details); |
708 | g_free (details); |
709 | g_free (accessible_name); |
710 | - g_free (device_icon); |
711 | - g_free (object_path); |
712 | } |
713 | |
714 | static gsize |
715 | @@ -808,6 +812,7 @@ |
716 | gtk_image_set_from_gicon (self->status_image, |
717 | device_gicons, |
718 | GTK_ICON_SIZE_LARGE_TOOLBAR); |
719 | + g_clear_object (&device_gicons); |
720 | gtk_widget_show (GTK_WIDGET (self->status_image)); |
721 | |
722 |