diff options
author | Jonathan Blandford <jrb@redhat.com> | 2005-05-17 04:57:48 (GMT) |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2005-05-17 04:57:48 (GMT) |
commit | 18be5e6b25095ca2e901d050becd83141face316 (patch) | |
tree | ef744d93a37fab192af96e57947dd98f74d7a92e /backend | |
parent | 1a1099e24c625b8ab7816f1ec1ff85cb8e2880d4 (diff) |
Free the EvDocumentInfo.
Tue May 17 00:51:21 2005 Jonathan Blandford <jrb@redhat.com>
* backend/ev-document-info.h:
* backend/ev-document.c: (ev_document_info_free): Free the
EvDocumentInfo.
* shell/ev-sidebar-thumbnails.c: (ev_sidebar_thumbnails_dispose),
(clear_range), (add_range), (update_visible_range),
(adjustment_changed_cb), (ev_sidebar_thumbnails_init),
(ev_sidebar_thumbnails_set_document):
* shell/ev-window.c: (ev_window_setup_document): Only render the
visible thumbnails. It takes an instant to render, but it uses
much less memory.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/ev-document-info.h | 12 | ||||
-rw-r--r-- | backend/ev-document.c | 15 |
2 files changed, 22 insertions, 5 deletions
diff --git a/backend/ev-document-info.h b/backend/ev-document-info.h index 85965da..15d27d0 100644 --- a/backend/ev-document-info.h +++ b/backend/ev-document-info.h @@ -75,11 +75,11 @@ typedef enum struct _EvDocumentInfo { - const char *title; - const char *format; /* eg, "pdf-1.5" */ - const char *author; - const char *subject; - const char *keywords; + char *title; + char *format; /* eg, "pdf-1.5" */ + char *author; + char *subject; + char *keywords; EvDocumentLayout layout; EvDocumentMode mode; GDate creation_date; @@ -89,6 +89,8 @@ struct _EvDocumentInfo guint fields_mask; }; +void ev_document_info_free (EvDocumentInfo *info); + G_END_DECLS #endif /* EV_DOCUMENT_INFO_H */ diff --git a/backend/ev-document.c b/backend/ev-document.c index 1b2f778..714becb 100644 --- a/backend/ev-document.c +++ b/backend/ev-document.c @@ -240,3 +240,18 @@ ev_document_render_pixbuf (EvDocument *document, return retval; } + +void +ev_document_info_free (EvDocumentInfo *info) +{ + if (info == NULL) + return; + + g_free (info->title); + g_free (info->format); + g_free (info->author); + g_free (info->subject); + g_free (info->keywords); + + g_free (info); +} |