renamed download handlers.

This commit is contained in:
Enno Boland (Gottox) 2009-06-08 13:29:39 +02:00
parent b6e181e82a
commit a4ca2f7aad
1 changed files with 7 additions and 7 deletions

14
surf.c
View File

@ -40,8 +40,8 @@ static void cleanup(void);
static void destroyclient(Client *c); static void destroyclient(Client *c);
static void destroywin(GtkWidget* w, gpointer d); static void destroywin(GtkWidget* w, gpointer d);
static void die(char *str); static void die(char *str);
static void downloadcb(WebKitDownload *o, GParamSpec *pspec, gpointer d); static void download(WebKitDownload *o, GParamSpec *pspec, gpointer d);
static gboolean download(WebKitWebView *view, WebKitDownload *o, gpointer d); static gboolean initdownload(WebKitWebView *view, WebKitDownload *o, gpointer d);
static gchar *geturi(Client *c); static gchar *geturi(Client *c);
static void hidesearch(Client *c); static void hidesearch(Client *c);
static void hideurl(Client *c); static void hideurl(Client *c);
@ -101,7 +101,7 @@ void die(char *str) {
} }
void void
downloadcb(WebKitDownload *o, GParamSpec *pspec, gpointer d) { download(WebKitDownload *o, GParamSpec *pspec, gpointer d) {
Client *c = (Client *) d; Client *c = (Client *) d;
GSList *i; GSList *i;
WebKitDownload *dl; WebKitDownload *dl;
@ -129,7 +129,7 @@ downloadcb(WebKitDownload *o, GParamSpec *pspec, gpointer d) {
} }
gboolean gboolean
download(WebKitWebView *view, WebKitDownload *o, gpointer d) { initdownload(WebKitWebView *view, WebKitDownload *o, gpointer d) {
/* TODO */ /* TODO */
Client *c = (Client *) d; Client *c = (Client *) d;
const gchar *home; const gchar *home;
@ -144,8 +144,8 @@ download(WebKitWebView *view, WebKitDownload *o, gpointer d) {
g_free(uri); g_free(uri);
downloads = g_slist_append(downloads, o); downloads = g_slist_append(downloads, o);
gtk_widget_show(c->pbar); gtk_widget_show(c->pbar);
g_signal_connect(o, "notify::progress", G_CALLBACK(downloadcb), d); g_signal_connect(o, "notify::progress", G_CALLBACK(download), d);
g_signal_connect(o, "notify::status", G_CALLBACK(downloadcb), d); g_signal_connect(o, "notify::status", G_CALLBACK(download), d);
webkit_download_start(o); webkit_download_start(o);
return TRUE; return TRUE;
} }
@ -329,7 +329,7 @@ newclient(void) {
g_signal_connect(G_OBJECT(c->view), "load-committed", G_CALLBACK(loadcommit), c); g_signal_connect(G_OBJECT(c->view), "load-committed", G_CALLBACK(loadcommit), c);
g_signal_connect(G_OBJECT(c->view), "hovering-over-link", G_CALLBACK(linkhover), c); g_signal_connect(G_OBJECT(c->view), "hovering-over-link", G_CALLBACK(linkhover), c);
g_signal_connect(G_OBJECT(c->view), "create-web-view", G_CALLBACK(newwindow), c); g_signal_connect(G_OBJECT(c->view), "create-web-view", G_CALLBACK(newwindow), c);
g_signal_connect(G_OBJECT(c->view), "download-requested", G_CALLBACK(download), c); g_signal_connect(G_OBJECT(c->view), "download-requested", G_CALLBACK(initdownload), c);
/* urlbar */ /* urlbar */
c->urlbar = gtk_entry_new(); c->urlbar = gtk_entry_new();