From 5fdea0e99a2e8543a59d508cf28e1f2ff3607f18 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 10 Jan 2015 05:00:02 -0300 Subject: [PATCH] gui_canvas.c (key_press_event): make / rotate through packages as well --- README | 2 +- gui_canvas.c | 2 +- gui_frame.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index c58fd41..e856c57 100644 --- a/README +++ b/README @@ -564,7 +564,7 @@ Space reset user coordinates * zoom and center to extents # zoom and center to currently active frame instance U undelete the previously deleted object -/ Switch between variable and item display. +/ Switch between variables, code, and packages display. Canvas diff --git a/gui_canvas.c b/gui_canvas.c index 75b3ae5..332bd7c 100644 --- a/gui_canvas.c +++ b/gui_canvas.c @@ -451,7 +451,7 @@ static gboolean key_press_event(GtkWidget *widget, GdkEventKey *event, change_world(); break; case '/': - sidebar = sidebar == sidebar_var ? sidebar_code : sidebar_var; + sidebar = sidebar == sidebar_last ? 0 : sidebar + 1; change_world(); break; } diff --git a/gui_frame.h b/gui_frame.h index f931921..174bf06 100644 --- a/gui_frame.h +++ b/gui_frame.h @@ -23,6 +23,7 @@ enum sidebar { sidebar_var, /* show variables */ sidebar_code, /* show code */ sidebar_pkg, /* show packages */ + sidebar_last = sidebar_pkg };