[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/utils/rsibreak/src
From:       Tom Albers <toma () kde ! org>
Date:       2010-10-01 18:55:39
Message-ID: 20101001185539.5D48AAC891 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1181680 by toma:

Make the time of the popup configurable. This way you can set it to 999 seconds, and \
basically never see the effect kick in. Dotan, that basically allowes you the \
workflow you want, right? BUG=246777


 M  +1 -1      rsiglobals.cpp  
 M  +1 -3      rsitimer.cpp  
 M  +17 -1     setupmaximized.cpp  


--- trunk/extragear/utils/rsibreak/src/rsiglobals.cpp #1181679:1181680
@@ -70,7 +70,7 @@
     m_intervals["tiny_maximized"] = config.readEntry( "TinyDuration", 20 );
     m_intervals["big_minimized"] = config.readEntry( "BigInterval", 60 ) * 60;
     m_intervals["big_maximized"] = config.readEntry( "BigDuration", 1 ) * 60;
-    m_intervals["big_maximized"] = config.readEntry( "BigDuration", 1 ) * 60;
+    m_intervals["patience"] = config.readEntry("Patience", 30);
 
     if ( config.readEntry( "DEBUG", 0 ) > 0 ) {
         kDebug() << "Debug mode activated";
--- trunk/extragear/utils/rsibreak/src/rsitimer.cpp #1181679:1181680
@@ -440,9 +440,7 @@
             RSIGlobals::instance()->stats()->increaseStat( BIG_BREAKS );
         }
 
-        m_patience = 30;
-        if ( m_patience > breakInterval )
-            m_patience = breakInterval;
+        m_patience = m_intervals["patience"];
 
         emit relax( breakInterval, m_nextnextBreak == BIG_BREAK );
         m_relax_left = breakInterval;
--- trunk/extragear/utils/rsibreak/src/setupmaximized.cpp #1181679:1181680
@@ -56,6 +56,7 @@
     QCheckBox*        disableAccel;
     QPushButton*      changePathButton;
     KIntNumInput*     slideInterval;
+    KIntNumInput*     popupDuration;
     QCheckBox*        usePopup;
     QCheckBox*        useFlash;
     QLabel*           useFlashLabel;
@@ -183,7 +184,7 @@
     popupBox->setTitle( i18n( "Popup" ) );
 
     QLabel *label = new QLabel( i18n( "RSIBreak can show a popup near the "
-                                      "systray instead of replacing your whole \
screen with a picture." ), this ); +                                      "systray \
before replacing your whole screen with the effect chosen." ), this );  \
label->setWordWrap( true );  
     d->usePopup = new QCheckBox( i18n( "&Use the popup" ), this );
@@ -193,6 +194,16 @@
                                      "zero, so you know how long this break will \
be." ) );  label->setBuddy( d->usePopup );
 
+    KHBox *m6 = new KHBox( this );
+    QLabel *l6 = new QLabel( i18n( "Show popup for a maximum of:" ) + ' ', m6 );
+    l6->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+    l6->setWhatsThis( i18n( "Here you can set how long the popup will be shown "
+                            "before the effect will kick in." ) );
+    d->popupDuration = new KIntNumInput( m6 );
+    d->popupDuration->setRange( 3, 1000, 1 );
+    d->popupDuration->setSliderEnabled( false );
+    d->popupDuration->setSuffix( ki18np( " second", " seconds" ) );
+
     d->useFlashLabel = new QLabel( '\n' + i18n( "The popup can flash when it "
                                    "detects that you are still active." ), this );
     d->useFlashLabel->setWordWrap( true );
@@ -205,6 +216,7 @@
     QVBoxLayout *vbox3 = new QVBoxLayout( popupBox );
     vbox3->addWidget( label );
     vbox3->addWidget( d->usePopup );
+    vbox3->addWidget( m6 );
     vbox3->addWidget( d->useFlashLabel );
     vbox3->addWidget( d->useFlash );
     vbox3->addStretch( 1 );
@@ -286,6 +298,8 @@
     KConfigGroup config = KGlobal::config()->group( "General Settings" );
     config.writeEntry( "ImageFolder", d->imageFolderEdit->text() );
     config.writeEntry( "SlideInterval", d->slideInterval->value() );
+    config.writeEntry( "Patience", d->popupDuration->value() );
+
     config.writeEntry( "HideMinimizeButton",
                        d->hideMinimizeButton->isChecked() );
     config.writeEntry( "HideLockButton",
@@ -319,6 +333,8 @@
     KConfigGroup config = KGlobal::config()->group( "General Settings" );
     d->imageFolderEdit->setText( config.readEntry( "ImageFolder", dir ) );
     d->slideInterval->setValue( config.readEntry( "SlideInterval", 10 ) );
+    d->popupDuration->setValue( config.readEntry( "Patience", 30 ) );
+
     d->hideMinimizeButton->setChecked(
         config.readEntry( "HideMinimizeButton", false ) );
     d->hideLockButton->setChecked(


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic