create_menu


Description:

[ CCode ( cname = "xapp_favorites_create_menu" ) ]
[ Version ( since = "2.0" ) ]
public Widget create_menu (string? mimetypes, owned FavoritesItemSelectedCallback callback)

Generates a GtkMenu widget populated with favorites.

The callback will be called when a menu item has been activated, and will include the uri of the respective item.

Parameters:

this

The Favorites instance.

mimetypes

The mimetypes to filter for, or NULL to include all favorites.

callback

(closure user_data): The callback to use when a menu item has been selected.

func

Destroy function for user_data.

user_data

The data to pass to the callback.

Returns:

a new Menu populated with a list of favorites, or NULL if there are no favorites.