[gspell/wip/inline-checker: 2/3] Revert "Make GspellInlineCheckerText private"
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gspell/wip/inline-checker: 2/3] Revert "Make GspellInlineCheckerText private"
- Date: Thu, 7 Jan 2016 10:31:29 +0000 (UTC)
commit 82900d9cc53f62c2649a805282a4bdc4430b2d8c
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Jan 7 10:21:54 2016 +0100
Revert "Make GspellInlineCheckerText private"
This reverts commit d02a2b4a9ff060ccba22520aa4354d09f52829bd.
The new plan is to make again the class public.
gspell/Makefile.am | 4 +-
gspell/gspell-inline-checker-text.c | 42 +++++++++++++++++-----------------
gspell/gspell-inline-checker-text.h | 16 ++++++++-----
gspell/gspell-text-view.c | 2 +-
gspell/gspell.h | 1 +
5 files changed, 35 insertions(+), 30 deletions(-)
---
diff --git a/gspell/Makefile.am b/gspell/Makefile.am
index b717bca..31f21c4 100644
--- a/gspell/Makefile.am
+++ b/gspell/Makefile.am
@@ -19,6 +19,7 @@ gspell_public_headers = \
gspell.h \
gspell-checker.h \
gspell-checker-dialog.h \
+ gspell-inline-checker-text.h \
gspell-language.h \
gspell-language-chooser.h \
gspell-language-chooser-button.h \
@@ -31,6 +32,7 @@ gspell_public_headers = \
gspell_public_c_files = \
gspell-checker.c \
gspell-checker-dialog.c \
+ gspell-inline-checker-text.c \
gspell-language.c \
gspell-language-chooser.c \
gspell-language-chooser-button.c \
@@ -43,7 +45,6 @@ gspell_public_c_files = \
gspell_private_headers = \
gconstructor.h \
gspell-buffer-notifier.h \
- gspell-inline-checker-text.h \
gspell-inline-checker-text-buffer.h \
gspell-utils.h \
gtktextregion.h
@@ -51,7 +52,6 @@ gspell_private_headers = \
gspell_private_c_files = \
gspell-buffer-notifier.c \
gspell-init.c \
- gspell-inline-checker-text.c \
gspell-inline-checker-text-buffer.c \
gspell-utils.c \
gtktextregion.c
diff --git a/gspell/gspell-inline-checker-text.c b/gspell/gspell-inline-checker-text.c
index ce8ed11..a09c20d 100644
--- a/gspell/gspell-inline-checker-text.c
+++ b/gspell/gspell-inline-checker-text.c
@@ -36,7 +36,7 @@ enum
PROP_VIEW,
};
-G_DEFINE_TYPE_WITH_PRIVATE (GspellInlineCheckerText, _gspell_inline_checker_text, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GspellInlineCheckerText, gspell_inline_checker_text, G_TYPE_OBJECT)
static void
update_inline_checker (GspellInlineCheckerText *self)
@@ -44,7 +44,7 @@ update_inline_checker (GspellInlineCheckerText *self)
GspellInlineCheckerTextPrivate *priv;
GtkTextBuffer *buffer;
- priv = _gspell_inline_checker_text_get_instance_private (self);
+ priv = gspell_inline_checker_text_get_instance_private (self);
if (priv->view == NULL)
{
@@ -80,7 +80,7 @@ set_view (GspellInlineCheckerText *self,
g_return_if_fail (GTK_IS_TEXT_VIEW (view));
- priv = _gspell_inline_checker_text_get_instance_private (self);
+ priv = gspell_inline_checker_text_get_instance_private (self);
g_assert (priv->view == NULL);
g_assert (priv->inline_checker == NULL);
@@ -97,14 +97,14 @@ set_view (GspellInlineCheckerText *self,
}
static void
-_gspell_inline_checker_text_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+gspell_inline_checker_text_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GspellInlineCheckerTextPrivate *priv;
- priv = _gspell_inline_checker_text_get_instance_private (GSPELL_INLINE_CHECKER_TEXT (object));
+ priv = gspell_inline_checker_text_get_instance_private (GSPELL_INLINE_CHECKER_TEXT (object));
switch (prop_id)
{
@@ -119,10 +119,10 @@ _gspell_inline_checker_text_get_property (GObject *object,
}
static void
-_gspell_inline_checker_text_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+gspell_inline_checker_text_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GspellInlineCheckerText *self = GSPELL_INLINE_CHECKER_TEXT (object);
@@ -139,11 +139,11 @@ _gspell_inline_checker_text_set_property (GObject *object,
}
static void
-_gspell_inline_checker_text_dispose (GObject *object)
+gspell_inline_checker_text_dispose (GObject *object)
{
GspellInlineCheckerTextPrivate *priv;
- priv = _gspell_inline_checker_text_get_instance_private (GSPELL_INLINE_CHECKER_TEXT (object));
+ priv = gspell_inline_checker_text_get_instance_private (GSPELL_INLINE_CHECKER_TEXT (object));
if (priv->view != NULL && priv->inline_checker != NULL)
{
@@ -154,17 +154,17 @@ _gspell_inline_checker_text_dispose (GObject *object)
priv->view = NULL;
g_clear_object (&priv->inline_checker);
- G_OBJECT_CLASS (_gspell_inline_checker_text_parent_class)->dispose (object);
+ G_OBJECT_CLASS (gspell_inline_checker_text_parent_class)->dispose (object);
}
static void
-_gspell_inline_checker_text_class_init (GspellInlineCheckerTextClass *klass)
+gspell_inline_checker_text_class_init (GspellInlineCheckerTextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->get_property = _gspell_inline_checker_text_get_property;
- object_class->set_property = _gspell_inline_checker_text_set_property;
- object_class->dispose = _gspell_inline_checker_text_dispose;
+ object_class->get_property = gspell_inline_checker_text_get_property;
+ object_class->set_property = gspell_inline_checker_text_set_property;
+ object_class->dispose = gspell_inline_checker_text_dispose;
g_object_class_install_property (object_class,
PROP_VIEW,
@@ -178,12 +178,12 @@ _gspell_inline_checker_text_class_init (GspellInlineCheckerTextClass *klass)
}
static void
-_gspell_inline_checker_text_init (GspellInlineCheckerText *self)
+gspell_inline_checker_text_init (GspellInlineCheckerText *self)
{
}
GspellInlineCheckerText *
-_gspell_inline_checker_text_new (GtkTextView *view)
+gspell_inline_checker_text_new (GtkTextView *view)
{
g_return_val_if_fail (GTK_IS_TEXT_VIEW (view), NULL);
diff --git a/gspell/gspell-inline-checker-text.h b/gspell/gspell-inline-checker-text.h
index b069c76..bcaaf16 100644
--- a/gspell/gspell-inline-checker-text.h
+++ b/gspell/gspell-inline-checker-text.h
@@ -20,24 +20,28 @@
#ifndef __GSPELL_INLINE_CHECKER_TEXT_H__
#define __GSPELL_INLINE_CHECKER_TEXT_H__
+#if !defined (__GSPELL_H_INSIDE__) && !defined (GSPELL_COMPILATION)
+#error "Only <gspell/gspell.h> can be included directly."
+#endif
+
#include <gtk/gtk.h>
G_BEGIN_DECLS
-#define GSPELL_TYPE_INLINE_CHECKER_TEXT (_gspell_inline_checker_text_get_type ())
-
-G_GNUC_INTERNAL
-G_DECLARE_DERIVABLE_TYPE (GspellInlineCheckerText, _gspell_inline_checker_text,
+#define GSPELL_TYPE_INLINE_CHECKER_TEXT (gspell_inline_checker_text_get_type ())
+G_DECLARE_DERIVABLE_TYPE (GspellInlineCheckerText, gspell_inline_checker_text,
GSPELL, INLINE_CHECKER_TEXT,
GObject)
struct _GspellInlineCheckerTextClass
{
GObjectClass parent_class;
+
+ /* Padding for future expansion */
+ gpointer padding[8];
};
-G_GNUC_INTERNAL
-GspellInlineCheckerText * _gspell_inline_checker_text_new (GtkTextView *view);
+GspellInlineCheckerText * gspell_inline_checker_text_new (GtkTextView *view);
G_END_DECLS
diff --git a/gspell/gspell-text-view.c b/gspell/gspell-text-view.c
index faa9bd2..7540403 100644
--- a/gspell/gspell-text-view.c
+++ b/gspell/gspell-text-view.c
@@ -66,7 +66,7 @@ gspell_text_view_set_inline_checking (GtkTextView *view,
g_object_set_data_full (G_OBJECT (view),
INLINE_CHECKER_KEY,
- _gspell_inline_checker_text_new (view),
+ gspell_inline_checker_text_new (view),
g_object_unref);
}
else
diff --git a/gspell/gspell.h b/gspell/gspell.h
index e031803..08acd1e 100644
--- a/gspell/gspell.h
+++ b/gspell/gspell.h
@@ -24,6 +24,7 @@
#include <gspell/gspell-checker.h>
#include <gspell/gspell-checker-dialog.h>
+#include <gspell/gspell-inline-checker-text.h>
#include <gspell/gspell-language.h>
#include <gspell/gspell-language-chooser.h>
#include <gspell/gspell-language-chooser-button.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]