[evince/gnome-2-30] Parse page dest from uri before creating the file
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-2-30] Parse page dest from uri before creating the file
- Date: Sun, 25 Apr 2010 11:11:10 +0000 (UTC)
commit e8f2abd532d00a4d9517b7860719cfc399304d57
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sun Apr 25 13:07:38 2010 +0200
Parse page dest from uri before creating the file
See bug #616515.
shell/main.c | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/shell/main.c b/shell/main.c
index f5225c8..3f96c57 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -166,13 +166,24 @@ load_files (const char **files)
mode = EV_WINDOW_MODE_PRESENTATION;
for (i = 0; files[i]; i++) {
+ const gchar *filename;
gchar *uri;
gchar *label;
GFile *file;
EvLinkDest *dest = NULL;
const gchar *app_uri;
- file = g_file_new_for_commandline_arg (files[i]);
+ filename = files[i];
+ label = strchr (filename, '#');
+ if (label) {
+ *label = 0;
+ label++;
+ dest = ev_link_dest_new_page_label (label);
+ } else if (global_dest) {
+ dest = g_object_ref (global_dest);
+ }
+
+ file = g_file_new_for_commandline_arg (filename);
uri = g_file_get_uri (file);
g_object_unref (file);
@@ -182,14 +193,7 @@ load_files (const char **files)
continue;
}
- label = strchr (uri, '#');
- if (label) {
- *label = 0;
- label++;
- dest = ev_link_dest_new_page_label (label);
- } else if (global_dest) {
- dest = g_object_ref (global_dest);
- }
+
ev_application_open_uri_at_dest (EV_APP, uri, screen, dest,
mode, ev_find_string,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]