aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sc_editor.c10
-rw-r--r--src/sc_editor.h4
-rw-r--r--src/slide_window.c1
3 files changed, 13 insertions, 2 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c
index 0d3406f..261b23f 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -73,9 +73,8 @@ static void rerender(SCEditor *e)
cairo_surface_destroy(e->surface);
}
- /* FIXME: Slide number, if appropriate */
e->surface = render_sc(e->scblocks, e->w, e->h, e->log_w, e->log_h,
- e->stylesheet, e->is, ISZ_EDITOR, 0);
+ e->stylesheet, e->is, ISZ_EDITOR, e->slidenum);
}
@@ -1392,6 +1391,12 @@ void sc_editor_set_logical_size(SCEditor *e, double w, double h)
}
+void sc_editor_set_slidenum(SCEditor *e, int slidenum)
+{
+ e->slidenum = slidenum;
+}
+
+
SCEditor *sc_editor_new(SCBlock *scblocks, SCBlock *stylesheet)
{
SCEditor *sceditor;
@@ -1407,6 +1412,7 @@ SCEditor *sc_editor_new(SCBlock *scblocks, SCBlock *stylesheet)
sceditor->log_h = 100;
sceditor->is = imagestore_new();
sceditor->stylesheet = stylesheet;
+ sceditor->slidenum = 0;
rerender(sceditor);
diff --git a/src/sc_editor.h b/src/sc_editor.h
index 0026236..8bfcd59 100644
--- a/src/sc_editor.h
+++ b/src/sc_editor.h
@@ -132,6 +132,9 @@ struct _sceditor
double import_width;
double import_height;
int import_acceptable;
+
+ /* Stuff that doesn't really belong here */
+ int slidenum;
};
struct _sceditorclass
@@ -149,5 +152,6 @@ extern void sc_editor_set_size(SCEditor *e, int w, int h);
extern void sc_editor_set_logical_size(SCEditor *e, double w, double h);
extern void sc_editor_redraw(SCEditor *e);
extern void sc_editor_set_background(SCEditor *e, double r, double g, double b);
+extern void sc_editor_set_slidenum(SCEditor *e, int slidenum);
#endif /* SC_EDITOR_H */
diff --git a/src/slide_window.c b/src/slide_window.c
index 7f6a879..81ba964 100644
--- a/src/slide_window.c
+++ b/src/slide_window.c
@@ -350,6 +350,7 @@ void change_edit_slide(SlideWindow *sw, struct slide *np)
update_toolbar(sw);
+ sc_editor_set_slidenum(sw->sceditor, slide_number(sw->p, np));
sc_editor_set_scblock(sw->sceditor, np->scblocks);
// FIXME notify_notes_slide_changed(sw->p, np);