Version: (using KDE 4.4.2) OS: Linux Installed from: RedHat RPMs The patch adds "Enable networking" button to knetworkmanager. This allows users to put asleep or awake NetworkManaer daemon. It is especially handy when starting with NetworkManager in the asleep state. Without that, users don't have an option to enable networking and are often confused.
Created attachment 43751 [details] Add "Enable networking" button
A few days ago Dan Williams added Enable() method and NetworkingEnabled property to org.freedesktop.NetworkManager. These are meant to be used instead of Sleep() by clients (Sleep() is now dedicated to suspend/resume). More info in https://bugzilla.redhat.com/show_bug.cgi?id=589108 and NetworkManager commit 5ca1a9d546be81b54e57d525b54ff92597de6115 (0.7.x branch). Patches here add the new functionality to solid, knetworkmanager and plasma applet with proper handling when new functionality is not available: 1) kde-solid-net-enable.patch patch for xmls for Solid by Dan 2) kde-solid-net-enable2.patch uses the new D-Bus bits in Solid networkmanager; fall back to Sleep() when older NetworkManager is in use 3) kde-solid-net-enable3.patch adds snetworkingEnabledChanged() signal to abstract class for Solid::Control 4) knetworkmanager_applet_enable_networking.patch adds proper "Enable networking" functionality to both knetworkmanager and plasma applet; obsoletes my first patch in comment #1
Created attachment 43936 [details] patch1
Created attachment 43937 [details] patch2
Created attachment 43938 [details] patch3
Created attachment 43939 [details] patch4
can solve ? bug #232531 There is no easy way to enable disabled networking bug #235477 knetworkmanager does not have an option to enable/disable networking bug #226615 network manager disabled button
(In reply to comment #7) > can solve ? > bug #232531 There is no easy way to enable disabled networking > bug #235477 knetworkmanager does not have an option to enable/disable > networking > bug #226615 network manager disabled button And maybe the following? bug #223030 Knetworkmanager can not "able networking"
I'm testing these out on fedora 13 against kde-4.4.4 and a recent networkmanagement snapshot, and I can report I think we have a winner. (though a small oddity that I'm not sure how I feel about yet is that when networking enabled is deselected, the knm systray icon gets hidden) Now, considering this includes some modifications to solid, even if they seem simple, obvious, and correct to my naive eyes, how best to move forward here?
Asked onlist for further feedback, see http://mail.kde.org/pipermail/kde-networkmanager/2010-September/000578.html One comment to improve the patch is: Please change this slot to use the parameter enabled instead of doing a solid call, the parameter is there for that reason: +void NMPopup::managerNetworkingEnabledChanged(bool enabled) +{ + kDebug() << "NM daemon changed networking enable state" << enabled; + m_networkingCheckBox- >setChecked(Solid::Control::NetworkManager::isNetworkingEnabled()); +} +
(In reply to comment #10) > Asked onlist for further feedback, see > http://mail.kde.org/pipermail/kde-networkmanager/2010-September/000578.html > Thanks for the info. I'll comment there. > One comment to improve the patch is: > > Please change this slot to use the parameter enabled instead of doing a > solid call, the parameter is there for that reason: > > +void NMPopup::managerNetworkingEnabledChanged(bool enabled) > +{ > + kDebug() << "NM daemon changed networking enable state" << enabled; > + m_networkingCheckBox- > >setChecked(Solid::Control::NetworkManager::isNetworkingEnabled()); > +} > + Yes, that's a good point. It's better to keep things simple ;) The 'enabled' parameter passing by the signal can be used here. Tested and including corrected patch.
Created attachment 51708 [details] patch4: use 'enabled' parameter in NMPopup::managerNetworkingEnabledChanged() Using 'enabled' parameter in slot NMPopup::managerNetworkingEnabledChanged() is simpler than calling a Solid method.
SVN commit 1176872 by lvsouza: Patch from Jirka Klimes to adapt Network Manager backend to a change in NM 0.8.1. Now sleep/wake is used just for that (making NM sleep and wake up), to enable/disable NM there is a new method called Enable. CCBUG: 238325 CCMAIL: kde-networkmanager@kde.org M +5 -0 libs/solid/control/ifaces/networkmanager.h M +2 -0 libs/solid/control/networkmanager.cpp M +4 -0 libs/solid/control/networkmanager.h M +6 -0 solid/networkmanager-0.7/dbus/introspection/nm-manager-client.xml M +28 -1 solid/networkmanager-0.7/dbus/introspection/nm-manager.xml M +12 -1 solid/networkmanager-0.7/dbus/nm-manager-clientinterface.h M +33 -1 solid/networkmanager-0.7/manager.cpp M +2 -0 solid/networkmanager-0.7/manager_p.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1176872
SVN commit 1176882 by lvsouza: Patch from Jirka Klimes to reflect a change in Solid Network Manager backend. CCBUG: 238325 CCMAIL: kde-networkmanager@kde.org M +8 -0 nmpopup.cpp M +2 -0 nmpopup.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1176882
marking fixed per previous commits, thanks.
SVN commit 1184819 by lvsouza: Patch from Jirka Klimes against monolithic KNM to reflect a change in Solid Network Manager backend. CCBUG: 238325 CCMAIL: kde-networkmanager@kde.org CCMAIL: kde-hardware-devel@kde.org M +30 -1 knetworkmanagertrayicon.cpp M +10 -0 knetworkmanagertrayicon.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1184819
*** Bug 223030 has been marked as a duplicate of this bug. ***
*** Bug 232531 has been marked as a duplicate of this bug. ***