aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-07-30 06:27:10 +0800
committerChristian Persch <chpe@src.gnome.org>2005-07-30 06:27:10 +0800
commit30b40b7cf052866fe7486abb6312430827ec8c29 (patch)
tree10353f4ebb189bc3feb7471b97265cfbe373f23b
parent2288a93ec9575af249f9c6aaa1667730d2c9950f (diff)
downloadgsoc2013-epiphany-30b40b7cf052866fe7486abb6312430827ec8c29.tar
gsoc2013-epiphany-30b40b7cf052866fe7486abb6312430827ec8c29.tar.gz
gsoc2013-epiphany-30b40b7cf052866fe7486abb6312430827ec8c29.tar.bz2
gsoc2013-epiphany-30b40b7cf052866fe7486abb6312430827ec8c29.tar.lz
gsoc2013-epiphany-30b40b7cf052866fe7486abb6312430827ec8c29.tar.xz
gsoc2013-epiphany-30b40b7cf052866fe7486abb6312430827ec8c29.tar.zst
gsoc2013-epiphany-30b40b7cf052866fe7486abb6312430827ec8c29.zip
Make ephy_session_get_active_window work as intended.
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.
-rw-r--r--ChangeLog10
-rw-r--r--src/ephy-session.c10
-rw-r--r--src/prefs-dialog.c12
3 files changed, 25 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index e88391f49..e533c2aa5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);