-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 2 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index b4461cb..4de7d38 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -192,192 +192,198 @@ void AdvancedFm::populateView() { | |||
192 | if( path.find("dev",0,TRUE) != -1) { | 192 | if( path.find("dev",0,TRUE) != -1) { |
193 | struct stat buf; | 193 | struct stat buf; |
194 | dev_t devT; | 194 | dev_t devT; |
195 | DIR *dir; | 195 | DIR *dir; |
196 | struct dirent *mydirent; | 196 | struct dirent *mydirent; |
197 | 197 | ||
198 | if((dir = opendir( path.latin1())) != NULL) | 198 | if((dir = opendir( path.latin1())) != NULL) |
199 | while ((mydirent = readdir(dir)) != NULL) { | 199 | while ((mydirent = readdir(dir)) != NULL) { |
200 | lstat( mydirent->d_name, &buf); | 200 | lstat( mydirent->d_name, &buf); |
201 | // odebug << mydirent->d_name << oendl; | 201 | // odebug << mydirent->d_name << oendl; |
202 | fileL.sprintf("%s", mydirent->d_name); | 202 | fileL.sprintf("%s", mydirent->d_name); |
203 | devT = buf.st_dev; | 203 | devT = buf.st_dev; |
204 | fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); | 204 | fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); |
205 | fileDate.sprintf("%s", ctime( &buf.st_mtime)); | 205 | fileDate.sprintf("%s", ctime( &buf.st_mtime)); |
206 | if( fileL.find(".") == -1 ) { | 206 | if( fileL.find(".") == -1 ) { |
207 | item= new QListViewItem( thisView, fileL, fileS, fileDate); | 207 | item= new QListViewItem( thisView, fileL, fileS, fileDate); |
208 | pm = unknownXpm; | 208 | pm = unknownXpm; |
209 | item->setPixmap( 0,pm); | 209 | item->setPixmap( 0,pm); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | 212 | ||
213 | closedir(dir); | 213 | closedir(dir); |
214 | } | 214 | } |
215 | 215 | ||
216 | thisView->setSorting( 3,FALSE); | 216 | thisView->setSorting( 3,FALSE); |
217 | fillCombo( (const QString &) path ); | 217 | fillCombo( (const QString &) path ); |
218 | } | 218 | } |
219 | 219 | ||
220 | void AdvancedFm::rePopulate() { | 220 | void AdvancedFm::rePopulate() { |
221 | populateView(); | 221 | populateView(); |
222 | setOtherTabCurrent(); | 222 | setOtherTabCurrent(); |
223 | populateView(); | 223 | populateView(); |
224 | 224 | ||
225 | // int tmpTab = whichTab; | 225 | // int tmpTab = whichTab; |
226 | // // odebug << "" << tmpTab << "" << oendl; | 226 | // // odebug << "" << tmpTab << "" << oendl; |
227 | 227 | ||
228 | // for(int i =1; i < 3; i++) { | 228 | // for(int i =1; i < 3; i++) { |
229 | // TabWidget->setCurrentWidget(i - 1); | 229 | // TabWidget->setCurrentWidget(i - 1); |
230 | // populateView(); | 230 | // populateView(); |
231 | // } | 231 | // } |
232 | // TabWidget->setCurrentWidget( tmpTab - 1); | 232 | // TabWidget->setCurrentWidget( tmpTab - 1); |
233 | } | 233 | } |
234 | 234 | ||
235 | void AdvancedFm::ListClicked(QListViewItem *selectedItem) { | 235 | void AdvancedFm::ListClicked(QListViewItem *selectedItem) { |
236 | if ( TabWidget->currentWidget() == tab) | 236 | if ( TabWidget->currentWidget() == tab) |
237 | qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local"); | 237 | qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local"); |
238 | else | 238 | else |
239 | qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote"); | 239 | qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote"); |
240 | 240 | ||
241 | 241 | ||
242 | if(selectedItem) { | 242 | if(selectedItem) { |
243 | QString strItem=selectedItem->text(0); | 243 | QString strItem=selectedItem->text(0); |
244 | // owarn << strItem << oendl; | 244 | // owarn << strItem << oendl; |
245 | QString strSize=selectedItem->text(1); | 245 | QString strSize=selectedItem->text(1); |
246 | strSize=strSize.stripWhiteSpace(); | 246 | strSize=strSize.stripWhiteSpace(); |
247 | bool isDirectory = false; | 247 | bool isDirectory = false; |
248 | QString strItem2; | 248 | QString strItem2; |
249 | 249 | ||
250 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) {//if symlink | 250 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) {//if symlink |
251 | strItem2 = dealWithSymName((const QString&)strItem); | 251 | strItem2 = dealWithSymName((const QString&)strItem); |
252 | if(QDir(strItem2).exists() ) | 252 | if(QDir(strItem2).exists() ) |
253 | strItem = strItem2; | 253 | strItem = strItem2; |
254 | } | 254 | } |
255 | 255 | ||
256 | if( strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { | 256 | if( strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { |
257 | 257 | ||
258 | if(QDir(strItem).exists()) | 258 | if(QDir(strItem).exists()) |
259 | isDirectory = true; | 259 | isDirectory = true; |
260 | } | 260 | } |
261 | 261 | ||
262 | if( isDirectory ) { | 262 | if( isDirectory ) { |
263 | CurrentDir()->cd( strItem, TRUE); | 263 | CurrentDir()->cd( strItem, TRUE); |
264 | populateView(); | 264 | populateView(); |
265 | CurrentView()->ensureItemVisible( CurrentView()->firstChild()); | 265 | CurrentView()->ensureItemVisible( CurrentView()->firstChild()); |
266 | } | 266 | } |
267 | chdir( strItem.latin1()); | 267 | chdir( strItem.latin1()); |
268 | } | 268 | } |
269 | } | 269 | } |
270 | 270 | ||
271 | void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , int ) { | 271 | void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , int ) { |
272 | Q_UNUSED(item); | 272 | Q_UNUSED(item); |
273 | switch (mouse) { | 273 | switch (mouse) { |
274 | case 1: | 274 | case 1: |
275 | { | 275 | { |
276 | if(renameBox != 0 ) { | 276 | if(renameBox != 0 ) { |
277 | cancelRename(); | 277 | cancelRename(); |
278 | } | 278 | } |
279 | } | 279 | } |
280 | break; | 280 | break; |
281 | // case 2: | 281 | // case 2: |
282 | // menuTimer.start( 50, TRUE ); | 282 | // menuTimer.start( 50, TRUE ); |
283 | // break; | 283 | // break; |
284 | }; | 284 | }; |
285 | } | 285 | } |
286 | 286 | ||
287 | 287 | ||
288 | void AdvancedFm::refreshCurrentTab() { | ||
289 | populateView(); | ||
290 | // if ( TabWidget->currentWidget() == tab) { | ||
291 | |||
292 | } | ||
293 | |||
288 | void AdvancedFm::switchToLocalTab() { | 294 | void AdvancedFm::switchToLocalTab() { |
289 | TabWidget->setCurrentWidget(0); | 295 | TabWidget->setCurrentWidget(0); |
290 | Local_View->setFocus(); | 296 | Local_View->setFocus(); |
291 | 297 | ||
292 | } | 298 | } |
293 | 299 | ||
294 | void AdvancedFm::switchToRemoteTab() { | 300 | void AdvancedFm::switchToRemoteTab() { |
295 | TabWidget->setCurrentWidget(1); | 301 | TabWidget->setCurrentWidget(1); |
296 | Remote_View->setFocus(); | 302 | Remote_View->setFocus(); |
297 | } | 303 | } |
298 | 304 | ||
299 | void AdvancedFm::readConfig() { | 305 | void AdvancedFm::readConfig() { |
300 | Config cfg("AdvancedFm"); | 306 | Config cfg("AdvancedFm"); |
301 | } | 307 | } |
302 | 308 | ||
303 | void AdvancedFm::writeConfig() { | 309 | void AdvancedFm::writeConfig() { |
304 | Config cfg("AdvancedFm"); | 310 | Config cfg("AdvancedFm"); |
305 | } | 311 | } |
306 | 312 | ||
307 | void AdvancedFm::currentPathComboChanged() { | 313 | void AdvancedFm::currentPathComboChanged() { |
308 | if(QDir( currentPathCombo->lineEdit()->text()).exists()) { | 314 | if(QDir( currentPathCombo->lineEdit()->text()).exists()) { |
309 | CurrentDir()->setPath( currentPathCombo->lineEdit()->text() ); | 315 | CurrentDir()->setPath( currentPathCombo->lineEdit()->text() ); |
310 | populateView(); | 316 | populateView(); |
311 | } else { | 317 | } else { |
312 | QMessageBox::message(tr("Note"),tr("That directory does not exist")); | 318 | QMessageBox::message(tr("Note"),tr("That directory does not exist")); |
313 | } | 319 | } |
314 | } | 320 | } |
315 | 321 | ||
316 | void AdvancedFm::fillCombo(const QString ¤tPath) { | 322 | void AdvancedFm::fillCombo(const QString ¤tPath) { |
317 | 323 | ||
318 | if ( TabWidget->currentWidget() == tab) { | 324 | if ( TabWidget->currentWidget() == tab) { |
319 | // if ( whichTab == 1) { | 325 | // if ( whichTab == 1) { |
320 | currentPathCombo->lineEdit()->setText( currentPath); | 326 | currentPathCombo->lineEdit()->setText( currentPath); |
321 | if( localDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { | 327 | if( localDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { |
322 | currentPathCombo->clear(); | 328 | currentPathCombo->clear(); |
323 | localDirPathStringList.prepend( currentPath ); | 329 | localDirPathStringList.prepend( currentPath ); |
324 | currentPathCombo->insertStringList( localDirPathStringList,-1); | 330 | currentPathCombo->insertStringList( localDirPathStringList,-1); |
325 | } | 331 | } |
326 | } else { | 332 | } else { |
327 | currentPathCombo->lineEdit()->setText( currentPath); | 333 | currentPathCombo->lineEdit()->setText( currentPath); |
328 | if( remoteDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { | 334 | if( remoteDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { |
329 | currentPathCombo->clear(); | 335 | currentPathCombo->clear(); |
330 | remoteDirPathStringList.prepend( currentPath ); | 336 | remoteDirPathStringList.prepend( currentPath ); |
331 | currentPathCombo->insertStringList( remoteDirPathStringList,-1); | 337 | currentPathCombo->insertStringList( remoteDirPathStringList,-1); |
332 | } | 338 | } |
333 | } | 339 | } |
334 | } | 340 | } |
335 | 341 | ||
336 | void AdvancedFm::currentPathComboActivated(const QString & currentPath) { | 342 | void AdvancedFm::currentPathComboActivated(const QString & currentPath) { |
337 | chdir( currentPath.latin1() ); | 343 | chdir( currentPath.latin1() ); |
338 | CurrentDir()->cd( currentPath, TRUE); | 344 | CurrentDir()->cd( currentPath, TRUE); |
339 | populateView(); | 345 | populateView(); |
340 | update(); | 346 | update(); |
341 | } | 347 | } |
342 | 348 | ||
343 | QStringList AdvancedFm::getPath() { | 349 | QStringList AdvancedFm::getPath() { |
344 | QStringList strList; | 350 | QStringList strList; |
345 | QListView *thisView=CurrentView(); | 351 | QListView *thisView=CurrentView(); |
346 | QList<QListViewItem> * getSelectedItems( QListView * thisView ); | 352 | QList<QListViewItem> * getSelectedItems( QListView * thisView ); |
347 | QListViewItemIterator it( thisView ); | 353 | QListViewItemIterator it( thisView ); |
348 | for ( ; it.current(); ++it ) { | 354 | for ( ; it.current(); ++it ) { |
349 | if ( it.current()->isSelected() ) { | 355 | if ( it.current()->isSelected() ) { |
350 | strList << it.current()->text(0); | 356 | strList << it.current()->text(0); |
351 | // odebug << it.current()->text(0) << oendl; | 357 | // odebug << it.current()->text(0) << oendl; |
352 | } | 358 | } |
353 | } | 359 | } |
354 | return strList; | 360 | return strList; |
355 | } | 361 | } |
356 | 362 | ||
357 | void AdvancedFm::homeButtonPushed() { | 363 | void AdvancedFm::homeButtonPushed() { |
358 | QString current = QDir::homeDirPath(); | 364 | QString current = QDir::homeDirPath(); |
359 | chdir( current.latin1() ); | 365 | chdir( current.latin1() ); |
360 | CurrentDir()->cd( current, TRUE); | 366 | CurrentDir()->cd( current, TRUE); |
361 | populateView(); | 367 | populateView(); |
362 | update(); | 368 | update(); |
363 | } | 369 | } |
364 | 370 | ||
365 | void AdvancedFm::docButtonPushed() { | 371 | void AdvancedFm::docButtonPushed() { |
366 | QString current = QPEApplication::documentDir(); | 372 | QString current = QPEApplication::documentDir(); |
367 | chdir( current.latin1() ); | 373 | chdir( current.latin1() ); |
368 | CurrentDir()->cd( current, TRUE); | 374 | CurrentDir()->cd( current, TRUE); |
369 | populateView(); | 375 | populateView(); |
370 | update(); | 376 | update(); |
371 | } | 377 | } |
372 | 378 | ||
373 | void AdvancedFm::SDButtonPushed() { | 379 | void AdvancedFm::SDButtonPushed() { |
374 | QString current = "/mnt/card";// this can change so fix | 380 | QString current = "/mnt/card";// this can change so fix |
375 | chdir( current.latin1() ); | 381 | chdir( current.latin1() ); |
376 | CurrentDir()->cd( current, TRUE); | 382 | CurrentDir()->cd( current, TRUE); |
377 | populateView(); | 383 | populateView(); |
378 | update(); | 384 | update(); |
379 | } | 385 | } |
380 | 386 | ||
381 | void AdvancedFm::CFButtonPushed() { | 387 | void AdvancedFm::CFButtonPushed() { |
382 | QString current; | 388 | QString current; |
383 | if(zaurusDevice) | 389 | if(zaurusDevice) |
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index e596977..def6fe2 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -1,186 +1,186 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | advancedfm.h | 2 | advancedfm.h |
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 | #ifndef ADVANCEDFM_H | 12 | #ifndef ADVANCEDFM_H |
13 | #define ADVANCEDFM_H | 13 | #define ADVANCEDFM_H |
14 | #define QTOPIA_INTERNAL_FSLP // to get access to fileproperties | 14 | #define QTOPIA_INTERNAL_FSLP // to get access to fileproperties |
15 | #define QT_QWS_OPIE | 15 | #define QT_QWS_OPIE |
16 | 16 | ||
17 | #include <opie2/oprocess.h> | 17 | #include <opie2/oprocess.h> |
18 | #include <opie2/osplitter.h> | 18 | #include <opie2/osplitter.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 | 33 | ||
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 QWidget; | 43 | class QWidget; |
44 | class QPopupMenu; | 44 | class QPopupMenu; |
45 | class QFile; | 45 | class QFile; |
46 | class QListViewItem; | 46 | class QListViewItem; |
47 | class QLineEdit; | 47 | class QLineEdit; |
48 | class MenuButton; | 48 | class MenuButton; |
49 | 49 | ||
50 | class QToolButton; | 50 | class QToolButton; |
51 | class Ir; | 51 | class Ir; |
52 | 52 | ||
53 | class AdvancedFm : public QMainWindow | 53 | class AdvancedFm : public QMainWindow |
54 | { | 54 | { |
55 | Q_OBJECT | 55 | Q_OBJECT |
56 | public: | 56 | public: |
57 | static QString appName() { return QString::fromLatin1("advancedfm"); } | 57 | static QString appName() { return QString::fromLatin1("advancedfm"); } |
58 | AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0); | 58 | AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0); |
59 | ~AdvancedFm(); | 59 | ~AdvancedFm(); |
60 | protected slots: | 60 | protected slots: |
61 | void slotSwitchMenu(int); | 61 | void slotSwitchMenu(int); |
62 | void selectAll(); | 62 | void selectAll(); |
63 | void addToDocs(); | 63 | void addToDocs(); |
64 | void doDirChange(); | 64 | void doDirChange(); |
65 | void mkDir(); | 65 | void mkDir(); |
66 | void del(); | 66 | void del(); |
67 | void rn(); | 67 | void rn(); |
68 | void populateView(); | 68 | void populateView(); |
69 | void rePopulate(); | 69 | void rePopulate(); |
70 | void showHidden(); | 70 | void showHidden(); |
71 | void showMenuHidden(); | 71 | void showMenuHidden(); |
72 | void writeConfig(); | 72 | void writeConfig(); |
73 | void readConfig(); | 73 | void readConfig(); |
74 | void ListClicked(QListViewItem *); | 74 | void ListClicked(QListViewItem *); |
75 | void ListPressed( int, QListViewItem *, const QPoint&, int); | 75 | void ListPressed( int, QListViewItem *, const QPoint&, int); |
76 | void makeDir(); | 76 | void makeDir(); |
77 | void doDelete(); | 77 | void doDelete(); |
78 | void tabChanged(QWidget*); | 78 | void tabChanged(QWidget*); |
79 | void cleanUp(); | 79 | void cleanUp(); |
80 | void renameIt(); | 80 | void renameIt(); |
81 | void runThis(); | 81 | void runThis(); |
82 | void runText(); | 82 | void runText(); |
83 | void filePerms(); | 83 | void filePerms(); |
84 | void doProperties(); | 84 | void doProperties(); |
85 | void runCommand(); | 85 | void runCommand(); |
86 | void runCommandStd(); | 86 | void runCommandStd(); |
87 | QStringList getPath(); | 87 | QStringList getPath(); |
88 | void mkSym(); | 88 | void mkSym(); |
89 | void switchToLocalTab(); | 89 | void switchToLocalTab(); |
90 | void switchToRemoteTab(); | 90 | void switchToRemoteTab(); |
91 | 91 | void refreshCurrentTab(); | |
92 | protected: | 92 | protected: |
93 | 93 | ||
94 | Opie::Ui::OSplitter *TabWidget; | 94 | Opie::Ui::OSplitter *TabWidget; |
95 | QCopChannel * channel; | 95 | QCopChannel * channel; |
96 | QPixmap unknownXpm; | 96 | QPixmap unknownXpm; |
97 | int whichTab; | 97 | int whichTab; |
98 | // QTabWidget *TabWidget; | 98 | // QTabWidget *TabWidget; |
99 | QWidget *tab, *tab_2, *tab_3; | 99 | QWidget *tab, *tab_2, *tab_3; |
100 | QListView *Local_View, *Remote_View; | 100 | QListView *Local_View, *Remote_View; |
101 | 101 | ||
102 | QLineEdit *currentPathEdit; | 102 | QLineEdit *currentPathEdit; |
103 | QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/; | 103 | QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/; |
104 | QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; | 104 | QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; |
105 | // QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; | 105 | // QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; |
106 | QDir currentDir, currentRemoteDir; | 106 | QDir currentDir, currentRemoteDir; |
107 | QComboBox *currentPathCombo; | 107 | QComboBox *currentPathCombo; |
108 | QString filterStr, s_addBookmark, s_removeBookmark; | 108 | QString filterStr, s_addBookmark, s_removeBookmark; |
109 | QListViewItem * item; | 109 | QListViewItem * item; |
110 | bool b; | 110 | bool b; |
111 | QStringList fileSystemTypeList, fsList; | 111 | QStringList fileSystemTypeList, fsList; |
112 | int currentServerConfig; | 112 | int currentServerConfig; |
113 | bool zaurusDevice; | 113 | bool zaurusDevice; |
114 | QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3; | 114 | QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3; |
115 | QStringList remoteDirPathStringList, localDirPathStringList; | 115 | QStringList remoteDirPathStringList, localDirPathStringList; |
116 | QLineEdit *renameBox; | 116 | QLineEdit *renameBox; |
117 | 117 | ||
118 | void init(); | 118 | void init(); |
119 | void initConnections(); | 119 | void initConnections(); |
120 | void keyReleaseEvent( QKeyEvent *); | 120 | void keyReleaseEvent( QKeyEvent *); |
121 | void keyPressEvent( QKeyEvent *); | 121 | void keyPressEvent( QKeyEvent *); |
122 | QString getFileSystemType(const QString &); | 122 | QString getFileSystemType(const QString &); |
123 | QString getDiskSpace(const QString &); | 123 | QString getDiskSpace(const QString &); |
124 | void parsetab(const QString &fileName); | 124 | void parsetab(const QString &fileName); |
125 | QString checkDiskSpace(const QString &); | 125 | QString checkDiskSpace(const QString &); |
126 | QString dealWithSymName(const QString &); | 126 | QString dealWithSymName(const QString &); |
127 | QDir *CurrentDir(); | 127 | QDir *CurrentDir(); |
128 | QDir *OtherDir(); | 128 | QDir *OtherDir(); |
129 | QListView *CurrentView(); | 129 | QListView *CurrentView(); |
130 | QListView *OtherView(); | 130 | QListView *OtherView(); |
131 | void setOtherTabCurrent(); | 131 | void setOtherTabCurrent(); |
132 | 132 | ||
133 | protected slots: | 133 | protected slots: |
134 | 134 | ||
135 | void openSearch(); | 135 | void openSearch(); |
136 | void dirMenuSelected(int); | 136 | void dirMenuSelected(int); |
137 | void showFileMenu(); | 137 | void showFileMenu(); |
138 | void homeButtonPushed(); | 138 | void homeButtonPushed(); |
139 | void docButtonPushed(); | 139 | void docButtonPushed(); |
140 | void SDButtonPushed(); | 140 | void SDButtonPushed(); |
141 | void CFButtonPushed(); | 141 | void CFButtonPushed(); |
142 | void QPEButtonPushed(); | 142 | void QPEButtonPushed(); |
143 | void upDir(); | 143 | void upDir(); |
144 | void currentPathComboChanged(); | 144 | void currentPathComboChanged(); |
145 | void copy(); | 145 | void copy(); |
146 | void copyAs(); | 146 | void copyAs(); |
147 | void copySameDir(); | 147 | void copySameDir(); |
148 | void currentPathComboActivated(const QString &); | 148 | void currentPathComboActivated(const QString &); |
149 | void fillCombo(const QString &); | 149 | void fillCombo(const QString &); |
150 | bool copyFile( const QString & , const QString & ); | 150 | bool copyFile( const QString & , const QString & ); |
151 | void move(); | 151 | void move(); |
152 | void fileStatus(); | 152 | void fileStatus(); |
153 | void doAbout(); | 153 | void doAbout(); |
154 | void doBeam(); | 154 | void doBeam(); |
155 | void fileBeamFinished( Ir *); | 155 | void fileBeamFinished( Ir *); |
156 | bool copyDirectory( const QString & , const QString & ); | 156 | bool copyDirectory( const QString & , const QString & ); |
157 | // void navigateToSelected(); | 157 | // void navigateToSelected(); |
158 | bool moveDirectory( const QString & , const QString & ); | 158 | bool moveDirectory( const QString & , const QString & ); |
159 | 159 | ||
160 | // void slotSwitchtoLocal(int); | 160 | // void slotSwitchtoLocal(int); |
161 | 161 | ||
162 | private: | 162 | private: |
163 | MenuButton *menuButton; | 163 | MenuButton *menuButton; |
164 | QString oldName; | 164 | QString oldName; |
165 | void startProcess(const QString &); | 165 | void startProcess(const QString &); |
166 | bool eventFilter( QObject * , QEvent * ); | 166 | bool eventFilter( QObject * , QEvent * ); |
167 | void cancelRename(); | 167 | void cancelRename(); |
168 | void doRename(QListView *); | 168 | void doRename(QListView *); |
169 | void okRename(); | 169 | void okRename(); |
170 | void customDirsToMenu(); | 170 | void customDirsToMenu(); |
171 | void addCustomDir(); | 171 | void addCustomDir(); |
172 | void removeCustomDir(); | 172 | void removeCustomDir(); |
173 | void gotoDirectory(const QString &); | 173 | void gotoDirectory(const QString &); |
174 | void navigateToSelected(); | 174 | void navigateToSelected(); |
175 | void findFile(const QString &); | 175 | void findFile(const QString &); |
176 | 176 | ||
177 | private slots: | 177 | private slots: |
178 | void processEnded(Opie::Core::OProcess *); | 178 | void processEnded(Opie::Core::OProcess *); |
179 | void oprocessStderr(Opie::Core::OProcess *, char *, int); | 179 | void oprocessStderr(Opie::Core::OProcess *, char *, int); |
180 | void gotoCustomDir(const QString &); | 180 | void gotoCustomDir(const QString &); |
181 | void qcopReceive(const QCString&, const QByteArray&); | 181 | void qcopReceive(const QCString&, const QByteArray&); |
182 | void setDocument(const QString &); | 182 | void setDocument(const QString &); |
183 | 183 | ||
184 | }; | 184 | }; |
185 | 185 | ||
186 | #endif // ADVANCEDFM_H | 186 | #endif // ADVANCEDFM_H |
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index dc7e8e1..1802571 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -8,192 +8,193 @@ | |||
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 | /* OPIE */ | 14 | /* OPIE */ |
15 | #include <opie2/odebug.h> | 15 | #include <opie2/odebug.h> |
16 | #include <qpe/storage.h> | 16 | #include <qpe/storage.h> |
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 | using namespace Opie::Core; | 20 | using namespace Opie::Core; |
21 | using namespace Opie::Ui; | 21 | using namespace Opie::Ui; |
22 | 22 | ||
23 | /* QT */ | 23 | /* QT */ |
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qhbox.h> | 25 | #include <qhbox.h> |
26 | #include <qmenubar.h> | 26 | #include <qmenubar.h> |
27 | #include <qcombobox.h> | 27 | #include <qcombobox.h> |
28 | #include <qtoolbutton.h> | 28 | #include <qtoolbutton.h> |
29 | #include <qlineedit.h> | 29 | #include <qlineedit.h> |
30 | #include <qlistview.h> | 30 | #include <qlistview.h> |
31 | 31 | ||
32 | /* STD */ | 32 | /* STD */ |
33 | #include <sys/utsname.h> | 33 | #include <sys/utsname.h> |
34 | 34 | ||
35 | void AdvancedFm::init() { | 35 | void AdvancedFm::init() { |
36 | b = false; | 36 | b = false; |
37 | setCaption( tr( "AdvancedFm" ) ); | 37 | setCaption( tr( "AdvancedFm" ) ); |
38 | 38 | ||
39 | QVBoxLayout *layout = new QVBoxLayout( this ); | 39 | QVBoxLayout *layout = new QVBoxLayout( this ); |
40 | layout->setSpacing( 2); | 40 | layout->setSpacing( 2); |
41 | layout->setMargin( 0); // squeeze | 41 | layout->setMargin( 0); // squeeze |
42 | 42 | ||
43 | QMenuBar *menuBar = new QMenuBar(this); | 43 | QMenuBar *menuBar = new QMenuBar(this); |
44 | menuBar->setMargin( 0 ); // squeeze | 44 | menuBar->setMargin( 0 ); // squeeze |
45 | fileMenu = new QPopupMenu( this ); | 45 | fileMenu = new QPopupMenu( this ); |
46 | viewMenu = new QPopupMenu( this ); | 46 | viewMenu = new QPopupMenu( this ); |
47 | // customDirMenu = new QPopupMenu( this ); | 47 | // customDirMenu = new QPopupMenu( this ); |
48 | 48 | ||
49 | layout->addWidget( menuBar ); | 49 | layout->addWidget( menuBar ); |
50 | 50 | ||
51 | menuBar->insertItem( tr( "File" ), fileMenu); | 51 | menuBar->insertItem( tr( "File" ), fileMenu); |
52 | menuBar->insertItem( tr( "View" ), viewMenu); | 52 | menuBar->insertItem( tr( "View" ), viewMenu); |
53 | 53 | ||
54 | cdUpButton = new QToolButton( 0,"cdUpButton"); | 54 | cdUpButton = new QToolButton( 0,"cdUpButton"); |
55 | cdUpButton->setPixmap(Resource::loadPixmap("up")); | 55 | cdUpButton->setPixmap(Resource::loadPixmap("up")); |
56 | cdUpButton->setAutoRaise( true ); | 56 | cdUpButton->setAutoRaise( true ); |
57 | menuBar->insertItem( cdUpButton ); | 57 | menuBar->insertItem( cdUpButton ); |
58 | 58 | ||
59 | 59 | ||
60 | 60 | ||
61 | qpeDirButton= new QToolButton( 0,"QPEButton"); | 61 | qpeDirButton= new QToolButton( 0,"QPEButton"); |
62 | qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); | 62 | qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); |
63 | qpeDirButton->setAutoRaise( true ); | 63 | qpeDirButton->setAutoRaise( true ); |
64 | menuBar->insertItem( qpeDirButton ); | 64 | menuBar->insertItem( qpeDirButton ); |
65 | 65 | ||
66 | cfButton = new QToolButton( 0, "CFButton"); | 66 | cfButton = new QToolButton( 0, "CFButton"); |
67 | cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); | 67 | cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); |
68 | cfButton->setAutoRaise( true ); | 68 | cfButton->setAutoRaise( true ); |
69 | menuBar->insertItem( cfButton ); | 69 | menuBar->insertItem( cfButton ); |
70 | 70 | ||
71 | sdButton = new QToolButton( 0, "SDButton"); | 71 | sdButton = new QToolButton( 0, "SDButton"); |
72 | sdButton->setPixmap(Resource::loadPixmap("advancedfm/sdcard")); | 72 | sdButton->setPixmap(Resource::loadPixmap("advancedfm/sdcard")); |
73 | sdButton->setAutoRaise( true ); | 73 | sdButton->setAutoRaise( true ); |
74 | menuBar->insertItem( sdButton ); | 74 | menuBar->insertItem( sdButton ); |
75 | 75 | ||
76 | docButton = new QToolButton( 0,"docsButton"); | 76 | docButton = new QToolButton( 0,"docsButton"); |
77 | docButton->setPixmap(Resource::loadPixmap("DocsIcon")); | 77 | docButton->setPixmap(Resource::loadPixmap("DocsIcon")); |
78 | docButton->setAutoRaise( true ); | 78 | docButton->setAutoRaise( true ); |
79 | menuBar->insertItem( docButton ); | 79 | menuBar->insertItem( docButton ); |
80 | 80 | ||
81 | homeButton = new QToolButton( 0, "homeButton"); | 81 | homeButton = new QToolButton( 0, "homeButton"); |
82 | homeButton->setPixmap(Resource::loadPixmap("home")); | 82 | homeButton->setPixmap(Resource::loadPixmap("home")); |
83 | homeButton->setAutoRaise( true ); | 83 | homeButton->setAutoRaise( true ); |
84 | menuBar->insertItem( homeButton ); | 84 | menuBar->insertItem( homeButton ); |
85 | 85 | ||
86 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); | 86 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); |
87 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); | 87 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); |
88 | fileMenu->insertSeparator(); | 88 | fileMenu->insertSeparator(); |
89 | fileMenu->insertItem( tr( "File Search" ), this, SLOT( openSearch() )); | 89 | fileMenu->insertItem( tr( "File Search" ), this, SLOT( openSearch() )); |
90 | fileMenu->insertSeparator(); | 90 | fileMenu->insertSeparator(); |
91 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); | 91 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); |
92 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); | 92 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); |
93 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); | 93 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); |
94 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); | 94 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); |
95 | fileMenu->insertSeparator(); | 95 | fileMenu->insertSeparator(); |
96 | fileMenu->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | 96 | fileMenu->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); |
97 | fileMenu->insertItem( tr( "Select All" ), this, SLOT( selectAll() )); | 97 | fileMenu->insertItem( tr( "Select All" ), this, SLOT( selectAll() )); |
98 | fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); | 98 | fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); |
99 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); | 99 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); |
100 | fileMenu->setCheckable(TRUE); | 100 | fileMenu->setCheckable(TRUE); |
101 | 101 | ||
102 | viewMenu->insertItem( tr( "Switch to View 1" ), this, SLOT( switchToLocalTab())); | 102 | viewMenu->insertItem( tr( "Switch to View 1" ), this, SLOT( switchToLocalTab())); |
103 | viewMenu->insertItem( tr( "Switch to View 2" ), this, SLOT( switchToRemoteTab())); | 103 | viewMenu->insertItem( tr( "Switch to View 2" ), this, SLOT( switchToRemoteTab())); |
104 | viewMenu->insertItem( tr( "Refresh" ), this, SLOT( refreshCurrentTab())); | ||
104 | // viewMenu->insertSeparator(); | 105 | // viewMenu->insertSeparator(); |
105 | // viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); | 106 | // viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); |
106 | viewMenu->setCheckable(true); | 107 | viewMenu->setCheckable(true); |
107 | viewMenu->setItemChecked( viewMenu->idAt(0), true); | 108 | viewMenu->setItemChecked( viewMenu->idAt(0), true); |
108 | viewMenu->setItemChecked( viewMenu->idAt(1), false); | 109 | viewMenu->setItemChecked( viewMenu->idAt(1), false); |
109 | 110 | ||
110 | s_addBookmark = tr("Bookmark Directory"); | 111 | s_addBookmark = tr("Bookmark Directory"); |
111 | s_removeBookmark = tr("Remove Current Directory from Bookmarks"); | 112 | s_removeBookmark = tr("Remove Current Directory from Bookmarks"); |
112 | 113 | ||
113 | // menuButton->insertItem(""); | 114 | // menuButton->insertItem(""); |
114 | 115 | ||
115 | // customDirMenu->insertItem(tr("Add This Directory")); | 116 | // customDirMenu->insertItem(tr("Add This Directory")); |
116 | // customDirMenu->insertItem(tr("Remove This Directory")); | 117 | // customDirMenu->insertItem(tr("Remove This Directory")); |
117 | // customDirMenu->insertSeparator(); | 118 | // customDirMenu->insertSeparator(); |
118 | 119 | ||
119 | QHBoxLayout *CBHB = new QHBoxLayout(); // parent layout will be set later | 120 | QHBoxLayout *CBHB = new QHBoxLayout(); // parent layout will be set later |
120 | CBHB->setMargin( 0 ); | 121 | CBHB->setMargin( 0 ); |
121 | CBHB->setSpacing( 1 ); | 122 | CBHB->setSpacing( 1 ); |
122 | 123 | ||
123 | menuButton = new MenuButton( this ); | 124 | menuButton = new MenuButton( this ); |
124 | 125 | ||
125 | menuButton->setUseLabel(false); | 126 | menuButton->setUseLabel(false); |
126 | menuButton->setMaximumWidth( 20 ); | 127 | menuButton->setMaximumWidth( 20 ); |
127 | menuButton->insertItem( s_addBookmark); | 128 | menuButton->insertItem( s_addBookmark); |
128 | menuButton->insertItem( s_removeBookmark); | 129 | menuButton->insertItem( s_removeBookmark); |
129 | menuButton->insertSeparator(); | 130 | menuButton->insertSeparator(); |
130 | menuButton->setFocusPolicy(NoFocus); | 131 | menuButton->setFocusPolicy(NoFocus); |
131 | CBHB->addWidget( menuButton ); | 132 | CBHB->addWidget( menuButton ); |
132 | 133 | ||
133 | customDirsToMenu(); | 134 | customDirsToMenu(); |
134 | 135 | ||
135 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); | 136 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); |
136 | currentPathCombo->setEditable(TRUE); | 137 | currentPathCombo->setEditable(TRUE); |
137 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 138 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
138 | currentPathCombo->setFocusPolicy(NoFocus); | 139 | currentPathCombo->setFocusPolicy(NoFocus); |
139 | CBHB->addWidget( currentPathCombo ); | 140 | CBHB->addWidget( currentPathCombo ); |
140 | 141 | ||
141 | layout->addLayout( CBHB ); | 142 | layout->addLayout( CBHB ); |
142 | 143 | ||
143 | TabWidget = new OSplitter( Horizontal, this, "TabWidget" ); | 144 | TabWidget = new OSplitter( Horizontal, this, "TabWidget" ); |
144 | // TabWidget = new QTabWidget( this, "TabWidget" ); | 145 | // TabWidget = new QTabWidget( this, "TabWidget" ); |
145 | layout->addWidget( TabWidget, 4 ); | 146 | layout->addWidget( TabWidget, 4 ); |
146 | 147 | ||
147 | tab = new QWidget( TabWidget, "tab" ); | 148 | tab = new QWidget( TabWidget, "tab" ); |
148 | tabLayout = new QGridLayout( tab ); | 149 | tabLayout = new QGridLayout( tab ); |
149 | tabLayout->setSpacing( 2); | 150 | tabLayout->setSpacing( 2); |
150 | tabLayout->setMargin( 2); | 151 | tabLayout->setMargin( 2); |
151 | 152 | ||
152 | Local_View = new QListView( tab, "Local_View" ); | 153 | Local_View = new QListView( tab, "Local_View" ); |
153 | Local_View->addColumn( tr("File"),130); | 154 | Local_View->addColumn( tr("File"),130); |
154 | Local_View->addColumn( tr("Size"),-1); | 155 | Local_View->addColumn( tr("Size"),-1); |
155 | Local_View->setColumnAlignment(1,QListView::AlignRight); | 156 | Local_View->setColumnAlignment(1,QListView::AlignRight); |
156 | Local_View->addColumn( tr("Date"),-1); | 157 | Local_View->addColumn( tr("Date"),-1); |
157 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 158 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
158 | Local_View->setAllColumnsShowFocus(TRUE); | 159 | Local_View->setAllColumnsShowFocus(TRUE); |
159 | Local_View->setMultiSelection( TRUE ); | 160 | Local_View->setMultiSelection( TRUE ); |
160 | Local_View->setSelectionMode(QListView::Extended); | 161 | Local_View->setSelectionMode(QListView::Extended); |
161 | Local_View->setFocusPolicy(StrongFocus); | 162 | Local_View->setFocusPolicy(StrongFocus); |
162 | Local_View->installEventFilter( this ); | 163 | Local_View->installEventFilter( this ); |
163 | 164 | ||
164 | QPEApplication::setStylusOperation( Local_View->viewport() , QPEApplication::RightOnHold); | 165 | QPEApplication::setStylusOperation( Local_View->viewport() , QPEApplication::RightOnHold); |
165 | 166 | ||
166 | tabLayout->addWidget( Local_View, 0, 0 ); | 167 | tabLayout->addWidget( Local_View, 0, 0 ); |
167 | 168 | ||
168 | TabWidget->addWidget( tab,"advancedfm/smFileBrowser.png", tr("1")); | 169 | TabWidget->addWidget( tab,"advancedfm/smFileBrowser.png", tr("1")); |
169 | // TabWidget->insertTab( tab, tr("1")); | 170 | // TabWidget->insertTab( tab, tr("1")); |
170 | 171 | ||
171 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 172 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
172 | tabLayout_2 = new QGridLayout( tab_2 ); | 173 | tabLayout_2 = new QGridLayout( tab_2 ); |
173 | tabLayout_2->setSpacing( 2); | 174 | tabLayout_2->setSpacing( 2); |
174 | tabLayout_2->setMargin( 2); | 175 | tabLayout_2->setMargin( 2); |
175 | 176 | ||
176 | Remote_View = new QListView( tab_2, "Remote_View" ); | 177 | Remote_View = new QListView( tab_2, "Remote_View" ); |
177 | Remote_View->addColumn( tr("File"),130); | 178 | Remote_View->addColumn( tr("File"),130); |
178 | Remote_View->addColumn( tr("Size"),-1); | 179 | Remote_View->addColumn( tr("Size"),-1); |
179 | Remote_View->setColumnAlignment(1,QListView::AlignRight); | 180 | Remote_View->setColumnAlignment(1,QListView::AlignRight); |
180 | Remote_View->addColumn( tr("Date"),-1); | 181 | Remote_View->addColumn( tr("Date"),-1); |
181 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 182 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
182 | Remote_View->setAllColumnsShowFocus(TRUE); | 183 | Remote_View->setAllColumnsShowFocus(TRUE); |
183 | Remote_View->setMultiSelection( TRUE ); | 184 | Remote_View->setMultiSelection( TRUE ); |
184 | Remote_View->setSelectionMode(QListView::Extended); | 185 | Remote_View->setSelectionMode(QListView::Extended); |
185 | Remote_View->setFocusPolicy(StrongFocus); | 186 | Remote_View->setFocusPolicy(StrongFocus); |
186 | Remote_View->installEventFilter( this ); | 187 | Remote_View->installEventFilter( this ); |
187 | 188 | ||
188 | QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold); | 189 | QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold); |
189 | 190 | ||
190 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 191 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
191 | 192 | ||
192 | TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); | 193 | TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); |
193 | TabWidget->setSizeChange( 370 ); | 194 | TabWidget->setSizeChange( 370 ); |
194 | // TabWidget->insertTab( tab_2, tr( "2")); | 195 | // TabWidget->insertTab( tab_2, tr( "2")); |
195 | 196 | ||
196 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); | 197 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); |
197 | tabLayout_3 = new QGridLayout( tab_3 ); | 198 | tabLayout_3 = new QGridLayout( tab_3 ); |
198 | tabLayout_3->setSpacing( 2); | 199 | tabLayout_3->setSpacing( 2); |
199 | tabLayout_3->setMargin( 2); | 200 | tabLayout_3->setMargin( 2); |