diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-10-11 22:33:27 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-10-11 22:33:27 +0200 |
commit | 43ef7c6fbc161f0174946f8c7500f71f24924b75 (patch) | |
tree | 074a587902f5fed916e1d15b8b1dd6d63e507806 /libstorycode/gtk | |
parent | 61a374637ac02ee73090a595323408904320a5f7 (diff) |
Implement text deletion and paragraph splitting in slide text boxes
Diffstat (limited to 'libstorycode/gtk')
-rw-r--r-- | libstorycode/gtk/gtkslideview.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libstorycode/gtk/gtkslideview.c b/libstorycode/gtk/gtkslideview.c index 11cf05a..986f666 100644 --- a/libstorycode/gtk/gtkslideview.c +++ b/libstorycode/gtk/gtkslideview.c @@ -1064,8 +1064,6 @@ static void sort_slide_positions(struct slide_pos *a, struct slide_pos *b) static void gtksv_do_backspace(GtkSlideView *e, signed int dir) { - /* FIXME! */ -#if 0 struct slide_pos p1, p2; size_t o1, o2; @@ -1089,18 +1087,14 @@ static void gtksv_do_backspace(GtkSlideView *e, signed int dir) } sort_slide_positions(&p1, &p2); - o1 = pos_trail_to_offset(e->cursor_frame, p1.para, p1.run, p1.pos, p1.trail); - o2 = pos_trail_to_offset(e->cursor_frame, p2.para, p1.run, p2.pos, p2.trail); + o1 = slide_pos_trail_to_offset(e->cursor_frame, p1.para, p1.pos, p1.trail); + o2 = slide_pos_trail_to_offset(e->cursor_frame, p2.para, p2.pos, p2.trail); slide_item_delete_text(e->cursor_frame, p1.para, o1, p2.para, o2); e->cpos = p1; - gtksv_unset_selection(e); - - pango_layout_set_text(e->cursor_frame->paras[e->cpos.para].layout, - e->cursor_frame->paras[e->cpos.para].text, -1); + gtksv_unset_selection(e); gtksv_emit_change_sig(e); gtksv_redraw(e); -#endif } |