aboutsummaryrefslogtreecommitdiffstats
path: root/src/prefs-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/prefs-dialog.c')
-rw-r--r--src/prefs-dialog.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 1261c57f1..b47ae561f 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1256,16 +1256,14 @@ void
prefs_homepage_current_button_clicked_cb (GtkWidget *button,
EphyDialog *dialog)
{
- EphySession *session;
- EphyWindow *window;
+ GtkWidget *parent;
EphyEmbed *embed;
char *location;
- session = EPHY_SESSION (ephy_shell_get_session (ephy_shell));
- window = ephy_session_get_active_window (session);
- g_return_if_fail (window != NULL);
+ parent = ephy_dialog_get_parent (dialog);
+ g_return_if_fail (parent != NULL);
- embed = ephy_window_get_active_embed (window);
+ embed = ephy_window_get_active_embed (EPHY_WINDOW (parent));
g_return_if_fail (embed != NULL);
location = ephy_embed_get_location (embed, TRUE);