GtkRecentManager: Formatting fixes
This commit is contained in:
parent
ea9f5e2273
commit
0a54ad1187
@ -242,7 +242,8 @@ filename_warning (const gchar *format,
|
||||
|
||||
/* Test of haystack has the needle prefix, comparing case
|
||||
* insensitive. haystack may be UTF-8, but needle must
|
||||
* contain only lowercase ascii. */
|
||||
* contain only lowercase ascii.
|
||||
*/
|
||||
static gboolean
|
||||
has_case_prefix (const gchar *haystack,
|
||||
const gchar *needle)
|
||||
@ -281,8 +282,8 @@ gtk_recent_manager_class_init (GtkRecentManagerClass *klass)
|
||||
/**
|
||||
* GtkRecentManager:filename:
|
||||
*
|
||||
* The full path to the file to be used to store and read the recently
|
||||
* used resources list
|
||||
* The full path to the file to be used to store and read the
|
||||
* recently used resources list
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -315,9 +316,9 @@ gtk_recent_manager_class_init (GtkRecentManagerClass *klass)
|
||||
* GtkRecentManager::changed:
|
||||
* @recent_manager: the recent manager
|
||||
*
|
||||
* Emitted when the current recently used resources manager changes its
|
||||
* contents, either by calling gtk_recent_manager_add_item() or by another
|
||||
* application.
|
||||
* Emitted when the current recently used resources manager changes
|
||||
* its contents, either by calling gtk_recent_manager_add_item() or
|
||||
* by another application.
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -589,8 +590,8 @@ gtk_recent_manager_set_filename (GtkRecentManager *manager,
|
||||
|
||||
/* if a filename is already set and filename is not NULL, then copy
|
||||
* it and reset the monitor; otherwise, if it's NULL we're being
|
||||
* called from the finalization sequence, so we simply disconnect the
|
||||
* monitoring and return.
|
||||
* called from the finalization sequence, so we simply disconnect
|
||||
* the monitoring and return.
|
||||
*
|
||||
* if no filename is set and filename is NULL, use the default.
|
||||
*/
|
||||
@ -668,7 +669,8 @@ build_recent_items_list (GtkRecentManager *manager)
|
||||
{
|
||||
/* the file exists, and it's valid (we hope); if not, destroy the container
|
||||
* object and hope for a better result when the next "changed" signal is
|
||||
* fired. */
|
||||
* fired.
|
||||
*/
|
||||
read_error = NULL;
|
||||
g_bookmark_file_load_from_file (priv->recent_items, priv->filename, &read_error);
|
||||
if (read_error)
|
||||
@ -722,7 +724,7 @@ build_recent_items_list (GtkRecentManager *manager)
|
||||
* #GtkRecentManager objects are expensive: be sure to create them only when
|
||||
* needed. You should use gtk_recent_manager_get_default() instead.
|
||||
*
|
||||
* Returns: A newly created #GtkRecentManager object.
|
||||
* Returns: A newly created #GtkRecentManager object
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -738,7 +740,8 @@ gtk_recent_manager_new (void)
|
||||
* Gets a unique instance of #GtkRecentManager, that you can share
|
||||
* in your application without caring about memory management.
|
||||
*
|
||||
* Returns: (transfer none): A unique #GtkRecentManager. Do not ref or unref it.
|
||||
* Returns: (transfer none): A unique #GtkRecentManager. Do not ref or
|
||||
* unref it.
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -799,7 +802,8 @@ gtk_recent_manager_add_item_query_info (GObject *source_object,
|
||||
gdk_threads_enter ();
|
||||
|
||||
/* Ignore return value, this can't fail anyway since all required
|
||||
* fields are set */
|
||||
* fields are set
|
||||
*/
|
||||
gtk_recent_manager_add_full (manager, uri, &recent_data);
|
||||
|
||||
manager->priv->is_dirty = TRUE;
|
||||
@ -824,8 +828,8 @@ gtk_recent_manager_add_item_query_info (GObject *source_object,
|
||||
* 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_recent_manager_add_full().
|
||||
* metadata and setting other metadata to common default values;
|
||||
* it then feeds the data to gtk_recent_manager_add_full().
|
||||
*
|
||||
* See gtk_recent_manager_add_full() if you want to explicitly
|
||||
* define the metadata for the resource pointed by @uri.
|
||||
@ -866,8 +870,8 @@ gtk_recent_manager_add_item (GtkRecentManager *manager,
|
||||
* @recent_data: metadata of the resource
|
||||
*
|
||||
* Adds a new resource, pointed by @uri, into the recently used
|
||||
* resources list, using the metadata specified inside the #GtkRecentData-struct
|
||||
* passed in @recent_data.
|
||||
* resources list, using the metadata specified inside the
|
||||
* #GtkRecentData-struct passed in @recent_data.
|
||||
*
|
||||
* The passed URI will be used to identify this resource inside the
|
||||
* list.
|
||||
@ -880,13 +884,13 @@ gtk_recent_manager_add_item (GtkRecentManager *manager,
|
||||
* launching the item.
|
||||
*
|
||||
* Optionally, a #GtkRecentData-struct might contain a UTF-8 string
|
||||
* to be used when viewing the item instead of the last component of the
|
||||
* URI; a short description of the item; whether the item should be
|
||||
* considered private - that is, should be displayed only by the
|
||||
* to be used when viewing the item instead of the last component of
|
||||
* the URI; a short description of the item; whether the item should
|
||||
* be considered private - that is, should be displayed only by the
|
||||
* applications that have registered it.
|
||||
*
|
||||
* Returns: %TRUE if the new item was successfully added to the
|
||||
* recently used resources list, %FALSE otherwise.
|
||||
* recently used resources list, %FALSE otherwise
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -1010,7 +1014,7 @@ gtk_recent_manager_add_full (GtkRecentManager *manager,
|
||||
* list handled by a recent manager.
|
||||
*
|
||||
* Returns: %TRUE if the item pointed by @uri has been successfully
|
||||
* removed by the recently used resources list, and %FALSE otherwise.
|
||||
* removed by the recently used resources list, and %FALSE otherwise
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -1068,7 +1072,7 @@ gtk_recent_manager_remove_item (GtkRecentManager *manager,
|
||||
* Checks whether there is a recently used resource registered
|
||||
* with @uri inside the recent manager.
|
||||
*
|
||||
* Returns: %TRUE if the resource was found, %FALSE otherwise.
|
||||
* Returns: %TRUE if the resource was found, %FALSE otherwise
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -1215,8 +1219,8 @@ gtk_recent_manager_lookup_item (GtkRecentManager *manager,
|
||||
* gtk_recent_manager_move_item:
|
||||
* @manager: a #GtkRecentManager
|
||||
* @uri: the URI of a recently used resource
|
||||
* @new_uri: (allow-none): the new URI of the recently used resource, or %NULL to
|
||||
* remove the item pointed by @uri in the list
|
||||
* @new_uri: (allow-none): the new URI of the recently used resource, or
|
||||
* %NULL to remove the item pointed by @uri in the list
|
||||
* @error: (allow-none): a return location for a #GError, or %NULL
|
||||
*
|
||||
* Changes the location of a recently used resource from @uri to @new_uri.
|
||||
@ -1224,7 +1228,7 @@ gtk_recent_manager_lookup_item (GtkRecentManager *manager,
|
||||
* Please note that this function will not affect the resource pointed
|
||||
* by the URIs, but only the URI used in the recently used resources list.
|
||||
*
|
||||
* Returns: %TRUE on success.
|
||||
* Returns: %TRUE on success
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -1351,7 +1355,7 @@ purge_recent_items_list (GtkRecentManager *manager,
|
||||
* Purges every item from the recently used resources list.
|
||||
*
|
||||
* Returns: the number of items that have been removed from the
|
||||
* recently used resources list.
|
||||
* recently used resources list
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -1526,8 +1530,8 @@ gtk_recent_info_free (GtkRecentInfo *recent_info)
|
||||
*
|
||||
* Increases the reference count of @recent_info by one.
|
||||
*
|
||||
* Returns: the recent info object with its reference count increased
|
||||
* by one.
|
||||
* Returns: the recent info object with its reference count
|
||||
* increased by one
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -1714,7 +1718,7 @@ gtk_recent_info_get_visited (GtkRecentInfo *info)
|
||||
* list that have this flag set to %TRUE should only be displayed by the
|
||||
* applications that have registered them.
|
||||
*
|
||||
* Returns: %TRUE if the private flag was found, %FALSE otherwise.
|
||||
* Returns: %TRUE if the private flag was found, %FALSE otherwise
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -1759,7 +1763,8 @@ recent_app_info_free (RecentAppInfo *app_info)
|
||||
* gtk_recent_info_get_application_info:
|
||||
* @info: a #GtkRecentInfo
|
||||
* @app_name: the name of the application that has registered this item
|
||||
* @app_exec: (transfer none) (out): return location for the string containing the command line
|
||||
* @app_exec: (transfer none) (out): return location for the string containing
|
||||
* the command line
|
||||
* @count: (out): return location for the number of times this item was registered
|
||||
* @time_: (out): return location for the timestamp this item was last registered
|
||||
* for this application
|
||||
@ -1873,7 +1878,7 @@ gtk_recent_info_get_applications (GtkRecentInfo *info,
|
||||
* Checks whether an application registered this resource using @app_name.
|
||||
*
|
||||
* Returns: %TRUE if an application with name @app_name was found,
|
||||
* %FALSE otherwise.
|
||||
* %FALSE otherwise
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -1922,7 +1927,7 @@ gtk_recent_info_last_application (GtkRecentInfo *info)
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
get_icon_for_mime_type (const char *mime_type,
|
||||
get_icon_for_mime_type (const gchar *mime_type,
|
||||
gint pixel_size)
|
||||
{
|
||||
GtkIconTheme *icon_theme;
|
||||
@ -2015,8 +2020,8 @@ gtk_recent_info_get_icon (GtkRecentInfo *info,
|
||||
*
|
||||
* Retrieves the icon associated to the resource MIME type.
|
||||
*
|
||||
* Returns: (transfer full): a #GIcon containing the icon, or %NULL. Use
|
||||
* g_object_unref() when finished using the icon
|
||||
* Returns: (transfer full): a #GIcon containing the icon, or %NULL.
|
||||
* Use g_object_unref() when finished using the icon
|
||||
*
|
||||
* Since: 2.22
|
||||
*/
|
||||
@ -2045,7 +2050,7 @@ gtk_recent_info_get_gicon (GtkRecentInfo *info)
|
||||
* Checks whether the resource is local or not by looking at the
|
||||
* scheme of its URI.
|
||||
*
|
||||
* Returns: %TRUE if the resource is local.
|
||||
* Returns: %TRUE if the resource is local
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -2061,8 +2066,9 @@ gtk_recent_info_is_local (GtkRecentInfo *info)
|
||||
* gtk_recent_info_exists:
|
||||
* @info: a #GtkRecentInfo
|
||||
*
|
||||
* Checks whether the resource pointed by @info still exists. At
|
||||
* the moment this check is done only on resources pointing to local files.
|
||||
* Checks whether the resource pointed by @info still exists.
|
||||
* At the moment this check is done only on resources pointing
|
||||
* to local files.
|
||||
*
|
||||
* Returns: %TRUE if the resource exists
|
||||
*
|
||||
@ -2101,8 +2107,8 @@ gtk_recent_info_exists (GtkRecentInfo *info)
|
||||
* Checks whether two #GtkRecentInfo-struct point to the same
|
||||
* resource.
|
||||
*
|
||||
* Returns: %TRUE if both #GtkRecentInfo-struct point to se same
|
||||
* resource, %FALSE otherwise.
|
||||
* Returns: %TRUE if both #GtkRecentInfo-struct point to the same
|
||||
* resource, %FALSE otherwise
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -2244,12 +2250,13 @@ get_uri_shortname_for_display (const gchar *uri)
|
||||
* gtk_recent_info_get_short_name:
|
||||
* @info: an #GtkRecentInfo
|
||||
*
|
||||
* Computes a valid UTF-8 string that can be used as the name of the item in a
|
||||
* menu or list. For example, calling this function on an item that refers to
|
||||
* Computes a valid UTF-8 string that can be used as the
|
||||
* name of the item in a menu or list. For example, calling
|
||||
* this function on an item that refers to
|
||||
* “file:///foo/bar.txt” will yield “bar.txt”.
|
||||
*
|
||||
* Returns: A newly-allocated string in UTF-8 encoding; free it with
|
||||
* g_free().
|
||||
* Returns: A newly-allocated string in UTF-8 encoding
|
||||
* free it with g_free()
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -2312,11 +2319,11 @@ gtk_recent_info_get_uri_display (GtkRecentInfo *info)
|
||||
* gtk_recent_info_get_age:
|
||||
* @info: a #GtkRecentInfo
|
||||
*
|
||||
* Gets the number of days elapsed since the last update of the resource
|
||||
* pointed by @info.
|
||||
* Gets the number of days elapsed since the last update
|
||||
* of the resource pointed by @info.
|
||||
*
|
||||
* Returns: a positive integer containing the number of days elapsed
|
||||
* since the time this resource was last modified.
|
||||
* Returns: a positive integer containing the number of days
|
||||
* elapsed since the time this resource was last modified
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
@ -2342,9 +2349,9 @@ gtk_recent_info_get_age (GtkRecentInfo *info)
|
||||
* @info: a #GtkRecentInfo
|
||||
* @length: (out) (allow-none): return location for the number of groups returned
|
||||
*
|
||||
* Returns all groups registered for the recently used item @info. The
|
||||
* array of returned group names will be %NULL terminated, so length might
|
||||
* optionally be %NULL.
|
||||
* Returns all groups registered for the recently used item @info.
|
||||
* The array of returned group names will be %NULL terminated, so
|
||||
* length might optionally be %NULL.
|
||||
*
|
||||
* Returns: (array length=length zero-terminated=1) (transfer full):
|
||||
* a newly allocated %NULL terminated array of strings.
|
||||
@ -2397,10 +2404,10 @@ gtk_recent_info_get_groups (GtkRecentInfo *info,
|
||||
* @info: a #GtkRecentInfo
|
||||
* @group_name: name of a group
|
||||
*
|
||||
* Checks whether @group_name appears inside the groups registered for the
|
||||
* recently used item @info.
|
||||
* Checks whether @group_name appears inside the groups
|
||||
* registered for the recently used item @info.
|
||||
*
|
||||
* Returns: %TRUE if the group was found.
|
||||
* Returns: %TRUE if the group was found
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user