changed.
BookmarkFile.setAppInfo
bool setAppInfo(string uri, string name, string exec, int count, long stamp)Sets the meta-data of application name inside the list of applications that have registered a bookmark for uri inside bookmark.
You should rarely use this function; use [glib.bookmark_file.BookmarkFile.addApplication] and [glib.bookmark_file.BookmarkFile.removeApplication] instead.
name can be any UTF-8 encoded string used to identify an application. exec can have one of these two modifiers: "\f", which will be expanded as the local file name retrieved from the bookmark's URI; "\u", which will be expanded as the bookmark's URI. The expansion is done automatically when retrieving the stored command line using the [glib.bookmark_file.BookmarkFile.getApplicationInfo] function. count is the number of times the application has registered the bookmark; if is < 0, the current registration count will be increased by one, if is 0, the application with name will be removed from the list of registered applications. stamp is the Unix time of the last registration; if it is -1, the current time will be used.
If you try to remove an application by setting its registration count to zero, and no bookmark for uri is found, false is returned and error is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly, in the event that no application name has registered a bookmark for uri, false is returned and error is set to G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark for uri is found, one is created.
Parameters
uri | a valid URI |
name | an application's name |
exec | an application's command line |
count | the number of registrations done for this application |
stamp | the time of the last registration for this application |
Returns
Throws
Deprecated
time_t is deprecated due to the year 2038 problem.