usercss works again.

This commit is contained in:
Enno Boland (tox) 2009-09-13 16:15:28 +02:00
parent a2da3b7eef
commit 0e3ac7f3b0
1 changed files with 11 additions and 10 deletions

21
surf.c
View File

@ -60,14 +60,14 @@ typedef struct {
KeyFocus focus; KeyFocus focus;
} Key; } Key;
SoupCookieJar *cookiejar; static SoupCookieJar *cookiejar;
SoupSession *session; static SoupSession *session;
Client *clients = NULL; static Client *clients = NULL;
Cookie *cookies = NULL; /*static Cookie *cookies = NULL;*/
GdkNativeWindow embed = 0; static GdkNativeWindow embed = 0;
gboolean showxid = FALSE; static gboolean showxid = FALSE;
gboolean ignore_once = FALSE; static gboolean ignore_once = FALSE;
gchar *workdir; static gchar *workdir;
extern char *optarg; extern char *optarg;
extern gint optind; extern gint optind;
@ -123,6 +123,7 @@ void
cleanup(void) { cleanup(void) {
while(clients) while(clients)
destroyclient(clients); destroyclient(clients);
g_free(workdir);
} }
void void
@ -590,7 +591,7 @@ setup(void) {
/* create dirs and files */ /* create dirs and files */
home = g_get_home_dir(); home = g_get_home_dir();
workdir = g_build_filename(home, ".surf", NULL); workdir = g_strdup(g_build_filename(home, ".surf", NULL));
g_mkdir_with_parents(workdir, 0755); g_mkdir_with_parents(workdir, 0755);
name = g_build_filename(workdir, "dl", NULL); name = g_build_filename(workdir, "dl", NULL);
g_mkdir(name, 0755); g_mkdir(name, 0755);
@ -720,6 +721,7 @@ int main(int argc, char *argv[]) {
default: default:
usage(); usage();
} }
setup();
if(optind + 1 == argc) { if(optind + 1 == argc) {
c = newclient(); c = newclient();
arg.v = argv[optind]; arg.v = argv[optind];
@ -731,7 +733,6 @@ int main(int argc, char *argv[]) {
} }
else if(optind != argc) else if(optind != argc)
usage(); usage();
setup();
if(!clients) if(!clients)
newclient(); newclient();