[polari] entryArea: Spell check entry
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] entryArea: Spell check entry
- Date: Mon, 30 Jan 2017 22:53:19 +0000 (UTC)
commit 1455d214eef98874660bf0abbf63403280f487e6
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Jan 30 17:03:14 2017 +0100
entryArea: Spell check entry
Gspell recently gained GtkEntry support, so we finally have a simple
standard way to add spelling support.
https://bugzilla.gnome.org/show_bug.cgi?id=709956
configure.ac | 1 +
org.gnome.Polari.json | 9 +++++++++
src/entryArea.js | 4 ++++
3 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 503585a..df2445c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,7 @@ AX_CHECK_GIRS_GJS([GdkPixbuf], [2.0])
AX_CHECK_GIR_SYMBOLS_GJS([Gio], [2.0], [Application.send_notification])
AX_CHECK_GIR_SYMBOLS_GJS([GLib], [2.0], [log_variant])
AX_CHECK_GIRS_GJS([GObject], [2.0])
+AX_CHECK_GIR_SYMBOLS_GJS([Gspell], [1], [Entry])
AX_CHECK_GIR_SYMBOLS_GJS([Gtk], [3.0], [ScrolledWindow.set_propagate_natural_width])
AX_CHECK_GIRS_GJS([Pango], [1.0])
AX_CHECK_GIRS_GJS([PangoCairo], [1.0])
diff --git a/org.gnome.Polari.json b/org.gnome.Polari.json
index 81a1522..14ceb9b 100644
--- a/org.gnome.Polari.json
+++ b/org.gnome.Polari.json
@@ -72,6 +72,15 @@
]
},
{
+ "name": "gspell",
+ "sources": [
+ {
+ "type": "git",
+ "url": "git://git.gnome.org/gspell"
+ }
+ ]
+ },
+ {
"name": "polari",
"sources": [
{
diff --git a/src/entryArea.js b/src/entryArea.js
index f1ebeac..9e77ecd 100644
--- a/src/entryArea.js
+++ b/src/entryArea.js
@@ -3,6 +3,7 @@ const GdkPixbuf = imports.gi.GdkPixbuf;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
+const Gspell = imports.gi.Gspell;
const Gtk = imports.gi.Gtk;
const ChatView = imports.chatView;
@@ -34,6 +35,9 @@ const ChatEntry = new Lang.Class({
PasteManager.DropTargetIface.addTargets(this, this);
+ let spellEntry = Gspell.Entry.get_from_gtk_entry(this);
+ spellEntry.basic_setup();
+
this._useDefaultHandler = false;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]