Clickable links in MXit

Daniel Atallah daniel.atallah at gmail.com
Wed Nov 25 10:22:35 EST 2009


On Wed, Nov 25, 2009 at 09:53, Andrew Victor <avictor.za at gmail.com> wrote:
> hi,
>
> The services running on MXit make use of "clickable" links for user-navigation.
>
> For a "news" type of service, the following would be displayed in the
> chat window:
> News
> -------
> - News headline 1  [More info...]
> - News headline 2 [More info...]
> - News headline 3 [More info...]
> [Main menu]  [Next page]
>
> When the user clicks on one of the [..] links, a message with a
> defined value is sent back to the contact so the next appropriate page
> can be displayed.

<SNIP>

Pidgin 2.6.0 added the "gtk_imhtml_class_register_protocol" function
that can be used to register a URI handler internally to the GtkIMHtml
that is used for the GUI.

You can use that to associate links of a particular type (I would
suggest using a completely internal prefix, not something you would
ever want to have an external process pass into pidgin) to your own
protocol handler.

Don't forget to unregister the protocol handler
(gtk_imhtml_class_register_protocol(proto, NULL, NULL)) when your
plugin is unloaded .

-D




More information about the Devel mailing list