aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-11-26 03:04:24 +0800
committerXan Lopez <xan@igalia.com>2012-11-26 03:04:24 +0800
commita60eb7cad58e17985e8a7908d5e90bab5fff6186 (patch)
tree95ecd03aacb6e8b17df5e7c936592e14ec46a30b /src/ephy-shell.c
parent445102fa0e84e3521d59d314a6bac204ba1af641 (diff)
downloadgsoc2013-epiphany-a60eb7cad58e17985e8a7908d5e90bab5fff6186.tar
gsoc2013-epiphany-a60eb7cad58e17985e8a7908d5e90bab5fff6186.tar.gz
gsoc2013-epiphany-a60eb7cad58e17985e8a7908d5e90bab5fff6186.tar.bz2
gsoc2013-epiphany-a60eb7cad58e17985e8a7908d5e90bab5fff6186.tar.lz
gsoc2013-epiphany-a60eb7cad58e17985e8a7908d5e90bab5fff6186.tar.xz
gsoc2013-epiphany-a60eb7cad58e17985e8a7908d5e90bab5fff6186.tar.zst
gsoc2013-epiphany-a60eb7cad58e17985e8a7908d5e90bab5fff6186.zip
Use gtk_application_get_active_window instead of rolling our own
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index e38b6aec0..ca1fbec20 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -207,7 +207,7 @@ show_about (GSimpleAction *action,
{
EphyWindow *window;
- window = ephy_shell_get_active_window (ephy_shell);
+ window = gtk_application_get_active_window (GTK_APPLICATION (ephy_shell));
window_cmd_help_about (NULL, GTK_WIDGET (window));
}
@@ -600,7 +600,7 @@ download_started_cb (WebKitWebContext *web_context,
return;
}
- window = ephy_shell_get_active_window (shell);
+ window = gtk_application_get_active_window (GTK_APPLICATION (shell));
ed = ephy_download_new_for_download (download);
ephy_download_set_window (ed, GTK_WIDGET (window));
@@ -1041,23 +1041,6 @@ ephy_shell_get_n_windows (EphyShell *shell)
return g_list_length (shell->priv->windows);
}
-EphyWindow *
-ephy_shell_get_active_window (EphyShell *shell)
-{
- GList *l;
-
- g_return_val_if_fail (EPHY_IS_SHELL (shell), NULL);
-
- for (l = shell->priv->windows; l != NULL; l = l->next) {
- EphyEmbedContainer *window = EPHY_EMBED_CONTAINER (l->data);
-
- if (!ephy_embed_container_get_is_popup (window))
- return EPHY_WINDOW (window);
- }
-
- return NULL;
-}
-
gboolean
ephy_shell_close_all_windows (EphyShell *shell)
{