summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-07-02 12:12:16 (UTC)
committer llornkcor <llornkcor>2002-07-02 12:12:16 (UTC)
commit470eee047583c9bb12c2c9014c7e9c86de71cef9 (patch) (side-by-side diff)
tree31548a1d31946ea33e27935f70ed04f6de99f06e
parent2ffc9e4a46ec40075e6ee55e4583120e6964168d (diff)
downloadopie-470eee047583c9bb12c2c9014c7e9c86de71cef9.zip
opie-470eee047583c9bb12c2c9014c7e9c86de71cef9.tar.gz
opie-470eee047583c9bb12c2c9014c7e9c86de71cef9.tar.bz2
added user message for non existing file
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/lnkproperties.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp
index bd43e21..e8baca6 100644
--- a/library/lnkproperties.cpp
+++ b/library/lnkproperties.cpp
@@ -100,64 +100,66 @@ LnkProperties::LnkProperties( AppLnk* l, QWidget* parent )
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();
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)
}
setCaption( l->file());
}
LnkProperties::~LnkProperties()
{
}
void LnkProperties::unlinkLnk()
{
if ( QPEMessageBox::confirmDelete( this, tr("Delete"), lnk->name() ) ) {
if ( QFile::exists(lnk->file()) )
lnk->removeFiles();
+ else
+ QMessageBox::warning( this, tr("Delete"), tr("File does not exist.") );
if ( QFile::exists(lnk->file()) ) {
QMessageBox::warning( this, tr("Delete"), tr("File deletion failed.") );
} else {
reject();
}
}
}
/*
* remove only the link from documents, not also the file
*/
void LnkProperties::unlinkIcon()
{
if ( QPEMessageBox::confirmDelete( this, tr("Delete Icon and leave file"), lnk->name() ) ) {
lnk->removeLinkFile();
if ( QFile::exists(lnk->linkFile()) ) {
QMessageBox::warning( this, tr("Delete"), tr("Icon deletion failed.") );
} else {
reject();
}
}
}
void LnkProperties::setupLocations()
{
QFileInfo fi( lnk->file() );
fileSize = fi.size();
StorageInfo storage;
const QList<FileSystem> &fs = storage.fileSystems();
QListIterator<FileSystem> it ( fs );
QString s;