static void source(Client *c, const Arg *arg);
static void spawn(Client *c, const Arg *arg);
static void stop(Client *c, const Arg *arg);
-static void titlechange(WebKitWebView *v, WebKitWebFrame *frame,
- const char *title, Client *c);
+static void titlechange(WebKitWebView *view, GParamSpec *pspec, Client *c);
static void toggle(Client *c, const Arg *arg);
static void togglecookiepolicy(Client *c, const Arg *arg);
static void togglegeolocation(Client *c, const Arg *arg);
static void
loaduri(Client *c, const Arg *arg) {
- char *u, *rp;
+ char *u = NULL, *rp;
const char *uri = (char *)arg->v;
Arg a = { .b = FALSE };
struct stat st;
webkit_web_view_load_uri(c->view, u);
c->progress = 0;
c->title = copystr(&c->title, u);
- g_free(u);
updatetitle(c);
}
+ g_free(u);
}
static void
c->view = WEBKIT_WEB_VIEW(webkit_web_view_new());
g_signal_connect(G_OBJECT(c->view),
- "title-changed",
+ "notify::title",
G_CALLBACK(titlechange), c);
g_signal_connect(G_OBJECT(c->view),
"hovering-over-link",
}
static void
-titlechange(WebKitWebView *v, WebKitWebFrame *f, const char *t, Client *c) {
+titlechange(WebKitWebView *view, GParamSpec *pspec, Client *c) {
+ const gchar *t = webkit_web_view_get_title(view);
c->title = copystr(&c->title, t);
updatetitle(c);
}