diff options
author | Germán Poo-Caamaño <[email protected]> | 2014-05-02 23:08:53 -0700 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-08-28 16:04:00 +0200 |
commit | cd5aaa1eabf27936c8a348d4712d711800bdd67f (patch) | |
tree | 5395f9c488f2228cbd80f635d918567b03cb2b88 /libdocument/ev-mapping-list.c | |
parent | 0f5c79f2e03bd71b91d2fbf3aa48f4ffbf1dd1b1 (diff) | |
download | atril-cd5aaa1eabf27936c8a348d4712d711800bdd67f.tar.bz2 atril-cd5aaa1eabf27936c8a348d4712d711800bdd67f.tar.xz |
libdocument: add ev_mapping_list_remove
Needed to remove annotations from a mapping list
https://bugzilla.gnome.org/show_bug.cgi?id=649044
origin commit:
https://git.gnome.org/browse/evince/commit/?id=5aac9ac
Diffstat (limited to 'libdocument/ev-mapping-list.c')
-rw-r--r-- | libdocument/ev-mapping-list.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libdocument/ev-mapping-list.c b/libdocument/ev-mapping-list.c index 8c639e8e..6745d1d9 100644 --- a/libdocument/ev-mapping-list.c +++ b/libdocument/ev-mapping-list.c @@ -156,6 +156,25 @@ ev_mapping_list_get_list (EvMappingList *mapping_list) return mapping_list ? mapping_list->list : NULL; } +/** + * ev_mapping_list_remove: + * @mapping_list: an #EvMappingList + * @mapping: #EvMapping to remove + * + * Returns: an #EvMappingList + * + * Since: 3.14 + */ +EvMappingList * +ev_mapping_list_remove (EvMappingList *mapping_list, + EvMapping *mapping) +{ + mapping_list->list = g_list_remove (mapping_list->list, mapping); + mapping_list->data_destroy_func (mapping->data); + g_free (mapping); + return mapping_list; +} + guint ev_mapping_list_get_page (EvMappingList *mapping_list) { |