-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 5 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.pro | 28 | ||||
-rw-r--r-- | noncore/apps/advancedfm/main.cpp | 6 |
4 files changed, 44 insertions, 5 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index ac16540..9c13e53 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -46,13 +46,17 @@ | |||
46 | #include <time.h> | 46 | #include <time.h> |
47 | #include <dirent.h> | 47 | #include <dirent.h> |
48 | #include <fcntl.h> | 48 | #include <fcntl.h> |
49 | #include <sys/vfs.h> | 49 | #include <sys/vfs.h> |
50 | #include <mntent.h> | 50 | #include <mntent.h> |
51 | 51 | ||
52 | #ifdef NOQUICKLAUNCH | ||
52 | AdvancedFm::AdvancedFm( ) | 53 | AdvancedFm::AdvancedFm( ) |
54 | #else | ||
55 | AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) | ||
56 | #endif | ||
53 | : QMainWindow( ) { | 57 | : QMainWindow( ) { |
54 | init(); | 58 | init(); |
55 | renameBox = 0; | 59 | renameBox = 0; |
56 | 60 | ||
57 | unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | 61 | unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); |
58 | 62 | ||
@@ -100,19 +104,19 @@ void AdvancedFm::tabChanged(QWidget *) { | |||
100 | chdir( path.latin1()); | 104 | chdir( path.latin1()); |
101 | } | 105 | } |
102 | 106 | ||
103 | 107 | ||
104 | void AdvancedFm::populateView() { | 108 | void AdvancedFm::populateView() { |
105 | 109 | ||
106 | qWarning("PopulateView"); | 110 | // qWarning("PopulateView"); |
107 | QPixmap pm; | 111 | QPixmap pm; |
108 | QListView *thisView = CurrentView(); | 112 | QListView *thisView = CurrentView(); |
109 | QDir *thisDir = CurrentDir(); | 113 | QDir *thisDir = CurrentDir(); |
110 | QString path = thisDir->canonicalPath(); | 114 | QString path = thisDir->canonicalPath(); |
111 | 115 | ||
112 | qWarning("path is "+path); | 116 | //qWarning("path is "+path); |
113 | thisView->clear(); | 117 | thisView->clear(); |
114 | thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 118 | thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
115 | thisDir->setMatchAllDirs(TRUE); | 119 | thisDir->setMatchAllDirs(TRUE); |
116 | thisDir->setNameFilter(filterStr); | 120 | thisDir->setNameFilter(filterStr); |
117 | QString fileL, fileS, fileDate; | 121 | QString fileL, fileS, fileDate; |
118 | QString fs= getFileSystemType((const QString &) path); | 122 | QString fs= getFileSystemType((const QString &) path); |
@@ -810,13 +814,13 @@ QListView * AdvancedFm::OtherView() { | |||
810 | return Remote_View; | 814 | return Remote_View; |
811 | else | 815 | else |
812 | return Local_View; | 816 | return Local_View; |
813 | } | 817 | } |
814 | 818 | ||
815 | void AdvancedFm::setOtherTabCurrent() { | 819 | void AdvancedFm::setOtherTabCurrent() { |
816 | qWarning("setOtherTabCurrent() %d", whichTab); | 820 | // qWarning("setOtherTabCurrent() %d", whichTab); |
817 | if ( whichTab == 1) { | 821 | if ( whichTab == 1) { |
818 | TabWidget->setCurrentWidget(1); | 822 | TabWidget->setCurrentWidget(1); |
819 | } else { | 823 | } else { |
820 | TabWidget->setCurrentWidget(0); | 824 | TabWidget->setCurrentWidget(0); |
821 | } | 825 | } |
822 | OtherView()->setFocus(); | 826 | OtherView()->setFocus(); |
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index be574c4..bfefa77 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -52,13 +52,18 @@ class QToolButton; | |||
52 | class Ir; | 52 | class Ir; |
53 | 53 | ||
54 | class AdvancedFm : public QMainWindow | 54 | class AdvancedFm : public QMainWindow |
55 | { | 55 | { |
56 | Q_OBJECT | 56 | Q_OBJECT |
57 | public: | 57 | public: |
58 | static QString appName() { return QString::fromLatin1("advancedfm"); } | ||
59 | #ifdef NOQUICKLAUNCH | ||
58 | AdvancedFm(); | 60 | AdvancedFm(); |
61 | #else | ||
62 | AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0); | ||
63 | #endif | ||
59 | ~AdvancedFm(); | 64 | ~AdvancedFm(); |
60 | protected slots: | 65 | protected slots: |
61 | void slotSwitchMenu(int); | 66 | void slotSwitchMenu(int); |
62 | void selectAll(); | 67 | void selectAll(); |
63 | void addToDocs(); | 68 | void addToDocs(); |
64 | void doDirChange(); | 69 | void doDirChange(); |
diff --git a/noncore/apps/advancedfm/advancedfm.pro b/noncore/apps/advancedfm/advancedfm.pro index 590db6a..70db018 100644 --- a/noncore/apps/advancedfm/advancedfm.pro +++ b/noncore/apps/advancedfm/advancedfm.pro | |||
@@ -1,11 +1,35 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release quick-app |
3 | # CONFIG += qt warn_on release | ||
3 | HEADERS = advancedfm.h filePermissions.h output.h | 4 | HEADERS = advancedfm.h filePermissions.h output.h |
4 | SOURCES = advancedfm.cpp advancedfmData.cpp advancedfmMenu.cpp filePermissions.cpp output.cpp main.cpp | 5 | SOURCES = advancedfm.cpp advancedfmData.cpp advancedfmMenu.cpp filePermissions.cpp output.cpp main.cpp |
5 | TARGET = advancedfm | 6 | TARGET = advancedfm |
6 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
7 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
8 | DESTDIR = $(OPIEDIR)/bin | ||
9 | LIBS += -lqpe -lopie | 9 | LIBS += -lqpe -lopie |
10 | 10 | ||
11 | TRANSLATIONS = ../../../i18n/de/advancedfm.ts \ | ||
12 | ../../../i18n/nl/advancedfm.ts \ | ||
13 | ../../../i18n/da/advancedfm.ts \ | ||
14 | ../../../i18n/xx/advancedfm.ts \ | ||
15 | ../../../i18n/en/advancedfm.ts \ | ||
16 | ../../../i18n/es/advancedfm.ts \ | ||
17 | ../../../i18n/fr/advancedfm.ts \ | ||
18 | ../../../i18n/hu/advancedfm.ts \ | ||
19 | ../../../i18n/ja/advancedfm.ts \ | ||
20 | ../../../i18n/ko/advancedfm.ts \ | ||
21 | ../../../i18n/no/advancedfm.ts \ | ||
22 | ../../../i18n/pl/advancedfm.ts \ | ||
23 | ../../../i18n/pt/advancedfm.ts \ | ||
24 | ../../../i18n/pt_BR/advancedfm.ts \ | ||
25 | ../../../i18n/sl/advancedfm.ts \ | ||
26 | ../../../i18n/zh_CN/advancedfm.ts \ | ||
27 | ../../../i18n/zh_TW/advancedfm.ts | ||
28 | |||
29 | |||
30 | !contains(CONFIG,quick-app) { | ||
31 | DESTDIR = $(OPIEDIR)/bin | ||
32 | DEFINES += NOQUICKLAUNCH | ||
33 | } | ||
34 | |||
11 | include ( $(OPIEDIR)/include.pro ) | 35 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/apps/advancedfm/main.cpp b/noncore/apps/advancedfm/main.cpp index 8cacc4a..51e38dc 100644 --- a/noncore/apps/advancedfm/main.cpp +++ b/noncore/apps/advancedfm/main.cpp | |||
@@ -13,15 +13,21 @@ | |||
13 | #include <qpe/qpeapplication.h> | 13 | #include <qpe/qpeapplication.h> |
14 | 14 | ||
15 | 15 | ||
16 | 16 | ||
17 | #include "advancedfm.h" | 17 | #include "advancedfm.h" |
18 | 18 | ||
19 | #ifdef NOQUICKLAUNCH | ||
19 | int main(int argc, char *argv[]) | 20 | int main(int argc, char *argv[]) |
20 | { | 21 | { |
21 | QPEApplication a(argc, argv); | 22 | QPEApplication a(argc, argv); |
22 | 23 | ||
23 | AdvancedFm advencedFm; | 24 | AdvancedFm advencedFm; |
24 | a.showMainWidget( &advencedFm); | 25 | a.showMainWidget( &advencedFm); |
25 | return a.exec(); | 26 | return a.exec(); |
26 | } | 27 | } |
28 | #else | ||
29 | #include <opie/oapplicationfactory.h> | ||
27 | 30 | ||
31 | OPIE_EXPORT_APP( OApplicationFactory<AdvancedFm> ) | ||
32 | |||
33 | #endif | ||