diff options
author | Ted Gould <ted@gould.cx> | 2011-08-18 15:28:13 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-08-18 15:28:13 -0500 |
commit | aa0da73e3aa68e9958b9187927fa581db4436c35 (patch) | |
tree | 69c7215b3bc97f739626eb0e5acede642c4484a4 | |
parent | 45d0776e19fd738130457daec5d8401837eb6a0d (diff) | |
parent | 70ef2f0a626ffbb05b85874398ca2e7ce9058745 (diff) | |
download | ayatana-indicator-datetime-aa0da73e3aa68e9958b9187927fa581db4436c35.tar.gz ayatana-indicator-datetime-aa0da73e3aa68e9958b9187927fa581db4436c35.tar.bz2 ayatana-indicator-datetime-aa0da73e3aa68e9958b9187927fa581db4436c35.zip |
New upstream release.
∘ Use cleaner GDateTime API
∘ Use locale preferred date format
∘ Use real ellipsis (LP: #621339)
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | ChangeLog | 41 | ||||
-rwxr-xr-x | configure | 20 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | src/datetime-prefs.c | 2 | ||||
-rw-r--r-- | src/datetime-service.c | 30 | ||||
-rw-r--r-- | src/indicator-datetime.c | 21 |
8 files changed, 88 insertions, 38 deletions
@@ -6,6 +6,7 @@ Evgeni Golov Gabor Kelemen Javier Jardón + Jeremy Bicha karl-qdh Ken VanDine Kyle Nitzsche @@ -1,5 +1,46 @@ # Generated by Makefile. Do not edit. +2011-08-18 Ted Gould <ted@gould.cx> + + 0.2.93 + +2011-08-17 Ted Gould <ted@gould.cx> + + Use cleaner gdatetime + +2011-08-17 Javier Jardón <javier.jardon@codethink.co.uk> + + Set the correct month number + + g_datetime_get_ymd() gets the Gregorian month number but + gtk_calendar_set_month() needs a value between [0,11] + +2011-08-16 Javier Jardón <javier.jardon@codethink.co.uk> + + Use the new GDateTime glib API to deal with time + +2011-08-17 Ted Gould <ted@gould.cx> + + Use locale prefered date format + +2011-08-16 Javier Jardón <javier.jardon@codethink.co.uk> + + Show the preferred date representation for the current locale + + Fixes https://bugs.launchpad.net/indicator-datetime/+bug/729056 + +2011-08-17 Ted Gould <ted@gould.cx> + + Fixing ellipsis to be true ellipsis + +2011-08-05 Jeremy Bicha <jbicha@ubuntu.com> + + Use real ellipsis (LP: #621339) + +2011-08-05 Jeremy Bicha <jbicha@ubuntu.com> + + Spell out "and" to match other System Settings panels + 2011-08-11 Ted Gould <ted@gould.cx> 0.2.92 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for indicator-datetime 0.2.92. +# Generated by GNU Autoconf 2.68 for indicator-datetime 0.2.93. # # Report bugs to <http://bugs.launchpad.net/indicator-datetime>. # @@ -572,8 +572,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='indicator-datetime' PACKAGE_TARNAME='indicator-datetime' -PACKAGE_VERSION='0.2.92' -PACKAGE_STRING='indicator-datetime 0.2.92' +PACKAGE_VERSION='0.2.93' +PACKAGE_STRING='indicator-datetime 0.2.93' PACKAGE_BUGREPORT='http://bugs.launchpad.net/indicator-datetime' PACKAGE_URL='http://launchpad.net/indicator-datetime' @@ -1375,7 +1375,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.92 to adapt to many kinds of systems. +\`configure' configures indicator-datetime 0.2.93 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1446,7 +1446,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of indicator-datetime 0.2.92:";; + short | recursive ) echo "Configuration of indicator-datetime 0.2.93:";; esac cat <<\_ACEOF @@ -1578,7 +1578,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -indicator-datetime configure 0.2.92 +indicator-datetime configure 0.2.93 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1949,7 +1949,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.92, which was +It was created by indicator-datetime $as_me 0.2.93, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2773,7 +2773,7 @@ fi # Define the identity of the package. PACKAGE='indicator-datetime' - VERSION='0.2.92' + VERSION='0.2.93' cat >>confdefs.h <<_ACEOF @@ -14609,7 +14609,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.92, which was +This file was extended by indicator-datetime $as_me 0.2.93, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14676,7 +14676,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.92 +indicator-datetime config.status 0.2.93 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index ec4720e..71fd0e9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_INIT([indicator-datetime], - [0.2.92], + [0.2.93], [http://bugs.launchpad.net/indicator-datetime], [indicator-datetime], [http://launchpad.net/indicator-datetime]) diff --git a/debian/changelog b/debian/changelog index 78f6be5..4fd39d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +indicator-datetime (0.2.93-0ubuntu1~ppa1) UNRELEASED; urgency=low + + * New upstream release. + ∘ Use cleaner GDateTime API + ∘ Use locale preferred date format + ∘ Use real ellipsis (LP: #621339) + + -- Ted Gould <ted@ubuntu.com> Thu, 18 Aug 2011 14:52:51 -0500 + indicator-datetime (0.2.92-0ubuntu1) oneiric; urgency=low * New upstream release. diff --git a/src/datetime-prefs.c b/src/datetime-prefs.c index bed5ff1..e7fef5d 100644 --- a/src/datetime-prefs.c +++ b/src/datetime-prefs.c @@ -478,7 +478,7 @@ format_time_text (GtkWidget * spinner, gpointer user_data) } } else { - format = "%Y-%m-%d"; + format = "%x"; } GDateTime * datetime = g_date_time_new_from_unix_local (gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinner))); diff --git a/src/datetime-service.c b/src/datetime-service.c index 8d25b3c..e46b04d 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -299,25 +299,25 @@ quick_set_tz (DbusmenuMenuitem * menuitem, guint timestamp, gpointer user_data) static gboolean update_datetime (gpointer user_data) { - g_debug("Updating Date/Time"); + GDateTime *datetime; + gchar *utf8; - gchar longstr[128]; - time_t t; - struct tm *ltime; + g_debug("Updating Date/Time"); - t = time(NULL); - ltime = localtime(&t); - if (ltime == NULL) { + datetime = g_date_time_new_now_local (); + if (datetime == NULL) { g_warning("Error getting local time"); dbusmenu_menuitem_property_set(date, DBUSMENU_MENUITEM_PROP_LABEL, _("Error getting time")); + g_date_time_unref (datetime); return FALSE; } - /* Translators: strftime(3) style date format on top of the menu when you click on the clock */ - strftime(longstr, 128, _("%A, %e %B %Y"), ltime); - - gchar * utf8 = g_locale_to_utf8(longstr, -1, NULL, NULL, NULL); + /* eranslators: strftime(3) style date format on top of the menu when you click on the clock */ + utf8 = g_date_time_format (datetime, _("%A, %e %B %Y")); + dbusmenu_menuitem_property_set(date, DBUSMENU_MENUITEM_PROP_LABEL, utf8); + + g_date_time_unref (datetime); g_free(utf8); return FALSE; @@ -492,7 +492,7 @@ check_for_calendar (gpointer user_data) dbusmenu_menuitem_property_set(events_separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR); dbusmenu_menuitem_child_add_position(root, events_separator, 2); add_appointment = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (add_appointment, DBUSMENU_MENUITEM_PROP_LABEL, _("Add Event...")); + dbusmenu_menuitem_property_set (add_appointment, DBUSMENU_MENUITEM_PROP_LABEL, _("Add Event…")); dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE); g_signal_connect(G_OBJECT(add_appointment), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), "evolution -c calendar"); dbusmenu_menuitem_child_add_position (root, add_appointment, 3); @@ -701,7 +701,7 @@ update_appointment_menu_items (gpointer user_data) // Get today & work out query times time(&curtime); - struct tm *today = localtime(&curtime); + struct tm *today = localtime(&curtime); const int mday = today->tm_mday; const int mon = today->tm_mon; const int year = today->tm_year; @@ -1064,7 +1064,7 @@ build_menus (DbusmenuMenuitem * root) g_debug("Building Menus."); if (date == NULL) { date = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (date, DBUSMENU_MENUITEM_PROP_LABEL, _("No date yet...")); + dbusmenu_menuitem_property_set (date, DBUSMENU_MENUITEM_PROP_LABEL, _("No date yet…")); dbusmenu_menuitem_property_set_bool(date, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE); dbusmenu_menuitem_child_append(root, date); @@ -1116,7 +1116,7 @@ build_menus (DbusmenuMenuitem * root) dbusmenu_menuitem_child_append(root, separator); settings = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (settings, DBUSMENU_MENUITEM_PROP_LABEL, _("Time & Date Settings...")); + dbusmenu_menuitem_property_set (settings, DBUSMENU_MENUITEM_PROP_LABEL, _("Time & Date Settings…")); /* insensitive until we check for available apps */ dbusmenu_menuitem_property_set_bool(settings, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE); g_signal_connect(G_OBJECT(settings), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), "gnome-control-center indicator-datetime"); diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 163804b..aca1101 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -270,6 +270,9 @@ static void menu_visible_notfy_cb(GtkWidget * menu, G_GNUC_UNUSED GParamSpec *pspec, gpointer user_data) { IndicatorDatetime * self = INDICATOR_DATETIME(user_data); + GDateTime *datetime; + gint y, m, d; + g_debug("notify visible signal received"); // we should only react if we're currently visible @@ -277,18 +280,14 @@ menu_visible_notfy_cb(GtkWidget * menu, G_GNUC_UNUSED GParamSpec *pspec, gpointe g_object_get(G_OBJECT(menu), "visible", &visible, NULL); if (visible) return; g_debug("notify visible menu hidden, resetting date"); - - time_t curtime; - - time(&curtime); - struct tm *today = localtime(&curtime); - int y = today->tm_year; - int m = today->tm_mon; - int d = today->tm_mday; - + + datetime = g_date_time_new_now_local (); + g_date_time_get_ymd (datetime, &y, &m, &d); + g_date_time_unref (datetime); + // Set the calendar to todays date - ido_calendar_menu_item_set_date (self->priv->ido_calendar, y+1900, m, d); - + ido_calendar_menu_item_set_date (self->priv->ido_calendar, y, m-1, d); + // Make sure the day-selected signal is sent so the menu updates - may duplicate /*GVariant *variant = g_variant_new_uint32((guint)curtime); guint timestamp = (guint)time(NULL); |