From 247a81c6e1b78d91fc6126d03f4018eabba43119 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 1 Jun 2011 18:35:11 +0200 Subject: Update slideshow display when switching slides in the window --- src/mainwindow.c | 4 ++++ src/slideshow.c | 12 ++++++++---- src/slideshow.h | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/mainwindow.c b/src/mainwindow.c index d407888..1997951 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -137,6 +137,10 @@ void notify_slide_changed(struct presentation *p) p->editing_object = NULL; update_toolbar(p); gdk_window_invalidate_rect(p->drawingarea->window, NULL, FALSE); + + if ( p->slideshow != NULL ) { + notify_slideshow_slide_changed(p); + } } diff --git a/src/slideshow.c b/src/slideshow.c index 1af0e18..933a4dd 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -84,6 +84,12 @@ static gboolean ss_expose_sig(GtkWidget *da, GdkEventExpose *event, } +void notify_slideshow_slide_changed(struct presentation *p) +{ + gdk_window_invalidate_rect(p->ss_drawingarea->window, NULL, FALSE); +} + + static gint prev_slide_sig(GtkWidget *widget, struct presentation *p) { if ( p->view_slide_number == 0 ) return FALSE; @@ -92,8 +98,7 @@ static gint prev_slide_sig(GtkWidget *widget, struct presentation *p) p->ss_blank = 0; p->view_slide = p->slides[p->view_slide_number]; - gdk_window_invalidate_rect(p->ss_drawingarea->window, NULL, FALSE); - + notify_slideshow_slide_changed(p); notify_slide_changed(p); return FALSE; @@ -108,8 +113,7 @@ static gint next_slide_sig(GtkWidget *widget, struct presentation *p) p->ss_blank = 0; p->view_slide = p->slides[p->view_slide_number]; - gdk_window_invalidate_rect(p->ss_drawingarea->window, NULL, FALSE); - + notify_slideshow_slide_changed(p); notify_slide_changed(p); return FALSE; diff --git a/src/slideshow.h b/src/slideshow.h index 9fb0a16..635344c 100644 --- a/src/slideshow.h +++ b/src/slideshow.h @@ -30,5 +30,6 @@ extern void try_start_slideshow(struct presentation *p); +extern void notify_slideshow_slide_changed(struct presentation *p); #endif /* SLIDESHOW_H */ -- cgit v1.2.3