G_CALLBACK (render_finished_cb), job);
} else {
job->pixbuf = ev_document_render_pixbuf (EV_JOB (job)->document, job->rc);
- if (job->include_links)
- job->link_mapping = ev_document_get_links (EV_JOB (job)->document, job->rc->page);
+ if (job->include_links && EV_IS_LINK (EV_JOB (job)->document))
+ job->link_mapping =
+ ev_document_links_get_links (EV_DOCUMENT_LINKS (EV_JOB (job)->document),
+ job->rc->page);
if (job->include_text && EV_IS_SELECTION (EV_JOB (job)->document))
- job->text_mapping = ev_selection_get_selection_map (EV_SELECTION (EV_JOB (job)->document), job->rc);
+ job->text_mapping =
+ ev_selection_get_selection_map (EV_SELECTION (EV_JOB (job)->document),
+ job->rc);
if (job->include_selection && EV_IS_SELECTION (EV_JOB (job)->document)) {
ev_selection_render_selection (EV_SELECTION (EV_JOB (job)->document),
job->rc,
char *tmp_name;
char *base_name;
+ /* We'd like to keep extension of source uri since
+ * it helps to resolve some mime types, say cbz */
+
tmp_name = ev_tmp_filename ();
- base_name = g_path_get_basename (job->uri);
- job->local_uri = g_strconcat ("file:", tmp_name, base_name, NULL);
+ base_name = gnome_vfs_uri_extract_short_name (source_uri);
+ job->local_uri = g_strconcat ("file:", tmp_name, "-", base_name, NULL);
+ g_free (base_name);
g_free (tmp_name);
target_uri = gnome_vfs_uri_new (job->local_uri);