+2006-05-27 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+ * shell/ev-jobs.c: (ev_job_xfer_run):
+ * shell/main.c: (load_files):
+
+ Open links with anchors. Fix for the bug #339836.
+
2006-05-27 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* backend/ev-link-dest.c: (ev_link_dest_type_get_type),
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);
#include "ev-file-helpers.h"
static char *ev_page_label;
-static char **file_arguments = NULL;
+static const char **file_arguments = NULL;
static const GOptionEntry goption_options[] =
{
for (i = 0; files[i]; i++) {
char *uri;
+ char *label;
uri = gnome_vfs_make_uri_from_shell_arg (files[i]);
- ev_application_open_uri (EV_APP, uri, ev_page_label,
- GDK_CURRENT_TIME, NULL);
+
+ label = strchr (uri, GNOME_VFS_URI_MAGIC_CHR);
+
+ if (label) {
+ *label = 0; label++;
+ ev_application_open_uri (EV_APP, uri, label,
+ GDK_CURRENT_TIME, NULL);
+ } else {
+ ev_application_open_uri (EV_APP, uri, ev_page_label,
+ GDK_CURRENT_TIME, NULL);
+ }
g_free (uri);
}
}