author | sandman <sandman> | 2002-10-08 18:54:17 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-08 18:54:17 (UTC) |
commit | de9496b2e6e2784dc4cc83dd5800f89f0954affc (patch) (unidiff) | |
tree | 4e90fd6992bcc3389f686e32d83f58ab33eccdf8 | |
parent | a2b0a1fd69182b814b9b553868163003277e6579 (diff) | |
download | opie-de9496b2e6e2784dc4cc83dd5800f89f0954affc.zip opie-de9496b2e6e2784dc4cc83dd5800f89f0954affc.tar.gz opie-de9496b2e6e2784dc4cc83dd5800f89f0954affc.tar.bz2 |
Fixed the rotation setting -- launcher adds the curent rotation when the
applnk is started - so the .desktop file only needs the relative rotation.
-rw-r--r-- | library/lnkproperties.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp index 0b30a9a..745ee2c 100644 --- a/library/lnkproperties.cpp +++ b/library/lnkproperties.cpp | |||
@@ -103,33 +103,33 @@ LnkProperties::LnkProperties( AppLnk* l, QWidget* parent ) | |||
103 | d->duplicate->hide(); | 103 | d->duplicate->hide(); |
104 | d->beam->hide(); | 104 | d->beam->hide(); |
105 | d->hline->hide(); | 105 | d->hline->hide(); |
106 | d->locationLabel->hide(); | 106 | d->locationLabel->hide(); |
107 | d->locationCombo->hide(); | 107 | d->locationCombo->hide(); |
108 | 108 | ||
109 | // Can't edit categories, since the app .desktop files are global, | 109 | // Can't edit categories, since the app .desktop files are global, |
110 | // possibly read-only. | 110 | // possibly read-only. |
111 | d->categoryEdit->hide(); | 111 | d->categoryEdit->hide(); |
112 | 112 | ||
113 | d->docname->setReadOnly( TRUE ); | 113 | d->docname->setReadOnly( TRUE ); |
114 | 114 | ||
115 | if ( l->property("CanFastload") == "0" ) | 115 | if ( l->property("CanFastload") == "0" ) |
116 | d->preload->hide(); | 116 | d->preload->hide(); |
117 | if ( !l->property("Rotation"). isEmpty ()) { | 117 | if ( !l->property("Rotation"). isEmpty ()) { |
118 | d->rotate->setChecked ( true ); | 118 | d->rotate->setChecked ( true ); |
119 | d->rotateButtons->setButton(((QPEApplication::defaultRotation()+l->rotation().toInt())%360)/90); | 119 | d->rotateButtons->setButton((l->rotation().toInt()%360)/90); |
120 | } | 120 | } |
121 | else { | 121 | else { |
122 | d->rotateButtons->setEnabled(false); | 122 | d->rotateButtons->setEnabled(false); |
123 | } | 123 | } |
124 | 124 | ||
125 | Config cfg("Launcher"); | 125 | Config cfg("Launcher"); |
126 | cfg.setGroup("Preload"); | 126 | cfg.setGroup("Preload"); |
127 | QStringList apps = cfg.readListEntry("Apps",','); | 127 | QStringList apps = cfg.readListEntry("Apps",','); |
128 | d->preload->setChecked( apps.contains(l->exec()) ); | 128 | d->preload->setChecked( apps.contains(l->exec()) ); |
129 | if ( Global::isBuiltinCommand(lnk->exec()) ) | 129 | if ( Global::isBuiltinCommand(lnk->exec()) ) |
130 | d->preload->hide(); // builtins are always fast | 130 | d->preload->hide(); // builtins are always fast |
131 | 131 | ||
132 | currentLocation = 0; // apps not movable (yet) | 132 | currentLocation = 0; // apps not movable (yet) |
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
@@ -276,42 +276,42 @@ void LnkProperties::done(int ok) | |||
276 | if ( ok ) { | 276 | if ( ok ) { |
277 | bool changed=FALSE; | 277 | bool changed=FALSE; |
278 | if ( lnk->name() != d->docname->text() ) { | 278 | if ( lnk->name() != d->docname->text() ) { |
279 | lnk->setName(d->docname->text()); | 279 | lnk->setName(d->docname->text()); |
280 | changed=TRUE; | 280 | changed=TRUE; |
281 | } | 281 | } |
282 | if ( d->categoryEdit->isVisible() ) { | 282 | if ( d->categoryEdit->isVisible() ) { |
283 | QArray<int> tmp = d->categoryEdit->newCategories(); | 283 | QArray<int> tmp = d->categoryEdit->newCategories(); |
284 | if ( lnk->categories() != tmp ) { | 284 | if ( lnk->categories() != tmp ) { |
285 | lnk->setCategories( tmp ); | 285 | lnk->setCategories( tmp ); |
286 | changed = TRUE; | 286 | changed = TRUE; |
287 | } | 287 | } |
288 | } | 288 | } |
289 | if ( !d->rotate->isHidden()) { | 289 | if ( !d->rotate->isHidden()) { |
290 | QString newrot; | 290 | QString newrot; |
291 | 291 | ||
292 | if (d->rotate->isChecked()) { | 292 | if ( d->rotate->isChecked() ) { |
293 | int rot=0; | 293 | int rot=0; |
294 | for(; rot<4; rot++) { | 294 | for(; rot<4; rot++) { |
295 | if (d->rotateButtons->find(rot)->isOn()) | 295 | if (d->rotateButtons->find(rot)->isOn()) |
296 | break; | 296 | break; |
297 | } | 297 | } |
298 | newrot = QString::number((QPEApplication::defaultRotation()+rot*90)%360); | 298 | newrot = QString::number((rot*90)%360); |
299 | } | 299 | } |
300 | if (newrot !=lnk->rotation()) { | 300 | if ( newrot != lnk->rotation() ) { |
301 | lnk->setRotation(newrot); | 301 | lnk-> setRotation(newrot); |
302 | changed = TRUE; | 302 | changed = TRUE; |
303 | } | 303 | } |
304 | } | 304 | } |
305 | if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) { | 305 | if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) { |
306 | moveLnk(); | 306 | moveLnk(); |
307 | } else if ( changed ) { | 307 | } else if ( changed ) { |
308 | lnk->writeLink(); | 308 | lnk->writeLink(); |
309 | } | 309 | } |
310 | 310 | ||
311 | if ( !d->preload->isHidden() ) { | 311 | if ( !d->preload->isHidden() ) { |
312 | Config cfg("Launcher"); | 312 | Config cfg("Launcher"); |
313 | cfg.setGroup("Preload"); | 313 | cfg.setGroup("Preload"); |
314 | QStringList apps = cfg.readListEntry("Apps",','); | 314 | QStringList apps = cfg.readListEntry("Apps",','); |
315 | QString exe = lnk->exec(); | 315 | QString exe = lnk->exec(); |
316 | if ( apps.contains(exe) != d->preload->isChecked() ) { | 316 | if ( apps.contains(exe) != d->preload->isChecked() ) { |
317 | if ( d->preload->isChecked() ) { | 317 | if ( d->preload->isChecked() ) { |