-rw-r--r-- | core/launcher/launcher.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 6764338..fc944e1 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -847,70 +847,80 @@ void Launcher::select( const AppLnk *appLnk ) | |||
847 | tabs->setBusy(TRUE); | 847 | tabs->setBusy(TRUE); |
848 | emit executing( appLnk ); | 848 | emit executing( appLnk ); |
849 | appLnk->execute(); | 849 | appLnk->execute(); |
850 | } | 850 | } |
851 | } | 851 | } |
852 | 852 | ||
853 | void Launcher::externalSelected(const AppLnk *appLnk) | 853 | void Launcher::externalSelected(const AppLnk *appLnk) |
854 | { | 854 | { |
855 | tabs->setBusy(TRUE); | 855 | tabs->setBusy(TRUE); |
856 | emit executing( appLnk ); | 856 | emit executing( appLnk ); |
857 | } | 857 | } |
858 | 858 | ||
859 | void Launcher::properties( AppLnk *appLnk ) | 859 | void Launcher::properties( AppLnk *appLnk ) |
860 | { | 860 | { |
861 | if ( appLnk->type() == "Folder" ) { // No tr | 861 | if ( appLnk->type() == "Folder" ) { // No tr |
862 | // Not supported: flat is simpler for the user | 862 | // Not supported: flat is simpler for the user |
863 | } else { | 863 | } else { |
864 | in_lnk_props = TRUE; | 864 | in_lnk_props = TRUE; |
865 | got_lnk_change = FALSE; | 865 | got_lnk_change = FALSE; |
866 | LnkProperties prop(appLnk); | 866 | LnkProperties prop(appLnk); |
867 | connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *))); | 867 | connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *))); |
868 | prop.showMaximized(); | 868 | prop.showMaximized(); |
869 | prop.exec(); | 869 | prop.exec(); |
870 | in_lnk_props = FALSE; | 870 | in_lnk_props = FALSE; |
871 | if ( got_lnk_change ) { | 871 | if ( got_lnk_change ) { |
872 | updateLink(lnk_change); | 872 | updateLink(lnk_change); |
873 | } | 873 | } |
874 | } | 874 | } |
875 | } | 875 | } |
876 | 876 | ||
877 | void Launcher::updateLink(const QString& link) | 877 | void Launcher::updateLink(const QString& link) |
878 | { | 878 | { |
879 | if (link.isNull()) | 879 | bool notify_sm = false; |
880 | |||
881 | if (link.isNull()) { | ||
880 | updateTabs(); | 882 | updateTabs(); |
881 | else if (link.isEmpty()) | 883 | notify_sm = true; |
884 | } | ||
885 | else if (link.isEmpty()) { | ||
882 | updateDocs(); | 886 | updateDocs(); |
883 | else | 887 | } |
888 | else { | ||
884 | tabs->updateLink(link); | 889 | tabs->updateLink(link); |
890 | notify_sm = true; | ||
891 | } | ||
892 | |||
893 | if ( notify_sm ) | ||
894 | QCopEnvelope e ( "QPE/TaskBar", "reloadApps()" ); | ||
885 | } | 895 | } |
886 | 896 | ||
887 | void Launcher::systemMessage( const QCString &msg, const QByteArray &data) | 897 | void Launcher::systemMessage( const QCString &msg, const QByteArray &data) |
888 | { | 898 | { |
889 | QDataStream stream( data, IO_ReadOnly ); | 899 | QDataStream stream( data, IO_ReadOnly ); |
890 | if ( msg == "linkChanged(QString)" ) { | 900 | if ( msg == "linkChanged(QString)" ) { |
891 | QString link; | 901 | QString link; |
892 | stream >> link; | 902 | stream >> link; |
893 | if ( in_lnk_props ) { | 903 | if ( in_lnk_props ) { |
894 | got_lnk_change = TRUE; | 904 | got_lnk_change = TRUE; |
895 | lnk_change = link; | 905 | lnk_change = link; |
896 | } else { | 906 | } else { |
897 | updateLink(link); | 907 | updateLink(link); |
898 | } | 908 | } |
899 | } else if ( msg == "busy()" ) { | 909 | } else if ( msg == "busy()" ) { |
900 | emit busy(); | 910 | emit busy(); |
901 | } else if ( msg == "notBusy(QString)" ) { | 911 | } else if ( msg == "notBusy(QString)" ) { |
902 | QString app; | 912 | QString app; |
903 | stream >> app; | 913 | stream >> app; |
904 | tabs->setBusy(FALSE); | 914 | tabs->setBusy(FALSE); |
905 | emit notBusy(app); | 915 | emit notBusy(app); |
906 | } else if ( msg == "mkdir(QString)" ) { | 916 | } else if ( msg == "mkdir(QString)" ) { |
907 | QString dir; | 917 | QString dir; |
908 | stream >> dir; | 918 | stream >> dir; |
909 | if ( !dir.isEmpty() ) | 919 | if ( !dir.isEmpty() ) |
910 | mkdir( dir ); | 920 | mkdir( dir ); |
911 | } else if ( msg == "rdiffGenSig(QString,QString)" ) { | 921 | } else if ( msg == "rdiffGenSig(QString,QString)" ) { |
912 | QString baseFile, sigFile; | 922 | QString baseFile, sigFile; |
913 | stream >> baseFile >> sigFile; | 923 | stream >> baseFile >> sigFile; |
914 | QRsync::generateSignature( baseFile, sigFile ); | 924 | QRsync::generateSignature( baseFile, sigFile ); |
915 | } else if ( msg == "rdiffGenDiff(QString,QString,QString)" ) { | 925 | } else if ( msg == "rdiffGenDiff(QString,QString,QString)" ) { |
916 | QString baseFile, sigFile, deltaFile; | 926 | QString baseFile, sigFile, deltaFile; |