diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-05-28 08:34:34 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2011-05-28 08:34:34 +0200 |
commit | 091dbe113cfde2135d3ed389f8057022294d9fc0 (patch) | |
tree | 6dcaa0ec7e5f752e940126ef7c0c850a276eb73c | |
parent | c54649108973ba520518bfb0030a8f112698bcfc (diff) |
Switch slides with pageup/pagedown
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | src/mainwindow.c | 16 |
2 files changed, 14 insertions, 5 deletions
@@ -9,9 +9,6 @@ Switch tools Text Drag objects around -Switch slides - With page up / page down - Full screen display On second monitor diff --git a/src/mainwindow.c b/src/mainwindow.c index c54e6f1..cbc0014 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -276,8 +276,6 @@ static gboolean key_press_sig(GtkWidget *da, GdkEventKey *event, { gboolean r; - if ( p->editing_object == NULL ) return FALSE; - /* Throw the event to the IM context and let it sort things out */ r = gtk_im_context_filter_keypress(GTK_IM_CONTEXT(p->im_context), event); @@ -304,6 +302,18 @@ static gboolean key_press_sig(GtkWidget *da, GdkEventKey *event, } } + switch ( event->keyval ) { + + case GDK_KEY_Page_Up : + prev_slide_sig(NULL, p); + break; + + case GDK_KEY_Page_Down : + next_slide_sig(NULL, p); + break; + + } + /* FIXME: Invalidate only the necessary region */ gdk_window_invalidate_rect(p->drawingarea->window, NULL, FALSE); @@ -488,6 +498,8 @@ int open_mainwindow(struct presentation *p) assert(p->num_slides > 0); check_redraw_slide(p->view_slide); + gtk_widget_grab_focus(GTK_WIDGET(p->drawingarea)); + gtk_widget_show_all(window); return 0; } |