summaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
authorEnno Boland (tox) <tox@s01.de>2009-09-04 13:20:48 +0200
committerEnno Boland (tox) <tox@s01.de>2009-09-04 13:20:48 +0200
commit77fc27ef561c6777c2c05c394bf13183c1d74143 (patch)
treea60b4eabd700e45f141ca13f97e4223958b37bbe /surf.c
parent9ec6fbda904fa577afe81eddecf8903ecff60eae (diff)
parent96edaa8412b4818d6fd34c395b52719ffc749469 (diff)
downloadsurf-77fc27ef561c6777c2c05c394bf13183c1d74143.tar.gz
surf-77fc27ef561c6777c2c05c394bf13183c1d74143.tar.bz2
surf-77fc27ef561c6777c2c05c394bf13183c1d74143.zip
merge, download fixing.
Diffstat (limited to 'surf.c')
-rw-r--r--surf.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/surf.c b/surf.c
index ec846ad..476fd56 100644
--- a/surf.c
+++ b/surf.c
@@ -109,9 +109,6 @@ download(WebKitDownload *o, GParamSpec *pspec, Client *c) {
if(status == WEBKIT_DOWNLOAD_STATUS_STARTED || status == WEBKIT_DOWNLOAD_STATUS_CREATED) {
c->progress = (int)(webkit_download_get_progress(c->download)*100);
}
- else {
- stop(c);
- }
updatetitle(c, NULL);
}
@@ -277,8 +274,6 @@ loadcommit(WebKitWebView *view, WebKitWebFrame *f, Client *c) {
void
loadstart(WebKitWebView *view, WebKitWebFrame *f, Client *c) {
- if(c->download)
- stop(c);
c->progress = 0;
updatetitle(c, NULL);
}
@@ -317,7 +312,7 @@ loadfile(Client *c, const gchar *f) {
void
loaduri(Client *c, const gchar *uri) {
gchar *u;
- u = g_strrstr(uri, ":") ? g_strdup(uri)
+ u = g_strrstr(uri, "://") ? g_strdup(uri)
: g_strdup_printf("http://%s", uri);
webkit_web_view_load_uri(c->view, u);
c->progress = 0;
@@ -409,8 +404,8 @@ newwindow(WebKitWebView *v, WebKitWebFrame *f, Client *c) {
void
pasteurl(GtkClipboard *clipboard, const gchar *text, gpointer d) {
- if(text!=NULL)
- loaduri((Client *)d, text);
+ if(text != NULL)
+ loaduri((Client *) d, text);
}
GdkFilterReturn
@@ -421,6 +416,7 @@ processx(GdkXEvent *e, GdkEvent *event, gpointer d) {
int idummy;
unsigned long ldummy;
unsigned char *buf = NULL;
+
if(((XEvent *)e)->type == PropertyNotify) {
ev = &((XEvent *)e)->xproperty;
if(ev->atom == urlprop && ev->state == PropertyNewValue) {