GdkRectangle current_area, unused, page_area;
GtkBorder border;
gboolean found = FALSE;
- gint area_max, area;
+ gint area_max = -1, area;
int i;
if (!(view->vadjustment && view->hadjustment))
case EV_LINK_ACTION_TYPE_GOTO_REMOTE:
case EV_LINK_ACTION_TYPE_EXTERNAL_URI:
case EV_LINK_ACTION_TYPE_LAUNCH:
+ case EV_LINK_ACTION_TYPE_NAMED:
g_signal_emit (view, signals[SIGNAL_EXTERNAL_LINK], 0, action);
break;
}
return msg;
}
+static char *
+tip_from_action_named (EvLinkAction *action)
+{
+ const gchar *name = ev_link_action_get_name (action);
+
+ if (g_ascii_strcasecmp (name, "FirstPage") == 0) {
+ return g_strdup (_("Go to first page"));
+ } else if (g_ascii_strcasecmp (name, "PrevPage") == 0) {
+ return g_strdup (_("Go to previous page"));
+ } else if (g_ascii_strcasecmp (name, "NextPage") == 0) {
+ return g_strdup (_("Go to next page"));
+ } else if (g_ascii_strcasecmp (name, "LastPage") == 0) {
+ return g_strdup (_("Go to last page"));
+ } else if (g_ascii_strcasecmp (name, "GoToPage") == 0) {
+ return g_strdup (_("Go to page"));
+ } else if (g_ascii_strcasecmp (name, "Find") == 0) {
+ return g_strdup (_("Find"));
+ }
+
+ return NULL;
+}
+
static char *
tip_from_link (EvView *view, EvLink *link)
{
msg = g_strdup_printf (_("Launch %s"),
ev_link_action_get_filename (action));
break;
+ case EV_LINK_ACTION_TYPE_NAMED:
+ msg = tip_from_action_named (action);
+ break;
default:
if (title)
msg = g_strdup (title);
int page;
g_return_val_if_fail (EV_IS_VIEW (view), FALSE);
+
+ if (!view->page_cache)
+ return FALSE;
page = ev_page_cache_get_current_page (view->page_cache);
g_return_val_if_fail (EV_IS_VIEW (view), FALSE);
+ if (!view->page_cache)
+ return FALSE;
+
page = ev_page_cache_get_current_page (view->page_cache);
if (view->dual_page && !view->presentation)