aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.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-shell.c
parent7b8fb927ca8c223ba51294bf52ab865b067bd774 (diff)
downloadgsoc2013-epiphany-ffdcb7ffd0191129ccee3d377cae306c81b10594.tar.gz
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-shell.c')
-rw-r--r--src/ephy-shell.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 9babb803b..807faff3b 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -182,7 +182,7 @@ ephy_shell_new_window_cb (EphyEmbedSingle *single,
new_tab = ephy_shell_new_tab_full
(shell,
EPHY_IS_WINDOW (parent) ? EPHY_WINDOW (parent) : NULL,
- NULL, NULL, flags, chromemask, 0);
+ NULL, NULL, flags, chromemask, TRUE, 0);
return ephy_tab_get_embed (new_tab);
}
@@ -650,6 +650,7 @@ load_homepage (EphyEmbed *embed)
* @previous_tab: the referrer tab or %NULL
* @url: an url to load or %NULL
* @chrome: a #EphyEmbedChrome mask to use if creating a new window
+ * @is_popup: whether the new window is a popup
* @user_time: a timestamp, or 0
*
* Create a new tab and the parent window when necessary.
@@ -664,6 +665,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
const char *url,
EphyNewTabFlags flags,
EphyEmbedChrome chrome,
+ gboolean is_popup,
guint32 user_time)
{
EphyWindow *window;
@@ -680,6 +682,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
if (flags & EPHY_NEW_TAB_IN_EXISTING_WINDOW) in_new_window = FALSE;
in_new_window = in_new_window && !eel_gconf_get_boolean (CONF_LOCKDOWN_FULLSCREEN);
+ g_return_val_if_fail (in_new_window || !is_popup, NULL);
jump_to = (flags & EPHY_NEW_TAB_JUMP) != 0;
@@ -692,7 +695,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
}
else
{
- window = ephy_window_new_with_chrome (chrome);
+ window = ephy_window_new_with_chrome (chrome, is_popup);
}
toolbar = EPHY_TOOLBAR (ephy_window_get_toolbar (window));
@@ -764,7 +767,7 @@ ephy_shell_new_tab (EphyShell *shell,
{
return ephy_shell_new_tab_full (shell, parent_window,
previous_tab, url, flags,
- EPHY_EMBED_CHROME_ALL, 0);
+ EPHY_EMBED_CHROME_ALL, FALSE, 0);
}
/**