evince r3446 - trunk/libdocument
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: evince r3446 - trunk/libdocument
- Date: Sun, 15 Feb 2009 13:52:20 +0000 (UTC)
Author: chpe
Date: Sun Feb 15 13:52:19 2009
New Revision: 3446
URL: http://svn.gnome.org/viewvc/evince?rev=3446&view=rev
Log:
More docs
Modified:
trunk/libdocument/ev-document-factory.c
Modified: trunk/libdocument/ev-document-factory.c
==============================================================================
--- trunk/libdocument/ev-document-factory.c (original)
+++ trunk/libdocument/ev-document-factory.c Sun Feb 15 13:52:19 2009
@@ -191,6 +191,17 @@
g_free (uri_unc);
}
+/**
+ * ev_document_factory_get_document:
+ * @uri: an URI
+ * @error: a #GError location to store an error, or %NULL
+ *
+ * Creates a #EvDocument for the document at @uri; or, if no backend handling
+ * the document's type is found, or an error occurred on opening the document,
+ * returns %NULL and fills in @error.
+ *
+ * Returns: a new #EvDocument, or %NULL.
+ */
EvDocument *
ev_document_factory_get_document (const char *uri, GError **error)
{
@@ -311,7 +322,21 @@
gtk_file_filter_add_mime_type (filter, mime_type);
}
-void
+/**
+ * ev_document_factory_add_filters:
+ * @chooser: a #GtkFileChooser
+ * @document: a #EvDocument, or %NULL
+ *
+ * Adds some file filters to @chooser.
+
+ * Always add a "All documents" format.
+ *
+ * If @document is not %NULL, adds a #GtkFileFilter for @document's MIME type.
+ *
+ * If @document is %NULL, adds a #GtkFileFilter for each document type that evince
+ * can handle.
+ */
+void
ev_document_factory_add_filters (GtkWidget *chooser, EvDocument *document)
{
GList *all_types;
@@ -319,6 +344,9 @@
GtkFileFilter *default_filter;
GtkFileFilter *document_filter;
+ g_return_if_fail (GTK_IS_FILE_CHOOSER (chooser));
+ g_return_if_fail (document == NULL || EV_IS_DOCUMENT (document));
+
all_types = ev_backends_manager_get_all_types_info ();
default_filter = document_filter = filter = gtk_file_filter_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]