aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-session.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-04-18 03:39:00 +0800
committerChristian Persch <chpe@src.gnome.org>2005-04-18 03:39:00 +0800
commitffdcb7ffd0191129ccee3d377cae306c81b10594 (patch)
tree239f51f3a48167e9278a8b810a2f2054d9694723 /src/ephy-session.c
parent7b8fb927ca8c223ba51294bf52ab865b067bd774 (diff)
downloadgsoc2013-epiphany-ffdcb7ffd0191129ccee3d377cae306c81b10594.tar
gsoc2013-epiphany-ffdcb7ffd0191129ccee3d377cae306c81b10594.tar.gz
gsoc2013-epiphany-ffdcb7ffd0191129ccee3d377cae306c81b10594.tar.bz2
gsoc2013-epiphany-ffdcb7ffd0191129ccee3d377cae306c81b10594.tar.lz
gsoc2013-epiphany-ffdcb7ffd0191129ccee3d377cae306c81b10594.tar.xz
gsoc2013-epiphany-ffdcb7ffd0191129ccee3d377cae306c81b10594.tar.zst
gsoc2013-epiphany-ffdcb7ffd0191129ccee3d377cae306c81b10594.zip
Rework popup windows. Introduce "is-popup" property on EphyWindow to
2005-04-17 Christian Persch <chpe@cvs.gnome.org> * src/ephy-automation.c: (impl_ephy_automation_loadUrlWithStartupId): * src/ephy-notebook.c: (ephy_notebook_set_dnd_enabled), (ephy_notebook_get_property), (ephy_notebook_set_property), (ephy_notebook_class_init), (move_tab_to_another_notebook), (button_press_cb), (ephy_notebook_init): * src/ephy-notebook.h: * src/ephy-session.c: (ephy_session_get_active_window): * src/ephy-shell.c: (ephy_shell_new_window_cb), (ephy_shell_new_tab_full), (ephy_shell_new_tab): * src/ephy-shell.h: * src/ephy-tab.c: (ephy_tab_class_init), (popups_manager_new_window_info), (ephy_tab_dispose), (ephy_tab_finalize), (let_me_resize_hack), (ephy_tab_set_size), (ephy_tab_init): * src/ephy-tab.h: * src/ephy-window.c: (get_chromes_visibility), (sync_chromes_visibility), (update_chromes_actions), (update_actions_sensitivity), (sync_tab_visibility), (show_embed_popup), (let_me_resize_hack), (tab_size_to_cb), (ephy_window_set_active_tab), (ephy_window_set_chrome), (ephy_window_set_is_popup), (ephy_window_dispose), (ephy_window_set_property), (ephy_window_get_property), (ephy_window_class_init), (ephy_window_init), (ephy_window_constructor), (ephy_window_new_with_chrome), (ephy_window_set_print_preview), (ephy_window_add_tab), (ephy_window_show), (ephy_window_view_popup_windows_cb), (ephy_window_get_is_popup): * src/ephy-window.h: Rework popup windows. Introduce "is-popup" property on EphyWindow to indicate a window who will only have one tab, and can be resized by javascript calls. Fixes bug #136288 and #155395.
Diffstat (limited to 'src/ephy-session.c')
-rw-r--r--src/ephy-session.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 68e448504..a54e81401 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -926,20 +926,22 @@ ephy_session_remove_window (EphySession *session,
* need to take an action (like opening an url) on
* a window but you dont have a target window.
*
- * Return value: the current active browser window, or NULL of there is none.
+ * Return value: the current active non-popup browser window, or NULL of there is none.
**/
EphyWindow *
ephy_session_get_active_window (EphySession *session)
{
- GList *first;
+ EphyWindow *window = NULL;
+ GList *l;
g_return_val_if_fail (EPHY_IS_SESSION (session), NULL);
- first = session->priv->windows;
- if (first != NULL)
+ for (l = session->priv->windows; l != NULL; l = l->next)
{
- return EPHY_WINDOW (first->data);
+ window = EPHY_WINDOW (l->data);
+
+ if (ephy_window_get_is_popup (window) == FALSE) break;
}
- return NULL;
+ return window;
}