author | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
commit | 0d59c780513da78033f4d9040475dee9db0256d4 (patch) (unidiff) | |
tree | 503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /core/launcher/launcherview.cpp | |
parent | a0981652d61776d70f25980f035748b21339e946 (diff) | |
download | opie-0d59c780513da78033f4d9040475dee9db0256d4.zip opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2 |
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you
can check the diff (but it had compiled and run here)
Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/launcherview.cpp | 12 |
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 | ||
599 | LauncherView::LauncherView( QWidget* parent, const char* name, WFlags fl ) | 599 | LauncherView::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 | ||
631 | LauncherView::~LauncherView() | 631 | LauncherView::~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 | ||
637 | void LauncherView::hideIcons() | 637 | void LauncherView::hideIcons() |
638 | { | 638 | { |
639 | icons->hide(); | 639 | icons->hide(); |
640 | } | 640 | } |
641 | 641 | ||
642 | void LauncherView::setToolsEnabled(bool y) | 642 | void 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 | ||
667 | void LauncherView::updateTools() | 667 | void 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 | ||