summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-20 07:50:15 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-20 07:50:15 -0300
commit7129587854a9eecdf7733a76f02f4081d294c7b9 (patch)
tree1ff4bf4dde559e18b8366abb2caee753988ab74a
parent474584719b53b45a904092626d9c9454cbaa8573 (diff)
downloadeeshow-7129587854a9eecdf7733a76f02f4081d294c7b9.tar.gz
eeshow-7129587854a9eecdf7733a76f02f4081d294c7b9.tar.bz2
eeshow-7129587854a9eecdf7733a76f02f4081d294c7b9.zip
eeshow/: Esc cancels current action
-rw-r--r--README2
-rw-r--r--TODO2
-rw-r--r--gui/help.c1
-rw-r--r--gui/history.c5
-rw-r--r--gui/sheet.c6
-rw-r--r--help.html4
-rw-r--r--help.txt2
7 files changed, 22 insertions, 0 deletions
diff --git a/README b/README
index bb99078..66ac9c7 100644
--- a/README
+++ b/README
@@ -175,6 +175,8 @@ PgUp go to the previous sheet in sequence
PgDn go to the next sheet in sequence
Up or Down invoke the revision history (WIP)
Tab toggle between old and new revision
+Esc cancel current action (exit history, close pop-up,
+ de-highlight glabel, close help)
H show/hide help window
D when comparing revisions, show difference (default)
N show newer sheet
diff --git a/TODO b/TODO
index 18969fe..333491d 100644
--- a/TODO
+++ b/TODO
@@ -49,6 +49,8 @@ GUI:
to new_sheet and old_sheet.
- introduce location string, as command-line argument, e.g.,
[top-sheet/]rev-old,rev-new[,x,y[,zoom]]
+ or maybe (allowing for sheets from completely different sources):
+ [revA]:[topA]:[sheetA][,[revB]:[topB]:[sheetB]][@x,y[,zoom]]
- set/use location string via clipboard
GUI/history
diff --git a/gui/help.c b/gui/help.c
index 9236c0a..2becc28 100644
--- a/gui/help.c
+++ b/gui/help.c
@@ -38,6 +38,7 @@ static gboolean key_press_event(GtkWidget *widget, GdkEventKey *event,
switch (event->keyval) {
case GDK_KEY_h:
case GDK_KEY_q:
+ case GDK_KEY_Escape:
gtk_widget_hide(window);
visible = 0;
break;
diff --git a/gui/history.c b/gui/history.c
index 8a2b117..97b1759 100644
--- a/gui/history.c
+++ b/gui/history.c
@@ -232,7 +232,12 @@ static void history_drag_move(void *user, int dx, int dy)
static void history_key(void *user, int x, int y, int keyval)
{
+ struct gui_ctx *ctx = user;
+
switch (keyval) {
+ case GDK_KEY_Escape:
+ hide_history(ctx);
+ break;
case GDK_KEY_q:
gtk_main_quit();
}
diff --git a/gui/sheet.c b/gui/sheet.c
index a0ba819..74bb5be 100644
--- a/gui/sheet.c
+++ b/gui/sheet.c
@@ -516,6 +516,12 @@ static void sheet_key(void *user, int x, int y, int keyval)
toggle_old_new(ctx);
break;
+ case GDK_KEY_Escape:
+ dehover_glabel(user);
+ ctx->glabel = NULL;
+ redraw(ctx);
+ break;
+
case GDK_KEY_n:
ctx->diff_mode = diff_new;
redraw(ctx);
diff --git a/help.html b/help.html
index d66db87..fc281f6 100644
--- a/help.html
+++ b/help.html
@@ -29,6 +29,10 @@
<TD>Tab
<TD>toggle between old and new revision
<TR>
+ <TD>Esc
+ <TD>cancel current action (exit history, close pop-up,
+ de-highlight glabel, close help)
+ <TR>
<TD>H
<TD>open/close help window
<TR>
diff --git a/help.txt b/help.txt
index b3e6e5a..1db38ca 100644
--- a/help.txt
+++ b/help.txt
@@ -9,6 +9,8 @@ PgUp go to the previous sheet in sequence
PgDn go to the next sheet in sequence
Up or Down invoke the revision history (WIP)
Tab toggle between old and new revision
+Esc cancel current action (exit history, close
+ pop-up, de-highlight glabel, close help)
H show/hide help window
D when comparing revisions, show difference
N show newer sheet