about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2011-11-05 13:03:18 -0500
committerMarco Peereboom <marco@conformal.com>2011-11-05 13:03:18 -0500
commit8681e3ebdd9896bb43440928d0ad42c1c1a2f8ef (patch)
treecda3e4e5b116aece91f35f3e08c8e6f2a7766042
parenta1544ef5dc8adae740a2b6d756a18d3e264cf65c (diff)
downloadxombrero-8681e3ebdd9896bb43440928d0ad42c1c1a2f8ef.tar.gz
Add stop command
Fixes FS#186
-rw-r--r--xxxterm.12
-rw-r--r--xxxterm.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/xxxterm.1 b/xxxterm.1
index 20af2f8..5c6711c 100644
--- a/xxxterm.1
+++ b/xxxterm.1
@@ -591,6 +591,8 @@ Show blocked cookie statistics.
 These statistics vary based on settings and are not persistent.
 .It Cm statustoggle , statust
 Toggle status bar.
+.It Cm stop
+Stop loading the current web page.
 .It Cm tabclose
 Close current tab.
 .It Cm tabhide
diff --git a/xxxterm.c b/xxxterm.c
index 3c6c31b..c506568 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -158,6 +158,7 @@ TAILQ_HEAD(command_list, command_entry);
 #define XT_NAV_BACK		(1)
 #define XT_NAV_FORWARD		(2)
 #define XT_NAV_RELOAD		(3)
+#define XT_NAV_STOP		(4)
 
 #define XT_FOCUS_INVALID	(0)
 #define XT_FOCUS_URI		(1)
@@ -260,6 +261,8 @@ void
 history_delete(struct command_list *l, int *counter)
 {
 	struct command_entry	*c;
+	char *icons = "aaa";
+	printf(icons);
 
 	if (l == NULL || counter == NULL)
 		return;
@@ -2086,6 +2089,10 @@ navaction(struct tab *t, struct karg *args)
 		frame = webkit_web_view_get_main_frame(t->wv);
 		webkit_web_frame_reload(frame);
 		break;
+	case XT_NAV_STOP:
+		frame = webkit_web_view_get_main_frame(t->wv);
+		webkit_web_frame_stop_loading(frame);
+		break;
 	}
 	return (XT_CB_PASSTHROUGH);
 }
@@ -2946,6 +2953,7 @@ struct cmd {
 	{ "goback",		0,	navaction,		XT_NAV_BACK,		0 },
 	{ "goforward",		0,	navaction,		XT_NAV_FORWARD,		0 },
 	{ "reload",		0,	navaction,		XT_NAV_RELOAD,		0 },
+	{ "stop",		0,	navaction,		XT_NAV_STOP,		0 },
 
 	/* vertical movement */
 	{ "scrolldown",		0,	move,			XT_MOVE_DOWN,		0 },