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



commit 5d9868fa11bb1793f580ce8a6b42c702cc993295
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 a93d90b..061a8e4 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -872,13 +872,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]