-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 14 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 4 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 11 |
3 files changed, 15 insertions, 14 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 77dca49..91318f1 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -3,33 +3,33 @@ | |||
3 | ------------------- | 3 | ------------------- |
4 | ** Created: Sat Mar 9 23:33:09 2002 | 4 | ** Created: Sat Mar 9 23:33:09 2002 |
5 | copyright : (C) 2002 by ljp | 5 | copyright : (C) 2002 by ljp |
6 | email : ljp@llornkcor.com | 6 | email : ljp@llornkcor.com |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | #define DEVELOPERS_VERSION | 12 | #define DEVELOPERS_VERSION |
13 | #include "advancedfm.h" | 13 | #include "advancedfm.h" |
14 | 14 | ||
15 | 15 | ||
16 | // #include <opie/ofileselector.h> | 16 | // #include <opie/ofileselector.h> |
17 | // #include <opie/ofiledialog.h> | 17 | // #include <opie/ofiledialog.h> |
18 | 18 | ||
19 | #include <opie/otabwidget.h> | 19 | #include <opie/osplitter.h> |
20 | 20 | ||
21 | #include <qpe/filemanager.h> | 21 | #include <qpe/filemanager.h> |
22 | #include <qpe/qcopenvelope_qws.h> | 22 | #include <qpe/qcopenvelope_qws.h> |
23 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | #include <qpe/config.h> | 24 | #include <qpe/config.h> |
25 | #include <qpe/mimetype.h> | 25 | #include <qpe/mimetype.h> |
26 | #include <qpe/applnk.h> | 26 | #include <qpe/applnk.h> |
27 | #include <qpe/ir.h> | 27 | #include <qpe/ir.h> |
28 | #include <qpe/resource.h> | 28 | #include <qpe/resource.h> |
29 | #include <qpe/menubutton.h> | 29 | #include <qpe/menubutton.h> |
30 | 30 | ||
31 | #include <qdatetime.h> | 31 | #include <qdatetime.h> |
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qpopupmenu.h> | 34 | #include <qpopupmenu.h> |
35 | #include <qlistview.h> | 35 | #include <qlistview.h> |
@@ -205,36 +205,36 @@ void AdvancedFm::populateView() | |||
205 | } | 205 | } |
206 | 206 | ||
207 | closedir(dir); | 207 | closedir(dir); |
208 | } | 208 | } |
209 | 209 | ||
210 | thisView->setSorting( 3,FALSE); | 210 | thisView->setSorting( 3,FALSE); |
211 | fillCombo( (const QString &) path ); | 211 | fillCombo( (const QString &) path ); |
212 | } | 212 | } |
213 | 213 | ||
214 | void AdvancedFm::rePopulate() | 214 | void AdvancedFm::rePopulate() |
215 | { | 215 | { |
216 | int tmpTab = whichTab; | 216 | int tmpTab = whichTab; |
217 | qDebug("%d", tmpTab); | 217 | qDebug("%d", tmpTab); |
218 | 218 | ||
219 | for(int i =1; i < 3; i++) | 219 | for(int i =1; i < 3; i++) |
220 | { | 220 | { |
221 | TabWidget->setCurrentTab(i - 1); | 221 | TabWidget->setCurrentWidget(i - 1); |
222 | populateView(); | 222 | populateView(); |
223 | } | 223 | } |
224 | TabWidget->setCurrentTab( tmpTab - 1); | 224 | TabWidget->setCurrentWidget( tmpTab - 1); |
225 | } | 225 | } |
226 | 226 | ||
227 | void AdvancedFm::ListClicked(QListViewItem *selectedItem) | 227 | void AdvancedFm::ListClicked(QListViewItem *selectedItem) |
228 | { | 228 | { |
229 | if(selectedItem) | 229 | if(selectedItem) |
230 | { | 230 | { |
231 | QString strItem=selectedItem->text(0); | 231 | QString strItem=selectedItem->text(0); |
232 | QString strSize=selectedItem->text(1); | 232 | QString strSize=selectedItem->text(1); |
233 | strSize=strSize.stripWhiteSpace(); | 233 | strSize=strSize.stripWhiteSpace(); |
234 | bool isDirectory = false; | 234 | bool isDirectory = false; |
235 | QString strItem2; | 235 | QString strItem2; |
236 | 236 | ||
237 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 )//if symlink | 237 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 )//if symlink |
238 | { | 238 | { |
239 | strItem2 = dealWithSymName((const QString&)strItem); | 239 | strItem2 = dealWithSymName((const QString&)strItem); |
240 | if(QDir(strItem2).exists() ) | 240 | if(QDir(strItem2).exists() ) |
@@ -263,39 +263,39 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *, const QPoint& , int ) | |||
263 | case 1: | 263 | case 1: |
264 | { | 264 | { |
265 | if(renameBox != 0 ) | 265 | if(renameBox != 0 ) |
266 | { | 266 | { |
267 | cancelRename(); | 267 | cancelRename(); |
268 | } | 268 | } |
269 | } | 269 | } |
270 | break; | 270 | break; |
271 | case 2: | 271 | case 2: |
272 | menuTimer.start( 500, TRUE ); | 272 | menuTimer.start( 500, TRUE ); |
273 | break; | 273 | break; |
274 | }; | 274 | }; |
275 | } | 275 | } |
276 | 276 | ||
277 | void AdvancedFm::switchToLocalTab() | 277 | void AdvancedFm::switchToLocalTab() |
278 | { | 278 | { |
279 | TabWidget->setCurrentTab(0); | 279 | TabWidget->setCurrentWidget(0); |
280 | Local_View->setFocus(); | 280 | Local_View->setFocus(); |
281 | } | 281 | } |
282 | 282 | ||
283 | void AdvancedFm::switchToRemoteTab() | 283 | void AdvancedFm::switchToRemoteTab() |
284 | { | 284 | { |
285 | TabWidget->setCurrentTab(1); | 285 | TabWidget->setCurrentWidget(1); |
286 | Remote_View->setFocus(); | 286 | Remote_View->setFocus(); |
287 | } | 287 | } |
288 | 288 | ||
289 | void AdvancedFm::readConfig() | 289 | void AdvancedFm::readConfig() |
290 | { | 290 | { |
291 | Config cfg("AdvancedFm"); | 291 | Config cfg("AdvancedFm"); |
292 | } | 292 | } |
293 | 293 | ||
294 | void AdvancedFm::writeConfig() | 294 | void AdvancedFm::writeConfig() |
295 | { | 295 | { |
296 | Config cfg("AdvancedFm"); | 296 | Config cfg("AdvancedFm"); |
297 | } | 297 | } |
298 | 298 | ||
299 | void AdvancedFm::currentPathComboChanged() | 299 | void AdvancedFm::currentPathComboChanged() |
300 | { | 300 | { |
301 | if(QDir( currentPathCombo->lineEdit()->text()).exists()) | 301 | if(QDir( currentPathCombo->lineEdit()->text()).exists()) |
@@ -849,35 +849,35 @@ QListView * AdvancedFm::CurrentView() | |||
849 | return Local_View; | 849 | return Local_View; |
850 | else | 850 | else |
851 | return Remote_View; | 851 | return Remote_View; |
852 | } | 852 | } |
853 | 853 | ||
854 | QListView * AdvancedFm::OtherView() | 854 | QListView * AdvancedFm::OtherView() |
855 | { | 855 | { |
856 | if ( whichTab == 1) | 856 | if ( whichTab == 1) |
857 | return Remote_View; | 857 | return Remote_View; |
858 | else | 858 | else |
859 | return Local_View; | 859 | return Local_View; |
860 | } | 860 | } |
861 | 861 | ||
862 | void AdvancedFm::setOtherTabCurrent() | 862 | void AdvancedFm::setOtherTabCurrent() |
863 | { | 863 | { |
864 | if ( whichTab == 1) | 864 | if ( whichTab == 1) |
865 | TabWidget->setCurrentTab(1); | 865 | TabWidget->setCurrentWidget(1); |
866 | else | 866 | else |
867 | TabWidget->setCurrentTab(0); | 867 | TabWidget->setCurrentWidget(0); |
868 | } | 868 | } |
869 | 869 | ||
870 | void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { | 870 | void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { |
871 | qDebug("qcop message "+msg ); | 871 | qDebug("qcop message "+msg ); |
872 | QDataStream stream ( data, IO_ReadOnly ); | 872 | QDataStream stream ( data, IO_ReadOnly ); |
873 | if ( msg == "openDirectory(QString)" ) { | 873 | if ( msg == "openDirectory(QString)" ) { |
874 | qDebug("received"); | 874 | qDebug("received"); |
875 | QString file; | 875 | QString file; |
876 | stream >> file; | 876 | stream >> file; |
877 | gotoDirectory( (const QString &) file); | 877 | gotoDirectory( (const QString &) file); |
878 | } | 878 | } |
879 | } | 879 | } |
880 | 880 | ||
881 | void AdvancedFm::setDocument(const QString &file) { | 881 | void AdvancedFm::setDocument(const QString &file) { |
882 | gotoDirectory( file); | 882 | gotoDirectory( file); |
883 | 883 | ||
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 94d7bd7..5e2c769 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -17,33 +17,33 @@ | |||
17 | //#include <opie/otabwidget.h> | 17 | //#include <opie/otabwidget.h> |
18 | #include <opie/oprocess.h> | 18 | #include <opie/oprocess.h> |
19 | 19 | ||
20 | #include <qpe/ir.h> | 20 | #include <qpe/ir.h> |
21 | #include <qpe/qcopenvelope_qws.h> | 21 | #include <qpe/qcopenvelope_qws.h> |
22 | 22 | ||
23 | #include <qvariant.h> | 23 | #include <qvariant.h> |
24 | #include <qdialog.h> | 24 | #include <qdialog.h> |
25 | #include <qmainwindow.h> | 25 | #include <qmainwindow.h> |
26 | #include <qstringlist.h> | 26 | #include <qstringlist.h> |
27 | #include <qdir.h> | 27 | #include <qdir.h> |
28 | #include <qstring.h> | 28 | #include <qstring.h> |
29 | #include <qpoint.h> | 29 | #include <qpoint.h> |
30 | #include <qtimer.h> | 30 | #include <qtimer.h> |
31 | #include <qpixmap.h> | 31 | #include <qpixmap.h> |
32 | 32 | ||
33 | class OTabWidget; | 33 | class OSplitter; |
34 | class QVBoxLayout; | 34 | class QVBoxLayout; |
35 | class QHBoxLayout; | 35 | class QHBoxLayout; |
36 | class QGridLayout; | 36 | class QGridLayout; |
37 | class QComboBox; | 37 | class QComboBox; |
38 | class QListView; | 38 | class QListView; |
39 | class QListviewItem; | 39 | class QListviewItem; |
40 | class QLabel; | 40 | class QLabel; |
41 | class QProgressBar; | 41 | class QProgressBar; |
42 | class QSpinBox; | 42 | class QSpinBox; |
43 | class QTabWidget; | 43 | class QTabWidget; |
44 | class QWidget; | 44 | class QWidget; |
45 | class QPopupMenu; | 45 | class QPopupMenu; |
46 | class QFile; | 46 | class QFile; |
47 | class QListViewItem; | 47 | class QListViewItem; |
48 | class QLineEdit; | 48 | class QLineEdit; |
49 | class MenuButton; | 49 | class MenuButton; |
@@ -77,33 +77,33 @@ protected slots: | |||
77 | void tabChanged(QWidget*); | 77 | void tabChanged(QWidget*); |
78 | void cleanUp(); | 78 | void cleanUp(); |
79 | void renameIt(); | 79 | void renameIt(); |
80 | void runThis(); | 80 | void runThis(); |
81 | void runText(); | 81 | void runText(); |
82 | void filePerms(); | 82 | void filePerms(); |
83 | void doProperties(); | 83 | void doProperties(); |
84 | void runCommand(); | 84 | void runCommand(); |
85 | void runCommandStd(); | 85 | void runCommandStd(); |
86 | QStringList getPath(); | 86 | QStringList getPath(); |
87 | void mkSym(); | 87 | void mkSym(); |
88 | void switchToLocalTab(); | 88 | void switchToLocalTab(); |
89 | void switchToRemoteTab(); | 89 | void switchToRemoteTab(); |
90 | 90 | ||
91 | protected: | 91 | protected: |
92 | 92 | ||
93 | OTabWidget *TabWidget; | 93 | OSplitter *TabWidget; |
94 | QCopChannel * channel; | 94 | QCopChannel * channel; |
95 | QPixmap unknownXpm; | 95 | QPixmap unknownXpm; |
96 | int whichTab; | 96 | int whichTab; |
97 | // QTabWidget *TabWidget; | 97 | // QTabWidget *TabWidget; |
98 | QWidget *tab, *tab_2, *tab_3; | 98 | QWidget *tab, *tab_2, *tab_3; |
99 | QListView *Local_View, *Remote_View; | 99 | QListView *Local_View, *Remote_View; |
100 | 100 | ||
101 | QLineEdit *currentPathEdit; | 101 | QLineEdit *currentPathEdit; |
102 | QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/; | 102 | QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/; |
103 | QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; | 103 | QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; |
104 | // QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; | 104 | // QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; |
105 | QDir currentDir, currentRemoteDir; | 105 | QDir currentDir, currentRemoteDir; |
106 | QComboBox *currentPathCombo; | 106 | QComboBox *currentPathCombo; |
107 | QString filterStr, s_addBookmark, s_removeBookmark; | 107 | QString filterStr, s_addBookmark, s_removeBookmark; |
108 | QListViewItem * item; | 108 | QListViewItem * item; |
109 | bool b; | 109 | bool b; |
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 45dc0c4..463b202 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -1,30 +1,30 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | advancedfmData.cpp | 2 | advancedfmData.cpp |
3 | ------------------- | 3 | ------------------- |
4 | ** Created: Mon 09-23-2002 13:24:11 | 4 | ** Created: Mon 09-23-2002 13:24:11 |
5 | copyright : (C) 2002 by ljp | 5 | copyright : (C) 2002 by ljp |
6 | email : ljp@llornkcor.com | 6 | email : ljp@llornkcor.com |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | #include "advancedfm.h" | 12 | #include "advancedfm.h" |
13 | 13 | ||
14 | #include <opie/otabwidget.h> | 14 | #include <opie/osplitter.h> |
15 | #include <qpe/storage.h> | 15 | #include <qpe/storage.h> |
16 | 16 | ||
17 | #include <qpe/qpeapplication.h> | 17 | #include <qpe/qpeapplication.h> |
18 | #include <qpe/resource.h> | 18 | #include <qpe/resource.h> |
19 | #include <qpe/menubutton.h> | 19 | #include <qpe/menubutton.h> |
20 | 20 | ||
21 | #include <qlayout.h> | 21 | #include <qlayout.h> |
22 | #include <qhbox.h> | 22 | #include <qhbox.h> |
23 | #include <qmenubar.h> | 23 | #include <qmenubar.h> |
24 | #include <qcombobox.h> | 24 | #include <qcombobox.h> |
25 | #include <qtoolbutton.h> | 25 | #include <qtoolbutton.h> |
26 | #include <qlineedit.h> | 26 | #include <qlineedit.h> |
27 | #include <qlistview.h> | 27 | #include <qlistview.h> |
28 | 28 | ||
29 | #include <sys/utsname.h> | 29 | #include <sys/utsname.h> |
30 | 30 | ||
@@ -117,79 +117,80 @@ void AdvancedFm::init() { | |||
117 | 117 | ||
118 | menuButton->setUseLabel(false); | 118 | menuButton->setUseLabel(false); |
119 | menuButton->setMaximumWidth( 20 ); | 119 | menuButton->setMaximumWidth( 20 ); |
120 | menuButton->insertItem( s_addBookmark); | 120 | menuButton->insertItem( s_addBookmark); |
121 | menuButton->insertItem( s_removeBookmark); | 121 | menuButton->insertItem( s_removeBookmark); |
122 | menuButton->insertSeparator(); | 122 | menuButton->insertSeparator(); |
123 | 123 | ||
124 | customDirsToMenu(); | 124 | customDirsToMenu(); |
125 | 125 | ||
126 | currentPathCombo = new QComboBox( FALSE, lineBox, "currentPathCombo" ); | 126 | currentPathCombo = new QComboBox( FALSE, lineBox, "currentPathCombo" ); |
127 | currentPathCombo->setEditable(TRUE); | 127 | currentPathCombo->setEditable(TRUE); |
128 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 128 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
129 | 129 | ||
130 | layout->addWidget( lineBox ); | 130 | layout->addWidget( lineBox ); |
131 | 131 | ||
132 | 132 | ||
133 | TabWidget = new OTabWidget( this, "TabWidget",/* OTabWidget::Global | */OTabWidget::IconTab); | 133 | TabWidget = new OSplitter( Horizontal, this, "TabWidget" ); |
134 | // TabWidget = new QTabWidget( this, "TabWidget" ); | 134 | // TabWidget = new QTabWidget( this, "TabWidget" ); |
135 | layout->addWidget( TabWidget, 4 ); | 135 | layout->addWidget( TabWidget, 4 ); |
136 | 136 | ||
137 | tab = new QWidget( TabWidget, "tab" ); | 137 | tab = new QWidget( TabWidget, "tab" ); |
138 | tabLayout = new QGridLayout( tab ); | 138 | tabLayout = new QGridLayout( tab ); |
139 | tabLayout->setSpacing( 2); | 139 | tabLayout->setSpacing( 2); |
140 | tabLayout->setMargin( 2); | 140 | tabLayout->setMargin( 2); |
141 | 141 | ||
142 | Local_View = new QListView( tab, "Local_View" ); | 142 | Local_View = new QListView( tab, "Local_View" ); |
143 | Local_View->addColumn( tr("File"),130); | 143 | Local_View->addColumn( tr("File"),130); |
144 | Local_View->addColumn( tr("Size"),-1); | 144 | Local_View->addColumn( tr("Size"),-1); |
145 | Local_View->setColumnAlignment(1,QListView::AlignRight); | 145 | Local_View->setColumnAlignment(1,QListView::AlignRight); |
146 | Local_View->addColumn( tr("Date"),-1); | 146 | Local_View->addColumn( tr("Date"),-1); |
147 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 147 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
148 | Local_View->setAllColumnsShowFocus(TRUE); | 148 | Local_View->setAllColumnsShowFocus(TRUE); |
149 | Local_View->setMultiSelection( TRUE ); | 149 | Local_View->setMultiSelection( TRUE ); |
150 | Local_View->setSelectionMode(QListView::Extended); | 150 | Local_View->setSelectionMode(QListView::Extended); |
151 | 151 | ||
152 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 152 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
153 | 153 | ||
154 | tabLayout->addWidget( Local_View, 0, 0 ); | 154 | tabLayout->addWidget( Local_View, 0, 0 ); |
155 | 155 | ||
156 | TabWidget->addTab( tab,"advancedfm/smFileBrowser.png", tr("1")); | 156 | TabWidget->addWidget( tab,"advancedfm/smFileBrowser.png", tr("1")); |
157 | // TabWidget->insertTab( tab, tr("1")); | 157 | // TabWidget->insertTab( tab, tr("1")); |
158 | 158 | ||
159 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 159 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
160 | tabLayout_2 = new QGridLayout( tab_2 ); | 160 | tabLayout_2 = new QGridLayout( tab_2 ); |
161 | tabLayout_2->setSpacing( 2); | 161 | tabLayout_2->setSpacing( 2); |
162 | tabLayout_2->setMargin( 2); | 162 | tabLayout_2->setMargin( 2); |
163 | 163 | ||
164 | Remote_View = new QListView( tab_2, "Remote_View" ); | 164 | Remote_View = new QListView( tab_2, "Remote_View" ); |
165 | Remote_View->addColumn( tr("File"),130); | 165 | Remote_View->addColumn( tr("File"),130); |
166 | Remote_View->addColumn( tr("Size"),-1); | 166 | Remote_View->addColumn( tr("Size"),-1); |
167 | Remote_View->setColumnAlignment(1,QListView::AlignRight); | 167 | Remote_View->setColumnAlignment(1,QListView::AlignRight); |
168 | Remote_View->addColumn( tr("Date"),-1); | 168 | Remote_View->addColumn( tr("Date"),-1); |
169 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 169 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
170 | Remote_View->setAllColumnsShowFocus(TRUE); | 170 | Remote_View->setAllColumnsShowFocus(TRUE); |
171 | Remote_View->setMultiSelection( TRUE ); | 171 | Remote_View->setMultiSelection( TRUE ); |
172 | Remote_View->setSelectionMode(QListView::Extended); | 172 | Remote_View->setSelectionMode(QListView::Extended); |
173 | 173 | ||
174 | 174 | ||
175 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 175 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
176 | 176 | ||
177 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 177 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
178 | 178 | ||
179 | TabWidget->addTab( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); | 179 | TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); |
180 | TabWidget->setSizeChange( 370 ); | ||
180 | // TabWidget->insertTab( tab_2, tr( "2")); | 181 | // TabWidget->insertTab( tab_2, tr( "2")); |
181 | 182 | ||
182 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); | 183 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); |
183 | tabLayout_3 = new QGridLayout( tab_3 ); | 184 | tabLayout_3 = new QGridLayout( tab_3 ); |
184 | tabLayout_3->setSpacing( 2); | 185 | tabLayout_3->setSpacing( 2); |
185 | tabLayout_3->setMargin( 2); | 186 | tabLayout_3->setMargin( 2); |
186 | 187 | ||
187 | 188 | ||
188 | // OFileDialog fileDialog; | 189 | // OFileDialog fileDialog; |
189 | // fileDialog; | 190 | // fileDialog; |
190 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy | 191 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy |
191 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); | 192 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); |
192 | // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); | 193 | // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); |
193 | 194 | ||
194 | QListView *fileTree; | 195 | QListView *fileTree; |
195 | fileTree = new QListView( tab_3, "tree" ); | 196 | fileTree = new QListView( tab_3, "tree" ); |
@@ -219,33 +220,33 @@ void AdvancedFm::init() { | |||
219 | } | 220 | } |
220 | if( !StorageInfo::hasCf() ) { | 221 | if( !StorageInfo::hasCf() ) { |
221 | qDebug("not have cf"); | 222 | qDebug("not have cf"); |
222 | cfButton->hide(); | 223 | cfButton->hide(); |
223 | } | 224 | } |
224 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 225 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
225 | currentDir.setPath( QDir::currentDirPath()); | 226 | currentDir.setPath( QDir::currentDirPath()); |
226 | 227 | ||
227 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 228 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
228 | currentRemoteDir.setPath( QDir::currentDirPath()); | 229 | currentRemoteDir.setPath( QDir::currentDirPath()); |
229 | 230 | ||
230 | // b = TRUE; | 231 | // b = TRUE; |
231 | 232 | ||
232 | filterStr="*"; | 233 | filterStr="*"; |
233 | b=FALSE; | 234 | b=FALSE; |
234 | showMenuHidden(); | 235 | showMenuHidden(); |
235 | TabWidget->setCurrentTab(0); | 236 | TabWidget->setCurrentWidget(0); |
236 | 237 | ||
237 | } | 238 | } |
238 | 239 | ||
239 | void AdvancedFm::initConnections() | 240 | void AdvancedFm::initConnections() |
240 | { | 241 | { |
241 | 242 | ||
242 | connect( qApp,SIGNAL( aboutToQuit()), | 243 | connect( qApp,SIGNAL( aboutToQuit()), |
243 | this, SLOT( cleanUp()) ); | 244 | this, SLOT( cleanUp()) ); |
244 | connect( qpeDirButton ,SIGNAL(released()), | 245 | connect( qpeDirButton ,SIGNAL(released()), |
245 | this,SLOT( QPEButtonPushed()) ); | 246 | this,SLOT( QPEButtonPushed()) ); |
246 | connect( cfButton ,SIGNAL(released()), | 247 | connect( cfButton ,SIGNAL(released()), |
247 | this,SLOT( CFButtonPushed()) ); | 248 | this,SLOT( CFButtonPushed()) ); |
248 | connect( sdButton ,SIGNAL(released()), | 249 | connect( sdButton ,SIGNAL(released()), |
249 | this,SLOT( SDButtonPushed()) ); | 250 | this,SLOT( SDButtonPushed()) ); |
250 | connect( cdUpButton ,SIGNAL(released()), | 251 | connect( cdUpButton ,SIGNAL(released()), |
251 | this,SLOT( upDir()) ); | 252 | this,SLOT( upDir()) ); |