diff options
author | Mikael Hallendal <micke@codefactory.se> | 2002-08-03 22:45:15 +0000 |
---|---|---|
committer | Mikael Hallendal <hallski@src.gnome.org> | 2002-08-03 22:45:15 +0000 |
commit | 359fd5093a79010f4e9b95fa541f2ee4729ef726 (patch) | |
tree | 478e982fcb18195d65399cd46209c5774a60e502 | |
parent | e858461c643e148f1eacd85ed811b1cf17213a9b (diff) | |
download | yelp-359fd5093a79010f4e9b95fa541f2ee4729ef726.tar.gz |
don't automatically go to uri "toc:" in history. (yelp_window_new): don't
2002-08-04 Mikael Hallendal <micke@codefactory.se>
* src/yelp-window.c:
(window_init): don't automatically go to uri "toc:" in history.
(yelp_window_new): don't open "toc:", this is now done from
yelp_base_new_window
(yelp_window_open_uri): goto the uri in history, Fixes #86538.
* src/yelp-base.c:
(impl_Yelp_newWindow): don't show window and open_uri here. Do it in
yelp_base_new_window instead.
(yelp_base_new_window): added a uri argument. If it's passed it's
opened, otherwise "toc:" is opened.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | src/yelp-base.c | 22 | ||||
-rw-r--r-- | src/yelp-base.h | 3 | ||||
-rw-r--r-- | src/yelp-window.c | 10 |
4 files changed, 31 insertions, 18 deletions
@@ -1,3 +1,17 @@ +2002-08-04 Mikael Hallendal <micke@codefactory.se> + + * src/yelp-window.c: + (window_init): don't automatically go to uri "toc:" in history. + (yelp_window_new): don't open "toc:", this is now done from + yelp_base_new_window + (yelp_window_open_uri): goto the uri in history, Fixes #86538. + + * src/yelp-base.c: + (impl_Yelp_newWindow): don't show window and open_uri here. Do it in + yelp_base_new_window instead. + (yelp_base_new_window): added a uri argument. If it's passed it's + opened, otherwise "toc:" is opened. + 2002-08-04 Yogeesh MB <yogeeshappa.mathighatta@wipro.com> * src/yelp-man.c: added function which removes multiple diff --git a/src/yelp-base.c b/src/yelp-base.c index f9d8c36c..b4703ec4 100644 --- a/src/yelp-base.c +++ b/src/yelp-base.c @@ -64,17 +64,10 @@ impl_Yelp_newWindow (PortableServer_Servant servant, CORBA_Environment *ev) { YelpBase *yelp_base; - GtkWidget *window; yelp_base = YELP_BASE (bonobo_object (servant)); - - window = yelp_base_new_window (yelp_base); - - gtk_widget_show_all (window); - if (url && strcmp (url, "")) { - yelp_window_open_uri (YELP_WINDOW (window), url); - } + yelp_base_new_window (yelp_base, url); } static GNOME_Yelp_WindowList * @@ -145,7 +138,7 @@ yelp_base_new_window_cb (YelpWindow *window, YelpBase *base) g_return_if_fail (YELP_IS_WINDOW (window)); g_return_if_fail (YELP_IS_BASE (base)); - new_window = yelp_base_new_window (base); + new_window = yelp_base_new_window (base, NULL); gtk_widget_show_all (new_window); } @@ -185,7 +178,7 @@ yelp_base_new (void) } GtkWidget * -yelp_base_new_window (YelpBase *base) +yelp_base_new_window (YelpBase *base, const gchar *str_uri) { YelpBasePriv *priv; GtkWidget *window; @@ -206,6 +199,15 @@ yelp_base_new_window (YelpBase *base) G_CALLBACK (yelp_base_new_window_cb), base); + + gtk_widget_show_all (window); + + if (str_uri && strcmp (str_uri, "")) { + yelp_window_open_uri (YELP_WINDOW (window), str_uri); + } else { + yelp_window_open_uri (YELP_WINDOW (window), "toc:"); + } + return window; } diff --git a/src/yelp-base.h b/src/yelp-base.h index dae4e9ef..1126a49f 100644 --- a/src/yelp-base.h +++ b/src/yelp-base.h @@ -53,6 +53,7 @@ struct _YelpBaseClass { GType yelp_base_get_type (void); YelpBase * yelp_base_new (void); -GtkWidget * yelp_base_new_window (YelpBase *base); +GtkWidget * yelp_base_new_window (YelpBase *base, + const gchar *str_uri); #endif /* __YELP_BASE_H__ */ diff --git a/src/yelp-window.c b/src/yelp-window.c index 139a7932..ca4f7d9a 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -200,7 +200,7 @@ static void window_init (YelpWindow *window) { YelpWindowPriv *priv; - YelpURI *uri; +/* YelpURI *uri; */ priv = g_new0 (YelpWindowPriv, 1); window->priv = priv; @@ -212,10 +212,6 @@ window_init (YelpWindow *window) priv->history = yelp_history_new (); - uri = yelp_uri_new ("toc:"); - yelp_history_goto (priv->history, uri); - yelp_uri_unref (uri); - g_signal_connect (priv->history, "back_exists_changed", G_CALLBACK (window_toggle_history_back), @@ -795,8 +791,6 @@ yelp_window_new (GNode *doc_tree, GList *index) window_populate (window); - yelp_window_open_uri (window, "toc:"); - gtk_window_set_icon (GTK_WINDOW (window), window_load_icon ()); return GTK_WIDGET (window); @@ -815,6 +809,8 @@ yelp_window_open_uri (YelpWindow *window, uri = yelp_uri_new (str_uri); + yelp_history_goto (priv->history, uri); + window_handle_uri (window, uri); yelp_uri_unref (uri); |