aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-04-07 13:22:08 -0500
committerTed Gould <ted@gould.cx>2011-04-07 13:22:08 -0500
commit8028b594369055a3d6ca6577009993d4cf2e58c1 (patch)
tree405542900c5ba445ad68550a145a4823e68c206a
parent27c56bd90ab38a79d5eca970b7ba4dca2652c01a (diff)
parentab9c66b70627b1ed5843fabd7259d631acb8d116 (diff)
downloadayatana-indicator-datetime-8028b594369055a3d6ca6577009993d4cf2e58c1.tar.gz
ayatana-indicator-datetime-8028b594369055a3d6ca6577009993d4cf2e58c1.tar.bz2
ayatana-indicator-datetime-8028b594369055a3d6ca6577009993d4cf2e58c1.zip
New upstream release.
∘ Add language and proper distro version to geonames URL to allow for proper server side fixes ∘ Give full day events the day name instead of a time ∘ Make sure the calendar follows the user setting (LP: #748772) ∘ Ensure that events handle month boundaries correctly (LP: #746713) ∘ Only show calendars the user has configured (LP: #729033) ∘ Reenable clicking on the timezone in the menu to set it.
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog77
-rwxr-xr-xconfigure111
-rw-r--r--configure.ac4
-rw-r--r--debian/changelog25
-rw-r--r--src/datetime-prefs.c40
-rw-r--r--src/datetime-service.c88
-rw-r--r--src/timezone-completion.c63
-rw-r--r--src/utils.c36
-rw-r--r--src/utils.h1
10 files changed, 338 insertions, 108 deletions
diff --git a/AUTHORS b/AUTHORS
index f85aeeb..3d04605 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,6 +2,7 @@
David Barth
David Planella
+ Dylan McCall
Gabor Kelemen
karl-qdh
Ken VanDine
diff --git a/ChangeLog b/ChangeLog
index d0304e9..032488c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,82 @@
# Generated by Makefile. Do not edit.
+2011-04-07 Ted Gould <ted@gould.cx>
+
+ 0.2.2
+
+2011-04-07 Ted Gould <ted@gould.cx>
+
+ Set timezone from the menuitems in the indicator
+
+2011-04-07 Michael Terry <mike@mterry.name>
+
+ when user clicks a timezone location, switch to that timezone (and support showing user's preferred name for the current timezone in the menu)
+
+2011-04-06 Ted Gould <ted@gould.cx>
+
+ Adds language, country and version information to the URL
+
+2011-04-06 Michael Terry <mike@mterry.name>
+
+ whoops, remove debug comment
+
+2011-04-06 Michael Terry <mike@mterry.name>
+
+ pass locale to server; dynamically determine version
+
+2011-04-06 Ted Gould <ted@gould.cx>
+
+ Adding support for making full day items just have the day name
+
+2011-04-05 Ted Gould <ted@gould.cx>
+
+ Use gmtime for full day events.
+
+2011-04-05 Ted Gould <ted@gould.cx>
+
+ Use stack memory instead of the global to avoid it getting modified
+
+2011-04-05 Ted Gould <ted@gould.cx>
+
+ Pull the full day into a boolean and reformat
+
+2011-04-05 Ted Gould <ted@gould.cx>
+
+ Translator comment
+
+2011-04-05 Ted Gould <ted@gould.cx>
+
+ Detect a full day event and print it differently
+
+2011-04-04 Ted Gould <ted@gould.cx>
+
+ Using GConf to find out which calendars are shown or not.
+
+2011-04-04 karl-qdh <karl@qdh.org.uk>
+
+ Working patch! YAY
+
+2011-04-04 karl-qdh <karl@qdh.org.uk>
+
+ 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
+
+2011-04-04 Ted Gould <ted@gould.cx>
+
+ Ensure the calendar is correctly shown
+
+2011-04-03 Dylan McCall <dylanmccall@ubuntu.com>
+
+ Follow show-calendar setting regardless of whether Evolution is present (LP: #748772)
+ Visibility of upcoming events is no longer tied to show-calendar setting.
+
+2011-04-04 Ted Gould <ted@gould.cx>
+
+ Making it so that months boundries can't block our events.
+
+2011-04-01 karl-qdh <karl@qdh.org.uk>
+
+ Set a minimum number of days to look for appointments for, allowed it to extend past month end by 1 week.
+
2011-03-31 Ted Gould <ted@gould.cx>
0.2.1
diff --git a/configure b/configure
index c788536..dce802a 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for indicator-datetime 0.2.1.
+# Generated by GNU Autoconf 2.67 for indicator-datetime 0.2.2.
#
# Report bugs to <ted@canonical.com>.
#
@@ -703,8 +703,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='indicator-datetime'
PACKAGE_TARNAME='indicator-datetime'
-PACKAGE_VERSION='0.2.1'
-PACKAGE_STRING='indicator-datetime 0.2.1'
+PACKAGE_VERSION='0.2.2'
+PACKAGE_STRING='indicator-datetime 0.2.2'
PACKAGE_BUGREPORT='ted@canonical.com'
PACKAGE_URL=''
@@ -1502,7 +1502,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures indicator-datetime 0.2.1 to adapt to many kinds of systems.
+\`configure' configures indicator-datetime 0.2.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1573,7 +1573,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of indicator-datetime 0.2.1:";;
+ short | recursive ) echo "Configuration of indicator-datetime 0.2.2:";;
esac
cat <<\_ACEOF
@@ -1701,7 +1701,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-indicator-datetime configure 0.2.1
+indicator-datetime configure 0.2.2
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2072,7 +2072,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by indicator-datetime $as_me 0.2.1, which was
+It was created by indicator-datetime $as_me 0.2.2, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -2893,7 +2893,7 @@ fi
# Define the identity of the package.
PACKAGE=indicator-datetime
- VERSION=0.2.1
+ VERSION=0.2.2
cat >>confdefs.h <<_ACEOF
@@ -12231,6 +12231,7 @@ GDK_REQUIRED_VERSION=2.22
GLIB_REQUIRED_VERSION=2.26
GTK_REQUIRED_VERSION=2.12
GTK3_REQUIRED_VERSION=3.0
+GCONF_REQUIRED_VERSION=2.31
if test "x$with_gtk" = x3; then :
@@ -12505,7 +12506,7 @@ if test -n "$SERVICE_CFLAGS"; then
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"indicator >= \$INDICATOR_REQUIRED_VERSION
- glib-2.0 >= \$GLIB_REQUIRED_VERSION
+ glib-2.0 >= \$GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= \$INDICATOR_DISPLAY_OBJECTS
@@ -12516,9 +12517,10 @@ if test -n "$SERVICE_CFLAGS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION\""; } >&5
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION\""; } >&5
($PKG_CONFIG --exists --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12529,12 +12531,13 @@ if test -n "$SERVICE_CFLAGS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION") 2>&5
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_SERVICE_CFLAGS=`$PKG_CONFIG --cflags "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12545,7 +12548,8 @@ if test -n "$SERVICE_CFLAGS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>/dev/null`
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -12557,7 +12561,7 @@ if test -n "$SERVICE_LIBS"; then
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"indicator >= \$INDICATOR_REQUIRED_VERSION
- glib-2.0 >= \$GLIB_REQUIRED_VERSION
+ glib-2.0 >= \$GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= \$INDICATOR_DISPLAY_OBJECTS
@@ -12568,9 +12572,10 @@ if test -n "$SERVICE_LIBS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION\""; } >&5
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION\""; } >&5
($PKG_CONFIG --exists --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12581,12 +12586,13 @@ if test -n "$SERVICE_LIBS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION") 2>&5
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_SERVICE_LIBS=`$PKG_CONFIG --libs "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12597,7 +12603,8 @@ if test -n "$SERVICE_LIBS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>/dev/null`
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -12618,7 +12625,7 @@ else
fi
if test $_pkg_short_errors_supported = yes; then
SERVICE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12629,10 +12636,11 @@ fi
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>&1`
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>&1`
else
SERVICE_PKG_ERRORS=`$PKG_CONFIG --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12643,13 +12651,14 @@ fi
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>&1`
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$SERVICE_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12660,7 +12669,8 @@ fi
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION) were not met:
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION) were not met:
$SERVICE_PKG_ERRORS
@@ -12704,7 +12714,7 @@ if test -n "$SERVICE_CFLAGS"; then
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"indicator >= \$INDICATOR_REQUIRED_VERSION
- glib-2.0 >= \$GLIB_REQUIRED_VERSION
+ glib-2.0 >= \$GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= \$INDICATOR_DISPLAY_OBJECTS
@@ -12715,9 +12725,10 @@ if test -n "$SERVICE_CFLAGS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION\""; } >&5
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION\""; } >&5
($PKG_CONFIG --exists --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12728,12 +12739,13 @@ if test -n "$SERVICE_CFLAGS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION") 2>&5
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_SERVICE_CFLAGS=`$PKG_CONFIG --cflags "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12744,7 +12756,8 @@ if test -n "$SERVICE_CFLAGS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>/dev/null`
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -12756,7 +12769,7 @@ if test -n "$SERVICE_LIBS"; then
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"indicator >= \$INDICATOR_REQUIRED_VERSION
- glib-2.0 >= \$GLIB_REQUIRED_VERSION
+ glib-2.0 >= \$GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= \$INDICATOR_DISPLAY_OBJECTS
@@ -12767,9 +12780,10 @@ if test -n "$SERVICE_LIBS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION\""; } >&5
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION\""; } >&5
($PKG_CONFIG --exists --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12780,12 +12794,13 @@ if test -n "$SERVICE_LIBS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION") 2>&5
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_SERVICE_LIBS=`$PKG_CONFIG --libs "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12796,7 +12811,8 @@ if test -n "$SERVICE_LIBS"; then
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>/dev/null`
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -12817,7 +12833,7 @@ else
fi
if test $_pkg_short_errors_supported = yes; then
SERVICE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12828,10 +12844,11 @@ fi
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>&1`
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>&1`
else
SERVICE_PKG_ERRORS=`$PKG_CONFIG --print-errors "indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12842,13 +12859,14 @@ fi
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION" 2>&1`
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$SERVICE_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (indicator >= $INDICATOR_REQUIRED_VERSION
- glib-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
@@ -12859,7 +12877,8 @@ fi
libedataserver-1.2 >= EDS_REQUIRED_VERSION
libedataserverui-1.2 >= EDS_REQUIRED_VERSION
cairo >= CAIRO_REQUIRED_VERSION
- gdk-2.0 >= GDK_REQUIRED_VERSION) were not met:
+ gdk-2.0 >= GDK_REQUIRED_VERSION
+ gconf-2.0 >= GCONF_REQUIRED_VERSION) were not met:
$SERVICE_PKG_ERRORS
@@ -14945,7 +14964,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by indicator-datetime $as_me 0.2.1, which was
+This file was extended by indicator-datetime $as_me 0.2.2, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15011,7 +15030,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-indicator-datetime config.status 0.2.1
+indicator-datetime config.status 0.2.2
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index b932e56..6c62342 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(indicator-datetime, 0.2.1, ted@canonical.com)
+AC_INIT(indicator-datetime, 0.2.2, ted@canonical.com)
AC_COPYRIGHT([Copyright 2009,2010 Canonical])
AC_PREREQ(2.53)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(indicator-datetime, 0.2.1)
+AM_INIT_AUTOMAKE(indicator-datetime, 0.2.2)
AM_MAINTAINER_MODE
diff --git a/debian/changelog b/debian/changelog
index 1cb4b7f..2f90b2e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,18 +1,15 @@
-indicator-datetime (0.2.1-0ubuntu2~ppa2) natty; urgency=low
+indicator-datetime (0.2.2-0ubuntu1~ppa1) UNRELEASED; urgency=low
- * Upstream Merge
- * Give full day events the day name instead of a time
-
- -- Ted Gould <ted@ubuntu.com> Wed, 06 Apr 2011 08:39:30 -0500
-
-indicator-datetime (0.2.1-0ubuntu2~ppa1) natty; urgency=low
-
- * Upstream Merge
- * Make sure the calendar follows the user setting (LP: #748772)
- * Ensure that events handle month boundries correctly (LP: #746713)
- * Only show calendars the user has configured (LP: #729033)
-
- -- Ted Gould <ted@ubuntu.com> Mon, 04 Apr 2011 11:16:44 -0500
+ * New upstream release.
+ ∘ Add language and proper distro version to geonames URL to allow
+ for proper server side fixes
+ ∘ Give full day events the day name instead of a time
+ ∘ Make sure the calendar follows the user setting (LP: #748772)
+ ∘ Ensure that events handle month boundaries correctly (LP: #746713)
+ ∘ Only show calendars the user has configured (LP: #729033)
+ ∘ Reenable clicking on the timezone in the menu to set it.
+
+ -- Ted Gould <ted@ubuntu.com> Thu, 07 Apr 2011 13:20:49 -0500
indicator-datetime (0.2.1-0ubuntu1) natty; urgency=low
diff --git a/src/datetime-prefs.c b/src/datetime-prefs.c
index 4a32fd6..9b00e60 100644
--- a/src/datetime-prefs.c
+++ b/src/datetime-prefs.c
@@ -181,46 +181,10 @@ ntp_query_answered (GObject *object, GAsyncResult *res, gpointer user_data)
g_variant_unref (answers);
}
-static gchar *
-get_zone_name (const gchar * location)
-{
- gchar * new_zone, * new_name;
- gchar * old_zone, * old_name;
- gchar * rv;
-
- split_settings_location (location, &new_zone, &new_name);
-
- GSettings * conf = g_settings_new (SETTINGS_INTERFACE);
- gchar * tz_name = g_settings_get_string (conf, SETTINGS_TIMEZONE_NAME_S);
- split_settings_location (tz_name, &old_zone, &old_name);
- g_free (tz_name);
- g_object_unref (conf);
-
- // new_name is always just a sanitized version of a timezone.
- // old_name is potentially a saved "pretty" version of a timezone name from
- // geonames. So we prefer to use it if available and the zones match.
-
- if (g_strcmp0 (old_zone, new_zone) == 0) {
- rv = old_name;
- old_name = NULL;
- }
- else {
- rv = new_name;
- new_name = NULL;
- }
-
- g_free (new_zone);
- g_free (old_zone);
- g_free (new_name);
- g_free (old_name);
-
- return rv;
-}
-
static void
sync_entry (const gchar * location)
{
- gchar * name = get_zone_name (location);
+ gchar * name = get_current_zone_name (location);
gtk_entry_set_text (GTK_ENTRY (tz_entry), name);
g_free (name);
@@ -606,7 +570,7 @@ entry_focus_out (GtkEntry * entry, GdkEventFocus * event)
if (location == NULL)
return FALSE;
- gchar * name = get_zone_name (location->zone);
+ gchar * name = get_current_zone_name (location->zone);
gboolean correct = (g_strcmp0 (gtk_entry_get_text (entry), name) == 0);
g_free (name);
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 5e8d312..df37b5e 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -114,6 +114,17 @@ set_timezone_label (DbusmenuMenuitem * mi, const gchar * location)
g_free (name);
}
+static void
+set_current_timezone_label (DbusmenuMenuitem * mi, const gchar * location)
+{
+ gchar * name = get_current_zone_name (location);
+
+ dbusmenu_menuitem_property_set (mi, TIMEZONE_MENUITEM_PROP_NAME, name);
+ dbusmenu_menuitem_property_set (mi, TIMEZONE_MENUITEM_PROP_ZONE, location);
+
+ g_free (name);
+}
+
/* Check to see if our timezones are the same */
static void
check_timezone_sync (void) {
@@ -168,7 +179,7 @@ check_timezone_sync (void) {
if (label != NULL) {
// TODO work out the current location name in a nice way
- set_timezone_label (current_location, label);
+ set_current_timezone_label (current_location, label);
// TODO work out the current time at that location
dbusmenu_menuitem_property_set_bool (current_location, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
dbusmenu_menuitem_property_set_bool(current_location, TIMEZONE_MENUITEM_PROP_RADIO, TRUE);
@@ -177,18 +188,18 @@ check_timezone_sync (void) {
}
if (geo_timezone != NULL) {
// TODO work out the geo location name in a nice way
- set_timezone_label (geo_location, geo_timezone);
+ set_current_timezone_label (geo_location, geo_timezone);
// TODO work out the current time at that location
dbusmenu_menuitem_property_set_bool (geo_location, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
}
} else {
// TODO work out the geo location name in a nice way
- set_timezone_label (geo_location, geo_timezone);
+ set_current_timezone_label (geo_location, geo_timezone);
// TODO work out the current time at that location
dbusmenu_menuitem_property_set_bool(geo_location, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
// TODO work out the current location name in a nice way
- set_timezone_label (current_location, current_timezone);
+ set_current_timezone_label (current_location, current_timezone);
// TODO work out the current time at that location
dbusmenu_menuitem_property_set_bool(current_location, TIMEZONE_MENUITEM_PROP_RADIO, TRUE);
dbusmenu_menuitem_property_set_bool(current_location, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
@@ -236,6 +247,69 @@ update_current_timezone (void) {
return;
}
+static void
+quick_set_tz_cb (GObject *object, GAsyncResult *res, gpointer data)
+{
+ GError * error = NULL;
+ GVariant * answers = g_dbus_proxy_call_finish (G_DBUS_PROXY (object), res, &error);
+
+ if (error != NULL) {
+ g_warning("Could not set timezone for SettingsDaemon: %s", error->message);
+ g_error_free(error);
+ return;
+ }
+
+ g_variant_unref (answers);
+}
+
+static void
+quick_set_tz_proxy_cb (GObject *object, GAsyncResult *res, gpointer zone)
+{
+ GError * error = NULL;
+
+ GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish (res, &error);
+
+ if (error != NULL) {
+ g_warning("Could not grab DBus proxy for SettingsDaemon: %s", error->message);
+ g_error_free(error);
+ g_free (zone);
+ return;
+ }
+
+ gchar * file = g_build_filename ("/usr/share/zoneinfo", (char *)zone, NULL);
+ g_dbus_proxy_call (proxy, "SetTimezone", g_variant_new ("(s)", file),
+ G_DBUS_CALL_FLAGS_NONE, -1, NULL, quick_set_tz_cb, NULL);
+ g_free (file);
+ g_free (zone);
+ g_object_unref (proxy);
+}
+
+static void
+quick_set_tz (DbusmenuMenuitem * menuitem, guint timestamp, gpointer user_data)
+{
+ const gchar * tz = dbusmenu_menuitem_property_get(menuitem, TIMEZONE_MENUITEM_PROP_ZONE);
+ g_debug("Quick setting timezone to: %s", tz);
+
+ g_return_if_fail(tz != NULL);
+
+ const gchar * name = dbusmenu_menuitem_property_get(menuitem, TIMEZONE_MENUITEM_PROP_NAME);
+
+ /* Set it in gsettings so we don't lose user's preferred name */
+ GSettings * conf = g_settings_new (SETTINGS_INTERFACE);
+ gchar * tz_full = g_strdup_printf ("%s %s", tz, name);
+ g_settings_set_string (conf, SETTINGS_TIMEZONE_NAME_S, tz_full);
+ g_free (tz_full);
+ g_object_unref (conf);
+
+ g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL,
+ "org.gnome.SettingsDaemon.DateTimeMechanism",
+ "/",
+ "org.gnome.SettingsDaemon.DateTimeMechanism",
+ NULL, quick_set_tz_proxy_cb, g_strdup (tz));
+
+ return;
+}
+
/* Updates the label in the date menuitem */
static gboolean
update_datetime (gpointer user_data)
@@ -543,6 +617,7 @@ update_timezone_menu_items(gpointer user_data) {
dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
dbusmenu_menuitem_child_add_position (root, item, offset++);
+ g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(quick_set_tz), NULL);
dconflocations = g_list_append(dconflocations, item);
}
}
@@ -1048,14 +1123,15 @@ build_menus (DbusmenuMenuitem * root)
geo_location = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (geo_location, DBUSMENU_MENUITEM_PROP_TYPE, TIMEZONE_MENUITEM_TYPE);
- set_timezone_label (geo_location, "");
+ set_current_timezone_label (geo_location, "");
dbusmenu_menuitem_property_set_bool (geo_location, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
dbusmenu_menuitem_property_set_bool (geo_location, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
+ g_signal_connect(G_OBJECT(geo_location), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(quick_set_tz), NULL);
dbusmenu_menuitem_child_append(root, geo_location);
current_location = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (current_location, DBUSMENU_MENUITEM_PROP_TYPE, TIMEZONE_MENUITEM_TYPE);
- set_timezone_label (current_location, "");
+ set_current_timezone_label (current_location, "");
dbusmenu_menuitem_property_set_bool (current_location, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
dbusmenu_menuitem_property_set_bool (current_location, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
dbusmenu_menuitem_child_append(root, current_location);
diff --git a/src/timezone-completion.c b/src/timezone-completion.c
index ad04d0c..7dcc28e 100644
--- a/src/timezone-completion.c
+++ b/src/timezone-completion.c
@@ -50,7 +50,7 @@ struct _TimezoneCompletionPrivate
#define TIMEZONE_COMPLETION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), TIMEZONE_COMPLETION_TYPE, TimezoneCompletionPrivate))
-#define GEONAME_URL "http://geoname-lookup.ubuntu.com/?query=%s&release=%s"
+#define GEONAME_URL "http://geoname-lookup.ubuntu.com/?query=%s&release=%s&lang=%s"
/* Prototypes */
static void timezone_completion_class_init (TimezoneCompletionClass *klass);
@@ -280,6 +280,58 @@ geonames_data_ready (GObject *object, GAsyncResult *res, gpointer user_data)
json_parse_ready, user_data);
}
+/* Returns message locale, with possible country info too like en_US */
+static gchar *
+get_locale (void)
+{
+ /* Check LANGUAGE, LC_ALL, LC_MESSAGES, and LANG, treat as colon-separated */
+ const gchar *env_names[] = {"LANGUAGE", "LC_ALL", "LC_MESSAGES", "LANG", NULL};
+ const gchar *env = NULL;
+ gint i;
+
+ for (i = 0; env_names[i]; i++) {
+ env = g_getenv (env_names[i]);
+ if (env != NULL && env[0] != 0)
+ break;
+ }
+
+ if (env == NULL)
+ return NULL;
+
+ /* Now, we split on colons as expected, but also on . and @ to filter out
+ extra pieces of locale we don't care about as we only use first chunk. */
+ gchar **split = g_strsplit_set (env, ":.@", 2);
+ if (split == NULL)
+ return NULL;
+
+ if (split[0] == NULL) {
+ g_strfreev (split);
+ return NULL;
+ }
+
+ gchar *locale = g_strdup (split[0]);
+ g_strfreev (split);
+ return locale;
+}
+
+static gchar *
+get_version (void)
+{
+ static gchar *version = NULL;
+
+ if (version == NULL) {
+ gchar *stdout = NULL;
+ g_spawn_command_line_sync ("lsb_release -rs", &stdout, NULL, NULL, NULL);
+
+ if (stdout != NULL)
+ version = g_strstrip (stdout);
+ else
+ version = g_strdup("");
+ }
+
+ return version;
+}
+
static gboolean
request_zones (TimezoneCompletion * completion)
{
@@ -302,9 +354,16 @@ request_zones (TimezoneCompletion * completion)
priv->request_text = g_strdup (text);
gchar * escaped = g_uri_escape_string (text, NULL, FALSE);
- gchar * url = g_strdup_printf (GEONAME_URL, escaped, "11.04"); // FIXME: don't hardcode
+ gchar * version = get_version ();
+ gchar * locale = get_locale ();
+ gchar * url = g_strdup_printf (GEONAME_URL, escaped, version, locale);
+ g_free (locale);
+ g_free (version);
+ g_free (escaped);
GFile * file = g_file_new_for_uri (url);
+ g_free (url);
+
g_file_read_async (file, G_PRIORITY_DEFAULT, priv->cancel,
geonames_data_ready, completion);
diff --git a/src/utils.c b/src/utils.c
index d8851aa..ab93ecf 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -81,6 +81,42 @@ split_settings_location (const gchar * location, gchar ** zone, gchar ** name)
}
}
+gchar *
+get_current_zone_name (const gchar * location)
+{
+ gchar * new_zone, * new_name;
+ gchar * old_zone, * old_name;
+ gchar * rv;
+
+ split_settings_location (location, &new_zone, &new_name);
+
+ GSettings * conf = g_settings_new (SETTINGS_INTERFACE);
+ gchar * tz_name = g_settings_get_string (conf, SETTINGS_TIMEZONE_NAME_S);
+ split_settings_location (tz_name, &old_zone, &old_name);
+ g_free (tz_name);
+ g_object_unref (conf);
+
+ // new_name is always just a sanitized version of a timezone.
+ // old_name is potentially a saved "pretty" version of a timezone name from
+ // geonames. So we prefer to use it if available and the zones match.
+
+ if (g_strcmp0 (old_zone, new_zone) == 0) {
+ rv = old_name;
+ old_name = NULL;
+ }
+ else {
+ rv = new_name;
+ new_name = NULL;
+ }
+
+ g_free (new_zone);
+ g_free (old_zone);
+ g_free (new_name);
+ g_free (old_name);
+
+ return rv;
+}
+
/* Translate msg according to the locale specified by LC_TIME */
static char *
T_(const char *msg)
diff --git a/src/utils.h b/src/utils.h
index 5f7842c..c2bc0c5 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -29,6 +29,7 @@ G_BEGIN_DECLS
gboolean is_locale_12h (void);
void split_settings_location (const gchar * location, gchar ** zone, gchar ** name);
+gchar * get_current_zone_name (const gchar * location);
gchar * generate_format_string_full (gboolean show_day, gboolean show_date);
gchar * generate_format_string_at_time (GDateTime * time);