diff options
author | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2006-05-27 12:37:56 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2006-05-27 12:37:56 (GMT) |
commit | 75e184c10b9d8f1f52ebcde19660e45c5244f9a0 (patch) | |
tree | 6c19d086586f3279cf8d9a21e4a50f6ddd8088f5 /shell/main.c | |
parent | 872101b786854841e6b32cac322f08d3dde6b946 (diff) |
Open links with anchors. Fix for the bug #339836.
* shell/ev-jobs.c: (ev_job_xfer_run):
* shell/main.c: (load_files):
Open links with anchors. Fix for the bug #339836.
Diffstat (limited to 'shell/main.c')
-rw-r--r-- | shell/main.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/shell/main.c b/shell/main.c index d1aabce..c86ae23 100644 --- a/shell/main.c +++ b/shell/main.c @@ -44,7 +44,7 @@ #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[] = { @@ -65,10 +65,20 @@ load_files (const char **files) 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); } } |