[gspell] docs: explain why GspellNavigator requires GInitiallyUnowned



commit 423d9fe202d7b9e1bc8cbd6c98761841c10724f8
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Oct 29 11:17:48 2017 +0100

    docs: explain why GspellNavigator requires GInitiallyUnowned
    
    The gnome-builder developer(s) didn't like that GspellNavigator requires
    GInitiallyUnowned, but there is a good reason behind that design
    decision. If the fact that GspellNavigator requires GInitiallyUnowned is
    not convenient in the code of gnome-builder, it means that the interface
    is not used correctly.

 gspell/gspell-navigator.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gspell/gspell-navigator.c b/gspell/gspell-navigator.c
index 9b5b5de..f7ead7c 100644
--- a/gspell/gspell-navigator.c
+++ b/gspell/gspell-navigator.c
@@ -1,7 +1,7 @@
 /*
  * This file is part of gspell, a spell-checking library.
  *
- * Copyright 2015, 2016 - Sébastien Wilmet <swilmet gnome org>
+ * Copyright 2015, 2016, 2017 - Sébastien Wilmet <swilmet gnome org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -33,14 +33,20 @@
  * and correct the mistakes.
  *
  * It is used by widgets like #GspellCheckerDialog. The purpose is to
- * spell check a document one word at a time.
+ * spell-check a document one word at a time.
  *
  * It is not mandatory to navigate through all the text. Depending on the
- * context, an implementation could spell check only the current page, or the
+ * context, an implementation could spell-check only the current page, or the
  * selection, etc.
  *
  * For #GtkTextView, see the #GspellNavigatorTextView implementation of this
  * interface.
+ *
+ * The #GspellNavigator interface requires #GInitiallyUnowned because a
+ * #GspellNavigator object is meant to be passed as an argument to a #GtkWidget
+ * constructor, for example gspell_checker_dialog_new(). This permits to
+ * decouple the frontend from the backend, making the #GtkWidget re-usable for
+ * different #GspellNavigator's.
  */
 
 G_DEFINE_INTERFACE (GspellNavigator, gspell_navigator, G_TYPE_INITIALLY_UNOWNED)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]