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

Arno Rehn kde at arnorehn.de
Tue Aug 12 11:52:15 UTC 2008


SVN commit 845786 by arnorehn:

* Fix restoring of applet sizes.

CCMAIL: kde-bindings at kde.org



 M  +3 -0      ChangeLog  
 M  +4 -1      src/applet.rb  


--- trunk/KDE/kdebindings/ruby/plasma/ChangeLog #845785:845786
@@ -1,3 +1,6 @@
+2008-08-12  Arno Rehn  <arno at arnorehn.de>
+* Fix restoring of applet sizes.
+
 2008-08-07  Richard Dale  <richard.j.dale at gmail.com>
 * The marshaller for Plasma::DataEngine::Data was creating Qt::Variants with
   the wrong smoke pointer in the smokeruby_object struct, and this was causing
--- trunk/KDE/kdebindings/ruby/plasma/src/applet.rb #845785:845786
@@ -30,7 +30,7 @@
     end
 
     def init
-      applet.resize(200, 200)
+      oldSize = applet.size
 
       puts "RubyAppletScript::Applet#init mainScript: #{mainScript}"
       program = Qt::FileInfo.new(mainScript)
@@ -42,6 +42,9 @@
       klass = Object.const_get(moduleName.to_sym).const_get(className.to_sym)
       @applet_script = klass.new(self)
       @applet_script.init
+      if oldSize.height > 10 && oldSize.width > 10
+        applet.resize(oldSize)
+      end
 
       set_up_event_handlers
       return true



More information about the Kde-bindings mailing list