aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-01 18:35:11 +0200
committerThomas White <taw@physics.org>2011-06-01 18:35:11 +0200
commit247a81c6e1b78d91fc6126d03f4018eabba43119 (patch)
tree129430d6188ffa483015e2c387ef8b382f9b8667
parentddd4bba22a4cd4ebd326694961190129d129d2fd (diff)
Update slideshow display when switching slides in the window
-rw-r--r--src/mainwindow.c4
-rw-r--r--src/slideshow.c12
-rw-r--r--src/slideshow.h1
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 */