From 0eadd147c38a58cd235571d228e393216416cd3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Tue, 22 Sep 2009 12:27:30 +0300 Subject: GTK+ 2.17.11 is now the required version I've used all the GTK+ 2.17.11 api available, still missing: GTK_WIDGET_REALIZED (GTK_WIDGET ()) GTK_WIDGET_MAPPED (GTK_WIDGET ()) GTK_ENTRY->im_context GTK_STATUSBAR->frame GTK_STATUSBAR->label GTK_MESSAGE_DIALOG->label https://bugzilla.gnome.org/show_bug.cgi?id=595791 Signed-off-by: Xan Lopez --- embed/ephy-embed.c | 4 ++-- embed/ephy-web-view.c | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'embed') 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); } -- cgit v1.2.3