Due to GtkOverlay there's another parent widget

This commit is contained in:
André Stösel 2012-03-25 18:36:56 +02:00 committed by Christian Dywan
parent 5cb1c04481
commit f7d85602f8

View file

@ -2793,7 +2793,11 @@ static gboolean
webkit_web_view_web_view_ready_cb (GtkWidget* web_view, webkit_web_view_web_view_ready_cb (GtkWidget* web_view,
MidoriView* view) MidoriView* view)
{ {
#if GTK_CHECK_VERSION(3, 2, 0)
GtkWidget* new_view = gtk_widget_get_parent (gtk_widget_get_parent (gtk_widget_get_parent (web_view)));
#else
GtkWidget* new_view = gtk_widget_get_parent (gtk_widget_get_parent (web_view)); GtkWidget* new_view = gtk_widget_get_parent (gtk_widget_get_parent (web_view));
#endif
MidoriNewView where = MIDORI_NEW_VIEW_TAB; MidoriNewView where = MIDORI_NEW_VIEW_TAB;
/* FIXME: Open windows opened by scripts in tabs if they otherwise /* FIXME: Open windows opened by scripts in tabs if they otherwise