[gnome-packagekit] Show the notifications pointing at the status icon when possible
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Show the notifications pointing at the status icon when possible
- Date: Mon, 17 Aug 2009 15:37:04 +0000 (UTC)
commit c4c6c3670b2604e7ead9f10ad540bc7a32f104b2
Author: Richard Hughes <richard hughsie com>
Date: Mon Aug 17 16:35:40 2009 +0100
Show the notifications pointing at the status icon when possible
src/gpk-check-update.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/gpk-check-update.c b/src/gpk-check-update.c
index d1ce609..891e498 100644
--- a/src/gpk-check-update.c
+++ b/src/gpk-check-update.c
@@ -557,7 +557,7 @@ gpk_check_update_critical_updates_warning (GpkCheckUpdate *cupdate, const gchar
/* do the bubble */
egg_debug ("title=%s, message=%s", title, message);
- notification = notify_notification_new (title, message, "help-browser", NULL);
+ notification = notify_notification_new_with_status_icon (title, message, "help-browser", cupdate->priv->status_icon);
if (notification == NULL) {
egg_warning ("failed to get bubble");
return;
@@ -686,7 +686,9 @@ gpk_check_update_check_on_battery (GpkCheckUpdate *cupdate)
/* TRANSLATORS: policy says update, but we are on battery and so prompt */
message = _("Automatic updates are not being installed as the computer is running on battery power");
/* TRANSLATORS: informs user will not install by default */
- notification = notify_notification_new (_("Updates not installed"), message, "help-browser", NULL);
+ notification = notify_notification_new_with_status_icon (_("Updates not installed"),
+ message, "help-browser",
+ cupdate->priv->status_icon);
notify_notification_set_timeout (notification, 15000);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
// notify_notification_add_action (notification, "do-not-show-update-not-battery",
@@ -776,10 +778,10 @@ gpk_check_update_notify_doing_updates (GpkCheckUpdate *cupdate)
goto out;
/* TRANSLATORS: title: notification when we scheduled an automatic update */
- notification = notify_notification_new (_("Updates are being installed"),
+ notification = notify_notification_new_with_status_icon (_("Updates are being installed"),
/* TRANSLATORS: tell the user why the hard disk is grinding... */
_("Updates are being automatically installed on your computer"),
- "software-update-urgent", NULL);
+ "software-update-urgent", cupdate->priv->status_icon);
notify_notification_set_timeout (notification, 15000);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
/* TRANSLATORS: button: cancel the update system */
@@ -1198,7 +1200,7 @@ gpk_check_update_process_distro_upgrades (GpkCheckUpdate *cupdate, PkObjList *ar
/* TRANSLATORS: a distro update is available, e.g. Fedora 8 to Fedora 9 */
title = _("Distribution upgrades available");
- notification = notify_notification_new (title, string->str, "help-browser", NULL);
+ notification = notify_notification_new_with_status_icon (title, string->str, "help-browser", cupdate->priv->status_icon);
if (notification == NULL) {
egg_warning ("failed to get bubble");
return;
@@ -1436,7 +1438,9 @@ gpk_check_update_finished_notify (GpkCheckUpdate *cupdate, PkClient *client)
}
/* TRANSLATORS: title: system update completed all okay */
- notification = notify_notification_new (_("The system update has completed"), message_text->str, "help-browser", NULL);
+ notification = notify_notification_new_with_status_icon (_("The system update has completed"),
+ message_text->str, "help-browser",
+ cupdate->priv->status_icon);
notify_notification_set_timeout (notification, 15000);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
if (restart == PK_RESTART_ENUM_SYSTEM) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]