From 67a488033bb5a003f34d7d93be5fdc64ab3e4927 Mon Sep 17 00:00:00 2001 From: TingPing Date: Tue, 1 Oct 2013 13:11:59 -0400 Subject: libsexy: Don't mark nicks spelled incorrect --- src/fe-gtk/maingui.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index f064c7f7..fc5d032f 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -341,6 +341,20 @@ mg_inputbox_cb (GtkWidget *igad, session_gui *gui) free (cmd); } +static gboolean +mg_spellcheck_cb (SexySpellEntry *entry, gchar *word, gpointer data) +{ + /* This can cause freezes on long words, nicks arn't very long anyway. */ + if (strlen (word) > 20) + return TRUE; + + /* Ignore anything we think is a valid url */ + if (url_check_word (word) != 0) + return FALSE; + + return TRUE; +} + #if 0 static gboolean has_key (char *modes) @@ -2969,6 +2983,8 @@ mg_create_entry (session *sess, GtkWidget *box) G_CALLBACK (mg_inputbox_focus), gui); g_signal_connect (G_OBJECT (entry), "populate_popup", G_CALLBACK (mg_inputbox_rightclick), NULL); + g_signal_connect (G_OBJECT (entry), "word-check", + G_CALLBACK (mg_spellcheck_cb), NULL); gtk_widget_grab_focus (entry); if (prefs.hex_gui_input_style) -- cgit 1.4.1