[gnumeric] Introspection fixes.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Introspection fixes.
- Date: Fri, 18 May 2018 14:27:55 +0000 (UTC)
commit c95e038e567196d968c2477b05e3f0173df169e4
Author: Morten Welinder <terra gnome org>
Date: Fri May 18 10:26:49 2018 -0400
Introspection fixes.
Don't define class as typedefs of their parent class. While that works,
it makes introspection (and gcc for that matter) see them as identical.
src/gnm-cell-combo.h | 5 ++++-
src/sheet-control-gui-priv.h | 5 ++++-
src/sheet-object-widget-impl.h | 9 +++++++--
src/sheet-view.h | 4 +++-
src/widgets/gnumeric-dashed-canvas-line.c | 12 ++++++------
src/widgets/gnumeric-dashed-canvas-line.h | 13 ++++++++-----
6 files changed, 32 insertions(+), 16 deletions(-)
---
diff --git a/src/gnm-cell-combo.h b/src/gnm-cell-combo.h
index c34b689..284553c 100644
--- a/src/gnm-cell-combo.h
+++ b/src/gnm-cell-combo.h
@@ -10,7 +10,10 @@ typedef struct {
SheetView *sv;
} GnmCellCombo;
-typedef SheetObjectClass GnmCellComboClass;
+
+typedef struct {
+ SheetObjectClass parent_class;
+} GnmCellComboClass;
#define GNM_CELL_COMBO_TYPE (gnm_cell_combo_get_type ())
#define GNM_CELL_COMBO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNM_CELL_COMBO_TYPE, GnmCellCombo))
diff --git a/src/sheet-control-gui-priv.h b/src/sheet-control-gui-priv.h
index fe72982..8fa7b6f 100644
--- a/src/sheet-control-gui-priv.h
+++ b/src/sheet-control-gui-priv.h
@@ -67,7 +67,10 @@ struct _SheetControlGUI {
SCGUIMoveFunc handler;
} delayedMovement;
};
-typedef SheetControlClass SheetControlGUIClass;
+
+typedef struct {
+ SheetControlClass parent_class;
+} SheetControlGUIClass;
/* SCG virtual methods called directly from the GUI layer*/
void scg_adjust_preferences (SheetControlGUI *scg);
diff --git a/src/sheet-object-widget-impl.h b/src/sheet-object-widget-impl.h
index 87fdefd..cdfdad6 100644
--- a/src/sheet-object-widget-impl.h
+++ b/src/sheet-object-widget-impl.h
@@ -6,8 +6,13 @@
G_BEGIN_DECLS
-typedef SheetObjectView SOWidgetView;
-typedef SheetObjectViewClass SOWidgetViewClass;
+typedef struct {
+ SheetObjectView parent;
+} SOWidgetView;
+
+typedef struct {
+ SheetObjectViewClass parent_class;
+} SOWidgetViewClass;
G_END_DECLS
diff --git a/src/sheet-view.h b/src/sheet-view.h
index 35af18b..cff2a38 100644
--- a/src/sheet-view.h
+++ b/src/sheet-view.h
@@ -63,7 +63,9 @@ struct _SheetView {
guint auto_expr_timer;
};
-typedef GObjectClass SheetViewClass;
+typedef struct {
+ GObjectClass parent_class;
+} SheetViewClass;
#define GNM_SHEET_VIEW_TYPE (gnm_sheet_view_get_type ())
#define GNM_SHEET_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNM_SHEET_VIEW_TYPE, SheetView))
diff --git a/src/widgets/gnumeric-dashed-canvas-line.c b/src/widgets/gnumeric-dashed-canvas-line.c
index e687ca7..bddca3f 100644
--- a/src/widgets/gnumeric-dashed-canvas-line.c
+++ b/src/widgets/gnumeric-dashed-canvas-line.c
@@ -18,7 +18,7 @@ static GocItemClass *parent_class;
static void gnumeric_dashed_canvas_line_draw (GocItem const *item,
cairo_t *cr);
-static GnumericDashedCanvasLineClass *gnumeric_dashed_canvas_line_class;
+static GnmDashedCanvasLineClass *gnumeric_dashed_canvas_line_class;
static inline double
hypothenuse (double xlength, double ylength)
@@ -142,7 +142,7 @@ double_line_draw (GocItem const *item, GnmStyleBorderType const i, cairo_t *cr)
static void
gnumeric_dashed_canvas_line_draw (GocItem const *item, cairo_t *cr)
{
- GnumericDashedCanvasLine *line = GNM_DASHED_CANVAS_LINE (item);
+ GnmDashedCanvasLine *line = GNM_DASHED_CANVAS_LINE (item);
if (line->dash_style_index == GNM_STYLE_BORDER_DOUBLE)
double_line_draw (item, line->dash_style_index, cr);
@@ -162,7 +162,7 @@ gnumeric_dashed_canvas_line_update_bounds (GocItem *item)
}
static void
-gnumeric_dashed_canvas_line_class_init (GnumericDashedCanvasLineClass *klass)
+gnumeric_dashed_canvas_line_class_init (GnmDashedCanvasLineClass *klass)
{
GocItemClass *item_class;
@@ -176,17 +176,17 @@ gnumeric_dashed_canvas_line_class_init (GnumericDashedCanvasLineClass *klass)
}
static void
-gnumeric_dashed_canvas_line_init (GnumericDashedCanvasLine *line)
+gnumeric_dashed_canvas_line_init (GnmDashedCanvasLine *line)
{
line->dash_style_index = GNM_STYLE_BORDER_THIN;
}
-GSF_CLASS (GnumericDashedCanvasLine, gnumeric_dashed_canvas_line,
+GSF_CLASS (GnmDashedCanvasLine, gnumeric_dashed_canvas_line,
gnumeric_dashed_canvas_line_class_init,
gnumeric_dashed_canvas_line_init, GOC_TYPE_LINE)
void
-gnumeric_dashed_canvas_line_set_dash_index (GnumericDashedCanvasLine *line,
+gnumeric_dashed_canvas_line_set_dash_index (GnmDashedCanvasLine *line,
GnmStyleBorderType const indx)
{
gint const width = gnm_style_border_get_width (indx);
diff --git a/src/widgets/gnumeric-dashed-canvas-line.h b/src/widgets/gnumeric-dashed-canvas-line.h
index e6e509a..11bd3a9 100644
--- a/src/widgets/gnumeric-dashed-canvas-line.h
+++ b/src/widgets/gnumeric-dashed-canvas-line.h
@@ -8,22 +8,25 @@
#define GNM_DASHED_CANVAS_LINE_TYPE\
(gnumeric_dashed_canvas_line_get_type ())
#define GNM_DASHED_CANVAS_LINE(obj)\
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNM_DASHED_CANVAS_LINE_TYPE, GnumericDashedCanvasLine))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNM_DASHED_CANVAS_LINE_TYPE, GnmDashedCanvasLine))
#define GNM_IS_DASHED_CANVAS_LINE(obj)\
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNM_DASHED_CANVAS_LINE_TYPE))
-typedef struct _GnumericDashedCanvasLine GnumericDashedCanvasLine;
-typedef GocLineClass GnumericDashedCanvasLineClass;
+typedef struct GnmDashedCanvasLine_ GnmDashedCanvasLine;
-struct _GnumericDashedCanvasLine {
+typedef struct {
+ GocLineClass parent_class;
+} GnmDashedCanvasLineClass;
+
+struct GnmDashedCanvasLine_ {
GocLine line;
/* Public : */
GnmStyleBorderType dash_style_index;
};
-void gnumeric_dashed_canvas_line_set_dash_index (GnumericDashedCanvasLine *line,
+void gnumeric_dashed_canvas_line_set_dash_index (GnmDashedCanvasLine *line,
GnmStyleBorderType const indx);
/* Standard Gtk function */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]