/* TimeoutComboBox.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from TimeoutComboBox.vala, do not modify */

/*
 * SPDX-License-Identifier: GPL-2.0-or-later
 * SPDX-FileCopyrightText: 2011-2025 elementary, Inc. (https://elementary.io)
 */

#include <granite-7.h>
#include <glib-object.h>
#include <glib.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <float.h>
#include <math.h>
#include <glib/gi18n-lib.h>
#include "power.h"

#define POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE 60
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define POWER_TYPE_TIMEOUT_COMBO_BOX (power_timeout_combo_box_get_type ())
#define POWER_TIMEOUT_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POWER_TYPE_TIMEOUT_COMBO_BOX, PowerTimeoutComboBox))
#define POWER_TIMEOUT_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), POWER_TYPE_TIMEOUT_COMBO_BOX, PowerTimeoutComboBoxClass))
#define POWER_IS_TIMEOUT_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POWER_TYPE_TIMEOUT_COMBO_BOX))
#define POWER_IS_TIMEOUT_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), POWER_TYPE_TIMEOUT_COMBO_BOX))
#define POWER_TIMEOUT_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), POWER_TYPE_TIMEOUT_COMBO_BOX, PowerTimeoutComboBoxClass))

typedef struct _PowerTimeoutComboBox PowerTimeoutComboBox;
typedef struct _PowerTimeoutComboBoxClass PowerTimeoutComboBoxClass;
typedef struct _PowerTimeoutComboBoxPrivate PowerTimeoutComboBoxPrivate;

#define POWER_GREETER_TYPE_ACCOUNTS_SERVICE (power_greeter_accounts_service_get_type ())
#define POWER_GREETER_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POWER_GREETER_TYPE_ACCOUNTS_SERVICE, PowerGreeterAccountsService))
#define POWER_GREETER_IS_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POWER_GREETER_TYPE_ACCOUNTS_SERVICE))
#define POWER_GREETER_ACCOUNTS_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), POWER_GREETER_TYPE_ACCOUNTS_SERVICE, PowerGreeterAccountsServiceIface))

typedef struct _PowerGreeterAccountsService PowerGreeterAccountsService;
typedef struct _PowerGreeterAccountsServiceIface PowerGreeterAccountsServiceIface;

#define POWER_GREETER_TYPE_ACCOUNTS_SERVICE_PROXY (power_greeter_accounts_service_proxy_get_type ())
enum  {
	POWER_TIMEOUT_COMBO_BOX_0_PROPERTY,
	POWER_TIMEOUT_COMBO_BOX_ENUM_PROPERTY_PROPERTY,
	POWER_TIMEOUT_COMBO_BOX_ENUM_NEVER_VALUE_PROPERTY,
	POWER_TIMEOUT_COMBO_BOX_ENUM_NORMAL_VALUE_PROPERTY,
	POWER_TIMEOUT_COMBO_BOX_SCHEMA_PROPERTY,
	POWER_TIMEOUT_COMBO_BOX_KEY_PROPERTY,
	POWER_TIMEOUT_COMBO_BOX_NUM_PROPERTIES
};
static GParamSpec* power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_NUM_PROPERTIES];
#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_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))

#define POWER_FDO_TYPE_ACCOUNTS (power_fdo_accounts_get_type ())
#define POWER_FDO_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POWER_FDO_TYPE_ACCOUNTS, PowerFDOAccounts))
#define POWER_FDO_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POWER_FDO_TYPE_ACCOUNTS))
#define POWER_FDO_ACCOUNTS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), POWER_FDO_TYPE_ACCOUNTS, PowerFDOAccountsIface))

typedef struct _PowerFDOAccounts PowerFDOAccounts;
typedef struct _PowerFDOAccountsIface PowerFDOAccountsIface;

#define POWER_FDO_TYPE_ACCOUNTS_PROXY (power_fdo_accounts_proxy_get_type ())
typedef struct _PowerTimeoutComboBoxSetupAccountsserviceData PowerTimeoutComboBoxSetupAccountsserviceData;

#define POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT (power_timeout_combo_box_timeout_get_type ())
#define POWER_TIMEOUT_COMBO_BOX_TIMEOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeout))
#define POWER_TIMEOUT_COMBO_BOX_TIMEOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeoutClass))
#define POWER_TIMEOUT_COMBO_BOX_IS_TIMEOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT))
#define POWER_TIMEOUT_COMBO_BOX_IS_TIMEOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT))
#define POWER_TIMEOUT_COMBO_BOX_TIMEOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeoutClass))

typedef struct _PowerTimeoutComboBoxTimeout PowerTimeoutComboBoxTimeout;
typedef struct _PowerTimeoutComboBoxTimeoutClass PowerTimeoutComboBoxTimeoutClass;
typedef struct _PowerTimeoutComboBoxTimeoutPrivate PowerTimeoutComboBoxTimeoutPrivate;
enum  {
	POWER_TIMEOUT_COMBO_BOX_TIMEOUT_0_PROPERTY,
	POWER_TIMEOUT_COMBO_BOX_TIMEOUT_LABEL_PROPERTY,
	POWER_TIMEOUT_COMBO_BOX_TIMEOUT_DESCRIPTION_PROPERTY,
	POWER_TIMEOUT_COMBO_BOX_TIMEOUT_SECONDS_PROPERTY,
	POWER_TIMEOUT_COMBO_BOX_TIMEOUT_NUM_PROPERTIES
};
static GParamSpec* power_timeout_combo_box_timeout_properties[POWER_TIMEOUT_COMBO_BOX_TIMEOUT_NUM_PROPERTIES];
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

struct _PowerTimeoutComboBox {
	GraniteBin parent_instance;
	PowerTimeoutComboBoxPrivate * priv;
};

struct _PowerTimeoutComboBoxClass {
	GraniteBinClass parent_class;
};

struct _PowerGreeterAccountsServiceIface {
	GTypeInterface parent_iface;
	gint (*get_sleep_inactive_ac_timeout) (PowerGreeterAccountsService* self);
	void (*set_sleep_inactive_ac_timeout) (PowerGreeterAccountsService* self, gint value);
	gint (*get_sleep_inactive_ac_type) (PowerGreeterAccountsService* self);
	void (*set_sleep_inactive_ac_type) (PowerGreeterAccountsService* self, gint value);
	gint (*get_sleep_inactive_battery_timeout) (PowerGreeterAccountsService* self);
	void (*set_sleep_inactive_battery_timeout) (PowerGreeterAccountsService* self, gint value);
	gint (*get_sleep_inactive_battery_type) (PowerGreeterAccountsService* self);
	void (*set_sleep_inactive_battery_type) (PowerGreeterAccountsService* self, gint value);
};

struct _PowerTimeoutComboBoxPrivate {
	PowerGreeterAccountsService* greeter_act;
	gchar* _enum_property;
	gint _enum_never_value;
	gint _enum_normal_value;
	GSettings* _schema;
	gchar* _key;
	GVariantType* key_type;
	GtkDropDown* dropdown;
};

struct _PowerFDOAccountsIface {
	GTypeInterface parent_iface;
	gchar* (*find_user_by_name) (PowerFDOAccounts* self, const gchar* username, GError** error);
};

