summaryrefslogtreecommitdiff
path: root/core/launcher/launcher.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/launcher.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 010a2e9..5ec1cf8 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -336,54 +336,54 @@ void LauncherTabWidget::setProgressStyle()
docLoadingWidgetProgress->setFrameShape( QProgressBar::Box );
docLoadingWidgetProgress->setFrameShadow( QProgressBar::Plain );
docLoadingWidgetProgress->setMargin( 1 );
docLoadingWidgetProgress->setLineWidth( 1 );
}
}
/*
* FIXME
* The following NULL check is triggered by inserting, then removing a tab on the fly
* as you would if you had removable media (which I do). Without this check
* the first app launched after a tab removal causes qpe to Segfault.
* This obviously has a more sinister cause, but this works around it with no
* obvious adverse effects. Please FIXME
* bkc - 17/6/2004
*
*/
void LauncherTabWidget::setBusy(bool on)
{
if ( on )
currentView()->setBusy(TRUE);
else {
for ( int i = 0; i < categoryBar->count(); i++ ) {
- if (categoryBar->tab(i)) {
- LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view;
- view->setBusy( FALSE );
- } else {
- odebug << "Averting Disaster with tab " << i << " == NULL! " << oendl;
- }
+ if (categoryBar->tab(i)) {
+ LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view;
+ view->setBusy( FALSE );
+ } else {
+ odebug << "Averting Disaster with tab " << i << " == NULL! " << oendl;
+ }
}
}
}
void LauncherTabWidget::setBusyIndicatorType( const QString& str ) {
for (int i = 0; i < categoryBar->count(); i++ ) {
LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view;
view->setBusyIndicatorType( str );
}
}
LauncherView *LauncherTabWidget::currentView(void)
{
return (LauncherView*)stack->visibleWidget();
}
void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &data)
{
QDataStream stream( data, IO_ReadOnly );
if ( msg == "setTabView(QString,int)" ) {
QString id;
stream >> id;
@@ -580,51 +580,53 @@ void Launcher::select( const AppLnk *appLnk )
} else {
if ( appLnk->exec().isNull() ) {
int i = QMessageBox::information(this,tr("No application"),
tr("<p>No application is defined for this document."
"<p>Type is %1.").arg(appLnk->type()), tr("OK"), tr("View as text"), 0, 0, 1);
/* ### Fixme */
if ( i == 1 )
Global::execute("textedit",appLnk->file());
return;
}
tabs->setBusy(TRUE);
emit executing( appLnk );
appLnk->execute();
}
}
void Launcher::properties( AppLnk *appLnk )
{
if ( appLnk->type() == "Folder" ) { // No tr
// Not supported: flat is simpler for the user
} else {
/* ### libqtopia FIXME also moving docLnks... */
- LnkProperties prop(appLnk,0 );
+ LnkProperties prop(appLnk,0 );
- QPEApplication::execDialog( &prop );
+ if (QPEApplication::execDialog( &prop )==QDialog::Accepted && tabs->currentView()==tabs->docView()) {
+ tabs->docView()->updateTools();
+ }
}
}
void Launcher::storageChanged( const QList<FileSystem> & )
{
// ### update combo boxes if we had a combo box for the storage type
}
void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
{
QDataStream stream( data, IO_ReadOnly );
if ( msg == "busy()" ) {
tb->startWait();
} else if ( msg == "notBusy(QString)" ) {
QString app;
stream >> app;
tabs->setBusy(FALSE);
tb->stopWait(app);
} else if (msg == "applyStyle()") {
tabs->currentView()->relayout();
}
}
// These are the update functions from the server