From e3e90d469241ceb7c577e13a908c0928646fed0a Mon Sep 17 00:00:00 2001 From: Abel `00z' Camarillo <00z@the00z.org> Date: Sun, 24 May 2009 21:02:13 -0500 Subject: s/stdout/_stdout/g I really think that stdout should not be used has a variable name. --- uzbl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index 0b59d5c..c9a9bab 100644 --- a/uzbl.c +++ b/uzbl.c @@ -905,7 +905,7 @@ sharg_append(GArray *a, const gchar *str) { // make sure that the args string you pass can properly be interpreted (eg properly escaped against whitespace, quotes etc) static gboolean run_command (const gchar *command, const guint npre, const gchar **args, - const gboolean sync, char **stdout) { + const gboolean sync, char **_stdout) { //command [args] GError *err = NULL; @@ -929,10 +929,10 @@ run_command (const gchar *command, const guint npre, const gchar **args, gboolean result; if (sync) { - if (*stdout) *stdout = strfree(*stdout); + if (*_stdout) *_stdout = strfree(*_stdout); result = g_spawn_sync(NULL, (gchar **)a->data, NULL, G_SPAWN_SEARCH_PATH, - NULL, NULL, stdout, NULL, NULL, &err); + NULL, NULL, _stdout, NULL, NULL, &err); } else result = g_spawn_async(NULL, (gchar **)a->data, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &err); -- cgit v1.2.3 From eaed4ef8ad9d261036fb63534f12182877aad7e1 Mon Sep 17 00:00:00 2001 From: Tom Adams Date: Fri, 5 Jun 2009 22:36:41 +0100 Subject: javascript: URIs work. --- uzbl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index ba5a98a..17628b2 100644 --- a/uzbl.c +++ b/uzbl.c @@ -731,6 +731,10 @@ static void load_uri (WebKitWebView *web_view, GArray *argv) { if (argv_idx(argv, 0)) { GString* newuri = g_string_new (argv_idx(argv, 0)); + if (g_strstr_len (argv_idx(argv, 0), 11, "javascript:") != NULL) { + run_js(web_view, argv); + return; + } if (g_strrstr (argv_idx(argv, 0), "://") == NULL) g_string_prepend (newuri, "http://"); /* if we do handle cookies, ask our handler for them */ -- cgit v1.2.3 From 6a73540ad84aa6bf2c1b26ab04bfdbb3ec37cfe9 Mon Sep 17 00:00:00 2001 From: Tom Adams Date: Sat, 6 Jun 2009 09:27:07 +0100 Subject: Cookies work. --- uzbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index 17628b2..c53e255 100644 --- a/uzbl.c +++ b/uzbl.c @@ -2242,7 +2242,7 @@ settings_init () { printf ("No configuration file loaded.\n"); } - g_signal_connect(n->soup_session, "request-queued", G_CALLBACK(handle_cookies), NULL); + g_signal_connect_after(n->soup_session, "request-started", G_CALLBACK(handle_cookies), NULL); } static void handle_cookies (SoupSession *session, SoupMessage *msg, gpointer user_data){ -- cgit v1.2.3 From 82597a8e43c15eefeeee244f9fb3a0df017180c4 Mon Sep 17 00:00:00 2001 From: Tom Adams Date: Fri, 5 Jun 2009 22:44:49 +0100 Subject: data: URIs work. --- uzbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index c53e255..a1f1bab 100644 --- a/uzbl.c +++ b/uzbl.c @@ -735,7 +735,7 @@ load_uri (WebKitWebView *web_view, GArray *argv) { run_js(web_view, argv); return; } - if (g_strrstr (argv_idx(argv, 0), "://") == NULL) + if (g_strrstr (argv_idx(argv, 0), "://") == NULL && g_strstr_len (argv_idx(argv, 0), 5, "data:") == NULL) g_string_prepend (newuri, "http://"); /* if we do handle cookies, ask our handler for them */ webkit_web_view_load_uri (web_view, newuri->str); -- cgit v1.2.3 From e3f6305e0455b6c88b7ff3fc140d7d520f344a0b Mon Sep 17 00:00:00 2001 From: Jeremy O'Brien Date: Thu, 4 Jun 2009 23:51:34 -0400 Subject: Make progress bar show empty on start of page load Previously, when clicking on a link or opening a new URL, the user would not get any feedback showing that the command was taken until after a progress change, which could sometimes take a prolonged period of time. Now, the user is immediately alerted via the statusbar going to zero. --- uzbl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index a1f1bab..4c37f08 100644 --- a/uzbl.c +++ b/uzbl.c @@ -545,6 +545,7 @@ load_start_cb (WebKitWebView* page, WebKitWebFrame* frame, gpointer data) { (void) page; (void) frame; (void) data; + uzbl.gui.sbar.load_progress = 0; g_string_truncate(uzbl.state.keycmd, 0); // don't need old commands to remain on new page? if (uzbl.behave.load_start_handler) run_handler(uzbl.behave.load_start_handler, ""); -- cgit v1.2.3 From b121e01f4139136b193c8b277777a1d019f596f2 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 6 Jun 2009 20:09:12 +0200 Subject: use stdlib atof() instead of gnu99 strtof() + more sense making example binds for zoomlevels --- examples/configs/sampleconfig | 3 ++- examples/configs/sampleconfig-dev | 3 ++- uzbl.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'uzbl.c') diff --git a/examples/configs/sampleconfig b/examples/configs/sampleconfig index 9bb0025..e853836 100644 --- a/examples/configs/sampleconfig +++ b/examples/configs/sampleconfig @@ -69,7 +69,8 @@ bind r = reload bind R = reload_ign_cache bind + = zoom_in bind - = zoom_out -bind 0 = sh "echo set zoom_level = 1.0 > $4" +bind 1 = sh "echo set zoom_level = 1.0 > $4" +bind 2 = sh "echo set zoom_level = 2.0 > $4" bind t = toggle_status # Hilight matches. Notice the * after the slash - it makes the command incremental, i.e. gets called # on every character you type. You can do `bind /_ = search %s' if you want it less interactive. diff --git a/examples/configs/sampleconfig-dev b/examples/configs/sampleconfig-dev index c8eddd0..ad6de24 100644 --- a/examples/configs/sampleconfig-dev +++ b/examples/configs/sampleconfig-dev @@ -104,7 +104,8 @@ bind r = reload bind R = reload_ign_cache bind + = zoom_in bind - = zoom_out -bind 0 = sh "echo set zoom_level = 1.0 > $4" +bind 1 = sh "echo set zoom_level = 1.0 > $4" +bind 2 = sh "echo set zoom_level = 2.0 > $4" bind t = toggle_status # Hilight matches. Notice the * after the slash - it makes the command incremental, i.e. gets called # on every character you type. You can do `bind /_ = search %s' if you want it less interactive. diff --git a/uzbl.c b/uzbl.c index 4c37f08..1564192 100644 --- a/uzbl.c +++ b/uzbl.c @@ -1558,7 +1558,7 @@ set_var_value(gchar *name, gchar *val) { } else if (c->type == TYPE_FLOAT) { float *fp = (float *)c->ptr; buf = expand_vars(val); - *fp = strtof(buf, &endp); + *fp = atof(buf); g_free(buf); } -- cgit v1.2.3 From b251c40a72251e47f182a55c9854806a9cb1745d Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 6 Jun 2009 20:19:43 +0200 Subject: strtod > atof. Thanks Zaba --- uzbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index 1564192..bd54c7d 100644 --- a/uzbl.c +++ b/uzbl.c @@ -1558,7 +1558,7 @@ set_var_value(gchar *name, gchar *val) { } else if (c->type == TYPE_FLOAT) { float *fp = (float *)c->ptr; buf = expand_vars(val); - *fp = atof(buf); + *fp = strtod(buf, &endp); g_free(buf); } -- cgit v1.2.3 From 2e1033c24873586d8cc0ace2d76de30a6408d06d Mon Sep 17 00:00:00 2001 From: Maximilian Gaß Date: Sat, 6 Jun 2009 20:35:09 +0200 Subject: Build in C99 mode --- Makefile | 2 +- uzbl.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'uzbl.c') diff --git a/Makefile b/Makefile index e650c29..4c3a483 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS:=$(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS) +CFLAGS:=-std=c99 $(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS) LDFLAGS:=$(shell pkg-config --libs gtk+-2.0 webkit-1.0) $(LDFLAGS) all: uzbl uzblctrl diff --git a/uzbl.c b/uzbl.c index bd54c7d..ddaadf7 100644 --- a/uzbl.c +++ b/uzbl.c @@ -32,6 +32,7 @@ #define LENGTH(x) (sizeof x / sizeof x[0]) #define MAX_BINDINGS 256 +#define _POSIX_SOURCE #include #include -- cgit v1.2.3 From afb98a9a8b907b8a636a0e201a87de0ccb7a1f2f Mon Sep 17 00:00:00 2001 From: salinasv Date: Tue, 26 May 2009 22:14:33 -0500 Subject: Let keybinds work when status bar have focus. --- uzbl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index bd54c7d..10b2bd2 100644 --- a/uzbl.c +++ b/uzbl.c @@ -2030,6 +2030,7 @@ create_mainbar () { gtk_misc_set_alignment (GTK_MISC(g->mainbar_label), 0, 0); gtk_misc_set_padding (GTK_MISC(g->mainbar_label), 2, 2); gtk_box_pack_start (GTK_BOX (g->mainbar), g->mainbar_label, TRUE, TRUE, 0); + g_signal_connect (G_OBJECT (g->mainbar), "key-press-event", G_CALLBACK (key_press_cb), NULL); return g->mainbar; } -- cgit v1.2.3