[network-manager-applet] cdma: show roaming state in tooltip



commit afad7fc6af6261ce02ba8b65eb6e17ea16f308cb
Author: Dan Williams <dcbw redhat com>
Date:   Sat Feb 27 23:12:23 2010 -0800

    cdma: show roaming state in tooltip

 src/applet-device-cdma.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/applet-device-cdma.c b/src/applet-device-cdma.c
index f901e26..d0ea99f 100644
--- a/src/applet-device-cdma.c
+++ b/src/applet-device-cdma.c
@@ -458,8 +458,17 @@ cdma_get_icon (NMDevice *device,
 	case NM_DEVICE_STATE_ACTIVATED:
 		pixbuf = nma_icon_check_and_load ("nm-device-wwan", &applet->wwan_icon, applet);
 		if ((info->cdma1x_state || info->evdo_state) && info->quality_valid) {
-			*tip = g_strdup_printf (_("Mobile broadband connection '%s' active: (%d%%)"),
-			                        id, info->quality);
+			gboolean roaming = FALSE;
+
+			if (info->evdo_state == 3)
+				roaming = TRUE;
+			else if (info->cdma1x_state == 3)
+				roaming = TRUE;
+
+			*tip = g_strdup_printf (_("Mobile broadband connection '%s' active: (%d%%%s%s)"),
+			                        id, info->quality,
+			                        roaming ? ", " : "",
+			                        roaming ? _("roaming") : "");
 		} else
 			*tip = g_strdup_printf (_("Mobile broadband connection '%s' active"), id);
 		break;



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