mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-16 06:40:41 +00:00
2004-08-25 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessApplet.c - Rebuild the menu whenever a user clicks git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@75 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
d9abb16b8b
commit
21862371b6
|
@ -1,3 +1,8 @@
|
|||
2004-08-25 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* panel-applet/NMWirelessApplet.c
|
||||
- Rebuild the menu whenever a user clicks
|
||||
|
||||
2004-08-25 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* panel-applet/NMWirelessApplet.c
|
||||
|
|
|
@ -172,14 +172,6 @@ static int nmwa_redraw_timeout (NMWirelessApplet *applet)
|
|||
nmwa_update_state (applet);
|
||||
nmwa_redraw (applet);
|
||||
|
||||
if (applet->applet_state != applet->old_state)
|
||||
{
|
||||
if (applet->menu)
|
||||
nmwa_dispose_menu (applet);
|
||||
applet->menu = nmwa_populate_menu (applet);
|
||||
applet->old_state = applet->applet_state;
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
@ -454,7 +446,10 @@ static void nmwa_button_clicked (GtkWidget *button, NMWirelessApplet *applet)
|
|||
gtk_menu_popdown (GTK_MENU (applet->menu));
|
||||
else
|
||||
{
|
||||
nmwa_redraw_timeout (applet);
|
||||
if (applet->menu)
|
||||
nmwa_dispose_menu (applet);
|
||||
applet->menu = nmwa_populate_menu (applet);
|
||||
|
||||
gtk_menu_popup (GTK_MENU (applet->menu), NULL, NULL, nmwa_get_menu_pos,
|
||||
applet, 0, gtk_get_current_event_time());
|
||||
}
|
||||
|
|
|
@ -82,7 +82,6 @@ typedef struct
|
|||
GMutex *networks_mutex;
|
||||
GSList *networks;
|
||||
AppletState applet_state;
|
||||
AppletState old_state;
|
||||
|
||||
/* Direct UI elements */
|
||||
GtkWidget *pixmap;
|
||||
|
|
|
@ -760,22 +760,17 @@ fprintf( stderr, "ServiceCreate state = (%d)\n", applet->applet_state);
|
|||
dbus_error_init (&error);
|
||||
if ( dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &service, DBUS_TYPE_INVALID)
|
||||
&& (strcmp (service, NM_DBUS_SERVICE) == 0))
|
||||
{
|
||||
applet->applet_state = APPLET_STATE_NO_NM;
|
||||
fprintf( stderr, "ServiceDeleted state = (%d)\n", applet->applet_state);
|
||||
}
|
||||
}
|
||||
else if ( dbus_message_is_signal (message, NM_DBUS_INTERFACE, "WirelessNetworkAppeared")
|
||||
|| dbus_message_is_signal (message, NM_DBUS_INTERFACE, "WirelessNetworkDisappeared"))
|
||||
{
|
||||
fprintf( stderr, "Updating wireless networks\n");
|
||||
nmwa_dbus_update_wireless_network_list (applet);
|
||||
}
|
||||
else if ( dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNowActive")
|
||||
|| dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNoLongerActive")
|
||||
|| dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceActivating"))
|
||||
{
|
||||
fprintf( stderr, "Updating network state\n");
|
||||
nmwa_dbus_update_network_state (applet);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue