author | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
commit | 8f215ba9ceb395f262517855a99d7d2d303ca760 (patch) (side-by-side diff) | |
tree | aa5f9b14c249217b4d3fc30f4771bdaf1c3545d3 /noncore/settings/networksettings2/networksettings.cpp | |
parent | ef64880308b5035cc8ca2e4e79325db613af525b (diff) | |
download | opie-8f215ba9ceb395f262517855a99d7d2d303ca760.zip opie-8f215ba9ceb395f262517855a99d7d2d303ca760.tar.gz opie-8f215ba9ceb395f262517855a99d7d2d303ca760.tar.bz2 |
MANY changes
- now generates peers/pap-chap secrets files
(no chatscript yet)
(not all usefull ppp options included yet)
- still not ready for prime time yet
Diffstat (limited to 'noncore/settings/networksettings2/networksettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/networksettings.cpp | 52 |
1 files changed, 23 insertions, 29 deletions
diff --git a/noncore/settings/networksettings2/networksettings.cpp b/noncore/settings/networksettings2/networksettings.cpp index 6ee4106..ce0eabc 100644 --- a/noncore/settings/networksettings2/networksettings.cpp +++ b/noncore/settings/networksettings2/networksettings.cpp @@ -1,4 +1,5 @@ #include <stdio.h> #include <unistd.h> +#include <errno.h> #include <qpe/qpeapplication.h> @@ -13,4 +14,5 @@ #include <qpe/qpeapplication.h> #include <qtoolbutton.h> +#include <qevent.h> #include <asdevice.h> @@ -42,4 +44,11 @@ NetworkSettings::NetworkSettings( QWidget *parent, // populate main Listbox Profiles_LB->clear(); + QPEApplication::setStylusOperation( + Profiles_LB->viewport(), QPEApplication::RightOnHold ); + + connect( Profiles_LB, + SIGNAL(rightButtonPressed(QListBoxItem*,const QPoint&)), + this, SLOT(SLOT_EditNode(QListBoxItem*)) ); + { Name2Connection_t & M = NSResources->connections(); NodeCollection * NC; @@ -79,20 +88,16 @@ NetworkSettings::~NetworkSettings() { QString S; - S = NSD.generateSettings(); - if( ! S.isEmpty() ) { - QMessageBox::warning( - 0, - tr( "In System Config" ), - S - ); - } + if( isModified() ) { + S = NSD.saveSettings(); + if( ! S.isEmpty() ) { + // problem saving + QMessageBox::warning( + 0, + tr( "Saving setup" ), S ); + } - S = NSD.saveSettings(); - if( ! S.isEmpty() ) { - // problem saving - QMessageBox::warning( - 0, - tr( "Saving setup" ), S ); + SLOT_GenerateConfig(); } + } @@ -146,7 +151,4 @@ void NetworkSettings::SLOT_RefreshStates( void ) { } -void NetworkSettings::SLOT_NoLongerBusy( void ) { - NSResources->busy( FALSE ); -} void NetworkSettings::SLOT_AddNode( void ) { SLOT_EditNode( 0 ); @@ -167,5 +169,4 @@ void NetworkSettings::SLOT_DeleteNode( void ) { delete LBI; setModified( 1 ); - NSD.forceGeneration(1); } } @@ -173,4 +174,6 @@ void NetworkSettings::SLOT_DeleteNode( void ) { void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { QString OldName = ""; + + printf( "------------------ Edit NOde\n" ); EditConnection EC( this ); @@ -187,6 +190,5 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { // disable refresh timer UpdateTimer->stop(); - NSResources->busy( TRUE ); - QTimer::singleShot( 1000, this, SLOT( SLOT_NoLongerBusy() )); + // we need to retry while( 1 ) { @@ -320,13 +322,5 @@ void NetworkSettings::updateProfileState( QListBoxItem * LBI ) { void NetworkSettings::SLOT_GenerateConfig( void ) { - QString S = NSD.generateSettings( TRUE ); - - if( ! S.isEmpty() ) { - QMessageBox::warning( - 0, - tr( "Generating system configuration" ), - S - ); - } + NSD.regenerate(); } |