[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.5/kdelibs/plasma
From: Marco Martin <notmart () gmail ! com>
Date: 2010-08-31 20:49:42
Message-ID: 20100831204942.8836CAC857 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1170431 by mart:
backport the earlier initialization of the size
patch by Mivhael Seiwert
M +10 -11 applet.cpp
--- branches/KDE/4.5/kdelibs/plasma/applet.cpp #1170430:1170431
@@ -2655,6 +2655,12 @@
// but it doesn't actually work anyways =/
q->setLayoutDirection(qApp->layoutDirection());
+ //set a default size before any saved settings are read
+ QSize size(200, 200);
+ q->setBackgroundHints(Applet::DefaultBackground);
+ q->setHasConfigurationInterface(true); //FIXME why not default it to true in the constructor?
+
+
if (!appletDescription.isValid()) {
kDebug() << "Check your constructor! "
<< "You probably want to be passing in a Service::Ptr "
@@ -2662,6 +2668,10 @@
return;
}
+ size = appletDescription.property("X-Plasma-DefaultSize").toSize();
+ //kDebug() << "size" << size;
+ q->resize(size);
+
QString api = appletDescription.property("X-Plasma-API").toString();
// we have a scripted plasmoid
@@ -2717,17 +2727,6 @@
}
}
- //set a default size before any saved settings are read
- QSize size = appletDescription.property("X-Plasma-DefaultSize").toSize();
- if (size.isEmpty()) {
- size = QSize(200, 200);
- }
- //kDebug() << "size" << size;
- q->resize(size);
-
- q->setBackgroundHints(Applet::DefaultBackground);
- q->setHasConfigurationInterface(true); //FIXME why not default it to true in the constructor?
-
QAction *closeApplet = actions->action("remove");
if (closeApplet) {
closeApplet->setText(i18nc("%1 is the name of the applet", "Remove this %1", q->name()));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic