summaryrefslogtreecommitdiff
path: root/library/lnkproperties.cpp
authorsandman <sandman>2002-10-09 23:01:34 (UTC)
committer sandman <sandman>2002-10-09 23:01:34 (UTC)
commitd624bf47913f76c881f28c6498cec4ad3c007a9b (patch) (unidiff)
treef86e449f8f5153580bead802c9c6f73dd76c3a11 /library/lnkproperties.cpp
parentecd41d0df770747bb07de5fa3e920adb164affbe (diff)
downloadopie-d624bf47913f76c881f28c6498cec4ad3c007a9b.zip
opie-d624bf47913f76c881f28c6498cec4ad3c007a9b.tar.gz
opie-d624bf47913f76c881f28c6498cec4ad3c007a9b.tar.bz2
Opening documents via the document tab now starts the corresponding app
with the right rotation setting. Filemanager/AdvanceFM doesn't work -- need to investigate this further.
Diffstat (limited to 'library/lnkproperties.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/lnkproperties.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp
index 745ee2c..0b50bae 100644
--- a/library/lnkproperties.cpp
+++ b/library/lnkproperties.cpp
@@ -32,16 +32,17 @@
32#include <qpe/categorywidget.h> 32#include <qpe/categorywidget.h>
33#ifdef QWS 33#ifdef QWS
34#include <qpe/qcopenvelope_qws.h> 34#include <qpe/qcopenvelope_qws.h>
35#endif 35#endif
36#include <qpe/filemanager.h> 36#include <qpe/filemanager.h>
37#include <qpe/config.h> 37#include <qpe/config.h>
38#include <qpe/storage.h> 38#include <qpe/storage.h>
39#include <qpe/qpemessagebox.h> 39#include <qpe/qpemessagebox.h>
40#include <qpe/mimetype.h>
40 41
41#include <qlineedit.h> 42#include <qlineedit.h>
42#include <qtoolbutton.h> 43#include <qtoolbutton.h>
43#include <qpushbutton.h> 44#include <qpushbutton.h>
44#include <qgroupbox.h> 45#include <qgroupbox.h>
45#include <qcheckbox.h> 46#include <qcheckbox.h>
46#include <qlabel.h> 47#include <qlabel.h>
47#include <qlayout.h> 48#include <qlayout.h>
@@ -270,16 +271,18 @@ bool LnkProperties::copyFile( DocLnk &newdoc )
270 return FALSE; 271 return FALSE;
271 return TRUE; 272 return TRUE;
272} 273}
273 274
274void LnkProperties::done(int ok) 275void LnkProperties::done(int ok)
275{ 276{
276 if ( ok ) { 277 if ( ok ) {
277 bool changed=FALSE; 278 bool changed=FALSE;
279 bool reloadMime=FALSE;
280
278 if ( lnk->name() != d->docname->text() ) { 281 if ( lnk->name() != d->docname->text() ) {
279 lnk->setName(d->docname->text()); 282 lnk->setName(d->docname->text());
280 changed=TRUE; 283 changed=TRUE;
281 } 284 }
282 if ( d->categoryEdit->isVisible() ) { 285 if ( d->categoryEdit->isVisible() ) {
283 QArray<int> tmp = d->categoryEdit->newCategories(); 286 QArray<int> tmp = d->categoryEdit->newCategories();
284 if ( lnk->categories() != tmp ) { 287 if ( lnk->categories() != tmp ) {
285 lnk->setCategories( tmp ); 288 lnk->setCategories( tmp );
@@ -295,16 +298,17 @@ void LnkProperties::done(int ok)
295 if (d->rotateButtons->find(rot)->isOn()) 298 if (d->rotateButtons->find(rot)->isOn())
296 break; 299 break;
297 } 300 }
298 newrot = QString::number((rot*90)%360); 301 newrot = QString::number((rot*90)%360);
299 } 302 }
300 if ( newrot != lnk->rotation() ) { 303 if ( newrot != lnk->rotation() ) {
301 lnk-> setRotation(newrot); 304 lnk-> setRotation(newrot);
302 changed = TRUE; 305 changed = TRUE;
306 reloadMime = TRUE;
303 } 307 }
304 } 308 }
305 if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) { 309 if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) {
306 moveLnk(); 310 moveLnk();
307 } else if ( changed ) { 311 } else if ( changed ) {
308 lnk->writeLink(); 312 lnk->writeLink();
309 } 313 }
310 314
@@ -325,12 +329,14 @@ void LnkProperties::done(int ok)
325#ifndef QT_NO_COP 329#ifndef QT_NO_COP
326 QCopEnvelope e("QPE/Application/"+exe.local8Bit(), 330 QCopEnvelope e("QPE/Application/"+exe.local8Bit(),
327 "quitIfInvisible()"); 331 "quitIfInvisible()");
328#endif 332#endif
329 } 333 }
330 cfg.writeEntry("Apps",apps,','); 334 cfg.writeEntry("Apps",apps,',');
331 } 335 }
332 } 336 }
337 if ( reloadMime )
338 MimeType::updateApplications ( );
333 } 339 }
334 QDialog::done( ok ); 340 QDialog::done( ok );
335} 341}
336 342