diff options
-rw-r--r-- | src/colloquium.c | 4 | ||||
-rw-r--r-- | src/narrative_window.c | 26 | ||||
-rw-r--r-- | src/slideshow.c | 1 |
3 files changed, 30 insertions, 1 deletions
diff --git a/src/colloquium.c b/src/colloquium.c index 422a231..546e281 100644 --- a/src/colloquium.c +++ b/src/colloquium.c @@ -367,6 +367,10 @@ static void colloquium_startup(GApplication *papp) " <attribute name='action'>win.startslideshowhere</attribute>" " </item>" " <item>" + " <attribute name='label'>Start slideshow without slides</attribute>" + " <attribute name='action'>win.startslideshownoslides</attribute>" + " </item>" + " <item>" " <attribute name='label'>Presentation clock...</attribute>" " <attribute name='action'>win.clock</attribute>" " </item>" 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 }, diff --git a/src/slideshow.c b/src/slideshow.c index 9eae2dc..0b9cdcb 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -222,7 +222,6 @@ SCSlideshow *sc_slideshow_new(struct presentation *p) gtk_window_fullscreen(GTK_WINDOW(ss)); ss->linked = 1; - gtk_widget_show_all(GTK_WIDGET(ss)); if ( ss->inhibit != NULL ) do_inhibit(ss->inhibit, 1); |