summaryrefslogtreecommitdiff
path: root/library/lnkproperties.cpp
authormickeyl <mickeyl>2004-02-24 14:29:33 (UTC)
committer mickeyl <mickeyl>2004-02-24 14:29:33 (UTC)
commitb044a19bc3ea1983989c81e2743a3590fab85bae (patch) (side-by-side diff)
tree739825bedb3c86009457aac15a0a87f2c699d391 /library/lnkproperties.cpp
parent5548f96b149e8416dd65661f9cc85ba8e434e0e5 (diff)
downloadopie-b044a19bc3ea1983989c81e2743a3590fab85bae.zip
opie-b044a19bc3ea1983989c81e2743a3590fab85bae.tar.gz
opie-b044a19bc3ea1983989c81e2743a3590fab85bae.tar.bz2
add missing patch from v1_0_3 disabling fixed custom rotation in favour of live rotation
Diffstat (limited to 'library/lnkproperties.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/lnkproperties.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp
index 50cf5af..8dca4ab 100644
--- a/library/lnkproperties.cpp
+++ b/library/lnkproperties.cpp
@@ -60,12 +60,17 @@ LnkProperties::LnkProperties( AppLnk* l, QWidget* parent )
setCaption( tr("Properties") );
QVBoxLayout *vbox = new QVBoxLayout( this );
d = new LnkPropertiesBase( this );
vbox->add( d );
+ // hide custom rotation feature for now, need a new implementation to fit quicklauch,
+ // is confusing for the user and doubtable useful since life rotation
+ d->rotate->hide();
+ d->rotateButtons->hide();
+
d->docname->setText(l->name());
QString inf;
if ( l->type().isEmpty() ) {
d->type->hide();
d->typeLabel->hide();
} else {
@@ -112,13 +117,14 @@ LnkProperties::LnkProperties( AppLnk* l, QWidget* parent )
d->docname->setReadOnly( TRUE );
if ( l->property("CanFastload") == "0" )
d->preload->hide();
if ( !l->property("Rotation"). isEmpty ()) {
d->rotate->setChecked ( true );
- d->rotateButtons->setButton((l->rotation().toInt()%360)/90);
+ //don't use rotate buttons for now (see comment above)
+ //d->rotateButtons->setButton((l->rotation().toInt()%360)/90);
}
else {
d->rotateButtons->setEnabled(false);
}
Config cfg("Launcher");
@@ -165,16 +171,17 @@ void LnkProperties::setupLocations()
// we add 10k to the file size so we are sure we can also save the desktop file
if ( (ulong)(*it)->availBlocks() * (ulong)(*it)->blockSize() > (ulong)fileSize + 10000 ) {
if ( (*it)->isRemovable() ||
(*it)->disk() == "/dev/mtdblock1" ||
(*it)->disk() == "/dev/mtdblock/1" ||
(*it)->disk().left(13) == "/dev/mtdblock" ||
- (*it)->disk() == "/dev/mtdblock6" ||
+ (*it)->disk() == "/dev/mtdblock6" ||
+ (*it )->disk() == "/dev/root" ||
(*it)->disk() == "tmpfs" ) {
d->locationCombo->insertItem( (*it)->name(), index );
- locations.append( ( ((*it)->isRemovable() ||
+ locations.append( ( ((*it)->isRemovable() ||
(*it)->disk() == "/dev/mtdblock6" ||
(*it)->disk() == "tmpfs" )
? (*it)->path() : homeDir) );
if ( lnk->file().contains( (*it)->path() ) ) {
d->locationCombo->setCurrentItem( index );
currentLocation = index;
@@ -272,13 +279,13 @@ bool LnkProperties::copyFile( DocLnk &newdoc )
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();
@@ -286,13 +293,13 @@ void LnkProperties::done(int ok)
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;
}
@@ -306,13 +313,13 @@ void LnkProperties::done(int ok)
}
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() ) {