2004-10-15 Dan Williams <dcbw@redhat.com>

* panel-applet/NMWirelessApplet.[ch]
		- Fix up corner cases in applet state, making it
			look more responsive.  Change state to "connecting" when
			the user is forcing a device too.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@248 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2004-10-15 20:54:59 +00:00
parent ac79837126
commit 5b7f4270e6
2 changed files with 26 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2004-10-15 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessApplet.[ch]
- Fix up corner cases in applet state, making it
look more responsive. Change state to "connecting" when
the user is forcing a device too.
2004-10-15 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAPList.c

View file

@ -109,12 +109,29 @@ static void nmwa_update_network_state (NMWirelessApplet *applet)
{
g_return_if_fail (applet != NULL);
if (!applet->connection)
{
applet->applet_state = APPLET_STATE_NO_NM;
return;
}
if (applet->applet_state == APPLET_STATE_NO_NM)
return;
if (!applet->nm_status)
{
applet->applet_state = APPLET_STATE_NO_CONNECTION;
return;
}
if ( applet->forcing_device
&& (applet->applet_state == APPLET_STATE_WIRELESS_CONNECTING)
&& (strcmp (applet->nm_status, "connected") == 0))
{
return;
}
applet->forcing_device = FALSE;
if (strcmp (applet->nm_status, "scanning") == 0)
{
applet->applet_state = APPLET_STATE_WIRELESS_SCANNING;
@ -757,6 +774,8 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
*/
if (net)
{
applet->applet_state = APPLET_STATE_WIRELESS_CONNECTING;
applet->forcing_device = TRUE;
nmwa_dbus_set_device (applet->connection, default_dev, net);
network_device_unref (default_dev);
wireless_network_unref (net);