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


#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gdesktopappinfo.h>
#include <stdio.h>
#include "config.h"
#include <glib/gstdio.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>


#define TYPE_MAIN (main_get_type ())
#define MAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN, Main))
#define MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN, MainClass))
#define IS_MAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN))
#define IS_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN))
#define MAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN, MainClass))

typedef struct _Main Main;
typedef struct _MainClass MainClass;
typedef struct _MainPrivate MainPrivate;

#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;

#define TYPE_PREFERENCES (preferences_get_type ())
#define PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PREFERENCES, Preferences))
#define PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PREFERENCES, PreferencesClass))
#define IS_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PREFERENCES))
#define IS_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PREFERENCES))
#define PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PREFERENCES, PreferencesClass))

typedef struct _Preferences Preferences;
typedef struct _PreferencesClass PreferencesClass;

#define TYPE_ADVANCED_PREFERENCES (advanced_preferences_get_type ())
#define ADVANCED_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADVANCED_PREFERENCES, AdvancedPreferences))
#define ADVANCED_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADVANCED_PREFERENCES, AdvancedPreferencesClass))
#define IS_ADVANCED_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADVANCED_PREFERENCES))
#define IS_ADVANCED_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADVANCED_PREFERENCES))
#define ADVANCED_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADVANCED_PREFERENCES, AdvancedPreferencesClass))

typedef struct _AdvancedPreferences AdvancedPreferences;
typedef struct _AdvancedPreferencesClass AdvancedPreferencesClass;

#define TYPE_ITEM_PREFERENCES (item_preferences_get_type ())
#define ITEM_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ITEM_PREFERENCES, ItemPreferences))
#define ITEM_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ITEM_PREFERENCES, ItemPreferencesClass))
#define IS_ITEM_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ITEM_PREFERENCES))
#define IS_ITEM_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ITEM_PREFERENCES))
#define ITEM_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ITEM_PREFERENCES, ItemPreferencesClass))

typedef struct _ItemPreferences ItemPreferences;
typedef struct _ItemPreferencesClass ItemPreferencesClass;

#define TYPE_ITEM_HELP (item_help_get_type ())
#define ITEM_HELP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ITEM_HELP, ItemHelp))
#define ITEM_HELP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ITEM_HELP, ItemHelpClass))
#define IS_ITEM_HELP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ITEM_HELP))
#define IS_ITEM_HELP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ITEM_HELP))
#define ITEM_HELP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ITEM_HELP, ItemHelpClass))

typedef struct _ItemHelp ItemHelp;
typedef struct _ItemHelpClass ItemHelpClass;

#define TYPE_SETTINGS_CACHE (settings_cache_get_type ())
#define SETTINGS_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SETTINGS_CACHE, SettingsCache))
#define SETTINGS_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SETTINGS_CACHE, SettingsCacheClass))
#define IS_SETTINGS_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SETTINGS_CACHE))
#define IS_SETTINGS_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SETTINGS_CACHE))
#define SETTINGS_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SETTINGS_CACHE, SettingsCacheClass))

typedef struct _SettingsCache SettingsCache;
typedef struct _SettingsCacheClass SettingsCacheClass;

#define TYPE_COLOR_MAPPER (color_mapper_get_type ())
#define COLOR_MAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLOR_MAPPER, ColorMapper))
#define COLOR_MAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLOR_MAPPER, ColorMapperClass))
#define IS_COLOR_MAPPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLOR_MAPPER))
#define IS_COLOR_MAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLOR_MAPPER))
#define COLOR_MAPPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLOR_MAPPER, ColorMapperClass))

typedef struct _ColorMapper ColorMapper;
typedef struct _ColorMapperClass ColorMapperClass;

#define TYPE_REAPER (reaper_get_type ())
#define REAPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REAPER, Reaper))
#define REAPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REAPER, ReaperClass))
#define IS_REAPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REAPER))
#define IS_REAPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REAPER))
#define REAPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REAPER, ReaperClass))

typedef struct _Reaper Reaper;
typedef struct _ReaperClass ReaperClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#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_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 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 _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))

#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;

#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 TYPE_SETTINGS_CONVERSION (settings_conversion_get_type ())
#define SETTINGS_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SETTINGS_CONVERSION, SettingsConversion))
#define SETTINGS_CONVERSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SETTINGS_CONVERSION, SettingsConversionClass))
#define IS_SETTINGS_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SETTINGS_CONVERSION))
#define IS_SETTINGS_CONVERSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SETTINGS_CONVERSION))
#define SETTINGS_CONVERSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SETTINGS_CONVERSION, SettingsConversionClass))

typedef struct _SettingsConversion SettingsConversion;
typedef struct _SettingsConversionClass SettingsConversionClass;

#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 _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
#define _g_option_group_free0(var) ((var == NULL) ? NULL : (var = (g_option_group_free (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_key_file_free0(var) ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL)))

struct _Main {
	GApplication parent_instance;
	MainPrivate * priv;
};

struct _MainClass {
	GApplicationClass parent_class;
};

struct _MainPrivate {
	Indicator* multi;
	GtkDialog* about;
	Preferences* preferences;
	AdvancedPreferences* advancedpreferences;
	ItemPreferences* menupreferences;
	ItemPreferences* indicatorpreferences;
	ItemHelp* itemhelp;
	SettingsCache* settingscache;
	ColorMapper* colormapper;
	gchar* autostartkey;
	gchar* desktopfilename;
	gchar* autostartfile;
	gchar* applicationfile;
	gchar* graphsetups;
};


static gpointer main_parent_class = NULL;
static gchar* main_datadirectory;
static gchar* main_datadirectory = NULL;
static gchar** main_expressionoptions;
static gchar** main_expressionoptions = NULL;
static gboolean main_versionoption;
static gboolean main_versionoption = FALSE;
static gboolean main_trayiconoption;
static gboolean main_trayiconoption = FALSE;
static Reaper* main_reaper;
static Reaper* main_reaper = NULL;
extern gchar* utils_uifile;

GType main_get_type (void) G_GNUC_CONST;
GType indicator_get_type (void) G_GNUC_CONST;
GType preferences_get_type (void) G_GNUC_CONST;
GType advanced_preferences_get_type (void) G_GNUC_CONST;
GType item_preferences_get_type (void) G_GNUC_CONST;
GType item_help_get_type (void) G_GNUC_CONST;
GType settings_cache_get_type (void) G_GNUC_CONST;
GType color_mapper_get_type (void) G_GNUC_CONST;
#define MAIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MAIN, MainPrivate))
enum  {
	MAIN_DUMMY_PROPERTY,
	MAIN_AUTOSTART
};
void indicator_destroy (Indicator* self);
GType reaper_get_type (void) G_GNUC_CONST;
void main_on_sysmon_activate (GtkMenuItem* source, Main* self);
GSettings* settings_cache_generalsettings (SettingsCache* self);
void main_on_preferences_activate (GtkMenuItem* source, Main* self);
void preferences_show (Preferences* self);
void main_on_about_activate (GtkMenuItem* source, Main* self);
GObject* utils_get_ui (const gchar* objectid, GObject* signalhandlers, gchar** additional, int additional_length1, GtkBuilder** builder);
void main_on_quit_activate (GtkMenuItem* source, Main* self);
void main_on_aboutdialog_destroy (GtkWidget* source, Main* self);
Main* main_new (const gchar* app_id, GApplicationFlags flags);
Main* main_construct (GType object_type, const gchar* app_id, GApplicationFlags flags);
static void _vala_array_add13 (gchar*** array, int* length, int* size, gchar* value);
static void main_creategraphs (Main* self, GSettings* settings, const gchar* key);
GSettings* settings_cache_graphsettings (SettingsCache* self, const gchar* graphid);
GType providers_get_type (void) G_GNUC_CONST;
Providers* indicator_get_providers (Indicator* self);
GraphModels* graph_models_new (gchar** graphids, int graphids_length1, Providers* providers);
GraphModels* graph_models_construct (GType object_type, gchar** graphids, int graphids_length1, Providers* providers);
GType graph_models_get_type (void) G_GNUC_CONST;
void indicator_set_graphmodels (Indicator* self, GraphModels* value);
GraphModels* indicator_get_graphmodels (Indicator* self);
GType graph_model_get_type (void) G_GNUC_CONST;
GraphModel** graph_models_get_graphmodels (GraphModels* self, int* result_length1);
static void main_addgraphbinds (Main* self, GraphModel* graphmodel);
GList* settings_cache_cachedsettings (SettingsCache* self);
static void _main_creategraphs_g_settings_changed (GSettings* _sender, const gchar* key, gpointer self);
const gchar* graph_model_get_id (GraphModel* self);
GType expression_cache_get_type (void) G_GNUC_CONST;
ExpressionCache* graph_model_get_minimum (GraphModel* self);
ExpressionCache* graph_model_get_maximum (GraphModel* self);
gchar** graph_model_get_traces (GraphModel* self, int* result_length1);
static gchar** _vala_array_dup18 (gchar** self, int length);
GType trace_model_get_type (void) G_GNUC_CONST;
TraceModel** graph_model_get_tracemodels (GraphModel* self, int* result_length1);
static TraceModel** _vala_array_dup19 (TraceModel** self, int length);
static void main_addtracebinds (Main* self, TraceModel* tracemodel, const gchar* graphid, const gchar* traceid);
GSettings* settings_cache_tracesettings (SettingsCache* self, const gchar* graphid, const gchar* traceid);
gboolean utils_get_settings_rgba (GValue* value, GVariant* variant, void* user_data);
static gboolean _utils_get_settings_rgba_gsettings_bind_get_mapping (GValue* value, GVariant* variant, void* user_data);
GVariant* utils_set_settings_rgba (GValue* value, const GVariantType* expected_type, void* user_data);
static void __lambda22_ (void);
static void ___lambda22__gdestroy_notify (void* data);
ExpressionCache* trace_model_get_expression (TraceModel* self);
static void main_real_activate (GApplication* base);
static void main_real_startup (GApplication* base);
Providers* providers_new (void);
Providers* providers_construct (GType object_type);
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);
ColorMapper* color_mapper_new (void);
ColorMapper* color_mapper_construct (GType object_type);
SettingsCache* settings_cache_new (void);
SettingsCache* settings_cache_construct (GType object_type);
SettingsConversion* settings_conversion_new (void);
SettingsConversion* settings_conversion_construct (GType object_type);
GType settings_conversion_get_type (void) G_GNUC_CONST;
void settings_conversion_convert (SettingsConversion* self);
GType menu_model_get_type (void) G_GNUC_CONST;
MenuModel* indicator_get_menumodel (Indicator* self);
MenuModel* indicator_get_labelmodel (Indicator* self);
MenuModel* indicator_get_descriptionmodel (Indicator* self);
static void __lambda23_ (void);
static void ___lambda23__gdestroy_notify (void* data);
void indicator_updateall (Indicator* self);
ItemHelp* item_help_new (Indicator* indicator);
ItemHelp* item_help_construct (GType object_type, Indicator* indicator);
AdvancedPreferences* advanced_preferences_new (ColorMapper* colormapper);
AdvancedPreferences* advanced_preferences_construct (GType object_type, ColorMapper* colormapper);
void item_help_show (ItemHelp* self);
static void _item_help_show_advanced_preferences_itemhelp_show (AdvancedPreferences* _sender, gpointer self);
ItemPreferences* item_preferences_new (const gchar* settingskey);
ItemPreferences* item_preferences_construct (GType object_type, const gchar* settingskey);
static void _item_help_show_item_preferences_itemhelp_show (ItemPreferences* _sender, gpointer self);
Preferences* preferences_new (ColorMapper* colormapper);
Preferences* preferences_construct (GType object_type, ColorMapper* colormapper);
void advanced_preferences_show (AdvancedPreferences* self);
static void _advanced_preferences_show_preferences_advancedpreferences_show (Preferences* _sender, gpointer self);
void item_preferences_show (ItemPreferences* self);
static void _item_preferences_show_preferences_menupreferences_show (Preferences* _sender, gpointer self);
static void _item_preferences_show_preferences_indicatorpreferences_show (Preferences* _sender, gpointer self);
void preferences_restore_colorscheme (Preferences* self);
static void _preferences_restore_colorscheme_advanced_preferences_colorscheme_restore (AdvancedPreferences* _sender, gpointer self);
void item_help_update (ItemHelp* self);
static void _item_help_update_indicator_providers_updated (Indicator* _sender, gpointer self);
static gint main_real_command_line (GApplication* base, GApplicationCommandLine* command_line);
static gboolean main_real_local_command_line (GApplication* base, gchar*** arguments, gint* exit_status);
ExpressionCache* expression_cache_new (Providers* providers, const gchar* expression);
ExpressionCache* expression_cache_construct (GType object_type, Providers* providers, const gchar* expression);
gchar** expression_cache_tokens (ExpressionCache* self, int* result_length1);
gchar* expression_cache_label (ExpressionCache* self);
gchar* expression_cache_guide (ExpressionCache* self);
gint main_main (gchar** args, int args_length1);
Reaper* reaper_new (gchar** args, int args_length1);
Reaper* reaper_construct (GType object_type, gchar** args, int args_length1);
gboolean main_get_autostart (Main* self);
void main_set_autostart (Main* self, gboolean value);
static void main_finalize (GObject* obj);
static void _vala_main_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_main_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 gint _vala_array_length (gpointer array);

