-rw-r--r-- | library/lnkproperties.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp index 0b30a9a..745ee2c 100644 --- a/library/lnkproperties.cpp +++ b/library/lnkproperties.cpp @@ -87,65 +87,65 @@ LnkProperties::LnkProperties( AppLnk* l, QWidget* parent ) d->docname->setReadOnly( FALSE ); d->preload->hide(); d->rotate->hide(); d->rotateButtons->hide(); d->labelspacer->hide(); // ### THIS MUST GO, FIX WIERD BUG in QLAYOUT d->categoryEdit->kludge(); d->categoryEdit->setCategories( lnk->categories(), "Document View", tr("Document View") ); setupLocations(); } else { d->unlink->hide(); d->duplicate->hide(); d->beam->hide(); d->hline->hide(); d->locationLabel->hide(); d->locationCombo->hide(); // Can't edit categories, since the app .desktop files are global, // possibly read-only. d->categoryEdit->hide(); d->docname->setReadOnly( TRUE ); if ( l->property("CanFastload") == "0" ) d->preload->hide(); if ( !l->property("Rotation"). isEmpty ()) { d->rotate->setChecked ( true ); - d->rotateButtons->setButton(((QPEApplication::defaultRotation()+l->rotation().toInt())%360)/90); + d->rotateButtons->setButton((l->rotation().toInt()%360)/90); } else { d->rotateButtons->setEnabled(false); } Config cfg("Launcher"); cfg.setGroup("Preload"); QStringList apps = cfg.readListEntry("Apps",','); d->preload->setChecked( apps.contains(l->exec()) ); if ( Global::isBuiltinCommand(lnk->exec()) ) d->preload->hide(); // builtins are always fast currentLocation = 0; // apps not movable (yet) } } LnkProperties::~LnkProperties() { } void LnkProperties::unlinkLnk() { if ( QPEMessageBox::confirmDelete( this, tr("Delete"), lnk->name() ) ) { lnk->removeFiles(); if ( QFile::exists(lnk->file()) ) { QMessageBox::warning( this, tr("Delete"), tr("File deletion failed.") ); } else { reject(); } } } @@ -266,65 +266,65 @@ bool LnkProperties::copyFile( DocLnk &newdoc ) // Copy file FileManager fm; if ( !fm.copyFile( *lnk, newdoc ) ) return FALSE; return TRUE; } void LnkProperties::done(int ok) { if ( ok ) { bool changed=FALSE; if ( lnk->name() != d->docname->text() ) { lnk->setName(d->docname->text()); changed=TRUE; } if ( d->categoryEdit->isVisible() ) { QArray<int> tmp = d->categoryEdit->newCategories(); if ( lnk->categories() != tmp ) { lnk->setCategories( tmp ); changed = TRUE; } } if ( !d->rotate->isHidden()) { QString newrot; if (d->rotate->isChecked()) { int rot=0; for(; rot<4; rot++) { if (d->rotateButtons->find(rot)->isOn()) break; } - newrot = QString::number((QPEApplication::defaultRotation()+rot*90)%360); + newrot = QString::number((rot*90)%360); } if (newrot !=lnk->rotation()) { lnk->setRotation(newrot); changed = TRUE; } } if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) { moveLnk(); } else if ( changed ) { lnk->writeLink(); } if ( !d->preload->isHidden() ) { Config cfg("Launcher"); cfg.setGroup("Preload"); QStringList apps = cfg.readListEntry("Apps",','); QString exe = lnk->exec(); if ( apps.contains(exe) != d->preload->isChecked() ) { if ( d->preload->isChecked() ) { apps.append(exe); #ifndef QT_NO_COP QCopEnvelope e("QPE/Application/"+exe.local8Bit(), "enablePreload()"); #endif } else { apps.remove(exe); #ifndef QT_NO_COP QCopEnvelope e("QPE/Application/"+exe.local8Bit(), "quitIfInvisible()"); #endif } cfg.writeEntry("Apps",apps,','); |