summaryrefslogtreecommitdiff
path: root/core/launcher/launcher.cpp
Unidiff
Diffstat (limited to 'core/launcher/launcher.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index bf2287d..6afbcd8 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -651,96 +651,106 @@ void Launcher::typeAdded( const QString& type, const QString& name,
651 tabs->view( type )->setSortEnabled( FALSE ); 651 tabs->view( type )->setSortEnabled( FALSE );
652} 652}
653 653
654void Launcher::typeRemoved( const QString& type ) 654void Launcher::typeRemoved( const QString& type )
655{ 655{
656 tabs->view( type )->removeAllItems(); 656 tabs->view( type )->removeAllItems();
657 tabs->deleteView( type ); 657 tabs->deleteView( type );
658 ids.remove( type ); 658 ids.remove( type );
659 /* this will be called in applicationScanningProgress with value 100! */ 659 /* this will be called in applicationScanningProgress with value 100! */
660// tb->refreshStartMenu(); 660// tb->refreshStartMenu();
661} 661}
662 662
663void Launcher::applicationAdded( const QString& type, const AppLnk& app ) 663void Launcher::applicationAdded( const QString& type, const AppLnk& app )
664{ 664{
665 if ( app.type() == "Separator" ) // No tr 665 if ( app.type() == "Separator" ) // No tr
666 return; 666 return;
667 667
668 LauncherView *view = tabs->view( type ); 668 LauncherView *view = tabs->view( type );
669 if ( view ) 669 if ( view )
670 view->addItem( new AppLnk( app ), FALSE ); 670 view->addItem( new AppLnk( app ), FALSE );
671 else 671 else
672 qWarning("addAppLnk: No view for type %s. Can't add app %s!", 672 qWarning("addAppLnk: No view for type %s. Can't add app %s!",
673 type.latin1(),app.name().latin1() ); 673 type.latin1(),app.name().latin1() );
674 674
675 MimeType::registerApp( app ); 675 MimeType::registerApp( app );
676} 676}
677 677
678void Launcher::applicationRemoved( const QString& type, const AppLnk& app ) 678void Launcher::applicationRemoved( const QString& type, const AppLnk& app )
679{ 679{
680 LauncherView *view = tabs->view( type ); 680 LauncherView *view = tabs->view( type );
681 if ( view ) 681 if ( view )
682 view->removeLink( app.linkFile() ); 682 view->removeLink( app.linkFile() );
683 else 683 else
684 owarn << "removeAppLnk: No view for " << type << "!" << oendl; 684 owarn << "removeAppLnk: No view for " << type << "!" << oendl;
685} 685}
686 686
687void Launcher::allApplicationsRemoved() 687void Launcher::allApplicationsRemoved()
688{ 688{
689 MimeType::clear(); 689 MimeType::clear();
690 for ( QStringList::ConstIterator it=ids.begin(); it!= ids.end(); ++it) 690 for ( QStringList::ConstIterator it=ids.begin(); it!= ids.end(); ++it)
691 tabs->view( (*it) )->removeAllItems(); 691 tabs->view( (*it) )->removeAllItems();
692} 692}
693 693
694void Launcher::documentAdded( const DocLnk& doc ) 694void Launcher::documentAdded( const DocLnk& doc )
695{ 695{
696 tabs->docView()->addItem( new DocLnk( doc ), FALSE ); 696 tabs->docView()->addItem( new DocLnk( doc ), FALSE );
697} 697}
698 698
699void Launcher::aboutToAddBegin()
700{
701 tabs->docView()->setUpdatesEnabled( false );
702}
703
704void Launcher::aboutToAddEnd()
705{
706 tabs->docView()->setUpdatesEnabled( true );
707}
708
699void Launcher::showLoadingDocs() 709void Launcher::showLoadingDocs()
700{ 710{
701 tabs->docView()->hide(); 711 tabs->docView()->hide();
702} 712}
703 713
704void Launcher::showDocTab() 714void Launcher::showDocTab()
705{ 715{
706 if ( tabs->categoryBar->currentView() == tabs->docView() ) 716 if ( tabs->categoryBar->currentView() == tabs->docView() )
707 tabs->docView()->show(); 717 tabs->docView()->show();
708} 718}
709 719
710void Launcher::documentRemoved( const DocLnk& doc ) 720void Launcher::documentRemoved( const DocLnk& doc )
711{ 721{
712 tabs->docView()->removeLink( doc.linkFile() ); 722 tabs->docView()->removeLink( doc.linkFile() );
713} 723}
714 724
715void Launcher::documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ) 725void Launcher::documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc )
716{ 726{
717 documentRemoved( oldDoc ); 727 documentRemoved( oldDoc );
718 documentAdded( newDoc ); 728 documentAdded( newDoc );
719} 729}
720 730
721void Launcher::allDocumentsRemoved() 731void Launcher::allDocumentsRemoved()
722{ 732{
723 tabs->docView()->removeAllItems(); 733 tabs->docView()->removeAllItems();
724} 734}
725 735
726void Launcher::applicationStateChanged( const QString& name, ApplicationState state ) 736void Launcher::applicationStateChanged( const QString& name, ApplicationState state )
727{ 737{
728 tb->setApplicationState( name, state ); 738 tb->setApplicationState( name, state );
729} 739}
730 740
731void Launcher::applicationScanningProgress( int percent ) 741void Launcher::applicationScanningProgress( int percent )
732{ 742{
733 switch ( percent ) { 743 switch ( percent ) {
734 case 0: { 744 case 0: {
735 for ( QStringList::ConstIterator it=ids.begin(); it!= ids.end(); ++it) { 745 for ( QStringList::ConstIterator it=ids.begin(); it!= ids.end(); ++it) {
736 tabs->view( (*it) )->setUpdatesEnabled( FALSE ); 746 tabs->view( (*it) )->setUpdatesEnabled( FALSE );
737 tabs->view( (*it) )->setSortEnabled( FALSE ); 747 tabs->view( (*it) )->setSortEnabled( FALSE );
738 } 748 }
739 break; 749 break;
740 } 750 }
741 case 100: { 751 case 100: {
742 for ( QStringList::ConstIterator it=ids.begin(); it!= ids.end(); ++it) { 752 for ( QStringList::ConstIterator it=ids.begin(); it!= ids.end(); ++it) {
743 tabs->view( (*it) )->setUpdatesEnabled( TRUE ); 753 tabs->view( (*it) )->setUpdatesEnabled( TRUE );
744 tabs->view( (*it) )->setSortEnabled( TRUE ); 754 tabs->view( (*it) )->setSortEnabled( TRUE );
745 } 755 }
746 tb->refreshStartMenu(); 756 tb->refreshStartMenu();