[hackers] [surf] merge, download fixing. || Enno Boland (tox)

From: <hg_AT_suckless.org>
Date: Fri, 4 Sep 2009 11:19:24 +0000 (UTC)

changeset: 43:cd66881d6de6
tag: tip
parent: 42:bb36803abc1f
parent: 40:7786b245532f
user: Enno Boland (tox) <tox_AT_s01.de>
date: Fri Sep 04 13:20:48 2009 +0200
files: surf.c
description:
merge, download fixing.

diff -r bb36803abc1f -r cd66881d6de6 surf.c
--- a/surf.c Mon Jul 13 09:35:41 2009 +0200
+++ b/surf.c Fri Sep 04 13:20:48 2009 +0200
@@ -109,9 +109,6 @@
         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 @@
 
 void
 loadstart(WebKitWebView *view, WebKitWebFrame *f, Client *c) {
- if(c->download)
- stop(c);
         c->progress = 0;
         updatetitle(c, NULL);
 }
@@ -317,7 +312,7 @@
 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 @@
  
 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 @@
         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) {
Received on Fri Sep 04 2009 - 11:19:24 UTC

This archive was generated by hypermail 2.2.0 : Fri Sep 04 2009 - 11:24:07 UTC