author | mickeyl <mickeyl> | 2004-05-03 13:50:22 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-05-03 13:50:22 (UTC) |
commit | aad04cffe30ef133edcd5051ce7e486f27599d83 (patch) (unidiff) | |
tree | 830ccec1732ae743073511268c7bb67764c4fb6b /noncore/net/wellenreiter/gui/mainwindow.cpp | |
parent | 9efa98c49988a41de7613f56818f2e31bb24e22b (diff) | |
download | opie-aad04cffe30ef133edcd5051ce7e486f27599d83.zip opie-aad04cffe30ef133edcd5051ce7e486f27599d83.tar.gz opie-aad04cffe30ef133edcd5051ce7e486f27599d83.tar.bz2 |
don't always write a capture file
Diffstat (limited to 'noncore/net/wellenreiter/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 8525109..ef7ffcf 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp | |||
@@ -29,7 +29,7 @@ | |||
29 | #else | 29 | #else |
30 | #include "resource.h" | 30 | #include "resource.h" |
31 | #include <qapplication.h> | 31 | #include <qapplication.h> |
32 | #include <qfiledialog.h> | 32 | #include <qfiledialog.h> |
33 | #endif | 33 | #endif |
34 | using namespace Opie::Core; | 34 | using namespace Opie::Core; |
35 | using namespace Opie::Net; | 35 | using namespace Opie::Net; |
@@ -189,7 +189,7 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n | |||
189 | 189 | ||
190 | void WellenreiterMainWindow::showConfigure() | 190 | void WellenreiterMainWindow::showConfigure() |
191 | { | 191 | { |
192 | odebug << "show configure..." << oendl; | 192 | odebug << "show configure..." << oendl; |
193 | cw->setCaption( tr( "Configure" ) ); | 193 | cw->setCaption( tr( "Configure" ) ); |
194 | int result = QPEApplication::execDialog( cw ); | 194 | int result = QPEApplication::execDialog( cw ); |
195 | 195 | ||
@@ -222,7 +222,7 @@ void WellenreiterMainWindow::changedSniffingState() | |||
222 | stopButton->setEnabled( mw->sniffing ); | 222 | stopButton->setEnabled( mw->sniffing ); |
223 | menuBar()->setItemEnabled( stopID, mw->sniffing ); | 223 | menuBar()->setItemEnabled( stopID, mw->sniffing ); |
224 | 224 | ||
225 | if ( !mw->sniffing ) | 225 | if ( !mw->sniffing && QFile::exists( mw->dumpname ) ) |
226 | { | 226 | { |
227 | menuBar()->setItemEnabled( uploadID, true ); | 227 | menuBar()->setItemEnabled( uploadID, true ); |
228 | uploadButton->setEnabled( true ); | 228 | uploadButton->setEnabled( true ); |
@@ -232,7 +232,7 @@ void WellenreiterMainWindow::changedSniffingState() | |||
232 | 232 | ||
233 | WellenreiterMainWindow::~WellenreiterMainWindow() | 233 | WellenreiterMainWindow::~WellenreiterMainWindow() |
234 | { | 234 | { |
235 | odebug << "Wellenreiter: bye." << oendl; | 235 | odebug << "Wellenreiter: bye." << oendl; |
236 | }; | 236 | }; |
237 | 237 | ||
238 | 238 | ||
@@ -252,7 +252,7 @@ void WellenreiterMainWindow::demoReadFromGps() | |||
252 | { | 252 | { |
253 | WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); | 253 | WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); |
254 | GPS* gps = new GPS( this ); | 254 | GPS* gps = new GPS( this ); |
255 | odebug << "Wellenreiter::demoReadFromGps(): url=gps://" << configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "/" << oendl; | 255 | odebug << "Wellenreiter::demoReadFromGps(): url=gps://" << configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "/" << oendl; |
256 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | 256 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); |
257 | GpsLocation loc = gps->position(); | 257 | GpsLocation loc = gps->position(); |
258 | QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n%1" ).arg( loc.dmsPosition() ) ); | 258 | QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n%1" ).arg( loc.dmsPosition() ) ); |
@@ -306,11 +306,11 @@ void WellenreiterMainWindow::fileSaveLog() | |||
306 | QTextStream t( &f ); | 306 | QTextStream t( &f ); |
307 | t << mw->logWindow()->getLog(); | 307 | t << mw->logWindow()->getLog(); |
308 | f.close(); | 308 | f.close(); |
309 | odebug << "Saved log to file '" << fname << "'" << oendl; | 309 | odebug << "Saved log to file '" << fname << "'" << oendl; |
310 | } | 310 | } |
311 | else | 311 | else |
312 | { | 312 | { |
313 | odebug << "Problem saving log to file '" << fname << "'" << oendl; | 313 | odebug << "Problem saving log to file '" << fname << "'" << oendl; |
314 | } | 314 | } |
315 | } | 315 | } |
316 | } | 316 | } |
@@ -327,11 +327,11 @@ void WellenreiterMainWindow::fileSaveSession() | |||
327 | QDataStream t( &f ); | 327 | QDataStream t( &f ); |
328 | t << *mw->netView(); | 328 | t << *mw->netView(); |
329 | f.close(); | 329 | f.close(); |
330 | odebug << "Saved session to file '" << fname << "'" << oendl; | 330 | odebug << "Saved session to file '" << fname << "'" << oendl; |
331 | } | 331 | } |
332 | else | 332 | else |
333 | { | 333 | { |
334 | odebug << "Problem saving session to file '" << fname << "'" << oendl; | 334 | odebug << "Problem saving session to file '" << fname << "'" << oendl; |
335 | } | 335 | } |
336 | } | 336 | } |
337 | } | 337 | } |
@@ -349,11 +349,11 @@ void WellenreiterMainWindow::fileSaveHex() | |||
349 | QTextStream t( &f ); | 349 | QTextStream t( &f ); |
350 | t << mw->hexWindow()->getLog(); | 350 | t << mw->hexWindow()->getLog(); |
351 | f.close(); | 351 | f.close(); |
352 | odebug << "Saved hex log to file '" << fname << "'" << oendl; | 352 | odebug << "Saved hex log to file '" << fname << "'" << oendl; |
353 | } | 353 | } |
354 | else | 354 | else |
355 | { | 355 | { |
356 | odebug << "Problem saving hex log to file '" << fname << "'" << oendl; | 356 | odebug << "Problem saving hex log to file '" << fname << "'" << oendl; |
357 | } | 357 | } |
358 | } | 358 | } |
359 | */ | 359 | */ |
@@ -370,11 +370,11 @@ void WellenreiterMainWindow::fileLoadSession() | |||
370 | QDataStream t( &f ); | 370 | QDataStream t( &f ); |
371 | t >> *mw->netView(); | 371 | t >> *mw->netView(); |
372 | f.close(); | 372 | f.close(); |
373 | odebug << "Loaded session from file '" << fname << "'" << oendl; | 373 | odebug << "Loaded session from file '" << fname << "'" << oendl; |
374 | } | 374 | } |
375 | else | 375 | else |
376 | { | 376 | { |
377 | odebug << "Problem loading session from file '" << fname << "'" << oendl; | 377 | odebug << "Problem loading session from file '" << fname << "'" << oendl; |
378 | } | 378 | } |
379 | } | 379 | } |
380 | } | 380 | } |
@@ -439,11 +439,11 @@ void WellenreiterMainWindow::uploadSession() | |||
439 | 439 | ||
440 | if ( !result ) | 440 | if ( !result ) |
441 | { | 441 | { |
442 | odebug << "Session upload cancelled :(" << oendl; | 442 | odebug << "Session upload cancelled :(" << oendl; |
443 | return; | 443 | return; |
444 | } | 444 | } |
445 | 445 | ||
446 | odebug << "Starting upload..." << oendl; | 446 | odebug << "Starting upload..." << oendl; |
447 | 447 | ||
448 | struct sockaddr_in raddr; | 448 | struct sockaddr_in raddr; |
449 | struct hostent *rhost_info; | 449 | struct hostent *rhost_info; |