From 9c29f9eabbe0fd2bb8bbcba4b1ad7cbc099e4425 Mon Sep 17 00:00:00 2001 From: Markus Brueffer Date: Sat, 22 Jan 2005 01:39:05 +0000 Subject: Add knemo 0.3.1, a network monitor for KDE. KNemo offers a network monitor similar to the one found in Windows. For every network interface it displays an icon in the systray. http://www.kde-apps.org/content/show.php?content=12956 Note: There are two extensions to the original KNemo: 1. Multiple IPs on devices are supported 2. The semantics of not available devices were changed from: "device is not up" to: "device is not up" or "device is up but has no carrier/is not associated" which mimics the behaviour of the Windows counterpart more closely Bugs: The stats page for wireless specific statistics doesn't work, yet --- .../files/patch-knemod-interfacestatusdialog.cpp | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 net/knemo-kde4/files/patch-knemod-interfacestatusdialog.cpp (limited to 'net/knemo-kde4/files/patch-knemod-interfacestatusdialog.cpp') diff --git a/net/knemo-kde4/files/patch-knemod-interfacestatusdialog.cpp b/net/knemo-kde4/files/patch-knemod-interfacestatusdialog.cpp new file mode 100644 index 000000000000..822857eff083 --- /dev/null +++ b/net/knemo-kde4/files/patch-knemod-interfacestatusdialog.cpp @@ -0,0 +1,50 @@ +--- knemod/interfacestatusdialog.cpp.orig Sat Jan 22 00:11:02 2005 ++++ knemod/interfacestatusdialog.cpp Sat Jan 22 00:15:24 2005 +@@ -24,6 +24,7 @@ + #include + + #include ++#include + #include + #include + #include +@@ -69,6 +70,10 @@ + mTimer = new QTimer(); + connect( mTimer, SIGNAL( timeout() ), this, SLOT( updateDialog() ) ); + mTimer->start( 1000 ); ++ ++#ifdef Q_OS_FREEBSD ++ connect( comboBoxIP, SIGNAL( activated(int) ), this, SLOT( updateDialog() ) ); ++#endif + } + + InterfaceStatusDialog::~InterfaceStatusDialog() +@@ -152,12 +157,28 @@ + if ( data.available ) + { + // ip tab ++#ifdef Q_OS_FREEBSD ++ if ( data.addrData.count() != comboBoxIP->count() ) ++ comboBoxIP->clear(); ++ ++ QDictIterator it( data.addrData ); ++ for( ; it.current(); ++it ) ++ if (!comboBoxIP->contains(it.currentKey())) ++ comboBoxIP->insertItem( it.currentKey() ); ++ ++ textLabelSubnet->setText(data.addrData[ comboBoxIP->currentText() ]->subnetMask); ++#else + textLabelIP->setText( data.ipAddress ); + textLabelSubnet->setText( data.subnetMask ); ++#endif + if ( mInterface->getType() == Interface::ETHERNET ) + { + variableLabel1->setText( i18n( "Broadcast Address:" ) ); ++#ifdef Q_OS_FREEBSD ++ variableText1->setText( data.addrData[ comboBoxIP->currentText() ]->broadcastAddress); ++#else + variableText1->setText( data.broadcastAddress ); ++#endif + variableLabel2->setText( i18n( "Default Gateway:" ) ); + variableText2->setText( data.defaultGateway ); + variableLabel3->setText( i18n( "HW-Address:" ) ); -- cgit v1.2.3