[gedit/wip/spell-checking: 3/3] spell-plugin: misc clean-ups
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/spell-checking: 3/3] spell-plugin: misc clean-ups
- Date: Sat, 1 Aug 2015 11:56:52 +0000 (UTC)
commit 5c4a3ee2a9110bb953ba686580335e0022d60124
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Aug 1 13:45:15 2015 +0200
spell-plugin: misc clean-ups
plugins/spell/gedit-spell-plugin.c | 34 ++++++++++++++++++++++++++--------
1 files changed, 26 insertions(+), 8 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-plugin.c b/plugins/spell/gedit-spell-plugin.c
index ce364f8..746d87f 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -893,8 +893,10 @@ spell_cb (GSimpleAction *action,
GeditDocument *doc;
GeditSpellChecker *checker;
GtkWidget *dialog;
- GtkTextIter start, end;
- gint word_start_offset, word_end_offset;
+ GtkTextIter start;
+ GtkTextIter end;
+ gint word_start_offset;
+ gint word_end_offset;
gchar *word;
gedit_debug (DEBUG_PLUGINS);
@@ -905,7 +907,6 @@ spell_cb (GSimpleAction *action,
g_return_if_fail (view != NULL);
doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
- g_return_if_fail (doc != NULL);
checker = get_spell_checker_from_document (doc);
g_return_if_fail (checker != NULL);
@@ -950,13 +951,30 @@ spell_cb (GSimpleAction *action,
dialog = gedit_spell_checker_dialog_new (GTK_WINDOW (priv->window), checker);
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- g_signal_connect (dialog, "ignore", G_CALLBACK (ignore_cb), view);
- g_signal_connect (dialog, "ignore_all", G_CALLBACK (ignore_cb), view);
+ g_signal_connect (dialog,
+ "ignore",
+ G_CALLBACK (ignore_cb),
+ view);
+
+ g_signal_connect (dialog,
+ "ignore-all",
+ G_CALLBACK (ignore_cb),
+ view);
- g_signal_connect (dialog, "change", G_CALLBACK (change_cb), view);
- g_signal_connect (dialog, "change_all", G_CALLBACK (change_all_cb), view);
+ g_signal_connect (dialog,
+ "change",
+ G_CALLBACK (change_cb),
+ view);
- g_signal_connect (dialog, "add_word_to_personal", G_CALLBACK (add_word_cb), view);
+ g_signal_connect (dialog,
+ "change-all",
+ G_CALLBACK (change_all_cb),
+ view);
+
+ g_signal_connect (dialog,
+ "add-word-to-personal",
+ G_CALLBACK (add_word_cb),
+ view);
gedit_spell_checker_dialog_set_misspelled_word (GEDIT_SPELL_CHECKER_DIALOG (dialog), word);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]