[gnome-packagekit] Add another couple of sounds when the update is available



commit c776185610330c78e3297e81d263b71763a9161b
Author: Richard Hughes <richard hughsie com>
Date:   Wed Apr 22 14:45:40 2009 +0100

    Add another couple of sounds when the update is available
---
 src/gpk-check-update.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/gpk-check-update.c b/src/gpk-check-update.c
index 64c32dc..f68e5a8 100644
--- a/src/gpk-check-update.c
+++ b/src/gpk-check-update.c
@@ -884,6 +884,15 @@ gpk_check_update_process_updates (GpkCheckUpdate *cupdate, PkPackageList *list,
 	if (update == GPK_UPDATE_ENUM_NONE) {
 		egg_debug ("not updating as policy NONE");
 
+		/* play the sound, using sounds from the naming spec */
+		ca_context_play (ca_gtk_context_get (), 0,
+				 /* TODO: add a new sound to the spec */
+				 CA_PROP_EVENT_ID, "software-update-available",
+				 /* TRANSLATORS: this is the application name for libcanberra */
+				 CA_PROP_APPLICATION_NAME, _("GNOME PackageKit Update Icon"),
+				 /* TRANSLATORS: this is the sound description */
+				 CA_PROP_EVENT_DESCRIPTION, _("Update available"), NULL);
+
 		/* do we warn the user? */
 		if (security_array->len > 0)
 			gpk_check_update_critical_updates_warning (cupdate, status_security->str, security_array);
@@ -894,6 +903,16 @@ gpk_check_update_process_updates (GpkCheckUpdate *cupdate, PkPackageList *list,
 	ret = gpk_check_update_check_on_battery (cupdate);
 	if (!ret) {
 		egg_debug ("on battery so not doing update");
+
+		/* play the sound, using sounds from the naming spec */
+		ca_context_play (ca_gtk_context_get (), 0,
+				 /* TODO: add a new sound to the spec */
+				 CA_PROP_EVENT_ID, "software-update-available",
+				 /* TRANSLATORS: this is the application name for libcanberra */
+				 CA_PROP_APPLICATION_NAME, _("GNOME PackageKit Update Icon"),
+				 /* TRANSLATORS: this is the sound description */
+				 CA_PROP_EVENT_DESCRIPTION, _("Update available (on battery)"), NULL);
+
 		/* do we warn the user? */
 		if (security_array->len > 0)
 			gpk_check_update_critical_updates_warning (cupdate, status_security->str, security_array);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]