[geany/geany-plugins] c5f410: [markdown] Use webkit2gtk3 (webkit2 API)

Sérgio M. Basto git-noreply at xxxxx
Wed May 30 05:21:09 UTC 2018


Branch:      refs/heads/master
Author:      Sérgio M. Basto <sergio at serjux.com>
Committer:   Sérgio M. Basto <sergio at serjux.com>
Date:        Sat, 09 Dec 2017 02:57:45 UTC
Commit:      c5f410a5040751f8ef5348a55084b60cb09990cb
             https://github.com/geany/geany-plugins/commit/c5f410a5040751f8ef5348a55084b60cb09990cb

Log Message:
-----------
[markdown] Use webkit2gtk3 (webkit2 API)

To build, in Fedora linux, with package webkitgtk4-devel


Modified Paths:
--------------
    build/markdown.m4
    markdown/src/viewer.c
    markdown/src/viewer.h

Modified: build/markdown.m4
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -49,8 +49,8 @@ AC_DEFUN([GP_CHECK_MARKDOWN],
     GTK_VERSION=2.16
     WEBKIT_VERSION=1.1.13
 
-    GP_CHECK_GTK3([webkit_package=webkitgtk-3.0],
-                  [webkit_package=webkit-1.0])
+    GP_CHECK_GTK3([webkit_package=webkit2gtk-4.0],
+                    [webkit_package=webkit2gtk-4.0])
 
     GP_CHECK_PLUGIN_DEPS([markdown], [MARKDOWN],
                          [$GP_GTK_PACKAGE >= ${GTK_VERSION}


Modified: markdown/src/viewer.c
7 lines changed, 3 insertions(+), 4 deletions(-)
===================================================================
@@ -22,7 +22,7 @@
 #include "config.h"
 #include <string.h>
 #include <gtk/gtk.h>
-#include <webkit/webkitwebview.h>
+#include <webkit2/webkit2.h>
 #include <geanyplugin.h>
 #ifndef FULL_PRICE
 # include <mkdio.h>
@@ -300,7 +300,7 @@ static void
 on_webview_load_status_notify(WebKitWebView *view, GParamSpec *pspec,
   MarkdownViewer *self)
 {
-  WebKitLoadStatus load_status;
+  WebKitLoadEvent load_status;
 
   g_object_get(view, "load-status", &load_status, NULL);
 
@@ -393,8 +393,7 @@ markdown_viewer_update_view(MarkdownViewer *self)
           G_CALLBACK(on_webview_load_status_notify), self);
     }
 
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW(self), html, "text/html",
-      self->priv->enc, base_uri);
+    webkit_web_view_load_html(WEBKIT_WEB_VIEW(self), html, base_uri);
 
     g_free(base_uri);
     g_free(html);


Modified: markdown/src/viewer.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -23,7 +23,7 @@
 #define MARKDOWN_VIEWER_H 1
 
 #include <gtk/gtk.h>
-#include <webkit/webkitwebview.h>
+#include <webkit2/webkit2.h>
 
 G_BEGIN_DECLS
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list