[network-manager-applet/NMA_0_8] core: indicate when WiFi is disabled by hardware switch (rh #533601)
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/NMA_0_8] core: indicate when WiFi is disabled by hardware switch (rh #533601)
- Date: Tue, 2 Nov 2010 09:39:39 +0000 (UTC)
commit 3f0ecbe458efbe2e172e4c1136940228caa56028
Author: JiÅ?à KlimeÅ¡ <jklimes redhat com>
Date: Tue Nov 2 10:36:37 2010 +0100
core: indicate when WiFi is disabled by hardware switch (rh #533601)
src/applet-device-wifi.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/applet-device-wifi.c b/src/applet-device-wifi.c
index 39c2f91..bf15ebb 100644
--- a/src/applet-device-wifi.c
+++ b/src/applet-device-wifi.c
@@ -730,6 +730,7 @@ wireless_add_menu_item (NMDevice *device,
NMAccessPoint *active_ap = NULL;
GSList *connections = NULL, *all, *iter;
gboolean wireless_enabled = TRUE;
+ gboolean wireless_hw_enabled = TRUE;
GSList *menu_items = NULL; /* All menu items we'll be adding */
NMNetworkMenuItem *item, *active_item = NULL;
GtkWidget *widget;
@@ -780,7 +781,11 @@ wireless_add_menu_item (NMDevice *device,
/* Notify user of unmanaged or unavailable device */
wireless_enabled = nm_client_wireless_get_enabled (applet->nm_client);
- widget = nma_menu_device_get_menu_item (device, applet, wireless_enabled ? NULL : _("wireless is disabled"));
+ wireless_hw_enabled = nm_client_wireless_hardware_get_enabled (applet->nm_client);
+ widget = nma_menu_device_get_menu_item (device, applet,
+ wireless_hw_enabled ?
+ (wireless_enabled ? NULL : _("wireless is disabled")) :
+ _("wireless is disabled by hardware radio switch"));
if (widget) {
gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget);
gtk_widget_show (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]