-rw-r--r-- | core/applets/batteryapplet/battery.cpp | 2 | ||||
-rw-r--r-- | core/launcher/launcher.cpp | 3 | ||||
-rw-r--r-- | core/launcher/serverapp.cpp | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/videowidget.cpp | 2 | ||||
-rw-r--r-- | core/obex/obexhandler.cpp | 3 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 2 | ||||
-rw-r--r-- | core/pim/today/todayconfig.cpp | 3 | ||||
-rw-r--r-- | core/settings/button/buttonsettings.cpp | 3 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 4 | ||||
-rw-r--r-- | core/settings/light-and-power/light.cpp | 3 | ||||
-rw-r--r-- | core/settings/security/security.cpp | 2 |
13 files changed, 16 insertions, 17 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index 4adcab4..3b64fb5 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp | |||
@@ -55,49 +55,49 @@ BatteryMeter::~BatteryMeter() | |||
55 | QSize BatteryMeter::sizeHint() const | 55 | QSize BatteryMeter::sizeHint() const |
56 | { | 56 | { |
57 | return QSize(QMAX(AppLnk::smallIconSize()*3/4, 6), height() ); | 57 | return QSize(QMAX(AppLnk::smallIconSize()*3/4, 6), height() ); |
58 | } | 58 | } |
59 | 59 | ||
60 | void BatteryMeter::mousePressEvent( QMouseEvent* e ) | 60 | void BatteryMeter::mousePressEvent( QMouseEvent* e ) |
61 | { | 61 | { |
62 | if ( e->button() == RightButton ) | 62 | if ( e->button() == RightButton ) |
63 | { | 63 | { |
64 | style = 1-style; | 64 | style = 1-style; |
65 | Config c( "qpe" ); | 65 | Config c( "qpe" ); |
66 | c.setGroup( "Battery" ); | 66 | c.setGroup( "Battery" ); |
67 | c.writeEntry( "Style", style ); | 67 | c.writeEntry( "Style", style ); |
68 | repaint( true ); | 68 | repaint( true ); |
69 | } | 69 | } |
70 | QWidget::mousePressEvent( e ); | 70 | QWidget::mousePressEvent( e ); |
71 | } | 71 | } |
72 | 72 | ||
73 | void BatteryMeter::mouseReleaseEvent( QMouseEvent* e) | 73 | void BatteryMeter::mouseReleaseEvent( QMouseEvent* e) |
74 | { | 74 | { |
75 | if ( batteryView && batteryView->isVisible() ) { | 75 | if ( batteryView && batteryView->isVisible() ) { |
76 | delete (QWidget *) batteryView; | 76 | delete (QWidget *) batteryView; |
77 | } else { | 77 | } else { |
78 | if ( !batteryView ) batteryView = new BatteryStatus( ps ); | 78 | if ( !batteryView ) batteryView = new BatteryStatus( ps ); |
79 | batteryView->showMaximized(); | 79 | QPEApplication::showWidget( batteryView ); |
80 | batteryView->raise(); | 80 | batteryView->raise(); |
81 | batteryView->show(); | 81 | batteryView->show(); |
82 | } | 82 | } |
83 | } | 83 | } |
84 | 84 | ||
85 | void BatteryMeter::timerEvent( QTimerEvent * ) | 85 | void BatteryMeter::timerEvent( QTimerEvent * ) |
86 | { | 86 | { |
87 | PowerStatus prev = *ps; | 87 | PowerStatus prev = *ps; |
88 | 88 | ||
89 | *ps = PowerStatusManager::readStatus(); | 89 | *ps = PowerStatusManager::readStatus(); |
90 | 90 | ||
91 | if ( prev != *ps ) { | 91 | if ( prev != *ps ) { |
92 | percent = ps->batteryPercentRemaining(); | 92 | percent = ps->batteryPercentRemaining(); |
93 | if ( !charging && ps->batteryStatus() == PowerStatus::Charging ) { | 93 | if ( !charging && ps->batteryStatus() == PowerStatus::Charging ) { |
94 | percent = 0; | 94 | percent = 0; |
95 | charging = true; | 95 | charging = true; |
96 | chargeTimer->start( 500 ); | 96 | chargeTimer->start( 500 ); |
97 | } else if ( charging && ps->batteryStatus() != PowerStatus::Charging ) { | 97 | } else if ( charging && ps->batteryStatus() != PowerStatus::Charging ) { |
98 | charging = false; | 98 | charging = false; |
99 | chargeTimer->stop(); | 99 | chargeTimer->stop(); |
100 | if ( batteryView ) | 100 | if ( batteryView ) |
101 | batteryView->updatePercent( percent ); | 101 | batteryView->updatePercent( percent ); |
102 | } | 102 | } |
103 | repaint( style != 0 ); | 103 | repaint( style != 0 ); |
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index bdddd37..98e7481 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -592,50 +592,49 @@ void Launcher::select( const AppLnk *appLnk ) | |||
592 | int i = QMessageBox::information(this,tr("No application"), | 592 | int i = QMessageBox::information(this,tr("No application"), |
593 | tr("<p>No application is defined for this document." | 593 | tr("<p>No application is defined for this document." |
594 | "<p>Type is %1.").arg(appLnk->type()), tr("OK"), tr("View as text"), 0, 0, 1); | 594 | "<p>Type is %1.").arg(appLnk->type()), tr("OK"), tr("View as text"), 0, 0, 1); |
595 | 595 | ||
596 | /* ### Fixme */ | 596 | /* ### Fixme */ |
597 | if ( i == 1 ) | 597 | if ( i == 1 ) |
598 | Global::execute("textedit",appLnk->file()); | 598 | Global::execute("textedit",appLnk->file()); |
599 | 599 | ||
600 | return; | 600 | return; |
601 | } | 601 | } |
602 | tabs->setBusy(TRUE); | 602 | tabs->setBusy(TRUE); |
603 | emit executing( appLnk ); | 603 | emit executing( appLnk ); |
604 | appLnk->execute(); | 604 | appLnk->execute(); |
605 | } | 605 | } |
606 | } | 606 | } |
607 | 607 | ||
608 | void Launcher::properties( AppLnk *appLnk ) | 608 | void Launcher::properties( AppLnk *appLnk ) |
609 | { | 609 | { |
610 | if ( appLnk->type() == "Folder" ) { // No tr | 610 | if ( appLnk->type() == "Folder" ) { // No tr |
611 | // Not supported: flat is simpler for the user | 611 | // Not supported: flat is simpler for the user |
612 | } else { | 612 | } else { |
613 | /* ### libqtopia FIXME also moving docLnks... */ | 613 | /* ### libqtopia FIXME also moving docLnks... */ |
614 | LnkProperties prop(appLnk,0 ); | 614 | LnkProperties prop(appLnk,0 ); |
615 | 615 | ||
616 | prop.showMaximized(); | 616 | QPEApplication::execDialog( &prop ); |
617 | prop.exec(); | ||
618 | } | 617 | } |
619 | } | 618 | } |
620 | 619 | ||
621 | void Launcher::storageChanged( const QList<FileSystem> &fs ) | 620 | void Launcher::storageChanged( const QList<FileSystem> &fs ) |
622 | { | 621 | { |
623 | // ### update combo boxes if we had a combo box for the storage type | 622 | // ### update combo boxes if we had a combo box for the storage type |
624 | } | 623 | } |
625 | 624 | ||
626 | void Launcher::systemMessage( const QCString &msg, const QByteArray &data) | 625 | void Launcher::systemMessage( const QCString &msg, const QByteArray &data) |
627 | { | 626 | { |
628 | QDataStream stream( data, IO_ReadOnly ); | 627 | QDataStream stream( data, IO_ReadOnly ); |
629 | if ( msg == "busy()" ) { | 628 | if ( msg == "busy()" ) { |
630 | tb->startWait(); | 629 | tb->startWait(); |
631 | } else if ( msg == "notBusy(QString)" ) { | 630 | } else if ( msg == "notBusy(QString)" ) { |
632 | QString app; | 631 | QString app; |
633 | stream >> app; | 632 | stream >> app; |
634 | tabs->setBusy(FALSE); | 633 | tabs->setBusy(FALSE); |
635 | tb->stopWait(app); | 634 | tb->stopWait(app); |
636 | } else if (msg == "applyStyle()") { | 635 | } else if (msg == "applyStyle()") { |
637 | tabs->currentView()->relayout(); | 636 | tabs->currentView()->relayout(); |
638 | } | 637 | } |
639 | } | 638 | } |
640 | 639 | ||
641 | // These are the update functions from the server | 640 | // These are the update functions from the server |
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp index e8d49fd..e18bcee 100644 --- a/core/launcher/serverapp.cpp +++ b/core/launcher/serverapp.cpp | |||
@@ -681,49 +681,49 @@ void ServerApplication::showSafeMode() | |||
681 | } | 681 | } |
682 | 682 | ||
683 | void ServerApplication::clearSafeMode() | 683 | void ServerApplication::clearSafeMode() |
684 | { | 684 | { |
685 | #if 0 | 685 | #if 0 |
686 | // If we've been running OK for a while then we won't bother going into | 686 | // If we've been running OK for a while then we won't bother going into |
687 | // safe mode immediately on the next crash. | 687 | // safe mode immediately on the next crash. |
688 | Config cfg( "PluginLoader" ); | 688 | Config cfg( "PluginLoader" ); |
689 | cfg.setGroup( "Global" ); | 689 | cfg.setGroup( "Global" ); |
690 | QString mode = cfg.readEntry( "Mode", "Normal" ); | 690 | QString mode = cfg.readEntry( "Mode", "Normal" ); |
691 | if ( mode == "MaybeSafe" ) { | 691 | if ( mode == "MaybeSafe" ) { |
692 | cfg.writeEntry( "Mode", "Normal" ); | 692 | cfg.writeEntry( "Mode", "Normal" ); |
693 | } | 693 | } |
694 | #endif | 694 | #endif |
695 | } | 695 | } |
696 | 696 | ||
697 | 697 | ||
698 | void ServerApplication::shutdown() | 698 | void ServerApplication::shutdown() |
699 | { | 699 | { |
700 | if ( type() != GuiServer ) | 700 | if ( type() != GuiServer ) |
701 | return; | 701 | return; |
702 | ShutdownImpl *sd = new ShutdownImpl( 0, 0, WDestructiveClose ); | 702 | ShutdownImpl *sd = new ShutdownImpl( 0, 0, WDestructiveClose ); |
703 | connect( sd, SIGNAL(shutdown(ShutdownImpl::Type)), | 703 | connect( sd, SIGNAL(shutdown(ShutdownImpl::Type)), |
704 | this, SLOT(shutdown(ShutdownImpl::Type)) ); | 704 | this, SLOT(shutdown(ShutdownImpl::Type)) ); |
705 | sd->showMaximized(); | 705 | QPEApplication::showWidget( sd ); |
706 | } | 706 | } |
707 | 707 | ||
708 | void ServerApplication::shutdown( ShutdownImpl::Type t ) | 708 | void ServerApplication::shutdown( ShutdownImpl::Type t ) |
709 | { | 709 | { |
710 | char *opt = 0; | 710 | char *opt = 0; |
711 | 711 | ||
712 | switch ( t ) { | 712 | switch ( t ) { |
713 | case ShutdownImpl::ShutdownSystem: | 713 | case ShutdownImpl::ShutdownSystem: |
714 | opt = "-h"; | 714 | opt = "-h"; |
715 | // fall through | 715 | // fall through |
716 | case ShutdownImpl::RebootSystem: | 716 | case ShutdownImpl::RebootSystem: |
717 | if ( opt == 0 ) | 717 | if ( opt == 0 ) |
718 | opt = "-r"; | 718 | opt = "-r"; |
719 | 719 | ||
720 | if ( execl( "/sbin/shutdown", "shutdown", opt, "now", ( void* ) 0) < 0 ) | 720 | if ( execl( "/sbin/shutdown", "shutdown", opt, "now", ( void* ) 0) < 0 ) |
721 | perror("shutdown"); | 721 | perror("shutdown"); |
722 | // ::syslog ( LOG_ERR, "Erroring execing shutdown\n" ); | 722 | // ::syslog ( LOG_ERR, "Erroring execing shutdown\n" ); |
723 | 723 | ||
724 | break; | 724 | break; |
725 | case ShutdownImpl::RestartDesktop: | 725 | case ShutdownImpl::RestartDesktop: |
726 | restart(); | 726 | restart(); |
727 | break; | 727 | break; |
728 | case ShutdownImpl::TerminateDesktop: | 728 | case ShutdownImpl::TerminateDesktop: |
729 | prepareForTermination( FALSE ); | 729 | prepareForTermination( FALSE ); |
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index 44fbe48..fbc5072 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp | |||
@@ -265,49 +265,49 @@ void AudioWidget::setPosition( long i ) { | |||
265 | 265 | ||
266 | 266 | ||
267 | void AudioWidget::setLength( long max ) { | 267 | void AudioWidget::setLength( long max ) { |
268 | updateSlider( mediaPlayerState->position(), max ); | 268 | updateSlider( mediaPlayerState->position(), max ); |
269 | } | 269 | } |
270 | 270 | ||
271 | 271 | ||
272 | void AudioWidget::setView( char view ) { | 272 | void AudioWidget::setView( char view ) { |
273 | 273 | ||
274 | if (mediaPlayerState->isStreaming) { | 274 | if (mediaPlayerState->isStreaming) { |
275 | if( !slider.isHidden()) slider.hide(); | 275 | if( !slider.isHidden()) slider.hide(); |
276 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 276 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
277 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 277 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
278 | } else { | 278 | } else { |
279 | // this stops the slider from being moved, thus | 279 | // this stops the slider from being moved, thus |
280 | // does not stop stream when it reaches the end | 280 | // does not stop stream when it reaches the end |
281 | slider.show(); | 281 | slider.show(); |
282 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 282 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
283 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 283 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
284 | } | 284 | } |
285 | 285 | ||
286 | if ( view == 'a' ) { | 286 | if ( view == 'a' ) { |
287 | startTimer( 150 ); | 287 | startTimer( 150 ); |
288 | // show(); | 288 | // show(); |
289 | showMaximized(); | 289 | QPEApplication::showWidget( this ); |
290 | } else { | 290 | } else { |
291 | killTimers(); | 291 | killTimers(); |
292 | hide(); | 292 | hide(); |
293 | } | 293 | } |
294 | 294 | ||
295 | } | 295 | } |
296 | 296 | ||
297 | 297 | ||
298 | static QString timeAsString( long length ) { | 298 | static QString timeAsString( long length ) { |
299 | length /= 44100; | 299 | length /= 44100; |
300 | int minutes = length / 60; | 300 | int minutes = length / 60; |
301 | int seconds = length % 60; | 301 | int seconds = length % 60; |
302 | return QString("%1:%2%3").arg( minutes ).arg( seconds / 10 ).arg( seconds % 10 ); | 302 | return QString("%1:%2%3").arg( minutes ).arg( seconds / 10 ).arg( seconds % 10 ); |
303 | } | 303 | } |
304 | 304 | ||
305 | void AudioWidget::updateSlider( long i, long max ) { | 305 | void AudioWidget::updateSlider( long i, long max ) { |
306 | this->setFocus(); | 306 | this->setFocus(); |
307 | time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); | 307 | time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); |
308 | 308 | ||
309 | if ( max == 0 ) | 309 | if ( max == 0 ) |
310 | return; | 310 | return; |
311 | // Will flicker too much if we don't do this | 311 | // Will flicker too much if we don't do this |
312 | // Scale to something reasonable | 312 | // Scale to something reasonable |
313 | int width = slider.width(); | 313 | int width = slider.width(); |
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 82fd1e1..db99866 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -684,49 +684,49 @@ void PlayListWidget::saveList() { | |||
684 | } | 684 | } |
685 | 685 | ||
686 | void PlayListWidget::loadList( const DocLnk & lnk) { | 686 | void PlayListWidget::loadList( const DocLnk & lnk) { |
687 | QString name = lnk.name(); | 687 | QString name = lnk.name(); |
688 | // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name); | 688 | // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name); |
689 | 689 | ||
690 | if( name.length()>0) { | 690 | if( name.length()>0) { |
691 | setCaption("OpiePlayer: "+name); | 691 | setCaption("OpiePlayer: "+name); |
692 | // qDebug("<<<<<<<<<<<<load list "+ lnk.file()); | 692 | // qDebug("<<<<<<<<<<<<load list "+ lnk.file()); |
693 | clearList(); | 693 | clearList(); |
694 | readm3u(lnk.file()); | 694 | readm3u(lnk.file()); |
695 | tabWidget->setCurrentPage(0); | 695 | tabWidget->setCurrentPage(0); |
696 | } | 696 | } |
697 | } | 697 | } |
698 | 698 | ||
699 | void PlayListWidget::setPlaylist( bool shown ) { | 699 | void PlayListWidget::setPlaylist( bool shown ) { |
700 | if ( shown ) | 700 | if ( shown ) |
701 | d->playListFrame->show(); | 701 | d->playListFrame->show(); |
702 | else | 702 | else |
703 | d->playListFrame->hide(); | 703 | d->playListFrame->hide(); |
704 | } | 704 | } |
705 | 705 | ||
706 | void PlayListWidget::setView( char view ) { | 706 | void PlayListWidget::setView( char view ) { |
707 | if ( view == 'l' ) | 707 | if ( view == 'l' ) |
708 | showMaximized(); | 708 | QPEApplication::showWidget( this ); |
709 | else | 709 | else |
710 | hide(); | 710 | hide(); |
711 | } | 711 | } |
712 | 712 | ||
713 | void PlayListWidget::addSelected() { | 713 | void PlayListWidget::addSelected() { |
714 | DocLnk lnk; | 714 | DocLnk lnk; |
715 | QString filename; | 715 | QString filename; |
716 | switch (tabWidget->currentPageIndex()) { | 716 | switch (tabWidget->currentPageIndex()) { |
717 | 717 | ||
718 | case 0: //playlist | 718 | case 0: //playlist |
719 | return; | 719 | return; |
720 | break; | 720 | break; |
721 | case 1: { //audio | 721 | case 1: { //audio |
722 | QListViewItemIterator it( audioView ); | 722 | QListViewItemIterator it( audioView ); |
723 | for ( ; it.current(); ++it ) { | 723 | for ( ; it.current(); ++it ) { |
724 | if ( it.current()->isSelected() ) { | 724 | if ( it.current()->isSelected() ) { |
725 | filename = it.current()->text(3); | 725 | filename = it.current()->text(3); |
726 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | 726 | lnk.setName( QFileInfo(filename).baseName() ); //sets name |
727 | lnk.setFile( filename ); //sets file name | 727 | lnk.setFile( filename ); //sets file name |
728 | d->selectedFiles->addToSelection( lnk); | 728 | d->selectedFiles->addToSelection( lnk); |
729 | } | 729 | } |
730 | } | 730 | } |
731 | audioView->clearSelection(); | 731 | audioView->clearSelection(); |
732 | // d->selectedFiles->next(); | 732 | // d->selectedFiles->next(); |
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp index d9a9478..5273ad3 100644 --- a/core/multimedia/opieplayer/videowidget.cpp +++ b/core/multimedia/opieplayer/videowidget.cpp | |||
@@ -399,49 +399,49 @@ void VideoWidget::mousePressEvent( QMouseEvent *event ) { | |||
399 | 399 | ||
400 | void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { | 400 | void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { |
401 | if ( mediaPlayerState->fullscreen() ) | 401 | if ( mediaPlayerState->fullscreen() ) |
402 | { | 402 | { |
403 | mediaPlayerState->setFullscreen( FALSE ); | 403 | mediaPlayerState->setFullscreen( FALSE ); |
404 | makeVisible(); | 404 | makeVisible(); |
405 | } | 405 | } |
406 | mouseMoveEvent( event ); | 406 | mouseMoveEvent( event ); |
407 | // } | 407 | // } |
408 | } | 408 | } |
409 | 409 | ||
410 | 410 | ||
411 | void VideoWidget::makeVisible() { | 411 | void VideoWidget::makeVisible() { |
412 | if ( mediaPlayerState->fullscreen() ) | 412 | if ( mediaPlayerState->fullscreen() ) |
413 | { | 413 | { |
414 | setBackgroundMode( QWidget::NoBackground ); | 414 | setBackgroundMode( QWidget::NoBackground ); |
415 | showFullScreen(); | 415 | showFullScreen(); |
416 | resize( qApp->desktop()->size() ); | 416 | resize( qApp->desktop()->size() ); |
417 | slider->hide(); | 417 | slider->hide(); |
418 | } | 418 | } |
419 | else | 419 | else |
420 | { | 420 | { |
421 | setBackgroundPixmap( *pixBg ); | 421 | setBackgroundPixmap( *pixBg ); |
422 | showNormal(); | 422 | showNormal(); |
423 | showMaximized(); | 423 | QPEApplication::showWidget( this ); |
424 | slider->show(); | 424 | slider->show(); |
425 | } | 425 | } |
426 | } | 426 | } |
427 | 427 | ||
428 | 428 | ||
429 | void VideoWidget::paintEvent( QPaintEvent * pe) { | 429 | void VideoWidget::paintEvent( QPaintEvent * pe) { |
430 | QPainter p( this ); | 430 | QPainter p( this ); |
431 | 431 | ||
432 | if ( mediaPlayerState->fullscreen() ) { | 432 | if ( mediaPlayerState->fullscreen() ) { |
433 | // Clear the background | 433 | // Clear the background |
434 | p.setBrush( QBrush( Qt::black ) ); | 434 | p.setBrush( QBrush( Qt::black ) ); |
435 | p.drawRect( rect() ); | 435 | p.drawRect( rect() ); |
436 | } else { | 436 | } else { |
437 | if ( !pe->erased() ) { | 437 | if ( !pe->erased() ) { |
438 | // Combine with background and double buffer | 438 | // Combine with background and double buffer |
439 | QPixmap pix( pe->rect().size() ); | 439 | QPixmap pix( pe->rect().size() ); |
440 | QPainter p( &pix ); | 440 | QPainter p( &pix ); |
441 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); | 441 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); |
442 | p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() ); | 442 | p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() ); |
443 | for ( int i = 0; i < numVButtons; i++ ) { | 443 | for ( int i = 0; i < numVButtons; i++ ) { |
444 | paintButton( &p, i ); | 444 | paintButton( &p, i ); |
445 | } | 445 | } |
446 | QPainter p2( this ); | 446 | QPainter p2( this ); |
447 | p2.drawPixmap( pe->rect().topLeft(), pix ); | 447 | p2.drawPixmap( pe->rect().topLeft(), pix ); |
diff --git a/core/obex/obexhandler.cpp b/core/obex/obexhandler.cpp index 5aaf63c..c237555 100644 --- a/core/obex/obexhandler.cpp +++ b/core/obex/obexhandler.cpp | |||
@@ -1,53 +1,54 @@ | |||
1 | #include <qcopchannel_qws.h> | 1 | #include <qcopchannel_qws.h> |
2 | 2 | ||
3 | #include <qpe/qcopenvelope_qws.h> | 3 | #include <qpe/qcopenvelope_qws.h> |
4 | #include <qpe/qpeapplication.h> | ||
4 | 5 | ||
5 | #include "obexsend.h" | 6 | #include "obexsend.h" |
6 | #include "receiver.h" | 7 | #include "receiver.h" |
7 | #include "obexhandler.h" | 8 | #include "obexhandler.h" |
8 | 9 | ||
9 | using namespace OpieObex; | 10 | using namespace OpieObex; |
10 | 11 | ||
11 | /* TRANSLATOR OpieObex::ObexHandler */ | 12 | /* TRANSLATOR OpieObex::ObexHandler */ |
12 | 13 | ||
13 | ObexHandler::ObexHandler() { | 14 | ObexHandler::ObexHandler() { |
14 | m_wasRec = false; | 15 | m_wasRec = false; |
15 | m_sender = 0l; | 16 | m_sender = 0l; |
16 | m_receiver = 0l; | 17 | m_receiver = 0l; |
17 | QCopChannel* chan = new QCopChannel("QPE/Obex"); | 18 | QCopChannel* chan = new QCopChannel("QPE/Obex"); |
18 | connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), | 19 | connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), |
19 | this, SLOT(irdaMessage(const QCString&, const QByteArray& ) ) ); | 20 | this, SLOT(irdaMessage(const QCString&, const QByteArray& ) ) ); |
20 | } | 21 | } |
21 | ObexHandler::~ObexHandler() { | 22 | ObexHandler::~ObexHandler() { |
22 | delete m_sender; | 23 | delete m_sender; |
23 | delete m_receiver; | 24 | delete m_receiver; |
24 | } | 25 | } |
25 | void ObexHandler::doSend(const QString& str, const QString& desc) { | 26 | void ObexHandler::doSend(const QString& str, const QString& desc) { |
26 | delete m_sender; | 27 | delete m_sender; |
27 | m_sender = new SendWidget; | 28 | m_sender = new SendWidget; |
28 | m_sender->raise(); | 29 | m_sender->raise(); |
29 | m_sender->showMaximized(); | 30 | QPEApplication::showWidget( m_sender ); |
30 | connect(m_sender, SIGNAL(done() ), | 31 | connect(m_sender, SIGNAL(done() ), |
31 | this, SLOT(slotSent() ) ); | 32 | this, SLOT(slotSent() ) ); |
32 | m_sender->send( str, desc ); | 33 | m_sender->send( str, desc ); |
33 | } | 34 | } |
34 | void ObexHandler::doReceive(bool b) { | 35 | void ObexHandler::doReceive(bool b) { |
35 | if (m_receiver && b ) return; // we should enable receiver and it is on | 36 | if (m_receiver && b ) return; // we should enable receiver and it is on |
36 | else if (!m_receiver && !b ) return; // we should disbale receiver and it is off | 37 | else if (!m_receiver && !b ) return; // we should disbale receiver and it is off |
37 | else if (m_receiver && !b ) { | 38 | else if (m_receiver && !b ) { |
38 | delete m_receiver; | 39 | delete m_receiver; |
39 | m_receiver=0; | 40 | m_receiver=0; |
40 | }else if (!m_receiver && b ) { | 41 | }else if (!m_receiver && b ) { |
41 | m_receiver= new Receiver; | 42 | m_receiver= new Receiver; |
42 | } | 43 | } |
43 | } | 44 | } |
44 | void ObexHandler::slotSent() { | 45 | void ObexHandler::slotSent() { |
45 | QString file = m_sender->file(); | 46 | QString file = m_sender->file(); |
46 | delete m_sender; | 47 | delete m_sender; |
47 | m_sender = 0; | 48 | m_sender = 0; |
48 | QCopEnvelope e ("QPE/Obex", "done(QString)" ); | 49 | QCopEnvelope e ("QPE/Obex", "done(QString)" ); |
49 | e << file; | 50 | e << file; |
50 | doReceive(m_wasRec ); | 51 | doReceive(m_wasRec ); |
51 | m_wasRec = false; | 52 | m_wasRec = false; |
52 | } | 53 | } |
53 | void ObexHandler::irdaMessage( const QCString& msg, const QByteArray& data) { | 54 | void ObexHandler::irdaMessage( const QCString& msg, const QByteArray& data) { |
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 139c91b..c83a5df 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -61,49 +61,49 @@ Today::Today( QWidget* parent, const char* name, WFlags fl ) | |||
61 | #endif | 61 | #endif |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | setOwnerField(); | 64 | setOwnerField(); |
65 | m_refreshTimer = new QTimer( this ); | 65 | m_refreshTimer = new QTimer( this ); |
66 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 66 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
67 | m_refreshTimer->start( 15000 ); | 67 | m_refreshTimer->start( 15000 ); |
68 | m_big_box = 0L; | 68 | m_big_box = 0L; |
69 | 69 | ||
70 | 70 | ||
71 | layout = new QVBoxLayout( this ); | 71 | layout = new QVBoxLayout( this ); |
72 | layout->addWidget( Frame ); | 72 | layout->addWidget( Frame ); |
73 | layout->addWidget( OwnerField ); | 73 | layout->addWidget( OwnerField ); |
74 | 74 | ||
75 | m_sv = new QScrollView( this ); | 75 | m_sv = new QScrollView( this ); |
76 | m_sv->setResizePolicy( QScrollView::AutoOneFit ); | 76 | m_sv->setResizePolicy( QScrollView::AutoOneFit ); |
77 | m_sv->setHScrollBarMode( QScrollView::AlwaysOff ); | 77 | m_sv->setHScrollBarMode( QScrollView::AlwaysOff ); |
78 | m_sv->setFrameShape( QFrame::NoFrame ); | 78 | m_sv->setFrameShape( QFrame::NoFrame ); |
79 | 79 | ||
80 | layout->addWidget( m_sv ); | 80 | layout->addWidget( m_sv ); |
81 | layout->setStretchFactor( m_sv,4 ); | 81 | layout->setStretchFactor( m_sv,4 ); |
82 | 82 | ||
83 | qApp->processEvents(); | 83 | qApp->processEvents(); |
84 | loadPlugins(); | 84 | loadPlugins(); |
85 | showMaximized(); | 85 | QPEApplication::showWidget( this ); |
86 | } | 86 | } |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Qcop receive method. | 89 | * Qcop receive method. |
90 | */ | 90 | */ |
91 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { | 91 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { |
92 | QDataStream stream( data, IO_ReadOnly ); | 92 | QDataStream stream( data, IO_ReadOnly ); |
93 | if ( msg == "message(QString)" ) { | 93 | if ( msg == "message(QString)" ) { |
94 | QString message; | 94 | QString message; |
95 | stream >> message; | 95 | stream >> message; |
96 | setOwnerField( message ); | 96 | setOwnerField( message ); |
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | ||
100 | void Today::setRefreshTimer( int interval ) { | 100 | void Today::setRefreshTimer( int interval ) { |
101 | 101 | ||
102 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 102 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
103 | 103 | ||
104 | // 0 is "never" case | 104 | // 0 is "never" case |
105 | if ( !interval == 0 ) { | 105 | if ( !interval == 0 ) { |
106 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 106 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
107 | m_refreshTimer->changeInterval( interval ); | 107 | m_refreshTimer->changeInterval( interval ); |
108 | } | 108 | } |
109 | } | 109 | } |
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index e71c5b0..9ced0d8 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -1,45 +1,46 @@ | |||
1 | /* | 1 | /* |
2 | * todayconfig.cpp | 2 | * todayconfig.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002, 2003 by Maximilian Reiß | 4 | * copyright : (c) 2002, 2003 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "todayconfig.h" | 17 | #include "todayconfig.h" |
18 | 18 | ||
19 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
20 | #include <qpe/resource.h> | 20 | #include <qpe/resource.h> |
21 | #include <qpe/qcopenvelope_qws.h> | 21 | #include <qpe/qcopenvelope_qws.h> |
22 | #include <qpe/qpeapplication.h> | ||
22 | 23 | ||
23 | #include <qcheckbox.h> | 24 | #include <qcheckbox.h> |
24 | #include <qlabel.h> | 25 | #include <qlabel.h> |
25 | #include <qspinbox.h> | 26 | #include <qspinbox.h> |
26 | #include <qlayout.h> | 27 | #include <qlayout.h> |
27 | #include <qheader.h> | 28 | #include <qheader.h> |
28 | #include <qvbox.h> | 29 | #include <qvbox.h> |
29 | #include <qtoolbutton.h> | 30 | #include <qtoolbutton.h> |
30 | #include <qwhatsthis.h> | 31 | #include <qwhatsthis.h> |
31 | 32 | ||
32 | class ToolButton : public QToolButton { | 33 | class ToolButton : public QToolButton { |
33 | 34 | ||
34 | public: | 35 | public: |
35 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) | 36 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) |
36 | : QToolButton( parent, name ) { | 37 | : QToolButton( parent, name ) { |
37 | setPixmap( Resource::loadPixmap( icon ) ); | 38 | setPixmap( Resource::loadPixmap( icon ) ); |
38 | setAutoRaise( TRUE ); | 39 | setAutoRaise( TRUE ); |
39 | setFocusPolicy( QWidget::NoFocus ); | 40 | setFocusPolicy( QWidget::NoFocus ); |
40 | setToggleButton( t ); | 41 | setToggleButton( t ); |
41 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); | 42 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); |
42 | } | 43 | } |
43 | }; | 44 | }; |
44 | 45 | ||
45 | 46 | ||
@@ -66,49 +67,49 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) | |||
66 | m_appletListView->addColumn( "PluginList" ); | 67 | m_appletListView->addColumn( "PluginList" ); |
67 | m_appletListView->header()->hide(); | 68 | m_appletListView->header()->hide(); |
68 | m_appletListView->setSorting( -1 ); | 69 | m_appletListView->setSorting( -1 ); |
69 | QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the appearance order" ) ); | 70 | QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the appearance order" ) ); |
70 | QVBox *vbox1 = new QVBox( hbox1 ); | 71 | QVBox *vbox1 = new QVBox( hbox1 ); |
71 | new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); | 72 | new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); |
72 | new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); | 73 | new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); |
73 | tab2Layout->addWidget( hbox1 ); | 74 | tab2Layout->addWidget( hbox1 ); |
74 | TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); | 75 | TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); |
75 | 76 | ||
76 | // Misc tab | 77 | // Misc tab |
77 | tab_3 = new QWidget( TabWidget3, "tab_3" ); | 78 | tab_3 = new QWidget( TabWidget3, "tab_3" ); |
78 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); | 79 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); |
79 | 80 | ||
80 | m_guiMisc = new TodayConfigMiscBase( tab_3 ); | 81 | m_guiMisc = new TodayConfigMiscBase( tab_3 ); |
81 | 82 | ||
82 | tab3Layout->addWidget( m_guiMisc ); | 83 | tab3Layout->addWidget( m_guiMisc ); |
83 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); | 84 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); |
84 | 85 | ||
85 | m_applets_changed = false; | 86 | m_applets_changed = false; |
86 | 87 | ||
87 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); | 88 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); |
88 | 89 | ||
89 | readConfig(); | 90 | readConfig(); |
90 | showMaximized(); | 91 | QPEApplication::showDialog( this ); |
91 | } | 92 | } |
92 | 93 | ||
93 | 94 | ||
94 | /** | 95 | /** |
95 | * Autostart, uses the new (opie only) autostart method in the launcher code. | 96 | * Autostart, uses the new (opie only) autostart method in the launcher code. |
96 | * If registered against that today ist started on each resume. | 97 | * If registered against that today ist started on each resume. |
97 | */ | 98 | */ |
98 | void TodayConfig::setAutoStart() { | 99 | void TodayConfig::setAutoStart() { |
99 | Config cfg( "today" ); | 100 | Config cfg( "today" ); |
100 | cfg.setGroup( "Autostart" ); | 101 | cfg.setGroup( "Autostart" ); |
101 | if ( m_autoStart ) { | 102 | if ( m_autoStart ) { |
102 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); | 103 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); |
103 | e << QString( "add" ); | 104 | e << QString( "add" ); |
104 | e << QString( "today" ); | 105 | e << QString( "today" ); |
105 | e << QString( "%1" ).arg( m_autoStartTimer ); | 106 | e << QString( "%1" ).arg( m_autoStartTimer ); |
106 | } else { | 107 | } else { |
107 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); | 108 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); |
108 | e << QString( "remove" ); | 109 | e << QString( "remove" ); |
109 | e << QString( "today" ); | 110 | e << QString( "today" ); |
110 | } | 111 | } |
111 | } | 112 | } |
112 | 113 | ||
113 | /** | 114 | /** |
114 | * Read the config part | 115 | * Read the config part |
diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp index 523e295..141e0f6 100644 --- a/core/settings/button/buttonsettings.cpp +++ b/core/settings/button/buttonsettings.cpp | |||
@@ -193,50 +193,49 @@ void ButtonSettings::keyReleaseEvent ( QKeyEvent *e ) | |||
193 | m_timer-> stop ( ); | 193 | m_timer-> stop ( ); |
194 | edit ( bi, false ); | 194 | edit ( bi, false ); |
195 | } | 195 | } |
196 | else | 196 | else |
197 | QDialog::keyReleaseEvent ( e ); | 197 | QDialog::keyReleaseEvent ( e ); |
198 | } | 198 | } |
199 | 199 | ||
200 | void ButtonSettings::keyTimeout ( ) | 200 | void ButtonSettings::keyTimeout ( ) |
201 | { | 201 | { |
202 | if ( m_last_button ) { | 202 | if ( m_last_button ) { |
203 | edit ( m_last_button, true ); | 203 | edit ( m_last_button, true ); |
204 | m_last_button = false; | 204 | m_last_button = false; |
205 | } | 205 | } |
206 | } | 206 | } |
207 | 207 | ||
208 | void ButtonSettings::edit ( buttoninfo *bi, bool hold ) | 208 | void ButtonSettings::edit ( buttoninfo *bi, bool hold ) |
209 | { | 209 | { |
210 | 210 | ||
211 | if ( m_lock ) | 211 | if ( m_lock ) |
212 | return; | 212 | return; |
213 | m_lock = true; | 213 | m_lock = true; |
214 | 214 | ||
215 | RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this ); | 215 | RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this ); |
216 | 216 | ||
217 | d-> showMaximized ( ); | 217 | if ( QPEApplication::execDialog ( d ) == QDialog::Accepted ) { |
218 | if ( d-> exec ( ) == QDialog::Accepted ) { | ||
219 | 218 | ||
220 | 219 | ||
221 | if ( hold ) { | 220 | if ( hold ) { |
222 | bi-> m_hmsg = d-> message ( ); | 221 | bi-> m_hmsg = d-> message ( ); |
223 | bi-> m_hdirty = true; | 222 | bi-> m_hdirty = true; |
224 | } | 223 | } |
225 | else { | 224 | else { |
226 | bi-> m_pmsg = d-> message ( ); | 225 | bi-> m_pmsg = d-> message ( ); |
227 | bi-> m_pdirty = true; | 226 | bi-> m_pdirty = true; |
228 | } | 227 | } |
229 | 228 | ||
230 | updateLabels ( ); | 229 | updateLabels ( ); |
231 | } | 230 | } |
232 | 231 | ||
233 | delete d; | 232 | delete d; |
234 | 233 | ||
235 | m_lock = false; | 234 | m_lock = false; |
236 | } | 235 | } |
237 | 236 | ||
238 | void ButtonSettings::accept ( ) | 237 | void ButtonSettings::accept ( ) |
239 | { | 238 | { |
240 | for ( QListIterator <buttoninfo> it ( m_infos ); *it; ++it ) { | 239 | for ( QListIterator <buttoninfo> it ( m_infos ); *it; ++it ) { |
241 | buttoninfo *bi = *it; | 240 | buttoninfo *bi = *it; |
242 | 241 | ||
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp index a3d31a5..17a1609 100644 --- a/core/settings/launcher/tabssettings.cpp +++ b/core/settings/launcher/tabssettings.cpp | |||
@@ -11,48 +11,49 @@ | |||
11 | .%`+i> _;_. | 11 | .%`+i> _;_. |
12 | .i_,=:_. -<s. This file is distributed in the hope that | 12 | .i_,=:_. -<s. This file is distributed in the hope that |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
17 | ..}^=.= = ; Public License for more details. | 17 | ..}^=.= = ; Public License for more details. |
18 | ++= -. .` .: | 18 | ++= -. .` .: |
19 | : = ...= . :.=- You should have received a copy of the GNU | 19 | : = ...= . :.=- You should have received a copy of the GNU |
20 | -. .:....=;==+<; General Public License along with this file; | 20 | -. .:....=;==+<; General Public License along with this file; |
21 | -_. . . )=. = see the file COPYING. If not, write to the | 21 | -_. . . )=. = see the file COPYING. If not, write to the |
22 | -- :-=` Free Software Foundation, Inc., | 22 | -- :-=` Free Software Foundation, Inc., |
23 | 59 Temple Place - Suite 330, | 23 | 59 Temple Place - Suite 330, |
24 | Boston, MA 02111-1307, USA. | 24 | Boston, MA 02111-1307, USA. |
25 | 25 | ||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "tabssettings.h" | 28 | #include "tabssettings.h" |
29 | 29 | ||
30 | #include <qpe/resource.h> | 30 | #include <qpe/resource.h> |
31 | #include <qpe/applnk.h> | 31 | #include <qpe/applnk.h> |
32 | #include <qpe/mimetype.h> | 32 | #include <qpe/mimetype.h> |
33 | #include <qpe/qcopenvelope_qws.h> | 33 | #include <qpe/qcopenvelope_qws.h> |
34 | #include <qpe/config.h> | 34 | #include <qpe/config.h> |
35 | #include <qpe/qpeapplication.h> | ||
35 | 36 | ||
36 | #include <qlistbox.h> | 37 | #include <qlistbox.h> |
37 | #include <qpushbutton.h> | 38 | #include <qpushbutton.h> |
38 | #include <qlayout.h> | 39 | #include <qlayout.h> |
39 | #include <qlabel.h> | 40 | #include <qlabel.h> |
40 | #include <qwhatsthis.h> | 41 | #include <qwhatsthis.h> |
41 | #include <qcheckbox.h> | 42 | #include <qcheckbox.h> |
42 | 43 | ||
43 | #include "tabdialog.h" | 44 | #include "tabdialog.h" |
44 | 45 | ||
45 | #include <stdlib.h> | 46 | #include <stdlib.h> |
46 | #include <qmessagebox.h> | 47 | #include <qmessagebox.h> |
47 | 48 | ||
48 | 49 | ||
49 | #define GLOBALID ".global." | 50 | #define GLOBALID ".global." |
50 | 51 | ||
51 | 52 | ||
52 | TabsSettings::TabsSettings ( QWidget *parent, const char *name ) | 53 | TabsSettings::TabsSettings ( QWidget *parent, const char *name ) |
53 | : QWidget ( parent, name ) | 54 | : QWidget ( parent, name ) |
54 | { | 55 | { |
55 | QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 ); | 56 | QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 ); |
56 | 57 | ||
57 | QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this ); | 58 | QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this ); |
58 | lay-> addMultiCellWidget ( l, 0, 0, 0, 1 ); | 59 | lay-> addMultiCellWidget ( l, 0, 0, 0, 1 ); |
@@ -279,39 +280,38 @@ void TabsSettings::newClicked ( ) | |||
279 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); | 280 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); |
280 | } | 281 | } |
281 | 282 | ||
282 | void TabsSettings::deleteClicked ( ) | 283 | void TabsSettings::deleteClicked ( ) |
283 | { | 284 | { |
284 | int ind = m_list-> currentItem ( ); | 285 | int ind = m_list-> currentItem ( ); |
285 | 286 | ||
286 | if ( ind < 0 ) | 287 | if ( ind < 0 ) |
287 | return; | 288 | return; |
288 | 289 | ||
289 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); | 290 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); |
290 | } | 291 | } |
291 | 292 | ||
292 | void TabsSettings::editClicked ( ) | 293 | void TabsSettings::editClicked ( ) |
293 | { | 294 | { |
294 | int ind = m_list-> currentItem ( ); | 295 | int ind = m_list-> currentItem ( ); |
295 | 296 | ||
296 | if ( ind < 0 ) | 297 | if ( ind < 0 ) |
297 | return; | 298 | return; |
298 | 299 | ||
299 | TabConfig tc = m_tabs [m_ids [ind]]; | 300 | TabConfig tc = m_tabs [m_ids [ind]]; |
300 | 301 | ||
301 | TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); | 302 | TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); |
302 | 303 | ||
303 | d-> showMaximized ( ); | 304 | if ( QPEApplication::execDialog( d ) == QDialog::Accepted ) { |
304 | if ( d-> exec ( ) == QDialog::Accepted ) { | ||
305 | tc. m_changed = true; | 305 | tc. m_changed = true; |
306 | m_tabs [m_ids [ind]] = tc; | 306 | m_tabs [m_ids [ind]] = tc; |
307 | 307 | ||
308 | if ( m_ids [ind] == GLOBALID ) { | 308 | if ( m_ids [ind] == GLOBALID ) { |
309 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { | 309 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { |
310 | if ( *it != GLOBALID ) | 310 | if ( *it != GLOBALID ) |
311 | m_tabs [*it] = tc; | 311 | m_tabs [*it] = tc; |
312 | } | 312 | } |
313 | } | 313 | } |
314 | } | 314 | } |
315 | 315 | ||
316 | delete d; | 316 | delete d; |
317 | } | 317 | } |
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index b21215b..60f7417 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp | |||
@@ -189,50 +189,49 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) | |||
189 | connect ( contrast_ac, SIGNAL( valueChanged ( int )), this, SLOT( setContrast ( int ))); | 189 | connect ( contrast_ac, SIGNAL( valueChanged ( int )), this, SLOT( setContrast ( int ))); |
190 | } | 190 | } |
191 | connect( frequency, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); | 191 | connect( frequency, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); |
192 | connect( frequency_ac, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); | 192 | connect( frequency_ac, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); |
193 | connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); | 193 | connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); |
194 | connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); | 194 | connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); |
195 | } | 195 | } |
196 | 196 | ||
197 | LightSettings::~LightSettings ( ) | 197 | LightSettings::~LightSettings ( ) |
198 | { | 198 | { |
199 | } | 199 | } |
200 | 200 | ||
201 | void LightSettings::calibrateSensor ( ) | 201 | void LightSettings::calibrateSensor ( ) |
202 | { | 202 | { |
203 | Sensor *s = new Sensor ( m_sensordata, this ); | 203 | Sensor *s = new Sensor ( m_sensordata, this ); |
204 | connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int ))); | 204 | connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int ))); |
205 | QPEApplication::execDialog( s ); | 205 | QPEApplication::execDialog( s ); |
206 | delete s; | 206 | delete s; |
207 | } | 207 | } |
208 | 208 | ||
209 | void LightSettings::calibrateSensorAC ( ) | 209 | void LightSettings::calibrateSensorAC ( ) |
210 | { | 210 | { |
211 | Sensor *s = new Sensor ( m_sensordata_ac, this ); | 211 | Sensor *s = new Sensor ( m_sensordata_ac, this ); |
212 | connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int ))); | 212 | connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int ))); |
213 | s-> showMaximized ( ); | 213 | QPEApplication::execDialog ( s ); |
214 | s-> exec ( ); | ||
215 | delete s; | 214 | delete s; |
216 | } | 215 | } |
217 | 216 | ||
218 | void LightSettings::setBacklight ( int bright ) | 217 | void LightSettings::setBacklight ( int bright ) |
219 | { | 218 | { |
220 | QCopEnvelope e ( "QPE/System", "setBacklight(int)" ); | 219 | QCopEnvelope e ( "QPE/System", "setBacklight(int)" ); |
221 | e << bright; | 220 | e << bright; |
222 | 221 | ||
223 | if ( bright != -1 ) { | 222 | if ( bright != -1 ) { |
224 | m_resettimer-> stop ( ); | 223 | m_resettimer-> stop ( ); |
225 | m_resettimer-> start ( 4000, true ); | 224 | m_resettimer-> start ( 4000, true ); |
226 | } | 225 | } |
227 | } | 226 | } |
228 | 227 | ||
229 | void LightSettings::setContrast ( int contr ) | 228 | void LightSettings::setContrast ( int contr ) |
230 | { | 229 | { |
231 | if (contr == -1) contr = m_oldcontrast; | 230 | if (contr == -1) contr = m_oldcontrast; |
232 | ODevice::inst ( )-> setDisplayContrast(contr); | 231 | ODevice::inst ( )-> setDisplayContrast(contr); |
233 | } | 232 | } |
234 | 233 | ||
235 | void LightSettings::setFrequency ( int index ) | 234 | void LightSettings::setFrequency ( int index ) |
236 | { | 235 | { |
237 | qWarning("LightSettings::setFrequency(%d)", index); | 236 | qWarning("LightSettings::setFrequency(%d)", index); |
238 | ODevice::inst ( )-> setCurrentCpuFrequency(index); | 237 | ODevice::inst ( )-> setCurrentCpuFrequency(index); |
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp index 7bb14cd..34f7e50 100644 --- a/core/settings/security/security.cpp +++ b/core/settings/security/security.cpp | |||
@@ -81,49 +81,49 @@ | |||
81 | } else { | 81 | } else { |
82 | autoLogin=true; | 82 | autoLogin=true; |
83 | } | 83 | } |
84 | 84 | ||
85 | cfg.setGroup("SyncMode"); | 85 | cfg.setGroup("SyncMode"); |
86 | int mode = cfg.readNumEntry("Mode",2); // Default to Sharp | 86 | int mode = cfg.readNumEntry("Mode",2); // Default to Sharp |
87 | syncModeCombo->setCurrentItem( mode - 1 ); | 87 | syncModeCombo->setCurrentItem( mode - 1 ); |
88 | 88 | ||
89 | //since nobody knows what this is and it doesn't do anything, i'll hide it # CoreDump | 89 | //since nobody knows what this is and it doesn't do anything, i'll hide it # CoreDump |
90 | // is this work-in-progress or can it be removed? | 90 | // is this work-in-progress or can it be removed? |
91 | syncModeCombo->hide(); | 91 | syncModeCombo->hide(); |
92 | 92 | ||
93 | connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); | 93 | connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); |
94 | connect(userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); | 94 | connect(userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); |
95 | connect(changepasscode,SIGNAL(clicked()), this, SLOT(changePassCode())); | 95 | connect(changepasscode,SIGNAL(clicked()), this, SLOT(changePassCode())); |
96 | connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode())); | 96 | connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode())); |
97 | connect(syncapp,SIGNAL(activated(int)), this, SLOT(changeSyncApp())); | 97 | connect(syncapp,SIGNAL(activated(int)), this, SLOT(changeSyncApp())); |
98 | connect(restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults())); | 98 | connect(restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults())); |
99 | connect(deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry())); | 99 | connect(deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry())); |
100 | 100 | ||
101 | loadUsers(); | 101 | loadUsers(); |
102 | updateGUI(); | 102 | updateGUI(); |
103 | 103 | ||
104 | dl = new QPEDialogListener(this); | 104 | dl = new QPEDialogListener(this); |
105 | showMaximized(); | 105 | QPEApplication::showDialog( this ); |
106 | } | 106 | } |
107 | 107 | ||
108 | Security::~Security() | 108 | Security::~Security() |
109 | { | 109 | { |
110 | } | 110 | } |
111 | 111 | ||
112 | void Security::deleteListEntry() | 112 | void Security::deleteListEntry() |
113 | { | 113 | { |
114 | syncnet->removeItem(syncnet->currentItem()); | 114 | syncnet->removeItem(syncnet->currentItem()); |
115 | } | 115 | } |
116 | 116 | ||
117 | void Security::restoreDefaults() | 117 | void Security::restoreDefaults() |
118 | { | 118 | { |
119 | QMessageBox unrecbox( | 119 | QMessageBox unrecbox( |
120 | tr("Attention"), | 120 | tr("Attention"), |
121 | tr("<p>All user-defined net ranges will be lost."), | 121 | tr("<p>All user-defined net ranges will be lost."), |
122 | QMessageBox::Warning, | 122 | QMessageBox::Warning, |
123 | QMessageBox::Cancel, QMessageBox::Yes, QMessageBox::NoButton, | 123 | QMessageBox::Cancel, QMessageBox::Yes, QMessageBox::NoButton, |
124 | 0, QString::null, TRUE, WStyle_StaysOnTop); | 124 | 0, QString::null, TRUE, WStyle_StaysOnTop); |
125 | unrecbox.setButtonText(QMessageBox::Cancel, tr("Cancel")); | 125 | unrecbox.setButtonText(QMessageBox::Cancel, tr("Cancel")); |
126 | unrecbox.setButtonText(QMessageBox::Yes, tr("Ok")); | 126 | unrecbox.setButtonText(QMessageBox::Yes, tr("Ok")); |
127 | 127 | ||
128 | if ( unrecbox.exec() == QMessageBox::Yes) | 128 | if ( unrecbox.exec() == QMessageBox::Yes) |
129 | { | 129 | { |