summaryrefslogtreecommitdiff
authordrw <drw>2005-04-02 00:04:50 (UTC)
committer drw <drw>2005-04-02 00:04:50 (UTC)
commitb92357d5566b9ee220ff5f4e8eb612b2db32e20b (patch) (unidiff)
tree26f99f1ca215ac44862145c2ba94f9a0eec0e16f
parent8a1c307f9dfc26a31d42f29f29a5b1c048b99102 (diff)
downloadopie-b92357d5566b9ee220ff5f4e8eb612b2db32e20b.zip
opie-b92357d5566b9ee220ff5f4e8eb612b2db32e20b.tar.gz
opie-b92357d5566b9ee220ff5f4e8eb612b2db32e20b.tar.bz2
Set pixmaps for correct buttons - thanks Mickey for finding
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/fileselector/ofileselector.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp
index 2746732..069b625 100644
--- a/libopie2/opieui/fileselector/ofileselector.cpp
+++ b/libopie2/opieui/fileselector/ofileselector.cpp
@@ -310,104 +310,104 @@ QString OFileSelectorItem::key( int id, bool )const
310 return text(2).rightJustify(20, '0'); 310 return text(2).rightJustify(20, '0');
311 }else 311 }else
312 return text( id ); 312 return text( id );
313 313
314} 314}
315 315
316OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& startDir, OFileSelector* sel) 316OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& startDir, OFileSelector* sel)
317 :QWidget( parent ), m_sel( sel ) 317 :QWidget( parent ), m_sel( sel )
318{ 318{
319 m_all = false; 319 m_all = false;
320 QVBoxLayout* lay = new QVBoxLayout( this ); 320 QVBoxLayout* lay = new QVBoxLayout( this );
321 m_currentDir = startDir; 321 m_currentDir = startDir;
322 322
323 /* 323 /*
324 * now we add a special bar 324 * now we add a special bar
325 * One Button For Up 325 * One Button For Up
326 * Home 326 * Home
327 * Doc 327 * Doc
328 * And a dropdown menu with FileSystems 328 * And a dropdown menu with FileSystems
329 * FUTURE: one to change dir with lineedit 329 * FUTURE: one to change dir with lineedit
330 * Bookmarks 330 * Bookmarks
331 * Create Dir 331 * Create Dir
332 */ 332 */
333 QHBox* box = new QHBox(this ); 333 QHBox* box = new QHBox(this );
334 box->setBackgroundMode( PaletteButton ); 334 box->setBackgroundMode( PaletteButton );
335 box->setSpacing( 0 ); 335 box->setSpacing( 0 );
336 336
337 QPixmap pic; 337 QPixmap pic;
338 QToolButton *btn = new QToolButton( box ); 338 QToolButton *btn = new QToolButton( box );
339 pic.convertFromImage( Resource::loadImage( "up" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 339 pic.convertFromImage( Resource::loadImage( "up" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
340 btn->setPixmap( pic ); 340 btn->setPixmap( pic );
341 connect(btn, SIGNAL(clicked() ), 341 connect(btn, SIGNAL(clicked() ),
342 this, SLOT( cdUP() ) ); 342 this, SLOT( cdUP() ) );
343 343
344 btn = new QToolButton( box ); 344 btn = new QToolButton( box );
345 pic.convertFromImage( Resource::loadImage( "home" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 345 pic.convertFromImage( Resource::loadImage( "home" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
346 btn->setPixmap( pic ); 346 btn->setPixmap( pic );
347 connect(btn, SIGNAL(clicked() ), 347 connect(btn, SIGNAL(clicked() ),
348 this, SLOT( cdHome() ) ); 348 this, SLOT( cdHome() ) );
349 349
350 btn = new QToolButton( box ); 350 btn = new QToolButton( box );
351 pic.convertFromImage( Resource::loadImage( "DocsIcon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 351 pic.convertFromImage( Resource::loadImage( "DocsIcon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
352 btn->setPixmap( pic ); 352 btn->setPixmap( pic );
353 connect(btn, SIGNAL(clicked() ), 353 connect(btn, SIGNAL(clicked() ),
354 this, SLOT(cdDoc() ) ); 354 this, SLOT(cdDoc() ) );
355 355
356 m_btnNew = new QToolButton( box ); 356 m_btnNew = new QToolButton( box );
357 pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 357 pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
358 btn->setPixmap( pic ); 358 m_btnNew->setPixmap( pic );
359 connect(m_btnNew, SIGNAL(clicked() ), 359 connect(m_btnNew, SIGNAL(clicked() ),
360 this, SLOT(slotNew() ) ); 360 this, SLOT(slotNew() ) );
361 361
362 362
363 m_btnClose = new QToolButton( box ); 363 m_btnClose = new QToolButton( box );
364 pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 364 pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
365 btn->setPixmap( pic ); 365 m_btnClose->setPixmap( pic );
366 connect(m_btnClose, SIGNAL(clicked() ), 366 connect(m_btnClose, SIGNAL(clicked() ),
367 selector(), SIGNAL(closeMe() ) ); 367 selector(), SIGNAL(closeMe() ) );
368 368
369 btn = new QToolButton( box ); 369 btn = new QToolButton( box );
370 pic.convertFromImage( Resource::loadImage( "cardmon/pcmcia" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 370 pic.convertFromImage( Resource::loadImage( "cardmon/pcmcia" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
371 btn->setPixmap( pic ); 371 btn->setPixmap( pic );
372 372
373 m_fsButton = btn; 373 m_fsButton = btn;
374 /* let's fill device parts */ 374 /* let's fill device parts */
375 QPopupMenu* pop = new QPopupMenu(this); 375 QPopupMenu* pop = new QPopupMenu(this);
376 connect(pop, SIGNAL( activated(int) ), 376 connect(pop, SIGNAL( activated(int) ),
377 this, SLOT(slotFSActivated(int) ) ); 377 this, SLOT(slotFSActivated(int) ) );
378 378
379 StorageInfo storage; 379 StorageInfo storage;
380 const QList<FileSystem> &fs = storage.fileSystems(); 380 const QList<FileSystem> &fs = storage.fileSystems();
381 QListIterator<FileSystem> it(fs); 381 QListIterator<FileSystem> it(fs);
382 for ( ; it.current(); ++it ) 382 for ( ; it.current(); ++it )
383 { 383 {
384 const QString disk = (*it)->name(); 384 const QString disk = (*it)->name();
385 const QString path = (*it)->path(); 385 const QString path = (*it)->path();
386 m_dev.insert( disk, path ); 386 m_dev.insert( disk, path );
387 pop->insertItem( disk ); 387 pop->insertItem( disk );
388 } 388 }
389 m_fsPop = pop; 389 m_fsPop = pop;
390 390
391 connect(btn,SIGNAL(pressed()),this,SLOT(slotFSpressed())); 391 connect(btn,SIGNAL(pressed()),this,SLOT(slotFSpressed()));
392 392
393 lay->addWidget( box ); 393 lay->addWidget( box );
394 394
395 m_view = new QListView( this ); 395 m_view = new QListView( this );
396 396
397 m_view->installEventFilter(this); 397 m_view->installEventFilter(this);
398 398
399 QPEApplication::setStylusOperation( m_view->viewport(), 399 QPEApplication::setStylusOperation( m_view->viewport(),
400 QPEApplication::RightOnHold); 400 QPEApplication::RightOnHold);
401 m_view->addColumn(" " ); 401 m_view->addColumn(" " );
402 m_view->addColumn(tr("Name"), 135 ); 402 m_view->addColumn(tr("Name"), 135 );
403 m_view->addColumn(tr("Size"), -1 ); 403 m_view->addColumn(tr("Size"), -1 );
404 m_view->addColumn(tr("Date"), 60 ); 404 m_view->addColumn(tr("Date"), 60 );
405 m_view->addColumn(tr("Mime Type"), -1 ); 405 m_view->addColumn(tr("Mime Type"), -1 );
406 406
407 407
408 m_view->setSorting( 1 ); 408 m_view->setSorting( 1 );
409 m_view->setAllColumnsShowFocus( TRUE ); 409 m_view->setAllColumnsShowFocus( TRUE );
410 410
411 lay->addWidget( m_view, 1000 ); 411 lay->addWidget( m_view, 1000 );
412 connectSlots(); 412 connectSlots();
413} 413}