diff options
author | TingPing <tingping@tingping.se> | 2013-10-01 13:11:59 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2013-10-03 16:23:46 -0400 |
commit | 67a488033bb5a003f34d7d93be5fdc64ab3e4927 (patch) | |
tree | d4c5c3b63f567600e14da736ea4af25c8ddf3d80 /src | |
parent | f6dd61cb024d34df477db55edf8fc2f560a49480 (diff) |
libsexy: Don't mark nicks spelled incorrect
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-gtk/maingui.c | 16 |
1 files changed, 16 insertions, 0 deletions
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) |