aboutsummaryrefslogtreecommitdiff
path: root/src/narrative_window.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-01-05 22:36:11 +0100
committerThomas White <taw@physics.org>2018-01-05 22:36:11 +0100
commit32a34c806d191d542700b263403ce50cadca9f37 (patch)
tree873483ea41b2ef8e51a408bb678af751cd8acfec /src/narrative_window.c
parentc769d823cfd37704bf07650e1cb1153a68ee51fd (diff)
Add option to start presentation without slides (timing only)
Diffstat (limited to 'src/narrative_window.c')
-rw-r--r--src/narrative_window.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/narrative_window.c b/src/narrative_window.c
index 9058403..6968aa2 100644
--- a/src/narrative_window.c
+++ b/src/narrative_window.c
@@ -588,8 +588,32 @@ static void start_slideshow_here_sig(GSimpleAction *action, GVariant *parameter,
G_CALLBACK(ss_destroy_sig), nw);
sc_slideshow_set_slide(nw->show, bvp);
sc_editor_set_para_highlight(nw->sceditor, 1);
+ gtk_widget_show_all(GTK_WIDGET(nw->show));
+ update_toolbar(nw);
}
+
+static void start_slideshow_noslides_sig(GSimpleAction *action, GVariant *parameter,
+ gpointer vp)
+{
+ NarrativeWindow *nw = vp;
+
+ if ( num_slides(nw->p) == 0 ) return;
+
+ nw->show = sc_slideshow_new(nw->p);
+ if ( nw->show == NULL ) return;
+
+ g_signal_connect(G_OBJECT(nw->show), "key-press-event",
+ G_CALLBACK(key_press_sig), nw);
+ g_signal_connect(G_OBJECT(nw->show), "destroy",
+ G_CALLBACK(ss_destroy_sig), nw);
+ sc_slideshow_set_slide(nw->show, first_slide(nw->p));
+ sc_editor_set_para_highlight(nw->sceditor, 1);
+ sc_editor_set_cursor_para(nw->sceditor, 0);
+ update_toolbar(nw);
+}
+
+
static void start_slideshow_sig(GSimpleAction *action, GVariant *parameter,
gpointer vp)
{
@@ -607,6 +631,7 @@ static void start_slideshow_sig(GSimpleAction *action, GVariant *parameter,
sc_slideshow_set_slide(nw->show, first_slide(nw->p));
sc_editor_set_para_highlight(nw->sceditor, 1);
sc_editor_set_cursor_para(nw->sceditor, 0);
+ gtk_widget_show_all(GTK_WIDGET(nw->show));
update_toolbar(nw);
}
@@ -691,6 +716,7 @@ GActionEntry nw_entries[] = {
{ "loadstylesheet", load_ss_sig, NULL, NULL, NULL },
{ "startslideshow", start_slideshow_sig, NULL, NULL, NULL },
{ "startslideshowhere", start_slideshow_here_sig, NULL, NULL, NULL },
+ { "startslideshownoslides", start_slideshow_noslides_sig, NULL, NULL, NULL },
{ "clock", open_clock_sig, NULL, NULL, NULL },
{ "testcard", testcard_sig, NULL, NULL, NULL },
{ "first", first_para_sig, NULL, NULL, NULL },