summaryrefslogtreecommitdiff
path: root/library/lnkproperties.cpp
authormickeyl <mickeyl>2004-03-08 17:00:43 (UTC)
committer mickeyl <mickeyl>2004-03-08 17:00:43 (UTC)
commit5c0d3f0db722ad2b81bdab1a2a06d45c198ed975 (patch) (side-by-side diff)
tree327faa51dd84d8d032c83157b841efc34d847f56 /library/lnkproperties.cpp
parentbad368ebceecc3dd976e8eb206c773b5df6d11ef (diff)
downloadopie-5c0d3f0db722ad2b81bdab1a2a06d45c198ed975.zip
opie-5c0d3f0db722ad2b81bdab1a2a06d45c198ed975.tar.gz
opie-5c0d3f0db722ad2b81bdab1a2a06d45c198ed975.tar.bz2
save UI changes to argument list back to .desktop file ;)
Diffstat (limited to 'library/lnkproperties.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/lnkproperties.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp
index 865f590..f0f0bba 100644
--- a/library/lnkproperties.cpp
+++ b/library/lnkproperties.cpp
@@ -268,82 +268,86 @@ bool LnkProperties::copyFile( DocLnk &newdoc )
nn = fn + "_" + QString::number(n);
}
fn = nn;
}
newdoc.setFile( fn + fileExtn );
newdoc.setLinkFile( fn + linkExtn );
// Copy file
FileManager fm;
if ( !fm.copyFile( *lnk, newdoc ) )
return FALSE;
return TRUE;
}
void LnkProperties::done(int ok)
{
if ( ok ) {
bool changed=FALSE;
bool reloadMime=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((rot*90)%360);
}
if ( newrot != lnk->rotation() ) {
lnk-> setRotation(newrot);
changed = TRUE;
reloadMime = TRUE;
}
}
+ if ( d->arguments->text() != lnk->property( "Arguments" ) ) {
+ lnk->setProperty( "Arguments", d->arguments->text() );
+ 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,',');
}
}
if ( reloadMime )
MimeType::updateApplications ( );
}
QDialog::done( ok );
}