Menu bar display looks like a modem is present while it is not
Reported by Nick Hibma | February 18th, 2010 @ 07:32 PM
When first starting up CheetahWatch indicates no modem present. Connecting the modem shows signal level. Removing the modem again, leaves the signal level as is and does not revert to the 'no modem present' indication.
The menu entry says not connected.
Comments and changes to this ticket
-

Nick Hibma February 18th, 2010 @ 07:53 PM
Not pretending that I understand the code, but would this do? ... Hm. More testing shows that calling haveModem (instead of haveNoModem; leaving out the haveNoModem function completely) is sufficient. To be honest I am pretty clueless (still) when it comes to UI code on the Mac.
I guess that it is sufficient to trigger an update of the UI when leaving mainController.
diff --git a/Classes/CWMain.m b/Classes/CWMain.m index d365378..63dd6d5 100644 --- a/Classes/CWMain.m +++ b/Classes/CWMain.m @@ -302,6 +302,18 @@ void calloutProc (SCNetworkConnectionRef connection, SCNetworkConnectionStatus s [connectedInStatus setStringValue:@"Not connected"]; } +// called by the monitor thread to say "Um... No." +-(void)haveNoModem +{ +// NSImage *imageFromBundle = [NSImage imageNamed:@"have-modem.png"]; + [statusItem setTitle:@"?"]; + //[status setImage: imageFromBundle]; + [self clearAllUI]; + [self performSelectorOnMainThread:@selector(haveModemMain:) withObject:nil waitUntilDone:YES]; + [statusItemConectedFor setTitle:@"No modem"]; + [connectedInStatus setStringValue:@"No modem"]; +} + -(BOOL)storeUsageHistory { return [[NSUserDefaults standardUserDefaults] boolForKey:@"CWStoreHistory"]; @@ -686,6 +706,9 @@ void calloutProc (SCNetworkConnectionRef connection, SCNetworkConnectionStatus s } } } + + [mainController haveNoModem]; + [mainController performSelectorOnMainThread:@selector(noModem:) withObject:nil waitUntilDone:YES]; [pool release]; free(buf_stream); -

Nick Hibma March 28th, 2011 @ 01:18 AM
- State changed from new to resolved
- Milestone order changed from 0 to 0
This seems to have been resolved in the 1.4 version. I've not seen a wrong indicator. And the code has changed significantly for this patch to be useful.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
This little mac app provides you with signal strength, network mode (GRPS/WCDMA/HSDPA), network name control over your connection, and statistics about your current connection (current throughput, total data transferred, connection time). It does this through a little icon in your menu bar (and a bigger window, if you want to see it), and also helps you keep track of your usage - no need for a nasty surprise from your provider.
People watching this ticket
- Nobody is watching this ticket.