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

List:       kde-artists
Subject:    [kde-artists] KDE/kdebase/workspace/kdm
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2010-03-20 21:25:16
Message-ID: 20100320212516.5184EAC86A () svn ! kde ! org
[Download RAW message or body]

SVN commit 1105667 by ossi:

add shortcut to toggle theme debugging

CCMAIL: kde-artists@kde.org

 M  +9 -0      config.def  
 M  +12 -0     kfrontend/kgreeter.cpp  
 M  +1 -0      kfrontend/kgreeter.h  
 M  +3 -1      kfrontend/themer/kdmthemer.h  


--- trunk/KDE/kdebase/workspace/kdm/config.def #1105666:1105667
@@ -2706,3 +2706,12 @@
 Description:
  The theme to use for the greeter. Can point to either a directory or an XML
  file.
+
+Key: AllowThemeDebug
+Type: bool
+Default: false
+User: greeter
+Instance: #*/true
+Comment: &
+Description:
+ Enable the Alt-Ctrl-D shortcut to toggle greeter theme debugging.
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/kgreeter.cpp #1105666:1105667
@@ -51,6 +51,7 @@
 #include <QMovie>
 #include <QPainter>
 #include <QPushButton>
+#include <QShortcut>
 #include <QStyle>
 
 #include <sys/types.h>
@@ -895,6 +896,10 @@
 
 	themer->setWidget( this );
 
+	if (_allowThemeDebug)
+		new QShortcut( QKeySequence( QLatin1String("Ctrl+Alt+D") ),
+		               this, SLOT(slotDebugToggled()) );
+
 	connect( themer, SIGNAL(activated( const QString & )),
 	         SLOT(slotThemeActivated( const QString & )) );
 
@@ -993,6 +998,13 @@
 	themer->setWidget( 0 );
 }
 
+void
+KThemedGreeter::slotDebugToggled()
+{
+	if ((debugLevel ^= DEBUG_THEMING))
+		themer->slotNeedPlacement();
+}
+
 bool
 KThemedGreeter::event( QEvent *e )
 {
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/kgreeter.h #1105666:1105667
@@ -136,6 +136,7 @@
 	void slotThemeActivated( const QString &id );
 	void slotSessMenu();
 	void slotActionMenu();
+	void slotDebugToggled();
 
   protected:
 	virtual void updateStatus( bool fail, bool caps, int timedleft );
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/themer/kdmthemer.h #1105666:1105667
@@ -72,6 +72,9 @@
 
 	void paintBackground( QPaintDevice *dev, const QRect &rect, bool primaryScreen );
 
+public Q_SLOTS:
+	void slotNeedPlacement();
+
 Q_SIGNALS:
 	void activated( const QString &id );
 
@@ -104,7 +107,6 @@
 
 private Q_SLOTS:
 	void update( int x, int y, int w, int h );
-	void slotNeedPlacement();
 	void slotNeedPlugging();
 
 };
______________________________________________________________________________
kde-artists@kde.org |  https://mail.kde.org/mailman/listinfo/kde-artists
[prev in list] [next in list] [prev in thread] [next in thread] 

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