Diffstat (limited to 'noncore/apps/advancedfm/advancedfmData.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 763ae34..f791c77 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -160,127 +160,127 @@ void AdvancedFm::init() { | |||
160 | // TabWidget->insertTab( tab, tr("1")); | 160 | // TabWidget->insertTab( tab, tr("1")); |
161 | 161 | ||
162 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 162 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
163 | tabLayout_2 = new QGridLayout( tab_2 ); | 163 | tabLayout_2 = new QGridLayout( tab_2 ); |
164 | tabLayout_2->setSpacing( 2); | 164 | tabLayout_2->setSpacing( 2); |
165 | tabLayout_2->setMargin( 2); | 165 | tabLayout_2->setMargin( 2); |
166 | 166 | ||
167 | Remote_View = new QListView( tab_2, "Remote_View" ); | 167 | Remote_View = new QListView( tab_2, "Remote_View" ); |
168 | Remote_View->addColumn( tr("File"),130); | 168 | Remote_View->addColumn( tr("File"),130); |
169 | Remote_View->addColumn( tr("Size"),-1); | 169 | Remote_View->addColumn( tr("Size"),-1); |
170 | Remote_View->setColumnAlignment(1,QListView::AlignRight); | 170 | Remote_View->setColumnAlignment(1,QListView::AlignRight); |
171 | Remote_View->addColumn( tr("Date"),-1); | 171 | Remote_View->addColumn( tr("Date"),-1); |
172 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 172 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
173 | Remote_View->setAllColumnsShowFocus(TRUE); | 173 | Remote_View->setAllColumnsShowFocus(TRUE); |
174 | Remote_View->setMultiSelection( TRUE ); | 174 | Remote_View->setMultiSelection( TRUE ); |
175 | Remote_View->setSelectionMode(QListView::Extended); | 175 | Remote_View->setSelectionMode(QListView::Extended); |
176 | Remote_View->setFocusPolicy(StrongFocus); | 176 | Remote_View->setFocusPolicy(StrongFocus); |
177 | Remote_View->installEventFilter( this ); | 177 | Remote_View->installEventFilter( this ); |
178 | 178 | ||
179 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 179 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
180 | 180 | ||
181 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 181 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
182 | 182 | ||
183 | TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); | 183 | TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); |
184 | TabWidget->setSizeChange( 370 ); | 184 | TabWidget->setSizeChange( 370 ); |
185 | // TabWidget->insertTab( tab_2, tr( "2")); | 185 | // TabWidget->insertTab( tab_2, tr( "2")); |
186 | 186 | ||
187 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); | 187 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); |
188 | tabLayout_3 = new QGridLayout( tab_3 ); | 188 | tabLayout_3 = new QGridLayout( tab_3 ); |
189 | tabLayout_3->setSpacing( 2); | 189 | tabLayout_3->setSpacing( 2); |
190 | tabLayout_3->setMargin( 2); | 190 | tabLayout_3->setMargin( 2); |
191 | 191 | ||
192 | 192 | ||
193 | // OFileDialog fileDialog; | 193 | // OFileDialog fileDialog; |
194 | // fileDialog; | 194 | // fileDialog; |
195 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy | 195 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy |
196 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); | 196 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); |
197 | // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); | 197 | // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); |
198 | 198 | ||
199 | QListView *fileTree; | 199 | QListView *fileTree; |
200 | fileTree = new QListView( tab_3, "tree" ); | 200 | fileTree = new QListView( tab_3, "tree" ); |
201 | 201 | ||
202 | 202 | ||
203 | tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 ); | 203 | tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 ); |
204 | 204 | ||
205 | TabWidget->insertTab( tab_3, tr( "Remote" ) ); | 205 | TabWidget->insertTab( tab_3, tr( "Remote" ) ); |
206 | */ | 206 | */ |
207 | 207 | ||
208 | /////////////// | 208 | /////////////// |
209 | 209 | ||
210 | if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) | 210 | if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) |
211 | zaurusDevice=TRUE; | 211 | zaurusDevice=TRUE; |
212 | else | 212 | else |
213 | zaurusDevice=FALSE; | 213 | zaurusDevice=FALSE; |
214 | 214 | ||
215 | 215 | ||
216 | if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { | 216 | if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { |
217 | qDebug("not have sd"); | 217 | qDebug("not have sd"); |
218 | sdButton->hide(); | 218 | sdButton->hide(); |
219 | } | 219 | } |
220 | if( !StorageInfo::hasCf() ) { | 220 | if( !StorageInfo::hasCf() ) { |
221 | qDebug("not have cf"); | 221 | qDebug("not have cf"); |
222 | cfButton->hide(); | 222 | cfButton->hide(); |
223 | } | 223 | } |
224 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 224 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
225 | currentDir.setPath( QDir::currentDirPath()); | 225 | currentDir.setPath( QDir::currentDirPath()); |
226 | 226 | ||
227 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 227 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
228 | currentRemoteDir.setPath( QDir::currentDirPath()); | 228 | currentRemoteDir.setPath( QDir::currentDirPath()); |
229 | 229 | ||
230 | // b = TRUE; | 230 | // b = TRUE; |
231 | 231 | ||
232 | filterStr="*"; | 232 | filterStr="*"; |
233 | b=FALSE; | 233 | b=FALSE; |
234 | showMenuHidden(); | 234 | showMenuHidden(); |
235 | TabWidget->setCurrentWidget(0); | 235 | TabWidget->setCurrentWidget(0); |
236 | 236 | ||
237 | } | 237 | } |
238 | 238 | ||
239 | void AdvancedFm::initConnections() | 239 | void AdvancedFm::initConnections() |
240 | { | 240 | { |
241 | 241 | ||
242 | connect( qApp,SIGNAL( aboutToQuit()), | 242 | connect( qApp,SIGNAL( aboutToQuit()), |
243 | this, SLOT( cleanUp()) ); | 243 | this, SLOT( cleanUp()) ); |
244 | connect( qpeDirButton ,SIGNAL(released()), | 244 | connect( qpeDirButton ,SIGNAL(released()), |
245 | this,SLOT( QPEButtonPushed()) ); | 245 | this,SLOT( QPEButtonPushed()) ); |
246 | connect( cfButton ,SIGNAL(released()), | 246 | connect( cfButton ,SIGNAL(released()), |
247 | this,SLOT( CFButtonPushed()) ); | 247 | this,SLOT( CFButtonPushed()) ); |
248 | connect( sdButton ,SIGNAL(released()), | 248 | connect( sdButton ,SIGNAL(released()), |
249 | this,SLOT( SDButtonPushed()) ); | 249 | this,SLOT( SDButtonPushed()) ); |
250 | connect( cdUpButton ,SIGNAL(released()), | 250 | connect( cdUpButton ,SIGNAL(released()), |
251 | this,SLOT( upDir()) ); | 251 | this,SLOT( upDir()) ); |
252 | connect( docButton,SIGNAL(released()), | 252 | connect( docButton,SIGNAL(released()), |
253 | this,SLOT( docButtonPushed()) ); | 253 | this,SLOT( docButtonPushed()) ); |
254 | connect( homeButton,SIGNAL(released()), | 254 | connect( homeButton,SIGNAL(released()), |
255 | this,SLOT( homeButtonPushed()) ); | 255 | this,SLOT( homeButtonPushed()) ); |
256 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), | 256 | connect( currentPathCombo, SIGNAL( activated(const QString&) ), |
257 | this, SLOT( currentPathComboActivated( const QString & ) ) ); | 257 | this, SLOT( currentPathComboActivated(const QString&) ) ); |
258 | 258 | ||
259 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), | 259 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), |
260 | this,SLOT(currentPathComboChanged())); | 260 | this,SLOT(currentPathComboChanged())); |
261 | 261 | ||
262 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), | 262 | connect( Local_View, SIGNAL( clicked(QListViewItem*)), |
263 | this,SLOT( ListClicked(QListViewItem *)) ); | 263 | this,SLOT( ListClicked(QListViewItem*)) ); |
264 | 264 | ||
265 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 265 | connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), |
266 | this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); | 266 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); |
267 | 267 | ||
268 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); | 268 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); |
269 | 269 | ||
270 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), | 270 | connect( Remote_View, SIGNAL( clicked(QListViewItem*)), |
271 | this,SLOT( ListClicked(QListViewItem *)) ); | 271 | this,SLOT( ListClicked(QListViewItem*)) ); |
272 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 272 | connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), |
273 | this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); | 273 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); |
274 | 274 | ||
275 | connect( TabWidget,SIGNAL(currentChanged(QWidget *)), | 275 | connect( TabWidget,SIGNAL(currentChanged(QWidget*)), |
276 | this,SLOT(tabChanged(QWidget*))); | 276 | this,SLOT(tabChanged(QWidget*))); |
277 | 277 | ||
278 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) ); | 278 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) ); |
279 | 279 | ||
280 | connect( menuButton, SIGNAL( selected(const QString &)), SLOT(gotoCustomDir(const QString&))); | 280 | connect( menuButton, SIGNAL( selected(const QString&)), SLOT(gotoCustomDir(const QString&))); |
281 | // connect( menuButton, SIGNAL( selected( int)), SLOT( dirMenuSelected(int))); | 281 | // connect( menuButton, SIGNAL( selected(int)), SLOT( dirMenuSelected(int))); |
282 | connect( viewMenu, SIGNAL( activated(int )), this, SLOT(slotSwitchMenu(int ))); | 282 | connect( viewMenu, SIGNAL( activated(int)), this, SLOT(slotSwitchMenu(int))); |
283 | // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); | 283 | // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); |
284 | 284 | ||
285 | } | 285 | } |
286 | 286 | ||