diff options
author | Ted Gould <ted@gould.cx> | 2011-04-14 14:49:59 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-04-14 14:49:59 -0500 |
commit | 653faaea32c30fe0352c430b97136c4873819c11 (patch) | |
tree | 1a91f4e4b1cdf8a36ae20dbb847ad29a3650546e | |
parent | 980177afd2ec65ad0e098be0b76c43f569e28311 (diff) | |
parent | c187878ad6dd3a5f1406de00880580479601476c (diff) | |
download | ayatana-indicator-datetime-653faaea32c30fe0352c430b97136c4873819c11.tar.gz ayatana-indicator-datetime-653faaea32c30fe0352c430b97136c4873819c11.tar.bz2 ayatana-indicator-datetime-653faaea32c30fe0352c430b97136c4873819c11.zip |
New upstream release.
∘ Use GTK directly for detecting when the menu appears and disappears
∘ Handle items being removed from the locations list by choosing
∘ Check for resume in the service and update the label as well
(LP: #759854)
-rw-r--r-- | ChangeLog | 40 | ||||
-rwxr-xr-x | configure | 20 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | debian/changelog | 12 | ||||
-rw-r--r-- | src/datetime-service.c | 43 | ||||
-rw-r--r-- | src/indicator-datetime.c | 40 |
6 files changed, 102 insertions, 57 deletions
@@ -1,5 +1,45 @@ # Generated by Makefile. Do not edit. +2011-04-14 Ted Gould <ted@gould.cx> + + 0.2.3 + +2011-04-14 Ted Gould <ted@gould.cx> + + Check for resume in the service and update the label as well + +2011-04-13 Michael Terry <mike@mterry.name> + + watch for resume in the service, not the indicator; update today's menu label after resume + +2011-04-12 Ted Gould <ted@gould.cx> + + If an item is removed, make sure we choose one. + +2011-04-11 karl-qdh <karl@qdh.org.uk> + + Make selection change on remove item + +2011-04-12 Ted Gould <ted@gould.cx> + + Work around libindicator not sending a close event by looking for it directly in the indicator + +2011-04-11 karl-qdh <karl@qdh.org.uk> + + Fixed niggles + +2011-04-11 karl-qdh <karl@qdh.org.uk> + + syntax fail + +2011-04-11 karl-qdh <karl@qdh.org.uk> + + Improve debug messages and only react when hiding + +2011-04-11 karl-qdh <karl@qdh.org.uk> + + Calendar reset, should work for mike + 2011-04-07 Ted Gould <ted@gould.cx> 0.2.2 @@ -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.2. +# Generated by GNU Autoconf 2.67 for indicator-datetime 0.2.3. # # 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.2' -PACKAGE_STRING='indicator-datetime 0.2.2' +PACKAGE_VERSION='0.2.3' +PACKAGE_STRING='indicator-datetime 0.2.3' 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.2 to adapt to many kinds of systems. +\`configure' configures indicator-datetime 0.2.3 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.2:";; + short | recursive ) echo "Configuration of indicator-datetime 0.2.3:";; 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.2 +indicator-datetime configure 0.2.3 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.2, which was +It was created by indicator-datetime $as_me 0.2.3, 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.2 + VERSION=0.2.3 cat >>confdefs.h <<_ACEOF @@ -14964,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.2, which was +This file was extended by indicator-datetime $as_me 0.2.3, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15030,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.2 +indicator-datetime config.status 0.2.3 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 6c62342..1504c6a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(indicator-datetime, 0.2.2, ted@canonical.com) +AC_INIT(indicator-datetime, 0.2.3, 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.2) +AM_INIT_AUTOMAKE(indicator-datetime, 0.2.3) AM_MAINTAINER_MODE diff --git a/debian/changelog b/debian/changelog index 07d242f..aeefb49 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,14 @@ -indicator-datetime (0.2.2-0ubuntu2~ppa1) natty; urgency=low +indicator-datetime (0.2.3-0ubuntu1~ppa1) UNRELEASED; urgency=low - * Upstream Merge - * Use GTK directly for detecting when the menu appears and disappears + * New upstream release. + ∘ Use GTK directly for detecting when the menu appears and disappears to reset the date (LP: #649800) - * Handle items being removed from the locations list by choosing + ∘ Handle items being removed from the locations list by choosing another item in the list (LP: #740948) + ∘ Check for resume in the service and update the label as well + (LP: #759854) - -- Ted Gould <ted@ubuntu.com> Tue, 12 Apr 2011 22:33:45 -0500 + -- Ted Gould <ted@ubuntu.com> Thu, 14 Apr 2011 14:48:55 -0500 indicator-datetime (0.2.2-0ubuntu1) natty; urgency=low diff --git a/src/datetime-service.c b/src/datetime-service.c index 08b352a..08ff9ad 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -1199,6 +1199,40 @@ setup_timer (void) return; } +static void +session_active_change_cb (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name, + GVariant * parameters, gpointer user_data) +{ + // Just returned from suspend + if (g_strcmp0(signal_name, "SystemIdleHintChanged") == 0) { + gboolean idle = FALSE; + g_variant_get(parameters, "(b)", &idle); + if (!idle) { + datetime_interface_update(DATETIME_INTERFACE(user_data)); + update_datetime(NULL); + setup_timer(); + } + } + return; +} + +/* for hooking into console kit signal on wake from suspend */ +static void +system_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data) +{ + 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 ConsoleKit: %s", error->message); + g_error_free(error); + return; + } + + g_signal_connect(proxy, "g-signal", G_CALLBACK(session_active_change_cb), user_data); +} + /* Callback from getting the address */ static void geo_address_cb (GeoclueAddress * address, int timestamp, GHashTable * addy_data, GeoclueAccuracy * accuracy, GError * error, gpointer user_data) @@ -1433,6 +1467,15 @@ main (int argc, char ** argv) /* Setup the timer */ setup_timer(); + /* And watch for system resumes */ + g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + NULL, + "org.freedesktop.ConsoleKit", + "/org/freedesktop/ConsoleKit/Manager", + "org.freedesktop.ConsoleKit.Manager", + NULL, system_proxy_cb, dbus); + mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index b322cc6..1c05ff0 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -171,9 +171,7 @@ static void update_label (IndicatorDatetime * io, GDateTime ** static void guess_label_size (IndicatorDatetime * self); static void setup_timer (IndicatorDatetime * self, GDateTime * datetime); static void update_time (IndicatorDatetime * self); -static void session_active_change_cb (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name, GVariant * parameters, gpointer user_data); static void receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name, GVariant * parameters, gpointer user_data); -static void system_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data); static void service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data); static gint generate_strftime_bitmask (const char *time_str); static void timezone_update_labels (indicator_item_t * mi_data); @@ -396,34 +394,8 @@ indicator_datetime_init (IndicatorDatetime *self) service_proxy_cb, self); - g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, - G_DBUS_PROXY_FLAGS_NONE, - NULL, - "org.freedesktop.ConsoleKit", - "/org/freedesktop/ConsoleKit/Manager", - "org.freedesktop.ConsoleKit.Manager", - NULL, system_proxy_cb, self); return; } -/* for hooking into console kit signal on wake from suspend */ -static void -system_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data) -{ - GError * error = NULL; - - IndicatorDatetime * self = INDICATOR_DATETIME(user_data); - g_return_if_fail(self != NULL); - - GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error); - - if (error != NULL) { - g_warning("Could not grab DBus proxy for %s: %s", SERVICE_NAME, error->message); - g_error_free(error); - return; - } - g_signal_connect(proxy, "g-signal", G_CALLBACK(session_active_change_cb), self); - -} /* Callback from trying to create the proxy for the serivce, this could include starting the service. Sometime it'll fail and @@ -855,18 +827,6 @@ update_time (IndicatorDatetime * self) return; } -static void -session_active_change_cb (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name, - GVariant * parameters, gpointer user_data) -{ - // Just returned from suspend - IndicatorDatetime * self = INDICATOR_DATETIME(user_data); - if (g_strcmp0(signal_name, "SystemIdleHintChanged") == 0 && g_variant_get_boolean(parameters) == FALSE) { - update_time(self); - } - return; -} - /* Receives all signals from the service, routed to the appropriate functions */ static void receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name, |