/* side_panel.c generated by valac 0.40.0.227-717ea, the Vala compiler
 * generated from side_panel.vala, do not modify */

/*
 * This file is part of GNOME LaTeX.
 *
 * Copyright © 2010-2012 Sébastien Wilmet
 *
 * GNOME LaTeX 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.
 *
 * GNOME LaTeX is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GNOME LaTeX.  If not, see <http://www.gnu.org/licenses/>.
 */


#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <pango/pango.h>
#include <glib/gi18n-lib.h>


#define TYPE_SIDE_PANEL (side_panel_get_type ())
#define SIDE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIDE_PANEL, SidePanel))
#define SIDE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIDE_PANEL, SidePanelClass))
#define IS_SIDE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIDE_PANEL))
#define IS_SIDE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIDE_PANEL))
#define SIDE_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIDE_PANEL, SidePanelClass))

typedef struct _SidePanel SidePanel;
typedef struct _SidePanelClass SidePanelClass;
typedef struct _SidePanelPrivate SidePanelPrivate;
enum  {
	SIDE_PANEL_0_PROPERTY,
	SIDE_PANEL_NUM_PROPERTIES
};
static GParamSpec* side_panel_properties[SIDE_PANEL_NUM_PROPERTIES];

#define SIDE_PANEL_TYPE_SIDE_PANEL_COLUMN (side_panel_side_panel_column_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _SidePanel {
	GtkGrid parent_instance;
	SidePanelPrivate * priv;
};

struct _SidePanelClass {
	GtkGridClass parent_class;
};

struct _SidePanelPrivate {
	GSettings* _settings;
	GeeArrayList* _components;
	GtkComboBox* _combo_box;
	GtkListStore* _list_store;
	gint _current_component;
};

typedef enum  {
	SIDE_PANEL_SIDE_PANEL_COLUMN_PIXBUF,
	SIDE_PANEL_SIDE_PANEL_COLUMN_NAME,
	SIDE_PANEL_SIDE_PANEL_COLUMN_N_COLUMNS
} SidePanelSidePanelColumn;


static gint SidePanel_private_offset;
static gpointer side_panel_parent_class = NULL;

GType side_panel_get_type (void) G_GNUC_CONST;
static GType side_panel_side_panel_column_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
SidePanel* side_panel_new (void);
SidePanel* side_panel_construct (GType object_type);
static void side_panel_init_combo_box (SidePanel* self);
static GtkButton* side_panel_get_close_button (SidePanel* self);
static void side_panel_show_active_component (SidePanel* self);
static void _side_panel_show_active_component_gtk_combo_box_changed (GtkComboBox* _sender,
                                                              gpointer self);
static void __lambda67_ (SidePanel* self);
static void ___lambda67__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
void side_panel_add_component (SidePanel* self,
                               const gchar* name,
                               const gchar* icon_name,
                               GtkGrid* component);
void side_panel_restore_state (SidePanel* self);
static void side_panel_finalize (GObject * obj);


static inline gpointer
side_panel_get_instance_private (SidePanel* self)
{
	return G_STRUCT_MEMBER_P (self, SidePanel_private_offset);
}


static GType
side_panel_side_panel_column_get_type (void)
{
	static volatile gsize side_panel_side_panel_column_type_id__volatile = 0;
	if (g_once_init_enter (&side_panel_side_panel_column_type_id__volatile)) {
		static const GEnumValue values[] = {{SIDE_PANEL_SIDE_PANEL_COLUMN_PIXBUF, "SIDE_PANEL_SIDE_PANEL_COLUMN_PIXBUF", "pixbuf"}, {SIDE_PANEL_SIDE_PANEL_COLUMN_NAME, "SIDE_PANEL_SIDE_PANEL_COLUMN_NAME", "name"}, {SIDE_PANEL_SIDE_PANEL_COLUMN_N_COLUMNS, "SIDE_PANEL_SIDE_PANEL_COLUMN_N_COLUMNS", "n-columns"}, {0, NULL, NULL}};
		GType side_panel_side_panel_column_type_id;
		side_panel_side_panel_column_type_id = g_enum_register_static ("SidePanelSidePanelColumn", values);
		g_once_init_leave (&side_panel_side_panel_column_type_id__volatile, side_panel_side_panel_column_type_id);
	}
	return side_panel_side_panel_column_type_id__volatile;
}


SidePanel*
side_panel_construct (GType object_type)
{
	SidePanel * self = NULL;
	GSettings* _tmp0_;
	GeeArrayList* _tmp1_;
	GtkButton* close_button = NULL;
	GtkButton* _tmp2_;
	GtkComboBox* _tmp3_;
#line 37 "side_panel.vala"
	self = (SidePanel*) g_object_new (object_type, NULL);
#line 39 "side_panel.vala"
	_tmp0_ = g_settings_new ("org.gnome.gnome-latex.preferences.ui");
#line 39 "side_panel.vala"
	_g_object_unref0 (self->priv->_settings);
#line 39 "side_panel.vala"
	self->priv->_settings = _tmp0_;
#line 40 "side_panel.vala"
	_tmp1_ = gee_array_list_new (gtk_grid_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 40 "side_panel.vala"
	_g_object_unref0 (self->priv->_components);
#line 40 "side_panel.vala"
	self->priv->_components = _tmp1_;
#line 42 "side_panel.vala"
	gtk_widget_set_margin_start ((GtkWidget*) self, 6);
#line 43 "side_panel.vala"
	gtk_widget_set_margin_top ((GtkWidget*) self, 3);
#line 44 "side_panel.vala"
	gtk_grid_set_column_spacing ((GtkGrid*) self, 3);
#line 45 "side_panel.vala"
	gtk_grid_set_row_spacing ((GtkGrid*) self, 3);
#line 47 "side_panel.vala"
	side_panel_init_combo_box (self);
#line 48 "side_panel.vala"
	_tmp2_ = side_panel_get_close_button (self);
#line 48 "side_panel.vala"
	close_button = _tmp2_;
#line 50 "side_panel.vala"
	_tmp3_ = self->priv->_combo_box;
#line 50 "side_panel.vala"
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp3_, 0, 0, 1, 1);
#line 51 "side_panel.vala"
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) close_button, 1, 0, 1, 1);
#line 52 "side_panel.vala"
	gtk_widget_show_all ((GtkWidget*) self);
#line 37 "side_panel.vala"
	_g_object_unref0 (close_button);
#line 37 "side_panel.vala"
	return self;
#line 172 "side_panel.c"
}


SidePanel*
side_panel_new (void)
{
#line 37 "side_panel.vala"
	return side_panel_construct (TYPE_SIDE_PANEL);
#line 181 "side_panel.c"
}


static void
_side_panel_show_active_component_gtk_combo_box_changed (GtkComboBox* _sender,
                                                         gpointer self)
{
#line 77 "side_panel.vala"
	side_panel_show_active_component ((SidePanel*) self);
#line 191 "side_panel.c"
}


static void
side_panel_init_combo_box (SidePanel* self)
{
	GtkListStore* _tmp0_;
	GtkListStore* _tmp1_;
	GtkComboBox* _tmp2_;
	GtkComboBox* _tmp3_;
	GtkCellRendererPixbuf* pixbuf_renderer = NULL;
	GtkCellRendererPixbuf* _tmp4_;
	GtkComboBox* _tmp5_;
	GtkComboBox* _tmp6_;
	GtkCellRendererText* text_renderer = NULL;
	GtkCellRendererText* _tmp7_;
	GtkComboBox* _tmp8_;
	GtkComboBox* _tmp9_;
	GtkComboBox* _tmp10_;
#line 55 "side_panel.vala"
	g_return_if_fail (self != NULL);
#line 57 "side_panel.vala"
	_tmp0_ = gtk_list_store_new ((gint) SIDE_PANEL_SIDE_PANEL_COLUMN_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, -1);
#line 57 "side_panel.vala"
	_g_object_unref0 (self->priv->_list_store);
#line 57 "side_panel.vala"
	self->priv->_list_store = _tmp0_;
#line 62 "side_panel.vala"
	_tmp1_ = self->priv->_list_store;
#line 62 "side_panel.vala"
	_tmp2_ = (GtkComboBox*) gtk_combo_box_new_with_model ((GtkTreeModel*) _tmp1_);
#line 62 "side_panel.vala"
	g_object_ref_sink (_tmp2_);
#line 62 "side_panel.vala"
	_g_object_unref0 (self->priv->_combo_box);
#line 62 "side_panel.vala"
	self->priv->_combo_box = _tmp2_;
#line 63 "side_panel.vala"
	_tmp3_ = self->priv->_combo_box;
#line 63 "side_panel.vala"
	gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, TRUE);
#line 65 "side_panel.vala"
	_tmp4_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
#line 65 "side_panel.vala"
	g_object_ref_sink (_tmp4_);
#line 65 "side_panel.vala"
	pixbuf_renderer = _tmp4_;
#line 66 "side_panel.vala"
	_tmp5_ = self->priv->_combo_box;
#line 66 "side_panel.vala"
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp5_, (GtkCellRenderer*) pixbuf_renderer, FALSE);
#line 67 "side_panel.vala"
	_tmp6_ = self->priv->_combo_box;
#line 67 "side_panel.vala"
	gtk_cell_layout_set_attributes ((GtkCellLayout*) _tmp6_, (GtkCellRenderer*) pixbuf_renderer, "icon-name", SIDE_PANEL_SIDE_PANEL_COLUMN_PIXBUF, NULL, NULL);
#line 70 "side_panel.vala"
	_tmp7_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
#line 70 "side_panel.vala"
	g_object_ref_sink (_tmp7_);
#line 70 "side_panel.vala"
	text_renderer = _tmp7_;
#line 71 "side_panel.vala"
	g_object_set (text_renderer, "ellipsize-set", TRUE, NULL);
#line 72 "side_panel.vala"
	g_object_set (text_renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
#line 73 "side_panel.vala"
	_tmp8_ = self->priv->_combo_box;
#line 73 "side_panel.vala"
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp8_, (GtkCellRenderer*) text_renderer, TRUE);
#line 74 "side_panel.vala"
	_tmp9_ = self->priv->_combo_box;
#line 74 "side_panel.vala"
	gtk_cell_layout_set_attributes ((GtkCellLayout*) _tmp9_, (GtkCellRenderer*) text_renderer, "text", SIDE_PANEL_SIDE_PANEL_COLUMN_NAME, NULL, NULL);
#line 77 "side_panel.vala"
	_tmp10_ = self->priv->_combo_box;
#line 77 "side_panel.vala"
	g_signal_connect_object (_tmp10_, "changed", (GCallback) _side_panel_show_active_component_gtk_combo_box_changed, self, 0);
#line 55 "side_panel.vala"
	_g_object_unref0 (text_renderer);
#line 55 "side_panel.vala"
	_g_object_unref0 (pixbuf_renderer);
#line 273 "side_panel.c"
}


static void
__lambda67_ (SidePanel* self)
{
#line 89 "side_panel.vala"
	gtk_widget_hide ((GtkWidget*) self);
#line 282 "side_panel.c"
}


static void
___lambda67__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
#line 89 "side_panel.vala"
	__lambda67_ ((SidePanel*) self);
#line 292 "side_panel.c"
}


static GtkButton*
side_panel_get_close_button (SidePanel* self)
{
	GtkButton* result = NULL;
	GtkButton* close_button = NULL;
	GtkButton* _tmp0_;
	GtkImage* _tmp1_;
	GtkImage* _tmp2_;
#line 80 "side_panel.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 82 "side_panel.vala"
	_tmp0_ = (GtkButton*) gtk_button_new ();
#line 82 "side_panel.vala"
	g_object_ref_sink (_tmp0_);
#line 82 "side_panel.vala"
	close_button = _tmp0_;
#line 83 "side_panel.vala"
	gtk_button_set_relief (close_button, GTK_RELIEF_NONE);
#line 84 "side_panel.vala"
	gtk_widget_set_focus_on_click ((GtkWidget*) close_button, FALSE);
#line 85 "side_panel.vala"
	gtk_widget_set_tooltip_text ((GtkWidget*) close_button, _ ("Hide panel"));
#line 86 "side_panel.vala"
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name ("window-close", (GtkIconSize) GTK_ICON_SIZE_MENU);
#line 86 "side_panel.vala"
	g_object_ref_sink (_tmp1_);
#line 86 "side_panel.vala"
	_tmp2_ = _tmp1_;
#line 86 "side_panel.vala"
	gtk_container_add ((GtkContainer*) close_button, (GtkWidget*) _tmp2_);
#line 86 "side_panel.vala"
	_g_object_unref0 (_tmp2_);
#line 87 "side_panel.vala"
	gtk_widget_set_margin_end ((GtkWidget*) close_button, 3);
#line 89 "side_panel.vala"
	g_signal_connect_object (close_button, "clicked", (GCallback) ___lambda67__gtk_button_clicked, self, 0);
#line 91 "side_panel.vala"
	result = close_button;
#line 91 "side_panel.vala"
	return result;
#line 336 "side_panel.c"
}


void
side_panel_add_component (SidePanel* self,
                          const gchar* name,
                          const gchar* icon_name,
                          GtkGrid* component)
{
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	GtkListStore* _tmp2_;
	GtkTreeIter _tmp3_;
	GeeArrayList* _tmp4_;
	GeeArrayList* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
#line 94 "side_panel.vala"
	g_return_if_fail (self != NULL);
#line 94 "side_panel.vala"
	g_return_if_fail (name != NULL);
#line 94 "side_panel.vala"
	g_return_if_fail (icon_name != NULL);
#line 94 "side_panel.vala"
	g_return_if_fail (component != NULL);
#line 97 "side_panel.vala"
	_tmp0_ = self->priv->_list_store;
#line 97 "side_panel.vala"
	gtk_list_store_append (_tmp0_, &_tmp1_);
#line 97 "side_panel.vala"
	iter = _tmp1_;
#line 98 "side_panel.vala"
	_tmp2_ = self->priv->_list_store;
#line 98 "side_panel.vala"
	_tmp3_ = iter;
#line 98 "side_panel.vala"
	gtk_list_store_set (_tmp2_, &_tmp3_, SIDE_PANEL_SIDE_PANEL_COLUMN_PIXBUF, icon_name, SIDE_PANEL_SIDE_PANEL_COLUMN_NAME, name, -1);
#line 102 "side_panel.vala"
	_tmp4_ = self->priv->_components;
#line 102 "side_panel.vala"
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp4_, component);
#line 103 "side_panel.vala"
	_tmp5_ = self->priv->_components;
#line 103 "side_panel.vala"
	_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_);
#line 103 "side_panel.vala"
	_tmp7_ = _tmp6_;
#line 103 "side_panel.vala"
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) component, 0, _tmp7_, 2, 1);
#line 387 "side_panel.c"
}


static gpointer
_g_object_ref0 (gpointer self)
{
#line 108 "side_panel.vala"
	return self ? g_object_ref (self) : NULL;
#line 396 "side_panel.c"
}


void
side_panel_restore_state (SidePanel* self)
{
	gint num = 0;
	GSettings* _tmp12_;
	gint _tmp13_;
	GeeArrayList* _tmp14_;
	gint _tmp15_;
	gint _tmp16_;
	GtkComboBox* _tmp17_;
	gint _tmp18_;
	GSettings* _tmp19_;
	GtkComboBox* _tmp20_;
#line 106 "side_panel.vala"
	g_return_if_fail (self != NULL);
#line 415 "side_panel.c"
	{
		GeeArrayList* _component_list = NULL;
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		gint _component_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _component_index = 0;
#line 108 "side_panel.vala"
		_tmp0_ = self->priv->_components;
#line 108 "side_panel.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 108 "side_panel.vala"
		_component_list = _tmp1_;
#line 108 "side_panel.vala"
		_tmp2_ = _component_list;
#line 108 "side_panel.vala"
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
#line 108 "side_panel.vala"
		_tmp4_ = _tmp3_;
#line 108 "side_panel.vala"
		_component_size = _tmp4_;
#line 108 "side_panel.vala"
		_component_index = -1;
#line 108 "side_panel.vala"
		while (TRUE) {
#line 443 "side_panel.c"
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GtkGrid* component = NULL;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			GtkGrid* _tmp11_;
#line 108 "side_panel.vala"
			_tmp5_ = _component_index;
#line 108 "side_panel.vala"
			_component_index = _tmp5_ + 1;
#line 108 "side_panel.vala"
			_tmp6_ = _component_index;
#line 108 "side_panel.vala"
			_tmp7_ = _component_size;
#line 108 "side_panel.vala"
			if (!(_tmp6_ < _tmp7_)) {
#line 108 "side_panel.vala"
				break;
#line 464 "side_panel.c"
			}
#line 108 "side_panel.vala"
			_tmp8_ = _component_list;
#line 108 "side_panel.vala"
			_tmp9_ = _component_index;
#line 108 "side_panel.vala"
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
#line 108 "side_panel.vala"
			component = (GtkGrid*) _tmp10_;
#line 109 "side_panel.vala"
			_tmp11_ = component;
#line 109 "side_panel.vala"
			gtk_widget_hide ((GtkWidget*) _tmp11_);
#line 108 "side_panel.vala"
			_g_object_unref0 (component);
#line 480 "side_panel.c"
		}
#line 108 "side_panel.vala"
		_g_object_unref0 (_component_list);
#line 484 "side_panel.c"
	}
#line 111 "side_panel.vala"
	_tmp12_ = self->priv->_settings;
#line 111 "side_panel.vala"
	num = g_settings_get_int (_tmp12_, "side-panel-component");
#line 112 "side_panel.vala"
	_tmp13_ = num;
#line 112 "side_panel.vala"
	_tmp14_ = self->priv->_components;
#line 112 "side_panel.vala"
	_tmp15_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp14_);
#line 112 "side_panel.vala"
	_tmp16_ = _tmp15_;
#line 112 "side_panel.vala"
	num = CLAMP (_tmp13_, 0, _tmp16_ - 1);
#line 113 "side_panel.vala"
	_tmp17_ = self->priv->_combo_box;
#line 113 "side_panel.vala"
	_tmp18_ = num;
#line 113 "side_panel.vala"
	gtk_combo_box_set_active (_tmp17_, _tmp18_);
#line 119 "side_panel.vala"
	_tmp19_ = self->priv->_settings;
#line 119 "side_panel.vala"
	_tmp20_ = self->priv->_combo_box;
#line 119 "side_panel.vala"
	g_settings_bind (_tmp19_, "side-panel-component", (GObject*) _tmp20_, "active", G_SETTINGS_BIND_SET);
#line 512 "side_panel.c"
}


static void
side_panel_show_active_component (SidePanel* self)
{
	gboolean _tmp0_ = FALSE;
	gint _tmp1_;
	GtkComboBox* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	GeeArrayList* _tmp13_;
	gint _tmp14_;
	gpointer _tmp15_;
	GtkGrid* _tmp16_;
#line 123 "side_panel.vala"
	g_return_if_fail (self != NULL);
#line 125 "side_panel.vala"
	_tmp1_ = self->priv->_current_component;
#line 125 "side_panel.vala"
	if (0 <= _tmp1_) {
#line 534 "side_panel.c"
		gint _tmp2_;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
#line 125 "side_panel.vala"
		_tmp2_ = self->priv->_current_component;
#line 125 "side_panel.vala"
		_tmp3_ = self->priv->_components;
#line 125 "side_panel.vala"
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
#line 125 "side_panel.vala"
		_tmp5_ = _tmp4_;
#line 125 "side_panel.vala"
		_tmp0_ = _tmp2_ < _tmp5_;
#line 549 "side_panel.c"
	} else {
#line 125 "side_panel.vala"
		_tmp0_ = FALSE;
#line 553 "side_panel.c"
	}
#line 125 "side_panel.vala"
	if (_tmp0_) {
#line 557 "side_panel.c"
		GeeArrayList* _tmp6_;
		gint _tmp7_;
		gpointer _tmp8_;
		GtkGrid* _tmp9_;
#line 126 "side_panel.vala"
		_tmp6_ = self->priv->_components;
#line 126 "side_panel.vala"
		_tmp7_ = self->priv->_current_component;
#line 126 "side_panel.vala"
		_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _tmp7_);
#line 126 "side_panel.vala"
		_tmp9_ = (GtkGrid*) _tmp8_;
#line 126 "side_panel.vala"
		gtk_widget_hide ((GtkWidget*) _tmp9_);
#line 126 "side_panel.vala"
		_g_object_unref0 (_tmp9_);
#line 574 "side_panel.c"
	}
#line 128 "side_panel.vala"
	_tmp10_ = self->priv->_combo_box;
#line 128 "side_panel.vala"
	_tmp11_ = gtk_combo_box_get_active (_tmp10_);
#line 128 "side_panel.vala"
	_tmp12_ = _tmp11_;
#line 128 "side_panel.vala"
	self->priv->_current_component = _tmp12_;
#line 129 "side_panel.vala"
	_tmp13_ = self->priv->_components;
#line 129 "side_panel.vala"
	_tmp14_ = self->priv->_current_component;
#line 129 "side_panel.vala"
	_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, _tmp14_);
#line 129 "side_panel.vala"
	_tmp16_ = (GtkGrid*) _tmp15_;
#line 129 "side_panel.vala"
	gtk_widget_show ((GtkWidget*) _tmp16_);
#line 129 "side_panel.vala"
	_g_object_unref0 (_tmp16_);
#line 596 "side_panel.c"
}


static void
side_panel_class_init (SidePanelClass * klass)
{
#line 22 "side_panel.vala"
	side_panel_parent_class = g_type_class_peek_parent (klass);
#line 22 "side_panel.vala"
	g_type_class_adjust_private_offset (klass, &SidePanel_private_offset);
#line 22 "side_panel.vala"
	G_OBJECT_CLASS (klass)->finalize = side_panel_finalize;
#line 609 "side_panel.c"
}


static void
side_panel_instance_init (SidePanel * self)
{
#line 22 "side_panel.vala"
	self->priv = side_panel_get_instance_private (self);
#line 35 "side_panel.vala"
	self->priv->_current_component = -1;
#line 620 "side_panel.c"
}


static void
side_panel_finalize (GObject * obj)
{
	SidePanel * self;
#line 22 "side_panel.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SIDE_PANEL, SidePanel);
#line 31 "side_panel.vala"
	_g_object_unref0 (self->priv->_settings);
#line 32 "side_panel.vala"
	_g_object_unref0 (self->priv->_components);
#line 33 "side_panel.vala"
	_g_object_unref0 (self->priv->_combo_box);
#line 34 "side_panel.vala"
	_g_object_unref0 (self->priv->_list_store);
#line 22 "side_panel.vala"
	G_OBJECT_CLASS (side_panel_parent_class)->finalize (obj);
#line 640 "side_panel.c"
}


GType
side_panel_get_type (void)
{
	static volatile gsize side_panel_type_id__volatile = 0;
	if (g_once_init_enter (&side_panel_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SidePanelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) side_panel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SidePanel), 0, (GInstanceInitFunc) side_panel_instance_init, NULL };
		GType side_panel_type_id;
		side_panel_type_id = g_type_register_static (gtk_grid_get_type (), "SidePanel", &g_define_type_info, 0);
		SidePanel_private_offset = g_type_add_instance_private (side_panel_type_id, sizeof (SidePanelPrivate));
		g_once_init_leave (&side_panel_type_id__volatile, side_panel_type_id);
	}
	return side_panel_type_id__volatile;
}



