Merge lp:~indicator-applet-developers/indicator-datetime/ubuntu into lp:~ubuntu-desktop/indicator-datetime/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: 44
Proposed branch: lp:~indicator-applet-developers/indicator-datetime/ubuntu
Merge into: lp:~ubuntu-desktop/indicator-datetime/ubuntu
Diff against target: 1125 lines (+426/-123)
10 files modified
AUTHORS (+1/-0)
ChangeLog (+77/-0)
configure (+65/-46)
configure.ac (+9/-6)
debian/changelog (+13/-0)
src/datetime-prefs.c (+2/-38)
src/datetime-service.c (+161/-31)
src/timezone-completion.c (+61/-2)
src/utils.c (+36/-0)
src/utils.h (+1/-0)
To merge this branch: bzr merge lp:~indicator-applet-developers/indicator-datetime/ubuntu
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+56817@code.launchpad.net

Description of the change

0.2.2

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 'AUTHORS'
2--- AUTHORS 2011-03-23 21:16:17 +0000
3+++ AUTHORS 2011-04-07 18:29:58 +0000
4@@ -2,6 +2,7 @@
5
6 David Barth
7 David Planella
8+ Dylan McCall
9 Gabor Kelemen
10 karl-qdh
11 Ken VanDine
12
13=== modified file 'ChangeLog'
14--- ChangeLog 2011-03-31 19:30:50 +0000
15+++ ChangeLog 2011-04-07 18:29:58 +0000
16@@ -1,5 +1,82 @@
17 # Generated by Makefile. Do not edit.
18
19+2011-04-07 Ted Gould <ted@gould.cx>
20+
21+ 0.2.2
22+
23+2011-04-07 Ted Gould <ted@gould.cx>
24+
25+ Set timezone from the menuitems in the indicator
26+
27+2011-04-07 Michael Terry <mike@mterry.name>
28+
29+ when user clicks a timezone location, switch to that timezone (and support showing user's preferred name for the current timezone in the menu)
30+
31+2011-04-06 Ted Gould <ted@gould.cx>
32+
33+ Adds language, country and version information to the URL
34+
35+2011-04-06 Michael Terry <mike@mterry.name>
36+
37+ whoops, remove debug comment
38+
39+2011-04-06 Michael Terry <mike@mterry.name>
40+
41+ pass locale to server; dynamically determine version
42+
43+2011-04-06 Ted Gould <ted@gould.cx>
44+
45+ Adding support for making full day items just have the day name
46+
47+2011-04-05 Ted Gould <ted@gould.cx>
48+
49+ Use gmtime for full day events.
50+
51+2011-04-05 Ted Gould <ted@gould.cx>
52+
53+ Use stack memory instead of the global to avoid it getting modified
54+
55+2011-04-05 Ted Gould <ted@gould.cx>
56+
57+ Pull the full day into a boolean and reformat
58+
59+2011-04-05 Ted Gould <ted@gould.cx>
60+
61+ Translator comment
62+
63+2011-04-05 Ted Gould <ted@gould.cx>
64+
65+ Detect a full day event and print it differently
66+
67+2011-04-04 Ted Gould <ted@gould.cx>
68+
69+ Using GConf to find out which calendars are shown or not.
70+
71+2011-04-04 karl-qdh <karl@qdh.org.uk>
72+
73+ Working patch! YAY
74+
75+2011-04-04 karl-qdh <karl@qdh.org.uk>
76+
77+ Added a change which _could_ work if evolution URI's were correct, however local:system is not a valid URI, effectively this will stop showing all calendars right now
78+
79+2011-04-04 Ted Gould <ted@gould.cx>
80+
81+ Ensure the calendar is correctly shown
82+
83+2011-04-03 Dylan McCall <dylanmccall@ubuntu.com>
84+
85+ Follow show-calendar setting regardless of whether Evolution is present (LP: #748772)
86+ Visibility of upcoming events is no longer tied to show-calendar setting.
87+
88+2011-04-04 Ted Gould <ted@gould.cx>
89+
90+ Making it so that months boundries can't block our events.
91+
92+2011-04-01 karl-qdh <karl@qdh.org.uk>
93+
94+ Set a minimum number of days to look for appointments for, allowed it to extend past month end by 1 week.
95+
96 2011-03-31 Ted Gould <ted@gould.cx>
97
98 0.2.1
99
100=== modified file 'configure'
101--- configure 2011-03-31 19:30:50 +0000
102+++ configure 2011-04-07 18:29:58 +0000
103@@ -1,6 +1,6 @@
104 #! /bin/sh
105 # Guess values for system-dependent variables and create Makefiles.
106-# Generated by GNU Autoconf 2.67 for indicator-datetime 0.2.1.
107+# Generated by GNU Autoconf 2.67 for indicator-datetime 0.2.2.
108 #
109 # Report bugs to <ted@canonical.com>.
110 #
111@@ -703,8 +703,8 @@
112 # Identity of this package.
113 PACKAGE_NAME='indicator-datetime'
114 PACKAGE_TARNAME='indicator-datetime'
115-PACKAGE_VERSION='0.2.1'
116-PACKAGE_STRING='indicator-datetime 0.2.1'
117+PACKAGE_VERSION='0.2.2'
118+PACKAGE_STRING='indicator-datetime 0.2.2'
119 PACKAGE_BUGREPORT='ted@canonical.com'
120 PACKAGE_URL=''
121
122@@ -1502,7 +1502,7 @@
123 # Omit some internal or obsolete options to make the list less imposing.
124 # This message is too long to be a string in the A/UX 3.1 sh.
125 cat <<_ACEOF
126-\`configure' configures indicator-datetime 0.2.1 to adapt to many kinds of systems.
127+\`configure' configures indicator-datetime 0.2.2 to adapt to many kinds of systems.
128
129 Usage: $0 [OPTION]... [VAR=VALUE]...
130
131@@ -1573,7 +1573,7 @@
132
133 if test -n "$ac_init_help"; then
134 case $ac_init_help in
135- short | recursive ) echo "Configuration of indicator-datetime 0.2.1:";;
136+ short | recursive ) echo "Configuration of indicator-datetime 0.2.2:";;
137 esac
138 cat <<\_ACEOF
139
140@@ -1701,7 +1701,7 @@
141 test -n "$ac_init_help" && exit $ac_status
142 if $ac_init_version; then
143 cat <<\_ACEOF
144-indicator-datetime configure 0.2.1
145+indicator-datetime configure 0.2.2
146 generated by GNU Autoconf 2.67
147
148 Copyright (C) 2010 Free Software Foundation, Inc.
149@@ -2072,7 +2072,7 @@
150 This file contains any messages produced by compilers while
151 running configure, to aid debugging if configure makes a mistake.
152
153-It was created by indicator-datetime $as_me 0.2.1, which was
154+It was created by indicator-datetime $as_me 0.2.2, which was
155 generated by GNU Autoconf 2.67. Invocation command line was
156
157 $ $0 $@
158@@ -2893,7 +2893,7 @@
159
160 # Define the identity of the package.
161 PACKAGE=indicator-datetime
162- VERSION=0.2.1
163+ VERSION=0.2.2
164
165
166 cat >>confdefs.h <<_ACEOF
167@@ -12231,6 +12231,7 @@
168 GLIB_REQUIRED_VERSION=2.26
169 GTK_REQUIRED_VERSION=2.12
170 GTK3_REQUIRED_VERSION=3.0
171+GCONF_REQUIRED_VERSION=2.31
172
173 if test "x$with_gtk" = x3; then :
174
175@@ -12505,7 +12506,7 @@
176 elif test -n "$PKG_CONFIG"; then
177 if test -n "$PKG_CONFIG" && \
178 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"indicator >= \$INDICATOR_REQUIRED_VERSION
179- glib-2.0 >= \$GLIB_REQUIRED_VERSION
180+ glib-2.0 >= \$GLIB_REQUIRED_VERSION
181 dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION
182 dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION
183 libido-0.1 >= \$INDICATOR_DISPLAY_OBJECTS
184@@ -12516,9 +12517,10 @@
185 libedataserver-1.2 >= EDS_REQUIRED_VERSION
186 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
187 cairo >= CAIRO_REQUIRED_VERSION
188- gdk-2.0 >= GDK_REQUIRED_VERSION\""; } >&5
189+ gdk-2.0 >= GDK_REQUIRED_VERSION
190+ gconf-2.0 >= GCONF_REQUIRED_VERSION\""; } >&5
191 ($PKG_CONFIG --exists --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
192- glib-2.0 >= $GLIB_REQUIRED_VERSION
193+ glib-2.0 >= $GLIB_REQUIRED_VERSION
194 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
195 dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
196 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
197@@ -12529,12 +12531,13 @@
198 libedataserver-1.2 >= EDS_REQUIRED_VERSION
199 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
200 cairo >= CAIRO_REQUIRED_VERSION
201- gdk-2.0 >= GDK_REQUIRED_VERSION") 2>&5
202+ gdk-2.0 >= GDK_REQUIRED_VERSION
203+ gconf-2.0 >= GCONF_REQUIRED_VERSION") 2>&5
204 ac_status=$?
205 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
206 test $ac_status = 0; }; then
207 pkg_cv_SERVICE_CFLAGS=`$PKG_CONFIG --cflags "indicator >= $INDICATOR_REQUIRED_VERSION
208- glib-2.0 >= $GLIB_REQUIRED_VERSION
209+ glib-2.0 >= $GLIB_REQUIRED_VERSION
210 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
211 dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
212 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
213@@ -12545,7 +12548,8 @@
214 libedataserver-1.2 >= EDS_REQUIRED_VERSION
215 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
216 cairo >= CAIRO_REQUIRED_VERSION
217- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>/dev/null`
218+ gdk-2.0 >= GDK_REQUIRED_VERSION
219+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>/dev/null`
220 else
221 pkg_failed=yes
222 fi
223@@ -12557,7 +12561,7 @@
224 elif test -n "$PKG_CONFIG"; then
225 if test -n "$PKG_CONFIG" && \
226 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"indicator >= \$INDICATOR_REQUIRED_VERSION
227- glib-2.0 >= \$GLIB_REQUIRED_VERSION
228+ glib-2.0 >= \$GLIB_REQUIRED_VERSION
229 dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION
230 dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION
231 libido-0.1 >= \$INDICATOR_DISPLAY_OBJECTS
232@@ -12568,9 +12572,10 @@
233 libedataserver-1.2 >= EDS_REQUIRED_VERSION
234 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
235 cairo >= CAIRO_REQUIRED_VERSION
236- gdk-2.0 >= GDK_REQUIRED_VERSION\""; } >&5
237+ gdk-2.0 >= GDK_REQUIRED_VERSION
238+ gconf-2.0 >= GCONF_REQUIRED_VERSION\""; } >&5
239 ($PKG_CONFIG --exists --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
240- glib-2.0 >= $GLIB_REQUIRED_VERSION
241+ glib-2.0 >= $GLIB_REQUIRED_VERSION
242 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
243 dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
244 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
245@@ -12581,12 +12586,13 @@
246 libedataserver-1.2 >= EDS_REQUIRED_VERSION
247 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
248 cairo >= CAIRO_REQUIRED_VERSION
249- gdk-2.0 >= GDK_REQUIRED_VERSION") 2>&5
250+ gdk-2.0 >= GDK_REQUIRED_VERSION
251+ gconf-2.0 >= GCONF_REQUIRED_VERSION") 2>&5
252 ac_status=$?
253 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
254 test $ac_status = 0; }; then
255 pkg_cv_SERVICE_LIBS=`$PKG_CONFIG --libs "indicator >= $INDICATOR_REQUIRED_VERSION
256- glib-2.0 >= $GLIB_REQUIRED_VERSION
257+ glib-2.0 >= $GLIB_REQUIRED_VERSION
258 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
259 dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
260 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
261@@ -12597,7 +12603,8 @@
262 libedataserver-1.2 >= EDS_REQUIRED_VERSION
263 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
264 cairo >= CAIRO_REQUIRED_VERSION
265- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>/dev/null`
266+ gdk-2.0 >= GDK_REQUIRED_VERSION
267+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>/dev/null`
268 else
269 pkg_failed=yes
270 fi
271@@ -12618,7 +12625,7 @@
272 fi
273 if test $_pkg_short_errors_supported = yes; then
274 SERVICE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
275- glib-2.0 >= $GLIB_REQUIRED_VERSION
276+ glib-2.0 >= $GLIB_REQUIRED_VERSION
277 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
278 dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
279 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
280@@ -12629,10 +12636,11 @@
281 libedataserver-1.2 >= EDS_REQUIRED_VERSION
282 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
283 cairo >= CAIRO_REQUIRED_VERSION
284- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>&1`
285+ gdk-2.0 >= GDK_REQUIRED_VERSION
286+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>&1`
287 else
288 SERVICE_PKG_ERRORS=`$PKG_CONFIG --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
289- glib-2.0 >= $GLIB_REQUIRED_VERSION
290+ glib-2.0 >= $GLIB_REQUIRED_VERSION
291 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
292 dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
293 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
294@@ -12643,13 +12651,14 @@
295 libedataserver-1.2 >= EDS_REQUIRED_VERSION
296 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
297 cairo >= CAIRO_REQUIRED_VERSION
298- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>&1`
299+ gdk-2.0 >= GDK_REQUIRED_VERSION
300+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>&1`
301 fi
302 # Put the nasty error message in config.log where it belongs
303 echo "$SERVICE_PKG_ERRORS" >&5
304
305 as_fn_error $? "Package requirements (indicator >= $INDICATOR_REQUIRED_VERSION
306- glib-2.0 >= $GLIB_REQUIRED_VERSION
307+ glib-2.0 >= $GLIB_REQUIRED_VERSION
308 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
309 dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
310 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
311@@ -12660,7 +12669,8 @@
312 libedataserver-1.2 >= EDS_REQUIRED_VERSION
313 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
314 cairo >= CAIRO_REQUIRED_VERSION
315- gdk-2.0 >= GDK_REQUIRED_VERSION) were not met:
316+ gdk-2.0 >= GDK_REQUIRED_VERSION
317+ gconf-2.0 >= GCONF_REQUIRED_VERSION) were not met:
318
319 $SERVICE_PKG_ERRORS
320
321@@ -12704,7 +12714,7 @@
322 elif test -n "$PKG_CONFIG"; then
323 if test -n "$PKG_CONFIG" && \
324 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"indicator >= \$INDICATOR_REQUIRED_VERSION
325- glib-2.0 >= \$GLIB_REQUIRED_VERSION
326+ glib-2.0 >= \$GLIB_REQUIRED_VERSION
327 dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION
328 dbusmenu-gtk-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION
329 libido-0.1 >= \$INDICATOR_DISPLAY_OBJECTS
330@@ -12715,9 +12725,10 @@
331 libedataserver-1.2 >= EDS_REQUIRED_VERSION
332 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
333 cairo >= CAIRO_REQUIRED_VERSION
334- gdk-2.0 >= GDK_REQUIRED_VERSION\""; } >&5
335+ gdk-2.0 >= GDK_REQUIRED_VERSION
336+ gconf-2.0 >= GCONF_REQUIRED_VERSION\""; } >&5
337 ($PKG_CONFIG --exists --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
338- glib-2.0 >= $GLIB_REQUIRED_VERSION
339+ glib-2.0 >= $GLIB_REQUIRED_VERSION
340 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
341 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
342 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
343@@ -12728,12 +12739,13 @@
344 libedataserver-1.2 >= EDS_REQUIRED_VERSION
345 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
346 cairo >= CAIRO_REQUIRED_VERSION
347- gdk-2.0 >= GDK_REQUIRED_VERSION") 2>&5
348+ gdk-2.0 >= GDK_REQUIRED_VERSION
349+ gconf-2.0 >= GCONF_REQUIRED_VERSION") 2>&5
350 ac_status=$?
351 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
352 test $ac_status = 0; }; then
353 pkg_cv_SERVICE_CFLAGS=`$PKG_CONFIG --cflags "indicator >= $INDICATOR_REQUIRED_VERSION
354- glib-2.0 >= $GLIB_REQUIRED_VERSION
355+ glib-2.0 >= $GLIB_REQUIRED_VERSION
356 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
357 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
358 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
359@@ -12744,7 +12756,8 @@
360 libedataserver-1.2 >= EDS_REQUIRED_VERSION
361 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
362 cairo >= CAIRO_REQUIRED_VERSION
363- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>/dev/null`
364+ gdk-2.0 >= GDK_REQUIRED_VERSION
365+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>/dev/null`
366 else
367 pkg_failed=yes
368 fi
369@@ -12756,7 +12769,7 @@
370 elif test -n "$PKG_CONFIG"; then
371 if test -n "$PKG_CONFIG" && \
372 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"indicator >= \$INDICATOR_REQUIRED_VERSION
373- glib-2.0 >= \$GLIB_REQUIRED_VERSION
374+ glib-2.0 >= \$GLIB_REQUIRED_VERSION
375 dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION
376 dbusmenu-gtk-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION
377 libido-0.1 >= \$INDICATOR_DISPLAY_OBJECTS
378@@ -12767,9 +12780,10 @@
379 libedataserver-1.2 >= EDS_REQUIRED_VERSION
380 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
381 cairo >= CAIRO_REQUIRED_VERSION
382- gdk-2.0 >= GDK_REQUIRED_VERSION\""; } >&5
383+ gdk-2.0 >= GDK_REQUIRED_VERSION
384+ gconf-2.0 >= GCONF_REQUIRED_VERSION\""; } >&5
385 ($PKG_CONFIG --exists --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
386- glib-2.0 >= $GLIB_REQUIRED_VERSION
387+ glib-2.0 >= $GLIB_REQUIRED_VERSION
388 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
389 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
390 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
391@@ -12780,12 +12794,13 @@
392 libedataserver-1.2 >= EDS_REQUIRED_VERSION
393 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
394 cairo >= CAIRO_REQUIRED_VERSION
395- gdk-2.0 >= GDK_REQUIRED_VERSION") 2>&5
396+ gdk-2.0 >= GDK_REQUIRED_VERSION
397+ gconf-2.0 >= GCONF_REQUIRED_VERSION") 2>&5
398 ac_status=$?
399 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
400 test $ac_status = 0; }; then
401 pkg_cv_SERVICE_LIBS=`$PKG_CONFIG --libs "indicator >= $INDICATOR_REQUIRED_VERSION
402- glib-2.0 >= $GLIB_REQUIRED_VERSION
403+ glib-2.0 >= $GLIB_REQUIRED_VERSION
404 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
405 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
406 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
407@@ -12796,7 +12811,8 @@
408 libedataserver-1.2 >= EDS_REQUIRED_VERSION
409 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
410 cairo >= CAIRO_REQUIRED_VERSION
411- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>/dev/null`
412+ gdk-2.0 >= GDK_REQUIRED_VERSION
413+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>/dev/null`
414 else
415 pkg_failed=yes
416 fi
417@@ -12817,7 +12833,7 @@
418 fi
419 if test $_pkg_short_errors_supported = yes; then
420 SERVICE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
421- glib-2.0 >= $GLIB_REQUIRED_VERSION
422+ glib-2.0 >= $GLIB_REQUIRED_VERSION
423 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
424 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
425 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
426@@ -12828,10 +12844,11 @@
427 libedataserver-1.2 >= EDS_REQUIRED_VERSION
428 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
429 cairo >= CAIRO_REQUIRED_VERSION
430- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>&1`
431+ gdk-2.0 >= GDK_REQUIRED_VERSION
432+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>&1`
433 else
434 SERVICE_PKG_ERRORS=`$PKG_CONFIG --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
435- glib-2.0 >= $GLIB_REQUIRED_VERSION
436+ glib-2.0 >= $GLIB_REQUIRED_VERSION
437 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
438 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
439 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
440@@ -12842,13 +12859,14 @@
441 libedataserver-1.2 >= EDS_REQUIRED_VERSION
442 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
443 cairo >= CAIRO_REQUIRED_VERSION
444- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>&1`
445+ gdk-2.0 >= GDK_REQUIRED_VERSION
446+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>&1`
447 fi
448 # Put the nasty error message in config.log where it belongs
449 echo "$SERVICE_PKG_ERRORS" >&5
450
451 as_fn_error $? "Package requirements (indicator >= $INDICATOR_REQUIRED_VERSION
452- glib-2.0 >= $GLIB_REQUIRED_VERSION
453+ glib-2.0 >= $GLIB_REQUIRED_VERSION
454 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
455 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
456 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
457@@ -12859,7 +12877,8 @@
458 libedataserver-1.2 >= EDS_REQUIRED_VERSION
459 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
460 cairo >= CAIRO_REQUIRED_VERSION
461- gdk-2.0 >= GDK_REQUIRED_VERSION) were not met:
462+ gdk-2.0 >= GDK_REQUIRED_VERSION
463+ gconf-2.0 >= GCONF_REQUIRED_VERSION) were not met:
464
465 $SERVICE_PKG_ERRORS
466
467@@ -14945,7 +14964,7 @@
468 # report actual input values of CONFIG_FILES etc. instead of their
469 # values after options handling.
470 ac_log="
471-This file was extended by indicator-datetime $as_me 0.2.1, which was
472+This file was extended by indicator-datetime $as_me 0.2.2, which was
473 generated by GNU Autoconf 2.67. Invocation command line was
474
475 CONFIG_FILES = $CONFIG_FILES
476@@ -15011,7 +15030,7 @@
477 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
478 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
479 ac_cs_version="\\
480-indicator-datetime config.status 0.2.1
481+indicator-datetime config.status 0.2.2
482 configured by $0, generated by GNU Autoconf 2.67,
483 with options \\"\$ac_cs_config\\"
484
485
486=== modified file 'configure.ac'
487--- configure.ac 2011-03-31 19:30:50 +0000
488+++ configure.ac 2011-04-07 18:29:58 +0000
489@@ -1,11 +1,11 @@
490
491-AC_INIT(indicator-datetime, 0.2.1, ted@canonical.com)
492+AC_INIT(indicator-datetime, 0.2.2, ted@canonical.com)
493 AC_COPYRIGHT([Copyright 2009,2010 Canonical])
494
495 AC_PREREQ(2.53)
496
497 AM_CONFIG_HEADER(config.h)
498-AM_INIT_AUTOMAKE(indicator-datetime, 0.2.1)
499+AM_INIT_AUTOMAKE(indicator-datetime, 0.2.2)
500
501 AM_MAINTAINER_MODE
502
503@@ -66,6 +66,7 @@
504 GLIB_REQUIRED_VERSION=2.26
505 GTK_REQUIRED_VERSION=2.12
506 GTK3_REQUIRED_VERSION=3.0
507+GCONF_REQUIRED_VERSION=2.31
508
509 AS_IF([test "x$with_gtk" = x3],
510 [PKG_CHECK_MODULES(INDICATOR, indicator3 >= $INDICATOR_REQUIRED_VERSION
511@@ -86,7 +87,7 @@
512
513 AS_IF([test "x$with_gtk" = x3],
514 [PKG_CHECK_MODULES(SERVICE, indicator >= $INDICATOR_REQUIRED_VERSION
515- glib-2.0 >= $GLIB_REQUIRED_VERSION
516+ glib-2.0 >= $GLIB_REQUIRED_VERSION
517 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
518 dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
519 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
520@@ -97,11 +98,12 @@
521 libedataserver-1.2 >= EDS_REQUIRED_VERSION
522 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
523 cairo >= CAIRO_REQUIRED_VERSION
524- gdk-2.0 >= GDK_REQUIRED_VERSION)
525+ gdk-2.0 >= GDK_REQUIRED_VERSION
526+ gconf-2.0 >= GCONF_REQUIRED_VERSION)
527 ],
528 [test "x$with_gtk" = x2],
529 [PKG_CHECK_MODULES(SERVICE, indicator >= $INDICATOR_REQUIRED_VERSION
530- glib-2.0 >= $GLIB_REQUIRED_VERSION
531+ glib-2.0 >= $GLIB_REQUIRED_VERSION
532 dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
533 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
534 libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
535@@ -112,7 +114,8 @@
536 libedataserver-1.2 >= EDS_REQUIRED_VERSION
537 libedataserverui-1.2 >= EDS_REQUIRED_VERSION
538 cairo >= CAIRO_REQUIRED_VERSION
539- gdk-2.0 >= GDK_REQUIRED_VERSION)
540+ gdk-2.0 >= GDK_REQUIRED_VERSION
541+ gconf-2.0 >= GCONF_REQUIRED_VERSION)
542 ],
543 [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])]
544 )
545
546=== modified file 'debian/changelog'
547--- debian/changelog 2011-03-31 20:35:09 +0000
548+++ debian/changelog 2011-04-07 18:29:58 +0000
549@@ -1,3 +1,16 @@
550+indicator-datetime (0.2.2-0ubuntu1~ppa1) natty; urgency=low
551+
552+ * New upstream release.
553+ ∘ Add language and proper distro version to geonames URL to allow
554+ for proper server side fixes
555+ ∘ Give full day events the day name instead of a time
556+ ∘ Make sure the calendar follows the user setting (LP: #748772)
557+ ∘ Ensure that events handle month boundaries correctly (LP: #746713)
558+ ∘ Only show calendars the user has configured (LP: #729033)
559+ ∘ Reenable clicking on the timezone in the menu to set it.
560+
561+ -- Ted Gould <ted@ubuntu.com> Thu, 07 Apr 2011 13:23:25 -0500
562+
563 indicator-datetime (0.2.1-0ubuntu1) natty; urgency=low
564
565 * New upstream release.
566
567=== modified file 'src/datetime-prefs.c'
568--- src/datetime-prefs.c 2011-03-30 13:12:39 +0000
569+++ src/datetime-prefs.c 2011-04-07 18:29:58 +0000
570@@ -181,46 +181,10 @@
571 g_variant_unref (answers);
572 }
573
574-static gchar *
575-get_zone_name (const gchar * location)
576-{
577- gchar * new_zone, * new_name;
578- gchar * old_zone, * old_name;
579- gchar * rv;
580-
581- split_settings_location (location, &new_zone, &new_name);
582-
583- GSettings * conf = g_settings_new (SETTINGS_INTERFACE);
584- gchar * tz_name = g_settings_get_string (conf, SETTINGS_TIMEZONE_NAME_S);
585- split_settings_location (tz_name, &old_zone, &old_name);
586- g_free (tz_name);
587- g_object_unref (conf);
588-
589- // new_name is always just a sanitized version of a timezone.
590- // old_name is potentially a saved "pretty" version of a timezone name from
591- // geonames. So we prefer to use it if available and the zones match.
592-
593- if (g_strcmp0 (old_zone, new_zone) == 0) {
594- rv = old_name;
595- old_name = NULL;
596- }
597- else {
598- rv = new_name;
599- new_name = NULL;
600- }
601-
602- g_free (new_zone);
603- g_free (old_zone);
604- g_free (new_name);
605- g_free (old_name);
606-
607- return rv;
608-}
609-
610 static void
611 sync_entry (const gchar * location)
612 {
613- gchar * name = get_zone_name (location);
614+ gchar * name = get_current_zone_name (location);
615 gtk_entry_set_text (GTK_ENTRY (tz_entry), name);
616 g_free (name);
617
618@@ -606,7 +570,7 @@
619 if (location == NULL)
620 return FALSE;
621
622- gchar * name = get_zone_name (location->zone);
623+ gchar * name = get_current_zone_name (location->zone);
624 gboolean correct = (g_strcmp0 (gtk_entry_get_text (entry), name) == 0);
625 g_free (name);
626
627
628=== modified file 'src/datetime-service.c'
629--- src/datetime-service.c 2011-03-31 19:30:50 +0000
630+++ src/datetime-service.c 2011-04-07 18:29:58 +0000
631@@ -28,6 +28,7 @@
632 #include <glib/gi18n.h>
633 #include <gio/gio.h>
634 #include <math.h>
635+#include <gconf/gconf-client.h>
636
637 #include <libdbusmenu-gtk/menuitem.h>
638 #include <libdbusmenu-glib/server.h>
639@@ -82,6 +83,7 @@
640 static gboolean updating_appointments = FALSE;
641 static time_t start_time_appointments = (time_t) 0;
642 GSettings *conf;
643+GConfClient* gconf;
644
645
646 /* Geoclue trackers */
647@@ -112,6 +114,17 @@
648 g_free (name);
649 }
650
651+static void
652+set_current_timezone_label (DbusmenuMenuitem * mi, const gchar * location)
653+{
654+ gchar * name = get_current_zone_name (location);
655+
656+ dbusmenu_menuitem_property_set (mi, TIMEZONE_MENUITEM_PROP_NAME, name);
657+ dbusmenu_menuitem_property_set (mi, TIMEZONE_MENUITEM_PROP_ZONE, location);
658+
659+ g_free (name);
660+}
661+
662 /* Check to see if our timezones are the same */
663 static void
664 check_timezone_sync (void) {
665@@ -166,7 +179,7 @@
666
667 if (label != NULL) {
668 // TODO work out the current location name in a nice way
669- set_timezone_label (current_location, label);
670+ set_current_timezone_label (current_location, label);
671 // TODO work out the current time at that location
672 dbusmenu_menuitem_property_set_bool (current_location, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
673 dbusmenu_menuitem_property_set_bool(current_location, TIMEZONE_MENUITEM_PROP_RADIO, TRUE);
674@@ -175,18 +188,18 @@
675 }
676 if (geo_timezone != NULL) {
677 // TODO work out the geo location name in a nice way
678- set_timezone_label (geo_location, geo_timezone);
679+ set_current_timezone_label (geo_location, geo_timezone);
680 // TODO work out the current time at that location
681 dbusmenu_menuitem_property_set_bool (geo_location, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
682 }
683 } else {
684 // TODO work out the geo location name in a nice way
685- set_timezone_label (geo_location, geo_timezone);
686+ set_current_timezone_label (geo_location, geo_timezone);
687 // TODO work out the current time at that location
688 dbusmenu_menuitem_property_set_bool(geo_location, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
689
690 // TODO work out the current location name in a nice way
691- set_timezone_label (current_location, current_timezone);
692+ set_current_timezone_label (current_location, current_timezone);
693 // TODO work out the current time at that location
694 dbusmenu_menuitem_property_set_bool(current_location, TIMEZONE_MENUITEM_PROP_RADIO, TRUE);
695 dbusmenu_menuitem_property_set_bool(current_location, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
696@@ -234,6 +247,69 @@
697 return;
698 }
699
700+static void
701+quick_set_tz_cb (GObject *object, GAsyncResult *res, gpointer data)
702+{
703+ GError * error = NULL;
704+ GVariant * answers = g_dbus_proxy_call_finish (G_DBUS_PROXY (object), res, &error);
705+
706+ if (error != NULL) {
707+ g_warning("Could not set timezone for SettingsDaemon: %s", error->message);
708+ g_error_free(error);
709+ return;
710+ }
711+
712+ g_variant_unref (answers);
713+}
714+
715+static void
716+quick_set_tz_proxy_cb (GObject *object, GAsyncResult *res, gpointer zone)
717+{
718+ GError * error = NULL;
719+
720+ GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish (res, &error);
721+
722+ if (error != NULL) {
723+ g_warning("Could not grab DBus proxy for SettingsDaemon: %s", error->message);
724+ g_error_free(error);
725+ g_free (zone);
726+ return;
727+ }
728+
729+ gchar * file = g_build_filename ("/usr/share/zoneinfo", (char *)zone, NULL);
730+ g_dbus_proxy_call (proxy, "SetTimezone", g_variant_new ("(s)", file),
731+ G_DBUS_CALL_FLAGS_NONE, -1, NULL, quick_set_tz_cb, NULL);
732+ g_free (file);
733+ g_free (zone);
734+ g_object_unref (proxy);
735+}
736+
737+static void
738+quick_set_tz (DbusmenuMenuitem * menuitem, guint timestamp, gpointer user_data)
739+{
740+ const gchar * tz = dbusmenu_menuitem_property_get(menuitem, TIMEZONE_MENUITEM_PROP_ZONE);
741+ g_debug("Quick setting timezone to: %s", tz);
742+
743+ g_return_if_fail(tz != NULL);
744+
745+ const gchar * name = dbusmenu_menuitem_property_get(menuitem, TIMEZONE_MENUITEM_PROP_NAME);
746+
747+ /* Set it in gsettings so we don't lose user's preferred name */
748+ GSettings * conf = g_settings_new (SETTINGS_INTERFACE);
749+ gchar * tz_full = g_strdup_printf ("%s %s", tz, name);
750+ g_settings_set_string (conf, SETTINGS_TIMEZONE_NAME_S, tz_full);
751+ g_free (tz_full);
752+ g_object_unref (conf);
753+
754+ g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL,
755+ "org.gnome.SettingsDaemon.DateTimeMechanism",
756+ "/",
757+ "org.gnome.SettingsDaemon.DateTimeMechanism",
758+ NULL, quick_set_tz_proxy_cb, g_strdup (tz));
759+
760+ return;
761+}
762+
763 /* Updates the label in the date menuitem */
764 static gboolean
765 update_datetime (gpointer user_data)
766@@ -439,18 +515,16 @@
767 check_for_calendar (gpointer user_data)
768 {
769 g_return_val_if_fail (calendar != NULL, FALSE);
770- // Always enable the calendar even if it does nothing
771- dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
772- dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
773+
774+ dbusmenu_menuitem_property_set_bool(date, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
775
776 gchar *evo = g_find_program_in_path("evolution");
777 if (evo != NULL) {
778 g_debug("Found the calendar application: %s", evo);
779-
780- dbusmenu_menuitem_property_set_bool(date, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
781+
782 g_signal_connect (G_OBJECT(date), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
783- G_CALLBACK (activate_cb), "evolution -c calendar");
784-
785+ G_CALLBACK (activate_cb), "evolution -c calendar");
786+
787 events_separator = dbusmenu_menuitem_new();
788 dbusmenu_menuitem_property_set(events_separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
789 dbusmenu_menuitem_child_add_position(root, events_separator, 2);
790@@ -478,8 +552,16 @@
791 g_free(evo);
792 } else {
793 g_debug("Unable to find calendar app.");
794+ dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
795+ dbusmenu_menuitem_property_set_bool(events_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
796+ }
797+
798+ if (g_settings_get_boolean(conf, SETTINGS_SHOW_CALENDAR_S)) {
799+ dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
800+ dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
801+ } else {
802+ dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
803 dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
804- dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
805 }
806
807 return FALSE;
808@@ -535,6 +617,7 @@
809 dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
810 dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
811 dbusmenu_menuitem_child_add_position (root, item, offset++);
812+ g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(quick_set_tz), NULL);
813 dconflocations = g_list_append(dconflocations, item);
814 }
815 }
816@@ -656,6 +739,8 @@
817 const int mon = today->tm_mon;
818 const int year = today->tm_year;
819
820+ int start_month_saved = mon;
821+
822 struct tm *start_tm = NULL;
823 int this_year = today->tm_year + 1900;
824 int days[12]={31,28,31,30,31,30,31,31,30,31,30,31};
825@@ -667,6 +752,7 @@
826 if (start_time_appointments > 0) {
827 start_tm = localtime(&start_time_appointments);
828 int start_month = start_tm->tm_mon;
829+ start_month_saved = start_month;
830 int start_year = start_tm->tm_year + 1900;
831 if ((start_month != mon) || (start_year != this_year)) {
832 // Set t1 to the start of that month.
833@@ -681,6 +767,7 @@
834
835 g_debug("Will highlight %d days from %s", highlightdays, ctime(&t1));
836
837+ highlightdays = highlightdays + 7; // Minimum of 7 days ahead
838 t2 = t1 + (time_t) (highlightdays * 24 * 60 * 60);
839
840 if (!e_cal_get_sources(&sources, E_CAL_SOURCE_TYPE_EVENT, &gerror)) {
841@@ -698,7 +785,13 @@
842 comp_instances = NULL;
843 }
844 }
845-
846+ GSList *cal_list = gconf_client_get_list(gconf, "/apps/evolution/calendar/display/selected_calendars", GCONF_VALUE_STRING, &gerror);
847+ if (gerror) {
848+ g_debug("Failed to get evolution preference for enabled calendars");
849+ g_error_free(gerror);
850+ gerror = NULL;
851+ cal_list = NULL;
852+ }
853 // Generate instances for all sources
854 for (g = e_source_list_peek_groups (sources); g; g = g->next) {
855 ESourceGroup *group = E_SOURCE_GROUP (g->data);
856@@ -716,6 +809,18 @@
857 gerror = NULL;
858 continue;
859 }
860+ const gchar *ecal_uid = e_source_peek_uid(source);
861+ gboolean match = FALSE;
862+ g_debug("Checking ecal_uid is enabled: %s", ecal_uid);
863+ for (i = 0; i<g_slist_length(cal_list);i++) {
864+ char *cuid = (char *)g_slist_nth_data(cal_list, i);
865+ if (g_strcmp0(cuid, ecal_uid) == 0) {
866+ match = TRUE;
867+ break;
868+ }
869+ }
870+ if (!match) continue;
871+ g_debug("ecal_uid is enabled, generating instances");
872
873 e_cal_generate_instances (ecal, t1, t2, (ECalRecurInstanceFn) populate_appointment_instances, (gpointer) source);
874 }
875@@ -772,19 +877,22 @@
876 DbusmenuMenuitem * item;
877
878 ECalComponentVType vtype = e_cal_component_get_vtype (ecalcomp);
879+ struct tm due_data = {0};
880 struct tm *due = NULL;
881- if (vtype == E_CAL_COMPONENT_EVENT) due = localtime(&ci->start);
882- else if (vtype == E_CAL_COMPONENT_TODO) due = localtime(&ci->end);
883+ if (vtype == E_CAL_COMPONENT_EVENT) due = localtime_r(&ci->start, &due_data);
884+ else if (vtype == E_CAL_COMPONENT_TODO) due = localtime_r(&ci->end, &due_data);
885 else continue;
886
887 const int dmday = due->tm_mday;
888 const int dmon = due->tm_mon;
889 const int dyear = due->tm_year;
890
891- // Mark day
892- g_debug("Adding marked date %s, %d", ctime(&ci->start), dmday);
893- g_variant_builder_add (&markeddays, "i", dmday);
894-
895+ if (start_month_saved == dmon) {
896+ // Mark day if our query hasn't hit the next month.
897+ g_debug("Adding marked date %s, %d", ctime(&ci->start), dmday);
898+ g_variant_builder_add (&markeddays, "i", dmday);
899+ }
900+
901 // If the appointment time is less than the selected date,
902 // don't create an appointment item for it.
903 if (vtype == E_CAL_COMPONENT_EVENT) {
904@@ -827,17 +935,36 @@
905 g_debug("Summary: %s", summary);
906 g_free (summary);
907
908+ gboolean full_day = FALSE;
909+ if (vtype == E_CAL_COMPONENT_EVENT) {
910+ time_t start = ci->start;
911+ if (time_add_day(start, 1) == ci->end) {
912+ full_day = TRUE;
913+ }
914+ }
915+
916 // Due text
917- if (apt_output == SETTINGS_TIME_12_HOUR) {
918- if ((mday == dmday) && (mon == dmon) && (year == dyear))
919- strftime(right, 20, _(DEFAULT_TIME_12_FORMAT), due);
920- else
921- strftime(right, 20, _(DEFAULT_TIME_12_FORMAT_WITH_DAY), due);
922- } else if (apt_output == SETTINGS_TIME_24_HOUR) {
923- if ((mday == dmday) && (mon == dmon) && (year == dyear))
924- strftime(right, 20, _(DEFAULT_TIME_24_FORMAT), due);
925- else
926- strftime(right, 20, _(DEFAULT_TIME_24_FORMAT_WITH_DAY), due);
927+ if (full_day) {
928+ struct tm fulldaytime = {0};
929+ gmtime_r(&ci->start, &fulldaytime);
930+
931+ /* TRANSLATORS: This is a strftime string for the day for full day events
932+ in the menu. It should most likely be either '%A' for a full text day
933+ (Wednesday) or '%a' for a shortened one (Wed). You should only need to
934+ change for '%a' in the case of langauges with very long day names. */
935+ strftime(right, 20, _("%A"), &fulldaytime);
936+ } else {
937+ if (apt_output == SETTINGS_TIME_12_HOUR) {
938+ if ((mday == dmday) && (mon == dmon) && (year == dyear))
939+ strftime(right, 20, _(DEFAULT_TIME_12_FORMAT), due);
940+ else
941+ strftime(right, 20, _(DEFAULT_TIME_12_FORMAT_WITH_DAY), due);
942+ } else if (apt_output == SETTINGS_TIME_24_HOUR) {
943+ if ((mday == dmday) && (mon == dmon) && (year == dyear))
944+ strftime(right, 20, _(DEFAULT_TIME_24_FORMAT), due);
945+ else
946+ strftime(right, 20, _(DEFAULT_TIME_24_FORMAT_WITH_DAY), due);
947+ }
948 }
949 g_debug("Appointment time: %s, for date %s", right, asctime(due));
950 dbusmenu_menuitem_property_set (item, APPOINTMENT_MENUITEM_PROP_RIGHT, right);
951@@ -996,14 +1123,15 @@
952
953 geo_location = dbusmenu_menuitem_new();
954 dbusmenu_menuitem_property_set (geo_location, DBUSMENU_MENUITEM_PROP_TYPE, TIMEZONE_MENUITEM_TYPE);
955- set_timezone_label (geo_location, "");
956+ set_current_timezone_label (geo_location, "");
957 dbusmenu_menuitem_property_set_bool (geo_location, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
958 dbusmenu_menuitem_property_set_bool (geo_location, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
959+ g_signal_connect(G_OBJECT(geo_location), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(quick_set_tz), NULL);
960 dbusmenu_menuitem_child_append(root, geo_location);
961
962 current_location = dbusmenu_menuitem_new();
963 dbusmenu_menuitem_property_set (current_location, DBUSMENU_MENUITEM_PROP_TYPE, TIMEZONE_MENUITEM_TYPE);
964- set_timezone_label (current_location, "");
965+ set_current_timezone_label (current_location, "");
966 dbusmenu_menuitem_property_set_bool (current_location, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
967 dbusmenu_menuitem_property_set_bool (current_location, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
968 dbusmenu_menuitem_child_append(root, current_location);
969@@ -1300,6 +1428,8 @@
970
971 /* Set up GSettings */
972 conf = g_settings_new(SETTINGS_INTERFACE);
973+ /* Set up gconf for getting evolution enabled calendars */
974+ gconf = gconf_client_get_default();
975 // TODO Add a signal handler to catch gsettings changes and respond to them
976
977 /* Building the base menu */
978
979=== modified file 'src/timezone-completion.c'
980--- src/timezone-completion.c 2011-03-29 19:30:25 +0000
981+++ src/timezone-completion.c 2011-04-07 18:29:58 +0000
982@@ -50,7 +50,7 @@
983
984 #define TIMEZONE_COMPLETION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), TIMEZONE_COMPLETION_TYPE, TimezoneCompletionPrivate))
985
986-#define GEONAME_URL "http://geoname-lookup.ubuntu.com/?query=%s&release=%s"
987+#define GEONAME_URL "http://geoname-lookup.ubuntu.com/?query=%s&release=%s&lang=%s"
988
989 /* Prototypes */
990 static void timezone_completion_class_init (TimezoneCompletionClass *klass);
991@@ -280,6 +280,58 @@
992 json_parse_ready, user_data);
993 }
994
995+/* Returns message locale, with possible country info too like en_US */
996+static gchar *
997+get_locale (void)
998+{
999+ /* Check LANGUAGE, LC_ALL, LC_MESSAGES, and LANG, treat as colon-separated */
1000+ const gchar *env_names[] = {"LANGUAGE", "LC_ALL", "LC_MESSAGES", "LANG", NULL};
1001+ const gchar *env = NULL;
1002+ gint i;
1003+
1004+ for (i = 0; env_names[i]; i++) {
1005+ env = g_getenv (env_names[i]);
1006+ if (env != NULL && env[0] != 0)
1007+ break;
1008+ }
1009+
1010+ if (env == NULL)
1011+ return NULL;
1012+
1013+ /* Now, we split on colons as expected, but also on . and @ to filter out
1014+ extra pieces of locale we don't care about as we only use first chunk. */
1015+ gchar **split = g_strsplit_set (env, ":.@", 2);
1016+ if (split == NULL)
1017+ return NULL;
1018+
1019+ if (split[0] == NULL) {
1020+ g_strfreev (split);
1021+ return NULL;
1022+ }
1023+
1024+ gchar *locale = g_strdup (split[0]);
1025+ g_strfreev (split);
1026+ return locale;
1027+}
1028+
1029+static gchar *
1030+get_version (void)
1031+{
1032+ static gchar *version = NULL;
1033+
1034+ if (version == NULL) {
1035+ gchar *stdout = NULL;
1036+ g_spawn_command_line_sync ("lsb_release -rs", &stdout, NULL, NULL, NULL);
1037+
1038+ if (stdout != NULL)
1039+ version = g_strstrip (stdout);
1040+ else
1041+ version = g_strdup("");
1042+ }
1043+
1044+ return version;
1045+}
1046+
1047 static gboolean
1048 request_zones (TimezoneCompletion * completion)
1049 {
1050@@ -302,9 +354,16 @@
1051 priv->request_text = g_strdup (text);
1052
1053 gchar * escaped = g_uri_escape_string (text, NULL, FALSE);
1054- gchar * url = g_strdup_printf (GEONAME_URL, escaped, "11.04"); // FIXME: don't hardcode
1055+ gchar * version = get_version ();
1056+ gchar * locale = get_locale ();
1057+ gchar * url = g_strdup_printf (GEONAME_URL, escaped, version, locale);
1058+ g_free (locale);
1059+ g_free (version);
1060+ g_free (escaped);
1061
1062 GFile * file = g_file_new_for_uri (url);
1063+ g_free (url);
1064+
1065 g_file_read_async (file, G_PRIORITY_DEFAULT, priv->cancel,
1066 geonames_data_ready, completion);
1067
1068
1069=== modified file 'src/utils.c'
1070--- src/utils.c 2011-03-24 20:22:52 +0000
1071+++ src/utils.c 2011-04-07 18:29:58 +0000
1072@@ -81,6 +81,42 @@
1073 }
1074 }
1075
1076+gchar *
1077+get_current_zone_name (const gchar * location)
1078+{
1079+ gchar * new_zone, * new_name;
1080+ gchar * old_zone, * old_name;
1081+ gchar * rv;
1082+
1083+ split_settings_location (location, &new_zone, &new_name);
1084+
1085+ GSettings * conf = g_settings_new (SETTINGS_INTERFACE);
1086+ gchar * tz_name = g_settings_get_string (conf, SETTINGS_TIMEZONE_NAME_S);
1087+ split_settings_location (tz_name, &old_zone, &old_name);
1088+ g_free (tz_name);
1089+ g_object_unref (conf);
1090+
1091+ // new_name is always just a sanitized version of a timezone.
1092+ // old_name is potentially a saved "pretty" version of a timezone name from
1093+ // geonames. So we prefer to use it if available and the zones match.
1094+
1095+ if (g_strcmp0 (old_zone, new_zone) == 0) {
1096+ rv = old_name;
1097+ old_name = NULL;
1098+ }
1099+ else {
1100+ rv = new_name;
1101+ new_name = NULL;
1102+ }
1103+
1104+ g_free (new_zone);
1105+ g_free (old_zone);
1106+ g_free (new_name);
1107+ g_free (old_name);
1108+
1109+ return rv;
1110+}
1111+
1112 /* Translate msg according to the locale specified by LC_TIME */
1113 static char *
1114 T_(const char *msg)
1115
1116=== modified file 'src/utils.h'
1117--- src/utils.h 2011-02-25 14:18:57 +0000
1118+++ src/utils.h 2011-04-07 18:29:58 +0000
1119@@ -29,6 +29,7 @@
1120
1121 gboolean is_locale_12h (void);
1122 void split_settings_location (const gchar * location, gchar ** zone, gchar ** name);
1123+gchar * get_current_zone_name (const gchar * location);
1124 gchar * generate_format_string_full (gboolean show_day, gboolean show_date);
1125 gchar * generate_format_string_at_time (GDateTime * time);
1126

Subscribers

People subscribed via source and target branches