--- kicker/applets/lockout/lockout.cpp.orig	2012-01-30 19:50:16.000000000 +0100
+++ kicker/applets/lockout/lockout.cpp	2012-01-30 19:53:41.000000000 +0100
@@ -31,6 +31,7 @@
 #include <tqtoolbutton.h>
 #include <tqstyle.h>
 #include <tqtooltip.h>
+#include <tqobjectlist.h>
 
 #include <dcopclient.h>
 
@@ -54,7 +55,7 @@
 }
 
 Lockout::Lockout( const TQString& configFile, TQWidget *parent, const char *name)
-    : KPanelApplet( configFile, KPanelApplet::Normal, 0, parent, name ), bTransparent( false )
+    : KPanelApplet( configFile, KPanelApplet::Normal, 0, parent, name ), bTransparent( false ), bAlternateButtonOrder( false )
 {
     KConfig *conf = config();
     conf->setGroup("lockout");
@@ -71,8 +72,17 @@
     layout->setMargin( 0 );
     layout->setSpacing( 0 );
 
-    lockButton = new SimpleButton( this, "lock");
-    logoutButton = new SimpleButton( this, "logout");
+    //lockButton = new SimpleButton( this, "lock");
+    //logoutButton = new SimpleButton( this, "logout");
+    bAlternateButtonOrder = !conf->readBoolEntry( "OriginalLayout",false );
+
+    if (bAlternateButtonOrder) {
+       lockButton = new SimpleButton( this, "lock");
+       logoutButton = new SimpleButton( this, "logout");
+    } else {
+       logoutButton = new SimpleButton( this, "logout");
+       lockButton = new SimpleButton( this, "lock");
+    }
 
     TQToolTip::add( lockButton, i18n("Lock the session") );
     TQToolTip::add( logoutButton, i18n("Log out") );
@@ -204,12 +214,15 @@
                                    this, TQT_SLOT( lock() ) );
                 popup->insertSeparator();
                 
+                popup->insertItem( i18n( "&Alternate Button Order" ), 90 );
                 i18n("&Transparent");
                 //popup->insertItem( i18n( "&Transparent" ), 100 );
                 popup->insertItem( SmallIcon( "configure" ),
                                    i18n( "&Configure Screen Saver..." ),
                                    this, TQT_SLOT( slotLockPrefs() ) );
 
+                popup->setItemChecked( 90, bAlternateButtonOrder );
+                popup->connectItem( 90, this, TQT_SLOT( slotButtonOrder() ));
                 //popup->setItemChecked( 100, bTransparent );
                 //popup->connectItem(100, this, TQT_SLOT( slotTransparent() ) );
                 //if (conf->entryIsImmutable( "Transparent" ))
@@ -226,11 +239,15 @@
                 popup->insertItem( SmallIcon( "exit" ), i18n("&Log Out..."),
                                    this, TQT_SLOT( logout() ) );
                 popup->insertSeparator();
+                
+                popup->insertItem( i18n( "&Alternate Button Order" ), 90 );
                 //popup->insertItem( i18n( "&Transparent" ), 100 );
                 popup->insertItem( SmallIcon( "configure" ),
                                    i18n( "&Configure Session Manager..." ),
                                    this, TQT_SLOT( slotLogoutPrefs() ) );
 
+                popup->setItemChecked( 90, bAlternateButtonOrder );
+                popup->connectItem( 90, this, TQT_SLOT( slotButtonOrder() ));
                 //popup->setItemChecked( 100, bTransparent );
                 //popup->connectItem(100, this, TQT_SLOT( slotTransparent() ) );
                 //if (conf->entryIsImmutable( "Transparent" ))
@@ -263,6 +280,26 @@
     conf->sync();
 }
 
+void Lockout::slotButtonOrder() {
+   TQObject* child = children()->getFirst();
+
+   if (bAlternateButtonOrder)
+      child = lockButton;
+   else
+      child = logoutButton;
+
+   removeChild(child);
+   insertChild(child);
+   update();
+
+   bAlternateButtonOrder = !bAlternateButtonOrder;
+
+   KConfig* conf = config();
+   conf->setGroup("lockout");
+   conf->writeEntry( "OroginalLayout", !bAlternateButtonOrder );
+   conf->sync();
+}
+
 void Lockout::slotLogoutPrefs()
 {
     // Run the logout settings.
--- kicker/applets/lockout/lockout.h.orig	2012-01-30 19:53:57.000000000 +0100
+++ kicker/applets/lockout/lockout.h	2012-01-30 19:54:39.000000000 +0100
@@ -36,6 +36,7 @@
 
     void slotLockPrefs();
     void slotLogoutPrefs();
+    void slotButtonOrder();
     void slotTransparent();
     void slotIconChanged();
 
@@ -47,6 +48,7 @@
     TQBoxLayout *layout;
 
     bool bTransparent;
+    bool bAlternateButtonOrder;
 };
 
 #endif // LOCKOUT_H
