#include "ev-sidebar-links.h"
#include "ev-document-links.h"
-#include "ev-application.h"
+#include "ev-window.h"
/* Amount of time we devote to each iteration of the idle, in microseconds */
#define IDLE_WORK_LENGTH 5000
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
EvLink *link;
- EvApplication *app;
GtkWidget *window;
GValue value = {0, };
window = gtk_widget_get_ancestor (GTK_WIDGET (ev_sidebar_links),
EV_TYPE_WINDOW);
if (window) {
- app = ev_application_get_instance ();
- ev_application_open_link (app, EV_WINDOW (window),
- link, NULL);
+ ev_window_open_link (EV_WINDOW (window), link);
}
}
}
IdleStackData *stack_data;
GtkTreeIter tree_iter;
EvDocumentLinksIter *child_iter;
+ EvLinkType link_type;
gint page;
g_assert (priv->idle_stack);
}
page = ev_link_get_page (link);
+ link_type = ev_link_get_link_type (link);
gtk_tree_store_append (GTK_TREE_STORE (priv->model), &tree_iter, stack_data->tree_iter);
gtk_tree_store_set (GTK_TREE_STORE (priv->model), &tree_iter,
LINKS_COLUMN_MARKUP, ev_link_get_title (link),
LINKS_COLUMN_PAGE_NUM, page,
- /* FIXME: Handle links for real. */
- LINKS_COLUMN_PAGE_VALID, (page >= 0),
+ LINKS_COLUMN_PAGE_VALID, (link_type == EV_LINK_TYPE_PAGE),
LINKS_COLUMN_LINK, link,
-1);
g_object_unref (link);