]> Pileus Git - ~andy/gtk/blobdiff - docs/reference/gtk/tmpl/gtkrecentmanager.sgml
Make 3.0 parallel-installable to 2.x
[~andy/gtk] / docs / reference / gtk / tmpl / gtkrecentmanager.sgml
index 0a4c5fb9b2865d8f0c992a7faa162f54d8e35434..c888b6e9fe7ac65423bb2dbaf6f5930bd6f833e4 100644 (file)
@@ -6,8 +6,57 @@ Managing Recently Used Files
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
-</para>
+#GtkRecentManager provides a facility for adding, removing and
+looking up recently used files.  Each recently used file is
+identified by its URI, and has meta-data associated to it, like
+the names and command lines of the applications that have
+registered it, the number of time each application has registered
+the same file, the mime type of the file and whether the file
+should be displayed only by the applications that have
+registered it.
+</para>
+
+<para>
+The #GtkRecentManager acts like a database of all the recently
+used files.  You can create new #GtkRecentManager objects, but
+it is more efficient to use the standard recent manager for
+the #GdkScreen so that informations about the recently used
+files is shared with other people using them.  In case the
+default screen is being used, adding a new recently used
+file is as simple as:
+</para>
+
+<informalexample>
+  <programlisting>
+GtkRecentManager *manager;
+
+manager = gtk_recent_manager_get_default ();
+gtk_recent_manager_add_item (manager, file_uri);
+  </programlisting>
+</informalexample>
+
+While looking up a recently used file is as simple as:
+
+<informalexample>
+  <programlisting>
+GtkRecentManager *manager;
+GtkRecentInfo *info;
+GError *error = NULL;
+
+manager = gtk_recent_manager_get_default ();
+info = gtk_recent_manager_lookup_item (manager, file_uri, &amp;error);
+if (error)
+  {
+    g_warning ("Could not find the file: &percnt;s", error-&gt;message);
+    g_error_free (error);
+  }
+else
+  {
+    /* Use the info object */
+    gtk_recent_info_unref (info);
+  }
+  </programlisting>
+</informalexample>
 
 <para>
 Recently used files are supported since GTK+ 2.10.
@@ -21,17 +70,46 @@ Recently used files are supported since GTK+ 2.10.
 <!-- ##### SECTION Stability_Level ##### -->
 
 
+<!-- ##### SECTION Image ##### -->
+
+
 <!-- ##### STRUCT GtkRecentManager ##### -->
 <para>
+Acts as a database of information about the list of recently
+used files.  Normally, you retrieve the recent manager for a
+particular screen using gtk_recent_manager_get_for_screen()
+and it will contain information about current recent manager
+for that screen.</para>
+
+
+<!-- ##### SIGNAL GtkRecentManager::changed ##### -->
+<para>
 
 </para>
 
+@recentmanager: the object which received the signal.
 
-<!-- ##### STRUCT GtkRecentInfo ##### -->
+<!-- ##### ARG GtkRecentManager:filename ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkRecentManager:limit ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkRecentManager:size ##### -->
 <para>
 
 </para>
 
+<!-- ##### STRUCT GtkRecentInfo ##### -->
+<para>
+Contains informations found when looking up an entry of the
+recently used files list.
+</para>
+
 
 <!-- ##### STRUCT GtkRecentData ##### -->
 <para>
@@ -48,7 +126,7 @@ Recently used files are supported since GTK+ 2.10.
 
 <!-- ##### MACRO GTK_RECENT_MANAGER_ERROR ##### -->
 <para>
-
+The #GQuark used for #GtkRecentManagerError errors.
 </para>
 
 
@@ -60,10 +138,8 @@ Recently used files are supported since GTK+ 2.10.
 
 @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: 
@@ -73,6 +149,16 @@ Recently used files are supported since GTK+ 2.10.
 
 </para>
 
+@void: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_recent_manager_get_default ##### -->
+<para>
+
+</para>
+
+@void: 
 @Returns: 
 
 
@@ -83,7 +169,6 @@ Recently used files are supported since GTK+ 2.10.
 
 @manager: 
 @uri: 
-@error: 
 @Returns: 
 
 
@@ -95,7 +180,6 @@ Recently used files are supported since GTK+ 2.10.
 @manager: 
 @uri: 
 @recent_data: 
-@error: 
 @Returns: 
 
 
@@ -278,7 +362,7 @@ Recently used files are supported since GTK+ 2.10.
 @app_name: 
 @app_exec: 
 @count: 
-@time: 
+@time_
 @Returns: 
 
 
@@ -321,6 +405,16 @@ Recently used files are supported since GTK+ 2.10.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_recent_info_has_application ##### -->
+<para>
+
+</para>
+
+@info: 
+@app_name: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_recent_info_get_icon ##### -->
 <para>