-rw-r--r-- | core/launcher/launcher.cpp | 1 | ||||
-rw-r--r-- | core/launcher/mediummountgui.cpp | 1 | ||||
-rw-r--r-- | libopie/oconfig.h | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index dcc3ba1..1c38a05 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -524,48 +524,49 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: | |||
524 | qWarning("QList<FileSystem>" ); | 524 | qWarning("QList<FileSystem>" ); |
525 | QListIterator<FileSystem> it ( fileSystems ); | 525 | QListIterator<FileSystem> it ( fileSystems ); |
526 | qWarning("iterator initiliazed" ); | 526 | qWarning("iterator initiliazed" ); |
527 | for ( ; it.current(); ++it ) { | 527 | for ( ; it.current(); ++it ) { |
528 | qWarning("inside for loop" ); | 528 | qWarning("inside for loop" ); |
529 | qWarning("checking device %s", (*it)->path().latin1() ); | 529 | qWarning("checking device %s", (*it)->path().latin1() ); |
530 | 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() ); | 531 | qWarning("%s is removeable", (*it)->path().latin1() ); |
532 | OConfig cfg( (*it)->path() + "/.opiestorage.cf"); | 532 | OConfig cfg( (*it)->path() + "/.opiestorage.cf"); |
533 | cfg.setGroup("main"); | 533 | cfg.setGroup("main"); |
534 | QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); | 534 | QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); |
535 | if( stamp == m_timeStamp ){ // ok we know this card | 535 | if( stamp == m_timeStamp ){ // ok we know this card |
536 | qWarning("time stamp match" ); | 536 | qWarning("time stamp match" ); |
537 | cfg.writeEntry("timestamp", newStamp ); | 537 | cfg.writeEntry("timestamp", newStamp ); |
538 | // 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 |
539 | }else{ // come up with the gui | 539 | }else{ // come up with the gui |
540 | qWarning("time stamp doesn't match" ); | 540 | qWarning("time stamp doesn't match" ); |
541 | MediumMountGui medium((*it)->path() ); | 541 | MediumMountGui medium((*it)->path() ); |
542 | qWarning("medium mount gui created" ); | 542 | qWarning("medium mount gui created" ); |
543 | if( medium.check() ){ | 543 | if( medium.check() ){ |
544 | qWarning("need to check this device" ); | 544 | qWarning("need to check this device" ); |
545 | if( medium.exec() ){ //ok | 545 | if( medium.exec() ){ //ok |
546 | // speicher | 546 | // speicher |
547 | qWarning("execed" ); | 547 | qWarning("execed" ); |
548 | cfg.read(); | ||
548 | cfg.writeEntry("timestamp", newStamp ); | 549 | cfg.writeEntry("timestamp", newStamp ); |
549 | } | 550 | } |
550 | }else{ | 551 | }else{ |
551 | qWarning("wrong :(" ); | 552 | qWarning("wrong :(" ); |
552 | // do something different see what we need to do | 553 | // do something different see what we need to do |
553 | } | 554 | } |
554 | } | 555 | } |
555 | } | 556 | } |
556 | } | 557 | } |
557 | qWarning("findDocuments" ); | 558 | qWarning("findDocuments" ); |
558 | Global::findDocuments(docsFolder); // get rid of this call later | 559 | Global::findDocuments(docsFolder); // get rid of this call later |
559 | qWarning("done" ); | 560 | qWarning("done" ); |
560 | m_timeStamp = newStamp; | 561 | m_timeStamp = newStamp; |
561 | } | 562 | } |
562 | 563 | ||
563 | void Launcher::updateTabs() | 564 | void Launcher::updateTabs() |
564 | { | 565 | { |
565 | MimeType::updateApplications(); // ### reads all applnks twice | 566 | MimeType::updateApplications(); // ### reads all applnks twice |
566 | 567 | ||
567 | delete rootFolder; | 568 | delete rootFolder; |
568 | rootFolder = new AppLnkSet( MimeType::appsFolderName() ); | 569 | rootFolder = new AppLnkSet( MimeType::appsFolderName() ); |
569 | 570 | ||
570 | loadDocs(); | 571 | loadDocs(); |
571 | 572 | ||
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp index 5225711..e3fa5bd 100644 --- a/core/launcher/mediummountgui.cpp +++ b/core/launcher/mediummountgui.cpp | |||
@@ -79,48 +79,49 @@ void MediumMountGui::writeConfig(bool autocheck) { | |||
79 | cfg.setGroup("dirs"); | 79 | cfg.setGroup("dirs"); |
80 | cfg.writeEntry("dirs", ""); | 80 | cfg.writeEntry("dirs", ""); |
81 | 81 | ||
82 | 82 | ||
83 | // if all is checked then add only "null" to the list. | 83 | // if all is checked then add only "null" to the list. |
84 | if (checkmimeall) { | 84 | if (checkmimeall) { |
85 | mimeTypeList += ("null"); | 85 | mimeTypeList += ("null"); |
86 | } else { | 86 | } else { |
87 | if (checkmimeaudio) { | 87 | if (checkmimeaudio) { |
88 | mimeTypeList += ("audio//*"); | 88 | mimeTypeList += ("audio//*"); |
89 | } | 89 | } |
90 | if (checkmimetext) { | 90 | if (checkmimetext) { |
91 | mimeTypeList += ("text//*"); | 91 | mimeTypeList += ("text//*"); |
92 | } | 92 | } |
93 | if (checkmimevideo) { | 93 | if (checkmimevideo) { |
94 | mimeTypeList += ("video//*"); | 94 | mimeTypeList += ("video//*"); |
95 | } | 95 | } |
96 | if (checkmimeimage) { | 96 | if (checkmimeimage) { |
97 | mimeTypeList += ("image//*"); | 97 | mimeTypeList += ("image//*"); |
98 | } | 98 | } |
99 | if (checkmimeall) { | 99 | if (checkmimeall) { |
100 | mimeTypeList << ("null"); | 100 | mimeTypeList << ("null"); |
101 | } | 101 | } |
102 | } | 102 | } |
103 | cfg.write(); | ||
103 | } | 104 | } |
104 | 105 | ||
105 | void MediumMountGui::startGui() { | 106 | void MediumMountGui::startGui() { |
106 | 107 | ||
107 | QPixmap image = Resource::loadPixmap( "HelpBrowser"); | 108 | QPixmap image = Resource::loadPixmap( "HelpBrowser"); |
108 | 109 | ||
109 | Text_2 = new QLabel( this ); | 110 | Text_2 = new QLabel( this ); |
110 | Text_2->setGeometry( QRect( 10, 15, 40, 40 ) ); | 111 | Text_2->setGeometry( QRect( 10, 15, 40, 40 ) ); |
111 | Text_2->setPixmap( image ); | 112 | Text_2->setPixmap( image ); |
112 | 113 | ||
113 | Text = new QLabel( this, "Text" ); | 114 | Text = new QLabel( this, "Text" ); |
114 | Text->setGeometry( QRect( 55, 11, this->width()-50, 50 ) ); | 115 | Text->setGeometry( QRect( 55, 11, this->width()-50, 50 ) ); |
115 | Text->setText( tr( "A <b>storage medium</b> was inserted. Should it be scanned for media files?" ) ); | 116 | Text->setText( tr( "A <b>storage medium</b> was inserted. Should it be scanned for media files?" ) ); |
116 | 117 | ||
117 | // media box | 118 | // media box |
118 | GroupBox1 = new QGroupBox( this, "GroupBox1" ); | 119 | GroupBox1 = new QGroupBox( this, "GroupBox1" ); |
119 | GroupBox1->setGeometry( QRect( 10, 80, (this->width())-25, 80 ) ); | 120 | GroupBox1->setGeometry( QRect( 10, 80, (this->width())-25, 80 ) ); |
120 | GroupBox1->setTitle( tr( "Which media files" ) ); | 121 | GroupBox1->setTitle( tr( "Which media files" ) ); |
121 | 122 | ||
122 | CheckBoxAudio = new QCheckBox( GroupBox1, "CheckBoxAudio" ); | 123 | CheckBoxAudio = new QCheckBox( GroupBox1, "CheckBoxAudio" ); |
123 | CheckBoxAudio->setGeometry( QRect( 10, 15, (GroupBox1->width()/2)-15 , 15 ) ); | 124 | CheckBoxAudio->setGeometry( QRect( 10, 15, (GroupBox1->width()/2)-15 , 15 ) ); |
124 | CheckBoxAudio->setText( tr( "Audio" ) ); | 125 | CheckBoxAudio->setText( tr( "Audio" ) ); |
125 | 126 | ||
126 | CheckBoxImage = new QCheckBox( GroupBox1, "CheckBoxImage" ); | 127 | CheckBoxImage = new QCheckBox( GroupBox1, "CheckBoxImage" ); |
diff --git a/libopie/oconfig.h b/libopie/oconfig.h index c97fb6a..f6227d1 100644 --- a/libopie/oconfig.h +++ b/libopie/oconfig.h | |||
@@ -20,29 +20,29 @@ | |||
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | -. .:....=;==+<; You should have received a copy of the GNU |
21 | -_. . . )=. = Library General Public License along with | 21 | -_. . . )=. = Library General Public License along with |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | -- :-=` this library; see the file COPYING.LIB. |
23 | If not, write to the Free Software Foundation, | 23 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 24 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | 29 | ||
30 | #include <qpe/config.h> | 30 | #include <qpe/config.h> |
31 | 31 | ||
32 | #ifndef opieconfig_h | 32 | #ifndef opieconfig_h |
33 | #define opieconfig_h | 33 | #define opieconfig_h |
34 | 34 | ||
35 | /** It supports all Config items + it lets you decide | 35 | /** It supports all Config items + it lets you decide |
36 | * which file to use. | 36 | * which file to use. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | class OConfig : public Config { | 39 | class OConfig : public Config { |
40 | public: | 40 | public: |
41 | OConfig( const QString &filename ); | 41 | OConfig( const QString &filename ); |
42 | ~OConfig(); | 42 | ~OConfig(); |
43 | QString fileName() const; | 43 | QString fileName() const; |
44 | 44 | void read( ) { Config::read(); }; | |
45 | }; | 45 | }; |
46 | 46 | ||
47 | #endif | 47 | #endif |
48 | 48 | ||