WebKitWebView *view;
WebKitWebInspector *inspector;
WebKitHitTestResult *mousepos;
+ GTlsCertificateFlags tlsflags;
const char *title, *targeturi;
const char *needle;
gint progress;
struct Client *next;
- gboolean zoomed, fullscreen, isinspecting, sslfailed;
+ gboolean zoomed, fullscreen, isinspecting;
} Client;
typedef struct {
static void print(Client *c, const Arg *arg);
static GdkFilterReturn processx(GdkXEvent *xevent, GdkEvent *event,
gpointer d);
-static void progresschange(WebKitWebView *view, GParamSpec *pspec, Client *c);
+static void progresschanged(WebKitWebView *v, GParamSpec *ps, Client *c);
static void linkopen(Client *c, const Arg *arg);
static void linkopenembed(Client *c, const Arg *arg);
static void reload(Client *c, const Arg *arg);
clients = c;
c->view = newview(c, rc ? rc->view : NULL);
+ c->tlsflags = G_TLS_CERTIFICATE_VALIDATE_ALL + 1;
return c;
}
"load-changed",
G_CALLBACK(loadchanged), c);
g_signal_connect(G_OBJECT(v),
- "notify::progress",
- G_CALLBACK(progresschange), c);
+ "notify::estimated-load-progress",
+ G_CALLBACK(progresschanged), c);
g_signal_connect(G_OBJECT(v),
"download-requested",
G_CALLBACK(initdownload), c);
}
void
-progresschange(WebKitWebView *view, GParamSpec *pspec, Client *c)
+progresschanged(WebKitWebView *v, GParamSpec *ps, Client *c)
{
- c->progress = webkit_web_view_get_progress(c->view) * 100;
+ c->progress = webkit_web_view_get_estimated_load_progress(c->view) *
+ 100;
updatetitle(c);
}
{
const char *uri = geturi(c);
- if (strstr(uri, "https://") == uri)
- pagestat[0] = c->sslfailed ? 'U' : 'T';
- else
- pagestat[0] = '-';
-
+ pagestats[0] = c->tlsflags > G_TLS_CERTIFICATE_VALIDATE_ALL ? '-' :
+ c->tlsflags > 0 ? 'U' : 'T';
pagestat[1] = '\0';
}