summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcher.cpp31
-rw-r--r--core/launcher/launcher.h2
-rw-r--r--core/launcher/mediummountgui.cpp4
3 files changed, 32 insertions, 5 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index b26bd8b..dcc3ba1 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -74,4 +74,8 @@
74//#define SHOW_ALL 74//#define SHOW_ALL
75 75
76// uidGen
77
78// uidGen
79
76CategoryTabWidget::CategoryTabWidget( QWidget* parent ) : 80CategoryTabWidget::CategoryTabWidget( QWidget* parent ) :
77 QVBox( parent ) 81 QVBox( parent )
@@ -423,5 +427,7 @@ Launcher::Launcher( QWidget* parent, const char* name, WFlags fl )
423 rootFolder = 0; 427 rootFolder = 0;
424 docsFolder = 0; 428 docsFolder = 0;
425 m_timeStamp = QDateTime::currentDateTime().toString(); 429 int stamp = uidgen.generate();
430 uidgen.store( stamp );
431 m_timeStamp = QString::number( stamp );
426 432
427 tabs = new CategoryTabWidget( this ); 433 tabs = new CategoryTabWidget( this );
@@ -501,30 +507,47 @@ void Launcher::updateMimeTypes(AppLnkSet* folder)
501void Launcher::loadDocs() // ok here comes a hack belonging to Global:: 507void Launcher::loadDocs() // ok here comes a hack belonging to Global::
502{ 508{
509 qWarning("loading Documents" );
510 qWarning("The currentTimeStamp is: %s", m_timeStamp.latin1() );
503 delete docsFolder; 511 delete docsFolder;
504 docsFolder = new DocLnkSet; 512 docsFolder = new DocLnkSet;
513 qWarning("new DocLnkSet" );
505 // find out wich filesystems are new in this round 514 // find out wich filesystems are new in this round
506 // We will do this by having a timestamp inside each mountpoint 515 // We will do this by having a timestamp inside each mountpoint
507 // if the current timestamp doesn't match this is a new file system and 516 // if the current timestamp doesn't match this is a new file system and
508 // come up with our MediumMountGui :) let the hacking begin 517 // come up with our MediumMountGui :) let the hacking begin
509 QString newStamp = QDateTime::currentDateTime().toString(); 518 int stamp = uidgen.generate();
519
520 QString newStamp = QString::number( stamp );
521 qWarning("new time stamp is: %s", newStamp.latin1() );
510 StorageInfo storage; 522 StorageInfo storage;
511 const QList<FileSystem> &fileSystems = storage.fileSystems(); 523 const QList<FileSystem> &fileSystems = storage.fileSystems();
524 qWarning("QList<FileSystem>" );
512 QListIterator<FileSystem> it ( fileSystems ); 525 QListIterator<FileSystem> it ( fileSystems );
526 qWarning("iterator initiliazed" );
513 for ( ; it.current(); ++it ) { 527 for ( ; it.current(); ++it ) {
528 qWarning("inside for loop" );
529 qWarning("checking device %s", (*it)->path().latin1() );
514 if ( (*it)->isRemovable() ) { // let's find out if we should search on it 530 if ( (*it)->isRemovable() ) { // let's find out if we should search on it
531 qWarning("%s is removeable", (*it)->path().latin1() );
515 OConfig cfg( (*it)->path() + "/.opiestorage.cf"); 532 OConfig cfg( (*it)->path() + "/.opiestorage.cf");
516 cfg.setGroup("main"); 533 cfg.setGroup("main");
517 QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); 534 QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() );
518 if( stamp == m_timeStamp ){ // ok we know this card 535 if( stamp == m_timeStamp ){ // ok we know this card
536 qWarning("time stamp match" );
519 cfg.writeEntry("timestamp", newStamp ); 537 cfg.writeEntry("timestamp", newStamp );
520 // we need to scan the list now. Hopefully the cache will be there 538 // we need to scan the list now. Hopefully the cache will be there
521 }else{ // come up with the gui 539 }else{ // come up with the gui
522 MediumMountGui medium((*it)->path() + "/.opiestorage.cf" ); 540 qWarning("time stamp doesn't match" );
541 MediumMountGui medium((*it)->path() );
542 qWarning("medium mount gui created" );
523 if( medium.check() ){ 543 if( medium.check() ){
544 qWarning("need to check this device" );
524 if( medium.exec() ){ //ok 545 if( medium.exec() ){ //ok
525 // speicher 546 // speicher
547 qWarning("execed" );
526 cfg.writeEntry("timestamp", newStamp ); 548 cfg.writeEntry("timestamp", newStamp );
527 } 549 }
528 }else{ 550 }else{
551 qWarning("wrong :(" );
529 // do something different see what we need to do 552 // do something different see what we need to do
530 } 553 }
@@ -532,5 +555,7 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global::
532 } 555 }
533 } 556 }
557 qWarning("findDocuments" );
534 Global::findDocuments(docsFolder); // get rid of this call later 558 Global::findDocuments(docsFolder); // get rid of this call later
559 qWarning("done" );
535 m_timeStamp = newStamp; 560 m_timeStamp = newStamp;
536} 561}
diff --git a/core/launcher/launcher.h b/core/launcher/launcher.h
index 197bd19..d2efa58 100644
--- a/core/launcher/launcher.h
+++ b/core/launcher/launcher.h
@@ -26,4 +26,5 @@
26#include <qvbox.h> 26#include <qvbox.h>
27#include <qlist.h> 27#include <qlist.h>
28#include <qpe/palmtopuidgen.h>
28#include "launcherview.h" 29#include "launcherview.h"
29 30
@@ -133,4 +134,5 @@ private:
133 QString lnk_change; 134 QString lnk_change;
134 QString m_timeStamp; 135 QString m_timeStamp;
136 Qtopia::UidGen uidgen;
135}; 137};
136 138
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp
index f193024..6ad97e1 100644
--- a/core/launcher/mediummountgui.cpp
+++ b/core/launcher/mediummountgui.cpp
@@ -22,5 +22,5 @@
22 22
23MediumMountGui::MediumMountGui( const QString &path ,QWidget* parent, const char* name, bool modal, WFlags fl ) 23MediumMountGui::MediumMountGui( const QString &path ,QWidget* parent, const char* name, bool modal, WFlags fl )
24 : QDialog( parent, name, modal, fl ) { 24 : QDialog( parent, name, true ) {
25 25
26 26
@@ -40,5 +40,5 @@ void MediumMountGui::readConfig(){
40 OConfig cfg (mediumPath +"/.opiestorage.cf"); 40 OConfig cfg (mediumPath +"/.opiestorage.cf");
41 cfg.setGroup("main"); 41 cfg.setGroup("main");
42 checkagain = cfg.readBoolEntry("check", false); 42 checkagain = cfg.readBoolEntry("check", true);
43 43
44 cfg.setGroup("mimetypes"); 44 cfg.setGroup("mimetypes");