add network-manager support to /etc/acpi/wireless.sh

Bug #95927 reported by Nicolò Chieffo
2
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: acpi-support

Currently, if disabling wireless with the laptop hotkey, is not enough. In some cases network manager still tries to reconnect when the signal is lost (because the card is off) to prevent so, we can tell to network manager to not use wireless

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

please evaluate this patch

Revision history for this message
Paul Sladen (sladen) wrote :

Note to self, this is related to bug #20667 and there's some notes on:

  http://mail.gnome.org/archives/networkmanager-list/2005-November/msg00097.html

Changed in acpi-support:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Nicolò Chieffo (yelo3) wrote : Re: [Bug 95927] Re: add network-manager support to /etc/acpi/wireless.sh

it is great if we can use both methods, the setWirelessEnabled when
using the hotkey and the sleep one when sleeping!

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

in the case that we cannot use the dbus command to disable wireless because the applet does not get updated (bug or not?) we can still want to build a c file that uses the nm function

void nma_dbus_enable_wireless (NMApplet *applet, gboolean enabled)

checking the code if you pass to this function the applet and the status you want to set, it first calls setWirelessEnabled with that value, and then updates the applet menu.
The only difficould thing is how we can obtain the "instance" of the applet

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

Sorry that function does not update the menu item.
Also we should decide if the menu item should be unchecked or hidden

if we just uncheck the item there is the risk that the user re-enables it, and the led/rf_kill will no more be synced.
So in my opinion the best thing to do is to hide this item from the menu using

gtk_widget_hide (applet->stop_wireless_item); /* during off */
gtk_widget_show_all (applet->stop_wireless_item); /* during on */

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

future network-manager adds support for this. Bye bye

Changed in acpi-support:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.