Commit 5481b79d authored by Chris Aillon's avatar Chris Aillon Committed by Chris Aillon
Browse files

2005-09-01 Christopher Aillon <caillon@redhat.com>

	* gnome/applet/applet.c:
	Only show the "Stop/Start All Wireless Devices" menuitem
	if we actually have wireless devices.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@920 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 1a50bb4b
2005-09-01 Christopher Aillon <caillon@redhat.com>
* gnome/applet/applet.c:
Only show the "Stop/Start All Wireless Devices" menuitem
if we actually have wireless devices.
* gnome/applet/applet-dbus-info.c:
* gnome/applet/applet.c:
* gnome/applet/other-network-dialog.c:
......
......@@ -2022,13 +2022,31 @@ static GtkWidget *nmwa_dropdown_menu_create (GtkMenuItem *parent, NMWirelessAppl
*/
static void nmwa_context_menu_update (NMWirelessApplet *applet)
{
GtkWidget *image;
GtkWidget *image;
GSList *element;
gboolean have_wireless = FALSE;
g_return_if_fail (applet != NULL);
g_return_if_fail (applet->stop_wireless_item != NULL);
gtk_widget_destroy (applet->stop_wireless_item);
for (element = applet->device_list; element; element = element->next)
{
NetworkDevice *dev = (NetworkDevice *)(element->data);
g_assert (dev);
if (network_device_get_type (dev) == DEVICE_TYPE_WIRELESS_ETHERNET)
{
have_wireless = TRUE;
break;
}
}
if (!have_wireless)
return;
if (applet->wireless_enabled)
{
applet->stop_wireless_item = gtk_image_menu_item_new_with_mnemonic (_("_Stop All Wireless Devices"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment