aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed.c4
-rw-r--r--embed/ephy-web-view.c9
2 files changed, 8 insertions, 5 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index c1b4e3369..5f338c5ad 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -437,7 +437,7 @@ request_destination_uri (WebKitWebView *web_view,
* WebView or other widget as a parent window.
*/
window = gtk_widget_get_toplevel (GTK_WIDGET (web_view));
- if (!GTK_WIDGET_TOPLEVEL (window))
+ if (!gtk_widget_is_toplevel (window))
window = NULL;
dialog = ephy_file_chooser_new (_("Save"),
@@ -647,7 +647,7 @@ confirm_action_from_mime (WebKitWebView *web_view,
int default_response;
parent_window = gtk_widget_get_toplevel (GTK_WIDGET(web_view));
- if (!GTK_WIDGET_TOPLEVEL (parent_window))
+ if (!gtk_widget_is_toplevel (parent_window))
parent_window = NULL;
/* FIXME: we still have no way of getting the content type from
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 4e93733ab..bb5ce6bb3 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -163,6 +163,7 @@ popups_manager_new_window_info (EphyEmbedContainer *container)
{
EphyEmbed *embed;
EphyWebViewChrome chrome;
+ GtkAllocation allocation;
gboolean is_popup;
char *features;
@@ -172,10 +173,12 @@ popups_manager_new_window_info (EphyEmbedContainer *container)
embed = ephy_embed_container_get_active_child (container);
g_return_val_if_fail (embed != NULL, g_strdup (""));
+ gtk_widget_get_allocation (GTK_WIDGET (embed), &allocation);
+
features = g_strdup_printf
("width=%d,height=%d,menubar=%d,status=%d,toolbar=%d",
- GTK_WIDGET (embed)->allocation.width,
- GTK_WIDGET (embed)->allocation.height,
+ allocation.width,
+ allocation.height,
(chrome & EPHY_WEB_VIEW_CHROME_MENUBAR) > 0,
(chrome & EPHY_WEB_VIEW_CHROME_STATUSBAR) > 0,
(chrome & EPHY_WEB_VIEW_CHROME_TOOLBAR) > 0);
@@ -970,7 +973,7 @@ ge_new_window_cb (EphyWebView *view,
g_return_if_fail (new_view != NULL);
container = EPHY_EMBED_CONTAINER (gtk_widget_get_toplevel (GTK_WIDGET (new_view)));
- g_return_if_fail (container != NULL || !GTK_WIDGET_TOPLEVEL (container));
+ g_return_if_fail (container != NULL || !gtk_widget_is_toplevel (GTK_WIDGET (container)));
popups_manager_add_window (view, container);
}