diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2010-01-04 13:17:25 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2010-01-04 13:17:25 (GMT) |
commit | 82a2794c325f01202d694fc03850cf9cd356111d (patch) | |
tree | e5c359523db651a2838f7951f9b93122031ef7a9 /libdocument/ev-document.c | |
parent | 28b3013514567bdd0d89f4b8ed2e8580acbc5d7c (diff) |
[libdocument] Remove unneeded check for numeric page labels
Diffstat (limited to 'libdocument/ev-document.c')
-rw-r--r-- | libdocument/ev-document.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libdocument/ev-document.c b/libdocument/ev-document.c index 4906851..c126293 100644 --- a/libdocument/ev-document.c +++ b/libdocument/ev-document.c @@ -293,18 +293,10 @@ ev_document_load (EvDocument *document, page_label = _ev_document_get_page_label (document, page); if (page_label) { - if (priv->page_labels) { - priv->page_labels[i] = page_label; - } else { - gchar *numeric_label; - - numeric_label = g_strdup_printf ("%d", i + 1); - if (strcmp (numeric_label, page_label) != 0) { - priv->page_labels = g_new0 (gchar *, priv->n_pages); - priv->page_labels[i] = page_label; - } - g_free (numeric_label); - } + if (!priv->page_labels) + priv->page_labels = g_new0 (gchar *, priv->n_pages); + + priv->page_labels[i] = page_label; priv->max_label = MAX (priv->max_label, g_utf8_strlen (page_label, 256)); } |