GLib.BookmarkFile.prototype.add_application

function add_application(uri: String, name: String, exec: String): void {
    // Gjs wrapper for g_bookmark_file_add_application()
}
  

Adds the application with name and exec to the list of applications that have registered a bookmark for uri into bookmark.

Every bookmark inside a GLib.BookmarkFile must have at least an application registered. Each application must provide a name, a command line useful for launching the bookmark, the number of times the bookmark has been registered by the application and the last time the application registered this bookmark.

If name is null, the name of the application will be the same returned by GLib.get_application_name; if exec is null, the command line will be a composition of the program name as returned by GLib.get_prgname and the "\%u" modifier, which will be expanded to the bookmark's URI.

This function will automatically take care of updating the registrations count and timestamping in case an application with the same name had already registered a bookmark for uri inside bookmark.

If no bookmark for uri is found, one is created.

Since 2.12

uri

a valid URI

name

the name of the application registering the bookmark or null

exec

command line to be used to launch the bookmark or null