[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/kwin
From: Rohan Ramdas Prabhu <rohan () rohanprabhu ! com>
Date: 2010-05-31 21:24:41
Message-ID: 20100531212441.A12F7AC8C6 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1133002 by rohanp:
In this commit, the following files are updated:
main.cpp : Added a command argument. If 'stest' is set, then a testing
environment is setup which is used to test scripting for kwin.
Currently, the test setup only consists of loading a default script, but
in the feature it is expected to run a small text editor kind of thing
for testing.
Usage:
kwin --stest
CMakeLists.txt : Add the files corresponding to kwin_scripting the main
intention of which is to provide scripting support for kwin.
kwintabbox.desktop : An unintentional edit. Mostly harmless.
M +6 -1 CMakeLists.txt
M +20 -0 main.cpp
--- trunk/KDE/kdebase/workspace/kwin/CMakeLists.txt #1133001:1133002
@@ -111,6 +111,11 @@
tilinglayout.cpp
tilinglayoutfactory.cpp
+ #load the scripting related functions
+ scripttesting.cpp
+ scripting/scripting.cpp
+ scripting/workspace.cpp
+
# tiling layouts
# spiral
#tilinglayouts/spiral/spiralfactory.cpp
@@ -130,7 +135,7 @@
kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
-target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} \
${QT_QTXML_LIBRARY} kephal kworkspace kdecorations kwineffects ${X11_LIBRARIES}) \
+target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} \
${QT_QTXML_LIBRARY} ${QT_QTSCRIPT_LIBRARY} kephal kworkspace kdecorations kwineffects \
${X11_LIBRARIES})
if(OPENGL_FOUND)
add_subdirectory(opengltest)
--- trunk/KDE/kdebase/workspace/kwin/main.cpp #1133001:1133002
@@ -40,6 +40,11 @@
#include <kdefakes.h>
#include <QtDBus/QtDBus>
+#include <QMessageBox>
+#include <QEvent>
+#include "scripttesting.h"
+#include "scripting/scripting.h"
+
#include <kdialog.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -53,6 +58,7 @@
#include "sm.h"
#include "utils.h"
#include "effects.h"
+#include <stdlib.h>
#define INT8 _X11INT8
#define INT32 _X11INT32
@@ -487,8 +493,11 @@
args.add( "lock", ki18n( "Disable configuration options" ));
args.add( "replace", ki18n( "Replace already-running ICCCM2.0-compliant window \
manager" ));
args.add( "crashes <n>", ki18n( "Indicate that KWin has recently crashed n \
times" )); + args.add( "stest", ki18n( "Load the script testing dialog" ));
KCmdLineArgs::addCmdLineOptions( args );
+ ScriptTesting* stestWindow;
+
if( KDE_signal( SIGTERM, KWin::sighandler ) == SIG_IGN )
KDE_signal( SIGTERM, SIG_IGN );
if( KDE_signal( SIGINT, KWin::sighandler ) == SIG_IGN )
@@ -503,6 +512,7 @@
KWin::SessionManager weAreIndeed;
KWin::SessionSaveDoneHelper helper;
KGlobal::locale()->insertCatalog( "kwin_effects" );
+ KWin::Scripting scripting;
// Announce when KWIN_DIRECT_GL is set for above HACK
if( qstrcmp( qgetenv( "KWIN_DIRECT_GL" ), "1" ) == 0 )
@@ -519,6 +529,16 @@
QDBusConnection::sessionBus().interface()->registerService(
appname, QDBusConnectionInterface::DontQueueService );
+ KCmdLineArgs* sargs = KCmdLineArgs::parsedArgs();
+
+ if(sargs->isSet("stest")) {
+ stestWindow = new ScriptTesting();
+ stestWindow->setEngine(&scripting);
+ stestWindow->runDefault();
+ //QEvent* showSTest = new QEvent(QEvent::Type(QEvent::User + 7));
+ //a.postEvent(stestWindow, showSTest, INT_MIN);
+ }
+
return a.exec();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic