Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index a60d6ce..a47edd8 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -70,9 +70,9 @@ void AdvancedFm::cleanUp() { | |||
70 | file.remove(); | 70 | file.remove(); |
71 | } | 71 | } |
72 | 72 | ||
73 | void AdvancedFm::tabChanged(QWidget *) { | 73 | void AdvancedFm::tabChanged(QWidget *) { |
74 | // qWarning("tab changed"); | 74 | // owarn << "tab changed" << oendl; |
75 | QString path = CurrentDir()->canonicalPath(); | 75 | QString path = CurrentDir()->canonicalPath(); |
76 | currentPathCombo->lineEdit()->setText( path ); | 76 | currentPathCombo->lineEdit()->setText( path ); |
77 | 77 | ||
78 | if(whichTab == 1) { | 78 | if(whichTab == 1) { |
@@ -92,15 +92,15 @@ void AdvancedFm::tabChanged(QWidget *) { | |||
92 | 92 | ||
93 | 93 | ||
94 | void AdvancedFm::populateView() { | 94 | void AdvancedFm::populateView() { |
95 | 95 | ||
96 | // qWarning("PopulateView"); | 96 | // owarn << "PopulateView" << oendl; |
97 | QPixmap pm; | 97 | QPixmap pm; |
98 | QListView *thisView = CurrentView(); | 98 | QListView *thisView = CurrentView(); |
99 | QDir *thisDir = CurrentDir(); | 99 | QDir *thisDir = CurrentDir(); |
100 | QString path = thisDir->canonicalPath(); | 100 | QString path = thisDir->canonicalPath(); |
101 | 101 | ||
102 | //qWarning("path is "+path); | 102 | //owarn << "path is "+path << oendl; |
103 | thisView->clear(); | 103 | thisView->clear(); |
104 | thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 104 | thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
105 | thisDir->setMatchAllDirs(TRUE); | 105 | thisDir->setMatchAllDirs(TRUE); |
106 | thisDir->setNameFilter(filterStr); | 106 | thisDir->setNameFilter(filterStr); |
@@ -159,9 +159,9 @@ void AdvancedFm::populateView() { | |||
159 | pm = unknownXpm; | 159 | pm = unknownXpm; |
160 | } | 160 | } |
161 | } | 161 | } |
162 | if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { | 162 | if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { |
163 | // qDebug(" overlay link image"); | 163 | // odebug << " overlay link image" << oendl; |
164 | pm= Resource::loadPixmap( "advancedfm/symlink" ); | 164 | pm= Resource::loadPixmap( "advancedfm/symlink" ); |
165 | // pm= Resource::loadPixmap( "folder" ); | 165 | // pm= Resource::loadPixmap( "folder" ); |
166 | // QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); | 166 | // QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); |
167 | // QPainter painter( &pm ); | 167 | // QPainter painter( &pm ); |
@@ -183,9 +183,9 @@ void AdvancedFm::populateView() { | |||
183 | 183 | ||
184 | if((dir = opendir( path.latin1())) != NULL) | 184 | if((dir = opendir( path.latin1())) != NULL) |
185 | while ((mydirent = readdir(dir)) != NULL) { | 185 | while ((mydirent = readdir(dir)) != NULL) { |
186 | lstat( mydirent->d_name, &buf); | 186 | lstat( mydirent->d_name, &buf); |
187 | // qDebug(mydirent->d_name); | 187 | // odebug << mydirent->d_name << oendl; |
188 | fileL.sprintf("%s", mydirent->d_name); | 188 | fileL.sprintf("%s", mydirent->d_name); |
189 | devT = buf.st_dev; | 189 | devT = buf.st_dev; |
190 | fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); | 190 | fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); |
191 | fileDate.sprintf("%s", ctime( &buf.st_mtime)); | 191 | fileDate.sprintf("%s", ctime( &buf.st_mtime)); |
@@ -208,9 +208,9 @@ void AdvancedFm::rePopulate() { | |||
208 | setOtherTabCurrent(); | 208 | setOtherTabCurrent(); |
209 | populateView(); | 209 | populateView(); |
210 | 210 | ||
211 | // int tmpTab = whichTab; | 211 | // int tmpTab = whichTab; |
212 | // // qDebug("%d", tmpTab); | 212 | // // odebug << "" << tmpTab << "" << oendl; |
213 | 213 | ||
214 | // for(int i =1; i < 3; i++) { | 214 | // for(int i =1; i < 3; i++) { |
215 | // TabWidget->setCurrentWidget(i - 1); | 215 | // TabWidget->setCurrentWidget(i - 1); |
216 | // populateView(); | 216 | // populateView(); |
@@ -218,12 +218,12 @@ void AdvancedFm::rePopulate() { | |||
218 | // TabWidget->setCurrentWidget( tmpTab - 1); | 218 | // TabWidget->setCurrentWidget( tmpTab - 1); |
219 | } | 219 | } |
220 | 220 | ||
221 | void AdvancedFm::ListClicked(QListViewItem *selectedItem) { | 221 | void AdvancedFm::ListClicked(QListViewItem *selectedItem) { |
222 | //qWarning("listclicked"); | 222 | //owarn << "listclicked" << oendl; |
223 | if(selectedItem) { | 223 | if(selectedItem) { |
224 | QString strItem=selectedItem->text(0); | 224 | QString strItem=selectedItem->text(0); |
225 | // qWarning(strItem); | 225 | // owarn << strItem << oendl; |
226 | QString strSize=selectedItem->text(1); | 226 | QString strSize=selectedItem->text(1); |
227 | strSize=strSize.stripWhiteSpace(); | 227 | strSize=strSize.stripWhiteSpace(); |
228 | bool isDirectory = false; | 228 | bool isDirectory = false; |
229 | QString strItem2; | 229 | QString strItem2; |
@@ -266,15 +266,15 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in | |||
266 | } | 266 | } |
267 | 267 | ||
268 | 268 | ||
269 | void AdvancedFm::switchToLocalTab() { | 269 | void AdvancedFm::switchToLocalTab() { |
270 | //qWarning("switch to local view"); | 270 | //owarn << "switch to local view" << oendl; |
271 | TabWidget->setCurrentWidget(0); | 271 | TabWidget->setCurrentWidget(0); |
272 | Local_View->setFocus(); | 272 | Local_View->setFocus(); |
273 | } | 273 | } |
274 | 274 | ||
275 | void AdvancedFm::switchToRemoteTab() { | 275 | void AdvancedFm::switchToRemoteTab() { |
276 | //qWarning("switch to local view"); | 276 | //owarn << "switch to local view" << oendl; |
277 | TabWidget->setCurrentWidget(1); | 277 | TabWidget->setCurrentWidget(1); |
278 | Remote_View->setFocus(); | 278 | Remote_View->setFocus(); |
279 | } | 279 | } |
280 | 280 | ||
@@ -328,9 +328,9 @@ QStringList AdvancedFm::getPath() { | |||
328 | QListViewItemIterator it( thisView ); | 328 | QListViewItemIterator it( thisView ); |
329 | for ( ; it.current(); ++it ) { | 329 | for ( ; it.current(); ++it ) { |
330 | if ( it.current()->isSelected() ) { | 330 | if ( it.current()->isSelected() ) { |
331 | strList << it.current()->text(0); | 331 | strList << it.current()->text(0); |
332 | // qDebug(it.current()->text(0)); | 332 | // odebug << it.current()->text(0) << oendl; |
333 | } | 333 | } |
334 | } | 334 | } |
335 | return strList; | 335 | return strList; |
336 | } | 336 | } |
@@ -379,9 +379,9 @@ void AdvancedFm::doAbout() { | |||
379 | "and is licensed by the GPL")); | 379 | "and is licensed by the GPL")); |
380 | } | 380 | } |
381 | 381 | ||
382 | void AdvancedFm::keyPressEvent( QKeyEvent *e) { | 382 | void AdvancedFm::keyPressEvent( QKeyEvent *e) { |
383 | // qWarning("key %d", e->key()); | 383 | // owarn << "key " << e->key() << "" << oendl; |
384 | // if( CurrentView()->hasFocus() ) | 384 | // if( CurrentView()->hasFocus() ) |
385 | { | 385 | { |
386 | switch ( e->key() ) { | 386 | switch ( e->key() ) { |
387 | case Key_Left: | 387 | case Key_Left: |
@@ -637,9 +637,9 @@ void AdvancedFm::addToDocs() { | |||
637 | if( strListPaths.count() > 0) { | 637 | if( strListPaths.count() > 0) { |
638 | QString curFile; | 638 | QString curFile; |
639 | for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { | 639 | for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { |
640 | curFile = thisDir->canonicalPath()+"/"+(*it); | 640 | curFile = thisDir->canonicalPath()+"/"+(*it); |
641 | // qDebug(curFile); | 641 | // odebug << curFile << oendl; |
642 | QFileInfo fi(curFile); | 642 | QFileInfo fi(curFile); |
643 | DocLnk f; | 643 | DocLnk f; |
644 | // curFile.replace(QRegExp("\\..*"),""); | 644 | // curFile.replace(QRegExp("\\..*"),""); |
645 | f.setName(fi.baseName() ); | 645 | f.setName(fi.baseName() ); |
@@ -710,9 +710,9 @@ void AdvancedFm::addCustomDir() { | |||
710 | cfg.write(); | 710 | cfg.write(); |
711 | } | 711 | } |
712 | 712 | ||
713 | void AdvancedFm::removeCustomDir() { | 713 | void AdvancedFm::removeCustomDir() { |
714 | // qDebug("remove custom dir"); | 714 | // odebug << "remove custom dir" << oendl; |
715 | Config cfg("AdvancedFm"); | 715 | Config cfg("AdvancedFm"); |
716 | cfg.setGroup("Menu"); | 716 | cfg.setGroup("Menu"); |
717 | QString dir; | 717 | QString dir; |
718 | QStringList list = cfg.readListEntry( (const QString &)"CustomDir", (const QChar)','); | 718 | QStringList list = cfg.readListEntry( (const QString &)"CustomDir", (const QChar)','); |
@@ -745,9 +745,9 @@ void AdvancedFm::removeCustomDir() { | |||
745 | 745 | ||
746 | } | 746 | } |
747 | 747 | ||
748 | void AdvancedFm::gotoCustomDir(const QString &dir) { | 748 | void AdvancedFm::gotoCustomDir(const QString &dir) { |
749 | // qDebug("gotoCustomDir(const QString &dir) " +dir ); | 749 | // odebug << "gotoCustomDir(const QString &dir) " +dir << oendl; |
750 | // QString curDir = dir; | 750 | // QString curDir = dir; |
751 | // QDir *thisDir = CurrentDir(); | 751 | // QDir *thisDir = CurrentDir(); |
752 | // if( curDir.isEmpty()) { | 752 | // if( curDir.isEmpty()) { |
753 | // } | 753 | // } |
@@ -786,12 +786,12 @@ QDir *AdvancedFm::OtherDir() { | |||
786 | } | 786 | } |
787 | 787 | ||
788 | QListView * AdvancedFm::CurrentView() { | 788 | QListView * AdvancedFm::CurrentView() { |
789 | if ( whichTab == 1) { | 789 | if ( whichTab == 1) { |
790 | // qWarning("CurrentView Tab 1"); | 790 | // owarn << "CurrentView Tab 1" << oendl; |
791 | return Local_View; | 791 | return Local_View; |
792 | } else { | 792 | } else { |
793 | // qWarning("CurrentView Tab 2"); | 793 | // owarn << "CurrentView Tab 2" << oendl; |
794 | return Remote_View; | 794 | return Remote_View; |
795 | } | 795 | } |
796 | } | 796 | } |
797 | 797 | ||
@@ -802,9 +802,9 @@ QListView * AdvancedFm::OtherView() { | |||
802 | return Local_View; | 802 | return Local_View; |
803 | } | 803 | } |
804 | 804 | ||
805 | void AdvancedFm::setOtherTabCurrent() { | 805 | void AdvancedFm::setOtherTabCurrent() { |
806 | // qWarning("setOtherTabCurrent() %d", whichTab); | 806 | // owarn << "setOtherTabCurrent() " << whichTab << "" << oendl; |
807 | if ( whichTab == 1) { | 807 | if ( whichTab == 1) { |
808 | TabWidget->setCurrentWidget(1); | 808 | TabWidget->setCurrentWidget(1); |
809 | } else { | 809 | } else { |
810 | TabWidget->setCurrentWidget(0); | 810 | TabWidget->setCurrentWidget(0); |
@@ -813,12 +813,12 @@ void AdvancedFm::setOtherTabCurrent() { | |||
813 | OtherView()->setSelected( CurrentView()->firstChild(), true); | 813 | OtherView()->setSelected( CurrentView()->firstChild(), true); |
814 | } | 814 | } |
815 | 815 | ||
816 | void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { | 816 | void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { |
817 | // qDebug("qcop message "+msg ); | 817 | // odebug << "qcop message "+msg << oendl; |
818 | QDataStream stream ( data, IO_ReadOnly ); | 818 | QDataStream stream ( data, IO_ReadOnly ); |
819 | if ( msg == "openDirectory(QString)" ) { | 819 | if ( msg == "openDirectory(QString)" ) { |
820 | // qDebug("received"); | 820 | // odebug << "received" << oendl; |
821 | QString file; | 821 | QString file; |
822 | stream >> file; | 822 | stream >> file; |
823 | gotoDirectory( (const QString &) file); | 823 | gotoDirectory( (const QString &) file); |
824 | } | 824 | } |
@@ -829,9 +829,9 @@ void AdvancedFm::setDocument(const QString &file) { | |||
829 | 829 | ||
830 | } | 830 | } |
831 | 831 | ||
832 | void AdvancedFm::gotoDirectory(const QString &file) { | 832 | void AdvancedFm::gotoDirectory(const QString &file) { |
833 | // qWarning("goto dir "+file); | 833 | // owarn << "goto dir "+file << oendl; |
834 | QString curDir = file; | 834 | QString curDir = file; |
835 | QDir *thisDir = CurrentDir(); | 835 | QDir *thisDir = CurrentDir(); |
836 | if(QDir( curDir).exists() ) { | 836 | if(QDir( curDir).exists() ) { |
837 | thisDir->setPath( curDir ); | 837 | thisDir->setPath( curDir ); |
@@ -865,9 +865,9 @@ void AdvancedFm::findFile(const QString &fileName) { | |||
865 | } | 865 | } |
866 | } | 866 | } |
867 | 867 | ||
868 | void AdvancedFm::slotSwitchMenu(int ) { | 868 | void AdvancedFm::slotSwitchMenu(int ) { |
869 | // qDebug("Switch %d", item); | 869 | // odebug << "Switch " << item << "" << oendl; |
870 | // viewMenu->setItemChecked(item, true); | 870 | // viewMenu->setItemChecked(item, true); |
871 | } | 871 | } |
872 | 872 | ||
873 | void AdvancedFm::dealWithSchmooSchmaa(QWidget *w) { | 873 | void AdvancedFm::dealWithSchmooSchmaa(QWidget *w) { |