/* math-history.c generated by valac 0.34.4, the Vala compiler
 * generated from math-history.vala, do not modify */

/*
 * Copyright (C) 2014 ELITA ASTRID ANGELINA LOBO
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
 * license.
*/

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include "libcalculator.h"
#include <gdk/gdk.h>


#define TYPE_HISTORY_VIEW (history_view_get_type ())
#define HISTORY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HISTORY_VIEW, HistoryView))
#define HISTORY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HISTORY_VIEW, HistoryViewClass))
#define IS_HISTORY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HISTORY_VIEW))
#define IS_HISTORY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HISTORY_VIEW))
#define HISTORY_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HISTORY_VIEW, HistoryViewClass))

typedef struct _HistoryView HistoryView;
typedef struct _HistoryViewClass HistoryViewClass;
typedef struct _HistoryViewPrivate HistoryViewPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_HISTORY_ENTRY (history_entry_get_type ())
#define HISTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HISTORY_ENTRY, HistoryEntry))
#define HISTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HISTORY_ENTRY, HistoryEntryClass))
#define IS_HISTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HISTORY_ENTRY))
#define IS_HISTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HISTORY_ENTRY))
#define HISTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HISTORY_ENTRY, HistoryEntryClass))

typedef struct _HistoryEntry HistoryEntry;
typedef struct _HistoryEntryClass HistoryEntryClass;
typedef struct _HistoryEntryPrivate HistoryEntryPrivate;

struct _HistoryView {
	GtkScrolledWindow parent_instance;
	HistoryViewPrivate * priv;
};

struct _HistoryViewClass {
	GtkScrolledWindowClass parent_class;
};

struct _HistoryViewPrivate {
	gint no_ofitems;
	gchar* last_answer;
	gchar* last_equation;
	Serializer* serializer_four;
	Serializer* serializer_nine;
	GtkListBox* listbox;
};

struct _HistoryEntry {
	GtkListBoxRow parent_instance;
	HistoryEntryPrivate * priv;
};

struct _HistoryEntryClass {
	GtkListBoxRowClass parent_class;
};

struct _HistoryEntryPrivate {
	GtkLabel* equation_label;
	GtkLabel* answer_label;
};


static gpointer history_view_parent_class = NULL;
static gpointer history_entry_parent_class = NULL;

GType history_view_get_type (void) G_GNUC_CONST;
#define HISTORY_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_HISTORY_VIEW, HistoryViewPrivate))
enum  {
	HISTORY_VIEW_DUMMY_PROPERTY
};
void history_view_scroll_bottom (HistoryView* self);
static void _history_view_scroll_bottom_history_view_row_added (HistoryView* _sender, gpointer self);
void history_view_insert_entry (HistoryView* self, const gchar* equation, Number* answer, gint number_base, guint representation_base);
GType history_entry_get_type (void) G_GNUC_CONST;
HistoryEntry* history_entry_new (const gchar* equation, const gchar* answer_four_digits, const gchar* answer_nine_digits);
HistoryEntry* history_entry_construct (GType object_type, const gchar* equation, const gchar* answer_four_digits, const gchar* answer_nine_digits);
static void __lambda4_ (HistoryView* self, const gchar* ans);
static void ___lambda4__history_entry_answer_clicked (HistoryEntry* _sender, const gchar* ans, gpointer self);
static void __lambda5_ (HistoryView* self, const gchar* eq);
static void ___lambda5__history_entry_equation_clicked (HistoryEntry* _sender, const gchar* equation, gpointer self);
HistoryView* history_view_new (void);
HistoryView* history_view_construct (GType object_type);
static void history_view_finalize (GObject* obj);
#define HISTORY_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_HISTORY_ENTRY, HistoryEntryPrivate))
enum  {
	HISTORY_ENTRY_DUMMY_PROPERTY
};
gboolean history_entry_answer_clicked_cb (HistoryEntry* self, GtkWidget* widget, GdkEventButton* eventbutton);
static gboolean _history_entry_answer_clicked_cb_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static gboolean history_entry_equation_clicked_cb (HistoryEntry* self, GtkWidget* widget, GdkEventButton* eventbutton);
static gboolean _history_entry_equation_clicked_cb_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static void history_entry_finalize (GObject* obj);


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


void history_view_scroll_bottom (HistoryView* self) {
	GtkAdjustment* adjustment = NULL;
	GtkAdjustment* _tmp0_ = NULL;
	GtkAdjustment* _tmp1_ = NULL;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_scrolled_window_get_vadjustment ((GtkScrolledWindow*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	adjustment = _tmp1_;
	_tmp2_ = gtk_adjustment_get_upper (adjustment);
	_tmp3_ = gtk_adjustment_get_page_size (adjustment);
	gtk_adjustment_set_value (adjustment, _tmp2_ - _tmp3_);
	_g_object_unref0 (adjustment);
}


static void _history_view_scroll_bottom_history_view_row_added (HistoryView* _sender, gpointer self) {
	history_view_scroll_bottom ((HistoryView*) self);
}


static void __lambda4_ (HistoryView* self, const gchar* ans) {
	const gchar* _tmp0_ = NULL;
	g_return_if_fail (ans != NULL);
	_tmp0_ = ans;
	g_signal_emit_by_name (self, "answer-clicked", _tmp0_);
}


static void ___lambda4__history_entry_answer_clicked (HistoryEntry* _sender, const gchar* ans, gpointer self) {
	__lambda4_ ((HistoryView*) self, ans);
}


static void __lambda5_ (HistoryView* self, const gchar* eq) {
	const gchar* _tmp0_ = NULL;
	g_return_if_fail (eq != NULL);
	_tmp0_ = eq;
	g_signal_emit_by_name (self, "equation-clicked", _tmp0_);
}


static void ___lambda5__history_entry_equation_clicked (HistoryEntry* _sender, const gchar* equation, gpointer self) {
	__lambda5_ ((HistoryView*) self, equation);
}


void history_view_insert_entry (HistoryView* self, const gchar* equation, Number* answer, gint number_base, guint representation_base) {
	Serializer* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	Serializer* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	Serializer* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
	Serializer* _tmp6_ = NULL;
	guint _tmp7_ = 0U;
	gchar* answer_nine_digits = NULL;
	Serializer* _tmp8_ = NULL;
	Number* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* answer_four_digits = NULL;
	Serializer* _tmp11_ = NULL;
	Number* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gboolean _tmp14_ = FALSE;
	const gchar* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	HistoryEntry* entry = NULL;
	const gchar* _tmp19_ = NULL;
	const gchar* _tmp20_ = NULL;
	const gchar* _tmp21_ = NULL;
	HistoryEntry* _tmp22_ = NULL;
	GtkListBox* _tmp23_ = NULL;
	HistoryEntry* _tmp24_ = NULL;
	HistoryEntry* _tmp25_ = NULL;
	gint _tmp26_ = 0;
	HistoryEntry* _tmp27_ = NULL;
	HistoryEntry* _tmp28_ = NULL;
	const gchar* _tmp29_ = NULL;
	gchar* _tmp30_ = NULL;
	const gchar* _tmp31_ = NULL;
	gchar* _tmp32_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (equation != NULL);
	g_return_if_fail (answer != NULL);
	_tmp0_ = self->priv->serializer_four;
	_tmp1_ = number_base;
	serializer_set_base (_tmp0_, _tmp1_);
	_tmp2_ = self->priv->serializer_nine;
	_tmp3_ = number_base;
	serializer_set_base (_tmp2_, _tmp3_);
	_tmp4_ = self->priv->serializer_four;
	_tmp5_ = representation_base;
	serializer_set_representation_base (_tmp4_, _tmp5_);
	_tmp6_ = self->priv->serializer_nine;
	_tmp7_ = representation_base;
	serializer_set_representation_base (_tmp6_, _tmp7_);
	_tmp8_ = self->priv->serializer_nine;
	_tmp9_ = answer;
	_tmp10_ = serializer_to_string (_tmp8_, _tmp9_);
	answer_nine_digits = _tmp10_;
	_tmp11_ = self->priv->serializer_four;
	_tmp12_ = answer;
	_tmp13_ = serializer_to_string (_tmp11_, _tmp12_);
	answer_four_digits = _tmp13_;
	_tmp15_ = self->priv->last_answer;
	_tmp16_ = answer_nine_digits;
	if (g_strcmp0 (_tmp15_, _tmp16_) == 0) {
		const gchar* _tmp17_ = NULL;
		const gchar* _tmp18_ = NULL;
		_tmp17_ = self->priv->last_equation;
		_tmp18_ = equation;
		_tmp14_ = g_strcmp0 (_tmp17_, _tmp18_) == 0;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		_g_free0 (answer_four_digits);
		_g_free0 (answer_nine_digits);
		return;
	}
	_tmp19_ = equation;
	_tmp20_ = answer_four_digits;
	_tmp21_ = answer_nine_digits;
	_tmp22_ = history_entry_new (_tmp19_, _tmp20_, _tmp21_);
	g_object_ref_sink (_tmp22_);
	entry = _tmp22_;
	_tmp23_ = self->priv->listbox;
	_tmp24_ = entry;
	gtk_container_add ((GtkContainer*) _tmp23_, (GtkWidget*) _tmp24_);
	_tmp25_ = entry;
	gtk_widget_show ((GtkWidget*) _tmp25_);
	_tmp26_ = self->priv->no_ofitems;
	self->priv->no_ofitems = _tmp26_ + 1;
	_tmp27_ = entry;
	g_signal_connect_object (_tmp27_, "answer-clicked", (GCallback) ___lambda4__history_entry_answer_clicked, self, 0);
	_tmp28_ = entry;
	g_signal_connect_object (_tmp28_, "equation-clicked", (GCallback) ___lambda5__history_entry_equation_clicked, self, 0);
	_tmp29_ = answer_nine_digits;
	_tmp30_ = g_strdup (_tmp29_);
	_g_free0 (self->priv->last_answer);
	self->priv->last_answer = _tmp30_;
	_tmp31_ = equation;
	_tmp32_ = g_strdup (_tmp31_);
	_g_free0 (self->priv->last_equation);
	self->priv->last_equation = _tmp32_;
	g_signal_emit_by_name (self, "row-added");
	_g_object_unref0 (entry);
	_g_free0 (answer_four_digits);
	_g_free0 (answer_nine_digits);
}


HistoryView* history_view_construct (GType object_type) {
	HistoryView * self = NULL;
	self = (HistoryView*) g_object_new (object_type, NULL);
	return self;
}


HistoryView* history_view_new (void) {
	return history_view_construct (TYPE_HISTORY_VIEW);
}


static void history_view_class_init (HistoryViewClass * klass) {
	gint HistoryView_private_offset;
	history_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (HistoryViewPrivate));
	G_OBJECT_CLASS (klass)->finalize = history_view_finalize;
	HistoryView_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/calculator/history-view.ui");
	g_signal_new ("answer_clicked", TYPE_HISTORY_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	g_signal_new ("equation_clicked", TYPE_HISTORY_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	g_signal_new ("row_added", TYPE_HISTORY_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "listbox", FALSE, HistoryView_private_offset + G_STRUCT_OFFSET (HistoryViewPrivate, listbox));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "scroll_bottom", G_CALLBACK(_history_view_scroll_bottom_history_view_row_added));
}


static void history_view_instance_init (HistoryView * self) {
	Serializer* _tmp0_ = NULL;
	Serializer* _tmp1_ = NULL;
	self->priv = HISTORY_VIEW_GET_PRIVATE (self);
	self->priv->no_ofitems = 0;
	self->priv->last_answer = NULL;
	self->priv->last_equation = NULL;
	_tmp0_ = serializer_new (DISPLAY_FORMAT_AUTOMATIC, 10, 4);
	self->priv->serializer_four = _tmp0_;
	_tmp1_ = serializer_new (DISPLAY_FORMAT_AUTOMATIC, 10, 9);
	self->priv->serializer_nine = _tmp1_;
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void history_view_finalize (GObject* obj) {
	HistoryView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_HISTORY_VIEW, HistoryView);
	_g_free0 (self->priv->last_answer);
	_g_free0 (self->priv->last_equation);
	_g_object_unref0 (self->priv->serializer_four);
	_g_object_unref0 (self->priv->serializer_nine);
	_g_object_unref0 (self->priv->listbox);
	G_OBJECT_CLASS (history_view_parent_class)->finalize (obj);
}


GType history_view_get_type (void) {
	static volatile gsize history_view_type_id__volatile = 0;
	if (g_once_init_enter (&history_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (HistoryViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) history_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (HistoryView), 0, (GInstanceInitFunc) history_view_instance_init, NULL };
		GType history_view_type_id;
		history_view_type_id = g_type_register_static (gtk_scrolled_window_get_type (), "HistoryView", &g_define_type_info, 0);
		g_once_init_leave (&history_view_type_id__volatile, history_view_type_id);
	}
	return history_view_type_id__volatile;
}


HistoryEntry* history_entry_construct (GType object_type, const gchar* equation, const gchar* answer_four_digits, const gchar* answer_nine_digits) {
	HistoryEntry * self = NULL;
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GtkLabel* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GtkLabel* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	GtkLabel* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	g_return_val_if_fail (equation != NULL, NULL);
	g_return_val_if_fail (answer_four_digits != NULL, NULL);
	g_return_val_if_fail (answer_nine_digits != NULL, NULL);
	self = (HistoryEntry*) g_object_new (object_type, NULL);
	_tmp0_ = self->priv->equation_label;
	_tmp1_ = equation;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp0_, _tmp1_);
	_tmp2_ = self->priv->answer_label;
	_tmp3_ = answer_nine_digits;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _tmp3_);
	_tmp4_ = self->priv->equation_label;
	_tmp5_ = equation;
	gtk_label_set_text (_tmp4_, _tmp5_);
	_tmp6_ = self->priv->answer_label;
	_tmp7_ = answer_four_digits;
	_tmp8_ = g_strconcat ("= ", _tmp7_, NULL);
	_tmp9_ = _tmp8_;
	gtk_label_set_text (_tmp6_, _tmp9_);
	_g_free0 (_tmp9_);
	return self;
}


HistoryEntry* history_entry_new (const gchar* equation, const gchar* answer_four_digits, const gchar* answer_nine_digits) {
	return history_entry_construct (TYPE_HISTORY_ENTRY, equation, answer_four_digits, answer_nine_digits);
}


gboolean history_entry_answer_clicked_cb (HistoryEntry* self, GtkWidget* widget, GdkEventButton* eventbutton) {
	gboolean result = FALSE;
	gchar* answer = NULL;
	GtkLabel* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (eventbutton != NULL, FALSE);
	_tmp0_ = self->priv->answer_label;
	_tmp1_ = gtk_widget_get_tooltip_text ((GtkWidget*) _tmp0_);
	answer = _tmp1_;
	_tmp2_ = answer;
	if (_tmp2_ != NULL) {
		const gchar* _tmp3_ = NULL;
		_tmp3_ = answer;
		g_signal_emit_by_name (self, "answer-clicked", _tmp3_);
	}
	result = TRUE;
	_g_free0 (answer);
	return result;
}


static gboolean _history_entry_answer_clicked_cb_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = history_entry_answer_clicked_cb ((HistoryEntry*) self, _sender, event);
	return result;
}


static gboolean history_entry_equation_clicked_cb (HistoryEntry* self, GtkWidget* widget, GdkEventButton* eventbutton) {
	gboolean result = FALSE;
	gchar* equation = NULL;
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (eventbutton != NULL, FALSE);
	_tmp0_ = self->priv->equation_label;
	_tmp1_ = gtk_label_get_text (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	equation = _tmp2_;
	_tmp3_ = equation;
	if (_tmp3_ != NULL) {
		const gchar* _tmp4_ = NULL;
		_tmp4_ = equation;
		g_signal_emit_by_name (self, "equation-clicked", _tmp4_);
	}
	result = TRUE;
	_g_free0 (equation);
	return result;
}


static gboolean _history_entry_equation_clicked_cb_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = history_entry_equation_clicked_cb ((HistoryEntry*) self, _sender, event);
	return result;
}


