add_type_handler


Description:

public bool add_type_handler (string type, ClientTypeHandler newfunc)

This function connects into the type handling of the Client.

Every new menuitem that comes in immediately gets asked for its properties. When we get those properties we check the 'type' property and look to see if it matches a handler that is known by the client. If so, the newfunc function is executed on that Menuitem. If not, then the DbusmenuClient: DbusmenuClient:new-menuitem signal is sent.

In the future the known types will be sent to the server so that it can make choices about the menu item types availble.

Parameters:

this

Client where we're getting types coming in

type

A text string that will be matched with the 'type' property on incoming menu items

newfunc

The function that will be executed with those new items when they come in.

Returns:

If registering the new type was successful.