diff options
author | Thomas White <taw@physics.org> | 2020-01-24 19:59:06 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-01-24 19:59:06 +0100 |
commit | e6d94b1b6c9a8b74d7faa7e80d7a44f604c4e814 (patch) | |
tree | dbcd954064138b78771b0a0e1c9a75136e0e18cf /src | |
parent | c84cdfa1e3d3060e64c6d1d7b332a13024c6da9e (diff) |
Add all remaining narrative items
Diffstat (limited to 'src')
-rw-r--r-- | src/narrative_window.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/narrative_window.c b/src/narrative_window.c index e414556..9ccdafa 100644 --- a/src/narrative_window.c +++ b/src/narrative_window.c @@ -326,6 +326,16 @@ static void add_slide_sig(GSimpleAction *action, GVariant *parameter, update_titlebar(nw); } +static void add_prestitle_sig(GSimpleAction *action, GVariant *parameter, + gpointer vp) +{ + NarrativeWindow *nw = vp; + gtk_narrative_view_add_prestitle_at_cursor(GTK_NARRATIVE_VIEW(nw->nv)); + narrative_set_unsaved(nw->n); + update_titlebar(nw); +} + + static void add_bp_sig(GSimpleAction *action, GVariant *parameter, gpointer vp) { @@ -336,6 +346,36 @@ static void add_bp_sig(GSimpleAction *action, GVariant *parameter, } +static void add_segstart_sig(GSimpleAction *action, GVariant *parameter, + gpointer vp) +{ + NarrativeWindow *nw = vp; + gtk_narrative_view_add_segstart_at_cursor(GTK_NARRATIVE_VIEW(nw->nv)); + narrative_set_unsaved(nw->n); + update_titlebar(nw); +} + + +static void add_segend_sig(GSimpleAction *action, GVariant *parameter, + gpointer vp) +{ + NarrativeWindow *nw = vp; + gtk_narrative_view_add_segend_at_cursor(GTK_NARRATIVE_VIEW(nw->nv)); + narrative_set_unsaved(nw->n); + update_titlebar(nw); +} + + +static void add_eop_sig(GSimpleAction *action, GVariant *parameter, + gpointer vp) +{ + NarrativeWindow *nw = vp; + gtk_narrative_view_add_eop_at_cursor(GTK_NARRATIVE_VIEW(nw->nv)); + narrative_set_unsaved(nw->n); + update_titlebar(nw); +} + + static void set_clock_pos(NarrativeWindow *nw) { int pos = gtk_narrative_view_get_cursor_para(GTK_NARRATIVE_VIEW(nw->nv)); @@ -680,6 +720,10 @@ GActionEntry nw_entries[] = { { "saveas", saveas_sig, NULL, NULL, NULL }, { "slide", add_slide_sig, NULL, NULL, NULL }, { "bp", add_bp_sig, NULL, NULL, NULL }, + { "eop", add_eop_sig, NULL, NULL, NULL }, + { "prestitle", add_prestitle_sig, NULL, NULL, NULL }, + { "segstart", add_segstart_sig, NULL, NULL, NULL }, + { "segend", add_segend_sig, NULL, NULL, NULL }, { "loadstylesheet", load_ss_sig, NULL, NULL, NULL }, { "stylesheet", edit_ss_sig, NULL, NULL, NULL }, { "startslideshow", start_slideshow_sig, NULL, NULL, NULL }, |