[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-09-30 0:49:08
Message-ID: 20100930004909.91795AC892 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1181096 by toma:
Add a hide lock button switch to the configuration.
BUG=226891
M +5 -0 breakbase.cpp
M +1 -0 breakbase.h
M +5 -0 breakcontrol.cpp
M +1 -0 breakcontrol.h
M +5 -0 rsirelaxpopup.cpp
M +3 -0 rsirelaxpopup.h
M +3 -0 rsiwidget.cpp
M +10 -0 setupmaximized.cpp
--- trunk/extragear/utils/rsibreak/src/breakbase.cpp #1181095:1181096
@@ -115,6 +115,11 @@
m_breakControl->showMinimize( show );
}
+void BreakBase::showLock( bool show )
+{
+ m_breakControl->showLock( show );
+}
+
void BreakBase::disableShortcut( bool disable )
{
m_disableShortcut = disable;
--- trunk/extragear/utils/rsibreak/src/breakbase.h #1181095:1181096
@@ -40,6 +40,7 @@
virtual void deactivate();
virtual void setLabel( const QString& );
void showMinimize( bool );
+ void showLock( bool );
void disableShortcut( bool disable );
void setGrayEffectOnAllScreens( bool on );
void setGrayEffectLevel( int level );
--- trunk/extragear/utils/rsibreak/src/breakcontrol.cpp #1181095:1181096
@@ -83,6 +83,11 @@
m_skipButton->setVisible( show );
}
+void BreakControl::showLock( bool show )
+{
+ m_lockButton->setVisible( show );
+}
+
void BreakControl::paintEvent( QPaintEvent *event )
{
if ( event->type() == QEvent::Paint ) {
--- trunk/extragear/utils/rsibreak/src/breakcontrol.h #1181095:1181096
@@ -33,6 +33,7 @@
BreakControl( QWidget*, Qt::WindowType );
void setText( const QString& );
void showMinimize( bool show );
+ void showLock( bool show );
protected:
void paintEvent( QPaintEvent *event );
--- trunk/extragear/utils/rsibreak/src/rsirelaxpopup.cpp #1181095:1181096
@@ -142,4 +142,9 @@
m_skipbutton->setHidden( b );
}
+void RSIRelaxPopup::setLockButtonHidden( bool b )
+{
+ m_lockbutton->setHidden( b );
+}
+
#include "rsirelaxpopup.moc"
--- trunk/extragear/utils/rsibreak/src/rsirelaxpopup.h #1181095:1181096
@@ -59,6 +59,9 @@
/** Hides the skip button **/
void setSkipButtonHidden( bool );
+ /** Hides the lock button **/
+ void setLockButtonHidden( bool );
+
signals:
/** Ask the main widget to lock down the desktop. */
void lock();
--- trunk/extragear/utils/rsibreak/src/rsiwidget.cpp #1181095:1181096
@@ -296,6 +296,8 @@
m_relaxpopup->setSkipButtonHidden(
config.readEntry( "HideMinimizeButton", false ) );
+ m_relaxpopup->setLockButtonHidden(
+ config.readEntry( "HideLockButton", false ) );
m_usePlasma = config.readEntry( "UsePlasma", false );
m_usePlasmaRO = config.readEntry( "UsePlasmaReadOnly", false );
@@ -347,6 +349,7 @@
connect( m_effect, SIGNAL( lock() ), this, SLOT( slotLock() ) );
m_effect->showMinimize( !config.readEntry( "HideMinimizeButton", false ) );
+ m_effect->showLock( !config.readEntry( "HideLockButton", false ) );
m_effect->disableShortcut( config.readEntry( "DisableAccel", false ) );
}
--- trunk/extragear/utils/rsibreak/src/setupmaximized.cpp #1181095:1181096
@@ -51,6 +51,7 @@
KLineEdit* imageFolderEdit;
QCheckBox* searchRecursiveCheck;
QCheckBox* hideMinimizeButton;
+ QCheckBox* hideLockButton;
QCheckBox* disableAccel;
QPushButton* changePathButton;
QCheckBox* usePopup;
@@ -91,12 +92,17 @@
d->hideMinimizeButton->setWhatsThis( i18n( "Check this option to disable and "
"hide the skip button. This way you can \
prevent skipping the break." ) );
+ 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->disableAccel = new QCheckBox( i18n( "&Disable shortcut" ), this );
d->disableAccel->setWhatsThis( i18n( "Check this option to disable the skip "
"shortcut. This way you can prevent \
skipping the break." ) );
QVBoxLayout *vbox1 = new QVBoxLayout( skipBox );
vbox1->addWidget( d->hideMinimizeButton );
+ vbox1->addWidget( d->hideLockButton );
vbox1->addWidget( d->disableAccel );
vbox1->addStretch( 1 );
skipBox->setLayout( vbox1 );
@@ -268,6 +274,8 @@
config.writeEntry( "ImageFolder", d->imageFolderEdit->text() );
config.writeEntry( "HideMinimizeButton",
d->hideMinimizeButton->isChecked() );
+ config.writeEntry( "HideLockButton",
+ d->hideLockButton->isChecked() );
config.writeEntry( "SearchRecursiveCheck",
d->searchRecursiveCheck->isChecked() );
config.writeEntry( "ShowSmallImagesCheck",
@@ -298,6 +306,8 @@
d->imageFolderEdit->setText( config.readEntry( "ImageFolder", dir ) );
d->hideMinimizeButton->setChecked(
config.readEntry( "HideMinimizeButton", false ) );
+ d->hideLockButton->setChecked(
+ config.readEntry( "HideLockButton", 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