Merge lp:~charlesk/indicator-datetime/cmakeify into lp:indicator-datetime/14.04
- cmakeify
- Merge into trunk.14.04
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Ted Gould | ||||
Approved revision: | 298 | ||||
Merged at revision: | 281 | ||||
Proposed branch: | lp:~charlesk/indicator-datetime/cmakeify | ||||
Merge into: | lp:indicator-datetime/14.04 | ||||
Diff against target: |
1504 lines (+567/-540) 33 files modified
CMakeLists.txt (+103/-0) INSTALL (+75/-0) Makefile.am (+0/-39) Makefile.am.coverage (+0/-48) autogen.sh (+0/-11) cmake/FindIntltool.cmake (+23/-0) cmake/GCov.cmake (+50/-0) cmake/GdbusCodegen.cmake (+36/-0) cmake/Translations.cmake (+41/-0) cmake/UseGSettings.cmake (+23/-0) configure.ac (+0/-192) data/CMakeLists.txt (+66/-0) data/Makefile.am (+0/-45) data/indicator-datetime.service.in (+1/-1) debian/control (+4/-3) debian/indicator-datetime.install (+1/-1) debian/rules (+2/-8) panel/CMakeLists.txt (+25/-0) panel/datetime-prefs-locations.c (+13/-7) panel/datetime-prefs.c (+25/-15) po/CMakeLists.txt (+3/-0) po/POTFILES.in (+2/-2) src/CMakeLists.txt (+45/-0) src/Makefile.am (+0/-88) src/clock-live.c (+1/-3) src/main.c (+0/-2) src/planner-eds.c (+0/-2) src/service.c (+1/-3) src/timezone-file.c (+0/-2) src/timezone-geoclue.c (+1/-3) src/utils.c (+3/-7) tests/CMakeLists.txt (+23/-0) tests/Makefile.am (+0/-58) |
||||
To merge this branch: | bzr merge lp:~charlesk/indicator-datetime/cmakeify | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+192598@code.launchpad.net |
Commit message
Switch the build system to cmake
Description of the change
This is step 2 of work to increase test coverage in indicator-datetime for bug #1237509. The first step decoupled some of datetime's code to make unit tests possible. This step switches the build system to cmake, and step 3 will add test coverage.
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:290
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:291
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 292. By Charles Kerr
-
update POTFILES.in to reflect that the g-c-c panel code's been moved to panel/
- 293. By Charles Kerr
-
remove libtool reference from debian/rules
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:290
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:293
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 294. By Charles Kerr
-
look for indicator-
datetime- service in usr/lib/ */indicator- datetime/ indicator- datetime- service - 295. By Charles Kerr
-
point the dbus service file at pkglibexecdir
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:295
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:293
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Pete Woods (pete-woods) wrote : | # |
The cmake stuff all looks pretty reasonable to me. The one thing I'd change is the GETTEXT_PACKAGE variable. It messes up the dh_translations script, which only does a trivial grep of the root CMakeLists.txt file. You'll have to explicitly put:
set (GETTEXT_PACKAGE "indicator-
- 296. By Charles Kerr
-
set GETTEXT_PACKAGE to an actual string to make dh_translations happier
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:296
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 297. By Charles Kerr
-
fix DPKGDATADIR definition for locating the datetime-panel.ui file
- 298. By Charles Kerr
-
let service know how to launch gnome-control-
center on the desktop
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:297
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:298
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Ted Gould (ted) wrote : | # |
Checked packages and they're the same!
Preview Diff
1 | === added file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
3 | +++ CMakeLists.txt 2013-10-30 22:00:17 +0000 | |||
4 | @@ -0,0 +1,103 @@ | |||
5 | 1 | project (indicator-datetime C CXX) | ||
6 | 2 | cmake_minimum_required (VERSION 2.8.9) | ||
7 | 3 | |||
8 | 4 | list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) | ||
9 | 5 | |||
10 | 6 | set (PROJECT_VERSION "14.04.0") | ||
11 | 7 | set (PACKAGE ${CMAKE_PROJECT_NAME}) | ||
12 | 8 | set (GETTEXT_PACKAGE "indicator-datetime") | ||
13 | 9 | add_definitions (-DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}" | ||
14 | 10 | -DGNOMELOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}") | ||
15 | 11 | |||
16 | 12 | option (enable_tests "Build the package's automatic tests." ON) | ||
17 | 13 | option (enable_lcov "Generate lcov code coverage reports." ON) | ||
18 | 14 | |||
19 | 15 | ## | ||
20 | 16 | ## GNU standard installation directories | ||
21 | 17 | ## | ||
22 | 18 | |||
23 | 19 | include (GNUInstallDirs) | ||
24 | 20 | if (EXISTS "/etc/debian_version") # Workaround for libexecdir on debian | ||
25 | 21 | set (CMAKE_INSTALL_LIBEXECDIR "${CMAKE_INSTALL_LIBDIR}") | ||
26 | 22 | set (CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_FULL_LIBDIR}") | ||
27 | 23 | endif () | ||
28 | 24 | set (CMAKE_INSTALL_PKGLIBEXECDIR "${CMAKE_INSTALL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}") | ||
29 | 25 | set (CMAKE_INSTALL_FULL_PKGLIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}") | ||
30 | 26 | |||
31 | 27 | ## | ||
32 | 28 | ## Check for prerequisites | ||
33 | 29 | ## | ||
34 | 30 | |||
35 | 31 | find_package (PkgConfig REQUIRED) | ||
36 | 32 | include (FindPkgConfig) | ||
37 | 33 | |||
38 | 34 | pkg_check_modules (SERVICE_DEPS REQUIRED | ||
39 | 35 | glib-2.0>=2.36 | ||
40 | 36 | gio-unix-2.0>=2.36 | ||
41 | 37 | geoclue>=0.12 | ||
42 | 38 | libical>=0.48 | ||
43 | 39 | libecal-1.2>=3.5 | ||
44 | 40 | libedataserver-1.2>=3.5 | ||
45 | 41 | libnotify>=0.7.6 | ||
46 | 42 | url-dispatcher-1>=1 | ||
47 | 43 | json-glib-1.0>=0.16.2) | ||
48 | 44 | include_directories (${SERVICE_INCLUDE_DIRS}) | ||
49 | 45 | |||
50 | 46 | pkg_check_modules (PANEL_DEPS | ||
51 | 47 | glib-2.0>=2.36 | ||
52 | 48 | gio-unix-2.0>=2.36 | ||
53 | 49 | gtk+-3.0>=3.1.4 | ||
54 | 50 | timezonemap | ||
55 | 51 | libgnome-control-center | ||
56 | 52 | polkit-gobject-1) | ||
57 | 53 | if (PANEL_DEPS_FOUND) | ||
58 | 54 | set (BUILD_PANEL 1) | ||
59 | 55 | endif () | ||
60 | 56 | |||
61 | 57 | ## | ||
62 | 58 | ## custom targets | ||
63 | 59 | ## | ||
64 | 60 | |||
65 | 61 | set (ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}) | ||
66 | 62 | add_custom_target (dist | ||
67 | 63 | COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz | ||
68 | 64 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) | ||
69 | 65 | |||
70 | 66 | add_custom_target (clean-coverage | ||
71 | 67 | COMMAND find ${CMAKE_BINARY_DIR} -name '*.gcda' | xargs rm -f) | ||
72 | 68 | |||
73 | 69 | add_custom_target (cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2 --inline-suppr | ||
74 | 70 | ${CMAKE_SOURCE_DIR}/src | ||
75 | 71 | ${CMAKE_SOURCE_DIR}/tests) | ||
76 | 72 | |||
77 | 73 | ## | ||
78 | 74 | ## Actual building | ||
79 | 75 | ## | ||
80 | 76 | |||
81 | 77 | set (CC_WARNING_ARGS " -Wall -Wshadow -Wextra -Wunused -Wformat=2 -Wno-missing-field-initializers") | ||
82 | 78 | |||
83 | 79 | include_directories (${CMAKE_CURRENT_SOURCE_DIR}/src) | ||
84 | 80 | include_directories (${CMAKE_CURRENT_BINARY_DIR}/src) | ||
85 | 81 | |||
86 | 82 | # testing & coverage | ||
87 | 83 | if (${enable_tests}) | ||
88 | 84 | set (GTEST_SOURCE_DIR /usr/src/gtest/src) | ||
89 | 85 | set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..) | ||
90 | 86 | set (GTEST_LIBS -lpthread) | ||
91 | 87 | enable_testing () | ||
92 | 88 | if (${enable_lcov}) | ||
93 | 89 | include(GCov) | ||
94 | 90 | endif () | ||
95 | 91 | endif () | ||
96 | 92 | |||
97 | 93 | # actually build things | ||
98 | 94 | add_subdirectory (src) | ||
99 | 95 | if (BUILD_PANEL) | ||
100 | 96 | add_subdirectory (panel) | ||
101 | 97 | endif () | ||
102 | 98 | add_subdirectory (data) | ||
103 | 99 | add_subdirectory (po) | ||
104 | 100 | if (${enable_tests}) | ||
105 | 101 | add_subdirectory (tests) | ||
106 | 102 | endif () | ||
107 | 103 | |||
108 | 0 | 104 | ||
109 | === added file 'INSTALL' | |||
110 | --- INSTALL 1970-01-01 00:00:00 +0000 | |||
111 | +++ INSTALL 2013-10-30 22:00:17 +0000 | |||
112 | @@ -0,0 +1,75 @@ | |||
113 | 1 | # | ||
114 | 2 | # Copyright (C) 2013 Canonical Ltd | ||
115 | 3 | # | ||
116 | 4 | # This program is free software: you can redistribute it and/or modify | ||
117 | 5 | # it under the terms of the GNU General Public License version 3 as | ||
118 | 6 | # published by the Free Software Foundation. | ||
119 | 7 | # | ||
120 | 8 | # This program is distributed in the hope that it will be useful, | ||
121 | 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
122 | 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
123 | 11 | # GNU General Public License for more details. | ||
124 | 12 | # | ||
125 | 13 | # You should have received a copy of the GNU General Public License | ||
126 | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
127 | 15 | # | ||
128 | 16 | |||
129 | 17 | BUILD DEPENDENCIES | ||
130 | 18 | ================== | ||
131 | 19 | |||
132 | 20 | build dependencies for indicator-datetime-service | ||
133 | 21 | * glib-2.0 >= 2.36 | ||
134 | 22 | * gio-unix-2.0 >= 2.36 | ||
135 | 23 | * geoclue >= 0.12 | ||
136 | 24 | * libical >= 0.48 | ||
137 | 25 | * libecal-1.2 >= 3.5 | ||
138 | 26 | * libedataserver-1.2 >= 3.5 | ||
139 | 27 | * libnotify >= 0.7.6 | ||
140 | 28 | * url-dispatcher-1 >= 1 | ||
141 | 29 | * json-glib-1.0 >= 0.16.2 | ||
142 | 30 | |||
143 | 31 | |||
144 | 32 | Additional build dependencies for the gnome-control-center panel: | ||
145 | 33 | * gtk+-3.0>=3.1.4 | ||
146 | 34 | * timezonemap | ||
147 | 35 | * libgnome-control-center | ||
148 | 36 | * polkit-gobject-1 | ||
149 | 37 | |||
150 | 38 | Build dependencies for testing / code coverage: | ||
151 | 39 | * gcovr (gcovr, 2.4 or later) | ||
152 | 40 | * lcov (lcov, 1.9 or later) | ||
153 | 41 | * google test (libgtest-dev, 1.6.0 or later) | ||
154 | 42 | * cppcheck (cppcheck) | ||
155 | 43 | |||
156 | 44 | |||
157 | 45 | Building the code | ||
158 | 46 | ----------------- | ||
159 | 47 | 1. $ cd indicator-datetime-X.Y.Z | ||
160 | 48 | 2. $ mkdir build | ||
161 | 49 | 3. $ cd build | ||
162 | 50 | 4. $ cmake .. | ||
163 | 51 | or | ||
164 | 52 | $ cmake -DCMAKE_INSTALL_PREFIX=/your/install/prefix/here .. | ||
165 | 53 | or | ||
166 | 54 | $ cmake -GNinja .. | ||
167 | 55 | 5. $ make | ||
168 | 56 | |||
169 | 57 | Running the tests | ||
170 | 58 | ----------------- | ||
171 | 59 | 1. $ cd indicator-datetime-X.Y.Z | ||
172 | 60 | 2. $ mkdir build | ||
173 | 61 | 3. $ cd build | ||
174 | 62 | 4. $ cmake .. | ||
175 | 63 | 5. $ make | ||
176 | 64 | 6. $ make test | ||
177 | 65 | 7. $ make cppcheck | ||
178 | 66 | |||
179 | 67 | Generating Test Coverage Reports | ||
180 | 68 | -------------------------------- | ||
181 | 69 | 1. $ cd indicator-datetime-X.Y.Z | ||
182 | 70 | 2. $ mkdir build-coverage | ||
183 | 71 | 3. $ cd build-coverage | ||
184 | 72 | 4. $ cmake -DCMAKE_BUILD_TYPE=coverage .. | ||
185 | 73 | 5. $ make | ||
186 | 74 | 6. $ make coverage-html | ||
187 | 75 | |||
188 | 0 | 76 | ||
189 | === removed file 'Makefile.am' | |||
190 | --- Makefile.am 2013-06-28 21:41:31 +0000 | |||
191 | +++ Makefile.am 1970-01-01 00:00:00 +0000 | |||
192 | @@ -1,39 +0,0 @@ | |||
193 | 1 | ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} | ||
194 | 2 | |||
195 | 3 | SUBDIRS = po data src | ||
196 | 4 | |||
197 | 5 | if BUILD_TESTS | ||
198 | 6 | SUBDIRS += tests | ||
199 | 7 | # build src first | ||
200 | 8 | tests: src | ||
201 | 9 | endif | ||
202 | 10 | |||
203 | 11 | EXTRA_DIST = autogen.sh | ||
204 | 12 | |||
205 | 13 | dist-hook: | ||
206 | 14 | @if test -d "$(top_srcdir)/.bzr"; \ | ||
207 | 15 | then \ | ||
208 | 16 | echo Creating ChangeLog && \ | ||
209 | 17 | ( cd "$(top_srcdir)" && \ | ||
210 | 18 | echo '# Generated by Makefile. Do not edit.'; echo; \ | ||
211 | 19 | $(top_srcdir)/build-aux/missing --run bzr log --gnu-changelog ) > ChangeLog.tmp \ | ||
212 | 20 | && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ | ||
213 | 21 | || (rm -f ChangeLog.tmp; \ | ||
214 | 22 | echo Failed to generate ChangeLog >&2 ); \ | ||
215 | 23 | else \ | ||
216 | 24 | echo Failed to generate ChangeLog: not a branch >&2; \ | ||
217 | 25 | fi | ||
218 | 26 | @if test -d "$(top_srcdir)/.bzr"; \ | ||
219 | 27 | then \ | ||
220 | 28 | echo Creating AUTHORS && \ | ||
221 | 29 | ( cd "$(top_srcdir)" && \ | ||
222 | 30 | echo '# Generated by Makefile. Do not edit.'; echo; \ | ||
223 | 31 | $(top_srcdir)/build-aux/missing --run bzr log --long --levels=0 | grep -e "^\s*author:" -e "^\s*committer:" | cut -d ":" -f 2 | cut -d "<" -f 1 | sort -u) > AUTHORS.tmp \ | ||
224 | 32 | && mv -f AUTHORS.tmp $(top_distdir)/AUTHORS \ | ||
225 | 33 | || (rm -f AUTHORS.tmp; \ | ||
226 | 34 | echo Failed to generate AUTHORS >&2 ); \ | ||
227 | 35 | else \ | ||
228 | 36 | echo Failed to generate AUTHORS: not a branch >&2; \ | ||
229 | 37 | fi | ||
230 | 38 | |||
231 | 39 | include $(top_srcdir)/Makefile.am.coverage | ||
232 | 40 | 0 | ||
233 | === removed file 'Makefile.am.coverage' | |||
234 | --- Makefile.am.coverage 2012-03-27 22:17:43 +0000 | |||
235 | +++ Makefile.am.coverage 1970-01-01 00:00:00 +0000 | |||
236 | @@ -1,48 +0,0 @@ | |||
237 | 1 | |||
238 | 2 | # Coverage targets | ||
239 | 3 | |||
240 | 4 | .PHONY: clean-gcno clean-gcda \ | ||
241 | 5 | coverage-html generate-coverage-html clean-coverage-html \ | ||
242 | 6 | coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr | ||
243 | 7 | |||
244 | 8 | clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr | ||
245 | 9 | |||
246 | 10 | if HAVE_GCOV | ||
247 | 11 | |||
248 | 12 | clean-gcno: | ||
249 | 13 | @echo Removing old coverage instrumentation | ||
250 | 14 | -find -name '*.gcno' -print | xargs -r rm | ||
251 | 15 | |||
252 | 16 | clean-gcda: | ||
253 | 17 | @echo Removing old coverage results | ||
254 | 18 | -find -name '*.gcda' -print | xargs -r rm | ||
255 | 19 | |||
256 | 20 | coverage-html: clean-gcda | ||
257 | 21 | -$(MAKE) $(AM_MAKEFLAGS) -k check | ||
258 | 22 | $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html | ||
259 | 23 | |||
260 | 24 | generate-coverage-html: | ||
261 | 25 | @echo Collecting coverage data | ||
262 | 26 | $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool | ||
263 | 27 | LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info | ||
264 | 28 | |||
265 | 29 | clean-coverage-html: clean-gcda | ||
266 | 30 | -$(LCOV) --directory $(top_builddir) -z | ||
267 | 31 | -rm -rf coverage.info coveragereport | ||
268 | 32 | |||
269 | 33 | if HAVE_GCOVR | ||
270 | 34 | |||
271 | 35 | coverage-gcovr: clean-gcda | ||
272 | 36 | -$(MAKE) $(AM_MAKEFLAGS) -k check | ||
273 | 37 | $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr | ||
274 | 38 | |||
275 | 39 | generate-coverage-gcovr: | ||
276 | 40 | @echo Generating coverage GCOVR report | ||
277 | 41 | $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml | ||
278 | 42 | |||
279 | 43 | clean-coverage-gcovr: clean-gcda | ||
280 | 44 | -rm -rf $(top_builddir)/coverage.xml | ||
281 | 45 | |||
282 | 46 | endif # HAVE_GCOVR | ||
283 | 47 | |||
284 | 48 | endif # HAVE_GCOV | ||
285 | 49 | 0 | ||
286 | === removed file 'autogen.sh' | |||
287 | --- autogen.sh 2010-03-04 18:01:39 +0000 | |||
288 | +++ autogen.sh 1970-01-01 00:00:00 +0000 | |||
289 | @@ -1,11 +0,0 @@ | |||
290 | 1 | #!/bin/sh | ||
291 | 2 | |||
292 | 3 | PKG_NAME="indicator-datetime" | ||
293 | 4 | |||
294 | 5 | which gnome-autogen.sh || { | ||
295 | 6 | echo "You need gnome-common from GNOME Git" | ||
296 | 7 | exit 1 | ||
297 | 8 | } | ||
298 | 9 | |||
299 | 10 | USE_GNOME2_MACROS=1 \ | ||
300 | 11 | . gnome-autogen.sh $@ | ||
301 | 12 | 0 | ||
302 | === added directory 'cmake' | |||
303 | === added file 'cmake/FindIntltool.cmake' | |||
304 | --- cmake/FindIntltool.cmake 1970-01-01 00:00:00 +0000 | |||
305 | +++ cmake/FindIntltool.cmake 2013-10-30 22:00:17 +0000 | |||
306 | @@ -0,0 +1,23 @@ | |||
307 | 1 | # FindIntltool.cmake | ||
308 | 2 | # | ||
309 | 3 | # Jim Nelson <jim@yorba.org> | ||
310 | 4 | # Copyright 2012 Yorba Foundation | ||
311 | 5 | |||
312 | 6 | find_program (INTLTOOL_MERGE_EXECUTABLE intltool-merge) | ||
313 | 7 | |||
314 | 8 | if (INTLTOOL_MERGE_EXECUTABLE) | ||
315 | 9 | set (INTLTOOL_MERGE_FOUND TRUE) | ||
316 | 10 | else (INTLTOOL_MERGE_EXECUTABLE) | ||
317 | 11 | set (INTLTOOL_MERGE_FOUND FALSE) | ||
318 | 12 | endif (INTLTOOL_MERGE_EXECUTABLE) | ||
319 | 13 | |||
320 | 14 | if (INTLTOOL_MERGE_FOUND) | ||
321 | 15 | macro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir) | ||
322 | 16 | add_custom_target (geary.desktop ALL | ||
323 | 17 | ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir} | ||
324 | 18 | ${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.desktop.in ${desktop_id}.desktop | ||
325 | 19 | ) | ||
326 | 20 | install (FILES ${CMAKE_CURRENT_BINARY_DIR}/geary.desktop DESTINATION /usr/share/applications) | ||
327 | 21 | endmacro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir) | ||
328 | 22 | endif (INTLTOOL_MERGE_FOUND) | ||
329 | 23 | |||
330 | 0 | 24 | ||
331 | === added file 'cmake/GCov.cmake' | |||
332 | --- cmake/GCov.cmake 1970-01-01 00:00:00 +0000 | |||
333 | +++ cmake/GCov.cmake 2013-10-30 22:00:17 +0000 | |||
334 | @@ -0,0 +1,50 @@ | |||
335 | 1 | if (CMAKE_BUILD_TYPE MATCHES coverage) | ||
336 | 2 | set(GCOV_FLAGS "${GCOV_FLAGS} --coverage") | ||
337 | 3 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCOV_FLAGS}") | ||
338 | 4 | set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${GCOV_FLAGS}") | ||
339 | 5 | set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GCOV_FLAGS}") | ||
340 | 6 | set(GCOV_LIBS ${GCOV_LIBS} gcov) | ||
341 | 7 | |||
342 | 8 | find_program(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin") | ||
343 | 9 | if (NOT GCOVR_EXECUTABLE) | ||
344 | 10 | message(STATUS "Gcovr binary was not found, can not generate XML coverage info.") | ||
345 | 11 | else () | ||
346 | 12 | message(STATUS "Gcovr found, can generate XML coverage info.") | ||
347 | 13 | add_custom_target (coverage-xml | ||
348 | 14 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
349 | 15 | COMMAND "${GCOVR_EXECUTABLE}" --exclude="test.*" -x -r "${CMAKE_SOURCE_DIR}" | ||
350 | 16 | --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml) | ||
351 | 17 | endif() | ||
352 | 18 | |||
353 | 19 | find_program(LCOV_EXECUTABLE lcov HINTS ${LCOV_ROOT} "${GCOVR_ROOT}/bin") | ||
354 | 20 | find_program(GENHTML_EXECUTABLE genhtml HINTS ${GENHTML_ROOT}) | ||
355 | 21 | if (NOT LCOV_EXECUTABLE) | ||
356 | 22 | message(STATUS "Lcov binary was not found, can not generate HTML coverage info.") | ||
357 | 23 | else () | ||
358 | 24 | if(NOT GENHTML_EXECUTABLE) | ||
359 | 25 | message(STATUS "Genthml binary not found, can not generate HTML coverage info.") | ||
360 | 26 | else() | ||
361 | 27 | message(STATUS "Lcov and genhtml found, can generate HTML coverage info.") | ||
362 | 28 | add_custom_target (coverage-html | ||
363 | 29 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
364 | 30 | COMMAND "${CMAKE_CTEST_COMMAND}" --force-new-ctest-process --verbose | ||
365 | 31 | COMMAND "${LCOV_EXECUTABLE}" --directory ${CMAKE_BINARY_DIR} --capture | ${CMAKE_SOURCE_DIR}/trim-lcov.py > dconf-lcov.info | ||
366 | 32 | COMMAND LANG=C "${GENHTML_EXECUTABLE}" --prefix ${CMAKE_BINARY_DIR} --output-directory lcov-html --legend --show-details dconf-lcov.info | ||
367 | 33 | COMMAND ${CMAKE_COMMAND} -E echo "" | ||
368 | 34 | COMMAND ${CMAKE_COMMAND} -E echo "file://${CMAKE_BINARY_DIR}/lcov-html/index.html" | ||
369 | 35 | COMMAND ${CMAKE_COMMAND} -E echo "") | ||
370 | 36 | #COMMAND "${LCOV_EXECUTABLE}" --directory ${CMAKE_BINARY_DIR} --capture --output-file coverage.info --no-checksum | ||
371 | 37 | #COMMAND "${GENHTML_EXECUTABLE}" --prefix ${CMAKE_BINARY_DIR} --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info | ||
372 | 38 | #COMMAND ${CMAKE_COMMAND} -E echo "\\#define foo \\\"bar\\\"" | ||
373 | 39 | #) | ||
374 | 40 | endif() | ||
375 | 41 | endif() | ||
376 | 42 | endif() | ||
377 | 43 | |||
378 | 44 | |||
379 | 45 | #$(MAKE) $(AM_MAKEFLAGS) check | ||
380 | 46 | #lcov --directory $(top_builddir) --capture --test-name dconf | $(top_srcdir)/trim-lcov.py > dconf-lcov.info | ||
381 | 47 | #LANG=C genhtml --prefix $(top_builddir) --output-directory lcov-html --legend --show-details dconf-lcov.info | ||
382 | 48 | #@echo | ||
383 | 49 | #@echo " file://$(abs_top_builddir)/lcov-html/index.html" | ||
384 | 50 | #@echo | ||
385 | 0 | 51 | ||
386 | === added file 'cmake/GdbusCodegen.cmake' | |||
387 | --- cmake/GdbusCodegen.cmake 1970-01-01 00:00:00 +0000 | |||
388 | +++ cmake/GdbusCodegen.cmake 2013-10-30 22:00:17 +0000 | |||
389 | @@ -0,0 +1,36 @@ | |||
390 | 1 | cmake_minimum_required(VERSION 2.6) | ||
391 | 2 | if(POLICY CMP0011) | ||
392 | 3 | cmake_policy(SET CMP0011 NEW) | ||
393 | 4 | endif(POLICY CMP0011) | ||
394 | 5 | |||
395 | 6 | find_program(GDBUS_CODEGEN NAMES gdbus-codegen DOC "gdbus-codegen executable") | ||
396 | 7 | if(NOT GDBUS_CODEGEN) | ||
397 | 8 | message(FATAL_ERROR "Excutable gdbus-codegen not found") | ||
398 | 9 | endif() | ||
399 | 10 | |||
400 | 11 | macro(add_gdbus_codegen outfiles name prefix service_xml) | ||
401 | 12 | add_custom_command( | ||
402 | 13 | OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.h" "${CMAKE_CURRENT_BINARY_DIR}/${name}.c" | ||
403 | 14 | COMMAND "${GDBUS_CODEGEN}" | ||
404 | 15 | --interface-prefix "${prefix}" | ||
405 | 16 | --generate-c-code "${name}" | ||
406 | 17 | "${service_xml}" | ||
407 | 18 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
408 | 19 | DEPENDS ${ARGN} "${service_xml}" | ||
409 | 20 | ) | ||
410 | 21 | list(APPEND ${outfiles} "${CMAKE_CURRENT_BINARY_DIR}/${name}.c") | ||
411 | 22 | endmacro(add_gdbus_codegen) | ||
412 | 23 | |||
413 | 24 | macro(add_gdbus_codegen_with_namespace outfiles name prefix namespace service_xml) | ||
414 | 25 | add_custom_command( | ||
415 | 26 | OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.h" "${CMAKE_CURRENT_BINARY_DIR}/${name}.c" | ||
416 | 27 | COMMAND "${GDBUS_CODEGEN}" | ||
417 | 28 | --interface-prefix "${prefix}" | ||
418 | 29 | --generate-c-code "${name}" | ||
419 | 30 | --c-namespace "${namespace}" | ||
420 | 31 | "${service_xml}" | ||
421 | 32 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
422 | 33 | DEPENDS ${ARGN} "${service_xml}" | ||
423 | 34 | ) | ||
424 | 35 | list(APPEND ${outfiles} "${CMAKE_CURRENT_BINARY_DIR}/${name}.c") | ||
425 | 36 | endmacro(add_gdbus_codegen_with_namespace) | ||
426 | 0 | 37 | ||
427 | === added file 'cmake/Translations.cmake' | |||
428 | --- cmake/Translations.cmake 1970-01-01 00:00:00 +0000 | |||
429 | +++ cmake/Translations.cmake 2013-10-30 22:00:17 +0000 | |||
430 | @@ -0,0 +1,41 @@ | |||
431 | 1 | # Translations.cmake, CMake macros written for Marlin, feel free to re-use them | ||
432 | 2 | |||
433 | 3 | macro(add_translations_directory NLS_PACKAGE) | ||
434 | 4 | add_custom_target (i18n ALL) | ||
435 | 5 | find_program (MSGFMT_EXECUTABLE msgfmt) | ||
436 | 6 | file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po) | ||
437 | 7 | foreach (PO_INPUT ${PO_FILES}) | ||
438 | 8 | get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE) | ||
439 | 9 | set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo) | ||
440 | 10 | add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT}) | ||
441 | 11 | |||
442 | 12 | install (FILES ${MO_OUTPUT} DESTINATION | ||
443 | 13 | ${CMAKE_INSTALL_LOCALEDIR}/${PO_INPUT_BASE}/LC_MESSAGES | ||
444 | 14 | RENAME ${NLS_PACKAGE}.mo) | ||
445 | 15 | endforeach (PO_INPUT ${PO_FILES}) | ||
446 | 16 | endmacro(add_translations_directory) | ||
447 | 17 | |||
448 | 18 | |||
449 | 19 | macro(add_translations_catalog NLS_PACKAGE) | ||
450 | 20 | add_custom_target (pot COMMENT “Building translation catalog.”) | ||
451 | 21 | find_program (XGETTEXT_EXECUTABLE xgettext) | ||
452 | 22 | |||
453 | 23 | |||
454 | 24 | set(C_SOURCE "") | ||
455 | 25 | |||
456 | 26 | foreach(FILES_INPUT ${ARGN}) | ||
457 | 27 | file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.c) | ||
458 | 28 | foreach(C_FILE ${SOURCE_FILES}) | ||
459 | 29 | set(C_SOURCE ${C_SOURCE} ${C_FILE}) | ||
460 | 30 | endforeach() | ||
461 | 31 | file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.vala) | ||
462 | 32 | foreach(C_FILE ${SOURCE_FILES}) | ||
463 | 33 | set(C_SOURCE ${C_SOURCE} ${C_FILE}) | ||
464 | 34 | endforeach() | ||
465 | 35 | endforeach() | ||
466 | 36 | |||
467 | 37 | add_custom_command (TARGET pot COMMAND | ||
468 | 38 | ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot | ||
469 | 39 | ${VALA_SOURCE} ${C_SOURCE} --keyword="_" --keyword="N_" --from-code=UTF-8 | ||
470 | 40 | ) | ||
471 | 41 | endmacro() | ||
472 | 0 | 42 | ||
473 | === added file 'cmake/UseGSettings.cmake' | |||
474 | --- cmake/UseGSettings.cmake 1970-01-01 00:00:00 +0000 | |||
475 | +++ cmake/UseGSettings.cmake 2013-10-30 22:00:17 +0000 | |||
476 | @@ -0,0 +1,23 @@ | |||
477 | 1 | # GSettings.cmake, CMake macros written for Marlin, feel free to re-use them. | ||
478 | 2 | |||
479 | 3 | macro(add_schema SCHEMA_NAME) | ||
480 | 4 | |||
481 | 5 | set(PKG_CONFIG_EXECUTABLE pkg-config) | ||
482 | 6 | set(GSETTINGS_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/glib-2.0/schemas") | ||
483 | 7 | |||
484 | 8 | # Run the validator and error if it fails | ||
485 | 9 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_compile_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
486 | 10 | execute_process (COMMAND ${_glib_compile_schemas} --dry-run --schema-file=${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
487 | 11 | |||
488 | 12 | if (_schemas_invalid) | ||
489 | 13 | message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") | ||
490 | 14 | endif (_schemas_invalid) | ||
491 | 15 | |||
492 | 16 | # Actually install and recomple schemas | ||
493 | 17 | message (STATUS "${GSETTINGS_DIR} is the GSettings install dir") | ||
494 | 18 | install (FILES ${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL) | ||
495 | 19 | |||
496 | 20 | install (CODE "message (STATUS \"Compiling GSettings schemas\")") | ||
497 | 21 | install (CODE "execute_process (COMMAND ${_glib_compile_schemas} ${GSETTINGS_DIR})") | ||
498 | 22 | endmacro() | ||
499 | 23 | |||
500 | 0 | 24 | ||
501 | === removed file 'configure.ac' | |||
502 | --- configure.ac 2013-10-16 22:14:11 +0000 | |||
503 | +++ configure.ac 1970-01-01 00:00:00 +0000 | |||
504 | @@ -1,192 +0,0 @@ | |||
505 | 1 | AC_INIT([indicator-datetime], | ||
506 | 2 | [13.10.0], | ||
507 | 3 | [http://bugs.launchpad.net/indicator-datetime], | ||
508 | 4 | [indicator-datetime], | ||
509 | 5 | [http://launchpad.net/indicator-datetime]) | ||
510 | 6 | AC_COPYRIGHT([Copyright 2009-2011 Canonical]) | ||
511 | 7 | |||
512 | 8 | AC_PREREQ([2.64]) | ||
513 | 9 | |||
514 | 10 | AC_CONFIG_HEADERS([config.h]) | ||
515 | 11 | AC_CONFIG_SRCDIR([configure.ac]) | ||
516 | 12 | AC_CONFIG_MACRO_DIR([m4]) | ||
517 | 13 | AC_CONFIG_AUX_DIR([build-aux]) | ||
518 | 14 | |||
519 | 15 | AM_INIT_AUTOMAKE([check-news 1.11 -Wall]) | ||
520 | 16 | AM_MAINTAINER_MODE([enable]) | ||
521 | 17 | |||
522 | 18 | AM_SILENT_RULES([yes]) | ||
523 | 19 | |||
524 | 20 | # Check for programs | ||
525 | 21 | AC_PROG_CC | ||
526 | 22 | AM_PROG_CC_C_O | ||
527 | 23 | AC_PROG_CXX | ||
528 | 24 | AC_HEADER_STDC | ||
529 | 25 | AM_PROG_AR | ||
530 | 26 | |||
531 | 27 | # Initialize libtool | ||
532 | 28 | LT_PREREQ([2.2]) | ||
533 | 29 | LT_INIT([disable-static]) | ||
534 | 30 | |||
535 | 31 | AC_CHECK_LIB([m],[pow]) | ||
536 | 32 | |||
537 | 33 | AC_ARG_ENABLE([deprecations], | ||
538 | 34 | [AS_HELP_STRING([--enable-deprecations], | ||
539 | 35 | [allow deprecated API usage @<:@default=yes@:>@])], | ||
540 | 36 | [], | ||
541 | 37 | [enable_deprecations=yes]) | ||
542 | 38 | AS_IF([test "x$enable_deprecations" = xno], | ||
543 | 39 | [CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGTK_DISABLE_SINGLE_INCLUDES"] | ||
544 | 40 | ) | ||
545 | 41 | |||
546 | 42 | PKG_PROG_PKG_CONFIG | ||
547 | 43 | |||
548 | 44 | ########################### | ||
549 | 45 | # Dependencies | ||
550 | 46 | ########################### | ||
551 | 47 | |||
552 | 48 | GLIB_REQUIRED_VERSION=2.35.4 | ||
553 | 49 | GIO_REQUIRED_VERSION=2.25.11 | ||
554 | 50 | GEOCLUE_REQUIRED_VERSION=0.12.0 | ||
555 | 51 | ICAL_REQUIRED_VERSION=0.48 | ||
556 | 52 | ECAL_REQUIRED_VERSION=3.5 | ||
557 | 53 | EDS_REQUIRED_VERSION=3.5 | ||
558 | 54 | LIBNOTIFY_REQUIRED_VERSION=0.7.6 | ||
559 | 55 | URL_DISPATCHER_1_REQUIRED_VERSION=1 | ||
560 | 56 | JSON_GLIB_REQUIRED_VERSION=0.16.2 | ||
561 | 57 | |||
562 | 58 | GTK3_REQUIRED_VERSION=3.1.4 | ||
563 | 59 | |||
564 | 60 | PKG_CHECK_MODULES(SERVICE, [glib-2.0 >= $GLIB_REQUIRED_VERSION | ||
565 | 61 | gio-2.0 >= $GIO_REQUIRED_VERSION | ||
566 | 62 | geoclue >= $GEOCLUE_REQUIRED_VERSION | ||
567 | 63 | libical >= $ICAL_REQUIRED_VERSION | ||
568 | 64 | libecal-1.2 >= $ECAL_REQUIRED_VERSION | ||
569 | 65 | libedataserver-1.2 >= $EDS_REQUIRED_VERSION | ||
570 | 66 | libnotify >= $LIBNOTIFY_REQUIRED_VERSION | ||
571 | 67 | url-dispatcher-1 >= $URL_DISPATCHER_1_REQUIRED_VERSION | ||
572 | 68 | json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION]) | ||
573 | 69 | |||
574 | 70 | ########################### | ||
575 | 71 | # Control Center panel | ||
576 | 72 | ########################### | ||
577 | 73 | |||
578 | 74 | AC_ARG_WITH([ccpanel], | ||
579 | 75 | AS_HELP_STRING([--with-ccpanel], [enable Control Center panel]),, | ||
580 | 76 | with_ccpanel=auto) | ||
581 | 77 | |||
582 | 78 | if test x"$with_ccpanel" != x"no" ; then | ||
583 | 79 | PKG_CHECK_MODULES([PREF], | ||
584 | 80 | [gio-2.0 >= $GIO_REQUIRED_VERSION | ||
585 | 81 | gtk+-3.0 >= $GTK3_REQUIRED_VERSION | ||
586 | 82 | timezonemap | ||
587 | 83 | libgnome-control-center | ||
588 | 84 | polkit-gobject-1], | ||
589 | 85 | [have_ccpanel=yes], | ||
590 | 86 | [have_ccpanel=no]) | ||
591 | 87 | if test x${have_ccpanel} = xyes; then | ||
592 | 88 | AC_DEFINE(HAVE_CCPANEL, 1, [Define to 1 to enable Control Center panel]) | ||
593 | 89 | PKG_CHECK_MODULES(LIBMAP, gio-2.0 >= $GIO_REQUIRED_VERSION | ||
594 | 90 | gtk+-3.0 >= $GTK3_REQUIRED_VERSION) | ||
595 | 91 | fi | ||
596 | 92 | if test x${with_ccpanel} = xyes && test x${have_ccpanel} = xno; then | ||
597 | 93 | AC_MSG_ERROR([Control Center panel configured but not found]) | ||
598 | 94 | fi | ||
599 | 95 | else | ||
600 | 96 | have_ccpanel=no | ||
601 | 97 | fi | ||
602 | 98 | AM_CONDITIONAL(BUILD_CCPANEL, test x${have_ccpanel} = xyes) | ||
603 | 99 | |||
604 | 100 | ########################### | ||
605 | 101 | # Grab the GSettings Macros | ||
606 | 102 | ########################### | ||
607 | 103 | |||
608 | 104 | GLIB_GSETTINGS | ||
609 | 105 | |||
610 | 106 | ########################### | ||
611 | 107 | # gcov coverage reporting | ||
612 | 108 | ########################### | ||
613 | 109 | |||
614 | 110 | m4_include([m4/gcov.m4]) | ||
615 | 111 | AC_TDD_GCOV | ||
616 | 112 | AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes]) | ||
617 | 113 | AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes]) | ||
618 | 114 | AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes]) | ||
619 | 115 | AC_SUBST(COVERAGE_CFLAGS) | ||
620 | 116 | AC_SUBST(COVERAGE_LDFLAGS) | ||
621 | 117 | |||
622 | 118 | ########################### | ||
623 | 119 | # Google Test framework | ||
624 | 120 | ########################### | ||
625 | 121 | |||
626 | 122 | AC_ARG_ENABLE([tests], | ||
627 | 123 | [AS_HELP_STRING([--disable-tests], [Disable test scripts and tools (default=auto)])], | ||
628 | 124 | [enable_tests=${enableval}], | ||
629 | 125 | [enable_tests=auto]) | ||
630 | 126 | if test "x$enable_tests" != "xno"; then | ||
631 | 127 | m4_include([m4/gtest.m4]) | ||
632 | 128 | CHECK_GTEST | ||
633 | 129 | CHECK_XORG_GTEST | ||
634 | 130 | if test "x$enable_tests" = "xauto"; then | ||
635 | 131 | enable_tests=${have_gtest} | ||
636 | 132 | elif test "x$enable_tests" = "xyes" && test "x$have_gtest" != "xyes"; then | ||
637 | 133 | AC_MSG_ERROR([tests were requested but gtest is not installed.]) | ||
638 | 134 | fi | ||
639 | 135 | fi | ||
640 | 136 | AM_CONDITIONAL([BUILD_TESTS],[test "x$enable_tests" = "xyes"]) | ||
641 | 137 | |||
642 | 138 | ############################## | ||
643 | 139 | # Custom Junk | ||
644 | 140 | ############################## | ||
645 | 141 | |||
646 | 142 | AC_DEFUN([AC_DEFINE_PATH], [ | ||
647 | 143 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | ||
648 | 144 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | ||
649 | 145 | ac_define_path=`eval echo [$]$2` | ||
650 | 146 | ac_define_path=`eval echo [$]ac_define_path` | ||
651 | 147 | $1="$ac_define_path" | ||
652 | 148 | AC_SUBST($1) | ||
653 | 149 | ifelse($3, , | ||
654 | 150 | AC_DEFINE_UNQUOTED($1, "$ac_define_path"), | ||
655 | 151 | AC_DEFINE_UNQUOTED($1, "$ac_define_path", $3)) | ||
656 | 152 | ]) | ||
657 | 153 | |||
658 | 154 | ########################### | ||
659 | 155 | # Internationalization | ||
660 | 156 | ########################### | ||
661 | 157 | IT_PROG_INTLTOOL([0.41.0]) | ||
662 | 158 | |||
663 | 159 | GETTEXT_PACKAGE=indicator-datetime | ||
664 | 160 | AC_SUBST(GETTEXT_PACKAGE) | ||
665 | 161 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the default get text domain]) | ||
666 | 162 | AC_DEFINE_PATH(GNOMELOCALEDIR, "${datadir}/locale", [locale directory]) | ||
667 | 163 | |||
668 | 164 | AM_GLIB_GNU_GETTEXT | ||
669 | 165 | |||
670 | 166 | ########################### | ||
671 | 167 | # Files | ||
672 | 168 | ########################### | ||
673 | 169 | |||
674 | 170 | AC_CONFIG_FILES([ | ||
675 | 171 | Makefile | ||
676 | 172 | src/Makefile | ||
677 | 173 | data/Makefile | ||
678 | 174 | tests/Makefile | ||
679 | 175 | po/Makefile.in | ||
680 | 176 | ]) | ||
681 | 177 | AC_OUTPUT | ||
682 | 178 | |||
683 | 179 | ########################### | ||
684 | 180 | # Results | ||
685 | 181 | ########################### | ||
686 | 182 | |||
687 | 183 | AC_MSG_NOTICE([ | ||
688 | 184 | |||
689 | 185 | Date and Time Indicator Configuration: | ||
690 | 186 | |||
691 | 187 | Prefix: $prefix | ||
692 | 188 | CC Panel: $have_ccpanel | ||
693 | 189 | CC Panel Dir: $CCPANELDIR | ||
694 | 190 | Unit Tests: $enable_tests | ||
695 | 191 | gcov: $use_gcov | ||
696 | 192 | ]) | ||
697 | 193 | 0 | ||
698 | === added file 'data/CMakeLists.txt' | |||
699 | --- data/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
700 | +++ data/CMakeLists.txt 2013-10-30 22:00:17 +0000 | |||
701 | @@ -0,0 +1,66 @@ | |||
702 | 1 | ## | ||
703 | 2 | ## GSettings schema | ||
704 | 3 | ## | ||
705 | 4 | |||
706 | 5 | include (UseGSettings) | ||
707 | 6 | set (SCHEMA_NAME "com.canonical.indicator.datetime.gschema.xml") | ||
708 | 7 | set (SCHEMA_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}") | ||
709 | 8 | add_schema (${SCHEMA_FILE}) | ||
710 | 9 | |||
711 | 10 | |||
712 | 11 | ## | ||
713 | 12 | ## DBus Service File | ||
714 | 13 | ## | ||
715 | 14 | |||
716 | 15 | # where to install | ||
717 | 16 | set (DBUS_SERVICE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/dbus-1/services") | ||
718 | 17 | message (STATUS "${DBUS_SERVICE_DIR} is the DBus Service File install dir") | ||
719 | 18 | |||
720 | 19 | set (SERVICE_NAME "${CMAKE_PROJECT_NAME}.service") | ||
721 | 20 | set (SERVICE_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_NAME}") | ||
722 | 21 | set (SERVICE_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SERVICE_NAME}.in") | ||
723 | 22 | |||
724 | 23 | # build it | ||
725 | 24 | set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}") | ||
726 | 25 | configure_file ("${SERVICE_FILE_IN}" "${SERVICE_FILE}") | ||
727 | 26 | |||
728 | 27 | # install it | ||
729 | 28 | install (FILES "${SERVICE_FILE}" | ||
730 | 29 | DESTINATION "${DBUS_SERVICE_DIR}") | ||
731 | 30 | |||
732 | 31 | |||
733 | 32 | ## | ||
734 | 33 | ## Unity Indicator File | ||
735 | 34 | ## | ||
736 | 35 | |||
737 | 36 | # where to install | ||
738 | 37 | set (UNITY_INDICATOR_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/unity/indicators") | ||
739 | 38 | message (STATUS "${UNITY_INDICATOR_DIR} is the Unity Indicator install dir") | ||
740 | 39 | |||
741 | 40 | set (UNITY_INDICATOR_NAME "com.canonical.indicator.datetime") | ||
742 | 41 | set (UNITY_INDICATOR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_INDICATOR_NAME}") | ||
743 | 42 | |||
744 | 43 | install (FILES "${UNITY_INDICATOR_FILE}" | ||
745 | 44 | DESTINATION "${UNITY_INDICATOR_DIR}") | ||
746 | 45 | |||
747 | 46 | |||
748 | 47 | ## | ||
749 | 48 | ## gnome-control-center panel: .ui and .desktop files | ||
750 | 49 | ## | ||
751 | 50 | |||
752 | 51 | if (BUILD_PANEL) | ||
753 | 52 | |||
754 | 53 | # the .ui file | ||
755 | 54 | install (FILES "datetime-dialog.ui" | ||
756 | 55 | DESTINATION "${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}") | ||
757 | 56 | |||
758 | 57 | # the .desktop file | ||
759 | 58 | set (DESKTOP_NAME "gnome-indicator-datetime-panel.desktop") | ||
760 | 59 | set (DESKTOP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_NAME}") | ||
761 | 60 | set (DESKTOP_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${DESKTOP_NAME}.in") | ||
762 | 61 | set (ENV{LC_ALL} "C") | ||
763 | 62 | execute_process (COMMAND intltool-merge -quiet --desktop-style --utf8 "${CMAKE_SOURCE_DIR}/po" "${DESKTOP_FILE_IN}" "${DESKTOP_FILE}") | ||
764 | 63 | install (FILES ${DESKTOP_FILE} | ||
765 | 64 | DESTINATION "${CMAKE_INSTALL_DATADIR}/applications") | ||
766 | 65 | |||
767 | 66 | endif () | ||
768 | 0 | 67 | ||
769 | === removed file 'data/Makefile.am' | |||
770 | --- data/Makefile.am 2013-06-28 21:41:31 +0000 | |||
771 | +++ data/Makefile.am 1970-01-01 00:00:00 +0000 | |||
772 | @@ -1,45 +0,0 @@ | |||
773 | 1 | BUILT_SOURCES= | ||
774 | 2 | CLEANFILES= | ||
775 | 3 | EXTRA_DIST= | ||
776 | 4 | |||
777 | 5 | # | ||
778 | 6 | # the indicator bus file | ||
779 | 7 | # | ||
780 | 8 | |||
781 | 9 | indicatorsdir = $(prefix)/share/unity/indicators | ||
782 | 10 | dist_indicators_DATA = com.canonical.indicator.datetime | ||
783 | 11 | |||
784 | 12 | # | ||
785 | 13 | # the gsettings | ||
786 | 14 | # | ||
787 | 15 | |||
788 | 16 | gsettings_SCHEMAS = com.canonical.indicator.datetime.gschema.xml | ||
789 | 17 | @GSETTINGS_RULES@ | ||
790 | 18 | EXTRA_DIST += $(gsettings_SCHEMAS) | ||
791 | 19 | |||
792 | 20 | # | ||
793 | 21 | # the dbus service file | ||
794 | 22 | # | ||
795 | 23 | |||
796 | 24 | dbus_servicesdir = $(datadir)/dbus-1/services | ||
797 | 25 | dbus_services_DATA = indicator-datetime.service | ||
798 | 26 | dbus_services_in = $(dbus_services_DATA:.service=.service.in) | ||
799 | 27 | $(dbus_services_DATA): $(dbus_services_in) | ||
800 | 28 | $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ | ||
801 | 29 | BUILT_SOURCES += $(dbus_services_DATA) | ||
802 | 30 | CLEANFILES += $(dbus_services_DATA) | ||
803 | 31 | EXTRA_DIST += $(dbus_services_in) | ||
804 | 32 | |||
805 | 33 | # | ||
806 | 34 | # the gnome-control-center panel | ||
807 | 35 | # | ||
808 | 36 | |||
809 | 37 | if BUILD_CCPANEL | ||
810 | 38 | pkgdata_DATA = datetime-dialog.ui | ||
811 | 39 | @INTLTOOL_DESKTOP_RULE@ | ||
812 | 40 | desktopdir = $(datadir)/applications | ||
813 | 41 | desktop_DATA = gnome-indicator-datetime-panel.desktop | ||
814 | 42 | EXTRA_DIST += $(desktop_DATA) | ||
815 | 43 | CLEANFILES += $(desktop_DATA) | ||
816 | 44 | endif | ||
817 | 45 | EXTRA_DIST += datetime-dialog.ui $(desktop_DATA:.desktop=.desktop.in) | ||
818 | 46 | 0 | ||
819 | === modified file 'data/indicator-datetime.service.in' | |||
820 | --- data/indicator-datetime.service.in 2011-01-17 17:41:28 +0000 | |||
821 | +++ data/indicator-datetime.service.in 2013-10-30 22:00:17 +0000 | |||
822 | @@ -1,3 +1,3 @@ | |||
823 | 1 | [D-BUS Service] | 1 | [D-BUS Service] |
824 | 2 | Name=com.canonical.indicator.datetime | 2 | Name=com.canonical.indicator.datetime |
826 | 3 | Exec=@libexecdir@/indicator-datetime-service | 3 | Exec=@pkglibexecdir@/indicator-datetime-service |
827 | 4 | 4 | ||
828 | === modified file 'debian/control' | |||
829 | --- debian/control 2013-10-16 22:14:11 +0000 | |||
830 | +++ debian/control 2013-10-30 22:00:17 +0000 | |||
831 | @@ -2,9 +2,10 @@ | |||
832 | 2 | Section: misc | 2 | Section: misc |
833 | 3 | Priority: optional | 3 | Priority: optional |
834 | 4 | Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com> | 4 | Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com> |
838 | 5 | Build-Depends: debhelper (>= 9), | 5 | Build-Depends: cmake, |
839 | 6 | quilt, | 6 | dbus, |
840 | 7 | dh-autoreconf, | 7 | debhelper (>= 9), |
841 | 8 | dh-translations, | ||
842 | 8 | intltool (>= 0.35.0), | 9 | intltool (>= 0.35.0), |
843 | 9 | gnome-common, | 10 | gnome-common, |
844 | 10 | libxorg-gtest-dev, | 11 | libxorg-gtest-dev, |
845 | 11 | 12 | ||
846 | === modified file 'debian/indicator-datetime.install' | |||
847 | --- debian/indicator-datetime.install 2013-08-27 14:52:26 +0000 | |||
848 | +++ debian/indicator-datetime.install 2013-10-30 22:00:17 +0000 | |||
849 | @@ -1,5 +1,5 @@ | |||
850 | 1 | usr/share/glib-2.0/schemas/* | 1 | usr/share/glib-2.0/schemas/* |
851 | 2 | usr/share/dbus-1/services/* | 2 | usr/share/dbus-1/services/* |
852 | 3 | usr/share/unity/indicators/* | 3 | usr/share/unity/indicators/* |
854 | 4 | usr/lib/*/indicator-datetime-service | 4 | usr/lib/*/indicator-datetime/indicator-datetime-service |
855 | 5 | usr/share/locale/* | 5 | usr/share/locale/* |
856 | 6 | 6 | ||
857 | === modified file 'debian/rules' | |||
858 | --- debian/rules 2013-09-02 14:08:49 +0000 | |||
859 | +++ debian/rules 2013-10-30 22:00:17 +0000 | |||
860 | @@ -3,17 +3,11 @@ | |||
861 | 3 | LDFLAGS += -Wl,-z,defs -Wl,--as-needed | 3 | LDFLAGS += -Wl,-z,defs -Wl,--as-needed |
862 | 4 | 4 | ||
863 | 5 | %: | 5 | %: |
871 | 6 | dh $@ --with quilt,autoreconf | 6 | dh $@ --with translations |
865 | 7 | |||
866 | 8 | override_dh_autoreconf: | ||
867 | 9 | NOCONFIGURE=1 dh_autoreconf ./autogen.sh | ||
868 | 10 | |||
869 | 11 | override_dh_auto_configure: | ||
870 | 12 | dh_auto_configure -- --disable-static --disable-silent-rules | ||
872 | 13 | 7 | ||
873 | 14 | override_dh_install: | 8 | override_dh_install: |
874 | 15 | cd po; intltool-update --pot --verbose | 9 | cd po; intltool-update --pot --verbose |
876 | 16 | dh_install -X.la --fail-missing | 10 | dh_install --fail-missing |
877 | 17 | # Language packs | 11 | # Language packs |
878 | 18 | for d in $$(find debian/indicator-datetime -type f \( -name "*.desktop" -o -name "*.directory" \) ); do \ | 12 | for d in $$(find debian/indicator-datetime -type f \( -name "*.desktop" -o -name "*.directory" \) ); do \ |
879 | 19 | sed -ri '/^(Name|GenericName|Comment|X-GNOME-FullName)\[/d' $$d; \ | 13 | sed -ri '/^(Name|GenericName|Comment|X-GNOME-FullName)\[/d' $$d; \ |
880 | 20 | 14 | ||
881 | === added directory 'panel' | |||
882 | === added file 'panel/CMakeLists.txt' | |||
883 | --- panel/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
884 | +++ panel/CMakeLists.txt 2013-10-30 22:00:17 +0000 | |||
885 | @@ -0,0 +1,25 @@ | |||
886 | 1 | set (PANEL_LIB "indicator-datetime") | ||
887 | 2 | |||
888 | 3 | add_definitions (-DPKGDATADIR="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}") | ||
889 | 4 | |||
890 | 5 | add_library (${PANEL_LIB} SHARED | ||
891 | 6 | datetime-prefs.c | ||
892 | 7 | datetime-prefs-locations.c | ||
893 | 8 | datetime-prefs-locations.h | ||
894 | 9 | ${CMAKE_SOURCE_DIR}/src/utils.c | ||
895 | 10 | ${CMAKE_SOURCE_DIR}/src/utils.h | ||
896 | 11 | ${CMAKE_SOURCE_DIR}/src/settings-shared.h) | ||
897 | 12 | |||
898 | 13 | include_directories (${PANEL_DEPS_INCLUDE_DIRS}) | ||
899 | 14 | |||
900 | 15 | link_directories (${PANEL_DEPS_LIBRARY_DIRS}) | ||
901 | 16 | |||
902 | 17 | set_property (TARGET ${PANEL_LIB} | ||
903 | 18 | APPEND_STRING PROPERTY COMPILE_FLAGS | ||
904 | 19 | " -g ${CC_WARNING_ARGS} ${GCOV_FLAGS}") | ||
905 | 20 | |||
906 | 21 | target_link_libraries (${PANEL_LIB} ${PANEL_DEPS_LIBRARIES} ${GCOV_LIBS}) | ||
907 | 22 | |||
908 | 23 | install (TARGETS ${PANEL_LIB} | ||
909 | 24 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/control-center-1/panels) | ||
910 | 25 | |||
911 | 0 | 26 | ||
912 | === renamed file 'src/datetime-prefs-locations.c' => 'panel/datetime-prefs-locations.c' | |||
913 | --- src/datetime-prefs-locations.c 2013-10-26 20:37:14 +0000 | |||
914 | +++ panel/datetime-prefs-locations.c 2013-10-30 22:00:17 +0000 | |||
915 | @@ -109,7 +109,9 @@ | |||
916 | 109 | } | 109 | } |
917 | 110 | 110 | ||
918 | 111 | static void | 111 | static void |
920 | 112 | handle_sort(GtkWidget * button, GtkTreeView * tree_view, GCompareFunc compare) | 112 | handle_sort(GtkWidget * button G_GNUC_UNUSED, |
921 | 113 | GtkTreeView * tree_view, | ||
922 | 114 | GCompareFunc compare) | ||
923 | 113 | { | 115 | { |
924 | 114 | GtkTreeModel * model = gtk_tree_view_get_model (tree_view); | 116 | GtkTreeModel * model = gtk_tree_view_get_model (tree_view); |
925 | 115 | GSList * l; | 117 | GSList * l; |
926 | @@ -180,7 +182,7 @@ | |||
927 | 180 | ***/ | 182 | ***/ |
928 | 181 | 183 | ||
929 | 182 | static void | 184 | static void |
931 | 183 | handle_add (GtkWidget * button, GtkTreeView * tree) | 185 | handle_add (GtkWidget * button G_GNUC_UNUSED, GtkTreeView * tree) |
932 | 184 | { | 186 | { |
933 | 185 | GtkListStore * store = GTK_LIST_STORE (gtk_tree_view_get_model (tree)); | 187 | GtkListStore * store = GTK_LIST_STORE (gtk_tree_view_get_model (tree)); |
934 | 186 | 188 | ||
935 | @@ -193,7 +195,7 @@ | |||
936 | 193 | } | 195 | } |
937 | 194 | 196 | ||
938 | 195 | static void | 197 | static void |
940 | 196 | handle_remove (GtkWidget * button, GtkTreeView * tree) | 198 | handle_remove (GtkWidget * button G_GNUC_UNUSED, GtkTreeView * tree) |
941 | 197 | { | 199 | { |
942 | 198 | GtkListStore * store = GTK_LIST_STORE (gtk_tree_view_get_model (tree)); | 200 | GtkListStore * store = GTK_LIST_STORE (gtk_tree_view_get_model (tree)); |
943 | 199 | GtkTreeSelection * selection = gtk_tree_view_get_selection (tree); | 201 | GtkTreeSelection * selection = gtk_tree_view_get_selection (tree); |
944 | @@ -290,7 +292,9 @@ | |||
945 | 290 | } | 292 | } |
946 | 291 | 293 | ||
947 | 292 | static void | 294 | static void |
949 | 293 | handle_edit (GtkCellRendererText * renderer, gchar * path, gchar * new_text, | 295 | handle_edit (GtkCellRendererText * renderer G_GNUC_UNUSED, |
950 | 296 | gchar * path, | ||
951 | 297 | gchar * new_text, | ||
952 | 294 | GtkListStore * store) | 298 | GtkListStore * store) |
953 | 295 | { | 299 | { |
954 | 296 | GtkTreeIter iter; | 300 | GtkTreeIter iter; |
955 | @@ -388,8 +392,10 @@ | |||
956 | 388 | } | 392 | } |
957 | 389 | 393 | ||
958 | 390 | static void | 394 | static void |
961 | 391 | handle_edit_started (GtkCellRendererText * renderer, GtkCellEditable * editable, | 395 | handle_edit_started (GtkCellRendererText * renderer G_GNUC_UNUSED, |
962 | 392 | gchar * path, CcTimezoneCompletion * completion) | 396 | GtkCellEditable * editable, |
963 | 397 | gchar * path, | ||
964 | 398 | CcTimezoneCompletion * completion) | ||
965 | 393 | { | 399 | { |
966 | 394 | if (GTK_IS_ENTRY (editable)) { | 400 | if (GTK_IS_ENTRY (editable)) { |
967 | 395 | GtkEntry *entry = GTK_ENTRY (editable); | 401 | GtkEntry *entry = GTK_ENTRY (editable); |
968 | @@ -548,7 +554,7 @@ | |||
969 | 548 | } | 554 | } |
970 | 549 | 555 | ||
971 | 550 | static void | 556 | static void |
973 | 551 | dialog_closed (GtkWidget * dlg, GObject * store) | 557 | dialog_closed (GtkWidget * dlg, GObject * store G_GNUC_UNUSED) |
974 | 552 | { | 558 | { |
975 | 553 | /* Cleanup a tad */ | 559 | /* Cleanup a tad */ |
976 | 554 | guint time_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (dlg), "time-id")); | 560 | guint time_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (dlg), "time-id")); |
977 | 555 | 561 | ||
978 | === renamed file 'src/datetime-prefs-locations.h' => 'panel/datetime-prefs-locations.h' | |||
979 | === renamed file 'src/datetime-prefs.c' => 'panel/datetime-prefs.c' | |||
980 | --- src/datetime-prefs.c 2013-09-07 12:10:53 +0000 | |||
981 | +++ panel/datetime-prefs.c 2013-10-30 22:00:17 +0000 | |||
982 | @@ -83,7 +83,9 @@ | |||
983 | 83 | 83 | ||
984 | 84 | /* Turns the boolean property into a string gsettings */ | 84 | /* Turns the boolean property into a string gsettings */ |
985 | 85 | static GVariant * | 85 | static GVariant * |
987 | 86 | bind_hours_set (const GValue * value, const GVariantType * type, gpointer user_data) | 86 | bind_hours_set (const GValue * value, |
988 | 87 | const GVariantType * type G_GNUC_UNUSED, | ||
989 | 88 | gpointer user_data) | ||
990 | 87 | { | 89 | { |
991 | 88 | const gchar * output = NULL; | 90 | const gchar * output = NULL; |
992 | 89 | gboolean is_12hour_button = (gboolean)GPOINTER_TO_INT(user_data); | 91 | gboolean is_12hour_button = (gboolean)GPOINTER_TO_INT(user_data); |
993 | @@ -121,7 +123,7 @@ | |||
994 | 121 | } | 123 | } |
995 | 122 | 124 | ||
996 | 123 | static void | 125 | static void |
998 | 124 | widget_dependency_cb (GtkWidget * parent, GParamSpec *pspec, GtkWidget * dependent) | 126 | widget_dependency_cb (GtkWidget * parent, GParamSpec *pspec G_GNUC_UNUSED, GtkWidget * dependent) |
999 | 125 | { | 127 | { |
1000 | 126 | gboolean active, sensitive; | 128 | gboolean active, sensitive; |
1001 | 127 | g_object_get (G_OBJECT (parent), | 129 | g_object_get (G_OBJECT (parent), |
1002 | @@ -141,7 +143,7 @@ | |||
1003 | 141 | } | 143 | } |
1004 | 142 | 144 | ||
1005 | 143 | static void | 145 | static void |
1007 | 144 | polkit_dependency_cb (GPermission * permission, GParamSpec *pspec, GtkWidget * dependent) | 146 | polkit_dependency_cb (GPermission * permission, GParamSpec *pspec G_GNUC_UNUSED, GtkWidget * dependent) |
1008 | 145 | { | 147 | { |
1009 | 146 | gboolean allowed = FALSE; | 148 | gboolean allowed = FALSE; |
1010 | 147 | 149 | ||
1011 | @@ -152,7 +154,7 @@ | |||
1012 | 152 | } | 154 | } |
1013 | 153 | 155 | ||
1014 | 154 | static void | 156 | static void |
1016 | 155 | add_polkit_dependency_helper (GtkWidget * parent, GParamSpec *pspec, GtkWidget * dependent) | 157 | add_polkit_dependency_helper (GtkWidget * parent, GParamSpec *pspec G_GNUC_UNUSED, GtkWidget * dependent) |
1017 | 156 | { | 158 | { |
1018 | 157 | GtkLockButton * button = GTK_LOCK_BUTTON (parent); | 159 | GtkLockButton * button = GTK_LOCK_BUTTON (parent); |
1019 | 158 | GPermission * permission = gtk_lock_button_get_permission (button); | 160 | GPermission * permission = gtk_lock_button_get_permission (button); |
1020 | @@ -171,7 +173,7 @@ | |||
1021 | 171 | } | 173 | } |
1022 | 172 | 174 | ||
1023 | 173 | static void | 175 | static void |
1025 | 174 | polkit_perm_ready (GObject *source_object, GAsyncResult *res, gpointer user_data) | 176 | polkit_perm_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) |
1026 | 175 | { | 177 | { |
1027 | 176 | GError * error = NULL; | 178 | GError * error = NULL; |
1028 | 177 | GPermission * permission = polkit_permission_new_finish (res, &error); | 179 | GPermission * permission = polkit_permission_new_finish (res, &error); |
1029 | @@ -204,7 +206,7 @@ | |||
1030 | 204 | } | 206 | } |
1031 | 205 | 207 | ||
1032 | 206 | static void | 208 | static void |
1034 | 207 | toggle_ntp (GtkWidget * radio, GParamSpec * pspec, IndicatorDatetimePanel * self) | 209 | toggle_ntp (GtkWidget * radio, GParamSpec * pspec G_GNUC_UNUSED, IndicatorDatetimePanel * self) |
1035 | 208 | { | 210 | { |
1036 | 209 | gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio)); | 211 | gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio)); |
1037 | 210 | 212 | ||
1038 | @@ -224,7 +226,9 @@ | |||
1039 | 224 | } | 226 | } |
1040 | 225 | 227 | ||
1041 | 226 | static void | 228 | static void |
1043 | 227 | tz_changed (CcTimezoneMap * map, CcTimezoneLocation * location, IndicatorDatetimePanel * self) | 229 | tz_changed (CcTimezoneMap * map G_GNUC_UNUSED, |
1044 | 230 | CcTimezoneLocation * location, | ||
1045 | 231 | IndicatorDatetimePanel * self) | ||
1046 | 228 | { | 232 | { |
1047 | 229 | if (location == NULL) | 233 | if (location == NULL) |
1048 | 230 | return; | 234 | return; |
1049 | @@ -241,7 +245,9 @@ | |||
1050 | 241 | } | 245 | } |
1051 | 242 | 246 | ||
1052 | 243 | static void | 247 | static void |
1054 | 244 | proxy_ready (GObject *object, GAsyncResult *res, IndicatorDatetimePanel * self) | 248 | proxy_ready (GObject *object G_GNUC_UNUSED, |
1055 | 249 | GAsyncResult *res, | ||
1056 | 250 | IndicatorDatetimePanel * self) | ||
1057 | 245 | { | 251 | { |
1058 | 246 | GError * error = NULL; | 252 | GError * error = NULL; |
1059 | 247 | IndicatorDatetimePanelPrivate * priv = self->priv; | 253 | IndicatorDatetimePanelPrivate * priv = self->priv; |
1060 | @@ -459,7 +465,7 @@ | |||
1061 | 459 | } | 465 | } |
1062 | 460 | 466 | ||
1063 | 461 | static gboolean | 467 | static gboolean |
1065 | 462 | format_time_text (GtkWidget * spinner, gpointer user_data) | 468 | format_time_text (GtkWidget * spinner, gpointer user_data G_GNUC_UNUSED) |
1066 | 463 | { | 469 | { |
1067 | 464 | gboolean is_time = (gboolean)GPOINTER_TO_INT (g_object_get_data (G_OBJECT (spinner), "is-time")); | 470 | gboolean is_time = (gboolean)GPOINTER_TO_INT (g_object_get_data (G_OBJECT (spinner), "is-time")); |
1068 | 465 | 471 | ||
1069 | @@ -570,8 +576,10 @@ | |||
1070 | 570 | } | 576 | } |
1071 | 571 | 577 | ||
1072 | 572 | static gboolean | 578 | static gboolean |
1075 | 573 | timezone_selected (GtkEntryCompletion * widget, GtkTreeModel * model, | 579 | timezone_selected (GtkEntryCompletion * widget G_GNUC_UNUSED, |
1076 | 574 | GtkTreeIter * iter, IndicatorDatetimePanel * self) | 580 | GtkTreeModel * model, |
1077 | 581 | GtkTreeIter * iter, | ||
1078 | 582 | IndicatorDatetimePanel * self) | ||
1079 | 575 | { | 583 | { |
1080 | 576 | const gchar * name, * zone; | 584 | const gchar * name, * zone; |
1081 | 577 | 585 | ||
1082 | @@ -610,7 +618,9 @@ | |||
1083 | 610 | } | 618 | } |
1084 | 611 | 619 | ||
1085 | 612 | static gboolean | 620 | static gboolean |
1087 | 613 | entry_focus_out (GtkEntry * entry, GdkEventFocus * event, IndicatorDatetimePanel * self) | 621 | entry_focus_out (GtkEntry * entry, |
1088 | 622 | GdkEventFocus * event G_GNUC_UNUSED, | ||
1089 | 623 | IndicatorDatetimePanel * self) | ||
1090 | 614 | { | 624 | { |
1091 | 615 | // If the name left in the entry doesn't match the current timezone name, | 625 | // If the name left in the entry doesn't match the current timezone name, |
1092 | 616 | // show an error icon. It's always an error for the user to manually type in | 626 | // show an error icon. It's always an error for the user to manually type in |
1093 | @@ -809,12 +819,12 @@ | |||
1094 | 809 | } | 819 | } |
1095 | 810 | 820 | ||
1096 | 811 | static void | 821 | static void |
1098 | 812 | indicator_datetime_panel_class_finalize (IndicatorDatetimePanelClass *klass) | 822 | indicator_datetime_panel_class_finalize (IndicatorDatetimePanelClass *klass G_GNUC_UNUSED) |
1099 | 813 | { | 823 | { |
1100 | 814 | } | 824 | } |
1101 | 815 | 825 | ||
1102 | 816 | static const char * | 826 | static const char * |
1104 | 817 | indicator_datetime_panel_get_help_uri (CcPanel *panel) | 827 | indicator_datetime_panel_get_help_uri (CcPanel *panel G_GNUC_UNUSED) |
1105 | 818 | { | 828 | { |
1106 | 819 | return "help:ubuntu-help/clock"; | 829 | return "help:ubuntu-help/clock"; |
1107 | 820 | } | 830 | } |
1108 | @@ -845,6 +855,6 @@ | |||
1109 | 845 | } | 855 | } |
1110 | 846 | 856 | ||
1111 | 847 | void | 857 | void |
1113 | 848 | g_io_module_unload (GIOModule *module) | 858 | g_io_module_unload (GIOModule *module G_GNUC_UNUSED) |
1114 | 849 | { | 859 | { |
1115 | 850 | } | 860 | } |
1116 | 851 | 861 | ||
1117 | === added file 'po/CMakeLists.txt' | |||
1118 | --- po/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1119 | +++ po/CMakeLists.txt 2013-10-30 22:00:17 +0000 | |||
1120 | @@ -0,0 +1,3 @@ | |||
1121 | 1 | include (Translations) | ||
1122 | 2 | add_translations_directory ("${GETTEXT_PACKAGE}") | ||
1123 | 3 | add_translations_catalog ("${GETTEXT_PACKAGE}" ../src/ ../panel) | ||
1124 | 0 | 4 | ||
1125 | === modified file 'po/POTFILES.in' | |||
1126 | --- po/POTFILES.in 2013-06-19 04:13:16 +0000 | |||
1127 | +++ po/POTFILES.in 2013-10-30 22:00:17 +0000 | |||
1128 | @@ -1,7 +1,7 @@ | |||
1129 | 1 | src/datetime-prefs.c | ||
1130 | 2 | src/datetime-prefs-locations.c | ||
1131 | 3 | src/service.c | 1 | src/service.c |
1132 | 4 | src/settings-shared.h | 2 | src/settings-shared.h |
1133 | 5 | src/utils.c | 3 | src/utils.c |
1134 | 4 | panel/datetime-prefs.c | ||
1135 | 5 | panel/datetime-prefs-locations.c | ||
1136 | 6 | [type: gettext/glade]data/datetime-dialog.ui | 6 | [type: gettext/glade]data/datetime-dialog.ui |
1137 | 7 | data/gnome-indicator-datetime-panel.desktop.in | 7 | data/gnome-indicator-datetime-panel.desktop.in |
1138 | 8 | 8 | ||
1139 | === added file 'src/CMakeLists.txt' | |||
1140 | --- src/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1141 | +++ src/CMakeLists.txt 2013-10-30 22:00:17 +0000 | |||
1142 | @@ -0,0 +1,45 @@ | |||
1143 | 1 | set (SERVICE_LIB "libindicatordatetimeservice") | ||
1144 | 2 | set (SERVICE_EXEC "indicator-datetime-service") | ||
1145 | 3 | |||
1146 | 4 | add_definitions (-DTIMEZONE_FILE="/etc/timezone" | ||
1147 | 5 | -DG_LOG_DOMAIN="Indicator-Datetime") | ||
1148 | 6 | |||
1149 | 7 | # let service know how to launch gnome-control-center on the desktop | ||
1150 | 8 | if (BUILD_PANEL) | ||
1151 | 9 | add_definitions (-DHAVE_CCPANEL) | ||
1152 | 10 | endif () | ||
1153 | 11 | |||
1154 | 12 | add_library (${SERVICE_LIB} STATIC | ||
1155 | 13 | clock.c | ||
1156 | 14 | clock.h | ||
1157 | 15 | clock-live.c | ||
1158 | 16 | clock-live.h | ||
1159 | 17 | planner.c | ||
1160 | 18 | planner.h | ||
1161 | 19 | planner-eds.c | ||
1162 | 20 | planner-eds.h | ||
1163 | 21 | service.c | ||
1164 | 22 | service.h | ||
1165 | 23 | timezone.c | ||
1166 | 24 | timezone.h | ||
1167 | 25 | timezone-file.c | ||
1168 | 26 | timezone-file.h | ||
1169 | 27 | timezone-geoclue.c | ||
1170 | 28 | timezone-geoclue.h | ||
1171 | 29 | utils.c | ||
1172 | 30 | utils.h | ||
1173 | 31 | dbus-shared.h | ||
1174 | 32 | settings-shared.h) | ||
1175 | 33 | include_directories (${SERVICE_DEPS_INCLUDE_DIRS}) | ||
1176 | 34 | link_directories (${SERVICE_DEPS_LIBRARY_DIRS}) | ||
1177 | 35 | |||
1178 | 36 | add_executable (${SERVICE_EXEC} main.c) | ||
1179 | 37 | target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${GCOV_LIBS}) | ||
1180 | 38 | install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}) | ||
1181 | 39 | |||
1182 | 40 | # common properties | ||
1183 | 41 | set_property (TARGET ${SERVICE_LIB} ${SERVICE_EXEC} | ||
1184 | 42 | APPEND_STRING PROPERTY COMPILE_FLAGS | ||
1185 | 43 | " -g ${CC_WARNING_ARGS} ${GCOV_FLAGS}") | ||
1186 | 44 | |||
1187 | 45 | |||
1188 | 0 | 46 | ||
1189 | === removed file 'src/Makefile.am' | |||
1190 | --- src/Makefile.am 2013-10-17 21:32:44 +0000 | |||
1191 | +++ src/Makefile.am 1970-01-01 00:00:00 +0000 | |||
1192 | @@ -1,88 +0,0 @@ | |||
1193 | 1 | |||
1194 | 2 | SHARED_CFLAGS = \ | ||
1195 | 3 | -Wall \ | ||
1196 | 4 | -Wextra -Wno-missing-field-initializers \ | ||
1197 | 5 | -Werror \ | ||
1198 | 6 | $(SERVICE_CFLAGS) \ | ||
1199 | 7 | $(COVERAGE_CFLAGS) \ | ||
1200 | 8 | -DTIMEZONE_FILE="\"/etc/timezone\"" \ | ||
1201 | 9 | -DG_LOG_DOMAIN=\"Indicator-Datetime\" | ||
1202 | 10 | |||
1203 | 11 | ### | ||
1204 | 12 | ### | ||
1205 | 13 | ### | ||
1206 | 14 | |||
1207 | 15 | noinst_LIBRARIES = libindicator-datetime-service.a | ||
1208 | 16 | |||
1209 | 17 | libindicator_datetime_service_a_CFLAGS = \ | ||
1210 | 18 | $(SHARED_CFLAGS) | ||
1211 | 19 | |||
1212 | 20 | libindicator_datetime_service_a_SOURCES = \ | ||
1213 | 21 | clock.c \ | ||
1214 | 22 | clock.h \ | ||
1215 | 23 | clock-live.c \ | ||
1216 | 24 | clock-live.h \ | ||
1217 | 25 | planner.c \ | ||
1218 | 26 | planner.h \ | ||
1219 | 27 | planner-eds.c \ | ||
1220 | 28 | planner-eds.h \ | ||
1221 | 29 | service.c \ | ||
1222 | 30 | service.h \ | ||
1223 | 31 | timezone.c \ | ||
1224 | 32 | timezone.h \ | ||
1225 | 33 | timezone-file.c \ | ||
1226 | 34 | timezone-file.h \ | ||
1227 | 35 | timezone-geoclue.c \ | ||
1228 | 36 | timezone-geoclue.h \ | ||
1229 | 37 | utils.c \ | ||
1230 | 38 | utils.h \ | ||
1231 | 39 | dbus-shared.h \ | ||
1232 | 40 | settings-shared.h | ||
1233 | 41 | |||
1234 | 42 | ### | ||
1235 | 43 | ### | ||
1236 | 44 | ### | ||
1237 | 45 | |||
1238 | 46 | libexec_PROGRAMS = indicator-datetime-service | ||
1239 | 47 | |||
1240 | 48 | indicator_datetime_service_SOURCES = \ | ||
1241 | 49 | main.c | ||
1242 | 50 | |||
1243 | 51 | indicator_datetime_service_CFLAGS = \ | ||
1244 | 52 | $(SHARED_CFLAGS) | ||
1245 | 53 | |||
1246 | 54 | indicator_datetime_service_LDADD = \ | ||
1247 | 55 | libindicator-datetime-service.a \ | ||
1248 | 56 | $(SERVICE_LIBS) | ||
1249 | 57 | |||
1250 | 58 | indicator_datetime_service_LDFLAGS = \ | ||
1251 | 59 | $(COVERAGE_LDFLAGS) | ||
1252 | 60 | |||
1253 | 61 | ### | ||
1254 | 62 | ### | ||
1255 | 63 | ### | ||
1256 | 64 | |||
1257 | 65 | if BUILD_CCPANEL | ||
1258 | 66 | ccpaneldir = $(libdir)/control-center-1/panels/ | ||
1259 | 67 | ccpanel_LTLIBRARIES = libindicator-datetime.la | ||
1260 | 68 | |||
1261 | 69 | libindicator_datetime_la_SOURCES =\ | ||
1262 | 70 | datetime-prefs.c \ | ||
1263 | 71 | datetime-prefs-locations.c \ | ||
1264 | 72 | datetime-prefs-locations.h \ | ||
1265 | 73 | utils.c \ | ||
1266 | 74 | utils.h \ | ||
1267 | 75 | settings-shared.h | ||
1268 | 76 | libindicator_datetime_la_CFLAGS = \ | ||
1269 | 77 | -Wall \ | ||
1270 | 78 | -Werror \ | ||
1271 | 79 | $(PREF_CFLAGS) \ | ||
1272 | 80 | $(COVERAGE_CFLAGS) \ | ||
1273 | 81 | -DTIMEZONE_FILE="\"/etc/timezone\"" \ | ||
1274 | 82 | -DPKGDATADIR="\"$(pkgdatadir)\"" | ||
1275 | 83 | libindicator_datetime_la_LIBADD = \ | ||
1276 | 84 | $(PREF_LIBS) | ||
1277 | 85 | libindicator_datetime_la_LDFLAGS = \ | ||
1278 | 86 | $(COVERAGE_LDFLAGS) \ | ||
1279 | 87 | -module -avoid-version | ||
1280 | 88 | endif | ||
1281 | 89 | 0 | ||
1282 | === modified file 'src/clock-live.c' | |||
1283 | --- src/clock-live.c 2013-10-23 18:14:25 +0000 | |||
1284 | +++ src/clock-live.c 2013-10-30 22:00:17 +0000 | |||
1285 | @@ -20,8 +20,6 @@ | |||
1286 | 20 | #include <glib.h> | 20 | #include <glib.h> |
1287 | 21 | #include <gio/gio.h> | 21 | #include <gio/gio.h> |
1288 | 22 | 22 | ||
1289 | 23 | #include "config.h" | ||
1290 | 24 | |||
1291 | 25 | #include "clock-live.h" | 23 | #include "clock-live.h" |
1292 | 26 | #include "settings-shared.h" | 24 | #include "settings-shared.h" |
1293 | 27 | #include "timezone-file.h" | 25 | #include "timezone-file.h" |
1294 | @@ -54,7 +52,7 @@ | |||
1295 | 54 | indicator_datetime_clock_live, | 52 | indicator_datetime_clock_live, |
1296 | 55 | G_TYPE_OBJECT, | 53 | G_TYPE_OBJECT, |
1297 | 56 | G_IMPLEMENT_INTERFACE (INDICATOR_TYPE_DATETIME_CLOCK, | 54 | G_IMPLEMENT_INTERFACE (INDICATOR_TYPE_DATETIME_CLOCK, |
1299 | 57 | indicator_datetime_clock_interface_init)); | 55 | indicator_datetime_clock_interface_init)) |
1300 | 58 | 56 | ||
1301 | 59 | /*** | 57 | /*** |
1302 | 60 | **** Timezones | 58 | **** Timezones |
1303 | 61 | 59 | ||
1304 | === modified file 'src/main.c' | |||
1305 | --- src/main.c 2013-10-28 16:19:49 +0000 | |||
1306 | +++ src/main.c 2013-10-30 22:00:17 +0000 | |||
1307 | @@ -17,8 +17,6 @@ | |||
1308 | 17 | * with this program. If not, see <http://www.gnu.org/licenses/>. | 17 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
1309 | 18 | */ | 18 | */ |
1310 | 19 | 19 | ||
1311 | 20 | #include "config.h" | ||
1312 | 21 | |||
1313 | 22 | #include <locale.h> | 20 | #include <locale.h> |
1314 | 23 | #include <stdlib.h> /* exit() */ | 21 | #include <stdlib.h> /* exit() */ |
1315 | 24 | 22 | ||
1316 | 25 | 23 | ||
1317 | === modified file 'src/planner-eds.c' | |||
1318 | --- src/planner-eds.c 2013-10-10 02:24:43 +0000 | |||
1319 | +++ src/planner-eds.c 2013-10-30 22:00:17 +0000 | |||
1320 | @@ -17,8 +17,6 @@ | |||
1321 | 17 | * with this program. If not, see <http://www.gnu.org/licenses/>. | 17 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
1322 | 18 | */ | 18 | */ |
1323 | 19 | 19 | ||
1324 | 20 | #include "config.h" | ||
1325 | 21 | |||
1326 | 22 | #include <libical/ical.h> | 20 | #include <libical/ical.h> |
1327 | 23 | #include <libical/icaltime.h> | 21 | #include <libical/icaltime.h> |
1328 | 24 | #include <libecal/libecal.h> | 22 | #include <libecal/libecal.h> |
1329 | 25 | 23 | ||
1330 | === modified file 'src/service.c' | |||
1331 | --- src/service.c 2013-10-23 14:42:49 +0000 | |||
1332 | +++ src/service.c 2013-10-30 22:00:17 +0000 | |||
1333 | @@ -18,8 +18,6 @@ | |||
1334 | 18 | * with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
1335 | 19 | */ | 19 | */ |
1336 | 20 | 20 | ||
1337 | 21 | #include "config.h" | ||
1338 | 22 | |||
1339 | 23 | #include <string.h> /* strstr() */ | 21 | #include <string.h> /* strstr() */ |
1340 | 24 | 22 | ||
1341 | 25 | #include <glib/gi18n.h> | 23 | #include <glib/gi18n.h> |
1342 | @@ -1531,7 +1529,7 @@ | |||
1343 | 1531 | } | 1529 | } |
1344 | 1532 | 1530 | ||
1345 | 1533 | /* if that appointment's an alarm, dispatch its url */ | 1531 | /* if that appointment's an alarm, dispatch its url */ |
1347 | 1534 | g_debug ("%s: uri '%s'; matching appt is %p", G_STRFUNC, uid, appt); | 1532 | g_debug ("%s: uri '%s'; matching appt is %p", G_STRFUNC, uid, (void*)appt); |
1348 | 1535 | if (appt && appointment_has_alarm_url (appt)) | 1533 | if (appt && appointment_has_alarm_url (appt)) |
1349 | 1536 | dispatch_alarm_url (appt); | 1534 | dispatch_alarm_url (appt); |
1350 | 1537 | } | 1535 | } |
1351 | 1538 | 1536 | ||
1352 | === modified file 'src/timezone-file.c' | |||
1353 | --- src/timezone-file.c 2013-09-09 17:43:31 +0000 | |||
1354 | +++ src/timezone-file.c 2013-10-30 22:00:17 +0000 | |||
1355 | @@ -17,8 +17,6 @@ | |||
1356 | 17 | * with this program. If not, see <http://www.gnu.org/licenses/>. | 17 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
1357 | 18 | */ | 18 | */ |
1358 | 19 | 19 | ||
1359 | 20 | #include "config.h" | ||
1360 | 21 | |||
1361 | 22 | #include <gio/gio.h> /* GFile, GFileMonitor */ | 20 | #include <gio/gio.h> /* GFile, GFileMonitor */ |
1362 | 23 | 21 | ||
1363 | 24 | #include "timezone-file.h" | 22 | #include "timezone-file.h" |
1364 | 25 | 23 | ||
1365 | === modified file 'src/timezone-geoclue.c' | |||
1366 | --- src/timezone-geoclue.c 2013-09-09 17:43:31 +0000 | |||
1367 | +++ src/timezone-geoclue.c 2013-10-30 22:00:17 +0000 | |||
1368 | @@ -17,8 +17,6 @@ | |||
1369 | 17 | * with this program. If not, see <http://www.gnu.org/licenses/>. | 17 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
1370 | 18 | */ | 18 | */ |
1371 | 19 | 19 | ||
1372 | 20 | #include "config.h" | ||
1373 | 21 | |||
1374 | 22 | #include <geoclue/geoclue-master.h> | 20 | #include <geoclue/geoclue-master.h> |
1375 | 23 | #include <geoclue/geoclue-master-client.h> | 21 | #include <geoclue/geoclue-master-client.h> |
1376 | 24 | 22 | ||
1377 | @@ -72,7 +70,7 @@ | |||
1378 | 72 | GeoclueAccuracy * accuracy G_GNUC_UNUSED, | 70 | GeoclueAccuracy * accuracy G_GNUC_UNUSED, |
1379 | 73 | gpointer gself) | 71 | gpointer gself) |
1380 | 74 | { | 72 | { |
1382 | 75 | return on_address_changed(address, timestamp, addy_data, accuracy, NULL, gself); | 73 | on_address_changed(address, timestamp, addy_data, accuracy, NULL, gself); |
1383 | 76 | } | 74 | } |
1384 | 77 | 75 | ||
1385 | 78 | static void | 76 | static void |
1386 | 79 | 77 | ||
1387 | === modified file 'src/utils.c' | |||
1388 | --- src/utils.c 2013-10-03 21:16:24 +0000 | |||
1389 | +++ src/utils.c 2013-10-30 22:00:17 +0000 | |||
1390 | @@ -20,10 +20,6 @@ | |||
1391 | 20 | with this program. If not, see <http://www.gnu.org/licenses/>. | 20 | with this program. If not, see <http://www.gnu.org/licenses/>. |
1392 | 21 | */ | 21 | */ |
1393 | 22 | 22 | ||
1394 | 23 | #ifdef HAVE_CONFIG_H | ||
1395 | 24 | #include "config.h" | ||
1396 | 25 | #endif | ||
1397 | 26 | |||
1398 | 27 | #include <glib/gi18n-lib.h> | 23 | #include <glib/gi18n-lib.h> |
1399 | 28 | #include <gio/gio.h> | 24 | #include <gio/gio.h> |
1400 | 29 | #include <locale.h> | 25 | #include <locale.h> |
1401 | @@ -104,9 +100,9 @@ | |||
1402 | 104 | split_settings_location (tz_name, &old_zone, &old_name); | 100 | split_settings_location (tz_name, &old_zone, &old_name); |
1403 | 105 | g_free (tz_name); | 101 | g_free (tz_name); |
1404 | 106 | 102 | ||
1408 | 107 | // new_name is always just a sanitized version of a timezone. | 103 | /* new_name is always just a sanitized version of a timezone. |
1409 | 108 | // old_name is potentially a saved "pretty" version of a timezone name from | 104 | old_name is potentially a saved "pretty" version of a timezone name from |
1410 | 109 | // geonames. So we prefer to use it if available and the zones match. | 105 | geonames. So we prefer to use it if available and the zones match. */ |
1411 | 110 | 106 | ||
1412 | 111 | if (g_strcmp0 (old_zone, new_zone) == 0) { | 107 | if (g_strcmp0 (old_zone, new_zone) == 0) { |
1413 | 112 | rv = old_name; | 108 | rv = old_name; |
1414 | 113 | 109 | ||
1415 | === added file 'tests/CMakeLists.txt' | |||
1416 | --- tests/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1417 | +++ tests/CMakeLists.txt 2013-10-30 22:00:17 +0000 | |||
1418 | @@ -0,0 +1,23 @@ | |||
1419 | 1 | # build the necessary schemas | ||
1420 | 2 | set_directory_properties (PROPERTIES | ||
1421 | 3 | ADDITIONAL_MAKE_CLEAN_FILES gschemas.compiled) | ||
1422 | 4 | set_source_files_properties (gschemas.compiled GENERATED) | ||
1423 | 5 | |||
1424 | 6 | # GSettings: | ||
1425 | 7 | # compile the indicator-datetime schema into a gschemas.compiled file in this directory, | ||
1426 | 8 | # and help the tests to find that file by setting -DSCHEMA_DIR | ||
1427 | 9 | set (SCHEMA_DIR ${CMAKE_CURRENT_BINARY_DIR}) | ||
1428 | 10 | add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}") | ||
1429 | 11 | execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas | ||
1430 | 12 | OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE | ||
1431 | 13 | OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
1432 | 14 | add_custom_command (OUTPUT gschemas.compiled | ||
1433 | 15 | DEPENDS ${CMAKE_SOURCE_DIR}/data/com.canonical.indicator.session.gschema.xml | ||
1434 | 16 | COMMAND cp -f ${CMAKE_SOURCE_DIR}/data/*gschema.xml ${SCHEMA_DIR} | ||
1435 | 17 | COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR}) | ||
1436 | 18 | |||
1437 | 19 | # look for hearder in our src dir, and also in the directories where we autogenerate files... | ||
1438 | 20 | include_directories (${CMAKE_SOURCE_DIR}/src) | ||
1439 | 21 | include_directories (${CMAKE_CURRENT_BINARY_DIR} ${SERVICE_INCLUDE_DIRS}) | ||
1440 | 22 | |||
1441 | 23 | |||
1442 | 0 | 24 | ||
1443 | === removed file 'tests/Makefile.am' | |||
1444 | --- tests/Makefile.am 2013-09-07 14:48:46 +0000 | |||
1445 | +++ tests/Makefile.am 1970-01-01 00:00:00 +0000 | |||
1446 | @@ -1,58 +0,0 @@ | |||
1447 | 1 | TESTS = | ||
1448 | 2 | CLEANFILES = | ||
1449 | 3 | BUILT_SOURCES = | ||
1450 | 4 | check_PROGRAMS = | ||
1451 | 5 | |||
1452 | 6 | ### | ||
1453 | 7 | ### | ||
1454 | 8 | ### | ||
1455 | 9 | |||
1456 | 10 | # stock UMB tests on user-visible strings | ||
1457 | 11 | include $(srcdir)/Makefile.am.strings | ||
1458 | 12 | |||
1459 | 13 | check_LIBRARIES = libgtest.a | ||
1460 | 14 | nodist_libgtest_a_SOURCES = \ | ||
1461 | 15 | $(GTEST_SOURCE)/gtest-all.cc \ | ||
1462 | 16 | $(GTEST_SOURCE)/gtest_main.cc | ||
1463 | 17 | |||
1464 | 18 | AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I${top_srcdir}/src -Wall -Werror | ||
1465 | 19 | AM_CXXFLAGS = $(GTEST_CXXFLAGS) | ||
1466 | 20 | |||
1467 | 21 | ### | ||
1468 | 22 | ### | ||
1469 | 23 | ### | ||
1470 | 24 | |||
1471 | 25 | TEST_LIBS = \ | ||
1472 | 26 | libgtest.a \ | ||
1473 | 27 | $(SERVICE_LIBS) \ | ||
1474 | 28 | $(COVERAGE_LDFLAGS) \ | ||
1475 | 29 | $(XORG_GTEST_LDFLAGS) | ||
1476 | 30 | |||
1477 | 31 | TEST_CPPFLAGS = \ | ||
1478 | 32 | $(AM_CPPFLAGS) \ | ||
1479 | 33 | $(SERVICE_CFLAGS) | ||
1480 | 34 | |||
1481 | 35 | BUILT_SOURCES += gschemas.compiled | ||
1482 | 36 | CLEANFILES += gschemas.compiled | ||
1483 | 37 | gschemas.compiled: Makefile | ||
1484 | 38 | @glib-compile-schemas --targetdir=$(abs_builddir) $(top_builddir)/data | ||
1485 | 39 | |||
1486 | 40 | ### | ||
1487 | 41 | ### | ||
1488 | 42 | ### | ||
1489 | 43 | |||
1490 | 44 | TESTS += test-indicator | ||
1491 | 45 | check_PROGRAMS += test-indicator | ||
1492 | 46 | test_indicator_SOURCES = test-indicator.cc | ||
1493 | 47 | test_indicator_LDADD = $(TEST_LIBS) | ||
1494 | 48 | test_indicator_CPPFLAGS = $(TEST_CPPFLAGS) -DSCHEMA_DIR="\"$(top_builddir)/tests/\"" | ||
1495 | 49 | |||
1496 | 50 | ### | ||
1497 | 51 | ### | ||
1498 | 52 | ### | ||
1499 | 53 | |||
1500 | 54 | TESTS += test-utils | ||
1501 | 55 | check_PROGRAMS += test-utils | ||
1502 | 56 | test_utils_SOURCES = test-utils.cc | ||
1503 | 57 | test_utils_LDADD = $(top_builddir)/src/libindicator-datetime-service.a $(TEST_LIBS) | ||
1504 | 58 | test_utils_CPPFLAGS = $(TEST_CPPFLAGS) -DSCHEMA_DIR="\"$(top_builddir)/tests/\"" |
FAILED: Continuous integration, rev:290 jenkins. qa.ubuntu. com/job/ indicator- datetime- ci/124/ jenkins. qa.ubuntu. com/job/ indicator- datetime- trusty- amd64-ci/ 4/console jenkins. qa.ubuntu. com/job/ indicator- datetime- trusty- armhf-ci/ 4/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: 10.97.0. 26:8080/ job/indicator- datetime- ci/124/ rebuild
http://