[gspell] checker-dialog: add get_spell_navigator()



commit ce17798108a8562d1a136a17fb7fb53f5105e314
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Mar 12 16:24:38 2016 +0100

    checker-dialog: add get_spell_navigator()

 docs/reference/gspell-1.0-sections.txt |    1 +
 gspell/gspell-checker-dialog.c         |   23 +++++++++++++++++++----
 gspell/gspell-checker-dialog.h         |    6 ++++--
 3 files changed, 24 insertions(+), 6 deletions(-)
---
diff --git a/docs/reference/gspell-1.0-sections.txt b/docs/reference/gspell-1.0-sections.txt
index 4235727..a2a2f56 100644
--- a/docs/reference/gspell-1.0-sections.txt
+++ b/docs/reference/gspell-1.0-sections.txt
@@ -67,6 +67,7 @@ GspellTextViewClass
 <TITLE>GspellCheckerDialog</TITLE>
 GspellCheckerDialog
 gspell_checker_dialog_new
+gspell_checker_dialog_get_spell_navigator
 <SUBSECTION Standard>
 GSPELL_TYPE_CHECKER_DIALOG
 </SECTION>
diff --git a/gspell/gspell-checker-dialog.c b/gspell/gspell-checker-dialog.c
index 4e49059..9ccbef7 100644
--- a/gspell/gspell-checker-dialog.c
+++ b/gspell/gspell-checker-dialog.c
@@ -290,14 +290,12 @@ gspell_checker_dialog_get_property (GObject    *object,
                                    GValue     *value,
                                    GParamSpec *pspec)
 {
-       GspellCheckerDialogPrivate *priv;
-
-       priv = gspell_checker_dialog_get_instance_private (GSPELL_CHECKER_DIALOG (object));
+       GspellCheckerDialog *dialog = GSPELL_CHECKER_DIALOG (object);
 
        switch (prop_id)
        {
                case PROP_SPELL_NAVIGATOR:
-                       g_value_set_object (value, priv->navigator);
+                       g_value_set_object (value, gspell_checker_dialog_get_spell_navigator (dialog));
                        break;
 
                default:
@@ -719,4 +717,21 @@ gspell_checker_dialog_new (GtkWindow       *parent,
                             NULL);
 }
 
+/**
+ * gspell_checker_dialog_get_spell_navigator:
+ * @dialog: a #GspellCheckerDialog.
+ *
+ * Returns: (transfer none): the #GspellNavigator used.
+ */
+GspellNavigator *
+gspell_checker_dialog_get_spell_navigator (GspellCheckerDialog *dialog)
+{
+       GspellCheckerDialogPrivate *priv;
+
+       g_return_val_if_fail (GSPELL_IS_CHECKER_DIALOG (dialog), NULL);
+
+       priv = gspell_checker_dialog_get_instance_private (dialog);
+       return priv->navigator;
+}
+
 /* ex:set ts=8 noet: */
diff --git a/gspell/gspell-checker-dialog.h b/gspell/gspell-checker-dialog.h
index a77abbf..92e1480 100644
--- a/gspell/gspell-checker-dialog.h
+++ b/gspell/gspell-checker-dialog.h
@@ -43,8 +43,10 @@ struct _GspellCheckerDialogClass
        gpointer padding[8];
 };
 
-GtkWidget *    gspell_checker_dialog_new               (GtkWindow       *parent,
-                                                        GspellNavigator *navigator);
+GtkWidget *            gspell_checker_dialog_new                       (GtkWindow       *parent,
+                                                                        GspellNavigator *navigator);
+
+GspellNavigator *      gspell_checker_dialog_get_spell_navigator       (GspellCheckerDialog *dialog);
 
 G_END_DECLS
 


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