summaryrefslogtreecommitdiff
path: root/core/launcher/launcherview.cpp
Unidiff
Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 513b1bd..6c7d487 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -570,104 +570,104 @@ bool LauncherIconView::removeLink(const QString& linkfile)
570 bool did = FALSE; 570 bool did = FALSE;
571 DocLnk dl(linkfile); 571 DocLnk dl(linkfile);
572 while (item) { 572 while (item) {
573 l = item->appLnk(); 573 l = item->appLnk();
574 LauncherItem *nextItem = (LauncherItem *)item->nextItem(); 574 LauncherItem *nextItem = (LauncherItem *)item->nextItem();
575 if ( l->linkFileKnown() && l->linkFile() == linkfile 575 if ( l->linkFileKnown() && l->linkFile() == linkfile
576 || l->fileKnown() && ( 576 || l->fileKnown() && (
577 l->file() == linkfile 577 l->file() == linkfile
578 || dl.isValid() && dl.file() == l->file() ) ) { 578 || dl.isValid() && dl.file() == l->file() ) ) {
579 delete item; 579 delete item;
580 did = TRUE; 580 did = TRUE;
581 } 581 }
582 item = nextItem; 582 item = nextItem;
583 } 583 }
584 QListIterator<AppLnk> it(hidden); 584 QListIterator<AppLnk> it(hidden);
585 while ((l=it.current())) { 585 while ((l=it.current())) {
586 ++it; 586 ++it;
587 if ( l->linkFileKnown() && l->linkFile() == linkfile 587 if ( l->linkFileKnown() && l->linkFile() == linkfile
588 || l->file() == linkfile 588 || l->file() == linkfile
589 || dl.isValid() && dl.file() == l->file() ) { 589 || dl.isValid() && dl.file() == l->file() ) {
590 hidden.removeRef(l); 590 hidden.removeRef(l);
591 did = TRUE; 591 did = TRUE;
592 } 592 }
593 } 593 }
594 return did; 594 return did;
595} 595}
596 596
597//=========================================================================== 597//===========================================================================
598 598
599LauncherView::LauncherView( QWidget* parent, const char* name, WFlags fl ) 599LauncherView::LauncherView( QWidget* parent, const char* name, WFlags fl )
600 : QVBox( parent, name, fl ) 600 : QVBox( parent, name, fl )
601{ 601{
602 catmb = 0; 602 catmb = 0;
603 icons = new LauncherIconView( this ); 603 icons = new LauncherIconView( this );
604 setFocusProxy(icons); 604 setFocusProxy(icons);
605 QPEApplication::setStylusOperation( icons->viewport(), QPEApplication::RightOnHold ); 605 QPEApplication::setStylusOperation( icons->viewport(), QPEApplication::RightOnHold );
606 606
607 icons->setItemsMovable( FALSE ); 607 icons->setItemsMovable( FALSE );
608 icons->setAutoArrange( TRUE ); 608 icons->setAutoArrange( TRUE );
609 icons->setSorting( TRUE ); 609 icons->setSorting( TRUE );
610 icons->setFrameStyle( QFrame::NoFrame ); 610 icons->setFrameStyle( QFrame::NoFrame );
611 icons->setMargin( 0 ); 611 icons->setMargin( 0 );
612 icons->setSelectionMode( QIconView::NoSelection ); 612 icons->setSelectionMode( QIconView::NoSelection );
613 icons->setBackgroundMode( PaletteBase ); 613 icons->setBackgroundMode( PaletteBase );
614 icons->setResizeMode( QIconView::Fixed ); 614 icons->setResizeMode( QIconView::Fixed );
615 vmode = (ViewMode)-1; 615 vmode = (ViewMode)-1;
616 setViewMode( Icon ); 616 setViewMode( Icon );
617 617
618 connect( icons, SIGNAL(mouseButtonClicked(int, QIconViewItem *, const QPoint&)), 618 connect( icons, SIGNAL(mouseButtonClicked(int,QIconViewItem*,const QPoint&)),
619 SLOT(itemClicked(int, QIconViewItem *)) ); 619 SLOT(itemClicked(int,QIconViewItem*)) );
620 connect( icons, SIGNAL(selectionChanged()), 620 connect( icons, SIGNAL(selectionChanged()),
621 SLOT(selectionChanged()) ); 621 SLOT(selectionChanged()) );
622 connect( icons, SIGNAL(returnPressed(QIconViewItem *)), 622 connect( icons, SIGNAL(returnPressed(QIconViewItem*)),
623 SLOT(returnPressed(QIconViewItem *)) ); 623 SLOT(returnPressed(QIconViewItem*)) );
624 connect( icons, SIGNAL(mouseButtonPressed(int, QIconViewItem *, const QPoint&)), 624 connect( icons, SIGNAL(mouseButtonPressed(int,QIconViewItem*,const QPoint&)),
625 SLOT(itemPressed(int, QIconViewItem *)) ); 625 SLOT(itemPressed(int,QIconViewItem*)) );
626 626
627 tools = 0; 627 tools = 0;
628 setBackgroundType( Ruled, QString::null ); 628 setBackgroundType( Ruled, QString::null );
629} 629}
630 630
631LauncherView::~LauncherView() 631LauncherView::~LauncherView()
632{ 632{
633 if ( bgCache && bgCache->contains( bgName ) ) 633 if ( bgCache && bgCache->contains( bgName ) )
634 (*bgCache)[bgName]->ref--; 634 (*bgCache)[bgName]->ref--;
635} 635}
636 636
637void LauncherView::hideIcons() 637void LauncherView::hideIcons()
638{ 638{
639 icons->hide(); 639 icons->hide();
640} 640}
641 641
642void LauncherView::setToolsEnabled(bool y) 642void LauncherView::setToolsEnabled(bool y)
643{ 643{
644 if ( !y != !tools ) { 644 if ( !y != !tools ) {
645 if ( y ) { 645 if ( y ) {
646 tools = new QHBox(this); 646 tools = new QHBox(this);
647 647
648 // Type filter 648 // Type filter
649 typemb = new QComboBox(tools); 649 typemb = new QComboBox(tools);
650 QSizePolicy p = typemb->sizePolicy(); 650 QSizePolicy p = typemb->sizePolicy();
651 p.setHorData(QSizePolicy::Expanding); 651 p.setHorData(QSizePolicy::Expanding);
652 typemb->setSizePolicy(p); 652 typemb->setSizePolicy(p);
653 653
654 // Category filter 654 // Category filter
655 updateTools(); 655 updateTools();
656 tools->show(); 656 tools->show();
657 657
658 // Always show vscrollbar 658 // Always show vscrollbar
659 icons->setVScrollBarMode( QScrollView::AlwaysOn ); 659 icons->setVScrollBarMode( QScrollView::AlwaysOn );
660 } else { 660 } else {
661 delete tools; 661 delete tools;
662 tools = 0; 662 tools = 0;
663 } 663 }
664 } 664 }
665} 665}
666 666
667void LauncherView::updateTools() 667void LauncherView::updateTools()
668{ 668{
669 disconnect( typemb, SIGNAL(activated(int)), 669 disconnect( typemb, SIGNAL(activated(int)),
670 this, SLOT(showType(int)) ); 670 this, SLOT(showType(int)) );
671 if ( catmb ) disconnect( catmb, SIGNAL(signalSelected(int)), 671 if ( catmb ) disconnect( catmb, SIGNAL(signalSelected(int)),
672 this, SLOT(showCategory(int)) ); 672 this, SLOT(showCategory(int)) );
673 673