Commit 4cb4ed9c authored by Sébastien Wilmet's avatar Sébastien Wilmet

text-view: add get_view()

parent ce177981
......@@ -55,6 +55,7 @@ GSPELL_TYPE_TEXT_BUFFER
<TITLE>GspellTextView</TITLE>
GspellTextView
gspell_text_view_get_from_gtk_text_view
gspell_text_view_get_view
gspell_text_view_get_inline_spell_checking
gspell_text_view_set_inline_spell_checking
<SUBSECTION Standard>
......
......@@ -149,16 +149,12 @@ gspell_text_view_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
GspellTextView *gspell_view;
GspellTextViewPrivate *priv;
gspell_view = GSPELL_TEXT_VIEW (object);
priv = gspell_text_view_get_instance_private (gspell_view);
GspellTextView *gspell_view = GSPELL_TEXT_VIEW (object);
switch (prop_id)
{
case PROP_VIEW:
g_value_set_object (value, priv->view);
g_value_set_object (value, gspell_text_view_get_view (gspell_view));
break;
case PROP_INLINE_SPELL_CHECKING:
......@@ -292,6 +288,23 @@ gspell_text_view_get_from_gtk_text_view (GtkTextView *gtk_view)
return gspell_view;
}
/**
* gspell_text_view_get_view:
* @gspell_view: a #GspellTextView.
*
* Returns: (transfer none): the #GtkTextView of @gspell_view.
*/
GtkTextView *
gspell_text_view_get_view (GspellTextView *gspell_view)
{
GspellTextViewPrivate *priv;
g_return_val_if_fail (GSPELL_IS_TEXT_VIEW (gspell_view), NULL);
priv = gspell_text_view_get_instance_private (gspell_view);
return priv->view;
}
/**
* gspell_text_view_get_inline_spell_checking:
* @gspell_view: a #GspellTextView.
......@@ -306,7 +319,6 @@ gspell_text_view_get_inline_spell_checking (GspellTextView *gspell_view)
g_return_val_if_fail (GSPELL_IS_TEXT_VIEW (gspell_view), FALSE);
priv = gspell_text_view_get_instance_private (gspell_view);
return priv->inline_checker != NULL;
}
......
......@@ -43,6 +43,8 @@ struct _GspellTextViewClass
GspellTextView * gspell_text_view_get_from_gtk_text_view (GtkTextView *gtk_view);
GtkTextView * gspell_text_view_get_view (GspellTextView *gspell_view);
gboolean gspell_text_view_get_inline_spell_checking (GspellTextView *gspell_view);
void gspell_text_view_set_inline_spell_checking (GspellTextView *gspell_view,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment