Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Frank Lanitz frank@frank.uvena.de Date: Sat, 30 Jun 2012 06:21:23 Commit: 4cdb2dc444c95a39191df065bb4d3d276aef9c40 https://github.com/geany/geany-plugins/commit/4cdb2dc444c95a39191df065bb4d3d...
Log Message: ----------- webhelper: Re-create inspector view on demand
The inspector view used to be kept during the plugin's life and only shown or hidden on demand, but this seems to lead to a crash in recent WebKitGTK versions. So, create a new view on each ::inspect-web-view signal.
Modified Paths: -------------- webhelper/src/gwh-browser.c
Modified: webhelper/src/gwh-browser.c 14 files changed, 10 insertions(+), 4 deletions(-) =================================================================== @@ -266,6 +266,15 @@ enum { WebKitWebView *view, GwhBrowser *self) { + if (self->priv->inspector_web_view) { + gtk_widget_destroy (self->priv->inspector_web_view); + } + + self->priv->inspector_web_view = webkit_web_view_new (); + gtk_widget_show (self->priv->inspector_web_view); + gtk_container_add (GTK_CONTAINER (self->priv->inspector_view), + self->priv->inspector_web_view); + return WEBKIT_WEB_VIEW (self->priv->inspector_web_view); }
@@ -878,10 +887,7 @@ enum { self->priv->inspector_view = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (self->priv->inspector_view), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - self->priv->inspector_web_view = webkit_web_view_new (); - gtk_widget_show (self->priv->inspector_web_view); - gtk_container_add (GTK_CONTAINER (self->priv->inspector_view), - self->priv->inspector_web_view); + self->priv->inspector_web_view = NULL;
self->priv->inspector_window = create_inspector_window (self);
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).