Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-page-action.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2006-05-02 19:02:46 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2006-05-02 19:02:46 (GMT)
commit67297a0108ba18a69972c98ee1771c3dad41d55b (patch)
tree37e49b1a02bc066b645591156daceb11065caf36 /shell/ev-page-action.c
parentc9c1e2212e37fb03d5e4ce4192cfe3f8a7515c5c (diff)
Rework links system, it adds support for remote links now and it makes
2006-05-02 Carlos Garcia Campos <carlosgc@gnome.org> * backend/Makefile.am: * backend/ev-document-links.[ch]: * backend/ev-document.[ch]: * backend/ev-link-action.[ch]: * backend/ev-link-dest.[ch]: * backend/ev-link.[ch]: * pdf/ev-poppler.cc: (pdf_document_find_link_dest), (ev_link_dest_from_dest), (ev_link_from_action), (build_tree): * shell/ev-page-action.c: (build_new_tree_cb): * shell/ev-sidebar-links.c: (get_page_from_dest), (print_section_cb), (links_page_num_func), (update_page_callback): * shell/ev-view.[ch]: (ev_view_goto_dest), (ev_view_handle_link), (tip_from_link): * shell/ev-jobs.c: * shell/ev-window.[ch]: (ev_window_open_uri), (sidebar_links_link_activated_cb), (ev_view_popup_cmd_open_link): * shell/ev-application.[ch]: (ev_application_open_window), (ev_application_open_uri): Rework links system, it adds support for remote links now and it makes easier to add new kinds of actions and destinations. Fixes bug #317292
Diffstat (limited to 'shell/ev-page-action.c')
-rw-r--r--shell/ev-page-action.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/shell/ev-page-action.c b/shell/ev-page-action.c
index fc81cb7..97abd1a 100644
--- a/shell/ev-page-action.c
+++ b/shell/ev-page-action.c
@@ -293,12 +293,25 @@ build_new_tree_cb (GtkTreeModel *model,
{
GtkTreeModel *filter_model = GTK_TREE_MODEL (data);
EvLink *link;
+ EvLinkAction *action;
+ EvLinkActionType type;
gtk_tree_model_get (model, iter,
EV_DOCUMENT_LINKS_COLUMN_LINK, &link,
-1);
- if (link && ev_link_get_page (link) >= 0) {
+ if (!link)
+ return FALSE;
+
+ action = ev_link_get_action (link);
+ if (!action) {
+ g_object_unref (link);
+ return FALSE;
+ }
+
+ type = ev_link_action_get_action_type (action);
+
+ if (type == EV_LINK_ACTION_TYPE_GOTO_DEST) {
GtkTreeIter filter_iter;
gtk_list_store_append (GTK_LIST_STORE (filter_model), &filter_iter);
@@ -307,8 +320,7 @@ build_new_tree_cb (GtkTreeModel *model,
-1);
}
- if (link)
- g_object_unref (link);
+ g_object_unref (link);
return FALSE;
}
@@ -410,7 +422,7 @@ match_completion (GtkEntryCompletion *completion,
gtk_tree_iter_free (iter);
- if (text && key ) {
+ if (text && key) {
gchar *normalized_text;
gchar *normalized_key;
gchar *case_normalized_text;