Gnome Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
These functions provide access to store and retrieve a list of recently used documents. Applications need to call gnome_history_recently_used() routine with the proper arguments to register a file as having been recently used. The creator field should be an action in the format supported by the "open" mime-type action (for example "program f", or "program") to re-open the document.
In the following example, the file sales.gnumeric will be added to the historic list of visited documents, the mime-type of the file is "application/x-gnumeric" and the program that will open this file is "gnumeric". Finally note that the descriptive information is surrounded by the _() macro to have this item translated to the user's language at runtime.
The following example would keep track of recent talks with a user:
To retrieve items from the history, you use the gnome_history_get_recently_used() function which returns a GList that contains GnomeHistoryEntry structures. To release this list, call the gnome_history_free_recently_used_list().
This routine is used to keep track of recently used file within the GNOME desktop. filename is the file that was recently used or just created.
filename : | the file name that was recently used. |
filetype : | the mime-type of the file used. |
creator : | application that created this. |
desc : | textual description of the application creator |
Returns : | a GList with GnomeHistoryEntry structures with all of the recently used documents. |