mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
Add a migration guide for porting to the new GtkRecent stuff from the old
2006-03-29 Emmanuele Bassi <ebassi@cvs.gnome.org> * docs/reference/gtk/migrating-GtkRecentChooser.sgml: Add a migration guide for porting to the new GtkRecent stuff from the old EggRecent code. * docs/reference/gtk/tmpl/gtkrecentchooser.sgml: * docs/reference/gtk/tmpl/gtkrecentchooserdialog.sgml: * docs/reference/gtk/tmpl/gtkrecentchoosermenu.sgml: * docs/reference/gtk/tmpl/gtkrecentchooserwidget.sgml: * docs/reference/gtk/tmpl/gtkrecentfilter.sgml: * docs/reference/gtk/tmpl/gtkrecentmanager.sgml: Add template files for the reference guide. * docs/reference/gtk/gtk-docs.sgml: * docs/reference/gtk/gtk-sections.txt: * docs/reference/gtk/Makefile.am: Build glue for add GtkRecent to the reference guide.
This commit is contained in:
parent
056f6db533
commit
ee04430b40
19
ChangeLog
19
ChangeLog
@ -1,3 +1,22 @@
|
||||
2006-03-29 Emmanuele Bassi <ebassi@cvs.gnome.org>
|
||||
|
||||
* docs/reference/gtk/migrating-GtkRecentChooser.sgml: Add a migration
|
||||
guide for porting to the new GtkRecent stuff from the old EggRecent
|
||||
code.
|
||||
|
||||
* docs/reference/gtk/tmpl/gtkrecentchooser.sgml:
|
||||
* docs/reference/gtk/tmpl/gtkrecentchooserdialog.sgml:
|
||||
* docs/reference/gtk/tmpl/gtkrecentchoosermenu.sgml:
|
||||
* docs/reference/gtk/tmpl/gtkrecentchooserwidget.sgml:
|
||||
* docs/reference/gtk/tmpl/gtkrecentfilter.sgml:
|
||||
* docs/reference/gtk/tmpl/gtkrecentmanager.sgml: Add template files
|
||||
for the reference guide.
|
||||
|
||||
* docs/reference/gtk/gtk-docs.sgml:
|
||||
* docs/reference/gtk/gtk-sections.txt:
|
||||
* docs/reference/gtk/Makefile.am: Build glue for add GtkRecent to
|
||||
the reference guide.
|
||||
|
||||
2006-03-29 Emmanuele Bassi <ebassi@cvs.gnome.org>
|
||||
|
||||
* tests/Makefile.am:
|
||||
|
@ -1,3 +1,22 @@
|
||||
2006-03-29 Emmanuele Bassi <ebassi@cvs.gnome.org>
|
||||
|
||||
* docs/reference/gtk/migrating-GtkRecentChooser.sgml: Add a migration
|
||||
guide for porting to the new GtkRecent stuff from the old EggRecent
|
||||
code.
|
||||
|
||||
* docs/reference/gtk/tmpl/gtkrecentchooser.sgml:
|
||||
* docs/reference/gtk/tmpl/gtkrecentchooserdialog.sgml:
|
||||
* docs/reference/gtk/tmpl/gtkrecentchoosermenu.sgml:
|
||||
* docs/reference/gtk/tmpl/gtkrecentchooserwidget.sgml:
|
||||
* docs/reference/gtk/tmpl/gtkrecentfilter.sgml:
|
||||
* docs/reference/gtk/tmpl/gtkrecentmanager.sgml: Add template files
|
||||
for the reference guide.
|
||||
|
||||
* docs/reference/gtk/gtk-docs.sgml:
|
||||
* docs/reference/gtk/gtk-sections.txt:
|
||||
* docs/reference/gtk/Makefile.am: Build glue for add GtkRecent to
|
||||
the reference guide.
|
||||
|
||||
2006-03-29 Emmanuele Bassi <ebassi@cvs.gnome.org>
|
||||
|
||||
* tests/Makefile.am:
|
||||
|
@ -130,6 +130,7 @@ expand_content_files = \
|
||||
migrating-GtkAboutDialog.sgml \
|
||||
migrating-GtkColorButton.sgml \
|
||||
migrating-GtkAssistant.sgml \
|
||||
migrating-GtkRecentChooser.sgml \
|
||||
tree_widget.sgml \
|
||||
text_widget.sgml \
|
||||
question_index.sgml
|
||||
|
@ -91,6 +91,12 @@
|
||||
<!ENTITY GtkRadioMenuItem SYSTEM "xml/gtkradiomenuitem.xml">
|
||||
<!ENTITY GtkRadioToolButton SYSTEM "xml/gtkradiotoolbutton.xml">
|
||||
<!ENTITY GtkRange SYSTEM "xml/gtkrange.xml">
|
||||
<!ENTITY GtkRecentChooser SYSTEM "xml/gtkrecentchooser.xml">
|
||||
<!ENTITY GtkRecentChooserDialog SYSTEM "xml/gtkrecentchooserdialog.xml">
|
||||
<!ENTITY GtkRecentChooserMenu SYSTEM "xml/gtkrecentchoosermenu.xml">
|
||||
<!ENTITY GtkRecentChooserWidget SYSTEM "xml/gtkrecentchooserwidget.xml">
|
||||
<!ENTITY GtkRecentFilter SYSTEM "xml/gtkrecentfilter.xml">
|
||||
<!ENTITY GtkRecentManager SYSTEM "xml/gtkrecentmanager.xml">
|
||||
<!ENTITY GtkRuler SYSTEM "xml/gtkruler.xml">
|
||||
<!ENTITY GtkScale SYSTEM "xml/gtkscale.xml">
|
||||
<!ENTITY GtkScrollbar SYSTEM "xml/gtkscrollbar.xml">
|
||||
@ -203,6 +209,7 @@
|
||||
<!ENTITY gtk-migrating-GtkAboutDialog SYSTEM "xml/migrating-GtkAboutDialog.sgml">
|
||||
<!ENTITY gtk-migrating-GtkColorButton SYSTEM "xml/migrating-GtkColorButton.sgml">
|
||||
<!ENTITY gtk-migrating-GtkAssistant SYSTEM "xml/migrating-GtkAssistant.sgml">
|
||||
<!ENTITY gtk-migrating-GtkRecentChooser SYSTEM "xml/migrating-GtkRecentChooser.sgml">
|
||||
<!ENTITY version SYSTEM "version.xml">
|
||||
<!ENTITY gtk-query-immodules SYSTEM "gtk-query-immodules-2.0.xml">
|
||||
<!ENTITY gtk-update-icon-cache SYSTEM "gtk-update-icon-cache.xml">
|
||||
@ -554,6 +561,16 @@ that is, GUI components such as <link linkend="GtkButton">GtkButton</link> or
|
||||
&GtkVRuler;
|
||||
</chapter>
|
||||
|
||||
<chapter id="RecentDocuments">
|
||||
<title>Recently Used Documents</title>
|
||||
&GtkRecentManager;
|
||||
&GtkRecentChooser;
|
||||
&GtkRecentChooserDialog;
|
||||
&GtkRecentChooserMenu;
|
||||
&GtkRecentChooserWidget;
|
||||
&GtkRecentFilter;
|
||||
</chapter>
|
||||
|
||||
<chapter id="DeprecatedObjects">
|
||||
<title>Deprecated</title>
|
||||
&GtkCList;
|
||||
@ -597,6 +614,7 @@ that is, GUI components such as <link linkend="GtkButton">GtkButton</link> or
|
||||
>k-migrating-GtkAboutDialog;
|
||||
>k-migrating-GtkColorButton;
|
||||
>k-migrating-GtkAssistant;
|
||||
>k-migrating-GtkRecentChooser;
|
||||
</part>
|
||||
|
||||
<part>
|
||||
|
@ -2746,6 +2746,202 @@ GtkRangeLayout
|
||||
GtkRangeStepTimer
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkrecentchooser</FILE>
|
||||
<TITLE>GtkRecentChooser</TITLE>
|
||||
GtkRecentChooser
|
||||
GtkRecentChooserIface
|
||||
GTK_RECENT_CHOOSER_ERROR
|
||||
GtkRecentChooserError
|
||||
gtk_recent_chooser_set_show_private
|
||||
gtk_recent_chooser_get_show_private
|
||||
gtk_recent_chooser_set_show_not_found
|
||||
gtk_recent_chooser_get_show_not_found
|
||||
gtk_recent_chooser_set_show_icons
|
||||
gtk_recent_chooser_get_show_icons
|
||||
gtk_recent_chooser_set_select_multiple
|
||||
gtk_recent_chooser_get_select_multiple
|
||||
gtk_recent_chooser_set_local_only
|
||||
gtk_recent_chooser_get_local_only
|
||||
gtk_recent_chooser_set_limit
|
||||
gtk_recent_chooser_get_limit
|
||||
gtk_recent_chooser_set_show_tips
|
||||
gtk_recent_chooser_get_show_tips
|
||||
gtk_recent_chooser_set_show_numbers
|
||||
gtk_recent_chooser_get_show_numbers
|
||||
gtk_recent_chooser_set_sort_type
|
||||
gtk_recent_chooser_get_sort_type
|
||||
gtk_recent_chooser_set_sort_func
|
||||
gtk_recent_chooser_set_current_uri
|
||||
gtk_recent_chooser_get_current_uri
|
||||
gtk_recent_chooser_get_current_item
|
||||
gtk_recent_chooser_select_uri
|
||||
gtk_recent_chooser_unselect_uri
|
||||
gtk_recent_chooser_select_all
|
||||
gtk_recent_chooser_unselect_all
|
||||
gtk_recent_chooser_get_items
|
||||
gtk_recent_chooser_get_uris
|
||||
gtk_recent_chooser_add_filter
|
||||
gtk_recent_chooser_remove_filter
|
||||
gtk_recent_chooser_list_filters
|
||||
gtk_recent_chooser_set_filter
|
||||
gtk_recent_chooser_get_filter
|
||||
<SUBSECTION Standard>
|
||||
GTK_RECENT_CHOOSER
|
||||
GTK_IS_RECENT_CHOOSER
|
||||
GTK_TYPE_RECENT_CHOOSER
|
||||
GTK_RECENT_CHOOSER_GET_IFACE
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_recent_chooser_get_type
|
||||
gtk_recent_chooser_error_quark
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkrecentchooserdialog</FILE>
|
||||
<TITLE>GtkRecentChooserDialog</TITLE>
|
||||
GtkRecentChooserDialog
|
||||
gtk_recent_chooser_dialog_new
|
||||
gtk_recent_chooser_dialog_new_for_manager
|
||||
<SUBSECTION Standard>
|
||||
GTK_RECENT_CHOOSER_DIALOG
|
||||
GTK_IS_RECENT_CHOOSER_DIALOG
|
||||
GTK_TYPE_RECENT_CHOOSER_DIALOG
|
||||
GTK_RECENT_CHOOSER_DIALOG_CLASS
|
||||
GTK_IS_RECENT_CHOOSER_DIALOG_CLASS
|
||||
GTK_RECENT_CHOOSER_DIALOG_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_recent_chooser_dialog_get_type
|
||||
GtkRecentChooserDialogPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkrecentchoosermenu</FILE>
|
||||
<TITLE>GtkRecentChooserMenu</TITLE>
|
||||
GtkRecentChooserMenu
|
||||
gtk_recent_chooser_menu_new
|
||||
gtk_recent_chooser_menu_new_for_manager
|
||||
gtk_recent_chooser_menu_get_show_numbers
|
||||
gtk_recent_chooser_menu_set_show_numbers
|
||||
<SUBSECTION Standard>
|
||||
GTK_RECENT_CHOOSER_MENU
|
||||
GTK_IS_RECENT_CHOOSER_MENU
|
||||
GTK_TYPE_RECENT_CHOOSER_MENU
|
||||
GTK_RECENT_CHOOSER_MENU_CLASS
|
||||
GTK_IS_RECENT_CHOOSER_MENU_CLASS
|
||||
GTK_RECENT_CHOOSER_MENU_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_recent_chooser_menu_get_type
|
||||
GtkRecentChooserMenuPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkrecentchooserwidget</FILE>
|
||||
<TITLE>GtkRecentChooserWidget</TITLE>
|
||||
GtkRecentChooserWidget
|
||||
gtk_recent_chooser_widget_new
|
||||
gtk_recent_chooser_widget_new_for_manager
|
||||
<SUBSECTION Standard>
|
||||
GTK_RECENT_CHOOSER_WIDGET
|
||||
GTK_IS_RECENT_CHOOSER_WIDGET
|
||||
GTK_TYPE_RECENT_CHOOSER_WIDGET
|
||||
GTK_RECENT_CHOOSER_WIDGET_CLASS
|
||||
GTK_IS_RECENT_CHOOSER_WIDGET_CLASS
|
||||
GTK_RECENT_CHOOSER_WIDGET_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_recent_chooser_widget_get_type
|
||||
GtkRecentChooserWidgetPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkrecentfilter</FILE>
|
||||
<TITLE>GtkRecentFilter</TITLE>
|
||||
GtkRecentFilter
|
||||
GtkRecentFilterInfo
|
||||
GtkRecentFilterFlags
|
||||
GtkRecentFilterFunc
|
||||
gtk_recent_filter_new
|
||||
gtk_recent_filter_get_name
|
||||
gtk_recent_filter_set_name
|
||||
gtk_recent_filter_add_mime_type
|
||||
gtk_recent_filter_add_pattern
|
||||
gtk_recent_filter_add_pixbuf_formats
|
||||
gtk_recent_filter_add_application
|
||||
gtk_recent_filter_add_group
|
||||
gtk_recent_filter_add_age
|
||||
gtk_recent_filter_add_custom
|
||||
gtk_recent_filter_get_needed
|
||||
gtk_recent_filter_filter
|
||||
<SUBSECTION Standard>
|
||||
GTK_RECENT_FILTER
|
||||
GTK_IS_RECENT_FILTER
|
||||
GTK_TYPE_RECENT_FILTER
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_recent_filter_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkrecentmanager</FILE>
|
||||
<TITLE>GtkRecentManager</TITLE>
|
||||
GtkRecentManager
|
||||
GtkRecentInfo
|
||||
GtkRecentData
|
||||
GTK_RECENT_MANAGER_ERROR
|
||||
GtkRecentManagerError
|
||||
gtk_recent_manager_new
|
||||
gtk_recent_manager_add_item
|
||||
gtk_recent_manager_add_full
|
||||
gtk_recent_manager_remove_item
|
||||
gtk_recent_manager_lookup_item
|
||||
gtk_recent_manager_has_item
|
||||
gtk_recent_manager_move_item
|
||||
gtk_recent_manager_get_limit
|
||||
gtk_recent_manager_set_limit
|
||||
gtk_recent_manager_get_items
|
||||
gtk_recent_manager_purge_items
|
||||
<SUBSECTION>
|
||||
gtk_recent_info_ref
|
||||
gtk_recent_info_unref
|
||||
gtk_recent_info_get_uri
|
||||
gtk_recent_info_get_display_name
|
||||
gtk_recent_info_get_description
|
||||
gtk_recent_info_get_mime_type
|
||||
gtk_recent_info_get_added
|
||||
gtk_recent_info_get_modified
|
||||
gtk_recent_info_get_visited
|
||||
gtk_recent_info_get_private_hint
|
||||
gtk_recent_info_get_application_info
|
||||
gtk_recent_info_get_applications
|
||||
gtk_recent_info_last_application
|
||||
gtk_recent_info_get_groups
|
||||
gtk_recent_info_has_group
|
||||
gtk_recent_info_get_icon
|
||||
gtk_recent_info_get_short_name
|
||||
gtk_recent_info_get_uri_display
|
||||
gtk_recent_info_get_age
|
||||
gtk_recent_info_is_local
|
||||
gtk_recent_info_exists
|
||||
gtk_recent_info_match
|
||||
<SUBSECTION Standard>
|
||||
GTK_RECENT_MANAGER
|
||||
GTK_IS_RECENT_MANAGER
|
||||
GTK_TYPE_RECENT_MANAGER
|
||||
GTK_RECENT_MANAGER_CLASS
|
||||
GTK_IS_RECENT_MANAGER_CLASS
|
||||
GTK_RECENT_MANAGER_GET_CLASS
|
||||
GTK_TYPE_RECENT_INFO
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_recent_manager_get_type
|
||||
gtk_recent_info_get_type
|
||||
GtkRecentManagerPrivate
|
||||
gtk_recent_manager_error_quark
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkruler</FILE>
|
||||
<TITLE>GtkRuler</TITLE>
|
||||
|
318
docs/reference/gtk/migrating-GtkRecentChooser.sgml
Normal file
318
docs/reference/gtk/migrating-GtkRecentChooser.sgml
Normal file
@ -0,0 +1,318 @@
|
||||
<chapter id="gtk-migrating-GtkRecentChooser">
|
||||
<chapterinfo>
|
||||
<author>
|
||||
<firstname>Emmanuele</firstname>
|
||||
<lastname>Bassi</lastname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>ebassi@gmail.com</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</chapterinfo>
|
||||
|
||||
<title>Migrating from EggRecent to GtkRecentChooser</title>
|
||||
|
||||
<para>
|
||||
Since version 2.10, GTK+ provides a way of handling the recently used
|
||||
documents. It is similar to the code that has lived inside the libegg
|
||||
library and has been incorporated by many applications. The GTK+ version
|
||||
aims to completely replace that code, and offers many distinctive features
|
||||
that improve the registration and visualization of the recently used
|
||||
documents, such as:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Better performances while reading and writing the list of recently used
|
||||
files
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
More meta-data available for each recent document, like the
|
||||
applications that have registered a document inside the list, the last
|
||||
time and the number of times the same application did register a
|
||||
document inside the list, an optional user readable name and
|
||||
description of the document
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Improved the ability to sort and filter the documents, also using
|
||||
custom sorting and filtering functions
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
New widgets for displaying the list, and better integration with
|
||||
current #GtkFileChooser and #GtkUIManager widgets
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<section id="gtkrecent-manager">
|
||||
<title>Managing the Recently Used Documents</title>
|
||||
|
||||
<para>
|
||||
#GtkRecentManager is used to manage the Recently Used Documents. To
|
||||
create a new #GtkRecentManager, you simply call gtk_recent_manager_new().
|
||||
Like the <structname>EggRecentModel</structname> inside EggRecent, the
|
||||
#GtkRecentManager loads the list of the recent documents and notifies
|
||||
you of changes inside the list.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To add a document to the list, you can use gtk_recent_manager_add_item(),
|
||||
like:
|
||||
<informalexample><programlisting>
|
||||
GtkRecentManager *manager;
|
||||
GError *error = NULL;
|
||||
|
||||
manager = gtk_recent_manager_new ();
|
||||
|
||||
gtk_recent_manager_add_item (manager, document_uri, &error);
|
||||
if (error)
|
||||
{
|
||||
g_warning ("Unable to add '%s' to the list of recently used documents: %s\n",
|
||||
document_uri,
|
||||
error->message);
|
||||
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
g_object_unref (manager);
|
||||
</programlisting></informalexample>
|
||||
The gtk_recent_manager_add_item() function will try and guess some of the
|
||||
meta-data associated to a URI. If you know some of meta-data about the
|
||||
document yourself, set the desired fields of a #GtkRecentData structure
|
||||
and pass it to the gtk_recent_manager_add_full() function instead:
|
||||
<informalexample><programlisting>
|
||||
GtkRecentManager *manager;
|
||||
GtkRecentData *recent_data;
|
||||
GError *error = NULL;
|
||||
|
||||
manager = gtk_recent_manager_new ();
|
||||
|
||||
recent_data = g_new0 (GtkRecentData, 1);
|
||||
/* the user visible name of the document (maybe its title); should
|
||||
* be preferred when displaying the item into the list
|
||||
*/
|
||||
recent_data->display_name = document_name;
|
||||
|
||||
/* the MIME type is mandatory */
|
||||
recent_data->mime_type = document_mime_type;
|
||||
|
||||
/* the name of the application that is registering the document
|
||||
* (also mandatory); usually, the same name you used with
|
||||
* the g_set_application_name() function.
|
||||
*/
|
||||
recent_data-&app_name = APP_NAME;
|
||||
|
||||
/* the command to open a file; the %u string will be automagically
|
||||
* expanded to the document's URI when getting the application's
|
||||
* command line from the GtkRecentInfo object with
|
||||
* gtk_recent_info_get_application_info()
|
||||
*/
|
||||
recent_data-&app_exec = g_strjoin (" ", g_get_prgname (), "--open-file", "%u", NULL);
|
||||
|
||||
gtk_recent_manager_add_full (manager, document_uri, recent_data, &error);
|
||||
if (error)
|
||||
{
|
||||
/* warn about the error */
|
||||
}
|
||||
|
||||
g_free (recent_data->app_exec);
|
||||
g_free (recent_data);
|
||||
g_object_unref (manager);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Getting the list of items is also similar to
|
||||
<structname>EggRecentModel</structname>; the GtkRecentInfo data is
|
||||
allocated at look up time in order not to waste memory keeping it
|
||||
around, so you must remember to free the data inside the list and then
|
||||
the list itself when you are done using it:
|
||||
<informalexample><programlisting>
|
||||
GList *recent_items, *l;
|
||||
|
||||
recent_items = gtk_recent_manager_get_items (manager);
|
||||
for (l = recent_items; l != NULL; l = l->next)
|
||||
{
|
||||
GtkRecentInfo *recent_info = l->data;
|
||||
|
||||
do_something_with_the_item (recent_info);
|
||||
}
|
||||
|
||||
/* free everything and the list */
|
||||
g_list_foreach (recent_items, (GFunc) gtk_recent_info_unref, NULL);
|
||||
g_list_free (recent_items);
|
||||
</programlisting></informalexample>
|
||||
You can also look up a single item:
|
||||
<informalexample><programlisting>
|
||||
GtkRecentInfo *recent_info;
|
||||
GError *error = NULL;
|
||||
|
||||
recent_info = gtk_recent_manager_lookup_item (manager, document_uri, &error);
|
||||
if (error)
|
||||
{
|
||||
display_error (error);
|
||||
|
||||
g_error_free (error);
|
||||
}
|
||||
else
|
||||
{
|
||||
do_something_with_the_item (recent_info);
|
||||
|
||||
gtk_recent_info_unref (recent_info);
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
The #GtkRecentInfo is a reference counted boxed type, and it holds all
|
||||
the meta-data of a recently used document, like its display name, its
|
||||
description, the list of each application that has registered the
|
||||
document or the list of groups to which the document belong.
|
||||
</para>
|
||||
|
||||
</section> <!-- gtkrecent-manager -->
|
||||
|
||||
<section id="gtkrecent-chooser">
|
||||
<title>Displaying the Recently Used Documents</title>
|
||||
|
||||
<para>
|
||||
Displaying the Recently Used Documents list is handled by any widget
|
||||
implementing the #GtkRecentChooser interface. These widgets also handle
|
||||
the sorting and filtering of the list; they will create their own
|
||||
#GtkRecentManager objects by default:
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *chooser;
|
||||
gint response;
|
||||
|
||||
/* create a new dialog with the recently used documents list shown
|
||||
* using a GtkTreeView widget
|
||||
*/
|
||||
chooser = gtk_recent_chooser_dialog_new ("Recent Documents",
|
||||
parent_window,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
/* set the sorting order to "most recently used first" */
|
||||
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (chooser), GTK_RECENT_SORT_MRU);
|
||||
response = gtk_dialog_run (GTK_DIALOG (chooser));
|
||||
if (response == GTK_RESPONSE_OK)
|
||||
{
|
||||
GtkRecentInfo *info;
|
||||
|
||||
info = gtk_recent_chooser_get_current_item (GTK_RECENT_CHOOSER (chooser));
|
||||
do_something_with_the_item (info);
|
||||
|
||||
gtk_recent_info_unref (info);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (chooser);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
</section> <!-- gtkrecent-chooser -->
|
||||
|
||||
<section id="gtkrecent-advanced">
|
||||
<title>Advanced usage</title>
|
||||
|
||||
<para>
|
||||
The #GtkRecentChooser widgets might display items sorted and filtered,
|
||||
either with already supplied or custom sorting and filtering functions.
|
||||
The biggest difference from the <structname>EggRecentView</structname>
|
||||
widgets in EggRecent is that the #GtkRecentChooser widgets will use
|
||||
their own copy of the list and will apply the sorting and filtering
|
||||
functions only on the copy; this allows the creation of many viewers
|
||||
with a single controller, like using many #GtkTreeView with a single
|
||||
#GtkTreeModel instance.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Available sorting methods are:
|
||||
<informalexample><programlisting>
|
||||
/* no sorting */
|
||||
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (chooser), GTK_RECENT_SORT_NONE);
|
||||
|
||||
/* most recently used first */
|
||||
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (chooser), GTK_RECENT_SORT_MRU);
|
||||
|
||||
/* most recently used last */
|
||||
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (chooser), GTK_RECENT_SORT_LRU);
|
||||
</programlisting></informalexample>
|
||||
You can create your own sorting function, and the use the
|
||||
GTK_RECENT_SORT_CUSTOM method:
|
||||
<informalexample><programlisting>
|
||||
/* custom sorting function, based on the registration count
|
||||
* (most used first)
|
||||
*/
|
||||
static void
|
||||
sort_by_usage_count (GtkRecentInfo *a,
|
||||
GtkRecentInfo *b,
|
||||
gpointer data)
|
||||
{
|
||||
gint count_a, count_b;
|
||||
|
||||
count_a = count_b = 0;
|
||||
|
||||
if (gtk_recent_info_has_application (a, APP_NAME))
|
||||
gtk_recent_info_get_application_info (a, APP_NAME, NULL, &count_a, NULL);
|
||||
|
||||
if (gtk_recent_info_has_application (b, APP_NAME))
|
||||
gtk_recent_info_get_application_info (b, APP_NAME, NULL, &count_b, NULL);
|
||||
|
||||
return count_a < count_b;
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
/* set custom sorting and set the custom sorting function */
|
||||
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (chooser),
|
||||
GTK_RECENT_SORT_CUSTOM);
|
||||
gtk_recent_chooser_set_sort_func (GTK_RECENT_CHOOSER,
|
||||
sort_by_usage_count,
|
||||
NULL, /* sort function data */
|
||||
NULL /* destroy notify for the data */);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Filtering is done using the #GtkRecentFilter object, similar to the
|
||||
#GtkFileFilter object used by the #GtkFileChooser widgets. The
|
||||
#GtkRecentFilter object has a set of pre-defined options based on the
|
||||
meta-data exposed by the #GtkRecentInfo object. It also allows custom
|
||||
filtering function:
|
||||
<informalexample><programlisting>
|
||||
GtkRecentFilter *filter;
|
||||
|
||||
filter = gtk_recent_filter_new ();
|
||||
|
||||
/* set the user visible name of the filter */
|
||||
gtk_recent_filter_set_name (filter, "Since Last Month");
|
||||
|
||||
/* set the maximum age of a recently used document */
|
||||
gtk_recent_filter_set_age (filter, 31);
|
||||
|
||||
/* the chooser takes the ownership of the object */
|
||||
gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (chooser), filter);
|
||||
|
||||
/* set the currently used filter */
|
||||
gtk_recent_chooser_set_filter (GTK_RECENT_CHOOSER (chooser), filter);
|
||||
|
||||
filter = gtk_recent_filter_new ();
|
||||
gtk_recent_filter_set_name (filter, "Every text file");
|
||||
gtk_recent_filter_set_mime_type (filter, "text/plain");
|
||||
|
||||
gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (chooser), filter);
|
||||
</programlisting></informalexample>
|
||||
The #GtkRecentChooserWidget and #GtkRecentChooserDialog widgets allow
|
||||
multiple filters and the selection of an appropriate one; the
|
||||
#GtkRecentChooserMenu widget allows just a single filter object.
|
||||
</para>
|
||||
|
||||
</section> <!-- gtkrecent-advanced -->
|
||||
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
|
||||
End:
|
||||
-->
|
363
docs/reference/gtk/tmpl/gtkrecentchooser.sgml
Normal file
363
docs/reference/gtk/tmpl/gtkrecentchooser.sgml
Normal file
@ -0,0 +1,363 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkRecentChooser
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkRecentChooser ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkRecentChooserIface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@base_iface:
|
||||
@set_current_uri:
|
||||
@get_current_uri:
|
||||
@select_uri:
|
||||
@unselect_uri:
|
||||
@select_all:
|
||||
@unselect_all:
|
||||
@get_items:
|
||||
@get_recent_manager:
|
||||
@add_filter:
|
||||
@remove_filter:
|
||||
@list_filters:
|
||||
@set_sort_func:
|
||||
@item_activated:
|
||||
@selection_changed:
|
||||
|
||||
<!-- ##### MACRO GTK_RECENT_CHOOSER_ERROR ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkRecentChooserError ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_RECENT_CHOOSER_ERROR_NOT_FOUND:
|
||||
@GTK_RECENT_CHOOSER_ERROR_INVALID_URI:
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_show_private ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@show_private:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_show_private ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_show_not_found ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@show_not_found:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_show_not_found ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_show_icons ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@show_icons:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_show_icons ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_select_multiple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@select_multiple:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_select_multiple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_local_only ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@local_only:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_local_only ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_limit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@limit:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_limit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_show_tips ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@show_tips:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_show_tips ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_show_numbers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@show_numbers:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_show_numbers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_sort_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@sort_type:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_sort_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_sort_func ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@sort_func:
|
||||
@sort_data:
|
||||
@data_destroy:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_current_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@uri:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_current_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_current_item ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_select_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@uri:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_unselect_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@uri:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_select_all ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_unselect_all ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_items ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_uris ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_add_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@filter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_remove_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@filter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_list_filters ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_set_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@filter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_get_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
50
docs/reference/gtk/tmpl/gtkrecentchooserdialog.sgml
Normal file
50
docs/reference/gtk/tmpl/gtkrecentchooserdialog.sgml
Normal file
@ -0,0 +1,50 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkRecentChooserDialog
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkRecentChooserDialog ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_dialog_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@title:
|
||||
@parent:
|
||||
@first_button_text:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_dialog_new_for_manager ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@title:
|
||||
@parent:
|
||||
@manager:
|
||||
@first_button_text:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
60
docs/reference/gtk/tmpl/gtkrecentchoosermenu.sgml
Normal file
60
docs/reference/gtk/tmpl/gtkrecentchoosermenu.sgml
Normal file
@ -0,0 +1,60 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkRecentChooserMenu
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkRecentChooserMenu ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_menu_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_menu_new_for_manager ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_menu_get_show_numbers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_menu_set_show_numbers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@show_numbers:
|
||||
|
||||
|
42
docs/reference/gtk/tmpl/gtkrecentchooserwidget.sgml
Normal file
42
docs/reference/gtk/tmpl/gtkrecentchooserwidget.sgml
Normal file
@ -0,0 +1,42 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkRecentChooserWidget
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkRecentChooserWidget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_widget_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_chooser_widget_new_for_manager ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@Returns:
|
||||
|
||||
|
170
docs/reference/gtk/tmpl/gtkrecentfilter.sgml
Normal file
170
docs/reference/gtk/tmpl/gtkrecentfilter.sgml
Normal file
@ -0,0 +1,170 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkRecentFilter
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkRecentFilter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkRecentFilterInfo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@contains:
|
||||
@uri:
|
||||
@display_name:
|
||||
@mime_type:
|
||||
@applications:
|
||||
@groups:
|
||||
@age:
|
||||
|
||||
<!-- ##### ENUM GtkRecentFilterFlags ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_RECENT_FILTER_URI:
|
||||
@GTK_RECENT_FILTER_DISPLAY_NAME:
|
||||
@GTK_RECENT_FILTER_MIME_TYPE:
|
||||
@GTK_RECENT_FILTER_APPLICATION:
|
||||
@GTK_RECENT_FILTER_GROUP:
|
||||
@GTK_RECENT_FILTER_AGE:
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkRecentFilterFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter_info:
|
||||
@user_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_get_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_set_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_add_mime_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@mime_type:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_add_pattern ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@pattern:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_add_pixbuf_formats ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_add_application ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@application:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_add_group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@group:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_add_age ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@days:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_add_custom ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@needed:
|
||||
@func:
|
||||
@data:
|
||||
@data_destroy:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_get_needed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_filter_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@filter_info:
|
||||
@Returns:
|
||||
|
||||
|
384
docs/reference/gtk/tmpl/gtkrecentmanager.sgml
Normal file
384
docs/reference/gtk/tmpl/gtkrecentmanager.sgml
Normal file
@ -0,0 +1,384 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkRecentManager
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkRecentManager ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkRecentInfo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkRecentData ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_name:
|
||||
@description:
|
||||
@mime_type:
|
||||
@app_name:
|
||||
@app_exec:
|
||||
@groups:
|
||||
@is_private:
|
||||
|
||||
<!-- ##### MACRO GTK_RECENT_MANAGER_ERROR ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkRecentManagerError ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_RECENT_MANAGER_ERROR_NOT_FOUND:
|
||||
@GTK_RECENT_MANAGER_ERROR_INVALID_URI:
|
||||
@GTK_RECENT_MANAGER_ERROR_INVALID_MIME:
|
||||
@GTK_RECENT_MANAGER_ERROR_INVALID_ENCODING:
|
||||
@GTK_RECENT_MANAGER_ERROR_NOT_REGISTERED:
|
||||
@GTK_RECENT_MANAGER_ERROR_BAD_EXEC_STRING:
|
||||
@GTK_RECENT_MANAGER_ERROR_READ:
|
||||
@GTK_RECENT_MANAGER_ERROR_WRITE:
|
||||
@GTK_RECENT_MANAGER_ERROR_UNKNOWN:
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_add_item ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@uri:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_add_full ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@uri:
|
||||
@recent_data:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_remove_item ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@uri:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_lookup_item ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@uri:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_has_item ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@uri:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_move_item ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@uri:
|
||||
@new_uri:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_get_limit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_set_limit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@limit:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_get_items ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_manager_purge_items ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@manager:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_display_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_mime_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_added ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_modified ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_visited ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_private_hint ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_application_info ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@app_name:
|
||||
@app_exec:
|
||||
@count:
|
||||
@time:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_applications ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_last_application ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_groups ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_has_group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@group_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_icon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_short_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_uri_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_get_age ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_is_local ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_exists ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_recent_info_match ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@info_a:
|
||||
@info_b:
|
||||
@Returns:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user