diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-10-17 22:35:49 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2011-10-17 22:35:58 +0100 |
commit | 55387c17d2566050710e5e07beb61166392e830b (patch) | |
tree | 663c51aef3ef0ffc89f681b26eefcefa22e2d879 /src | |
parent | dd3057bff79af7971ec9827e9dc07cdf3366396c (diff) |
Fix remaining holes in redraw logic
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.c | 12 | ||||
-rw-r--r-- | src/mainwindow.h | 1 | ||||
-rw-r--r-- | src/objects.c | 2 | ||||
-rw-r--r-- | src/presentation.c | 9 | ||||
-rw-r--r-- | src/slideshow.c | 2 |
5 files changed, 11 insertions, 15 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c index 3a3ee1c..74bcca4 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -277,17 +277,7 @@ 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); - } -} - - -void notify_slide_update(struct presentation *p) -{ - gdk_window_invalidate_rect(p->drawingarea->window, NULL, FALSE); + redraw_slide(p->cur_edit_slide); if ( p->slideshow != NULL ) { notify_slideshow_slide_changed(p); diff --git a/src/mainwindow.h b/src/mainwindow.h index ee27997..816b17c 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -30,7 +30,6 @@ extern int open_mainwindow(struct presentation *p); extern void notify_slide_changed(struct presentation *p); -extern void notify_slide_update(struct presentation *p); extern void redraw_overlay(struct presentation *p); diff --git a/src/objects.c b/src/objects.c index d7ad8a3..01d603d 100644 --- a/src/objects.c +++ b/src/objects.c @@ -160,7 +160,7 @@ void notify_style_update(struct presentation *p, struct style *sty) } p->completely_empty = 0; - if ( changed ) notify_slide_update(p); + if ( changed ) notify_slide_changed(p); /* Trigger redraw etc */ } diff --git a/src/presentation.c b/src/presentation.c index 1bc5689..9782b81 100644 --- a/src/presentation.c +++ b/src/presentation.c @@ -196,7 +196,14 @@ static void update_titlebar(struct presentation *p) int slide_number(struct presentation *p, struct slide *s) { - /* FIXME: Implement this */ + int i; + + for ( i=0; i<p->num_slides; i++ ) { + if ( p->slides[i] == s ) return i; + } + + fprintf(stderr, "Sorry, this point is never reached.\n"); + fprintf(stderr, "Please report a bug.\n"); return 0; } diff --git a/src/slideshow.c b/src/slideshow.c index acee256..2b40fe5 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -87,7 +87,7 @@ 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); + redraw_slide(p->cur_proj_slide); } |