New applet...

Dan Karmgard karmgard at ix.netcom.com
Mon Aug 25 01:48:23 CEST 2003


Hello Paul,
	Well, that was a tough nut to crack. However, I have at least a working
theory. I think the problem lies in how libgtop is reporting the device
flags that I use to detect if the device is active. I've made a patch
for pppdevice.c and attached it to this message. To apply copy the
attachment into xfce4-pppwatch-plugin-0.1.2/panel-plugin and enter 

	patch -p0 <pppdevice.c.patch

Then compile/install as usual. Let me know if this helps, and thanks for
testing efforts.

-- 
Dan Karmgard
karmgard at ix.netcom.com

 ------------------------------------- 
| Evil geniuses for a better tomorrow |
 -------------------------------------
-------------- next part --------------
--- pppdevice.c	2003-08-24 17:13:47.000000000 -0500
+++ pppdevice.c.new	2003-08-24 17:05:15.000000000 -0500
@@ -106,7 +106,7 @@
   running = netload.if_flags & (1<<GLIBTOP_IF_FLAGS_RUNNING);
   running = (running) ? TRUE : FALSE;
 
-  if ( !up || !running || !netload.address ) {
+  if ( !up || !netload.address ) {
     int i;
     for (i=0;i<9;i++)
       printf("%a");
@@ -155,7 +155,7 @@
       running = (running) ? TRUE : FALSE;
 
       /*-- If this device doesn't have an address, don't bother with it --*/
-      if ( up && running && netload.address != 0 ) {
+      if ( up && netload.address != 0 ) {
 	strncpy( (char *)&modem.device_name, names[i], (size_t)6 );
 	modem.online = TRUE;
 	if ( DEBUG )
@@ -180,7 +180,7 @@
     running = (running) ? TRUE : FALSE;
 
     /*-- If this device isn't up and running (with an address), don't bother with it --*/
-    if ( up && running && (netload.address != 0) ) {
+    if ( up && (netload.address != 0) ) {
       strncpy( (char *)&modem.device_name, pppwatch_device_name, (size_t)6 );
       modem.online = TRUE;
       if ( DEBUG )


More information about the Xfce mailing list