diff options
author | Olivier Duchateau <olivierd@FreeBSD.org> | 2014-05-21 17:21:38 +0000 |
---|---|---|
committer | Olivier Duchateau <olivierd@FreeBSD.org> | 2014-05-21 17:21:38 +0000 |
commit | 8dbfc443c3ab0193b8a9cea70cb63abdee3287fd (patch) | |
tree | 81b1eb0919bf9be2ec73bc902dc7da2b92756453 /sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wavelan.c | |
parent | Fix build with SASL option. (diff) |
- Convert to USES= libtool tar:bzip2
- Add new patch, 'patch-panel-plugin__wavelan.ci', in order to change percentage
values (25%, 50% and 75%, instead 40%, 55% and 70%)
- Fix signal quality
- Bump PORTREVISION
Submitted by: J.R. Oldroyd <fbsd@opal.com>
Obtained from: http://lists.freebsd.org/pipermail/freebsd-xfce/2014-May/000914.html
Notes
Notes:
svn path=/head/; revision=354754
Diffstat (limited to 'sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wavelan.c')
-rw-r--r-- | sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wavelan.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wavelan.c b/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wavelan.c new file mode 100644 index 000000000000..388d25de3f85 --- /dev/null +++ b/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wavelan.c @@ -0,0 +1,35 @@ +--- ./panel-plugin/wavelan.c.orig 2012-06-29 20:07:10.000000000 +0000 ++++ ./panel-plugin/wavelan.c 2014-05-20 21:45:00.000000000 +0000 +@@ -98,11 +98,11 @@ + + if (wavelan->signal_colors) { + /* set color */ +- if (state > 70) ++ if (state > 75) + gdk_color_parse(signal_color_strong, &color); +- else if (state > 55) ++ else if (state > 50) + gdk_color_parse(signal_color_good, &color); +- else if (state > 40) ++ else if (state > 25) + gdk_color_parse(signal_color_weak, &color); + else + gdk_color_parse(signal_color_bad, &color); +@@ -163,7 +163,16 @@ + } + } + else { +- wavelan_set_state(wavelan, stats.ws_quality); ++ if (strcmp(stats.ws_qunit, "dBm") == 0) ++ /* ++ * Usual formula is: ++ * qual = 4 * (signal - noise) ++ * where noise is typically about -96dBm, but we don't have ++ * the actual noise value here, so approximate one. ++ */ ++ wavelan_set_state(wavelan, 4 * (stats.ws_quality - (-96))); ++ else ++ wavelan_set_state(wavelan, stats.ws_quality); + + if (strlen(stats.ws_netname) > 0) + tip = g_strdup_printf("%s: %d%s at %dMb/s", stats.ws_netname, stats.ws_quality, stats.ws_qunit, stats.ws_rate); |