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

List:       kde-commits
Subject:    extragear/utils/rsibreak/src
From:       Juan Luis Baptiste <juan.baptiste () kdemail ! net>
Date:       2010-10-15 0:53:01
Message-ID: 20101015005301.ADD34AC895 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1186028 by jbaptiste:

Added a configuration option to hide the postpone break button.
GUI


 M  +5 -0      breakbase.cpp  
 M  +1 -0      breakbase.h  
 M  +5 -0      breakcontrol.cpp  
 M  +1 -0      breakcontrol.h  
 M  +4 -0      rsirelaxpopup.cpp  
 M  +3 -0      rsirelaxpopup.h  
 M  +3 -0      rsiwidget.cpp  
 M  +9 -0      setupmaximized.cpp  


--- trunk/extragear/utils/rsibreak/src/breakbase.cpp #1186027:1186028
@@ -122,6 +122,11 @@
     m_breakControl->showLock( show );
 }
 
+void BreakBase::showPostpone( bool show )
+{
+    m_breakControl->showPostpone( show );
+}
+
 void BreakBase::disableShortcut( bool disable )
 {
     m_disableShortcut = disable;
--- trunk/extragear/utils/rsibreak/src/breakbase.h #1186027:1186028
@@ -42,6 +42,7 @@
     virtual void setLabel( const QString& );
     void showMinimize( bool );
     void showLock( bool );
+    void showPostpone( bool );    
     void disableShortcut( bool disable );
     void setGrayEffectOnAllScreens( bool on );
     void setGrayEffectLevel( int level );
--- trunk/extragear/utils/rsibreak/src/breakcontrol.cpp #1186027:1186028
@@ -101,6 +101,11 @@
     m_lockButton->setVisible( show );
 }
 
+void BreakControl::showPostpone( bool show )
+{
+    m_postponeButton->setVisible( show );
+}
+
 void BreakControl::paintEvent( QPaintEvent *event )
 {
     if ( event->type() == QEvent::Paint ) {
--- trunk/extragear/utils/rsibreak/src/breakcontrol.h #1186027:1186028
@@ -35,6 +35,7 @@
     void setText( const QString& );
     void showMinimize( bool show );
     void showLock( bool show );
+    void showPostpone(bool arg1);
 
 protected:
     void paintEvent( QPaintEvent *event );
--- trunk/extragear/utils/rsibreak/src/rsirelaxpopup.cpp #1186027:1186028
@@ -152,4 +152,8 @@
     m_lockbutton->setHidden( b );
 }
 
+void RSIRelaxPopup::setPostponeButtonHidden( bool b )
+{
+    m_postponebutton->setHidden( b );
+}
 #include "rsirelaxpopup.moc"
--- trunk/extragear/utils/rsibreak/src/rsirelaxpopup.h #1186027:1186028
@@ -64,6 +64,9 @@
     /** Hides the lock button **/
     void setLockButtonHidden( bool );
 
+    /** Hides the postpone break button **/
+    void setPostponeButtonHidden( bool );
+    
 signals:
     /** Ask the main widget to lock down the desktop. */
     void lock();
--- trunk/extragear/utils/rsibreak/src/rsiwidget.cpp #1186027:1186028
@@ -253,6 +253,8 @@
         config.readEntry( "HideMinimizeButton", false ) );
     m_relaxpopup->setLockButtonHidden(
         config.readEntry( "HideLockButton", false ) );
+    m_relaxpopup->setPostponeButtonHidden(
+        config.readEntry( "HidePostponeButton", false ) );
 
     m_usePlasma = config.readEntry( "UsePlasma", false );
     m_usePlasmaRO = config.readEntry( "UsePlasmaReadOnly", false );
@@ -306,6 +308,7 @@
 
     m_effect->showMinimize( !config.readEntry( "HideMinimizeButton", false ) );
     m_effect->showLock( !config.readEntry( "HideLockButton", false ) );
+    m_effect->showPostpone( !config.readEntry( "HidePostponeButton", false ) );
     m_effect->disableShortcut( config.readEntry( "DisableAccel", false ) );
 }
 
--- trunk/extragear/utils/rsibreak/src/setupmaximized.cpp #1186027:1186028
@@ -53,6 +53,7 @@
     QCheckBox*        searchRecursiveCheck;
     QCheckBox*        hideMinimizeButton;
     QCheckBox*        hideLockButton;
+    QCheckBox*        hidePostponeButton;    
     QCheckBox*        disableAccel;
     QPushButton*      changePathButton;
     KIntNumInput*     slideInterval;
@@ -98,6 +99,9 @@
     d->hideLockButton = new QCheckBox( i18n( "&Hide lock button" ), this );
     d->hideLockButton->setWhatsThis( i18n( "Check this option to disable and "
                                            "hide the lock button. This way you can \
prevent pressing the wrong button." ) ); +    d->hidePostponeButton = new QCheckBox( \
i18n( "&Hide postpone button" ), this ); +    d->hidePostponeButton->setWhatsThis( \
i18n( "Check this option to disable and " +                                           \
"hide the postpone break button. This way you can prevent pressing the wrong button." \
) );  
     d->disableAccel = new QCheckBox( i18n( "&Disable shortcut" ), this );
     d->disableAccel->setWhatsThis( i18n( "Check this option to disable the skip "
@@ -106,6 +110,7 @@
     QVBoxLayout *vbox1 = new QVBoxLayout( skipBox );
     vbox1->addWidget( d->hideMinimizeButton );
     vbox1->addWidget( d->hideLockButton );
+    vbox1->addWidget( d->hidePostponeButton );
     vbox1->addWidget( d->disableAccel );
     vbox1->addStretch( 1 );
     skipBox->setLayout( vbox1 );
@@ -304,6 +309,8 @@
                        d->hideMinimizeButton->isChecked() );
     config.writeEntry( "HideLockButton",
                        d->hideLockButton->isChecked() );
+    config.writeEntry( "HidePostponeButton",
+                       d->hidePostponeButton->isChecked() );    
     config.writeEntry( "SearchRecursiveCheck",
                        d->searchRecursiveCheck->isChecked() );
     config.writeEntry( "ShowSmallImagesCheck",
@@ -339,6 +346,8 @@
         config.readEntry( "HideMinimizeButton", false ) );
     d->hideLockButton->setChecked(
         config.readEntry( "HideLockButton", false ) );
+    d->hidePostponeButton->setChecked(
+        config.readEntry( "HidePostponeButton", false ) );
 
     const int effect = d->effectBox->findData( QVariant(
                            config.readEntry( "Effect", 0 ) ) );


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

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