Gtk.RecentManager.prototype.add_item
function add_item(uri:String):Boolean {
// Gjs wrapper for gtk_recent_manager_add_item()
}Adds a new resource, pointed by uri, into the recently used resources list.
This function automatically retrieves some of the needed metadata and setting other metadata to common default values; it then feeds the data to Gtk.RecentManager.prototype.add_full.
See Gtk.RecentManager.prototype.add_full if you want to explicitly define the metadata for the resource pointed by uri.
Since 2.10
- uri
a valid URI
- Returns
true if the new item was successfully added to the recently used resources list