summaryrefslogtreecommitdiffstats
path: root/kwin/kcmkwin
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kwin/kcmkwin
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/kcmkwin')
-rw-r--r--kwin/kcmkwin/Makefile.am1
-rw-r--r--kwin/kcmkwin/kwindecoration/Makefile.am18
-rw-r--r--kwin/kcmkwin/kwindecoration/buttons.cpp883
-rw-r--r--kwin/kcmkwin/kwindecoration/buttons.h227
-rw-r--r--kwin/kcmkwin/kwindecoration/kwindecoration.cpp613
-rw-r--r--kwin/kcmkwin/kwindecoration/kwindecoration.desktop231
-rw-r--r--kwin/kcmkwin/kwindecoration/kwindecoration.h135
-rw-r--r--kwin/kcmkwin/kwindecoration/kwindecorationIface.h44
-rw-r--r--kwin/kcmkwin/kwindecoration/pixmaps.h110
-rw-r--r--kwin/kcmkwin/kwindecoration/preview.cpp507
-rw-r--r--kwin/kcmkwin/kwindecoration/preview.h150
-rw-r--r--kwin/kcmkwin/kwinoptions/AUTHORS12
-rw-r--r--kwin/kcmkwin/kwinoptions/ChangeLog51
-rw-r--r--kwin/kcmkwin/kwinoptions/Makefile.am18
-rw-r--r--kwin/kcmkwin/kwinoptions/kwinactions.desktop233
-rw-r--r--kwin/kcmkwin/kwinoptions/kwinadvanced.desktop232
-rw-r--r--kwin/kcmkwin/kwinoptions/kwinfocus.desktop222
-rw-r--r--kwin/kcmkwin/kwinoptions/kwinmoving.desktop229
-rw-r--r--kwin/kcmkwin/kwinoptions/kwinoptions.desktop225
-rw-r--r--kwin/kcmkwin/kwinoptions/kwintranslucency.desktop195
-rw-r--r--kwin/kcmkwin/kwinoptions/main.cpp262
-rw-r--r--kwin/kcmkwin/kwinoptions/main.h100
-rw-r--r--kwin/kcmkwin/kwinoptions/mouse.cpp856
-rw-r--r--kwin/kcmkwin/kwinoptions/mouse.h137
-rw-r--r--kwin/kcmkwin/kwinoptions/windows.cpp1627
-rw-r--r--kwin/kcmkwin/kwinoptions/windows.h289
-rw-r--r--kwin/kcmkwin/kwinrules/Makefile.am29
-rw-r--r--kwin/kcmkwin/kwinrules/detectwidget.cpp223
-rw-r--r--kwin/kcmkwin/kwinrules/detectwidget.h86
-rw-r--r--kwin/kcmkwin/kwinrules/detectwidgetbase.ui218
-rw-r--r--kwin/kcmkwin/kwinrules/editshortcutbase.ui164
-rw-r--r--kwin/kcmkwin/kwinrules/kcm.cpp103
-rw-r--r--kwin/kcmkwin/kwinrules/kcm.h53
-rw-r--r--kwin/kcmkwin/kwinrules/kwinrules.desktop209
-rw-r--r--kwin/kcmkwin/kwinrules/kwinsrc.cpp8
-rw-r--r--kwin/kcmkwin/kwinrules/main.cpp294
-rw-r--r--kwin/kcmkwin/kwinrules/ruleslist.cpp200
-rw-r--r--kwin/kcmkwin/kwinrules/ruleslist.h59
-rw-r--r--kwin/kcmkwin/kwinrules/ruleslistbase.ui91
-rw-r--r--kwin/kcmkwin/kwinrules/ruleswidget.cpp803
-rw-r--r--kwin/kcmkwin/kwinrules/ruleswidget.h148
-rw-r--r--kwin/kcmkwin/kwinrules/ruleswidgetbase.ui2597
42 files changed, 12892 insertions, 0 deletions
diff --git a/kwin/kcmkwin/Makefile.am b/kwin/kcmkwin/Makefile.am
new file mode 100644
index 000000000..ff552e928
--- /dev/null
+++ b/kwin/kcmkwin/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = kwinoptions kwindecoration kwinrules
diff --git a/kwin/kcmkwin/kwindecoration/Makefile.am b/kwin/kcmkwin/kwindecoration/Makefile.am
new file mode 100644
index 000000000..4d908001f
--- /dev/null
+++ b/kwin/kcmkwin/kwindecoration/Makefile.am
@@ -0,0 +1,18 @@
+INCLUDES = -I$(srcdir)/../../lib $(all_includes)
+
+kde_module_LTLIBRARIES = kcm_kwindecoration.la
+
+kcm_kwindecoration_la_SOURCES = kwindecoration.cpp buttons.cpp kwindecorationIface.skel preview.cpp
+noinst_HEADERS = kwindecoration.h kwindecorationIface.h buttons.h preview.h
+
+kcm_kwindecoration_la_LDFLAGS = \
+ -module -avoid-version $(all_libraries) -no-undefined
+
+kcm_kwindecoration_la_LIBADD = $(LIB_KDEUI) ../../lib/libkdecorations.la
+
+METASOURCES = AUTO
+
+messages:
+ $(XGETTEXT) *.cpp -o $(podir)/kcmkwindecoration.pot
+
+xdg_apps_DATA = kwindecoration.desktop
diff --git a/kwin/kcmkwin/kwindecoration/buttons.cpp b/kwin/kcmkwin/kwindecoration/buttons.cpp
new file mode 100644
index 000000000..888e092e7
--- /dev/null
+++ b/kwin/kcmkwin/kwindecoration/buttons.cpp
@@ -0,0 +1,883 @@
+/*
+ This is the new kwindecoration kcontrol module
+
+ Copyright (c) 2004, Sandro Giessl <sandro@giessl.com>
+ Copyright (c) 2001
+ Karol Szwed <gallium@kde.org>
+ http://gallium.n3.net/
+
+ Supports new kwin configuration plugins, and titlebar button position
+ modification via dnd interface.
+
+ Based on original "kwintheme" (Window Borders)
+ Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#include <qheader.h>
+#include <qpainter.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qstyle.h>
+
+#include <kdebug.h>
+
+#include <kdialog.h>
+#include <klocale.h>
+#include <kglobalsettings.h>
+
+#include <kdecorationfactory.h>
+
+#include "buttons.h"
+#include "pixmaps.h"
+
+
+#define BUTTONDRAGMIMETYPE "application/x-kde_kwindecoration_buttons"
+ButtonDrag::ButtonDrag( Button btn, QWidget* parent, const char* name)
+ : QStoredDrag( BUTTONDRAGMIMETYPE, parent, name)
+{
+ QByteArray data;
+ QDataStream stream(data, IO_WriteOnly);
+ stream << btn.name;
+ stream << btn.icon;
+ stream << btn.type.unicode();
+ stream << (int) btn.duplicate;
+ stream << (int) btn.supported;
+ setEncodedData( data );
+}
+
+
+bool ButtonDrag::canDecode( QDropEvent* e )
+{
+ return e->provides( BUTTONDRAGMIMETYPE );
+}
+
+bool ButtonDrag::decode( QDropEvent* e, Button& btn )
+{
+ QByteArray data = e->data( BUTTONDRAGMIMETYPE );
+ if ( data.size() )
+ {
+ e->accept();
+ QDataStream stream(data, IO_ReadOnly);
+ stream >> btn.name;
+ stream >> btn.icon;
+ ushort type;
+ stream >> type;
+ btn.type = QChar(type);
+ int duplicate;
+ stream >> duplicate;
+ btn.duplicate = duplicate;
+ int supported;
+ stream >> supported;
+ btn.supported = supported;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+Button::Button()
+{
+}
+
+Button::Button(const QString& n, const QBitmap& i, QChar t, bool d, bool s)
+ : name(n),
+ icon(i),
+ type(t),
+ duplicate(d),
+ supported(s)
+{
+}
+
+Button::~Button()
+{
+}
+
+// helper function to deal with the Button's bitmaps more easily...
+QPixmap bitmapPixmap(const QBitmap& bm, const QColor& color)
+{
+ QPixmap pm(bm.size() );
+ pm.setMask(bm);
+ QPainter p(&pm);
+ p.setPen(color);
+ p.drawPixmap(0,0,bm);
+ p.end();
+ return pm;
+}
+
+
+ButtonSource::ButtonSource(QWidget *parent, const char* name)
+ : KListView(parent, name)
+{
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+
+ setResizeMode(QListView::AllColumns);
+ setDragEnabled(true);
+ setAcceptDrops(true);
+ setDropVisualizer(false);
+ setSorting(-1);
+ header()->setClickEnabled(false);
+ header()->hide();
+
+ addColumn(i18n("Buttons") );
+}
+
+ButtonSource::~ButtonSource()
+{
+}
+
+QSize ButtonSource::sizeHint() const
+{
+ // make the sizeHint height a bit smaller than the one of QListView...
+
+ if ( cachedSizeHint().isValid() )
+ return cachedSizeHint();
+
+ constPolish();
+
+ QSize s( header()->sizeHint() );
+
+ if ( verticalScrollBar()->isVisible() )
+ s.setWidth( s.width() + style().pixelMetric(QStyle::PM_ScrollBarExtent) );
+ s += QSize(frameWidth()*2,frameWidth()*2);
+
+ // size hint: 4 lines of text...
+ s.setHeight( s.height() + fontMetrics().lineSpacing()*3 );
+
+ setCachedSizeHint( s );
+
+ return s;
+}
+
+void ButtonSource::hideAllButtons()
+{
+ QListViewItemIterator it(this);
+ while (it.current() ) {
+ it.current()->setVisible(false);
+ ++it;
+ }
+}
+
+void ButtonSource::showAllButtons()
+{
+ QListViewItemIterator it(this);
+ while (it.current() ) {
+ it.current()->setVisible(true);
+ ++it;
+ }
+}
+
+void ButtonSource::showButton( QChar btn )
+{
+ QListViewItemIterator it(this);
+ while (it.current() ) {
+ ButtonSourceItem *item = dynamic_cast<ButtonSourceItem*>(it.current() );
+ if (item && item->button().type == btn) {
+ it.current()->setVisible(true);
+ return;
+ }
+ ++it;
+ }
+}
+
+void ButtonSource::hideButton( QChar btn )
+{
+ QListViewItemIterator it(this);
+ while (it.current() ) {
+ ButtonSourceItem *item = dynamic_cast<ButtonSourceItem*>(it.current() );
+ if (item && item->button().type == btn && !item->button().duplicate) {
+ it.current()->setVisible(false);
+ return;
+ }
+ ++it;
+ }
+}
+
+bool ButtonSource::acceptDrag(QDropEvent* e) const
+{
+ return acceptDrops() && ButtonDrag::canDecode(e);
+}
+
+QDragObject *ButtonSource::dragObject()
+{
+ ButtonSourceItem *i = dynamic_cast<ButtonSourceItem*>(selectedItem() );
+
+ if (i) {
+ ButtonDrag *bd = new ButtonDrag(i->button(), viewport(), "button_drag");
+ bd->setPixmap(bitmapPixmap(i->button().icon, colorGroup().foreground() ));
+ return bd;
+ }
+
+ return 0;
+}
+
+ButtonDropSiteItem::ButtonDropSiteItem(const Button& btn)
+ : m_button(btn)
+{
+}
+
+ButtonDropSiteItem::~ButtonDropSiteItem()
+{
+}
+
+Button ButtonDropSiteItem::button()
+{
+ return m_button;
+}
+
+int ButtonDropSiteItem::width()
+{
+// return m_button.icon.width();
+ return 20;
+}
+
+int ButtonDropSiteItem::height()
+{
+// return m_button.icon.height();
+ return 20;
+}
+
+void ButtonDropSiteItem::draw(QPainter *p, const QColorGroup& cg, QRect r)
+{
+// p->fillRect(r, cg.base() );
+ if (m_button.supported)
+ p->setPen(cg.foreground() );
+ else
+ p->setPen(cg.mid() );
+ QBitmap &i = m_button.icon;
+ p->drawPixmap(r.left()+(r.width()-i.width())/2, r.top()+(r.height()-i.height())/2, i);
+}
+
+
+ButtonDropSite::ButtonDropSite( QWidget* parent, const char* name )
+ : QFrame( parent, name ),
+ m_selected(0)
+{
+ setAcceptDrops( TRUE );
+ setFrameShape( WinPanel );
+ setFrameShadow( Raised );
+ setMinimumHeight( 26 );
+ setMaximumHeight( 26 );
+ setMinimumWidth( 250 ); // Ensure buttons will fit
+}
+
+ButtonDropSite::~ButtonDropSite()
+{
+ clearLeft();
+ clearRight();
+}
+
+void ButtonDropSite::clearLeft()
+{
+ while (!buttonsLeft.isEmpty() ) {
+ ButtonDropSiteItem *item = buttonsLeft.first();
+ if (removeButton(item) ) {
+ emit buttonRemoved(item->button().type);
+ delete item;
+ }
+ }
+}
+
+void ButtonDropSite::clearRight()
+{
+ while (!buttonsRight.isEmpty() ) {
+ ButtonDropSiteItem *item = buttonsRight.first();
+ if (removeButton(item) ) {
+ emit buttonRemoved(item->button().type);
+ delete item;
+ }
+ }
+}
+
+void ButtonDropSite::dragMoveEvent( QDragMoveEvent* e )
+{
+ QPoint p = e->pos();
+ if (leftDropArea().contains(p) || rightDropArea().contains(p) || buttonAt(p) ) {
+ e->accept();
+
+ // 2 pixel wide drop visualizer...
+ QRect r = contentsRect();
+ int x = -1;
+ if (leftDropArea().contains(p) ) {
+ x = leftDropArea().left();
+ } else if (rightDropArea().contains(p) ) {
+ x = rightDropArea().right()+1;
+ } else {
+ ButtonDropSiteItem *item = buttonAt(p);
+ if (item) {
+ if (p.x() < item->rect.left()+item->rect.width()/2 ) {
+ x = item->rect.left();
+ } else {
+ x = item->rect.right()+1;
+ }
+ }
+ }
+ if (x != -1) {
+ QRect tmpRect(x, r.y(), 2, r.height() );
+ if (tmpRect != m_oldDropVisualizer) {
+ cleanDropVisualizer();
+ m_oldDropVisualizer = tmpRect;
+ update(tmpRect);
+ }
+ }
+
+ } else {
+ e->ignore();
+
+ cleanDropVisualizer();
+ }
+}
+
+void ButtonDropSite::cleanDropVisualizer()
+{
+ if (m_oldDropVisualizer.isValid())
+ {
+ QRect rect = m_oldDropVisualizer;
+ m_oldDropVisualizer = QRect(); // rect is invalid
+ update(rect);
+ }
+}
+
+void ButtonDropSite::dragEnterEvent( QDragEnterEvent* e )
+{
+ if ( ButtonDrag::canDecode( e ) )
+ e->accept();
+}
+
+void ButtonDropSite::dragLeaveEvent( QDragLeaveEvent* /* e */ )
+{
+ cleanDropVisualizer();
+}
+
+void ButtonDropSite::dropEvent( QDropEvent* e )
+{
+ cleanDropVisualizer();
+
+ QPoint p = e->pos();
+
+ // collect information where to insert the dropped button
+ ButtonList *buttonList = 0;
+ ButtonList::iterator buttonPosition;
+
+ if (leftDropArea().contains(p) ) {
+ buttonList = &buttonsLeft;
+ buttonPosition = buttonsLeft.end();
+ } else if (rightDropArea().contains(p) ) {
+ buttonList = &buttonsRight;
+ buttonPosition = buttonsRight.begin();
+ } else {
+ ButtonDropSiteItem *aboveItem = buttonAt(p);
+ if (!aboveItem)
+ return; // invalid drop. hasn't occured _over_ a button (or left/right dropArea), return...
+
+ ButtonList::iterator it;
+ if (!getItemIterator(aboveItem, buttonList, it) ) {
+ // didn't find the aboveItem. unlikely to happen since buttonAt() already seems to have found
+ // something valid. anyway...
+ return;
+ }
+
+ // got the list and the aboveItem position. now determine if the item should be inserted
+ // before aboveItem or after aboveItem.
+ QRect aboveItemRect = aboveItem->rect;
+ if (!aboveItemRect.isValid() )
+ return;
+
+ if (p.x() < aboveItemRect.left()+aboveItemRect.width()/2 ) {
+ // insert before the item
+ buttonPosition = it;
+ } else {
+ if (it != buttonList->end() )
+ buttonPosition = ++it;
+ else
+ buttonPosition = it; // already at the end(), can't increment the iterator!
+ }
+ }
+
+ // know where to insert the button. now see if we can use an existing item (drag within the widget = move)
+ // orneed to create a new one
+ ButtonDropSiteItem *buttonItem = 0;
+ if (e->source() == this && m_selected) {
+ ButtonList *oldList = 0;
+ ButtonList::iterator oldPos;
+ if (getItemIterator(m_selected, oldList, oldPos) ) {
+ if (oldPos == buttonPosition)
+ return; // button didn't change its position during the drag...
+
+ oldList->remove(oldPos);
+ buttonItem = m_selected;
+ } else {
+ return; // m_selected not found, return...
+ }
+ } else {
+ // create new button from the drop object...
+ Button btn;
+ if (ButtonDrag::decode(e, btn) ) {
+ buttonItem = new ButtonDropSiteItem(btn);
+ } else {
+ return; // something has gone wrong while we were trying to decode the drop event
+ }
+ }
+
+ // now the item can actually be inserted into the list! :)
+ (*buttonList).insert(buttonPosition, buttonItem);
+ emit buttonAdded(buttonItem->button().type);
+ emit changed();
+ recalcItemGeometry();
+ update();
+}
+
+bool ButtonDropSite::getItemIterator(ButtonDropSiteItem *item, ButtonList* &list, ButtonList::iterator &iterator)
+{
+ if (!item)
+ return false;
+
+ ButtonList::iterator it = buttonsLeft.find(item); // try the left list first...
+ if (it == buttonsLeft.end() ) {
+ it = buttonsRight.find(item); // try the right list...
+ if (it == buttonsRight.end() ) {
+ return false; // item hasn't been found in one of the list, return...
+ } else {
+ list = &buttonsRight;
+ iterator = it;
+ }
+ } else {
+ list = &buttonsLeft;
+ iterator = it;
+ }
+
+ return true;
+}
+
+QRect ButtonDropSite::leftDropArea()
+{
+ // return a 10 pixel drop area...
+ QRect r = contentsRect();
+
+ int leftButtonsWidth = calcButtonListWidth(buttonsLeft);
+ return QRect(r.left()+leftButtonsWidth, r.top(), 10, r.height() );
+}
+
+QRect ButtonDropSite::rightDropArea()
+{
+ // return a 10 pixel drop area...
+ QRect r = contentsRect();
+
+ int rightButtonsWidth = calcButtonListWidth(buttonsRight);
+ return QRect(r.right()-rightButtonsWidth-10, r.top(), 10, r.height() );
+}
+
+void ButtonDropSite::mousePressEvent( QMouseEvent* e )
+{
+ // TODO: only start the real drag after some drag distance
+ m_selected = buttonAt(e->pos() );
+ if (m_selected) {
+ ButtonDrag *bd = new ButtonDrag(m_selected->button(), this);
+ bd->setPixmap(bitmapPixmap(m_selected->button().icon, colorGroup().foreground() ) );
+ bd->dragMove();
+ }
+}
+
+void ButtonDropSite::resizeEvent(QResizeEvent*)
+{
+ recalcItemGeometry();
+}
+
+void ButtonDropSite::recalcItemGeometry()
+{
+ QRect r = contentsRect();
+
+ // update the geometry of the items in the left button list
+ int offset = r.left();
+ for (ButtonList::const_iterator it = buttonsLeft.begin(); it != buttonsLeft.end(); ++it) {
+ int w = (*it)->width();
+ (*it)->rect = QRect(offset, r.top(), w, (*it)->height() );
+ offset += w;
+ }
+
+ // the right button list...
+ offset = r.right() - calcButtonListWidth(buttonsRight);
+ for (ButtonList::const_iterator it = buttonsRight.begin(); it != buttonsRight.end(); ++it) {
+ int w = (*it)->width();
+ (*it)->rect = QRect(offset, r.top(), w, (*it)->height() );
+ offset += w;
+ }
+}
+
+ButtonDropSiteItem *ButtonDropSite::buttonAt(QPoint p) {
+ // try to find the item in the left button list
+ for (ButtonList::const_iterator it = buttonsLeft.begin(); it != buttonsLeft.end(); ++it) {
+ if ( (*it)->rect.contains(p) ) {
+ return *it;
+ }
+ }
+
+ // try to find the item in the right button list
+ for (ButtonList::const_iterator it = buttonsRight.begin(); it != buttonsRight.end(); ++it) {
+ if ( (*it)->rect.contains(p) ) {
+ return *it;
+ }
+ }
+
+ return 0;
+}
+
+bool ButtonDropSite::removeButton(ButtonDropSiteItem *item) {
+ if (!item)
+ return false;
+
+ // try to remove the item from the left button list
+ if (buttonsLeft.remove(item) >= 1) {
+ return true;
+ }
+
+ // try to remove the item from the right button list
+ if (buttonsRight.remove(item) >= 1) {
+ return true;
+ }
+
+ return false;
+}
+
+int ButtonDropSite::calcButtonListWidth(const ButtonList& btns)
+{
+ int w = 0;
+ for (ButtonList::const_iterator it = btns.begin(); it != btns.end(); ++it) {
+ w += (*it)->width();
+ }
+
+ return w;
+}
+
+bool ButtonDropSite::removeSelectedButton()
+{
+ bool succ = removeButton(m_selected);
+ if (succ) {
+ emit buttonRemoved(m_selected->button().type);
+ emit changed();
+ delete m_selected;
+ m_selected = 0;
+ recalcItemGeometry();
+ update(); // repaint...
+ }
+
+ return succ;
+}
+
+void ButtonDropSite::drawButtonList(QPainter *p, const ButtonList& btns, int offset)
+{
+ for (ButtonList::const_iterator it = btns.begin(); it != btns.end(); ++it) {
+ QRect itemRect = (*it)->rect;
+ if (itemRect.isValid() ) {
+ (*it)->draw(p, colorGroup(), itemRect);
+ }
+ offset += (*it)->width();
+ }
+}
+
+void ButtonDropSite::drawContents( QPainter* p )
+{
+ int leftoffset = calcButtonListWidth( buttonsLeft );
+ int rightoffset = calcButtonListWidth( buttonsRight );
+ int offset = 3;
+
+ QRect r = contentsRect();
+
+ // Shrink by 1
+ r.moveBy(1 + leftoffset, 1);
+ r.setWidth( r.width() - 2 - leftoffset - rightoffset );
+ r.setHeight( r.height() - 2 );
+
+ drawButtonList( p, buttonsLeft, offset );
+
+ QColor c1( 0x0A, 0x5F, 0x89 ); // KDE 2 titlebar default colour
+ p->fillRect( r, c1 );
+ p->setPen( Qt::white );
+ p->setFont( QFont( KGlobalSettings::generalFont().family(), 12, QFont::Bold) );
+ p->drawText( r, AlignLeft | AlignVCenter, i18n("KDE") );
+
+ offset = geometry().width() - 3 - rightoffset;
+ drawButtonList( p, buttonsRight, offset );
+
+ if (m_oldDropVisualizer.isValid() )
+ {
+ p->fillRect(m_oldDropVisualizer, Dense4Pattern);
+ }
+}
+
+ButtonSourceItem::ButtonSourceItem(QListView * parent, const Button& btn)
+ : QListViewItem(parent),
+ m_button(btn),
+ m_dirty(true)
+{
+ setButton(btn);
+}
+
+ButtonSourceItem::~ButtonSourceItem()
+{
+}
+
+void ButtonSourceItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align)
+{
+ // we need the color group cg, so to the work here, not in setButton...
+ if (m_dirty) {
+ if (m_button.supported) {
+ setPixmap(0, bitmapPixmap(m_button.icon, cg.foreground() ) );
+ } else {
+ setPixmap(0, bitmapPixmap(m_button.icon, cg.mid() ) );
+ }
+ m_dirty = false;
+ }
+
+ if (m_button.supported) {
+ QListViewItem::paintCell(p,cg,column,width,align);
+ } else {
+ // grey out unsupported buttons
+ QColorGroup cg2 = cg;
+ cg2.setColor(QColorGroup::Text, cg.mid() );
+ QListViewItem::paintCell(p,cg2,column,width,align);
+ }
+}
+
+void ButtonSourceItem::setButton(const Button& btn)
+{
+ m_button = btn;
+ m_dirty = true; // update the pixmap when in paintCell()...
+ if (btn.supported) {
+ setText(0, btn.name);
+ } else {
+ setText(0, i18n("%1 (unavailable)").arg(btn.name) );
+ }
+}
+
+Button ButtonSourceItem::button() const
+{
+ return m_button;
+}
+
+
+ButtonPositionWidget::ButtonPositionWidget(QWidget *parent, const char* name)
+ : QWidget(parent,name),
+ m_factory(0)
+{
+ QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
+
+ QLabel* label = new QLabel( this );
+ m_dropSite = new ButtonDropSite( this );
+ label->setAlignment( int( QLabel::WordBreak ) );
+ label->setText( i18n( "To add or remove titlebar buttons, simply <i>drag</i> items "
+ "between the available item list and the titlebar preview. Similarly, "
+ "drag items within the titlebar preview to re-position them.") );
+ m_buttonSource = new ButtonSource(this, "button_source");
+
+ layout->addWidget(label);
+ layout->addWidget(m_dropSite);
+ layout->addWidget(m_buttonSource);
+
+ connect( m_dropSite, SIGNAL(buttonAdded(QChar)), m_buttonSource, SLOT(hideButton(QChar)) );
+ connect( m_dropSite, SIGNAL(buttonRemoved(QChar)), m_buttonSource, SLOT(showButton(QChar)) );
+ connect( m_buttonSource, SIGNAL(dropped(QDropEvent*, QListViewItem*)), m_dropSite, SLOT(removeSelectedButton()) );
+
+ connect( m_dropSite, SIGNAL(changed()), SIGNAL(changed()) );
+
+ // insert all possible buttons into the source (backwards to keep the preferred order...)
+ bool dummy;
+ new ButtonSourceItem(m_buttonSource, getButton('R', dummy) );
+ new ButtonSourceItem(m_buttonSource, getButton('L', dummy) );
+ new ButtonSourceItem(m_buttonSource, getButton('B', dummy) );
+ new ButtonSourceItem(m_buttonSource, getButton('F', dummy) );
+ new ButtonSourceItem(m_buttonSource, getButton('X', dummy) );
+ new ButtonSourceItem(m_buttonSource, getButton('A', dummy) );
+ new ButtonSourceItem(m_buttonSource, getButton('I', dummy) );
+ new ButtonSourceItem(m_buttonSource, getButton('H', dummy) );
+ new ButtonSourceItem(m_buttonSource, getButton('S', dummy) );
+ new ButtonSourceItem(m_buttonSource, getButton('M', dummy) );
+ new ButtonSourceItem(m_buttonSource, getButton('_', dummy) );
+}
+
+ButtonPositionWidget::~ButtonPositionWidget()
+{
+}
+
+void ButtonPositionWidget::setDecorationFactory(KDecorationFactory *factory)
+{
+ if (!factory)
+ return;
+
+ m_factory = factory;
+
+ // get the list of supported buttons
+ if (m_factory->supports(KDecorationDefines::AbilityAnnounceButtons) ) {
+ QString supportedButtons;
+
+ if (m_factory->supports(KDecorationDefines::AbilityButtonMenu) )
+ supportedButtons.append('M');
+ if (m_factory->supports(KDecorationDefines::AbilityButtonOnAllDesktops) )
+ supportedButtons.append('S');
+ if (m_factory->supports(KDecorationDefines::AbilityButtonSpacer) )
+ supportedButtons.append('_');
+ if (m_factory->supports(KDecorationDefines::AbilityButtonHelp) )
+ supportedButtons.append('H');
+ if (m_factory->supports(KDecorationDefines::AbilityButtonMinimize) )
+ supportedButtons.append('I');
+ if (m_factory->supports(KDecorationDefines::AbilityButtonMaximize) )
+ supportedButtons.append('A');
+ if (m_factory->supports(KDecorationDefines::AbilityButtonClose) )
+ supportedButtons.append('X');
+ if (m_factory->supports(KDecorationDefines::AbilityButtonAboveOthers) )
+ supportedButtons.append('F');
+ if (m_factory->supports(KDecorationDefines::AbilityButtonBelowOthers) )
+ supportedButtons.append('B');
+ if (m_factory->supports(KDecorationDefines::AbilityButtonShade) )
+ supportedButtons.append('L');
+ if (m_factory->supports(KDecorationDefines::AbilityButtonResize) )
+ supportedButtons.append('R');
+
+ m_supportedButtons = supportedButtons;
+ } else {
+ // enable only buttons available before AbilityButton* introduction
+ m_supportedButtons = "MSHIAX_";
+ }
+
+ // update the button lists...
+ // 1. set status on the source items...
+ QListViewItemIterator it(m_buttonSource);
+ while (it.current() ) {
+ ButtonSourceItem *i = dynamic_cast<ButtonSourceItem*>(it.current() );
+ if (i) {
+ Button b = i->button();
+ b.supported = m_supportedButtons.contains(b.type);
+ i->setButton(b);
+ }
+ ++it;
+ }
+ // 2. rebuild the drop site items...
+ setButtonsLeft(buttonsLeft() );
+ setButtonsRight(buttonsRight() );
+}
+
+Button ButtonPositionWidget::getButton(QChar type, bool& success) {
+ success = true;
+
+ if (type == 'R') {
+ QBitmap bmp(resize_width, resize_height, resize_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("Resize"), bmp, 'R', false, m_supportedButtons.contains('R') );
+ } else if (type == 'L') {
+ QBitmap bmp(shade_width, shade_height, shade_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("Shade"), bmp, 'L', false, m_supportedButtons.contains('L') );
+ } else if (type == 'B') {
+ QBitmap bmp(keepbelowothers_width, keepbelowothers_height, keepbelowothers_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("Keep Below Others"), bmp, 'B', false, m_supportedButtons.contains('B') );
+ } else if (type == 'F') {
+ QBitmap bmp(keepaboveothers_width, keepaboveothers_height, keepaboveothers_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("Keep Above Others"), bmp, 'F', false, m_supportedButtons.contains('F') );
+ } else if (type == 'X') {
+ QBitmap bmp(close_width, close_height, close_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("Close"), bmp, 'X', false, m_supportedButtons.contains('X') );
+ } else if (type == 'A') {
+ QBitmap bmp(maximize_width, maximize_height, maximize_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("Maximize"), bmp, 'A', false, m_supportedButtons.contains('A') );
+ } else if (type == 'I') {
+ QBitmap bmp(minimize_width, minimize_height, minimize_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("Minimize"), bmp, 'I', false, m_supportedButtons.contains('I') );
+ } else if (type == 'H') {
+ QBitmap bmp(help_width, help_height, help_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("Help"), bmp, 'H', false, m_supportedButtons.contains('H') );
+ } else if (type == 'S') {
+ QBitmap bmp(onalldesktops_width, onalldesktops_height, onalldesktops_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("On All Desktops"), bmp, 'S', false, m_supportedButtons.contains('S') );
+ } else if (type == 'M') {
+ QBitmap bmp(menu_width, menu_height, menu_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("Menu"), bmp, 'M', false, m_supportedButtons.contains('M') );
+ } else if (type == '_') {
+ QBitmap bmp(spacer_width, spacer_height, spacer_bits, true);
+ bmp.setMask(bmp);
+ return Button(i18n("--- spacer ---"), bmp, '_', true, m_supportedButtons.contains('_') );
+ } else {
+ success = false;
+ return Button();
+ }
+}
+
+QString ButtonPositionWidget::buttonsLeft() const
+{
+ ButtonList btns = m_dropSite->buttonsLeft;
+ QString btnString = "";
+ for (ButtonList::const_iterator it = btns.begin(); it != btns.end(); ++it) {
+ btnString.append( (*it)->button().type );
+ }
+ return btnString;
+}
+
+QString ButtonPositionWidget::buttonsRight() const
+{
+ ButtonList btns = m_dropSite->buttonsRight;
+ QString btnString = "";
+ for (ButtonList::const_iterator it = btns.begin(); it != btns.end(); ++it) {
+ btnString.append( (*it)->button().type );
+ }
+ return btnString;
+}
+
+void ButtonPositionWidget::setButtonsLeft(const QString &buttons)
+{
+ // to keep the button lists consistent, first remove all left buttons, then add buttons again...
+ m_dropSite->clearLeft();
+
+ for (uint i = 0; i < buttons.length(); ++i) {
+ bool succ = false;
+ Button btn = getButton(buttons[i], succ);
+ if (succ) {
+ m_dropSite->buttonsLeft.append(new ButtonDropSiteItem(btn) );
+ m_buttonSource->hideButton(btn.type);
+ }
+ }
+ m_dropSite->recalcItemGeometry();
+ m_dropSite->update();
+}
+
+void ButtonPositionWidget::setButtonsRight(const QString &buttons)
+{
+ // to keep the button lists consistent, first remove all left buttons, then add buttons again...
+ m_dropSite->clearRight();
+
+ for (uint i = 0; i < buttons.length(); ++i) {
+ bool succ = false;
+ Button btn = getButton(buttons[i], succ);
+ if (succ) {
+ m_dropSite->buttonsRight.append(new ButtonDropSiteItem(btn) );
+ m_buttonSource->hideButton(btn.type);
+ }
+ }
+ m_dropSite->recalcItemGeometry();
+ m_dropSite->update();
+}
+
+#include "buttons.moc"
+// vim: ts=4
+// kate: space-indent off; tab-width 4;
diff --git a/kwin/kcmkwin/kwindecoration/buttons.h b/kwin/kcmkwin/kwindecoration/buttons.h
new file mode 100644
index 000000000..a3db6266e
--- /dev/null
+++ b/kwin/kcmkwin/kwindecoration/buttons.h
@@ -0,0 +1,227 @@
+/*
+ This is the new kwindecoration kcontrol module
+
+ Copyright (c) 2004, Sandro Giessl <sandro@giessl.com>
+ Copyright (c) 2001
+ Karol Szwed <gallium@kde.org>
+ http://gallium.n3.net/
+
+ Supports new kwin configuration plugins, and titlebar button position
+ modification via dnd interface.
+
+ Based on original "kwintheme" (Window Borders)
+ Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#ifndef __BUTTONS_H_
+#define __BUTTONS_H_
+
+#include <qbitmap.h>
+#include <qevent.h>
+#include <qdragobject.h>
+#include <qlistbox.h>
+
+#include <klistview.h>
+
+class KDecorationFactory;
+
+/**
+ * This class holds the button data.
+ */
+class Button
+{
+ public:
+ Button();
+ Button(const QString& name, const QBitmap& icon, QChar type, bool duplicate, bool supported);
+ virtual ~Button();
+
+ QString name;
+ QBitmap icon;
+ QChar type;
+ bool duplicate;
+ bool supported;
+};
+
+class ButtonDrag : public QStoredDrag
+{
+ public:
+ ButtonDrag( Button btn, QWidget* parent, const char* name=0 );
+ ~ButtonDrag() {};
+
+ static bool canDecode( QDropEvent* e );
+ static bool decode( QDropEvent* e, Button& btn );
+};
+
+/**
+ * This is plugged into ButtonDropSite
+ */
+class ButtonDropSiteItem
+{
+ public:
+ ButtonDropSiteItem(const Button& btn);
+ ~ButtonDropSiteItem();
+
+ Button button();
+
+ QRect rect;
+ int width();
+ int height();
+
+ void draw(QPainter *p, const QColorGroup& cg, QRect rect);
+
+ private:
+ Button m_button;
+};
+
+/**
+ * This is plugged into ButtonSource
+ */
+class ButtonSourceItem : public QListViewItem
+{
+ public:
+ ButtonSourceItem(QListView * parent, const Button& btn);
+ virtual ~ButtonSourceItem();
+
+ void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+
+ void setButton(const Button& btn);
+ Button button() const;
+ private:
+ Button m_button;
+ bool m_dirty;
+};
+
+/**
+ * Implements the button drag source list view
+ */
+class ButtonSource : public KListView
+{
+ Q_OBJECT
+
+ public:
+ ButtonSource(QWidget *parent = 0, const char* name = 0);
+ virtual ~ButtonSource();
+
+ QSize sizeHint() const;
+
+ void hideAllButtons();
+ void showAllButtons();
+
+ public slots:
+ void hideButton(QChar btn);
+ void showButton(QChar btn);
+
+ protected:
+ bool acceptDrag(QDropEvent* e) const;
+ virtual QDragObject *dragObject();
+};
+
+typedef QValueList<ButtonDropSiteItem*> ButtonList;
+
+/**
+ * This class renders and handles the demo titlebar dropsite
+ */
+class ButtonDropSite: public QFrame
+{
+ Q_OBJECT
+
+ public:
+ ButtonDropSite( QWidget* parent=0, const char* name=0 );
+ ~ButtonDropSite();
+
+ // Allow external classes access our buttons - ensure buttons are
+ // not duplicated however.
+ ButtonList buttonsLeft;
+ ButtonList buttonsRight;
+ void clearLeft();
+ void clearRight();
+
+ signals:
+ void buttonAdded(QChar btn);
+ void buttonRemoved(QChar btn);
+ void changed();
+
+ public slots:
+ bool removeSelectedButton(); ///< This slot is called after we drop on the item listbox...
+ void recalcItemGeometry(); ///< Call this whenever the item list changes... updates the items' rect property
+
+ protected:
+ void resizeEvent(QResizeEvent*);
+ void dragEnterEvent( QDragEnterEvent* e );
+ void dragMoveEvent( QDragMoveEvent* e );
+ void dragLeaveEvent( QDragLeaveEvent* e );
+ void dropEvent( QDropEvent* e );
+ void mousePressEvent( QMouseEvent* e ); ///< Starts dragging a button...
+
+ void drawContents( QPainter* p );
+ ButtonDropSiteItem *buttonAt(QPoint p);
+ bool removeButton(ButtonDropSiteItem *item);
+ int calcButtonListWidth(const ButtonList& buttons); ///< Computes the total space the buttons will take in the titlebar
+ void drawButtonList(QPainter *p, const ButtonList& buttons, int offset);
+
+ QRect leftDropArea();
+ QRect rightDropArea();
+
+ private:
+ /**
+ * Try to find the item. If found, set its list and iterator and return true, else return false
+ */
+ bool getItemIterator(ButtonDropSiteItem *item, ButtonList* &list, ButtonList::iterator &iterator);
+
+ void cleanDropVisualizer();
+ QRect m_oldDropVisualizer;
+
+ ButtonDropSiteItem *m_selected;
+};
+
+class ButtonPositionWidget : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ ButtonPositionWidget(QWidget *parent = 0, const char* name = 0);
+ ~ButtonPositionWidget();
+
+ /**
+ * set the factory, so the class e.g. knows which buttons are supported by the client
+ */
+ void setDecorationFactory(KDecorationFactory *factory);
+
+ QString buttonsLeft() const;
+ QString buttonsRight() const;
+ void setButtonsLeft(const QString &buttons);
+ void setButtonsRight(const QString &buttons);
+
+ signals:
+ void changed();
+
+ private:
+ void clearButtonList(const ButtonList& btns);
+ Button getButton(QChar type, bool& success);
+
+ ButtonDropSite* m_dropSite;
+ ButtonSource *m_buttonSource;
+
+ KDecorationFactory *m_factory;
+ QString m_supportedButtons;
+};
+
+
+#endif
+// vim: ts=4
+// kate: space-indent off; tab-width 4;
diff --git a/kwin/kcmkwin/kwindecoration/kwindecoration.cpp b/kwin/kcmkwin/kwindecoration/kwindecoration.cpp
new file mode 100644
index 000000000..7435781bc
--- /dev/null
+++ b/kwin/kcmkwin/kwindecoration/kwindecoration.cpp
@@ -0,0 +1,613 @@
+/*
+ This is the new kwindecoration kcontrol module
+
+ Copyright (c) 2001
+ Karol Szwed <gallium@kde.org>
+ http://gallium.n3.net/
+
+ Supports new kwin configuration plugins, and titlebar button position
+ modification via dnd interface.
+
+ Based on original "kwintheme" (Window Borders)
+ Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#include <assert.h>
+#include <qdir.h>
+#include <qfileinfo.h>
+#include <qlayout.h>
+#include <qwhatsthis.h>
+#include <qgroupbox.h>
+#include <qcheckbox.h>
+#include <qtabwidget.h>
+#include <qvbox.h>
+#include <qlabel.h>
+#include <qfile.h>
+#include <qslider.h>
+
+#include <kapplication.h>
+#include <kcombobox.h>
+#include <kdebug.h>
+#include <kdesktopfile.h>
+#include <kstandarddirs.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kdialog.h>
+#include <kgenericfactory.h>
+#include <kaboutdata.h>
+#include <dcopclient.h>
+
+#include "kwindecoration.h"
+#include "preview.h"
+#include <kdecoration_plugins_p.h>
+#include <kdecorationfactory.h>
+
+// KCModule plugin interface
+// =========================
+typedef KGenericFactory<KWinDecorationModule, QWidget> KWinDecoFactory;
+K_EXPORT_COMPONENT_FACTORY( kcm_kwindecoration, KWinDecoFactory("kcmkwindecoration") )
+
+KWinDecorationModule::KWinDecorationModule(QWidget* parent, const char* name, const QStringList &)
+ : DCOPObject("KWinClientDecoration"),
+ KCModule(KWinDecoFactory::instance(), parent, name),
+ kwinConfig("kwinrc"),
+ pluginObject(0)
+{
+ kwinConfig.setGroup("Style");
+ plugins = new KDecorationPreviewPlugins( &kwinConfig );
+
+ QVBoxLayout* layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+
+// Save this for later...
+// cbUseMiniWindows = new QCheckBox( i18n( "Render mini &titlebars for all windows"), checkGroup );
+// QWhatsThis::add( cbUseMiniWindows, i18n( "Note that this option is not available on all styles yet!" ) );
+
+ tabWidget = new QTabWidget( this );
+ layout->addWidget( tabWidget );
+
+ // Page 1 (General Options)
+ QWidget *pluginPage = new QWidget( tabWidget );
+
+ QVBoxLayout* pluginLayout = new QVBoxLayout(pluginPage, KDialog::marginHint(), KDialog::spacingHint());
+
+ // decoration chooser
+ decorationList = new KComboBox( pluginPage );
+ QString whatsThis = i18n("Select the window decoration. This is the look and feel of both "
+ "the window borders and the window handle.");
+ QWhatsThis::add(decorationList, whatsThis);
+ pluginLayout->addWidget(decorationList);
+
+ QGroupBox *pluginSettingsGrp = new QGroupBox( i18n("Decoration Options"), pluginPage );
+ pluginSettingsGrp->setColumnLayout( 0, Vertical );
+ pluginSettingsGrp->setFlat( true );
+ pluginSettingsGrp->layout()->setMargin( 0 );
+ pluginSettingsGrp->layout()->setSpacing( KDialog::spacingHint() );
+ pluginLayout->addWidget( pluginSettingsGrp );
+
+ pluginLayout->addStretch();
+
+ // Border size chooser
+ lBorder = new QLabel (i18n("B&order size:"), pluginSettingsGrp);
+ cBorder = new QComboBox(pluginSettingsGrp);
+ lBorder->setBuddy(cBorder);
+ QWhatsThis::add( cBorder, i18n( "Use this combobox to change the border size of the decoration." ));
+ lBorder->hide();
+ cBorder->hide();
+ QHBoxLayout *borderSizeLayout = new QHBoxLayout(pluginSettingsGrp->layout() );
+ borderSizeLayout->addWidget(lBorder);
+ borderSizeLayout->addWidget(cBorder);
+ borderSizeLayout->addStretch();
+
+ pluginConfigWidget = new QVBox(pluginSettingsGrp);
+ pluginSettingsGrp->layout()->add( pluginConfigWidget );
+
+ // Page 2 (Button Selector)
+ QWidget* buttonPage = new QWidget( tabWidget );
+ QVBoxLayout* buttonLayout = new QVBoxLayout(buttonPage, KDialog::marginHint(), KDialog::spacingHint());
+
+ cbShowToolTips = new QCheckBox(
+ i18n("&Show window button tooltips"), buttonPage );
+ QWhatsThis::add( cbShowToolTips,
+ i18n( "Enabling this checkbox will show window button tooltips. "
+ "If this checkbox is off, no window button tooltips will be shown."));
+
+ cbUseCustomButtonPositions = new QCheckBox(
+ i18n("Use custom titlebar button &positions"), buttonPage );
+ QWhatsThis::add( cbUseCustomButtonPositions,
+ i18n( "The appropriate settings can be found in the \"Buttons\" Tab; "
+ "please note that this option is not available on all styles yet." ) );
+
+ buttonLayout->addWidget( cbShowToolTips );
+ buttonLayout->addWidget( cbUseCustomButtonPositions );
+
+ // Add nifty dnd button modification widgets
+ buttonPositionWidget = new ButtonPositionWidget(buttonPage, "button_position_widget");
+ buttonPositionWidget->setDecorationFactory(plugins->factory() );
+ QHBoxLayout* buttonControlLayout = new QHBoxLayout(buttonLayout);
+ buttonControlLayout->addSpacing(20);
+ buttonControlLayout->addWidget(buttonPositionWidget);
+// buttonLayout->addStretch();
+
+ // preview
+ QVBoxLayout* previewLayout = new QVBoxLayout(layout, KDialog::spacingHint() );
+ previewLayout->setMargin( KDialog::marginHint() );
+
+ preview = new KDecorationPreview( this );
+ previewLayout->addWidget(preview);
+
+ preview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ tabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
+
+ // Load all installed decorations into memory
+ // Set up the decoration lists and other UI settings
+ findDecorations();
+ createDecorationList();
+ readConfig( &kwinConfig );
+ resetPlugin( &kwinConfig );
+
+ tabWidget->insertTab( pluginPage, i18n("&Window Decoration") );
+ tabWidget->insertTab( buttonPage, i18n("&Buttons") );
+
+ connect( buttonPositionWidget, SIGNAL(changed()), this, SLOT(slotButtonsChanged()) ); // update preview etc.
+ connect( buttonPositionWidget, SIGNAL(changed()), this, SLOT(slotSelectionChanged()) ); // emit changed()...
+ connect( decorationList, SIGNAL(activated(const QString&)), SLOT(slotSelectionChanged()) );
+ connect( decorationList, SIGNAL(activated(const QString&)),
+ SLOT(slotChangeDecoration(const QString&)) );
+ connect( cbUseCustomButtonPositions, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
+ connect(cbUseCustomButtonPositions, SIGNAL(toggled(bool)), buttonPositionWidget, SLOT(setEnabled(bool)));
+ connect(cbUseCustomButtonPositions, SIGNAL(toggled(bool)), this, SLOT(slotButtonsChanged()) );
+ connect( cbShowToolTips, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
+ connect( cBorder, SIGNAL( activated( int )), SLOT( slotBorderChanged( int )));
+// connect( cbUseMiniWindows, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
+
+ // Allow kwin dcop signal to update our selection list
+ connectDCOPSignal("kwin", 0, "dcopResetAllClients()", "dcopUpdateClientList()", false);
+
+ KAboutData *about =
+ new KAboutData(I18N_NOOP("kcmkwindecoration"),
+ I18N_NOOP("Window Decoration Control Module"),
+ 0, 0, KAboutData::License_GPL,
+ I18N_NOOP("(c) 2001 Karol Szwed"));
+ about->addAuthor("Karol Szwed", 0, "gallium@kde.org");
+ setAboutData(about);
+}
+
+
+KWinDecorationModule::~KWinDecorationModule()
+{
+ delete preview; // needs to be destroyed before plugins
+ delete plugins;
+}
+
+
+// Find all theme desktop files in all 'data' dirs owned by kwin.
+// And insert these into a DecorationInfo structure
+void KWinDecorationModule::findDecorations()
+{
+ QStringList dirList = KGlobal::dirs()->findDirs("data", "kwin");
+ QStringList::ConstIterator it;
+
+ for (it = dirList.begin(); it != dirList.end(); it++)
+ {
+ QDir d(*it);
+ if (d.exists())
+ for (QFileInfoListIterator it(*d.entryInfoList()); it.current(); ++it)
+ {
+ QString filename(it.current()->absFilePath());
+ if (KDesktopFile::isDesktopFile(filename))
+ {
+ KDesktopFile desktopFile(filename);
+ QString libName = desktopFile.readEntry("X-KDE-Library");
+
+ if (!libName.isEmpty() && libName.startsWith( "kwin3_" ))
+ {
+ DecorationInfo di;
+ di.name = desktopFile.readName();
+ di.libraryName = libName;
+ decorations.append( di );
+ }
+ }
+ }
+ }
+}
+
+
+// Fills the decorationList with a list of available kwin decorations
+void KWinDecorationModule::createDecorationList()
+{
+ QValueList<DecorationInfo>::ConstIterator it;
+
+ // Sync with kwin hardcoded KDE2 style which has no desktop item
+ QStringList decorationNames;
+ decorationNames.append( i18n("KDE 2") );
+ for (it = decorations.begin(); it != decorations.end(); ++it)
+ {
+ decorationNames.append((*it).name);
+ }
+ decorationNames.sort();
+ decorationList->insertStringList(decorationNames);
+}
+
+
+// Reset the decoration plugin to what the user just selected
+void KWinDecorationModule::slotChangeDecoration( const QString & text)
+{
+ KConfig kwinConfig("kwinrc");
+ kwinConfig.setGroup("Style");
+
+ // Let the user see config options for the currently selected decoration
+ resetPlugin( &kwinConfig, text );
+}
+
+
+// This is the selection handler setting
+void KWinDecorationModule::slotSelectionChanged()
+{
+ emit KCModule::changed(true);
+}
+
+static const char* const border_names[ KDecorationDefines::BordersCount ] =
+ {
+ I18N_NOOP( "Tiny" ),
+ I18N_NOOP( "Normal" ),
+ I18N_NOOP( "Large" ),
+ I18N_NOOP( "Very Large" ),
+ I18N_NOOP( "Huge" ),
+ I18N_NOOP( "Very Huge" ),
+ I18N_NOOP( "Oversized" )
+ };
+
+int KWinDecorationModule::borderSizeToIndex( BorderSize size, QValueList< BorderSize > sizes )
+{
+ int pos = 0;
+ for( QValueList< BorderSize >::ConstIterator it = sizes.begin();
+ it != sizes.end();
+ ++it, ++pos )
+ if( size <= *it )
+ break;
+ return pos;
+}
+
+KDecorationDefines::BorderSize KWinDecorationModule::indexToBorderSize( int index,
+ QValueList< BorderSize > sizes )
+{
+ QValueList< BorderSize >::ConstIterator it = sizes.begin();
+ for(;
+ it != sizes.end();
+ ++it, --index )
+ if( index == 0 )
+ break;
+ return *it;
+}
+
+void KWinDecorationModule::slotBorderChanged( int size )
+{
+ if( lBorder->isHidden())
+ return;
+ emit KCModule::changed( true );
+ QValueList< BorderSize > sizes;
+ if( plugins->factory() != NULL )
+ sizes = plugins->factory()->borderSizes();
+ assert( sizes.count() >= 2 );
+ border_size = indexToBorderSize( size, sizes );
+
+ // update preview
+ preview->setTempBorderSize(plugins, border_size);
+}
+
+void KWinDecorationModule::slotButtonsChanged()
+{
+ // update preview
+ preview->setTempButtons(plugins, cbUseCustomButtonPositions->isChecked(), buttonPositionWidget->buttonsLeft(), buttonPositionWidget->buttonsRight() );
+}
+
+QString KWinDecorationModule::decorationName( QString& libName )
+{
+ QString decoName;
+
+ QValueList<DecorationInfo>::Iterator it;
+ for( it = decorations.begin(); it != decorations.end(); ++it )
+ if ( (*it).libraryName == libName )
+ {
+ decoName = (*it).name;
+ break;
+ }
+
+ return decoName;
+}
+
+
+QString KWinDecorationModule::decorationLibName( const QString& name )
+{
+ QString libName;
+
+ // Find the corresponding library name to that of
+ // the current plugin name
+ QValueList<DecorationInfo>::Iterator it;
+ for( it = decorations.begin(); it != decorations.end(); ++it )
+ if ( (*it).name == name )
+ {
+ libName = (*it).libraryName;
+ break;
+ }
+
+ if (libName.isEmpty())
+ libName = "kwin_default"; // KDE 2
+
+ return libName;
+}
+
+
+// Loads/unloads and inserts the decoration config plugin into the
+// pluginConfigWidget, allowing for dynamic configuration of decorations
+void KWinDecorationModule::resetPlugin( KConfig* conf, const QString& currentDecoName )
+{
+ // Config names are "kwin_icewm_config"
+ // for "kwin3_icewm" kwin client
+
+ QString oldName = styleToConfigLib( oldLibraryName );
+
+ QString currentName;
+ if (!currentDecoName.isEmpty())
+ currentName = decorationLibName( currentDecoName ); // Use what the user selected
+ else
+ currentName = currentLibraryName; // Use what was read from readConfig()
+
+ if( plugins->loadPlugin( currentName )
+ && preview->recreateDecoration( plugins ))
+ preview->enablePreview();
+ else
+ preview->disablePreview();
+ plugins->destroyPreviousPlugin();
+
+ checkSupportedBorderSizes();
+
+ // inform buttonPositionWidget about the new factory...
+ buttonPositionWidget->setDecorationFactory(plugins->factory() );
+
+ currentName = styleToConfigLib( currentName );
+
+ // Delete old plugin widget if it exists
+ delete pluginObject;
+ pluginObject = 0;
+
+ // Use klibloader for library manipulation
+ KLibLoader* loader = KLibLoader::self();
+
+ // Free the old library if possible
+ if (!oldLibraryName.isNull())
+ loader->unloadLibrary( QFile::encodeName(oldName) );
+
+ KLibrary* library = loader->library( QFile::encodeName(currentName) );
+ if (library != NULL)
+ {
+ void* alloc_ptr = library->symbol("allocate_config");
+
+ if (alloc_ptr != NULL)
+ {
+ allocatePlugin = (QObject* (*)(KConfig* conf, QWidget* parent))alloc_ptr;
+ pluginObject = (QObject*)(allocatePlugin( conf, pluginConfigWidget ));
+
+ // connect required signals and slots together...
+ connect( pluginObject, SIGNAL(changed()), this, SLOT(slotSelectionChanged()) );
+ connect( this, SIGNAL(pluginLoad(KConfig*)), pluginObject, SLOT(load(KConfig*)) );
+ connect( this, SIGNAL(pluginSave(KConfig*)), pluginObject, SLOT(save(KConfig*)) );
+ connect( this, SIGNAL(pluginDefaults()), pluginObject, SLOT(defaults()) );
+ pluginConfigWidget->show();
+ return;
+ }
+ }
+
+ pluginConfigWidget->hide();
+}
+
+
+// Reads the kwin config settings, and sets all UI controls to those settings
+// Updating the config plugin if required
+void KWinDecorationModule::readConfig( KConfig* conf )
+{
+ // General tab
+ // ============
+ cbShowToolTips->setChecked( conf->readBoolEntry("ShowToolTips", true ));
+// cbUseMiniWindows->setChecked( conf->readBoolEntry("MiniWindowBorders", false));
+
+ // Find the corresponding decoration name to that of
+ // the current plugin library name
+
+ oldLibraryName = currentLibraryName;
+ currentLibraryName = conf->readEntry("PluginLib",
+ ((QPixmap::defaultDepth() > 8) ? "kwin_plastik" : "kwin_quartz"));
+ QString decoName = decorationName( currentLibraryName );
+
+ // If we are using the "default" kde client, use the "default" entry.
+ if (decoName.isEmpty())
+ decoName = i18n("KDE 2");
+
+ int numDecos = decorationList->count();
+ for (int i = 0; i < numDecos; ++i)
+ {
+ if (decorationList->text(i) == decoName)
+ {
+ decorationList->setCurrentItem(i);
+ break;
+ }
+ }
+
+ // Buttons tab
+ // ============
+ bool customPositions = conf->readBoolEntry("CustomButtonPositions", false);
+ cbUseCustomButtonPositions->setChecked( customPositions );
+ buttonPositionWidget->setEnabled( customPositions );
+ // Menu and onAllDesktops buttons are default on LHS
+ buttonPositionWidget->setButtonsLeft( conf->readEntry("ButtonsOnLeft", "MS") );
+ // Help, Minimize, Maximize and Close are default on RHS
+ buttonPositionWidget->setButtonsRight( conf->readEntry("ButtonsOnRight", "HIAX") );
+
+ int bsize = conf->readNumEntry( "BorderSize", BorderNormal );
+ if( bsize >= BorderTiny && bsize < BordersCount )
+ border_size = static_cast< BorderSize >( bsize );
+ else
+ border_size = BorderNormal;
+ checkSupportedBorderSizes();
+
+ emit KCModule::changed(false);
+}
+
+
+// Writes the selected user configuration to the kwin config file
+void KWinDecorationModule::writeConfig( KConfig* conf )
+{
+ QString name = decorationList->currentText();
+ QString libName = decorationLibName( name );
+
+ KConfig kwinConfig("kwinrc");
+ kwinConfig.setGroup("Style");
+
+ // General settings
+ conf->writeEntry("PluginLib", libName);
+ conf->writeEntry("CustomButtonPositions", cbUseCustomButtonPositions->isChecked());
+ conf->writeEntry("ShowToolTips", cbShowToolTips->isChecked());
+// conf->writeEntry("MiniWindowBorders", cbUseMiniWindows->isChecked());
+
+ // Button settings
+ conf->writeEntry("ButtonsOnLeft", buttonPositionWidget->buttonsLeft() );
+ conf->writeEntry("ButtonsOnRight", buttonPositionWidget->buttonsRight() );
+ conf->writeEntry("BorderSize", border_size );
+
+ oldLibraryName = currentLibraryName;
+ currentLibraryName = libName;
+
+ // We saved, so tell kcmodule that there have been no new user changes made.
+ emit KCModule::changed(false);
+}
+
+
+void KWinDecorationModule::dcopUpdateClientList()
+{
+ // Changes the current active ListBox item, and
+ // Loads a new plugin configuration tab if required.
+ KConfig kwinConfig("kwinrc");
+ kwinConfig.setGroup("Style");
+
+ readConfig( &kwinConfig );
+ resetPlugin( &kwinConfig );
+}
+
+
+// Virutal functions required by KCModule
+void KWinDecorationModule::load()
+{
+ KConfig kwinConfig("kwinrc");
+ kwinConfig.setGroup("Style");
+
+ // Reset by re-reading the config
+ readConfig( &kwinConfig );
+ resetPlugin( &kwinConfig );
+}
+
+
+void KWinDecorationModule::save()
+{
+ KConfig kwinConfig("kwinrc");
+ kwinConfig.setGroup("Style");
+
+ writeConfig( &kwinConfig );
+ emit pluginSave( &kwinConfig );
+
+ kwinConfig.sync();
+ resetKWin();
+ // resetPlugin() will get called via the above DCOP function
+}
+
+
+void KWinDecorationModule::defaults()
+{
+ // Set the KDE defaults
+ cbUseCustomButtonPositions->setChecked( false );
+ buttonPositionWidget->setEnabled( false );
+ cbShowToolTips->setChecked( true );
+// cbUseMiniWindows->setChecked( false);
+// Don't set default for now
+// decorationList->setSelected(
+// decorationList->findItem( i18n("KDE 2") ), true ); // KDE classic client
+
+ buttonPositionWidget->setButtonsLeft("MS");
+ buttonPositionWidget->setButtonsRight("HIAX");
+
+ border_size = BorderNormal;
+ checkSupportedBorderSizes();
+
+ // Set plugin defaults
+ emit pluginDefaults();
+}
+
+void KWinDecorationModule::checkSupportedBorderSizes()
+{
+ QValueList< BorderSize > sizes;
+ if( plugins->factory() != NULL )
+ sizes = plugins->factory()->borderSizes();
+ if( sizes.count() < 2 ) {
+ lBorder->hide();
+ cBorder->hide();
+ } else {
+ cBorder->clear();
+ for (QValueList<BorderSize>::const_iterator it = sizes.begin(); it != sizes.end(); ++it) {
+ BorderSize size = *it;
+ cBorder->insertItem(i18n(border_names[size]), borderSizeToIndex(size,sizes) );
+ }
+ int pos = borderSizeToIndex( border_size, sizes );
+ lBorder->show();
+ cBorder->show();
+ cBorder->setCurrentItem(pos);
+ slotBorderChanged( pos );
+ }
+}
+
+QString KWinDecorationModule::styleToConfigLib( QString& styleLib )
+{
+ if( styleLib.startsWith( "kwin3_" ))
+ return "kwin_" + styleLib.mid( 6 ) + "_config";
+ else
+ return styleLib + "_config";
+}
+
+QString KWinDecorationModule::quickHelp() const
+{
+ return i18n( "<h1>Window Manager Decoration</h1>"
+ "<p>This module allows you to choose the window border decorations, "
+ "as well as titlebar button positions and custom decoration options.</p>"
+ "To choose a theme for your window decoration click on its name and apply your choice by clicking the \"Apply\" button below."
+ " If you do not want to apply your choice you can click the \"Reset\" button to discard your changes."
+ "<p>You can configure each theme in the \"Configure [...]\" tab. There are different options specific for each theme.</p>"
+ "<p>In \"General Options (if available)\" you can activate the \"Buttons\" tab by checking the \"Use custom titlebar button positions\" box."
+ " In the \"Buttons\" tab you can change the positions of the buttons to your liking.</p>" );
+}
+
+
+void KWinDecorationModule::resetKWin()
+{
+ bool ok = kapp->dcopClient()->send("kwin*", "KWinInterface",
+ "reconfigure()", QByteArray());
+ if (!ok)
+ kdDebug() << "kcmkwindecoration: Could not reconfigure kwin" << endl;
+}
+
+#include "kwindecoration.moc"
+// vim: ts=4
+// kate: space-indent off; tab-width 4;
+
diff --git a/kwin/kcmkwin/kwindecoration/kwindecoration.desktop b/kwin/kcmkwin/kwindecoration/kwindecoration.desktop
new file mode 100644
index 000000000..3c5f12e6f
--- /dev/null
+++ b/kwin/kcmkwin/kwindecoration/kwindecoration.desktop
@@ -0,0 +1,231 @@
+[Desktop Entry]
+Exec=kcmshell kwindecoration
+Icon=kcmkwm
+Type=Application
+DocPath=kcontrol/kwindecoration/index.html
+
+X-KDE-ModuleType=Library
+X-KDE-Library=kwindecoration
+X-KDE-FactoryName=kwindecoration
+
+Name=Window Decorations
+Name[af]=Venster Versierings
+Name[ar]=زخرفة النافذة
+Name[be]=Дэкарацыі вокнаў
+Name[bg]=Декорация
+Name[bn]=উইণ্ডো সাজসজ্জা
+Name[br]=Kinkladur ar prenester
+Name[bs]=Ukrasi prozora
+Name[ca]=Decoració de les finestres
+Name[cs]=Dekorace oken
+Name[csb]=Dekòracëje òkna
+Name[cy]=Addurniadau Ffenestr
+Name[da]=Vinduesdekorationer
+Name[de]=Fensterdekorationen
+Name[el]=Διακοσμήσεις παραθύρων
+Name[eo]=Fenestro-ornamaĵo
+Name[es]=Decoración de ventanas
+Name[et]=Akna dekoratsioonid
+Name[eu]=Leihoaren dekorazioak
+Name[fa]=تزئینات پنجره
+Name[fi]=Ikkunoiden kehykset
+Name[fr]=Décoration des fenêtres
+Name[fy]=Finsterdekoraasjes
+Name[gl]=Decoracións das Fiestras
+Name[he]=קישוטי חלונות
+Name[hi]=विंडो सजावट
+Name[hr]=Ukrasi prozora
+Name[hu]=Ablakkeret-stílus
+Name[id]=Dekorasi Jendela
+Name[is]=Gluggaskreytingar
+Name[it]=Decorazioni finestra
+Name[ja]=ウィンドウ装飾
+Name[ka]=ფანჯრის დეკორაცია
+Name[kk]=Терезе безендіруі
+Name[km]=ការ​តុបតែង​បង្អួច
+Name[ko]=창 종료 도구
+Name[lo]=ການຕົກແຕ່ງຫນ້າຕ່າງ
+Name[lt]=Langų išvaizda
+Name[lv]=Loga Dekorācijas
+Name[mk]=Декорации на прозорците
+Name[mn]=Цонхны засал
+Name[mt]=Dekorazzjoni tal-Windows
+Name[nb]=Vinduspynt
+Name[nds]=Finsterdekoratschoon
+Name[ne]=सञ्झ्याल सजावट
+Name[nl]=Vensterdecoraties
+Name[nn]=Vindaugsdekorasjonar
+Name[nso]=Dikgabiso tsa Window
+Name[pa]=ਝਰੋਖਾ ਸਜਾਵਟ
+Name[pl]=Dekoracje okna
+Name[pt]=Decorações das Janelas
+Name[pt_BR]=Decorações da Janela
+Name[ro]=Decorări
+Name[ru]=Декорации окон
+Name[rw]=Imitako y'Idirishya
+Name[se]=Lásehearvvat
+Name[sk]=Dekorácie okien
+Name[sl]=Okraski oken
+Name[sr]=Декорација прозора
+Name[sr@Latn]=Dekoracija prozora
+Name[ss]=Kuhlotjiswa kweliwindi
+Name[sv]=Fönsterdekoration
+Name[ta]=சாளர அலங்கரிப்புகள்
+Name[tg]=Декоратсияҳои тиреза
+Name[th]=ตกแต่งหน้าต่าง
+Name[tr]=Pencere Dekorasyonları
+Name[tt]=Täräzä Bizäge
+Name[uk]=Обрамлення вікон
+Name[uz]=Oynaning bezaklari
+Name[uz@cyrillic]=Ойнанинг безаклари
+Name[ven]=U khavhisedza ha windo
+Name[vi]=Trang trí Cửa sổ
+Name[wa]=Gåliotaedjes des purneas
+Name[xh]=Izihombiso zeWindow
+Name[zh_CN]=窗口装饰
+Name[zh_TW]=視窗裝飾
+Name[zu]=Imihlobiso ye-window
+
+Comment=Configure the look and feel of window titles
+Comment[af]=Stel die uitdrukking en gevoek van venster titels op
+Comment[ar]=إعداد شكل و ملمس عنوان النافذة
+Comment[be]=Настаўленні вонкавага выгляду загалоўкаў вокнаў
+Comment[bg]=Настройване външния вид на прозорците
+Comment[bn]=উইণ্ডো শিরোনামের চেহারা কনফিগার করুন
+Comment[br]=Kefluniañ neuz ha feson titloù ar prenester
+Comment[bs]=Ovdje možete podesiti izgled i ponašanje naslova prozora
+Comment[ca]=Configura l'aspecte i efecte dels títols de la finestra
+Comment[cs]=Nastavení vzhledu a dekorací oken
+Comment[csb]=Kònfigùracëjô wëzdrzatkù ë ùchòwaniô titlowi lëstwë òknów
+Comment[cy]=Ffurfweddu golwg a theimlad teitlau ffenestri
+Comment[da]=Indstil udseendet af vinduestitler
+Comment[de]=Das Erscheinungsbild von Fenstertiteln festlegen
+Comment[el]=Ρυθμίστε την εμφάνιση και την αίσθηση των τίτλων παραθύρου
+Comment[eo]=Agordu la fenestrajn titolojn
+Comment[es]=Configuración del aspecto y comportamiento de los títulos de las ventanas
+Comment[et]=Akna tiitliribade välimuse ja tunnetuse seadistamine
+Comment[eu]=Konfiguratu leihoaren izenburuen itxura
+Comment[fa]=پیکربندی ظاهر و احساس عنوان پنجره‌ها
+Comment[fi]=Muokkaa ikkunoiden kehysten ulkonäköä
+Comment[fr]=Configuration de l'apparence du titre des fenêtres
+Comment[fy]=Hjir kinne jo it uterlik en gedrach fan finstertitels ynstelle
+Comment[gl]=Configurar a apariencia dos títulos das fiestras
+Comment[he]=שינוי הגדרות המראה והתחושה של כותרות חלונות
+Comment[hi]=विंडो शीर्षकों के रूप आकार को कॉन्फ़िगर करें
+Comment[hr]=Konfiguriranje izgleda naslova prozora
+Comment[hu]=Az ablakok címsorának megjelenési beállításai
+Comment[is]=Stilla viðmót gluggatitla
+Comment[it]=Configura l'aspetto e il comportamento dei titoli delle finestre
+Comment[ja]=ウィンドウのタイトルバーの外観を設定
+Comment[ka]=ფანჯრის სათაურის იერსახის კონფიგურაცია
+Comment[kk]=Терезе айдарының безендіруін баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​រូបរាង​របស់​ចំណងជើង​បង្អួច
+Comment[ko]=창 제목 표시줄의 모습과 느낌 설정
+Comment[lo]=ປັດແຕ່ງລັກສະນະແລະຄວາມຮູ້ສືກໃນການໃຊ້ງານຂອງບາວເຊີ Konqueror
+Comment[lt]=Konfigūruoti langų antraščių išvaizdą ir elgseną
+Comment[lv]=Konfigurē loga virsrakstu izskatu un izturēšanos
+Comment[mk]=Конфигурирајте го изгледот и чувството на насловите на прозорците
+Comment[mn]=Цонхны толгойн харагдалтыг тохируулах
+Comment[mt]=Ikkonfigura d-dehra u l-użu tat-titli tal-windows
+Comment[nb]=Her kan du sette opp hvordan nettleseren Konqueror skal virke og se ut
+Comment[nds]=Dat Utsehn vun de Finstertiteln instellen
+Comment[ne]=सञ्झ्याल शीर्षकहरूको हेराइ र बुझाइ कन्फिगर गर्नुहोस्
+Comment[nl]=Hier kunt u het uiterlijk en gedrag van venstertitels instellen
+Comment[nn]=Set opp utsjånaden på vindaugstitlar
+Comment[nso]=Beakanya pogego le maikutlo a maina a window
+Comment[pa]=ਝਰੋਖਾ ਸਿਰਲੇਖਾਂ ਦੇ ਰੰਗ-ਰੂਪ ਦੀ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja wyglądu i zachowania belek tytułowych okien
+Comment[pt]=Configuração da aparência e comportamento dos títulos das janelas
+Comment[pt_BR]=Configura a aparência dos títulos de janelas
+Comment[ro]=Configurează aspectul titlului ferestrelor
+Comment[ru]=Настройка внешнего вида заголовков окон
+Comment[rw]=Kuboneza imboneko n'ukumva kw'imitwe y'idirishya
+Comment[se]=Heivet lásenamahusaid fárdda
+Comment[sk]=Nastavenie vzhľadu titulkov okien
+Comment[sl]=Nastavite videz in delovanje naslovnih vrstic okna.
+Comment[sr]=Подешавање изгледа и осећаја насловних линија прозора
+Comment[sr@Latn]=Podešavanje izgleda i osećaja naslovnih linija prozora
+Comment[sv]=Anpassa namnlisternas utseende och känsla
+Comment[ta]=சாளரம் மற்றும் தலைப்பின் காட்சிவகையை மாற்று
+Comment[tg]=Танзими намо ва ҳиси унвони тиреза
+Comment[th]=ปรับแต่งลักษณะรูปแบบและสัมผัสสึกของแถบหัวเรื่องหน้าต่าง
+Comment[tr]=Pencere başlıklarını görünümlerini yapılandır
+Comment[tt]=Täräzä başlığınıñ küreneşen caylaw
+Comment[uk]=Налаштування вигляду та поведінки заголовків вікон
+Comment[uz]=Oyna sarlavhasining tashqi koʻrinishini moslash
+Comment[uz@cyrillic]=Ойна сарлавҳасининг ташқи кўринишини мослаш
+Comment[ven]=Dzudzanyani mbonalelo na zwipfi zwa buronza ya inithanete ino pfi Konqueror
+Comment[vi]=Cấu hình cảm nhận cho tên cửa sổ
+Comment[wa]=Apontyî li rivnance eyet l' dujhance des tites des purneas
+Comment[xh]=Qwalasela inkangeleko nemvakalelo yezihloko zeWindow
+Comment[zh_CN]=配置窗口标题的观感
+Comment[zh_TW]=設定視窗標題列的外觀與感覺
+Comment[zu]=Hlanganisela ukubona kanye nokuzwa kwezihloko zama-window
+
+Keywords=kwin,window,manager,border,style,theme,look,feel,layout,button,handle,edge,kwm,decoration
+Keywords[ar]=kwin,نافذة,مسيير,الحافة,الشكل,سمة,مظهر,ملمس,تصميم,زر,معامل,مدبر,kwm,زخرفات
+Keywords[az]=kwin,pəncərə,idarəçi,kənar,tərz,örtü,görünüş,toxuma,yer,düymə,applet,kənar,kwm,dekorasiya,bəzək
+Keywords[be]=Акно,Кіраўнік,Мяжа,Стыль,Тэма,Вонкавы выгляд,Кнопкі,Апрацоўшчык,Край,Дэкарацыя,kwin,window,manager,border,style,theme,look,feel,layout,button,handle,edge,kwm,decoration
+Keywords[bg]=прозорец, декорация, заглавие, бутони, меню, kwin, window, manager, border, style, theme, look, feel, layout, button, handle, edge, kwm, decoration
+Keywords[ca]=kwin,finestra,gestor,vora,estil,tema,aspecte,comportament,disposició,botó,nansa,marges,kwm,decoració
+Keywords[cs]=kwin,okno,správce,okraj,styl,motiv,vzhled,rozvržení,tlačítko,úchytka,hrana,kwm,dekorace
+Keywords[csb]=kwin,òkno,menedżer,zberk,sztél,téma,wëzdrzatk,ùchòwanié,ùstôw,knąpa,ùchwët,rańt,kwm,dekòracëjô
+Keywords[cy]=kwin,ffenestr,trefnydd,ymyl,arddull,thema,golwg,teimlad,haenlun,botwm,carn,kwm,addurniad
+Keywords[da]=kwin,vindue,håndtering,kant,stil,tema,udseende,fornemmelse,layout,knap,håndtag,kant,kwm,dekoration
+Keywords[de]=KWin,Kwm,Fenster,Manager,Rahmen,Design,Stile,Themes,Optik,Erscheinungsbild,Layout,Knöpfe,Ränder,Dekorationen
+Keywords[el]=kwin,παράθυρο,διαχειριστής,περίγραμμα,στυλ,θέμα,εμφάνιση,αίσθηση,διάταξη,κουμπί,χειρισμός,άκρο,kwm,διακόσμηση
+Keywords[eo]=kwin,fenestro,administrilo,rando,stilo,etoso,aspekto,konduto,aranĝo,butono,eĝo,kwm,ornamo
+Keywords[es]=kwin,ventana,gestor,borde,estilo,tema,aspecto,comportamiento,disposición,botón,asa,esquina,kwm,decoración
+Keywords[et]=kwin,aken,haldur,piire,stiil,teema,välimus,kasutamine,nupud,serv,kwm,dekoratsioon
+Keywords[eu]=kwin,leihoa,kudeatzailea,ertza,estiloa,gaia,itxura,antolaketa,botoia, maneiatzailea,ertzea,kwm,dekorazioa
+Keywords[fa]=kwin، پنجره، مدیر، لبه، سبک، چهره، ظاهر، احساس، طرح‌بندی، دکمه، گرداندن، لبه، kwm، تزئین
+Keywords[fi]=kwin,ikkuna,ikkunaohjelma,ikkunoinnin hallintaohjelma,tausta,tyyli,teema,ulkonäkö,tuntuma,ulkoasu,painike,kahva,kulma,kwm,kehys
+Keywords[fr]=kwin,fenêtre,gestionnaire,bordure,style,thème,apparence,ergonomie,disposition,bouton,poignée,bord,kwm,décoration
+Keywords[fy]=kwin,window,manager,rand,stijl,theme,tema,look,uiterlijk,gedrag,feel,layout,opmaak,button,knoppen,handle,rand,kwm,decoratie,windowmanager,venster,vensterbeheer,finster,râne,kader,styltema,uterlik,gedrach,finsterbehear
+Keywords[ga]=kwin,fuinneog,bainisteoir,imlíne,stíl,téama,leagan amach,cnaipe,hanla,ciumhais,kwm,maisiúchán
+Keywords[gl]=kwin,fiestra,xestor,beira,estilo,tema,apariencia,formato,botón,xestión,esquina,kwm,decoración
+Keywords[he]=מנהל חלונות,חלונות,מנהל,גבול,מסגרת,סגנון,ערכה,ערכת נושא,מראה,תחושה,פריסה,תצוגה,כפתור,ידית,קצה,קישוט, kwin,window,manager,border,style,theme,look,feel,layout,button,handle, edge,kwm,decoration
+Keywords[hi]=के-विन,विंडो,प्रबंधक,बार्डर,शैली,प्रसंग,रूप,अनुभव,ले-आउट,बटन,हैंडल,किनारा,केडबल्यूएम,सजावट
+Keywords[hr]=kwin,window,manager,border,style,theme,look,feel,layout,button,handle,edge,kwm,decoration,prozor,upravljanje,obrub,stil,tema,izgled,raspored,gumb,rukovanje,rub,ukras
+Keywords[hu]=KWin,ablak,kezelő,szegély,stílus,téma,kinézet,megjelenés,elrendezés,nyomógomb,fogantyú,perem,kwm,ablakstílus
+Keywords[is]=kwin,gluggi,gluggastjóri,gluggar,kantar,rammi,skreyting,þema,stíll,útlit,takki,kwm,skraut
+Keywords[it]=kwin,finestra,window manager,bordo,stile,tema,aspetto,pulsante,maniglia,bordo,kwm,decorazione
+Keywords[ja]=kwin,ウィンドウ,マネージャ,枠,スタイル,テーマ,ルック,外観,レイアウト,ボタン,ハンドル,エッジ,kwm,装飾
+Keywords[km]=kwin,បង្អួច,កម្មវិធី​គ្រប់គ្រង,ស៊ុម,រចនាប័ទ្ម,ស្បែក,មុខងារ,ប្លង់,ប៊ូតុង,ការ​ប្រើ,គែម,kwm,ការ​តុបតែង
+Keywords[lt]=kwin,window,manager,border,style,theme,look,feel,layout,buttons,handle,edge,kwm,decoration,langas,tvarkyklė,rėmelis,stilius,tema,žiūrėti,jausti,išdėstymas,mygtukai,kraštas,dekoracija
+Keywords[lv]=kwin, logs, menedžeris, rāmis, stils, tēma, skats, gars, izkārtojums, poga, rokturis, stūris, kwm, dekorācija
+Keywords[mk]=kwin,window,manager,border,style,theme,look,feel,layout,button,handle,edge,kwm,decoration,прозорец,менаџер,граница,стил,тема,изглед,чувство,распоред,копче,рачка,раб,декорација
+Keywords[mn]=KWin,Kwm,Цонх,Manager,Хүрээ,Design,Хэлбэр,Загвар, Optik,Харагдалт,Layout,Товч,Өнцөг,Засал
+Keywords[mt]=kwin, window, manager, border, bordura, stil, tema, apparenza, style, theme, look, feel, layout, tqassim, użu, button, handle, edge, kwm, decoration
+Keywords[nb]=kwin,vindu,vindusstyring,styrer,ramme,stil,tema,utseende,layout,knapp,kant,kwm,pynt,dekorasjon
+Keywords[nds]=kwin,Finster,Finsterpleger,manager,Rahmen,Stil,Muster,look,feel,layout,Knoop,Greep,Rand,kwm,Dekoratschoon
+Keywords[ne]=के विन,सञ्झ्याल, प्रबन्धक, किनारा, शैली, विषयवस्तु, हेराइ, बुझाइ, सजावट, बटन, ह्यान्डल, छेउ,kwm, सजावट
+Keywords[nl]=kwin,window,manager,rand,stijl,theme,thema,look,uiterlijk,gedrag,feel, layout,opmaak,button,knoppen,handle,rand,kwm,decoratie,windowmanager,venster,vensterbeheer
+Keywords[nn]=kwin,vindauge,kant,bord,stil,tema,utsjånad,bunad,knapp,handtak,kwm,dekorasjon
+Keywords[nso]=kwin,window,molaodi,mollwane,mokgwa,molaetsa,tebelego,maikutlo,peakanyo,setobetswa,moswaro,nthla,kwm,kgabiso
+Keywords[pa]=kwin,handle,edge,kwm,decoration,ਝਰੋਖਾ,ਮੈਨੇਜਰ,ਹਾਸ਼ੀਆ,ਸ਼ੈਲੀ,ਸਰੂਪ,ਦਿੱਖ,ਖਾਕਾ,ਬਟਨ,ਹੈਂਡਲ,ਸਜਾਵਟ
+Keywords[pl]=kwin,okno,menedżer,brzeg,styl,motyw,wygląd,zachowanie,układ,przycisk,uchwyt,krawędź,kwm,dekoracja
+Keywords[pt]=kwin,janela,gestor,contorno,estilo,tema,aparência,comportamento,visual,botão,pega,extremo,kwm,decoração
+Keywords[pt_BR]=kwin,janela,gerenciador,borda,estilo,tema,aparência,aparência,botão, gerenciador,borda,kwm,decoração
+Keywords[ro]=kwin,fereastră,manager,margine,stil,tematică,aspect,comportament,format,buton,kwm,decorare
+Keywords[rw]=kwin,idirishya,muyobozi,impera,imisusire,insanganyamatsiko,imboneko,kumva,imigaragarire,buto,ikirindi,impera,kwm,ugutaaka
+Keywords[se]=kwin,láse,gieđahalli,ravda,stiila,fáddá,fárda,dovdu,hápmi,boallu,geavja,ravda,kwm,hearva
+Keywords[sk]=kwin,okno,správa,okraj,štýl,téma,vzhľad,rozloženie,tlačidlo,hrana,kwm,dekorácia,oblasť
+Keywords[sl]=kwin,okno,upravitelj,rob,meja,slog,stil,tema,pogled,občutek,gumb,ročaj,rob,kwm,okrasek
+Keywords[sr]=kwin,window,manager,border,style,theme,look,feel,layout,button,handle,edge,kwm,decoration,прозор,менаџер,оквир,стил,тема,изглед,дугме,хватаљка,декорација
+Keywords[sr@Latn]=kwin,window,manager,border,style,theme,look,feel,layout,button,handle,edge,kwm,decoration,prozor,menadžer,okvir,stil,tema,izgled,dugme,hvataljka,dekoracija
+Keywords[sv]=kwin,fönster,hanterare,kant,stil,tema,utseende,känsla,layout,knapp,hantera,kant,kwm,dekoration
+Keywords[ta]=kwin,சாளரம்,மேலாளர்,விளிம்பு,பாணி,தலைப்பு,பார்வை,உணர்தல்,உருவரை,விசை,கையாள்,முனை,kwm,அலங்கரிப்பு
+Keywords[th]=kwin,หน้าต่าง,ตัวจัดการ,กรอบ,ลักษณะ,ชุดตกแต่ง,มองเห็น,รู้สึก,การจัดวาง,ปุ่ม,ที่จับ,ขอบ,kwm,การตกแต่ง
+Keywords[tr]=kwin,pencere,yönetici,kenar,stil,tema,görünüş,doku,yerleşim,düğme,tutamaç,kenar,kwm,dekorasyon
+Keywords[uk]=kwin,вікно,менеджер,границя,стиль,тема,вигляд,поведінка,розклад,кнопка,handle,край,kwm,обрамлення
+Keywords[uz]=kwin,kwm,bezak,oyna,boshqaruvchi,usul,tashqi koʻrinish
+Keywords[uz@cyrillic]=kwin,kwm,безак,ойна,бошқарувчи,усул,ташқи кўриниш
+Keywords[ven]=kwin,windo,mulanguli,mukanoni,tshitaela,thero,sedza,upfa,vhuvha,bathene,fara,mafhedziselo,kwn,u khavhisedza
+Keywords[vi]=kwin,cửa sổ,quản lý,bờ,kiểu,sắc thái,ngoại hình,cảm nhận,sắp xếp,nút,điều khiển,cạnh,kwm,trang trí
+Keywords[wa]=kwin,kpurnea,purnea,manaedjeu,boird,stîle,tinme,rivnance,layout;loukance,boton,apougnî,costé,kwm,gåliotaedje
+Keywords[xh]=kwin,window,umphathi,umda,uhlobo,umxholo wokuxoxwa,jonga,yiva,beka,iqhosha,umqheba,umda,kwm,uhombiso
+Keywords[zh_CN]=kwin,window,manager,border,style,theme,look,feel,layout,button,handle,edge,kwm,decoration,窗口,管理器,边框,样式,主题,观感,布局,按钮,处理,边缘,装饰
+Keywords[zh_TW]=kwin,window,manager,border,style,theme,look,feel,layout,button,handle,edge,kwm,decoration,視窗,管理員,邊框,風格,佈景主題,外觀,感覺,佈局,按鈕,邊緣,裝飾
+Keywords[zu]=kwin,i-window,imenenja,umngcele,isitayela,bona,izwa, isendlalelo,inkinobho,isibambo,unqenqema,kwm,umhlobiso
+Categories=Qt;KDE;X-KDE-settings-looknfeel;
diff --git a/kwin/kcmkwin/kwindecoration/kwindecoration.h b/kwin/kcmkwin/kwindecoration/kwindecoration.h
new file mode 100644
index 000000000..eea091ebc
--- /dev/null
+++ b/kwin/kcmkwin/kwindecoration/kwindecoration.h
@@ -0,0 +1,135 @@
+/*
+ This is the new kwindecoration kcontrol module
+
+ Copyright (c) 2001
+ Karol Szwed <gallium@kde.org>
+ http://gallium.n3.net/
+
+ Supports new kwin configuration plugins, and titlebar button position
+ modification via dnd interface.
+
+ Based on original "kwintheme" (Window Borders)
+ Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#ifndef KWINDECORATION_H
+#define KWINDECORATION_H
+
+#include <kcmodule.h>
+#include <dcopobject.h>
+#include <buttons.h>
+#include <kconfig.h>
+#include <klibloader.h>
+
+#include <kdecoration.h>
+
+#include "kwindecorationIface.h"
+
+class KComboBox;
+class QCheckBox;
+class QLabel;
+class QTabWidget;
+class QVBox;
+class QSlider;
+
+class KDecorationPlugins;
+class KDecorationPreview;
+
+// Stores themeName and its corresponding library Name
+struct DecorationInfo
+{
+ QString name;
+ QString libraryName;
+};
+
+
+class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface, public KDecorationDefines
+{
+ Q_OBJECT
+
+ public:
+ KWinDecorationModule(QWidget* parent, const char* name, const QStringList &);
+ ~KWinDecorationModule();
+
+ virtual void load();
+ virtual void save();
+ virtual void defaults();
+
+ QString quickHelp() const;
+
+ virtual void dcopUpdateClientList();
+
+ signals:
+ void pluginLoad( KConfig* conf );
+ void pluginSave( KConfig* conf );
+ void pluginDefaults();
+
+ protected slots:
+ // Allows us to turn "save" on
+ void slotSelectionChanged();
+ void slotChangeDecoration( const QString & );
+ void slotBorderChanged( int );
+ void slotButtonsChanged();
+
+ private:
+ void readConfig( KConfig* conf );
+ void writeConfig( KConfig* conf );
+ void findDecorations();
+ void createDecorationList();
+ void updateSelection();
+ QString decorationLibName( const QString& name );
+ QString decorationName ( QString& libName );
+ static QString styleToConfigLib( QString& styleLib );
+ void resetPlugin( KConfig* conf, const QString& currentDecoName = QString::null );
+ void resetKWin();
+ void checkSupportedBorderSizes();
+ static int borderSizeToIndex( BorderSize size, QValueList< BorderSize > sizes );
+ static BorderSize indexToBorderSize( int index, QValueList< BorderSize > sizes );
+
+ QTabWidget* tabWidget;
+
+ // Page 1
+ KComboBox* decorationList;
+ QValueList<DecorationInfo> decorations;
+
+ KDecorationPreview* preview;
+ KDecorationPlugins* plugins;
+ KConfig kwinConfig;
+
+ QCheckBox* cbUseCustomButtonPositions;
+ // QCheckBox* cbUseMiniWindows;
+ QCheckBox* cbShowToolTips;
+ QLabel* lBorder;
+ QComboBox* cBorder;
+ BorderSize border_size;
+
+ QObject* pluginObject;
+ QWidget* pluginConfigWidget;
+ QString currentLibraryName;
+ QString oldLibraryName;
+ QObject* (*allocatePlugin)( KConfig* conf, QWidget* parent );
+
+ // Page 2
+ ButtonPositionWidget *buttonPositionWidget;
+ QVBox* buttonPage;
+};
+
+
+#endif
+// vim: ts=4
+// kate: space-indent off; tab-width 4;
diff --git a/kwin/kcmkwin/kwindecoration/kwindecorationIface.h b/kwin/kcmkwin/kwindecoration/kwindecorationIface.h
new file mode 100644
index 000000000..f45be6b7b
--- /dev/null
+++ b/kwin/kcmkwin/kwindecoration/kwindecorationIface.h
@@ -0,0 +1,44 @@
+/*
+ This is the new kwindecoration kcontrol module
+
+ Copyright (c) 2001
+ Karol Szwed (gallium) <karlmail@usa.net>
+ http://gallium.n3.net/
+
+ Supports new kwin configuration plugins, and titlebar button position
+ modification via dnd interface.
+
+ Based on original "kwintheme" (Window Borders)
+ Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#ifndef __KWINDECORATIONIFACE_H
+#define __KWINDECORATIONIFACE_H
+
+#include <dcopobject.h>
+
+class KWinDecorationIface: virtual public DCOPObject
+{
+ K_DCOP
+ public:
+
+ k_dcop:
+ virtual void dcopUpdateClientList()=0;
+};
+
+#endif
diff --git a/kwin/kcmkwin/kwindecoration/pixmaps.h b/kwin/kcmkwin/kwindecoration/pixmaps.h
new file mode 100644
index 000000000..76f60b3e9
--- /dev/null
+++ b/kwin/kcmkwin/kwindecoration/pixmaps.h
@@ -0,0 +1,110 @@
+/*
+ This is the new kwindecoration kcontrol module
+
+ Copyright (c) 2004, Sandro Giessl <sandro@giessl.com>
+ Copyright (c) 2001
+ Karol Szwed <gallium@kde.org>
+ http://gallium.n3.net/
+
+ Supports new kwin configuration plugins, and titlebar button position
+ modification via dnd interface.
+
+ Based on original "kwintheme" (Window Borders)
+ Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+// Button icon bitmap data which is hopefully generic enough to be recognized by everyone.
+
+// close.xbm:
+#define close_width 12
+#define close_height 12
+static unsigned char close_bits[] = {
+ 0x00, 0x00, 0x06, 0x06, 0x0e, 0x07, 0x9c, 0x03, 0xf8, 0x01, 0xf0, 0x00,
+ 0xf0, 0x00, 0xf8, 0x01, 0x9c, 0x03, 0x0e, 0x07, 0x06, 0x06, 0x00, 0x00 };
+
+// help.xbm:
+#define help_width 12
+#define help_height 12
+static unsigned char help_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0xfc, 0x01, 0x8c, 0x01, 0xc0, 0x01,
+ 0xe0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00 };
+
+// keepaboveothers.xbm:
+#define keepaboveothers_width 12
+#define keepaboveothers_height 12
+static unsigned char keepaboveothers_bits[] = {
+ 0x00, 0x00, 0x60, 0x00, 0xf0, 0x00, 0xf8, 0x01, 0x60, 0x00, 0xfe, 0x07,
+ 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+// keepbelowothers.xbm:
+#define keepbelowothers_width 12
+#define keepbelowothers_height 12
+static unsigned char keepbelowothers_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07,
+ 0xfe, 0x07, 0x60, 0x00, 0xf8, 0x01, 0xf0, 0x00, 0x60, 0x00, 0x00, 0x00 };
+
+// maximize.xbm:
+#define maximize_width 12
+#define maximize_height 12
+static unsigned char maximize_bits[] = {
+ 0x00, 0x00, 0xfe, 0x07, 0xfe, 0x07, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
+ 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0xfe, 0x07, 0x00, 0x00 };
+
+// menu.xbm:
+#define menu_width 12
+#define menu_height 12
+static unsigned char menu_bits[] = {
+ 0x00, 0x00, 0xfc, 0x03, 0xf4, 0x02, 0x04, 0x02, 0xf4, 0x02, 0x04, 0x02,
+ 0xf4, 0x02, 0x04, 0x02, 0xf4, 0x02, 0x04, 0x02, 0xfc, 0x03, 0x00, 0x00 };
+
+// minimize.xbm:
+#define minimize_width 12
+#define minimize_height 12
+static unsigned char minimize_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07, 0xfe, 0x07, 0x00, 0x00 };
+
+// onalldesktops.xbm:
+#define onalldesktops_width 12
+#define onalldesktops_height 12
+static unsigned char onalldesktops_bits[] = {
+ 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0xfe, 0x07,
+ 0xfe, 0x07, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00 };
+
+// resize.xbm:
+#define resize_width 12
+#define resize_height 12
+static unsigned char resize_bits[] = {
+ 0x00, 0x00, 0xfe, 0x07, 0x42, 0x04, 0x42, 0x04, 0x42, 0x04, 0x42, 0x04,
+ 0x7e, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0xfe, 0x07, 0x00, 0x00 };
+
+// shade.xbm:
+#define shade_width 12
+#define shade_height 12
+static unsigned char shade_bits[] = {
+ 0x00, 0x00, 0xfe, 0x07, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+// spacer.xbm:
+#define spacer_width 12
+#define spacer_height 12
+static unsigned char spacer_bits[] = {
+ 0x00, 0x00, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x54, 0x03,
+ 0xac, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x00, 0x00 };
+
+// vim: ts=4
diff --git a/kwin/kcmkwin/kwindecoration/preview.cpp b/kwin/kcmkwin/kwindecoration/preview.cpp
new file mode 100644
index 000000000..8c88a3604
--- /dev/null
+++ b/kwin/kcmkwin/kwindecoration/preview.cpp
@@ -0,0 +1,507 @@
+/*
+ *
+ * Copyright (c) 2003 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "preview.h"
+
+#include <kapplication.h>
+#include <klocale.h>
+#include <kconfig.h>
+#include <kglobal.h>
+#include <qlabel.h>
+#include <qstyle.h>
+#include <kiconloader.h>
+
+#include <X11/Xlib.h>
+#include <X11/extensions/shape.h>
+
+#include <kdecorationfactory.h>
+#include <kdecoration_plugins_p.h>
+
+// FRAME the preview doesn't update to reflect the changes done in the kcm
+
+KDecorationPreview::KDecorationPreview( QWidget* parent, const char* name )
+ : QWidget( parent, name )
+ {
+ options = new KDecorationPreviewOptions;
+
+ bridge[Active] = new KDecorationPreviewBridge( this, true );
+ bridge[Inactive] = new KDecorationPreviewBridge( this, false );
+
+ deco[Active] = deco[Inactive] = NULL;
+
+ no_preview = new QLabel( i18n( "No preview available.\n"
+ "Most probably there\n"
+ "was a problem loading the plugin." ), this );
+
+ no_preview->setAlignment( AlignCenter );
+
+ setMinimumSize( 100, 100 );
+ no_preview->resize( size());
+ }
+
+KDecorationPreview::~KDecorationPreview()
+ {
+ for ( int i = 0; i < NumWindows; i++ )
+ {
+ delete deco[i];
+ delete bridge[i];
+ }
+ delete options;
+ }
+
+bool KDecorationPreview::recreateDecoration( KDecorationPlugins* plugins )
+ {
+ for ( int i = 0; i < NumWindows; i++ )
+ {
+ delete deco[i]; // deletes also window
+ deco[i] = plugins->createDecoration( bridge[i] );
+ deco[i]->init();
+ }
+
+ if( deco[Active] == NULL || deco[Inactive] == NULL )
+ {
+ return false;
+ }
+
+ positionPreviews();
+ deco[Inactive]->widget()->show();
+ deco[Active]->widget()->show();
+
+ return true;
+ }
+
+void KDecorationPreview::enablePreview()
+ {
+ no_preview->hide();
+ }
+
+void KDecorationPreview::disablePreview()
+ {
+ delete deco[Active];
+ delete deco[Inactive];
+ deco[Active] = deco[Inactive] = NULL;
+ no_preview->show();
+ }
+
+void KDecorationPreview::resizeEvent( QResizeEvent* e )
+ {
+ QWidget::resizeEvent( e );
+ positionPreviews();
+ }
+
+void KDecorationPreview::positionPreviews()
+ {
+ int titleBarHeight, leftBorder, rightBorder, xoffset,
+ dummy1, dummy2, dummy3;
+ QRect geometry;
+ QSize size;
+
+ no_preview->resize( this->size() );
+
+ if ( !deco[Active] || !deco[Inactive] )
+ return;
+
+ // don't have more than one reference to the same dummy variable in one borders() call.
+ deco[Active]->borders( dummy1, dummy2, titleBarHeight, dummy3 );
+ deco[Inactive]->borders( leftBorder, rightBorder, dummy1, dummy2 );
+
+ titleBarHeight = kMin( int( titleBarHeight * .9 ), 30 );
+ xoffset = kMin( kMax( 10, QApplication::reverseLayout()
+ ? leftBorder : rightBorder ), 30 );
+
+ // Resize the active window
+ size = QSize( width() - xoffset, height() - titleBarHeight )
+ .expandedTo( deco[Active]->minimumSize() );
+ geometry = QRect( QPoint( 0, titleBarHeight ), size );
+ deco[Active]->widget()->setGeometry( QStyle::visualRect( geometry, this ) );
+
+ // Resize the inactive window
+ size = QSize( width() - xoffset, height() - titleBarHeight )
+ .expandedTo( deco[Inactive]->minimumSize() );
+ geometry = QRect( QPoint( xoffset, 0 ), size );
+ deco[Inactive]->widget()->setGeometry( QStyle::visualRect( geometry, this ) );
+ }
+
+void KDecorationPreview::setPreviewMask( const QRegion& reg, int mode, bool active )
+ {
+ QWidget *widget = active ? deco[Active]->widget() : deco[Inactive]->widget();
+
+ // FRAME duped from client.cpp
+ if( mode == Unsorted )
+ {
+ XShapeCombineRegion( qt_xdisplay(), widget->winId(), ShapeBounding, 0, 0,
+ reg.handle(), ShapeSet );
+ }
+ else
+ {
+ QMemArray< QRect > rects = reg.rects();
+ XRectangle* xrects = new XRectangle[ rects.count() ];
+ for( unsigned int i = 0;
+ i < rects.count();
+ ++i )
+ {
+ xrects[ i ].x = rects[ i ].x();
+ xrects[ i ].y = rects[ i ].y();
+ xrects[ i ].width = rects[ i ].width();
+ xrects[ i ].height = rects[ i ].height();
+ }
+ XShapeCombineRectangles( qt_xdisplay(), widget->winId(), ShapeBounding, 0, 0,
+ xrects, rects.count(), ShapeSet, mode );
+ delete[] xrects;
+ }
+ if( active )
+ mask = reg; // keep shape of the active window for unobscuredRegion()
+ }
+
+QRect KDecorationPreview::windowGeometry( bool active ) const
+ {
+ QWidget *widget = active ? deco[Active]->widget() : deco[Inactive]->widget();
+ return widget->geometry();
+ }
+
+void KDecorationPreview::setTempBorderSize(KDecorationPlugins* plugin, KDecorationDefines::BorderSize size)
+ {
+ options->setCustomBorderSize(size);
+ if (plugin->factory()->reset(KDecorationDefines::SettingBorder) )
+ {
+ // can't handle the change, recreate decorations then
+ recreateDecoration(plugin);
+ }
+ else
+ {
+ // handles the update, only update position...
+ positionPreviews();
+ }
+ }
+
+void KDecorationPreview::setTempButtons(KDecorationPlugins* plugin, bool customEnabled, const QString &left, const QString &right)
+ {
+ options->setCustomTitleButtonsEnabled(customEnabled);
+ options->setCustomTitleButtons(left, right);
+ if (plugin->factory()->reset(KDecorationDefines::SettingButtons) )
+ {
+ // can't handle the change, recreate decorations then
+ recreateDecoration(plugin);
+ }
+ else
+ {
+ // handles the update, only update position...
+ positionPreviews();
+ }
+ }
+
+QRegion KDecorationPreview::unobscuredRegion( bool active, const QRegion& r ) const
+ {
+ if( active ) // this one is not obscured
+ return r;
+ else
+ {
+ // copied from KWin core's code
+ QRegion ret = r;
+ QRegion r2 = mask;
+ if( r2.isEmpty())
+ r2 = QRegion( windowGeometry( true ));
+ r2.translate( windowGeometry( true ).x() - windowGeometry( false ).x(),
+ windowGeometry( true ).y() - windowGeometry( false ).y());
+ ret -= r2;
+ return ret;
+ }
+ }
+
+KDecorationPreviewBridge::KDecorationPreviewBridge( KDecorationPreview* p, bool a )
+ : preview( p ), active( a )
+ {
+ }
+
+QWidget* KDecorationPreviewBridge::initialParentWidget() const
+ {
+ return preview;
+ }
+
+Qt::WFlags KDecorationPreviewBridge::initialWFlags() const
+ {
+ return 0;
+ }
+
+bool KDecorationPreviewBridge::isActive() const
+ {
+ return active;
+ }
+
+bool KDecorationPreviewBridge::isCloseable() const
+ {
+ return true;
+ }
+
+bool KDecorationPreviewBridge::isMaximizable() const
+ {
+ return true;
+ }
+
+KDecoration::MaximizeMode KDecorationPreviewBridge::maximizeMode() const
+ {
+ return KDecoration::MaximizeRestore;
+ }
+
+bool KDecorationPreviewBridge::isMinimizable() const
+ {
+ return true;
+ }
+
+bool KDecorationPreviewBridge::providesContextHelp() const
+ {
+ return true;
+ }
+
+int KDecorationPreviewBridge::desktop() const
+ {
+ return 1;
+ }
+
+bool KDecorationPreviewBridge::isModal() const
+ {
+ return false;
+ }
+
+bool KDecorationPreviewBridge::isShadeable() const
+ {
+ return true;
+ }
+
+bool KDecorationPreviewBridge::isShade() const
+ {
+ return false;
+ }
+
+bool KDecorationPreviewBridge::isSetShade() const
+ {
+ return false;
+ }
+
+bool KDecorationPreviewBridge::keepAbove() const
+ {
+ return false;
+ }
+
+bool KDecorationPreviewBridge::keepBelow() const
+ {
+ return false;
+ }
+
+bool KDecorationPreviewBridge::isMovable() const
+ {
+ return true;
+ }
+
+bool KDecorationPreviewBridge::isResizable() const
+ {
+ return true;
+ }
+
+NET::WindowType KDecorationPreviewBridge::windowType( unsigned long ) const
+ {
+ return NET::Normal;
+ }
+
+QIconSet KDecorationPreviewBridge::icon() const
+ {
+ return QIconSet( KGlobal::iconLoader()->loadIcon( "xapp", KIcon::NoGroup, 16 ),
+ KGlobal::iconLoader()->loadIcon( "xapp", KIcon::NoGroup, 32 ));
+ }
+
+QString KDecorationPreviewBridge::caption() const
+ {
+ return active ? i18n( "Active Window" ) : i18n( "Inactive Window" );
+ }
+
+void KDecorationPreviewBridge::processMousePressEvent( QMouseEvent* )
+ {
+ }
+
+void KDecorationPreviewBridge::showWindowMenu( const QRect &)
+ {
+ }
+
+void KDecorationPreviewBridge::showWindowMenu( QPoint )
+ {
+ }
+
+void KDecorationPreviewBridge::performWindowOperation( WindowOperation )
+ {
+ }
+
+void KDecorationPreviewBridge::setMask( const QRegion& reg, int mode )
+ {
+ preview->setPreviewMask( reg, mode, active );
+ }
+
+bool KDecorationPreviewBridge::isPreview() const
+ {
+ return true;
+ }
+
+QRect KDecorationPreviewBridge::geometry() const
+ {
+ return preview->windowGeometry( active );
+ }
+
+QRect KDecorationPreviewBridge::iconGeometry() const
+ {
+ return QRect();
+ }
+
+QRegion KDecorationPreviewBridge::unobscuredRegion( const QRegion& r ) const
+ {
+ return preview->unobscuredRegion( active, r );
+ }
+
+QWidget* KDecorationPreviewBridge::workspaceWidget() const
+ {
+ return preview;
+ }
+
+WId KDecorationPreviewBridge::windowId() const
+ {
+ return 0; // no decorated window
+ }
+
+void KDecorationPreviewBridge::closeWindow()
+ {
+ }
+
+void KDecorationPreviewBridge::maximize( MaximizeMode )
+ {
+ }
+
+void KDecorationPreviewBridge::minimize()
+ {
+ }
+
+void KDecorationPreviewBridge::showContextHelp()
+ {
+ }
+
+void KDecorationPreviewBridge::setDesktop( int )
+ {
+ }
+
+void KDecorationPreviewBridge::titlebarDblClickOperation()
+ {
+ }
+
+void KDecorationPreviewBridge::titlebarMouseWheelOperation( int )
+ {
+ }
+
+void KDecorationPreviewBridge::setShade( bool )
+ {
+ }
+
+void KDecorationPreviewBridge::setKeepAbove( bool )
+ {
+ }
+
+void KDecorationPreviewBridge::setKeepBelow( bool )
+ {
+ }
+
+int KDecorationPreviewBridge::currentDesktop() const
+ {
+ return 1;
+ }
+
+void KDecorationPreviewBridge::helperShowHide( bool )
+ {
+ }
+
+void KDecorationPreviewBridge::grabXServer( bool )
+ {
+ }
+
+KDecorationPreviewOptions::KDecorationPreviewOptions()
+ {
+ customBorderSize = BordersCount; // invalid
+ customButtonsChanged = false; // invalid
+ customButtons = true;
+ customTitleButtonsLeft = QString::null; // invalid
+ customTitleButtonsRight = QString::null; // invalid
+
+ d = new KDecorationOptionsPrivate;
+ d->defaultKWinSettings();
+ updateSettings();
+ }
+
+KDecorationPreviewOptions::~KDecorationPreviewOptions()
+ {
+ delete d;
+ }
+
+unsigned long KDecorationPreviewOptions::updateSettings()
+ {
+ KConfig cfg( "kwinrc", true );
+ unsigned long changed = 0;
+ changed |= d->updateKWinSettings( &cfg );
+
+ // set custom border size/buttons
+ if (customBorderSize != BordersCount)
+ d->border_size = customBorderSize;
+ if (customButtonsChanged)
+ d->custom_button_positions = customButtons;
+ if (customButtons) {
+ if (!customTitleButtonsLeft.isNull() )
+ d->title_buttons_left = customTitleButtonsLeft;
+ if (!customTitleButtonsRight.isNull() )
+ d->title_buttons_right = customTitleButtonsRight;
+ } else {
+ d->title_buttons_left = "MS";
+ d->title_buttons_right = "HIAX";
+ }
+
+ return changed;
+ }
+
+void KDecorationPreviewOptions::setCustomBorderSize(BorderSize size)
+ {
+ customBorderSize = size;
+
+ updateSettings();
+ }
+
+void KDecorationPreviewOptions::setCustomTitleButtonsEnabled(bool enabled)
+{
+ customButtonsChanged = true;
+ customButtons = enabled;
+
+ updateSettings();
+}
+
+void KDecorationPreviewOptions::setCustomTitleButtons(const QString &left, const QString &right)
+ {
+ customTitleButtonsLeft = left;
+ customTitleButtonsRight = right;
+
+ updateSettings();
+ }
+
+bool KDecorationPreviewPlugins::provides( Requirement )
+ {
+ return false;
+ }
+
+#include "preview.moc"
diff --git a/kwin/kcmkwin/kwindecoration/preview.h b/kwin/kcmkwin/kwindecoration/preview.h
new file mode 100644
index 000000000..1c1943486
--- /dev/null
+++ b/kwin/kcmkwin/kwindecoration/preview.h
@@ -0,0 +1,150 @@
+/*
+ *
+ * Copyright (c) 2003 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef KWINDECORATION_PREVIEW_H
+#define KWINDECORATION_PREVIEW_H
+
+#include <qwidget.h>
+#include <kdecoration_p.h>
+#include <kdecoration_plugins_p.h>
+
+class QLabel;
+
+class KDecorationPreviewBridge;
+class KDecorationPreviewOptions;
+
+class KDecorationPreview
+ : public QWidget
+ {
+ Q_OBJECT
+ public:
+ // Note: Windows can't be added or removed without making changes to
+ // the code, since parts of it assume there's just an active
+ // and an inactive window.
+ enum Windows { Inactive = 0, Active, NumWindows };
+
+ KDecorationPreview( QWidget* parent = NULL, const char* name = NULL );
+ virtual ~KDecorationPreview();
+ bool recreateDecoration( KDecorationPlugins* plugin );
+ void enablePreview();
+ void disablePreview();
+ void setPreviewMask( const QRegion&, int, bool );
+ QRegion unobscuredRegion( bool, const QRegion& ) const;
+ QRect windowGeometry( bool ) const;
+ void setTempBorderSize(KDecorationPlugins* plugin, KDecorationDefines::BorderSize size);
+ void setTempButtons(KDecorationPlugins* plugin, bool customEnabled, const QString &left, const QString &right);
+ protected:
+ virtual void resizeEvent( QResizeEvent* );
+ private:
+ void positionPreviews();
+ KDecorationPreviewOptions* options;
+ KDecorationPreviewBridge* bridge[NumWindows];
+ KDecoration* deco[NumWindows];
+ QLabel* no_preview;
+ QRegion mask;
+ };
+
+class KDecorationPreviewBridge
+ : public KDecorationBridge
+ {
+ public:
+ KDecorationPreviewBridge( KDecorationPreview* preview, bool active );
+ virtual bool isActive() const;
+ virtual bool isCloseable() const;
+ virtual bool isMaximizable() const;
+ virtual MaximizeMode maximizeMode() const;
+ virtual bool isMinimizable() const;
+ virtual bool providesContextHelp() const;
+ virtual int desktop() const;
+ virtual bool isModal() const;
+ virtual bool isShadeable() const;
+ virtual bool isShade() const;
+ virtual bool isSetShade() const;
+ virtual bool keepAbove() const;
+ virtual bool keepBelow() const;
+ virtual bool isMovable() const;
+ virtual bool isResizable() const;
+ virtual NET::WindowType windowType( unsigned long supported_types ) const;
+ virtual QIconSet icon() const;
+ virtual QString caption() const;
+ virtual void processMousePressEvent( QMouseEvent* );
+ virtual void showWindowMenu( const QRect &);
+ virtual void showWindowMenu( QPoint );
+ virtual void performWindowOperation( WindowOperation );
+ virtual void setMask( const QRegion&, int );
+ virtual bool isPreview() const;
+ virtual QRect geometry() const;
+ virtual QRect iconGeometry() const;
+ virtual QRegion unobscuredRegion( const QRegion& r ) const;
+ virtual QWidget* workspaceWidget() const;
+ virtual WId windowId() const;
+ virtual void closeWindow();
+ virtual void maximize( MaximizeMode mode );
+ virtual void minimize();
+ virtual void showContextHelp();
+ virtual void setDesktop( int desktop );
+ virtual void titlebarDblClickOperation();
+ virtual void titlebarMouseWheelOperation( int delta );
+ virtual void setShade( bool set );
+ virtual void setKeepAbove( bool );
+ virtual void setKeepBelow( bool );
+ virtual int currentDesktop() const;
+ virtual QWidget* initialParentWidget() const;
+ virtual Qt::WFlags initialWFlags() const;
+ virtual void helperShowHide( bool show );
+ virtual void grabXServer( bool grab );
+ private:
+ KDecorationPreview* preview;
+ bool active;
+ };
+
+class KDecorationPreviewOptions
+ : public KDecorationOptions
+ {
+ public:
+ KDecorationPreviewOptions();
+ virtual ~KDecorationPreviewOptions();
+ virtual unsigned long updateSettings();
+
+ void setCustomBorderSize(BorderSize size);
+ void setCustomTitleButtonsEnabled(bool enabled);
+ void setCustomTitleButtons(const QString &left, const QString &right);
+
+ private:
+ BorderSize customBorderSize;
+ bool customButtonsChanged;
+ bool customButtons;
+ QString customTitleButtonsLeft;
+ QString customTitleButtonsRight;
+ };
+
+class KDecorationPreviewPlugins
+ : public KDecorationPlugins
+ {
+ public:
+ KDecorationPreviewPlugins( KConfig* cfg );
+ virtual bool provides( Requirement );
+ };
+
+inline KDecorationPreviewPlugins::KDecorationPreviewPlugins( KConfig* cfg )
+ : KDecorationPlugins( cfg )
+ {
+ }
+
+#endif
diff --git a/kwin/kcmkwin/kwinoptions/AUTHORS b/kwin/kcmkwin/kwinoptions/AUTHORS
new file mode 100644
index 000000000..0615c59db
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/AUTHORS
@@ -0,0 +1,12 @@
+Please use http://bugs.kde.org to report bugs.
+The following authors may have retired by the time you read this :-)
+
+KWM Configuration Module:
+
+ Pat Dowler (dowler@pt1B1106.FSH.UVic.CA)
+
+ Bernd Wuebben <wuebben@kde.org>
+
+Conversion to kcontrol applet:
+
+ Matthias Hoelzer (hoelzer@physik.uni-wuerzburg.de)
diff --git a/kwin/kcmkwin/kwinoptions/ChangeLog b/kwin/kcmkwin/kwinoptions/ChangeLog
new file mode 100644
index 000000000..0b923864c
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/ChangeLog
@@ -0,0 +1,51 @@
+1999-03-06 Mario Weilguni <mweilguni@kde.org>
+
+ * changes for Qt 2.0
+
+1998-11-29 Alex Zepeda <garbanzo@hooked.net>
+
+ * pics/Makefile.am, pics/mini/Makefile.am: Install icons from their
+ "proper" subdirectories.
+
+1998-11-20 Cristian Tibirna <ctibirna@gch.ulaval.ca>
+
+ * advanced.[cpp,h]: fixed bugs. Mostly a disgusting one:
+ no lists saving for the special options (Decor, Focus a.o.)
+
+1998-11-09 Cristian Tibirna <ctibirna@gch.ulaval.ca>
+
+ * advanced.[cpp,h] : new tab for some of the last of the
+ kwm's options which remained out of the GUI config:
+ CtrlTab, TraverseAll, AltTabeMode, Button3Grab and
+ the filter lists for decorations, focus, stickyness,
+ session management ignore ( I kinda disklike the solution
+ I got for the latest)
+
+1998-11-06 Cristian Tibirna <ctibirna@gch.ulaval.ca>
+
+ * titlebar.[cpp,h] : added title alignment config
+
+1998-10-23 Cristian Tibirna <ctibirna@gch.ulaval.ca>
+
+ * titlebar.cpp: completed what Matthias started (took out
+ useless checks)
+ * widows.cpp: make autoRaise toggling clearer
+
+1998-10-22 Matthias Ettrich <ettrich@kde.org>
+
+ * titlebar.cpp: less options on titlebar doubleclick
+
+1998-10-21 Cristian Tibirna <ctibirna@gch.ulaval.ca>
+
+ * desktop.[cpp,h]: now with consistent layout use
+ resizeEvent() deleted
+
+1998-10-19 Cristian Tibirna <ctibirna@gch.ulaval.ca>
+
+ * windows.[cpp,h]: now with consistent layout use
+ resizeEvent() deleted
+
+1998-10-18 Cristian Tibirna <ctibirna@gch.ulaval.ca>
+
+ * titlebar.[cpp,h]: fixed the (in)activetitleebar pixmap selection
+ 1998-10-21 (still buggy, don't quite understand why)
diff --git a/kwin/kcmkwin/kwinoptions/Makefile.am b/kwin/kcmkwin/kwinoptions/Makefile.am
new file mode 100644
index 000000000..b6abdf0e7
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/Makefile.am
@@ -0,0 +1,18 @@
+METASOURCES = AUTO
+INCLUDES = $(all_includes)
+
+kde_module_LTLIBRARIES = kcm_kwinoptions.la
+
+kcm_kwinoptions_la_SOURCES = windows.cpp mouse.cpp main.cpp
+kcm_kwinoptions_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined
+kcm_kwinoptions_la_LIBADD = $(LIB_KDEUI)
+
+noinst_HEADERS = windows.h mouse.h
+
+messages:
+ $(XGETTEXT) *.cpp -o $(podir)/kcmkwm.pot
+
+kwin_kcmkwin_options_data_DATA = kwinactions.desktop kwinadvanced.desktop kwinfocus.desktop kwinmoving.desktop kwintranslucency.desktop
+kwin_kcmkwin_options_datadir = $(kde_appsdir)/.hidden
+
+xdg_apps_DATA = kwinoptions.desktop
diff --git a/kwin/kcmkwin/kwinoptions/kwinactions.desktop b/kwin/kcmkwin/kwinoptions/kwinactions.desktop
new file mode 100644
index 000000000..61b58b06d
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/kwinactions.desktop
@@ -0,0 +1,233 @@
+[Desktop Entry]
+Icon=kcmkwm
+Type=Application
+Exec=kcmshell kwinactions
+DocPath=kcontrol/windowmanagement/index.html#action-actions
+
+X-KDE-ModuleType=Library
+X-KDE-Library=kwinoptions
+X-KDE-FactoryName=kwinactions
+
+Name=Actions
+Name[af]=Aksies
+Name[ar]=الأفعال
+Name[be]=Дзеянні
+Name[bg]=Действия
+Name[bn]=কাজ
+Name[br]=Oberoù
+Name[bs]=Akcije
+Name[ca]=Accions
+Name[cs]=Činnosti
+Name[csb]=Dzejaniô
+Name[cy]=Gweithredoedd
+Name[da]=Handlinger
+Name[de]=Aktionen
+Name[el]=Ενέργειες
+Name[eo]=Agoj
+Name[es]=Acciones
+Name[et]=Tegevused
+Name[eu]=Ekintzak
+Name[fa]=کنشها
+Name[fi]=Toiminnot
+Name[fo]=Tiltøk
+Name[fy]=Aksjes
+Name[ga]=Gníomhartha
+Name[gl]=Accións
+Name[he]=פעולות
+Name[hi]=क्रियाएँ
+Name[hr]=Aktivnosti
+Name[hu]=Műveletek
+Name[is]=Aðgerðir
+Name[it]=Azioni
+Name[ja]=動作
+Name[ka]=ქცევა
+Name[kk]=Амалдар
+Name[km]=អំពើ
+Name[ko]=동작
+Name[lo]=ແອບພີເຄຊັ້ນ
+Name[lt]=Veiksmai
+Name[lv]=Darbības
+Name[mk]=Акции
+Name[mn]=Үйлдлүүл
+Name[ms]=Tindakan
+Name[mt]=Azzjonijiet
+Name[nb]=Handlinger
+Name[nds]=Akschonen
+Name[ne]=कार्य
+Name[nl]=Acties
+Name[nn]=Handlingar
+Name[nso]=Dikgato
+Name[pa]=ਕਾਰਵਾਈਆਂ
+Name[pl]=Czynności
+Name[pt]=Acções
+Name[pt_BR]=Ações
+Name[ro]=Acțiuni
+Name[ru]=Действия
+Name[rw]=Ibikorwa
+Name[se]=Doaimmat
+Name[sk]=Akcie
+Name[sl]=Dejanja
+Name[sr]=Акције
+Name[sr@Latn]=Akcije
+Name[ss]=Tento
+Name[sv]=Åtgärder
+Name[ta]=செயல்கள்
+Name[te]=చర్యలు
+Name[tg]=Амалиёт
+Name[th]=การกระทำ
+Name[tr]=Eylemler
+Name[tt]=Ğämällär
+Name[uk]=Дії
+Name[uz]=Amallar
+Name[uz@cyrillic]=Амаллар
+Name[ven]=Nyito
+Name[vi]=Gõ phím
+Name[wa]=Accions
+Name[xh]=Iintshukumo
+Name[zh_CN]=动作
+Name[zh_TW]=動作
+Name[zu]=Iminyakazo
+
+Comment=Configure keyboard and mouse settings
+Comment[af]=Konfigureer sleutelbord en muis instellings
+Comment[ar]=إعداد لوحة المفاتيح و الفأرة
+Comment[be]=Настаўленні клавіятуры і мышы
+Comment[bg]=Настройване на действията с клавиатурата и мишката
+Comment[bn]=কীবোর্ড এবং মাউস সেটিংস কনফিগার করুন
+Comment[br]=Kefluniañ ar stokellaoueg hag al logodenn
+Comment[bs]=Podesite postavke tastature i miša
+Comment[ca]=Aquí podeu configurar l'arranjament del teclat i del ratolí
+Comment[cs]=Nastavení klávesnice a myši
+Comment[csb]=Kònfigùracëjô nastôwù klawiaturë ë mëszë
+Comment[cy]=Ffurfweddu gosodiadau bysellfwrdd a llygoden
+Comment[da]=Indstil tastatur og museopsætning
+Comment[de]=Einstellungen für Tastatur und Maus festlegen
+Comment[el]=Ρυθμίστε το πληκτρολόγιο και το ποντίκι
+Comment[eo]=Agordu la klavaron kaj la muson
+Comment[es]=Configuración del teclado y del ratón
+Comment[et]=Klaviatuuri ja hiire seadistamine
+Comment[eu]=Konfiguratu teklatua eta saguaren ezarpenak
+Comment[fa]=پیکربندی تنظیمات صفحه کلید و موشی
+Comment[fi]=Muokkaa näppäimistön ja hiiren asetuksia
+Comment[fr]=Configuration des réglages du clavier et de la souris
+Comment[fy]=Hjir kinne jo de ynstellings fan toetseboerd en mûs ynstelle
+Comment[ga]=Cumraigh socruithe an mhéarchláir agus na luiche
+Comment[gl]=Configurar as opcións do teclado e o rato
+Comment[he]=שינוי הגדרות המקלדת והעכבר
+Comment[hi]=कुंजीपट तथा माउस विन्यास कॉन्फ़िगर करें
+Comment[hr]=Konfiguriranje postavki tipkovnice i miša
+Comment[hu]=A billentyűzet- és egérkezelés beállításai
+Comment[is]=Stilla lyklaborð og mús
+Comment[it]=Configura le impostazioni della tastiera e del mouse
+Comment[ja]=キーボードとマウスの設定
+Comment[ka]=კლავიატურის და თაგუნას პარამეტრების კონფიგურაცია
+Comment[kk]=Перенетақта мен тышқанның параметрлерін баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​ការ​កំណត់​ក្ដារចុច និង​កណ្ដុរ
+Comment[ko]=키보드와 마우스 설정
+Comment[lo]=ປັບແຕ່ງການຕັ້ງຄ່າລະບົບດັດສະນີ
+Comment[lt]=Konfigūruoti klaviatūros ir pelės nustatymus
+Comment[lv]=Šeit Jūs varat konfigurēt tastatūras un peles parametrus
+Comment[mk]=Конфигурирајте ги поставувањата на тастатурата и глушецот
+Comment[mn]=Гар ба Хулгана тохируулах
+Comment[mt]=Ikkonfigura t-tastiera u l-maws
+Comment[nb]=Innstillinger for tastatur og mus
+Comment[nds]=Tastatuur un Muus instellen
+Comment[ne]=कुञ्जीपाटी र माउस सेटिङ कन्फिगर गर्नुहोस्
+Comment[nl]=Hier kunt u de instellingen van toetsenbord en muis instellen
+Comment[nn]=Innstillingar for tastatur og mus
+Comment[nso]=Beakanya dipeakanyo tsa legotlo le keyboard
+Comment[pa]=ਕੀਬੋਰਡ ਅਤੇ ਮਾਊਸ ਸੈਟਿੰਗ ਦੀ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja ustawień klawiatury i myszy
+Comment[pt]=Configuração das opções do teclado e do rato
+Comment[pt_BR]=Configura as preferências de teclado e mouse
+Comment[ro]=Configurează setările de tastatură și mouse
+Comment[ru]=Настройка параметров клавиатуры и мыши
+Comment[rw]= Kuboneza mwandikisho n'amagenamiterere imbeba
+Comment[se]=Heivet boallobeavddi ja sáhpána
+Comment[sk]=Nastavenie klávesnice a myši
+Comment[sl]=Nastavitve tipkovnice in miške
+Comment[sr]=Подешавање поставки тастатуре и миша
+Comment[sr@Latn]=Podešavanje postavki tastature i miša
+Comment[sv]=Anpassa inställningar för tangentbord och mus
+Comment[ta]=விசைப்பலகையையும் சுட்டியையும் வடிவமை
+Comment[tg]=Танзимоти забонак ва муш
+Comment[th]=ปรับแต่งค่าแป้นพิมพ์และเม้าส์
+Comment[tr]=Klavye ve fare ayarlarını buradan yapabilirsiniz
+Comment[tt]=Töylek belän küse eşläwen caylaw
+Comment[uk]=Налаштування клавіатури та мишки
+Comment[uz]=Sichqoncha va tugmatagni moslash
+Comment[uz@cyrillic]=Сичқонча ва тугматагни мослаш
+Comment[ven]=Dzudzanyani mavhekanyele a mausu na khiibodo
+Comment[vi]=Cấu hình bàn phím và chuột
+Comment[wa]=Apontiaedjes del sori eyet del taprece
+Comment[xh]=Qwalasela izicwangciso zebhodi yezitshixho neze mouse
+Comment[zh_CN]=配置键盘和鼠标设置
+Comment[zh_TW]=設定鍵盤與滑鼠的設定值
+Comment[zu]=Hlanganisela izilungiselelo zebhodi yokhiye kanye neze-mouse
+
+Keywords=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize
+Keywords[ar]=ظلل,كبر كبّر,صغر صغّر,خفض,عمليات,قائمة,تغيير القياس,تظليل,تكبير,تصغير,الى الأسفل,قائمة العمليات,شريط العنوان,تحجيم
+Keywords[be]=Згарнуць,Найбольшыць,Найменшыць,Змяніць памер,Меню аперацыяў,Меню дзеянняў,Загаловак,shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize
+Keywords[bg]=сгъване, максимизиране, минимизиране, заглавие, промяна, размер, shade, maximise, maximize, minimize, minimise, lower, operations menu, titlebar, resize
+Keywords[ca]=plegar,maximitzar,minimitzar,passar al davant,operaciones del menú, barra del títol,redimensionar
+Keywords[cs]=zarolování,maximalizace,minimalizace,nabídka činností,titulek,změna velikosti
+Keywords[csb]=ceniô,maksymalizacëjô,minimalizacëjô,niżi,menu dzejaniów,titlowô lëstew,zmiana miarë
+Keywords[cy]=arliwio,ehangu,lleihau,iselhau,dewislen gweithrediadau, bar y teitl, ail-feintio
+Keywords[da]=skyg,maksimér,minimér,sænk,operationsmenu,titellinje,ændr størrelse
+Keywords[de]=Fensterheber,Maximieren,Minimieren,Nach oben/unten,Titelleiste,Größe ändern
+Keywords[el]=τύλιγμα,μεγιστοποίηση,μεγιστοποίηση,ελαχιστοποίηση,ελαχιστοποίηση,κατέβασμα,μενού χειρισμών,μπάρα τίτλου,αλλαγή μεγέθους
+Keywords[eo]=maksimigi,minimumigi,menuo,titolo,grandecŝanĝi,grandigi
+Keywords[es]=recoger,maximizar,minimizar,pasar al frente,pasar atrás,operaciones,menñu barra de título,redimensionarmenu,titlebar,resize
+Keywords[et]=varjamine,maksimeerimine,minimeerimine,toimingute menüü,langetamine,tõstmine,tiitliriba,suuruse muutmine
+Keywords[eu]=bildu,maximizatu,minimizatu,atzera eraman,eragiketak, menua,titulu-barra,tamaina aldatu
+Keywords[fa]=سایه، بیشینه‌ساز‌ی، بیشینه‌ساز‌ی، کمینه‌ساز‌ی، کمینه‌ساز‌ی، پایین‌تر، گزینگان عملیات، میله عنوان، تغییر اندازه
+Keywords[fi]=varjosta,suurenna,pienennä,laske,toimintovalikko,otsikkopalkki,vaihda kokoa
+Keywords[fr]=fondu,maximiser,enrouler,réduire,abaisser, menu des opérations,barre de titre,redimensionner
+Keywords[fy]=shade,oprollen,maximaliseren,minimaliseren,naar achtergrond,lower,menu,titelbalk,grootte wijzigen,oprôlje,maksimalisearje,minimalisearje,nei eftergrûn,grutte
+Keywords[ga]=scáthaigh,uasmhéadaigh,íosmhéadaigh,íoslaghdaigh,laghdaigh,roghchlár oibríochta,barra teidil,athraigh méid
+Keywords[gl]=sombra,maximizar,maximizar,minimizar,baixar,menú de operacións,barra de título,redimensionar
+Keywords[he]=גלילה,הגדלה,מזעור,שליחה לרקע,תפריט פעולות,שורת כותרת,שינוי גודל,shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize
+Keywords[hi]=शेड,अधिकतम,बड़ा,न्यूनतम,छोटा,नीचे,ऑपरेशन्स मेन्यू,शीर्षक-पट्टी,नयाआकार
+Keywords[hr]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize,sjena,maksimiziranje,minimiziranje,postupci izbornika,naslov,naslovna traka,promjena veličine
+Keywords[hu]=felgördítés,maximalizálás,maximalizált,minimalizálás,minimalizált,hátraengedés,műveletek menü,címsor,átméretezés
+Keywords[is]=rúlla upp,skyggja,hámarka,lágmarka,sökkva,aðgerðavalmynd, titilrönd,breyta stærð
+Keywords[it]=arrotola,massimizza,ingrandisci,minimizza,alza,abbassa,menu operazioni, barra del titolo,titolo,ridimensiona,sposta
+Keywords[ja]=シェード,最大化,最小化,後面へ,操作メニュー,タイトルバー,サイズ変更,リサイズ
+Keywords[km]=ស្រមោល,ពង្រីក​អតិបរមា,បង្រួម​អប្បបរមា,បន្ទាប់​ចុះ​ក្រោម,ម៉ឺនុយ​ប្រតិបត្តិការ,របារ​ចំណងជើង,ប្ដូរ​ទំហំ
+Keywords[lt]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize, išdidinti,sumažinti,paslėpti, operacijų meniu,antraštės juosta,pakeisti dydį
+Keywords[lv]=ēnot,maksimizēt,maksimizē,minimizet,minimizē,zemāks,darbības izvēlne,virsraksta josla,mainīt izmēru
+Keywords[mk]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize,засени,рашири,спушти,мени со операции,насловна лента,промени големина
+Keywords[mn]=Цонхны сүүдэр,Томсгох,Жижигсгэх,Дээшээ/доошоо, Толгойн самбар,Хэмжээ өөрчилөх, Үйлдэл цэс
+Keywords[mt]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize,massimizza,minimma,baxxi,ċekken,kabbar,daqqas
+Keywords[nb]=rulle opp,maksimere,minimere,endre størrelse,operasjoner,meny,tittel,skalere,vindu, tittellinje
+Keywords[nds]=inrullen,maximeren,minimeren,utrullen,Akschonenmenü,Titelbalken,Grött ännern
+Keywords[ne]=छायाँ, बढाउनु, बढाउनु, घटाउनु, घटाउनु,भन्दा तल, सञ्चालन मेनु, शीर्षकपट्टी, रिसाइज
+Keywords[nl]= shade,oprollen,maximaliseren,minimaliseren,naar achtergrond,lower,menu,tibelbalk,grootte wijzigen
+Keywords[nn]=rull opp,maksimer,minimer,senk,hev,operasjonsmeny,tittellinje,endra storleik,vindauge
+Keywords[nso]=ntshofatsa,oketsa,oketsa,fokotsa,fokotsa,isa fase,menu wa diphethagatso,bar ya leina,popoleswa
+Keywords[pa]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize,ਨਿਊਨਤਮ,ਅਧਿਕਤਮ,ਕਾਰਵਾਈ ਮੇਨੂ,ਮੁੜ-ਅਕਾਰ
+Keywords[pl]=cień,maksymalizacja,minimalizacja,niżej,menu działań,belka tutułowa, zmiana rozmiaru
+Keywords[pt]=enrolar,maximizar,minimizar,baixar,menu de operações,barra de título,dimensionar
+Keywords[pt_BR]=esconder,maximizar,minimizar,menor,menu de operações,barra de operações,redimensionar
+Keywords[ro]=derulare,maximizare,minimizare,meniul de operații,bara de titlu,redimensionare
+Keywords[rw]=igicucu,kugira kinini,kugira gito,kugira gito,ntoya,ibikubiyemo by'ibikorwa,umwanyabikoresho,ihindurangero
+Keywords[se]=rulle bajáš,maksimere,minimere,vuolit,dáhpáhusat,fállu,fálut,namahusholga,namahus,skálere
+Keywords[sk]=zabalenie,maximalizácia,minimalizácia,presun dozadu,presun dopredu,operácie menu,titulok,zmena veľkosti
+Keywords[sl]=zvij,raztegni,povečaj,pomanjšaj,razpni,menu operacij,naslovna vrstica,velikost
+Keywords[sr]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize,намотавање,максимизуј,минимизуј,ниже,мени операција,насловна линија,промена величине
+Keywords[sr@Latn]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize,namotavanje,maksimizuj,minimizuj,niže,meni operacija,naslovna linija,promena veličine
+Keywords[sv]=rulla upp,maximera,minimera,sänk,åtgärdsmeny,namnlist,ändra storlek
+Keywords[ta]=நிழல், பெரிதாக்கு,பெரிதாக்கு,சிறிதாக்கு, சிறிதாக்கு, குறைந்த,செயல்கள் பட்டி,தலைப்பு பட்டி, அளவை மாற்று
+Keywords[th]=พับเก็บ,ขยายเต็มจอ,ย่อเล็กสุด,อยู่ด้านล่าง,เมนูปฏิบัติการ,แถบหัวเรื่อง,ปรับขนาด
+Keywords[tr]=topla,küçült,büyüt,indir,işlemler,araç çubuğu
+Keywords[tt]=shade,maximise,maximize,minimize,minimise,lower,operations saylaq,titlebar,resize
+Keywords[uk]=згорнути,мінімізувати,максимізувати,опустити, меню операцій,смужка титулу,зміна розміру
+Keywords[uz]=soyalash,yoyish,yigʻish,orqaga,amallar menyusi,sarlavha,resize
+Keywords[uz@cyrillic]=соялаш,ёйиш,йиғиш,орқага,амаллар менюси,сарлавҳа,resize
+Keywords[ven]=kovhekana,engedza,engedza,fhungudza,fhungudza,fhasi,mashumele a menu, bara ya thoho,uitulula saizi
+Keywords[vi]=cuốn,phóng to,phóng to,thu nhỏ,thu nhỏ,hạ thấp,các thao tác trên thực đơn,tên thanh,thay đổi cỡ
+Keywords[wa]=ombe,ombion,å pus grand,, pus ptit,djivêyes des operåcions,bår di tite,candjî li grandeu
+Keywords[xh]=umthunzi,yandisa,yandisa,ncipisa nciphisa,yehlisa,menu zemisebenzi,iba yewonga,yenza ubungakanani kwakhona
+Keywords[zh_CN]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize,卷起,最大化,最小化,降低,操作菜单,标题栏,缩放
+Keywords[zh_TW]=shade,maximise,maximize,minimize,minimise,lower,operations menu,titlebar,resize,收起,最大化,最小化,降下,操作選單,標題列,重設大小
+Keywords[zu]=umthunzi,khulisa,khulisa,nciphisa,nciphisa,okungezansi, imenu yemisebenzi,ibha yesihloko,shintsha usayizi
diff --git a/kwin/kcmkwin/kwinoptions/kwinadvanced.desktop b/kwin/kcmkwin/kwinoptions/kwinadvanced.desktop
new file mode 100644
index 000000000..e8b6b52e8
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/kwinadvanced.desktop
@@ -0,0 +1,232 @@
+[Desktop Entry]
+Icon=kcmkwm
+Type=Application
+Exec=kcmshell kwinadvanced
+DocPath=kcontrol/windowmanagement/index.html#action-advanced
+
+X-KDE-ModuleType=Library
+X-KDE-Library=kwinoptions
+X-KDE-FactoryName=kwinadvanced
+
+Name=Advanced
+Name[af]=Gevorderde
+Name[ar]=متقدم
+Name[be]=Адмысловыя
+Name[bg]=Допълнителни
+Name[bn]=অগ্রসর
+Name[br]=Barek
+Name[bs]=Napredno
+Name[ca]=Avançat
+Name[cs]=Pokročilé
+Name[csb]=Awansowóné
+Name[cy]=Uwch
+Name[da]=Avanceret
+Name[de]=Erweitert
+Name[el]=Προχωρημένα
+Name[eo]=Pliaj
+Name[es]=Avanzado
+Name[et]=Muu
+Name[eu]=Aurreratua
+Name[fa]=پیشرفته
+Name[fi]=Lisäasetukset
+Name[fo]=Tilkomið
+Name[fr]=Avancé
+Name[fy]=Avansearre
+Name[ga]=Casta
+Name[gl]=Avanzado
+Name[he]=מתקדם
+Name[hi]=विस्तृत
+Name[hr]=Napredno
+Name[hu]=Speciális
+Name[is]=Ítarlegt
+Name[it]=Avanzate
+Name[ja]=詳細
+Name[ka]=დამატებით
+Name[kk]=Қосымша
+Name[km]=កម្រិត​ខ្ពស់
+Name[ko]=고급
+Name[lo]=ັຝຣັ່ງ
+Name[lt]=Sudėtingiau
+Name[lv]=Paplašināts
+Name[mk]=Напредни
+Name[mn]=Өргөтгөсөн
+Name[ms]=Lanjutan
+Name[mt]=Avvanzat
+Name[nb]=Avansert
+Name[nds]=Verwiedert
+Name[ne]=उन्नत
+Name[nl]=Geavanceerd
+Name[nn]=Avansert
+Name[nso]=Beetswepele
+Name[pa]=ਤਕਨੀਕੀ
+Name[pl]=Zaawansowane
+Name[pt]=Avançado
+Name[pt_BR]=Avançado
+Name[ro]=Avansat
+Name[ru]=Дополнительно
+Name[rw]=Bihanitse
+Name[se]=Viiddiduvvon
+Name[sk]=Pokročilé
+Name[sl]=Napredno
+Name[sr]=Напредно
+Name[sr@Latn]=Napredno
+Name[ss]=Sembili
+Name[sv]=Avancerat
+Name[ta]=உயர்நிலை
+Name[te]=ఆధునిక
+Name[tg]=Пешрафта
+Name[th]=เพิ่มเติม
+Name[tr]=Gelişmiş
+Name[tt]=Kiñäytep
+Name[uk]=Додатково
+Name[uz]=Qoʻshimcha
+Name[uz@cyrillic]=Қўшимча
+Name[ven]=Zwa khwinesa
+Name[vi]=Nâng cao
+Name[wa]=Sipepieus
+Name[xh]=Ebhekisa phambili
+Name[zh_CN]=高级
+Name[zh_TW]=進階
+Name[zu]=Okwezinga eliphezulu
+
+Comment=Configure advanced window management features
+Comment[af]=Konfigureer gevorderde venster bestuuring funksies
+Comment[ar]=تهيئة ميزات النوافذ المتقدمة
+Comment[be]=Настаўленне адмысловых здольнасцяў кіравання вокнамі
+Comment[bg]=Настройване допълнителните параметри на прозорците
+Comment[bn]=উইণ্ডো ম্যানেজমেন্টের ক্ষুদ্রাতিক্ষুদ্র বৈশিষ্ট্য কনফিগার করুন
+Comment[bs]=Podesite napredne mogućnosti upravljanja prozorima
+Comment[ca]=Aquí podeu configurar les característiques avançades de la gestió de finestres
+Comment[cs]=Nastavení pokročilých vlastností správce oken
+Comment[csb]=Kònfigùracëjô awansowónëch òptacëji sprôwianiô òknama
+Comment[cy]=Ffurfweddu Nodweddion Uwch Trefnu Ffenestri
+Comment[da]=Indstil avancerede vindueshåndteringsegenskaber
+Comment[de]=Erweiterte Fensterverwaltung einrichten
+Comment[el]=Ρυθμίστε προχωρημένα χαρακτηριστικά της διαχείρισης παραθύρων
+Comment[eo]=Agordu la pli bonajn fenestroadministrilecojn
+Comment[es]=Configuración de las propiedades avanzadas del gestor de ventanas
+Comment[et]=Aknahalduri seadistamine
+Comment[eu]=Konfiguratu leiho kudeaketaren ezaugarri aurreratuak
+Comment[fa]=پیکربندی ویژگیهای مدیریت پنجرۀ پیشرفته
+Comment[fi]=Muokkaa ikkunoinnin ominaisuuksien lisäasetuksia
+Comment[fr]=Configuration des fonctionnalités de gestion avancée des fenêtres
+Comment[fy]=Hjir kinne jo de avansearre finsterbehearmooglikheden ynstelle
+Comment[ga]=Cumraigh ardghnéithe bhainisteoireacht na bhfuinneog
+Comment[gl]=Configurar as características avanzadas da xestión de fiestras
+Comment[he]=שינוי הגדרות מתקדמות של ניהול חלונות
+Comment[hi]=विस्तृत विंडो प्रबंधन विशेषता कॉन्फ़िगर करें
+Comment[hr]=Konfiguriranje naprednih svojstava upravitelja prozora
+Comment[hu]=Az ablakkezelés speciális beállításai
+Comment[is]=Stilla ítarlegri hegðan setustjóra
+Comment[it]=Configura le funzioni avanzate del gestore delle finestre
+Comment[ja]=ウィンドウ管理機能の詳細設定
+Comment[ka]=ფანჯრების მენეჯერის დამატებითი ფუნქციების კონფიგურაცია
+Comment[kk]=Терезе басқаруының қосымша параметрлерін баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​លក្ខណៈ​ពិសេស​ការ​គ្រប់គ្រង​បង្អួច​កម្រិត​ខ្ពស់
+Comment[ko]=고급 창 관리자 기능 설정하기
+Comment[lo]=ທ່ານສາມາດປັບແຕ່ງການທຳງານຂອງເຄື່ອງມືຈັດການເຊສຊົນໄດ້ທີ່ນີ້
+Comment[lt]=Konfigūruoti sudėtingesnes langų tvarkymo savybes
+Comment[lv]=Šeit Jūs varat konfigurēt logu pārvaldīšanas iespējas
+Comment[mk]=Конфигурирајте ги напредните можности за менаџмент на прозорците
+Comment[mn]=Өргөтгөсөн цонхны удирдлага тохируулах
+Comment[mt]=Setings avvanzati tal-immaniġġjar tal-windows
+Comment[nb]=Tilpass avansert vindusbehandling
+Comment[nds]=Verwiederte Finsterinstellen
+Comment[ne]=उन्नत सञ्झ्याल व्यवस्थापन आकृति कन्फिगर गर्नुहोस्
+Comment[nl]=Hier kunt u de geavanceerde vensterbeheermogelijkheden instellen
+Comment[nn]=Set opp avanserte vindaugshandsamarfunksjonar
+Comment[nso]=Beakanya dika tseo di beetswego pele tsa taolo ya window
+Comment[pa]=ਤਕਨੀਕੀ ਝਰੋਖਾ ਪਰਬੰਧਨ ਫੀਚਰ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja zaawansowanych opcji zarządzania oknami
+Comment[pt]=Configuração das funcionalidades de gestão de janelas avançadas
+Comment[pt_BR]=Configura as características avançadas de gerenciamento de janela
+Comment[ro]=Configurează caracteristicile de management al ferestrelor
+Comment[ru]=Настройка дополнительных функций менеджера окон
+Comment[rw]=Kuboneza ibijyanye n'ubuyobozi buhanitse bw'idirishya
+Comment[se]=Heivet viiddiduvvon lásegieđahanfunkšuvnnaid
+Comment[sk]=Nastavenie pokročilých možností správy okien
+Comment[sl]=Nastavitve dodatnih možnosti upravljanja oken
+Comment[sr]=Подешавање напредних могућности управљања прозорима
+Comment[sr@Latn]=Podešavanje naprednih mogućnosti upravljanja prozorima
+Comment[sv]=Anpassa avancerade fönsterhanteringsfunktioner
+Comment[ta]=மேம்பட்ட சாளர மேலாளரின் தன்மைகளை வடிவமை
+Comment[tg]=Танзими мудирияти пешрафтаи тирезаҳо
+Comment[th]=ปรับแต่งคุณสมบัติเพิ่มเติมของการจัดการหน้าต่าง
+Comment[tr]=Gelişmiş pencere yönetim özelliklerini yapılandır
+Comment[tt]=Täräzä idäräçeneñ östämä çaraların caylaw
+Comment[uk]=Налаштування додаткових можливостей керування вікнами
+Comment[uz]=Oyna boshqaruvning koʻshimcha imkoniyatlarini moslash
+Comment[uz@cyrillic]=Ойна бошқарувнинг кўшимча имкониятларини мослаш
+Comment[ven]=Dzudzanyani zwitenwa zwa vhulanguli ha khwinesa
+Comment[vi]=Cấu hình các tính năng quản lý cửa sổ nâng cao
+Comment[wa]=Apontiaedje des spepieusès fonccionålités do manaedjaedje des purneas
+Comment[xh]=Qwalasela imisebenzi esemqoka ebhekisa phambili yophatho lwe window
+Comment[zh_CN]=配置高级窗口管理特性
+Comment[zh_TW]=設定進階視窗管理功能
+Comment[zu]=Hlanganisela amalungu okuphathwa kwe-window yezinga eliphezulu
+
+Keywords=shading,border,hover,active borders
+Keywords[af]=shading,border,hover,active grense
+Keywords[ar]=shading,border,hover,active borders,تظليل,حافة,الحواف النشطة
+Keywords[be]=Згортванне,Мяжа,Актыўныя межы,Актыўныя краі,shading,border,hover,active borders
+Keywords[bg]=рамка, сянка, фокус, активиране, shading, border, hover, active borders
+Keywords[ca]=plegat,vora,desplegat automàtic,vores actives
+Keywords[cs]=zarolování,vyrolování,okraj,přejezd myší,aktivní okraje
+Keywords[csb]=cenienié,grańce,przesëwanié nad,aktiwné grańce
+Keywords[cy]=arliwio,ymyl,hofran,ymylon weithgar
+Keywords[da]=skygning,kant,svæv,aktive kanter
+Keywords[de]=Umrandung,Aktive Ränder,Schweben,Fensterheber
+Keywords[el]=τύλιγμα,περίγραμμα,hover,ενεργά όρια
+Keywords[eo]=bordo,ombro,ŝvebo
+Keywords[es]=recogiendo,borde,ratón sobre,bordes activos
+Keywords[et]=varjamine,piire,hover,aktiivsed piirded
+Keywords[eu]=biltzen,ertza,gainean,ertz aktiboak
+Keywords[fa]=سایه‌زنی، لبه، پلکیدن، لبه‌های فعال
+Keywords[fi]=varjostus,kehys,kellunta,aktiiviset kehykset
+Keywords[fr]=bordures,cacher,couvrir,bordures actives
+Keywords[fy]=oprollen,oprôlje,afrollen,ôfrôlje,hoover,actieve randen,aktive rânen,randen magnetisch,magnetische randen
+Keywords[ga]=scáthú,imlíne,foluain,imlínte beo
+Keywords[gl]=sombra,beira,beiras activas,flotar
+Keywords[he]=גלילה,מסגרת,גבול,ריחוף,גבולות פעילים,shading,border,hover,active borders
+Keywords[hi]=शेडिंग,किनारा,हावर,सक्रिय किनारे
+Keywords[hr]=shading,border,hover,active borders,osjenčavanje,obrubi,lebdjeće,aktivni obrubi
+Keywords[hu]=árnyékolás,szegély,lebegés,aktív szegélyek
+Keywords[is]=rúlla upp,skyggja,rammi,svif,hover,virkir rammar
+Keywords[it]=arrotola,bordi,passaggio del mouse,bordi attivi
+Keywords[ja]=畳む,境界,復元,アクティブ境界
+Keywords[km]=ស្រមោល,ស៊ុម,សំកាំង,ស៊ុម​សកម្ម
+Keywords[lt]=shading,border,hover,active borders, tik antraštės juosta, rėmelis, aktyvūs rėmeliai
+Keywords[lv]=ēnošana,mala,hover,aktīvās malas
+Keywords[mk]=shading,border,hover,active borders,засенчување,граница,лебди,активни граници
+Keywords[mn]=Сүүдэр,Идэвхитэй хүрээ,Арьс,Хүрээ
+Keywords[mt]=shading,border,hover,active borders,bordura
+Keywords[nb]=rull opp,sveve over,ramme,aktive rammer,kant
+Keywords[nds]=Inrullen,Utrullen,Rahmen,hover,aktiven Rahmen
+Keywords[ne]=छायाँ, किनारा, होभर, सक्रिय किनारा
+Keywords[nl]=oprollen,afrollen,rand,hoover,actieve randen,randen magnetisch,magnetische randen
+Keywords[nn]=rull opp,ramme,vindaugsramme,vindauge,mus over,aktive kantar
+Keywords[nso]=ntshofatsa,mollwane,hover,mellwane yeo e berekago
+Keywords[pl]=cieniowanie,granice,przesuwanie ponad,aktywne granice
+Keywords[pt]=enrolamento,contorno,passar por cima,contornos activos
+Keywords[pt_BR]=ocultamento,borda,pairar,bordas ativas
+Keywords[ro]=strîngere,margine,margini active
+Keywords[rw]=ubwijime,urubibi,kureremba,imbibi zikora
+Keywords[se]=shading,border,hover,active borders,aktiivalaš láse,láse,aktiivalaš ravddat
+Keywords[sk]=zabalenie,okraj,presun,aktívne okraje
+Keywords[sl]=senčenje,rob,meja,lebdenje,aktivni robovi
+Keywords[sr]=намотавање,ивица,лебдење,активне ивице
+Keywords[sr@Latn]=namotavanje,ivica,lebdenje,aktivne ivice
+Keywords[sv]=skuggning,kant,sväva,aktiva kanter
+Keywords[ta]=நிழலிடுதல்,விளிம்பு,ஹோவர், செயலில் உள்ள விளிம்புகள்
+Keywords[th]=พับเก็บ,กรอบ,อยู่เหนือ,กรอบที่ทำงาน
+Keywords[tr]=toplama,sınır,etkin kenarlıklar
+Keywords[uk]=згортання,рамка,проходження,активні рамки
+Keywords[uz]=soyalash,chegara,aktiv chegaralar,hover
+Keywords[uz@cyrillic]=соялаш,чегара,актив чегаралар,hover
+Keywords[ven]=murunzi,mukano,hover,mikano i tshilaho
+Keywords[vi]=che phủ,bờ,lượn,bờ hoạt động
+Keywords[wa]=ombe,ombraedje,boird,costé,hover,ovrants boirds
+Keywords[xh]=ulwenziwo lwesithuba,umda,ixhonyiwe,imida esebenzayo
+Keywords[zh_CN]=shading,border,hover,active borders,卷起,边框,悬停,激活边框
+Keywords[zh_TW]=shading,border,hover,active borders,收起,邊框,停留,作用中邊框
+Keywords[zu]=ukusitha,umngcele,didizela,imingcele enyakazayo
diff --git a/kwin/kcmkwin/kwinoptions/kwinfocus.desktop b/kwin/kcmkwin/kwinoptions/kwinfocus.desktop
new file mode 100644
index 000000000..115463654
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/kwinfocus.desktop
@@ -0,0 +1,222 @@
+[Desktop Entry]
+Icon=kcmkwm
+Type=Application
+Exec=kcmshell kwinfocus
+DocPath=kcontrol/windowmanagement/index.html#action-focus
+
+X-KDE-ModuleType=Library
+X-KDE-Library=kwinoptions
+X-KDE-FactoryName=kwinfocus
+
+Name=Focus
+Name[af]=Fokus
+Name[ar]=التركيز
+Name[be]=Фокус
+Name[bg]=Фокус
+Name[bn]=ফোকাস
+Name[br]=Fokus
+Name[bs]=Fokus
+Name[cs]=Zaměření
+Name[csb]=Zrëszanié
+Name[cy]=Canolbwynt
+Name[da]=Fokus
+Name[de]=Aktivierung
+Name[el]=Εστίαση
+Name[eo]=Fokuso
+Name[es]=Foco
+Name[et]=Fookus
+Name[eu]=Fokua
+Name[fa]=کانون
+Name[fi]=Kohdistus
+Name[ga]=Fócas
+Name[gl]=Foco
+Name[he]=התמקדות
+Name[hi]=फ़ोकस
+Name[hr]=Fokus
+Name[hu]=Fókuszálás
+Name[id]=Fokus
+Name[is]=Virkni
+Name[ja]=フォーカス
+Name[ka]=ფოკუსი
+Name[kk]=Назар
+Name[km]=ផ្ដោត​អារម្មណ៍
+Name[ko]=초점
+Name[lo]=ຫີນ
+Name[lt]=Fokusas
+Name[lv]=Fokuss
+Name[mk]=Фокусирање
+Name[mn]=Идэвхижүүлэх
+Name[ms]=Fokus
+Name[nb]=Fokus
+Name[nds]=Fokus
+Name[ne]=फोकस
+Name[nn]=Fokus
+Name[nso]=Tebeledisiso
+Name[pa]=ਕੇਂਦਰ
+Name[pl]=Ognisko
+Name[pt]=Foco
+Name[pt_BR]=Foco
+Name[ru]=Фокус
+Name[rw]=Igaragaza rikeye
+Name[se]=Fohkus
+Name[sk]=Fokus
+Name[sl]=Fokus
+Name[sr]=Фокус
+Name[sr@Latn]=Fokus
+Name[sv]=Fokus
+Name[ta]=முனைப்படுத்து
+Name[te]=ఫొకస్
+Name[tg]=Марказ
+Name[th]=โฟกัส
+Name[tr]=Odaklama
+Name[tt]=Eş Üzäge
+Name[uk]=Фокус
+Name[uz]=Fokus
+Name[uz@cyrillic]=Фокус
+Name[ven]=U thetshelesa
+Name[vi]=Chọn
+Name[zh_CN]=焦点
+Name[zh_TW]=焦點
+Name[zu]=Ukunaka
+
+Comment=Configure the window focus policy
+Comment[af]=Konfigureer die venster fokus beleid
+Comment[ar]=قم بإعداد سياسة التركيز على النوافذ
+Comment[be]=Настаўленні выкарыстання фокусу
+Comment[bg]=Настройване активирането на прозорците
+Comment[bn]=উইণ্ডো ফোকাস পলিসি কনফিগার করুন
+Comment[br]=Kefluniañ politikerez fokus ar prenestr
+Comment[bs]=Podesite politiku fokusa prozora
+Comment[ca]=Aquí podeu configurar la política del focus
+Comment[cs]=Nastavení způsobu zaměřování oken
+Comment[csb]=Kònfigùracëjô zrëszaniô òknów
+Comment[cy]=Ffurfweddu'r polisi canolbyntio ffenestri
+Comment[da]=Indstil vinduers fokuspolitik
+Comment[de]=Fensteraktivierung einrichten
+Comment[el]=Ρυθμίστε τον τρόπο εστίασης των παραθύρων
+Comment[eo]=Agordu la fenestran fokusdirektivon
+Comment[es]=Configuración de la política de enfocado de ventanas
+Comment[et]=Akendele fookuse andmise reeglid
+Comment[eu]=Konfiguratu leihoen fokuaren portaera
+Comment[fa]=پیکربندی خط مشی کانون پنجره
+Comment[fi]=Ikkunoiden kohdistustapa
+Comment[fr]=Configuration de la politique de focus des fenêtres
+Comment[fy]=Hjir kinne jo it fokusbeliid fan finsters ynstelle
+Comment[ga]=Cumraigh an polasaí um fhócas fuinneoige
+Comment[gl]=Configurar política de outorgación do foco ás fiestras
+Comment[he]=קביעת מדיניות ההתמקדות של חלונות
+Comment[hi]=विंडो फ़ोकस पॉलिसी कॉन्फ़िगर करें
+Comment[hr]=Konfiguriranje pravila za fokusiranje prozora
+Comment[hu]=Az ablakok fókuszálási jellemzőinek beállításai
+Comment[is]=Stilla virkni stefnu
+Comment[it]=Configura la politica del focus delle finestre
+Comment[ja]=ウィンドウのフォーカスポリシーの設定
+Comment[kk]=Терезедегі назар тартібін баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​គោលការណ៍​ផ្ដោត​អារម្មណ៍​របស់​បង្អួច
+Comment[ko]=창 초점 정책 설정하기
+Comment[lo]=ປັກອີນສອດສ່ອງຊີພີຍູ
+Comment[lt]=Konfigūruoti langų fokusavimo taisykles
+Comment[lv]=Konfigurē logu fokusēšanās politiku
+Comment[mk]=Конфигурирајте ја политиката на фокусирање на прозорците
+Comment[mn]=Цонх идэвхижүүлэлт тохируулах
+Comment[mt]=Ikkonfigura kif jieħdu l-focus il-windows
+Comment[nb]=Tilpass praksisen for vindusfokus
+Comment[nds]=Regeln för den Finsterfokus instellen
+Comment[ne]=सञ्झ्याल फोकस नीति कन्फिगर गर्नुहोस्
+Comment[nl]=Hier kunt u het vensterfocusbeleid instellen
+Comment[nn]=Set opp praksisen for vindaugsfokus
+Comment[nso]=Beakanya molao wa tebeledisiso ya window
+Comment[pa]=ਝਰੋਖਾ ਕੇਂਦਰ ਨੀਤੀ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja przenoszenia ogniska
+Comment[pt]=Configuração da política de foco (primeiro plano) das janelas
+Comment[pt_BR]=Configura a política de foco de janela
+Comment[ro]=Configurează politica de focus a ferestrelor
+Comment[ru]=Настройка политики фокусирования окон
+Comment[rw]=Kuboneza politiki y'igaragazarikeye ry'idirishya
+Comment[se]=Heivet lásefohkusa doaibmanvuogi
+Comment[sk]=Nastavenie politiky aktivácie okien
+Comment[sl]=Nastavitve ravnanja s fokusom okna
+Comment[sr]=Подешавање начина фокусирања прозора
+Comment[sr@Latn]=Podešavanje načina fokusiranja prozora
+Comment[sv]=Anpassa policy för fönsterfokus
+Comment[ta]=சாளர துவக்க முறையை வடிவமை
+Comment[tg]=Танзими сиёсати маркази тиреза
+Comment[th]=ปรับแต่งรูปแบบการได้รับโฟกัสของหน้าต่าง
+Comment[tr]=Pencere odaklama yöntemini yapılandır
+Comment[tt]=Täräzä terelätü tärtiben caylaw
+Comment[uk]=Налаштування поведінку фокусу вікна
+Comment[uz]=Oynani fokuslash qoidasini moslash
+Comment[uz@cyrillic]=Ойнани фокуслаш қоидасини мослаш
+Comment[ven]=Dzudzanyani wa muano wa window
+Comment[vi]=Cấu hình cách chọn cửa sổ
+Comment[wa]=Aponteye li dujhance di focus di purnea
+Comment[xh]=Qwalasela inkqubo yobekiso lwe window
+Comment[zh_CN]=配置窗口焦点策略
+Comment[zh_TW]=設定視窗焦點政策
+Comment[zu]=Hlanganisela umthetho wokunaka kwe-window
+
+Keywords=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop
+Keywords[af]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all werkskerm
+Keywords[be]=Фокус,Рамяшчэнне,Клавіятура,Усе працоўныя сталы,focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop
+Keywords[bg]=фокус, активиране, автоматично, щракане, focus, placement, auto raise, raise, click raise, keyboard, CDE, alt-tab, all desktop
+Keywords[ca]=focus,emplaçament,elevar automàticament,elevar,elevar en clicar,teclat,CDE,alt-tab,tot l'escriptori
+Keywords[cs]=zaměření,umísťování,automatické zdvižení,klávesnice,CDE,Alt-Tab,plochy
+Keywords[csb]=focus, ùmieszczanié, aùtomatné przenoszenié,pòdnoszenié,pòdnoszenié przë klëkniãcô,klawiatura,CDE,alt-tab,wszëtczé biurka,wszëtczé pùltë
+Keywords[cy]=canolbwynt,lleoliad,hunan-godi,codi,codi ar ?l clic,allweddell,CDE,alt-tab,penbwrdd cyfan
+Keywords[da]=fokus,placering,autohæv,hæv,klikhæv,tastatur,CDE,alt-tab,alle desktoppe
+Keywords[de]=Fokus,Aktivierung,Platzierung,Autom. Aktivierung,Nach oben/unten, Klick,Tastatur,CDE
+Keywords[el]=εστίαση,τοποθέτηση,αυτόματη ανύψωση,ανύψωση,ανύψωση με πάτημα,πληκτρολόγιο,CDE,alt-tab,all desktop
+Keywords[eo]=fokuso,lokado,aŭto-altigo,altigo,kliki,kilk altigo,klavaro,CDE,alt-tab,ĉiuj tabuloj
+Keywords[es]=foco,ubicación,auto psara al frente,pasar al frente,pulsar,teclado,CDE,alt-tab,todo el escritorio
+Keywords[et]=fookus,asetus,klikk,klõps,klaviatuur,CDE,alt-tab
+Keywords[eu]=fokua,kokapena,auto aurrera ekarri,aurrera ekarri,klik eta aurrera eraman,teklatua,CDE,alt-tab,mahaigain guztiak
+Keywords[fa]=کانون، جای‌دهی، بالا بردن خودکار، بالا بردن، بالا بردن فشار، صفحه کلید، CDE، دگرساز-جهش، همۀ رومیزیها
+Keywords[fi]=fokus,sijoitus,automaattinosto,napsautusnosto,näppäimistö,CDE
+Keywords[fr]=focus,placement,auto élévation,élévation,clic clavier,CDE,alt-tab,tous les bureaux
+Keywords[fy]=focus,fokus,finster,aandacht,oandacht,plaatsing,pleatsing,voorgrond,foargrûn,achtergrond,eftergrûn,klikken,toetsenbord,toetseboerd,CDE,alt-tab,alle bureaubladen,alle buroblêden
+Keywords[ga]=fócas,láithriú,uathardaigh,ardaigh,gliogardaigh,méarchlár,CDE,alt-tab,gach deasc
+Keywords[gl]=foco,emprazamento,auto subir,subir,premer para subir,teclado,CDE,alt-tab,todo o escritório
+Keywords[he]=התמקדות,מיקום,הבאה אוטומטית לחזית,הבאה לחזית,לחיצה להבאה לחזית,מקלדת,כל שולחנות העבודה, focus,placement,auto raise,raise, click raise,keyboard,CDE,alt-tab,all desktop
+Keywords[hi]=फ़ोकस, स्थिति,स्वतः ऊपर उठाएँ,ऊपर उठाएँ,क्लिक ऊपर उठाएँ,कुंजीपट,सीडीई,ऑल्ट-टेब,सभी डेस्कटॉप
+Keywords[hr]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,fokus,smještaj,automatska pojava,pojava,pojava klikanjem,tipkovnica,sve radne površine
+Keywords[hu]=fókusz,elhelyezés,automatikus előrehozás,előrehozás,előrehozás kattintásra,billentyűzet,CDE,Alt+Tab,minden munkaasztal
+Keywords[id]=fokus,penempatan,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop
+Keywords[is]=fókus,staðsetning,fleyta upp sjálfkrafa, fleyta upp,smellur fleytir upp,lyklaborð,CDE,alt-tab,öll skjáborð
+Keywords[it]=focus,piazzamento,alza automaticamente,alza,clic per alzare,tastiera, CDE,alt-tab,tutti i desktop
+Keywords[ja]=フォーカス,配置,自動的に前面に,前面に,クリックして前面に,キーボード,CDE,alt-tab,すべてのデスクトップ
+Keywords[km]=ផ្តោត​អារម្មណ៍,ការ​ដាក់,លើក​ឡើង​ស្វ័យប្រវត្តិ,លើកឡើង,ចុច លើកឡើង,ក្ដារចុច,CDE,ជំនួស-ថេប,ផ្ទៃតុ​ទាំងអស់
+Keywords[lt]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop, fokusas,perkėlimas į pirmą planą, pirmas planas, klaviatūra, CDE,visi darbastaliai
+Keywords[lv]=fokuss,novietojums,automātiska pacelšanās,pacelšanās,klikšķaraise,tastatūra,CDE,alt-tab,visas darbavirsmas
+Keywords[mk]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,фокус,позиција,авто подигање,подигање,клик подигање,сите десктопи
+Keywords[mn]=Хараа,Идэвхижүүлэл,Зайчлал,Авто.Идэвхижүүлэлт, Дээшээ/доошоо,Товшилт,Гар,КДE
+Keywords[mt]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,tella',tastiera
+Keywords[nb]=fokus,plassering,autohev,hev,klikk og hev,tastatur,CDE,bytt vindu,alle skrivebord
+Keywords[nds]=aktiveren,Fokus,Platzeren,automaatsch fokusseren,aktiveren,klick fokusseren,Tastatuur,CDE,ALT-TAB,all Schriefdischen
+Keywords[ne]=फोकस, स्थापना, स्वत: बृद्धि, बृद्धि, बृद्धि क्लिक गर्नुहोस्, कुञ्जीपाटी,CDE,अल्ट-ट्याब, सबै डेस्कटप
+Keywords[nl]=focus,aandacht,plaatsing,voorgrond,achtergrond,klikken,toetsenbord,CDE,alt-tab,alle bureaubladen
+Keywords[nn]=fokus,plassering,autohev,hev,klikk og hev,tastatur,CDE,byt vindauge,alle skrivebord
+Keywords[nso]=tebeledisiso,peo,kgodiso ya go itirisa,kgodiso,tobetsa kgodiso,keyboard,CDE,alt-tab,desktop kamoka
+Keywords[pl]=ognisko,umiejscawianie,automatyczne podnoszenie,podnoszenie, podniesienie przy kliknięciu,klawiatura,CDE,alt-tab,wszystkie biurka,wszystkie pulpity
+Keywords[pt]=foco,colocação,auto-elevar,elevar,elevar com 'click',teclado,CDE,alt-tab,todos os ecrãs
+Keywords[pt_BR]=foco,posição,auto elevar,elevar,teclado,CDE,alt-tab,todas as áreas de trabalho
+Keywords[ro]=focus,plasare,ridicare automată,clic,tastatură,CDE,alt-tab,toate ecranele
+Keywords[rw]=igaragazarikeye,ishyira mu mwanya,byizamura,kuzamura,Kanda kuzamura,Mwandikisho,CDE,Alt - tab,Ibiro byose
+Keywords[se]=fohkus,auto lokten,lokten,coahkkal ja lokte,boallobeavdi,CDE,molssu lássii,buot čállinbeavddi
+Keywords[sk]=fokus,umiestnenie,automatický presun,dopredu,dopredu na kliknutie,klávesnica,CDE,alt-tab,všetky plochy
+Keywords[sl]=fokus,postavitev,dvigni,tipkovnica,CDE,alt-tab,vsa namizja
+Keywords[sr]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,фокус,смештање,аутоматско подизање,подизање,тастатура,alt-tab, сви радна површина
+Keywords[sr@Latn]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,fokus,smeštanje,automatsko podizanje,podizanje,tastatura,alt-tab, svi radna površina
+Keywords[sv]=fokus,placering,autohöjning,höjning,höjning med klick,tangentbord,CDE,alt-tab,alla skrivbord
+Keywords[ta]=ஒருமுகப்படுத்துதல்,இடம், தானாக மேலெழும்பு, மேலேழும்புதல், மேல் க்ளிக்செய்,விசைப்பலகை,CDE,alt-tab,எல்லா மேல்மேசை
+Keywords[th]=โฟกัส,ตำแหน่ง,อยู่ด้านบนอัตโนมัติ,อยู่ด้านบน,คลิ้กเพื่ออยู่ด้านบน,แป้นพิมพ์,CDE,alt-tab,ทุกพื้นที่ทำงาน
+Keywords[tr]=odaklama,yerleşim,masaüstü,yükselt,tıkla,klavye,CDE,yerleşim
+Keywords[uk]=фокус,розташування,автопіднімання,підняти,клавіатура,CDE,alt-tab,вся стільниця
+Keywords[uz]=avto-oldinga,oldinga,bosib oldinga,CDE,alt-tab,hamma ish stollari,fokuslash,tugmatag,joylashish
+Keywords[uz@cyrillic]=авто-олдинга,олдинга,босиб олдинга,CDE,alt-tab,ҳамма иш столлари,фокуслаш,тугматаг,жойлашиш
+Keywords[ven]=thetshelesa,u vhetshela,u vusa,vusa,putedzani u vusa,khiibodo,CDE,alt-tab,desktop dzothe
+Keywords[vi]=chọn,di chuyển,tự nâng lên,nâng lên,nhấn nâng lên,bàn phím,CDE,alt-tab,tất cả màn hình nền
+Keywords[wa]=focus,plaece,rimonte tot seu,rimonter,rimonte s' on clitche,taprece,CDE,ALT-TAB,tos les scribannes
+Keywords[xh]=ucaco,ubuyiselo,phakamisa ngokuzenzekelayo,phakamisa,nqakraza phakamisa, ibhodi yezitshixho,CDE,alt-tab,zonke ii desktop
+Keywords[zh_CN]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,焦点,放置,自动升起,升起,单击升起,键盘,全部桌面
+Keywords[zh_TW]=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,焦點,佈置,自動抬升,抬升,單擊抬升,鍵盤,全部桌面
+Keywords[zu]=ukunaka,ukubeka,ukukhuphula okuzenzekelayo,ukukhuphula, ukukhuphula ngokucofa,ibhodi yokhiye,CDE,alt-tab,wonke ama-desktop
diff --git a/kwin/kcmkwin/kwinoptions/kwinmoving.desktop b/kwin/kcmkwin/kwinoptions/kwinmoving.desktop
new file mode 100644
index 000000000..912418e0e
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/kwinmoving.desktop
@@ -0,0 +1,229 @@
+[Desktop Entry]
+Icon=kcmkwm
+Type=Application
+Exec=kcmshell kwinmoving
+DocPath=kcontrol/windowmanagement/index.html#action-moving
+
+X-KDE-ModuleType=Library
+X-KDE-Library=kwinoptions
+X-KDE-FactoryName=kwinmoving
+
+Name=Moving
+Name[af]=Beweeg
+Name[ar]=تحريك
+Name[be]=Перамяшчэнне
+Name[bg]=Преместване
+Name[bn]=সরানো হচ্ছে
+Name[br]=O tilec'hiañ
+Name[bs]=Pomjeranje
+Name[ca]=Moviment
+Name[cs]=Přesouvání
+Name[csb]=Przesëwanié
+Name[cy]=Symud
+Name[da]=Flytter
+Name[de]=Verschieben
+Name[el]=Μετακίνηση
+Name[eo]=Movanta
+Name[es]=Moviendo
+Name[et]=Liigutamine
+Name[eu]=Mugitzen
+Name[fa]=حرکت
+Name[fi]=Siirtäminen
+Name[fo]=Flytir
+Name[fr]=Déplacement
+Name[fy]=Ferpleatsing
+Name[ga]=Bogadh
+Name[gl]=Movemento
+Name[he]=הזזה
+Name[hi]=खिसक रहा है
+Name[hr]=Pomicanje
+Name[hu]=Mozgatás
+Name[id]=Pindah
+Name[is]=Færa
+Name[it]=Spostamento
+Name[ja]=移動
+Name[ka]=გადაადგილება
+Name[kk]=Жылжыту
+Name[km]=ការ​ផ្លាស់ទី
+Name[ko]=이동
+Name[lo]=ລອກອິນ
+Name[lt]=Perkėlimas
+Name[lv]=Pārvietošana
+Name[mk]=Движење
+Name[mn]=Шилжүүлэх
+Name[mt]=Tmexxija
+Name[nb]=Flytting
+Name[nds]=Verschuven
+Name[ne]=सार्दा
+Name[nl]=Verplaatsing
+Name[nn]=Flytting
+Name[nso]=Sutha
+Name[pa]=ਏਧਰ-ਓਧਰ
+Name[pl]=Przesuwanie
+Name[pt]=Mover
+Name[pt_BR]=Movendo
+Name[ro]=Mutare
+Name[ru]=Перемещение
+Name[rw]=Kwimura
+Name[se]=Lihkadeamen
+Name[sk]=Presun
+Name[sl]=Premikanje
+Name[sr]=Померање
+Name[sr@Latn]=Pomeranje
+Name[sv]=Förflyttning
+Name[ta]=நகர்கிறது
+Name[te]=కదలిక
+Name[tg]=Ҳаракат
+Name[th]=การย้าย
+Name[tr]=Taşıma
+Name[tt]=Küçerü
+Name[uz]=Koʻchirish
+Name[uz@cyrillic]=Кўчириш
+Name[ven]=U tshimbila
+Name[vi]=Di chuyển
+Name[wa]=Bodjî
+Name[xh]=Iyahamba
+Name[zh_CN]=移动
+Name[zh_TW]=移動
+Name[zu]=Iyanyakaza
+
+Comment=Configure the way that windows are moved
+Comment[af]=Konfigureer die weg wat vensters word verskuif
+Comment[ar]=تعريف الطريقة التي تتحرك فيها النوافذ
+Comment[be]=Настаўленні перамяшчэння вокнаў
+Comment[bg]=Настройване преместването на прозорците
+Comment[bn]=উইণ্ডো কিভাবে সরানো হবে তা কনফিগার করুন
+Comment[br]=Kefluniañ an daoare e vez fiñvalet ar prenester
+Comment[bs]=Podesite način pomjeranja prozora
+Comment[ca]=Aquí podeu configurar els valors per quan es moguin les finestres
+Comment[cs]=Nastavení způsobu přesouvání oken
+Comment[csb]=Kònfigùracëjô sztélu przesëwaniô òknów
+Comment[cy]=Ffurfweddu'r ffordd y symudir ffenestri
+Comment[da]=Indstil den måde vinduer flyttes på
+Comment[de]=Festlegen, wie Fenster verschoben werden
+Comment[el]=Ρυθμίστε τον τρόπο με τον οποίο μετακινούνται τα παράθυρα
+Comment[eo]=Agordu la manieron, per kiu oni movas la fenestrojn
+Comment[es]=Configuración del modo de movimiento de las ventanas
+Comment[et]=Akende liigutamise viisi seadistamine
+Comment[eu]=Konfiguratu leihoak mugitzeko era
+Comment[fa]=پیکربندی روشی که پنجره‌ها حرکت می‌کنند
+Comment[fi]=Ikkunoiden siirtäminen
+Comment[fr]=Configuration de la manière dont les fenêtres sont déplacées
+Comment[fy]=Hjir kinne jo de wize wêrop finsters har ferpleatse ynstelle
+Comment[ga]=Cumraigh conas a aistrítear fuinneoga
+Comment[gl]=Aqui pode configurar o xeito en que se moven as fiestras
+Comment[he]=שינוי הדרך שבה חלונות מוזזים
+Comment[hi]=कॉन्फ़िगर करें कि विंडो किस तरह खिसके
+Comment[hr]=Konfiguriranje načina pomicanja prozora
+Comment[hu]=Az ablakmozgatás beállításai
+Comment[is]=Stilla hvernig gluggar eru hreyfðir
+Comment[it]=Configura il modo in cui vengono spostate le finestre
+Comment[ja]=ウィンドウの移動の仕方の設定
+Comment[ka]=ფანჯრების გადაადგილების კონფიგურაცია
+Comment[kk]=Терезені жылжыту тәсілін баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​របៀប​ដែល​បង្អួច​ត្រូវ​បាន​ផ្លាស់ទី
+Comment[ko]=창이 움직이는 방법 설정하기
+Comment[lo]=ປັບແຕ່ງການຕັ້ງຄ່າລະບົບແຄຊທີ່ນີ่້
+Comment[lt]=Konfigūruoti langų perkėlimą
+Comment[lv]=Šeit Jūs varat konfigurēt kā tiek pārvietoti logi
+Comment[mk]=Конфигурирајте го начинот на кој се движат прозорците
+Comment[mn]=Цонхыг яааж шилжүүлэхийг тогтоох
+Comment[mt]=Ikkonfigura kif tmexxi l-windows
+Comment[nb]=Velg hvordan vinduer skal flyttes
+Comment[nds]=Instellen, woans de Finstern beweegt warrt
+Comment[ne]=सञ्झ्यालहरू सार्ने तरिका कन्फिगर गर्नुहोस्
+Comment[nl]=Hier kunt u de wijze waarop vensters worden verplaatst instellen
+Comment[nn]=Vel korleis vindauga skal flyttast
+Comment[nso]=Beakanya ka mokgwa wo window yeo e suthiswago kagona
+Comment[pa]=ਝਰੋਖੇ ਦੇ ਹਿੱਲਣ ਦੇ ਢੰਗ ਦੀ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja stylu przesuwania okien
+Comment[pt]=Configuração da forma como as janelas são movidas
+Comment[pt_BR]=Configura o modo como as janelas são movidas
+Comment[ro]=Configurează modul în care sînt mutate ferestrele
+Comment[ru]=Настройка способа перемещения окон
+Comment[rw]=Kuboneza uburyo amadirishya yimurwa
+Comment[se]=Heivet mo láset lihkaduvvot
+Comment[sk]=Nastavenie presunu okien
+Comment[sl]=Nastavitve načinov premikanja okna
+Comment[sr]=Подешавање начина на који се прозори померају
+Comment[sr@Latn]=Podešavanje načina na koji se prozori pomeraju
+Comment[sv]=Anpassa hur fönster flyttas
+Comment[ta]=சாளரம் நகர்ரும் விதத்தை அமை
+Comment[tg]=Танзими навъи ҳаракати тирезаҳо
+Comment[th]=ปรับแต่งลักษณะวิธีการย้ายหน้าต่าง
+Comment[tr]=Pencerelerin taşınması yöntemini yapılandır
+Comment[tt]=Täräzä küçerü ısulın caylaw
+Comment[uk]=Тут можна налаштувати поведінку при пересуванні вікон
+Comment[uz]=Oynalarni koʻchirish yoʻlini moslash
+Comment[uz@cyrillic]=Ойналарни кўчириш йўлини мослаш
+Comment[ven]=Dzudzanyani ndila ine windoow ya tshimbidzhwa zwone
+Comment[vi]=Cấu hình cách di chuyển cửa sổ
+Comment[wa]=Apontyî l' manire di bodjî des purneas
+Comment[xh]=Qwalasela iindlela ii windows ezshukunyiswa ngayo
+Comment[zh_CN]=配置窗口移动的方式
+Comment[zh_TW]=設定視窗移動的方式
+Comment[zu]=Hlanganisela indlela ama-window anyakaziswa ngayo
+
+Keywords=moving,smart,cascade,maximize,maximise,snap zone,snap,border
+Keywords[be]=Перамяшчэнне,Каскадам,Найбольшыць,Найменшыць,Мяжа,moving,smart,cascade,maximize,maximise,snap zone,snap,border
+Keywords[bg]=преместване, прозорци, прозорец, промяна, размер, размера, moving, smart, cascade, maximize, maximise, snap zone, snap, border
+Keywords[ca]=moviment,astut,cascada,maximitza,zona d'atracció,atracció,vora
+Keywords[cs]=přesun,chytré,kaskáda,maximalizace,zóna,okraje
+Keywords[csb]=przesëwanié,kaskadowò,masymilizacëjô,òbéńda chwëtaniô,chwëtanié,grańca
+Keywords[cy]=symud,clyfar,rhaedru,maint llawn,cylchfa gosod,snap,ymyl
+Keywords[da]=flytter,smart,stabl,maksimér,snapzone,snap,kant
+Keywords[de]=Verschieben,Gestaffelt,Maximieren,Minimieren,Einrastzone,Ränder
+Keywords[el]=μετακίνηση,έξυπνη,διαδοχικός,μεγιστοποίηση,μεγιστοποίηση,ζώνη αρπαγής,αρπαγή,περίγραμμα
+Keywords[eo]=movanta,maksimigi,bordo
+Keywords[es]=moviendo,inteligente,cascada,maximizar,zona de adhesión,adhesión,adherir,borde
+Keywords[et]=liigutamine,tark,kaskaad,maksimeerimine,haaramise tsoon,haaramine,piire
+Keywords[eu]=mugitzen,fina,kaskadan,maximizatu,itsasketa eremua, itsasketa,ertza
+Keywords[fa]=حرکت، هوشمند، آبشاری، بیشینه‌ساز‌ی، بیشینه‌ساز‌ی، منطقۀ پرش، پرش، لبه
+Keywords[fi]=liikkuva,älykäs,sarjoita,suurenna,kehys
+Keywords[fr]=déplacement,cascade,maximiser,minimiser,coller,zone d'attraction,bordure
+Keywords[fy]=verplaatsing,ferpleatse,intelligen,yntelligint,tûk,plaatsing,pleatsing,trapsgewijs,trepfoarm,maximaliseren,maksimalisearje,randen magnetisch,magnetisch veld,rand,râne,magnetische randen
+Keywords[gl]=movemento,pequeno,fervenza,maximizar,maximizar,zona de suxección,suexección,beira
+Keywords[he]=הזזה,חכם,מדורג,הגדלה,אזור הצמדה,הצמדה,גבול, moving,smart,cascade,maximize,maximise,snap zone,snap,border
+Keywords[hi]=खिसकता,चतुर,कास्केड,अधिकतम,न्यूनतम,स्नैप ज़ोन,स्नेप,किनारा
+Keywords[hr]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,pomicanje,pametno,kaskadno,maksimiziranje,snap zona,snap,obrub
+Keywords[hu]=mozgatás,intelligens,lépcsőzetes,maximalizálás,illeszkedési zóna,illeszkedés,szegély
+Keywords[id]=pindah,smart,cascade,maksimum,minimum,snap zone,snap,border
+Keywords[is]=færi,snjallt,stafla,hámarka,gripsvæði,grip,rammi,jaðar
+Keywords[it]=spostamento,intelligente,cascata,massimizza,zona magnetica,bordi,bordi magnetici
+Keywords[ja]=移動,スマート,カスケード,最大化,スナップゾーン,スナップ境界
+Keywords[km]=ការ​ផ្លាស់ទី,ឆ្លាត,ល្បាក់,ពង្រីក​អប្បបរមា,តំបន់​ខ្ទាស់,ខ្ទាស់,ស៊ុម
+Keywords[lt]=moving,smart,cascade,maximize,maximise,snap zone,snap,border, perkėlimas,išmoningas,kaskada,išdidinti,rėmelis,riba
+Keywords[lv]=pārvietošana,gudra,kaskāde,maksimizē,maksimizēšana,pielipsanas zona,pielipt,mala
+Keywords[mk]=moving,smart,cascade,maximize,maximise,snap zone,snap,border, движење,паметно,каскадно,рашири,спушти,граница
+Keywords[mn]=Шилжүүлэх,Ухаалаг,Зайчилах,Томсгох,Жижигсгэх,Талбай,Хүрээ
+Keywords[mt]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,tmexxija,kaskada,massimizza,faqqa',bordura
+Keywords[nb]=flytting,smart,overlapping,maksimer,kantlås,vindu
+Keywords[nds]=bewegen,verschuven,plietsch,maximeren,minimeren,Andockrebeet,andocken,Rahmen
+Keywords[ne]=सार्ने, छरितो, क्यासकेड, बढाउनु, बढाउनु, स्न्याप जोन, स्न्याप, किनारा
+Keywords[nl]=verplaatsing,intelligent,plaatsing,trapsgewijs,maximaliseren,randen magnetisch,magnetisch veld,rand,magnetische randen
+Keywords[nn]=flytting,smart,overlapping,maksimer,kantlås,vindauge
+Keywords[nso]=sutha,botsana,phororo,oketsa,oketsa,lefelo la thwantsho ya menwana, thwantsho ya menwana,mollwane
+Keywords[pa]=moving,smart,cascade,maximize,maximise,snap zone,snap,ਹਾਸ਼ੀਆ
+Keywords[pl]=przesuwanie,sprytne,kaskadowo,maksymalizacja,obszar chwytania,chwytanie, granica
+Keywords[pt]=mover,inteligente,cascata,maximizar,zona de atracção,atracção,contorno
+Keywords[pt_BR]=movendo,pequeno,cascata,maximizar,zona rápida,zona de encaixe,borda
+Keywords[ro]=mutare,isteț,cascadă,maximizare,margine
+Keywords[rw]=kwimura,cyiza,urukurikirane,kugira kinini ,gukata agace,gukata, impera
+Keywords[sk]=presun,inteligentný,kaskádovať,maximalizácia,minimalizácia,priťahovanie,zóna priťahovania,okraje
+Keywords[sl]=premikanje,pametno,kaskadno,povečaj,raztegni,meja,mreža,pripni
+Keywords[sr]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,померање,паметно,каскадно,максимизуј,snap zone,snap,ивица
+Keywords[sr@Latn]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,pomeranje,pametno,kaskadno,maksimizuj,snap zone,snap,ivica
+Keywords[sv]=förflyttning,smart,kaskad,maximera,bindningszon,bind,kant
+Keywords[ta]=நகரும்,புத்திசாலி,மேலுக்குமேல், பெரிதாக்கு,பெரிதாக்கு,நிழற் படமெடுப்பு பகுதி,நிழற்படம்,விளிம்பு
+Keywords[th]=การย้าย,ฉลาด,จัดเป็นขั้นๆ,ขยายเต็มจอ,ขยายเต็มหน้าจอ,snap zone,snap,border
+Keywords[tr]=taşıma,taşınma,akıllı,kenar
+Keywords[uk]=пересування,кмітливий,каскад,максимізувати,зона захоплення,захоплення,рамка
+Keywords[uz]=snap zone,snap,border,koʻchirish,ixcham,oynalarni tartiblash,yoyish
+Keywords[uz@cyrillic]=snap zone,snap,border,кўчириш,ихчам,ойналарни тартиблаш,ёйиш
+Keywords[ven]=tshimbila,zwavhudi,cascade,engedza,engedza,fhethu ha snap,snap,mukano+-
+Keywords[vi]=di chuyển,thông minh,tầng,phóng to,phóng to,vùng thả,thả,bờ
+Keywords[wa]=bodjî,malén,a pertinne,, pus grand,nap zone,snap,båoird
+Keywords[xh]=iyashukuma,iyabukeka,cascade,yenza nkulu,yenza nkulu,yandisa,snap zone,snap,umda
+Keywords[zh_CN]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,移动,智能,层叠,最大化,最小化,吸附区域,边框
+Keywords[zh_TW]=moving,smart,cascade,maximize,maximise,snap zone,snap,border,移動,聰明,最大化,邊框
+Keywords[zu]=iyanyakaza,okukhaliphile,landelanisa,khulisa,khulisa,indawo yokunamathisela,namathisela,umngcele
diff --git a/kwin/kcmkwin/kwinoptions/kwinoptions.desktop b/kwin/kcmkwin/kwinoptions/kwinoptions.desktop
new file mode 100644
index 000000000..23a222197
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/kwinoptions.desktop
@@ -0,0 +1,225 @@
+[Desktop Entry]
+Icon=kcmkwm
+Type=Application
+Exec=kcmshell kwinoptions
+DocPath=kcontrol/windowmanagement/index.html
+
+X-KDE-ModuleType=Library
+X-KDE-Library=kwinoptions
+X-KDE-FactoryName=kwinoptions
+
+Name=Window Behavior
+Name[af]=Venster Gedrag
+Name[ar]=سلوك النوافذ
+Name[az]=Pəncərə Davranışı
+Name[be]=Паводзіны вокнаў
+Name[bg]=Прозорци
+Name[bn]=উইণ্ডো আচরণ
+Name[br]=Emzalc'h ar prenester
+Name[bs]=Ponašanje prozora
+Name[ca]=Comportament de les finestres
+Name[cs]=Chování oken
+Name[csb]=Ùchòwanié òkna
+Name[cy]=Ymddygiad Ffenestri
+Name[da]=Vinduesopførsel
+Name[de]=Fenstereigenschaften
+Name[el]=Συμπεριφορά παραθύρων
+Name[en_GB]=Window Behaviour
+Name[eo]=Fenestrokonduto
+Name[es]=Comportamiento de la ventana
+Name[et]=Akende käitumine
+Name[eu]=Leihoen portaera
+Name[fa]=رفتار پنجره
+Name[fi]=Ikkunoiden käyttäytyminen
+Name[fr]=Comportement des fenêtres
+Name[fy]=Finstergedrach
+Name[ga]=Oibriú na bhFuinneoga
+Name[gl]=Comportamento das Fiestras
+Name[he]=פעולת חלונות
+Name[hi]=विंडो बर्ताव
+Name[hr]=Ponašanje prozora
+Name[hu]=Ablakműveletek
+Name[is]=Hegðun glugga
+Name[it]=Comportamento delle finestre
+Name[ja]=ウィンドウの挙動
+Name[ka]=ფანჯრის ქცევა
+Name[kk]=Терезе қасиеттері
+Name[km]=ឥរិយាបថ​បង្អួច
+Name[ko]=창 동작
+Name[lo]=ພິດຕິກຳຂອງຫນ້າຕ່າງ
+Name[lt]=Langų elgsena
+Name[lv]=Loga izturēšanās
+Name[mk]=Однесување на прозорци
+Name[mn]=Цонхны байдал
+Name[mt]=Imġieba tal-Window
+Name[nb]=Vindusoppførsel
+Name[nds]=Finsterbedregen
+Name[ne]=सञ्झ्याल व्यवहार
+Name[nl]=Venstergedrag
+Name[nn]=Vindaugsåtferd
+Name[nso]=Mekgwa ya Window
+Name[oc]=Comportament de las finestras
+Name[pa]=ਝਰੋਖਾ ਵਿਵਹਾਰ
+Name[pl]=Okna
+Name[pt]=Comportamento das Janelas
+Name[pt_BR]=Comportamento da Janela
+Name[ro]=Comportament fereastră
+Name[ru]=Поведение окна
+Name[rw]=Imyitwarire y'Idirishya
+Name[se]=Láseláhtten
+Name[sk]=Správanie okien
+Name[sl]=Obnašanje oken
+Name[sr]=Понашање прозора
+Name[sr@Latn]=Ponašanje prozora
+Name[ss]=Kutiphatsa kweliwindi
+Name[sv]=Fönsterbeteende
+Name[ta]=சாளர நடத்தை
+Name[tg]=Рафтори тиреза
+Name[th]=พฤติกรรมของหน้าต่าง
+Name[tr]=Pencere Davranışı
+Name[tt]=Täräzä Çağılışı
+Name[uk]=Поведінка вікон
+Name[uz]=Oynaning xususiyatlari
+Name[uz@cyrillic]=Ойнанинг хусусиятлари
+Name[ven]=Maitele a windo
+Name[vi]=Ứng xử của Cửa sổ
+Name[wa]=Dujhance des purneas
+Name[xh]=Ukuziphatha kwe Window
+Name[zh_CN]=窗口行为
+Name[zh_TW]=視窗行為
+Name[zu]=Ukuziphatha kwe-Window
+
+Comment=Configure the window behavior
+Comment[af]=Stel die venster gedrag op
+Comment[ar]=إعداد سلوك النافذة
+Comment[be]=Настаўленні паводзінаў вокнаў
+Comment[bg]=Настройване поведението на прозорците
+Comment[bn]=উইণ্ডোটির আচরণ কনফিগার করুন
+Comment[br]=Kefluniañ emzalc'h ar prenester
+Comment[bs]=Podesite ponašanje prozora
+Comment[ca]=Configura el comportament de finestra
+Comment[cs]=Nastavení chování oken
+Comment[csb]=Kònfigùracëjô ùchòwaniô òkna
+Comment[cy]=Ffurfweddu ymddygiad y ffenestr
+Comment[da]=Indstil vinduets opførsel
+Comment[de]=Fensterverhalten festlegen
+Comment[el]=Ρύθμιση της συμπεριφοράς των παραθύρων
+Comment[en_GB]=Configure the window behaviour
+Comment[eo]=Agordas la konduton de la fenestro
+Comment[es]=Configuración del comportamiento de la ventana
+Comment[et]=Akende käitumise seadistamine
+Comment[eu]=Konfiguratu arakatzailearen portaera
+Comment[fa]=پیکربندی رفتار پنجره
+Comment[fi]=Ikkunoiden asetukset
+Comment[fr]=Configuration du comportement des fenêtres
+Comment[fy]=Stel it finstergedrach yn
+Comment[ga]=Cumraigh oibriú na bhfuinneog
+Comment[gl]=Configurar o comportamento das fiestras
+Comment[he]=שינוי הגדרות פעולת הדפדפן
+Comment[hi]=विंडो व्यवहार कॉन्फ़िगर करें
+Comment[hr]=Konfiguriranje ponašanja preglednika
+Comment[hu]=Az ablakok működési jellemzőinek beállítása
+Comment[is]=Stilla hegðan glugga
+Comment[it]=Configura il comportamento della finestra
+Comment[ja]=ウィンドウの挙動を設定
+Comment[ka]=ბრაუზერის ქცევის კონფიგურაცია
+Comment[kk]=Терезе қасиеттерін баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​ឥរិយាបថ​បង្អួច
+Comment[ko]=창 동작 설정
+Comment[lt]=Konfigūruoti lango elgseną
+Comment[lv]=Konfigurē loga izturēšanos
+Comment[mk]=Конфигурирајте го однесувањето на прозорците
+Comment[mt]=Ikkonfigura l-imġieba tal-windows
+Comment[nb]=Tilpass vinduets oppførsel
+Comment[nds]=Dat Finsterbedregen instellen
+Comment[ne]=सञ्झ्याल व्यवहार कन्फिगर गर्नुहोस्
+Comment[nl]=Stel het venstergedrag in
+Comment[nn]=Oppsett av nettlesaråtferda
+Comment[pa]=ਝਰੋਖਾ ਵਿਵਹਾਰ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja zachowania okna
+Comment[pt]=Configurar o comportamento das janelas
+Comment[pt_BR]=Configura o comportamento das janelas
+Comment[ro]=Configurează comportamentul ferestrei
+Comment[ru]=Настройка поведения браузера
+Comment[rw]=Kuboneza imyitwarire y'idirishya
+Comment[se]=Heivet láseláhttema
+Comment[sk]=Nastavenie správania okna
+Comment[sl]=Nastavite obnašanje brskalnika
+Comment[sr]=Подешавање понашања прозора
+Comment[sr@Latn]=Podešavanje ponašanja prozora
+Comment[sv]=Anpassa fönsterbeteende
+Comment[ta]=º¡ÇÃò¾¢ý Àñ¨À ¯ûǨÁ
+Comment[th]=ปรับแต่งพฤติกรมของหน้าต่าง
+Comment[tr]=Pencere davranışlarını yapılandır
+Comment[tt]=Täräzä çağılışın caylaw
+Comment[uk]=Налаштування поведінки вікна
+Comment[uz]=Oynaning xususiyatlarini moslash
+Comment[uz@cyrillic]=Ойнанинг хусусиятларини мослаш
+Comment[vi]=Cấu hình cách cửa sổ ứng xử
+Comment[wa]=Apontyî l' dujhance des purneas
+Comment[zh_CN]=配置窗口行为
+Comment[zh_TW]=設定視窗行為
+
+Keywords=focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick
+Keywords[ar]=تركيز ركز,موضع مكان,سلوك النافذة,تحريك,رفع, رفع تلقائي,نوافذ,إطار,شريط العنوان,نقر ثنائي
+Keywords[be]=Фокус,Размяшчэнне,Паводзіны акна,Анімацыя,Вокны,Акно,Фрэйм,Загаловак,Двайны націск мышы,focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick
+Keywords[bg]=фокус, поведение, прозорец, активиране, заглавие, focus, placement, window behaviour, animation, raise, auto raise, windows, frame, titlebar, doubleclick
+Keywords[bs]=focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick,fokus,smještaj,ponašanje prozora,animacija,podigni,automatski podigni,prozori,okvir,naslovna trak,dvoklik,dvostruki klik
+Keywords[ca]=focus,emplaçament,comportament de la finestra,animació,eleva,eleva automàticament,finestres,marc,barra del títol,doble clic
+Keywords[cs]=Zaměření,Umístění oken,Chování oken,Animace,Okna,Rámeček,Titulek,Dvojklik
+Keywords[csb]=zrëszanié,aktiwòwanié,ùkłôdanié òknów,ùchòwanié òknów,animacëjô,aùtomatné aktiwòwanié,òkna,òkno,rama,tilowô lëstew,dëbeltné klëkniãce
+Keywords[cy]=canolbwynt,lleoliad,ymddygiad ffenestr,bywluniad,codi,hunan-godi,ffenestri,ffrâm,bar-teitl,clic dwbl,dwbl-glic
+Keywords[da]=fokus,placering,vinduesopførsel,animering,Hæv,autohæv,vinduer,ramme,titellinje,dobbeltklik
+Keywords[de]=Aktivierung,Platzierung,Fensterverhalten,Animation,Nach vorn/hinten, Fenster,Rahmen,Umrandung,Titelleiste,Doppelklick
+Keywords[el]=εστίαση,τοποθέτηση,συμπεριφορά παραθύρων,εφέ κίνησης,ανύψωση,αυτόματη ανύψωση,παράθυρα,πλαίσιο,μπάρα τίτλου,διπλό κλικ
+Keywords[en_GB]=focus,placement,window behaviour,animation,raise,auto raise,windows,frame,titlebar,doubleclick
+Keywords[eo]=fokuso,lokigo,fenestrokonduto,spektaklo,malfonigo,aŭtomalfonigo,fenestro,kadro,titollistelo,duklako
+Keywords[es]=foco,ubicación,posición,ventana,comportamiento,animación,frente,pasar al frente,ventanas,marco,barra de título,doble pulsación
+Keywords[et]=fookus,asetus,akende käitumine,animatsioon,tõstmine,automaatne tõstmine,aknad,raam,tiitliriba,topeltklikk,topeltklõps
+Keywords[eu]=fokua,kokalekua,leihoaren portaera,animazioa,aurrera ekarri,auto aurrera ekarri,leihoak,markoa,titulu-barra,klik bikoitza
+Keywords[fa]=کانون، جای‌دهی، رفتار پنجره، پویانمایی، بالا بردن، بالا بردن خودکار، پنجره‌ها، قاب، میله عنوان، دو بار فشار
+Keywords[fi]=fokus,sijoittaminen,ikkunan toiminta,animaatio,nosto,automaattinosto,ikkunat,kehys,otsikkorivi,tuplanapsautus,kaksoisnapsautus
+Keywords[fr]=focus,gestion du focus,fenêtre,placement des fenêtres,comportement des fenêtres,animation,fenêtres,barre de titre,double clic,souris,boutons de la souris,dessus,dessous,raise,auto raise
+Keywords[fy]=focusbeleid,vensterplaatsing,finsterferpleatsing,venstergedrag,finstergedrach,focus,window,finster,plaatsing,pleatsing,plaatsingbeleid,pleatsingbelied,animatie,animaasje,voorgrond,foargrûn,vensters,finsters,frame,kader,dubbelklikken,dûbelklikke,fokusbeliid
+Keywords[ga]=fócas,láithriú,oibriú na bhfuinneog,beochan,ardaigh,uathardaigh,fuinneoga,fráma,ceannteideal,déchliceáil
+Keywords[gl]=foco,emprazamento,comportamento da fiestra,animación,subir,auto subir,fiestras,marco,barra de título,dobre presión
+Keywords[he]=התמקדות,מיקום,פעולת חלונות,אנימציה,הנפשה,הבאה לחזית,הבאה אוטומטית לחזית,חלונות,גבול,מסגרת,שורת כותרת,לחיצה כפולה, focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick
+Keywords[hi]=फोकस,प्लेसमेंट,विंडो व्यवहार,एनिमेशन,ऊपर उठाएँ,स्वतः ऊपर उठाएँ,विंडोज़,फ्रेम,शीर्षक-पट्टी,डबल-क्लिक
+Keywords[hr]=focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick,fokus,smještaj,ponašanje prozora,animacija,pojava,podizanje,automatska pojava,prozori,okvir,naslovna traka,dvostruko klikanje
+Keywords[hu]=fókusz,elhelyezés,ablakelhelyezés,animáció,felemelés,automatikus felemelés,ablakok,keret,címsor,dupla kattintás
+Keywords[is]=virkni glugga,staðsetning,hegðun,högun glugga,hækka,hækka sjálfkrafa,gluggar,titilslá,titilrönd,tvísmella
+Keywords[it]=focus,piazzamento,comportamento finestre,animazione,alza,alza automaticamente,finestre,cornice,barra del titolo,doppio clic
+Keywords[ja]=フォーカス,配置,ウィンドウの挙動,アニメーション,前面へ,自動的に前面へ,ウィンドウ,フレーム,タイトルバー,ダブルクリック
+Keywords[km]=ផ្ដោត​អារម្មណ៍,ការ​ដាក់,ឥរិយាបថ​បង្អួច,ចលនា,លើកឡើង,លើក​ឡើង​ស្វ័យប្រវត្តិ,បង្អួច,ស៊ុម,របារ​ចំណងជើង,ចុច​ទ្វេដង
+Keywords[lt]=focus,placement,window behaviour,animation,raise,auto raise,windows,frame,titlebar,doubleclick,lango išdėstymas,elgesys,langai,rėmelis,lango antraštė
+Keywords[lv]=fokuss,novietojums,loga izturēšanās,animācija,celt,auto celt,logi,kadrs,virsraksta josla,dubultklikšķis
+Keywords[mk]=focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick,фокус,позиционирање,однесување на прозорците, анимација,подигање,авто подигање,прозорци,рамка,насловна лента,двоен клик
+Keywords[mt]=focus,placement,window behaviour,animation,raise,auto raise,windows,frame,titlebar,doubleclick
+Keywords[nb]=fokus,plassering,vindusoppførsel,animasjon,hev,autohev,vinduer,ramme,tittelliste,dobbeltklikk
+Keywords[nds]=Fokus,Platzeren,Finsterbedregen,Animatschoon,fokusseren,aktiveren,automaatsch fokusseren,Finster,Rahmen,Titelbalken,Dubbelklick
+Keywords[ne]=फोकस, स्थापना, सञ्झ्याल व्यवहार, एनिमेसन, बृद्धि, स्वत: बृद्धि, सञ्झ्याल, फ्रेम, शीर्षकपट्टी, डबल क्लिक
+Keywords[nl]=focusbeleid,vensterplaatsing,venstergedrag,focus,window,plaatsing,plaatsingbeleid,animatie,voorgrond,vensters,frame,kader,dubbelklikken
+Keywords[nn]=fokus,plassering,vindaugsplassering,vindaugsåtferd,animasjon,hev,automatisk heving,vindauge,ramme,tittellinje,dobbeltklikk
+Keywords[pa]=focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick,ਝਰੋਖਾ ਵਿਹਾਰ,ਸਜੀਵਤਾ,ਝਰੋਖੇ
+Keywords[pl]=uaktywnianie,układanie okien,zachowanie okien,animacja,automatyczne uaktywnienie,okno,okna,ramka,pasek tytułowy,podwójne kliknięcie
+Keywords[pt]=foco,posicionamento,comportamento das janelas,animação,elevar,auto-elevar,janelas,contorno,barra de título,duplo-carregar
+Keywords[pt_BR]=foco,posicionamento,comportamento das janelas,animação,elevar,auto-elevar,janelas, quadro,barra de título,clique duplo
+Keywords[ro]=focus,plasare,comportament fereastră,animație,ridicare,automat,ferestre,cadru,bară de titlu,dublu clic
+Keywords[rw]=igaragazarikeye, ugushyira mu mwanya,imyitwarire y'idirishya,ibyinisha,byizamura,amadirishya,ikadiri,umwanyabikoresho,gukandakabiri
+Keywords[se]=fohkus,sajádat,láseláhtten,animašuvdna,lokte,autolokte,láset,rámma,namahusholga,duppalcoahkkal
+Keywords[sk]=fokus,umiestnenie,správanie okien,animácia,zdvihnutie,automatické zdvihnutie,titulok,dvojité kliknutie,rámec,okná
+Keywords[sl]=fokus,postavitev,obnašanje okna,animacija,dvigni,okna,okvir,naslovna vrstica,dvojni klik
+Keywords[sr]=focus,placement,window behaviour,animation,raise,ауто raise,windows,frame,titlebar,doubleclick,фокус,понашање прозора,анимација,прозори,оквир,насловна линија,двоклик
+Keywords[sr@Latn]=focus,placement,window behaviour,animation,raise,auto raise,windows,frame,titlebar,doubleclick,fokus,ponašanje prozora,animacija,prozori,okvir,naslovna linija,dvoklik
+Keywords[sv]=fokus,placering,fönsterbeteende,animering,höj, autohöj,fönster,kant,namnlist,dubbelklick
+Keywords[ta]=பார்வை,இடம்,சாளரபண்பு,உயிர்சித்திரம்,மேலெழுப்பு, தானாக மேலெழுப்பு,சாளரங்கள்,சட்டம்,தலைப்புப்பட்டி,இரண்டு சொடுக்கு
+Keywords[th]=โฟกัส,การวางตำแหน่ง,พฤติกรรมของหน้าต่าง,อนิเมชั่น,ยกขึ้นไว้ด้านบน,ยกขึ้นไว้ด้านบนโดยอัตโนมัติ,หน้าต่าง,กรอบ,แถบหัวเรื่อง,ดับเบิลคลิก
+Keywords[tr]=odak,odak davranış biçimi,pencere yerleşimi,pencere davranışı,Yerleşim davranış biçimi,animasyon,kaldır,otomatik kaldır,çerçeve,çift tıkla
+Keywords[uk]=фокус,розташовування,поведінка вікна,анімація,підняти,піднімати автоматично,вікна,рамка,заголовок,подвійне клацання
+Keywords[uz]=fokuslash,joylashish,oynaning xususiyatlari,animatsiya,oldinga,avto-oldinga,oynalar,freym,sarlavha,ikki marta bosish
+Keywords[uz@cyrillic]=фокуслаш,жойлашиш,ойнанинг хусусиятлари,анимация,олдинга,авто-олдинга,ойналар,фрейм,сарлавҳа,икки марта босиш
+Keywords[vi]=chọn,dịch chuyển,ứng xử cửa sổ,hoạt hình,nâng lên,tự nâng lên,cửa sổ,khung,thanh tiêu đề,nhấn đúp
+Keywords[wa]=focus,plaece,dujhance des purneas,animåcion,rimonter,rimonte tot seu,purneas,cåde,bår di tite,clitchî deus côps,clitchî deus feyes
+Keywords[zh_CN]=focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick,焦点,放置,窗口行为,动画,升起,自动升起,窗口,框架,标题栏,双击
+Keywords[zh_TW]=focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick,焦點,放置,視窗行為,動畫,抬升,自動抬升,視窗,框架,標題列,雙擊
+Categories=Qt;KDE;X-KDE-settings-desktop;
diff --git a/kwin/kcmkwin/kwinoptions/kwintranslucency.desktop b/kwin/kcmkwin/kwinoptions/kwintranslucency.desktop
new file mode 100644
index 000000000..e45e5928a
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/kwintranslucency.desktop
@@ -0,0 +1,195 @@
+[Desktop Entry]
+Icon=kcmkwm
+Type=Application
+Exec=kcmshell kwintranslucency
+DocPath=kcontrol/windowmanagement/index.html#action-translucency
+
+X-KDE-ModuleType=Library
+X-KDE-Library=kwinoptions
+X-KDE-FactoryName=kwintranslucency
+
+Name=Translucency
+Name[af]=Deursigtigheid
+Name[ar]=الشفافية
+Name[be]=Празрыстасць
+Name[bg]=Полупрозрачност
+Name[bn]=সমস্বচ্ছতা
+Name[br]=Treuzwel
+Name[bs]=Prozirnost
+Name[ca]=Translucidesa
+Name[cs]=Průhlednost
+Name[csb]=Przezérnota
+Name[da]=Gennemsigtighed
+Name[de]=Transparenz
+Name[el]=Hμιδιαφάνεια
+Name[eo]=Travidebleco
+Name[es]=Translúcido
+Name[et]=Läbipaistvus
+Name[eu]=Gardentasuna
+Name[fa]=نیمۀ شفافی
+Name[fi]=Läpikuultavuus
+Name[fr]=Transparence
+Name[fy]=Trochsichtichheid
+Name[ga]=Tréshoilseacht
+Name[gl]=Translucidez
+Name[he]=שקיפות
+Name[hr]=Prozirnost
+Name[hu]=Áttetszőség
+Name[id]=Tembus Pandang
+Name[is]=Gegnsæi
+Name[it]=Trasparenza
+Name[ja]=透過性
+Name[ka]=ნახევრადგამჭირვალეობა
+Name[kk]=Мөлдірлігі
+Name[km]=ភាព​ថ្លា
+Name[ko]=반투명
+Name[lt]=Permatomumas
+Name[mk]=Провидност
+Name[nb]=Gjennomsiktighet
+Name[nds]=Dörschienen
+Name[ne]=स्वच्छता
+Name[nl]=Transparantie
+Name[nn]=Gjennomsiktig
+Name[pa]=ਪਾਰਦਰਸ਼ੀ
+Name[pl]=Przezroczystość
+Name[pt]=Transparência
+Name[pt_BR]=Translúcido
+Name[ro]=Translucență
+Name[ru]=Полупрозрачность
+Name[rw]=Ukujyakwijima
+Name[se]=Čađačuovgi
+Name[sk]=Priesvitnosť
+Name[sl]=Prosojnost
+Name[sr]=Прозирност
+Name[sr@Latn]=Prozirnost
+Name[sv]=Genomskinlighet
+Name[ta]=ஒளிகசிவு
+Name[th]=ความโปร่งแสง
+Name[tr]=Şeffaflık
+Name[tt]=Ütäkürenü
+Name[uk]=Прозорість
+Name[uz]=Shaffoflik
+Name[uz@cyrillic]=Шаффофлик
+Name[vi]=Đục & Trong
+Name[wa]=Translucidaedje
+Name[zh_CN]=透明度
+Name[zh_TW]=透明度
+
+Comment=Configure window translucency and shadow management
+Comment[af]=Stel die venster deursigtigheid en skaduwee op
+Comment[ar]=إعداد تدبيرات شفافية و تظليل النافذة
+Comment[be]=Настаўленні празрыстасці вокнаў і кіраванне ценем
+Comment[bg]=Настройване на полупрозрачността и сенките на прозорците
+Comment[bn]=উইণ্ডোর সমস্বচ্ছতা এবং ছায়া কনফিগার করুন
+Comment[bs]=Podesite prozirnost prozora i podesite sjenke
+Comment[ca]=Configura la translucidesa de finestres i gestiona l'ombra
+Comment[cs]=Nastavení průhlednosti a stínování oken
+Comment[csb]=Kònfigùracëjô przezérnotë ë ceniów òknów
+Comment[da]=Indstil vinduets gennemsigtighed og skyggehåndtering
+Comment[de]=Einrichtung der Fenstertransparenz und Schatten
+Comment[el]=Ρύθμιση ημιδιαφάνειας παραθύρου και διαχείρισης σκίασης
+Comment[eo]=Agordu administradon de fenestro-travidebleco kaj ombreco.
+Comment[es]=Configurar la opacidad de la ventana y gestión de sombra
+Comment[et]=Akende läbipaistvuse ja varjude seadistamine
+Comment[eu]=Konfiguratu leiho gardentasunak eta itzalen kudeaketa
+Comment[fa]=پیکربندی مدیریت نیمۀ شفافی و سایۀ پنجره
+Comment[fi]=Muokkaa ikkunoinnin läpikuultavuus ja varjostus
+Comment[fr]=Configuration de la transparence et de l'ombre des fenêtres
+Comment[fy]=Finstertrochsichtichheid- en -skaadbehear ynstelle
+Comment[ga]=Cumraigh tréshoilseacht na fuinneoige agus bainisteoireacht scátha
+Comment[gl]=Configurar a xestión de sombras e translucidez das fiestras
+Comment[he]=תצורה של שקיפות החלונות וניהול ההצללות
+Comment[hr]=Konfiguriranje prozirnosti prozora i upravljanje sjenčanjem
+Comment[hu]=Az ablakkezelés áttetszőségi és árnyékolási beállításai
+Comment[is]=Stilla gegnsæi glugga og sýsla með skugga
+Comment[it]=Configura la trasparenza e le ombre delle finestre
+Comment[ja]=ウィンドウの透過性と影の設定
+Comment[ka]=ფანჯრების გამჭირვალობის და ჩრდილების კონფიგურაცია
+Comment[kk]=Терезенің мөлдірлігін және көлеңкесін баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​ការ​គ្រប់គ្រង​ភាព​ថ្លា និង​ស្រមោល​របស់​បង្អួច
+Comment[lt]=Konfigūruoti langų permatomumą ir šešėlius
+Comment[mk]=Конфигурирајте ги провидноста на прозорците и менаџментот на сенки
+Comment[nb]=Tilpass behandling av vindusgjennomsiktighet og -skygge
+Comment[nds]=Finsterdörschienen un -Schadden instellen
+Comment[ne]=सञ्झ्याल स्वच्छता र छायाँ व्यवस्थापन कन्फिगर गर्नुहोस्
+Comment[nl]=Venstertransparantie- en -schaduwbeheer instellen
+Comment[nn]=Oppsett av gjennomsiktige vindauge og vindaugsskugge
+Comment[pa]=ਝਰੋਖਾ ਪਾਰਦਰਸਤਾ ਅਤੇ ਛਾਂ ਪਰਬੰਧਨ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja przezroczystości i cieni okien
+Comment[pt]=Configuração da transparência e sombras de janelas
+Comment[pt_BR]=Configura o gerenciamento de sombra e transparência da janela
+Comment[ro]=Configurează translucența și umbra ferestrelor
+Comment[ru]=Настройка полупрозрачности и теней окна
+Comment[rw]=Kuboneza ubuyobozi bw'ukujyakubonerana n'igicucu by'idirishya
+Comment[se]=Heivet lášečađačuovgivuođa ja suoivvanasgieđaheami
+Comment[sk]=Nastavenie priesvitnosti okien a správcu tieňovania
+Comment[sl]=Nastavitve prosojnosti oken in upravljanje s sencami
+Comment[sr]=Подешавање прозирности прозора и управљање сенкама
+Comment[sr@Latn]=Podešavanje prozirnosti prozora i upravljanje senkama
+Comment[sv]=Anpassa fönstergenomskinlighet och skugghantering
+Comment[ta]=சாளர ஒளிகசிவு மற்றும் நிழல் மேலாண்மையை வடிவமை
+Comment[th]=ปรับแต่งคุณสมบัติความโปร่งแสงและเงาของหน้าต่าง
+Comment[tr]=Pencere şeffaflığını ve gölge yönetimini yapılandır
+Comment[tt]=Täräzä ütäkürenüe belän külägäsen caylaw
+Comment[uk]=Налаштування прозорості вікон та керування затіненням
+Comment[uz]=Oynaning shaffofligini va soyasini moslash
+Comment[uz@cyrillic]=Ойнанинг шаффофлигини ва соясини мослаш
+Comment[vi]=Cấu hình độ đục và trong cùng với bóng râm của cửa sổ
+Comment[wa]=Apontiaedje des fonccionålités translucides et d' ombe do manaedjaedje des purneas
+Comment[zh_CN]=配置窗口透明度和阴影管理
+Comment[zh_TW]=設定視窗透明度與陰影管理功能
+
+Keywords=translucency,transparence,shadows
+Keywords[ar]=الشفافية,شفاف,أظلال
+Keywords[be]=Празрыстасць,Цені,translucency,transparence,shadows
+Keywords[bg]=полупрозрачност, прозрачност, сянка, сенки, translucency, transparence, shadows
+Keywords[bs]=translucency,transparence,shadows,providnost,sjene,sjenke,sjenka
+Keywords[ca]=translucidesa,transparència,ombres
+Keywords[cs]=průhlednost,průsvitnost,stín
+Keywords[csb]=przezérnota,półprzezérnota,przeswiécëna,ceniô,cenie
+Keywords[da]=gennemsigtighed,transparens,skygge
+Keywords[el]=ημιδιαφάνεια,διαφάνεια,σκιές
+Keywords[eo]=Travidebleco, ombroj
+Keywords[es]=translucido,transparente,sombras,opacidad
+Keywords[et]=läbipaistvus,läbipaistev,vari
+Keywords[eu]=gardena,gardentasunak,itzalak
+Keywords[fa]=نیمۀ شفافی، شفافیت، سایه‌ها
+Keywords[fi]=läpikuultavuus, läpinäkyvyys, varjot
+Keywords[fr]=translucidité,translucide,transparence,transparent,ombre
+Keywords[fy]=translucency,trochsichtich,ransparantie,schaduwen,skaden
+Keywords[ga]=tréshoilseacht,gléine,scáthanna
+Keywords[gl]=translucéncia,transparéncia,sombras
+Keywords[he]=translucency,transparence,shadows,הצללה,צל,צללים,שקוף,שקיפות
+Keywords[hr]=translucency,transparence,shadows,prozirnost,sjene,providnost
+Keywords[hu]=áttetszőség,áttetsző,árnyékok
+Keywords[id]=tembus pandang,transparan, bayangan
+Keywords[it]=trasparenza,ombre
+Keywords[ja]=透過性,透明,影
+Keywords[km]=ភាព​ថ្លា,ថ្លា,ស្រមោល
+Keywords[lt]=translucency,transparence,shadows,permatomumas,šešėliai
+Keywords[mk]=translucency,transparence,shadows,провидност,проѕирност,сенки
+Keywords[nb]=gjennomsiktighet,skygge
+Keywords[nds]=Transparenz,Schadden,Dörschienen
+Keywords[ne]=स्वच्छता,पारदर्शीता,छायाँ
+Keywords[nl]=translucency,transparantie,schaduwen
+Keywords[nn]=gjennomsiktig,skugge
+Keywords[pa]=translucency,transparence,ਛਾਂ
+Keywords[pl]=przezroczystość,półprzezroczystość,prześwitywanie,cień,cienie
+Keywords[pt]=transparência,sombras
+Keywords[pt_BR]=translúcido,transparência,sombras
+Keywords[ro]=translucență,transparență,umbre
+Keywords[rw]=ukujyakwijima,ukubonerana,ibicucu
+Keywords[sl]=prosojnost,prozornost,sence
+Keywords[sr]=translucency,transparence,shadows,провидност,сенке
+Keywords[sr@Latn]=translucency,transparence,shadows,providnost,senke
+Keywords[sv]=genomskinlighet,skuggor
+Keywords[ta]=ஒளிகசிவு,ஊடகத்தன்மை,நிழல்கள்
+Keywords[th]=ความโปร่งแสง,ความโปร่งใส,เงา
+Keywords[tr]=şeffaflık,şeffaf,gölge,opak,opasite
+Keywords[uk]=translucency,transparence,shadows,прозорість,напівпрозорість,тіні
+Keywords[uz]=shaffof,soya
+Keywords[uz@cyrillic]=шаффоф,соя
+Keywords[vi]=mờ đục,trong suốt,bóng râm
+Keywords[wa]=translucency,transparince,translucide,translucidaedje
+Keywords[zh_CN]=透明度,阴影,translucency,transparence,shadows
+Keywords[zh_TW]=translucency,transparence,shadows,透明,陰影
diff --git a/kwin/kcmkwin/kwinoptions/main.cpp b/kwin/kcmkwin/kwinoptions/main.cpp
new file mode 100644
index 000000000..fbc70e4c8
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/main.cpp
@@ -0,0 +1,262 @@
+/*
+ *
+ * Copyright (c) 2001 Waldo Bastian <bastian@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <qlayout.h>
+
+#include <dcopclient.h>
+
+#include <kapplication.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kconfig.h>
+#include <kgenericfactory.h>
+#include <kaboutdata.h>
+#include <kdialog.h>
+
+#include "mouse.h"
+#include "windows.h"
+
+#include "main.h"
+
+extern "C"
+{
+ KDE_EXPORT KCModule *create_kwinfocus(QWidget *parent, const char *name)
+ {
+ //CT there's need for decision: kwm or kwin?
+ KGlobal::locale()->insertCatalogue("kcmkwm");
+ KConfig *c = new KConfig("kwinrc", false, true);
+ return new KFocusConfig(true, c, parent, name);
+ }
+
+ KDE_EXPORT KCModule *create_kwinactions(QWidget *parent, const char *name)
+ {
+ //CT there's need for decision: kwm or kwin?
+ KGlobal::locale()->insertCatalogue("kcmkwm");
+ return new KActionsOptions( parent, name);
+ }
+
+ KDE_EXPORT KCModule *create_kwinmoving(QWidget *parent, const char *name)
+ {
+ //CT there's need for decision: kwm or kwin?
+ KGlobal::locale()->insertCatalogue("kcmkwm");
+ KConfig *c = new KConfig("kwinrc", false, true);
+ return new KMovingConfig(true, c, parent, name);
+ }
+
+ KDE_EXPORT KCModule *create_kwinadvanced(QWidget *parent, const char *name)
+ {
+ //CT there's need for decision: kwm or kwin?
+ KGlobal::locale()->insertCatalogue("kcmkwm");
+ KConfig *c = new KConfig("kwinrc", false, true);
+ return new KAdvancedConfig(true, c, parent, name);
+ }
+
+ KDE_EXPORT KCModule *create_kwintranslucency(QWidget *parent, const char *name)
+ {
+ //CT there's need for decision: kwm or kwin?
+ KGlobal::locale()->insertCatalogue("kcmkwm");
+ KConfig *c = new KConfig("kwinrc", false, true);
+ return new KTranslucencyConfig(true, c, parent, name);
+ }
+
+ KDE_EXPORT KCModule *create_kwinoptions ( QWidget *parent, const char* name)
+ {
+ //CT there's need for decision: kwm or kwin?
+ KGlobal::locale()->insertCatalogue("kcmkwm");
+ return new KWinOptions( parent, name);
+ }
+}
+
+KWinOptions::KWinOptions(QWidget *parent, const char *name)
+ : KCModule(parent, name)
+{
+ mConfig = new KConfig("kwinrc", false, true);
+
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ tab = new QTabWidget(this);
+ layout->addWidget(tab);
+
+ mFocus = new KFocusConfig(false, mConfig, this, "KWin Focus Config");
+ mFocus->layout()->setMargin( KDialog::marginHint() );
+ tab->addTab(mFocus, i18n("&Focus"));
+ connect(mFocus, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+
+ mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "KWin TitleBar Actions");
+ mTitleBarActions->layout()->setMargin( KDialog::marginHint() );
+ tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
+ connect(mTitleBarActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+
+ mWindowActions = new KWindowActionsConfig(false, mConfig, this, "KWin Window Actions");
+ mWindowActions->layout()->setMargin( KDialog::marginHint() );
+ tab->addTab(mWindowActions, i18n("Window Actio&ns"));
+ connect(mWindowActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+
+ mMoving = new KMovingConfig(false, mConfig, this, "KWin Moving");
+ mMoving->layout()->setMargin( KDialog::marginHint() );
+ tab->addTab(mMoving, i18n("&Moving"));
+ connect(mMoving, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+
+ mAdvanced = new KAdvancedConfig(false, mConfig, this, "KWin Advanced");
+ mAdvanced->layout()->setMargin( KDialog::marginHint() );
+ tab->addTab(mAdvanced, i18n("Ad&vanced"));
+ connect(mAdvanced, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+
+ mTranslucency = new KTranslucencyConfig(false, mConfig, this, "KWin Translucency");
+ mTranslucency->layout()->setMargin( KDialog::marginHint() );
+ tab->addTab(mTranslucency, i18n("&Translucency"));
+ connect(mTranslucency, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+
+ KAboutData *about =
+ new KAboutData(I18N_NOOP("kcmkwinoptions"), I18N_NOOP("Window Behavior Configuration Module"),
+ 0, 0, KAboutData::License_GPL,
+ I18N_NOOP("(c) 1997 - 2002 KWin and KControl Authors"));
+
+ about->addAuthor("Matthias Ettrich",0,"ettrich@kde.org");
+ about->addAuthor("Waldo Bastian",0,"bastian@kde.org");
+ about->addAuthor("Cristian Tibirna",0,"tibirna@kde.org");
+ about->addAuthor("Matthias Kalle Dalheimer",0,"kalle@kde.org");
+ about->addAuthor("Daniel Molkentin",0,"molkentin@kde.org");
+ about->addAuthor("Wynn Wilkes",0,"wynnw@caldera.com");
+ about->addAuthor("Pat Dowler",0,"dowler@pt1B1106.FSH.UVic.CA");
+ about->addAuthor("Bernd Wuebben",0,"wuebben@kde.org");
+ about->addAuthor("Matthias Hoelzer-Kluepfel",0,"hoelzer@kde.org");
+ setAboutData(about);
+}
+
+KWinOptions::~KWinOptions()
+{
+ delete mConfig;
+}
+
+void KWinOptions::load()
+{
+ mConfig->reparseConfiguration();
+ mFocus->load();
+ mTitleBarActions->load();
+ mWindowActions->load();
+ mMoving->load();
+ mAdvanced->load();
+ mTranslucency->load();
+ emit KCModule::changed( false );
+}
+
+
+void KWinOptions::save()
+{
+ mFocus->save();
+ mTitleBarActions->save();
+ mWindowActions->save();
+ mMoving->save();
+ mAdvanced->save();
+ mTranslucency->save();
+
+ emit KCModule::changed( false );
+ // Send signal to kwin
+ mConfig->sync();
+ if ( !kapp->dcopClient()->isAttached() )
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("kwin*", "", "reconfigure()", "");
+}
+
+
+void KWinOptions::defaults()
+{
+ mFocus->defaults();
+ mTitleBarActions->defaults();
+ mWindowActions->defaults();
+ mMoving->defaults();
+ mAdvanced->defaults();
+ mTranslucency->defaults();
+}
+
+QString KWinOptions::quickHelp() const
+{
+ return i18n("<h1>Window Behavior</h1> Here you can customize the way windows behave when being"
+ " moved, resized or clicked on. You can also specify a focus policy as well as a placement"
+ " policy for new windows."
+ " <p>Please note that this configuration will not take effect if you do not use"
+ " KWin as your window manager. If you do use a different window manager, please refer to its documentation"
+ " for how to customize window behavior.");
+}
+
+void KWinOptions::moduleChanged(bool state)
+{
+ emit KCModule::changed(state);
+}
+
+
+KActionsOptions::KActionsOptions(QWidget *parent, const char *name)
+ : KCModule(parent, name)
+{
+ mConfig = new KConfig("kwinrc", false, true);
+
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ tab = new QTabWidget(this);
+ layout->addWidget(tab);
+
+ mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "KWin TitleBar Actions");
+ mTitleBarActions->layout()->setMargin( KDialog::marginHint() );
+ tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
+ connect(mTitleBarActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+
+ mWindowActions = new KWindowActionsConfig(false, mConfig, this, "KWin Window Actions");
+ mWindowActions->layout()->setMargin( KDialog::marginHint() );
+ tab->addTab(mWindowActions, i18n("Window Actio&ns"));
+ connect(mWindowActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+}
+
+KActionsOptions::~KActionsOptions()
+{
+ delete mConfig;
+}
+
+void KActionsOptions::load()
+{
+ mTitleBarActions->load();
+ mWindowActions->load();
+ emit KCModule::changed( false );
+}
+
+
+void KActionsOptions::save()
+{
+ mTitleBarActions->save();
+ mWindowActions->save();
+
+ emit KCModule::changed( false );
+ // Send signal to kwin
+ mConfig->sync();
+ if ( !kapp->dcopClient()->isAttached() )
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("kwin*", "", "reconfigure()", "");
+}
+
+
+void KActionsOptions::defaults()
+{
+ mTitleBarActions->defaults();
+ mWindowActions->defaults();
+}
+
+void KActionsOptions::moduleChanged(bool state)
+{
+ emit KCModule::changed(state);
+}
+
+#include "main.moc"
diff --git a/kwin/kcmkwin/kwinoptions/main.h b/kwin/kcmkwin/kwinoptions/main.h
new file mode 100644
index 000000000..e8591c13f
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/main.h
@@ -0,0 +1,100 @@
+/*
+ * main.h
+ *
+ * Copyright (c) 2001 Waldo Bastian <bastian@kde.org>
+ *
+ * Requires the Qt widget libraries, available at no cost at
+ * http://www.troll.no/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef __MAIN_H__
+#define __MAIN_H__
+
+#include <qtabwidget.h>
+#include <kcmodule.h>
+
+class KConfig;
+class KFocusConfig;
+class KTitleBarActionsConfig;
+class KWindowActionsConfig;
+class KAdvancedConfig;
+class KTranslucencyConfig;
+
+class KWinOptions : public KCModule
+{
+ Q_OBJECT
+
+public:
+
+ KWinOptions(QWidget *parent, const char *name);
+ virtual ~KWinOptions();
+
+ void load();
+ void save();
+ void defaults();
+ QString quickHelp() const;
+
+
+protected slots:
+
+ void moduleChanged(bool state);
+
+
+private:
+
+ QTabWidget *tab;
+
+ KFocusConfig *mFocus;
+ KTitleBarActionsConfig *mTitleBarActions;
+ KWindowActionsConfig *mWindowActions;
+ KMovingConfig *mMoving;
+ KAdvancedConfig *mAdvanced;
+ KTranslucencyConfig *mTranslucency;
+
+ KConfig *mConfig;
+};
+
+class KActionsOptions : public KCModule
+{
+ Q_OBJECT
+
+public:
+
+ KActionsOptions(QWidget *parent, const char *name);
+ virtual ~KActionsOptions();
+
+ void load();
+ void save();
+ void defaults();
+
+protected slots:
+
+ void moduleChanged(bool state);
+
+
+private:
+
+ QTabWidget *tab;
+
+ KTitleBarActionsConfig *mTitleBarActions;
+ KWindowActionsConfig *mWindowActions;
+
+ KConfig *mConfig;
+};
+
+#endif
diff --git a/kwin/kcmkwin/kwinoptions/mouse.cpp b/kwin/kcmkwin/kwinoptions/mouse.cpp
new file mode 100644
index 000000000..f220bbfa9
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/mouse.cpp
@@ -0,0 +1,856 @@
+/*
+ *
+ * Copyright (c) 1998 Matthias Ettrich <ettrich@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <qwhatsthis.h>
+#include <qlayout.h>
+#include <qvgroupbox.h>
+#include <qgrid.h>
+#include <qsizepolicy.h>
+#include <qbitmap.h>
+#include <qhgroupbox.h>
+#include <qtooltip.h>
+
+#include <dcopclient.h>
+#include <klocale.h>
+#include <kapplication.h>
+#include <kconfig.h>
+#include <kdialog.h>
+#include <kglobalsettings.h>
+#include <kseparator.h>
+
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+#include <stdlib.h>
+
+#include "mouse.h"
+#include "mouse.moc"
+
+
+namespace {
+
+char const * const cnf_Max[] = {
+ "MaximizeButtonLeftClickCommand",
+ "MaximizeButtonMiddleClickCommand",
+ "MaximizeButtonRightClickCommand",
+};
+
+char const * const tbl_Max[] = {
+ "Maximize",
+ "Maximize (vertical only)",
+ "Maximize (horizontal only)",
+ "" };
+
+QPixmap maxButtonPixmaps[3];
+
+void createMaxButtonPixmaps()
+{
+ char const * maxButtonXpms[][3 + 13] = {
+ {0, 0, 0,
+ "...............",
+ ".......#.......",
+ "......###......",
+ ".....#####.....",
+ "..#....#....#..",
+ ".##....#....##.",
+ "###############",
+ ".##....#....##.",
+ "..#....#....#..",
+ ".....#####.....",
+ "......###......",
+ ".......#.......",
+ "..............."},
+ {0, 0, 0,
+ "...............",
+ ".......#.......",
+ "......###......",
+ ".....#####.....",
+ ".......#.......",
+ ".......#.......",
+ ".......#.......",
+ ".......#.......",
+ ".......#.......",
+ ".....#####.....",
+ "......###......",
+ ".......#.......",
+ "..............."},
+ {0, 0, 0,
+ "...............",
+ "...............",
+ "...............",
+ "...............",
+ "..#.........#..",
+ ".##.........##.",
+ "###############",
+ ".##.........##.",
+ "..#.........#..",
+ "...............",
+ "...............",
+ "...............",
+ "..............."},
+ };
+
+ QString baseColor(". c " + KGlobalSettings::baseColor().name());
+ QString textColor("# c " + KGlobalSettings::textColor().name());
+ for (int t = 0; t < 3; ++t)
+ {
+ maxButtonXpms[t][0] = "15 13 2 1";
+ maxButtonXpms[t][1] = baseColor.ascii();
+ maxButtonXpms[t][2] = textColor.ascii();
+ maxButtonPixmaps[t] = QPixmap(maxButtonXpms[t]);
+ maxButtonPixmaps[t].setMask(maxButtonPixmaps[t].createHeuristicMask());
+ }
+}
+
+} // namespace
+
+void KTitleBarActionsConfig::paletteChanged()
+{
+ createMaxButtonPixmaps();
+ for (int b = 0; b < 3; ++b)
+ for (int t = 0; t < 3; ++t)
+ coMax[b]->changeItem(maxButtonPixmaps[t], t);
+
+}
+
+KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_config, QWidget * parent, const char *)
+ : KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
+{
+ QString strWin1, strWin2, strWin3, strAllKey, strAll1, strAll2, strAll3;
+ QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QGrid *grid;
+ QGroupBox *box;
+ QLabel *label;
+ QString strMouseButton1, strMouseButton3, strMouseWheel;
+ QString txtButton1, txtButton3, txtButton4;
+ QStringList items;
+ bool leftHandedMouse = ( KGlobalSettings::mouseSettings().handed == KGlobalSettings::KMouseSettings::LeftHanded);
+
+/** Titlebar doubleclick ************/
+
+ QHBoxLayout *hlayout = new QHBoxLayout(layout);
+
+ label = new QLabel(i18n("&Titlebar double-click:"), this);
+ hlayout->addWidget(label);
+ QWhatsThis::add( label, i18n("Here you can customize mouse click behavior when double clicking on the"
+ " titlebar of a window.") );
+
+ QComboBox* combo = new QComboBox(this);
+ combo->insertItem(i18n("Maximize"));
+ combo->insertItem(i18n("Maximize (vertical only)"));
+ combo->insertItem(i18n("Maximize (horizontal only)"));
+ combo->insertItem(i18n("Minimize"));
+ combo->insertItem(i18n("Shade"));
+ combo->insertItem(i18n("Lower"));
+ combo->insertItem(i18n("On All Desktops"));
+ combo->insertItem(i18n("Nothing"));
+ combo->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ hlayout->addWidget(combo);
+ coTiDbl = combo;
+ QWhatsThis::add(combo, i18n("Behavior on <em>double</em> click into the titlebar."));
+
+ label->setBuddy(combo);
+
+/** Mouse Wheel Events **************/
+ QHBoxLayout *hlayoutW = new QHBoxLayout(layout);
+ strMouseWheel = i18n("Titlebar wheel event:");
+ label = new QLabel(strMouseWheel, this);
+ hlayoutW->addWidget(label);
+ txtButton4 = i18n("Handle mouse wheel events");
+ QWhatsThis::add( label, txtButton4);
+
+ // Titlebar and frame mouse Wheel
+ QComboBox* comboW = new QComboBox(this);
+ comboW->insertItem(i18n("Raise/Lower"));
+ comboW->insertItem(i18n("Shade/Unshade"));
+ comboW->insertItem(i18n("Maximize/Restore"));
+ comboW->insertItem(i18n("Keep Above/Below"));
+ comboW->insertItem(i18n("Move to Previous/Next Desktop"));
+ comboW->insertItem(i18n("Change Opacity"));
+ comboW->insertItem(i18n("Nothing"));
+ comboW->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
+ connect(comboW, SIGNAL(activated(int)), SLOT(changed()));
+ hlayoutW->addWidget(comboW);
+ coTiAct4 = comboW;
+ QWhatsThis::add(comboW, txtButton4);
+ label->setBuddy(comboW);
+
+/** Titlebar and frame **************/
+
+ box = new QVGroupBox( i18n("Titlebar && Frame"), this, "Titlebar and Frame");
+ box->layout()->setMargin(KDialog::marginHint());
+ box->layout()->setSpacing(KDialog::spacingHint());
+ layout->addWidget(box);
+ QWhatsThis::add( box, i18n("Here you can customize mouse click behavior when clicking on the"
+ " titlebar or the frame of a window.") );
+
+ grid = new QGrid(4, Qt::Vertical, box);
+
+
+ new QLabel(grid); // dummy
+
+ strMouseButton1 = i18n("Left button:");
+ txtButton1 = i18n("In this row you can customize left click behavior when clicking into"
+ " the titlebar or the frame.");
+
+ strMouseButton3 = i18n("Right button:");
+ txtButton3 = i18n("In this row you can customize right click behavior when clicking into"
+ " the titlebar or the frame." );
+
+ if ( leftHandedMouse )
+ {
+ qSwap(strMouseButton1, strMouseButton3);
+ qSwap(txtButton1, txtButton3);
+ }
+
+ label = new QLabel(strMouseButton1, grid);
+ QWhatsThis::add( label, txtButton1);
+
+ label = new QLabel(i18n("Middle button:"), grid);
+ QWhatsThis::add( label, i18n("In this row you can customize middle click behavior when clicking into"
+ " the titlebar or the frame.") );
+
+ label = new QLabel(strMouseButton3, grid);
+ QWhatsThis::add( label, txtButton3);
+
+
+ label = new QLabel(i18n("Active"), grid);
+ label->setAlignment(AlignCenter);
+ QWhatsThis::add( label, i18n("In this column you can customize mouse clicks into the titlebar"
+ " or the frame of an active window.") );
+
+ // Titlebar and frame, active, mouse button 1
+ combo = new QComboBox(grid);
+ combo->insertItem(i18n("Raise"));
+ combo->insertItem(i18n("Lower"));
+ combo->insertItem(i18n("Operations Menu"));
+ combo->insertItem(i18n("Toggle Raise & Lower"));
+ combo->insertItem(i18n("Nothing"));
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coTiAct1 = combo;
+
+ txtButton1 = i18n("Behavior on <em>left</em> click into the titlebar or frame of an "
+ "<em>active</em> window.");
+
+ txtButton3 = i18n("Behavior on <em>right</em> click into the titlebar or frame of an "
+ "<em>active</em> window.");
+
+ // Be nice to left handed users
+ if ( leftHandedMouse ) qSwap(txtButton1, txtButton3);
+
+ QWhatsThis::add(combo, txtButton1);
+
+ // Titlebar and frame, active, mouse button 2
+
+ items << i18n("Raise")
+ << i18n("Lower")
+ << i18n("Operations Menu")
+ << i18n("Toggle Raise & Lower")
+ << i18n("Nothing")
+ << i18n("Shade");
+
+ combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coTiAct2 = combo;
+ QWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>active</em> window."));
+
+ // Titlebar and frame, active, mouse button 3
+ combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coTiAct3 = combo;
+ QWhatsThis::add(combo, txtButton3 );
+
+ txtButton1 = i18n("Behavior on <em>left</em> click into the titlebar or frame of an "
+ "<em>inactive</em> window.");
+
+ txtButton3 = i18n("Behavior on <em>right</em> click into the titlebar or frame of an "
+ "<em>inactive</em> window.");
+
+ // Be nice to left handed users
+ if ( leftHandedMouse ) qSwap(txtButton1, txtButton3);
+
+ label = new QLabel(i18n("Inactive"), grid);
+ label->setAlignment(AlignCenter);
+ QWhatsThis::add( label, i18n("In this column you can customize mouse clicks into the titlebar"
+ " or the frame of an inactive window.") );
+
+ items.clear();
+ items << i18n("Activate & Raise")
+ << i18n("Activate & Lower")
+ << i18n("Activate")
+ << i18n("Shade")
+ << i18n("Operations Menu")
+ << i18n("Raise")
+ << i18n("Lower")
+ << i18n("Nothing");
+
+ combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coTiInAct1 = combo;
+ QWhatsThis::add(combo, txtButton1);
+
+ combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coTiInAct2 = combo;
+ QWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>inactive</em> window."));
+
+ combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coTiInAct3 = combo;
+ QWhatsThis::add(combo, txtButton3);
+
+/** Maximize Button ******************/
+
+ box = new QHGroupBox(i18n("Maximize Button"), this, "Maximize Button");
+ box->layout()->setMargin(KDialog::marginHint());
+ box->layout()->setSpacing(KDialog::spacingHint());
+ layout->addWidget(box);
+ QWhatsThis::add( box,
+ i18n("Here you can customize behavior when clicking on the maximize button.") );
+
+ QString strMouseButton[] = {
+ i18n("Left button:"),
+ i18n("Middle button:"),
+ i18n("Right button:")};
+
+ QString txtButton[] = {
+ i18n("Behavior on <em>left</em> click onto the maximize button." ),
+ i18n("Behavior on <em>middle</em> click onto the maximize button." ),
+ i18n("Behavior on <em>right</em> click onto the maximize button." )};
+
+ if ( leftHandedMouse ) // Be nice to lefties
+ {
+ qSwap(strMouseButton[0], strMouseButton[2]);
+ qSwap(txtButton[0], txtButton[2]);
+ }
+
+ createMaxButtonPixmaps();
+ for (int b = 0; b < 3; ++b)
+ {
+ if (b != 0) new QWidget(box); // Spacer
+
+ QLabel * label = new QLabel(strMouseButton[b], box);
+ QWhatsThis::add( label, txtButton[b] );
+ label ->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ));
+
+ coMax[b] = new ToolTipComboBox(box, tbl_Max);
+ for (int t = 0; t < 3; ++t) coMax[b]->insertItem(maxButtonPixmaps[t]);
+ connect(coMax[b], SIGNAL(activated(int)), SLOT(changed()));
+ connect(coMax[b], SIGNAL(activated(int)), coMax[b], SLOT(changed()));
+ QWhatsThis::add( coMax[b], txtButton[b] );
+ coMax[b]->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ));
+ }
+
+ connect(kapp, SIGNAL(kdisplayPaletteChanged()), SLOT(paletteChanged()));
+
+ layout->addStretch();
+
+ load();
+}
+
+KTitleBarActionsConfig::~KTitleBarActionsConfig()
+{
+ if (standAlone)
+ delete config;
+}
+
+// do NOT change the texts below, they are written to config file
+// and are not shown in the GUI
+// they have to match the order of items in GUI elements though
+const char* const tbl_TiDbl[] = {
+ "Maximize",
+ "Maximize (vertical only)",
+ "Maximize (horizontal only)",
+ "Minimize",
+ "Shade",
+ "Lower",
+ "OnAllDesktops",
+ "Nothing",
+ "" };
+
+const char* const tbl_TiAc[] = {
+ "Raise",
+ "Lower",
+ "Operations menu",
+ "Toggle raise and lower",
+ "Nothing",
+ "Shade",
+ "" };
+
+const char* const tbl_TiInAc[] = {
+ "Activate and raise",
+ "Activate and lower",
+ "Activate",
+ "Shade",
+ "Operations menu",
+ "Raise",
+ "Lower",
+ "Nothing",
+ "" };
+
+const char* const tbl_Win[] = {
+ "Activate, raise and pass click",
+ "Activate and pass click",
+ "Activate",
+ "Activate and raise",
+ "" };
+
+const char* const tbl_AllKey[] = {
+ "Meta",
+ "Alt",
+ "" };
+
+const char* const tbl_All[] = {
+ "Move",
+ "Activate, raise and move",
+ "Toggle raise and lower",
+ "Resize",
+ "Raise",
+ "Lower",
+ "Minimize",
+ "Nothing",
+ "" };
+
+const char* tbl_TiWAc[] = {
+ "Raise/Lower",
+ "Shade/Unshade",
+ "Maximize/Restore",
+ "Above/Below",
+ "Previous/Next Desktop",
+ "Change Opacity",
+ "Nothing",
+ "" };
+
+const char* tbl_AllW[] = {
+ "Raise/Lower",
+ "Shade/Unshade",
+ "Maximize/Restore",
+ "Above/Below",
+ "Previous/Next Desktop",
+ "Change Opacity",
+ "Nothing",
+ "" };
+
+static const char* tbl_num_lookup( const char* const arr[], int pos )
+{
+ for( int i = 0;
+ arr[ i ][ 0 ] != '\0' && pos >= 0;
+ ++i )
+ {
+ if( pos == 0 )
+ return arr[ i ];
+ --pos;
+ }
+ abort(); // should never happen this way
+}
+
+static int tbl_txt_lookup( const char* const arr[], const char* txt )
+{
+ int pos = 0;
+ for( int i = 0;
+ arr[ i ][ 0 ] != '\0';
+ ++i )
+ {
+ if( qstricmp( txt, arr[ i ] ) == 0 )
+ return pos;
+ ++pos;
+ }
+ return 0;
+}
+
+void KTitleBarActionsConfig::setComboText( QComboBox* combo, const char*txt )
+{
+ if( combo == coTiDbl )
+ combo->setCurrentItem( tbl_txt_lookup( tbl_TiDbl, txt ));
+ else if( combo == coTiAct1 || combo == coTiAct2 || combo == coTiAct3 )
+ combo->setCurrentItem( tbl_txt_lookup( tbl_TiAc, txt ));
+ else if( combo == coTiInAct1 || combo == coTiInAct2 || combo == coTiInAct3 )
+ combo->setCurrentItem( tbl_txt_lookup( tbl_TiInAc, txt ));
+ else if( combo == coTiAct4 )
+ combo->setCurrentItem( tbl_txt_lookup( tbl_TiWAc, txt ));
+ else if( combo == coMax[0] || combo == coMax[1] || combo == coMax[2] )
+ {
+ combo->setCurrentItem( tbl_txt_lookup( tbl_Max, txt ));
+ static_cast<ToolTipComboBox *>(combo)->changed();
+ }
+ else
+ abort();
+}
+
+const char* KTitleBarActionsConfig::functionTiDbl( int i )
+{
+ return tbl_num_lookup( tbl_TiDbl, i );
+}
+
+const char* KTitleBarActionsConfig::functionTiAc( int i )
+{
+ return tbl_num_lookup( tbl_TiAc, i );
+}
+
+const char* KTitleBarActionsConfig::functionTiInAc( int i )
+{
+ return tbl_num_lookup( tbl_TiInAc, i );
+}
+
+const char* KTitleBarActionsConfig::functionTiWAc(int i)
+{
+ return tbl_num_lookup( tbl_TiWAc, i );
+}
+
+const char* KTitleBarActionsConfig::functionMax( int i )
+{
+ return tbl_num_lookup( tbl_Max, i );
+}
+
+void KTitleBarActionsConfig::load()
+{
+ config->setGroup("Windows");
+ setComboText(coTiDbl, config->readEntry("TitlebarDoubleClickCommand","Shade").ascii());
+ for (int t = 0; t < 3; ++t)
+ setComboText(coMax[t],config->readEntry(cnf_Max[t], tbl_Max[t]).ascii());
+
+ config->setGroup( "MouseBindings");
+ setComboText(coTiAct1,config->readEntry("CommandActiveTitlebar1","Raise").ascii());
+ setComboText(coTiAct2,config->readEntry("CommandActiveTitlebar2","Lower").ascii());
+ setComboText(coTiAct3,config->readEntry("CommandActiveTitlebar3","Operations menu").ascii());
+ setComboText(coTiAct4,config->readEntry("CommandTitlebarWheel","Nothing").ascii());
+ setComboText(coTiInAct1,config->readEntry("CommandInactiveTitlebar1","Activate and raise").ascii());
+ setComboText(coTiInAct2,config->readEntry("CommandInactiveTitlebar2","Activate and lower").ascii());
+ setComboText(coTiInAct3,config->readEntry("CommandInactiveTitlebar3","Operations menu").ascii());
+}
+
+void KTitleBarActionsConfig::save()
+{
+ config->setGroup("Windows");
+ config->writeEntry("TitlebarDoubleClickCommand", functionTiDbl( coTiDbl->currentItem() ) );
+ for (int t = 0; t < 3; ++t)
+ config->writeEntry(cnf_Max[t], functionMax(coMax[t]->currentItem()));
+
+ config->setGroup("MouseBindings");
+ config->writeEntry("CommandActiveTitlebar1", functionTiAc(coTiAct1->currentItem()));
+ config->writeEntry("CommandActiveTitlebar2", functionTiAc(coTiAct2->currentItem()));
+ config->writeEntry("CommandActiveTitlebar3", functionTiAc(coTiAct3->currentItem()));
+ config->writeEntry("CommandInactiveTitlebar1", functionTiInAc(coTiInAct1->currentItem()));
+ config->writeEntry("CommandTitlebarWheel", functionTiWAc(coTiAct4->currentItem()));
+ config->writeEntry("CommandInactiveTitlebar2", functionTiInAc(coTiInAct2->currentItem()));
+ config->writeEntry("CommandInactiveTitlebar3", functionTiInAc(coTiInAct3->currentItem()));
+
+ if (standAlone)
+ {
+ config->sync();
+ if ( !kapp->dcopClient()->isAttached() )
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("kwin*", "", "reconfigure()", "");
+ }
+}
+
+void KTitleBarActionsConfig::defaults()
+{
+ setComboText(coTiDbl, "Shade");
+ setComboText(coTiAct1,"Raise");
+ setComboText(coTiAct2,"Lower");
+ setComboText(coTiAct3,"Operations menu");
+ setComboText(coTiAct4,"Nothing");
+ setComboText(coTiInAct1,"Activate and raise");
+ setComboText(coTiInAct2,"Activate and lower");
+ setComboText(coTiInAct3,"Operations menu");
+ for (int t = 0; t < 3; ++t)
+ setComboText(coMax[t], tbl_Max[t]);
+}
+
+
+KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config, QWidget * parent, const char *)
+ : KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
+{
+ QString strWin1, strWin2, strWin3, strAllKey, strAll1, strAll2, strAll3, strAllW;
+ QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QGrid *grid;
+ QGroupBox *box;
+ QLabel *label;
+ QString strMouseButton1, strMouseButton3;
+ QString txtButton1, txtButton3;
+ QStringList items;
+ bool leftHandedMouse = ( KGlobalSettings::mouseSettings().handed == KGlobalSettings::KMouseSettings::LeftHanded);
+
+/** Inactive inner window ******************/
+
+ box = new QVGroupBox(i18n("Inactive Inner Window"), this, "Inactive Inner Window");
+ box->layout()->setMargin(KDialog::marginHint());
+ box->layout()->setSpacing(KDialog::spacingHint());
+ layout->addWidget(box);
+ QWhatsThis::add( box, i18n("Here you can customize mouse click behavior when clicking on an inactive"
+ " inner window ('inner' means: not titlebar, not frame).") );
+
+ grid = new QGrid(3, Qt::Vertical, box);
+
+ strMouseButton1 = i18n("Left button:");
+ txtButton1 = i18n("In this row you can customize left click behavior when clicking into"
+ " the titlebar or the frame.");
+
+ strMouseButton3 = i18n("Right button:");
+ txtButton3 = i18n("In this row you can customize right click behavior when clicking into"
+ " the titlebar or the frame." );
+
+ if ( leftHandedMouse )
+ {
+ qSwap(strMouseButton1, strMouseButton3);
+ qSwap(txtButton1, txtButton3);
+ }
+
+ strWin1 = i18n("In this row you can customize left click behavior when clicking into"
+ " an inactive inner window ('inner' means: not titlebar, not frame).");
+
+ strWin3 = i18n("In this row you can customize right click behavior when clicking into"
+ " an inactive inner window ('inner' means: not titlebar, not frame).");
+
+ // Be nice to lefties
+ if ( leftHandedMouse ) qSwap(strWin1, strWin3);
+
+ label = new QLabel(strMouseButton1, grid);
+ QWhatsThis::add( label, strWin1 );
+
+ label = new QLabel(i18n("Middle button:"), grid);
+ strWin2 = i18n("In this row you can customize middle click behavior when clicking into"
+ " an inactive inner window ('inner' means: not titlebar, not frame).");
+ QWhatsThis::add( label, strWin2 );
+
+ label = new QLabel(strMouseButton3, grid);
+ QWhatsThis::add( label, strWin3 );
+
+ items.clear();
+ items << i18n("Activate, Raise & Pass Click")
+ << i18n("Activate & Pass Click")
+ << i18n("Activate")
+ << i18n("Activate & Raise");
+
+ QComboBox* combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coWin1 = combo;
+ QWhatsThis::add( combo, strWin1 );
+
+ combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coWin2 = combo;
+ QWhatsThis::add( combo, strWin2 );
+
+ combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coWin3 = combo;
+ QWhatsThis::add( combo, strWin3 );
+
+
+/** Inner window, titlebar and frame **************/
+
+ box = new QVGroupBox(i18n("Inner Window, Titlebar && Frame"), this, "Inner Window, Titlebar and Frame");
+ box->layout()->setMargin(KDialog::marginHint());
+ box->layout()->setSpacing(KDialog::spacingHint());
+ layout->addWidget(box);
+ QWhatsThis::add( box, i18n("Here you can customize KDE's behavior when clicking somewhere into"
+ " a window while pressing a modifier key."));
+
+ grid = new QGrid(5, Qt::Vertical, box);
+
+ // Labels
+ label = new QLabel(i18n("Modifier key:"), grid);
+
+ strAllKey = i18n("Here you select whether holding the Meta key or Alt key "
+ "will allow you to perform the following actions.");
+ QWhatsThis::add( label, strAllKey );
+
+
+ strMouseButton1 = i18n("Modifier key + left button:");
+ strAll1 = i18n("In this row you can customize left click behavior when clicking into"
+ " the titlebar or the frame.");
+
+ strMouseButton3 = i18n("Modifier key + right button:");
+ strAll3 = i18n("In this row you can customize right click behavior when clicking into"
+ " the titlebar or the frame." );
+
+ if ( leftHandedMouse )
+ {
+ qSwap(strMouseButton1, strMouseButton3);
+ qSwap(strAll1, strAll3);
+ }
+
+ label = new QLabel(strMouseButton1, grid);
+ QWhatsThis::add( label, strAll1);
+
+ label = new QLabel(i18n("Modifier key + middle button:"), grid);
+ strAll2 = i18n("Here you can customize KDE's behavior when middle clicking into a window"
+ " while pressing the modifier key.");
+ QWhatsThis::add( label, strAll2 );
+
+ label = new QLabel(strMouseButton3, grid);
+ QWhatsThis::add( label, strAll3);
+
+ label = new QLabel(i18n("Modifier key + mouse wheel:"), grid);
+ strAllW = i18n("Here you can customize KDE's behavior when scrolling with the mouse wheel"
+ " in a window while pressing the modifier key.");
+ QWhatsThis::add( label, strAllW);
+
+ // Combo's
+ combo = new QComboBox(grid);
+ combo->insertItem(i18n("Meta"));
+ combo->insertItem(i18n("Alt"));
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coAllKey = combo;
+ QWhatsThis::add( combo, strAllKey );
+
+ items.clear();
+ items << i18n("Move")
+ << i18n("Activate, Raise and Move")
+ << i18n("Toggle Raise & Lower")
+ << i18n("Resize")
+ << i18n("Raise")
+ << i18n("Lower")
+ << i18n("Minimize")
+ << i18n("Nothing");
+
+ combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coAll1 = combo;
+ QWhatsThis::add( combo, strAll1 );
+
+ combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coAll2 = combo;
+ QWhatsThis::add( combo, strAll2 );
+
+ combo = new QComboBox(grid);
+ combo->insertStringList(items);
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coAll3 = combo;
+ QWhatsThis::add( combo, strAll3 );
+
+ combo = new QComboBox(grid);
+ combo->insertItem(i18n("Raise/Lower"));
+ combo->insertItem(i18n("Shade/Unshade"));
+ combo->insertItem(i18n("Maximize/Restore"));
+ combo->insertItem(i18n("Keep Above/Below"));
+ combo->insertItem(i18n("Move to Previous/Next Desktop"));
+ combo->insertItem(i18n("Change Opacity"));
+ combo->insertItem(i18n("Nothing"));
+ connect(combo, SIGNAL(activated(int)), SLOT(changed()));
+ coAllW = combo;
+ QWhatsThis::add( combo, strAllW );
+
+ layout->addStretch();
+
+ load();
+}
+
+KWindowActionsConfig::~KWindowActionsConfig()
+{
+ if (standAlone)
+ delete config;
+}
+
+void KWindowActionsConfig::setComboText( QComboBox* combo, const char*txt )
+{
+ if( combo == coWin1 || combo == coWin2 || combo == coWin3 )
+ combo->setCurrentItem( tbl_txt_lookup( tbl_Win, txt ));
+ else if( combo == coAllKey )
+ combo->setCurrentItem( tbl_txt_lookup( tbl_AllKey, txt ));
+ else if( combo == coAll1 || combo == coAll2 || combo == coAll3 )
+ combo->setCurrentItem( tbl_txt_lookup( tbl_All, txt ));
+ else if( combo == coAllW )
+ combo->setCurrentItem( tbl_txt_lookup( tbl_AllW, txt ));
+ else
+ abort();
+}
+
+const char* KWindowActionsConfig::functionWin( int i )
+{
+ return tbl_num_lookup( tbl_Win, i );
+}
+
+const char* KWindowActionsConfig::functionAllKey( int i )
+{
+ return tbl_num_lookup( tbl_AllKey, i );
+}
+
+const char* KWindowActionsConfig::functionAll( int i )
+{
+ return tbl_num_lookup( tbl_All, i );
+}
+
+const char* KWindowActionsConfig::functionAllW(int i)
+{
+ return tbl_num_lookup( tbl_AllW, i );
+}
+
+void KWindowActionsConfig::load()
+{
+ config->setGroup( "MouseBindings");
+ setComboText(coWin1,config->readEntry("CommandWindow1","Activate, raise and pass click").ascii());
+ setComboText(coWin2,config->readEntry("CommandWindow2","Activate and pass click").ascii());
+ setComboText(coWin3,config->readEntry("CommandWindow3","Activate and pass click").ascii());
+ setComboText(coAllKey,config->readEntry("CommandAllKey","Alt").ascii());
+ setComboText(coAll1,config->readEntry("CommandAll1","Move").ascii());
+ setComboText(coAll2,config->readEntry("CommandAll2","Toggle raise and lower").ascii());
+ setComboText(coAll3,config->readEntry("CommandAll3","Resize").ascii());
+ setComboText(coAllW,config->readEntry("CommandAllWheel","Nothing").ascii());
+}
+
+void KWindowActionsConfig::save()
+{
+ config->setGroup("MouseBindings");
+ config->writeEntry("CommandWindow1", functionWin(coWin1->currentItem()));
+ config->writeEntry("CommandWindow2", functionWin(coWin2->currentItem()));
+ config->writeEntry("CommandWindow3", functionWin(coWin3->currentItem()));
+ config->writeEntry("CommandAllKey", functionAllKey(coAllKey->currentItem()));
+ config->writeEntry("CommandAll1", functionAll(coAll1->currentItem()));
+ config->writeEntry("CommandAll2", functionAll(coAll2->currentItem()));
+ config->writeEntry("CommandAll3", functionAll(coAll3->currentItem()));
+ config->writeEntry("CommandAllWheel", functionAllW(coAllW->currentItem()));
+
+ if (standAlone)
+ {
+ config->sync();
+ if ( !kapp->dcopClient()->isAttached() )
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("kwin*", "", "reconfigure()", "");
+ }
+}
+
+void KWindowActionsConfig::defaults()
+{
+ setComboText(coWin1,"Activate, raise and pass click");
+ setComboText(coWin2,"Activate and pass click");
+ setComboText(coWin3,"Activate and pass click");
+ setComboText(coAllKey,"Alt");
+ setComboText (coAll1,"Move");
+ setComboText(coAll2,"Toggle raise and lower");
+ setComboText(coAll3,"Resize");
+ setComboText(coAllW,"Nothing");
+}
diff --git a/kwin/kcmkwin/kwinoptions/mouse.h b/kwin/kcmkwin/kwinoptions/mouse.h
new file mode 100644
index 000000000..24b2d4030
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/mouse.h
@@ -0,0 +1,137 @@
+/*
+ * mouse.h
+ *
+ * Copyright (c) 1998 Matthias Ettrich <ettrich@kde.org>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __KKWMMOUSECONFIG_H__
+#define __KKWMMOUSECONFIG_H__
+
+class KConfig;
+
+#include <qwidget.h>
+#include <kcmodule.h>
+#include <qcombobox.h>
+#include <qtooltip.h>
+
+
+class ToolTipComboBox: public QComboBox
+{
+ Q_OBJECT
+
+public:
+ ToolTipComboBox(QWidget * owner, char const * const * toolTips_)
+ : QComboBox(owner)
+ , toolTips(toolTips_) {}
+
+public slots:
+ void changed() {QToolTip::add( this, i18n(toolTips[currentItem()]) );}
+
+protected:
+ char const * const * toolTips;
+};
+
+
+
+class KTitleBarActionsConfig : public KCModule
+{
+ Q_OBJECT
+
+public:
+
+ KTitleBarActionsConfig( bool _standAlone, KConfig *_config, QWidget *parent=0, const char* name=0 );
+ ~KTitleBarActionsConfig( );
+
+ void load();
+ void save();
+ void defaults();
+
+public slots:
+ void changed() { emit KCModule::changed(true); }
+
+private:
+ QComboBox* coTiDbl;
+
+ QComboBox* coTiAct1;
+ QComboBox* coTiAct2;
+ QComboBox* coTiAct3;
+ QComboBox* coTiAct4;
+ QComboBox* coTiInAct1;
+ QComboBox* coTiInAct2;
+ QComboBox* coTiInAct3;
+
+ ToolTipComboBox * coMax[3];
+
+ KConfig *config;
+ bool standAlone;
+
+ const char* functionTiDbl(int);
+ const char* functionTiAc(int);
+ const char* functionTiWAc(int);
+ const char* functionTiInAc(int);
+ const char* functionMax(int);
+
+ void setComboText(QComboBox* combo, const char* text);
+ const char* fixup( const char* s );
+
+private slots:
+ void paletteChanged();
+
+};
+
+class KWindowActionsConfig : public KCModule
+{
+ Q_OBJECT
+
+public:
+
+ KWindowActionsConfig( bool _standAlone, KConfig *_config, QWidget *parent=0, const char* name=0 );
+ ~KWindowActionsConfig( );
+
+ void load();
+ void save();
+ void defaults();
+
+public slots:
+ void changed() { emit KCModule::changed(true); }
+
+private:
+ QComboBox* coWin1;
+ QComboBox* coWin2;
+ QComboBox* coWin3;
+
+ QComboBox* coAllKey;
+ QComboBox* coAll1;
+ QComboBox* coAll2;
+ QComboBox* coAll3;
+ QComboBox* coAllW;
+
+ KConfig *config;
+ bool standAlone;
+
+ const char* functionWin(int);
+ const char* functionAllKey(int);
+ const char* functionAll(int);
+ const char* functionAllW(int);
+
+ void setComboText(QComboBox* combo, const char* text);
+ const char* fixup( const char* s );
+};
+
+#endif
+
diff --git a/kwin/kcmkwin/kwinoptions/windows.cpp b/kwin/kcmkwin/kwinoptions/windows.cpp
new file mode 100644
index 000000000..db682b316
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/windows.cpp
@@ -0,0 +1,1627 @@
+/*
+ * windows.cpp
+ *
+ * Copyright (c) 1997 Patrick Dowler dowler@morgul.fsh.uvic.ca
+ * Copyright (c) 2001 Waldo Bastian bastian@kde.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *
+ */
+
+#include <config.h>
+
+#include <qdir.h>
+#include <qlayout.h>
+#include <qslider.h>
+#include <qwhatsthis.h>
+#include <qvbuttongroup.h>
+#include <qcheckbox.h>
+#include <qradiobutton.h>
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <kmessagebox.h>
+
+#include <kactivelabel.h>
+#include <klocale.h>
+#include <kcolorbutton.h>
+#include <kconfig.h>
+#include <knuminput.h>
+#include <kapplication.h>
+#include <kdialog.h>
+#include <dcopclient.h>
+#include <kglobal.h>
+#include <kprocess.h>
+#include <qtabwidget.h>
+
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+#include "windows.h"
+
+
+// kwin config keywords
+#define KWIN_FOCUS "FocusPolicy"
+#define KWIN_PLACEMENT "Placement"
+#define KWIN_MOVE "MoveMode"
+#define KWIN_MINIMIZE_ANIM "AnimateMinimize"
+#define KWIN_MINIMIZE_ANIM_SPEED "AnimateMinimizeSpeed"
+#define KWIN_RESIZE_OPAQUE "ResizeMode"
+#define KWIN_GEOMETRY "GeometryTip"
+#define KWIN_AUTORAISE_INTERVAL "AutoRaiseInterval"
+#define KWIN_AUTORAISE "AutoRaise"
+#define KWIN_DELAYFOCUS_INTERVAL "DelayFocusInterval"
+#define KWIN_DELAYFOCUS "DelayFocus"
+#define KWIN_CLICKRAISE "ClickRaise"
+#define KWIN_ANIMSHADE "AnimateShade"
+#define KWIN_MOVE_RESIZE_MAXIMIZED "MoveResizeMaximizedWindows"
+#define KWIN_ALTTABMODE "AltTabStyle"
+#define KWIN_TRAVERSE_ALL "TraverseAll"
+#define KWIN_SHOW_POPUP "ShowPopup"
+#define KWIN_ROLL_OVER_DESKTOPS "RollOverDesktops"
+#define KWIN_SHADEHOVER "ShadeHover"
+#define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval"
+#define KWIN_FOCUS_STEALING "FocusStealingPreventionLevel"
+#define KWIN_HIDE_UTILITY "HideUtilityWindowsForInactive"
+
+// kwm config keywords
+#define KWM_ELECTRIC_BORDER "ElectricBorders"
+#define KWM_ELECTRIC_BORDER_DELAY "ElectricBorderDelay"
+
+//CT 15mar 98 - magics
+#define KWM_BRDR_SNAP_ZONE "BorderSnapZone"
+#define KWM_BRDR_SNAP_ZONE_DEFAULT 10
+#define KWM_WNDW_SNAP_ZONE "WindowSnapZone"
+#define KWM_WNDW_SNAP_ZONE_DEFAULT 10
+
+#define MAX_BRDR_SNAP 100
+#define MAX_WNDW_SNAP 100
+#define MAX_EDGE_RES 1000
+
+
+KFocusConfig::~KFocusConfig ()
+{
+ if (standAlone)
+ delete config;
+}
+
+// removed the LCD display over the slider - this is not good GUI design :) RNolden 051701
+KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, QWidget * parent, const char *)
+ : KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
+{
+ QString wtstr;
+ QBoxLayout *lay = new QVBoxLayout (this, 0, KDialog::spacingHint());
+
+ //iTLabel = new QLabel(i18n(" Allowed overlap:\n"
+ // "(% of desktop space)"),
+ // plcBox);
+ //iTLabel->setAlignment(AlignTop|AlignHCenter);
+ //pLay->addWidget(iTLabel,1,1);
+
+ //interactiveTrigger = new QSpinBox(0, 500, 1, plcBox);
+ //pLay->addWidget(interactiveTrigger,1,2);
+
+ //pLay->addRowSpacing(2,KDialog::spacingHint());
+
+ //lay->addWidget(plcBox);
+
+ // focus policy
+ fcsBox = new QButtonGroup(i18n("Focus"),this);
+ fcsBox->setColumnLayout( 0, Qt::Horizontal );
+
+ QBoxLayout *fLay = new QVBoxLayout(fcsBox->layout(),
+ KDialog::spacingHint());
+
+ QBoxLayout *cLay = new QHBoxLayout(fLay);
+ QLabel *fLabel = new QLabel(i18n("&Policy:"), fcsBox);
+ cLay->addWidget(fLabel, 0);
+ focusCombo = new QComboBox(false, fcsBox);
+ focusCombo->insertItem(i18n("Click to Focus"), CLICK_TO_FOCUS);
+ focusCombo->insertItem(i18n("Focus Follows Mouse"), FOCUS_FOLLOWS_MOUSE);
+ focusCombo->insertItem(i18n("Focus Under Mouse"), FOCUS_UNDER_MOUSE);
+ focusCombo->insertItem(i18n("Focus Strictly Under Mouse"), FOCUS_STRICTLY_UNDER_MOUSE);
+ cLay->addWidget(focusCombo,1 ,Qt::AlignLeft);
+ fLabel->setBuddy(focusCombo);
+
+ // FIXME, when more policies have been added to KWin
+ wtstr = i18n("The focus policy is used to determine the active window, i.e."
+ " the window you can work in. <ul>"
+ " <li><em>Click to focus:</em> A window becomes active when you click into it."
+ " This is the behavior you might know from other operating systems.</li>"
+ " <li><em>Focus follows mouse:</em> Moving the mouse pointer actively on to a"
+ " normal window activates it. New windows will receive the focus,"
+ " without you having to point the mouse at them explicitly."
+ " Very practical if you are using the mouse a lot.</li>"
+ " <li><em>Focus under mouse:</em> The window that happens to be under the"
+ " mouse pointer is active. If the mouse points nowhere, the last window"
+ " that was under the mouse has focus."
+ " New windows will not automatically receive the focus.</li>"
+ " <li><em>Focus strictly under mouse:</em> Only the window under the mouse pointer is"
+ " active. If the mouse points nowhere, nothing has focus."
+ " </ul>"
+ "Note that 'Focus under mouse' and 'Focus strictly under mouse' prevent certain"
+ " features such as the Alt+Tab walk through windows dialog in the KDE mode"
+ " from working properly."
+ );
+ QWhatsThis::add( focusCombo, wtstr);
+ QWhatsThis::add(fLabel, wtstr);
+
+ connect(focusCombo, SIGNAL(activated(int)), this, SLOT(setAutoRaiseEnabled()) );
+
+ // autoraise delay
+ autoRaiseOn = new QCheckBox(i18n("Auto &raise"), fcsBox);
+ fLay->addWidget(autoRaiseOn);
+ connect(autoRaiseOn,SIGNAL(toggled(bool)), this, SLOT(autoRaiseOnTog(bool)));
+
+ autoRaise = new KIntNumInput(500, fcsBox);
+ autoRaise->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
+ autoRaise->setRange(0, 3000, 100, true);
+ autoRaise->setSteps(100,100);
+ autoRaise->setSuffix(i18n(" msec"));
+ fLay->addWidget(autoRaise);
+
+ connect(focusCombo, SIGNAL(activated(int)), this, SLOT(setDelayFocusEnabled()) );
+
+ delayFocusOn = new QCheckBox(i18n("Delay focus"), fcsBox);
+ fLay->addWidget(delayFocusOn);
+ connect(delayFocusOn,SIGNAL(toggled(bool)), this, SLOT(delayFocusOnTog(bool)));
+
+ delayFocus = new KIntNumInput(500, fcsBox);
+ delayFocus->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
+ delayFocus->setRange(0, 3000, 100, true);
+ delayFocus->setSteps(100,100);
+ delayFocus->setSuffix(i18n(" msec"));
+ fLay->addWidget(delayFocus);
+
+ clickRaiseOn = new QCheckBox(i18n("C&lick raise active window"), fcsBox);
+ connect(clickRaiseOn,SIGNAL(toggled(bool)), this, SLOT(clickRaiseOnTog(bool)));
+ fLay->addWidget(clickRaiseOn);
+
+// fLay->addColSpacing(0,QMAX(autoRaiseOn->sizeHint().width(),
+// clickRaiseOn->sizeHint().width()) + 15);
+
+ QWhatsThis::add( autoRaiseOn, i18n("When this option is enabled, a window in the background will automatically"
+ " come to the front when the mouse pointer has been over it for some time.") );
+ wtstr = i18n("This is the delay after which the window that the mouse pointer is over will automatically"
+ " come to the front.");
+ QWhatsThis::add( autoRaise, wtstr );
+
+ QWhatsThis::add( clickRaiseOn, i18n("When this option is enabled, the active window will be brought to the"
+ " front when you click somewhere into the window contents. To change"
+ " it for inactive windows, you need to change the settings"
+ " in the Actions tab.") );
+
+ QWhatsThis::add( delayFocusOn, i18n("When this option is enabled, there will be a delay after which the"
+ " window the mouse pointer is over will become active (receive focus).") );
+ QWhatsThis::add( delayFocus, i18n("This is the delay after which the window the mouse pointer is over"
+ " will automatically receive focus.") );
+
+ lay->addWidget(fcsBox);
+
+ kbdBox = new QButtonGroup(i18n("Navigation"), this);
+ kbdBox->setColumnLayout( 0, Qt::Horizontal );
+ QVBoxLayout *kLay = new QVBoxLayout(kbdBox->layout(), KDialog::spacingHint());
+
+ altTabPopup = new QCheckBox( i18n("Show window list while switching windows"), kbdBox );
+ kLay->addWidget( altTabPopup );
+
+ wtstr = i18n("Hold down the Alt key and press the Tab key repeatedly to walk"
+ " through the windows on the current desktop (the Alt+Tab"
+ " combination can be reconfigured).\n\n"
+ "If this checkbox is checked"
+ " a popup widget is shown, displaying the icons of all windows to"
+ " walk through and the title of the currently selected one.\n\n"
+ "Otherwise, the focus is passed to a new window each time Tab"
+ " is pressed, with no popup widget. In addition, the previously"
+ " activated window will be sent to the back in this mode.");
+ QWhatsThis::add( altTabPopup, wtstr );
+ connect(focusCombo, SIGNAL(activated(int)), this, SLOT(updateAltTabMode()));
+
+ traverseAll = new QCheckBox( i18n( "&Traverse windows on all desktops" ), kbdBox );
+ kLay->addWidget( traverseAll );
+
+ wtstr = i18n( "Leave this option disabled if you want to limit walking through"
+ " windows to the current desktop." );
+ QWhatsThis::add( traverseAll, wtstr );
+
+ rollOverDesktops = new QCheckBox( i18n("Desktop navi&gation wraps around"), kbdBox );
+ kLay->addWidget(rollOverDesktops);
+
+ wtstr = i18n( "Enable this option if you want keyboard or active desktop border navigation beyond"
+ " the edge of a desktop to take you to the opposite edge of the new desktop." );
+ QWhatsThis::add( rollOverDesktops, wtstr );
+
+ showPopupinfo = new QCheckBox( i18n("Popup desktop name on desktop &switch"), kbdBox );
+ kLay->addWidget(showPopupinfo);
+
+ wtstr = i18n( "Enable this option if you wish to see the current desktop"
+ " name popup whenever the current desktop is changed." );
+ QWhatsThis::add( showPopupinfo, wtstr );
+
+ lay->addWidget(kbdBox);
+
+ lay->addStretch();
+
+ // Any changes goes to slotChanged()
+ connect(focusCombo, SIGNAL(activated(int)), SLOT(changed()));
+ connect(fcsBox, SIGNAL(clicked(int)), SLOT(changed()));
+ connect(autoRaise, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(delayFocus, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(altTabPopup, SIGNAL(clicked()), SLOT(changed()));
+ connect(traverseAll, SIGNAL(clicked()), SLOT(changed()));
+ connect(rollOverDesktops, SIGNAL(clicked()), SLOT(changed()));
+ connect(showPopupinfo, SIGNAL(clicked()), SLOT(changed()));
+
+ load();
+}
+
+
+int KFocusConfig::getFocus()
+{
+ return focusCombo->currentItem();
+}
+
+void KFocusConfig::setFocus(int foc)
+{
+ focusCombo->setCurrentItem(foc);
+
+ // this will disable/hide the auto raise delay widget if focus==click
+ setAutoRaiseEnabled();
+ updateAltTabMode();
+}
+
+void KFocusConfig::updateAltTabMode()
+{
+ // not KDE-style Alt+Tab with unreasonable focus policies
+ altTabPopup->setEnabled( focusCombo->currentItem() == 0 || focusCombo->currentItem() == 1 );
+}
+
+void KFocusConfig::setAutoRaiseInterval(int tb)
+{
+ autoRaise->setValue(tb);
+}
+
+void KFocusConfig::setDelayFocusInterval(int tb)
+{
+ delayFocus->setValue(tb);
+}
+
+int KFocusConfig::getAutoRaiseInterval()
+{
+ return autoRaise->value();
+}
+
+int KFocusConfig::getDelayFocusInterval()
+{
+ return delayFocus->value();
+}
+
+void KFocusConfig::setAutoRaise(bool on)
+{
+ autoRaiseOn->setChecked(on);
+}
+
+void KFocusConfig::setDelayFocus(bool on)
+{
+ delayFocusOn->setChecked(on);
+}
+
+void KFocusConfig::setClickRaise(bool on)
+{
+ clickRaiseOn->setChecked(on);
+}
+
+void KFocusConfig::setAutoRaiseEnabled()
+{
+ // the auto raise related widgets are: autoRaise
+ if ( focusCombo->currentItem() != CLICK_TO_FOCUS )
+ {
+ autoRaiseOn->setEnabled(true);
+ autoRaiseOnTog(autoRaiseOn->isChecked());
+ }
+ else
+ {
+ autoRaiseOn->setEnabled(false);
+ autoRaiseOnTog(false);
+ }
+}
+
+void KFocusConfig::setDelayFocusEnabled()
+{
+ // the delayed focus related widgets are: delayFocus
+ if ( focusCombo->currentItem() != CLICK_TO_FOCUS )
+ {
+ delayFocusOn->setEnabled(true);
+ delayFocusOnTog(delayFocusOn->isChecked());
+ }
+ else
+ {
+ delayFocusOn->setEnabled(false);
+ delayFocusOnTog(false);
+ }
+}
+
+void KFocusConfig::autoRaiseOnTog(bool a) {
+ autoRaise->setEnabled(a);
+ clickRaiseOn->setEnabled( !a );
+}
+
+void KFocusConfig::delayFocusOnTog(bool a) {
+ delayFocus->setEnabled(a);
+}
+
+void KFocusConfig::clickRaiseOnTog(bool ) {
+}
+
+void KFocusConfig::setAltTabMode(bool a) {
+ altTabPopup->setChecked(a);
+}
+
+void KFocusConfig::setTraverseAll(bool a) {
+ traverseAll->setChecked(a);
+}
+
+void KFocusConfig::setRollOverDesktops(bool a) {
+ rollOverDesktops->setChecked(a);
+}
+
+void KFocusConfig::setShowPopupinfo(bool a) {
+ showPopupinfo->setChecked(a);
+}
+
+void KFocusConfig::load( void )
+{
+ QString key;
+
+ config->setGroup( "Windows" );
+
+ key = config->readEntry(KWIN_FOCUS);
+ if( key == "ClickToFocus")
+ setFocus(CLICK_TO_FOCUS);
+ else if( key == "FocusFollowsMouse")
+ setFocus(FOCUS_FOLLOWS_MOUSE);
+ else if(key == "FocusUnderMouse")
+ setFocus(FOCUS_UNDER_MOUSE);
+ else if(key == "FocusStrictlyUnderMouse")
+ setFocus(FOCUS_STRICTLY_UNDER_MOUSE);
+
+ int k = config->readNumEntry(KWIN_AUTORAISE_INTERVAL,750);
+ setAutoRaiseInterval(k);
+
+ k = config->readNumEntry(KWIN_DELAYFOCUS_INTERVAL,750);
+ setDelayFocusInterval(k);
+
+ key = config->readEntry(KWIN_AUTORAISE);
+ setAutoRaise(key == "on");
+ key = config->readEntry(KWIN_DELAYFOCUS);
+ setDelayFocus(key == "on");
+ key = config->readEntry(KWIN_CLICKRAISE);
+ setClickRaise(key != "off");
+ setAutoRaiseEnabled(); // this will disable/hide the auto raise delay widget if focus==click
+ setDelayFocusEnabled();
+
+ key = config->readEntry(KWIN_ALTTABMODE, "KDE");
+ setAltTabMode(key == "KDE");
+
+ setRollOverDesktops( config->readBoolEntry(KWIN_ROLL_OVER_DESKTOPS, true ));
+
+ config->setGroup( "PopupInfo" );
+ setShowPopupinfo( config->readBoolEntry(KWIN_SHOW_POPUP, false ));
+
+ config->setGroup( "TabBox" );
+ setTraverseAll( config->readBoolEntry(KWIN_TRAVERSE_ALL, false ));
+
+ config->setGroup("Desktops");
+ emit KCModule::changed(false);
+}
+
+void KFocusConfig::save( void )
+{
+ int v;
+
+ config->setGroup( "Windows" );
+
+ v = getFocus();
+ if (v == CLICK_TO_FOCUS)
+ config->writeEntry(KWIN_FOCUS,"ClickToFocus");
+ else if (v == FOCUS_UNDER_MOUSE)
+ config->writeEntry(KWIN_FOCUS,"FocusUnderMouse");
+ else if (v == FOCUS_STRICTLY_UNDER_MOUSE)
+ config->writeEntry(KWIN_FOCUS,"FocusStrictlyUnderMouse");
+ else
+ config->writeEntry(KWIN_FOCUS,"FocusFollowsMouse");
+
+ v = getAutoRaiseInterval();
+ if (v <0) v = 0;
+ config->writeEntry(KWIN_AUTORAISE_INTERVAL,v);
+
+ v = getDelayFocusInterval();
+ if (v <0) v = 0;
+ config->writeEntry(KWIN_DELAYFOCUS_INTERVAL,v);
+
+ if (autoRaiseOn->isChecked())
+ config->writeEntry(KWIN_AUTORAISE, "on");
+ else
+ config->writeEntry(KWIN_AUTORAISE, "off");
+
+ if (delayFocusOn->isChecked())
+ config->writeEntry(KWIN_DELAYFOCUS, "on");
+ else
+ config->writeEntry(KWIN_DELAYFOCUS, "off");
+
+ if (clickRaiseOn->isChecked())
+ config->writeEntry(KWIN_CLICKRAISE, "on");
+ else
+ config->writeEntry(KWIN_CLICKRAISE, "off");
+
+ if (altTabPopup->isChecked())
+ config->writeEntry(KWIN_ALTTABMODE, "KDE");
+ else
+ config->writeEntry(KWIN_ALTTABMODE, "CDE");
+
+ config->writeEntry( KWIN_ROLL_OVER_DESKTOPS, rollOverDesktops->isChecked());
+
+ config->setGroup( "PopupInfo" );
+ config->writeEntry( KWIN_SHOW_POPUP, showPopupinfo->isChecked());
+
+ config->setGroup( "TabBox" );
+ config->writeEntry( KWIN_TRAVERSE_ALL , traverseAll->isChecked());
+
+ config->setGroup("Desktops");
+
+ if (standAlone)
+ {
+ config->sync();
+ if ( !kapp->dcopClient()->isAttached() )
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("kwin*", "", "reconfigure()", "");
+ }
+ emit KCModule::changed(false);
+}
+
+void KFocusConfig::defaults()
+{
+ setAutoRaiseInterval(0);
+ setDelayFocusInterval(0);
+ setFocus(CLICK_TO_FOCUS);
+ setAutoRaise(false);
+ setDelayFocus(false);
+ setClickRaise(true);
+ setAltTabMode(true);
+ setTraverseAll( false );
+ setRollOverDesktops(true);
+ setShowPopupinfo(false);
+ emit KCModule::changed(true);
+}
+
+KAdvancedConfig::~KAdvancedConfig ()
+{
+ if (standAlone)
+ delete config;
+}
+
+KAdvancedConfig::KAdvancedConfig (bool _standAlone, KConfig *_config, QWidget *parent, const char *)
+ : KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
+{
+ QString wtstr;
+ QBoxLayout *lay = new QVBoxLayout (this, 0, KDialog::spacingHint());
+
+ //iTLabel = new QLabel(i18n(" Allowed overlap:\n"
+ // "(% of desktop space)"),
+ // plcBox);
+ //iTLabel->setAlignment(AlignTop|AlignHCenter);
+ //pLay->addWidget(iTLabel,1,1);
+
+ //interactiveTrigger = new QSpinBox(0, 500, 1, plcBox);
+ //pLay->addWidget(interactiveTrigger,1,2);
+
+ //pLay->addRowSpacing(2,KDialog::spacingHint());
+
+ //lay->addWidget(plcBox);
+
+ shBox = new QVButtonGroup(i18n("Shading"), this);
+
+ animateShade = new QCheckBox(i18n("Anima&te"), shBox);
+ QWhatsThis::add(animateShade, i18n("Animate the action of reducing the window to its titlebar (shading)"
+ " as well as the expansion of a shaded window") );
+
+ shadeHoverOn = new QCheckBox(i18n("&Enable hover"), shBox);
+
+ connect(shadeHoverOn, SIGNAL(toggled(bool)), this, SLOT(shadeHoverChanged(bool)));
+
+ shadeHover = new KIntNumInput(500, shBox);
+ shadeHover->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
+ shadeHover->setRange(0, 3000, 100, true);
+ shadeHover->setSteps(100, 100);
+ shadeHover->setSuffix(i18n(" msec"));
+
+ QWhatsThis::add(shadeHoverOn, i18n("If Shade Hover is enabled, a shaded window will un-shade automatically "
+ "when the mouse pointer has been over the title bar for some time."));
+
+ wtstr = i18n("Sets the time in milliseconds before the window unshades "
+ "when the mouse pointer goes over the shaded window.");
+ QWhatsThis::add(shadeHover, wtstr);
+
+ lay->addWidget(shBox);
+
+ // Any changes goes to slotChanged()
+ connect(animateShade, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(shadeHoverOn, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(shadeHover, SIGNAL(valueChanged(int)), SLOT(changed()));
+
+ electricBox = new QVButtonGroup(i18n("Active Desktop Borders"), this);
+ electricBox->setMargin(15);
+
+ QWhatsThis::add( electricBox, i18n("If this option is enabled, moving the mouse to a screen border"
+ " will change your desktop. This is e.g. useful if you want to drag windows from one desktop"
+ " to the other.") );
+ active_disable = new QRadioButton(i18n("D&isabled"), electricBox);
+ active_move = new QRadioButton(i18n("Only &when moving windows"), electricBox);
+ active_always = new QRadioButton(i18n("A&lways enabled"), electricBox);
+
+ delays = new KIntNumInput(10, electricBox);
+ delays->setRange(0, MAX_EDGE_RES, 50, true);
+ delays->setSuffix(i18n(" msec"));
+ delays->setLabel(i18n("Desktop &switch delay:"));
+ QWhatsThis::add( delays, i18n("Here you can set a delay for switching desktops using the active"
+ " borders feature. Desktops will be switched after the mouse has been pushed against a screen border"
+ " for the specified number of milliseconds.") );
+
+ connect( electricBox, SIGNAL(clicked(int)), this, SLOT(setEBorders()));
+
+ // Any changes goes to slotChanged()
+ connect(electricBox, SIGNAL(clicked(int)), SLOT(changed()));
+ connect(delays, SIGNAL(valueChanged(int)), SLOT(changed()));
+
+ lay->addWidget(electricBox);
+
+ QHBoxLayout* focusStealingLayout = new QHBoxLayout( lay,KDialog::spacingHint());
+ QLabel* focusStealingLabel = new QLabel( i18n( "Focus stealing prevention level:" ), this );
+ focusStealing = new QComboBox( this );
+ focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "None" ));
+ focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "Low" ));
+ focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "Normal" ));
+ focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "High" ));
+ focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "Extreme" ));
+ focusStealingLabel->setBuddy( focusStealing );
+ focusStealingLayout->addWidget( focusStealingLabel );
+ focusStealingLayout->addWidget( focusStealing, AlignLeft );
+ wtstr = i18n( "<p>This option specifies how much KWin will try to prevent unwanted focus stealing "
+ "caused by unexpected activation of new windows. (Note: This feature does not "
+ "work with the Focus Under Mouse or Focus Strictly Under Mouse focus policies.)"
+ "<ul>"
+ "<li><em>None:</em> Prevention is turned off "
+ "and new windows always become activated.</li>"
+ "<li><em>Low:</em> Prevention is enabled; when some window does not have support "
+ "for the underlying mechanism and KWin cannot reliably decide whether to "
+ "activate the window or not, it will be activated. This setting may have both "
+ "worse and better results than normal level, depending on the applications.</li>"
+ "<li><em>Normal:</em> Prevention is enabled.</li>"
+ "<li><em>High:</em> New windows get activated only if no window is currently active "
+ "or if they belong to the currently active application. This setting is probably "
+ "not really usable when not using mouse focus policy.</li>"
+ "<li><em>Extreme:</em> All windows must be explicitly activated by the user.</li>"
+ "</ul></p>"
+ "<p>Windows that are prevented from stealing focus are marked as demanding attention, "
+ "which by default means their taskbar entry will be highlighted. This can be changed "
+ "in the Notifications control module.</p>" );
+ QWhatsThis::add( focusStealing, wtstr );
+ QWhatsThis::add( focusStealingLabel, wtstr );
+ connect(focusStealing, SIGNAL(activated(int)), SLOT(changed()));
+
+ hideUtilityWindowsForInactive = new QCheckBox( i18n( "Hide utility windows for inactive applications" ), this );
+ QWhatsThis::add( hideUtilityWindowsForInactive,
+ i18n( "When turned on, utility windows (tool windows, torn-off menus,...) of inactive applications will be"
+ " hidden and will be shown only when the application becomes active. Note that applications"
+ " have to mark the windows with the proper window type for this feature to work." ));
+ connect(hideUtilityWindowsForInactive, SIGNAL(toggled(bool)), SLOT(changed()));
+ lay->addWidget( hideUtilityWindowsForInactive );
+
+ lay->addStretch();
+ load();
+
+}
+
+void KAdvancedConfig::setShadeHover(bool on) {
+ shadeHoverOn->setChecked(on);
+ shadeHover->setEnabled(on);
+}
+
+void KAdvancedConfig::setShadeHoverInterval(int k) {
+ shadeHover->setValue(k);
+}
+
+int KAdvancedConfig::getShadeHoverInterval() {
+
+ return shadeHover->value();
+}
+
+void KAdvancedConfig::shadeHoverChanged(bool a) {
+ shadeHover->setEnabled(a);
+}
+
+void KAdvancedConfig::setAnimateShade(bool a) {
+ animateShade->setChecked(a);
+}
+
+void KAdvancedConfig::setFocusStealing(int l) {
+ l = KMAX( 0, KMIN( 4, l ));
+ focusStealing->setCurrentItem(l);
+}
+
+void KAdvancedConfig::setHideUtilityWindowsForInactive(bool s) {
+ hideUtilityWindowsForInactive->setChecked( s );
+}
+
+void KAdvancedConfig::load( void )
+{
+ config->setGroup( "Windows" );
+
+ setAnimateShade(config->readBoolEntry(KWIN_ANIMSHADE, true));
+ setShadeHover(config->readBoolEntry(KWIN_SHADEHOVER, false));
+ setShadeHoverInterval(config->readNumEntry(KWIN_SHADEHOVER_INTERVAL, 250));
+
+ setElectricBorders(config->readNumEntry(KWM_ELECTRIC_BORDER, 0));
+ setElectricBorderDelay(config->readNumEntry(KWM_ELECTRIC_BORDER_DELAY, 150));
+
+// setFocusStealing( config->readNumEntry(KWIN_FOCUS_STEALING, 2 ));
+ // TODO default to low for now
+ setFocusStealing( config->readNumEntry(KWIN_FOCUS_STEALING, 1 ));
+ setHideUtilityWindowsForInactive( config->readBoolEntry( KWIN_HIDE_UTILITY, true ));
+
+ emit KCModule::changed(false);
+}
+
+void KAdvancedConfig::save( void )
+{
+ int v;
+
+ config->setGroup( "Windows" );
+ config->writeEntry(KWIN_ANIMSHADE, animateShade->isChecked());
+ if (shadeHoverOn->isChecked())
+ config->writeEntry(KWIN_SHADEHOVER, "on");
+ else
+ config->writeEntry(KWIN_SHADEHOVER, "off");
+
+ v = getShadeHoverInterval();
+ if (v<0) v = 0;
+ config->writeEntry(KWIN_SHADEHOVER_INTERVAL, v);
+
+ config->writeEntry(KWM_ELECTRIC_BORDER, getElectricBorders());
+ config->writeEntry(KWM_ELECTRIC_BORDER_DELAY,getElectricBorderDelay());
+
+ config->writeEntry(KWIN_FOCUS_STEALING, focusStealing->currentItem());
+ config->writeEntry(KWIN_HIDE_UTILITY, hideUtilityWindowsForInactive->isChecked());
+
+ if (standAlone)
+ {
+ config->sync();
+ if ( !kapp->dcopClient()->isAttached() )
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("kwin*", "", "reconfigure()", "");
+ }
+ emit KCModule::changed(false);
+}
+
+void KAdvancedConfig::defaults()
+{
+ setAnimateShade(true);
+ setShadeHover(false);
+ setShadeHoverInterval(250);
+ setElectricBorders(0);
+ setElectricBorderDelay(150);
+// setFocusStealing(2);
+ // TODO default to low for now
+ setFocusStealing(1);
+ setHideUtilityWindowsForInactive( true );
+ emit KCModule::changed(true);
+}
+
+void KAdvancedConfig::setEBorders()
+{
+ delays->setEnabled(!active_disable->isChecked());
+}
+
+int KAdvancedConfig::getElectricBorders()
+{
+ if (active_move->isChecked())
+ return 1;
+ if (active_always->isChecked())
+ return 2;
+ return 0;
+}
+
+int KAdvancedConfig::getElectricBorderDelay()
+{
+ return delays->value();
+}
+
+void KAdvancedConfig::setElectricBorders(int i){
+ switch(i)
+ {
+ case 1: active_move->setChecked(true); break;
+ case 2: active_always->setChecked(true); break;
+ default: active_disable->setChecked(true); break;
+ }
+ setEBorders();
+}
+
+void KAdvancedConfig::setElectricBorderDelay(int delay)
+{
+ delays->setValue(delay);
+}
+
+
+KMovingConfig::~KMovingConfig ()
+{
+ if (standAlone)
+ delete config;
+}
+
+KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *parent, const char *)
+ : KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
+{
+ QString wtstr;
+ QBoxLayout *lay = new QVBoxLayout (this, 0, KDialog::spacingHint());
+
+ windowsBox = new QButtonGroup(i18n("Windows"), this);
+ windowsBox->setColumnLayout( 0, Qt::Horizontal );
+
+ QBoxLayout *wLay = new QVBoxLayout (windowsBox->layout(), KDialog::spacingHint());
+
+ QBoxLayout *bLay = new QVBoxLayout;
+ wLay->addLayout(bLay);
+
+ opaque = new QCheckBox(i18n("Di&splay content in moving windows"), windowsBox);
+ bLay->addWidget(opaque);
+ QWhatsThis::add( opaque, i18n("Enable this option if you want a window's content to be fully shown"
+ " while moving it, instead of just showing a window 'skeleton'. The result may not be satisfying"
+ " on slow machines without graphic acceleration.") );
+
+ resizeOpaqueOn = new QCheckBox(i18n("Display content in &resizing windows"), windowsBox);
+ bLay->addWidget(resizeOpaqueOn);
+ QWhatsThis::add( resizeOpaqueOn, i18n("Enable this option if you want a window's content to be shown"
+ " while resizing it, instead of just showing a window 'skeleton'. The result may not be satisfying"
+ " on slow machines.") );
+
+ geometryTipOn = new QCheckBox(i18n("Display window &geometry when moving or resizing"), windowsBox);
+ bLay->addWidget(geometryTipOn);
+ QWhatsThis::add(geometryTipOn, i18n("Enable this option if you want a window's geometry to be displayed"
+ " while it is being moved or resized. The window position relative"
+ " to the top-left corner of the screen is displayed together with"
+ " its size."));
+
+ QGridLayout *rLay = new QGridLayout(2,3);
+ bLay->addLayout(rLay);
+ rLay->setColStretch(0,0);
+ rLay->setColStretch(1,1);
+
+ minimizeAnimOn = new QCheckBox(i18n("Animate minimi&ze and restore"),
+ windowsBox);
+ QWhatsThis::add( minimizeAnimOn, i18n("Enable this option if you want an animation shown when"
+ " windows are minimized or restored." ) );
+ rLay->addWidget(minimizeAnimOn,0,0);
+
+ minimizeAnimSlider = new QSlider(0,10,10,0,QSlider::Horizontal, windowsBox);
+ minimizeAnimSlider->setSteps(1, 1);
+ // QSlider::Below clashes with a X11/X.h #define
+ #undef Below
+ minimizeAnimSlider->setTickmarks(QSlider::Below);
+ rLay->addMultiCellWidget(minimizeAnimSlider,0,0,1,2);
+
+ connect(minimizeAnimOn, SIGNAL(toggled(bool)), this, SLOT(setMinimizeAnim(bool)));
+ connect(minimizeAnimSlider, SIGNAL(valueChanged(int)), this, SLOT(setMinimizeAnimSpeed(int)));
+
+ minimizeAnimSlowLabel= new QLabel(i18n("Slow"),windowsBox);
+ minimizeAnimSlowLabel->setAlignment(Qt::AlignTop|Qt::AlignLeft);
+ rLay->addWidget(minimizeAnimSlowLabel,1,1);
+
+ minimizeAnimFastLabel= new QLabel(i18n("Fast"),windowsBox);
+ minimizeAnimFastLabel->setAlignment(Qt::AlignTop|Qt::AlignRight);
+ rLay->addWidget(minimizeAnimFastLabel,1,2);
+
+ wtstr = i18n("Here you can set the speed of the animation shown when windows are"
+ " minimized and restored. ");
+ QWhatsThis::add( minimizeAnimSlider, wtstr );
+ QWhatsThis::add( minimizeAnimSlowLabel, wtstr );
+ QWhatsThis::add( minimizeAnimFastLabel, wtstr );
+
+ moveResizeMaximized = new QCheckBox( i18n("Allow moving and resizing o&f maximized windows"), windowsBox);
+ bLay->addWidget(moveResizeMaximized);
+ QWhatsThis::add(moveResizeMaximized, i18n("When enabled, this feature activates the border of maximized windows"
+ " and allows you to move or resize them,"
+ " just like for normal windows"));
+
+ QBoxLayout *vLay = new QHBoxLayout(bLay);
+
+ QLabel *plcLabel = new QLabel(i18n("&Placement:"),windowsBox);
+
+ placementCombo = new QComboBox(false, windowsBox);
+ placementCombo->insertItem(i18n("Smart"), SMART_PLACEMENT);
+ placementCombo->insertItem(i18n("Maximizing"), MAXIMIZING_PLACEMENT);
+ placementCombo->insertItem(i18n("Cascade"), CASCADE_PLACEMENT);
+ placementCombo->insertItem(i18n("Random"), RANDOM_PLACEMENT);
+ placementCombo->insertItem(i18n("Centered"), CENTERED_PLACEMENT);
+ placementCombo->insertItem(i18n("Zero-Cornered"), ZEROCORNERED_PLACEMENT);
+ // CT: disabling is needed as long as functionality misses in kwin
+ //placementCombo->insertItem(i18n("Interactive"), INTERACTIVE_PLACEMENT);
+ //placementCombo->insertItem(i18n("Manual"), MANUAL_PLACEMENT);
+ placementCombo->setCurrentItem(SMART_PLACEMENT);
+
+ // FIXME, when more policies have been added to KWin
+ wtstr = i18n("The placement policy determines where a new window"
+ " will appear on the desktop."
+ " <ul>"
+ " <li><em>Smart</em> will try to achieve a minimum overlap of windows</li>"
+ " <li><em>Maximizing</em> will try to maximize every window to fill the whole screen."
+ " It might be useful to selectively affect placement of some windows using"
+ " the window-specific settings.</li>"
+ " <li><em>Cascade</em> will cascade the windows</li>"
+ " <li><em>Random</em> will use a random position</li>"
+ " <li><em>Centered</em> will place the window centered</li>"
+ " <li><em>Zero-Cornered</em> will place the window in the top-left corner</li>"
+ "</ul>") ;
+
+ QWhatsThis::add( plcLabel, wtstr);
+ QWhatsThis::add( placementCombo, wtstr);
+
+ plcLabel->setBuddy(placementCombo);
+ vLay->addWidget(plcLabel, 0);
+ vLay->addWidget(placementCombo, 1, Qt::AlignLeft);
+
+ bLay->addSpacing(10);
+
+ lay->addWidget(windowsBox);
+
+ //iTLabel = new QLabel(i18n(" Allowed overlap:\n"
+ // "(% of desktop space)"),
+ // plcBox);
+ //iTLabel->setAlignment(AlignTop|AlignHCenter);
+ //pLay->addWidget(iTLabel,1,1);
+
+ //interactiveTrigger = new QSpinBox(0, 500, 1, plcBox);
+ //pLay->addWidget(interactiveTrigger,1,2);
+
+ //pLay->addRowSpacing(2,KDialog::spacingHint());
+
+ //lay->addWidget(plcBox);
+
+
+ //CT 15mar98 - add EdgeResistance, BorderAttractor, WindowsAttractor config
+ MagicBox = new QVButtonGroup(i18n("Snap Zones"), this);
+ MagicBox->setMargin(15);
+
+ BrdrSnap = new KIntNumInput(10, MagicBox);
+ BrdrSnap->setSpecialValueText( i18n("none") );
+ BrdrSnap->setRange( 0, MAX_BRDR_SNAP);
+ BrdrSnap->setLabel(i18n("&Border snap zone:"));
+ BrdrSnap->setSteps(1,10);
+ QWhatsThis::add( BrdrSnap, i18n("Here you can set the snap zone for screen borders, i.e."
+ " the 'strength' of the magnetic field which will make windows snap to the border when"
+ " moved near it.") );
+
+ WndwSnap = new KIntNumInput(10, MagicBox);
+ WndwSnap->setSpecialValueText( i18n("none") );
+ WndwSnap->setRange( 0, MAX_WNDW_SNAP);
+ WndwSnap->setLabel(i18n("&Window snap zone:"));
+ BrdrSnap->setSteps(1,10);
+ QWhatsThis::add( WndwSnap, i18n("Here you can set the snap zone for windows, i.e."
+ " the 'strength' of the magnetic field which will make windows snap to each other when"
+ " they're moved near another window.") );
+
+ OverlapSnap=new QCheckBox(i18n("Snap windows onl&y when overlapping"),MagicBox);
+ QWhatsThis::add( OverlapSnap, i18n("Here you can set that windows will be only"
+ " snapped if you try to overlap them, i.e. they will not be snapped if the windows"
+ " comes only near another window or border.") );
+
+ lay->addWidget(MagicBox);
+ lay->addStretch();
+
+ load();
+
+ // Any changes goes to slotChanged()
+ connect( opaque, SIGNAL(clicked()), SLOT(changed()));
+ connect( resizeOpaqueOn, SIGNAL(clicked()), SLOT(changed()));
+ connect( geometryTipOn, SIGNAL(clicked()), SLOT(changed()));
+ connect( minimizeAnimOn, SIGNAL(clicked() ), SLOT(changed()));
+ connect( minimizeAnimSlider, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect( moveResizeMaximized, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect( placementCombo, SIGNAL(activated(int)), SLOT(changed()));
+ connect( BrdrSnap, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect( BrdrSnap, SIGNAL(valueChanged(int)), SLOT(slotBrdrSnapChanged(int)));
+ connect( WndwSnap, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect( WndwSnap, SIGNAL(valueChanged(int)), SLOT(slotWndwSnapChanged(int)));
+ connect( OverlapSnap, SIGNAL(clicked()), SLOT(changed()));
+
+ // To get suffix to BrdrSnap and WndwSnap inputs with default values.
+ slotBrdrSnapChanged(BrdrSnap->value());
+ slotWndwSnapChanged(WndwSnap->value());
+}
+
+int KMovingConfig::getMove()
+{
+ return (opaque->isChecked())? OPAQUE : TRANSPARENT;
+}
+
+void KMovingConfig::setMove(int trans)
+{
+ opaque->setChecked(trans == OPAQUE);
+}
+
+void KMovingConfig::setGeometryTip(bool showGeometryTip)
+{
+ geometryTipOn->setChecked(showGeometryTip);
+}
+
+bool KMovingConfig::getGeometryTip()
+{
+ return geometryTipOn->isChecked();
+}
+
+// placement policy --- CT 31jan98 ---
+int KMovingConfig::getPlacement()
+{
+ return placementCombo->currentItem();
+}
+
+void KMovingConfig::setPlacement(int plac)
+{
+ placementCombo->setCurrentItem(plac);
+}
+
+bool KMovingConfig::getMinimizeAnim()
+{
+ return minimizeAnimOn->isChecked();
+}
+
+int KMovingConfig::getMinimizeAnimSpeed()
+{
+ return minimizeAnimSlider->value();
+}
+
+void KMovingConfig::setMinimizeAnim(bool anim)
+{
+ minimizeAnimOn->setChecked( anim );
+ minimizeAnimSlider->setEnabled( anim );
+ minimizeAnimSlowLabel->setEnabled( anim );
+ minimizeAnimFastLabel->setEnabled( anim );
+}
+
+void KMovingConfig::setMinimizeAnimSpeed(int speed)
+{
+ minimizeAnimSlider->setValue(speed);
+}
+
+int KMovingConfig::getResizeOpaque()
+{
+ return (resizeOpaqueOn->isChecked())? RESIZE_OPAQUE : RESIZE_TRANSPARENT;
+}
+
+void KMovingConfig::setResizeOpaque(int opaque)
+{
+ resizeOpaqueOn->setChecked(opaque == RESIZE_OPAQUE);
+}
+
+void KMovingConfig::setMoveResizeMaximized(bool a) {
+ moveResizeMaximized->setChecked(a);
+}
+
+void KMovingConfig::slotBrdrSnapChanged(int value) {
+ BrdrSnap->setSuffix(i18n(" pixel", " pixels", value));
+}
+
+void KMovingConfig::slotWndwSnapChanged(int value) {
+ WndwSnap->setSuffix(i18n(" pixel", " pixels", value));
+}
+
+void KMovingConfig::load( void )
+{
+ QString key;
+
+ config->setGroup( "Windows" );
+
+ key = config->readEntry(KWIN_MOVE, "Opaque");
+ if( key == "Transparent")
+ setMove(TRANSPARENT);
+ else if( key == "Opaque")
+ setMove(OPAQUE);
+
+ //CT 17Jun1998 - variable animation speed from 0 (none!!) to 10 (max)
+ bool anim = config->readBoolEntry(KWIN_MINIMIZE_ANIM, true );
+ int animSpeed = config->readNumEntry(KWIN_MINIMIZE_ANIM_SPEED, 5);
+ if( animSpeed < 1 ) animSpeed = 0;
+ if( animSpeed > 10 ) animSpeed = 10;
+ setMinimizeAnim( anim );
+ setMinimizeAnimSpeed( animSpeed );
+
+ // DF: please keep the default consistent with kwin (options.cpp line 145)
+ key = config->readEntry(KWIN_RESIZE_OPAQUE, "Opaque");
+ if( key == "Opaque")
+ setResizeOpaque(RESIZE_OPAQUE);
+ else if ( key == "Transparent")
+ setResizeOpaque(RESIZE_TRANSPARENT);
+
+ //KS 10Jan2003 - Geometry Tip during window move/resize
+ bool showGeomTip = config->readBoolEntry(KWIN_GEOMETRY, false);
+ setGeometryTip( showGeomTip );
+
+ // placement policy --- CT 19jan98 ---
+ key = config->readEntry(KWIN_PLACEMENT);
+ //CT 13mar98 interactive placement
+// if( key.left(11) == "interactive") {
+// setPlacement(INTERACTIVE_PLACEMENT);
+// int comma_pos = key.find(',');
+// if (comma_pos < 0)
+// interactiveTrigger->setValue(0);
+// else
+// interactiveTrigger->setValue (key.right(key.length()
+// - comma_pos).toUInt(0));
+// iTLabel->setEnabled(true);
+// interactiveTrigger->show();
+// }
+// else {
+// interactiveTrigger->setValue(0);
+// iTLabel->setEnabled(false);
+// interactiveTrigger->hide();
+ if( key == "Random")
+ setPlacement(RANDOM_PLACEMENT);
+ else if( key == "Cascade")
+ setPlacement(CASCADE_PLACEMENT); //CT 31jan98
+ //CT 31mar98 manual placement
+ else if( key == "manual")
+ setPlacement(MANUAL_PLACEMENT);
+ else if( key == "Centered")
+ setPlacement(CENTERED_PLACEMENT);
+ else if( key == "ZeroCornered")
+ setPlacement(ZEROCORNERED_PLACEMENT);
+ else if( key == "Maximizing")
+ setPlacement(MAXIMIZING_PLACEMENT);
+ else
+ setPlacement(SMART_PLACEMENT);
+// }
+
+ setMoveResizeMaximized(config->readBoolEntry(KWIN_MOVE_RESIZE_MAXIMIZED, false));
+
+ int v;
+
+ v = config->readNumEntry(KWM_BRDR_SNAP_ZONE, KWM_BRDR_SNAP_ZONE_DEFAULT);
+ if (v > MAX_BRDR_SNAP) setBorderSnapZone(MAX_BRDR_SNAP);
+ else if (v < 0) setBorderSnapZone (0);
+ else setBorderSnapZone(v);
+
+ v = config->readNumEntry(KWM_WNDW_SNAP_ZONE, KWM_WNDW_SNAP_ZONE_DEFAULT);
+ if (v > MAX_WNDW_SNAP) setWindowSnapZone(MAX_WNDW_SNAP);
+ else if (v < 0) setWindowSnapZone (0);
+ else setWindowSnapZone(v);
+
+ OverlapSnap->setChecked(config->readBoolEntry("SnapOnlyWhenOverlapping",false));
+ emit KCModule::changed(false);
+}
+
+void KMovingConfig::save( void )
+{
+ int v;
+
+ config->setGroup( "Windows" );
+
+ v = getMove();
+ if (v == TRANSPARENT)
+ config->writeEntry(KWIN_MOVE,"Transparent");
+ else
+ config->writeEntry(KWIN_MOVE,"Opaque");
+
+ config->writeEntry(KWIN_GEOMETRY, getGeometryTip());
+
+ // placement policy --- CT 31jan98 ---
+ v =getPlacement();
+ if (v == RANDOM_PLACEMENT)
+ config->writeEntry(KWIN_PLACEMENT, "Random");
+ else if (v == CASCADE_PLACEMENT)
+ config->writeEntry(KWIN_PLACEMENT, "Cascade");
+ else if (v == CENTERED_PLACEMENT)
+ config->writeEntry(KWIN_PLACEMENT, "Centered");
+ else if (v == ZEROCORNERED_PLACEMENT)
+ config->writeEntry(KWIN_PLACEMENT, "ZeroCornered");
+ else if (v == MAXIMIZING_PLACEMENT)
+ config->writeEntry(KWIN_PLACEMENT, "Maximizing");
+//CT 13mar98 manual and interactive placement
+// else if (v == MANUAL_PLACEMENT)
+// config->writeEntry(KWIN_PLACEMENT, "Manual");
+// else if (v == INTERACTIVE_PLACEMENT) {
+// QString tmpstr = QString("Interactive,%1").arg(interactiveTrigger->value());
+// config->writeEntry(KWIN_PLACEMENT, tmpstr);
+// }
+ else
+ config->writeEntry(KWIN_PLACEMENT, "Smart");
+
+ config->writeEntry(KWIN_MINIMIZE_ANIM, getMinimizeAnim());
+ config->writeEntry(KWIN_MINIMIZE_ANIM_SPEED, getMinimizeAnimSpeed());
+
+ v = getResizeOpaque();
+ if (v == RESIZE_OPAQUE)
+ config->writeEntry(KWIN_RESIZE_OPAQUE, "Opaque");
+ else
+ config->writeEntry(KWIN_RESIZE_OPAQUE, "Transparent");
+
+ config->writeEntry(KWIN_MOVE_RESIZE_MAXIMIZED, moveResizeMaximized->isChecked());
+
+
+ config->writeEntry(KWM_BRDR_SNAP_ZONE,getBorderSnapZone());
+ config->writeEntry(KWM_WNDW_SNAP_ZONE,getWindowSnapZone());
+ config->writeEntry("SnapOnlyWhenOverlapping",OverlapSnap->isChecked());
+
+ if (standAlone)
+ {
+ config->sync();
+ if ( !kapp->dcopClient()->isAttached() )
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("kwin*", "", "reconfigure()", "");
+ }
+ emit KCModule::changed(false);
+}
+
+void KMovingConfig::defaults()
+{
+ setMove(OPAQUE);
+ setResizeOpaque(RESIZE_TRANSPARENT);
+ setGeometryTip(false);
+ setPlacement(SMART_PLACEMENT);
+ setMoveResizeMaximized(false);
+
+ //copied from kcontrol/konq/kwindesktop, aleXXX
+ setWindowSnapZone(KWM_WNDW_SNAP_ZONE_DEFAULT);
+ setBorderSnapZone(KWM_BRDR_SNAP_ZONE_DEFAULT);
+ OverlapSnap->setChecked(false);
+
+ setMinimizeAnim( true );
+ setMinimizeAnimSpeed( 5 );
+ emit KCModule::changed(true);
+}
+
+int KMovingConfig::getBorderSnapZone() {
+ return BrdrSnap->value();
+}
+
+void KMovingConfig::setBorderSnapZone(int pxls) {
+ BrdrSnap->setValue(pxls);
+}
+
+int KMovingConfig::getWindowSnapZone() {
+ return WndwSnap->value();
+}
+
+void KMovingConfig::setWindowSnapZone(int pxls) {
+ WndwSnap->setValue(pxls);
+}
+
+KTranslucencyConfig::~KTranslucencyConfig ()
+{
+ if (standAlone)
+ delete config;
+ if (kompmgr)
+ kompmgr->detach();
+}
+
+KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, KConfig *_config, QWidget *parent, const char *)
+ : KCModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
+{
+ kompmgr = 0L;
+ resetKompmgr_ = FALSE;
+ QVBoxLayout *lay = new QVBoxLayout (this);
+ kompmgrAvailable_ = kompmgrAvailable();
+ if (!kompmgrAvailable_){
+ KActiveLabel *label = new KActiveLabel(i18n("<qt><b>It seems that alpha channel support is not available.</b><br><br>"
+ "Please make sure you have "
+ "<a href=\"http://www.freedesktop.org/\">Xorg &ge; 6.8</a>,"
+ " and installed the kompmgr that came with kwin.<br>"
+ "Also, make sure you have the following entries in your XConfig (e.g. /etc/X11/xorg.conf):<br><br>"
+ "<i>Section \"Extensions\"<br>"
+ "Option \"Composite\" \"Enable\"<br>"
+ "EndSection</i><br><br>"
+ "And if your GPU provides hardware-accelerated Xrender support (mainly nVidia cards):<br><br>"
+ "<i>Option \"RenderAccel\" \"true\"</i><br>"
+ "In <i>Section \"Device\"</i></qt>"), this);
+ lay->addWidget(label);
+ }
+ else
+ {
+ QTabWidget *tabW = new QTabWidget(this);
+ QWidget *tGroup = new QWidget(tabW);
+ QVBoxLayout *vLay = new QVBoxLayout (tGroup,KDialog::marginHint(), KDialog::spacingHint());
+ vLay->addSpacing(11); // to get the proper gb top offset
+
+ onlyDecoTranslucent = new QCheckBox(i18n("Apply translucency only to decoration"),tGroup);
+ vLay->addWidget(onlyDecoTranslucent);
+
+ vLay->addSpacing(11);
+
+ QGridLayout *gLay = new QGridLayout(vLay,4,2,KDialog::spacingHint());
+ gLay->setColStretch(1,1);
+
+ activeWindowTransparency = new QCheckBox(i18n("Active windows:"),tGroup);
+ gLay->addWidget(activeWindowTransparency,0,0);
+ activeWindowOpacity = new KIntNumInput(100, tGroup);
+ activeWindowOpacity->setRange(0,100);
+ activeWindowOpacity->setSuffix("%");
+ gLay->addWidget(activeWindowOpacity,0,1);
+
+ inactiveWindowTransparency = new QCheckBox(i18n("Inactive windows:"),tGroup);
+ gLay->addWidget(inactiveWindowTransparency,1,0);
+ inactiveWindowOpacity = new KIntNumInput(100, tGroup);
+ inactiveWindowOpacity->setRange(0,100);
+ inactiveWindowOpacity->setSuffix("%");
+ gLay->addWidget(inactiveWindowOpacity,1,1);
+
+ movingWindowTransparency = new QCheckBox(i18n("Moving windows:"),tGroup);
+ gLay->addWidget(movingWindowTransparency,2,0);
+ movingWindowOpacity = new KIntNumInput(100, tGroup);
+ movingWindowOpacity->setRange(0,100);
+ movingWindowOpacity->setSuffix("%");
+ gLay->addWidget(movingWindowOpacity,2,1);
+
+ dockWindowTransparency = new QCheckBox(i18n("Dock windows:"),tGroup);
+ gLay->addWidget(dockWindowTransparency,3,0);
+ dockWindowOpacity = new KIntNumInput(100, tGroup);
+ dockWindowOpacity->setRange(0,100);
+ dockWindowOpacity->setSuffix("%");
+ gLay->addWidget(dockWindowOpacity,3,1);
+
+ vLay->addSpacing(11);
+
+ keepAboveAsActive = new QCheckBox(i18n("Treat 'keep above' windows as active ones"),tGroup);
+ vLay->addWidget(keepAboveAsActive);
+
+ disableARGB = new QCheckBox(i18n("Disable ARGB windows (ignores window alpha maps, fixes gtk1 apps)"),tGroup);
+ vLay->addWidget(disableARGB);
+
+ vLay->addStretch();
+ tabW->addTab(tGroup, i18n("Opacity"));
+
+ QWidget *sGroup = new QWidget(tabW);
+// sGroup->setCheckable(TRUE);
+ QVBoxLayout *vLay2 = new QVBoxLayout (sGroup,11,6);
+ vLay2->addSpacing(11); // to get the proper gb top offset
+ useShadows = new QCheckBox(i18n("Use shadows"),sGroup);
+ vLay2->addWidget(useShadows);
+
+ vLay2->addSpacing(11);
+
+ QGridLayout *gLay2 = new QGridLayout(vLay2,6,2);
+ gLay2->setColStretch(1,1);
+
+ QLabel *label1 = new QLabel(i18n("Active window size:"),sGroup);
+ gLay2->addWidget(label1,0,0);
+ activeWindowShadowSize = new KIntNumInput(12,sGroup);
+ activeWindowShadowSize->setRange(0,32);
+// activeWindowShadowSize->setSuffix("px");
+ gLay2->addWidget(activeWindowShadowSize,0,1);
+
+ QLabel *label2 = new QLabel(i18n("Inactive window size:"),sGroup);
+ gLay2->addWidget(label2,1,0);
+ inactiveWindowShadowSize = new KIntNumInput(6,sGroup);
+ inactiveWindowShadowSize->setRange(0,32);
+// inactiveWindowShadowSize->setSuffix("px");
+ gLay2->addWidget(inactiveWindowShadowSize,1,1);
+
+ QLabel *label3 = new QLabel(i18n("Dock window size:"),sGroup);
+ gLay2->addWidget(label3,2,0);
+ dockWindowShadowSize = new KIntNumInput(6,sGroup);
+ dockWindowShadowSize->setRange(0,32);
+// dockWindowShadowSize->setSuffix("px");
+ gLay2->addWidget(dockWindowShadowSize,2,1);
+
+ QLabel *label4 = new QLabel(i18n("Vertical offset:"),sGroup);
+ gLay2->addWidget(label4,3,0);
+ shadowTopOffset = new KIntNumInput(80,sGroup);
+ shadowTopOffset->setSuffix("%");
+ shadowTopOffset->setRange(-200,200);
+ gLay2->addWidget(shadowTopOffset,3,1);
+
+ QLabel *label5 = new QLabel(i18n("Horizontal offset:"),sGroup);
+ gLay2->addWidget(label5,4,0);
+ shadowLeftOffset = new KIntNumInput(0,sGroup);
+ shadowLeftOffset->setSuffix("%");
+ shadowLeftOffset->setRange(-200,200);
+ gLay2->addWidget(shadowLeftOffset,4,1);
+
+ QLabel *label6 = new QLabel(i18n("Shadow color:"),sGroup);
+ gLay2->addWidget(label6,5,0);
+ shadowColor = new KColorButton(Qt::black,sGroup);
+ gLay2->addWidget(shadowColor,5,1);
+ gLay2->setColStretch(1,1);
+ vLay2->addSpacing(11);
+ removeShadowsOnMove = new QCheckBox(i18n("Remove shadows on move"),sGroup);
+ vLay2->addWidget(removeShadowsOnMove);
+ removeShadowsOnResize = new QCheckBox(i18n("Remove shadows on resize"),sGroup);
+ vLay2->addWidget(removeShadowsOnResize);
+ vLay2->addStretch();
+ tabW->addTab(sGroup, i18n("Shadows"));
+
+ QWidget *eGroup = new QWidget(this);
+ QVBoxLayout *vLay3 = new QVBoxLayout (eGroup,11,6);
+
+ fadeInWindows = new QCheckBox(i18n("Fade-in windows (including popups)"),eGroup);
+ fadeOnOpacityChange = new QCheckBox(i18n("Fade between opacity changes"),eGroup);
+ fadeInSpeed = new KIntNumInput(100, eGroup);
+ fadeInSpeed->setRange(1,100);
+ fadeInSpeed->setLabel(i18n("Fade-in speed:"));
+ fadeOutSpeed = new KIntNumInput(100, eGroup);
+ fadeOutSpeed->setRange(1,100);
+ fadeOutSpeed->setLabel(i18n("Fade-out speed:"));
+ vLay3->addWidget(fadeInWindows);
+ vLay3->addWidget(fadeOnOpacityChange);
+ vLay3->addWidget(fadeInSpeed);
+ vLay3->addWidget(fadeOutSpeed);
+ vLay3->addStretch();
+
+ tabW->addTab(eGroup, i18n("Effects"));
+
+ useTranslucency = new QCheckBox(i18n("Use translucency/shadows"),this);
+ lay->addWidget(useTranslucency);
+ lay->addWidget(tabW);
+
+ connect(useTranslucency, SIGNAL(toggled(bool)), tabW, SLOT(setEnabled(bool)));
+
+ connect(activeWindowTransparency, SIGNAL(toggled(bool)), activeWindowOpacity, SLOT(setEnabled(bool)));
+ connect(inactiveWindowTransparency, SIGNAL(toggled(bool)), inactiveWindowOpacity, SLOT(setEnabled(bool)));
+ connect(movingWindowTransparency, SIGNAL(toggled(bool)), movingWindowOpacity, SLOT(setEnabled(bool)));
+ connect(dockWindowTransparency, SIGNAL(toggled(bool)), dockWindowOpacity, SLOT(setEnabled(bool)));
+
+ connect(useTranslucency, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(onlyDecoTranslucent, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(activeWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(inactiveWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(movingWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(dockWindowTransparency, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(keepAboveAsActive, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(disableARGB, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(useShadows, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(removeShadowsOnResize, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(removeShadowsOnMove, SIGNAL(toggled(bool)), SLOT(changed()));
+
+ connect(activeWindowOpacity, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(inactiveWindowOpacity, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(movingWindowOpacity, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(dockWindowOpacity, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(dockWindowShadowSize, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(activeWindowShadowSize, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(inactiveWindowShadowSize, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(shadowTopOffset, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(shadowLeftOffset, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(shadowColor, SIGNAL(changed(const QColor&)), SLOT(changed()));
+ connect(fadeInWindows, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(fadeOnOpacityChange, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(fadeInSpeed, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(fadeOutSpeed, SIGNAL(valueChanged(int)), SLOT(changed()));
+
+ connect(useShadows, SIGNAL(toggled(bool)), dockWindowShadowSize, SLOT(setEnabled(bool)));
+ connect(useShadows, SIGNAL(toggled(bool)), activeWindowShadowSize, SLOT(setEnabled(bool)));
+ connect(useShadows, SIGNAL(toggled(bool)), inactiveWindowShadowSize, SLOT(setEnabled(bool)));
+ connect(useShadows, SIGNAL(toggled(bool)), shadowTopOffset, SLOT(setEnabled(bool)));
+ connect(useShadows, SIGNAL(toggled(bool)), shadowLeftOffset, SLOT(setEnabled(bool)));
+ connect(useShadows, SIGNAL(toggled(bool)), shadowColor, SLOT(setEnabled(bool)));
+
+ load();
+
+ tabW->setEnabled(useTranslucency->isChecked());
+
+ connect(useTranslucency, SIGNAL(toggled(bool)), this, SLOT(showWarning(bool)));
+
+ // handle kompmgr restarts if necessary
+ connect(useTranslucency, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
+ connect(disableARGB, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
+ connect(useShadows, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
+ connect(inactiveWindowShadowSize, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
+ connect(shadowTopOffset, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
+ connect(shadowLeftOffset, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
+ connect(shadowColor, SIGNAL(changed(const QColor&)), SLOT(resetKompmgr()));
+ connect(fadeInWindows, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
+ connect(fadeOnOpacityChange, SIGNAL(toggled(bool)), SLOT(resetKompmgr()));
+ connect(fadeInSpeed, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
+ connect(fadeOutSpeed, SIGNAL(valueChanged(int)), SLOT(resetKompmgr()));
+
+ }
+}
+
+void KTranslucencyConfig::resetKompmgr()
+{
+ resetKompmgr_ = TRUE;
+}
+void KTranslucencyConfig::load( void )
+{
+
+ if (!kompmgrAvailable_)
+ return;
+ config->setGroup( "Notification Messages" );
+ useTranslucency->setChecked(config->readBoolEntry("UseTranslucency",false));
+
+ config->setGroup( "Translucency" );
+ activeWindowTransparency->setChecked(config->readBoolEntry("TranslucentActiveWindows",false));
+ inactiveWindowTransparency->setChecked(config->readBoolEntry("TranslucentInactiveWindows",true));
+ movingWindowTransparency->setChecked(config->readBoolEntry("TranslucentMovingWindows",false));
+ removeShadowsOnMove->setChecked(config->readBoolEntry("RemoveShadowsOnMove",false));
+ removeShadowsOnResize->setChecked(config->readBoolEntry("RemoveShadowsOnResize",false));
+ dockWindowTransparency->setChecked(config->readBoolEntry("TranslucentDocks",true));
+ keepAboveAsActive->setChecked(config->readBoolEntry("TreatKeepAboveAsActive",true));
+ onlyDecoTranslucent->setChecked(config->readBoolEntry("OnlyDecoTranslucent",false));
+
+ activeWindowOpacity->setValue(config->readNumEntry("ActiveWindowOpacity",100));
+ inactiveWindowOpacity->setValue(config->readNumEntry("InactiveWindowOpacity",75));
+ movingWindowOpacity->setValue(config->readNumEntry("MovingWindowOpacity",25));
+ dockWindowOpacity->setValue(config->readNumEntry("DockOpacity",80));
+
+ int ass, iss, dss;
+ dss = config->readNumEntry("DockShadowSize", 33);
+ ass = config->readNumEntry("ActiveWindowShadowSize", 133);
+ iss = config->readNumEntry("InactiveWindowShadowSize", 67);
+
+ activeWindowOpacity->setEnabled(activeWindowTransparency->isChecked());
+ inactiveWindowOpacity->setEnabled(inactiveWindowTransparency->isChecked());
+ movingWindowOpacity->setEnabled(movingWindowTransparency->isChecked());
+ dockWindowOpacity->setEnabled(dockWindowTransparency->isChecked());
+
+ KConfig conf_(QDir::homeDirPath() + "/.xcompmgrrc");
+ conf_.setGroup("xcompmgr");
+
+ disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE));
+
+ useShadows->setChecked(conf_.readEntry("Compmode","CompClientShadows").compare("CompClientShadows") == 0);
+ shadowTopOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetY",-80)));
+ shadowLeftOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetX",0)));
+
+ int ss = conf_.readNumEntry("ShadowRadius",6);
+ dockWindowShadowSize->setValue((int)(dss*ss/100.0));
+ activeWindowShadowSize->setValue((int)(ass*ss/100.0));
+ inactiveWindowShadowSize->setValue((int)(iss*ss/100.0));
+
+ QString hex = conf_.readEntry("ShadowColor","#000000");
+ uint r, g, b;
+ r = g = b = 256;
+
+ if (sscanf(hex.latin1(), "0x%02x%02x%02x", &r, &g, &b)!=3 || r > 255 || g > 255 || b > 255)
+ shadowColor->setColor(Qt::black);
+ else
+ shadowColor->setColor(QColor(r,g,b));
+
+ fadeInWindows->setChecked(conf_.readBoolEntry("FadeWindows",TRUE));
+ fadeOnOpacityChange->setChecked(conf_.readBoolEntry("FadeTrans",FALSE));
+ fadeInSpeed->setValue((int)(conf_.readDoubleNumEntry("FadeInStep",0.020)*1000.0));
+ fadeOutSpeed->setValue((int)(conf_.readDoubleNumEntry("FadeOutStep",0.070)*1000.0));
+
+ emit KCModule::changed(false);
+}
+
+void KTranslucencyConfig::save( void )
+{
+ if (!kompmgrAvailable_)
+ return;
+ config->setGroup( "Notification Messages" );
+ config->writeEntry("UseTranslucency",useTranslucency->isChecked());
+
+ config->setGroup( "Translucency" );
+ config->writeEntry("TranslucentActiveWindows",activeWindowTransparency->isChecked());
+ config->writeEntry("TranslucentInactiveWindows",inactiveWindowTransparency->isChecked());
+ config->writeEntry("TranslucentMovingWindows",movingWindowTransparency->isChecked());
+ config->writeEntry("TranslucentDocks",dockWindowTransparency->isChecked());
+ config->writeEntry("TreatKeepAboveAsActive",keepAboveAsActive->isChecked());
+ config->writeEntry("ActiveWindowOpacity",activeWindowOpacity->value());
+ config->writeEntry("InactiveWindowOpacity",inactiveWindowOpacity->value());
+ config->writeEntry("MovingWindowOpacity",movingWindowOpacity->value());
+ config->writeEntry("DockOpacity",dockWindowOpacity->value());
+ // for simplification:
+ // xcompmgr supports a general shadow radius and additionally lets external apps set a multiplicator for each window
+ // (speed reasons, so the shadow matrix hasn't to be recreated for every window)
+ // we set inactive windows to 100%, the radius to the inactive window value and adjust the multiplicators for docks and active windows
+ // this way the user can set the three values without caring about the radius/multiplicator stuff
+ // additionally we find a value between big and small values to have a more smooth appereance
+ config->writeEntry("DockShadowSize",(int)(200.0 * dockWindowShadowSize->value() / (activeWindowShadowSize->value() + inactiveWindowShadowSize->value())));
+ config->writeEntry("ActiveWindowShadowSize",(int)(200.0 * activeWindowShadowSize->value() / (activeWindowShadowSize->value() + inactiveWindowShadowSize->value())));
+ config->writeEntry("InactiveWindowShadowSize",(int)(200.0 * inactiveWindowShadowSize->value() / (activeWindowShadowSize->value() + inactiveWindowShadowSize->value())));
+
+ config->writeEntry("RemoveShadowsOnMove",removeShadowsOnMove->isChecked());
+ config->writeEntry("RemoveShadowsOnResize",removeShadowsOnResize->isChecked());
+ config->writeEntry("OnlyDecoTranslucent", onlyDecoTranslucent->isChecked());
+ config->writeEntry("ResetKompmgr",resetKompmgr_);
+
+ KConfig *conf_ = new KConfig(QDir::homeDirPath() + "/.xcompmgrrc");
+ conf_->setGroup("xcompmgr");
+
+ conf_->writeEntry("Compmode",useShadows->isChecked()?"CompClientShadows":"");
+ conf_->writeEntry("DisableARGB",disableARGB->isChecked());
+ conf_->writeEntry("ShadowOffsetY",-1*shadowTopOffset->value());
+ conf_->writeEntry("ShadowOffsetX",-1*shadowLeftOffset->value());
+
+
+ int r, g, b;
+ shadowColor->color().rgb( &r, &g, &b );
+ QString hex;
+ hex.sprintf("0x%02X%02X%02X", r,g,b);
+ conf_->writeEntry("ShadowColor",hex);
+ conf_->writeEntry("ShadowRadius",(activeWindowShadowSize->value() + inactiveWindowShadowSize->value()) / 2);
+ conf_->writeEntry("FadeWindows",fadeInWindows->isChecked());
+ conf_->writeEntry("FadeTrans",fadeOnOpacityChange->isChecked());
+ conf_->writeEntry("FadeInStep",fadeInSpeed->value()/1000.0);
+ conf_->writeEntry("FadeOutStep",fadeOutSpeed->value()/1000.0);
+
+ delete conf_;
+
+ if (standAlone)
+ {
+ config->sync();
+ if ( !kapp->dcopClient()->isAttached() )
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("kwin*", "", "reconfigure()", "");
+ }
+ emit KCModule::changed(false);
+}
+
+void KTranslucencyConfig::defaults()
+{
+ if (!kompmgrAvailable_)
+ return;
+ useTranslucency->setChecked(false);
+ onlyDecoTranslucent->setChecked(false);
+ activeWindowTransparency->setChecked(false);
+ inactiveWindowTransparency->setChecked(true);
+ movingWindowTransparency->setChecked(false);
+ dockWindowTransparency->setChecked(true);
+ keepAboveAsActive->setChecked(true);
+ disableARGB->setChecked(false);
+
+ activeWindowOpacity->setValue(100);
+ inactiveWindowOpacity->setValue(75);
+ movingWindowOpacity->setValue(25);
+ dockWindowOpacity->setValue(80);
+
+ dockWindowShadowSize->setValue(6);
+ activeWindowShadowSize->setValue(12);
+ inactiveWindowShadowSize->setValue(6);
+ shadowTopOffset->setValue(80);
+ shadowLeftOffset->setValue(0);
+
+ activeWindowOpacity->setEnabled(false);
+ inactiveWindowOpacity->setEnabled(true);
+ movingWindowOpacity->setEnabled(false);
+ dockWindowOpacity->setEnabled(true);
+ useShadows->setChecked(TRUE);
+ removeShadowsOnMove->setChecked(FALSE);
+ removeShadowsOnResize->setChecked(FALSE);
+ shadowColor->setColor(Qt::black);
+ fadeInWindows->setChecked(TRUE);
+ fadeOnOpacityChange->setChecked(FALSE);
+ fadeInSpeed->setValue(70);
+ fadeOutSpeed->setValue(20);
+ emit KCModule::changed(true);
+}
+
+
+bool KTranslucencyConfig::kompmgrAvailable()
+{
+ bool ret;
+ KProcess proc;
+ proc << "kompmgr" << "-v";
+ ret = proc.start(KProcess::DontCare, KProcess::AllOutput);
+ proc.detach();
+ return ret;
+}
+
+void KTranslucencyConfig::showWarning(bool alphaActivated)
+{
+ if (alphaActivated)
+ KMessageBox::information(this, i18n("<qt>Translucency support is new and may cause problems<br> including crashes (sometimes the translucency engine, seldom even X).</qt>"), i18n("Warning"));
+}
+
+#include "windows.moc"
diff --git a/kwin/kcmkwin/kwinoptions/windows.h b/kwin/kcmkwin/kwinoptions/windows.h
new file mode 100644
index 000000000..60a4d69f0
--- /dev/null
+++ b/kwin/kcmkwin/kwinoptions/windows.h
@@ -0,0 +1,289 @@
+/*
+ * windows.h
+ *
+ * Copyright (c) 1997 Patrick Dowler dowler@morgul.fsh.uvic.ca
+ * Copyright (c) 2001 Waldo Bastian bastian@kde.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __KWINDOWCONFIG_H__
+#define __KWINDOWCONFIG_H__
+
+#include <qwidget.h>
+#include <kcmodule.h>
+#include <config.h>
+
+class QRadioButton;
+class QCheckBox;
+class QPushButton;
+class QComboBox;
+class QGroupBox;
+class QLabel;
+class QSlider;
+class QButtonGroup;
+class QSpinBox;
+class QVButtonGroup;
+
+class KColorButton;
+class KIntNumInput;
+
+#define TRANSPARENT 0
+#define OPAQUE 1
+
+#define CLICK_TO_FOCUS 0
+#define FOCUS_FOLLOW_MOUSE 1
+
+#define TITLEBAR_PLAIN 0
+#define TITLEBAR_SHADED 1
+
+#define RESIZE_TRANSPARENT 0
+#define RESIZE_OPAQUE 1
+
+#define SMART_PLACEMENT 0
+#define MAXIMIZING_PLACEMENT 1
+#define CASCADE_PLACEMENT 2
+#define RANDOM_PLACEMENT 3
+#define CENTERED_PLACEMENT 4
+#define ZEROCORNERED_PLACEMENT 5
+#define INTERACTIVE_PLACEMENT 6
+#define MANUAL_PLACEMENT 7
+
+#define CLICK_TO_FOCUS 0
+#define FOCUS_FOLLOWS_MOUSE 1
+#define FOCUS_UNDER_MOUSE 2
+#define FOCUS_STRICTLY_UNDER_MOUSE 3
+
+class QSpinBox;
+
+class KFocusConfig : public KCModule
+{
+ Q_OBJECT
+public:
+ KFocusConfig( bool _standAlone, KConfig *_config, QWidget *parent=0, const char* name=0 );
+ ~KFocusConfig();
+
+ void load();
+ void save();
+ void defaults();
+
+private slots:
+ void setDelayFocusEnabled();
+ void setAutoRaiseEnabled();
+ void autoRaiseOnTog(bool);//CT 23Oct1998
+ void delayFocusOnTog(bool);
+ void clickRaiseOnTog(bool);
+ void updateAltTabMode();
+ void changed() { emit KCModule::changed(true); }
+
+
+private:
+
+ int getFocus( void );
+ int getAutoRaiseInterval( void );
+ int getDelayFocusInterval( void );
+
+ void setFocus(int);
+ void setAutoRaiseInterval(int);
+ void setAutoRaise(bool);
+ void setDelayFocusInterval(int);
+ void setDelayFocus(bool);
+ void setClickRaise(bool);
+ void setAltTabMode(bool);
+ void setTraverseAll(bool);
+ void setRollOverDesktops(bool);
+ void setShowPopupinfo(bool);
+
+ QButtonGroup *fcsBox;
+ QComboBox *focusCombo;
+ QCheckBox *autoRaiseOn;
+ QCheckBox *delayFocusOn;
+ QCheckBox *clickRaiseOn;
+ KIntNumInput *autoRaise;
+ KIntNumInput *delayFocus;
+
+ QButtonGroup *kbdBox;
+ QCheckBox *altTabPopup;
+ QCheckBox *traverseAll;
+ QCheckBox *rollOverDesktops;
+ QCheckBox *showPopupinfo;
+
+ KConfig *config;
+ bool standAlone;
+};
+
+class KMovingConfig : public KCModule
+{
+ Q_OBJECT
+public:
+ KMovingConfig( bool _standAlone, KConfig *config, QWidget *parent=0, const char* name=0 );
+ ~KMovingConfig();
+
+ void load();
+ void save();
+ void defaults();
+
+private slots:
+ void setMinimizeAnim( bool );
+ void setMinimizeAnimSpeed( int );
+ void changed() { emit KCModule::changed(true); }
+ void slotBrdrSnapChanged( int );
+ void slotWndwSnapChanged( int );
+
+private:
+ int getMove( void );
+ bool getMinimizeAnim( void );
+ int getMinimizeAnimSpeed( void );
+ int getResizeOpaque ( void );
+ bool getGeometryTip( void ); //KS
+ int getPlacement( void ); //CT
+
+ void setMove(int);
+ void setResizeOpaque(int);
+ void setGeometryTip(bool); //KS
+ void setPlacement(int); //CT
+ void setMoveResizeMaximized(bool);
+
+ QButtonGroup *windowsBox;
+ QCheckBox *opaque;
+ QCheckBox *resizeOpaqueOn;
+ QCheckBox *geometryTipOn;
+ QCheckBox* minimizeAnimOn;
+ QSlider *minimizeAnimSlider;
+ QLabel *minimizeAnimSlowLabel, *minimizeAnimFastLabel;
+ QCheckBox *moveResizeMaximized;
+
+ QComboBox *placementCombo;
+
+ KConfig *config;
+ bool standAlone;
+
+ int getBorderSnapZone();
+ void setBorderSnapZone( int );
+ int getWindowSnapZone();
+ void setWindowSnapZone( int );
+
+ QVButtonGroup *MagicBox;
+ KIntNumInput *BrdrSnap, *WndwSnap;
+ QCheckBox *OverlapSnap;
+
+};
+
+class KAdvancedConfig : public KCModule
+{
+ Q_OBJECT
+public:
+ KAdvancedConfig( bool _standAlone, KConfig *config, QWidget *parent=0, const char* name=0 );
+ ~KAdvancedConfig();
+
+ void load();
+ void save();
+ void defaults();
+
+private slots:
+ void shadeHoverChanged(bool);
+
+ //copied from kcontrol/konq/kwindesktop, aleXXX
+ void setEBorders();
+
+ void changed() { emit KCModule::changed(true); }
+
+private:
+
+ int getShadeHoverInterval (void );
+ void setAnimateShade(bool);
+ void setShadeHover(bool);
+ void setShadeHoverInterval(int);
+
+ QCheckBox *animateShade;
+ QButtonGroup *shBox;
+ QCheckBox *shadeHoverOn;
+ KIntNumInput *shadeHover;
+
+ KConfig *config;
+ bool standAlone;
+
+ int getElectricBorders( void );
+ int getElectricBorderDelay();
+ void setElectricBorders( int );
+ void setElectricBorderDelay( int );
+
+ QVButtonGroup *electricBox;
+ QRadioButton *active_disable;
+ QRadioButton *active_move;
+ QRadioButton *active_always;
+ KIntNumInput *delays;
+
+ void setFocusStealing( int );
+ void setHideUtilityWindowsForInactive( bool );
+
+ QComboBox* focusStealing;
+ QCheckBox* hideUtilityWindowsForInactive;
+};
+
+class KProcess;
+class KTranslucencyConfig : public KCModule
+{
+ Q_OBJECT
+public:
+ KTranslucencyConfig( bool _standAlone, KConfig *config, QWidget *parent=0, const char* name=0 );
+ ~KTranslucencyConfig();
+
+ void load();
+ void save();
+ void defaults();
+
+private:
+ QCheckBox *useTranslucency;
+ QCheckBox *activeWindowTransparency;
+ QCheckBox *inactiveWindowTransparency;
+ QCheckBox *movingWindowTransparency;
+ QCheckBox *dockWindowTransparency;
+ QCheckBox *keepAboveAsActive;
+ QCheckBox *disableARGB;
+ QCheckBox *fadeInWindows;
+ QCheckBox *fadeOnOpacityChange;
+ QCheckBox *useShadows;
+ QCheckBox *removeShadowsOnResize;
+ QCheckBox *removeShadowsOnMove;
+ QGroupBox *sGroup;
+ QCheckBox *onlyDecoTranslucent;
+// QPushButton *xcompmgrButton;
+ KIntNumInput *activeWindowOpacity;
+ KIntNumInput *inactiveWindowOpacity;
+ KIntNumInput *movingWindowOpacity;
+ KIntNumInput *dockWindowOpacity;
+ KIntNumInput *dockWindowShadowSize;
+ KIntNumInput *activeWindowShadowSize;
+ KIntNumInput *inactiveWindowShadowSize;
+ KIntNumInput *shadowTopOffset;
+ KIntNumInput *shadowLeftOffset;
+ KIntNumInput *fadeInSpeed;
+ KIntNumInput *fadeOutSpeed;
+ KColorButton *shadowColor;
+ KConfig *config;
+ bool standAlone;
+ bool alphaActivated;
+ bool resetKompmgr_;
+ bool kompmgrAvailable();
+ bool kompmgrAvailable_;
+ KProcess *kompmgr;
+
+private slots:
+ void resetKompmgr();
+ void showWarning(bool alphaActivated);
+
+};
+#endif
diff --git a/kwin/kcmkwin/kwinrules/Makefile.am b/kwin/kcmkwin/kwinrules/Makefile.am
new file mode 100644
index 000000000..18aef9ccd
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/Makefile.am
@@ -0,0 +1,29 @@
+METASOURCES = AUTO
+AM_CPPFLAGS = $(all_includes) -DKCMRULES
+INCLUDES = -I$(top_srcdir)/kwin/lib
+
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kwin_rules_dialog.la
+kde_module_LTLIBRARIES = kcm_kwinrules.la
+noinst_LTLIBRARIES = libkwinrules.la
+
+libkwinrules_la_SOURCES = ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp \
+ ruleswidgetbase.ui ruleslistbase.ui detectwidgetbase.ui editshortcutbase.ui
+libkwinrules_la_LDFLAGS = $(all_libraries) -no-undefined
+libkwinrules_la_LIBADD = $(LIB_KDEUI)
+
+kcm_kwinrules_la_SOURCES = kcm.cpp
+kcm_kwinrules_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined
+kcm_kwinrules_la_LIBADD = libkwinrules.la
+kcm_kwinrules_la_COMPILE_FIRST = ruleslistbase.h ruleswidgetbase.h editshortcutbase.h
+
+kwin_rules_dialog_la_SOURCES = main.cpp
+kwin_rules_dialog_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined
+kwin_rules_dialog_la_LIBADD = libkwinrules.la
+kwin_rules_dialog_la_COMPILE_FIRST = ruleslistbase.h ruleswidgetbase.h editshortcutbase.h
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kcmkwinrules.pot
+
+xdg_apps_DATA = kwinrules.desktop
diff --git a/kwin/kcmkwin/kwinrules/detectwidget.cpp b/kwin/kcmkwin/kwinrules/detectwidget.cpp
new file mode 100644
index 000000000..1a8fa5af5
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/detectwidget.cpp
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "detectwidget.h"
+
+#include <kapplication.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <kwin.h>
+#include <qlabel.h>
+#include <qradiobutton.h>
+#include <qcheckbox.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+#include <fixx11h.h>
+
+namespace KWinInternal
+{
+
+DetectWidget::DetectWidget( QWidget* parent, const char* name )
+: DetectWidgetBase( parent, name )
+ {
+ }
+
+DetectDialog::DetectDialog( QWidget* parent, const char* name )
+: KDialogBase( parent, name, true, "", Ok | Cancel )
+, grabber( NULL )
+ {
+ widget = new DetectWidget( this );
+ setMainWidget( widget );
+ }
+
+void DetectDialog::detect( WId window )
+ {
+ if( window == 0 )
+ selectWindow();
+ else
+ readWindow( window );
+ }
+
+void DetectDialog::readWindow( WId w )
+ {
+ if( w == 0 )
+ {
+ emit detectionDone( false );
+ return;
+ }
+ info = KWin::windowInfo( w, -1U, -1U ); // read everything
+ if( !info.valid())
+ {
+ emit detectionDone( false );
+ return;
+ }
+ wmclass_class = info.windowClassClass();
+ wmclass_name = info.windowClassName();
+ role = info.windowRole();
+ type = info.windowType( NET::NormalMask | NET::DesktopMask | NET::DockMask
+ | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask
+ | NET::UtilityMask | NET::SplashMask );
+ title = info.name();
+ extrarole = ""; // TODO
+ machine = info.clientMachine();
+ executeDialog();
+ }
+
+void DetectDialog::executeDialog()
+ {
+ static const char* const types[] =
+ {
+ I18N_NOOP( "Normal Window" ),
+ I18N_NOOP( "Desktop" ),
+ I18N_NOOP( "Dock (panel)" ),
+ I18N_NOOP( "Toolbar" ),
+ I18N_NOOP( "Torn-Off Menu" ),
+ I18N_NOOP( "Dialog Window" ),
+ I18N_NOOP( "Override Type" ),
+ I18N_NOOP( "Standalone Menubar" ),
+ I18N_NOOP( "Utility Window" ),
+ I18N_NOOP( "Splash Screen" )
+ };
+ widget->class_label->setText( wmclass_class + " (" + wmclass_name + ' ' + wmclass_class + ")" );
+ widget->role_label->setText( role );
+ widget->use_role->setEnabled( !role.isEmpty());
+ if( widget->use_role->isEnabled())
+ widget->use_role->setChecked( true );
+ else
+ widget->use_whole_class->setChecked( true );
+ if( type == NET::Unknown )
+ widget->type_label->setText( i18n( "Unknown - will be treated as Normal Window" ));
+ else
+ widget->type_label->setText( i18n( types[ type ] ));
+ widget->title_label->setText( title );
+ widget->extrarole_label->setText( extrarole );
+ widget->machine_label->setText( machine );
+ emit detectionDone( exec() == QDialog::Accepted );
+ }
+
+QCString DetectDialog::selectedClass() const
+ {
+ if( widget->use_class->isChecked() || widget->use_role->isChecked())
+ return wmclass_class;
+ return wmclass_name + ' ' + wmclass_class;
+ }
+
+bool DetectDialog::selectedWholeClass() const
+ {
+ return widget->use_whole_class->isChecked();
+ }
+
+QCString DetectDialog::selectedRole() const
+ {
+ if( widget->use_role->isChecked())
+ return role;
+ return "";
+ }
+
+QString DetectDialog::selectedTitle() const
+ {
+ return title;
+ }
+
+Rules::StringMatch DetectDialog::titleMatch() const
+ {
+ return widget->match_title->isChecked() ? Rules::ExactMatch : Rules::UnimportantMatch;
+ }
+
+bool DetectDialog::selectedWholeApp() const
+ {
+ return widget->use_class->isChecked();
+ }
+
+NET::WindowType DetectDialog::selectedType() const
+ {
+ return type;
+ }
+
+QCString DetectDialog::selectedMachine() const
+ {
+ return machine;
+ }
+
+void DetectDialog::selectWindow()
+ {
+ // use a dialog, so that all user input is blocked
+ // use WX11BypassWM and moving away so that it's not actually visible
+ // grab only mouse, so that keyboard can be used e.g. for switching windows
+ grabber = new QDialog( NULL, NULL, true, WX11BypassWM );
+ grabber->move( -1000, -1000 );
+ grabber->show();
+ grabber->grabMouse( crossCursor );
+ grabber->installEventFilter( this );
+ }
+
+bool DetectDialog::eventFilter( QObject* o, QEvent* e )
+ {
+ if( o != grabber )
+ return false;
+ if( e->type() != QEvent::MouseButtonRelease )
+ return false;
+ delete grabber;
+ grabber = NULL;
+ if( static_cast< QMouseEvent* >( e )->button() != LeftButton )
+ {
+ emit detectionDone( false );
+ return true;
+ }
+ readWindow( findWindow());
+ return true;
+ }
+
+WId DetectDialog::findWindow()
+ {
+ Window root;
+ Window child;
+ uint mask;
+ int rootX, rootY, x, y;
+ Window parent = qt_xrootwin();
+ Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False );
+ for( int i = 0;
+ i < 10;
+ ++i )
+ {
+ XQueryPointer( qt_xdisplay(), parent, &root, &child,
+ &rootX, &rootY, &x, &y, &mask );
+ if( child == None )
+ return 0;
+ Atom type;
+ int format;
+ unsigned long nitems, after;
+ unsigned char* prop;
+ if( XGetWindowProperty( qt_xdisplay(), child, wm_state, 0, 0, False, AnyPropertyType,
+ &type, &format, &nitems, &after, &prop ) == Success )
+ {
+ if( prop != NULL )
+ XFree( prop );
+ if( type != None )
+ return child;
+ }
+ parent = child;
+ }
+ return 0;
+ }
+
+} // namespace
+
+#include "detectwidget.moc"
diff --git a/kwin/kcmkwin/kwinrules/detectwidget.h b/kwin/kcmkwin/kwinrules/detectwidget.h
new file mode 100644
index 000000000..593f4e056
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/detectwidget.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef __DETECTWIDGET_H__
+#define __DETECTWIDGET_H__
+
+#include "detectwidgetbase.h"
+
+#include <kdialogbase.h>
+#include <kwin.h>
+
+#include "../../rules.h"
+
+namespace KWinInternal
+{
+
+class DetectWidget
+ : public DetectWidgetBase
+ {
+ Q_OBJECT
+ public:
+ DetectWidget( QWidget* parent = NULL, const char* name = NULL );
+ };
+
+class DetectDialog
+ : public KDialogBase
+ {
+ Q_OBJECT
+ public:
+ DetectDialog( QWidget* parent = NULL, const char* name = NULL );
+ void detect( WId window );
+ QCString selectedClass() const;
+ bool selectedWholeClass() const;
+ QCString selectedRole() const;
+ bool selectedWholeApp() const;
+ NET::WindowType selectedType() const;
+ QString selectedTitle() const;
+ Rules::StringMatch titleMatch() const;
+ QCString selectedMachine() const;
+ const KWin::WindowInfo& windowInfo() const;
+ signals:
+ void detectionDone( bool );
+ protected:
+ virtual bool eventFilter( QObject* o, QEvent* e );
+ private:
+ void selectWindow();
+ void readWindow( WId window );
+ void executeDialog();
+ WId findWindow();
+ QCString wmclass_class;
+ QCString wmclass_name;
+ QCString role;
+ NET::WindowType type;
+ QString title;
+ QCString extrarole;
+ QCString machine;
+ DetectWidget* widget;
+ QDialog* grabber;
+ KWin::WindowInfo info;
+ };
+
+inline
+const KWin::WindowInfo& DetectDialog::windowInfo() const
+ {
+ return info;
+ }
+
+} // namespace
+
+#endif
diff --git a/kwin/kcmkwin/kwinrules/detectwidgetbase.ui b/kwin/kcmkwin/kwinrules/detectwidgetbase.ui
new file mode 100644
index 000000000..31cae3ef3
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/detectwidgetbase.ui
@@ -0,0 +1,218 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KWinInternal::DetectWidgetBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>Form3</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>523</width>
+ <height>325</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <spacer row="9" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="6" column="0">
+ <property name="name">
+ <cstring>textLabel11</cstring>
+ </property>
+ <property name="text">
+ <string>Extra role:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Class:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Role:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="1">
+ <property name="name">
+ <cstring>type_label</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel8</cstring>
+ </property>
+ <property name="text">
+ <string>Title:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="1">
+ <property name="name">
+ <cstring>class_label</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="1">
+ <property name="name">
+ <cstring>role_label</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="1">
+ <property name="name">
+ <cstring>title_label</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="7" column="1">
+ <property name="name">
+ <cstring>machine_label</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Type:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="6" column="1">
+ <property name="name">
+ <cstring>extrarole_label</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="7" column="0">
+ <property name="name">
+ <cstring>textLabel13</cstring>
+ </property>
+ <property name="text">
+ <string>Machine:</string>
+ </property>
+ </widget>
+ <widget class="Line" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>line1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel9</cstring>
+ </property>
+ <property name="text">
+ <string>Information About Selected Window</string>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="8" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>buttonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>use_class</cstring>
+ </property>
+ <property name="text">
+ <string>Use window &amp;class (whole application)</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>For selecting all windows belonging to a specific application, selecting only window class should usually work.</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>use_role</cstring>
+ </property>
+ <property name="text">
+ <string>Use window class and window &amp;role (specific window)</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>For selecting a specific window in an application, both window class and window role should be selected. Window class will determine the application, and window role the specific window in the application; many applications do not provide useful window roles though.</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>use_whole_class</cstring>
+ </property>
+ <property name="text">
+ <string>Use &amp;whole window class (specific window)</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>With some (non-KDE) applications whole window class can be sufficient for selecting a specific window in an application, as they set whole window class to contain both application and window role.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>match_title</cstring>
+ </property>
+ <property name="text">
+ <string>Match also window &amp;title</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</UI>
diff --git a/kwin/kcmkwin/kwinrules/editshortcutbase.ui b/kwin/kcmkwin/kwinrules/editshortcutbase.ui
new file mode 100644
index 000000000..3813ae589
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/editshortcutbase.ui
@@ -0,0 +1,164 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>EditShortcutBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>EditShortcutBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>587</width>
+ <height>402</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>A single shortcut can be easily assigned or cleared using the two buttons. Only shortcuts with modifiers can be used.&lt;p&gt;
+It is possible to have several possible shortcuts, and the first available shortcut will be used. The shortcuts are specified using space-separated shortcut sets. One set is specified as &lt;i&gt;base&lt;/i&gt;+(&lt;i&gt;list&lt;/i&gt;), where base are modifiers and list is a list of keys.&lt;br&gt;
+For example "&lt;b&gt;Shift+Alt+(123) Shift+Ctrl+(ABC)&lt;/b&gt;" will first try &lt;b&gt;Shift+Alt+1&lt;/b&gt;, then others with &lt;b&gt;Shift+Ctrl+C&lt;/b&gt; as the last one.</string>
+ </property>
+ <property name="textFormat">
+ <enum>RichText</enum>
+ </property>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>line1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>shortcut</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pushButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Single Shortcut</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pushButton2</cstring>
+ </property>
+ <property name="text">
+ <string>C&amp;lear</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>line2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>pushButton1</sender>
+ <signal>clicked()</signal>
+ <receiver>EditShortcutBase</receiver>
+ <slot>editShortcut()</slot>
+ </connection>
+ <connection>
+ <sender>pushButton2</sender>
+ <signal>clicked()</signal>
+ <receiver>EditShortcutBase</receiver>
+ <slot>clearShortcut()</slot>
+ </connection>
+</connections>
+<slots>
+ <slot access="protected" specifier="pure virtual">editShortcut()</slot>
+ <slot access="protected" specifier="pure virtual">clearShortcut()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</UI>
diff --git a/kwin/kcmkwin/kwinrules/kcm.cpp b/kwin/kcmkwin/kwinrules/kcm.cpp
new file mode 100644
index 000000000..b40cfa8b2
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/kcm.cpp
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "kcm.h"
+
+#include <kglobal.h>
+#include <qlayout.h>
+#include <klocale.h>
+#include <kapplication.h>
+#include <dcopclient.h>
+#include <kaboutdata.h>
+
+#include "ruleslist.h"
+
+extern "C"
+ KDE_EXPORT KCModule *create_kwinrules( QWidget *parent, const char *name )
+ {
+ //CT there's need for decision: kwm or kwin?
+ KGlobal::locale()->insertCatalogue( "kcmkwinrules" );
+ return new KWinInternal::KCMRules( parent, name );
+ }
+
+namespace KWinInternal
+{
+
+KCMRules::KCMRules( QWidget *parent, const char *name )
+: KCModule( parent, name )
+, config( "kwinrulesrc" )
+ {
+ QVBoxLayout *layout = new QVBoxLayout( this );
+ widget = new KCMRulesList( this );
+ layout->addWidget( widget );
+ connect( widget, SIGNAL( changed( bool )), SLOT( moduleChanged( bool )));
+ KAboutData *about = new KAboutData(I18N_NOOP( "kcmkwinrules" ),
+ I18N_NOOP( "Window-Specific Settings Configuration Module" ),
+ 0, 0, KAboutData::License_GPL, I18N_NOOP( "(c) 2004 KWin and KControl Authors" ));
+ about->addAuthor("Lubos Lunak",0,"l.lunak@kde.org");
+ setAboutData(about);
+ }
+
+void KCMRules::load()
+ {
+ config.reparseConfiguration();
+ widget->load();
+ emit KCModule::changed( false );
+ }
+
+void KCMRules::save()
+ {
+ widget->save();
+ emit KCModule::changed( false );
+ // Send signal to kwin
+ config.sync();
+ if( !kapp->dcopClient()->isAttached())
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("kwin*", "", "reconfigure()", "");
+ }
+
+void KCMRules::defaults()
+ {
+ widget->defaults();
+ }
+
+QString KCMRules::quickHelp() const
+ {
+ return i18n("<h1>Window-specific Settings</h1> Here you can customize window settings specifically only"
+ " for some windows."
+ " <p>Please note that this configuration will not take effect if you do not use"
+ " KWin as your window manager. If you do use a different window manager, please refer to its documentation"
+ " for how to customize window behavior.");
+ }
+
+void KCMRules::moduleChanged( bool state )
+ {
+ emit KCModule::changed( state );
+ }
+
+}
+
+// i18n freeze :-/
+#if 0
+I18N_NOOP("Remember settings separately for every window")
+I18N_NOOP("Show internal settings for remembering")
+I18N_NOOP("Internal setting for remembering")
+#endif
+
+
+#include "kcm.moc"
diff --git a/kwin/kcmkwin/kwinrules/kcm.h b/kwin/kcmkwin/kwinrules/kcm.h
new file mode 100644
index 000000000..47fba75d2
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/kcm.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef __KCM_H__
+#define __KCM_H__
+
+#include <kcmodule.h>
+#include <kconfig.h>
+
+class KConfig;
+class KAboutData;
+
+namespace KWinInternal
+{
+
+class KCMRulesList;
+
+class KCMRules
+ : public KCModule
+ {
+ Q_OBJECT
+ public:
+ KCMRules( QWidget *parent, const char *name );
+ virtual void load();
+ virtual void save();
+ virtual void defaults();
+ virtual QString quickHelp() const;
+ protected slots:
+ void moduleChanged( bool state );
+ private:
+ KCMRulesList* widget;
+ KConfig config;
+ };
+
+} // namespace
+
+#endif
diff --git a/kwin/kcmkwin/kwinrules/kwinrules.desktop b/kwin/kcmkwin/kwinrules/kwinrules.desktop
new file mode 100644
index 000000000..245994a8a
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/kwinrules.desktop
@@ -0,0 +1,209 @@
+[Desktop Entry]
+Icon=kcmkwm
+Type=Application
+Exec=kcmshell kwinrules
+DocPath=kcontrol/windowmanagement/index.html
+
+X-KDE-ModuleType=Library
+X-KDE-Library=kwinrules
+X-KDE-FactoryName=kwinrules
+
+Name=Window-Specific Settings
+Name[af]=Venser spesifike Instellings
+Name[ar]=تعيينات خاصة بالنوافذ
+Name[be]=Настаўленні для асобных вокнаў
+Name[bg]=Специфични прозорци
+Name[bn]=উইণ্ডো-প্রতি সেটিংস
+Name[bs]=Postavke specifične za ovaj prozor
+Name[ca]=Arranjament específic de finestra
+Name[cs]=Specifická nastavení oken
+Name[csb]=Nastôw specyficzny dlô òkna
+Name[cy]=Gosodiadau sy'n Benodol i'r Ffenestr
+Name[da]=Vinduesspecifik opsætning
+Name[de]=Fensterspezifische Einstellungen
+Name[el]=Ρυθμίσεις σχετικές με παράθυρα
+Name[eo]=Apartafenestraj Agordoj
+Name[es]=Preferencias específicas de la ventana
+Name[et]=Akende seadistused
+Name[eu]=Leihoen ezarpen espezifikoak
+Name[fa]=تنظیمات مشخص پنجره
+Name[fi]=Ikkunakohtaiset asetukset
+Name[fr]=Paramètres spécifiques à la fenêtre
+Name[fy]=Finsterspesifike ynstellings
+Name[gl]=Opcións específicas da fiestra
+Name[he]=הגדרות חלונות ספציפיות
+Name[hi]=विशिष्ट-विंडो विन्यास
+Name[hr]=Postavke za prozor
+Name[hu]=Egyedi ablakbeállítások
+Name[is]=Stillingar einstakra glugga
+Name[it]=Impostazioni specifiche della finestra
+Name[ja]=ウィンドウ固有の設定
+Name[ka]=ფანჯრის განსაკუთრებული პარამეტრები
+Name[kk]=Терезенің ерекше параметрлері
+Name[km]=ការ​កំណត់​សម្រាប់​បង្អួច
+Name[ko]=창 지정
+Name[lt]=Nuo lango priklausantys nustatymai
+Name[lv]=Specifiski logu parametri
+Name[mk]=Поставувања по прозорец
+Name[nb]=Innstillinger for vinduer
+Name[nds]=Instellen för enkelte Finstern
+Name[ne]=सञ्झ्याल निर्दिष्ट सेटिङ
+Name[nl]=Vensterspecifieke instellingen
+Name[nn]=Instillingar for vindauge
+Name[pa]=ਝਰੋਖਾ-ਖਾਸ ਸਥਾਪਨ
+Name[pl]=Ustawienia danego okna
+Name[pt]=Opções Específicas da Janela
+Name[pt_BR]=Configurações Específicas da Janela
+Name[ro]=Setări specifice fereastră
+Name[ru]=Особые параметры окна
+Name[rw]=Amagenamiterere y'Idirishya-Ryihariye
+Name[se]=Láseheivehusat
+Name[sk]=Špecifické nastavenia okna
+Name[sl]=Nastavitve glede na okno
+Name[sr]=Посебне поставке за прозоре
+Name[sr@Latn]=Posebne postavke za prozore
+Name[sv]=Fönsterspecifika inställningar
+Name[ta]=சாளர-குறிப்பிடும் அமைப்புகள்
+Name[th]=ตั้งค่าเกี่ยวกับหน้าต่างโดยเฉพาะ
+Name[tr]=Pencereye Özel Seçenekler
+Name[tt]=Täräzägä-Bäyle Caylawlar
+Name[uk]=Параметри для окремих вікон
+Name[uz]=Oynaga oid moslamalar
+Name[uz@cyrillic]=Ойнага оид мосламалар
+Name[vi]=Thiết lập Danh riêng cho Cửa sổ
+Name[wa]=Apontiaedjes specifikes a-z on purnea
+Name[zh_CN]=特定窗口的设置
+Name[zh_TW]=特定視窗設定
+
+Comment=Configure settings specifically for a window
+Comment[af]=Stel spesifieke venster instellings op
+Comment[ar]=إعداد التعيينات الخاصة بنافذة
+Comment[be]=Настаўленні для кожнага вакна асабіста
+Comment[bg]=Настройване на специфични особености за отделните прозорци
+Comment[bn]=শুধুমাত্র এই বিশেষ উইণ্ডো-টির সেটিংস কনফিগার করুন
+Comment[bs]=Podesite postavke specifične za ovaj prozor
+Comment[ca]=Configura l'arranjament específicament per a una finestra
+Comment[cs]=Nastavení specifická pro okno
+Comment[csb]=Kònfigùracëjô nastôwów specyficznëch dlô wëbrónegò òkna
+Comment[cy]=Ffurfweddu gosodiadau yn benodol ar gyfer ffenestr
+Comment[da]=Indstil opsætning specifikt for et vindue
+Comment[de]=Einstellungen für einzelne Fenster vornehmen
+Comment[el]=Ρυθμίσεις σχετικές ειδικά με Ένα Παράθυρο
+Comment[eo]=Agordi nur por tiu fenestro
+Comment[es]=Configurar parámetros específicos de una ventana
+Comment[et]=Spetsiaalselt akendega seotud seadistused
+Comment[eu]=Konfiguratu leiho jakin baten ezarpenak
+Comment[fa]=پیکربندی تنظیمات برای پنجره به طور ‌ویژه
+Comment[fi]=Muokkaa ikkunakohtaisia asetuksia
+Comment[fr]=Configuration de paramètres spécifiques à une fenêtre
+Comment[fy]=Hjir kinne jo ynstellings kieze spesifyk foar ien finster
+Comment[ga]=Cumraigh na socruithe le haghaidh fuinneoige ar leith
+Comment[gl]=Configuración das opcións específicas para unha fiestra
+Comment[he]=קבע הגדרות לחלון מסוים
+Comment[hi]=किसी खास विंडो के लिए विन्यास कॉन्फ़िगर करें
+Comment[hr]=Konfiguriranje određenih postavki za prozor
+Comment[hu]=Egy adott ablak beállításai
+Comment[is]=Stillingar sem varða tiltekinn glugga
+Comment[it]=Configura le impostazioni specifiche di una finestra
+Comment[ja]=特定のウィンドウに固有の設定を行います
+Comment[ka]=ფანჯრის განსაკუთრებული პარამეტრების კონფიგურაცია
+Comment[kk]=Терезенің ерекше параметрлерін баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​ការ​កំណត់​ពិសេស​សម្រាប់​បង្អួច​មួយ
+Comment[ko]=창마다의 개별 설정
+Comment[lt]=Čia galite konfigūruoti konkretaus lango nustatymus
+Comment[lv]=Konfigurē parametrus priekš speciāla loga
+Comment[mk]=Конфигурирајте ги поставувањата за поодделни прозорци
+Comment[mt]=Ikkonfigura setings li jistgħu itejbu l-veloċità ta' KDE
+Comment[nb]=Innstillinger som er knyttet til et spesielt vindu
+Comment[nds]=Instellen för enkelte Finstern
+Comment[ne]=सञ्झ्यालका लागि निर्दिष्ट तरिकाले सेटिङ कन्फिगर गर्नुहोस्
+Comment[nl]=Hier kunt u instellingen kiezen specifiek voor één venster
+Comment[nn]=Innstillingar som er knytte til eitt særskilt vindauge
+Comment[pa]=ਇੱਕ ਝਰੋਖੇ ਲਈ ਖਾਸ ਸਥਾਪਨ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja ustawień wybranego okna
+Comment[pt]=Configura as opções especificamente para uma janela
+Comment[pt_BR]=Configurações específicas para uma janela
+Comment[ro]=Configurează setări specifice anumitor ferestre
+Comment[ru]=Настройка особых параметров окна
+Comment[rw]=Kuboneza Amagenamiterere mu buryo bwihariye bw'idirishya
+Comment[se]=Heivehusat erenoamáš láse várás
+Comment[sk]=Nastavenie pre jednotlivé okná
+Comment[sl]=Nastavite možnosti glede na posamezno okno
+Comment[sr]=Подешавање поставки посебно за прозор
+Comment[sr@Latn]=Podešavanje postavki posebno za prozor
+Comment[sv]=Anpassa inställningar specifikt för ett fönster
+Comment[ta]=KDE செயல்திறனை அதிகப்படுத்தும் அமைப்புகளை அமை
+Comment[th]=ปรับแต่งค่าต่างๆ ที่เกี่ยวกับหน้าต่างโดยเฉพาะ
+Comment[tr]=Bir pencere için özel olan seçenekleri yapılandır
+Comment[tt]=Täräzä öçen ayırım caylawlar
+Comment[uk]=Налаштування параметрів для окремого типу вікон
+Comment[uz]=Oynaga oid boʻlgan moslamalarni moslash
+Comment[uz@cyrillic]=Ойнага оид бўлган мосламаларни мослаш
+Comment[vi]=Thiết lập cài đặt dành riêng cho cửa sổ
+Comment[wa]=Apontiaedjes specifikes po-z on purnea
+Comment[zh_CN]=配置一个窗口的设置
+Comment[zh_TW]=設定特定視窗設定值
+
+Keywords=size,position,state,window behavior,windows,specific,workarounds,remember,rules
+Keywords[ar]=القياس,الموضع,الحالة,سلوك النافذة,نوافذ,خاص,تدكر,قواعد,معاملات
+Keywords[be]=Памер,Пазіцыя,Стан,Паводзіны акна,Вокны,Акно,Спецыфічныя,Запомніць,Правілы,size,position,state,window behavior,windows,specific,workarounds,remember,rules
+Keywords[bg]=размер, позиция, състояние, прозорец, поведение,правила, запомняне,size,position,state,window behavior,windows,specific,workarounds,remember,rules
+Keywords[bs]=size,position,state,window behavior,windows,specific,workarounds,remember,rules,veličina,položaj,ponašanje prozora,prozori,specifično,pravila
+Keywords[ca]=mida,posició,estat,comportament de finestra,finestres,específic,reparacions,recorda,regles
+Keywords[cs]=velikost,pozice,umístění,stav,chování oken,pravidla
+Keywords[csb]=miara,pòłożenié,stón,ùchòwanié òknół,òkna,spamiãtanié nastôwów,zapamiãtanié nastôwów,regle
+Keywords[cy]=maint,lleoliad,cyflwr,ffenestr,ymddygiad,ffenestri,penodol,ffyrdd osgoi,cofio,rheolau
+Keywords[da]=størrelse,position,tilstand,vinduesopførsel,vinduer,specifik, omgåelse,husk,regler
+Keywords[de]=Größe,Position,Status,Fensterverhalten,Fenster,Regeln
+Keywords[el]=μέγεθος,θέση,κατάσταση,συμπεριφορά παραθύρου,παράθυρα,ειδικές,λύσεις,αποθήκευση,κανόνων
+Keywords[en_GB]=size,position,state,window behaviour,windows,specific,workarounds,remember,rules
+Keywords[eo]=grandeco,pozicio,stato,fenestra konduto,fenestroj,reguloj
+Keywords[es]=tamaño,posición,estado,comportamiento de la ventana,ventanas,específico,soluciones,recordar,reglas
+Keywords[et]=suurus,asend,olek,akna käitumine,aknad,spetsiaalne,kohandamine,reeglid
+Keywords[eu]=neurria,kokapena,egoera,leihoaren portaera,leihoak,espezifikoa,konponbideak,gogoratu,arauak
+Keywords[fa]=اندازه، موقعیت، وضعیت، رفتار پنجره، پنجره‌ها، مشخص، workarounds، یادآوری، قواعد
+Keywords[fi]=koko,sijainti,tila,ikkunan käyttäytyminen,ikkunat,ikkunakohtainen,säännöt
+Keywords[fr]=taille,position,état,comportement de fenêtre,fenêtres,spécifique,astuces,souvenir,règles
+Keywords[fy]=grootte,grutte,positie,posysje,venstergedrag,finstergedrach,vensters,finsters,specifiek,spesifyk,alternatieven,alternativen,onthouden,ûnthâlde,regels
+Keywords[ga]=méid,ionad,staid,oibriú na bhfuinneog,fuinneoga,sainiúil,réitigh seiftithe,meabhraigh,rialacha
+Keywords[gl]=tamaño,posición,estado,comportamento da fiestra,fiestras,específico,lembrar,reglas
+Keywords[he]=גודל, מיקום, מצב, חלון, התנהגות, חלונות, אישית, זכור, חוקים, size,position,state,window behavior,windows,specific,workarounds,remember,rules
+Keywords[hi]=आकार,स्थान,स्थिति,विंडो व्यवहार,विंडोज़,विशिष्ट,कार्य-विकल्प,याददाश्त,नियम
+Keywords[hr]=size,position,state,window behavior,windows,specific,workarounds,remember,rules,veličina,položaj,smještaj,stanje,ponašanje prozora,prozori,rješenja,zapamti,upamti,pravila
+Keywords[hu]=méret,pozíció,állapot,ablakműködés,ablakok,specifikus,megjegyzés,szabályok
+Keywords[id]=ukuran,posisi,status,perilaku jendela,jendela, spesifik,solusi,remember,aturan
+Keywords[it]=dimensione,posizione,stato,comportamento finestra,finestre,specifico,ricorda,regole
+Keywords[ja]=サイズ,位置,状態,ウィンドウの挙動,windows,特定,ワークアラウンド,記憶,ルール
+Keywords[km]=ទំហំ,ទីតាំង,សភាព,ឥរិយាបថ​បង្អួច បង្អួចs ជាក់លាក់c ចងចាំr ច្បាប់s
+Keywords[lt]=size,position,state,window behavior,windows,specific,workarounds,remember,rules,dydis,pozicija,būsena,lango eelgesys,langai,atsiminti,taisyklės
+Keywords[lv]=izmērs,novietojums,statuss,loga izturēšanās,logi,specifisks,apjājiens,atcerēties,noteikumi
+Keywords[mk]=size,position,state,window behavior,windows,specific,workarounds,remember,rules,големина,позиција,состојба,однесување на прозорец,специфично,заобиколни
+Keywords[mt]=size,position,state,window behavior,windows,specific,workarounds,remember,rules,daqs
+Keywords[nb]=størrelse,posisjon,status,vindusoppførsel,vinduer,spesifikk,jukseløsninger,husk,regler
+Keywords[nds]=Grött,Positschoon,Status,Finsterbedregen,Finstern,enkel,enkelte,Regeln,behollen,workaround
+Keywords[ne]=साइज, स्थिति, अवस्था, सञ्झ्याल व्यवहार, सञ्झ्यालहरू, निर्दिष्ट, कार्यक्षेत्र, याद गर्नुहोस्, नियम
+Keywords[nl]=grootte,positie,venstergedrag,vensters,specifiek,alternatieven,onthouden,regels
+Keywords[nn]=storleik,plassering,tilstand,vindaugsåtferd,vindauge,spesifikk,jukseløysingar,hugs,reglar
+Keywords[pa]=ਅਕਾਰ,ਸਥਿਤੀ,ਝਰੋਖਾ ਵਿਵਹਾਰ,ਝਰੋਖੇ,ਖਾਸ,ਯਾਦ ਰੱਖੋ,ਨਿਯਮ
+Keywords[pl]=rozmiar,położenie,stan,zachowanie okien,okna,zapamiętywanie ustawień,reguły
+Keywords[pt]=tamanho,posição,estado,comportamento da janela,janelas,específico,recordar,regras
+Keywords[pt_BR]=tamanho,posição, estado, comportamento da janela, janelas, específica, elementos, lembrar, regras
+Keywords[ro]=mărime,poziție,stare,comportament fereastră,ferestre,specific,reguli
+Keywords[rw]=Ingano,Ibirindiro,leta, imyitwarire y'idirishya,amadirishya,byihariye, amakorahafi,kwibuka,amategeko
+Keywords[se]=sturrodat,sajádat,dilli,láseláhtten,láset,erenoamáš,fillenčovdosat,muitte,njuolggadusat
+Keywords[sk]=veľkosť,pozícia,stav,správanie okna,okná,špecifické,jedno okno,opravy,pravidlá
+Keywords[sl]=velikost,položaj,stanje,obnašanje okna,okna,posebno,obvoz,zapomni,pravila
+Keywords[sr]=величина,позиција,стање,понашање прозора,прозори,запамти,правила
+Keywords[sr@Latn]=veličina,pozicija,stanje,ponašanje prozora,prozori,zapamti,pravila
+Keywords[sv]=storlek,position,tillstånd,fönsterbeteende,fönster,specifik,komma runt,komma ihåg,regler
+Keywords[ta]=அளவு,நிலை,மாநிலம்,சாளர நடத்தை,சாளரங்கள்,குறிப்பிட்ட,பணிவட்டாரங்கள்,விதிகள்
+Keywords[th]=ขนาด,ตำแหน่ง,สถานะ,พฤติกรรมหน้าต่าง,หน้าต่าง,โดยเฉพาะ,หารอบๆ,จำ,กฎ
+Keywords[tr]=boyut,yer,pozisyon,durum,pencere davranışı,pencereler,özel,çalışma alanı,hatırla,kurallar
+Keywords[uk]=розмір,позиція,стан,поведінка вікна,вікна,окремі,підігнати,запам'ятати,правила
+Keywords[uz]=oʻlcham,joy,holat,oynaning xususiyatlari,oynalar,maxsus,eslab qolish,qoidalar
+Keywords[uz@cyrillic]=ўлчам,жой,ҳолат,ойнанинг хусусиятлари,ойналар,махсус,эслаб қолиш,қоидалар
+Keywords[vi]=kích cỡ,vị trí,trạng thái,ứng xử cửa sổ,cửa sổ,dành riêng,cách chữa chạy,nhớ,quy tắc
+Keywords[wa]=grandeu,plaece,estat,estance,dujhance des purneas,purneas,specifike,workarounds,remember,rîles,sovni,sovnance
+Keywords[zh_CN]=size,position,state,window behavior,windows,specific,workarounds,remember,rules,大小,位置,状态,窗口行为,窗口,特定,工作区,记住,规则
+Keywords[zh_TW]=size,position,state,window behavior,windows,specific,workarounds,remember,rules,大小,位置,狀態,視窗行為,視窗,指定,記憶,規則
+Categories=Qt;KDE;X-KDE-settings-desktop;
diff --git a/kwin/kcmkwin/kwinrules/kwinsrc.cpp b/kwin/kcmkwin/kwinrules/kwinsrc.cpp
new file mode 100644
index 000000000..38f48e003
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/kwinsrc.cpp
@@ -0,0 +1,8 @@
+// Include some code from kwin core in order to avoid
+// double implementation.
+
+#include "ruleslist.h"
+#include "../../rules.cpp"
+#include "../../placement.cpp"
+#include "../../options.cpp"
+#include "../../utils.cpp"
diff --git a/kwin/kcmkwin/kwinrules/main.cpp b/kwin/kcmkwin/kwinrules/main.cpp
new file mode 100644
index 000000000..9657e3649
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/main.cpp
@@ -0,0 +1,294 @@
+/*
+ * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <kcmdlineargs.h>
+#include <kapplication.h>
+#include <dcopclient.h>
+#include <kconfig.h>
+#include <klocale.h>
+#include <kwin.h>
+
+#include <X11/Xlib.h>
+#include <fixx11h.h>
+
+#include "ruleswidget.h"
+#include "../../rules.h"
+
+namespace KWinInternal
+{
+
+static void loadRules( QValueList< Rules* >& rules )
+ {
+ KConfig cfg( "kwinrulesrc", true );
+ cfg.setGroup( "General" );
+ int count = cfg.readNumEntry( "count" );
+ for( int i = 1;
+ i <= count;
+ ++i )
+ {
+ cfg.setGroup( QString::number( i ));
+ Rules* rule = new Rules( cfg );
+ rules.append( rule );
+ }
+ }
+
+static void saveRules( const QValueList< Rules* >& rules )
+ {
+ KConfig cfg( "kwinrulesrc" );
+ QStringList groups = cfg.groupList();
+ for( QStringList::ConstIterator it = groups.begin();
+ it != groups.end();
+ ++it )
+ cfg.deleteGroup( *it );
+ cfg.setGroup( "General" );
+ cfg.writeEntry( "count", rules.count());
+ int i = 1;
+ for( QValueList< Rules* >::ConstIterator it = rules.begin();
+ it != rules.end();
+ ++it )
+ {
+ cfg.setGroup( QString::number( i ));
+ (*it)->write( cfg );
+ ++i;
+ }
+ }
+
+static Rules* findRule( const QValueList< Rules* >& rules, Window wid, bool whole_app )
+ {
+ KWin::WindowInfo info = KWin::windowInfo( wid,
+ NET::WMName | NET::WMWindowType,
+ NET::WM2WindowClass | NET::WM2WindowRole | NET::WM2ClientMachine );
+ if( !info.valid()) // shouldn't really happen
+ return NULL;
+ QCString wmclass_class = info.windowClassClass().lower();
+ QCString wmclass_name = info.windowClassName().lower();
+ QCString role = info.windowRole().lower();
+ NET::WindowType type = info.windowType( NET::NormalMask | NET::DesktopMask | NET::DockMask
+ | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask
+ | NET::UtilityMask | NET::SplashMask );
+ QString title = info.name();
+// QCString extrarole = ""; // TODO
+ QCString machine = info.clientMachine().lower();
+ Rules* best_match = NULL;
+ int match_quality = 0;
+ for( QValueList< Rules* >::ConstIterator it = rules.begin();
+ it != rules.end();
+ ++it )
+ {
+ // try to find an exact match, i.e. not a generic rule
+ Rules* rule = *it;
+ int quality = 0;
+ bool generic = true;
+ if( rule->wmclassmatch != Rules::ExactMatch )
+ continue; // too generic
+ if( !rule->matchWMClass( wmclass_class, wmclass_name ))
+ continue;
+ // from now on, it matches the app - now try to match for a specific window
+ if( rule->wmclasscomplete )
+ {
+ quality += 1;
+ generic = false; // this can be considered specific enough (old X apps)
+ }
+ if( !whole_app )
+ {
+ if( rule->windowrolematch != Rules::UnimportantMatch )
+ {
+ quality += rule->windowrolematch == Rules::ExactMatch ? 5 : 1;
+ generic = false;
+ }
+ if( rule->titlematch != Rules::UnimportantMatch )
+ {
+ quality += rule->titlematch == Rules::ExactMatch ? 3 : 1;
+ generic = false;
+ }
+ if( rule->types != NET::AllTypesMask )
+ {
+ int bits = 0;
+ for( unsigned int bit = 1;
+ bit < 1U << 31;
+ bit <<= 1 )
+ if( rule->types & bit )
+ ++bits;
+ if( bits == 1 )
+ quality += 2;
+ }
+ if( generic ) // ignore generic rules, use only the ones that are for this window
+ continue;
+ }
+ else
+ {
+ if( rule->types == NET::AllTypesMask )
+ quality += 2;
+ }
+ if( !rule->matchType( type )
+ || !rule->matchRole( role )
+ || !rule->matchTitle( title )
+ || !rule->matchClientMachine( machine ))
+ continue;
+ if( quality > match_quality )
+ {
+ best_match = rule;
+ match_quality = quality;
+ }
+ }
+ if( best_match != NULL )
+ return best_match;
+ Rules* ret = new Rules;
+ if( whole_app )
+ {
+ ret->description = i18n( "Application settings for %1" ).arg( wmclass_class );
+ // TODO maybe exclude some types? If yes, then also exclude them above
+ // when searching.
+ ret->types = NET::AllTypesMask;
+ ret->titlematch = Rules::UnimportantMatch;
+ ret->clientmachine = machine; // set, but make unimportant
+ ret->clientmachinematch = Rules::UnimportantMatch;
+ ret->extrarolematch = Rules::UnimportantMatch;
+ ret->windowrolematch = Rules::UnimportantMatch;
+ if( wmclass_name == wmclass_class )
+ {
+ ret->wmclasscomplete = false;
+ ret->wmclass = wmclass_class;
+ ret->wmclassmatch = Rules::ExactMatch;
+ }
+ else
+ {
+ // WM_CLASS components differ - perhaps the app got -name argument
+ ret->wmclasscomplete = true;
+ ret->wmclass = wmclass_name + ' ' + wmclass_class;
+ ret->wmclassmatch = Rules::ExactMatch;
+ }
+ return ret;
+ }
+ ret->description = i18n( "Window settings for %1" ).arg( wmclass_class );
+ if( type == NET::Unknown )
+ ret->types = NET::NormalMask;
+ else
+ ret->types = 1 << type; // convert type to its mask
+ ret->title = title; // set, but make unimportant
+ ret->titlematch = Rules::UnimportantMatch;
+ ret->clientmachine = machine; // set, but make unimportant
+ ret->clientmachinematch = Rules::UnimportantMatch;
+// ret->extrarole = extra; TODO
+ ret->extrarolematch = Rules::UnimportantMatch;
+ if( !role.isEmpty()
+ && role != "unknown" && role != "unnamed" ) // Qt sets this if not specified
+ {
+ ret->windowrole = role;
+ ret->windowrolematch = Rules::ExactMatch;
+ if( wmclass_name == wmclass_class )
+ {
+ ret->wmclasscomplete = false;
+ ret->wmclass = wmclass_class;
+ ret->wmclassmatch = Rules::ExactMatch;
+ }
+ else
+ {
+ // WM_CLASS components differ - perhaps the app got -name argument
+ ret->wmclasscomplete = true;
+ ret->wmclass = wmclass_name + ' ' + wmclass_class;
+ ret->wmclassmatch = Rules::ExactMatch;
+ }
+ }
+ else // no role set
+ {
+ if( wmclass_name != wmclass_class )
+ {
+ ret->wmclasscomplete = true;
+ ret->wmclass = wmclass_name + ' ' + wmclass_class;
+ ret->wmclassmatch = Rules::ExactMatch;
+ }
+ else
+ {
+ // This is a window that has no role set, and both components of WM_CLASS
+ // match (possibly only differing in case), which most likely means either
+ // the application doesn't give a damn about distinguishing its various
+ // windows, or it's an app that uses role for that, but this window
+ // lacks it for some reason. Use non-complete WM_CLASS matching, also
+ // include window title in the matching, and pray it causes many more positive
+ // matches than negative matches.
+ ret->titlematch = Rules::ExactMatch;
+ ret->wmclasscomplete = false;
+ ret->wmclass = wmclass_class;
+ ret->wmclassmatch = Rules::ExactMatch;
+ }
+ }
+ return ret;
+ }
+
+static int edit( Window wid, bool whole_app )
+ {
+ QValueList< Rules* > rules;
+ loadRules( rules );
+ Rules* orig_rule = findRule( rules, wid, whole_app );
+ RulesDialog dlg;
+ // dlg.edit() creates new Rules instance if edited
+ Rules* edited_rule = dlg.edit( orig_rule, wid, true );
+ if( edited_rule == NULL || edited_rule->isEmpty())
+ {
+ rules.remove( orig_rule );
+ delete orig_rule;
+ if( orig_rule != edited_rule )
+ delete edited_rule;
+ }
+ else if( edited_rule != orig_rule )
+ {
+ QValueList< Rules* >::Iterator pos = rules.find( orig_rule );
+ if( pos != rules.end())
+ *pos = edited_rule;
+ else
+ rules.prepend( edited_rule );
+ delete orig_rule;
+ }
+ saveRules( rules );
+ if( !kapp->dcopClient()->isAttached())
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("kwin*", "", "reconfigure()", "");
+ return 0;
+ }
+
+} // namespace
+
+static const KCmdLineOptions options[] =
+ {
+ // no need for I18N_NOOP(), this is not supposed to be used directly
+ { "wid <wid>", "WId of the window for special window settings.", 0 },
+ { "whole-app", "Whether the settings should affect all windows of the application.", 0 },
+ KCmdLineLastOption
+ };
+
+extern "C"
+KDE_EXPORT int kdemain( int argc, char* argv[] )
+ {
+ KLocale::setMainCatalogue( "kcmkwinrules" );
+ KCmdLineArgs::init( argc, argv, "kwin_rules_dialog", I18N_NOOP( "KWin" ),
+ I18N_NOOP( "KWin helper utility" ), "1.0" );
+ KCmdLineArgs::addCmdLineOptions( options );
+ KApplication app;
+ KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
+ bool id_ok = false;
+ Window id = args->getOption( "wid" ).toULong( &id_ok );
+ bool whole_app = args->isSet( "whole-app" );
+ args->clear();
+ if( !id_ok || id == None )
+ {
+ KCmdLineArgs::usage( i18n( "This helper utility is not supposed to be called directly." ));
+ return 1;
+ }
+ return KWinInternal::edit( id, whole_app );
+ }
diff --git a/kwin/kcmkwin/kwinrules/ruleslist.cpp b/kwin/kcmkwin/kwinrules/ruleslist.cpp
new file mode 100644
index 000000000..f4704089f
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/ruleslist.cpp
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "ruleslist.h"
+
+#include <klistbox.h>
+#include <kpushbutton.h>
+#include <assert.h>
+#include <kdebug.h>
+#include <kconfig.h>
+
+#include "ruleswidget.h"
+
+namespace KWinInternal
+{
+
+KCMRulesList::KCMRulesList( QWidget* parent, const char* name )
+: KCMRulesListBase( parent, name )
+ {
+ // connect both current/selected, so that current==selected (stupid QListBox :( )
+ connect( rules_listbox, SIGNAL( currentChanged( QListBoxItem* )),
+ SLOT( activeChanged( QListBoxItem*)));
+ connect( rules_listbox, SIGNAL( selectionChanged( QListBoxItem* )),
+ SLOT( activeChanged( QListBoxItem*)));
+ connect( new_button, SIGNAL( clicked()),
+ SLOT( newClicked()));
+ connect( modify_button, SIGNAL( clicked()),
+ SLOT( modifyClicked()));
+ connect( delete_button, SIGNAL( clicked()),
+ SLOT( deleteClicked()));
+ connect( moveup_button, SIGNAL( clicked()),
+ SLOT( moveupClicked()));
+ connect( movedown_button, SIGNAL( clicked()),
+ SLOT( movedownClicked()));
+ connect( rules_listbox, SIGNAL( doubleClicked ( QListBoxItem * ) ),
+ SLOT( modifyClicked()));
+ load();
+ }
+
+KCMRulesList::~KCMRulesList()
+ {
+ for( QValueVector< Rules* >::Iterator it = rules.begin();
+ it != rules.end();
+ ++it )
+ delete *it;
+ rules.clear();
+ }
+
+void KCMRulesList::activeChanged( QListBoxItem* item )
+ {
+ if( item != NULL )
+ rules_listbox->setSelected( item, true ); // make current==selected
+ modify_button->setEnabled( item != NULL );
+ delete_button->setEnabled( item != NULL );
+ moveup_button->setEnabled( item != NULL && item->prev() != NULL );
+ movedown_button->setEnabled( item != NULL && item->next() != NULL );
+ }
+
+void KCMRulesList::newClicked()
+ {
+ RulesDialog dlg;
+ Rules* rule = dlg.edit( NULL, 0, false );
+ if( rule == NULL )
+ return;
+ int pos = rules_listbox->currentItem() + 1;
+ rules_listbox->insertItem( rule->description, pos );
+ rules_listbox->setSelected( pos, true );
+ rules.insert( rules.begin() + pos, rule );
+ emit changed( true );
+ }
+
+void KCMRulesList::modifyClicked()
+ {
+ int pos = rules_listbox->currentItem();
+ if ( pos == -1 )
+ return;
+ RulesDialog dlg;
+ Rules* rule = dlg.edit( rules[ pos ], 0, false );
+ if( rule == rules[ pos ] )
+ return;
+ delete rules[ pos ];
+ rules[ pos ] = rule;
+ rules_listbox->changeItem( rule->description, pos );
+ emit changed( true );
+ }
+
+void KCMRulesList::deleteClicked()
+ {
+ int pos = rules_listbox->currentItem();
+ assert( pos != -1 );
+ rules_listbox->removeItem( pos );
+ rules.erase( rules.begin() + pos );
+ emit changed( true );
+ }
+
+void KCMRulesList::moveupClicked()
+ {
+ int pos = rules_listbox->currentItem();
+ assert( pos != -1 );
+ if( pos > 0 )
+ {
+ QString txt = rules_listbox->text( pos );
+ rules_listbox->removeItem( pos );
+ rules_listbox->insertItem( txt, pos - 1 );
+ rules_listbox->setSelected( pos - 1, true );
+ Rules* rule = rules[ pos ];
+ rules[ pos ] = rules[ pos - 1 ];
+ rules[ pos - 1 ] = rule;
+ }
+ emit changed( true );
+ }
+
+void KCMRulesList::movedownClicked()
+ {
+ int pos = rules_listbox->currentItem();
+ assert( pos != -1 );
+ if( pos < int( rules_listbox->count()) - 1 )
+ {
+ QString txt = rules_listbox->text( pos );
+ rules_listbox->removeItem( pos );
+ rules_listbox->insertItem( txt, pos + 1 );
+ rules_listbox->setSelected( pos + 1, true );
+ Rules* rule = rules[ pos ];
+ rules[ pos ] = rules[ pos + 1 ];
+ rules[ pos + 1 ] = rule;
+ }
+ emit changed( true );
+ }
+
+void KCMRulesList::load()
+ {
+ rules_listbox->clear();
+ for( QValueVector< Rules* >::Iterator it = rules.begin();
+ it != rules.end();
+ ++it )
+ delete *it;
+ rules.clear();
+ KConfig cfg( "kwinrulesrc", true );
+ cfg.setGroup( "General" );
+ int count = cfg.readNumEntry( "count" );
+ rules.reserve( count );
+ for( int i = 1;
+ i <= count;
+ ++i )
+ {
+ cfg.setGroup( QString::number( i ));
+ Rules* rule = new Rules( cfg );
+ rules.append( rule );
+ rules_listbox->insertItem( rule->description );
+ }
+ if( rules.count() > 0 )
+ rules_listbox->setSelected( 0, true );
+ else
+ activeChanged( NULL );
+ }
+
+void KCMRulesList::save()
+ {
+ KConfig cfg( "kwinrulesrc" );
+ QStringList groups = cfg.groupList();
+ for( QStringList::ConstIterator it = groups.begin();
+ it != groups.end();
+ ++it )
+ cfg.deleteGroup( *it );
+ cfg.setGroup( "General" );
+ cfg.writeEntry( "count", rules.count());
+ int i = 1;
+ for( QValueVector< Rules* >::ConstIterator it = rules.begin();
+ it != rules.end();
+ ++it )
+ {
+ cfg.setGroup( QString::number( i ));
+ (*it)->write( cfg );
+ ++i;
+ }
+ }
+
+void KCMRulesList::defaults()
+ {
+ load();
+ }
+
+} // namespace
+
+#include "ruleslist.moc"
diff --git a/kwin/kcmkwin/kwinrules/ruleslist.h b/kwin/kcmkwin/kwinrules/ruleslist.h
new file mode 100644
index 000000000..b192d2f4e
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/ruleslist.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef __RULESLIST_H__
+#define __RULESLIST_H__
+
+#include "ruleslistbase.h"
+
+#include <qvaluevector.h>
+
+#include "../../rules.h"
+
+class QListBoxItem;
+
+namespace KWinInternal
+{
+
+class KCMRulesList
+ : public KCMRulesListBase
+ {
+ Q_OBJECT
+ public:
+ KCMRulesList( QWidget* parent = NULL, const char* name = NULL );
+ virtual ~KCMRulesList();
+ void load();
+ void save();
+ void defaults();
+ signals:
+ void changed( bool );
+ private slots:
+ void newClicked();
+ void modifyClicked();
+ void deleteClicked();
+ void moveupClicked();
+ void movedownClicked();
+ void activeChanged( QListBoxItem* );
+ private:
+ QValueVector< Rules* > rules;
+ };
+
+} // namespace
+
+#endif
diff --git a/kwin/kcmkwin/kwinrules/ruleslistbase.ui b/kwin/kcmkwin/kwinrules/ruleslistbase.ui
new file mode 100644
index 000000000..c2abdaa9d
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/ruleslistbase.ui
@@ -0,0 +1,91 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KWinInternal::KCMRulesListBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>Form1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="KListBox" row="0" column="0" rowspan="6" colspan="1">
+ <property name="name">
+ <cstring>rules_listbox</cstring>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>new_button</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;New...</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>modify_button</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Modify...</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>delete_button</cstring>
+ </property>
+ <property name="text">
+ <string>Delete</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="3" column="1">
+ <property name="name">
+ <cstring>moveup_button</cstring>
+ </property>
+ <property name="text">
+ <string>Move &amp;Up</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>movedown_button</cstring>
+ </property>
+ <property name="text">
+ <string>Move &amp;Down</string>
+ </property>
+ </widget>
+ <spacer row="5" column="1">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>294</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</UI>
diff --git a/kwin/kcmkwin/kwinrules/ruleswidget.cpp b/kwin/kcmkwin/kwinrules/ruleswidget.cpp
new file mode 100644
index 000000000..7a8afe292
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/ruleswidget.cpp
@@ -0,0 +1,803 @@
+/*
+ * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "ruleswidget.h"
+
+#include <klineedit.h>
+#include <krestrictedline.h>
+#include <kcombobox.h>
+#include <qcheckbox.h>
+#include <kpushbutton.h>
+#include <qlabel.h>
+#include <kwinmodule.h>
+#include <klocale.h>
+#include <qregexp.h>
+#include <qwhatsthis.h>
+#include <assert.h>
+#include <kmessagebox.h>
+#include <qtabwidget.h>
+#include <qtimer.h>
+
+#include "../../rules.h"
+
+#include "detectwidget.h"
+
+namespace KWinInternal
+{
+
+#define SETUP( var, type ) \
+ connect( enable_##var, SIGNAL( toggled( bool )), rule_##var, SLOT( setEnabled( bool ))); \
+ connect( enable_##var, SIGNAL( toggled( bool )), this, SLOT( updateEnable##var())); \
+ connect( rule_##var, SIGNAL( activated( int )), this, SLOT( updateEnable##var())); \
+ QWhatsThis::add( enable_##var, enableDesc ); \
+ QWhatsThis::add( rule_##var, type##RuleDesc );
+
+RulesWidget::RulesWidget( QWidget* parent, const char* name )
+: RulesWidgetBase( parent, name )
+, detect_dlg( NULL )
+ {
+ QString enableDesc =
+ i18n( "Enable this checkbox to alter this window property for the specified window(s)." );
+ QString setRuleDesc =
+ i18n( "Specify how the window property should be affected:<ul>"
+ "<li><em>Do Not Affect:</em> The window property will not be affected and therefore"
+ " the default handling for it will be used. Specifying this will block more generic"
+ " window settings from taking effect.</li>"
+ "<li><em>Apply Initially:</em> The window property will be only set to the given value"
+ " after the window is created. No further changes will be affected.</li>"
+ "<li><em>Remember:</em> The value of the window property will be remembered and every time"
+ " time the window is created, the last remembered value will be applied.</li>"
+ "<li><em>Force:</em> The window property will be always forced to the given value.</li>"
+ "<li><em>Apply Now:</em> The window property will be set to the given value immediately"
+ " and will not be affected later (this action will be deleted afterwards).</li>"
+ "<li><em>Force temporarily:</em> The window property will be forced to the given value"
+ " until it is hidden (this action will be deleted after the window is hidden).</li>"
+ "</ul>" );
+ QString forceRuleDesc =
+ i18n( "Specify how the window property should be affected:<ul>"
+ "<li><em>Do Not Affect:</em> The window property will not be affected and therefore"
+ " the default handling for it will be used. Specifying this will block more generic"
+ " window settings from taking effect.</li>"
+ "<li><em>Force:</em> The window property will be always forced to the given value.</li>"
+ "<li><em>Force temporarily:</em> The window property will be forced to the given value"
+ " until it is hidden (this action will be deleted after the window is hidden).</li>"
+ "</ul>" );
+ // window tabs have enable signals done in designer
+ // geometry tab
+ SETUP( position, set );
+ SETUP( size, set );
+ SETUP( desktop, set );
+ SETUP( maximizehoriz, set );
+ SETUP( maximizevert, set );
+ SETUP( minimize, set );
+ SETUP( shade, set );
+ SETUP( fullscreen, set );
+ SETUP( placement, force );
+ // preferences tab
+ SETUP( above, set );
+ SETUP( below, set );
+ SETUP( noborder, set );
+ SETUP( skiptaskbar, set );
+ SETUP( skippager, set );
+ SETUP( acceptfocus, force );
+ SETUP( closeable, force );
+ SETUP( opacityactive, force );
+ SETUP( opacityinactive, force );
+ SETUP( shortcut, force );
+ // workarounds tab
+ SETUP( fsplevel, force );
+ SETUP( moveresizemode, force );
+ SETUP( type, force );
+ SETUP( ignoreposition, force );
+ SETUP( minsize, force );
+ SETUP( maxsize, force );
+ SETUP( strictgeometry, force );
+ SETUP( disableglobalshortcuts, force );
+ KWinModule module;
+ int i;
+ for( i = 1;
+ i <= module.numberOfDesktops();
+ ++i )
+ desktop->insertItem( QString::number( i ).rightJustify( 2 ) + ":" + module.desktopName( i ));
+ desktop->insertItem( i18n( "All Desktops" ));
+ }
+
+#undef SETUP
+
+#define UPDATE_ENABLE_SLOT( var ) \
+void RulesWidget::updateEnable##var() \
+ { \
+ /* leave the label readable label_##var->setEnabled( enable_##var->isChecked() && rule_##var->currentItem() != 0 );*/ \
+ var->setEnabled( enable_##var->isChecked() && rule_##var->currentItem() != 0 ); \
+ }
+
+// geometry tab
+UPDATE_ENABLE_SLOT( position )
+UPDATE_ENABLE_SLOT( size )
+UPDATE_ENABLE_SLOT( desktop )
+UPDATE_ENABLE_SLOT( maximizehoriz )
+UPDATE_ENABLE_SLOT( maximizevert )
+UPDATE_ENABLE_SLOT( minimize )
+UPDATE_ENABLE_SLOT( shade )
+UPDATE_ENABLE_SLOT( fullscreen )
+UPDATE_ENABLE_SLOT( placement )
+// preferences tab
+UPDATE_ENABLE_SLOT( above )
+UPDATE_ENABLE_SLOT( below )
+UPDATE_ENABLE_SLOT( noborder )
+UPDATE_ENABLE_SLOT( skiptaskbar )
+UPDATE_ENABLE_SLOT( skippager )
+UPDATE_ENABLE_SLOT( acceptfocus )
+UPDATE_ENABLE_SLOT( closeable )
+UPDATE_ENABLE_SLOT( opacityactive )
+UPDATE_ENABLE_SLOT( opacityinactive )
+void RulesWidget::updateEnableshortcut()
+ {
+ shortcut->setEnabled( enable_shortcut->isChecked() && rule_shortcut->currentItem() != 0 );
+ shortcut_edit->setEnabled( enable_shortcut->isChecked() && rule_shortcut->currentItem() != 0 );
+ }
+// workarounds tab
+UPDATE_ENABLE_SLOT( fsplevel )
+UPDATE_ENABLE_SLOT( moveresizemode )
+UPDATE_ENABLE_SLOT( type )
+UPDATE_ENABLE_SLOT( ignoreposition )
+UPDATE_ENABLE_SLOT( minsize )
+UPDATE_ENABLE_SLOT( maxsize )
+UPDATE_ENABLE_SLOT( strictgeometry )
+UPDATE_ENABLE_SLOT( disableglobalshortcuts )
+
+#undef UPDATE_ENABLE_SLOT
+
+static const int set_rule_to_combo[] =
+ {
+ 0, // Unused
+ 0, // Don't Affect
+ 3, // Force
+ 1, // Apply
+ 2, // Remember
+ 4, // ApplyNow
+ 5 // ForceTemporarily
+ };
+
+static const Rules::SetRule combo_to_set_rule[] =
+ {
+ ( Rules::SetRule )Rules::DontAffect,
+ ( Rules::SetRule )Rules::Apply,
+ ( Rules::SetRule )Rules::Remember,
+ ( Rules::SetRule )Rules::Force,
+ ( Rules::SetRule )Rules::ApplyNow,
+ ( Rules::SetRule )Rules::ForceTemporarily
+ };
+
+static const int force_rule_to_combo[] =
+ {
+ 0, // Unused
+ 0, // Don't Affect
+ 1, // Force
+ 0, // Apply
+ 0, // Remember
+ 0, // ApplyNow
+ 2 // ForceTemporarily
+ };
+
+static const Rules::ForceRule combo_to_force_rule[] =
+ {
+ ( Rules::ForceRule )Rules::DontAffect,
+ ( Rules::ForceRule )Rules::Force,
+ ( Rules::ForceRule )Rules::ForceTemporarily
+ };
+
+static QString positionToStr( const QPoint& p )
+ {
+ if( p == invalidPoint )
+ return QString::null;
+ return QString::number( p.x()) + "," + QString::number( p.y());
+ }
+
+static QPoint strToPosition( const QString& str )
+ { // two numbers, with + or -, separated by any of , x X :
+ QRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" );
+ if( !reg.exactMatch( str ))
+ return invalidPoint;
+ return QPoint( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt());
+ }
+
+static QString sizeToStr( const QSize& s )
+ {
+ if( !s.isValid())
+ return QString::null;
+ return QString::number( s.width()) + "," + QString::number( s.height());
+ }
+
+static QSize strToSize( const QString& str )
+ { // two numbers, with + or -, separated by any of , x X :
+ QRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" );
+ if( !reg.exactMatch( str ))
+ return QSize();
+ return QSize( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt());
+ }
+
+//used for opacity settings
+static QString intToStr( const int& s )
+ {
+ if( s < 1 || s > 100 )
+ return QString::null;
+ return QString::number(s);
+ }
+
+static int strToInt( const QString& str )
+ {
+ int tmp = str.toInt();
+ if( tmp < 1 || tmp > 100 )
+ return 100;
+ return tmp;
+ }
+
+int RulesWidget::desktopToCombo( int d ) const
+ {
+ if( d >= 1 && d < desktop->count())
+ return d - 1;
+ return desktop->count() - 1; // on all desktops
+ }
+
+int RulesWidget::comboToDesktop( int val ) const
+ {
+ if( val == desktop->count() - 1 )
+ return NET::OnAllDesktops;
+ return val + 1;
+ }
+
+static int placementToCombo( Placement::Policy placement )
+ {
+ static const int conv[] =
+ {
+ 1, // NoPlacement
+ 0, // Default
+ 0, // Unknown
+ 6, // Random
+ 2, // Smart
+ 4, // Cascade
+ 5, // Centered
+ 7, // ZeroCornered
+ 8, // UnderMouse
+ 9, // OnMainWindow
+ 3 // Maximizing
+ };
+ return conv[ placement ];
+ }
+
+static Placement::Policy comboToPlacement( int val )
+ {
+ static const Placement::Policy conv[] =
+ {
+ Placement::Default,
+ Placement::NoPlacement,
+ Placement::Smart,
+ Placement::Maximizing,
+ Placement::Cascade,
+ Placement::Centered,
+ Placement::Random,
+ Placement::ZeroCornered,
+ Placement::UnderMouse,
+ Placement::OnMainWindow
+ // no Placement::Unknown
+ };
+ return conv[ val ];
+ }
+
+static int moveresizeToCombo( Options::MoveResizeMode mode )
+ {
+ return mode == Options::Opaque ? 0 : 1;
+ }
+
+static Options::MoveResizeMode comboToMoveResize( int val )
+ {
+ return val == 0 ? Options::Opaque : Options::Transparent;
+ }
+
+static int typeToCombo( NET::WindowType type )
+ {
+ if( type < NET::Normal || type > NET::Splash )
+ return 0; // Normal
+ static const int conv[] =
+ {
+ 0, // Normal
+ 7, // Desktop
+ 3, // Dock
+ 4, // Toolbar
+ 5, // Menu
+ 1, // Dialog
+ 8, // Override
+ 9, // TopMenu
+ 2, // Utility
+ 6 // Splash
+ };
+ return conv[ type ];
+ }
+
+static NET::WindowType comboToType( int val )
+ {
+ static const NET::WindowType conv[] =
+ {
+ NET::Normal,
+ NET::Dialog,
+ NET::Utility,
+ NET::Dock,
+ NET::Toolbar,
+ NET::Menu,
+ NET::Splash,
+ NET::Desktop,
+ NET::Override,
+ NET::TopMenu
+ };
+ return conv[ val ];
+ }
+
+#define GENERIC_RULE( var, func, Type, type, uimethod, uimethod0 ) \
+ if( rules->var##rule == Rules::Unused##Type##Rule ) \
+ { \
+ enable_##var->setChecked( false ); \
+ rule_##var->setCurrentItem( 0 ); \
+ var->uimethod0; \
+ updateEnable##var(); \
+ } \
+ else \
+ { \
+ enable_##var->setChecked( true ); \
+ rule_##var->setCurrentItem( type##_rule_to_combo[ rules->var##rule ] ); \
+ var->uimethod( func( rules->var )); \
+ updateEnable##var(); \
+ }
+
+#define CHECKBOX_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setChecked, setChecked( false ))
+#define LINEEDIT_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setText, setText( "" ))
+#define COMBOBOX_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setCurrentItem, setCurrentItem( 0 ))
+#define CHECKBOX_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setChecked, setChecked( false ))
+#define LINEEDIT_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setText, setText( "" ))
+#define COMBOBOX_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setCurrentItem, setCurrentItem( 0 ))
+
+void RulesWidget::setRules( Rules* rules )
+ {
+ Rules tmp;
+ if( rules == NULL )
+ rules = &tmp; // empty
+ description->setText( rules->description );
+ wmclass->setText( rules->wmclass );
+ whole_wmclass->setChecked( rules->wmclasscomplete );
+ wmclass_match->setCurrentItem( rules->wmclassmatch );
+ wmclassMatchChanged();
+ role->setText( rules->windowrole );
+ role_match->setCurrentItem( rules->windowrolematch );
+ roleMatchChanged();
+ types->setSelected( 0, rules->types & NET::NormalMask );
+ types->setSelected( 1, rules->types & NET::DialogMask );
+ types->setSelected( 2, rules->types & NET::UtilityMask );
+ types->setSelected( 3, rules->types & NET::DockMask );
+ types->setSelected( 4, rules->types & NET::ToolbarMask );
+ types->setSelected( 5, rules->types & NET::MenuMask );
+ types->setSelected( 6, rules->types & NET::SplashMask );
+ types->setSelected( 7, rules->types & NET::DesktopMask );
+ types->setSelected( 8, rules->types & NET::OverrideMask );
+ types->setSelected( 9, rules->types & NET::TopMenuMask );
+ title->setText( rules->title );
+ title_match->setCurrentItem( rules->titlematch );
+ titleMatchChanged();
+ extra->setText( rules->extrarole );
+ extra_match->setCurrentItem( rules->extrarolematch );
+ extraMatchChanged();
+ machine->setText( rules->clientmachine );
+ machine_match->setCurrentItem( rules->clientmachinematch );
+ machineMatchChanged();
+ LINEEDIT_SET_RULE( position, positionToStr );
+ LINEEDIT_SET_RULE( size, sizeToStr );
+ COMBOBOX_SET_RULE( desktop, desktopToCombo );
+ CHECKBOX_SET_RULE( maximizehoriz, );
+ CHECKBOX_SET_RULE( maximizevert, );
+ CHECKBOX_SET_RULE( minimize, );
+ CHECKBOX_SET_RULE( shade, );
+ CHECKBOX_SET_RULE( fullscreen, );
+ COMBOBOX_FORCE_RULE( placement, placementToCombo );
+ CHECKBOX_SET_RULE( above, );
+ CHECKBOX_SET_RULE( below, );
+ CHECKBOX_SET_RULE( noborder, );
+ CHECKBOX_SET_RULE( skiptaskbar, );
+ CHECKBOX_SET_RULE( skippager, );
+ CHECKBOX_FORCE_RULE( acceptfocus, );
+ CHECKBOX_FORCE_RULE( closeable, );
+ LINEEDIT_FORCE_RULE( opacityactive, intToStr );
+ LINEEDIT_FORCE_RULE( opacityinactive, intToStr );
+ LINEEDIT_SET_RULE( shortcut, );
+ COMBOBOX_FORCE_RULE( fsplevel, );
+ COMBOBOX_FORCE_RULE( moveresizemode, moveresizeToCombo );
+ COMBOBOX_FORCE_RULE( type, typeToCombo );
+ CHECKBOX_FORCE_RULE( ignoreposition, );
+ LINEEDIT_FORCE_RULE( minsize, sizeToStr );
+ LINEEDIT_FORCE_RULE( maxsize, sizeToStr );
+ CHECKBOX_FORCE_RULE( strictgeometry, );
+ CHECKBOX_FORCE_RULE( disableglobalshortcuts, );
+ }
+
+#undef GENERIC_RULE
+#undef CHECKBOX_SET_RULE
+#undef LINEEDIT_SET_RULE
+#undef COMBOBOX_SET_RULE
+#undef CHECKBOX_FORCE_RULE
+#undef LINEEDIT_FORCE_RULE
+#undef COMBOBOX_FORCE_RULE
+
+#define GENERIC_RULE( var, func, Type, type, uimethod ) \
+ if( enable_##var->isChecked()) \
+ { \
+ rules->var##rule = combo_to_##type##_rule[ rule_##var->currentItem() ]; \
+ rules->var = func( var->uimethod()); \
+ } \
+ else \
+ rules->var##rule = Rules::Unused##Type##Rule;
+
+#define CHECKBOX_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, isChecked )
+#define LINEEDIT_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, text )
+#define COMBOBOX_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, currentItem )
+#define CHECKBOX_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, isChecked )
+#define LINEEDIT_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, text )
+#define COMBOBOX_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, currentItem )
+
+Rules* RulesWidget::rules() const
+ {
+ Rules* rules = new Rules();
+ rules->description = description->text();
+ rules->wmclass = wmclass->text().utf8();
+ rules->wmclasscomplete = whole_wmclass->isChecked();
+ rules->wmclassmatch = static_cast< Rules::StringMatch >( wmclass_match->currentItem());
+ rules->windowrole = role->text().utf8();
+ rules->windowrolematch = static_cast< Rules::StringMatch >( role_match->currentItem());
+ rules->types = 0;
+ bool all_types = true;
+ for( unsigned int i = 0;
+ i < types->count();
+ ++i )
+ if( !types->isSelected( i ))
+ all_types = false;
+ if( all_types ) // if all types are selected, use AllTypesMask (for future expansion)
+ rules->types = NET::AllTypesMask;
+ else
+ {
+ rules->types |= types->isSelected( 0 ) ? NET::NormalMask : 0;
+ rules->types |= types->isSelected( 1 ) ? NET::DialogMask : 0;
+ rules->types |= types->isSelected( 2 ) ? NET::UtilityMask : 0;
+ rules->types |= types->isSelected( 3 ) ? NET::DockMask : 0;
+ rules->types |= types->isSelected( 4 ) ? NET::ToolbarMask : 0;
+ rules->types |= types->isSelected( 5 ) ? NET::MenuMask : 0;
+ rules->types |= types->isSelected( 6 ) ? NET::SplashMask : 0;
+ rules->types |= types->isSelected( 7 ) ? NET::DesktopMask : 0;
+ rules->types |= types->isSelected( 8 ) ? NET::OverrideMask : 0;
+ rules->types |= types->isSelected( 9 ) ? NET::TopMenuMask : 0;
+ }
+ rules->title = title->text();
+ rules->titlematch = static_cast< Rules::StringMatch >( title_match->currentItem());
+ rules->extrarole = extra->text().utf8();
+ rules->extrarolematch = static_cast< Rules::StringMatch >( extra_match->currentItem());
+ rules->clientmachine = machine->text().utf8();
+ rules->clientmachinematch = static_cast< Rules::StringMatch >( machine_match->currentItem());
+ LINEEDIT_SET_RULE( position, strToPosition );
+ LINEEDIT_SET_RULE( size, strToSize );
+ COMBOBOX_SET_RULE( desktop, comboToDesktop );
+ CHECKBOX_SET_RULE( maximizehoriz, );
+ CHECKBOX_SET_RULE( maximizevert, );
+ CHECKBOX_SET_RULE( minimize, );
+ CHECKBOX_SET_RULE( shade, );
+ CHECKBOX_SET_RULE( fullscreen, );
+ COMBOBOX_FORCE_RULE( placement, comboToPlacement );
+ CHECKBOX_SET_RULE( above, );
+ CHECKBOX_SET_RULE( below, );
+ CHECKBOX_SET_RULE( noborder, );
+ CHECKBOX_SET_RULE( skiptaskbar, );
+ CHECKBOX_SET_RULE( skippager, );
+ CHECKBOX_FORCE_RULE( acceptfocus, );
+ CHECKBOX_FORCE_RULE( closeable, );
+ LINEEDIT_FORCE_RULE( opacityactive, strToInt );
+ LINEEDIT_FORCE_RULE( opacityinactive, strToInt );
+ LINEEDIT_SET_RULE( shortcut, );
+ COMBOBOX_FORCE_RULE( fsplevel, );
+ COMBOBOX_FORCE_RULE( moveresizemode, comboToMoveResize );
+ COMBOBOX_FORCE_RULE( type, comboToType );
+ CHECKBOX_FORCE_RULE( ignoreposition, );
+ LINEEDIT_FORCE_RULE( minsize, strToSize );
+ LINEEDIT_FORCE_RULE( maxsize, strToSize );
+ CHECKBOX_FORCE_RULE( strictgeometry, );
+ CHECKBOX_FORCE_RULE( disableglobalshortcuts, );
+ return rules;
+ }
+
+#undef GENERIC_RULE
+#undef CHECKBOX_SET_RULE
+#undef LINEEDIT_SET_RULE
+#undef COMBOBOX_SET_RULE
+#undef CHECKBOX_FORCE_RULE
+#undef LINEEDIT_FORCE_RULE
+#undef COMBOBOX_FORCE_RULE
+
+#define STRING_MATCH_COMBO( type ) \
+void RulesWidget::type##MatchChanged() \
+ { \
+ edit_reg_##type->setEnabled( type##_match->currentItem() == Rules::RegExpMatch ); \
+ type->setEnabled( type##_match->currentItem() != Rules::UnimportantMatch ); \
+ }
+
+STRING_MATCH_COMBO( wmclass )
+STRING_MATCH_COMBO( role )
+STRING_MATCH_COMBO( title )
+STRING_MATCH_COMBO( extra )
+STRING_MATCH_COMBO( machine )
+
+#undef STRING_MATCH_COMBO
+
+void RulesWidget::detectClicked()
+ {
+ assert( detect_dlg == NULL );
+ detect_dlg = new DetectDialog;
+ connect( detect_dlg, SIGNAL( detectionDone( bool )), this, SLOT( detected( bool )));
+ detect_dlg->detect( 0 );
+ }
+
+void RulesWidget::detected( bool ok )
+ {
+ if( ok )
+ {
+ wmclass->setText( detect_dlg->selectedClass());
+ wmclass_match->setCurrentItem( Rules::ExactMatch );
+ wmclassMatchChanged(); // grrr
+ whole_wmclass->setChecked( detect_dlg->selectedWholeClass());
+ role->setText( detect_dlg->selectedRole());
+ role_match->setCurrentItem( detect_dlg->selectedRole().isEmpty()
+ ? Rules::UnimportantMatch : Rules::ExactMatch );
+ roleMatchChanged();
+ if( detect_dlg->selectedWholeApp())
+ {
+ for( unsigned int i = 0;
+ i < types->count();
+ ++i )
+ types->setSelected( i, true );
+ }
+ else
+ {
+ NET::WindowType type = detect_dlg->selectedType();
+ for( unsigned int i = 0;
+ i < types->count();
+ ++i )
+ types->setSelected( i, false );
+ types->setSelected( typeToCombo( type ), true );
+ }
+ title->setText( detect_dlg->selectedTitle());
+ title_match->setCurrentItem( detect_dlg->titleMatch());
+ titleMatchChanged();
+ machine->setText( detect_dlg->selectedMachine());
+ machine_match->setCurrentItem( Rules::UnimportantMatch );
+ machineMatchChanged();
+ // prefill values from to window to settings which already set
+ const KWin::WindowInfo& info = detect_dlg->windowInfo();
+ prefillUnusedValues( info );
+ }
+ delete detect_dlg;
+ detect_dlg = NULL;
+ detect_dlg_ok = ok;
+ }
+
+#define GENERIC_PREFILL( var, func, info, uimethod ) \
+ if( !enable_##var->isChecked()) \
+ { \
+ var->uimethod( func( info )); \
+ }
+
+#define CHECKBOX_PREFILL( var, func, info ) GENERIC_PREFILL( var, func, info, setChecked )
+#define LINEEDIT_PREFILL( var, func, info ) GENERIC_PREFILL( var, func, info, setText )
+#define COMBOBOX_PREFILL( var, func, info ) GENERIC_PREFILL( var, func, info, setCurrentItem )
+
+void RulesWidget::prefillUnusedValues( const KWin::WindowInfo& info )
+ {
+ LINEEDIT_PREFILL( position, positionToStr, info.frameGeometry().topLeft() );
+ LINEEDIT_PREFILL( size, sizeToStr, info.frameGeometry().size() );
+ COMBOBOX_PREFILL( desktop, desktopToCombo, info.desktop() );
+ CHECKBOX_PREFILL( maximizehoriz,, info.state() & NET::MaxHoriz );
+ CHECKBOX_PREFILL( maximizevert,, info.state() & NET::MaxVert );
+ CHECKBOX_PREFILL( minimize,, info.isMinimized() );
+ CHECKBOX_PREFILL( shade,, info.state() & NET::Shaded );
+ CHECKBOX_PREFILL( fullscreen,, info.state() & NET::FullScreen );
+ //COMBOBOX_PREFILL( placement, placementToCombo );
+ CHECKBOX_PREFILL( above,, info.state() & NET::KeepAbove );
+ CHECKBOX_PREFILL( below,, info.state() & NET::KeepBelow );
+ // noborder is only internal KWin information, so let's guess
+ CHECKBOX_PREFILL( noborder,, info.frameGeometry() == info.geometry() );
+ CHECKBOX_PREFILL( skiptaskbar,, info.state() & NET::SkipTaskbar );
+ CHECKBOX_PREFILL( skippager,, info.state() & NET::SkipPager );
+ //CHECKBOX_PREFILL( acceptfocus, );
+ //CHECKBOX_PREFILL( closeable, );
+ LINEEDIT_PREFILL( opacityactive, intToStr, 100 /*get the actual opacity somehow*/);
+ LINEEDIT_PREFILL( opacityinactive, intToStr, 100 /*get the actual opacity somehow*/);
+ //LINEEDIT_PREFILL( shortcut, );
+ //COMBOBOX_PREFILL( fsplevel, );
+ //COMBOBOX_PREFILL( moveresizemode, moveresizeToCombo );
+ COMBOBOX_PREFILL( type, typeToCombo, info.windowType( SUPPORTED_WINDOW_TYPES_MASK ) );
+ //CHECKBOX_PREFILL( ignoreposition, );
+ LINEEDIT_PREFILL( minsize, sizeToStr, info.frameGeometry().size() );
+ LINEEDIT_PREFILL( maxsize, sizeToStr, info.frameGeometry().size() );
+ //CHECKBOX_PREFILL( strictgeometry, );
+ //CHECKBOX_PREFILL( disableglobalshortcuts, );
+ }
+
+#undef GENERIC_PREFILL
+#undef CHECKBOX_PREFILL
+#undef LINEEDIT_PREFILL
+#undef COMBOBOX_PREFILL
+
+bool RulesWidget::finalCheck()
+ {
+ if( description->text().isEmpty())
+ {
+ if( !wmclass->text().isEmpty())
+ description->setText( i18n( "Settings for %1" ).arg( wmclass->text()));
+ else
+ description->setText( i18n( "Unnamed entry" ));
+ }
+ bool all_types = true;
+ for( unsigned int i = 0;
+ i < types->count();
+ ++i )
+ if( !types->isSelected( i ))
+ all_types = false;
+ if( wmclass_match->currentItem() == Rules::UnimportantMatch && all_types )
+ {
+ if( KMessageBox::warningContinueCancel( topLevelWidget(),
+ i18n( "You have specified the window class as unimportant.\n"
+ "This means the settings will possibly apply to windows from all applications. "
+ "If you really want to create a generic setting, it is recommended you at least "
+ "limit the window types to avoid special window types." )) != KMessageBox::Continue )
+ return false;
+ }
+ return true;
+ }
+
+void RulesWidget::prepareWindowSpecific( WId window )
+ {
+ tabs->setCurrentPage( 2 ); // geometry tab, skip tabs for window identification
+ KWin::WindowInfo info( window, -1U, -1U ); // read everything
+ prefillUnusedValues( info );
+ }
+
+void RulesWidget::shortcutEditClicked()
+ {
+ EditShortcutDialog dlg( topLevelWidget());
+ dlg.setShortcut( shortcut->text());
+ if( dlg.exec() == QDialog::Accepted )
+ shortcut->setText( dlg.shortcut());
+ }
+
+RulesDialog::RulesDialog( QWidget* parent, const char* name )
+: KDialogBase( parent, name, true, i18n( "Edit Window-Specific Settings" ), Ok | Cancel )
+ {
+ widget = new RulesWidget( this );
+ setMainWidget( widget );
+ }
+
+// window is set only for Alt+F3/Window-specific settings, because the dialog
+// is then related to one specific window
+Rules* RulesDialog::edit( Rules* r, WId window, bool show_hints )
+ {
+ rules = r;
+ widget->setRules( rules );
+ if( window != 0 )
+ widget->prepareWindowSpecific( window );
+ if( show_hints )
+ QTimer::singleShot( 0, this, SLOT( displayHints()));
+ exec();
+ return rules;
+ }
+
+void RulesDialog::displayHints()
+ {
+ QString str = "<qt><p>";
+ str += i18n( "This configuration dialog allows altering settings only for the selected window"
+ " or application. Find the setting you want to affect, enable the setting using the checkbox,"
+ " select in what way the setting should be affected and to which value." );
+#if 0 // maybe later
+ str += "</p><p>" + i18n( "Consult the documentation for more details." );
+#endif
+ str += "</p></qt>";
+ KMessageBox::information( this, str, QString::null, "displayhints" );
+ }
+
+void RulesDialog::accept()
+ {
+ if( !widget->finalCheck())
+ return;
+ rules = widget->rules();
+ KDialogBase::accept();
+ }
+
+EditShortcut::EditShortcut( QWidget* parent, const char* name )
+: EditShortcutBase( parent, name )
+ {
+ }
+
+void EditShortcut::editShortcut()
+ {
+ ShortcutDialog dlg( KShortcut( shortcut->text()), topLevelWidget());
+ if( dlg.exec() == QDialog::Accepted )
+ shortcut->setText( dlg.shortcut().toString());
+ }
+
+void EditShortcut::clearShortcut()
+ {
+ shortcut->setText( "" );
+ }
+
+EditShortcutDialog::EditShortcutDialog( QWidget* parent, const char* name )
+: KDialogBase( parent, name, true, i18n( "Edit Shortcut" ), Ok | Cancel )
+ {
+ widget = new EditShortcut( this );
+ setMainWidget( widget );
+ }
+
+void EditShortcutDialog::setShortcut( const QString& cut )
+ {
+ widget->shortcut->setText( cut );
+ }
+
+QString EditShortcutDialog::shortcut() const
+ {
+ return widget->shortcut->text();
+ }
+
+ShortcutDialog::ShortcutDialog( const KShortcut& cut, QWidget* parent, const char* name )
+ : KShortcutDialog( cut, false /*TODO???*/, parent, name )
+ {
+ }
+
+void ShortcutDialog::accept()
+ {
+ for( int i = 0;
+ ;
+ ++i )
+ {
+ KKeySequence seq = shortcut().seq( i );
+ if( seq.isNull())
+ break;
+ if( seq.key( 0 ) == Key_Escape )
+ {
+ reject();
+ return;
+ }
+ if( seq.key( 0 ) == Key_Space )
+ { // clear
+ setShortcut( KShortcut());
+ KShortcutDialog::accept();
+ return;
+ }
+ if( seq.key( 0 ).modFlags() == 0 )
+ { // no shortcuts without modifiers
+ KShortcut cut = shortcut();
+ cut.setSeq( i, KKeySequence());
+ setShortcut( cut );
+ return;
+ }
+ }
+ KShortcutDialog::accept();
+ }
+
+} // namespace
+
+#include "ruleswidget.moc"
diff --git a/kwin/kcmkwin/kwinrules/ruleswidget.h b/kwin/kcmkwin/kwinrules/ruleswidget.h
new file mode 100644
index 000000000..94af87ef4
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/ruleswidget.h
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef __RULESWIDGET_H__
+#define __RULESWIDGET_H__
+
+#include <kdialogbase.h>
+#include <kwin.h>
+#include <kshortcutdialog.h>
+
+#include "ruleswidgetbase.h"
+#include "editshortcutbase.h"
+
+namespace KWinInternal
+{
+
+class Rules;
+class DetectDialog;
+
+class RulesWidget
+ : public RulesWidgetBase
+ {
+ Q_OBJECT
+ public:
+ RulesWidget( QWidget* parent = NULL, const char* name = NULL );
+ void setRules( Rules* r );
+ Rules* rules() const;
+ bool finalCheck();
+ void prepareWindowSpecific( WId window );
+ signals:
+ void changed( bool state );
+ protected slots:
+ virtual void detectClicked();
+ virtual void wmclassMatchChanged();
+ virtual void roleMatchChanged();
+ virtual void titleMatchChanged();
+ virtual void extraMatchChanged();
+ virtual void machineMatchChanged();
+ virtual void shortcutEditClicked();
+ private slots:
+ // geometry tab
+ void updateEnableposition();
+ void updateEnablesize();
+ void updateEnabledesktop();
+ void updateEnablemaximizehoriz();
+ void updateEnablemaximizevert();
+ void updateEnableminimize();
+ void updateEnableshade();
+ void updateEnablefullscreen();
+ void updateEnableplacement();
+ // preferences tab
+ void updateEnableabove();
+ void updateEnablebelow();
+ void updateEnablenoborder();
+ void updateEnableskiptaskbar();
+ void updateEnableskippager();
+ void updateEnableacceptfocus();
+ void updateEnablecloseable();
+ void updateEnableopacityactive();
+ void updateEnableopacityinactive();
+ // workarounds tab
+ void updateEnablefsplevel();
+ void updateEnablemoveresizemode();
+ void updateEnabletype();
+ void updateEnableignoreposition();
+ void updateEnableminsize();
+ void updateEnablemaxsize();
+ void updateEnablestrictgeometry();
+ void updateEnableshortcut();
+ void updateEnabledisableglobalshortcuts();
+ // internal
+ void detected( bool );
+ private:
+ int desktopToCombo( int d ) const;
+ int comboToDesktop( int val ) const;
+ void prefillUnusedValues( const KWin::WindowInfo& info );
+ DetectDialog* detect_dlg;
+ bool detect_dlg_ok;
+ };
+
+class RulesDialog
+ : public KDialogBase
+ {
+ Q_OBJECT
+ public:
+ RulesDialog( QWidget* parent = NULL, const char* name = NULL );
+ Rules* edit( Rules* r, WId window, bool show_hints );
+ protected:
+ virtual void accept();
+ private slots:
+ void displayHints();
+ private:
+ RulesWidget* widget;
+ Rules* rules;
+ };
+
+class EditShortcut
+ : public EditShortcutBase
+ {
+ Q_OBJECT
+ public:
+ EditShortcut( QWidget* parent = NULL, const char* name = NULL );
+ protected:
+ void editShortcut();
+ void clearShortcut();
+ };
+
+class EditShortcutDialog
+ : public KDialogBase
+ {
+ Q_OBJECT
+ public:
+ EditShortcutDialog( QWidget* parent = NULL, const char* name = NULL );
+ void setShortcut( const QString& cut );
+ QString shortcut() const;
+ private:
+ EditShortcut* widget;
+ };
+
+// slightly duped from utils.cpp
+class ShortcutDialog
+ : public KShortcutDialog
+ {
+ Q_OBJECT
+ public:
+ ShortcutDialog( const KShortcut& cut, QWidget* parent = NULL, const char* name = NULL );
+ virtual void accept();
+ };
+
+} // namespace
+
+#endif
diff --git a/kwin/kcmkwin/kwinrules/ruleswidgetbase.ui b/kwin/kcmkwin/kwinrules/ruleswidgetbase.ui
new file mode 100644
index 000000000..01c1b9918
--- /dev/null
+++ b/kwin/kcmkwin/kwinrules/ruleswidgetbase.ui
@@ -0,0 +1,2597 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KWinInternal::RulesWidgetBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>Form2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>630</width>
+ <height>503</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QTabWidget">
+ <property name="name">
+ <cstring>tabs</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;Window</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>De&amp;scription:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>description</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>description</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Window &amp;class (application type):</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>wmclass</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Window &amp;role:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>role</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="6" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>role</cstring>
+ </property>
+ </widget>
+ <spacer row="9" column="1">
+ <property name="name">
+ <cstring>spacer29</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KComboBox" row="7" column="0">
+ <item>
+ <property name="text">
+ <string>Unimportant</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Exact Match</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Substring Match</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Regular Expression</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>role_match</cstring>
+ </property>
+ </widget>
+ <spacer row="7" column="1">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>212</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="7" column="2">
+ <property name="name">
+ <cstring>edit_reg_role</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ </widget>
+ <spacer row="7" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>211</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KComboBox" row="4" column="0">
+ <item>
+ <property name="text">
+ <string>Unimportant</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Exact Match</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Substring Match</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Regular Expression</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>wmclass_match</cstring>
+ </property>
+ </widget>
+ <spacer row="4" column="1">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>212</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="4" column="2">
+ <property name="name">
+ <cstring>edit_reg_wmclass</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="4" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>211</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KLineEdit" row="3" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>wmclass</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="4">
+ <property name="name">
+ <cstring>whole_wmclass</cstring>
+ </property>
+ <property name="text">
+ <string>Match w&amp;hole window class</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="8" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Detect Window Properties</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer27</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>270</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>detect1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Detect</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer28</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>269</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Window &amp;Extra</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>textLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Window &amp;types:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>types</cstring>
+ </property>
+ </widget>
+ <widget class="KListBox" row="1" column="0" rowspan="1" colspan="4">
+ <item>
+ <property name="text">
+ <string>Normal Window</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Dialog Window</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Utility Window</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Dock (panel)</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Toolbar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Torn-Off Menu</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Splash Screen</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Desktop</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Override Type</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Standalone Menubar</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>types</cstring>
+ </property>
+ <property name="selectionMode">
+ <enum>Multi</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>textLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>Window t&amp;itle:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>title</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>title</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>textLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Extra role:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>extra</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="6" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>extra</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="8" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>textLabel7</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Machine (hostname):</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>machine</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="9" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>machine</cstring>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="4" column="0">
+ <item>
+ <property name="text">
+ <string>Unimportant</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Exact Match</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Substring Match</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Regular Expression</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>title_match</cstring>
+ </property>
+ </widget>
+ <spacer row="4" column="1">
+ <property name="name">
+ <cstring>spacer2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>199</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="4" column="2">
+ <property name="name">
+ <cstring>edit_reg_title</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="4" column="3">
+ <property name="name">
+ <cstring>spacer5_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>199</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KComboBox" row="7" column="0">
+ <item>
+ <property name="text">
+ <string>Unimportant</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Exact Match</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Substring Match</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Regular Expression</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>extra_match</cstring>
+ </property>
+ </widget>
+ <spacer row="7" column="1">
+ <property name="name">
+ <cstring>spacer2_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>199</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="7" column="2">
+ <property name="name">
+ <cstring>edit_reg_extra</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="7" column="3">
+ <property name="name">
+ <cstring>spacer5_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>199</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KComboBox" row="10" column="0">
+ <item>
+ <property name="text">
+ <string>Unimportant</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Exact Match</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Substring Match</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Regular Expression</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>machine_match</cstring>
+ </property>
+ </widget>
+ <spacer row="10" column="1">
+ <property name="name">
+ <cstring>spacer2_2_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>199</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="10" column="2">
+ <property name="name">
+ <cstring>edit_reg_machine</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="10" column="3">
+ <property name="name">
+ <cstring>spacer5_2_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>199</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;Geometry</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_size</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KRestrictedLine" row="1" column="2">
+ <property name="name">
+ <cstring>size</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="validChars">
+ <string>0123456789-+,xX:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>enable_size</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Size</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>enable_position</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Position</string>
+ </property>
+ </widget>
+ <widget class="KRestrictedLine" row="0" column="2">
+ <property name="name">
+ <cstring>position</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="validChars">
+ <string>0123456789-+,xX:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_position</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="2">
+ <property name="name">
+ <cstring>maximizevert</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="2" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_maximizehoriz</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="2">
+ <property name="name">
+ <cstring>fullscreen</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>enable_maximizehoriz</cstring>
+ </property>
+ <property name="text">
+ <string>Maximized &amp;horizontally</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="2">
+ <property name="name">
+ <cstring>maximizehoriz</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="4" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_fullscreen</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>enable_fullscreen</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Fullscreen</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="3" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_maximizevert</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>enable_maximizevert</cstring>
+ </property>
+ <property name="text">
+ <string>Maximized &amp;vertically</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="5" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_desktop</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="5" column="2">
+ <property name="name">
+ <cstring>desktop</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0">
+ <property name="name">
+ <cstring>enable_desktop</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Desktop</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="0">
+ <property name="name">
+ <cstring>enable_shade</cstring>
+ </property>
+ <property name="text">
+ <string>Sh&amp;aded</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="2">
+ <property name="name">
+ <cstring>shade</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="6" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_minimize</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="2">
+ <property name="name">
+ <cstring>minimize</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="0">
+ <property name="name">
+ <cstring>enable_minimize</cstring>
+ </property>
+ <property name="text">
+ <string>M&amp;inimized</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="8" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_placement</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="8" column="2">
+ <item>
+ <property name="text">
+ <string>Default</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>No Placement</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Smart</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Maximizing</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Cascade</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Centered</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Random</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Top-Left Corner</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Under Mouse</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>On Main Window</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>placement</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="8" column="0">
+ <property name="name">
+ <cstring>enable_placement</cstring>
+ </property>
+ <property name="text">
+ <string>P&amp;lacement</string>
+ </property>
+ </widget>
+ <spacer row="9" column="1">
+ <property name="name">
+ <cstring>spacer31</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KComboBox" row="7" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_shade</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;Preferences</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>enable_above</cstring>
+ </property>
+ <property name="text">
+ <string>Keep &amp;above</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>enable_below</cstring>
+ </property>
+ <property name="text">
+ <string>Keep &amp;below</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>enable_skippager</cstring>
+ </property>
+ <property name="text">
+ <string>Skip pa&amp;ger</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>enable_skiptaskbar</cstring>
+ </property>
+ <property name="text">
+ <string>Skip &amp;taskbar</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>enable_noborder</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;No border</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0">
+ <property name="name">
+ <cstring>enable_acceptfocus</cstring>
+ </property>
+ <property name="text">
+ <string>Accept &amp;focus</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="0">
+ <property name="name">
+ <cstring>enable_closeable</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Closeable</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="0">
+ <property name="name">
+ <cstring>enable_opacityactive</cstring>
+ </property>
+ <property name="text">
+ <string>A&amp;ctive opacity in %</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="7" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_opacityactive</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KRestrictedLine" row="7" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>opacityactive</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="validChars">
+ <string>0123456789</string>
+ </property>
+ </widget>
+ <spacer row="7" column="4" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>spacer24</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>171</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="6" column="3" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>spacer36_7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>290</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="5" column="3" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>spacer36_6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>290</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="4" column="3" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>spacer36_5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>290</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="3" column="3" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>spacer36_4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>290</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="3" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>spacer36_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>290</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="3" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>spacer36_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>290</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="0" column="3" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>spacer36</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>290</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="0" column="2">
+ <property name="name">
+ <cstring>above</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="2">
+ <property name="name">
+ <cstring>below</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="2">
+ <property name="name">
+ <cstring>noborder</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="2">
+ <property name="name">
+ <cstring>skiptaskbar</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="2">
+ <property name="name">
+ <cstring>skippager</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="2">
+ <property name="name">
+ <cstring>acceptfocus</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="2">
+ <property name="name">
+ <cstring>closeable</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="6" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_closeable</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="5" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_acceptfocus</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="4" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_skippager</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="3" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_skiptaskbar</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="2" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_noborder</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_below</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_above</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <spacer row="10" column="1">
+ <property name="name">
+ <cstring>spacer33</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>80</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KComboBox" row="8" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_opacityinactive</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KRestrictedLine" row="8" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>opacityinactive</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="validChars">
+ <string>0123456789</string>
+ </property>
+ </widget>
+ <spacer row="8" column="4" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>spacer25</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>181</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="8" column="0">
+ <property name="name">
+ <cstring>enable_opacityinactive</cstring>
+ </property>
+ <property name="text">
+ <string>I&amp;nactive opacity in %</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="9" column="0">
+ <property name="name">
+ <cstring>enable_shortcut</cstring>
+ </property>
+ <property name="text">
+ <string>Shortcut</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="9" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Initially</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Remember</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Apply Now</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_shortcut</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="9" column="5">
+ <property name="name">
+ <cstring>shortcut_edit</cstring>
+ </property>
+ <property name="text">
+ <string>Edit...</string>
+ </property>
+ </widget>
+ <widget class="KRestrictedLine" row="9" column="2" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>shortcut</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>W&amp;orkarounds</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>enable_fsplevel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Focus stealing prevention</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="2" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_type</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="2" column="3">
+ <item>
+ <property name="text">
+ <string>Normal Window</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Dialog Window</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Utility Window</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Dock (panel)</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Toolbar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Torn-Off Menu</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Splash Screen</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Desktop</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Override Type</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Standalone Menubar</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>type</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="3">
+ <item>
+ <property name="text">
+ <string>Opaque</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Transparent</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>moveresizemode</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>enable_type</cstring>
+ </property>
+ <property name="text">
+ <string>Window &amp;type</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>enable_moveresizemode</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Moving/resizing</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_fsplevel</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_moveresizemode</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="3">
+ <item>
+ <property name="text">
+ <string>None</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Low</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Normal</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>High</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Extreme</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>fsplevel</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KRestrictedLine" row="5" column="3">
+ <property name="name">
+ <cstring>maxsize</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="validChars">
+ <string>0123456789-+,xX:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>enable_minsize</cstring>
+ </property>
+ <property name="text">
+ <string>M&amp;inimum size</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="4" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_minsize</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0">
+ <property name="name">
+ <cstring>enable_maxsize</cstring>
+ </property>
+ <property name="text">
+ <string>M&amp;aximum size</string>
+ </property>
+ </widget>
+ <widget class="KRestrictedLine" row="4" column="3">
+ <property name="name">
+ <cstring>minsize</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="validChars">
+ <string>0123456789-+,xX:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="5" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_maxsize</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>enable_ignoreposition</cstring>
+ </property>
+ <property name="text">
+ <string>Ignore requested &amp;geometry</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="3" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_ignoreposition</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="3">
+ <property name="name">
+ <cstring>ignoreposition</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="8" column="2">
+ <property name="name">
+ <cstring>spacer35</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>160</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="6" column="0">
+ <property name="name">
+ <cstring>enable_strictgeometry</cstring>
+ </property>
+ <property name="text">
+ <string>Strictly obey geometry</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="6" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_strictgeometry</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="3">
+ <property name="name">
+ <cstring>strictgeometry</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="3">
+ <property name="name">
+ <cstring>disableglobalshortcuts</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="0">
+ <property name="name">
+ <cstring>enable_disableglobalshortcuts</cstring>
+ </property>
+ <property name="text">
+ <string>Block global shortcuts</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="7" column="1">
+ <item>
+ <property name="text">
+ <string>Do Not Affect</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Force Temporarily</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>rule_disableglobalshortcuts</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>detect1</sender>
+ <signal>clicked()</signal>
+ <receiver>Form2</receiver>
+ <slot>detectClicked()</slot>
+ </connection>
+ <connection>
+ <sender>wmclass_match</sender>
+ <signal>activated(int)</signal>
+ <receiver>Form2</receiver>
+ <slot>wmclassMatchChanged()</slot>
+ </connection>
+ <connection>
+ <sender>role_match</sender>
+ <signal>activated(int)</signal>
+ <receiver>Form2</receiver>
+ <slot>roleMatchChanged()</slot>
+ </connection>
+ <connection>
+ <sender>title_match</sender>
+ <signal>activated(int)</signal>
+ <receiver>Form2</receiver>
+ <slot>titleMatchChanged()</slot>
+ </connection>
+ <connection>
+ <sender>extra_match</sender>
+ <signal>activated(int)</signal>
+ <receiver>Form2</receiver>
+ <slot>extraMatchChanged()</slot>
+ </connection>
+ <connection>
+ <sender>machine_match</sender>
+ <signal>activated(int)</signal>
+ <receiver>Form2</receiver>
+ <slot>machineMatchChanged()</slot>
+ </connection>
+ <connection>
+ <sender>shortcut_edit</sender>
+ <signal>clicked()</signal>
+ <receiver>Form2</receiver>
+ <slot>shortcutEditClicked()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>tabs</tabstop>
+ <tabstop>description</tabstop>
+ <tabstop>wmclass</tabstop>
+ <tabstop>whole_wmclass</tabstop>
+ <tabstop>wmclass_match</tabstop>
+ <tabstop>edit_reg_wmclass</tabstop>
+ <tabstop>role</tabstop>
+ <tabstop>role_match</tabstop>
+ <tabstop>edit_reg_role</tabstop>
+ <tabstop>detect1</tabstop>
+ <tabstop>types</tabstop>
+ <tabstop>title</tabstop>
+ <tabstop>title_match</tabstop>
+ <tabstop>edit_reg_title</tabstop>
+ <tabstop>extra</tabstop>
+ <tabstop>extra_match</tabstop>
+ <tabstop>edit_reg_extra</tabstop>
+ <tabstop>machine</tabstop>
+ <tabstop>machine_match</tabstop>
+ <tabstop>edit_reg_machine</tabstop>
+ <tabstop>enable_position</tabstop>
+ <tabstop>rule_position</tabstop>
+ <tabstop>position</tabstop>
+ <tabstop>enable_size</tabstop>
+ <tabstop>rule_size</tabstop>
+ <tabstop>size</tabstop>
+ <tabstop>enable_maximizehoriz</tabstop>
+ <tabstop>rule_maximizehoriz</tabstop>
+ <tabstop>maximizehoriz</tabstop>
+ <tabstop>enable_maximizevert</tabstop>
+ <tabstop>rule_maximizevert</tabstop>
+ <tabstop>maximizevert</tabstop>
+ <tabstop>enable_fullscreen</tabstop>
+ <tabstop>rule_fullscreen</tabstop>
+ <tabstop>fullscreen</tabstop>
+ <tabstop>enable_desktop</tabstop>
+ <tabstop>rule_desktop</tabstop>
+ <tabstop>desktop</tabstop>
+ <tabstop>enable_minimize</tabstop>
+ <tabstop>rule_minimize</tabstop>
+ <tabstop>minimize</tabstop>
+ <tabstop>enable_shade</tabstop>
+ <tabstop>rule_shade</tabstop>
+ <tabstop>shade</tabstop>
+ <tabstop>enable_placement</tabstop>
+ <tabstop>rule_placement</tabstop>
+ <tabstop>placement</tabstop>
+ <tabstop>enable_above</tabstop>
+ <tabstop>rule_above</tabstop>
+ <tabstop>above</tabstop>
+ <tabstop>enable_below</tabstop>
+ <tabstop>rule_below</tabstop>
+ <tabstop>below</tabstop>
+ <tabstop>enable_noborder</tabstop>
+ <tabstop>rule_noborder</tabstop>
+ <tabstop>noborder</tabstop>
+ <tabstop>enable_skiptaskbar</tabstop>
+ <tabstop>rule_skiptaskbar</tabstop>
+ <tabstop>skiptaskbar</tabstop>
+ <tabstop>enable_skippager</tabstop>
+ <tabstop>rule_skippager</tabstop>
+ <tabstop>skippager</tabstop>
+ <tabstop>enable_acceptfocus</tabstop>
+ <tabstop>rule_acceptfocus</tabstop>
+ <tabstop>acceptfocus</tabstop>
+ <tabstop>enable_closeable</tabstop>
+ <tabstop>rule_closeable</tabstop>
+ <tabstop>closeable</tabstop>
+ <tabstop>enable_opacityactive</tabstop>
+ <tabstop>rule_opacityactive</tabstop>
+ <tabstop>opacityactive</tabstop>
+ <tabstop>enable_opacityinactive</tabstop>
+ <tabstop>rule_opacityinactive</tabstop>
+ <tabstop>opacityinactive</tabstop>
+ <tabstop>enable_shortcut</tabstop>
+ <tabstop>rule_shortcut</tabstop>
+ <tabstop>shortcut</tabstop>
+ <tabstop>shortcut_edit</tabstop>
+ <tabstop>enable_fsplevel</tabstop>
+ <tabstop>rule_fsplevel</tabstop>
+ <tabstop>fsplevel</tabstop>
+ <tabstop>enable_moveresizemode</tabstop>
+ <tabstop>rule_moveresizemode</tabstop>
+ <tabstop>moveresizemode</tabstop>
+ <tabstop>enable_type</tabstop>
+ <tabstop>rule_type</tabstop>
+ <tabstop>type</tabstop>
+ <tabstop>enable_ignoreposition</tabstop>
+ <tabstop>rule_ignoreposition</tabstop>
+ <tabstop>ignoreposition</tabstop>
+ <tabstop>enable_minsize</tabstop>
+ <tabstop>rule_minsize</tabstop>
+ <tabstop>minsize</tabstop>
+ <tabstop>enable_maxsize</tabstop>
+ <tabstop>rule_maxsize</tabstop>
+ <tabstop>maxsize</tabstop>
+ <tabstop>enable_strictgeometry</tabstop>
+ <tabstop>rule_strictgeometry</tabstop>
+ <tabstop>strictgeometry</tabstop>
+ <tabstop>enable_disableglobalshortcuts</tabstop>
+ <tabstop>rule_disableglobalshortcuts</tabstop>
+ <tabstop>disableglobalshortcuts</tabstop>
+</tabstops>
+<slots>
+ <slot access="protected" specifier="pure virtual">detectClicked()</slot>
+ <slot access="protected" specifier="pure virtual">wmclassMatchChanged()</slot>
+ <slot access="protected" specifier="pure virtual">roleMatchChanged()</slot>
+ <slot access="protected" specifier="pure virtual">titleMatchChanged()</slot>
+ <slot access="protected" specifier="pure virtual">extraMatchChanged()</slot>
+ <slot access="protected" specifier="pure virtual">machineMatchChanged()</slot>
+ <slot access="protected" specifier="pure virtual">shortcutEditClicked()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<includehints>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>klistbox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>krestrictedline.h</includehint>
+ <includehint>krestrictedline.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>krestrictedline.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>krestrictedline.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>krestrictedline.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>krestrictedline.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>krestrictedline.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcombobox.h</includehint>
+</includehints>
+</UI>