ruby bindings

0xDeadC0de roguestar191 at comcast.net
Fri Jan 9 07:28:23 CET 2009


I think there's a coincidence between the animator and the
tooltipmanager singletons not working. If I uncomment everything in the
snippet below it crashes on me. at
ToolTipManager::self().setContent(icon, data).
 (I am using older bindings from 4.2b2 still..)

Someone in irc suggested it could be the "self" keyword conflicting with
the c++ function call, could this be it? (Sorry if I remembered who I'd
give them credit)

    def addToolNoLayout(iconString)
        icon = Plasma::IconWidget.new(@top.mytop)
        action = Qt::Action.new(KDE::Icon.new(iconString), "",
@top.mytop)
        action.setToolTip("test")
        icon.setAction(action)
        icon.setMinimumSize(32,32)
        icon.setMaximumSize(32,32)
#
icon.setPreferredSize(icon.sizeFromIconSize(KDE::IconLoader::Toolbar))
#       puts 'create data'
#       data = Plasma::ToolTipContent.new()
#       data.mainText = ("My Title")
#       data.subText = ("This is a little tooltip")
#       puts 'add to manager'
#       Plasma::ToolTipManager::self().setContent(icon, data)
#       puts 'end'

        return icon
    end




More information about the Plasma-devel mailing list