[hackers] [surf] deprecating signal “title-changed” for “notify::title” || Quentin Rameau

From: <git_AT_suckless.org>
Date: Thu, 06 Feb 2014 19:18:09 +0100

commit 3cc5f87db85f84e37666936d42d5345daef94ad3
Author: Quentin Rameau <quinq.ml_AT_gmail.com>
Date: Thu Feb 6 18:54:38 2014 +0100

    deprecating signal “title-changed” for “notify::title”
    
    Signed-off-by: Christoph Lohmann <20h_AT_r-36.net>

diff --git a/surf.c b/surf.c
index 2e9c38d..28d8465 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -164,8 +164,7 @@ static void sigchld(int unused);
 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);
_AT_@ -749,7 +748,7 @@ newclient(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",
_AT_@ -1178,7 +1177,8 @@ stop(Client *c, const Arg *arg) {
 }
 
 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);
 }
Received on Thu Feb 06 2014 - 19:18:09 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 06 2014 - 19:24:19 CET