-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 66353bb..d4351b0 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -754,50 +754,50 @@ void AdvancedFm::addCustomDir() | |||
754 | { | 754 | { |
755 | menuButton->insertItem(dir); | 755 | menuButton->insertItem(dir); |
756 | // customDirMenu->insertItem(dir); | 756 | // customDirMenu->insertItem(dir); |
757 | list << dir; | 757 | list << dir; |
758 | } | 758 | } |
759 | 759 | ||
760 | cfg.writeEntry("CustomDir", list, ','); | 760 | cfg.writeEntry("CustomDir", list, ','); |
761 | cfg.write(); | 761 | cfg.write(); |
762 | } | 762 | } |
763 | 763 | ||
764 | void AdvancedFm::removeCustomDir() | 764 | void AdvancedFm::removeCustomDir() |
765 | { | 765 | { |
766 | // qDebug("remove custom dir"); | 766 | // qDebug("remove custom dir"); |
767 | Config cfg("AdvancedFm"); | 767 | Config cfg("AdvancedFm"); |
768 | cfg.setGroup("Menu"); | 768 | cfg.setGroup("Menu"); |
769 | QString dir; | 769 | QString dir; |
770 | QStringList list = cfg.readListEntry( (const QString &)"CustomDir", (const QChar)','); | 770 | QStringList list = cfg.readListEntry( (const QString &)"CustomDir", (const QChar)','); |
771 | QStringList list2; | 771 | QStringList list2; |
772 | dir = CurrentDir()->canonicalPath(); | 772 | dir = CurrentDir()->canonicalPath(); |
773 | int ramble=2; | 773 | int ramble=2; |
774 | // int ramble=-24; | 774 | // int ramble=-24; |
775 | //first remove list | 775 | //first remove list |
776 | if(list.grep(dir,true).isEmpty()) | 776 | if(list.grep(dir,true).isEmpty()) |
777 | { | 777 | { |
778 | QMessageBox::message("AdvancedFm", | 778 | QMessageBox::message(tr( "AdvancedFm" ), |
779 | tr("Cannot remove current directory\nfrom bookmarks.\nIt is not bookmarked!!")); | 779 | tr("Cannot remove current directory\nfrom bookmarks.\nIt is not bookmarked!")); |
780 | } | 780 | } |
781 | else | 781 | else |
782 | { | 782 | { |
783 | for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) | 783 | for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) |
784 | { | 784 | { |
785 | if((*it) != dir)//current item is not our current dir, so add it to temp list | 785 | if((*it) != dir)//current item is not our current dir, so add it to temp list |
786 | { | 786 | { |
787 | list2 <<(*it); | 787 | list2 <<(*it); |
788 | } | 788 | } |
789 | else | 789 | else |
790 | { | 790 | { |
791 | // customDirMenu->removeItem( ramble); | 791 | // customDirMenu->removeItem( ramble); |
792 | menuButton->remove( ramble); | 792 | menuButton->remove( ramble); |
793 | 793 | ||
794 | } | 794 | } |
795 | ramble++; | 795 | ramble++; |
796 | // ramble--; | 796 | // ramble--; |
797 | } | 797 | } |
798 | 798 | ||
799 | cfg.writeEntry("CustomDir", list2, ','); | 799 | cfg.writeEntry("CustomDir", list2, ','); |
800 | cfg.write(); | 800 | cfg.write(); |
801 | } | 801 | } |
802 | // customDirsToMenu(); | 802 | // customDirsToMenu(); |
803 | 803 | ||