[gnome-color-manager] trivial: put the device title in the notification dialog



commit d7b0b1ef9c9db236582930c338833e3279a9b50e
Author: Richard Hughes <richard hughsie com>
Date:   Thu Mar 25 21:10:12 2010 +0000

    trivial: put the device title in the notification dialog

 src/gcm-session.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gcm-session.c b/src/gcm-session.c
index 219402d..bcf5587 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -169,7 +169,7 @@ gcm_session_notify_recalibrate (const gchar *title, const gchar *message, GcmDev
 static void
 gcm_session_notify_device (GcmDevice *device)
 {
-	const gchar *message;
+	gchar *message;
 	const gchar *title;
 	GcmDeviceKind kind;
 	glong since;
@@ -190,20 +190,21 @@ gcm_session_notify_device (GcmDevice *device)
 		threshold = gconf_client_get_int (gconf_client, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD, NULL);
 
 		/* TRANSLATORS: this is when the display has not been recalibrated in a while */
-		message = _("The display attached to this computer should be recalibrated soon.");
+		message = g_strdup_printf (_("The display '%s' should be recalibrated soon."), gcm_device_get_title (device));
 	} else {
 
 		/* get from GConf */
 		threshold = gconf_client_get_int (gconf_client, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD, NULL);
 
 		/* TRANSLATORS: this is when the printer has not been recalibrated in a while */
-		message = _("The printer attached to this computer should be recalibrated soon.");
+		message = g_strdup_printf (_("The printer '%s' should be recalibrated soon."), gcm_device_get_title (device));
 	}
 
 	/* check if we need to notify */
 	since = timeval.tv_sec - gcm_device_get_modified_time (device);
 	if (threshold > since || TRUE)
 		gcm_session_notify_recalibrate (title, message, kind);
+	g_free (message);
 }
 
 /**



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