Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-05-27 11:25:00 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-05-27 11:25:00 (GMT)
commit872101b786854841e6b32cac322f08d3dde6b946 (patch)
tree7ae16f712381c39f962ee9c83ec6f43675bd282d /shell
parent3975d110064cd88af69d393f956f8158aae1878f (diff)
Fix page-label command line option. Bug #342070.
* backend/ev-link-dest.c: (ev_link_dest_type_get_type), (ev_link_dest_get_page_label), (ev_link_dest_get_property), (ev_link_dest_set_property), (ev_link_dest_finalize), (ev_link_dest_class_init), (ev_link_dest_new_named), (ev_link_dest_new_page_label): * backend/ev-link-dest.h: * shell/ev-application.c: (ev_application_open_uri): * shell/ev-view.c: (goto_dest): * shell/ev-window.c: * shell/ev-window.h: Fix page-label command line option. Bug #342070.
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-application.c13
-rw-r--r--shell/ev-view.c3
-rw-r--r--shell/ev-window.c10
-rw-r--r--shell/ev-window.h2
4 files changed, 11 insertions, 17 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 01bf5a2..381b4e3 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -278,13 +278,16 @@ ev_application_open_uri (EvApplication *application,
guint timestamp,
GError **error)
{
- ev_application_open_uri_at_dest (application, uri, NULL, timestamp);
if (page_label && strcmp (page_label, "") != 0) {
- EvWindow *window;
-
- window = ev_application_get_uri_window (application, uri);
- ev_window_open_page_label (window, page_label);
+ EvLinkDest *dest;
+
+ dest = ev_link_dest_new_page_label (page_label);
+
+ ev_application_open_uri_at_dest (application, uri, dest, timestamp);
+ g_object_unref (dest);
+ } else {
+ ev_application_open_uri_at_dest (application, uri, NULL, timestamp);
}
return TRUE;
diff --git a/shell/ev-view.c b/shell/ev-view.c
index d883ecf..32ba7c3 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -1237,6 +1237,9 @@ goto_dest (EvView *view, EvLinkDest *dest)
case EV_LINK_DEST_TYPE_XYZ:
goto_xyz_dest (view, dest);
break;
+ case EV_LINK_DEST_TYPE_PAGE_LABEL:
+ ev_page_cache_set_page_label (view->page_cache, ev_link_dest_get_page_label (dest));
+ break;
default:
g_assert_not_reached ();
}
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 29b6a03..1131b35 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -516,16 +516,6 @@ update_sizing_buttons (EvWindow *window)
}
}
-void
-ev_window_open_page_label (EvWindow *ev_window,
- const char *label)
-{
- if (ev_window->priv->page_cache) {
- ev_page_cache_set_page_label (ev_window->priv->page_cache,
- label);
- }
-}
-
gboolean
ev_window_is_empty (const EvWindow *ev_window)
{
diff --git a/shell/ev-window.h b/shell/ev-window.h
index 2551073..e54a62e 100644
--- a/shell/ev-window.h
+++ b/shell/ev-window.h
@@ -59,8 +59,6 @@ void ev_window_open_uri (EvWindow *ev_window,
EvLinkDest *dest);
void ev_window_goto_dest (EvWindow *ev_window,
EvLinkDest *dest);
-void ev_window_open_page_label (EvWindow *ev_window,
- const char *label);
gboolean ev_window_is_empty (const EvWindow *ev_window);
#ifdef WITH_GNOME_PRINT
void ev_window_print_range (EvWindow *ev_window,