[Kde-bindings] KDE/kdebindings/csharp/plasma

Arno Rehn kde at arnorehn.de
Tue Aug 12 11:42:23 UTC 2008


SVN commit 845783 by arnorehn:

* Sizes of applets are now correctly restored.
* debug--

CCMAIL: kde-bindings at kde.org



 M  +4 -0      ChangeLog  
 M  +1 -6      examples/applets/analog-clock/clock.cs  
 M  +3 -1      src/PlasmaScriptengineKimono_Applet.cs  


--- trunk/KDE/kdebindings/csharp/plasma/ChangeLog #845782:845783
@@ -1,3 +1,7 @@
+2008-08-12  Arno Rehn  <arno at arnorehn.de>
+* Sizes of applets are now correctly restored.
+* debug--
+
 2008-08-11  Arno Rehn  <arno at arnorehn.de>
 * Add the analog-clock applet converted to C#.
 
--- trunk/KDE/kdebindings/csharp/plasma/examples/applets/analog-clock/clock.cs #845782:845783
@@ -33,11 +33,6 @@
         reference = this;
     }
 
-    public new void Dispose() {
-        DumpObjectInfo();
-        Console.WriteLine("Clock.Dispose()");
-    }
-
     public override void Init() {
         base.Init();
 
@@ -49,7 +44,7 @@
 
         ConnectToEngine();
     }
-    
+
     public override void PaintInterface(QPainter p, QStyleOptionGraphicsItem option, QRect rect) {
         QRectF tempRect = new QRectF(0, 0, 0, 0);
 
--- trunk/KDE/kdebindings/csharp/plasma/src/PlasmaScriptengineKimono_Applet.cs #845782:845783
@@ -38,7 +38,7 @@
         public Applet(QObject parent, List<QVariant> args) : base(parent) {}
 
         public override bool Init() {
-            Applet().Resize(200, 200);
+            QSizeF oldSize = Applet().Size;
             QFileInfo program = new QFileInfo(MainScript());
 
             appletAssembly = Assembly.LoadFile(program.AbsoluteFilePath());
@@ -69,6 +69,8 @@
 
             applet = (PlasmaScripting.Applet) Activator.CreateInstance(appletType, new object[] { this });
             applet.Init();
+            if (oldSize.Width() > 10 && oldSize.Height() > 10)
+                Applet().Size = oldSize;
             SetUpEventHandlers();
             return true;
         }



More information about the Kde-bindings mailing list