summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/fileselector/ofileselector.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp
index f3e7501..a30bd8b 100644
--- a/libopie2/opieui/fileselector/ofileselector.cpp
+++ b/libopie2/opieui/fileselector/ofileselector.cpp
@@ -299,96 +299,97 @@ QString OFileSelectorItem::key( int id, bool )const
299 if( m_isDir ) 299 if( m_isDir )
300 { 300 {
301 ke.append("0" ); 301 ke.append("0" );
302 ke.append( text(1) ); 302 ke.append( text(1) );
303 } 303 }
304 else 304 else
305 { 305 {
306 ke.append("1" ); 306 ke.append("1" );
307 ke.append( text(1) ); 307 ke.append( text(1) );
308 } 308 }
309 return ke; 309 return ke;
310 }else if(id == 2) { 310 }else if(id == 2) {
311 return text(2).rightJustify(20, '0'); 311 return text(2).rightJustify(20, '0');
312 }else 312 }else
313 return text( id ); 313 return text( id );
314 314
315} 315}
316 316
317OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& startDir, OFileSelector* sel) 317OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& startDir, OFileSelector* sel)
318 :QWidget( parent ), m_sel( sel ) 318 :QWidget( parent ), m_sel( sel )
319{ 319{
320 m_all = false; 320 m_all = false;
321 QVBoxLayout* lay = new QVBoxLayout( this ); 321 QVBoxLayout* lay = new QVBoxLayout( this );
322 m_currentDir = startDir; 322 m_currentDir = startDir;
323 bool bigicons = qApp->desktop()->size().width()>330;
323 324
324 /* 325 /*
325 * now we add a special bar 326 * now we add a special bar
326 * One Button For Up 327 * One Button For Up
327 * Home 328 * Home
328 * Doc 329 * Doc
329 * And a dropdown menu with FileSystems 330 * And a dropdown menu with FileSystems
330 * FUTURE: one to change dir with lineedit 331 * FUTURE: one to change dir with lineedit
331 * Bookmarks 332 * Bookmarks
332 * Create Dir 333 * Create Dir
333 */ 334 */
334 QHBox* box = new QHBox(this ); 335 QHBox* box = new QHBox(this );
335 box->setBackgroundMode( PaletteButton ); 336 box->setBackgroundMode( PaletteButton );
336 box->setSpacing( 0 ); 337 box->setSpacing( 0 );
337 338
338 QToolButton *btn = new QToolButton( box ); 339 QToolButton *btn = new QToolButton( box );
339 btn->setUsesBigPixmap( true ); 340 btn->setUsesBigPixmap(bigicons);
340 btn->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ); 341 btn->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) );
341 connect(btn, SIGNAL(clicked() ), 342 connect(btn, SIGNAL(clicked() ),
342 this, SLOT( cdUP() ) ); 343 this, SLOT( cdUP() ) );
343 344
344 btn = new QToolButton( box ); 345 btn = new QToolButton( box );
345 btn->setUsesBigPixmap( true ); 346 btn->setUsesBigPixmap(bigicons);
346 btn->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) ); 347 btn->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) );
347 connect(btn, SIGNAL(clicked() ), 348 connect(btn, SIGNAL(clicked() ),
348 this, SLOT( cdHome() ) ); 349 this, SLOT( cdHome() ) );
349 350
350 btn = new QToolButton( box ); 351 btn = new QToolButton( box );
351 btn->setUsesBigPixmap( true ); 352 btn->setUsesBigPixmap(bigicons);
352 btn->setPixmap( Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ) ); 353 btn->setPixmap( Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ) );
353 connect(btn, SIGNAL(clicked() ), 354 connect(btn, SIGNAL(clicked() ),
354 this, SLOT(cdDoc() ) ); 355 this, SLOT(cdDoc() ) );
355 356
356 m_btnNew = new QToolButton( box ); 357 m_btnNew = new QToolButton( box );
357 m_btnNew->setUsesBigPixmap( true ); 358 m_btnNew->setUsesBigPixmap(bigicons);
358 m_btnNew->setPixmap( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ) ); 359 m_btnNew->setPixmap( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ) );
359 connect(m_btnNew, SIGNAL(clicked() ), 360 connect(m_btnNew, SIGNAL(clicked() ),
360 this, SLOT(slotNew() ) ); 361 this, SLOT(slotNew() ) );
361 362
362 363
363 m_btnClose = new QToolButton( box ); 364 m_btnClose = new QToolButton( box );
364 m_btnClose->setUsesBigPixmap( true ); 365 m_btnClose->setUsesBigPixmap(bigicons);
365 m_btnClose->setPixmap( Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ) ); 366 m_btnClose->setPixmap( Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ) );
366 connect(m_btnClose, SIGNAL(clicked() ), 367 connect(m_btnClose, SIGNAL(clicked() ),
367 selector(), SIGNAL(closeMe() ) ); 368 selector(), SIGNAL(closeMe() ) );
368 369
369 btn = new QToolButton( box ); 370 btn = new QToolButton( box );
370 btn->setUsesBigPixmap( true ); 371 btn->setUsesBigPixmap(bigicons);
371 btn->setPixmap( Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ) ); 372 btn->setPixmap( Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ) );
372 373
373 m_fsButton = btn; 374 m_fsButton = btn;
374 /* let's fill device parts */ 375 /* let's fill device parts */
375 QPopupMenu* pop = new QPopupMenu(this); 376 QPopupMenu* pop = new QPopupMenu(this);
376 connect(pop, SIGNAL( activated(int) ), 377 connect(pop, SIGNAL( activated(int) ),
377 this, SLOT(slotFSActivated(int) ) ); 378 this, SLOT(slotFSActivated(int) ) );
378 379
379 StorageInfo storage; 380 StorageInfo storage;
380 const QList<FileSystem> &fs = storage.fileSystems(); 381 const QList<FileSystem> &fs = storage.fileSystems();
381 QListIterator<FileSystem> it(fs); 382 QListIterator<FileSystem> it(fs);
382 for ( ; it.current(); ++it ) 383 for ( ; it.current(); ++it )
383 { 384 {
384 const QString disk = (*it)->name(); 385 const QString disk = (*it)->name();
385 const QString path = (*it)->path(); 386 const QString path = (*it)->path();
386 m_dev.insert( disk, path ); 387 m_dev.insert( disk, path );
387 pop->insertItem( disk ); 388 pop->insertItem( disk );
388 } 389 }
389 m_fsPop = pop; 390 m_fsPop = pop;
390 391
391 connect(btn,SIGNAL(pressed()),this,SLOT(slotFSpressed())); 392 connect(btn,SIGNAL(pressed()),this,SLOT(slotFSpressed()));
392 393
393 lay->addWidget( box ); 394 lay->addWidget( box );
394 395