[kde-artists] KDE/kdebase/workspace/kdm

Oswald Buddenhagen <[email protected]>
Newsgroups gmane.comp.kde.artists
Message-ID <[email protected]>
SVN commit 1105667 by ossi:

add shortcut to toggle theme debugging

CCMAIL: [email protected]

 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();
 
 };
______________________________________________________________________________
[email protected] |  https://mail.kde.org/mailman/listinfo/kde-artists
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.