static void history_entry_class_init (HistoryEntryClass * klass) {
	gint HistoryEntry_private_offset;
	history_entry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (HistoryEntryPrivate));
	G_OBJECT_CLASS (klass)->finalize = history_entry_finalize;
	HistoryEntry_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/calculator/history-entry.ui");
	g_signal_new ("answer_clicked", TYPE_HISTORY_ENTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	g_signal_new ("equation_clicked", TYPE_HISTORY_ENTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "equation_label", FALSE, HistoryEntry_private_offset + G_STRUCT_OFFSET (HistoryEntryPrivate, equation_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "answer_label", FALSE, HistoryEntry_private_offset + G_STRUCT_OFFSET (HistoryEntryPrivate, answer_label));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "answer_clicked_cb", G_CALLBACK(_history_entry_answer_clicked_cb_gtk_widget_button_press_event));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "equation_clicked_cb", G_CALLBACK(_history_entry_equation_clicked_cb_gtk_widget_button_press_event));
}


static void history_entry_instance_init (HistoryEntry * self) {
	self->priv = HISTORY_ENTRY_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void history_entry_finalize (GObject* obj) {
	HistoryEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_HISTORY_ENTRY, HistoryEntry);
	_g_object_unref0 (self->priv->equation_label);
	_g_object_unref0 (self->priv->answer_label);
	G_OBJECT_CLASS (history_entry_parent_class)->finalize (obj);
}


GType history_entry_get_type (void) {
	static volatile gsize history_entry_type_id__volatile = 0;
	if (g_once_init_enter (&history_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (HistoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) history_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (HistoryEntry), 0, (GInstanceInitFunc) history_entry_instance_init, NULL };
		GType history_entry_type_id;
		history_entry_type_id = g_type_register_static (gtk_list_box_row_get_type (), "HistoryEntry", &g_define_type_info, 0);
		g_once_init_leave (&history_entry_type_id__volatile, history_entry_type_id);
	}
	return history_entry_type_id__volatile;
}



