summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp2
-rw-r--r--core/launcher/server.cpp26
-rw-r--r--core/launcher/serverapp.cpp4
3 files changed, 6 insertions, 26 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 0d0f2cb..cd9c14b 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -432,32 +432,34 @@ void LauncherItem::paintAnimatedIcon( QPainter *p )
432 x1 = x() - liv->contentsX(); 432 x1 = x() - liv->contentsX();
433 y1 = y() + (height() - h) / 2 - liv->contentsY(); 433 y1 = y() + (height() - h) / 2 - liv->contentsY();
434 } 434 }
435 y1 -= 2; 435 y1 -= 2;
436 p2.translate(-x1,-y1); 436 p2.translate(-x1,-y1);
437 liv->drawBackground( &p2, QRect(x1,y1,w,h+4) ); 437 liv->drawBackground( &p2, QRect(x1,y1,w,h+4) );
438 int bounceY = 2; 438 int bounceY = 2;
439#ifdef BOUNCE_BUSY_ICON 439#ifdef BOUNCE_BUSY_ICON
440 if ( busyType == BIT_Animated ) { 440 if ( busyType == BIT_Animated ) {
441 bounceY = 4 - ((iteration+2)%8); 441 bounceY = 4 - ((iteration+2)%8);
442 bounceY = bounceY < 0 ? -bounceY : bounceY; 442 bounceY = bounceY < 0 ? -bounceY : bounceY;
443 } 443 }
444#endif 444#endif
445 p2.drawPixmap( x1, y1 + bounceY, *pixmap() ); 445 p2.drawPixmap( x1, y1 + bounceY, *pixmap() );
446#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 446#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
447 p2.drawPixmap( x1, y1 + bounceY, liv->busyPixmap(), w * pic, 0, w, h ); 447 p2.drawPixmap( x1, y1 + bounceY, liv->busyPixmap(), w * pic, 0, w, h );
448#else
449 Q_UNUSED( pic )
448#endif 450#endif
449 p->drawPixmap( x1, y1, dblBuf ); 451 p->drawPixmap( x1, y1, dblBuf );
450} 452}
451 453
452void LauncherItem::animateIcon() 454void LauncherItem::animateIcon()
453{ 455{
454 LauncherIconView* liv = (LauncherIconView*)iconView(); 456 LauncherIconView* liv = (LauncherIconView*)iconView();
455 457
456 if ( liv->busyItem() != this || !app ) 458 if ( liv->busyItem() != this || !app )
457 return; 459 return;
458 460
459 // Highlight the icon 461 // Highlight the icon
460 if ( iteration == 0 ) { 462 if ( iteration == 0 ) {
461 QPixmap src = isBigIcon ? app->bigPixmap() : app->pixmap(); 463 QPixmap src = isBigIcon ? app->bigPixmap() : app->pixmap();
462 QImage img = src.convertToImage(); 464 QImage img = src.convertToImage();
463 QRgb *rgb; 465 QRgb *rgb;
diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp
index 950032d..5ae517b 100644
--- a/core/launcher/server.cpp
+++ b/core/launcher/server.cpp
@@ -183,56 +183,32 @@ void Server::show()
183 ServerApplication::login(TRUE); 183 ServerApplication::login(TRUE);
184 QWidget::show(); 184 QWidget::show();
185} 185}
186 186
187Server::~Server() 187Server::~Server()
188{ 188{
189 serverGui->destroyGUI(); 189 serverGui->destroyGUI();
190 delete docList; 190 delete docList;
191 delete qcopBridge; 191 delete qcopBridge;
192 delete transferServer; 192 delete transferServer;
193 delete serverGui; 193 delete serverGui;
194#if 0 194#if 0
195 delete tsmMonitor; 195 delete tsmMonitor;
196#endif 196#endif
197} 197}
198 198
199static bool hasVisibleWindow(const QString& clientname, bool partial)
200{
201#ifdef QWS
202 const QList<QWSWindow> &list = qwsServer->clientWindows();
203 QWSWindow* w;
204 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) {
205 if ( w->client()->identity() == clientname ) {
206 if ( partial && !w->isFullyObscured() )
207 return TRUE;
208 if ( !partial && !w->isFullyObscured() && !w->isPartiallyObscured() ) {
209# if QT_VERSION < 0x030000
210 QRect mwr = qt_screen->mapToDevice(qt_maxWindowRect,
211 QSize(qt_screen->width(),qt_screen->height()) );
212# else
213 QRect mwr = qt_maxWindowRect;
214# endif
215 if ( mwr.contains(w->requested().boundingRect()) )
216 return TRUE;
217 }
218 }
219 }
220#endif
221 return FALSE;
222}
223 199
224void Server::activate(const ODeviceButton* button, bool held) 200void Server::activate(const ODeviceButton* button, bool held)
225{ 201{
226 Global::terminateBuiltin("calibrate"); // No tr 202 Global::terminateBuiltin("calibrate"); // No tr
227 OQCopMessage om; 203 OQCopMessage om;
228 if ( held ) { 204 if ( held ) {
229 om = button->heldAction(); 205 om = button->heldAction();
230 } else { 206 } else {
231 om = button->pressedAction(); 207 om = button->pressedAction();
232 } 208 }
233 209
234 if ( om.channel() != "ignore" ) 210 if ( om.channel() != "ignore" )
235 om.send(); 211 om.send();
236 212
237 // A button with no action defined, will return a null ServiceRequest. Don't attempt 213 // A button with no action defined, will return a null ServiceRequest. Don't attempt
238 // to send/do anything with this as it will crash 214 // to send/do anything with this as it will crash
@@ -685,32 +661,34 @@ void Server::pokeTimeMonitors()
685 QCopEnvelope e(ch, "timeChange(QString)"); 661 QCopEnvelope e(ch, "timeChange(QString)");
686 e << t; 662 e << t;
687 } 663 }
688#endif 664#endif
689} 665}
690 666
691void Server::applicationLaunched(int, const QString &app) 667void Server::applicationLaunched(int, const QString &app)
692{ 668{
693 serverGui->applicationStateChanged( app, ServerInterface::Launching ); 669 serverGui->applicationStateChanged( app, ServerInterface::Launching );
694} 670}
695 671
696void Server::applicationTerminated(int pid, const QString &app) 672void Server::applicationTerminated(int pid, const QString &app)
697{ 673{
698 serverGui->applicationStateChanged( app, ServerInterface::Terminated ); 674 serverGui->applicationStateChanged( app, ServerInterface::Terminated );
699#if 0 675#if 0
700 tsmMonitor->applicationTerminated( pid ); 676 tsmMonitor->applicationTerminated( pid );
677#else
678 Q_UNUSED( pid )
701#endif 679#endif
702} 680}
703 681
704void Server::applicationConnected(const QString &app) 682void Server::applicationConnected(const QString &app)
705{ 683{
706 serverGui->applicationStateChanged( app, ServerInterface::Running ); 684 serverGui->applicationStateChanged( app, ServerInterface::Running );
707} 685}
708 686
709void Server::storageChanged() 687void Server::storageChanged()
710{ 688{
711 system( "opie-update-symlinks" ); 689 system( "opie-update-symlinks" );
712 serverGui->storageChanged( storage->fileSystems() ); 690 serverGui->storageChanged( storage->fileSystems() );
713 docList->storageChanged(); 691 docList->storageChanged();
714} 692}
715 693
716 694
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp
index a2302d8..66cc788 100644
--- a/core/launcher/serverapp.cpp
+++ b/core/launcher/serverapp.cpp
@@ -344,34 +344,34 @@ ServerApplication::ServerApplication( int& argc, char **argv, Type t )
344 connect( kf, SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)), 344 connect( kf, SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)),
345 this,SIGNAL(activate(const Opie::Core::ODeviceButton*,bool))); 345 this,SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)));
346 346
347 347
348 connect( kf, SIGNAL(backlight()), this, SLOT(toggleLight()) ); 348 connect( kf, SIGNAL(backlight()), this, SLOT(toggleLight()) );
349 349
350 connect( this, SIGNAL(power() ), 350 connect( this, SIGNAL(power() ),
351 SLOT(togglePower() ) ); 351 SLOT(togglePower() ) );
352 352
353 rereadVolumes(); 353 rereadVolumes();
354 354
355 serverApp = this; 355 serverApp = this;
356 356
357 apmTimeout(); 357 apmTimeout();
358 grabKeyboard(); 358 grabKeyboard();
359 359
360 /* make sure the event filter is installed */ 360 /* make sure the event filter is installed */ /* std::limits<short>::max() when you've stdc++ */
361 const ODeviceButton* but = ODevice::inst()->buttonForKeycode( -1 ); 361 const ODeviceButton* but = ODevice::inst()->buttonForKeycode( SHRT_MAX );
362 Q_CONST_UNUSED( but ) 362 Q_CONST_UNUSED( but )
363} 363}
364 364
365 365
366ServerApplication::~ServerApplication() 366ServerApplication::~ServerApplication()
367{ 367{
368 ungrabKeyboard(); 368 ungrabKeyboard();
369 369
370 delete pa; 370 delete pa;
371 delete m_ps; 371 delete m_ps;
372 delete m_ps_last; 372 delete m_ps_last;
373} 373}
374 374
375void ServerApplication::apmTimeout() 375void ServerApplication::apmTimeout()
376{ 376{
377 serverApp-> checkMemory( ); // in case no events are generated 377 serverApp-> checkMemory( ); // in case no events are generated