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 | 1 | # Generated by Makefile. Do not edit. | 1 | # Generated by Makefile. Do not edit. |
6 | 2 | 2 | ||
7 | 3 | 2012-04-11 Charles Kerr <charles.kerr@canonical.com> | ||
8 | 4 | |||
9 | 5 | 2.0 | ||
10 | 6 | |||
11 | 7 | 2012-04-10 Charles Kerr <charles.kerr@canonical.com> | ||
12 | 8 | |||
13 | 9 | merge lp:~allanlesage/indicator-power/TDD to improve our gcov fules in autotools | ||
14 | 10 | |||
15 | 11 | 2012-03-27 Allan LeSage <allanlesage@gmail.com> | ||
16 | 12 | |||
17 | 13 | Pedantic name change for gcovr xml results. | ||
18 | 14 | |||
19 | 15 | 2012-03-27 Allan LeSage <allanlesage@gmail.com> | ||
20 | 16 | |||
21 | 17 | Added gcov coverage tooling. | ||
22 | 18 | |||
23 | 19 | 2012-04-09 Charles Kerr <charles.kerr@canonical.com> | ||
24 | 20 | |||
25 | 21 | use atk_object_set_name(foo,bar)" instead of g_object_set(foo,"accessible-name",bar,NULL)" | ||
26 | 22 | |||
27 | 23 | 2012-04-09 Charles Kerr <charles.kerr@canonical.com> | ||
28 | 24 | |||
29 | 25 | leak fix 3 of 3: don't leak the GIcons returned by get_device_icon() | ||
30 | 26 | |||
31 | 27 | 2012-04-09 Charles Kerr <charles.kerr@canonical.com> | ||
32 | 28 | |||
33 | 29 | leak fix 2 of 3: fix leaky fallback GIcon in get_device_icon() | ||
34 | 30 | |||
35 | 31 | 2012-04-09 Charles Kerr <charles.kerr@canonical.com> | ||
36 | 32 | |||
37 | 33 | leak fix 1 of 3: don't leak object_path and device_icon if kind == UP_DEVICE_KIND_LINE_POWER | ||
38 | 34 | |||
39 | 35 | 2012-04-09 Charles Kerr <charles.kerr@canonical.com> | ||
40 | 36 | |||
41 | 37 | if possible, set the device menuitems' accessible names. | ||
42 | 38 | |||
43 | 3 | 2012-03-21 Charles Kerr <charles.kerr@canonical.com> | 39 | 2012-03-21 Charles Kerr <charles.kerr@canonical.com> |
44 | 4 | 40 | ||
45 | 5 | 1.93 | 41 | 1.93 |
46 | 6 | 42 | ||
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 | 61 | echo Failed to generate AUTHORS: not a branch >&2; \ | 61 | echo Failed to generate AUTHORS: not a branch >&2; \ |
52 | 62 | fi | 62 | fi |
53 | 63 | 63 | ||
89 | 64 | 64 | include $(top_srcdir)/Makefile.am.coverage | |
55 | 65 | # Coverage targets | ||
56 | 66 | |||
57 | 67 | .PHONY: clean-gcda | ||
58 | 68 | clean-gcda: | ||
59 | 69 | @echo Removing old coverage results | ||
60 | 70 | -find -name '*.gcda' -print | xargs -r rm | ||
61 | 71 | |||
62 | 72 | .PHONY: coverage-html generate-coverage-html clean-coverage-html | ||
63 | 73 | coverage-html: clean-gcda | ||
64 | 74 | -$(MAKE) $(AM_MAKEFLAGS) -k check | ||
65 | 75 | $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html | ||
66 | 76 | |||
67 | 77 | generate-coverage-html: | ||
68 | 78 | @echo Collecting coverage data | ||
69 | 79 | $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool | ||
70 | 80 | LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info | ||
71 | 81 | |||
72 | 82 | clean-coverage-html: clean-gcda | ||
73 | 83 | -$(LCOV) --directory $(top_builddir) -z | ||
74 | 84 | -rm -rf coverage.info coveragereport | ||
75 | 85 | |||
76 | 86 | .PHONY: coverage-xml generate-coverage-xml clean-coverage-xml | ||
77 | 87 | coverage-xml: clean-gcda | ||
78 | 88 | -$(MAKE) $(AM_MAKEFLAGS) -k check | ||
79 | 89 | $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml | ||
80 | 90 | |||
81 | 91 | generate-coverage-xml: | ||
82 | 92 | @echo Generating coverage XML report | ||
83 | 93 | $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml | ||
84 | 94 | |||
85 | 95 | clean-coverage-xml: clean-gcda | ||
86 | 96 | -rm -rf $(top_builddir)/coverage.xml | ||
87 | 97 | |||
88 | 98 | clean-local: clean-coverage-html clean-coverage-xml | ||
90 | 99 | 65 | ||
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 | 1 | |||
96 | 2 | # Coverage targets | ||
97 | 3 | |||
98 | 4 | .PHONY: clean-gcno clean-gcda \ | ||
99 | 5 | coverage-html generate-coverage-html clean-coverage-html \ | ||
100 | 6 | coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr | ||
101 | 7 | |||
102 | 8 | clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr | ||
103 | 9 | |||
104 | 10 | if HAVE_GCOV | ||
105 | 11 | |||
106 | 12 | clean-gcno: | ||
107 | 13 | @echo Removing old coverage instrumentation | ||
108 | 14 | -find -name '*.gcno' -print | xargs -r rm | ||
109 | 15 | |||
110 | 16 | clean-gcda: | ||
111 | 17 | @echo Removing old coverage results | ||
112 | 18 | -find -name '*.gcda' -print | xargs -r rm | ||
113 | 19 | |||
114 | 20 | coverage-html: clean-gcda | ||
115 | 21 | -$(MAKE) $(AM_MAKEFLAGS) -k check | ||
116 | 22 | $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html | ||
117 | 23 | |||
118 | 24 | generate-coverage-html: | ||
119 | 25 | @echo Collecting coverage data | ||
120 | 26 | $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool | ||
121 | 27 | LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info | ||
122 | 28 | |||
123 | 29 | clean-coverage-html: clean-gcda | ||
124 | 30 | -$(LCOV) --directory $(top_builddir) -z | ||
125 | 31 | -rm -rf coverage.info coveragereport | ||
126 | 32 | |||
127 | 33 | if HAVE_GCOVR | ||
128 | 34 | |||
129 | 35 | coverage-gcovr: clean-gcda | ||
130 | 36 | -$(MAKE) $(AM_MAKEFLAGS) -k check | ||
131 | 37 | $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr | ||
132 | 38 | |||
133 | 39 | generate-coverage-gcovr: | ||
134 | 40 | @echo Generating coverage GCOVR report | ||
135 | 41 | $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml | ||
136 | 42 | |||
137 | 43 | clean-coverage-gcovr: clean-gcda | ||
138 | 44 | -rm -rf $(top_builddir)/coverage.xml | ||
139 | 45 | |||
140 | 46 | endif # HAVE_GCOVR | ||
141 | 47 | |||
142 | 48 | endif # HAVE_GCOV | ||
143 | 0 | 49 | ||
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 | 15 | 15 | ||
149 | 16 | @SET_MAKE@ | 16 | @SET_MAKE@ |
150 | 17 | 17 | ||
151 | 18 | # Coverage targets | ||
152 | 19 | |||
153 | 18 | 20 | ||
154 | 19 | VPATH = @srcdir@ | 21 | VPATH = @srcdir@ |
155 | 20 | pkgdatadir = $(datadir)/@PACKAGE@ | 22 | pkgdatadir = $(datadir)/@PACKAGE@ |
156 | @@ -35,13 +37,14 @@ | |||
157 | 35 | POST_UNINSTALL = : | 37 | POST_UNINSTALL = : |
158 | 36 | build_triplet = @build@ | 38 | build_triplet = @build@ |
159 | 37 | host_triplet = @host@ | 39 | host_triplet = @host@ |
160 | 38 | subdir = . | ||
161 | 39 | DIST_COMMON = $(am__configure_deps) $(dist_noinst_SCRIPTS) \ | 40 | DIST_COMMON = $(am__configure_deps) $(dist_noinst_SCRIPTS) \ |
162 | 40 | $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ | 41 | $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ |
167 | 41 | $(srcdir)/config.h.in $(top_srcdir)/configure ABOUT-NLS \ | 42 | $(srcdir)/config.h.in $(top_srcdir)/Makefile.am.coverage \ |
168 | 42 | COPYING build-aux/compile build-aux/config.guess \ | 43 | $(top_srcdir)/configure ABOUT-NLS COPYING build-aux/compile \ |
169 | 43 | build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ | 44 | build-aux/config.guess build-aux/config.rpath \ |
170 | 44 | build-aux/install-sh build-aux/ltmain.sh build-aux/missing | 45 | build-aux/config.sub build-aux/depcomp build-aux/install-sh \ |
171 | 46 | build-aux/ltmain.sh build-aux/missing | ||
172 | 47 | subdir = . | ||
173 | 45 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | 48 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
174 | 46 | am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ | 49 | am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ |
175 | 47 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ | 50 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ |
176 | @@ -393,7 +396,7 @@ | |||
177 | 393 | .SUFFIXES: .c .lo .o .obj | 396 | .SUFFIXES: .c .lo .o .obj |
178 | 394 | am--refresh: Makefile | 397 | am--refresh: Makefile |
179 | 395 | @: | 398 | @: |
181 | 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) |
182 | 397 | @for dep in $?; do \ | 400 | @for dep in $?; do \ |
183 | 398 | case '$(am__configure_deps)' in \ | 401 | case '$(am__configure_deps)' in \ |
184 | 399 | *$$dep*) \ | 402 | *$$dep*) \ |
185 | @@ -416,6 +419,7 @@ | |||
186 | 416 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ | 419 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ |
187 | 417 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ | 420 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ |
188 | 418 | esac; | 421 | esac; |
189 | 422 | $(top_srcdir)/Makefile.am.coverage: | ||
190 | 419 | 423 | ||
191 | 420 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | 424 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
192 | 421 | $(SHELL) ./config.status --recheck | 425 | $(SHELL) ./config.status --recheck |
193 | @@ -1026,40 +1030,43 @@ | |||
194 | 1026 | echo Failed to generate AUTHORS: not a branch >&2; \ | 1030 | echo Failed to generate AUTHORS: not a branch >&2; \ |
195 | 1027 | fi | 1031 | fi |
196 | 1028 | 1032 | ||
231 | 1029 | # Coverage targets | 1033 | .PHONY: clean-gcno clean-gcda \ |
232 | 1030 | 1034 | coverage-html generate-coverage-html clean-coverage-html \ | |
233 | 1031 | .PHONY: clean-gcda | 1035 | coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr |
234 | 1032 | clean-gcda: | 1036 | |
235 | 1033 | @echo Removing old coverage results | 1037 | clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr |
236 | 1034 | -find -name '*.gcda' -print | xargs -r rm | 1038 | |
237 | 1035 | 1039 | @HAVE_GCOV_TRUE@clean-gcno: | |
238 | 1036 | .PHONY: coverage-html generate-coverage-html clean-coverage-html | 1040 | @HAVE_GCOV_TRUE@ @echo Removing old coverage instrumentation |
239 | 1037 | coverage-html: clean-gcda | 1041 | @HAVE_GCOV_TRUE@ -find -name '*.gcno' -print | xargs -r rm |
240 | 1038 | -$(MAKE) $(AM_MAKEFLAGS) -k check | 1042 | |
241 | 1039 | $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html | 1043 | @HAVE_GCOV_TRUE@clean-gcda: |
242 | 1040 | 1044 | @HAVE_GCOV_TRUE@ @echo Removing old coverage results | |
243 | 1041 | generate-coverage-html: | 1045 | @HAVE_GCOV_TRUE@ -find -name '*.gcda' -print | xargs -r rm |
244 | 1042 | @echo Collecting coverage data | 1046 | |
245 | 1043 | $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool | 1047 | @HAVE_GCOV_TRUE@coverage-html: clean-gcda |
246 | 1044 | LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info | 1048 | @HAVE_GCOV_TRUE@ -$(MAKE) $(AM_MAKEFLAGS) -k check |
247 | 1045 | 1049 | @HAVE_GCOV_TRUE@ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html | |
248 | 1046 | clean-coverage-html: clean-gcda | 1050 | |
249 | 1047 | -$(LCOV) --directory $(top_builddir) -z | 1051 | @HAVE_GCOV_TRUE@generate-coverage-html: |
250 | 1048 | -rm -rf coverage.info coveragereport | 1052 | @HAVE_GCOV_TRUE@ @echo Collecting coverage data |
251 | 1049 | 1053 | @HAVE_GCOV_TRUE@ $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool | |
252 | 1050 | .PHONY: coverage-xml generate-coverage-xml clean-coverage-xml | 1054 | @HAVE_GCOV_TRUE@ LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info |
253 | 1051 | coverage-xml: clean-gcda | 1055 | |
254 | 1052 | -$(MAKE) $(AM_MAKEFLAGS) -k check | 1056 | @HAVE_GCOV_TRUE@clean-coverage-html: clean-gcda |
255 | 1053 | $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml | 1057 | @HAVE_GCOV_TRUE@ -$(LCOV) --directory $(top_builddir) -z |
256 | 1054 | 1058 | @HAVE_GCOV_TRUE@ -rm -rf coverage.info coveragereport | |
257 | 1055 | generate-coverage-xml: | 1059 | |
258 | 1056 | @echo Generating coverage XML report | 1060 | @HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@coverage-gcovr: clean-gcda |
259 | 1057 | $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml | 1061 | @HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ -$(MAKE) $(AM_MAKEFLAGS) -k check |
260 | 1058 | 1062 | @HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr | |
261 | 1059 | clean-coverage-xml: clean-gcda | 1063 | |
262 | 1060 | -rm -rf $(top_builddir)/coverage.xml | 1064 | @HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@generate-coverage-gcovr: |
263 | 1061 | 1065 | @HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ @echo Generating coverage GCOVR report | |
264 | 1062 | clean-local: clean-coverage-html clean-coverage-xml | 1066 | @HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml |
265 | 1067 | |||
266 | 1068 | @HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@clean-coverage-gcovr: clean-gcda | ||
267 | 1069 | @HAVE_GCOVR_TRUE@@HAVE_GCOV_TRUE@ -rm -rf $(top_builddir)/coverage.xml | ||
268 | 1063 | 1070 | ||
269 | 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. |
270 | 1065 | # Otherwise a system limit (for SysV at least) may be exceeded. | 1072 | # Otherwise a system limit (for SysV at least) may be exceeded. |
271 | 1066 | 1073 | ||
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 | 1 | #! /bin/sh | 1 | #! /bin/sh |
277 | 2 | # Guess values for system-dependent variables and create Makefiles. | 2 | # Guess values for system-dependent variables and create Makefiles. |
279 | 3 | # Generated by GNU Autoconf 2.68 for indicator-power 1.93. | 3 | # Generated by GNU Autoconf 2.68 for indicator-power 2.0. |
280 | 4 | # | 4 | # |
281 | 5 | # Report bugs to <http://bugs.launchpad.net/indicator-power>. | 5 | # Report bugs to <http://bugs.launchpad.net/indicator-power>. |
282 | 6 | # | 6 | # |
283 | @@ -570,8 +570,8 @@ | |||
284 | 570 | # Identity of this package. | 570 | # Identity of this package. |
285 | 571 | PACKAGE_NAME='indicator-power' | 571 | PACKAGE_NAME='indicator-power' |
286 | 572 | PACKAGE_TARNAME='indicator-power' | 572 | PACKAGE_TARNAME='indicator-power' |
289 | 573 | PACKAGE_VERSION='1.93' | 573 | PACKAGE_VERSION='2.0' |
290 | 574 | PACKAGE_STRING='indicator-power 1.93' | 574 | PACKAGE_STRING='indicator-power 2.0' |
291 | 575 | PACKAGE_BUGREPORT='http://bugs.launchpad.net/indicator-power' | 575 | PACKAGE_BUGREPORT='http://bugs.launchpad.net/indicator-power' |
292 | 576 | PACKAGE_URL='http://launchpad.net/indicator-power' | 576 | PACKAGE_URL='http://launchpad.net/indicator-power' |
293 | 577 | 577 | ||
294 | @@ -671,6 +671,12 @@ | |||
295 | 671 | COVERAGE_LDFLAGS | 671 | COVERAGE_LDFLAGS |
296 | 672 | COVERAGE_CXXFLAGS | 672 | COVERAGE_CXXFLAGS |
297 | 673 | COVERAGE_CFLAGS | 673 | COVERAGE_CFLAGS |
298 | 674 | HAVE_GCOVR_FALSE | ||
299 | 675 | HAVE_GCOVR_TRUE | ||
300 | 676 | HAVE_LCOV_FALSE | ||
301 | 677 | HAVE_LCOV_TRUE | ||
302 | 678 | HAVE_GCOV_FALSE | ||
303 | 679 | HAVE_GCOV_TRUE | ||
304 | 674 | GCOVR | 680 | GCOVR |
305 | 675 | GENHTML | 681 | GENHTML |
306 | 676 | LCOV | 682 | LCOV |
307 | @@ -1384,7 +1390,7 @@ | |||
308 | 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. |
309 | 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. |
310 | 1386 | cat <<_ACEOF | 1392 | cat <<_ACEOF |
312 | 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. |
313 | 1388 | 1394 | ||
314 | 1389 | Usage: $0 [OPTION]... [VAR=VALUE]... | 1395 | Usage: $0 [OPTION]... [VAR=VALUE]... |
315 | 1390 | 1396 | ||
316 | @@ -1454,7 +1460,7 @@ | |||
317 | 1454 | 1460 | ||
318 | 1455 | if test -n "$ac_init_help"; then | 1461 | if test -n "$ac_init_help"; then |
319 | 1456 | case $ac_init_help in | 1462 | case $ac_init_help in |
321 | 1457 | short | recursive ) echo "Configuration of indicator-power 1.93:";; | 1463 | short | recursive ) echo "Configuration of indicator-power 2.0:";; |
322 | 1458 | esac | 1464 | esac |
323 | 1459 | cat <<\_ACEOF | 1465 | cat <<\_ACEOF |
324 | 1460 | 1466 | ||
325 | @@ -1586,7 +1592,7 @@ | |||
326 | 1586 | test -n "$ac_init_help" && exit $ac_status | 1592 | test -n "$ac_init_help" && exit $ac_status |
327 | 1587 | if $ac_init_version; then | 1593 | if $ac_init_version; then |
328 | 1588 | cat <<\_ACEOF | 1594 | cat <<\_ACEOF |
330 | 1589 | indicator-power configure 1.93 | 1595 | indicator-power configure 2.0 |
331 | 1590 | generated by GNU Autoconf 2.68 | 1596 | generated by GNU Autoconf 2.68 |
332 | 1591 | 1597 | ||
333 | 1592 | Copyright (C) 2010 Free Software Foundation, Inc. | 1598 | Copyright (C) 2010 Free Software Foundation, Inc. |
334 | @@ -1864,7 +1870,7 @@ | |||
335 | 1864 | This file contains any messages produced by compilers while | 1870 | This file contains any messages produced by compilers while |
336 | 1865 | running configure, to aid debugging if configure makes a mistake. | 1871 | running configure, to aid debugging if configure makes a mistake. |
337 | 1866 | 1872 | ||
339 | 1867 | It was created by indicator-power $as_me 1.93, which was | 1873 | It was created by indicator-power $as_me 2.0, which was |
340 | 1868 | generated by GNU Autoconf 2.68. Invocation command line was | 1874 | generated by GNU Autoconf 2.68. Invocation command line was |
341 | 1869 | 1875 | ||
342 | 1870 | $ $0 $@ | 1876 | $ $0 $@ |
343 | @@ -2688,7 +2694,7 @@ | |||
344 | 2688 | 2694 | ||
345 | 2689 | # Define the identity of the package. | 2695 | # Define the identity of the package. |
346 | 2690 | PACKAGE='indicator-power' | 2696 | PACKAGE='indicator-power' |
348 | 2691 | VERSION='1.93' | 2697 | VERSION='2.0' |
349 | 2692 | 2698 | ||
350 | 2693 | 2699 | ||
351 | 2694 | cat >>confdefs.h <<_ACEOF | 2700 | cat >>confdefs.h <<_ACEOF |
352 | @@ -12193,13 +12199,7 @@ | |||
353 | 12193 | # AC_TDD_GCOV | 12199 | # AC_TDD_GCOV |
354 | 12194 | 12200 | ||
355 | 12195 | 12201 | ||
363 | 12196 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether code coverage tools are available" >&5 | 12202 | # Check whether --enable-gcov was given. |
357 | 12197 | $as_echo_n "checking whether code coverage tools are available... " >&6; } | ||
358 | 12198 | if ${ac_cv_check_gcov+:} false; then : | ||
359 | 12199 | $as_echo_n "(cached) " >&6 | ||
360 | 12200 | else | ||
361 | 12201 | |||
362 | 12202 | # Check whether --enable-gcov was given. | ||
364 | 12203 | if test "${enable_gcov+set}" = set; then : | 12203 | if test "${enable_gcov+set}" = set; then : |
365 | 12204 | enableval=$enable_gcov; use_gcov=$enableval | 12204 | enableval=$enable_gcov; use_gcov=$enableval |
366 | 12205 | else | 12205 | else |
367 | @@ -12335,43 +12335,6 @@ | |||
368 | 12335 | fi | 12335 | fi |
369 | 12336 | 12336 | ||
370 | 12337 | 12337 | ||
371 | 12338 | # Extract the first word of "gcovr", so it can be a program name with args. | ||
372 | 12339 | set dummy gcovr; ac_word=$2 | ||
373 | 12340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
374 | 12341 | $as_echo_n "checking for $ac_word... " >&6; } | ||
375 | 12342 | if ${ac_cv_prog_GCOVR+:} false; then : | ||
376 | 12343 | $as_echo_n "(cached) " >&6 | ||
377 | 12344 | else | ||
378 | 12345 | if test -n "$GCOVR"; then | ||
379 | 12346 | ac_cv_prog_GCOVR="$GCOVR" # Let the user override the test. | ||
380 | 12347 | else | ||
381 | 12348 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
382 | 12349 | for as_dir in $PATH | ||
383 | 12350 | do | ||
384 | 12351 | IFS=$as_save_IFS | ||
385 | 12352 | test -z "$as_dir" && as_dir=. | ||
386 | 12353 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
387 | 12354 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
388 | 12355 | ac_cv_prog_GCOVR="gcovr" | ||
389 | 12356 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
390 | 12357 | break 2 | ||
391 | 12358 | fi | ||
392 | 12359 | done | ||
393 | 12360 | done | ||
394 | 12361 | IFS=$as_save_IFS | ||
395 | 12362 | |||
396 | 12363 | fi | ||
397 | 12364 | fi | ||
398 | 12365 | GCOVR=$ac_cv_prog_GCOVR | ||
399 | 12366 | if test -n "$GCOVR"; then | ||
400 | 12367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOVR" >&5 | ||
401 | 12368 | $as_echo "$GCOVR" >&6; } | ||
402 | 12369 | else | ||
403 | 12370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
404 | 12371 | $as_echo "no" >&6; } | ||
405 | 12372 | fi | ||
406 | 12373 | |||
407 | 12374 | |||
408 | 12375 | 12338 | ||
409 | 12376 | if test "$LCOV"; then | 12339 | if test "$LCOV"; then |
410 | 12377 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5 | 12340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5 |
411 | @@ -12408,10 +12371,8 @@ | |||
412 | 12408 | as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 | 12371 | as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 |
413 | 12409 | fi | 12372 | fi |
414 | 12410 | 12373 | ||
419 | 12411 | if test -z "$GCOVR"; then | 12374 | ac_cv_check_gcov=yes |
420 | 12412 | as_fn_error $? "Could not find gcovr; easy_install (or pip) gcovr" "$LINENO" 5 | 12375 | ac_cv_check_lcov=yes |
417 | 12413 | fi | ||
418 | 12414 | |||
421 | 12415 | 12376 | ||
422 | 12416 | # Remove all optimization flags from CFLAGS | 12377 | # Remove all optimization flags from CFLAGS |
423 | 12417 | 12378 | ||
424 | @@ -12423,11 +12384,76 @@ | |||
425 | 12423 | COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" | 12384 | COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" |
426 | 12424 | COVERAGE_LDFLAGS="-lgcov" | 12385 | COVERAGE_LDFLAGS="-lgcov" |
427 | 12425 | 12386 | ||
433 | 12426 | fi | 12387 | # Check availability of gcovr |
434 | 12427 | 12388 | # Extract the first word of "gcovr", so it can be a program name with args. | |
435 | 12428 | fi | 12389 | set dummy gcovr; ac_word=$2 |
436 | 12429 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_check_gcov" >&5 | 12390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
437 | 12430 | $as_echo "$ac_cv_check_gcov" >&6; } | 12391 | $as_echo_n "checking for $ac_word... " >&6; } |
438 | 12392 | if ${ac_cv_prog_GCOVR+:} false; then : | ||
439 | 12393 | $as_echo_n "(cached) " >&6 | ||
440 | 12394 | else | ||
441 | 12395 | if test -n "$GCOVR"; then | ||
442 | 12396 | ac_cv_prog_GCOVR="$GCOVR" # Let the user override the test. | ||
443 | 12397 | else | ||
444 | 12398 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
445 | 12399 | for as_dir in $PATH | ||
446 | 12400 | do | ||
447 | 12401 | IFS=$as_save_IFS | ||
448 | 12402 | test -z "$as_dir" && as_dir=. | ||
449 | 12403 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
450 | 12404 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
451 | 12405 | ac_cv_prog_GCOVR="gcovr" | ||
452 | 12406 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
453 | 12407 | break 2 | ||
454 | 12408 | fi | ||
455 | 12409 | done | ||
456 | 12410 | done | ||
457 | 12411 | IFS=$as_save_IFS | ||
458 | 12412 | |||
459 | 12413 | fi | ||
460 | 12414 | fi | ||
461 | 12415 | GCOVR=$ac_cv_prog_GCOVR | ||
462 | 12416 | if test -n "$GCOVR"; then | ||
463 | 12417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOVR" >&5 | ||
464 | 12418 | $as_echo "$GCOVR" >&6; } | ||
465 | 12419 | else | ||
466 | 12420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
467 | 12421 | $as_echo "no" >&6; } | ||
468 | 12422 | fi | ||
469 | 12423 | |||
470 | 12424 | |||
471 | 12425 | if test -z "$GCOVR"; then | ||
472 | 12426 | ac_cv_check_gcovr=no | ||
473 | 12427 | else | ||
474 | 12428 | ac_cv_check_gcovr=yes | ||
475 | 12429 | fi | ||
476 | 12430 | |||
477 | 12431 | fi | ||
478 | 12432 | |||
479 | 12433 | if test "x$ac_cv_check_gcov" = xyes; then | ||
480 | 12434 | HAVE_GCOV_TRUE= | ||
481 | 12435 | HAVE_GCOV_FALSE='#' | ||
482 | 12436 | else | ||
483 | 12437 | HAVE_GCOV_TRUE='#' | ||
484 | 12438 | HAVE_GCOV_FALSE= | ||
485 | 12439 | fi | ||
486 | 12440 | |||
487 | 12441 | if test "x$ac_cv_check_lcov" = xyes; then | ||
488 | 12442 | HAVE_LCOV_TRUE= | ||
489 | 12443 | HAVE_LCOV_FALSE='#' | ||
490 | 12444 | else | ||
491 | 12445 | HAVE_LCOV_TRUE='#' | ||
492 | 12446 | HAVE_LCOV_FALSE= | ||
493 | 12447 | fi | ||
494 | 12448 | |||
495 | 12449 | if test "x$ac_cv_check_gcovr" = xyes; then | ||
496 | 12450 | HAVE_GCOVR_TRUE= | ||
497 | 12451 | HAVE_GCOVR_FALSE='#' | ||
498 | 12452 | else | ||
499 | 12453 | HAVE_GCOVR_TRUE='#' | ||
500 | 12454 | HAVE_GCOVR_FALSE= | ||
501 | 12455 | fi | ||
502 | 12456 | |||
503 | 12431 | 12457 | ||
504 | 12432 | 12458 | ||
505 | 12433 | 12459 | ||
506 | @@ -15081,6 +15107,18 @@ | |||
507 | 15081 | as_fn_error $? "conditional \"am__fastdepCC\" was never defined. | 15107 | as_fn_error $? "conditional \"am__fastdepCC\" was never defined. |
508 | 15082 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 15108 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
509 | 15083 | fi | 15109 | fi |
510 | 15110 | if test -z "${HAVE_GCOV_TRUE}" && test -z "${HAVE_GCOV_FALSE}"; then | ||
511 | 15111 | as_fn_error $? "conditional \"HAVE_GCOV\" was never defined. | ||
512 | 15112 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
513 | 15113 | fi | ||
514 | 15114 | if test -z "${HAVE_LCOV_TRUE}" && test -z "${HAVE_LCOV_FALSE}"; then | ||
515 | 15115 | as_fn_error $? "conditional \"HAVE_LCOV\" was never defined. | ||
516 | 15116 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
517 | 15117 | fi | ||
518 | 15118 | if test -z "${HAVE_GCOVR_TRUE}" && test -z "${HAVE_GCOVR_FALSE}"; then | ||
519 | 15119 | as_fn_error $? "conditional \"HAVE_GCOVR\" was never defined. | ||
520 | 15120 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
521 | 15121 | fi | ||
522 | 15084 | 15122 | ||
523 | 15085 | ac_config_commands="$ac_config_commands po/stamp-it" | 15123 | ac_config_commands="$ac_config_commands po/stamp-it" |
524 | 15086 | 15124 | ||
525 | @@ -15494,7 +15532,7 @@ | |||
526 | 15494 | # report actual input values of CONFIG_FILES etc. instead of their | 15532 | # report actual input values of CONFIG_FILES etc. instead of their |
527 | 15495 | # values after options handling. | 15533 | # values after options handling. |
528 | 15496 | ac_log=" | 15534 | ac_log=" |
530 | 15497 | This file was extended by indicator-power $as_me 1.93, which was | 15535 | This file was extended by indicator-power $as_me 2.0, which was |
531 | 15498 | generated by GNU Autoconf 2.68. Invocation command line was | 15536 | generated by GNU Autoconf 2.68. Invocation command line was |
532 | 15499 | 15537 | ||
533 | 15500 | CONFIG_FILES = $CONFIG_FILES | 15538 | CONFIG_FILES = $CONFIG_FILES |
534 | @@ -15561,7 +15599,7 @@ | |||
535 | 15561 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | 15599 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
536 | 15562 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | 15600 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
537 | 15563 | ac_cs_version="\\ | 15601 | ac_cs_version="\\ |
539 | 15564 | indicator-power config.status 1.93 | 15602 | indicator-power config.status 2.0 |
540 | 15565 | configured by $0, generated by GNU Autoconf 2.68, | 15603 | configured by $0, generated by GNU Autoconf 2.68, |
541 | 15566 | with options \\"\$ac_cs_config\\" | 15604 | with options \\"\$ac_cs_config\\" |
542 | 15567 | 15605 | ||
543 | 15568 | 15606 | ||
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 | 1 | AC_INIT([indicator-power], | 1 | AC_INIT([indicator-power], |
550 | 2 | [1.93], | 2 | [2.0], |
551 | 3 | [http://bugs.launchpad.net/indicator-power], | 3 | [http://bugs.launchpad.net/indicator-power], |
552 | 4 | [indicator-power], | 4 | [indicator-power], |
553 | 5 | [http://launchpad.net/indicator-power]) | 5 | [http://launchpad.net/indicator-power]) |
554 | @@ -53,6 +53,9 @@ | |||
555 | 53 | 53 | ||
556 | 54 | m4_include([m4/gcov.m4]) | 54 | m4_include([m4/gcov.m4]) |
557 | 55 | AC_TDD_GCOV | 55 | AC_TDD_GCOV |
558 | 56 | AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes]) | ||
559 | 57 | AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes]) | ||
560 | 58 | AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes]) | ||
561 | 56 | AC_SUBST(COVERAGE_CFLAGS) | 59 | AC_SUBST(COVERAGE_CFLAGS) |
562 | 57 | AC_SUBST(COVERAGE_CXXFLAGS) | 60 | AC_SUBST(COVERAGE_CXXFLAGS) |
563 | 58 | AC_SUBST(COVERAGE_LDFLAGS) | 61 | AC_SUBST(COVERAGE_LDFLAGS) |
564 | 59 | 62 | ||
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 | 1 | indicator-power (2.0-0ubuntu1~ppa1) precise; urgency=low | ||
570 | 2 | |||
571 | 3 | * New upstream release. | ||
572 | 4 | * Make menu items accessible with Orca Screen reader (LP: #953176) | ||
573 | 5 | * Plug memory leaks when updating our icons | ||
574 | 6 | |||
575 | 7 | -- Charles Kerr <charles.kerr@canonical.com> Wed, 11 Apr 2012 10:12:54 -0500 | ||
576 | 8 | |||
577 | 1 | indicator-power (1.93-0ubuntu1) precise; urgency=low | 9 | indicator-power (1.93-0ubuntu1) precise; urgency=low |
578 | 2 | 10 | ||
579 | 3 | * New upstream release. | 11 | * New upstream release. |
580 | 4 | 12 | ||
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 | 5 | # * gcovr | 5 | # * gcovr |
586 | 6 | # | 6 | # |
587 | 7 | # Sets ac_cv_check_gcov to yes if tooling is present | 7 | # Sets ac_cv_check_gcov to yes if tooling is present |
589 | 8 | # and reports the executables to the variables LCOV, GCOVR and GENHTML. | 8 | # and reports the executables to the variables LCOV, GCOVR and GENHTML. |
590 | 9 | AC_DEFUN([AC_TDD_GCOV], | 9 | AC_DEFUN([AC_TDD_GCOV], |
591 | 10 | [AC_CACHE_CHECK([whether code coverage tools are available], ac_cv_check_gcov, | ||
592 | 11 | [ | 10 | [ |
594 | 12 | AC_ARG_ENABLE(gcov, | 11 | AC_ARG_ENABLE(gcov, |
595 | 13 | AS_HELP_STRING([--enable-gcov], | 12 | AS_HELP_STRING([--enable-gcov], |
596 | 14 | [enable coverage testing with gcov]), | 13 | [enable coverage testing with gcov]), |
597 | 15 | [use_gcov=$enableval], [use_gcov=no]) | 14 | [use_gcov=$enableval], [use_gcov=no]) |
598 | @@ -34,7 +33,6 @@ | |||
599 | 34 | lcov_version_list="1.6 1.7 1.8 1.9" | 33 | lcov_version_list="1.6 1.7 1.8 1.9" |
600 | 35 | AC_CHECK_PROG(LCOV, lcov, lcov) | 34 | AC_CHECK_PROG(LCOV, lcov, lcov) |
601 | 36 | AC_CHECK_PROG(GENHTML, genhtml, genhtml) | 35 | AC_CHECK_PROG(GENHTML, genhtml, genhtml) |
602 | 37 | AC_CHECK_PROG(GCOVR, gcovr, gcovr) | ||
603 | 38 | 36 | ||
604 | 39 | if test "$LCOV"; then | 37 | if test "$LCOV"; then |
605 | 40 | AC_CACHE_CHECK([for lcov version], glib_cv_lcov_version, [ | 38 | AC_CACHE_CHECK([for lcov version], glib_cv_lcov_version, [ |
606 | @@ -63,10 +61,8 @@ | |||
607 | 63 | AC_MSG_ERROR([Could not find genhtml from the lcov package]) | 61 | AC_MSG_ERROR([Could not find genhtml from the lcov package]) |
608 | 64 | fi | 62 | fi |
609 | 65 | 63 | ||
614 | 66 | if test -z "$GCOVR"; then | 64 | ac_cv_check_gcov=yes |
615 | 67 | AC_MSG_ERROR([Could not find gcovr; easy_install (or pip) gcovr]) | 65 | ac_cv_check_lcov=yes |
612 | 68 | fi | ||
613 | 69 | |||
616 | 70 | 66 | ||
617 | 71 | # Remove all optimization flags from CFLAGS | 67 | # Remove all optimization flags from CFLAGS |
618 | 72 | changequote({,}) | 68 | changequote({,}) |
619 | @@ -78,6 +74,13 @@ | |||
620 | 78 | COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" | 74 | COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" |
621 | 79 | COVERAGE_LDFLAGS="-lgcov" | 75 | COVERAGE_LDFLAGS="-lgcov" |
622 | 80 | 76 | ||
623 | 77 | # Check availability of gcovr | ||
624 | 78 | AC_CHECK_PROG(GCOVR, gcovr, gcovr) | ||
625 | 79 | if test -z "$GCOVR"; then | ||
626 | 80 | ac_cv_check_gcovr=no | ||
627 | 81 | else | ||
628 | 82 | ac_cv_check_gcovr=yes | ||
629 | 83 | fi | ||
630 | 84 | |||
631 | 81 | fi | 85 | fi |
634 | 82 | ])]) # AC_TDD_GCOV | 86 | ]) # AC_TDD_GCOV |
633 | 83 | |||
635 | 84 | 87 | ||
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 | 510 | get_device_icon (UpDeviceKind kind, | 510 | get_device_icon (UpDeviceKind kind, |
641 | 511 | UpDeviceState state, | 511 | UpDeviceState state, |
642 | 512 | guint64 time_sec, | 512 | guint64 time_sec, |
644 | 513 | gchar *device_icon) | 513 | const gchar *device_icon) |
645 | 514 | { | 514 | { |
649 | 515 | GIcon *gicon; | 515 | GIcon *gicon = NULL; |
647 | 516 | |||
648 | 517 | gicon = g_icon_new_for_string (device_icon, NULL); | ||
650 | 518 | 516 | ||
651 | 519 | if (kind == UP_DEVICE_KIND_BATTERY && | 517 | if (kind == UP_DEVICE_KIND_BATTERY && |
652 | 520 | (state == UP_DEVICE_STATE_FULLY_CHARGED || | 518 | (state == UP_DEVICE_STATE_FULLY_CHARGED || |
653 | @@ -538,6 +536,9 @@ | |||
654 | 538 | } | 536 | } |
655 | 539 | } | 537 | } |
656 | 540 | 538 | ||
657 | 539 | if (gicon == NULL) | ||
658 | 540 | gicon = g_icon_new_for_string (device_icon, NULL); | ||
659 | 541 | |||
660 | 541 | return gicon; | 542 | return gicon; |
661 | 542 | } | 543 | } |
662 | 543 | 544 | ||
663 | @@ -553,20 +554,21 @@ | |||
664 | 553 | GtkWidget *details_label; | 554 | GtkWidget *details_label; |
665 | 554 | GtkWidget *grid; | 555 | GtkWidget *grid; |
666 | 555 | GIcon *device_gicons; | 556 | GIcon *device_gicons; |
669 | 556 | gchar *device_icon = NULL; | 557 | const gchar *device_icon = NULL; |
670 | 557 | gchar *object_path = NULL; | 558 | const gchar *object_path = NULL; |
671 | 558 | gdouble percentage; | 559 | gdouble percentage; |
672 | 559 | guint64 time; | 560 | guint64 time; |
673 | 560 | const gchar *device_name; | 561 | const gchar *device_name; |
674 | 561 | gchar *short_details = NULL; | 562 | gchar *short_details = NULL; |
675 | 562 | gchar *details = NULL; | 563 | gchar *details = NULL; |
676 | 563 | gchar *accessible_name = NULL; | 564 | gchar *accessible_name = NULL; |
677 | 565 | AtkObject *atk_object; | ||
678 | 564 | 566 | ||
679 | 565 | if (device == NULL) | 567 | if (device == NULL) |
680 | 566 | return; | 568 | return; |
681 | 567 | 569 | ||
682 | 568 | g_variant_get (device, | 570 | g_variant_get (device, |
684 | 569 | "(susdut)", | 571 | "(&su&sdut)", |
685 | 570 | &object_path, | 572 | &object_path, |
686 | 571 | &kind, | 573 | &kind, |
687 | 572 | &device_icon, | 574 | &device_icon, |
688 | @@ -583,6 +585,7 @@ | |||
689 | 583 | device_gicons = get_device_icon (kind, state, time, device_icon); | 585 | device_gicons = get_device_icon (kind, state, time, device_icon); |
690 | 584 | icon = gtk_image_new_from_gicon (device_gicons, | 586 | icon = gtk_image_new_from_gicon (device_gicons, |
691 | 585 | GTK_ICON_SIZE_SMALL_TOOLBAR); | 587 | GTK_ICON_SIZE_SMALL_TOOLBAR); |
692 | 588 | g_clear_object (&device_gicons); | ||
693 | 586 | 589 | ||
694 | 587 | device_name = device_kind_to_localised_string (kind); | 590 | device_name = device_kind_to_localised_string (kind); |
695 | 588 | 591 | ||
696 | @@ -590,6 +593,9 @@ | |||
697 | 590 | 593 | ||
698 | 591 | /* Create menu item */ | 594 | /* Create menu item */ |
699 | 592 | item = gtk_image_menu_item_new (); | 595 | item = gtk_image_menu_item_new (); |
700 | 596 | atk_object = gtk_widget_get_accessible(item); | ||
701 | 597 | if (atk_object != NULL) | ||
702 | 598 | atk_object_set_name (atk_object, accessible_name); | ||
703 | 593 | 599 | ||
704 | 594 | grid = gtk_grid_new (); | 600 | grid = gtk_grid_new (); |
705 | 595 | gtk_grid_set_column_spacing (GTK_GRID (grid), 6); | 601 | gtk_grid_set_column_spacing (GTK_GRID (grid), 6); |
706 | @@ -607,8 +613,6 @@ | |||
707 | 607 | g_free (short_details); | 613 | g_free (short_details); |
708 | 608 | g_free (details); | 614 | g_free (details); |
709 | 609 | g_free (accessible_name); | 615 | g_free (accessible_name); |
710 | 610 | g_free (device_icon); | ||
711 | 611 | g_free (object_path); | ||
712 | 612 | } | 616 | } |
713 | 613 | 617 | ||
714 | 614 | static gsize | 618 | static gsize |
715 | @@ -808,6 +812,7 @@ | |||
716 | 808 | gtk_image_set_from_gicon (self->status_image, | 812 | gtk_image_set_from_gicon (self->status_image, |
717 | 809 | device_gicons, | 813 | device_gicons, |
718 | 810 | GTK_ICON_SIZE_LARGE_TOOLBAR); | 814 | GTK_ICON_SIZE_LARGE_TOOLBAR); |
719 | 815 | g_clear_object (&device_gicons); | ||
720 | 811 | gtk_widget_show (GTK_WIDGET (self->status_image)); | 816 | gtk_widget_show (GTK_WIDGET (self->status_image)); |
721 | 812 | 817 | ||
722 | 813 | 818 |