static const GOptionEntry MAIN_options[4] = {{"version", (gchar) 0, 0, G_OPTION_ARG_NONE, &main_versionoption, "Output version information and exit", NULL}, {"trayicon", (gchar) 0, 0, G_OPTION_ARG_NONE, &main_trayiconoption, "System tray icon instead of app indicator", NULL}, {"evaluate-expression", 'e', 0, G_OPTION_ARG_STRING_ARRAY, &main_expressionoptions, "Evaluate an expression", NULL}, {NULL}};

void main_on_sysmon_activate (GtkMenuItem* source, Main* self) {
	GSettings* settings = NULL;
	SettingsCache* _tmp0_ = NULL;
	GSettings* _tmp1_ = NULL;
	gchar* sysmon = NULL;
	GSettings* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	GDesktopAppInfo* info = NULL;
	const gchar* _tmp26_ = NULL;
	GDesktopAppInfo* _tmp27_ = NULL;
	GDesktopAppInfo* _tmp28_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (IS_MAIN (self));
	g_return_if_fail (GTK_IS_MENU_ITEM (source));
	_tmp0_ = self->priv->settingscache;
	_tmp1_ = settings_cache_generalsettings (_tmp0_);
	settings = _tmp1_;
	_tmp2_ = settings;
	_tmp3_ = g_settings_get_string (_tmp2_, "system-monitor");
	sysmon = _tmp3_;
	_tmp4_ = sysmon;
	_tmp5_ = strlen (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_ == 0) {
		gboolean _tmp7_ = FALSE;
		const gchar* _tmp8_ = NULL;
		gboolean _tmp10_ = FALSE;
		_tmp8_ = g_getenv ("XDG_CURRENT_DESKTOP");
		if (g_strcmp0 (_tmp8_, "KDE") == 0) {
			_tmp7_ = TRUE;
		} else {
			const gchar* _tmp9_ = NULL;
			_tmp9_ = g_getenv ("DESKTOP_SESSION");
			_tmp7_ = g_strcmp0 (_tmp9_, "kde-plasma") == 0;
		}
		_tmp10_ = _tmp7_;
		if (_tmp10_) {
			gchar* _tmp11_ = NULL;
			_tmp11_ = g_strdup ("kde4-ksysguard.desktop");
			_g_free0 (sysmon);
			sysmon = _tmp11_;
		} else {
			gboolean _tmp12_ = FALSE;
			gboolean _tmp13_ = FALSE;
			const gchar* _tmp14_ = NULL;
			gboolean _tmp16_ = FALSE;
			gboolean _tmp18_ = FALSE;
			_tmp14_ = g_getenv ("XDG_CURRENT_DESKTOP");
			if (g_strcmp0 (_tmp14_, "XFCE") == 0) {
				_tmp13_ = TRUE;
			} else {
				const gchar* _tmp15_ = NULL;
				_tmp15_ = g_getenv ("DESKTOP_SESSION");
				_tmp13_ = g_strcmp0 (_tmp15_, "xfce") == 0;
			}
			_tmp16_ = _tmp13_;
			if (_tmp16_) {
				_tmp12_ = TRUE;
			} else {
				const gchar* _tmp17_ = NULL;
				_tmp17_ = g_getenv ("DESKTOP_SESSION");
				_tmp12_ = g_strcmp0 (_tmp17_, "xubuntu") == 0;
			}
			_tmp18_ = _tmp12_;
			if (_tmp18_) {
				gchar* _tmp19_ = NULL;
				_tmp19_ = g_strdup ("xfce4-taskmanager.desktop");
				_g_free0 (sysmon);
				sysmon = _tmp19_;
			} else {
				gboolean _tmp20_ = FALSE;
				const gchar* _tmp21_ = NULL;
				gboolean _tmp23_ = FALSE;
				_tmp21_ = g_getenv ("XDG_CURRENT_DESKTOP");
				if (g_strcmp0 (_tmp21_, "LXDE") == 0) {
					_tmp20_ = TRUE;
				} else {
					const gchar* _tmp22_ = NULL;
					_tmp22_ = g_getenv ("DESKTOP_SESSION");
					_tmp20_ = g_strcmp0 (_tmp22_, "Lubuntu") == 0;
				}
				_tmp23_ = _tmp20_;
				if (_tmp23_) {
					gchar* _tmp24_ = NULL;
					_tmp24_ = g_strdup ("lxtask.desktop");
					_g_free0 (sysmon);
					sysmon = _tmp24_;
				} else {
					gchar* _tmp25_ = NULL;
					_tmp25_ = g_strdup ("gnome-system-monitor.desktop");
					_g_free0 (sysmon);
					sysmon = _tmp25_;
				}
			}
		}
	}
	_tmp26_ = sysmon;
	_tmp27_ = g_desktop_app_info_new (_tmp26_);
	info = _tmp27_;
	_tmp28_ = info;
	if (_tmp28_ != NULL) {
		{
			GDesktopAppInfo* _tmp29_ = NULL;
			_tmp29_ = info;
			g_app_info_launch (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, g_app_info_get_type (), GAppInfo), NULL, NULL, &_inner_error_);
			if (_inner_error_ != NULL) {
				goto __catch5_g_error;
			}
		}
		goto __finally5;
		__catch5_g_error:
		{
			GError* e = NULL;
			FILE* _tmp30_ = NULL;
			GError* _tmp31_ = NULL;
			const gchar* _tmp32_ = NULL;
			e = _inner_error_;
			_inner_error_ = NULL;
			_tmp30_ = stderr;
			_tmp31_ = e;
			_tmp32_ = _tmp31_->message;
			fprintf (_tmp30_, "Could not launch system monitor: %s\n", _tmp32_);
			_g_error_free0 (e);
		}
		__finally5:
		if (_inner_error_ != NULL) {
			_g_object_unref0 (info);
			_g_free0 (sysmon);
			_g_object_unref0 (settings);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	} else {
		{
			g_spawn_command_line_async ("gnome-system-monitor", &_inner_error_);
			if (_inner_error_ != NULL) {
				goto __catch6_g_error;
			}
		}
		goto __finally6;
		__catch6_g_error:
		{
			GError* e = NULL;
			FILE* _tmp33_ = NULL;
			GError* _tmp34_ = NULL;
			const gchar* _tmp35_ = NULL;
			e = _inner_error_;
			_inner_error_ = NULL;
			_tmp33_ = stderr;
			_tmp34_ = e;
			_tmp35_ = _tmp34_->message;
			fprintf (_tmp33_, "Could not launch system monitor: %s\n", _tmp35_);
			_g_error_free0 (e);
		}
		__finally6:
		if (_inner_error_ != NULL) {
			_g_object_unref0 (info);
			_g_free0 (sysmon);
			_g_object_unref0 (settings);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_g_object_unref0 (info);
	_g_free0 (sysmon);
	_g_object_unref0 (settings);
}


void main_on_preferences_activate (GtkMenuItem* source, Main* self) {
	Preferences* _tmp0_ = NULL;
	g_return_if_fail (IS_MAIN (self));
	g_return_if_fail (GTK_IS_MENU_ITEM (source));
	_tmp0_ = self->priv->preferences;
	preferences_show (_tmp0_);
}


void main_on_about_activate (GtkMenuItem* source, Main* self) {
	GtkDialog* _tmp0_ = NULL;
	gchar** _tmp2_ = NULL;
	gchar** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	GObject* _tmp4_ = NULL;
	GtkDialog* _tmp5_ = NULL;
	GtkDialog* _tmp6_ = NULL;
	GtkDialog* _tmp7_ = NULL;
	g_return_if_fail (IS_MAIN (self));
	g_return_if_fail (GTK_IS_MENU_ITEM (source));
	_tmp0_ = self->priv->about;
	if (_tmp0_ != NULL) {
		GtkDialog* _tmp1_ = NULL;
		_tmp1_ = self->priv->about;
		gtk_window_present (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GTK_TYPE_WINDOW, GtkWindow));
		return;
	}
	_tmp2_ = g_new0 (gchar*, 0 + 1);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 0;
	_tmp4_ = utils_get_ui ("aboutdialog", G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject), _tmp3_, 0, NULL);
	_tmp5_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GTK_TYPE_DIALOG) ? ((GtkDialog*) _tmp4_) : NULL;
	if (_tmp5_ == NULL) {
		_g_object_unref0 (_tmp4_);
	}
	_g_object_unref0 (self->priv->about);
	self->priv->about = _tmp5_;
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL);
	_tmp6_ = self->priv->about;
	g_return_if_fail (_tmp6_ != NULL);
	_tmp7_ = self->priv->about;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GTK_TYPE_WIDGET, GtkWidget));
}


