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.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 767efb2..6764338 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -1137,96 +1137,103 @@ void Launcher::launcherMessage( const QCString &msg, const QByteArray &data)
1137{ 1137{
1138 QDataStream stream( data, IO_ReadOnly ); 1138 QDataStream stream( data, IO_ReadOnly );
1139 if ( msg == "setTabView(QString,int)" ) { 1139 if ( msg == "setTabView(QString,int)" ) {
1140 QString id; 1140 QString id;
1141 stream >> id; 1141 stream >> id;
1142 int mode; 1142 int mode;
1143 stream >> mode; 1143 stream >> mode;
1144 if ( tabs->view(id) ) 1144 if ( tabs->view(id) )
1145 tabs->view(id)->setViewMode( (LauncherView::ViewMode)mode ); 1145 tabs->view(id)->setViewMode( (LauncherView::ViewMode)mode );
1146 } else if ( msg == "setTabBackground(QString,int,QString)" ) { 1146 } else if ( msg == "setTabBackground(QString,int,QString)" ) {
1147 QString id; 1147 QString id;
1148 stream >> id; 1148 stream >> id;
1149 int mode; 1149 int mode;
1150 stream >> mode; 1150 stream >> mode;
1151 QString pixmapOrColor; 1151 QString pixmapOrColor;
1152 stream >> pixmapOrColor; 1152 stream >> pixmapOrColor;
1153 if ( tabs->view(id) ) 1153 if ( tabs->view(id) )
1154 tabs->view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); 1154 tabs->view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor );
1155 } else if ( msg == "setTextColor(QString,QString)" ) { 1155 } else if ( msg == "setTextColor(QString,QString)" ) {
1156 QString id; 1156 QString id;
1157 stream >> id; 1157 stream >> id;
1158 QString color; 1158 QString color;
1159 stream >> color; 1159 stream >> color;
1160 if ( tabs->view(id) ) 1160 if ( tabs->view(id) )
1161 tabs->view(id)->setTextColor( QColor(color) ); 1161 tabs->view(id)->setTextColor( QColor(color) );
1162 } else if ( msg == "setFont(QString,QString,int,int,int)" ) { 1162 } else if ( msg == "setFont(QString,QString,int,int,int)" ) {
1163 QString id; 1163 QString id;
1164 stream >> id; 1164 stream >> id;
1165 QString fam; 1165 QString fam;
1166 stream >> fam; 1166 stream >> fam;
1167 int size; 1167 int size;
1168 stream >> size; 1168 stream >> size;
1169 int weight; 1169 int weight;
1170 stream >> weight; 1170 stream >> weight;
1171 int italic; 1171 int italic;
1172 stream >> italic; 1172 stream >> italic;
1173 if ( tabs->view(id) ) 1173 if ( tabs->view(id) )
1174 if ( !fam. isEmpty ( )) 1174 if ( !fam. isEmpty ( ))
1175 tabs->view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); 1175 tabs->view(id)->setViewFont( QFont(fam, size, weight, italic!=0) );
1176 else 1176 else
1177 tabs->view(id)->unsetViewFont(); 1177 tabs->view(id)->unsetViewFont();
1178 qDebug( "setFont: %s, %d, %d, %d", fam.latin1(), size, weight, italic ); 1178 qDebug( "setFont: %s, %d, %d, %d", fam.latin1(), size, weight, italic );
1179 } 1179 }
1180 else if ( msg == "setBusyIndicatorType(QString)" ) { 1180 else if ( msg == "setBusyIndicatorType(QString)" ) {
1181 QString type; 1181 QString type;
1182 stream >> type; 1182 stream >> type;
1183 tabs->setBusyIndicatorType(type); 1183 tabs->setBusyIndicatorType(type);
1184 } 1184 }
1185 else if ( msg == "home()" ) {
1186 if ( isVisibleWindow( winId ( )))
1187 nextView ( );
1188 else
1189 raise ( );
1190
1191 }
1185} 1192}
1186 1193
1187void Launcher::storageChanged() 1194void Launcher::storageChanged()
1188{ 1195{
1189 if ( in_lnk_props ) { 1196 if ( in_lnk_props ) {
1190 got_lnk_change = TRUE; 1197 got_lnk_change = TRUE;
1191 lnk_change = QString::null; 1198 lnk_change = QString::null;
1192 } else { 1199 } else {
1193 updateLink( QString::null ); 1200 updateLink( QString::null );
1194 } 1201 }
1195} 1202}
1196 1203
1197 1204
1198bool Launcher::mkdir(const QString &localPath) 1205bool Launcher::mkdir(const QString &localPath)
1199{ 1206{
1200 QDir fullDir(localPath); 1207 QDir fullDir(localPath);
1201 if (fullDir.exists()) 1208 if (fullDir.exists())
1202 return true; 1209 return true;
1203 1210
1204 // at this point the directory doesn't exist 1211 // at this point the directory doesn't exist
1205 // go through the directory tree and start creating the direcotories 1212 // go through the directory tree and start creating the direcotories
1206 // that don't exist; if we can't create the directories, return false 1213 // that don't exist; if we can't create the directories, return false
1207 1214
1208 QString dirSeps = "/"; 1215 QString dirSeps = "/";
1209 int dirIndex = localPath.find(dirSeps); 1216 int dirIndex = localPath.find(dirSeps);
1210 QString checkedPath; 1217 QString checkedPath;
1211 1218
1212 // didn't find any seps; weird, use the cur dir instead 1219 // didn't find any seps; weird, use the cur dir instead
1213 if (dirIndex == -1) { 1220 if (dirIndex == -1) {
1214 //qDebug("No seperators found in path %s", localPath.latin1()); 1221 //qDebug("No seperators found in path %s", localPath.latin1());
1215 checkedPath = QDir::currentDirPath(); 1222 checkedPath = QDir::currentDirPath();
1216 } 1223 }
1217 1224
1218 while (checkedPath != localPath) { 1225 while (checkedPath != localPath) {
1219 // no more seperators found, use the local path 1226 // no more seperators found, use the local path
1220 if (dirIndex == -1) 1227 if (dirIndex == -1)
1221 checkedPath = localPath; 1228 checkedPath = localPath;
1222 else { 1229 else {
1223 // the next directory to check 1230 // the next directory to check
1224 checkedPath = localPath.left(dirIndex) + "/"; 1231 checkedPath = localPath.left(dirIndex) + "/";
1225 // advance the iterator; the next dir seperator 1232 // advance the iterator; the next dir seperator
1226 dirIndex = localPath.find(dirSeps, dirIndex+1); 1233 dirIndex = localPath.find(dirSeps, dirIndex+1);
1227 } 1234 }
1228 1235
1229 QDir checkDir(checkedPath); 1236 QDir checkDir(checkedPath);
1230 if (!checkDir.exists()) { 1237 if (!checkDir.exists()) {
1231 //qDebug("mkdir making dir %s", checkedPath.latin1()); 1238 //qDebug("mkdir making dir %s", checkedPath.latin1());
1232 1239