gnome-system-tools r4096 - trunk/src/network



Author: carlosg
Date: Sat Jan 12 18:26:12 2008
New Revision: 4096
URL: http://svn.gnome.org/viewvc/gnome-system-tools?rev=4096&view=rev

Log:
2008-01-12  Carlos Garnacho  <carlosg gnome org>

        * ifaces-list.c (get_iface_secondary_text): Improve descriptive text
        for PPP interfaces.


Modified:
   trunk/src/network/ChangeLog
   trunk/src/network/ifaces-list.c

Modified: trunk/src/network/ifaces-list.c
==============================================================================
--- trunk/src/network/ifaces-list.c	(original)
+++ trunk/src/network/ifaces-list.c	Sat Jan 12 18:26:12 2008
@@ -306,9 +306,27 @@
     }
   else if (OOBS_IS_IFACE_PPP (iface))
     {
-      g_string_append_printf (str, _("<b>Phone number:</b> %s <b>Login:</b> %s"),
-			      oobs_iface_ppp_get_phone_number (OOBS_IFACE_PPP (iface)),
-			      oobs_iface_ppp_get_login (OOBS_IFACE_PPP (iface)));
+      const gchar *type;
+
+      type = oobs_iface_ppp_get_connection_type (OOBS_IFACE_PPP (iface));
+
+      if (strcmp (type, "modem") == 0 ||
+	  strcmp (type, "isdn") == 0)
+	g_string_append_printf (str, _("<b>Type:</b> %s <b>Phone number:</b> %s"),
+				type, oobs_iface_ppp_get_phone_number (OOBS_IFACE_PPP (iface)));
+      else if (strcmp (type, "gprs") == 0)
+	g_string_append_printf (str, _("<b>Type:</b> %s <b>Access point name:</b> %s"),
+				type, oobs_iface_ppp_get_apn (OOBS_IFACE_PPP (iface)));
+      else if (strcmp (type, "pppoe") == 0)
+	{
+	  OobsIfaceEthernet *ethernet;
+
+	  ethernet = oobs_iface_ppp_get_ethernet (OOBS_IFACE_PPP (iface));
+	  g_string_append_printf (str, _("<b>Type:</b> %s <b>Ethernet interface:</b> %s"),
+				  type, oobs_iface_get_device_name (OOBS_IFACE (ethernet)));
+	}
+      else
+	g_string_append_printf (str, _("<b>Type:</b> %s"), type);
     }
 
   text = str->str;



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