[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/kdm/kfrontend/themer
From: Oswald Buddenhagen <ossi () kde ! org>
Date: 2006-10-01 0:01:44
Message-ID: 1159660904.325398.18887.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 590815 by ossi:
decruft
M +4 -9 kdmitem.cpp
M +0 -8 kdmitem.h
M +0 -8 kdmlabel.cpp
M +0 -2 kdmlabel.h
M +1 -10 kdmlayout.cpp
M +0 -5 kdmpixmap.cpp
M +0 -4 kdmrect.cpp
M +1 -1 kdmthemer.cpp
M +0 -15 kdmthemer.h
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/themer/kdmitem.cpp #590814:590815
@@ -45,7 +45,6 @@
, isButton( false )
, boxManager( 0 )
, fixedManager( 0 )
- , image( 0 )
, myWidget( 0 )
{
// Set default layout for every item
@@ -61,7 +60,6 @@
isShown = InitialHidden;
// Set defaults for derived item's properties
- properties.incrementalPaint = false;
state = Snormal;
// The "toplevel" node (the screen) is really just like a fixed node
@@ -77,7 +75,7 @@
for (int nod = 0; nod < childList.count(); nod++) {
QDomNode child = childList.item( nod );
QDomElement el = child.toElement();
- QString tagName = el.tagName(), attr;
+ QString tagName = el.tagName();
if (tagName == "pos") {
parseSize( el.attribute( "x", QString() ), geom.pos.x );
@@ -89,18 +87,16 @@
parseSize( el.attribute( "max-width", QString() ), geom.maxSize.x );
parseSize( el.attribute( "max-height", QString() ), geom.maxSize.y );
geom.anchor = el.attribute( "anchor", "nw" );
- QString exp = el.attribute( "expand", "false" ).toLower();
+ QString exp = el.attribute( "expand", "false" );
bool ok;
geom.expand = exp.toInt( &ok );
if (!ok)
geom.expand = exp == "true";
- }
- if (tagName == "buddy")
+ } else if (tagName == "buddy")
buddy = el.attribute( "idref", "" );
}
- QDomNode tnode = node;
- id = tnode.toElement().attribute( "id", QString::number( (ulong)this, 16 ) );
+ id = node.toElement().attribute( "id", QString::number( (ulong)this, 16 ) );
// Tell 'parent' to add 'me' to its children
parentItem->addChildItem( this );
@@ -110,7 +106,6 @@
{
delete boxManager;
delete fixedManager;
- delete image;
}
void
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/themer/kdmitem.h #590814:590815
@@ -207,11 +207,6 @@
static KdmItem *currentActive;
- // This struct can be filled in by derived items
- struct {
- bool incrementalPaint;
- } properties;
-
// This is the placement of the item
QRect area;
@@ -253,9 +248,6 @@
KdmLayoutBox *boxManager;
KdmLayoutFixed *fixedManager;
- // Compositing related variables
- QImage *image;
-
QWidget *myWidget;
enum { InitialHidden, ExplicitlyHidden, Shown } isShown;
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/themer/kdmlabel.cpp #590814:590815
@@ -57,14 +57,6 @@
const QString locale = KGlobal::locale()->language();
- // Read LABEL ID
- QDomNode n = node;
- QDomElement elLab = n.toElement();
- // ID types: clock, pam-error, pam-message, pam-prompt,
- // pam-warning, timed-label
- label.id = elLab.attribute( "id", "" );
- label.hasId = !(label.id).isEmpty();
-
// Read LABEL TAGS
QDomNodeList childList = node.childNodes();
bool stockUsed = false;
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/themer/kdmlabel.h #590814:590815
@@ -57,8 +57,6 @@
struct LabelStruct {
QString text;
bool isTimer;
- bool hasId;
- QString id;
struct LabelClass {
QColor color;
QFont font;
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/themer/kdmlayout.cpp #590814:590815
@@ -83,15 +83,7 @@
if (!parentGeometry.isValid() || parentGeometry.isEmpty())
return;
- // Check if box size was computed. If not compute it
- // TODO check if this prevents updating changing items
-// if (!hintedSize.isValid())
-// sizeHint();
-
-// kDebug() << this << " hintedSize " << hintedSize << endl;
-
- //XXX why was this asymmetric? it broke things big time.
- QRect childrenRect = /*box.isVertical ? QRect( parentGeometry.topLeft(), hintedSize \
) :*/ parentGeometry; + QRect childrenRect = parentGeometry;
// Begin cutting the parent rectangle to attach children on the right place
childrenRect.adjust( box.xpadding, box.ypadding, -box.xpadding, -box.ypadding );
@@ -224,7 +216,6 @@
}
}
-//FIXME truly experimental (is so close to greeter_geometry.c)
QSize
KdmLayoutBox::sizeHint( QStack<QSize> &parentSizes )
{
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/themer/kdmpixmap.cpp #590814:590815
@@ -41,11 +41,6 @@
pixmap.active.present = false;
pixmap.prelight.present = false;
- // Read PIXMAP ID
- // it rarely happens that a pixmap can be a button too!
- QDomNode n = node;
- QDomElement elPix = n.toElement();
-
// Read PIXMAP TAGS
QDomNodeList childList = node.childNodes();
for (int nod = 0; nod < childList.count(); nod++) {
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/themer/kdmrect.cpp #590814:590815
@@ -44,10 +44,6 @@
if (node.isNull())
return;
- // Read RECT ID
- QDomNode n = node;
- QDomElement elRect = n.toElement();
-
// Read RECT TAGS
QDomNodeList childList = node.childNodes();
for (int nod = 0; nod < childList.count(); nod++) {
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/themer/kdmthemer.cpp #590814:590815
@@ -76,6 +76,7 @@
FDialog::box( w, errorbox, i18n( "Cannot open theme file %1" , filename) );
return;
}
+ QDomDocument domTree;
if (!domTree.setContent( &opmlFile )) {
FDialog::box( w, errorbox, i18n( "Cannot parse theme file %1" , filename) );
return;
@@ -105,7 +106,6 @@
KdmThemer::~KdmThemer()
{
- delete rootItem;
}
void
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/themer/kdmthemer.h #590814:590815
@@ -66,16 +66,6 @@
const QString &baseDir() const { return basedir; }
- /*
- * Gives a sizeHint to the widget (parent size)
- */
- //QSize sizeHint() const{ return parentWidget()->size(); }
-
- /*
- * Takes a shot of the current widget
- */
-// void pixmap( const QRect &r, QPixmap *px );
-
virtual // just to put the reference in the vmt
KdmItem *findNode( const QString & ) const;
@@ -98,11 +88,6 @@
*/
QString m_currentMode;
- /*
- * The config file being used
- */
- QDomDocument domTree;
-
// defines the directory the theme is in
QString basedir;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic