Use Gtk.SourceView over Gtk.TextView to aid writing longer posts.

Right now this mostly just includes (most importantly) undo/redo,
and less importantly smarter deletion and keyboard navigation.
This commit is contained in:
Adrian Cochrane 2018-08-25 13:43:00 +12:00
parent b82cbb7214
commit 2b996d5a47
3 changed files with 3 additions and 2 deletions

1
debian/control vendored
View File

@ -5,6 +5,7 @@ Maintainer: Write.as <hello@write.as>
Build-Depends: meson,
debhelper (>= 9),
libgtk-3-dev,
libgtksourceview-3.0-dev,
valac (>= 0.36)
Standards-Version: 3.9.3

View File

@ -4,6 +4,6 @@ executable('writeas-gtk',
c_args: ['-include', 'config.h'],
link_args: '-lm',
dependencies: [dependency('gtk+-3.0')],
dependencies: [dependency('gtk+-3.0'), dependency('gtksourceview-3.0')],
install: true
)

View File

@ -39,7 +39,7 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow {
build_keyboard_shortcuts();
var scrolled = new Gtk.ScrolledWindow(null, null);
canvas = new Gtk.TextView();
canvas = new Gtk.SourceView();
canvas.wrap_mode = Gtk.WrapMode.WORD_CHAR;
scrolled.add(canvas);
add(scrolled);