struct _PowerTimeoutComboBoxSetupAccountsserviceData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PowerTimeoutComboBox* self;
	PowerFDOAccounts* accounts_service;
	PowerFDOAccounts* _tmp0_;
	gchar* user_path;
	PowerFDOAccounts* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	PowerGreeterAccountsService* _tmp4_;
	const gchar* _tmp5_;
	PowerGreeterAccountsService* _tmp6_;
	PowerGreeterAccountsService* _tmp7_;
	GError* _inner_error0_;
};

struct _PowerTimeoutComboBoxTimeout {
	GObject parent_instance;
	PowerTimeoutComboBoxTimeoutPrivate * priv;
};

struct _PowerTimeoutComboBoxTimeoutClass {
	GObjectClass parent_class;
};

struct _PowerTimeoutComboBoxTimeoutPrivate {
	gchar* _label;
	gchar* _description;
	gint _seconds;
};

static gint PowerTimeoutComboBox_private_offset;
static gpointer power_timeout_combo_box_parent_class = NULL;
static gint PowerTimeoutComboBoxTimeout_private_offset;
static gpointer power_timeout_combo_box_timeout_parent_class = NULL;

VALA_EXTERN GType power_timeout_combo_box_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType power_greeter_accounts_service_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType power_greeter_accounts_service_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint power_greeter_accounts_service_register_object (void* object,
                                                      GDBusConnection* connection,
                                                      const gchar* path,
                                                      GError** error);
VALA_EXTERN PowerTimeoutComboBox* power_timeout_combo_box_new (GSettings* schema,
                                                   const gchar* key);
VALA_EXTERN PowerTimeoutComboBox* power_timeout_combo_box_construct (GType object_type,
                                                         GSettings* schema,
                                                         const gchar* key);
static void power_timeout_combo_box_update_combo (PowerTimeoutComboBox* self);
static void power_timeout_combo_box_setup_accountsservice_data_free (gpointer _data);
static void power_timeout_combo_box_setup_accountsservice (PowerTimeoutComboBox* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static void power_timeout_combo_box_setup_accountsservice_finish (PowerTimeoutComboBox* self,
                                                           GAsyncResult* _res_);
static gboolean power_timeout_combo_box_setup_accountsservice_co (PowerTimeoutComboBoxSetupAccountsserviceData* _data_);
VALA_EXTERN GType power_fdo_accounts_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint power_fdo_accounts_register_object (void* object,
                                          GDBusConnection* connection,
                                          const gchar* path,
                                          GError** error);
VALA_EXTERN GType power_fdo_accounts_get_type (void) G_GNUC_CONST ;
static void power_timeout_combo_box_setup_accountsservice_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_);
VALA_EXTERN gchar* power_fdo_accounts_find_user_by_name (PowerFDOAccounts* self,
                                             const gchar* username,
                                             GError** error);
static void power_timeout_combo_box_update_settings (PowerTimeoutComboBox* self);
VALA_EXTERN const gchar* power_timeout_combo_box_get_enum_property (PowerTimeoutComboBox* self);
VALA_EXTERN gint power_timeout_combo_box_get_enum_never_value (PowerTimeoutComboBox* self);
VALA_EXTERN gint power_timeout_combo_box_get_enum_normal_value (PowerTimeoutComboBox* self);
VALA_EXTERN GSettings* power_timeout_combo_box_get_schema (PowerTimeoutComboBox* self);
VALA_EXTERN const gchar* power_timeout_combo_box_get_key (PowerTimeoutComboBox* self);
static void _power_timeout_combo_box_update_combo_g_settings_changed (GSettings* _sender,
                                                               const gchar* key,
                                                               gpointer self);
static GType power_timeout_combo_box_timeout_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static gint power_timeout_combo_box_timeout_get_seconds (PowerTimeoutComboBoxTimeout* self);
VALA_EXTERN void power_greeter_accounts_service_set_sleep_inactive_ac_timeout (PowerGreeterAccountsService* self,
                                                                   gint value);
VALA_EXTERN void power_greeter_accounts_service_set_sleep_inactive_ac_type (PowerGreeterAccountsService* self,
                                                                gint value);
VALA_EXTERN void power_greeter_accounts_service_set_sleep_inactive_battery_timeout (PowerGreeterAccountsService* self,
                                                                        gint value);
VALA_EXTERN void power_greeter_accounts_service_set_sleep_inactive_battery_type (PowerGreeterAccountsService* self,
                                                                     gint value);
static gint power_timeout_combo_box_find_closest (PowerTimeoutComboBox* self,
                                           gint second);
static void _power_timeout_combo_box_update_settings_g_object_notify (GObject* _sender,
                                                               GParamSpec* pspec,
                                                               gpointer self);
static void power_timeout_combo_box_bind_factory (PowerTimeoutComboBox* self,
                                           GObject* object);
static GtkWidget* power_timeout_combo_box_timeout_get_widget (PowerTimeoutComboBoxTimeout* self);
VALA_EXTERN void power_timeout_combo_box_set_enum_property (PowerTimeoutComboBox* self,
                                                const gchar* value);
VALA_EXTERN void power_timeout_combo_box_set_enum_never_value (PowerTimeoutComboBox* self,
                                                   gint value);
VALA_EXTERN void power_timeout_combo_box_set_enum_normal_value (PowerTimeoutComboBox* self,
                                                    gint value);
static void power_timeout_combo_box_set_schema (PowerTimeoutComboBox* self,
                                         GSettings* value);
static void power_timeout_combo_box_set_key (PowerTimeoutComboBox* self,
                                      const gchar* value);
static PowerTimeoutComboBoxTimeout* power_timeout_combo_box_timeout_new (const gchar* label,
                                                                  gint seconds,
                                                                  const gchar* description);
static PowerTimeoutComboBoxTimeout* power_timeout_combo_box_timeout_construct (GType object_type,
                                                                        const gchar* label,
                                                                        gint seconds,
                                                                        const gchar* description);
static const gchar* power_timeout_combo_box_timeout_get_label (PowerTimeoutComboBoxTimeout* self);
static const gchar* power_timeout_combo_box_timeout_get_description (PowerTimeoutComboBoxTimeout* self);
static void power_timeout_combo_box_timeout_set_label (PowerTimeoutComboBoxTimeout* self,
                                                const gchar* value);
static void power_timeout_combo_box_timeout_set_description (PowerTimeoutComboBoxTimeout* self,
                                                      const gchar* value);
static void power_timeout_combo_box_timeout_set_seconds (PowerTimeoutComboBoxTimeout* self,
                                                  gint value);
static void power_timeout_combo_box_timeout_finalize (GObject * obj);
static GType power_timeout_combo_box_timeout_get_type_once (void);
static void _vala_power_timeout_combo_box_timeout_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
static void _vala_power_timeout_combo_box_timeout_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec);
static GObject * power_timeout_combo_box_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
static void _power_timeout_combo_box_bind_factory_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                              GObject* object,
                                                                              gpointer self);
static void power_timeout_combo_box_finalize (GObject * obj);
static GType power_timeout_combo_box_get_type_once (void);
static void _vala_power_timeout_combo_box_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_power_timeout_combo_box_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);

static const gint POWER_TIMEOUT_COMBO_BOX_TIMEOUT[8] = {0, 5 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, 10 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, 15 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, 30 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, 45 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, 60 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, 120 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE};

