Hello community,
here is the log from the commit of package NetworkManager-kde4 for openSUSE:Factory
checked in at Mon Nov 2 18:05:35 CET 2009.
--------
--- KDE/NetworkManager-kde4/NetworkManager-kde4.changes 2009-10-26 17:21:19.000000000 +0100
+++ /mounts/work_src_done/STABLE/NetworkManager-kde4/NetworkManager-kde4.changes 2009-11-02 16:29:15.000000000 +0100
@@ -1,0 +2,9 @@
+Mon Nov 2 15:28:16 UTC 2009 - wstephenson(a)novell.com
+
+- Update to svn1043876
+ * Sync dbus policy file with nm-applet
+ * Show correct wireless security widget when creating new
+ connections (bko#201993)
+ * Show correct dialog when creating new connections from popup
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ NetworkManager-kde4.spec ++++++
--- /var/tmp/diff_new_pack.4H39SK/_old 2009-11-02 18:05:20.000000000 +0100
+++ /var/tmp/diff_new_pack.4H39SK/_new 2009-11-02 18:05:20.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package NetworkManager-kde4 (Version 0.9.svn1040608)
+# spec file for package NetworkManager-kde4 (Version 0.9.svn1043876)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,7 +20,7 @@
Name: NetworkManager-kde4
BuildRequires: NetworkManager-devel kdebase4-workspace-devel libknotificationitem-devel
-Version: 0.9.svn1040608
+Version: 0.9.svn1043876
Release: 1
License: GPL v2 or later
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ networkmanager.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager/libs/ui/802_11_wirelesswidget.cpp new/networkmanager/libs/ui/802_11_wirelesswidget.cpp
--- old/networkmanager/libs/ui/802_11_wirelesswidget.cpp 2009-10-11 14:33:01.000000000 +0200
+++ new/networkmanager/libs/ui/802_11_wirelesswidget.cpp 2009-10-30 16:32:59.000000000 +0100
@@ -42,6 +42,7 @@
public:
Ui_Wireless80211Config ui;
Knm::WirelessSetting * setting;
+ QString originalSsid;
QString proposedSsid;
};
@@ -99,6 +100,7 @@
// need to check that ssids containing international characters are restored correctly
if (!d->setting->ssid().isEmpty()) {
d->ui.ssid->setText(QString::fromAscii(d->setting->ssid()));
+ d->originalSsid = QString::fromAscii(d->setting->ssid());
}
d->ui.bssid->setText(QString::fromAscii(d->setting->bssid()));
if (!d->setting->macaddress().isEmpty()) {
@@ -171,4 +173,16 @@
Q_D(const Wireless80211Widget);
return d->ui.ssid->text();
}
+
+bool Wireless80211Widget::enteredSsidIsDirty() const
+{
+ Q_D(const Wireless80211Widget);
+ return (d->ui.ssid->text() != d->originalSsid);
+}
+
+void Wireless80211Widget::setEnteredSsidClean()
+{
+ Q_D(Wireless80211Widget);
+ d->originalSsid = d->ui.ssid->text();
+}
// vim: sw=4 sts=4 et tw=100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager/libs/ui/802_11_wirelesswidget.h new/networkmanager/libs/ui/802_11_wirelesswidget.h
--- old/networkmanager/libs/ui/802_11_wirelesswidget.h 2009-10-11 14:33:01.000000000 +0200
+++ new/networkmanager/libs/ui/802_11_wirelesswidget.h 2009-10-30 16:32:59.000000000 +0100
@@ -37,6 +37,8 @@
void readConfig();
void writeConfig();
QByteArray selectedInterfaceHardwareAddress() const;
+ bool enteredSsidIsDirty() const;
+ void setEnteredSsidClean();
QString enteredSsid() const;
public Q_SLOTS:
void scanClicked();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager/libs/ui/security/wirelesssecuritysettingwidget.cpp new/networkmanager/libs/ui/security/wirelesssecuritysettingwidget.cpp
--- old/networkmanager/libs/ui/security/wirelesssecuritysettingwidget.cpp 2009-10-21 12:44:33.000000000 +0200
+++ new/networkmanager/libs/ui/security/wirelesssecuritysettingwidget.cpp 2009-10-30 16:32:59.000000000 +0100
@@ -45,20 +45,31 @@
#include "wpapskwidget.h"
#include "wpaeapwidget.h"
+/**
+ * Used to relate a security widget instance to its index in the QStackedWidget of security widgets
+ */
+class SecurityWidgetPair : public QPair<int, SecurityWidget*>
+{
+public:
+ SecurityWidgetPair()
+ {
+ first = -1;
+ second = 0;
+ }
+};
class WirelessSecuritySettingWidgetPrivate : public SettingWidgetPrivate
{
public:
WirelessSecuritySettingWidgetPrivate()
- : noSecurityIndex(-1), staticWepIndex(-1), leapIndex(-1), dynamicWepIndex(-1), wpaPskIndex(-1), wpaEapIndex(-1), currentSecurity(-1),
- settingWireless(0), settingSecurity(0), setting8021x(0)
+ : settingWireless(0), settingSecurity(0), setting8021x(0)
{
}
- void registerSecurityType(SecurityWidget * securityWidget, const QString & label, int & index)
+ void registerSecurityType(SecurityWidgetPair & security, const QString & label)
{
ui.cboType->addItem(label);
- index = ui.securityWidgets->addWidget(securityWidget);
+ security.first = ui.securityWidgets->addWidget(security.second);
}
void setCurrentSecurityWidget(int index)
@@ -71,13 +82,12 @@
void clearSecurityWidgets()
{
- noSecurityIndex = -1;
- staticWepIndex = -1;
- leapIndex = -1;
- dynamicWepIndex = -1;
- wpaPskIndex = -1;
- wpaEapIndex = -1;
- currentSecurity = -1;
+ nullSecurity.first = -1;
+ staticWep.first = -1;
+ leap.first = -1;
+ dynamicWep.first = -1;
+ wpaPsk.first = -1;
+ wpaEap.first = -1;
ui.cboType->clear();
@@ -92,13 +102,13 @@
}
Ui_WirelessSecurity ui;
- int noSecurityIndex;
- int staticWepIndex;
- int leapIndex;
- int dynamicWepIndex;
- int wpaPskIndex;
- int wpaEapIndex;
- int currentSecurity;
+ SecurityWidgetPair nullSecurity;
+ SecurityWidgetPair staticWep;
+ SecurityWidgetPair leap;
+ SecurityWidgetPair dynamicWep;
+ SecurityWidgetPair wpaPsk;
+ SecurityWidgetPair wpaEap;
+
Knm::WirelessSetting * settingWireless;
Knm::WirelessSecuritySetting * settingSecurity;
Knm::Security8021xSetting * setting8021x;
@@ -160,38 +170,55 @@
// insecure
if (Knm::WirelessSecurity::possible(Knm::WirelessSecurity::None, ifaceCaps, (ap != 0), adhoc, apCaps, apWpa, apRsn)) {
- d->registerSecurityType(new NullSecurityWidget(d->connection, this), i18nc("Label for no wireless security", "None"), d->noSecurityIndex);
- }
-
- // WEP
- if (Knm::WirelessSecurity::possible(Knm::WirelessSecurity::StaticWep, ifaceCaps, (ap != 0), adhoc, apCaps, apWpa, apRsn)) {
- d->registerSecurityType(new WepWidget(WepWidget::Passphrase, d->connection, this), i18nc("Label for WEP wireless security", "WEP"), d->staticWepIndex);
+ if (!d->nullSecurity.second) {
+ d->nullSecurity.second = new NullSecurityWidget(d->connection, this);
+ }
+ d->registerSecurityType( d->nullSecurity, i18nc("Label for no wireless security", "None"));
}
// LEAP
if (Knm::WirelessSecurity::possible(Knm::WirelessSecurity::Leap, ifaceCaps, (ap != 0), adhoc, apCaps, apWpa, apRsn)) {
- d->registerSecurityType(new LeapWidget(d->connection, this), i18nc("Label for LEAP wireless security", "LEAP"), d->leapIndex);
+ if (!d->leap.second) {
+ d->leap.second = new LeapWidget(d->connection, this);
+ }
+ d->registerSecurityType(d->leap, i18nc("Label for LEAP wireless security", "LEAP"));
}
// Dynamic WEP
if (Knm::WirelessSecurity::possible(Knm::WirelessSecurity::DynamicWep, ifaceCaps, (ap != 0), adhoc, apCaps, apWpa, apRsn)) {
- d->registerSecurityType(new SecurityDynamicWep(d->connection, this), i18nc("Label for Dynamic WEP wireless security", "Dynamic WEP (802.1x)"), d->dynamicWepIndex);
+ if (!d->dynamicWep.second) {
+ d->dynamicWep.second = new SecurityDynamicWep(d->connection, this);
+ }
+ d->registerSecurityType(d->dynamicWep, i18nc("Label for Dynamic WEP wireless security", "Dynamic WEP (802.1x)"));
+ }
+
+ // WEP
+ if (Knm::WirelessSecurity::possible(Knm::WirelessSecurity::StaticWep, ifaceCaps, (ap != 0), adhoc, apCaps, apWpa, apRsn)) {
+ if (!d->staticWep.second) {
+ d->staticWep.second = new WepWidget(WepWidget::Passphrase, d->connection, this);
+ }
+ d->registerSecurityType(d->staticWep, i18nc("Label for WEP wireless security", "WEP"));
}
// WPA-PSK
if (Knm::WirelessSecurity::possible(Knm::WirelessSecurity::WpaPsk, ifaceCaps, (ap != 0), adhoc, apCaps, apWpa, apRsn)
|| Knm::WirelessSecurity::possible(Knm::WirelessSecurity::Wpa2Psk, ifaceCaps, (ap != 0), adhoc, apCaps, apWpa, apRsn)
) {
- d->registerSecurityType(new WpaPskWidget(d->connection, this), i18nc("Label for WPA-PSK wireless security", "WPA/WPA2 Personal"), d->wpaPskIndex);
+ if (!d->wpaPsk.second) {
+ d->wpaPsk.second = new WpaPskWidget(d->connection, this);
+ }
+ d->registerSecurityType(d->wpaPsk, i18nc("Label for WPA-PSK wireless security", "WPA/WPA2 Personal"));
}
// WPA-EAP
if (Knm::WirelessSecurity::possible(Knm::WirelessSecurity::WpaEap, ifaceCaps, (ap != 0), adhoc, apCaps, apWpa, apRsn)
|| Knm::WirelessSecurity::possible(Knm::WirelessSecurity::Wpa2Eap, ifaceCaps, (ap != 0), adhoc, apCaps, apWpa, apRsn)
) {
- d->registerSecurityType(new WpaEapWidget(d->connection, this), i18nc("Label for WPA-EAP wireless security", "WPA/WPA2 Enterprise"), d->wpaEapIndex);
+ if (!d->wpaEap.second) {
+ d->wpaEap.second = new WpaEapWidget(d->connection, this);
+ }
+ d->registerSecurityType(d->wpaEap, i18nc("Label for WPA-EAP wireless security", "WPA/WPA2 Enterprise"));
}
- readConfig();
- readSecrets();
+ d->setCurrentSecurityWidget(d->ui.cboType->count() - 1);
}
WirelessSecuritySettingWidget::~WirelessSecuritySettingWidget()
@@ -210,36 +237,38 @@
Q_D(WirelessSecuritySettingWidget);
SecurityWidget * sw = 0;
if (d->settingWireless->security().isEmpty()) {
- d->setCurrentSecurityWidget(d->noSecurityIndex);
+ d->setCurrentSecurityWidget(d->nullSecurity.first);
} else {
if (d->settingSecurity->isNull()) {
//HACK - default new connections without an AP or those which support both EAP and PSK to WPA-PSK.
- if (d->wpaPskIndex >= 0) {
+ if (d->wpaPsk.first >= 0) {
d->settingSecurity->setSecurityType(Knm::WirelessSecuritySetting::EnumSecurityType::WpaPsk);
- } else if (d->wpaEapIndex >= 0) {
+ } else if (d->wpaEap.first >= 0) {
d->settingSecurity->setSecurityType(Knm::WirelessSecuritySetting::EnumSecurityType::WpaEap);
- } else if (d->staticWepIndex >= 0) {
+ } else if (d->staticWep.first >= 0) {
d->settingSecurity->setSecurityType(Knm::WirelessSecuritySetting::EnumSecurityType::StaticWep);
}
}
+ // this will break if the setting's configured security type is not supported by any of the
+ // current hardware!
switch (d->settingSecurity->securityType()) {
case Knm::WirelessSecuritySetting::EnumSecurityType::None:
- d->setCurrentSecurityWidget(d->noSecurityIndex);
+ d->setCurrentSecurityWidget(d->nullSecurity.first);
break;
case Knm::WirelessSecuritySetting::EnumSecurityType::StaticWep:
- d->setCurrentSecurityWidget(d->staticWepIndex);
+ d->setCurrentSecurityWidget(d->staticWep.first);
break;
case Knm::WirelessSecuritySetting::EnumSecurityType::Leap:
- d->setCurrentSecurityWidget(d->leapIndex);
+ d->setCurrentSecurityWidget(d->leap.first);
break;
case Knm::WirelessSecuritySetting::EnumSecurityType::DynamicWep:
- d->setCurrentSecurityWidget(d->dynamicWepIndex);
+ d->setCurrentSecurityWidget(d->dynamicWep.first);
break;
case Knm::WirelessSecuritySetting::EnumSecurityType::WpaPsk:
- d->setCurrentSecurityWidget(d->wpaPskIndex);
+ d->setCurrentSecurityWidget(d->wpaPsk.first);
break;
case Knm::WirelessSecuritySetting::EnumSecurityType::WpaEap:
- d->setCurrentSecurityWidget(d->wpaEapIndex);
+ d->setCurrentSecurityWidget(d->wpaEap.first);
break;
}
@@ -259,31 +288,31 @@
{
Q_D(WirelessSecuritySettingWidget);
d->settingWireless->setSecurity(d->settingSecurity->name());
- if (d->ui.cboType->currentIndex() == d->noSecurityIndex) {
+ if (d->ui.cboType->currentIndex() == d->nullSecurity.first) {
d->setting8021x->setEnabled(false);
d->settingSecurity->setSecurityType(Knm::WirelessSecuritySetting::EnumSecurityType::None);
d->settingWireless->setSecurity("");
}
- else if (d->ui.cboType->currentIndex() == d->staticWepIndex) {
+ else if (d->ui.cboType->currentIndex() == d->staticWep.first) {
d->setting8021x->setEnabled(false);
d->settingSecurity->setSecurityType(Knm::WirelessSecuritySetting::EnumSecurityType::StaticWep); // FIXME
d->settingSecurity->setKeymgmt(Knm::WirelessSecuritySetting::EnumKeymgmt::None);
}
- else if (d->ui.cboType->currentIndex() == d->leapIndex) {
+ else if (d->ui.cboType->currentIndex() == d->leap.first) {
d->setting8021x->setEnabled(false);
d->settingSecurity->setSecurityType(Knm::WirelessSecuritySetting::EnumSecurityType::Leap); // FIXME
}
- else if (d->ui.cboType->currentIndex() == d->dynamicWepIndex) {
+ else if (d->ui.cboType->currentIndex() == d->dynamicWep.first) {
d->setting8021x->setEnabled(true);
d->settingSecurity->setSecurityType(Knm::WirelessSecuritySetting::EnumSecurityType::DynamicWep); // FIXME
d->settingSecurity->setKeymgmt(Knm::WirelessSecuritySetting::EnumKeymgmt::WPAEAP);
}
- else if (d->ui.cboType->currentIndex() == d->wpaPskIndex) {
+ else if (d->ui.cboType->currentIndex() == d->wpaPsk.first) {
d->setting8021x->setEnabled(false);
d->settingSecurity->setSecurityType(Knm::WirelessSecuritySetting::EnumSecurityType::WpaPsk); // FIXME
d->settingSecurity->setKeymgmt(Knm::WirelessSecuritySetting::EnumKeymgmt::WPAPSK);
}
- else if (d->ui.cboType->currentIndex() == d->wpaEapIndex) {
+ else if (d->ui.cboType->currentIndex() == d->wpaEap.first) {
d->setting8021x->setEnabled(true);
d->settingSecurity->setSecurityType(Knm::WirelessSecuritySetting::EnumSecurityType::WpaEap); // FIXME
d->settingSecurity->setKeymgmt(Knm::WirelessSecuritySetting::EnumKeymgmt::WPAEAP);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager/libs/ui/wirelesspreferences.cpp new/networkmanager/libs/ui/wirelesspreferences.cpp
--- old/networkmanager/libs/ui/wirelesspreferences.cpp 2009-10-11 14:33:01.000000000 +0200
+++ new/networkmanager/libs/ui/wirelesspreferences.cpp 2009-10-30 16:32:59.000000000 +0100
@@ -115,7 +115,7 @@
void WirelessPreferences::tabChanged(int index)
{
- if (index == m_securityTabIndex) {
+ if (index == m_securityTabIndex && m_wirelessWidget->enteredSsidIsDirty()) {
Solid::Control::WirelessNetworkInterface * ifaceForSsid = 0;
Solid::Control::AccessPoint * apForSsid = 0;
// look up AP given by m_wirelessWidget, and set it on m_securityWidget
@@ -147,6 +147,7 @@
}
}
m_securityWidget->setIfaceAndAccessPoint(ifaceForSsid, apForSsid);
+ m_wirelessWidget->setEnteredSsidClean();
}
}
// vim: sw=4 sts=4 et tw=100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager/monolithic/knetworkmanagertrayicon.cpp new/networkmanager/monolithic/knetworkmanagertrayicon.cpp
--- old/networkmanager/monolithic/knetworkmanagertrayicon.cpp 2009-10-23 17:18:49.000000000 +0200
+++ new/networkmanager/monolithic/knetworkmanagertrayicon.cpp 2009-10-30 21:52:13.000000000 +0100
@@ -248,7 +248,13 @@
kDebug() << "UCI" << unco->deviceUni();
widget = new UnconfiguredInterfaceItem(unco, 0);
widget->setObjectName(unco->deviceUni());
- connect (widget, SIGNAL(clicked()), this, SLOT(showOtherWirelessDialog()));
+ Solid::Control::NetworkInterface * iface
+ = Solid::Control::NetworkManager::findNetworkInterface(unco->deviceUni());
+ if (iface) {
+ if (iface->type() == Solid::Control::NetworkInterface::Ieee80211) {
+ connect (widget, SIGNAL(clicked()), this, SLOT(showOtherWirelessDialog()));
+ }
+ }
} else if (activatable->activatableType() == Knm::Activatable::VpnInterfaceConnection) {
Knm::VpnInterfaceConnection * vpn = static_cast<Knm::VpnInterfaceConnection*>(activatable);
kDebug() << "VPN" << vpn->connectionName();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager/monolithic/otherwirelessnetworkdialog.cpp new/networkmanager/monolithic/otherwirelessnetworkdialog.cpp
--- old/networkmanager/monolithic/otherwirelessnetworkdialog.cpp 2009-10-21 22:57:04.000000000 +0200
+++ new/networkmanager/monolithic/otherwirelessnetworkdialog.cpp 2009-10-30 15:58:45.000000000 +0100
@@ -74,12 +74,16 @@
Solid::Device* dev = 0;
QStringList itemStrings;
QString deviceText;
+ QString strengthString;
Knm::WirelessSecurity::Type best;
switch (activatable->activatableType()) {
case Knm::Activatable::HiddenWirelessInterfaceConnection:
wic = static_cast<Knm::HiddenWirelessInterfaceConnection*>(activatable);
best = Knm::WirelessSecurity::best(wic->interfaceCapabilities(), true, (wic->operationMode() == Solid::Control::WirelessNetworkInterface::Adhoc), wic->apCapabilities(), wic->wpaFlags(), wic->rsnFlags());
- itemStrings << wic->connectionName() << QString::fromLatin1("%1%").arg(wic->strength()) << Knm::WirelessSecurity::label(best);
+ if (wic->strength() >= 0) {
+ strengthString = QString::fromLatin1("%1%").arg(wic->strength());
+ }
+ itemStrings << wic->connectionName() << strengthString << Knm::WirelessSecurity::label(best);
item = new QTreeWidgetItem(itemStrings);
item->setIcon(0, SmallIcon("document-properties"));
item->setData(0, ItemActivatableRole, QVariant::fromValue(activatable));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager/monolithic/unconfiguredinterfaceitem.cpp new/networkmanager/monolithic/unconfiguredinterfaceitem.cpp
--- old/networkmanager/monolithic/unconfiguredinterfaceitem.cpp 2009-10-03 15:13:55.000000000 +0200
+++ new/networkmanager/monolithic/unconfiguredinterfaceitem.cpp 2009-10-30 21:52:13.000000000 +0100
@@ -76,7 +76,12 @@
d->activeIcon->show();
// disconnects us from to the activatable's activate slot, because this is handled indirectly by
// KnetworkManagerTrayIcon now.
- disconnect(this, SIGNAL(clicked()), unconfigured, SLOT(activate()));
+ Solid::Control::NetworkInterface * iface = Solid::Control::NetworkManager::findNetworkInterface(unconfigured->deviceUni());
+ if (iface) {
+ if (iface->type() == Solid::Control::NetworkInterface::Ieee80211) {
+ disconnect(this, SIGNAL(clicked()), unconfigured, SLOT(activate()));
+ }
+ }
}
UnconfiguredInterfaceItem::~UnconfiguredInterfaceItem()
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org