summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-09 12:57:26 +0100
committerinfirit <[email protected]>2014-12-09 23:02:27 +0100
commit5864915295487d0a040d08dacf2f9fed0fce7537 (patch)
treebc9a0b740c748c8c324b83b5558427031f705440 /shell
parent5a5e16ca34aeb8a8ecbb9223413c0340b09de224 (diff)
downloadatril-5864915295487d0a040d08dacf2f9fed0fce7537.tar.bz2
atril-5864915295487d0a040d08dacf2f9fed0fce7537.tar.xz
Fill links page labels for the index in the links thread
Getting the page of a named destination requires to take the doc lock, so it might block the main thread. Taken from evince commit: b6f2f6c391fa83cb9532e98f561057f022522147 From: Carlos Garcia Campos <[email protected]>
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-sidebar-links.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c
index c2174e68..0731f7d7 100644
--- a/shell/ev-sidebar-links.c
+++ b/shell/ev-sidebar-links.c
@@ -455,38 +455,6 @@ ev_sidebar_links_init (EvSidebarLinks *ev_sidebar_links)
ev_sidebar_links_construct (ev_sidebar_links);
}
-static gboolean
-fill_page_labels (GtkTreeModel *tree_model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- EvSidebarLinks *sidebar_links)
-{
- EvDocumentLinks *document_links;
- EvLink *link;
- gchar *page_label;
-
- gtk_tree_model_get (tree_model, iter,
- EV_DOCUMENT_LINKS_COLUMN_LINK, &link,
- -1);
-
- if (!link)
- return FALSE;
-
- document_links = EV_DOCUMENT_LINKS (sidebar_links->priv->document);
- page_label = ev_document_links_get_link_page_label (document_links, link);
- if (!page_label)
- return FALSE;
-
- gtk_tree_store_set (GTK_TREE_STORE (tree_model), iter,
- EV_DOCUMENT_LINKS_COLUMN_PAGE_LABEL, page_label,
- -1);
-
- g_free (page_label);
- g_object_unref (link);
-
- return FALSE;
-}
-
/* Public Functions */
GtkWidget *
@@ -653,8 +621,6 @@ job_finished_callback (EvJobLinks *job,
ev_sidebar_links_set_links_model (sidebar_links, job->model);
- gtk_tree_model_foreach (priv->model, (GtkTreeModelForeachFunc)fill_page_labels, sidebar_links);
-
gtk_tree_view_set_model (GTK_TREE_VIEW (priv->tree_view), job->model);
g_object_unref (job);