summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 1bd1156..6948976 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -559,97 +559,97 @@ void CategoryTabBar::paintLabel( QPainter* p, const QRect&,
559 if ( mode == QIconSet::Normal && has_focus ) 559 if ( mode == QIconSet::Normal && has_focus )
560 mode = QIconSet::Active; 560 mode = QIconSet::Active;
561 QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, mode ); 561 QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, mode );
562 int pixw = pixmap.width(); 562 int pixw = pixmap.width();
563 int pixh = pixmap.height(); 563 int pixh = pixmap.height();
564 p->drawPixmap( r.left() + 6, r.center().y() - pixh / 2 + 1, pixmap ); 564 p->drawPixmap( r.left() + 6, r.center().y() - pixh / 2 + 1, pixmap );
565 r.setLeft( r.left() + pixw + 5 ); 565 r.setLeft( r.left() + pixw + 5 );
566 } 566 }
567 567
568 QRect tr = r; 568 QRect tr = r;
569 569
570 if ( r.width() < 20 ) 570 if ( r.width() < 20 )
571 return; 571 return;
572 572
573 if ( t->isEnabled() && isEnabled() ) { 573 if ( t->isEnabled() && isEnabled() ) {
574#if defined(_WS_WIN32_) 574#if defined(_WS_WIN32_)
575 if ( colorGroup().brush( QColorGroup::Button ) == colorGroup().brush( QColorGroup::Background ) ) 575 if ( colorGroup().brush( QColorGroup::Button ) == colorGroup().brush( QColorGroup::Background ) )
576 p->setPen( colorGroup().buttonText() ); 576 p->setPen( colorGroup().buttonText() );
577 else 577 else
578 p->setPen( colorGroup().foreground() ); 578 p->setPen( colorGroup().foreground() );
579#else 579#else
580 p->setPen( colorGroup().foreground() ); 580 p->setPen( colorGroup().foreground() );
581#endif 581#endif
582 p->drawText( tr, AlignCenter | AlignVCenter | ShowPrefix, t->text() ); 582 p->drawText( tr, AlignCenter | AlignVCenter | ShowPrefix, t->text() );
583 } else { 583 } else {
584 p->setPen( palette().disabled().foreground() ); 584 p->setPen( palette().disabled().foreground() );
585 p->drawText( tr, AlignCenter | AlignVCenter | ShowPrefix, t->text() ); 585 p->drawText( tr, AlignCenter | AlignVCenter | ShowPrefix, t->text() );
586 } 586 }
587} 587}
588 588
589//--------------------------------------------------------------------------- 589//---------------------------------------------------------------------------
590 590
591Launcher::Launcher( QWidget* parent, const char* name, WFlags fl ) 591Launcher::Launcher( QWidget* parent, const char* name, WFlags fl )
592 : QMainWindow( parent, name, fl ) 592 : QMainWindow( parent, name, fl )
593{ 593{
594 setCaption( tr("Launcher") ); 594 setCaption( tr("Launcher") );
595 595
596 syncDialog = 0; 596 syncDialog = 0;
597 597
598 // we have a pretty good idea how big we'll be 598 // we have a pretty good idea how big we'll be
599 setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); 599 setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() );
600 600
601 tabs = 0; 601 tabs = 0;
602 rootFolder = 0; 602 rootFolder = 0;
603 docsFolder = 0; 603 docsFolder = 0;
604 604
605 int stamp = uidgen.generate(); // this is our timestamp to see which devices we know 605 int stamp = uidgen.generate(); // this is our timestamp to see which devices we know
606 //uidgen.store( stamp ); 606 //uidgen.store( stamp );
607 m_timeStamp = QString::number( stamp ); 607 m_timeStamp = QString::number( stamp );
608 608
609 tabs = new CategoryTabWidget( this ); 609 tabs = new CategoryTabWidget( this );
610 tabs->setMaximumWidth( qApp->desktop()->width() ); 610 tabs->setMaximumWidth( qApp->desktop()->width() );
611 setCentralWidget( tabs ); 611 setCentralWidget( tabs );
612 612
613 connect( tabs, SIGNAL(selected(const QString&)), 613 connect( tabs, SIGNAL(selected(const QString&)),
614 this, SLOT(viewSelected(const QString&)) ); 614 this, SLOT(viewSelected(const QString&)) );
615 connect( tabs, SIGNAL(clicked(const AppLnk*)), 615 connect( tabs, SIGNAL(clicked(const AppLnk*)),
616 this, SLOT(select(const AppLnk*))); 616 this, SLOT(select(const AppLnk*)));
617 connect( tabs, SIGNAL(rightPressed(AppLnk*)), 617 connect( tabs, SIGNAL(rightPressed(AppLnk*)),
618 this, SLOT(properties(AppLnk*))); 618 this, SLOT(properties(AppLnk*)));
619 619
620#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 620#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
621 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); 621 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this );
622 connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)), 622 connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)),
623 this, SLOT(systemMessage( const QCString &, const QByteArray &)) ); 623 this, SLOT(systemMessage( const QCString &, const QByteArray &)) );
624 QCopChannel *channel = new QCopChannel( "QPE/Launcher", this ); 624 QCopChannel *channel = new QCopChannel( "QPE/Launcher", this );
625 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 625 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
626 this, SLOT(launcherMessage(const QCString&, const QByteArray&)) ); 626 this, SLOT(launcherMessage(const QCString&, const QByteArray&)) );
627#endif 627#endif
628 628
629 storage = new StorageInfo( this ); 629 storage = new StorageInfo( this );
630 connect( storage, SIGNAL( disksChanged() ), SLOT( storageChanged() ) ); 630 connect( storage, SIGNAL( disksChanged() ), SLOT( storageChanged() ) );
631 631
632 updateTabs(); 632 updateTabs();
633 633
634 preloadApps(); 634 preloadApps();
635 635
636 in_lnk_props = FALSE; 636 in_lnk_props = FALSE;
637 got_lnk_change = FALSE; 637 got_lnk_change = FALSE;
638} 638}
639 639
640Launcher::~Launcher() 640Launcher::~Launcher()
641{ 641{
642 delete rootFolder; 642 delete rootFolder;
643 delete docsFolder; 643 delete docsFolder;
644} 644}
645 645
646static bool isVisibleWindow(int wid) 646static bool isVisibleWindow(int wid)
647{ 647{
648#ifdef QWS 648#ifdef QWS
649 const QList<QWSWindow> &list = qwsServer->clientWindows(); 649 const QList<QWSWindow> &list = qwsServer->clientWindows();
650 QWSWindow* w; 650 QWSWindow* w;
651 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) { 651 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) {
652 if ( w->winId() == wid ) 652 if ( w->winId() == wid )
653 return !w->isFullyObscured(); 653 return !w->isFullyObscured();
654 } 654 }
655#endif 655#endif
@@ -934,211 +934,216 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
934#ifndef QT_NO_COP 934#ifndef QT_NO_COP
935 QCopEnvelope e( "QPE/Desktop", "handshakeInfo(QString,bool)" ); 935 QCopEnvelope e( "QPE/Desktop", "handshakeInfo(QString,bool)" );
936 e << home; 936 e << home;
937 int locked = (int) Desktop::screenLocked(); 937 int locked = (int) Desktop::screenLocked();
938 e << locked; 938 e << locked;
939#endif 939#endif
940 } else if ( msg == "autoStart(QString)" ) { 940 } else if ( msg == "autoStart(QString)" ) {
941 QString appName; 941 QString appName;
942 stream >> appName; 942 stream >> appName;
943 Config cfg( "autostart" ); 943 Config cfg( "autostart" );
944 cfg.setGroup( "AutoStart" ); 944 cfg.setGroup( "AutoStart" );
945 if ( appName.compare("clear") == 0){ 945 if ( appName.compare("clear") == 0){
946 cfg.writeEntry("Apps", ""); 946 cfg.writeEntry("Apps", "");
947 } 947 }
948 } else if ( msg == "autoStart(QString,QString)" ) { 948 } else if ( msg == "autoStart(QString,QString)" ) {
949 QString modifier, appName; 949 QString modifier, appName;
950 stream >> modifier >> appName; 950 stream >> modifier >> appName;
951 Config cfg( "autostart" ); 951 Config cfg( "autostart" );
952 cfg.setGroup( "AutoStart" ); 952 cfg.setGroup( "AutoStart" );
953 if ( modifier.compare("add") == 0 ){ 953 if ( modifier.compare("add") == 0 ){
954 // only add if appname is entered 954 // only add if appname is entered
955 if (!appName.isEmpty()) { 955 if (!appName.isEmpty()) {
956 cfg.writeEntry("Apps", appName); 956 cfg.writeEntry("Apps", appName);
957 } 957 }
958 } else if (modifier.compare("remove") == 0 ) { 958 } else if (modifier.compare("remove") == 0 ) {
959 // need to change for multiple entries 959 // need to change for multiple entries
960 // actually remove is right now simular to clear, but in future there 960 // actually remove is right now simular to clear, but in future there
961 // should be multiple apps in autostart possible. 961 // should be multiple apps in autostart possible.
962 QString checkName; 962 QString checkName;
963 checkName = cfg.readEntry("Apps", ""); 963 checkName = cfg.readEntry("Apps", "");
964 if (checkName == appName) { 964 if (checkName == appName) {
965 cfg.writeEntry("Apps", ""); 965 cfg.writeEntry("Apps", "");
966 } 966 }
967 } 967 }
968 // case the autostart feature should be delayed 968 // case the autostart feature should be delayed
969 } else if ( msg == "autoStart(QString,QString,QString)") { 969 } else if ( msg == "autoStart(QString,QString,QString)") {
970 QString modifier, appName, delay; 970 QString modifier, appName, delay;
971 stream >> modifier >> appName >> delay; 971 stream >> modifier >> appName >> delay;
972 Config cfg( "autostart" ); 972 Config cfg( "autostart" );
973 cfg.setGroup( "AutoStart" ); 973 cfg.setGroup( "AutoStart" );
974 if ( modifier.compare("add") == 0 ){ 974 if ( modifier.compare("add") == 0 ){
975 // only add it appname is entered 975 // only add it appname is entered
976 if (!appName.isEmpty()) { 976 if (!appName.isEmpty()) {
977 cfg.writeEntry("Apps", appName); 977 cfg.writeEntry("Apps", appName);
978 cfg.writeEntry("Delay", delay); 978 cfg.writeEntry("Delay", delay);
979 } 979 }
980 } else { 980 } else {
981 } 981 }
982 } else if ( msg == "sendVersionInfo()" ) { 982 }
983 /*
984 * QtopiaDesktop relies on the major number
985 * to start with 1. We're at 0.9
986 * so wee need to fake at least 1.4 to be able
987 * to sync with QtopiaDesktop1.6
988 */
989 else if ( msg == "sendVersionInfo()" ) {
983 QCopEnvelope e( "QPE/Desktop", "versionInfo(QString)" ); 990 QCopEnvelope e( "QPE/Desktop", "versionInfo(QString)" );
984 QString v = QPE_VERSION; 991 QString v2 = QString::fromLatin1("1.4");
985 QStringList l = QStringList::split( '.', v );
986 QString v2 = l[0] + '.' + l[1];
987 e << v2; 992 e << v2;
988 //qDebug("version %s\n", line.latin1()); 993 //qDebug("version %s\n", line.latin1());
989 } else if ( msg == "sendCardInfo()" ) { 994 } else if ( msg == "sendCardInfo()" ) {
990#ifndef QT_NO_COP 995#ifndef QT_NO_COP
991 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" ); 996 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" );
992#endif 997#endif
993 const QList<FileSystem> &fs = storage->fileSystems(); 998 const QList<FileSystem> &fs = storage->fileSystems();
994 QListIterator<FileSystem> it ( fs ); 999 QListIterator<FileSystem> it ( fs );
995 QString s; 1000 QString s;
996 QString homeDir = getenv("HOME"); 1001 QString homeDir = getenv("HOME");
997 QString hardDiskHome, hardDiskHomePath; 1002 QString hardDiskHome, hardDiskHomePath;
998 for ( ; it.current(); ++it ) { 1003 for ( ; it.current(); ++it ) {
999 int k4 = (*it)->blockSize()/256; 1004 int k4 = (*it)->blockSize()/256;
1000 if ( (*it)->isRemovable() || (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs") { 1005 if ( (*it)->isRemovable() || (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs") {
1001 s += (*it)->name() + "=" + (*it)->path() + "/Documents " 1006 s += (*it)->name() + "=" + (*it)->path() + "/Documents "
1002 + QString::number( (*it)->availBlocks() * k4/4 ) 1007 + QString::number( (*it)->availBlocks() * k4/4 )
1003 + "K " + (*it)->options() + ";"; 1008 + "K " + (*it)->options() + ";";
1004 } else if ( (*it)->disk() == "/dev/mtdblock1" || 1009 } else if ( (*it)->disk() == "/dev/mtdblock1" ||
1005 (*it)->disk() == "/dev/mtdblock/1" ) { 1010 (*it)->disk() == "/dev/mtdblock/1" ) {
1006 s += (*it)->name() + "=" + homeDir + "/Documents " 1011 s += (*it)->name() + "=" + homeDir + "/Documents "
1007 + QString::number( (*it)->availBlocks() * k4/4 ) 1012 + QString::number( (*it)->availBlocks() * k4/4 )
1008 + "K " + (*it)->options() + ";"; 1013 + "K " + (*it)->options() + ";";
1009 } else if ( (*it)->name().contains( "Hard Disk") && 1014 } else if ( (*it)->name().contains( "Hard Disk") &&
1010 homeDir.contains( (*it)->path() ) && 1015 homeDir.contains( (*it)->path() ) &&
1011 (*it)->path().length() > hardDiskHomePath.length() ) { 1016 (*it)->path().length() > hardDiskHomePath.length() ) {
1012 hardDiskHomePath = (*it)->path(); 1017 hardDiskHomePath = (*it)->path();
1013 hardDiskHome = 1018 hardDiskHome =
1014 (*it)->name() + "=" + homeDir + "/Documents " 1019 (*it)->name() + "=" + homeDir + "/Documents "
1015 + QString::number( (*it)->availBlocks() * k4/4 ) 1020 + QString::number( (*it)->availBlocks() * k4/4 )
1016 + "K " + (*it)->options() + ";"; 1021 + "K " + (*it)->options() + ";";
1017 } 1022 }
1018 } 1023 }
1019 if ( !hardDiskHome.isEmpty() ) 1024 if ( !hardDiskHome.isEmpty() )
1020 s += hardDiskHome; 1025 s += hardDiskHome;
1021 1026
1022#ifndef QT_NO_COP 1027#ifndef QT_NO_COP
1023 e << s; 1028 e << s;
1024#endif 1029#endif
1025 } else if ( msg == "sendSyncDate(QString)" ) { 1030 } else if ( msg == "sendSyncDate(QString)" ) {
1026 QString app; 1031 QString app;
1027 stream >> app; 1032 stream >> app;
1028 Config cfg( "qpe" ); 1033 Config cfg( "qpe" );
1029 cfg.setGroup("SyncDate"); 1034 cfg.setGroup("SyncDate");
1030#ifndef QT_NO_COP 1035#ifndef QT_NO_COP
1031 QCopEnvelope e( "QPE/Desktop", "syncDate(QString,QString)" ); 1036 QCopEnvelope e( "QPE/Desktop", "syncDate(QString,QString)" );
1032 e << app << cfg.readEntry( app ); 1037 e << app << cfg.readEntry( app );
1033#endif 1038#endif
1034 //qDebug("QPE/System sendSyncDate for %s: response %s", app.latin1(), 1039 //qDebug("QPE/System sendSyncDate for %s: response %s", app.latin1(),
1035 //cfg.readEntry( app ).latin1() ); 1040 //cfg.readEntry( app ).latin1() );
1036 } else if ( msg == "setSyncDate(QString,QString)" ) { 1041 } else if ( msg == "setSyncDate(QString,QString)" ) {
1037 QString app, date; 1042 QString app, date;
1038 stream >> app >> date; 1043 stream >> app >> date;
1039 Config cfg( "qpe" ); 1044 Config cfg( "qpe" );
1040 cfg.setGroup("SyncDate"); 1045 cfg.setGroup("SyncDate");
1041 cfg.writeEntry( app, date ); 1046 cfg.writeEntry( app, date );
1042 //qDebug("setSyncDate(QString,QString) %s %s", app.latin1(), date.latin1()); 1047 //qDebug("setSyncDate(QString,QString) %s %s", app.latin1(), date.latin1());
1043 } else if ( msg == "startSync(QString)" ) { 1048 } else if ( msg == "startSync(QString)" ) {
1044 QString what; 1049 QString what;
1045 stream >> what; 1050 stream >> what;
1046 delete syncDialog; syncDialog = 0; 1051 delete syncDialog; syncDialog = 0;
1047 syncDialog = new SyncDialog( this, "syncProgress", FALSE, 1052 syncDialog = new SyncDialog( this, "syncProgress", FALSE,
1048 WStyle_Tool | WStyle_Customize | 1053 WStyle_Tool | WStyle_Customize |
1049 Qt::WStyle_StaysOnTop ); 1054 Qt::WStyle_StaysOnTop );
1050 syncDialog->showMaximized(); 1055 syncDialog->showMaximized();
1051 syncDialog->whatLabel->setText( "<b>" + what + "</b>" ); 1056 syncDialog->whatLabel->setText( "<b>" + what + "</b>" );
1052 connect( syncDialog->buttonCancel, SIGNAL( clicked() ), 1057 connect( syncDialog->buttonCancel, SIGNAL( clicked() ),
1053 SLOT( cancelSync() ) ); 1058 SLOT( cancelSync() ) );
1054 } else if ( msg == "stopSync()") { 1059 } else if ( msg == "stopSync()") {
1055 delete syncDialog; syncDialog = 0; 1060 delete syncDialog; syncDialog = 0;
1056 } else if ( msg == "getAllDocLinks()" ) { 1061 } else if ( msg == "getAllDocLinks()" ) {
1057 loadDocs(); 1062 loadDocs();
1058 1063
1059 QString contents; 1064 QString contents;
1060 1065
1061 //Categories cats; 1066 //Categories cats;
1062 for ( QListIterator<DocLnk> it( docsFolder->children() ); it.current(); ++it ) { 1067 for ( QListIterator<DocLnk> it( docsFolder->children() ); it.current(); ++it ) {
1063 DocLnk *doc = it.current(); 1068 DocLnk *doc = it.current();
1064 QFileInfo fi( doc->file() ); 1069 QFileInfo fi( doc->file() );
1065 if ( !fi.exists() ) 1070 if ( !fi.exists() )
1066 continue; 1071 continue;
1067 1072
1068 bool fake = !doc->linkFileKnown(); 1073 bool fake = !doc->linkFileKnown();
1069 if ( !fake ) { 1074 if ( !fake ) {
1070 QFile f( doc->linkFile() ); 1075 QFile f( doc->linkFile() );
1071 if ( f.open( IO_ReadOnly ) ) { 1076 if ( f.open( IO_ReadOnly ) ) {
1072 QTextStream ts( &f ); 1077 QTextStream ts( &f );
1073 ts.setEncoding( QTextStream::UnicodeUTF8 ); 1078 ts.setEncoding( QTextStream::UnicodeUTF8 );
1074 contents += ts.read(); 1079 contents += ts.read();
1075 f.close(); 1080 f.close();
1076 } else 1081 } else
1077 fake = TRUE; 1082 fake = TRUE;
1078 } 1083 }
1079 if (fake) { 1084 if (fake) {
1080 contents += "[Desktop Entry]\n"; 1085 contents += "[Desktop Entry]\n";
1081 contents += "Categories = " + // No tr 1086 contents += "Categories = " + // No tr
1082 // cats.labels("Document View",doc->categories()).join(";") + "\n"; // No tr 1087 // cats.labels("Document View",doc->categories()).join(";") + "\n"; // No tr
1083 Qtopia::Record::idsToString( doc->categories() ) + "\n"; 1088 Qtopia::Record::idsToString( doc->categories() ) + "\n";
1084 contents += "Name = "+doc->name()+"\n"; // No tr 1089 contents += "Name = "+doc->name()+"\n"; // No tr
1085 contents += "Type = "+doc->type()+"\n"; // No tr 1090 contents += "Type = "+doc->type()+"\n"; // No tr
1086 } 1091 }
1087 contents += "File = "+doc->file()+"\n"; // No tr // (resolves path) 1092 contents += "File = "+doc->file()+"\n"; // No tr // (resolves path)
1088 contents += QString("Size = %1\n").arg( fi.size() ); // No tr 1093 contents += QString("Size = %1\n").arg( fi.size() ); // No tr
1089 } 1094 }
1090 1095
1091 //qDebug( "sending length %d", contents.length() ); 1096 //qDebug( "sending length %d", contents.length() );
1092#ifndef QT_NO_COP 1097#ifndef QT_NO_COP
1093 QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" ); 1098 QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" );
1094 e << contents; 1099 e << contents;
1095#endif 1100#endif
1096 1101
1097 //qDebug( "================ \n\n%s\n\n===============", 1102 //qDebug( "================ \n\n%s\n\n===============",
1098 //contents.latin1() ); 1103 //contents.latin1() );
1099 1104
1100 delete docsFolder; 1105 delete docsFolder;
1101 docsFolder = 0; 1106 docsFolder = 0;
1102#ifdef QWS 1107#ifdef QWS
1103 } else if ( msg == "setMouseProto(QString)" ) { 1108 } else if ( msg == "setMouseProto(QString)" ) {
1104 QString mice; 1109 QString mice;
1105 stream >> mice; 1110 stream >> mice;
1106 setenv("QWS_MOUSE_PROTO",mice.latin1(),1); 1111 setenv("QWS_MOUSE_PROTO",mice.latin1(),1);
1107 qwsServer->openMouse(); 1112 qwsServer->openMouse();
1108 } else if ( msg == "setKeyboard(QString)" ) { 1113 } else if ( msg == "setKeyboard(QString)" ) {
1109 QString kb; 1114 QString kb;
1110 stream >> kb; 1115 stream >> kb;
1111 setenv("QWS_KEYBOARD",kb.latin1(),1); 1116 setenv("QWS_KEYBOARD",kb.latin1(),1);
1112 qwsServer->openKeyboard(); 1117 qwsServer->openKeyboard();
1113#endif 1118#endif
1114 } 1119 }
1115} 1120}
1116 1121
1117void Launcher::cancelSync() 1122void Launcher::cancelSync()
1118{ 1123{
1119#ifndef QT_NO_COP 1124#ifndef QT_NO_COP
1120 QCopEnvelope e( "QPE/Desktop", "cancelSync()" ); 1125 QCopEnvelope e( "QPE/Desktop", "cancelSync()" );
1121#endif 1126#endif
1122} 1127}
1123 1128
1124void Launcher::launcherMessage( const QCString &msg, const QByteArray &data) 1129void Launcher::launcherMessage( const QCString &msg, const QByteArray &data)
1125{ 1130{
1126 QDataStream stream( data, IO_ReadOnly ); 1131 QDataStream stream( data, IO_ReadOnly );
1127 if ( msg == "setTabView(QString,int)" ) { 1132 if ( msg == "setTabView(QString,int)" ) {
1128 QString id; 1133 QString id;
1129 stream >> id; 1134 stream >> id;
1130 int mode; 1135 int mode;
1131 stream >> mode; 1136 stream >> mode;
1132 if ( tabs->view(id) ) 1137 if ( tabs->view(id) )
1133 tabs->view(id)->setViewMode( (LauncherView::ViewMode)mode ); 1138 tabs->view(id)->setViewMode( (LauncherView::ViewMode)mode );
1134 } else if ( msg == "setTabBackground(QString,int,QString)" ) { 1139 } else if ( msg == "setTabBackground(QString,int,QString)" ) {
1135 QString id; 1140 QString id;
1136 stream >> id; 1141 stream >> id;
1137 int mode; 1142 int mode;
1138 stream >> mode; 1143 stream >> mode;
1139 QString pixmapOrColor; 1144 QString pixmapOrColor;
1140 stream >> pixmapOrColor; 1145 stream >> pixmapOrColor;
1141 if ( tabs->view(id) ) 1146 if ( tabs->view(id) )
1142 tabs->view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); 1147 tabs->view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor );
1143 } else if ( msg == "setTextColor(QString,QString)" ) { 1148 } else if ( msg == "setTextColor(QString,QString)" ) {
1144 QString id; 1149 QString id;