[network-manager-applet] vpn: show notification about successful VPN connection even if VPN banner isn't available



commit eba4eadc7afb0f3796156425b825d9e4a021ff25
Author: JiÅ?í KlimeÅ¡ <jklimes redhat com>
Date:   Wed Oct 13 15:21:33 2010 +0200

    vpn: show notification about successful VPN connection even if VPN banner isn't available

 src/applet.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 87a7ea2..e451f75 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -868,13 +868,15 @@ vpn_connection_state_changed (NMVPNConnection *vpn,
 		break;
 	case NM_VPN_CONNECTION_STATE_ACTIVATED:
 		banner = nm_vpn_connection_get_banner (vpn);
-		if (banner && strlen (banner)) {
-			title = _("VPN Login Message");
-			msg = g_strdup_printf ("%s\n", banner);
-			applet_do_notify (applet, NOTIFY_URGENCY_LOW, title, msg,
-			                  "gnome-lockscreen", NULL, NULL, NULL, NULL);
-			g_free (msg);
-		}
+		if (banner && strlen (banner))
+			msg = g_strdup_printf ("VPN connection has been successfully established.\n\n%s\n", banner);
+		else
+			msg = g_strdup ("VPN connection has been successfully established.\n");
+
+		title = _("VPN Login Message");
+		applet_do_notify (applet, NOTIFY_URGENCY_LOW, title, msg,
+		                  "gnome-lockscreen", NULL, NULL, NULL, NULL);
+		g_free (msg);
 
 		connection = applet_get_connection_for_active (applet, NM_ACTIVE_CONNECTION (vpn));
 		if (connection)



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