aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl.c
diff options
context:
space:
mode:
authorGravatar Barrucadu <mike@barrucadu.co.uk>2009-04-28 08:12:16 +0100
committerGravatar Barrucadu <mike@barrucadu.co.uk>2009-04-28 08:12:16 +0100
commit19db1dd05caf52db5d8d5c5187f1406fd99a9627 (patch)
tree1bbb4dd945fc6ae1af17e92597b90f44682c0b31 /uzbl.c
parent5b32559a9d979908f3caec40983b6a0b5660b863 (diff)
Added 'exit' command (bound to 'k' by default).
Diffstat (limited to 'uzbl.c')
-rw-r--r--uzbl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/uzbl.c b/uzbl.c
index 438dae3..422607f 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -110,6 +110,9 @@ update_title (GtkWindow* window);
static void
load_uri ( WebKitWebView * web_view, const gchar * uri);
+static void
+close_uzbl ( WebKitWebView * web_view);
+
static gboolean
run_command(const char *command, const char *args);
@@ -245,7 +248,8 @@ static Command commands[] =
{ "zoom_in", &webkit_web_view_zoom_in, NULL }, //Can crash (when max zoom reached?).
{ "zoom_out", &webkit_web_view_zoom_out, NULL },
{ "uri", (void *) NULL, &load_uri },
- { "toggle_status", &toggle_status_cb, NULL }
+ { "toggle_status", &toggle_status_cb, NULL },
+ { "exit" , &close_uzbl, NULL },
//{ "get uri", &webkit_web_view_get_uri},
};
@@ -273,6 +277,12 @@ load_uri (WebKitWebView * web_view, const gchar * uri) {
}
+static void
+close_uzbl (WebKitWebView * web_view) {
+ (void) web_view;
+ gtk_main_quit ();
+}
+
// make sure to put '' around args, so that if there is whitespace we can still keep arguments together.
static gboolean
run_command(const char *command, const char *args) {