Change default backend from Nettools to Sys.

Some indentation cosmetic.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
pull/4/head
gregory guy 3 years ago
parent 3813914451
commit a9e1d50df4
No known key found for this signature in database
GPG Key ID: 2CC84A1CC6823AF8

@ -41,16 +41,16 @@ tde_setup_paths( )
##### optional stuff ##### optional stuff
option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
option( WITH_LIBIW "Enable build with libiw" ${WITH_ALL_OPTIONS} ) option( WITH_LIBIW "Enable build with libiw" ${WITH_ALL_OPTIONS} )
##### user requested modules ##### user requested modules
option( BUILD_ALL "Build all" ON ) option( BUILD_ALL "Build all" ON )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
##### configure checks ##### configure checks

@ -269,7 +269,7 @@ void ConfigDialog::load()
// select the backend from the config file // select the backend from the config file
bool foundBackend = false; bool foundBackend = false;
TQString backend = config->readEntry( "Backend", "Nettools" ); TQString backend = config->readEntry( "Backend", "Sys" );
int i; int i;
for ( i = 0; KCMRegistry[i].name != TQString(); i++ ) for ( i = 0; KCMRegistry[i].name != TQString(); i++ )
{ {
@ -282,7 +282,7 @@ void ConfigDialog::load()
if ( !foundBackend ) if ( !foundBackend )
{ {
i = 0; // use the first backend (Nettools) i = 0; // use the first backend (Sys)
} }
mDlg->comboBoxBackends->setCurrentItem( i ); mDlg->comboBoxBackends->setCurrentItem( i );
mDlg->textLabelBackendDescription->setText( KCMRegistry[i].description ); mDlg->textLabelBackendDescription->setText( KCMRegistry[i].description );

@ -46,8 +46,8 @@ struct DaemonRegistryEntry
DaemonRegistryEntry DaemonRegistry[] = DaemonRegistryEntry DaemonRegistry[] =
{ {
{ "Nettools", NetToolsBackend::createInstance },
{ "Sys", SysBackend::createInstance }, { "Sys", SysBackend::createInstance },
{ "Nettools", NetToolsBackend::createInstance },
{ TQString(), 0 } { TQString(), 0 }
}; };

@ -42,19 +42,13 @@ struct KCMRegistryEntry
KCMRegistryEntry KCMRegistry[] = KCMRegistryEntry KCMRegistry[] =
{ {
{ "Nettools",
i18n( "Uses the tools from the nettool packge like ifconfig, " \
"iwconfig and route to read the necessary information " \
"from the ouput of these commands.\n" \
"This backend works rather stable but causes a relativly " \
"high CPU load." ) },
{ "Sys", { "Sys",
i18n( "Uses the sys filesystem available in 2.6 kernels and " \ i18n( "Uses the sys filesystem available in 2.6 kernels and " \
"direct system calls to the Linux kernel.\n" \ "direct system calls to the Linux kernel." ) },
"This backend is rather new, so expect minor problems. " \ { "Nettools",
"As an advantage this backend should reduce the CPU load " \ i18n( "Uses the tools from the net-tools package like ifconfig, " \
"and should not access the harddisc while gathering " \ "iwconfig and route to read the necessary information " \
"information." ) }, "from the ouput of these commands.") },
{ TQString(), TQString() } { TQString(), TQString() }
}; };

@ -58,7 +58,7 @@ KNemoDaemon::KNemoDaemon( const TQCString& name )
// select the backend from the config file // select the backend from the config file
TDEConfig* config = new TDEConfig( "knemorc", true ); TDEConfig* config = new TDEConfig( "knemorc", true );
config->setGroup( "General" ); config->setGroup( "General" );
mBackendName = config->readEntry( "Backend", "Nettools" ); mBackendName = config->readEntry( "Backend", "Sys" );
delete config; delete config;
bool foundBackend = false; bool foundBackend = false;
@ -74,7 +74,7 @@ KNemoDaemon::KNemoDaemon( const TQCString& name )
if ( !foundBackend ) if ( !foundBackend )
{ {
i = 0; // use the first backend (Nettools) i = 0; // use the first backend (Sys)
} }
mBackend = ( *DaemonRegistry[i].function )( mInterfaceDict ); mBackend = ( *DaemonRegistry[i].function )( mInterfaceDict );
@ -195,7 +195,7 @@ void KNemoDaemon::reparseConfiguration()
mPollTimer->changeInterval( mGeneralData.pollInterval * 1000 ); mPollTimer->changeInterval( mGeneralData.pollInterval * 1000 );
// select the backend from the config file // select the backend from the config file
TQString backend = config->readEntry( "Backend", "Nettools" ); TQString backend = config->readEntry( "Backend", "Sys" );
if ( mBackendName != backend ) if ( mBackendName != backend )
{ {

Loading…
Cancel
Save