void main_on_quit_activate (GtkMenuItem* source, Main* self) {
	g_return_if_fail (IS_MAIN (self));
	g_return_if_fail (GTK_IS_MENU_ITEM (source));
	g_application_release (G_TYPE_CHECK_INSTANCE_CAST (self, g_application_get_type (), GApplication));
}


void main_on_aboutdialog_destroy (GtkWidget* source, Main* self) {
	g_return_if_fail (IS_MAIN (self));
	g_return_if_fail (GTK_IS_WIDGET (source));
	_g_object_unref0 (self->priv->about);
	self->priv->about = NULL;
}


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


Main* main_construct (GType object_type, const gchar* app_id, GApplicationFlags flags) {
	Main * self = NULL;
	const gchar* _tmp0_ = NULL;
	GApplicationFlags _tmp1_ = 0;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar** datadirs = NULL;
	gchar* _tmp9_ = NULL;
	gchar** _tmp10_ = NULL;
	gint datadirs_length1 = 0;
	gint _datadirs_size_ = 0;
	gchar** _tmp11_ = NULL;
	gchar** _tmp12_ = NULL;
	gchar** _tmp17_ = NULL;
	gint _tmp17__length1 = 0;
	g_return_val_if_fail (app_id != NULL, NULL);
	_tmp0_ = app_id;
	_tmp1_ = flags;
	self = (Main*) g_object_new (object_type, "application-id", _tmp0_, "flags", _tmp1_, NULL);
	_tmp2_ = g_strdup ("X-GNOME-Autostart-enabled");
	_g_free0 (self->priv->autostartkey);
	self->priv->autostartkey = _tmp2_;
	_tmp3_ = g_strdup ("indicator-multiload.desktop");
	_g_free0 (self->priv->desktopfilename);
	self->priv->desktopfilename = _tmp3_;
	_tmp4_ = g_get_user_config_dir ();
	_tmp5_ = self->priv->desktopfilename;
	_tmp6_ = g_build_filename (_tmp4_, "autostart", _tmp5_, NULL);
	_g_free0 (self->priv->autostartfile);
	self->priv->autostartfile = _tmp6_;
	_tmp7_ = self->priv->desktopfilename;
	_tmp8_ = g_build_filename ("applications", _tmp7_, NULL);
	_g_free0 (self->priv->applicationfile);
	self->priv->applicationfile = _tmp8_;
	_tmp9_ = g_strdup (PACKAGE_DATA_DIR);
	_tmp10_ = g_new0 (gchar*, 1 + 1);
	_tmp10_[0] = _tmp9_;
	datadirs = _tmp10_;
	datadirs_length1 = 1;
	_datadirs_size_ = datadirs_length1;
	_tmp12_ = _tmp11_ = g_get_system_data_dirs ();
	{
		gchar** datadir_collection = NULL;
		gint datadir_collection_length1 = 0;
		gint _datadir_collection_size_ = 0;
		gint datadir_it = 0;
		datadir_collection = _tmp12_;
		datadir_collection_length1 = _vala_array_length (_tmp11_);
		for (datadir_it = 0; datadir_it < _vala_array_length (_tmp11_); datadir_it = datadir_it + 1) {
			gchar* _tmp13_ = NULL;
			gchar* datadir = NULL;
			_tmp13_ = g_strdup (datadir_collection[datadir_it]);
			datadir = _tmp13_;
			{
				gchar** _tmp14_ = NULL;
				gint _tmp14__length1 = 0;
				const gchar* _tmp15_ = NULL;
				gchar* _tmp16_ = NULL;
				_tmp14_ = datadirs;
				_tmp14__length1 = datadirs_length1;
				_tmp15_ = datadir;
				_tmp16_ = g_build_filename (_tmp15_, PACKAGE_NAME, NULL);
				_vala_array_add13 (&datadirs, &datadirs_length1, &_datadirs_size_, _tmp16_);
				_g_free0 (datadir);
			}
		}
	}
	_tmp17_ = datadirs;
	_tmp17__length1 = datadirs_length1;
	{
		gchar** datadir_collection = NULL;
		gint datadir_collection_length1 = 0;
		gint _datadir_collection_size_ = 0;
		gint datadir_it = 0;
		datadir_collection = _tmp17_;
		datadir_collection_length1 = _tmp17__length1;
		for (datadir_it = 0; datadir_it < _tmp17__length1; datadir_it = datadir_it + 1) {
			gchar* _tmp18_ = NULL;
			gchar* datadir = NULL;
			_tmp18_ = g_strdup (datadir_collection[datadir_it]);
			datadir = _tmp18_;
			{
				gchar* uifile = NULL;
				const gchar* _tmp19_ = NULL;
				gchar* _tmp20_ = NULL;
				const gchar* _tmp21_ = NULL;
				gboolean _tmp22_ = FALSE;
				const gchar* _tmp23_ = NULL;
				gchar* _tmp24_ = NULL;
				_tmp19_ = datadir;
				_tmp20_ = g_build_filename (_tmp19_, "preferences.ui", NULL);
				uifile = _tmp20_;
				_tmp21_ = uifile;
				_tmp22_ = g_file_test (_tmp21_, G_FILE_TEST_IS_REGULAR);
				if (!_tmp22_) {
					_g_free0 (uifile);
					_g_free0 (datadir);
					continue;
				}
				_tmp23_ = uifile;
				_tmp24_ = g_strdup (_tmp23_);
				_g_free0 (utils_uifile);
				utils_uifile = _tmp24_;
				_g_free0 (uifile);
				_g_free0 (datadir);
				break;
			}
		}
	}
	datadirs = (_vala_array_free (datadirs, datadirs_length1, (GDestroyNotify) g_free), NULL);
	return self;
}


Main* main_new (const gchar* app_id, GApplicationFlags flags) {
	return main_construct (TYPE_MAIN, app_id, flags);
}


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


static void _main_creategraphs_g_settings_changed (GSettings* _sender, const gchar* key, gpointer self) {
	main_creategraphs (self, _sender, key);
}


static void main_creategraphs (Main* self, GSettings* settings, const gchar* key) {
	gchar* newgraphsetups = NULL;
	gchar* _tmp0_ = NULL;
	SettingsCache* _tmp1_ = NULL;
	GSettings* _tmp2_ = NULL;
	GSettings* _tmp3_ = NULL;
	gchar** _tmp4_ = NULL;
	gchar** _tmp5_ = NULL;
	gchar** _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
	const gchar* _tmp22_ = NULL;
	const gchar* _tmp23_ = NULL;
	const gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
	GSettings* datasettings = NULL;
	SettingsCache* _tmp26_ = NULL;
	GSettings* _tmp27_ = NULL;
	Indicator* _tmp28_ = NULL;
	GSettings* _tmp29_ = NULL;
	gchar** _tmp30_ = NULL;
	gchar** _tmp31_ = NULL;
	gchar** _tmp32_ = NULL;
	gint _tmp32__length1 = 0;
	Indicator* _tmp33_ = NULL;
	Providers* _tmp34_ = NULL;
	Providers* _tmp35_ = NULL;
	GraphModels* _tmp36_ = NULL;
	GraphModels* _tmp37_ = NULL;
	Indicator* _tmp38_ = NULL;
	GraphModels* _tmp39_ = NULL;
	GraphModels* _tmp40_ = NULL;
	GraphModel** _tmp41_ = NULL;
	gint _tmp41__length1 = 0;
	GraphModel** _tmp42_ = NULL;
	gint _tmp42__length1 = 0;
	SettingsCache* _tmp45_ = NULL;
	GList* _tmp46_ = NULL;
	GSettings* _tmp48_ = NULL;
	Indicator* _tmp49_ = NULL;
	GraphModels* _tmp50_ = NULL;
	GraphModels* _tmp51_ = NULL;
	GraphModel** _tmp52_ = NULL;
	gint _tmp52__length1 = 0;
	GraphModel** _tmp53_ = NULL;
	gint _tmp53__length1 = 0;
	g_return_if_fail (IS_MAIN (self));
	g_return_if_fail ((settings == NULL) || G_IS_SETTINGS (settings));
	g_return_if_fail (key != NULL);
	_tmp0_ = g_strdup ("");
	newgraphsetups = _tmp0_;
	_tmp1_ = self->priv->settingscache;
	_tmp2_ = settings_cache_generalsettings (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp5_ = _tmp4_ = g_settings_get_strv (_tmp3_, "graphs");
	_tmp6_ = _tmp5_;
	_tmp6__length1 = _vala_array_length (_tmp4_);
	_g_object_unref0 (_tmp3_);
	{
		gchar** graphid_collection = NULL;
		gint graphid_collection_length1 = 0;
		gint _graphid_collection_size_ = 0;
		gint graphid_it = 0;
		graphid_collection = _tmp6_;
		graphid_collection_length1 = _tmp6__length1;
		for (graphid_it = 0; graphid_it < _tmp6__length1; graphid_it = graphid_it + 1) {
			gchar* _tmp7_ = NULL;
			gchar* graphid = NULL;
			_tmp7_ = g_strdup (graphid_collection[graphid_it]);
			graphid = _tmp7_;
			{
				const gchar* _tmp8_ = NULL;
				const gchar* _tmp9_ = NULL;
				SettingsCache* _tmp10_ = NULL;
				const gchar* _tmp11_ = NULL;
				GSettings* _tmp12_ = NULL;
				GSettings* _tmp13_ = NULL;
				gchar** _tmp14_ = NULL;
				gchar** _tmp15_ = NULL;
				gchar** _tmp16_ = NULL;
				gint _tmp16__length1 = 0;
				gchar* _tmp17_ = NULL;
				gchar* _tmp18_ = NULL;
				gchar* _tmp19_ = NULL;
				gchar* _tmp20_ = NULL;
				gchar* _tmp21_ = NULL;
				_tmp8_ = newgraphsetups;
				_tmp9_ = graphid;
				_tmp10_ = self->priv->settingscache;
				_tmp11_ = graphid;
				_tmp12_ = settings_cache_graphsettings (_tmp10_, _tmp11_);
				_tmp13_ = _tmp12_;
				_tmp15_ = _tmp14_ = g_settings_get_strv (_tmp13_, "traces");
				_tmp16_ = _tmp15_;
				_tmp16__length1 = _vala_array_length (_tmp14_);
				_tmp17_ = g_strjoinv (",", _tmp16_);
				_tmp18_ = _tmp17_;
				_tmp19_ = g_strdup_printf ("%s=%s\n", _tmp9_, _tmp18_);
				_tmp20_ = _tmp19_;
				_tmp21_ = g_strconcat (_tmp8_, _tmp20_, NULL);
				_g_free0 (newgraphsetups);
				newgraphsetups = _tmp21_;
				_g_free0 (_tmp20_);
				_g_free0 (_tmp18_);
				_tmp16_ = (_vala_array_free (_tmp16_, _tmp16__length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_tmp13_);
				_g_free0 (graphid);
			}
		}
		graphid_collection = (_vala_array_free (graphid_collection, graphid_collection_length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp22_ = self->priv->graphsetups;
	_tmp23_ = newgraphsetups;
	if (g_strcmp0 (_tmp22_, _tmp23_) == 0) {
		_g_free0 (newgraphsetups);
		return;
	}
	_tmp24_ = newgraphsetups;
	_tmp25_ = g_strdup (_tmp24_);
	_g_free0 (self->priv->graphsetups);
	self->priv->graphsetups = _tmp25_;
	_tmp26_ = self->priv->settingscache;
	_tmp27_ = settings_cache_generalsettings (_tmp26_);
	datasettings = _tmp27_;
	_tmp28_ = self->priv->multi;
	_tmp29_ = datasettings;
	_tmp31_ = _tmp30_ = g_settings_get_strv (_tmp29_, "graphs");
	_tmp32_ = _tmp31_;
	_tmp32__length1 = _vala_array_length (_tmp30_);
	_tmp33_ = self->priv->multi;
	_tmp34_ = indicator_get_providers (_tmp33_);
	_tmp35_ = _tmp34_;
	_tmp36_ = graph_models_new (_tmp32_, _vala_array_length (_tmp30_), _tmp35_);
	_tmp37_ = _tmp36_;
	indicator_set_graphmodels (_tmp28_, _tmp37_);
	_g_object_unref0 (_tmp37_);
	_tmp32_ = (_vala_array_free (_tmp32_, _tmp32__length1, (GDestroyNotify) g_free), NULL);
	_tmp38_ = self->priv->multi;
	_tmp39_ = indicator_get_graphmodels (_tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = graph_models_get_graphmodels (_tmp40_, &_tmp41__length1);
	_tmp42_ = _tmp41_;
	_tmp42__length1 = _tmp41__length1;
	{
		GraphModel** graphmodel_collection = NULL;
		gint graphmodel_collection_length1 = 0;
		gint _graphmodel_collection_size_ = 0;
		gint graphmodel_it = 0;
		graphmodel_collection = _tmp42_;
		graphmodel_collection_length1 = _tmp42__length1;
		for (graphmodel_it = 0; graphmodel_it < _tmp42__length1; graphmodel_it = graphmodel_it + 1) {
			GraphModel* _tmp43_ = NULL;
			GraphModel* graphmodel = NULL;
			_tmp43_ = _g_object_ref0 (graphmodel_collection[graphmodel_it]);
			graphmodel = _tmp43_;
			{
				GraphModel* _tmp44_ = NULL;
				_tmp44_ = graphmodel;
				main_addgraphbinds (self, _tmp44_);
				_g_object_unref0 (graphmodel);
			}
		}
	}
	_tmp45_ = self->priv->settingscache;
	_tmp46_ = settings_cache_cachedsettings (_tmp45_);
	{
		GList* cachedsetting_collection = NULL;
		GList* cachedsetting_it = NULL;
		cachedsetting_collection = _tmp46_;
		for (cachedsetting_it = cachedsetting_collection; cachedsetting_it != NULL; cachedsetting_it = cachedsetting_it->next) {
			GSettings* cachedsetting = NULL;
			cachedsetting = (GSettings*) cachedsetting_it->data;
			{
				GSettings* _tmp47_ = NULL;
				_tmp47_ = cachedsetting;
				g_signal_handlers_disconnect_by_func (_tmp47_, (void*) main_creategraphs, self);
			}
		}
		_g_list_free0 (cachedsetting_collection);
	}
	_tmp48_ = datasettings;
	g_signal_connect_object (_tmp48_, "changed::graphs", (GCallback) _main_creategraphs_g_settings_changed, self, 0);
	_tmp49_ = self->priv->multi;
	_tmp50_ = indicator_get_graphmodels (_tmp49_);
	_tmp51_ = _tmp50_;
	_tmp52_ = graph_models_get_graphmodels (_tmp51_, &_tmp52__length1);
	_tmp53_ = _tmp52_;
	_tmp53__length1 = _tmp52__length1;
	{
		GraphModel** graphmodel_collection = NULL;
		gint graphmodel_collection_length1 = 0;
		gint _graphmodel_collection_size_ = 0;
		gint graphmodel_it = 0;
		graphmodel_collection = _tmp53_;
		graphmodel_collection_length1 = _tmp53__length1;
		for (graphmodel_it = 0; graphmodel_it < _tmp53__length1; graphmodel_it = graphmodel_it + 1) {
			GraphModel* _tmp54_ = NULL;
			GraphModel* graphmodel = NULL;
			_tmp54_ = _g_object_ref0 (graphmodel_collection[graphmodel_it]);
			graphmodel = _tmp54_;
			{
				GSettings* graphsettings = NULL;
				SettingsCache* _tmp55_ = NULL;
				GraphModel* _tmp56_ = NULL;
				const gchar* _tmp57_ = NULL;
				const gchar* _tmp58_ = NULL;
				GSettings* _tmp59_ = NULL;
				GSettings* _tmp60_ = NULL;
				_tmp55_ = self->priv->settingscache;
				_tmp56_ = graphmodel;
				_tmp57_ = graph_model_get_id (_tmp56_);
				_tmp58_ = _tmp57_;
				_tmp59_ = settings_cache_graphsettings (_tmp55_, _tmp58_);
				graphsettings = _tmp59_;
				_tmp60_ = graphsettings;
				g_signal_connect_object (_tmp60_, "changed::traces", (GCallback) _main_creategraphs_g_settings_changed, self, 0);
				_g_object_unref0 (graphsettings);
				_g_object_unref0 (graphmodel);
			}
		}
	}
	_g_object_unref0 (datasettings);
	_g_free0 (newgraphsetups);
}


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


static TraceModel** _vala_array_dup19 (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 main_addgraphbinds (Main* self, GraphModel* graphmodel) {
	gchar* graphid = NULL;
	GraphModel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GSettings* graphsettings = NULL;
	SettingsCache* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	GSettings* _tmp6_ = NULL;
	GSettings* _tmp7_ = NULL;
	GraphModel* _tmp8_ = NULL;
	ExpressionCache* _tmp9_ = NULL;
	ExpressionCache* _tmp10_ = NULL;
	GSettings* _tmp11_ = NULL;
	GraphModel* _tmp12_ = NULL;
	ExpressionCache* _tmp13_ = NULL;
	ExpressionCache* _tmp14_ = NULL;
	gchar** graphproperties = NULL;
	gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	gchar** _tmp18_ = NULL;
	gint graphproperties_length1 = 0;
	gint _graphproperties_size_ = 0;
	gchar** _tmp19_ = NULL;
	gint _tmp19__length1 = 0;
	gchar** traceids = NULL;
	GraphModel* _tmp25_ = NULL;
	gchar** _tmp26_ = NULL;
	gint _tmp26__length1 = 0;
	gchar** _tmp27_ = NULL;
	gint _tmp27__length1 = 0;
	gchar** _tmp28_ = NULL;
	gint _tmp28__length1 = 0;
	gint traceids_length1 = 0;
	gint _traceids_size_ = 0;
	TraceModel** tracemodels = NULL;
	GraphModel* _tmp29_ = NULL;
	TraceModel** _tmp30_ = NULL;
	gint _tmp30__length1 = 0;
	TraceModel** _tmp31_ = NULL;
	gint _tmp31__length1 = 0;
	TraceModel** _tmp32_ = NULL;
	gint _tmp32__length1 = 0;
	gint tracemodels_length1 = 0;
	gint _tracemodels_size_ = 0;
	g_return_if_fail (IS_MAIN (self));
	g_return_if_fail (IS_GRAPH_MODEL (graphmodel));
	_tmp0_ = graphmodel;
	_tmp1_ = graph_model_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	graphid = _tmp3_;
	_tmp4_ = self->priv->settingscache;
	_tmp5_ = graphid;
	_tmp6_ = settings_cache_graphsettings (_tmp4_, _tmp5_);
	graphsettings = _tmp6_;
	_tmp7_ = graphsettings;
	_tmp8_ = graphmodel;
	_tmp9_ = graph_model_get_minimum (_tmp8_);
	_tmp10_ = _tmp9_;
	g_settings_bind (_tmp7_, "minimum", G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, G_TYPE_OBJECT, GObject), "expression", G_SETTINGS_BIND_DEFAULT);
	_tmp11_ = graphsettings;
	_tmp12_ = graphmodel;
	_tmp13_ = graph_model_get_maximum (_tmp12_);
	_tmp14_ = _tmp13_;
	g_settings_bind (_tmp11_, "maximum", G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, G_TYPE_OBJECT, GObject), "expression", G_SETTINGS_BIND_DEFAULT);
	_tmp15_ = g_strdup ("enabled");
	_tmp16_ = g_strdup ("smooth");
	_tmp17_ = g_strdup ("traces");
	_tmp18_ = g_new0 (gchar*, 3 + 1);
	_tmp18_[0] = _tmp15_;
	_tmp18_[1] = _tmp16_;
	_tmp18_[2] = _tmp17_;
	graphproperties = _tmp18_;
	graphproperties_length1 = 3;
	_graphproperties_size_ = graphproperties_length1;
	_tmp19_ = graphproperties;
	_tmp19__length1 = graphproperties_length1;
	{
		gchar** property_collection = NULL;
		gint property_collection_length1 = 0;
		gint _property_collection_size_ = 0;
		gint property_it = 0;
		property_collection = _tmp19_;
		property_collection_length1 = _tmp19__length1;
		for (property_it = 0; property_it < _tmp19__length1; property_it = property_it + 1) {
			gchar* _tmp20_ = NULL;
			gchar* property = NULL;
			_tmp20_ = g_strdup (property_collection[property_it]);
			property = _tmp20_;
			{
				GSettings* _tmp21_ = NULL;
				const gchar* _tmp22_ = NULL;
				GraphModel* _tmp23_ = NULL;
				const gchar* _tmp24_ = NULL;
				_tmp21_ = graphsettings;
				_tmp22_ = property;
				_tmp23_ = graphmodel;
				_tmp24_ = property;
				g_settings_bind (_tmp21_, _tmp22_, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, G_TYPE_OBJECT, GObject), _tmp24_, G_SETTINGS_BIND_DEFAULT);
				_g_free0 (property);
			}
		}
	}
	_tmp25_ = graphmodel;
	_tmp26_ = graph_model_get_traces (_tmp25_, &_tmp26__length1);
	_tmp27_ = _tmp26_;
	_tmp27__length1 = _tmp26__length1;
	_tmp28_ = (_tmp27_ != NULL) ? _vala_array_dup18 (_tmp27_, _tmp27__length1) : ((gpointer) _tmp27_);
	_tmp28__length1 = _tmp27__length1;
	traceids = _tmp28_;
	traceids_length1 = _tmp28__length1;
	_traceids_size_ = traceids_length1;
	_tmp29_ = graphmodel;
	_tmp30_ = graph_model_get_tracemodels (_tmp29_, &_tmp30__length1);
	_tmp31_ = _tmp30_;
	_tmp31__length1 = _tmp30__length1;
	_tmp32_ = (_tmp31_ != NULL) ? _vala_array_dup19 (_tmp31_, _tmp31__length1) : ((gpointer) _tmp31_);
	_tmp32__length1 = _tmp31__length1;
	tracemodels = _tmp32_;
	tracemodels_length1 = _tmp32__length1;
	_tracemodels_size_ = tracemodels_length1;
	{
		guint i = 0U;
		guint isize = 0U;
		gchar** _tmp33_ = NULL;
		gint _tmp33__length1 = 0;
		i = (guint) 0;
		_tmp33_ = traceids;
		_tmp33__length1 = traceids_length1;
		isize = (guint) _tmp33__length1;
		{
			gboolean _tmp34_ = FALSE;
			_tmp34_ = TRUE;
			while (TRUE) {
				gboolean _tmp35_ = FALSE;
				guint _tmp37_ = 0U;
				guint _tmp38_ = 0U;
				TraceModel** _tmp39_ = NULL;
				gint _tmp39__length1 = 0;
				guint _tmp40_ = 0U;
				TraceModel* _tmp41_ = NULL;
				const gchar* _tmp42_ = NULL;
				gchar** _tmp43_ = NULL;
				gint _tmp43__length1 = 0;
				guint _tmp44_ = 0U;
				const gchar* _tmp45_ = NULL;
				_tmp35_ = _tmp34_;
				if (!_tmp35_) {
					guint _tmp36_ = 0U;
					_tmp36_ = i;
					i = _tmp36_ + 1;
				}
				_tmp34_ = FALSE;
				_tmp37_ = i;
				_tmp38_ = isize;
				if (!(_tmp37_ < _tmp38_)) {
					break;
				}
				_tmp39_ = tracemodels;
				_tmp39__length1 = tracemodels_length1;
				_tmp40_ = i;
				_tmp41_ = _tmp39_[_tmp40_];
				_tmp42_ = graphid;
				_tmp43_ = traceids;
				_tmp43__length1 = traceids_length1;
				_tmp44_ = i;
				_tmp45_ = _tmp43_[_tmp44_];
				main_addtracebinds (self, _tmp41_, _tmp42_, _tmp45_);
			}
		}
	}
	tracemodels = (_vala_array_free (tracemodels, tracemodels_length1, (GDestroyNotify) g_object_unref), NULL);
	traceids = (_vala_array_free (traceids, traceids_length1, (GDestroyNotify) g_free), NULL);
	graphproperties = (_vala_array_free (graphproperties, graphproperties_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (graphsettings);
	_g_free0 (graphid);
}


static gboolean _utils_get_settings_rgba_gsettings_bind_get_mapping (GValue* value, GVariant* variant, void* user_data) {
	gboolean result;
	result = utils_get_settings_rgba (value, variant, user_data);
	return result;
}


static void __lambda22_ (void) {
}


static void ___lambda22__gdestroy_notify (void* data) {
	__lambda22_ ();
}


static void main_addtracebinds (Main* self, TraceModel* tracemodel, const gchar* graphid, const gchar* traceid) {
	GSettings* tracesettings = NULL;
	SettingsCache* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	GSettings* _tmp3_ = NULL;
	TraceModel* _tmp4_ = NULL;
	TraceModel* _tmp5_ = NULL;
	TraceModel* _tmp6_ = NULL;
	ExpressionCache* _tmp7_ = NULL;
	ExpressionCache* _tmp8_ = NULL;
	g_return_if_fail (IS_MAIN (self));
	g_return_if_fail (IS_TRACE_MODEL (tracemodel));
	g_return_if_fail (graphid != NULL);
	g_return_if_fail (traceid != NULL);
	_tmp0_ = self->priv->settingscache;
	_tmp1_ = graphid;
	_tmp2_ = traceid;
	_tmp3_ = settings_cache_tracesettings (_tmp0_, _tmp1_, _tmp2_);
	tracesettings = _tmp3_;
	_tmp4_ = tracemodel;
	g_settings_bind_with_mapping (tracesettings, "color", _tmp4_, "rgba", G_SETTINGS_BIND_DEFAULT, _utils_get_settings_rgba_gsettings_bind_get_mapping, (GSettingsBindSetMapping) utils_set_settings_rgba, NULL, ___lambda22__gdestroy_notify);
	_tmp5_ = tracemodel;
	g_settings_bind (tracesettings, "enabled", G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, G_TYPE_OBJECT, GObject), "enabled", G_SETTINGS_BIND_DEFAULT);
	_tmp6_ = tracemodel;
	_tmp7_ = trace_model_get_expression (_tmp6_);
	_tmp8_ = _tmp7_;
	g_settings_bind (tracesettings, "expression", G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, G_TYPE_OBJECT, GObject), "expression", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (tracesettings);
}


static void main_real_activate (GApplication* base) {
	Main * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MAIN, Main);
}


static void __lambda23_ (void) {
}


static void ___lambda23__gdestroy_notify (void* data) {
	__lambda23_ ();
}


static void _item_help_show_advanced_preferences_itemhelp_show (AdvancedPreferences* _sender, gpointer self) {
	item_help_show (self);
}


static void _item_help_show_item_preferences_itemhelp_show (ItemPreferences* _sender, gpointer self) {
	item_help_show (self);
}


static void _advanced_preferences_show_preferences_advancedpreferences_show (Preferences* _sender, gpointer self) {
	advanced_preferences_show (self);
}


static void _item_preferences_show_preferences_menupreferences_show (Preferences* _sender, gpointer self) {
	item_preferences_show (self);
}


static void _item_preferences_show_preferences_indicatorpreferences_show (Preferences* _sender, gpointer self) {
	item_preferences_show (self);
}


static void _preferences_restore_colorscheme_advanced_preferences_colorscheme_restore (AdvancedPreferences* _sender, gpointer self) {
	preferences_restore_colorscheme (self);
}


static void _item_help_update_indicator_providers_updated (Indicator* _sender, gpointer self) {
	item_help_update (self);
}


static void main_real_startup (GApplication* base) {
	Main * self;
	gchar* icondirectory = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	GtkMenu* menu = NULL;
	gchar** _tmp2_ = NULL;
	gchar** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	GObject* _tmp4_ = NULL;
	GtkMenu* _tmp5_ = NULL;
	GtkMenu* _tmp6_ = NULL;
	Providers* _tmp7_ = NULL;
	Providers* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
	Indicator* _tmp10_ = NULL;
	ColorMapper* _tmp11_ = NULL;
	SettingsCache* _tmp12_ = NULL;
	SettingsConversion* _tmp13_ = NULL;
	SettingsConversion* _tmp14_ = NULL;
	GSettings* datasettings = NULL;
	SettingsCache* _tmp15_ = NULL;
	GSettings* _tmp16_ = NULL;
	Indicator* _tmp17_ = NULL;
	MenuModel* _tmp18_ = NULL;
	MenuModel* _tmp19_ = NULL;
	Indicator* _tmp20_ = NULL;
	MenuModel* _tmp21_ = NULL;
	MenuModel* _tmp22_ = NULL;
	Indicator* _tmp23_ = NULL;
	MenuModel* _tmp24_ = NULL;
	MenuModel* _tmp25_ = NULL;
	Indicator* _tmp26_ = NULL;
	Indicator* _tmp27_ = NULL;
	Indicator* _tmp28_ = NULL;
	Indicator* _tmp29_ = NULL;
	ColorMapper* _tmp30_ = NULL;
	Indicator* _tmp31_ = NULL;
	Indicator* _tmp32_ = NULL;
	Indicator* _tmp33_ = NULL;
	ItemHelp* _tmp34_ = NULL;
	ColorMapper* _tmp35_ = NULL;
	AdvancedPreferences* _tmp36_ = NULL;
	AdvancedPreferences* _tmp37_ = NULL;
	ItemHelp* _tmp38_ = NULL;
	ItemPreferences* _tmp39_ = NULL;
	ItemPreferences* _tmp40_ = NULL;
	ItemHelp* _tmp41_ = NULL;
	ItemPreferences* _tmp42_ = NULL;
	ItemPreferences* _tmp43_ = NULL;
	ItemHelp* _tmp44_ = NULL;
	ColorMapper* _tmp45_ = NULL;
	Preferences* _tmp46_ = NULL;
	Preferences* _tmp47_ = NULL;
	AdvancedPreferences* _tmp48_ = NULL;
	Preferences* _tmp49_ = NULL;
	ItemPreferences* _tmp50_ = NULL;
	Preferences* _tmp51_ = NULL;
	ItemPreferences* _tmp52_ = NULL;
	AdvancedPreferences* _tmp53_ = NULL;
	Preferences* _tmp54_ = NULL;
	Indicator* _tmp55_ = NULL;
	ItemHelp* _tmp56_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MAIN, Main);
	_tmp0_ = main_datadirectory;
	_tmp1_ = g_build_filename (_tmp0_, "icons", NULL);
	icondirectory = _tmp1_;
	_tmp2_ = g_new0 (gchar*, 0 + 1);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 0;
	_tmp4_ = utils_get_ui ("menu", G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject), _tmp3_, 0, NULL);
	_tmp5_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GTK_TYPE_MENU) ? ((GtkMenu*) _tmp4_) : NULL;
	if (_tmp5_ == NULL) {
		_g_object_unref0 (_tmp4_);
	}
	_tmp6_ = _tmp5_;
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL);
	menu = _tmp6_;
	_tmp7_ = providers_new ();
	_tmp8_ = _tmp7_;
	_tmp9_ = main_trayiconoption;
	_tmp10_ = indicator_new (icondirectory, _tmp8_, menu, _tmp9_);
	_g_object_unref0 (self->priv->multi);
	self->priv->multi = _tmp10_;
	_g_object_unref0 (_tmp8_);
	_tmp11_ = color_mapper_new ();
	_g_object_unref0 (self->priv->colormapper);
	self->priv->colormapper = _tmp11_;
	_tmp12_ = settings_cache_new ();
	_g_object_unref0 (self->priv->settingscache);
	self->priv->settingscache = _tmp12_;
	_tmp13_ = settings_conversion_new ();
	_tmp14_ = _tmp13_;
	settings_conversion_convert (_tmp14_);
	_g_object_unref0 (_tmp14_);
	main_creategraphs (self, NULL, "");
	_tmp15_ = self->priv->settingscache;
	_tmp16_ = settings_cache_generalsettings (_tmp15_);
	datasettings = _tmp16_;
	_tmp17_ = self->priv->multi;
	_tmp18_ = indicator_get_menumodel (_tmp17_);
	_tmp19_ = _tmp18_;
	g_settings_bind (datasettings, "menu-expressions", G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, G_TYPE_OBJECT, GObject), "expressions", G_SETTINGS_BIND_DEFAULT);
	_tmp20_ = self->priv->multi;
	_tmp21_ = indicator_get_labelmodel (_tmp20_);
	_tmp22_ = _tmp21_;
	g_settings_bind (datasettings, "indicator-expressions", G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, G_TYPE_OBJECT, GObject), "expressions", G_SETTINGS_BIND_DEFAULT);
	_tmp23_ = self->priv->multi;
	_tmp24_ = indicator_get_descriptionmodel (_tmp23_);
	_tmp25_ = _tmp24_;
	g_settings_bind (datasettings, "description-expressions", G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, G_TYPE_OBJECT, GObject), "expressions", G_SETTINGS_BIND_DEFAULT);
	_tmp26_ = self->priv->multi;
	g_settings_bind (datasettings, "indicator-expression-index", G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, G_TYPE_OBJECT, GObject), "indicator-index", G_SETTINGS_BIND_DEFAULT);
	_tmp27_ = self->priv->multi;
	g_settings_bind (datasettings, "width", G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, G_TYPE_OBJECT, GObject), "width", G_SETTINGS_BIND_DEFAULT);
	_tmp28_ = self->priv->multi;
	g_settings_bind (datasettings, "height", G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, G_TYPE_OBJECT, GObject), "height", G_SETTINGS_BIND_DEFAULT);
	_tmp29_ = self->priv->multi;
	g_settings_bind_with_mapping (datasettings, "background-color", _tmp29_, "background-rgba", G_SETTINGS_BIND_DEFAULT, _utils_get_settings_rgba_gsettings_bind_get_mapping, (GSettingsBindSetMapping) utils_set_settings_rgba, NULL, ___lambda23__gdestroy_notify);
	g_settings_bind (datasettings, "autostart", G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject), "autostart", G_SETTINGS_BIND_DEFAULT);
	_tmp30_ = self->priv->colormapper;
	g_settings_bind (datasettings, "color-scheme", G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, G_TYPE_OBJECT, GObject), "color-scheme", G_SETTINGS_BIND_DEFAULT);
	_tmp31_ = self->priv->multi;
	g_settings_bind (datasettings, "speed", G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, G_TYPE_OBJECT, GObject), "speed", G_SETTINGS_BIND_DEFAULT);
	_tmp32_ = self->priv->multi;
	indicator_updateall (_tmp32_);
	_tmp33_ = self->priv->multi;
	_tmp34_ = item_help_new (_tmp33_);
	_g_object_unref0 (self->priv->itemhelp);
	self->priv->itemhelp = _tmp34_;
	_tmp35_ = self->priv->colormapper;
	_tmp36_ = advanced_preferences_new (_tmp35_);
	_g_object_unref0 (self->priv->advancedpreferences);
	self->priv->advancedpreferences = _tmp36_;
	_tmp37_ = self->priv->advancedpreferences;
	_tmp38_ = self->priv->itemhelp;
	g_signal_connect_object (_tmp37_, "itemhelp-show", (GCallback) _item_help_show_advanced_preferences_itemhelp_show, _tmp38_, 0);
	_tmp39_ = item_preferences_new ("menu-expressions");
	_g_object_unref0 (self->priv->menupreferences);
	self->priv->menupreferences = _tmp39_;
	_tmp40_ = self->priv->menupreferences;
	_tmp41_ = self->priv->itemhelp;
	g_signal_connect_object (_tmp40_, "itemhelp-show", (GCallback) _item_help_show_item_preferences_itemhelp_show, _tmp41_, 0);
	_tmp42_ = item_preferences_new ("indicator-expressions");
	_g_object_unref0 (self->priv->indicatorpreferences);
	self->priv->indicatorpreferences = _tmp42_;
	_tmp43_ = self->priv->indicatorpreferences;
	_tmp44_ = self->priv->itemhelp;
	g_signal_connect_object (_tmp43_, "itemhelp-show", (GCallback) _item_help_show_item_preferences_itemhelp_show, _tmp44_, 0);
	_tmp45_ = self->priv->colormapper;
	_tmp46_ = preferences_new (_tmp45_);
	_g_object_unref0 (self->priv->preferences);
	self->priv->preferences = _tmp46_;
	_tmp47_ = self->priv->preferences;
	_tmp48_ = self->priv->advancedpreferences;
	g_signal_connect_object (_tmp47_, "advancedpreferences-show", (GCallback) _advanced_preferences_show_preferences_advancedpreferences_show, _tmp48_, 0);
	_tmp49_ = self->priv->preferences;
	_tmp50_ = self->priv->menupreferences;
	g_signal_connect_object (_tmp49_, "menupreferences-show", (GCallback) _item_preferences_show_preferences_menupreferences_show, _tmp50_, 0);
	_tmp51_ = self->priv->preferences;
	_tmp52_ = self->priv->indicatorpreferences;
	g_signal_connect_object (_tmp51_, "indicatorpreferences-show", (GCallback) _item_preferences_show_preferences_indicatorpreferences_show, _tmp52_, 0);
	_tmp53_ = self->priv->advancedpreferences;
	_tmp54_ = self->priv->preferences;
	g_signal_connect_object (_tmp53_, "colorscheme-restore", (GCallback) _preferences_restore_colorscheme_advanced_preferences_colorscheme_restore, _tmp54_, 0);
	_tmp55_ = self->priv->multi;
	_tmp56_ = self->priv->itemhelp;
	g_signal_connect_object (_tmp55_, "providers-updated", (GCallback) _item_help_update_indicator_providers_updated, _tmp56_, 0);
	g_application_hold (G_TYPE_CHECK_INSTANCE_CAST (self, g_application_get_type (), GApplication));
	gdk_notify_startup_complete ();
	G_APPLICATION_CLASS (main_parent_class)->startup (G_TYPE_CHECK_INSTANCE_CAST (self, g_application_get_type (), GApplication));
	_g_object_unref0 (datasettings);
	_g_object_unref0 (menu);
	_g_free0 (icondirectory);
}


static gint main_real_command_line (GApplication* base, GApplicationCommandLine* command_line) {
	Main * self;
	gint result = 0;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MAIN, Main);
	g_return_val_if_fail (G_IS_APPLICATION_COMMAND_LINE (command_line), 0);
	result = 0;
	return result;
}


static gboolean main_real_local_command_line (GApplication* base, gchar*** arguments, gint* exit_status) {
	Main * self;
	gint _vala_exit_status = 0;
	gboolean result = FALSE;
	gboolean _result_ = FALSE;
	gboolean _tmp18_ = FALSE;
	gchar** _tmp42_ = NULL;
	gint _tmp42__length1 = 0;
	GError * _inner_error_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MAIN, Main);
	{
		GOptionGroup* group = NULL;
		GOptionGroup* _tmp0_ = NULL;
		GOptionGroup* _tmp1_ = NULL;
		GOptionContext* context = NULL;
		const gchar* _tmp2_ = NULL;
		GOptionContext* _tmp3_ = NULL;
		GOptionContext* _tmp4_ = NULL;
		GOptionContext* _tmp5_ = NULL;
		GOptionGroup* _tmp6_ = NULL;
		GOptionContext* _tmp7_ = NULL;
		GOptionGroup* _tmp8_ = NULL;
		gchar** local_args = NULL;
		gchar** _tmp9_ = NULL;
		gint _tmp9__length1 = 0;
		gint local_args_length1 = 0;
		gint _local_args_size_ = 0;
		GOptionContext* _tmp10_ = NULL;
		_tmp0_ = g_option_group_new ("", "", "", self, NULL);
		group = _tmp0_;
		_tmp1_ = group;
		g_option_group_add_entries (_tmp1_, MAIN_options);
		_tmp2_ = _ ("- System load application indicator");
		_tmp3_ = g_option_context_new (_tmp2_);
		context = _tmp3_;
		_tmp4_ = context;
		g_option_context_set_help_enabled (_tmp4_, TRUE);
		_tmp5_ = context;
		_tmp6_ = group;
		group = NULL;
		g_option_context_set_main_group (_tmp5_, _tmp6_);
		_tmp7_ = context;
		_tmp8_ = gtk_get_option_group (TRUE);
		g_option_context_add_group (_tmp7_, _tmp8_);
		_tmp9_ = *arguments;
		_tmp9__length1 = _vala_array_length (*arguments);
		local_args = _tmp9_;
		local_args_length1 = _tmp9__length1;
		_local_args_size_ = local_args_length1;
		_tmp10_ = context;
		g_option_context_parse (_tmp10_, &local_args_length1, &local_args, &_inner_error_);
		if (_inner_error_ != NULL) {
			_g_option_context_free0 (context);
			_g_option_group_free0 (group);
			if (_inner_error_->domain == G_OPTION_ERROR) {
				goto __catch7_g_option_error;
			}
			_g_option_context_free0 (context);
			_g_option_group_free0 (group);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return FALSE;
		}
		_g_option_context_free0 (context);
		_g_option_group_free0 (group);
	}
	goto __finally7;
	__catch7_g_option_error:
	{
		GError* e = NULL;
		FILE* _tmp11_ = NULL;
		GError* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
		FILE* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
		gchar** _tmp16_ = NULL;
		gint _tmp16__length1 = 0;
		const gchar* _tmp17_ = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp11_ = stdout;
		_tmp12_ = e;
		_tmp13_ = _tmp12_->message;
		fprintf (_tmp11_, "%s\n", _tmp13_);
		_tmp14_ = stdout;
		_tmp15_ = _ ("Run '%s --help' to see a full list of available command line options.\n");
		_tmp16_ = *arguments;
		_tmp16__length1 = _vala_array_length (*arguments);
		_tmp17_ = _tmp16_[0];
		fprintf (_tmp14_, _tmp15_, _tmp17_);
		_vala_exit_status = 1;
		result = TRUE;
		_g_error_free0 (e);
		if (exit_status) {
			*exit_status = _vala_exit_status;
		}
		return result;
	}
	__finally7:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return FALSE;
	}
	_vala_exit_status = 0;
	_result_ = FALSE;
	_tmp18_ = main_versionoption;
	if (_tmp18_) {
		GtkAboutDialog* about = NULL;
		gchar** _tmp19_ = NULL;
		gchar** _tmp20_ = NULL;
		gint _tmp20__length1 = 0;
		GObject* _tmp21_ = NULL;
		GtkAboutDialog* _tmp22_ = NULL;
		GtkAboutDialog* _tmp23_ = NULL;
		_tmp19_ = g_new0 (gchar*, 0 + 1);
		_tmp20_ = _tmp19_;
		_tmp20__length1 = 0;
		_tmp21_ = utils_get_ui ("aboutdialog", G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject), _tmp20_, 0, NULL);
		_tmp22_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, GTK_TYPE_ABOUT_DIALOG) ? ((GtkAboutDialog*) _tmp21_) : NULL;
		if (_tmp22_ == NULL) {
			_g_object_unref0 (_tmp21_);
		}
		_tmp23_ = _tmp22_;
		_tmp20_ = (_vala_array_free (_tmp20_, _tmp20__length1, (GDestroyNotify) g_free), NULL);
		about = _tmp23_;
		{
			GRegex* _tmp24_ = NULL;
			GRegex* _tmp25_ = NULL;
			gchar* _tmp26_ = NULL;
			GRegex* _tmp27_ = NULL;
			GtkAboutDialog* _tmp28_ = NULL;
			const gchar* _tmp29_ = NULL;
			gchar* _tmp30_ = NULL;
			gchar* _tmp31_ = NULL;
			FILE* _tmp32_ = NULL;
			GtkAboutDialog* _tmp33_ = NULL;
			const gchar* _tmp34_ = NULL;
			GtkAboutDialog* _tmp35_ = NULL;
			const gchar* _tmp36_ = NULL;
			GtkAboutDialog* _tmp37_ = NULL;
			const gchar* _tmp38_ = NULL;
			gchar* _tmp39_ = NULL;
			GtkAboutDialog* _tmp40_ = NULL;
			const gchar* _tmp41_ = NULL;
			_tmp25_ = g_regex_new ("</?a[^>]*>", 0, 0, &_inner_error_);
			_tmp24_ = _tmp25_;
			if (_inner_error_ != NULL) {
				if (_inner_error_->domain == G_REGEX_ERROR) {
					goto __catch8_g_regex_error;
				}
				_g_object_unref0 (about);
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return FALSE;
			}
			_tmp27_ = _tmp24_;
			_tmp28_ = about;
			_tmp29_ = gtk_about_dialog_get_license (_tmp28_);
			_tmp30_ = g_regex_replace (_tmp27_, _tmp29_, (gssize) (-1), 0, "", 0, &_inner_error_);
			_tmp31_ = _tmp30_;
			_g_regex_unref0 (_tmp27_);
			_tmp26_ = _tmp31_;
			if (_inner_error_ != NULL) {
				if (_inner_error_->domain == G_REGEX_ERROR) {
					goto __catch8_g_regex_error;
				}
				_g_object_unref0 (about);
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return FALSE;
			}
			_tmp32_ = stdout;
			_tmp33_ = about;
			_tmp34_ = gtk_about_dialog_get_program_name (_tmp33_);
			_tmp35_ = about;
			_tmp36_ = gtk_about_dialog_get_version (_tmp35_);
			_tmp37_ = about;
			_tmp38_ = gtk_about_dialog_get_copyright (_tmp37_);
			_tmp39_ = _tmp26_;
			_tmp40_ = about;
			_tmp41_ = gtk_about_dialog_get_website (_tmp40_);
			fprintf (_tmp32_, "%s %s\n%s\n%s\n\n%s\n", _tmp34_, _tmp36_, _tmp38_, _tmp39_, _tmp41_);
			_g_free0 (_tmp39_);
		}
		goto __finally8;
		__catch8_g_regex_error:
		{
			GError* e = NULL;
			e = _inner_error_;
			_inner_error_ = NULL;
			_g_error_free0 (e);
		}
		__finally8:
		if (_inner_error_ != NULL) {
			_g_object_unref0 (about);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return FALSE;
		}
		_result_ = TRUE;
		_g_object_unref0 (about);
	}
	_tmp42_ = main_expressionoptions;
	_tmp42__length1 = _vala_array_length (main_expressionoptions);
	{
		gchar** expressionoption_collection = NULL;
		gint expressionoption_collection_length1 = 0;
		gint _expressionoption_collection_size_ = 0;
		gint expressionoption_it = 0;
		expressionoption_collection = _tmp42_;
		expressionoption_collection_length1 = _tmp42__length1;
		for (expressionoption_it = 0; expressionoption_it < _tmp42__length1; expressionoption_it = expressionoption_it + 1) {
			gchar* _tmp43_ = NULL;
			gchar* expressionoption = NULL;
			_tmp43_ = g_strdup (expressionoption_collection[expressionoption_it]);
			expressionoption = _tmp43_;
			{
				ExpressionCache* cache = NULL;
				Providers* _tmp44_ = NULL;
				Providers* _tmp45_ = NULL;
				const gchar* _tmp46_ = NULL;
				ExpressionCache* _tmp47_ = NULL;
				ExpressionCache* _tmp48_ = NULL;
				FILE* _tmp49_ = NULL;
				const gchar* _tmp50_ = NULL;
				FILE* _tmp51_ = NULL;
				ExpressionCache* _tmp52_ = NULL;
				gint _tmp53_ = 0;
				gchar** _tmp54_ = NULL;
				gchar** _tmp55_ = NULL;
				gint _tmp55__length1 = 0;
				gchar* _tmp56_ = NULL;
				gchar* _tmp57_ = NULL;
				FILE* _tmp58_ = NULL;
				ExpressionCache* _tmp59_ = NULL;
				gchar* _tmp60_ = NULL;
				gchar* _tmp61_ = NULL;
				FILE* _tmp62_ = NULL;
				ExpressionCache* _tmp63_ = NULL;
				gchar* _tmp64_ = NULL;
				gchar* _tmp65_ = NULL;
				_tmp44_ = providers_new ();
				_tmp45_ = _tmp44_;
				_tmp46_ = expressionoption;
				_tmp47_ = expression_cache_new (_tmp45_, _tmp46_);
				_tmp48_ = _tmp47_;
				_g_object_unref0 (_tmp45_);
				cache = _tmp48_;
				_tmp49_ = stdout;
				_tmp50_ = expressionoption;
				fprintf (_tmp49_, "Original: %s\n", _tmp50_);
				_tmp51_ = stdout;
				_tmp52_ = cache;
				_tmp54_ = expression_cache_tokens (_tmp52_, &_tmp53_);
				_tmp55_ = _tmp54_;
				_tmp55__length1 = _tmp53_;
				_tmp56_ = g_strjoinv ("' '", _tmp55_);
				_tmp57_ = _tmp56_;
				fprintf (_tmp51_, "Tokens: '%s'\n", _tmp57_);
				_g_free0 (_tmp57_);
				_tmp55_ = (_vala_array_free (_tmp55_, _tmp55__length1, (GDestroyNotify) g_free), NULL);
				_tmp58_ = stdout;
				_tmp59_ = cache;
				_tmp60_ = expression_cache_label (_tmp59_);
				_tmp61_ = _tmp60_;
				fprintf (_tmp58_, "Result: %s\n", _tmp61_);
				_g_free0 (_tmp61_);
				_tmp62_ = stdout;
				_tmp63_ = cache;
				_tmp64_ = expression_cache_guide (_tmp63_);
				_tmp65_ = _tmp64_;
				fprintf (_tmp62_, "Guide: %s\n", _tmp65_);
				_g_free0 (_tmp65_);
				_result_ = TRUE;
				_g_object_unref0 (cache);
				_g_free0 (expressionoption);
			}
		}
	}
	result = _result_;
	if (exit_status) {
		*exit_status = _vala_exit_status;
	}
	return result;
}


gint main_main (gchar** args, int args_length1) {
	gint result = 0;
	gchar* directory = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp3_ = NULL;
	gboolean _tmp7_ = FALSE;
	const gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gchar** _tmp14_ = NULL;
	gint _tmp14__length1 = 0;
	Reaper* _tmp15_ = NULL;
	gint _result_ = 0;
	Main* _tmp16_ = NULL;
	Main* _tmp17_ = NULL;
	gchar** _tmp18_ = NULL;
	gint _tmp18__length1 = 0;
	gint _tmp19_ = 0;
	gint _tmp20_ = 0;
	const gchar* _tmp21_ = NULL;
	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
	_tmp0_ = g_getenv ("XDG_RUNTIME_DIR");
	_tmp1_ = g_strdup (_tmp0_);
	directory = _tmp1_;
	_tmp3_ = directory;
	if (_tmp3_ == NULL) {
		_tmp2_ = TRUE;
	} else {
		const gchar* _tmp4_ = NULL;
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
		_tmp4_ = directory;
		_tmp5_ = strlen (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp2_ = _tmp6_ == 0;
	}
	_tmp7_ = _tmp2_;
	if (_tmp7_) {
		gchar* _tmp8_ = NULL;
		_tmp8_ = g_strdup ("/var/lock");
		_g_free0 (directory);
		directory = _tmp8_;
	}
	_tmp9_ = directory;
	_tmp10_ = g_strconcat (_tmp9_, "/multiload-icons-XXXXXX", NULL);
	_tmp11_ = _tmp10_;
	_tmp12_ = mkdtemp (_tmp11_);
	_tmp13_ = g_strdup (_tmp12_);
	_g_free0 (main_datadirectory);
	main_datadirectory = _tmp13_;
	_g_free0 (_tmp11_);
	gtk_init (&args_length1, &args);
	gtk_window_set_default_icon_name ("utilities-system-monitor");
	_tmp14_ = args;
	_tmp14__length1 = args_length1;
	_tmp15_ = reaper_new (_tmp14_, _tmp14__length1);
	_g_object_unref0 (main_reaper);
	main_reaper = _tmp15_;
	_tmp16_ = main_new ("de.mh21.indicator-multiload", G_APPLICATION_FLAGS_NONE);
	_tmp17_ = _tmp16_;
	_tmp18_ = args;
	_tmp18__length1 = args_length1;
	_tmp19_ = g_application_run (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, g_application_get_type (), GApplication), _tmp18__length1, _tmp18_);
	_tmp20_ = _tmp19_;
	_g_object_unref0 (_tmp17_);
	_result_ = _tmp20_;
	_tmp21_ = main_datadirectory;
	g_rmdir (_tmp21_);
	result = _result_;
	_g_free0 (directory);
	return result;
}


int main (int argc, char ** argv) {
	g_type_init ();
	return main_main (argv, argc);
}


gboolean main_get_autostart (Main* self) {
	gboolean result;
	GKeyFile* file = NULL;
	GKeyFile* _tmp0_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (IS_MAIN (self), FALSE);
	_tmp0_ = g_key_file_new ();
	file = _tmp0_;
	{
		GKeyFile* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		_tmp1_ = file;
		_tmp2_ = self->priv->autostartfile;
		g_key_file_load_from_file (_tmp1_, _tmp2_, G_KEY_FILE_NONE, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch9_g_error;
		}
	}
	goto __finally9;
	__catch9_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		result = FALSE;
		_g_error_free0 (e);
		_g_key_file_free0 (file);
		return result;
	}
	__finally9:
	if (_inner_error_ != NULL) {
		_g_key_file_free0 (file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return FALSE;
	}
	{
		gboolean _tmp3_ = FALSE;
		GKeyFile* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
		_tmp4_ = file;
		_tmp5_ = self->priv->autostartkey;
		_tmp6_ = g_key_file_get_boolean (_tmp4_, G_KEY_FILE_DESKTOP_GROUP, _tmp5_, &_inner_error_);
		_tmp3_ = _tmp6_;
		if (_inner_error_ != NULL) {
			goto __catch10_g_error;
		}
		result = _tmp3_;
		_g_key_file_free0 (file);
		return result;
	}
	goto __finally10;
	__catch10_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		result = TRUE;
		_g_error_free0 (e);
		_g_key_file_free0 (file);
		return result;
	}
	__finally10:
	_g_key_file_free0 (file);
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
	g_clear_error (&_inner_error_);
	return FALSE;
}


void main_set_autostart (Main* self, gboolean value) {
	GKeyFile* file = NULL;
	GKeyFile* _tmp0_ = NULL;
	const gchar* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_if_fail (IS_MAIN (self));
	_tmp0_ = g_key_file_new ();
	file = _tmp0_;
	{
		const gchar* _tmp1_ = NULL;
		_tmp1_ = self->priv->autostartfile;
		g_key_file_load_from_file (file, _tmp1_, G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch11_g_error;
		}
	}
	goto __finally11;
	__catch11_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		{
			const gchar* _tmp2_ = NULL;
			_tmp2_ = self->priv->applicationfile;
			g_key_file_load_from_data_dirs (file, _tmp2_, NULL, G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, &_inner_error_);
			if (_inner_error_ != NULL) {
				goto __catch12_g_error;
			}
		}
		goto __finally12;
		__catch12_g_error:
		{
			GError* e = NULL;
			e = _inner_error_;
			_inner_error_ = NULL;
			g_key_file_set_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_TYPE, "Application");
			g_key_file_set_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NAME, "indicator-multiload");
			g_key_file_set_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_EXEC, "indicator-multiload");
			_g_error_free0 (e);
		}
		__finally12:
		if (_inner_error_ != NULL) {
			_g_error_free0 (e);
			_g_error_free0 (e);
			_g_key_file_free0 (file);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_g_error_free0 (e);
	}
	__finally11:
	if (_inner_error_ != NULL) {
		_g_key_file_free0 (file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp3_ = self->priv->autostartkey;
	_tmp4_ = value;
	g_key_file_set_boolean (file, G_KEY_FILE_DESKTOP_GROUP, _tmp3_, _tmp4_);
	{
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		_tmp5_ = g_get_user_config_dir ();
		_tmp6_ = g_build_filename (_tmp5_, "autostart", NULL);
		_tmp7_ = _tmp6_;
		g_mkdir (_tmp7_, 0777);
		_g_free0 (_tmp7_);
		_tmp8_ = self->priv->autostartfile;
		_tmp9_ = g_key_file_to_data (file, NULL, NULL);
		_tmp10_ = _tmp9_;
		g_file_set_contents (_tmp8_, _tmp10_, (gssize) (-1), &_inner_error_);
		_g_free0 (_tmp10_);
		if (_inner_error_ != NULL) {
			goto __catch13_g_error;
		}
	}
	goto __finally13;
	__catch13_g_error:
	{
		GError* e = NULL;
		FILE* _tmp11_ = NULL;
		GError* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp11_ = stderr;
		_tmp12_ = e;
		_tmp13_ = _tmp12_->message;
		fprintf (_tmp11_, "Could not create autostart desktop file: %s\n", _tmp13_);
		_g_error_free0 (e);
	}
	__finally13:
	if (_inner_error_ != NULL) {
		_g_key_file_free0 (file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_g_key_file_free0 (file);
	g_object_notify ((GObject *) self, "autostart");
}


static void main_class_init (MainClass * klass) {
	main_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (MainPrivate));
	G_APPLICATION_CLASS (klass)->activate = main_real_activate;
	G_APPLICATION_CLASS (klass)->startup = main_real_startup;
	G_APPLICATION_CLASS (klass)->command_line = main_real_command_line;
	G_APPLICATION_CLASS (klass)->local_command_line = main_real_local_command_line;
	G_OBJECT_CLASS (klass)->get_property = _vala_main_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_main_set_property;
	G_OBJECT_CLASS (klass)->finalize = main_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), MAIN_AUTOSTART, g_param_spec_boolean ("autostart", "autostart", "autostart", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void main_instance_init (Main * self) {
	self->priv = MAIN_GET_PRIVATE (self);
}


static void main_finalize (GObject* obj) {
	Main * self;
	Indicator* _tmp0_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MAIN, Main);
	_tmp0_ = self->priv->multi;
	if (_tmp0_ != NULL) {
		Indicator* _tmp1_ = NULL;
		_tmp1_ = self->priv->multi;
		indicator_destroy (_tmp1_);
	}
	_g_object_unref0 (self->priv->multi);
	_g_object_unref0 (self->priv->about);
	_g_object_unref0 (self->priv->preferences);
	_g_object_unref0 (self->priv->advancedpreferences);
	_g_object_unref0 (self->priv->menupreferences);
	_g_object_unref0 (self->priv->indicatorpreferences);
	_g_object_unref0 (self->priv->itemhelp);
	_g_object_unref0 (self->priv->settingscache);
	_g_object_unref0 (self->priv->colormapper);
	_g_free0 (self->priv->autostartkey);
	_g_free0 (self->priv->desktopfilename);
	_g_free0 (self->priv->autostartfile);
	_g_free0 (self->priv->applicationfile);
	_g_free0 (self->priv->graphsetups);
	G_OBJECT_CLASS (main_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 main_get_type (void) {
	static volatile gsize main_type_id__volatile = 0;
	if (g_once_init_enter (&main_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MainClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) main_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Main), 0, (GInstanceInitFunc) main_instance_init, NULL };
		GType main_type_id;
		main_type_id = g_type_register_static (g_application_get_type (), "Main", &g_define_type_info, 0);
		g_once_init_leave (&main_type_id__volatile, main_type_id);
	}
	return main_type_id__volatile;
}


static void _vala_main_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	Main * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MAIN, Main);
	switch (property_id) {
		case MAIN_AUTOSTART:
		g_value_set_boolean (value, main_get_autostart (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_main_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	Main * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MAIN, Main);
	switch (property_id) {
		case MAIN_AUTOSTART:
		main_set_autostart (self, g_value_get_boolean (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);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



