fix downloading, tidyup
This commit is contained in:
parent
64edf0371e
commit
96edaa8412
1 changed files with 2 additions and 7 deletions
9
surf.c
9
surf.c
|
@ -109,9 +109,6 @@ download(WebKitDownload *o, GParamSpec *pspec, Client *c) {
|
||||||
if(status == WEBKIT_DOWNLOAD_STATUS_STARTED || status == WEBKIT_DOWNLOAD_STATUS_CREATED) {
|
if(status == WEBKIT_DOWNLOAD_STATUS_STARTED || status == WEBKIT_DOWNLOAD_STATUS_CREATED) {
|
||||||
c->progress = (int)(webkit_download_get_progress(c->download)*100);
|
c->progress = (int)(webkit_download_get_progress(c->download)*100);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
stop(c);
|
|
||||||
}
|
|
||||||
updatetitle(c, NULL);
|
updatetitle(c, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,8 +274,6 @@ loadcommit(WebKitWebView *view, WebKitWebFrame *f, Client *c) {
|
||||||
|
|
||||||
void
|
void
|
||||||
loadstart(WebKitWebView *view, WebKitWebFrame *f, Client *c) {
|
loadstart(WebKitWebView *view, WebKitWebFrame *f, Client *c) {
|
||||||
if(c->download)
|
|
||||||
stop(c);
|
|
||||||
c->progress = 0;
|
c->progress = 0;
|
||||||
updatetitle(c, NULL);
|
updatetitle(c, NULL);
|
||||||
}
|
}
|
||||||
|
@ -409,8 +404,8 @@ newwindow(WebKitWebView *v, WebKitWebFrame *f, Client *c) {
|
||||||
|
|
||||||
void
|
void
|
||||||
pasteurl(GtkClipboard *clipboard, const gchar *text, gpointer d) {
|
pasteurl(GtkClipboard *clipboard, const gchar *text, gpointer d) {
|
||||||
if(text!=NULL)
|
if(text != NULL)
|
||||||
loaduri((Client *)d, text);
|
loaduri((Client *) d, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkFilterReturn
|
GdkFilterReturn
|
||||||
|
|
Loading…
Reference in a new issue