Introduction
Introduction Statistics Contact Development Disclaimer Help
tfix for segfault when closing window while loading (via nibble) - surf - custo…
git clone git://src.adamsgaard.dk/surf
Log
Files
Refs
README
LICENSE
---
commit a1db4e9bf5c8e7ebebb9681bdc907b3065ab1843
parent db72e066d1c6b20b6c36db95205a2127fe100227
Author: pancake <nopcode.org>
Date: Thu, 2 Sep 2010 14:02:12 +0200
fix for segfault when closing window while loading (via nibble)
Diffstat:
M surf.c | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/surf.c b/surf.c
t@@ -87,7 +87,7 @@ static void linkhover(WebKitWebView *v, const char* t, const…
static void loadstatuschange(WebKitWebView *view, GParamSpec *pspec, Client *c…
static void loaduri(Client *c, const Arg *arg);
static void navigate(Client *c, const Arg *arg);
-static Client *newclient(void);
+static Client *newclient(gboolean view);
static void newwindow(Client *c, const Arg *arg);
static void newrequest(SoupSession *s, SoupMessage *msg, gpointer v);
static void pasteuri(GtkClipboard *clipboard, const char *text, gpointer d);
t@@ -181,7 +181,7 @@ copystr(char **str, const char *src) {
WebKitWebView *
createwindow(WebKitWebView *v, WebKitWebFrame *f, Client *c) {
- Client *n = newclient();
+ Client *n = newclient(TRUE);
return n->view;
}
t@@ -410,7 +410,7 @@ navigate(Client *c, const Arg *arg) {
}
Client *
-newclient(void) {
+newclient(gboolean newview) {
Client *c;
WebKitWebSettings *settings;
WebKitWebFrame *frame;
t@@ -454,15 +454,18 @@ newclient(void) {
/* Webview */
c->view = WEBKIT_WEB_VIEW(webkit_web_view_new());
- g_signal_connect(G_OBJECT(c->view), "title-changed", G_CALLBACK(titlec…
- g_signal_connect(G_OBJECT(c->view), "hovering-over-link", G_CALLBACK(l…
- g_signal_connect(G_OBJECT(c->view), "create-web-view", G_CALLBACK(crea…
- g_signal_connect(G_OBJECT(c->view), "new-window-policy-decision-reques…
- g_signal_connect(G_OBJECT(c->view), "mime-type-policy-decision-request…
- g_signal_connect(G_OBJECT(c->view), "window-object-cleared", G_CALLBAC…
- g_signal_connect(G_OBJECT(c->view), "notify::load-status", G_CALLBACK(…
- g_signal_connect(G_OBJECT(c->view), "notify::progress", G_CALLBACK(pro…
- g_signal_connect(G_OBJECT(c->view), "download-requested", G_CALLBACK(i…
+ /* The widget to which the widget is added will handle the signals. */
+ if (!newview){
+ g_signal_connect(G_OBJECT(c->view), "title-changed", G_CALLBAC…
+ g_signal_connect(G_OBJECT(c->view), "hovering-over-link", G_CA…
+ g_signal_connect(G_OBJECT(c->view), "create-web-view", G_CALLB…
+ g_signal_connect(G_OBJECT(c->view), "new-window-policy-decisio…
+ g_signal_connect(G_OBJECT(c->view), "mime-type-policy-decision…
+ g_signal_connect(G_OBJECT(c->view), "window-object-cleared", G…
+ g_signal_connect(G_OBJECT(c->view), "notify::load-status", G_C…
+ g_signal_connect(G_OBJECT(c->view), "notify::progress", G_CALL…
+ g_signal_connect(G_OBJECT(c->view), "download-requested", G_CA…
+ }
/* Indicator */
c->indicator = gtk_drawing_area_new();
t@@ -836,7 +839,7 @@ main(int argc, char *argv[]) {
if(i < argc)
arg.v = argv[i];
setup();
- newclient();
+ newclient(FALSE);
if(arg.v)
loaduri(clients, &arg);
gtk_main();
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.