diff options
author | Thomas White <taw@bitwiz.org.uk> | 2014-11-26 08:46:56 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2014-11-26 08:46:56 +0100 |
commit | ce4063914caf0d28b807ecefa0a6be137b178d49 (patch) | |
tree | 4da9a615f14264f9b8809634dcda02ea3450d0f6 /src/slide_window.c | |
parent | 05d8853ad8da359b12102f448ed16d936d39439d (diff) |
Restore page up/page down in slide window
Diffstat (limited to 'src/slide_window.c')
-rw-r--r-- | src/slide_window.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/slide_window.c b/src/slide_window.c index 4269a23..2c06de3 100644 --- a/src/slide_window.c +++ b/src/slide_window.c @@ -608,6 +608,24 @@ void update_titlebar(struct presentation *p) } +static gboolean key_press_sig(GtkWidget *da, GdkEventKey *event, + SlideWindow *sw) +{ + switch ( event->keyval ) { + + case GDK_KEY_Page_Up : + change_slide_backwards(sw); + break; + + case GDK_KEY_Page_Down : + change_slide_forwards(sw); + break; + } + + return FALSE; +} + + SlideWindow *slide_window_open(struct presentation *p, GApplication *app) { GtkWidget *window; @@ -644,6 +662,9 @@ SlideWindow *slide_window_open(struct presentation *p, GApplication *app) GTK_WIDGET(sw->sceditor)); /* Size of SCEditor surface in pixels */ + g_signal_connect(G_OBJECT(sw->sceditor), "key-press-event", + G_CALLBACK(key_press_sig), sw); + /* FIXME: Somewhat arbitrary. Should come from slide itself */ sc_editor_set_size(sw->sceditor, 1024, 768); sc_editor_set_logical_size(sw->sceditor, 1024.0, 768.0); |