[Kde-bindings] KDE/kdebase/workspace/plasma/scriptengines/ruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Tue Jun 16 10:37:33 UTC 2009
SVN commit 982586 by rdale:
* The resize() method doesn't work with scripting plasmoids, so if it is used
output a warning message, and suggest adding a X-Plasma-DefautSize entry in
the metadata.desktop file.
CCMAIL: kde-bindings at kde.org
M +5 -0 ChangeLog
M +12 -0 applet.rb
--- trunk/KDE/kdebase/workspace/plasma/scriptengines/ruby/ChangeLog #982585:982586
@@ -1,3 +1,8 @@
+2009-06-16 Richard Dale <richard.j.dale at gmail.com>
+* The resize() method doesn't work with scripting plasmoids, so if it is used
+output a warning message, and suggest adding a X-Plasma-DefautSize entry in
+the metadata.desktop file.
+
2009-05-26 Richard Dale <richard.j.dale at gmail.com>
* Add a callback for the configChanged() method in scripting applets
--- trunk/KDE/kdebase/workspace/plasma/scriptengines/ruby/applet.rb #982585:982586
@@ -77,6 +77,18 @@
@applet_script.shape
end
+ def resize(*args)
+ if args.length == 1 && args[0].kindof?(Qt::Size)
+ puts "Warning: invalid resize() call. Add this to your metadata.desktop file:"
+ puts "X-Plasma-DefautSize=%d,%d" % [args[0].width, args[0].height]
+ elsif args.length == 2
+ puts "Warning: invalid resize() call. Add this to your metadata.desktop file:"
+ puts "X-Plasma-DefautSize=%d,%d" % [args[0].to_i, args[1].to_i]
+ else
+ super(*args)
+ end
+ end
+
def constraintsEvent(constraints)
end
More information about the Kde-bindings
mailing list