diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | src/ephy-session.c | 10 | ||||
-rw-r--r-- | src/prefs-dialog.c | 12 |
3 files changed, 25 insertions, 7 deletions
@@ -1,3 +1,13 @@ +2005-07-30 Christian Persch <chpe@cvs.gnome.org> + + * src/ephy-session.c: (ephy_session_get_active_window): + + Make ephy_session_get_active_window work as intended. + + * src/prefs-dialog.c: (prefs_homepage_current_button_clicked_cb): + + Fix setting homepage to current page. Fixes bug #311962. + 2005-07-29 Crispin Flowerday <gnome@flowerday.cx> * src/ephy-find-toolbar.c: (ephy_find_toolbar_grab_focus), diff --git a/src/ephy-session.c b/src/ephy-session.c index 50b9a1685..1b7a5ef21 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -956,16 +956,20 @@ ephy_session_remove_window (EphySession *session, EphyWindow * ephy_session_get_active_window (EphySession *session) { - EphyWindow *window = NULL; + EphyWindow *window = NULL, *w; GList *l; g_return_val_if_fail (EPHY_IS_SESSION (session), NULL); for (l = session->priv->windows; l != NULL; l = l->next) { - window = EPHY_WINDOW (l->data); + w = EPHY_WINDOW (l->data); - if (ephy_window_get_is_popup (window) == FALSE) break; + if (ephy_window_get_is_popup (w) == FALSE) + { + window = w; + break; + } } return window; diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 7fda4913d..ea2526169 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -1294,14 +1294,18 @@ void prefs_homepage_current_button_clicked_cb (GtkWidget *button, EphyDialog *dialog) { - GtkWidget *parent; + EphySession *session; + EphyWindow *window; EphyEmbed *embed; char *location; - parent = ephy_dialog_get_parent (dialog); - g_return_if_fail (parent != NULL); + session = EPHY_SESSION (ephy_shell_get_session (ephy_shell_get_default ())); + window = ephy_session_get_active_window (session); - embed = ephy_window_get_active_embed (EPHY_WINDOW (parent)); + /* can't do anything in this case */ + if (window == NULL) return; + + embed = ephy_window_get_active_embed (window); g_return_if_fail (embed != NULL); location = ephy_embed_get_location (embed, TRUE); |