static inline gpointer
power_timeout_combo_box_get_instance_private (PowerTimeoutComboBox* self)
{
	return G_STRUCT_MEMBER_P (self, PowerTimeoutComboBox_private_offset);
}

PowerTimeoutComboBox*
power_timeout_combo_box_construct (GType object_type,
                                   GSettings* schema,
                                   const gchar* key)
{
	PowerTimeoutComboBox * self = NULL;
	g_return_val_if_fail (schema != NULL, NULL);
	g_return_val_if_fail (key != NULL, NULL);
	self = (PowerTimeoutComboBox*) g_object_new (object_type, "key", key, "schema", schema, NULL);
	power_timeout_combo_box_update_combo (self);
	return self;
}

PowerTimeoutComboBox*
power_timeout_combo_box_new (GSettings* schema,
                             const gchar* key)
{
	return power_timeout_combo_box_construct (POWER_TYPE_TIMEOUT_COMBO_BOX, schema, key);
}

static void
power_timeout_combo_box_setup_accountsservice_data_free (gpointer _data)
{
	PowerTimeoutComboBoxSetupAccountsserviceData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PowerTimeoutComboBoxSetupAccountsserviceData, _data_);
}

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

static void
power_timeout_combo_box_setup_accountsservice (PowerTimeoutComboBox* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	PowerTimeoutComboBoxSetupAccountsserviceData* _data_;
	PowerTimeoutComboBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (PowerTimeoutComboBoxSetupAccountsserviceData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, power_timeout_combo_box_setup_accountsservice_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	power_timeout_combo_box_setup_accountsservice_co (_data_);
}

static void
power_timeout_combo_box_setup_accountsservice_finish (PowerTimeoutComboBox* self,
                                                      GAsyncResult* _res_)
{
	PowerTimeoutComboBoxSetupAccountsserviceData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
power_timeout_combo_box_setup_accountsservice_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_)
{
	PowerTimeoutComboBoxSetupAccountsserviceData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	power_timeout_combo_box_setup_accountsservice_co (_data_);
}

static gboolean
power_timeout_combo_box_setup_accountsservice_co (PowerTimeoutComboBoxSetupAccountsserviceData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_state_ = 1;
		g_async_initable_new_async (POWER_FDO_TYPE_ACCOUNTS_PROXY, 0, NULL, power_timeout_combo_box_setup_accountsservice_ready, _data_, "g-flags", 0, "g-name", "org.freedesktop.Accounts", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", "/org/freedesktop/Accounts", "g-interface-name", "org.freedesktop.Accounts", NULL);
		return FALSE;
		_state_1:
		_data_->_tmp0_ = (PowerFDOAccounts*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->accounts_service = (PowerFDOAccounts*) _data_->_tmp0_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = _data_->accounts_service;
		_data_->_tmp2_ = g_get_user_name ();
		_data_->_tmp3_ = power_fdo_accounts_find_user_by_name (_data_->_tmp1_, _data_->_tmp2_, &_data_->_inner_error0_);
		_data_->user_path = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->accounts_service);
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->user_path;
		_data_->_state_ = 2;
		g_async_initable_new_async (POWER_GREETER_TYPE_ACCOUNTS_SERVICE_PROXY, 0, NULL, power_timeout_combo_box_setup_accountsservice_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, "g-name", "org.freedesktop.Accounts", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", _data_->_tmp5_, "g-interface-name", "io.elementary.pantheon.AccountsService", NULL);
		return FALSE;
		_state_2:
		_data_->_tmp6_ = (PowerGreeterAccountsService*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp4_ = (PowerGreeterAccountsService*) _data_->_tmp6_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_free0 (_data_->user_path);
			_g_object_unref0 (_data_->accounts_service);
			goto __catch0_g_error;
		}
		_data_->_tmp7_ = _data_->_tmp4_;
		_data_->_tmp4_ = NULL;
		_g_object_unref0 (_data_->self->priv->greeter_act);
		_data_->self->priv->greeter_act = _data_->_tmp7_;
		_g_object_unref0 (_data_->_tmp4_);
		_g_free0 (_data_->user_path);
		_g_object_unref0 (_data_->accounts_service);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_warning ("TimeoutComboBox.vala:111: Unable to get AccountsService proxy, greeter" \
" power settings may be incorrect");
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_power_timeout_combo_box_update_combo_g_settings_changed (GSettings* _sender,
                                                          const gchar* key,
                                                          gpointer self)
{
	power_timeout_combo_box_update_combo ((PowerTimeoutComboBox*) self);
}

static void
power_timeout_combo_box_update_settings (PowerTimeoutComboBox* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GSettings* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	guint _tmp24_;
	GQuark _tmp25_;
	const GVariantType* _tmp26_;
	const GVariantType* _tmp27_;
	GSettings* _tmp44_;
	const gchar* _tmp45_;
	gchar* _tmp46_;
	PowerGreeterAccountsService* _tmp47_;
	g_return_if_fail (self != NULL);
	_tmp2_ = power_timeout_combo_box_get_enum_property (self);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		gint _tmp4_;
		gint _tmp5_;
		_tmp4_ = power_timeout_combo_box_get_enum_never_value (self);
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_ != -1;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gint _tmp6_;
		gint _tmp7_;
		_tmp6_ = power_timeout_combo_box_get_enum_normal_value (self);
		_tmp7_ = _tmp6_;
		_tmp0_ = _tmp7_ != -1;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkDropDown* _tmp8_;
		guint _tmp9_;
		guint _tmp10_;
		_tmp8_ = self->priv->dropdown;
		_tmp9_ = gtk_drop_down_get_selected (_tmp8_);
		_tmp10_ = _tmp9_;
		if (_tmp10_ == ((guint) 0)) {
			GSettings* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			gint _tmp14_;
			gint _tmp15_;
			_tmp11_ = self->priv->_schema;
			_tmp12_ = power_timeout_combo_box_get_enum_property (self);
			_tmp13_ = _tmp12_;
			_tmp14_ = power_timeout_combo_box_get_enum_never_value (self);
			_tmp15_ = _tmp14_;
			g_settings_set_enum (_tmp11_, _tmp13_, _tmp15_);
		} else {
			GSettings* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			_tmp16_ = self->priv->_schema;
			_tmp17_ = power_timeout_combo_box_get_enum_property (self);
			_tmp18_ = _tmp17_;
			_tmp19_ = power_timeout_combo_box_get_enum_normal_value (self);
			_tmp20_ = _tmp19_;
			g_settings_set_enum (_tmp16_, _tmp18_, _tmp20_);
		}
	}
	_tmp21_ = self->priv->_schema;
	_tmp22_ = self->priv->_key;
	_tmp23_ = g_strconcat ("changed::", _tmp22_, NULL);
	g_signal_parse_name (_tmp23_, g_settings_get_type (), &_tmp24_, &_tmp25_, TRUE);
	g_signal_handlers_disconnect_matched (_tmp21_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp24_, _tmp25_, NULL, (GCallback) _power_timeout_combo_box_update_combo_g_settings_changed, self);
	_g_free0 (_tmp23_);
	_tmp26_ = self->priv->key_type;
	_tmp27_ = G_VARIANT_TYPE_UINT32;
	if (g_variant_type_equal (_tmp26_, _tmp27_)) {
		GSettings* _tmp28_;
		const gchar* _tmp29_;
		GtkDropDown* _tmp30_;
		GObject* _tmp31_;
		GObject* _tmp32_;
		gint _tmp33_;
		gint _tmp34_;
		_tmp28_ = self->priv->_schema;
		_tmp29_ = self->priv->_key;
		_tmp30_ = self->priv->dropdown;
		_tmp31_ = gtk_drop_down_get_selected_item (_tmp30_);
		_tmp32_ = _tmp31_;
		_tmp33_ = power_timeout_combo_box_timeout_get_seconds (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeout));
		_tmp34_ = _tmp33_;
		g_settings_set_uint (_tmp28_, _tmp29_, (guint) _tmp34_);
	} else {
		const GVariantType* _tmp35_;
		const GVariantType* _tmp36_;
		_tmp35_ = self->priv->key_type;
		_tmp36_ = G_VARIANT_TYPE_INT32;
		if (g_variant_type_equal (_tmp35_, _tmp36_)) {
			GSettings* _tmp37_;
			const gchar* _tmp38_;
			GtkDropDown* _tmp39_;
			GObject* _tmp40_;
			GObject* _tmp41_;
			gint _tmp42_;
			gint _tmp43_;
			_tmp37_ = self->priv->_schema;
			_tmp38_ = self->priv->_key;
			_tmp39_ = self->priv->dropdown;
			_tmp40_ = gtk_drop_down_get_selected_item (_tmp39_);
			_tmp41_ = _tmp40_;
			_tmp42_ = power_timeout_combo_box_timeout_get_seconds (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeout));
			_tmp43_ = _tmp42_;
			g_settings_set_int (_tmp37_, _tmp38_, _tmp43_);
		} else {
			g_critical ("TimeoutComboBox.vala:131: Unsupported key type in schema");
		}
	}
	_tmp44_ = self->priv->_schema;
	_tmp45_ = self->priv->_key;
	_tmp46_ = g_strconcat ("changed::", _tmp45_, NULL);
	g_signal_connect_object (_tmp44_, _tmp46_, (GCallback) _power_timeout_combo_box_update_combo_g_settings_changed, self, 0);
	_g_free0 (_tmp46_);
	_tmp47_ = self->priv->greeter_act;
	if (_tmp47_ != NULL) {
		const gchar* _tmp48_;
		_tmp48_ = self->priv->_key;
		if (g_strcmp0 (_tmp48_, "sleep-inactive-ac-timeout") == 0) {
			PowerGreeterAccountsService* _tmp49_;
			GtkDropDown* _tmp50_;
			GObject* _tmp51_;
			GObject* _tmp52_;
			gint _tmp53_;
			gint _tmp54_;
			PowerGreeterAccountsService* _tmp55_;
			GSettings* _tmp56_;
			const gchar* _tmp57_;
			const gchar* _tmp58_;
			_tmp49_ = self->priv->greeter_act;
			_tmp50_ = self->priv->dropdown;
			_tmp51_ = gtk_drop_down_get_selected_item (_tmp50_);
			_tmp52_ = _tmp51_;
			_tmp53_ = power_timeout_combo_box_timeout_get_seconds (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeout));
			_tmp54_ = _tmp53_;
			power_greeter_accounts_service_set_sleep_inactive_ac_timeout (_tmp49_, _tmp54_);
			_tmp55_ = self->priv->greeter_act;
			_tmp56_ = self->priv->_schema;
			_tmp57_ = power_timeout_combo_box_get_enum_property (self);
			_tmp58_ = _tmp57_;
			power_greeter_accounts_service_set_sleep_inactive_ac_type (_tmp55_, g_settings_get_enum (_tmp56_, _tmp58_));
		} else {
			const gchar* _tmp59_;
			_tmp59_ = self->priv->_key;
			if (g_strcmp0 (_tmp59_, "sleep-inactive-battery-timeout") == 0) {
				PowerGreeterAccountsService* _tmp60_;
				GtkDropDown* _tmp61_;
				GObject* _tmp62_;
				GObject* _tmp63_;
				gint _tmp64_;
				gint _tmp65_;
				PowerGreeterAccountsService* _tmp66_;
				GSettings* _tmp67_;
				const gchar* _tmp68_;
				const gchar* _tmp69_;
				_tmp60_ = self->priv->greeter_act;
				_tmp61_ = self->priv->dropdown;
				_tmp62_ = gtk_drop_down_get_selected_item (_tmp61_);
				_tmp63_ = _tmp62_;
				_tmp64_ = power_timeout_combo_box_timeout_get_seconds (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeout));
				_tmp65_ = _tmp64_;
				power_greeter_accounts_service_set_sleep_inactive_battery_timeout (_tmp60_, _tmp65_);
				_tmp66_ = self->priv->greeter_act;
				_tmp67_ = self->priv->_schema;
				_tmp68_ = power_timeout_combo_box_get_enum_property (self);
				_tmp69_ = _tmp68_;
				power_greeter_accounts_service_set_sleep_inactive_battery_type (_tmp66_, g_settings_get_enum (_tmp67_, _tmp69_));
			}
		}
	}
}

static gint
power_timeout_combo_box_find_closest (PowerTimeoutComboBox* self,
                                      gint second)
{
	gint key = 0;
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	key = 0;
	{
		gint* i_collection = NULL;
		gint i_collection_length1 = 0;
		gint _i_collection_size_ = 0;
		gint i_it = 0;
		i_collection = POWER_TIMEOUT_COMBO_BOX_TIMEOUT;
		i_collection_length1 = G_N_ELEMENTS (POWER_TIMEOUT_COMBO_BOX_TIMEOUT);
		for (i_it = 0; i_it < i_collection_length1; i_it = i_it + 1) {
			gint i = 0;
			i = i_collection[i_it];
			{
				if (second > i) {
					gint _tmp0_;
					_tmp0_ = key;
					key = _tmp0_ + 1;
				} else {
					break;
				}
			}
		}
	}
	result = key;
	return result;
}

static void
_power_timeout_combo_box_update_settings_g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self)
{
	power_timeout_combo_box_update_settings ((PowerTimeoutComboBox*) self);
}

static void
power_timeout_combo_box_update_combo (PowerTimeoutComboBox* self)
{
	gint val = 0;
	const GVariantType* _tmp0_;
	const GVariantType* _tmp1_;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	GtkDropDown* _tmp22_;
	guint _tmp23_;
	GQuark _tmp24_;
	GtkDropDown* _tmp25_;
	GtkDropDown* _tmp26_;
	g_return_if_fail (self != NULL);
	val = 0;
	_tmp0_ = self->priv->key_type;
	_tmp1_ = G_VARIANT_TYPE_UINT32;
	if (g_variant_type_equal (_tmp0_, _tmp1_)) {
		GSettings* _tmp2_;
		const gchar* _tmp3_;
		_tmp2_ = self->priv->_schema;
		_tmp3_ = self->priv->_key;
		val = (gint) g_settings_get_uint (_tmp2_, _tmp3_);
	} else {
		const GVariantType* _tmp4_;
		const GVariantType* _tmp5_;
		_tmp4_ = self->priv->key_type;
		_tmp5_ = G_VARIANT_TYPE_INT32;
		if (g_variant_type_equal (_tmp4_, _tmp5_)) {
			GSettings* _tmp6_;
			const gchar* _tmp7_;
			_tmp6_ = self->priv->_schema;
			_tmp7_ = self->priv->_key;
			val = g_settings_get_int (_tmp6_, _tmp7_);
		} else {
			g_critical ("TimeoutComboBox.vala:169: Unsupported key type in schema");
		}
	}
	_tmp10_ = power_timeout_combo_box_get_enum_property (self);
	_tmp11_ = _tmp10_;
	if (_tmp11_ != NULL) {
		gint _tmp12_;
		gint _tmp13_;
		_tmp12_ = power_timeout_combo_box_get_enum_never_value (self);
		_tmp13_ = _tmp12_;
		_tmp9_ = _tmp13_ != -1;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		gint _tmp14_;
		gint _tmp15_;
		_tmp14_ = power_timeout_combo_box_get_enum_normal_value (self);
		_tmp15_ = _tmp14_;
		_tmp8_ = _tmp15_ != -1;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		gint enum_value = 0;
		GSettings* _tmp16_;
		const gchar* _tmp17_;
		const gchar* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		_tmp16_ = self->priv->_schema;
		_tmp17_ = power_timeout_combo_box_get_enum_property (self);
		_tmp18_ = _tmp17_;
		enum_value = g_settings_get_enum (_tmp16_, _tmp18_);
		_tmp19_ = power_timeout_combo_box_get_enum_never_value (self);
		_tmp20_ = _tmp19_;
		if (enum_value == _tmp20_) {
			GtkDropDown* _tmp21_;
			_tmp21_ = self->priv->dropdown;
			gtk_drop_down_set_selected (_tmp21_, (guint) 0);
			return;
		}
	}
	_tmp22_ = self->priv->dropdown;
	g_signal_parse_name ("notify::selected", G_TYPE_OBJECT, &_tmp23_, &_tmp24_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp22_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp23_, _tmp24_, NULL, (GCallback) _power_timeout_combo_box_update_settings_g_object_notify, self);
	_tmp25_ = self->priv->dropdown;
	gtk_drop_down_set_selected (_tmp25_, (guint) power_timeout_combo_box_find_closest (self, val));
	_tmp26_ = self->priv->dropdown;
	g_signal_connect_object ((GObject*) _tmp26_, "notify::selected", (GCallback) _power_timeout_combo_box_update_settings_g_object_notify, self, 0);
}

static void
power_timeout_combo_box_bind_factory (PowerTimeoutComboBox* self,
                                      GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	PowerTimeoutComboBoxTimeout* timeout = NULL;
	GObject* _tmp1_;
	GObject* _tmp2_;
	PowerTimeoutComboBoxTimeout* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, gtk_list_item_get_type (), GtkListItem));
	list_item = _tmp0_;
	_tmp1_ = gtk_list_item_get_item (list_item);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeout));
	timeout = _tmp3_;
	_tmp4_ = power_timeout_combo_box_timeout_get_widget (timeout);
	_tmp5_ = _tmp4_;
	gtk_list_item_set_child (list_item, _tmp5_);
	_g_object_unref0 (_tmp5_);
	_g_object_unref0 (timeout);
	_g_object_unref0 (list_item);
}

const gchar*
power_timeout_combo_box_get_enum_property (PowerTimeoutComboBox* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_enum_property;
	result = _tmp0_;
	return result;
}

void
power_timeout_combo_box_set_enum_property (PowerTimeoutComboBox* self,
                                           const gchar* value)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_enum_property;
	if (g_strcmp0 (value, _tmp0_) != 0) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup (value);
		_g_free0 (self->priv->_enum_property);
		self->priv->_enum_property = _tmp1_;
		power_timeout_combo_box_update_combo (self);
	}
	g_object_notify_by_pspec ((GObject *) self, power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_ENUM_PROPERTY_PROPERTY]);
}

gint
power_timeout_combo_box_get_enum_never_value (PowerTimeoutComboBox* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_enum_never_value;
	return result;
}

void
power_timeout_combo_box_set_enum_never_value (PowerTimeoutComboBox* self,
                                              gint value)
{
	g_return_if_fail (self != NULL);
	if (value != self->priv->_enum_never_value) {
		self->priv->_enum_never_value = value;
		power_timeout_combo_box_update_combo (self);
	}
	g_object_notify_by_pspec ((GObject *) self, power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_ENUM_NEVER_VALUE_PROPERTY]);
}

gint
power_timeout_combo_box_get_enum_normal_value (PowerTimeoutComboBox* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_enum_normal_value;
	return result;
}

void
power_timeout_combo_box_set_enum_normal_value (PowerTimeoutComboBox* self,
                                               gint value)
{
	g_return_if_fail (self != NULL);
	if (value != self->priv->_enum_normal_value) {
		self->priv->_enum_normal_value = value;
		power_timeout_combo_box_update_combo (self);
	}
	g_object_notify_by_pspec ((GObject *) self, power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_ENUM_NORMAL_VALUE_PROPERTY]);
}

GSettings*
power_timeout_combo_box_get_schema (PowerTimeoutComboBox* self)
{
	GSettings* result;
	GSettings* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_schema;
	result = _tmp0_;
	return result;
}

static void
power_timeout_combo_box_set_schema (PowerTimeoutComboBox* self,
                                    GSettings* value)
{
	GSettings* old_value;
	g_return_if_fail (self != NULL);
	old_value = power_timeout_combo_box_get_schema (self);
	if (old_value != value) {
		GSettings* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_schema);
		self->priv->_schema = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_SCHEMA_PROPERTY]);
	}
}

const gchar*
power_timeout_combo_box_get_key (PowerTimeoutComboBox* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_key;
	result = _tmp0_;
	return result;
}

static void
power_timeout_combo_box_set_key (PowerTimeoutComboBox* self,
                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = power_timeout_combo_box_get_key (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_key);
		self->priv->_key = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_KEY_PROPERTY]);
	}
}

static inline gpointer
power_timeout_combo_box_timeout_get_instance_private (PowerTimeoutComboBoxTimeout* self)
{
	return G_STRUCT_MEMBER_P (self, PowerTimeoutComboBoxTimeout_private_offset);
}

static PowerTimeoutComboBoxTimeout*
power_timeout_combo_box_timeout_construct (GType object_type,
                                           const gchar* label,
                                           gint seconds,
                                           const gchar* description)
{
	PowerTimeoutComboBoxTimeout * self = NULL;
	g_return_val_if_fail (label != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	self = (PowerTimeoutComboBoxTimeout*) g_object_new (object_type, "label", label, "seconds", seconds, "description", description, NULL);
	return self;
}

static PowerTimeoutComboBoxTimeout*
power_timeout_combo_box_timeout_new (const gchar* label,
                                     gint seconds,
                                     const gchar* description)
{
	return power_timeout_combo_box_timeout_construct (POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, label, seconds, description);
}

static GtkWidget*
power_timeout_combo_box_timeout_get_widget (PowerTimeoutComboBoxTimeout* self)
{
	GtkLabel* title = NULL;
	const gchar* _tmp0_;
	GtkLabel* _tmp1_ = NULL;
	GraniteBox* box = NULL;
	GraniteBox* _tmp2_;
	GraniteBox* _tmp3_;
	GtkLabel* _tmp4_;
	const gchar* _tmp5_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	_tmp1_ = (GtkLabel*) gtk_label_new (_tmp0_);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_BASELINE);
	gtk_label_set_xalign (_tmp1_, (gfloat) 0);
	g_object_ref_sink (_tmp1_);
	title = _tmp1_;
	_tmp2_ = granite_box_new (GTK_ORIENTATION_HORIZONTAL, GRANITE_BOX_SPACING_HALF);
	g_object_ref_sink (_tmp2_);
	box = _tmp2_;
	_tmp3_ = box;
	_tmp4_ = title;
	gtk_box_append ((GtkBox*) _tmp3_, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->_description;
	if (g_strcmp0 (_tmp5_, "") != 0) {
		GtkLabel* description = NULL;
		const gchar* _tmp6_;
		GtkLabel* _tmp7_ = NULL;
		GtkLabel* _tmp8_;
		GtkLabel* _tmp9_;
		GraniteBox* _tmp10_;
		GtkLabel* _tmp11_;
		_tmp6_ = self->priv->_description;
		_tmp7_ = (GtkLabel*) gtk_label_new (_tmp6_);
		gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_BASELINE);
		gtk_label_set_xalign (_tmp7_, (gfloat) 0);
		gtk_label_set_wrap (_tmp7_, TRUE);
		g_object_ref_sink (_tmp7_);
		description = _tmp7_;
		_tmp8_ = description;
		gtk_widget_add_css_class ((GtkWidget*) _tmp8_, GRANITE_CSS_CLASS_SMALL);
		_tmp9_ = description;
		gtk_widget_add_css_class ((GtkWidget*) _tmp9_, GRANITE_CSS_CLASS_WARNING);
		_tmp10_ = box;
		_tmp11_ = description;
		gtk_box_append ((GtkBox*) _tmp10_, (GtkWidget*) _tmp11_);
		_g_object_unref0 (description);
	}
	result = (GtkWidget*) box;
	_g_object_unref0 (title);
	return result;
}

static const gchar*
power_timeout_combo_box_timeout_get_label (PowerTimeoutComboBoxTimeout* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

static void
power_timeout_combo_box_timeout_set_label (PowerTimeoutComboBoxTimeout* self,
                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = power_timeout_combo_box_timeout_get_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, power_timeout_combo_box_timeout_properties[POWER_TIMEOUT_COMBO_BOX_TIMEOUT_LABEL_PROPERTY]);
	}
}

static const gchar*
power_timeout_combo_box_timeout_get_description (PowerTimeoutComboBoxTimeout* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_description;
	result = _tmp0_;
	return result;
}

static void
power_timeout_combo_box_timeout_set_description (PowerTimeoutComboBoxTimeout* self,
                                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = power_timeout_combo_box_timeout_get_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_description);
		self->priv->_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, power_timeout_combo_box_timeout_properties[POWER_TIMEOUT_COMBO_BOX_TIMEOUT_DESCRIPTION_PROPERTY]);
	}
}

static gint
power_timeout_combo_box_timeout_get_seconds (PowerTimeoutComboBoxTimeout* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_seconds;
	return result;
}

static void
power_timeout_combo_box_timeout_set_seconds (PowerTimeoutComboBoxTimeout* self,
                                             gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = power_timeout_combo_box_timeout_get_seconds (self);
	if (old_value != value) {
		self->priv->_seconds = value;
		g_object_notify_by_pspec ((GObject *) self, power_timeout_combo_box_timeout_properties[POWER_TIMEOUT_COMBO_BOX_TIMEOUT_SECONDS_PROPERTY]);
	}
}

static void
power_timeout_combo_box_timeout_class_init (PowerTimeoutComboBoxTimeoutClass * klass,
                                            gpointer klass_data)
{
	power_timeout_combo_box_timeout_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PowerTimeoutComboBoxTimeout_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_power_timeout_combo_box_timeout_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_power_timeout_combo_box_timeout_set_property;
	G_OBJECT_CLASS (klass)->finalize = power_timeout_combo_box_timeout_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), POWER_TIMEOUT_COMBO_BOX_TIMEOUT_LABEL_PROPERTY, power_timeout_combo_box_timeout_properties[POWER_TIMEOUT_COMBO_BOX_TIMEOUT_LABEL_PROPERTY] = g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), POWER_TIMEOUT_COMBO_BOX_TIMEOUT_DESCRIPTION_PROPERTY, power_timeout_combo_box_timeout_properties[POWER_TIMEOUT_COMBO_BOX_TIMEOUT_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), POWER_TIMEOUT_COMBO_BOX_TIMEOUT_SECONDS_PROPERTY, power_timeout_combo_box_timeout_properties[POWER_TIMEOUT_COMBO_BOX_TIMEOUT_SECONDS_PROPERTY] = g_param_spec_int ("seconds", "seconds", "seconds", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
power_timeout_combo_box_timeout_instance_init (PowerTimeoutComboBoxTimeout * self,
                                               gpointer klass)
{
	self->priv = power_timeout_combo_box_timeout_get_instance_private (self);
}

static void
power_timeout_combo_box_timeout_finalize (GObject * obj)
{
	PowerTimeoutComboBoxTimeout * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeout);
	_g_free0 (self->priv->_label);
	_g_free0 (self->priv->_description);
	G_OBJECT_CLASS (power_timeout_combo_box_timeout_parent_class)->finalize (obj);
}

static GType
power_timeout_combo_box_timeout_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PowerTimeoutComboBoxTimeoutClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) power_timeout_combo_box_timeout_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PowerTimeoutComboBoxTimeout), 0, (GInstanceInitFunc) power_timeout_combo_box_timeout_instance_init, NULL };
	GType power_timeout_combo_box_timeout_type_id;
	power_timeout_combo_box_timeout_type_id = g_type_register_static (G_TYPE_OBJECT, "PowerTimeoutComboBoxTimeout", &g_define_type_info, 0);
	PowerTimeoutComboBoxTimeout_private_offset = g_type_add_instance_private (power_timeout_combo_box_timeout_type_id, sizeof (PowerTimeoutComboBoxTimeoutPrivate));
	return power_timeout_combo_box_timeout_type_id;
}

static GType
power_timeout_combo_box_timeout_get_type (void)
{
	static volatile gsize power_timeout_combo_box_timeout_type_id__once = 0;
	if (g_once_init_enter (&power_timeout_combo_box_timeout_type_id__once)) {
		GType power_timeout_combo_box_timeout_type_id;
		power_timeout_combo_box_timeout_type_id = power_timeout_combo_box_timeout_get_type_once ();
		g_once_init_leave (&power_timeout_combo_box_timeout_type_id__once, power_timeout_combo_box_timeout_type_id);
	}
	return power_timeout_combo_box_timeout_type_id__once;
}

static void
_vala_power_timeout_combo_box_timeout_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	PowerTimeoutComboBoxTimeout * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeout);
	switch (property_id) {
		case POWER_TIMEOUT_COMBO_BOX_TIMEOUT_LABEL_PROPERTY:
		g_value_set_string (value, power_timeout_combo_box_timeout_get_label (self));
		break;
		case POWER_TIMEOUT_COMBO_BOX_TIMEOUT_DESCRIPTION_PROPERTY:
		g_value_set_string (value, power_timeout_combo_box_timeout_get_description (self));
		break;
		case POWER_TIMEOUT_COMBO_BOX_TIMEOUT_SECONDS_PROPERTY:
		g_value_set_int (value, power_timeout_combo_box_timeout_get_seconds (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_power_timeout_combo_box_timeout_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec)
{
	PowerTimeoutComboBoxTimeout * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT, PowerTimeoutComboBoxTimeout);
	switch (property_id) {
		case POWER_TIMEOUT_COMBO_BOX_TIMEOUT_LABEL_PROPERTY:
		power_timeout_combo_box_timeout_set_label (self, g_value_get_string (value));
		break;
		case POWER_TIMEOUT_COMBO_BOX_TIMEOUT_DESCRIPTION_PROPERTY:
		power_timeout_combo_box_timeout_set_description (self, g_value_get_string (value));
		break;
		case POWER_TIMEOUT_COMBO_BOX_TIMEOUT_SECONDS_PROPERTY:
		power_timeout_combo_box_timeout_set_seconds (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static gpointer
_g_variant_type_copy0 (gpointer self)
{
	return self ? g_variant_type_copy (self) : NULL;
}

static void
_power_timeout_combo_box_bind_factory_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                         GObject* object,
                                                                         gpointer self)
{
	power_timeout_combo_box_bind_factory ((PowerTimeoutComboBox*) self, object);
}

static GObject *
power_timeout_combo_box_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	PowerTimeoutComboBox * self;
	GSettings* _tmp0_;
	const gchar* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	const GVariantType* _tmp4_;
	GVariantType* _tmp5_;
	GListStore* liststore = NULL;
	GListStore* _tmp6_;
	GListStore* _tmp7_;
	PowerTimeoutComboBoxTimeout* _tmp8_;
	PowerTimeoutComboBoxTimeout* _tmp9_;
	GListStore* _tmp10_;
	PowerTimeoutComboBoxTimeout* _tmp11_;
	PowerTimeoutComboBoxTimeout* _tmp12_;
	GListStore* _tmp13_;
	PowerTimeoutComboBoxTimeout* _tmp14_;
	PowerTimeoutComboBoxTimeout* _tmp15_;
	GListStore* _tmp16_;
	PowerTimeoutComboBoxTimeout* _tmp17_;
	PowerTimeoutComboBoxTimeout* _tmp18_;
	GListStore* _tmp19_;
	PowerTimeoutComboBoxTimeout* _tmp20_;
	PowerTimeoutComboBoxTimeout* _tmp21_;
	GListStore* _tmp22_;
	PowerTimeoutComboBoxTimeout* _tmp23_;
	PowerTimeoutComboBoxTimeout* _tmp24_;
	GListStore* _tmp25_;
	PowerTimeoutComboBoxTimeout* _tmp26_;
	PowerTimeoutComboBoxTimeout* _tmp27_;
	GListStore* _tmp28_;
	PowerTimeoutComboBoxTimeout* _tmp29_;
	PowerTimeoutComboBoxTimeout* _tmp30_;
	GtkSignalListItemFactory* factory = NULL;
	GtkSignalListItemFactory* _tmp31_;
	GtkSignalListItemFactory* _tmp32_;
	GListStore* _tmp33_;
	GListModel* _tmp34_;
	GtkSignalListItemFactory* _tmp35_;
	GtkListItemFactory* _tmp36_;
	GtkDropDown* _tmp37_ = NULL;
	GtkDropDown* _tmp38_;
	GtkDropDown* _tmp39_;
	GSettings* _tmp40_;
	const gchar* _tmp41_;
	gchar* _tmp42_;
	parent_class = G_OBJECT_CLASS (power_timeout_combo_box_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, POWER_TYPE_TIMEOUT_COMBO_BOX, PowerTimeoutComboBox);
	_tmp0_ = self->priv->_schema;
	_tmp1_ = self->priv->_key;
	_tmp2_ = g_settings_get_value (_tmp0_, _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_variant_get_type (_tmp3_);
	_tmp5_ = _g_variant_type_copy0 (_tmp4_);
	_g_variant_type_free0 (self->priv->key_type);
	self->priv->key_type = _tmp5_;
	_g_variant_unref0 (_tmp3_);
	_tmp6_ = g_list_store_new (POWER_TIMEOUT_COMBO_BOX_TYPE_TIMEOUT);
	liststore = _tmp6_;
	_tmp7_ = liststore;
	_tmp8_ = power_timeout_combo_box_timeout_new (_ ("Never"), 0, _ ("(Results in higher energy usage)"));
	_tmp9_ = _tmp8_;
	g_list_store_append (_tmp7_, (GObject*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = liststore;
	_tmp11_ = power_timeout_combo_box_timeout_new (_ ("5 min"), 5 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, "");
	_tmp12_ = _tmp11_;
	g_list_store_append (_tmp10_, (GObject*) _tmp12_);
	_g_object_unref0 (_tmp12_);
	_tmp13_ = liststore;
	_tmp14_ = power_timeout_combo_box_timeout_new (_ ("10 min"), 10 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, "");
	_tmp15_ = _tmp14_;
	g_list_store_append (_tmp13_, (GObject*) _tmp15_);
	_g_object_unref0 (_tmp15_);
	_tmp16_ = liststore;
	_tmp17_ = power_timeout_combo_box_timeout_new (_ ("15 min"), 15 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, "");
	_tmp18_ = _tmp17_;
	g_list_store_append (_tmp16_, (GObject*) _tmp18_);
	_g_object_unref0 (_tmp18_);
	_tmp19_ = liststore;
	_tmp20_ = power_timeout_combo_box_timeout_new (_ ("30 min"), 30 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, "");
	_tmp21_ = _tmp20_;
	g_list_store_append (_tmp19_, (GObject*) _tmp21_);
	_g_object_unref0 (_tmp21_);
	_tmp22_ = liststore;
	_tmp23_ = power_timeout_combo_box_timeout_new (_ ("45 min"), 45 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, "");
	_tmp24_ = _tmp23_;
	g_list_store_append (_tmp22_, (GObject*) _tmp24_);
	_g_object_unref0 (_tmp24_);
	_tmp25_ = liststore;
	_tmp26_ = power_timeout_combo_box_timeout_new (_ ("1 hour"), 60 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, "");
	_tmp27_ = _tmp26_;
	g_list_store_append (_tmp25_, (GObject*) _tmp27_);
	_g_object_unref0 (_tmp27_);
	_tmp28_ = liststore;
	_tmp29_ = power_timeout_combo_box_timeout_new (_ ("2 hours"), 120 * POWER_TIMEOUT_COMBO_BOX_SECS_IN_MINUTE, "");
	_tmp30_ = _tmp29_;
	g_list_store_append (_tmp28_, (GObject*) _tmp30_);
	_g_object_unref0 (_tmp30_);
	_tmp31_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	factory = _tmp31_;
	_tmp32_ = factory;
	g_signal_connect_object (_tmp32_, "bind", (GCallback) _power_timeout_combo_box_bind_factory_gtk_signal_list_item_factory_bind, self, 0);
	_tmp33_ = liststore;
	_tmp34_ = _g_object_ref0 ((GListModel*) _tmp33_);
	_tmp35_ = factory;
	_tmp36_ = _g_object_ref0 ((GtkListItemFactory*) _tmp35_);
	_tmp37_ = (GtkDropDown*) gtk_drop_down_new (_tmp34_, NULL);
	gtk_drop_down_set_factory (_tmp37_, _tmp36_);
	_g_object_unref0 (_tmp36_);
	g_object_ref_sink (_tmp37_);
	_g_object_unref0 (self->priv->dropdown);
	self->priv->dropdown = _tmp37_;
	_tmp38_ = self->priv->dropdown;
	granite_bin_set_child ((GraniteBin*) self, (GtkWidget*) _tmp38_);
	power_timeout_combo_box_setup_accountsservice (self, NULL, NULL);
	_tmp39_ = self->priv->dropdown;
	g_signal_connect_object ((GObject*) _tmp39_, "notify::selected", (GCallback) _power_timeout_combo_box_update_settings_g_object_notify, self, 0);
	_tmp40_ = self->priv->_schema;
	_tmp41_ = self->priv->_key;
	_tmp42_ = g_strconcat ("changed::", _tmp41_, NULL);
	g_signal_connect_object (_tmp40_, _tmp42_, (GCallback) _power_timeout_combo_box_update_combo_g_settings_changed, self, 0);
	_g_free0 (_tmp42_);
	_g_object_unref0 (factory);
	_g_object_unref0 (liststore);
	return obj;
}

static void
power_timeout_combo_box_class_init (PowerTimeoutComboBoxClass * klass,
                                    gpointer klass_data)
{
	power_timeout_combo_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PowerTimeoutComboBox_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_power_timeout_combo_box_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_power_timeout_combo_box_set_property;
	G_OBJECT_CLASS (klass)->constructor = power_timeout_combo_box_constructor;
	G_OBJECT_CLASS (klass)->finalize = power_timeout_combo_box_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), POWER_TIMEOUT_COMBO_BOX_ENUM_PROPERTY_PROPERTY, power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_ENUM_PROPERTY_PROPERTY] = g_param_spec_string ("enum-property", "enum-property", "enum-property", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), POWER_TIMEOUT_COMBO_BOX_ENUM_NEVER_VALUE_PROPERTY, power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_ENUM_NEVER_VALUE_PROPERTY] = g_param_spec_int ("enum-never-value", "enum-never-value", "enum-never-value", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), POWER_TIMEOUT_COMBO_BOX_ENUM_NORMAL_VALUE_PROPERTY, power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_ENUM_NORMAL_VALUE_PROPERTY] = g_param_spec_int ("enum-normal-value", "enum-normal-value", "enum-normal-value", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), POWER_TIMEOUT_COMBO_BOX_SCHEMA_PROPERTY, power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_SCHEMA_PROPERTY] = g_param_spec_object ("schema", "schema", "schema", g_settings_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), POWER_TIMEOUT_COMBO_BOX_KEY_PROPERTY, power_timeout_combo_box_properties[POWER_TIMEOUT_COMBO_BOX_KEY_PROPERTY] = g_param_spec_string ("key", "key", "key", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
power_timeout_combo_box_instance_init (PowerTimeoutComboBox * self,
                                       gpointer klass)
{
	self->priv = power_timeout_combo_box_get_instance_private (self);
	self->priv->greeter_act = NULL;
	self->priv->_enum_property = NULL;
	self->priv->_enum_never_value = -1;
	self->priv->_enum_normal_value = -1;
}

static void
power_timeout_combo_box_finalize (GObject * obj)
{
	PowerTimeoutComboBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, POWER_TYPE_TIMEOUT_COMBO_BOX, PowerTimeoutComboBox);
	_g_object_unref0 (self->priv->greeter_act);
	_g_free0 (self->priv->_enum_property);
	_g_object_unref0 (self->priv->_schema);
	_g_free0 (self->priv->_key);
	_g_variant_type_free0 (self->priv->key_type);
	_g_object_unref0 (self->priv->dropdown);
	G_OBJECT_CLASS (power_timeout_combo_box_parent_class)->finalize (obj);
}

static GType
power_timeout_combo_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PowerTimeoutComboBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) power_timeout_combo_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PowerTimeoutComboBox), 0, (GInstanceInitFunc) power_timeout_combo_box_instance_init, NULL };
	GType power_timeout_combo_box_type_id;
	power_timeout_combo_box_type_id = g_type_register_static (GRANITE_TYPE_BIN, "PowerTimeoutComboBox", &g_define_type_info, 0);
	PowerTimeoutComboBox_private_offset = g_type_add_instance_private (power_timeout_combo_box_type_id, sizeof (PowerTimeoutComboBoxPrivate));
	return power_timeout_combo_box_type_id;
}

GType
power_timeout_combo_box_get_type (void)
{
	static volatile gsize power_timeout_combo_box_type_id__once = 0;
	if (g_once_init_enter (&power_timeout_combo_box_type_id__once)) {
		GType power_timeout_combo_box_type_id;
		power_timeout_combo_box_type_id = power_timeout_combo_box_get_type_once ();
		g_once_init_leave (&power_timeout_combo_box_type_id__once, power_timeout_combo_box_type_id);
	}
	return power_timeout_combo_box_type_id__once;
}

static void
_vala_power_timeout_combo_box_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	PowerTimeoutComboBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, POWER_TYPE_TIMEOUT_COMBO_BOX, PowerTimeoutComboBox);
	switch (property_id) {
		case POWER_TIMEOUT_COMBO_BOX_ENUM_PROPERTY_PROPERTY:
		g_value_set_string (value, power_timeout_combo_box_get_enum_property (self));
		break;
		case POWER_TIMEOUT_COMBO_BOX_ENUM_NEVER_VALUE_PROPERTY:
		g_value_set_int (value, power_timeout_combo_box_get_enum_never_value (self));
		break;
		case POWER_TIMEOUT_COMBO_BOX_ENUM_NORMAL_VALUE_PROPERTY:
		g_value_set_int (value, power_timeout_combo_box_get_enum_normal_value (self));
		break;
		case POWER_TIMEOUT_COMBO_BOX_SCHEMA_PROPERTY:
		g_value_set_object (value, power_timeout_combo_box_get_schema (self));
		break;
		case POWER_TIMEOUT_COMBO_BOX_KEY_PROPERTY:
		g_value_set_string (value, power_timeout_combo_box_get_key (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_power_timeout_combo_box_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	PowerTimeoutComboBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, POWER_TYPE_TIMEOUT_COMBO_BOX, PowerTimeoutComboBox);
	switch (property_id) {
		case POWER_TIMEOUT_COMBO_BOX_ENUM_PROPERTY_PROPERTY:
		power_timeout_combo_box_set_enum_property (self, g_value_get_string (value));
		break;
		case POWER_TIMEOUT_COMBO_BOX_ENUM_NEVER_VALUE_PROPERTY:
		power_timeout_combo_box_set_enum_never_value (self, g_value_get_int (value));
		break;
		case POWER_TIMEOUT_COMBO_BOX_ENUM_NORMAL_VALUE_PROPERTY:
		power_timeout_combo_box_set_enum_normal_value (self, g_value_get_int (value));
		break;
		case POWER_TIMEOUT_COMBO_BOX_SCHEMA_PROPERTY:
		power_timeout_combo_box_set_schema (self, g_value_get_object (value));
		break;
		case POWER_TIMEOUT_COMBO_BOX_KEY_PROPERTY:
		power_timeout_combo_box_set_key (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

