[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: KDE/kdelibs/plasma
From: Dan Meltzer <parallelgrapefruit () gmail ! com>
Date: 2009-01-10 2:10:00
Message-ID: 46059ce10901091810y26bd1abk38b631db4b4f658 () mail ! gmail ! com
[Download RAW message or body]
I think krazy will tell you to use size.isValid() instead of comparing
to QSize()
On 1/9/09, Chani Armitage <chanika@gmail.com> wrote:
> SVN commit 908612 by chani:
>
> a default size for scripted applets, because they aren't allowed to do
> anything themselves before init (and this is the one thing that *must* be
> done before init)
>
>
> M +9 -0 applet.cpp
> M +3 -0 servicetypes/plasma-applet.desktop
>
>
> --- trunk/KDE/kdelibs/plasma/applet.cpp #908611:908612
> @@ -1946,6 +1946,15 @@
> if (!package->filePath("mainconfigui").isEmpty()) {
> q->setHasConfigurationInterface(true);
> }
> +
> + //set a default size before any saved settings are read
> + QSize size =
> appletDescription.property("X-Plasma-DefaultSize").toSize();
> + if (size == QSize()) {
> + size = QSize(200,200);
> + }
> + //kDebug() << "size" << size;
> + q->resize(size);
> +
> }
>
> QString AppletPrivate::globalName() const
> --- trunk/KDE/kdelibs/plasma/servicetypes/plasma-applet.desktop
> #908611:908612
> @@ -59,3 +59,6 @@
> [PropertyDef::X-Plasma-DropMimeTypes]
> Type=QStringList
>
> +[PropertyDef::X-Plasma-DefaultSize]
> +Type=QSize
> +
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic