[geany/geany-plugins] 181029: markdown: Use notify::is-loading instead of notify::load-status

Chow Loong Jin git-noreply at xxxxx
Wed May 30 05:21:13 UTC 2018


Branch:      refs/heads/master
Author:      Chow Loong Jin <hyperair at debian.org>
Committer:   Chow Loong Jin <hyperair at debian.org>
Date:        Wed, 17 Jan 2018 17:48:51 UTC
Commit:      181029d94ac542ad408be816fc12d355feb9eebd
             https://github.com/geany/geany-plugins/commit/181029d94ac542ad408be816fc12d355feb9eebd

Log Message:
-----------
markdown: Use notify::is-loading instead of notify::load-status

webkit2gtk no longer has the load-status property, so this needs to be updated.


Modified Paths:
--------------
    markdown/src/viewer.c

Modified: markdown/src/viewer.c
12 lines changed, 6 insertions(+), 6 deletions(-)
===================================================================
@@ -297,15 +297,15 @@ pop_scroll_pos(MarkdownViewer *self)
 }
 
 static void
-on_webview_load_status_notify(WebKitWebView *view, GParamSpec *pspec,
+on_webview_is_loading_notify(WebKitWebView *view, GParamSpec *pspec,
   MarkdownViewer *self)
 {
-  WebKitLoadEvent load_status;
+  gboolean load_status;
 
-  g_object_get(view, "load-status", &load_status, NULL);
+  g_object_get(view, "is-loading", &load_status, NULL);
 
   /* When the webkit is done loading, reset the scroll position. */
-  if (load_status == WEBKIT_LOAD_FINISHED) {
+  if (!load_status) {
     pop_scroll_pos(self);
   }
 }
@@ -389,8 +389,8 @@ markdown_viewer_update_view(MarkdownViewer *self)
      * position once the webview is reloaded. */
     if (self->priv->load_handle == 0) {
       self->priv->load_handle =
-        g_signal_connect_swapped(WEBKIT_WEB_VIEW(self), "notify::load-status",
-          G_CALLBACK(on_webview_load_status_notify), self);
+        g_signal_connect_swapped(WEBKIT_WEB_VIEW(self), "notify::is-loading",
+          G_CALLBACK(on_webview_is_loading_notify), self);
     }
 
     webkit_web_view_load_html(WEBKIT_WEB_VIEW(self), html, base_uri);



--------------
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