fix for broken bookmark script. we cannot add arbitrary arguments to keybound command...
authorDieter Plaetinck <dieter@plaetinck.be>
Fri, 1 May 2009 16:38:38 +0000 (18:38 +0200)
committerDieter Plaetinck <dieter@plaetinck.be>
Fri, 1 May 2009 16:38:38 +0000 (18:38 +0200)
README
uzbl.c

diff --git a/README b/README
index 31f307a..6c1b23f 100644 (file)
--- a/README
+++ b/README
@@ -106,18 +106,17 @@ $2 uzbl-pid
 $3 uzbl-x-window-id
 $4 uzbl_fifo-filename
 $5 uzbl_socket-filename
+$6 current page url
+$7 current page title
 .. [ script specific ] (optional)
 
 The script specific arguments are this:
 * history:
-  $6 page url
-  $7 page title
   $8 date of visit (Y-m-d H:i:s localtime)
 * add bookmark:
-  $6 page url
-  $7 page title
+  none
 * download:
-  $6 url
+  $8 url of item to download
 
 KNOWN BUGS
 - Segfaults when using zoom commands (happens when max zoom already reached?).
diff --git a/uzbl.c b/uzbl.c
index ca6c6ae..d5bdb91 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -289,7 +289,7 @@ log_history_cb () {
        timeinfo = localtime ( &rawtime );
        strftime (date, 80, "%Y-%m-%d %H:%M:%S", timeinfo);
        GString* args = g_string_new ("");
-       g_string_printf (args, "'%s' '%s' '%s'", uri, "TODO:page title here", date);
+       g_string_printf (args, "'%s'", date);
        run_command(history_handler, args->str);
        g_string_free (args, TRUE);
    }
@@ -428,6 +428,7 @@ run_command(const char *command, const char *args) {
     GString* to_execute = g_string_new ("");
     gboolean result;
     g_string_printf (to_execute, "%s '%s' '%i' '%i' '%s' '%s'", command, config_file, (int) getpid() , (int) xwin, fifo_path, socket_path);
+    g_string_append_printf (to_execute, " '%s' '%s'", uri, "TODO title here");
     if(args) {
         g_string_append_printf (to_execute, " %s", args);
     }