Getting colder with our second freeze... it's 3.31.91 release day and string freeze, upload a tarball and lock those strings 🏂

Commit b1c1c8a4 authored by Cosimo Cecchi's avatar Cosimo Cecchi

sushi-font-widget: sync from upstream sushi

Remove deprecated g_type_class_add_private()
parent b53706d9
......@@ -42,7 +42,7 @@ enum {
NUM_SIGNALS
};
struct _SushiFontWidgetPrivate {
typedef struct {
gchar *uri;
gint face_index;
......@@ -57,12 +57,19 @@ struct _SushiFontWidgetPrivate {
gchar *sample_string;
gchar *font_name;
} SushiFontWidgetPrivate;
struct _SushiFontWidget {
GtkDrawingArea parent_instance;
SushiFontWidgetPrivate *priv;
};
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
static guint signals[NUM_SIGNALS] = { 0, };
G_DEFINE_TYPE (SushiFontWidget, sushi_font_widget, GTK_TYPE_DRAWING_AREA);
G_DEFINE_TYPE_WITH_PRIVATE (SushiFontWidget, sushi_font_widget,
GTK_TYPE_DRAWING_AREA)
#define SURFACE_SIZE 4
#define SECTION_SPACING 16
......@@ -826,7 +833,6 @@ sushi_font_widget_class_init (SushiFontWidgetClass *klass)
G_TYPE_NONE, 1, G_TYPE_STRING);
g_object_class_install_properties (oclass, NUM_PROPERTIES, properties);
g_type_class_add_private (klass, sizeof (SushiFontWidgetPrivate));
}
SushiFontWidget *
......
......@@ -33,30 +33,11 @@
G_BEGIN_DECLS
#define SUSHI_TYPE_FONT_WIDGET (sushi_font_widget_get_type ())
#define SUSHI_FONT_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SUSHI_TYPE_FONT_WIDGET, SushiFontWidget))
#define SUSHI_IS_FONT_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SUSHI_TYPE_FONT_WIDGET))
#define SUSHI_FONT_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SUSHI_TYPE_FONT_WIDGET, SushiFontWidgetClass))
#define SUSHI_IS_FONT_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SUSHI_TYPE_FONT_WIDGET))
#define SUSHI_FONT_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SUSHI_TYPE_FONT_WIDGET, SushiFontWidgetClass))
#define SUSHI_TYPE_FONT_WIDGET (sushi_font_widget_get_type ())
typedef struct _SushiFontWidget SushiFontWidget;
typedef struct _SushiFontWidgetPrivate SushiFontWidgetPrivate;
typedef struct _SushiFontWidgetClass SushiFontWidgetClass;
struct _SushiFontWidget
{
GtkDrawingArea parent_instance;
SushiFontWidgetPrivate *priv;
};
struct _SushiFontWidgetClass
{
GtkDrawingAreaClass parent_class;
};
GType sushi_font_widget_get_type (void) G_GNUC_CONST;
G_DECLARE_FINAL_TYPE (SushiFontWidget, sushi_font_widget,
SUSHI, FONT_WIDGET,
GtkDrawingArea)
SushiFontWidget *sushi_font_widget_new (const gchar *uri, gint face_index);
......
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