summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.h1
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp10
2 files changed, 0 insertions, 11 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index 42f3bc6..c25bce2 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -49,65 +49,64 @@ class MenuButton;
49 49
50class QToolButton; 50class QToolButton;
51class Ir; 51class Ir;
52 52
53class AdvancedFm : public QMainWindow 53class AdvancedFm : public QMainWindow
54{ 54{
55 Q_OBJECT 55 Q_OBJECT
56public: 56public:
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();
60protected: 60protected:
61 61
62 Opie::Ui::OSplitter *TabWidget; 62 Opie::Ui::OSplitter *TabWidget;
63 QCopChannel * channel; 63 QCopChannel * channel;
64 QPixmap unknownXpm; 64 QPixmap unknownXpm;
65 int whichTab; 65 int whichTab;
66// QTabWidget *TabWidget; 66// QTabWidget *TabWidget;
67 QWidget *tab, *tab_2, *tab_3; 67 QWidget *tab, *tab_2, *tab_3;
68 QListView *Local_View, *Remote_View; 68 QListView *Local_View, *Remote_View;
69 69
70 QLineEdit *currentPathEdit; 70 QLineEdit *currentPathEdit;
71 QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/; 71 QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/;
72 QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; 72 QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
73// QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; 73// QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
74 QDir currentDir, currentRemoteDir; 74 QDir currentDir, currentRemoteDir;
75 QComboBox *currentPathCombo; 75 QComboBox *currentPathCombo;
76 QString filterStr, s_addBookmark, s_removeBookmark; 76 QString filterStr, s_addBookmark, s_removeBookmark;
77 QListViewItem * item; 77 QListViewItem * item;
78 bool b; 78 bool b;
79 QStringList fileSystemTypeList, fsList; 79 QStringList fileSystemTypeList, fsList;
80 int currentServerConfig; 80 int currentServerConfig;
81 bool zaurusDevice;
82 QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3; 81 QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3;
83 QStringList remoteDirPathStringList, localDirPathStringList; 82 QStringList remoteDirPathStringList, localDirPathStringList;
84 QLineEdit *renameBox; 83 QLineEdit *renameBox;
85 84
86 void init(); 85 void init();
87 void initConnections(); 86 void initConnections();
88 void keyReleaseEvent( QKeyEvent *); 87 void keyReleaseEvent( QKeyEvent *);
89 void keyPressEvent( QKeyEvent *); 88 void keyPressEvent( QKeyEvent *);
90 QString getFileSystemType(const QString &); 89 QString getFileSystemType(const QString &);
91 QString getDiskSpace(const QString &); 90 QString getDiskSpace(const QString &);
92 void parsetab(const QString &fileName); 91 void parsetab(const QString &fileName);
93 QString checkDiskSpace(const QString &); 92 QString checkDiskSpace(const QString &);
94 QString dealWithSymName(const QString &); 93 QString dealWithSymName(const QString &);
95 QDir *CurrentDir(); 94 QDir *CurrentDir();
96 QDir *OtherDir(); 95 QDir *OtherDir();
97 QListView *CurrentView(); 96 QListView *CurrentView();
98 QListView *OtherView(); 97 QListView *OtherView();
99 void setOtherTabCurrent(); 98 void setOtherTabCurrent();
100 void changeTo(const QString dir); 99 void changeTo(const QString dir);
101 100
102//protected signals: 101//protected signals:
103 // void newPath(QString); 102 // void newPath(QString);
104 103
105protected slots: 104protected slots:
106 void slotSwitchMenu(int); 105 void slotSwitchMenu(int);
107 void selectAll(); 106 void selectAll();
108 void addToDocs(); 107 void addToDocs();
109 void doDirChange(); 108 void doDirChange();
110 void mkDir(); 109 void mkDir();
111 void del(); 110 void del();
112 void rn(); 111 void rn();
113 void populateView(); 112 void populateView();
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp
index eaf4f79..3664c75 100644
--- a/noncore/apps/advancedfm/advancedfmData.cpp
+++ b/noncore/apps/advancedfm/advancedfmData.cpp
@@ -186,86 +186,76 @@ void AdvancedFm::init() {
186 186
187 QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold); 187 QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold);
188 188
189 tabLayout_2->addWidget( Remote_View, 0, 0 ); 189 tabLayout_2->addWidget( Remote_View, 0, 0 );
190 190
191 TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); 191 TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2"));
192 TabWidget->setSizeChange( 370 ); 192 TabWidget->setSizeChange( 370 );
193// TabWidget->insertTab( tab_2, tr( "2")); 193// TabWidget->insertTab( tab_2, tr( "2"));
194 194
195 /* tab_3 = new QWidget( TabWidget, "tab_3" ); 195 /* tab_3 = new QWidget( TabWidget, "tab_3" );
196 tabLayout_3 = new QGridLayout( tab_3 ); 196 tabLayout_3 = new QGridLayout( tab_3 );
197 tabLayout_3->setSpacing( 2); 197 tabLayout_3->setSpacing( 2);
198 tabLayout_3->setMargin( 2); 198 tabLayout_3->setMargin( 2);
199 199
200 200
201 // OFileDialog fileDialog; 201 // OFileDialog fileDialog;
202 // fileDialog; 202 // fileDialog;
203 // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy 203 // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy
204 // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); 204 // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow");
205 // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); 205 // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/");
206 206
207 QListView *fileTree; 207 QListView *fileTree;
208 fileTree = new QListView( tab_3, "tree" ); 208 fileTree = new QListView( tab_3, "tree" );
209 209
210 210
211 tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 ); 211 tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 );
212 212
213 TabWidget->insertTab( tab_3, tr( "Remote" ) ); 213 TabWidget->insertTab( tab_3, tr( "Remote" ) );
214 */ 214 */
215 215
216 /////////////// 216 ///////////////
217 217
218 if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" ))
219 zaurusDevice=TRUE;
220 else
221 zaurusDevice=FALSE;
222
223
224 if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { 218 if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) {
225 odebug << "not have sd" << oendl;
226 sdButton->hide(); 219 sdButton->hide();
227 } 220 }
228 if( !StorageInfo::hasCf() ) { 221 if( !StorageInfo::hasCf() ) {
229 odebug << "not have cf" << oendl;
230 cfButton->hide(); 222 cfButton->hide();
231 } 223 }
232 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 224 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
233 currentDir.setPath( QDir::currentDirPath()); 225 currentDir.setPath( QDir::currentDirPath());
234 226
235 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 227 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
236 currentRemoteDir.setPath( QDir::currentDirPath()); 228 currentRemoteDir.setPath( QDir::currentDirPath());
237 229
238 // b = TRUE;
239
240 filterStr="*"; 230 filterStr="*";
241 showMenuHidden(); 231 showMenuHidden();
242 TabWidget->setCurrentWidget(0); 232 TabWidget->setCurrentWidget(0);
243 233
244} 234}
245 235
246void AdvancedFm::initConnections() 236void AdvancedFm::initConnections()
247{ 237{
248 238
249 connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(cleanUp())); 239 connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(cleanUp()));
250 connect(qpeDirButton,SIGNAL(released()),this,SLOT(QPEButtonPushed())); 240 connect(qpeDirButton,SIGNAL(released()),this,SLOT(QPEButtonPushed()));
251 connect(cfButton,SIGNAL(released()),this,SLOT(CFButtonPushed())); 241 connect(cfButton,SIGNAL(released()),this,SLOT(CFButtonPushed()));
252 connect(sdButton,SIGNAL(released()),this,SLOT(SDButtonPushed())); 242 connect(sdButton,SIGNAL(released()),this,SLOT(SDButtonPushed()));
253 connect(cdUpButton,SIGNAL(released()),this,SLOT(upDir())); 243 connect(cdUpButton,SIGNAL(released()),this,SLOT(upDir()));
254 connect(docButton,SIGNAL(released()),this,SLOT(docButtonPushed())); 244 connect(docButton,SIGNAL(released()),this,SLOT(docButtonPushed()));
255 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed())); 245 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()));
256 connect(currentPathCombo,SIGNAL(activated(const QString&)),this,SLOT(changeTo(const QString&))); 246 connect(currentPathCombo,SIGNAL(activated(const QString&)),this,SLOT(changeTo(const QString&)));
257 247
258 connect(currentPathCombo->lineEdit(),SIGNAL(returnPressed()),this,SLOT(currentPathComboChanged())); 248 connect(currentPathCombo->lineEdit(),SIGNAL(returnPressed()),this,SLOT(currentPathComboChanged()));
259 249
260 connect(Local_View,SIGNAL(clicked(QListViewItem*)),this,SLOT( ListClicked(QListViewItem*))); 250 connect(Local_View,SIGNAL(clicked(QListViewItem*)),this,SLOT( ListClicked(QListViewItem*)));
261 251
262 connect(Local_View,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); 252 connect(Local_View,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) );
263 253
264 connect(Remote_View,SIGNAL(clicked(QListViewItem*)),this,SLOT(ListClicked(QListViewItem*))); 254 connect(Remote_View,SIGNAL(clicked(QListViewItem*)),this,SLOT(ListClicked(QListViewItem*)));
265 connect(Remote_View,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT(ListPressed(int,QListViewItem*,const QPoint&,int))); 255 connect(Remote_View,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT(ListPressed(int,QListViewItem*,const QPoint&,int)));
266 256
267 connect(TabWidget,SIGNAL(currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); 257 connect(TabWidget,SIGNAL(currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*)));
268 258
269 connect(Remote_View,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),this,SLOT(showFileMenu())); 259 connect(Remote_View,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),this,SLOT(showFileMenu()));
270 connect(Local_View,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),this,SLOT(showFileMenu())); 260 connect(Local_View,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),this,SLOT(showFileMenu()));
271 261