mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 19:40:34 +01:00
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
This commit is contained in:
parent
1a50bb4b57
commit
5481b79ddb
2 changed files with 23 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
|||
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"));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue