/* indicator.c generated by valac 0.22.1, the Vala compiler
 * generated from indicator.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.h>
#include <glib/gstdio.h>
#include <cairo.h>
#include <float.h>
#include <math.h>


#define TYPE_INDICATOR (indicator_get_type ())
#define INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INDICATOR, Indicator))
#define INDICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INDICATOR, IndicatorClass))
#define IS_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INDICATOR))
#define IS_INDICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INDICATOR))
#define INDICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INDICATOR, IndicatorClass))

typedef struct _Indicator Indicator;
typedef struct _IndicatorClass IndicatorClass;
typedef struct _IndicatorPrivate IndicatorPrivate;

#define TYPE_INDICATOR_VIEW (indicator_view_get_type ())
#define INDICATOR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INDICATOR_VIEW, IndicatorView))
#define IS_INDICATOR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INDICATOR_VIEW))
#define INDICATOR_VIEW_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_INDICATOR_VIEW, IndicatorViewIface))

typedef struct _IndicatorView IndicatorView;
typedef struct _IndicatorViewIface IndicatorViewIface;

#define TYPE_PROVIDERS (providers_get_type ())
#define PROVIDERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROVIDERS, Providers))
#define PROVIDERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROVIDERS, ProvidersClass))
#define IS_PROVIDERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROVIDERS))
#define IS_PROVIDERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROVIDERS))
#define PROVIDERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROVIDERS, ProvidersClass))

typedef struct _Providers Providers;
typedef struct _ProvidersClass ProvidersClass;

#define TYPE_MENU_MODEL (menu_model_get_type ())
#define MENU_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MENU_MODEL, MenuModel))
#define MENU_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MENU_MODEL, MenuModelClass))
#define IS_MENU_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MENU_MODEL))
#define IS_MENU_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MENU_MODEL))
#define MENU_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MENU_MODEL, MenuModelClass))

typedef struct _MenuModel MenuModel;
typedef struct _MenuModelClass MenuModelClass;

#define TYPE_GRAPH_MODELS (graph_models_get_type ())
#define GRAPH_MODELS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GRAPH_MODELS, GraphModels))
#define GRAPH_MODELS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GRAPH_MODELS, GraphModelsClass))
#define IS_GRAPH_MODELS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GRAPH_MODELS))
#define IS_GRAPH_MODELS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GRAPH_MODELS))
#define GRAPH_MODELS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GRAPH_MODELS, GraphModelsClass))

typedef struct _GraphModels GraphModels;
typedef struct _GraphModelsClass GraphModelsClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_source_unref0(var) ((var == NULL) ? NULL : (var = (g_source_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_TRAY_INDICATOR_VIEW (tray_indicator_view_get_type ())
#define TRAY_INDICATOR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRAY_INDICATOR_VIEW, TrayIndicatorView))
#define TRAY_INDICATOR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRAY_INDICATOR_VIEW, TrayIndicatorViewClass))
#define IS_TRAY_INDICATOR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRAY_INDICATOR_VIEW))
#define IS_TRAY_INDICATOR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRAY_INDICATOR_VIEW))
#define TRAY_INDICATOR_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRAY_INDICATOR_VIEW, TrayIndicatorViewClass))

typedef struct _TrayIndicatorView TrayIndicatorView;
typedef struct _TrayIndicatorViewClass TrayIndicatorViewClass;

#define TYPE_APP_INDICATOR_VIEW (app_indicator_view_get_type ())
#define APP_INDICATOR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_INDICATOR_VIEW, AppIndicatorView))
#define APP_INDICATOR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_INDICATOR_VIEW, AppIndicatorViewClass))
#define IS_APP_INDICATOR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_INDICATOR_VIEW))
#define IS_APP_INDICATOR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_INDICATOR_VIEW))
#define APP_INDICATOR_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_INDICATOR_VIEW, AppIndicatorViewClass))

typedef struct _AppIndicatorView AppIndicatorView;
typedef struct _AppIndicatorViewClass AppIndicatorViewClass;

#define TYPE_EXPRESSION_CACHE (expression_cache_get_type ())
#define EXPRESSION_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPRESSION_CACHE, ExpressionCache))
#define EXPRESSION_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPRESSION_CACHE, ExpressionCacheClass))
#define IS_EXPRESSION_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPRESSION_CACHE))
#define IS_EXPRESSION_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPRESSION_CACHE))
#define EXPRESSION_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPRESSION_CACHE, ExpressionCacheClass))

typedef struct _ExpressionCache ExpressionCache;
typedef struct _ExpressionCacheClass ExpressionCacheClass;
typedef struct _Block1Data Block1Data;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))

#define TYPE_GRAPH_MODEL (graph_model_get_type ())
#define GRAPH_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GRAPH_MODEL, GraphModel))
#define GRAPH_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GRAPH_MODEL, GraphModelClass))
#define IS_GRAPH_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GRAPH_MODEL))
#define IS_GRAPH_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GRAPH_MODEL))
#define GRAPH_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GRAPH_MODEL, GraphModelClass))

typedef struct _GraphModel GraphModel;
typedef struct _GraphModelClass GraphModelClass;

#define TYPE_TRACE_MODEL (trace_model_get_type ())
#define TRACE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRACE_MODEL, TraceModel))
#define TRACE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRACE_MODEL, TraceModelClass))
#define IS_TRACE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRACE_MODEL))
#define IS_TRACE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRACE_MODEL))
#define TRACE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRACE_MODEL, TraceModelClass))

typedef struct _TraceModel TraceModel;
typedef struct _TraceModelClass TraceModelClass;
#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))

struct _Indicator {
	GObject parent_instance;
	IndicatorPrivate * priv;
};

struct _IndicatorClass {
	GObjectClass parent_class;
};

struct _IndicatorViewIface {
	GTypeInterface parent_iface;
	void (*set_label) (IndicatorView* self, const gchar* value);
	void (*set_guide) (IndicatorView* self, const gchar* value);
	void (*set_icon) (IndicatorView* self, const gchar* value);
	void (*set_description) (IndicatorView* self, const gchar* value);
};

struct _IndicatorPrivate {
	guint currenticonindex;
	guint lasticonwidth;
	GSource* timeout;
	GtkMenuItem** menuitems;
	gint menuitems_length1;
	gint _menuitems_size_;
	IndicatorView* indicatorview;
	gchar* _icondirectory;
	Providers* _providers;
	GtkMenu* _menu;
	MenuModel* _menumodel;
	MenuModel* _labelmodel;
	MenuModel* _descriptionmodel;
	gint _indicator_index;
	guint _height;
	guint _width;
	guint _speed;
	GdkRGBA _background_rgba;
	GraphModels* _graphmodels;
};

struct _Block1Data {
	int _ref_count_;
	Indicator * self;
	gboolean found;
};


static gpointer indicator_parent_class = NULL;

GType indicator_get_type (void) G_GNUC_CONST;
GType indicator_view_get_type (void) G_GNUC_CONST;
GType providers_get_type (void) G_GNUC_CONST;
GType menu_model_get_type (void) G_GNUC_CONST;
GType graph_models_get_type (void) G_GNUC_CONST;
#define INDICATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_INDICATOR, IndicatorPrivate))
enum  {
	INDICATOR_DUMMY_PROPERTY,
	INDICATOR_ICONDIRECTORY,
	INDICATOR_PROVIDERS,
	INDICATOR_MENU,
	INDICATOR_MENUMODEL,
	INDICATOR_LABELMODEL,
	INDICATOR_DESCRIPTIONMODEL,
	INDICATOR_INDICATOR_INDEX,
	INDICATOR_HEIGHT,
	INDICATOR_WIDTH,
	INDICATOR_SPEED,
	INDICATOR_BACKGROUND_RGBA,
	INDICATOR_GRAPHMODELS
};
static gchar* indicator_iconpath (Indicator* self, guint index);
const gchar* indicator_get_icondirectory (Indicator* self);
Indicator* indicator_new (const gchar* icondirectory, Providers* providers, GtkMenu* menu, gboolean trayicon);
Indicator* indicator_construct (GType object_type, const gchar* icondirectory, Providers* providers, GtkMenu* menu, gboolean trayicon);
MenuModel* menu_model_new (Providers* providers);
MenuModel* menu_model_construct (GType object_type, Providers* providers);
static void indicator_iconwritedummy (Indicator* self);
static void __lambda7_ (Indicator* self);
static void indicator_updateviews (Indicator* self);
static void ___lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __lambda9_ (Indicator* self);
guint indicator_get_speed (Indicator* self);
static gboolean __lambda10_ (Indicator* self);
void indicator_updateall (Indicator* self);
static gboolean ___lambda10__gsource_func (gpointer self);
static void ___lambda9__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
GtkMenu* indicator_get_menu (Indicator* self);
TrayIndicatorView* tray_indicator_view_new (const gchar* icondirectory, GtkMenu* menu);
TrayIndicatorView* tray_indicator_view_construct (GType object_type, const gchar* icondirectory, GtkMenu* menu);
GType tray_indicator_view_get_type (void) G_GNUC_CONST;
AppIndicatorView* app_indicator_view_new (const gchar* icondirectory, GtkMenu* menu);
AppIndicatorView* app_indicator_view_construct (GType object_type, const gchar* icondirectory, GtkMenu* menu);
GType app_indicator_view_get_type (void) G_GNUC_CONST;
static void indicator_scrollhandler (Indicator* self, gint delta, guint direction);
static void _indicator_scrollhandler_indicator_view_scroll_event (IndicatorView* _sender, gint delta, guint direction, gpointer self);
void indicator_destroy (Indicator* self);
Providers* indicator_get_providers (Indicator* self);
void providers_update (Providers* self);
static void indicator_updatemodels (Indicator* self);
gint indicator_get_indicator_index (Indicator* self);
MenuModel* indicator_get_labelmodel (Indicator* self);
gchar** menu_model_get_expressions (MenuModel* self, int* result_length1);
void indicator_set_indicator_index (Indicator* self, gint value);
MenuModel* indicator_get_menumodel (Indicator* self);
void menu_model_update (MenuModel* self);
GraphModels* indicator_get_graphmodels (Indicator* self);
void graph_models_update (GraphModels* self, guint trace_length);
guint indicator_get_width (Indicator* self);
MenuModel* indicator_get_descriptionmodel (Indicator* self);
static void indicator_updatemenuview (Indicator* self);
static void indicator_updategraphsview (Indicator* self);
static void indicator_updatelabelview (Indicator* self);
static void _vala_array_add11 (GtkMenuItem*** array, int* length, int* size, GtkMenuItem* value);
GType expression_cache_get_type (void) G_GNUC_CONST;
ExpressionCache* menu_model_expression (MenuModel* self, guint index);
gchar* expression_cache_label (ExpressionCache* self);
static GtkMenuItem** _vala_array_dup13 (GtkMenuItem** self, int length);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void indicator_iconwrite (Indicator* self);
static void ____lambda8_ (Block1Data* _data1_, GtkWidget* w);
guint indicator_get_height (Indicator* self);
static void _____lambda8__gtk_callback (GtkWidget* widget, gpointer self);
static gchar* indicator_iconname (Indicator* self, guint index);
void indicator_view_set_icon (IndicatorView* self, const gchar* value);
void indicator_view_set_description (IndicatorView* self, const gchar* value);
gchar* expression_cache_guide (ExpressionCache* self);
void indicator_view_set_label (IndicatorView* self, const gchar* value);
void indicator_view_set_guide (IndicatorView* self, const gchar* value);
GType graph_model_get_type (void) G_GNUC_CONST;
GraphModel** graph_models_get_graphmodels (GraphModels* self, int* result_length1);
gboolean graph_model_get_enabled (GraphModel* self);
void indicator_get_background_rgba (Indicator* self, GdkRGBA* result);
GType trace_model_get_type (void) G_GNUC_CONST;
TraceModel** graph_model_get_tracemodels (GraphModel* self, int* result_length1);
static TraceModel** _vala_array_dup14 (TraceModel** self, int length);
gdouble graph_model_get_scale (GraphModel* self);
gboolean trace_model_get_enabled (TraceModel* self);
gdouble* trace_model_get_values (TraceModel* self, int* result_length1);
void trace_model_get_rgba (TraceModel* self, GdkRGBA* result);
static void indicator_set_icondirectory (Indicator* self, const gchar* value);
static void indicator_set_providers (Indicator* self, Providers* value);
static void indicator_set_menu (Indicator* self, GtkMenu* value);
static void indicator_set_menumodel (Indicator* self, MenuModel* value);
static void indicator_set_labelmodel (Indicator* self, MenuModel* value);
static void indicator_set_descriptionmodel (Indicator* self, MenuModel* value);
void indicator_set_height (Indicator* self, guint value);
void indicator_set_width (Indicator* self, guint value);
void indicator_set_speed (Indicator* self, guint value);
void indicator_set_background_rgba (Indicator* self, GdkRGBA* value);
void indicator_set_graphmodels (Indicator* self, GraphModels* value);
static void indicator_finalize (GObject* obj);
static void _vala_indicator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_indicator_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static void __lambda7_ (Indicator* self) {
	indicator_updateviews (self);
}


static void ___lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda7_ (self);
}


static gboolean __lambda10_ (Indicator* self) {
	gboolean result = FALSE;
	indicator_updateall (self);
	result = TRUE;
	return result;
}


static gboolean ___lambda10__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda10_ (self);
	return result;
}


static void __lambda9_ (Indicator* self) {
	GSource* _tmp0_ = NULL;
	guint _tmp2_ = 0U;
	guint _tmp3_ = 0U;
	GSource* _tmp8_ = NULL;
	GSource* _tmp9_ = NULL;
	_tmp0_ = self->priv->timeout;
	if (_tmp0_ != NULL) {
		GSource* _tmp1_ = NULL;
		_tmp1_ = self->priv->timeout;
		g_source_destroy (_tmp1_);
	}
	_tmp2_ = self->priv->_speed;
	if (_tmp2_ == ((guint) 0)) {
		_g_source_unref0 (self->priv->timeout);
		self->priv->timeout = NULL;
		return;
	}
	_tmp3_ = self->priv->_speed;
	if ((_tmp3_ % 1000) == ((guint) 0)) {
		guint _tmp4_ = 0U;
		GSource* _tmp5_ = NULL;
		_tmp4_ = self->priv->_speed;
		_tmp5_ = g_timeout_source_new_seconds (_tmp4_ / 1000);
		_g_source_unref0 (self->priv->timeout);
		self->priv->timeout = _tmp5_;
	} else {
		guint _tmp6_ = 0U;
		GSource* _tmp7_ = NULL;
		_tmp6_ = self->priv->_speed;
		_tmp7_ = g_timeout_source_new (_tmp6_);
		_g_source_unref0 (self->priv->timeout);
		self->priv->timeout = _tmp7_;
	}
	_tmp8_ = self->priv->timeout;
	g_source_attach (_tmp8_, NULL);
	_tmp9_ = self->priv->timeout;
	g_source_set_callback (_tmp9_, ___lambda10__gsource_func, g_object_ref (self), g_object_unref);
}


static void ___lambda9__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda9_ (self);
}


static void _indicator_scrollhandler_indicator_view_scroll_event (IndicatorView* _sender, gint delta, guint direction, gpointer self) {
	indicator_scrollhandler (self, delta, direction);
}


Indicator* indicator_construct (GType object_type, const gchar* icondirectory, Providers* providers, GtkMenu* menu, gboolean trayicon) {
	Indicator * self = NULL;
	const gchar* _tmp0_ = NULL;
	Providers* _tmp1_ = NULL;
	GtkMenu* _tmp2_ = NULL;
	Providers* _tmp3_ = NULL;
	MenuModel* _tmp4_ = NULL;
	MenuModel* _tmp5_ = NULL;
	Providers* _tmp6_ = NULL;
	MenuModel* _tmp7_ = NULL;
	MenuModel* _tmp8_ = NULL;
	Providers* _tmp9_ = NULL;
	MenuModel* _tmp10_ = NULL;
	MenuModel* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gboolean _tmp13_ = FALSE;
	IndicatorView* _tmp20_ = NULL;
	g_return_val_if_fail (icondirectory != NULL, NULL);
	g_return_val_if_fail (IS_PROVIDERS (providers), NULL);
	g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
	_tmp0_ = icondirectory;
	_tmp1_ = providers;
	_tmp2_ = menu;
	_tmp3_ = providers;
	_tmp4_ = menu_model_new (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = providers;
	_tmp7_ = menu_model_new (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = providers;
	_tmp10_ = menu_model_new (_tmp9_);
	_tmp11_ = _tmp10_;
	self = (Indicator*) g_object_new (object_type, "icondirectory", _tmp0_, "providers", _tmp1_, "menu", _tmp2_, "menumodel", _tmp5_, "labelmodel", _tmp8_, "descriptionmodel", _tmp11_, NULL);
	_g_object_unref0 (_tmp11_);
	_g_object_unref0 (_tmp8_);
	_g_object_unref0 (_tmp5_);
	_tmp12_ = self->priv->_icondirectory;
	g_mkdir (_tmp12_, 0777);
	indicator_iconwritedummy (self);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject), "notify::indicator-index", (GCallback) ___lambda7__g_object_notify, self, 0);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject), "notify::speed", (GCallback) ___lambda9__g_object_notify, self, 0);
	_tmp13_ = trayicon;
	if (_tmp13_) {
		const gchar* _tmp14_ = NULL;
		GtkMenu* _tmp15_ = NULL;
		TrayIndicatorView* _tmp16_ = NULL;
		_tmp14_ = self->priv->_icondirectory;
		_tmp15_ = self->priv->_menu;
		_tmp16_ = tray_indicator_view_new (_tmp14_, _tmp15_);
		_g_object_unref0 (self->priv->indicatorview);
		self->priv->indicatorview = G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_INDICATOR_VIEW, IndicatorView);
	} else {
		const gchar* _tmp17_ = NULL;
		GtkMenu* _tmp18_ = NULL;
		AppIndicatorView* _tmp19_ = NULL;
		_tmp17_ = self->priv->_icondirectory;
		_tmp18_ = self->priv->_menu;
		_tmp19_ = app_indicator_view_new (_tmp17_, _tmp18_);
		_g_object_unref0 (self->priv->indicatorview);
		self->priv->indicatorview = G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_INDICATOR_VIEW, IndicatorView);
	}
	_tmp20_ = self->priv->indicatorview;
	g_signal_connect_object (_tmp20_, "scroll-event", (GCallback) _indicator_scrollhandler_indicator_view_scroll_event, self, 0);
	return self;
}


Indicator* indicator_new (const gchar* icondirectory, Providers* providers, GtkMenu* menu, gboolean trayicon) {
	return indicator_construct (TYPE_INDICATOR, icondirectory, providers, menu, trayicon);
}


void indicator_destroy (Indicator* self) {
	GSource* _tmp0_ = NULL;
	GSource* _tmp1_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = self->priv->timeout;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->timeout;
	g_source_destroy (_tmp1_);
	_g_source_unref0 (self->priv->timeout);
	self->priv->timeout = NULL;
}


void indicator_updateall (Indicator* self) {
	Providers* _tmp0_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = self->priv->_providers;
	providers_update (_tmp0_);
	g_signal_emit_by_name (self, "providers-updated");
	indicator_updatemodels (self);
	indicator_updateviews (self);
}


static void indicator_scrollhandler (Indicator* self, gint delta, guint direction) {
	gint index = 0;
	gint _tmp0_ = 0;
	guint _tmp1_ = 0U;
	gint _tmp7_ = 0;
	MenuModel* _tmp8_ = NULL;
	gchar** _tmp9_ = NULL;
	gint _tmp9__length1 = 0;
	gchar** _tmp10_ = NULL;
	gint _tmp10__length1 = 0;
	gint _tmp14_ = 0;
	gint _tmp15_ = 0;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = self->priv->_indicator_index;
	index = _tmp0_;
	_tmp1_ = direction;
	if (_tmp1_ == ((guint) GDK_SCROLL_DOWN)) {
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
		_tmp2_ = index;
		_tmp3_ = delta;
		index = _tmp2_ + _tmp3_;
	} else {
		guint _tmp4_ = 0U;
		_tmp4_ = direction;
		if (_tmp4_ == ((guint) GDK_SCROLL_UP)) {
			gint _tmp5_ = 0;
			gint _tmp6_ = 0;
			_tmp5_ = index;
			_tmp6_ = delta;
			index = _tmp5_ - _tmp6_;
		}
	}
	_tmp7_ = index;
	_tmp8_ = self->priv->_labelmodel;
	_tmp9_ = menu_model_get_expressions (_tmp8_, &_tmp9__length1);
	_tmp10_ = _tmp9_;
	_tmp10__length1 = _tmp9__length1;
	if (_tmp7_ >= _tmp10__length1) {
		MenuModel* _tmp11_ = NULL;
		gchar** _tmp12_ = NULL;
		gint _tmp12__length1 = 0;
		gchar** _tmp13_ = NULL;
		gint _tmp13__length1 = 0;
		_tmp11_ = self->priv->_labelmodel;
		_tmp12_ = menu_model_get_expressions (_tmp11_, &_tmp12__length1);
		_tmp13_ = _tmp12_;
		_tmp13__length1 = _tmp12__length1;
		index = _tmp13__length1 - 1;
	}
	_tmp14_ = index;
	if (_tmp14_ < 0) {
		index = 0;
	}
	_tmp15_ = index;
	indicator_set_indicator_index (self, _tmp15_);
}


static void indicator_updatemodels (Indicator* self) {
	MenuModel* _tmp0_ = NULL;
	GraphModels* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
	MenuModel* _tmp3_ = NULL;
	MenuModel* _tmp4_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = self->priv->_menumodel;
	menu_model_update (_tmp0_);
	_tmp1_ = self->priv->_graphmodels;
	_tmp2_ = self->priv->_width;
	graph_models_update (_tmp1_, _tmp2_);
	_tmp3_ = self->priv->_descriptionmodel;
	menu_model_update (_tmp3_);
	_tmp4_ = self->priv->_labelmodel;
	menu_model_update (_tmp4_);
}


static void indicator_updateviews (Indicator* self) {
	g_return_if_fail (IS_INDICATOR (self));
	indicator_updatemenuview (self);
	indicator_updategraphsview (self);
	indicator_updatelabelview (self);
}


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


static void _vala_array_add11 (GtkMenuItem*** array, int* length, int* size, GtkMenuItem* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GtkMenuItem*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static GtkMenuItem** _vala_array_dup13 (GtkMenuItem** self, int length) {
	GtkMenuItem** result;
	int i;
	result = g_new0 (GtkMenuItem*, length + 1);
	for (i = 0; i < length; i++) {
		GtkMenuItem* _tmp0_ = NULL;
		_tmp0_ = _g_object_ref0 (self[i]);
		result[i] = _tmp0_;
	}
	return result;
}


static void indicator_updatemenuview (Indicator* self) {
	guint menu_position = 0U;
	gint length = 0;
	MenuModel* _tmp0_ = NULL;
	gchar** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	gchar** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gint _tmp30_ = 0;
	GtkMenuItem** _tmp31_ = NULL;
	gint _tmp31__length1 = 0;
	g_return_if_fail (IS_INDICATOR (self));
	menu_position = (guint) 2;
	_tmp0_ = self->priv->_menumodel;
	_tmp1_ = menu_model_get_expressions (_tmp0_, &_tmp1__length1);
	_tmp2_ = _tmp1_;
	_tmp2__length1 = _tmp1__length1;
	length = _tmp2__length1;
	{
		guint j = 0U;
		j = (guint) 0;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				gboolean _tmp4_ = FALSE;
				guint _tmp6_ = 0U;
				gint _tmp7_ = 0;
				GtkMenuItem* item = NULL;
				guint _tmp8_ = 0U;
				GtkMenuItem** _tmp9_ = NULL;
				gint _tmp9__length1 = 0;
				GtkMenuItem* _tmp22_ = NULL;
				MenuModel* _tmp23_ = NULL;
				guint _tmp24_ = 0U;
				ExpressionCache* _tmp25_ = NULL;
				ExpressionCache* _tmp26_ = NULL;
				gchar* _tmp27_ = NULL;
				gchar* _tmp28_ = NULL;
				guint _tmp29_ = 0U;
				_tmp4_ = _tmp3_;
				if (!_tmp4_) {
					guint _tmp5_ = 0U;
					_tmp5_ = j;
					j = _tmp5_ + 1;
				}
				_tmp3_ = FALSE;
				_tmp6_ = j;
				_tmp7_ = length;
				if (!(_tmp6_ < ((guint) _tmp7_))) {
					break;
				}
				_tmp8_ = j;
				_tmp9_ = self->priv->menuitems;
				_tmp9__length1 = self->priv->menuitems_length1;
				if (_tmp8_ < ((guint) _tmp9__length1)) {
					GtkMenuItem** _tmp10_ = NULL;
					gint _tmp10__length1 = 0;
					guint _tmp11_ = 0U;
					GtkMenuItem* _tmp12_ = NULL;
					GtkMenuItem* _tmp13_ = NULL;
					_tmp10_ = self->priv->menuitems;
					_tmp10__length1 = self->priv->menuitems_length1;
					_tmp11_ = j;
					_tmp12_ = _tmp10_[_tmp11_];
					_tmp13_ = _g_object_ref0 (_tmp12_);
					_g_object_unref0 (item);
					item = _tmp13_;
				} else {
					GtkMenuItem* _tmp14_ = NULL;
					GtkMenuItem* _tmp15_ = NULL;
					GtkMenu* _tmp16_ = NULL;
					GtkMenuItem* _tmp17_ = NULL;
					guint _tmp18_ = 0U;
					GtkMenuItem** _tmp19_ = NULL;
					gint _tmp19__length1 = 0;
					GtkMenuItem* _tmp20_ = NULL;
					GtkMenuItem* _tmp21_ = NULL;
					_tmp14_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("");
					g_object_ref_sink (_tmp14_);
					_g_object_unref0 (item);
					item = _tmp14_;
					_tmp15_ = item;
					gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GTK_TYPE_WIDGET, GtkWidget), TRUE);
					_tmp16_ = self->priv->_menu;
					_tmp17_ = item;
					_tmp18_ = menu_position;
					gtk_menu_shell_insert (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GTK_TYPE_MENU_SHELL, GtkMenuShell), G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GTK_TYPE_WIDGET, GtkWidget), (gint) _tmp18_);
					_tmp19_ = self->priv->menuitems;
					_tmp19__length1 = self->priv->menuitems_length1;
					_tmp20_ = item;
					_tmp21_ = _g_object_ref0 (_tmp20_);
					_vala_array_add11 (&self->priv->menuitems, &self->priv->menuitems_length1, &self->priv->_menuitems_size_, _tmp21_);
				}
				_tmp22_ = item;
				_tmp23_ = self->priv->_menumodel;
				_tmp24_ = j;
				_tmp25_ = menu_model_expression (_tmp23_, _tmp24_);
				_tmp26_ = _tmp25_;
				_tmp27_ = expression_cache_label (_tmp26_);
				_tmp28_ = _tmp27_;
				gtk_menu_item_set_label (_tmp22_, _tmp28_);
				_g_free0 (_tmp28_);
				_g_object_unref0 (_tmp26_);
				_tmp29_ = menu_position;
				menu_position = _tmp29_ + 1;
				_g_object_unref0 (item);
			}
		}
	}
	_tmp30_ = length;
	_tmp31_ = self->priv->menuitems;
	_tmp31__length1 = self->priv->menuitems_length1;
	if (_tmp30_ != _tmp31__length1) {
		GtkMenuItem** _tmp42_ = NULL;
		gint _tmp42__length1 = 0;
		gint _tmp43_ = 0;
		GtkMenuItem** _tmp44_ = NULL;
		gint _tmp44__length1 = 0;
		{
			guint j = 0U;
			gint _tmp32_ = 0;
			guint jsize = 0U;
			GtkMenuItem** _tmp33_ = NULL;
			gint _tmp33__length1 = 0;
			_tmp32_ = length;
			j = (guint) _tmp32_;
			_tmp33_ = self->priv->menuitems;
			_tmp33__length1 = self->priv->menuitems_length1;
			jsize = (guint) _tmp33__length1;
			{
				gboolean _tmp34_ = FALSE;
				_tmp34_ = TRUE;
				while (TRUE) {
					gboolean _tmp35_ = FALSE;
					guint _tmp37_ = 0U;
					guint _tmp38_ = 0U;
					GtkMenuItem** _tmp39_ = NULL;
					gint _tmp39__length1 = 0;
					guint _tmp40_ = 0U;
					GtkMenuItem* _tmp41_ = NULL;
					_tmp35_ = _tmp34_;
					if (!_tmp35_) {
						guint _tmp36_ = 0U;
						_tmp36_ = j;
						j = _tmp36_ + 1;
					}
					_tmp34_ = FALSE;
					_tmp37_ = j;
					_tmp38_ = jsize;
					if (!(_tmp37_ < _tmp38_)) {
						break;
					}
					_tmp39_ = self->priv->menuitems;
					_tmp39__length1 = self->priv->menuitems_length1;
					_tmp40_ = j;
					_tmp41_ = _tmp39_[_tmp40_];
					gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, GTK_TYPE_WIDGET, GtkWidget));
				}
			}
		}
		_tmp42_ = self->priv->menuitems;
		_tmp42__length1 = self->priv->menuitems_length1;
		_tmp43_ = length;
		_tmp44_ = ((_tmp42_ + 0) != NULL) ? _vala_array_dup13 (_tmp42_ + 0, _tmp43_ - 0) : ((gpointer) (_tmp42_ + 0));
		_tmp44__length1 = _tmp43_ - 0;
		self->priv->menuitems = (_vala_array_free (self->priv->menuitems, self->priv->menuitems_length1, (GDestroyNotify) g_object_unref), NULL);
		self->priv->menuitems = _tmp44_;
		self->priv->menuitems_length1 = _tmp44__length1;
		self->priv->_menuitems_size_ = self->priv->menuitems_length1;
	}
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		Indicator * self;
		self = _data1_->self;
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}


static void ____lambda8_ (Block1Data* _data1_, GtkWidget* w) {
	Indicator * self;
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GtkWidget* _tmp5_ = NULL;
	guint _tmp6_ = 0U;
	guint _tmp7_ = 0U;
	guint _tmp8_ = 0U;
	self = _data1_->self;
	g_return_if_fail (GTK_IS_WIDGET (w));
	_tmp0_ = w;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GTK_TYPE_IMAGE)) {
		return;
	}
	_tmp1_ = w;
	_tmp2_ = self->priv->currenticonindex;
	_tmp3_ = indicator_iconpath (self, _tmp2_);
	_tmp4_ = _tmp3_;
	gtk_image_set_from_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GTK_TYPE_IMAGE, GtkImage), _tmp4_);
	_g_free0 (_tmp4_);
	_tmp5_ = w;
	_tmp6_ = self->priv->lasticonwidth;
	_tmp7_ = self->priv->_height;
	_tmp8_ = MAX (_tmp6_, _tmp7_);
	gtk_image_set_pixel_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GTK_TYPE_IMAGE, GtkImage), (gint) _tmp8_);
	_data1_->found = TRUE;
}


static void _____lambda8__gtk_callback (GtkWidget* widget, gpointer self) {
	____lambda8_ (self, widget);
}


static void indicator_updategraphsview (Indicator* self) {
	Block1Data* _data1_;
	GList* _tmp0_ = NULL;
	gboolean _tmp8_ = FALSE;
	IndicatorView* _tmp16_ = NULL;
	MenuModel* _tmp17_ = NULL;
	ExpressionCache* _tmp18_ = NULL;
	ExpressionCache* _tmp19_ = NULL;
	gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = g_object_ref (self);
	indicator_iconwrite (self);
	_data1_->found = FALSE;
	_tmp0_ = gtk_window_list_toplevels ();
	{
		GList* toplevel_collection = NULL;
		GList* toplevel_it = NULL;
		toplevel_collection = _tmp0_;
		for (toplevel_it = toplevel_collection; toplevel_it != NULL; toplevel_it = toplevel_it->next) {
			GtkWindow* toplevel = NULL;
			toplevel = (GtkWindow*) toplevel_it->data;
			{
				gboolean _tmp1_ = FALSE;
				GtkWindow* _tmp2_ = NULL;
				GType _tmp3_ = 0UL;
				const gchar* _tmp4_ = NULL;
				gboolean _tmp6_ = FALSE;
				GtkWindow* _tmp7_ = NULL;
				_tmp2_ = toplevel;
				_tmp3_ = G_TYPE_FROM_INSTANCE (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, G_TYPE_OBJECT, GObject));
				_tmp4_ = g_type_name (_tmp3_);
				if (g_strcmp0 (_tmp4_, "GtkTrayIcon") != 0) {
					_tmp1_ = TRUE;
				} else {
					GtkWindow* _tmp5_ = NULL;
					_tmp5_ = toplevel;
					_tmp1_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, GTK_TYPE_CONTAINER);
				}
				_tmp6_ = _tmp1_;
				if (_tmp6_) {
					continue;
				}
				_tmp7_ = toplevel;
				gtk_container_foreach (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GTK_TYPE_CONTAINER, GtkContainer), _____lambda8__gtk_callback, _data1_);
			}
		}
		_g_list_free0 (toplevel_collection);
	}
	_tmp8_ = _data1_->found;
	if (!_tmp8_) {
		gchar* _tmp9_ = NULL;
		guint _tmp10_ = 0U;
		IndicatorView* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
		_tmp10_ = self->priv->lasticonwidth;
		if (_tmp10_ > ((guint) 0)) {
			guint _tmp11_ = 0U;
			gchar* _tmp12_ = NULL;
			_tmp11_ = self->priv->currenticonindex;
			_tmp12_ = indicator_iconname (self, _tmp11_);
			_g_free0 (_tmp9_);
			_tmp9_ = _tmp12_;
		} else {
			gchar* _tmp13_ = NULL;
			_tmp13_ = g_strdup ("");
			_g_free0 (_tmp9_);
			_tmp9_ = _tmp13_;
		}
		_tmp14_ = self->priv->indicatorview;
		_tmp15_ = _tmp9_;
		indicator_view_set_icon (_tmp14_, _tmp15_);
		_g_free0 (_tmp9_);
	}
	_tmp16_ = self->priv->indicatorview;
	_tmp17_ = self->priv->_descriptionmodel;
	_tmp18_ = menu_model_expression (_tmp17_, (guint) 0);
	_tmp19_ = _tmp18_;
	_tmp20_ = expression_cache_label (_tmp19_);
	_tmp21_ = _tmp20_;
	indicator_view_set_description (_tmp16_, _tmp21_);
	_g_free0 (_tmp21_);
	_g_object_unref0 (_tmp19_);
	block1_data_unref (_data1_);
	_data1_ = NULL;
}


static void indicator_updatelabelview (Indicator* self) {
	gint indicatorcount = 0;
	MenuModel* _tmp0_ = NULL;
	gchar** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	gchar** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gchar* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	gint _tmp5_ = 0;
	gboolean _tmp8_ = FALSE;
	gchar* label = NULL;
	const gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	gboolean _tmp18_ = FALSE;
	gint _tmp19_ = 0;
	gboolean _tmp22_ = FALSE;
	gchar* guide = NULL;
	const gchar* _tmp29_ = NULL;
	gchar* _tmp30_ = NULL;
	const gchar* _tmp31_ = NULL;
	gboolean _tmp32_ = FALSE;
	guint _tmp33_ = 0U;
	gboolean _tmp35_ = FALSE;
	IndicatorView* _tmp37_ = NULL;
	const gchar* _tmp38_ = NULL;
	const gchar* _tmp39_ = NULL;
	gboolean _tmp40_ = FALSE;
	guint _tmp41_ = 0U;
	gboolean _tmp43_ = FALSE;
	IndicatorView* _tmp45_ = NULL;
	const gchar* _tmp46_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = self->priv->_labelmodel;
	_tmp1_ = menu_model_get_expressions (_tmp0_, &_tmp1__length1);
	_tmp2_ = _tmp1_;
	_tmp2__length1 = _tmp1__length1;
	indicatorcount = _tmp2__length1;
	_tmp5_ = self->priv->_indicator_index;
	if (0 <= _tmp5_) {
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		_tmp6_ = self->priv->_indicator_index;
		_tmp7_ = indicatorcount;
		_tmp4_ = _tmp6_ < _tmp7_;
	} else {
		_tmp4_ = FALSE;
	}
	_tmp8_ = _tmp4_;
	if (_tmp8_) {
		MenuModel* _tmp9_ = NULL;
		gint _tmp10_ = 0;
		ExpressionCache* _tmp11_ = NULL;
		ExpressionCache* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		_tmp9_ = self->priv->_labelmodel;
		_tmp10_ = self->priv->_indicator_index;
		_tmp11_ = menu_model_expression (_tmp9_, (guint) _tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = expression_cache_label (_tmp12_);
		_g_free0 (_tmp3_);
		_tmp3_ = _tmp13_;
		_g_object_unref0 (_tmp12_);
	} else {
		gchar* _tmp14_ = NULL;
		_tmp14_ = g_strdup ("");
		_g_free0 (_tmp3_);
		_tmp3_ = _tmp14_;
	}
	_tmp15_ = _tmp3_;
	_tmp16_ = g_strdup (_tmp15_);
	label = _tmp16_;
	_tmp19_ = self->priv->_indicator_index;
	if (0 <= _tmp19_) {
		gint _tmp20_ = 0;
		gint _tmp21_ = 0;
		_tmp20_ = self->priv->_indicator_index;
		_tmp21_ = indicatorcount;
		_tmp18_ = _tmp20_ < _tmp21_;
	} else {
		_tmp18_ = FALSE;
	}
	_tmp22_ = _tmp18_;
	if (_tmp22_) {
		MenuModel* _tmp23_ = NULL;
		gint _tmp24_ = 0;
		ExpressionCache* _tmp25_ = NULL;
		ExpressionCache* _tmp26_ = NULL;
		gchar* _tmp27_ = NULL;
		_tmp23_ = self->priv->_labelmodel;
		_tmp24_ = self->priv->_indicator_index;
		_tmp25_ = menu_model_expression (_tmp23_, (guint) _tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = expression_cache_guide (_tmp26_);
		_g_free0 (_tmp17_);
		_tmp17_ = _tmp27_;
		_g_object_unref0 (_tmp26_);
	} else {
		gchar* _tmp28_ = NULL;
		_tmp28_ = g_strdup ("");
		_g_free0 (_tmp17_);
		_tmp17_ = _tmp28_;
	}
	_tmp29_ = _tmp17_;
	_tmp30_ = g_strdup (_tmp29_);
	guide = _tmp30_;
	_tmp33_ = self->priv->lasticonwidth;
	if (_tmp33_ == ((guint) 0)) {
		const gchar* _tmp34_ = NULL;
		_tmp34_ = label;
		_tmp32_ = g_strcmp0 (_tmp34_, "") == 0;
	} else {
		_tmp32_ = FALSE;
	}
	_tmp35_ = _tmp32_;
	if (_tmp35_) {
		_tmp31_ = "im";
	} else {
		const gchar* _tmp36_ = NULL;
		_tmp36_ = label;
		_tmp31_ = _tmp36_;
	}
	_tmp37_ = self->priv->indicatorview;
	_tmp38_ = _tmp31_;
	indicator_view_set_label (_tmp37_, _tmp38_);
	_tmp41_ = self->priv->lasticonwidth;
	if (_tmp41_ == ((guint) 0)) {
		const gchar* _tmp42_ = NULL;
		_tmp42_ = guide;
		_tmp40_ = g_strcmp0 (_tmp42_, "") == 0;
	} else {
		_tmp40_ = FALSE;
	}
	_tmp43_ = _tmp40_;
	if (_tmp43_) {
		_tmp39_ = "im";
	} else {
		const gchar* _tmp44_ = NULL;
		_tmp44_ = guide;
		_tmp39_ = _tmp44_;
	}
	_tmp45_ = self->priv->indicatorview;
	_tmp46_ = _tmp39_;
	indicator_view_set_guide (_tmp45_, _tmp46_);
	_g_free0 (guide);
	_g_free0 (_tmp17_);
	_g_free0 (label);
	_g_free0 (_tmp3_);
}


static gchar* indicator_iconname (Indicator* self, guint index) {
	gchar* result = NULL;
	guint _tmp0_ = 0U;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	g_return_val_if_fail (IS_INDICATOR (self), NULL);
	_tmp0_ = index;
	_tmp1_ = g_strdup_printf ("%u", _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strconcat ("indicator-multiload-graphs-", _tmp2_, NULL);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	result = _tmp4_;
	return result;
}


static gchar* indicator_iconpath (Indicator* self, guint index) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	g_return_val_if_fail (IS_INDICATOR (self), NULL);
	_tmp0_ = self->priv->_icondirectory;
	_tmp1_ = index;
	_tmp2_ = indicator_iconname (self, _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strconcat (_tmp3_, ".png", NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_build_filename (_tmp0_, _tmp5_, NULL);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	result = _tmp7_;
	return result;
}


static void indicator_iconwritedummy (Indicator* self) {
	cairo_surface_t* surface = NULL;
	cairo_surface_t* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 1, 1);
	surface = _tmp0_;
	_tmp1_ = indicator_iconpath (self, (guint) 0);
	_tmp2_ = _tmp1_;
	cairo_surface_write_to_png (surface, _tmp2_);
	_g_free0 (_tmp2_);
	_tmp3_ = indicator_iconpath (self, (guint) 1);
	_tmp4_ = _tmp3_;
	cairo_surface_write_to_png (surface, _tmp4_);
	_g_free0 (_tmp4_);
	_cairo_surface_destroy0 (surface);
}


static TraceModel** _vala_array_dup14 (TraceModel** self, int length) {
	TraceModel** result;
	int i;
	result = g_new0 (TraceModel*, length + 1);
	for (i = 0; i < length; i++) {
		TraceModel* _tmp0_ = NULL;
		_tmp0_ = _g_object_ref0 (self[i]);
		result[i] = _tmp0_;
	}
	return result;
}


static void indicator_iconwrite (Indicator* self) {
	GraphModels* _tmp0_ = NULL;
	guint count = 0U;
	GraphModels* _tmp1_ = NULL;
	GraphModel** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	GraphModel** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	guint _tmp9_ = 0U;
	guint _tmp10_ = 0U;
	guint _tmp11_ = 0U;
	cairo_surface_t* surface = NULL;
	guint _tmp12_ = 0U;
	guint _tmp13_ = 0U;
	cairo_surface_t* _tmp14_ = NULL;
	cairo_t* ctx = NULL;
	cairo_surface_t* _tmp15_ = NULL;
	cairo_t* _tmp16_ = NULL;
	cairo_t* _tmp17_ = NULL;
	cairo_t* _tmp18_ = NULL;
	guint offset = 0U;
	GraphModels* _tmp19_ = NULL;
	GraphModel** _tmp20_ = NULL;
	gint _tmp20__length1 = 0;
	GraphModel** _tmp21_ = NULL;
	gint _tmp21__length1 = 0;
	guint _tmp122_ = 0U;
	cairo_surface_t* _tmp123_ = NULL;
	guint _tmp124_ = 0U;
	gchar* _tmp125_ = NULL;
	gchar* _tmp126_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	self->priv->lasticonwidth = (guint) 0;
	_tmp0_ = self->priv->_graphmodels;
	if (_tmp0_ == NULL) {
		return;
	}
	count = (guint) 0;
	_tmp1_ = self->priv->_graphmodels;
	_tmp2_ = graph_models_get_graphmodels (_tmp1_, &_tmp2__length1);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp2__length1;
	{
		GraphModel** graphmodel_collection = NULL;
		gint graphmodel_collection_length1 = 0;
		gint _graphmodel_collection_size_ = 0;
		gint graphmodel_it = 0;
		graphmodel_collection = _tmp3_;
		graphmodel_collection_length1 = _tmp3__length1;
		for (graphmodel_it = 0; graphmodel_it < _tmp3__length1; graphmodel_it = graphmodel_it + 1) {
			GraphModel* _tmp4_ = NULL;
			GraphModel* graphmodel = NULL;
			_tmp4_ = _g_object_ref0 (graphmodel_collection[graphmodel_it]);
			graphmodel = _tmp4_;
			{
				GraphModel* _tmp5_ = NULL;
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				_tmp5_ = graphmodel;
				_tmp6_ = graph_model_get_enabled (_tmp5_);
				_tmp7_ = _tmp6_;
				if (_tmp7_) {
					guint _tmp8_ = 0U;
					_tmp8_ = count;
					count = _tmp8_ + 1;
				}
				_g_object_unref0 (graphmodel);
			}
		}
	}
	_tmp9_ = count;
	if (_tmp9_ == ((guint) 0)) {
		return;
	}
	_tmp10_ = count;
	_tmp11_ = self->priv->_width;
	self->priv->lasticonwidth = (guint) (((gint) (_tmp10_ * (_tmp11_ + 2))) - 2);
	_tmp12_ = self->priv->lasticonwidth;
	_tmp13_ = self->priv->_height;
	_tmp14_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, (gint) _tmp12_, (gint) _tmp13_);
	surface = _tmp14_;
	_tmp15_ = surface;
	_tmp16_ = cairo_create (_tmp15_);
	ctx = _tmp16_;
	_tmp17_ = ctx;
	cairo_set_antialias (_tmp17_, CAIRO_ANTIALIAS_NONE);
	_tmp18_ = ctx;
	cairo_set_line_width (_tmp18_, (gdouble) 1);
	offset = (guint) 0;
	_tmp19_ = self->priv->_graphmodels;
	_tmp20_ = graph_models_get_graphmodels (_tmp19_, &_tmp20__length1);
	_tmp21_ = _tmp20_;
	_tmp21__length1 = _tmp20__length1;
	{
		GraphModel** graphmodel_collection = NULL;
		gint graphmodel_collection_length1 = 0;
		gint _graphmodel_collection_size_ = 0;
		gint graphmodel_it = 0;
		graphmodel_collection = _tmp21_;
		graphmodel_collection_length1 = _tmp21__length1;
		for (graphmodel_it = 0; graphmodel_it < _tmp21__length1; graphmodel_it = graphmodel_it + 1) {
			GraphModel* _tmp22_ = NULL;
			GraphModel* graphmodel = NULL;
			_tmp22_ = _g_object_ref0 (graphmodel_collection[graphmodel_it]);
			graphmodel = _tmp22_;
			{
				GraphModel* _tmp23_ = NULL;
				gboolean _tmp24_ = FALSE;
				gboolean _tmp25_ = FALSE;
				cairo_t* _tmp26_ = NULL;
				GdkRGBA _tmp27_ = {0};
				cairo_t* _tmp28_ = NULL;
				guint _tmp29_ = 0U;
				guint _tmp30_ = 0U;
				guint _tmp31_ = 0U;
				cairo_t* _tmp32_ = NULL;
				TraceModel** tracemodels = NULL;
				GraphModel* _tmp33_ = NULL;
				TraceModel** _tmp34_ = NULL;
				gint _tmp34__length1 = 0;
				TraceModel** _tmp35_ = NULL;
				gint _tmp35__length1 = 0;
				TraceModel** _tmp36_ = NULL;
				gint _tmp36__length1 = 0;
				gint tracemodels_length1 = 0;
				gint _tracemodels_size_ = 0;
				gdouble* values = NULL;
				TraceModel** _tmp37_ = NULL;
				gint _tmp37__length1 = 0;
				guint _tmp38_ = 0U;
				gdouble* _tmp39_ = NULL;
				gint values_length1 = 0;
				gint values_length2 = 0;
				gdouble scale = 0.0;
				GraphModel* _tmp40_ = NULL;
				gdouble _tmp41_ = 0.0;
				gdouble _tmp42_ = 0.0;
				guint _tmp120_ = 0U;
				guint _tmp121_ = 0U;
				_tmp23_ = graphmodel;
				_tmp24_ = graph_model_get_enabled (_tmp23_);
				_tmp25_ = _tmp24_;
				if (!_tmp25_) {
					_g_object_unref0 (graphmodel);
					continue;
				}
				_tmp26_ = ctx;
				_tmp27_ = self->priv->_background_rgba;
				gdk_cairo_set_source_rgba (_tmp26_, &_tmp27_);
				_tmp28_ = ctx;
				_tmp29_ = offset;
				_tmp30_ = self->priv->_width;
				_tmp31_ = self->priv->_height;
				cairo_rectangle (_tmp28_, (gdouble) _tmp29_, (gdouble) 0, (gdouble) _tmp30_, (gdouble) _tmp31_);
				_tmp32_ = ctx;
				cairo_fill (_tmp32_);
				_tmp33_ = graphmodel;
				_tmp34_ = graph_model_get_tracemodels (_tmp33_, &_tmp34__length1);
				_tmp35_ = _tmp34_;
				_tmp35__length1 = _tmp34__length1;
				_tmp36_ = (_tmp35_ != NULL) ? _vala_array_dup14 (_tmp35_, _tmp35__length1) : ((gpointer) _tmp35_);
				_tmp36__length1 = _tmp35__length1;
				tracemodels = _tmp36_;
				tracemodels_length1 = _tmp36__length1;
				_tracemodels_size_ = tracemodels_length1;
				_tmp37_ = tracemodels;
				_tmp37__length1 = tracemodels_length1;
				_tmp38_ = self->priv->_width;
				_tmp39_ = g_new0 (gdouble, _tmp37__length1 * _tmp38_);
				values = _tmp39_;
				values_length1 = _tmp37__length1;
				values_length2 = _tmp38_;
				_tmp40_ = graphmodel;
				_tmp41_ = graph_model_get_scale (_tmp40_);
				_tmp42_ = _tmp41_;
				scale = _tmp42_;
				{
					guint j = 0U;
					guint jsize = 0U;
					gdouble* _tmp43_ = NULL;
					gint _tmp43__length1 = 0;
					gint _tmp43__length2 = 0;
					gint _tmp44_ = 0;
					j = (guint) 0;
					_tmp43_ = values;
					_tmp43__length1 = values_length1;
					_tmp43__length2 = values_length2;
					_tmp44_ = _tmp43__length1;
					jsize = (guint) _tmp44_;
					{
						gboolean _tmp45_ = FALSE;
						_tmp45_ = TRUE;
						while (TRUE) {
							gboolean _tmp46_ = FALSE;
							guint _tmp48_ = 0U;
							guint _tmp49_ = 0U;
							gboolean enabled = FALSE;
							TraceModel** _tmp50_ = NULL;
							gint _tmp50__length1 = 0;
							guint _tmp51_ = 0U;
							TraceModel* _tmp52_ = NULL;
							gboolean _tmp53_ = FALSE;
							gboolean _tmp54_ = FALSE;
							gdouble* tracedata = NULL;
							TraceModel** _tmp55_ = NULL;
							gint _tmp55__length1 = 0;
							guint _tmp56_ = 0U;
							TraceModel* _tmp57_ = NULL;
							gdouble* _tmp58_ = NULL;
							gint _tmp58__length1 = 0;
							gdouble* _tmp59_ = NULL;
							gint _tmp59__length1 = 0;
							gint tracedata_length1 = 0;
							gint _tracedata_size_ = 0;
							_tmp46_ = _tmp45_;
							if (!_tmp46_) {
								guint _tmp47_ = 0U;
								_tmp47_ = j;
								j = _tmp47_ + 1;
							}
							_tmp45_ = FALSE;
							_tmp48_ = j;
							_tmp49_ = jsize;
							if (!(_tmp48_ < _tmp49_)) {
								break;
							}
							_tmp50_ = tracemodels;
							_tmp50__length1 = tracemodels_length1;
							_tmp51_ = j;
							_tmp52_ = _tmp50_[_tmp51_];
							_tmp53_ = trace_model_get_enabled (_tmp52_);
							_tmp54_ = _tmp53_;
							enabled = _tmp54_;
							_tmp55_ = tracemodels;
							_tmp55__length1 = tracemodels_length1;
							_tmp56_ = j;
							_tmp57_ = _tmp55_[_tmp56_];
							_tmp58_ = trace_model_get_values (_tmp57_, &_tmp58__length1);
							_tmp59_ = _tmp58_;
							_tmp59__length1 = _tmp58__length1;
							tracedata = _tmp59_;
							tracedata_length1 = _tmp59__length1;
							_tracedata_size_ = tracedata_length1;
							{
								guint i = 0U;
								guint isize = 0U;
								gdouble* _tmp60_ = NULL;
								gint _tmp60__length1 = 0;
								gint _tmp60__length2 = 0;
								gint _tmp61_ = 0;
								i = (guint) 0;
								_tmp60_ = values;
								_tmp60__length1 = values_length1;
								_tmp60__length2 = values_length2;
								_tmp61_ = _tmp60__length2;
								isize = (guint) _tmp61_;
								{
									gboolean _tmp62_ = FALSE;
									_tmp62_ = TRUE;
									while (TRUE) {
										gboolean _tmp63_ = FALSE;
										guint _tmp65_ = 0U;
										guint _tmp66_ = 0U;
										gdouble _tmp67_ = 0.0;
										guint _tmp68_ = 0U;
										gdouble _tmp73_ = 0.0;
										gboolean _tmp74_ = FALSE;
										gdouble* _tmp78_ = NULL;
										gint _tmp78__length1 = 0;
										gint _tmp78__length2 = 0;
										guint _tmp79_ = 0U;
										guint _tmp80_ = 0U;
										gdouble _tmp81_ = 0.0;
										gdouble _tmp82_ = 0.0;
										gdouble _tmp83_ = 0.0;
										gdouble _tmp84_ = 0.0;
										_tmp63_ = _tmp62_;
										if (!_tmp63_) {
											guint _tmp64_ = 0U;
											_tmp64_ = i;
											i = _tmp64_ + 1;
										}
										_tmp62_ = FALSE;
										_tmp65_ = i;
										_tmp66_ = isize;
										if (!(_tmp65_ < _tmp66_)) {
											break;
										}
										_tmp68_ = j;
										if (_tmp68_ > ((guint) 0)) {
											gdouble* _tmp69_ = NULL;
											gint _tmp69__length1 = 0;
											gint _tmp69__length2 = 0;
											guint _tmp70_ = 0U;
											guint _tmp71_ = 0U;
											gdouble _tmp72_ = 0.0;
											_tmp69_ = values;
											_tmp69__length1 = values_length1;
											_tmp69__length2 = values_length2;
											_tmp70_ = j;
											_tmp71_ = i;
											_tmp72_ = _tmp69_[((_tmp70_ - 1) * _tmp69__length2) + _tmp71_];
											_tmp67_ = _tmp72_;
										} else {
											_tmp67_ = (gdouble) 0;
										}
										_tmp74_ = enabled;
										if (_tmp74_) {
											gdouble* _tmp75_ = NULL;
											gint _tmp75__length1 = 0;
											guint _tmp76_ = 0U;
											gdouble _tmp77_ = 0.0;
											_tmp75_ = tracedata;
											_tmp75__length1 = tracedata_length1;
											_tmp76_ = i;
											_tmp77_ = _tmp75_[_tmp76_];
											_tmp73_ = _tmp77_;
										} else {
											_tmp73_ = (gdouble) 0;
										}
										_tmp78_ = values;
										_tmp78__length1 = values_length1;
										_tmp78__length2 = values_length2;
										_tmp79_ = j;
										_tmp80_ = i;
										_tmp81_ = _tmp67_;
										_tmp82_ = _tmp73_;
										_tmp83_ = scale;
										_tmp78_[(_tmp79_ * _tmp78__length2) + _tmp80_] = _tmp81_ + (_tmp82_ / _tmp83_);
										_tmp84_ = _tmp78_[(_tmp79_ * _tmp78__length2) + _tmp80_];
									}
								}
							}
						}
					}
				}
				{
					gint j = 0;
					gdouble* _tmp85_ = NULL;
					gint _tmp85__length1 = 0;
					gint _tmp85__length2 = 0;
					gint _tmp86_ = 0;
					_tmp85_ = values;
					_tmp85__length1 = values_length1;
					_tmp85__length2 = values_length2;
					_tmp86_ = _tmp85__length1;
					j = _tmp86_ - 1;
					{
						gboolean _tmp87_ = FALSE;
						_tmp87_ = TRUE;
						while (TRUE) {
							gboolean _tmp88_ = FALSE;
							gint _tmp90_ = 0;
							cairo_t* _tmp91_ = NULL;
							GraphModel* _tmp92_ = NULL;
							TraceModel** _tmp93_ = NULL;
							gint _tmp93__length1 = 0;
							TraceModel** _tmp94_ = NULL;
							gint _tmp94__length1 = 0;
							gint _tmp95_ = 0;
							TraceModel* _tmp96_ = NULL;
							GdkRGBA _tmp97_ = {0};
							GdkRGBA _tmp98_ = {0};
							cairo_t* _tmp119_ = NULL;
							_tmp88_ = _tmp87_;
							if (!_tmp88_) {
								gint _tmp89_ = 0;
								_tmp89_ = j;
								j = _tmp89_ - 1;
							}
							_tmp87_ = FALSE;
							_tmp90_ = j;
							if (!(_tmp90_ >= 0)) {
								break;
							}
							_tmp91_ = ctx;
							_tmp92_ = graphmodel;
							_tmp93_ = graph_model_get_tracemodels (_tmp92_, &_tmp93__length1);
							_tmp94_ = _tmp93_;
							_tmp94__length1 = _tmp93__length1;
							_tmp95_ = j;
							_tmp96_ = _tmp94_[_tmp95_];
							trace_model_get_rgba (_tmp96_, &_tmp97_);
							_tmp98_ = _tmp97_;
							gdk_cairo_set_source_rgba (_tmp91_, &_tmp98_);
							{
								guint i = 0U;
								guint isize = 0U;
								gdouble* _tmp99_ = NULL;
								gint _tmp99__length1 = 0;
								gint _tmp99__length2 = 0;
								gint _tmp100_ = 0;
								i = (guint) 0;
								_tmp99_ = values;
								_tmp99__length1 = values_length1;
								_tmp99__length2 = values_length2;
								_tmp100_ = _tmp99__length2;
								isize = (guint) _tmp100_;
								{
									gboolean _tmp101_ = FALSE;
									_tmp101_ = TRUE;
									while (TRUE) {
										gboolean _tmp102_ = FALSE;
										guint _tmp104_ = 0U;
										guint _tmp105_ = 0U;
										cairo_t* _tmp106_ = NULL;
										guint _tmp107_ = 0U;
										guint _tmp108_ = 0U;
										guint _tmp109_ = 0U;
										cairo_t* _tmp110_ = NULL;
										guint _tmp111_ = 0U;
										guint _tmp112_ = 0U;
										guint _tmp113_ = 0U;
										guint _tmp114_ = 0U;
										gdouble* _tmp115_ = NULL;
										gint _tmp115__length1 = 0;
										gint _tmp115__length2 = 0;
										gint _tmp116_ = 0;
										guint _tmp117_ = 0U;
										gdouble _tmp118_ = 0.0;
										_tmp102_ = _tmp101_;
										if (!_tmp102_) {
											guint _tmp103_ = 0U;
											_tmp103_ = i;
											i = _tmp103_ + 1;
										}
										_tmp101_ = FALSE;
										_tmp104_ = i;
										_tmp105_ = isize;
										if (!(_tmp104_ < _tmp105_)) {
											break;
										}
										_tmp106_ = ctx;
										_tmp107_ = offset;
										_tmp108_ = i;
										_tmp109_ = self->priv->_height;
										cairo_move_to (_tmp106_, (0.5 + _tmp107_) + _tmp108_, _tmp109_ + 0.5);
										_tmp110_ = ctx;
										_tmp111_ = offset;
										_tmp112_ = i;
										_tmp113_ = self->priv->_height;
										_tmp114_ = self->priv->_height;
										_tmp115_ = values;
										_tmp115__length1 = values_length1;
										_tmp115__length2 = values_length2;
										_tmp116_ = j;
										_tmp117_ = i;
										_tmp118_ = _tmp115_[(_tmp116_ * _tmp115__length2) + _tmp117_];
										cairo_line_to (_tmp110_, (0.5 + _tmp111_) + _tmp112_, (_tmp113_ + 0.5) - (_tmp114_ * _tmp118_));
									}
								}
							}
							_tmp119_ = ctx;
							cairo_stroke (_tmp119_);
						}
					}
				}
				_tmp120_ = offset;
				_tmp121_ = self->priv->_width;
				offset = _tmp120_ + (_tmp121_ + 2);
				values = (g_free (values), NULL);
				tracemodels = (_vala_array_free (tracemodels, tracemodels_length1, (GDestroyNotify) g_object_unref), NULL);
				_g_object_unref0 (graphmodel);
			}
		}
	}
	_tmp122_ = self->priv->currenticonindex;
	self->priv->currenticonindex = 1 - _tmp122_;
	_tmp123_ = surface;
	_tmp124_ = self->priv->currenticonindex;
	_tmp125_ = indicator_iconpath (self, _tmp124_);
	_tmp126_ = _tmp125_;
	cairo_surface_write_to_png (_tmp123_, _tmp126_);
	_g_free0 (_tmp126_);
	_cairo_destroy0 (ctx);
	_cairo_surface_destroy0 (surface);
}


const gchar* indicator_get_icondirectory (Indicator* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (IS_INDICATOR (self), NULL);
	_tmp0_ = self->priv->_icondirectory;
	result = _tmp0_;
	return result;
}


static void indicator_set_icondirectory (Indicator* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_icondirectory);
	self->priv->_icondirectory = _tmp1_;
	g_object_notify ((GObject *) self, "icondirectory");
}


Providers* indicator_get_providers (Indicator* self) {
	Providers* result;
	Providers* _tmp0_ = NULL;
	g_return_val_if_fail (IS_INDICATOR (self), NULL);
	_tmp0_ = self->priv->_providers;
	result = _tmp0_;
	return result;
}


static void indicator_set_providers (Indicator* self, Providers* value) {
	Providers* _tmp0_ = NULL;
	Providers* _tmp1_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_providers);
	self->priv->_providers = _tmp1_;
	g_object_notify ((GObject *) self, "providers");
}


GtkMenu* indicator_get_menu (Indicator* self) {
	GtkMenu* result;
	GtkMenu* _tmp0_ = NULL;
	g_return_val_if_fail (IS_INDICATOR (self), NULL);
	_tmp0_ = self->priv->_menu;
	result = _tmp0_;
	return result;
}


static void indicator_set_menu (Indicator* self, GtkMenu* value) {
	GtkMenu* _tmp0_ = NULL;
	GtkMenu* _tmp1_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_menu);
	self->priv->_menu = _tmp1_;
	g_object_notify ((GObject *) self, "menu");
}


MenuModel* indicator_get_menumodel (Indicator* self) {
	MenuModel* result;
	MenuModel* _tmp0_ = NULL;
	g_return_val_if_fail (IS_INDICATOR (self), NULL);
	_tmp0_ = self->priv->_menumodel;
	result = _tmp0_;
	return result;
}


static void indicator_set_menumodel (Indicator* self, MenuModel* value) {
	MenuModel* _tmp0_ = NULL;
	MenuModel* _tmp1_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_menumodel);
	self->priv->_menumodel = _tmp1_;
	g_object_notify ((GObject *) self, "menumodel");
}


MenuModel* indicator_get_labelmodel (Indicator* self) {
	MenuModel* result;
	MenuModel* _tmp0_ = NULL;
	g_return_val_if_fail (IS_INDICATOR (self), NULL);
	_tmp0_ = self->priv->_labelmodel;
	result = _tmp0_;
	return result;
}


static void indicator_set_labelmodel (Indicator* self, MenuModel* value) {
	MenuModel* _tmp0_ = NULL;
	MenuModel* _tmp1_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_labelmodel);
	self->priv->_labelmodel = _tmp1_;
	g_object_notify ((GObject *) self, "labelmodel");
}


MenuModel* indicator_get_descriptionmodel (Indicator* self) {
	MenuModel* result;
	MenuModel* _tmp0_ = NULL;
	g_return_val_if_fail (IS_INDICATOR (self), NULL);
	_tmp0_ = self->priv->_descriptionmodel;
	result = _tmp0_;
	return result;
}


static void indicator_set_descriptionmodel (Indicator* self, MenuModel* value) {
	MenuModel* _tmp0_ = NULL;
	MenuModel* _tmp1_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_descriptionmodel);
	self->priv->_descriptionmodel = _tmp1_;
	g_object_notify ((GObject *) self, "descriptionmodel");
}


gint indicator_get_indicator_index (Indicator* self) {
	gint result;
	gint _tmp0_ = 0;
	g_return_val_if_fail (IS_INDICATOR (self), 0);
	_tmp0_ = self->priv->_indicator_index;
	result = _tmp0_;
	return result;
}


void indicator_set_indicator_index (Indicator* self, gint value) {
	gint _tmp0_ = 0;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	self->priv->_indicator_index = _tmp0_;
	g_object_notify ((GObject *) self, "indicator-index");
}


guint indicator_get_height (Indicator* self) {
	guint result;
	guint _tmp0_ = 0U;
	g_return_val_if_fail (IS_INDICATOR (self), 0U);
	_tmp0_ = self->priv->_height;
	result = _tmp0_;
	return result;
}


void indicator_set_height (Indicator* self, guint value) {
	guint _tmp0_ = 0U;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	self->priv->_height = _tmp0_;
	g_object_notify ((GObject *) self, "height");
}


guint indicator_get_width (Indicator* self) {
	guint result;
	guint _tmp0_ = 0U;
	g_return_val_if_fail (IS_INDICATOR (self), 0U);
	_tmp0_ = self->priv->_width;
	result = _tmp0_;
	return result;
}


void indicator_set_width (Indicator* self, guint value) {
	guint _tmp0_ = 0U;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	self->priv->_width = _tmp0_;
	g_object_notify ((GObject *) self, "width");
}


guint indicator_get_speed (Indicator* self) {
	guint result;
	guint _tmp0_ = 0U;
	g_return_val_if_fail (IS_INDICATOR (self), 0U);
	_tmp0_ = self->priv->_speed;
	result = _tmp0_;
	return result;
}


void indicator_set_speed (Indicator* self, guint value) {
	guint _tmp0_ = 0U;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	self->priv->_speed = _tmp0_;
	g_object_notify ((GObject *) self, "speed");
}


void indicator_get_background_rgba (Indicator* self, GdkRGBA* result) {
	GdkRGBA _tmp0_ = {0};
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = self->priv->_background_rgba;
	*result = _tmp0_;
	return;
}


void indicator_set_background_rgba (Indicator* self, GdkRGBA* value) {
	GdkRGBA _tmp0_ = {0};
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = *value;
	self->priv->_background_rgba = _tmp0_;
	g_object_notify ((GObject *) self, "background-rgba");
}


GraphModels* indicator_get_graphmodels (Indicator* self) {
	GraphModels* result;
	GraphModels* _tmp0_ = NULL;
	g_return_val_if_fail (IS_INDICATOR (self), NULL);
	_tmp0_ = self->priv->_graphmodels;
	result = _tmp0_;
	return result;
}


void indicator_set_graphmodels (Indicator* self, GraphModels* value) {
	GraphModels* _tmp0_ = NULL;
	GraphModels* _tmp1_ = NULL;
	g_return_if_fail (IS_INDICATOR (self));
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_graphmodels);
	self->priv->_graphmodels = _tmp1_;
	g_object_notify ((GObject *) self, "graphmodels");
}


static void indicator_class_init (IndicatorClass * klass) {
	indicator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (IndicatorPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_indicator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_indicator_set_property;
	G_OBJECT_CLASS (klass)->finalize = indicator_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_ICONDIRECTORY, g_param_spec_string ("icondirectory", "icondirectory", "icondirectory", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_PROVIDERS, g_param_spec_object ("providers", "providers", "providers", TYPE_PROVIDERS, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_MENU, g_param_spec_object ("menu", "menu", "menu", GTK_TYPE_MENU, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_MENUMODEL, g_param_spec_object ("menumodel", "menumodel", "menumodel", TYPE_MENU_MODEL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_LABELMODEL, g_param_spec_object ("labelmodel", "labelmodel", "labelmodel", TYPE_MENU_MODEL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_DESCRIPTIONMODEL, g_param_spec_object ("descriptionmodel", "descriptionmodel", "descriptionmodel", TYPE_MENU_MODEL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_INDICATOR_INDEX, g_param_spec_int ("indicator-index", "indicator-index", "indicator-index", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_HEIGHT, g_param_spec_uint ("height", "height", "height", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_WIDTH, g_param_spec_uint ("width", "width", "width", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_SPEED, g_param_spec_uint ("speed", "speed", "speed", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_BACKGROUND_RGBA, g_param_spec_boxed ("background-rgba", "background-rgba", "background-rgba", gdk_rgba_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), INDICATOR_GRAPHMODELS, g_param_spec_object ("graphmodels", "graphmodels", "graphmodels", TYPE_GRAPH_MODELS, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_signal_new ("providers_updated", TYPE_INDICATOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}


static void indicator_instance_init (Indicator * self) {
	self->priv = INDICATOR_GET_PRIVATE (self);
}


static void indicator_finalize (GObject* obj) {
	Indicator * self;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_INDICATOR, Indicator);
	_tmp0_ = indicator_iconpath (self, (guint) 0);
	_tmp1_ = _tmp0_;
	g_remove (_tmp1_);
	_g_free0 (_tmp1_);
	_tmp2_ = indicator_iconpath (self, (guint) 1);
	_tmp3_ = _tmp2_;
	g_remove (_tmp3_);
	_g_free0 (_tmp3_);
	_tmp4_ = self->priv->_icondirectory;
	g_rmdir (_tmp4_);
	_g_source_unref0 (self->priv->timeout);
	self->priv->menuitems = (_vala_array_free (self->priv->menuitems, self->priv->menuitems_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (self->priv->indicatorview);
	_g_free0 (self->priv->_icondirectory);
	_g_object_unref0 (self->priv->_providers);
	_g_object_unref0 (self->priv->_menu);
	_g_object_unref0 (self->priv->_menumodel);
	_g_object_unref0 (self->priv->_labelmodel);
	_g_object_unref0 (self->priv->_descriptionmodel);
	_g_object_unref0 (self->priv->_graphmodels);
	G_OBJECT_CLASS (indicator_parent_class)->finalize (obj);
}


/******************************************************************************
 * Copyright (C) 2011-2013  Michael Hofmann <mh21@mh21.de>                    *
 *                                                                            *
 * 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.                                        *
 *                                                                            *
 * This program 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 this program; if not, write to the Free Software Foundation, Inc.,    *
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                *
 ******************************************************************************/
GType indicator_get_type (void) {
	static volatile gsize indicator_type_id__volatile = 0;
	if (g_once_init_enter (&indicator_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IndicatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) indicator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Indicator), 0, (GInstanceInitFunc) indicator_instance_init, NULL };
		GType indicator_type_id;
		indicator_type_id = g_type_register_static (G_TYPE_OBJECT, "Indicator", &g_define_type_info, 0);
		g_once_init_leave (&indicator_type_id__volatile, indicator_type_id);
	}
	return indicator_type_id__volatile;
}


static void _vala_indicator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	Indicator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_INDICATOR, Indicator);
	switch (property_id) {
		case INDICATOR_ICONDIRECTORY:
		g_value_set_string (value, indicator_get_icondirectory (self));
		break;
		case INDICATOR_PROVIDERS:
		g_value_set_object (value, indicator_get_providers (self));
		break;
		case INDICATOR_MENU:
		g_value_set_object (value, indicator_get_menu (self));
		break;
		case INDICATOR_MENUMODEL:
		g_value_set_object (value, indicator_get_menumodel (self));
		break;
		case INDICATOR_LABELMODEL:
		g_value_set_object (value, indicator_get_labelmodel (self));
		break;
		case INDICATOR_DESCRIPTIONMODEL:
		g_value_set_object (value, indicator_get_descriptionmodel (self));
		break;
		case INDICATOR_INDICATOR_INDEX:
		g_value_set_int (value, indicator_get_indicator_index (self));
		break;
		case INDICATOR_HEIGHT:
		g_value_set_uint (value, indicator_get_height (self));
		break;
		case INDICATOR_WIDTH:
		g_value_set_uint (value, indicator_get_width (self));
		break;
		case INDICATOR_SPEED:
		g_value_set_uint (value, indicator_get_speed (self));
		break;
		case INDICATOR_BACKGROUND_RGBA:
		{
			GdkRGBA boxed;
			indicator_get_background_rgba (self, &boxed);
			g_value_set_boxed (value, &boxed);
		}
		break;
		case INDICATOR_GRAPHMODELS:
		g_value_set_object (value, indicator_get_graphmodels (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_indicator_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	Indicator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_INDICATOR, Indicator);
	switch (property_id) {
		case INDICATOR_ICONDIRECTORY:
		indicator_set_icondirectory (self, g_value_get_string (value));
		break;
		case INDICATOR_PROVIDERS:
		indicator_set_providers (self, g_value_get_object (value));
		break;
		case INDICATOR_MENU:
		indicator_set_menu (self, g_value_get_object (value));
		break;
		case INDICATOR_MENUMODEL:
		indicator_set_menumodel (self, g_value_get_object (value));
		break;
		case INDICATOR_LABELMODEL:
		indicator_set_labelmodel (self, g_value_get_object (value));
		break;
		case INDICATOR_DESCRIPTIONMODEL:
		indicator_set_descriptionmodel (self, g_value_get_object (value));
		break;
		case INDICATOR_INDICATOR_INDEX:
		indicator_set_indicator_index (self, g_value_get_int (value));
		break;
		case INDICATOR_HEIGHT:
		indicator_set_height (self, g_value_get_uint (value));
		break;
		case INDICATOR_WIDTH:
		indicator_set_width (self, g_value_get_uint (value));
		break;
		case INDICATOR_SPEED:
		indicator_set_speed (self, g_value_get_uint (value));
		break;
		case INDICATOR_BACKGROUND_RGBA:
		indicator_set_background_rgba (self, g_value_get_boxed (value));
		break;
		case INDICATOR_GRAPHMODELS:
		indicator_set_graphmodels (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



