diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2006-04-15 07:39:33 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2006-04-15 07:39:33 +0000 |
commit | a5b3ca1ec5096d1d59b2b259372cb1750717f58a (patch) | |
tree | 636053ce59f783a99f08b646677c669c3284b9ac | |
parent | 6bad45f28633bc6efae5cb31e1d7cce42bdd98d2 (diff) |
Add FreeBSD interface name support and interface type support.
PR: 95758
Submitted by: Kevin Oberman <oberman@es.net> (based on)
Notes
Notes:
svn path=/head/; revision=159563
-rw-r--r-- | net/netspeed_applet/Makefile | 2 | ||||
-rw-r--r-- | net/netspeed_applet/files/patch-src_netspeed.c | 48 |
2 files changed, 49 insertions, 1 deletions
diff --git a/net/netspeed_applet/Makefile b/net/netspeed_applet/Makefile index c7d5dcb7130f..0ba1fd9bf951 100644 --- a/net/netspeed_applet/Makefile +++ b/net/netspeed_applet/Makefile @@ -7,7 +7,7 @@ PORTNAME= netspeed_applet PORTVERSION= 0.12.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net gnome MASTER_SITES= http://www.wh-hms.uni-ulm.de/~mfcn/shared/netspeed/ diff --git a/net/netspeed_applet/files/patch-src_netspeed.c b/net/netspeed_applet/files/patch-src_netspeed.c new file mode 100644 index 000000000000..d19ecd4969a1 --- /dev/null +++ b/net/netspeed_applet/files/patch-src_netspeed.c @@ -0,0 +1,48 @@ +--- src/netspeed.c.orig Sat Apr 15 03:17:56 2006 ++++ src/netspeed.c Sat Apr 15 03:27:09 2006 +@@ -164,11 +164,17 @@ change_icons(NetspeedApplet *applet) + { + if (strstr(device, "ppp")) + type = gdk_pixbuf_new_from_xpm_data(ICON_PPP); +- else if (!strcmp(device, "lo")) ++ else if (strstr(device, "tun")) ++ type = gdk_pixbuf_new_from_xpm_data(ICON_PPP); ++ else if (strstr(device, "lo")) + type = gdk_pixbuf_new_from_xpm_data(ICON_LO); +- else if (strstr(device, "lip")) ++ else if (strstr(device, "plip")) + type = gdk_pixbuf_new_from_xpm_data(ICON_PLIP); +- else if (strstr(device, "wlan")) ++ else if (strstr(device, "ath") || strstr(device, "an") || ++ strstr(device, "awi") || strstr(device, "iwi") || ++ strstr(device, "ipw") || strstr(device, "ndis") || ++ strstr(device, "ral") || strstr(device, "ural") || ++ strstr(device, "wi") || strstr(device, "wl")) + type = gdk_pixbuf_new_from_xpm_data(ICON_WLAN); + else + type = gdk_pixbuf_new_from_xpm_data(ICON_ETH); +@@ -386,7 +392,7 @@ search_for_up_if(NetspeedApplet *applet) + + devices = get_available_devices(); + for (tmp = devices; tmp; tmp = g_list_next(tmp)) { +- if (!g_str_equal(tmp->data, "lo")) { ++ if (!g_str_equal(tmp->data, "lo0")) { + info = get_device_info(tmp->data); + if (info.running) { + free_device_info(&applet->devinfo); +@@ -1387,13 +1393,13 @@ netspeed_applet_factory(PanelApplet *app + GList *ptr, *devices = get_available_devices(); + ptr = devices; + while (ptr) { +- if (!g_str_equal(ptr->data, "lo")) ++ if (!g_str_equal(ptr->data, "lo0")) + applet->devinfo = get_device_info(ptr->data); + ptr = g_list_next(ptr); + } + free_devices_list(devices); + } +- if (!applet->devinfo.name) applet->devinfo = get_device_info("lo"); ++ if (!applet->devinfo.name) applet->devinfo = get_device_info("lo0"); + applet->device_has_changed = TRUE; + + applet->tooltips = gtk_tooltips_new(); |