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

/*///////////////////////////////////////////////////////////////////////*/
/* Copyright 2011-2021 Simon Schneegans*/
/**/
/* Permission is hereby granted, free of charge, to any person obtaining*/
/* a copy of this software and associated documentation files (the*/
/* "Software"), to deal in the Software without restriction, including*/
/* without limitation the rights to use, copy, modify, merge, publish,*/
/* distribute, sublicense, and/or sell copies of the Software, and to*/
/* permit persons to whom the Software is furnished to do so, subject to*/
/* the following conditions:*/
/* */
/* The above copyright notice and this permission notice shall be*/
/* included in all copies or substantial portions of the Software.*/
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,*/
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF*/
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY*/
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,*/
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE*/
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/
/*///////////////////////////////////////////////////////////////////////*/

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <float.h>
#include <math.h>
#include <glib/gstdio.h>
#include <gee.h>

#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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define GNOME_PIE_TYPE_PREFERENCES_WINDOW (gnome_pie_preferences_window_get_type ())
#define GNOME_PIE_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PREFERENCES_WINDOW, GnomePiePreferencesWindow))
#define GNOME_PIE_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PREFERENCES_WINDOW, GnomePiePreferencesWindowClass))
#define GNOME_PIE_IS_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PREFERENCES_WINDOW))
#define GNOME_PIE_IS_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PREFERENCES_WINDOW))
#define GNOME_PIE_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PREFERENCES_WINDOW, GnomePiePreferencesWindowClass))

typedef struct _GnomePiePreferencesWindow GnomePiePreferencesWindow;
typedef struct _GnomePiePreferencesWindowClass GnomePiePreferencesWindowClass;
typedef struct _GnomePiePreferencesWindowPrivate GnomePiePreferencesWindowPrivate;

#define GNOME_PIE_TYPE_THEME_LIST (gnome_pie_theme_list_get_type ())
#define GNOME_PIE_THEME_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_THEME_LIST, GnomePieThemeList))
#define GNOME_PIE_THEME_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_THEME_LIST, GnomePieThemeListClass))
#define GNOME_PIE_IS_THEME_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_THEME_LIST))
#define GNOME_PIE_IS_THEME_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_THEME_LIST))
#define GNOME_PIE_THEME_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_THEME_LIST, GnomePieThemeListClass))

typedef struct _GnomePieThemeList GnomePieThemeList;
typedef struct _GnomePieThemeListClass GnomePieThemeListClass;

#define GNOME_PIE_TYPE_PIE_PREVIEW (gnome_pie_pie_preview_get_type ())
#define GNOME_PIE_PIE_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE_PREVIEW, GnomePiePiePreview))
#define GNOME_PIE_PIE_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE_PREVIEW, GnomePiePiePreviewClass))
#define GNOME_PIE_IS_PIE_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE_PREVIEW))
#define GNOME_PIE_IS_PIE_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE_PREVIEW))
#define GNOME_PIE_PIE_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE_PREVIEW, GnomePiePiePreviewClass))

typedef struct _GnomePiePiePreview GnomePiePiePreview;
typedef struct _GnomePiePiePreviewClass GnomePiePiePreviewClass;

#define GNOME_PIE_TYPE_PIE_LIST (gnome_pie_pie_list_get_type ())
#define GNOME_PIE_PIE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE_LIST, GnomePiePieList))
#define GNOME_PIE_PIE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE_LIST, GnomePiePieListClass))
#define GNOME_PIE_IS_PIE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE_LIST))
#define GNOME_PIE_IS_PIE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE_LIST))
#define GNOME_PIE_PIE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE_LIST, GnomePiePieListClass))

typedef struct _GnomePiePieList GnomePiePieList;
typedef struct _GnomePiePieListClass GnomePiePieListClass;

#define GNOME_PIE_TYPE_PIE_OPTIONS_WINDOW (gnome_pie_pie_options_window_get_type ())
#define GNOME_PIE_PIE_OPTIONS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE_OPTIONS_WINDOW, GnomePiePieOptionsWindow))
#define GNOME_PIE_PIE_OPTIONS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE_OPTIONS_WINDOW, GnomePiePieOptionsWindowClass))
#define GNOME_PIE_IS_PIE_OPTIONS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE_OPTIONS_WINDOW))
#define GNOME_PIE_IS_PIE_OPTIONS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE_OPTIONS_WINDOW))
#define GNOME_PIE_PIE_OPTIONS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE_OPTIONS_WINDOW, GnomePiePieOptionsWindowClass))

typedef struct _GnomePiePieOptionsWindow GnomePiePieOptionsWindow;
typedef struct _GnomePiePieOptionsWindowClass GnomePiePieOptionsWindowClass;
enum  {
	GNOME_PIE_PREFERENCES_WINDOW_0_PROPERTY,
	GNOME_PIE_PREFERENCES_WINDOW_NUM_PROPERTIES
};
static GParamSpec* gnome_pie_preferences_window_properties[GNOME_PIE_PREFERENCES_WINDOW_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block12Data Block12Data;

#define GNOME_PIE_TYPE_CONFIG (gnome_pie_config_get_type ())
#define GNOME_PIE_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_CONFIG, GnomePieConfig))
#define GNOME_PIE_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_CONFIG, GnomePieConfigClass))
#define GNOME_PIE_IS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_CONFIG))
#define GNOME_PIE_IS_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_CONFIG))
#define GNOME_PIE_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_CONFIG, GnomePieConfigClass))

typedef struct _GnomePieConfig GnomePieConfig;
typedef struct _GnomePieConfigClass GnomePieConfigClass;

#define GNOME_PIE_TYPE_THEME (gnome_pie_theme_get_type ())
#define GNOME_PIE_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_THEME, GnomePieTheme))
#define GNOME_PIE_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_THEME, GnomePieThemeClass))
#define GNOME_PIE_IS_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_THEME))
#define GNOME_PIE_IS_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_THEME))
#define GNOME_PIE_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_THEME, GnomePieThemeClass))

typedef struct _GnomePieTheme GnomePieTheme;
typedef struct _GnomePieThemeClass GnomePieThemeClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define GNOME_PIE_TYPE_TIP_VIEWER (gnome_pie_tip_viewer_get_type ())
#define GNOME_PIE_TIP_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_TIP_VIEWER, GnomePieTipViewer))
#define GNOME_PIE_TIP_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_TIP_VIEWER, GnomePieTipViewerClass))
#define GNOME_PIE_IS_TIP_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_TIP_VIEWER))
#define GNOME_PIE_IS_TIP_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_TIP_VIEWER))
#define GNOME_PIE_TIP_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_TIP_VIEWER, GnomePieTipViewerClass))

typedef struct _GnomePieTipViewer GnomePieTipViewer;
typedef struct _GnomePieTipViewerClass GnomePieTipViewerClass;
typedef struct _Block13Data Block13Data;
typedef struct _Block14Data Block14Data;

#define GNOME_PIE_TYPE_ARCHIVE_READER (gnome_pie_archive_reader_get_type ())
#define GNOME_PIE_ARCHIVE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_ARCHIVE_READER, GnomePieArchiveReader))
#define GNOME_PIE_ARCHIVE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_ARCHIVE_READER, GnomePieArchiveReaderClass))
#define GNOME_PIE_IS_ARCHIVE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_ARCHIVE_READER))
#define GNOME_PIE_IS_ARCHIVE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_ARCHIVE_READER))
#define GNOME_PIE_ARCHIVE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_ARCHIVE_READER, GnomePieArchiveReaderClass))

typedef struct _GnomePieArchiveReader GnomePieArchiveReader;
typedef struct _GnomePieArchiveReaderClass GnomePieArchiveReaderClass;

#define GNOME_PIE_TYPE_THEME_IMPORTER (gnome_pie_theme_importer_get_type ())
#define GNOME_PIE_THEME_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_THEME_IMPORTER, GnomePieThemeImporter))
#define GNOME_PIE_THEME_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_THEME_IMPORTER, GnomePieThemeImporterClass))
#define GNOME_PIE_IS_THEME_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_THEME_IMPORTER))
#define GNOME_PIE_IS_THEME_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_THEME_IMPORTER))
#define GNOME_PIE_THEME_IMPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_THEME_IMPORTER, GnomePieThemeImporterClass))

typedef struct _GnomePieThemeImporter GnomePieThemeImporter;
typedef struct _GnomePieThemeImporterClass GnomePieThemeImporterClass;
typedef struct _GnomePieArchiveReaderPrivate GnomePieArchiveReaderPrivate;
typedef struct _GnomePieThemeImporterPrivate GnomePieThemeImporterPrivate;

#define GNOME_PIE_TYPE_PIE (gnome_pie_pie_get_type ())
#define GNOME_PIE_PIE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE, GnomePiePie))
#define GNOME_PIE_PIE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE, GnomePiePieClass))
#define GNOME_PIE_IS_PIE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE))
#define GNOME_PIE_IS_PIE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE))
#define GNOME_PIE_PIE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE, GnomePiePieClass))

typedef struct _GnomePiePie GnomePiePie;
typedef struct _GnomePiePieClass GnomePiePieClass;

#define GNOME_PIE_TYPE_ACTION_GROUP (gnome_pie_action_group_get_type ())
#define GNOME_PIE_ACTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_ACTION_GROUP, GnomePieActionGroup))
#define GNOME_PIE_ACTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_ACTION_GROUP, GnomePieActionGroupClass))
#define GNOME_PIE_IS_ACTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_ACTION_GROUP))
#define GNOME_PIE_IS_ACTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_ACTION_GROUP))
#define GNOME_PIE_ACTION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_ACTION_GROUP, GnomePieActionGroupClass))

typedef struct _GnomePieActionGroup GnomePieActionGroup;
typedef struct _GnomePieActionGroupClass GnomePieActionGroupClass;

#define GNOME_PIE_TYPE_TRIGGER (gnome_pie_trigger_get_type ())
#define GNOME_PIE_TRIGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_TRIGGER, GnomePieTrigger))
#define GNOME_PIE_TRIGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_TRIGGER, GnomePieTriggerClass))
#define GNOME_PIE_IS_TRIGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_TRIGGER))
#define GNOME_PIE_IS_TRIGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_TRIGGER))
#define GNOME_PIE_TRIGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_TRIGGER, GnomePieTriggerClass))

typedef struct _GnomePieTrigger GnomePieTrigger;
typedef struct _GnomePieTriggerClass GnomePieTriggerClass;

struct _GnomePiePreferencesWindow {
	GObject parent_instance;
	GnomePiePreferencesWindowPrivate * priv;
};

struct _GnomePiePreferencesWindowClass {
	GObjectClass parent_class;
};

struct _GnomePiePreferencesWindowPrivate {
	gchar* selected_id;
	GtkStack* stack;
	GtkNotebook* notebook;
	GtkWindow* window;
	GtkLabel* no_pie_label;
	GtkLabel* no_slice_label;
	GtkBox* preview_box;
	GtkEventBox* preview_background;
	GtkButton* remove_pie_button;
	GtkButton* edit_pie_button;
	GtkButton* theme_delete_button;
	GnomePieThemeList* theme_list;
	GtkToggleButton* indicator;
	GtkToggleButton* search_by_string;
	GtkToggleButton* autostart;
	GtkToggleButton* captions;
	GnomePiePiePreview* preview;
	GnomePiePieList* pie_list;
	GnomePiePieOptionsWindow* pie_options_window;
};

struct _Block12Data {
	int _ref_count_;
	GnomePiePreferencesWindow* self;
	GtkScale* scale_slider;
	gboolean changing;
	gboolean changed_again;
	GtkScale* range_slider;
	GtkScale* range_slices;
};

struct _Block13Data {
	int _ref_count_;
	GnomePiePreferencesWindow* self;
	GtkFileChooserDialog* dialog;
};

struct _Block14Data {
	int _ref_count_;
	GnomePiePreferencesWindow* self;
	GtkFileChooserDialog* dialog;
	GtkMessageType _result_;
	gchar* message;
};

struct _GnomePieArchiveReader {
	GObject parent_instance;
	GnomePieArchiveReaderPrivate * priv;
};

struct _GnomePieArchiveReaderClass {
	GObjectClass parent_class;
};

struct _GnomePieThemeImporter {
	GnomePieArchiveReader parent_instance;
	GnomePieThemeImporterPrivate * priv;
	gboolean is_valid_theme;
	gchar* theme_name;
};

struct _GnomePieThemeImporterClass {
	GnomePieArchiveReaderClass parent_class;
};

static gint GnomePiePreferencesWindow_private_offset;
static gpointer gnome_pie_preferences_window_parent_class = NULL;
VALA_EXTERN gboolean gnome_pie_daemon_disable_header_bar;
VALA_EXTERN gboolean gnome_pie_daemon_disable_stack_switcher;

VALA_EXTERN GType gnome_pie_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePreferencesWindow, g_object_unref)
VALA_EXTERN GType gnome_pie_theme_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieThemeList, g_object_unref)
VALA_EXTERN GType gnome_pie_pie_preview_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePiePreview, g_object_unref)
VALA_EXTERN GType gnome_pie_pie_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePieList, g_object_unref)
VALA_EXTERN GType gnome_pie_pie_options_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePieOptionsWindow, g_object_unref)
VALA_EXTERN GnomePiePreferencesWindow* gnome_pie_preferences_window_new (void);
VALA_EXTERN GnomePiePreferencesWindow* gnome_pie_preferences_window_construct (GType object_type);
static Block12Data* block12_data_ref (Block12Data* _data12_);
static void block12_data_unref (void * _userdata_);
VALA_EXTERN const gchar* gnome_pie_paths_get_ui_files (void);
VALA_EXTERN GnomePiePieList* gnome_pie_pie_list_new (void);
VALA_EXTERN GnomePiePieList* gnome_pie_pie_list_construct (GType object_type);
static void gnome_pie_preferences_window_on_pie_select (GnomePiePreferencesWindow* self,
                                                 const gchar* id);
static void _gnome_pie_preferences_window_on_pie_select_gnome_pie_pie_list_on_select (GnomePiePieList* _sender,
                                                                               const gchar* id,
                                                                               gpointer self);
static void __lambda74_ (GnomePiePreferencesWindow* self);
static void gnome_pie_preferences_window_on_edit_pie_button_clicked (GnomePiePreferencesWindow* self,
                                                              GtkButton* button);
static void ___lambda74__gnome_pie_pie_list_on_activate (GnomePiePieList* _sender,
                                                  gpointer self);
VALA_EXTERN GnomePiePiePreview* gnome_pie_pie_preview_new (void);
VALA_EXTERN GnomePiePiePreview* gnome_pie_pie_preview_construct (GType object_type);
static void __lambda76_ (GnomePiePreferencesWindow* self);
static void ___lambda76__gnome_pie_pie_preview_on_first_slice_added (GnomePiePiePreview* _sender,
                                                              gpointer self);
static void __lambda77_ (GnomePiePreferencesWindow* self);
static void ___lambda77__gnome_pie_pie_preview_on_last_slice_removed (GnomePiePiePreview* _sender,
                                                               gpointer self);
static void gnome_pie_preferences_window_on_remove_pie_button_clicked (GnomePiePreferencesWindow* self,
                                                                GtkButton* button);
static void _gnome_pie_preferences_window_on_remove_pie_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                    gpointer self);
static void _gnome_pie_preferences_window_on_edit_pie_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self);
static void gnome_pie_preferences_window_on_add_pie_button_clicked (GnomePiePreferencesWindow* self,
                                                             GtkButton* button);
static void _gnome_pie_preferences_window_on_add_pie_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self);
VALA_EXTERN GnomePieThemeList* gnome_pie_theme_list_new (void);
VALA_EXTERN GnomePieThemeList* gnome_pie_theme_list_construct (GType object_type);
static void __lambda79_ (GnomePiePreferencesWindow* self);
VALA_EXTERN GType gnome_pie_config_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieConfig, g_object_unref)
VALA_EXTERN GnomePieConfig* gnome_pie_config_get_global (void);
VALA_EXTERN gboolean gnome_pie_config_get_show_captions (GnomePieConfig* self);
VALA_EXTERN GType gnome_pie_theme_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieTheme, g_object_unref)
VALA_EXTERN GnomePieTheme* gnome_pie_config_get_theme (GnomePieConfig* self);
VALA_EXTERN gboolean gnome_pie_theme_get_has_slice_captions (GnomePieTheme* self);
VALA_EXTERN gboolean gnome_pie_theme_is_local (GnomePieTheme* self);
static void ___lambda79__gnome_pie_theme_list_on_select_new (GnomePieThemeList* _sender,
                                                      gpointer self);
static void __lambda80_ (GnomePiePreferencesWindow* self);
static void ___lambda80__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void gnome_pie_preferences_window_on_export_theme_button_clicked (GnomePiePreferencesWindow* self,
                                                                  GtkButton* button);
static void _gnome_pie_preferences_window_on_export_theme_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
static void gnome_pie_preferences_window_on_import_theme_button_clicked (GnomePiePreferencesWindow* self,
                                                                  GtkButton* button);
static void _gnome_pie_preferences_window_on_import_theme_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
static void gnome_pie_preferences_window_on_reload_theme_button_clicked (GnomePiePreferencesWindow* self,
                                                                  GtkButton* button);
static void _gnome_pie_preferences_window_on_reload_theme_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
static void gnome_pie_preferences_window_on_open_theme_button_clicked (GnomePiePreferencesWindow* self,
                                                                GtkButton* button);
static void _gnome_pie_preferences_window_on_open_theme_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                    gpointer self);
static void gnome_pie_preferences_window_on_delete_theme_button_clicked (GnomePiePreferencesWindow* self,
                                                                  GtkButton* button);
static void _gnome_pie_preferences_window_on_delete_theme_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
static void gnome_pie_preferences_window_on_autostart_toggled (GnomePiePreferencesWindow* self,
                                                        GtkToggleButton* check_box);
static void _gnome_pie_preferences_window_on_autostart_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                   gpointer self);
static void gnome_pie_preferences_window_on_indicator_toggled (GnomePiePreferencesWindow* self,
                                                        GtkToggleButton* check_box);
static void _gnome_pie_preferences_window_on_indicator_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                   gpointer self);
static void gnome_pie_preferences_window_on_search_by_string_toggled (GnomePiePreferencesWindow* self,
                                                               GtkToggleButton* check_box);
static void _gnome_pie_preferences_window_on_search_by_string_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                          gpointer self);
static void gnome_pie_preferences_window_on_captions_toggled (GnomePiePreferencesWindow* self,
                                                       GtkToggleButton* check_box);
static void _gnome_pie_preferences_window_on_captions_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                  gpointer self);
VALA_EXTERN gdouble gnome_pie_config_get_global_scale (GnomePieConfig* self);
static void __lambda84_ (Block12Data* _data12_);
static gboolean ___lambda85_ (Block12Data* _data12_);
VALA_EXTERN void gnome_pie_config_set_global_scale (GnomePieConfig* self,
                                        gdouble value);
VALA_EXTERN void gnome_pie_config_load_themes (GnomePieConfig* self,
                                   const gchar* current);
VALA_EXTERN const gchar* gnome_pie_theme_get_name (GnomePieTheme* self);
static gboolean ____lambda85__gsource_func (gpointer self);
static void ___lambda84__gtk_range_value_changed (GtkRange* _sender,
                                           gpointer self);
VALA_EXTERN gint gnome_pie_config_get_activation_range (GnomePieConfig* self);
static void __lambda86_ (Block12Data* _data12_);
VALA_EXTERN void gnome_pie_config_set_activation_range (GnomePieConfig* self,
                                            gint value);
static void ___lambda86__gtk_range_value_changed (GtkRange* _sender,
                                           gpointer self);
VALA_EXTERN gint gnome_pie_config_get_max_visible_slices (GnomePieConfig* self);
static void __lambda87_ (Block12Data* _data12_);
VALA_EXTERN void gnome_pie_config_set_max_visible_slices (GnomePieConfig* self,
                                              gint value);
static void ___lambda87__gtk_range_value_changed (GtkRange* _sender,
                                           gpointer self);
VALA_EXTERN GType gnome_pie_tip_viewer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieTipViewer, g_object_unref)
VALA_EXTERN GnomePieTipViewer* gnome_pie_tip_viewer_new (gchar** tips,
                                             gint tips_length1);
VALA_EXTERN GnomePieTipViewer* gnome_pie_tip_viewer_construct (GType object_type,
                                                   gchar** tips,
                                                   gint tips_length1);
VALA_EXTERN void gnome_pie_tip_viewer_start_slide_show (GnomePieTipViewer* self);
static void _gnome_pie_tip_viewer_start_slide_show_gtk_widget_show (GtkWidget* _sender,
                                                             gpointer self);
VALA_EXTERN void gnome_pie_tip_viewer_stop_slide_show (GnomePieTipViewer* self);
static void _gnome_pie_tip_viewer_stop_slide_show_gtk_widget_hide (GtkWidget* _sender,
                                                            gpointer self);
static void __lambda92_ (GnomePiePreferencesWindow* self);
VALA_EXTERN void gnome_pie_config_save (GnomePieConfig* self);
VALA_EXTERN void gnome_pie_pies_save (void);
static gboolean __lambda93_ (GnomePiePreferencesWindow* self);
VALA_EXTERN void gnome_pie_icon_select_window_clear_icons (void);
static gboolean ___lambda93__gsource_func (gpointer self);
static void ___lambda92__gtk_widget_hide (GtkWidget* _sender,
                                   gpointer self);
static gboolean _gtk_widget_hide_on_delete_gtk_widget_delete_event (GtkWidget* _sender,
                                                             GdkEventAny* event,
                                                             gpointer self);
VALA_EXTERN void gnome_pie_preferences_window_show (GnomePiePreferencesWindow* self);
VALA_EXTERN void gnome_pie_pie_preview_draw_loop (GnomePiePiePreview* self);
VALA_EXTERN void gnome_pie_pie_list_select_first (GnomePiePieList* self);
VALA_EXTERN gboolean gnome_pie_config_get_show_indicator (GnomePieConfig* self);
VALA_EXTERN gboolean gnome_pie_config_get_auto_start (GnomePieConfig* self);
VALA_EXTERN gboolean gnome_pie_config_get_search_by_string (GnomePieConfig* self);
VALA_EXTERN const gchar* gnome_pie_paths_get_autostart (void);
VALA_EXTERN void gnome_pie_config_set_auto_start (GnomePieConfig* self,
                                      gboolean value);
VALA_EXTERN const gchar* gnome_pie_paths_get_executable (void);
static Block13Data* block13_data_ref (Block13Data* _data13_);
static void block13_data_unref (void * _userdata_);
static void __lambda81_ (Block13Data* _data13_,
                  GtkDialog* d,
                  gint _result_);
VALA_EXTERN void gnome_pie_theme_export (GnomePieTheme* self,
                             const gchar* file);
static void ___lambda81__gtk_dialog_response (GtkDialog* _sender,
                                       gint response_id,
                                       gpointer self);
static Block14Data* block14_data_ref (Block14Data* _data14_);
static void block14_data_unref (void * _userdata_);
static void __lambda82_ (Block14Data* _data14_,
                  GtkDialog* d,
                  gint r);
VALA_EXTERN GType gnome_pie_archive_reader_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieArchiveReader, g_object_unref)
VALA_EXTERN GType gnome_pie_theme_importer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieThemeImporter, g_object_unref)
VALA_EXTERN GnomePieThemeImporter* gnome_pie_theme_importer_new (void);
VALA_EXTERN GnomePieThemeImporter* gnome_pie_theme_importer_construct (GType object_type);
VALA_EXTERN gboolean gnome_pie_theme_importer_open (GnomePieThemeImporter* self,
                                        const gchar* path);
VALA_EXTERN gboolean gnome_pie_config_has_theme (GnomePieConfig* self,
                                     const gchar* name);
VALA_EXTERN gboolean gnome_pie_archive_reader_extract_to (GnomePieArchiveReader* self,
                                              const gchar* directory);
VALA_EXTERN const gchar* gnome_pie_paths_get_local_themes (void);
VALA_EXTERN void gnome_pie_theme_list_reload (GnomePieThemeList* self);
VALA_EXTERN void gnome_pie_archive_reader_close (GnomePieArchiveReader* self);
static void ___lambda82__gtk_dialog_response (GtkDialog* _sender,
                                       gint response_id,
                                       gpointer self);
VALA_EXTERN const gchar* gnome_pie_theme_get_directory (GnomePieTheme* self);
static void __lambda83_ (GnomePiePreferencesWindow* self,
                  gint response);
VALA_EXTERN void gnome_pie_paths_delete_directory (const gchar* directory);
static void ___lambda83__gtk_dialog_response (GtkDialog* _sender,
                                       gint response_id,
                                       gpointer self);
VALA_EXTERN void gnome_pie_config_set_show_indicator (GnomePieConfig* self,
                                          gboolean value);
VALA_EXTERN void gnome_pie_config_set_show_captions (GnomePieConfig* self,
                                         gboolean value);
VALA_EXTERN void gnome_pie_config_set_search_by_string (GnomePieConfig* self,
                                            gboolean value);
VALA_EXTERN GType gnome_pie_pie_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePie, g_object_unref)
VALA_EXTERN GeeHashMap* gnome_pie_pie_manager_get_all_pies (void);
VALA_EXTERN void gnome_pie_pie_preview_set_pie (GnomePiePiePreview* self,
                                    const gchar* id);
VALA_EXTERN GType gnome_pie_action_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieActionGroup, g_object_unref)
VALA_EXTERN GeeArrayList* gnome_pie_pie_get_action_groups (GnomePiePie* self);
VALA_EXTERN GType gnome_pie_trigger_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieTrigger, g_object_unref)
VALA_EXTERN GnomePiePie* gnome_pie_pie_manager_create_persistent_pie (const gchar* name,
                                                          const gchar* icon_name,
                                                          GnomePieTrigger* hotkey,
                                                          const gchar* desired_id);
VALA_EXTERN void gnome_pie_pie_list_reload_all (GnomePiePieList* self);
VALA_EXTERN void gnome_pie_pie_list_select (GnomePiePieList* self,
                                const gchar* id);
VALA_EXTERN const gchar* gnome_pie_pie_get_id (GnomePiePie* self);
static void ___lambda78_ (GnomePiePreferencesWindow* self,
                   gint response);
VALA_EXTERN void gnome_pie_pie_manager_remove_pie (const gchar* id);
static void ____lambda78__gtk_dialog_response (GtkDialog* _sender,
                                        gint response_id,
                                        gpointer self);
VALA_EXTERN GnomePiePieOptionsWindow* gnome_pie_pie_options_window_new (void);
VALA_EXTERN GnomePiePieOptionsWindow* gnome_pie_pie_options_window_construct (GType object_type);
VALA_EXTERN void gnome_pie_pie_options_window_set_parent (GnomePiePieOptionsWindow* self,
                                              GtkWindow* parent);
static void ___lambda75_ (GnomePiePreferencesWindow* self,
                   GnomePieTrigger* trigger,
                   const gchar* name,
                   const gchar* icon);
VALA_EXTERN void gnome_pie_pie_set_name (GnomePiePie* self,
                             const gchar* value);
VALA_EXTERN void gnome_pie_pie_set_icon (GnomePiePie* self,
                             const gchar* value);
VALA_EXTERN void gnome_pie_pie_manager_bind_trigger (GnomePieTrigger* trigger,
                                         const gchar* id);
VALA_EXTERN void gnome_pie_pie_manager_create_launcher (const gchar* id);
static void ____lambda75__gnome_pie_pie_options_window_on_ok (GnomePiePieOptionsWindow* _sender,
                                                       GnomePieTrigger* trigger,
                                                       const gchar* pie_name,
                                                       const gchar* icon_name,
                                                       gpointer self);
VALA_EXTERN void gnome_pie_pie_options_window_set_pie (GnomePiePieOptionsWindow* self,
                                           const gchar* id);
VALA_EXTERN void gnome_pie_pie_options_window_show (GnomePiePieOptionsWindow* self);
static void gnome_pie_preferences_window_finalize (GObject * obj);
static GType gnome_pie_preferences_window_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
gnome_pie_preferences_window_get_instance_private (GnomePiePreferencesWindow* self)
{
	return G_STRUCT_MEMBER_P (self, GnomePiePreferencesWindow_private_offset);
}

static Block12Data*
block12_data_ref (Block12Data* _data12_)
{
	g_atomic_int_inc (&_data12_->_ref_count_);
	return _data12_;
}

static void
block12_data_unref (void * _userdata_)
{
	Block12Data* _data12_;
	_data12_ = (Block12Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
		GnomePiePreferencesWindow* self;
		self = _data12_->self;
		_g_object_unref0 (_data12_->range_slices);
		_g_object_unref0 (_data12_->range_slider);
		_g_object_unref0 (_data12_->scale_slider);
		_g_object_unref0 (self);
		g_slice_free (Block12Data, _data12_);
	}
}

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

static void
_gnome_pie_preferences_window_on_pie_select_gnome_pie_pie_list_on_select (GnomePiePieList* _sender,
                                                                          const gchar* id,
                                                                          gpointer self)
{
	gnome_pie_preferences_window_on_pie_select ((GnomePiePreferencesWindow*) self, id);
}

static void
__lambda74_ (GnomePiePreferencesWindow* self)
{
	gnome_pie_preferences_window_on_edit_pie_button_clicked (self, NULL);
}

static void
___lambda74__gnome_pie_pie_list_on_activate (GnomePiePieList* _sender,
                                             gpointer self)
{
	__lambda74_ ((GnomePiePreferencesWindow*) self);
}

static void
__lambda76_ (GnomePiePreferencesWindow* self)
{
	GtkLabel* _tmp0_;
	_tmp0_ = self->priv->no_slice_label;
	gtk_widget_hide ((GtkWidget*) _tmp0_);
}

static void
___lambda76__gnome_pie_pie_preview_on_first_slice_added (GnomePiePiePreview* _sender,
                                                         gpointer self)
{
	__lambda76_ ((GnomePiePreferencesWindow*) self);
}

static void
__lambda77_ (GnomePiePreferencesWindow* self)
{
	GtkLabel* _tmp0_;
	_tmp0_ = self->priv->no_slice_label;
	gtk_widget_show ((GtkWidget*) _tmp0_);
}

static void
___lambda77__gnome_pie_pie_preview_on_last_slice_removed (GnomePiePiePreview* _sender,
                                                          gpointer self)
{
	__lambda77_ ((GnomePiePreferencesWindow*) self);
}

static void
_gnome_pie_preferences_window_on_remove_pie_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                               gpointer self)
{
	gnome_pie_preferences_window_on_remove_pie_button_clicked ((GnomePiePreferencesWindow*) self, _sender);
}

static void
_gnome_pie_preferences_window_on_edit_pie_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self)
{
	gnome_pie_preferences_window_on_edit_pie_button_clicked ((GnomePiePreferencesWindow*) self, _sender);
}

static void
_gnome_pie_preferences_window_on_add_pie_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self)
{
	gnome_pie_preferences_window_on_add_pie_button_clicked ((GnomePiePreferencesWindow*) self, _sender);
}

static void
__lambda79_ (GnomePiePreferencesWindow* self)
{
	GtkToggleButton* _tmp0_;
	GnomePieConfig* _tmp1_;
	GnomePieConfig* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	GnomePieConfig* _tmp5_;
	GnomePieConfig* _tmp6_;
	GnomePieTheme* _tmp7_;
	GnomePieTheme* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	GnomePieConfig* _tmp13_;
	GnomePieConfig* _tmp14_;
	GnomePieTheme* _tmp15_;
	GnomePieTheme* _tmp16_;
	_tmp0_ = self->priv->captions;
	_tmp1_ = gnome_pie_config_get_global ();
	_tmp2_ = _tmp1_;
	_tmp3_ = gnome_pie_config_get_show_captions (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_toggle_button_set_active (_tmp0_, _tmp4_);
	_tmp5_ = gnome_pie_config_get_global ();
	_tmp6_ = _tmp5_;
	_tmp7_ = gnome_pie_config_get_theme (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = gnome_pie_theme_get_has_slice_captions (_tmp8_);
	_tmp10_ = _tmp9_;
	if (_tmp10_) {
		GtkToggleButton* _tmp11_;
		_tmp11_ = self->priv->captions;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp11_, TRUE);
	} else {
		GtkToggleButton* _tmp12_;
		_tmp12_ = self->priv->captions;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp12_, FALSE);
	}
	_tmp13_ = gnome_pie_config_get_global ();
	_tmp14_ = _tmp13_;
	_tmp15_ = gnome_pie_config_get_theme (_tmp14_);
	_tmp16_ = _tmp15_;
	if (gnome_pie_theme_is_local (_tmp16_)) {
		GtkButton* _tmp17_;
		_tmp17_ = self->priv->theme_delete_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp17_, TRUE);
	} else {
		GtkButton* _tmp18_;
		_tmp18_ = self->priv->theme_delete_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp18_, FALSE);
	}
}

static void
___lambda79__gnome_pie_theme_list_on_select_new (GnomePieThemeList* _sender,
                                                 gpointer self)
{
	__lambda79_ ((GnomePiePreferencesWindow*) self);
}

static void
__lambda80_ (GnomePiePreferencesWindow* self)
{
	GError* _inner_error0_ = NULL;
	{
		g_app_info_launch_default_for_uri ("http://schneegans.github.io/lessons/2015/04/26/themes-for-gnome-pie", NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp0_;
		const gchar* _tmp1_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp0_ = e;
		_tmp1_ = _tmp0_->message;
		g_warning ("preferencesWindow.vala:174: %s", _tmp1_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda80__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda80_ ((GnomePiePreferencesWindow*) self);
}

static void
_gnome_pie_preferences_window_on_export_theme_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	gnome_pie_preferences_window_on_export_theme_button_clicked ((GnomePiePreferencesWindow*) self, _sender);
}

static void
_gnome_pie_preferences_window_on_import_theme_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	gnome_pie_preferences_window_on_import_theme_button_clicked ((GnomePiePreferencesWindow*) self, _sender);
}

static void
_gnome_pie_preferences_window_on_reload_theme_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	gnome_pie_preferences_window_on_reload_theme_button_clicked ((GnomePiePreferencesWindow*) self, _sender);
}

static void
_gnome_pie_preferences_window_on_open_theme_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                               gpointer self)
{
	gnome_pie_preferences_window_on_open_theme_button_clicked ((GnomePiePreferencesWindow*) self, _sender);
}

static void
_gnome_pie_preferences_window_on_delete_theme_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	gnome_pie_preferences_window_on_delete_theme_button_clicked ((GnomePiePreferencesWindow*) self, _sender);
}

static void
_gnome_pie_preferences_window_on_autostart_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                              gpointer self)
{
	gnome_pie_preferences_window_on_autostart_toggled ((GnomePiePreferencesWindow*) self, _sender);
}

static void
_gnome_pie_preferences_window_on_indicator_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                              gpointer self)
{
	gnome_pie_preferences_window_on_indicator_toggled ((GnomePiePreferencesWindow*) self, _sender);
}

static void
_gnome_pie_preferences_window_on_search_by_string_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                     gpointer self)
{
	gnome_pie_preferences_window_on_search_by_string_toggled ((GnomePiePreferencesWindow*) self, _sender);
}

static void
_gnome_pie_preferences_window_on_captions_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                             gpointer self)
{
	gnome_pie_preferences_window_on_captions_toggled ((GnomePiePreferencesWindow*) self, _sender);
}

static gboolean
___lambda85_ (Block12Data* _data12_)
{
	GnomePiePreferencesWindow* self;
	GnomePieConfig* _tmp0_;
	GnomePieConfig* _tmp1_;
	GnomePieConfig* _tmp2_;
	GnomePieConfig* _tmp3_;
	GnomePieConfig* _tmp4_;
	GnomePieConfig* _tmp5_;
	GnomePieTheme* _tmp6_;
	GnomePieTheme* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gboolean result;
	self = _data12_->self;
	if (_data12_->changed_again) {
		_data12_->changed_again = FALSE;
		result = TRUE;
		return result;
	}
	_tmp0_ = gnome_pie_config_get_global ();
	_tmp1_ = _tmp0_;
	gnome_pie_config_set_global_scale (_tmp1_, gtk_range_get_value ((GtkRange*) _data12_->scale_slider));
	_tmp2_ = gnome_pie_config_get_global ();
	_tmp3_ = _tmp2_;
	_tmp4_ = gnome_pie_config_get_global ();
	_tmp5_ = _tmp4_;
	_tmp6_ = gnome_pie_config_get_theme (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = gnome_pie_theme_get_name (_tmp7_);
	_tmp9_ = _tmp8_;
	gnome_pie_config_load_themes (_tmp3_, _tmp9_);
	_data12_->changing = FALSE;
	result = FALSE;
	return result;
}

static gboolean
____lambda85__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda85_ (self);
	return result;
}

static void
__lambda84_ (Block12Data* _data12_)
{
	GnomePiePreferencesWindow* self;
	self = _data12_->self;
	if (!_data12_->changing) {
		_data12_->changing = TRUE;
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, ____lambda85__gsource_func, block12_data_ref (_data12_), block12_data_unref);
	} else {
		_data12_->changed_again = TRUE;
	}
}

static void
___lambda84__gtk_range_value_changed (GtkRange* _sender,
                                      gpointer self)
{
	__lambda84_ (self);
}

static void
__lambda86_ (Block12Data* _data12_)
{
	GnomePiePreferencesWindow* self;
	GnomePieConfig* _tmp0_;
	GnomePieConfig* _tmp1_;
	self = _data12_->self;
	_tmp0_ = gnome_pie_config_get_global ();
	_tmp1_ = _tmp0_;
	gnome_pie_config_set_activation_range (_tmp1_, (gint) gtk_range_get_value ((GtkRange*) _data12_->range_slider));
}

static void
___lambda86__gtk_range_value_changed (GtkRange* _sender,
                                      gpointer self)
{
	__lambda86_ (self);
}

static void
__lambda87_ (Block12Data* _data12_)
{
	GnomePiePreferencesWindow* self;
	GnomePieConfig* _tmp0_;
	GnomePieConfig* _tmp1_;
	self = _data12_->self;
	_tmp0_ = gnome_pie_config_get_global ();
	_tmp1_ = _tmp0_;
	gnome_pie_config_set_max_visible_slices (_tmp1_, (gint) gtk_range_get_value ((GtkRange*) _data12_->range_slices));
}

static void
___lambda87__gtk_range_value_changed (GtkRange* _sender,
                                      gpointer self)
{
	__lambda87_ (self);
}

static void
_gnome_pie_tip_viewer_start_slide_show_gtk_widget_show (GtkWidget* _sender,
                                                        gpointer self)
{
	gnome_pie_tip_viewer_start_slide_show ((GnomePieTipViewer*) self);
}

static void
_gnome_pie_tip_viewer_stop_slide_show_gtk_widget_hide (GtkWidget* _sender,
                                                       gpointer self)
{
	gnome_pie_tip_viewer_stop_slide_show ((GnomePieTipViewer*) self);
}

static gboolean
__lambda93_ (GnomePiePreferencesWindow* self)
{
	gboolean result;
	gnome_pie_icon_select_window_clear_icons ();
	result = FALSE;
	return result;
}

static gboolean
___lambda93__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda93_ ((GnomePiePreferencesWindow*) self);
	return result;
}

static void
__lambda92_ (GnomePiePreferencesWindow* self)
{
	GnomePieConfig* _tmp0_;
	GnomePieConfig* _tmp1_;
	_tmp0_ = gnome_pie_config_get_global ();
	_tmp1_ = _tmp0_;
	gnome_pie_config_save (_tmp1_);
	gnome_pie_pies_save ();
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda93__gsource_func, g_object_ref (self), g_object_unref);
}

static void
___lambda92__gtk_widget_hide (GtkWidget* _sender,
                              gpointer self)
{
	__lambda92_ ((GnomePiePreferencesWindow*) self);
}

static gboolean
_gtk_widget_hide_on_delete_gtk_widget_delete_event (GtkWidget* _sender,
                                                    GdkEventAny* event,
                                                    gpointer self)
{
	gboolean result;
	result = gtk_widget_hide_on_delete ((GtkWidget*) self);
	return result;
}

GnomePiePreferencesWindow*
gnome_pie_preferences_window_construct (GType object_type)
{
	GnomePiePreferencesWindow * self = NULL;
	Block12Data* _data12_;
	GtkBuilder* builder = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GtkBuilder* _tmp4_;
	GtkBuilder* _tmp5_;
	GtkBuilder* _tmp6_;
	GObject* _tmp7_;
	GtkWindow* _tmp8_;
	GtkWindow* _tmp9_;
	GtkWindow* _tmp10_;
	GtkBuilder* _tmp17_;
	GObject* _tmp18_;
	GtkNotebook* _tmp19_;
	GnomePiePieList* _tmp58_;
	GnomePiePieList* _tmp59_;
	GnomePiePieList* _tmp60_;
	GtkScrolledWindow* scroll_area = NULL;
	GtkBuilder* _tmp61_;
	GObject* _tmp62_;
	GtkScrolledWindow* _tmp63_;
	GtkScrolledWindow* _tmp64_;
	GnomePiePieList* _tmp65_;
	GnomePiePiePreview* _tmp66_;
	GnomePiePiePreview* _tmp67_;
	GnomePiePiePreview* _tmp68_;
	GtkBuilder* _tmp69_;
	GObject* _tmp70_;
	GtkBox* _tmp71_;
	GtkBox* _tmp72_;
	GnomePiePiePreview* _tmp73_;
	GtkBuilder* _tmp74_;
	GObject* _tmp75_;
	GtkLabel* _tmp76_;
	GtkBuilder* _tmp77_;
	GObject* _tmp78_;
	GtkLabel* _tmp79_;
	GtkBuilder* _tmp80_;
	GObject* _tmp81_;
	GtkEventBox* _tmp82_;
	GtkBuilder* _tmp83_;
	GObject* _tmp84_;
	GtkButton* _tmp85_;
	GtkButton* _tmp86_;
	GtkBuilder* _tmp87_;
	GObject* _tmp88_;
	GtkButton* _tmp89_;
	GtkButton* _tmp90_;
	GtkBuilder* _tmp91_;
	GObject* _tmp92_;
	GnomePieThemeList* _tmp93_;
	GnomePieThemeList* _tmp94_;
	GtkBuilder* _tmp95_;
	GObject* _tmp96_;
	GtkScrolledWindow* _tmp97_;
	GtkScrolledWindow* _tmp98_;
	GnomePieThemeList* _tmp99_;
	GtkBuilder* _tmp100_;
	GObject* _tmp101_;
	GtkBuilder* _tmp102_;
	GObject* _tmp103_;
	GtkBuilder* _tmp104_;
	GObject* _tmp105_;
	GtkBuilder* _tmp106_;
	GObject* _tmp107_;
	GtkBuilder* _tmp108_;
	GObject* _tmp109_;
	GtkBuilder* _tmp110_;
	GObject* _tmp111_;
	GtkButton* _tmp112_;
	GtkButton* _tmp113_;
	GtkBuilder* _tmp114_;
	GObject* _tmp115_;
	GtkToggleButton* _tmp116_;
	GtkToggleButton* _tmp117_;
	GtkBuilder* _tmp118_;
	GObject* _tmp119_;
	GtkToggleButton* _tmp120_;
	GtkToggleButton* _tmp121_;
	GtkBuilder* _tmp122_;
	GObject* _tmp123_;
	GtkToggleButton* _tmp124_;
	GtkToggleButton* _tmp125_;
	GtkBuilder* _tmp126_;
	GObject* _tmp127_;
	GtkToggleButton* _tmp128_;
	GtkToggleButton* _tmp129_;
	GtkBuilder* _tmp130_;
	GObject* _tmp131_;
	GtkScale* _tmp132_;
	GnomePieConfig* _tmp133_;
	GnomePieConfig* _tmp134_;
	gdouble _tmp135_;
	gdouble _tmp136_;
	GtkBuilder* _tmp137_;
	GObject* _tmp138_;
	GtkScale* _tmp139_;
	GnomePieConfig* _tmp140_;
	GnomePieConfig* _tmp141_;
	gint _tmp142_;
	gint _tmp143_;
	GtkBuilder* _tmp144_;
	GObject* _tmp145_;
	GtkScale* _tmp146_;
	GnomePieConfig* _tmp147_;
	GnomePieConfig* _tmp148_;
	gint _tmp149_;
	gint _tmp150_;
	GtkBox* info_box = NULL;
	GtkBuilder* _tmp151_;
	GObject* _tmp152_;
	GtkBox* _tmp153_;
	GnomePieTipViewer* info_label = NULL;
	gchar* _tmp154_;
	gchar* _tmp155_;
	gchar* _tmp156_;
	gchar* _tmp157_;
	gchar* _tmp158_;
	gchar* _tmp159_;
	gchar* _tmp160_;
	gchar* _tmp161_;
	gchar* _tmp162_;
	gchar* _tmp163_;
	gchar* _tmp164_;
	gchar* _tmp165_;
	gchar* _tmp166_;
	gchar* _tmp167_;
	gchar* _tmp168_;
	gchar* _tmp169_;
	gchar* _tmp170_;
	gchar** _tmp171_;
	gchar** _tmp172_;
	gint _tmp172__length1;
	GnomePieTipViewer* _tmp173_;
	GnomePieTipViewer* _tmp174_;
	GtkWindow* _tmp175_;
	GtkWindow* _tmp176_;
	GtkWindow* _tmp177_;
	GtkWindow* _tmp178_;
	GtkWindow* _tmp179_;
	_data12_ = g_slice_new0 (Block12Data);
	_data12_->_ref_count_ = 1;
	self = (GnomePiePreferencesWindow*) g_object_new (object_type, NULL);
	_data12_->self = g_object_ref (self);
	_tmp0_ = gnome_pie_paths_get_ui_files ();
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strconcat (_tmp1_, "/preferences.ui", NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_builder_new_from_file (_tmp3_);
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	builder = _tmp5_;
	_tmp6_ = builder;
	_tmp7_ = gtk_builder_get_object (_tmp6_, "window");
	_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp7_) : NULL);
	_g_object_unref0 (self->priv->window);
	self->priv->window = _tmp8_;
	_tmp9_ = self->priv->window;
	gtk_window_set_icon_name (_tmp9_, "gnome-pie");
	_tmp10_ = self->priv->window;
	gtk_widget_add_events ((GtkWidget*) _tmp10_, (gint) (((GDK_BUTTON_RELEASE_MASK | GDK_KEY_RELEASE_MASK) | GDK_KEY_PRESS_MASK) | GDK_POINTER_MOTION_MASK));
	if (!gnome_pie_daemon_disable_header_bar) {
		GtkHeaderBar* headerbar = NULL;
		GtkHeaderBar* _tmp11_;
		GtkHeaderBar* _tmp12_;
		GtkHeaderBar* _tmp13_;
		GtkHeaderBar* _tmp14_;
		GtkWindow* _tmp15_;
		GtkHeaderBar* _tmp16_;
		_tmp11_ = (GtkHeaderBar*) gtk_header_bar_new ();
		g_object_ref_sink (_tmp11_);
		headerbar = _tmp11_;
		_tmp12_ = headerbar;
		gtk_header_bar_set_show_close_button (_tmp12_, TRUE);
		_tmp13_ = headerbar;
		gtk_header_bar_set_title (_tmp13_, _ ("Gnome-Pie Settings"));
		_tmp14_ = headerbar;
		gtk_header_bar_set_subtitle (_tmp14_, _ ("bake your pies!"));
		_tmp15_ = self->priv->window;
		_tmp16_ = headerbar;
		gtk_window_set_titlebar (_tmp15_, (GtkWidget*) _tmp16_);
		_g_object_unref0 (headerbar);
	}
	_tmp17_ = builder;
	_tmp18_ = gtk_builder_get_object (_tmp17_, "notebook");
	_tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, gtk_notebook_get_type ()) ? ((GtkNotebook*) _tmp18_) : NULL);
	_g_object_unref0 (self->priv->notebook);
	self->priv->notebook = _tmp19_;
	if (!gnome_pie_daemon_disable_stack_switcher) {
		GtkBox* main_box = NULL;
		GtkBuilder* _tmp20_;
		GObject* _tmp21_;
		GtkBox* _tmp22_;
		GtkBox* pie_settings = NULL;
		GtkBuilder* _tmp23_;
		GObject* _tmp24_;
		GtkBox* _tmp25_;
		GtkBox* general_settings = NULL;
		GtkBuilder* _tmp26_;
		GObject* _tmp27_;
		GtkBox* _tmp28_;
		GtkBox* _tmp29_;
		GtkContainer* _tmp30_;
		GtkContainer* _tmp31_;
		GtkBox* _tmp32_;
		GtkBox* _tmp33_;
		GtkContainer* _tmp34_;
		GtkContainer* _tmp35_;
		GtkBox* _tmp36_;
		GtkBox* _tmp37_;
		GtkNotebook* _tmp38_;
		GtkStackSwitcher* switcher = NULL;
		GtkStackSwitcher* _tmp39_;
		GtkStackSwitcher* _tmp40_;
		GtkStackSwitcher* _tmp41_;
		GtkBox* _tmp42_;
		GtkStackSwitcher* _tmp43_;
		GtkStack* _tmp44_;
		GtkStack* _tmp45_;
		GtkStack* _tmp46_;
		GtkStack* _tmp47_;
		GtkStack* _tmp48_;
		GtkStack* _tmp49_;
		GtkBox* _tmp50_;
		GtkStack* _tmp51_;
		GtkStackSwitcher* _tmp52_;
		GtkStack* _tmp53_;
		GtkStack* _tmp54_;
		GtkBox* _tmp55_;
		GtkStack* _tmp56_;
		GtkBox* _tmp57_;
		_tmp20_ = builder;
		_tmp21_ = gtk_builder_get_object (_tmp20_, "main-box");
		_tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, gtk_box_get_type ()) ? ((GtkBox*) _tmp21_) : NULL);
		main_box = _tmp22_;
		_tmp23_ = builder;
		_tmp24_ = gtk_builder_get_object (_tmp23_, "pie-settings");
		_tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, gtk_box_get_type ()) ? ((GtkBox*) _tmp24_) : NULL);
		pie_settings = _tmp25_;
		_tmp26_ = builder;
		_tmp27_ = gtk_builder_get_object (_tmp26_, "general-settings");
		_tmp28_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, gtk_box_get_type ()) ? ((GtkBox*) _tmp27_) : NULL);
		general_settings = _tmp28_;
		_tmp29_ = pie_settings;
		_tmp30_ = gtk_widget_get_parent ((GtkWidget*) _tmp29_);
		_tmp31_ = _tmp30_;
		_tmp32_ = pie_settings;
		gtk_container_remove (_tmp31_, (GtkWidget*) _tmp32_);
		_tmp33_ = general_settings;
		_tmp34_ = gtk_widget_get_parent ((GtkWidget*) _tmp33_);
		_tmp35_ = _tmp34_;
		_tmp36_ = general_settings;
		gtk_container_remove (_tmp35_, (GtkWidget*) _tmp36_);
		_tmp37_ = main_box;
		_tmp38_ = self->priv->notebook;
		gtk_container_remove ((GtkContainer*) _tmp37_, (GtkWidget*) _tmp38_);
		_tmp39_ = (GtkStackSwitcher*) gtk_stack_switcher_new ();
		g_object_ref_sink (_tmp39_);
		switcher = _tmp39_;
		_tmp40_ = switcher;
		gtk_widget_set_margin_top ((GtkWidget*) _tmp40_, 10);
		_tmp41_ = switcher;
		gtk_widget_set_halign ((GtkWidget*) _tmp41_, GTK_ALIGN_CENTER);
		_tmp42_ = main_box;
		_tmp43_ = switcher;
		gtk_box_pack_start (_tmp42_, (GtkWidget*) _tmp43_, FALSE, TRUE, (guint) 0);
		_tmp44_ = (GtkStack*) gtk_stack_new ();
		g_object_ref_sink (_tmp44_);
		_g_object_unref0 (self->priv->stack);
		self->priv->stack = _tmp44_;
		_tmp45_ = self->priv->stack;
		gtk_stack_set_transition_duration (_tmp45_, (guint) 500);
		_tmp46_ = self->priv->stack;
		gtk_stack_set_transition_type (_tmp46_, GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT);
		_tmp47_ = self->priv->stack;
		gtk_stack_set_homogeneous (_tmp47_, TRUE);
		_tmp48_ = self->priv->stack;
		gtk_widget_set_halign ((GtkWidget*) _tmp48_, GTK_ALIGN_FILL);
		_tmp49_ = self->priv->stack;
		g_object_set ((GtkWidget*) _tmp49_, "expand", TRUE, NULL);
		_tmp50_ = main_box;
		_tmp51_ = self->priv->stack;
		gtk_container_add ((GtkContainer*) _tmp50_, (GtkWidget*) _tmp51_);
		_tmp52_ = switcher;
		_tmp53_ = self->priv->stack;
		gtk_stack_switcher_set_stack (_tmp52_, _tmp53_);
		_tmp54_ = self->priv->stack;
		_tmp55_ = general_settings;
		gtk_container_add_with_properties ((GtkContainer*) _tmp54_, (GtkWidget*) _tmp55_, "name", "1", "title", _ ("General Settings"), NULL, NULL);
		_tmp56_ = self->priv->stack;
		_tmp57_ = pie_settings;
		gtk_container_add_with_properties ((GtkContainer*) _tmp56_, (GtkWidget*) _tmp57_, "name", "2", "title", _ ("Pie Settings"), NULL, NULL);
		_g_object_unref0 (switcher);
		_g_object_unref0 (general_settings);
		_g_object_unref0 (pie_settings);
		_g_object_unref0 (main_box);
	}
	_tmp58_ = gnome_pie_pie_list_new ();
	g_object_ref_sink (_tmp58_);
	_g_object_unref0 (self->priv->pie_list);
	self->priv->pie_list = _tmp58_;
	_tmp59_ = self->priv->pie_list;
	g_signal_connect_object (_tmp59_, "on-select", (GCallback) _gnome_pie_preferences_window_on_pie_select_gnome_pie_pie_list_on_select, self, 0);
	_tmp60_ = self->priv->pie_list;
	g_signal_connect_object (_tmp60_, "on-activate", (GCallback) ___lambda74__gnome_pie_pie_list_on_activate, self, 0);
	_tmp61_ = builder;
	_tmp62_ = gtk_builder_get_object (_tmp61_, "pies-scrolledwindow");
	_tmp63_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp62_, gtk_scrolled_window_get_type ()) ? ((GtkScrolledWindow*) _tmp62_) : NULL);
	scroll_area = _tmp63_;
	_tmp64_ = scroll_area;
	_tmp65_ = self->priv->pie_list;
	gtk_container_add ((GtkContainer*) _tmp64_, (GtkWidget*) _tmp65_);
	_tmp66_ = gnome_pie_pie_preview_new ();
	g_object_ref_sink (_tmp66_);
	_g_object_unref0 (self->priv->preview);
	self->priv->preview = _tmp66_;
	_tmp67_ = self->priv->preview;
	g_signal_connect_object (_tmp67_, "on-first-slice-added", (GCallback) ___lambda76__gnome_pie_pie_preview_on_first_slice_added, self, 0);
	_tmp68_ = self->priv->preview;
	g_signal_connect_object (_tmp68_, "on-last-slice-removed", (GCallback) ___lambda77__gnome_pie_pie_preview_on_last_slice_removed, self, 0);
	_tmp69_ = builder;
	_tmp70_ = gtk_builder_get_object (_tmp69_, "preview-box");
	_tmp71_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp70_, gtk_box_get_type ()) ? ((GtkBox*) _tmp70_) : NULL);
	_g_object_unref0 (self->priv->preview_box);
	self->priv->preview_box = _tmp71_;
	_tmp72_ = self->priv->preview_box;
	_tmp73_ = self->priv->preview;
	gtk_box_pack_start (_tmp72_, (GtkWidget*) _tmp73_, TRUE, TRUE, (guint) 0);
	_tmp74_ = builder;
	_tmp75_ = gtk_builder_get_object (_tmp74_, "no-pie-label");
	_tmp76_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp75_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp75_) : NULL);
	_g_object_unref0 (self->priv->no_pie_label);
	self->priv->no_pie_label = _tmp76_;
	_tmp77_ = builder;
	_tmp78_ = gtk_builder_get_object (_tmp77_, "no-slice-label");
	_tmp79_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp78_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp78_) : NULL);
	_g_object_unref0 (self->priv->no_slice_label);
	self->priv->no_slice_label = _tmp79_;
	_tmp80_ = builder;
	_tmp81_ = gtk_builder_get_object (_tmp80_, "preview-background");
	_tmp82_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp81_, gtk_event_box_get_type ()) ? ((GtkEventBox*) _tmp81_) : NULL);
	_g_object_unref0 (self->priv->preview_background);
	self->priv->preview_background = _tmp82_;
	_tmp83_ = builder;
	_tmp84_ = gtk_builder_get_object (_tmp83_, "remove-pie-button");
	_tmp85_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp84_, gtk_button_get_type ()) ? ((GtkButton*) _tmp84_) : NULL);
	_g_object_unref0 (self->priv->remove_pie_button);
	self->priv->remove_pie_button = _tmp85_;
	_tmp86_ = self->priv->remove_pie_button;
	g_signal_connect_object (_tmp86_, "clicked", (GCallback) _gnome_pie_preferences_window_on_remove_pie_button_clicked_gtk_button_clicked, self, 0);
	_tmp87_ = builder;
	_tmp88_ = gtk_builder_get_object (_tmp87_, "edit-pie-button");
	_tmp89_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp88_, gtk_button_get_type ()) ? ((GtkButton*) _tmp88_) : NULL);
	_g_object_unref0 (self->priv->edit_pie_button);
	self->priv->edit_pie_button = _tmp89_;
	_tmp90_ = self->priv->edit_pie_button;
	g_signal_connect_object (_tmp90_, "clicked", (GCallback) _gnome_pie_preferences_window_on_edit_pie_button_clicked_gtk_button_clicked, self, 0);
	_tmp91_ = builder;
	_tmp92_ = gtk_builder_get_object (_tmp91_, "add-pie-button");
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_TYPE (_tmp92_, gtk_button_get_type ()) ? ((GtkButton*) _tmp92_) : NULL, "clicked", (GCallback) _gnome_pie_preferences_window_on_add_pie_button_clicked_gtk_button_clicked, self, 0);
	_tmp93_ = gnome_pie_theme_list_new ();
	g_object_ref_sink (_tmp93_);
	_g_object_unref0 (self->priv->theme_list);
	self->priv->theme_list = _tmp93_;
	_tmp94_ = self->priv->theme_list;
	g_signal_connect_object (_tmp94_, "on-select-new", (GCallback) ___lambda79__gnome_pie_theme_list_on_select_new, self, 0);
	_tmp95_ = builder;
	_tmp96_ = gtk_builder_get_object (_tmp95_, "theme-scrolledwindow");
	_tmp97_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp96_, gtk_scrolled_window_get_type ()) ? ((GtkScrolledWindow*) _tmp96_) : NULL);
	_g_object_unref0 (scroll_area);
	scroll_area = _tmp97_;
	_tmp98_ = scroll_area;
	_tmp99_ = self->priv->theme_list;
	gtk_container_add ((GtkContainer*) _tmp98_, (GtkWidget*) _tmp99_);
	_tmp100_ = builder;
	_tmp101_ = gtk_builder_get_object (_tmp100_, "theme-help-button");
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_TYPE (_tmp101_, gtk_button_get_type ()) ? ((GtkButton*) _tmp101_) : NULL, "clicked", (GCallback) ___lambda80__gtk_button_clicked, self, 0);
	_tmp102_ = builder;
	_tmp103_ = gtk_builder_get_object (_tmp102_, "theme-export-button");
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_TYPE (_tmp103_, gtk_button_get_type ()) ? ((GtkButton*) _tmp103_) : NULL, "clicked", (GCallback) _gnome_pie_preferences_window_on_export_theme_button_clicked_gtk_button_clicked, self, 0);
	_tmp104_ = builder;
	_tmp105_ = gtk_builder_get_object (_tmp104_, "theme-import-button");
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_TYPE (_tmp105_, gtk_button_get_type ()) ? ((GtkButton*) _tmp105_) : NULL, "clicked", (GCallback) _gnome_pie_preferences_window_on_import_theme_button_clicked_gtk_button_clicked, self, 0);
	_tmp106_ = builder;
	_tmp107_ = gtk_builder_get_object (_tmp106_, "theme-reload-button");
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_TYPE (_tmp107_, gtk_button_get_type ()) ? ((GtkButton*) _tmp107_) : NULL, "clicked", (GCallback) _gnome_pie_preferences_window_on_reload_theme_button_clicked_gtk_button_clicked, self, 0);
	_tmp108_ = builder;
	_tmp109_ = gtk_builder_get_object (_tmp108_, "theme-open-button");
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_TYPE (_tmp109_, gtk_button_get_type ()) ? ((GtkButton*) _tmp109_) : NULL, "clicked", (GCallback) _gnome_pie_preferences_window_on_open_theme_button_clicked_gtk_button_clicked, self, 0);
	_tmp110_ = builder;
	_tmp111_ = gtk_builder_get_object (_tmp110_, "theme-delete-button");
	_tmp112_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp111_, gtk_button_get_type ()) ? ((GtkButton*) _tmp111_) : NULL);
	_g_object_unref0 (self->priv->theme_delete_button);
	self->priv->theme_delete_button = _tmp112_;
	_tmp113_ = self->priv->theme_delete_button;
	g_signal_connect_object (_tmp113_, "clicked", (GCallback) _gnome_pie_preferences_window_on_delete_theme_button_clicked_gtk_button_clicked, self, 0);
	_tmp114_ = builder;
	_tmp115_ = gtk_builder_get_object (_tmp114_, "autostart-checkbox");
	_tmp116_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp115_, gtk_toggle_button_get_type ()) ? ((GtkToggleButton*) _tmp115_) : NULL);
	_g_object_unref0 (self->priv->autostart);
	self->priv->autostart = _tmp116_;
	_tmp117_ = self->priv->autostart;
	g_signal_connect_object (_tmp117_, "toggled", (GCallback) _gnome_pie_preferences_window_on_autostart_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp118_ = builder;
	_tmp119_ = gtk_builder_get_object (_tmp118_, "indicator-checkbox");
	_tmp120_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp119_, gtk_toggle_button_get_type ()) ? ((GtkToggleButton*) _tmp119_) : NULL);
	_g_object_unref0 (self->priv->indicator);
	self->priv->indicator = _tmp120_;
	_tmp121_ = self->priv->indicator;
	g_signal_connect_object (_tmp121_, "toggled", (GCallback) _gnome_pie_preferences_window_on_indicator_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp122_ = builder;
	_tmp123_ = gtk_builder_get_object (_tmp122_, "select-by-string-checkbox");
	_tmp124_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp123_, gtk_toggle_button_get_type ()) ? ((GtkToggleButton*) _tmp123_) : NULL);
	_g_object_unref0 (self->priv->search_by_string);
	self->priv->search_by_string = _tmp124_;
	_tmp125_ = self->priv->search_by_string;
	g_signal_connect_object (_tmp125_, "toggled", (GCallback) _gnome_pie_preferences_window_on_search_by_string_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp126_ = builder;
	_tmp127_ = gtk_builder_get_object (_tmp126_, "captions-checkbox");
	_tmp128_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp127_, gtk_toggle_button_get_type ()) ? ((GtkToggleButton*) _tmp127_) : NULL);
	_g_object_unref0 (self->priv->captions);
	self->priv->captions = _tmp128_;
	_tmp129_ = self->priv->captions;
	g_signal_connect_object (_tmp129_, "toggled", (GCallback) _gnome_pie_preferences_window_on_captions_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp130_ = builder;
	_tmp131_ = gtk_builder_get_object (_tmp130_, "scale-hscale");
	_tmp132_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp131_, gtk_scale_get_type ()) ? ((GtkScale*) _tmp131_) : NULL);
	_data12_->scale_slider = _tmp132_;
	gtk_range_set_range ((GtkRange*) _data12_->scale_slider, 0.5, 2.0);
	gtk_range_set_increments ((GtkRange*) _data12_->scale_slider, 0.05, 0.25);
	_tmp133_ = gnome_pie_config_get_global ();
	_tmp134_ = _tmp133_;
	_tmp135_ = gnome_pie_config_get_global_scale (_tmp134_);
	_tmp136_ = _tmp135_;
	gtk_range_set_value ((GtkRange*) _data12_->scale_slider, _tmp136_);
	_data12_->changing = FALSE;
	_data12_->changed_again = FALSE;
	g_signal_connect_data ((GtkRange*) _data12_->scale_slider, "value-changed", (GCallback) ___lambda84__gtk_range_value_changed, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
	_tmp137_ = builder;
	_tmp138_ = gtk_builder_get_object (_tmp137_, "range-hscale");
	_tmp139_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp138_, gtk_scale_get_type ()) ? ((GtkScale*) _tmp138_) : NULL);
	_data12_->range_slider = _tmp139_;
	gtk_range_set_range ((GtkRange*) _data12_->range_slider, (gdouble) 0, (gdouble) 2000);
	gtk_range_set_increments ((GtkRange*) _data12_->range_slider, (gdouble) 10, (gdouble) 100);
	_tmp140_ = gnome_pie_config_get_global ();
	_tmp141_ = _tmp140_;
	_tmp142_ = gnome_pie_config_get_activation_range (_tmp141_);
	_tmp143_ = _tmp142_;
	gtk_range_set_value ((GtkRange*) _data12_->range_slider, (gdouble) _tmp143_);
	g_signal_connect_data ((GtkRange*) _data12_->range_slider, "value-changed", (GCallback) ___lambda86__gtk_range_value_changed, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
	_tmp144_ = builder;
	_tmp145_ = gtk_builder_get_object (_tmp144_, "range-slices");
	_tmp146_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp145_, gtk_scale_get_type ()) ? ((GtkScale*) _tmp145_) : NULL);
	_data12_->range_slices = _tmp146_;
	gtk_range_set_range ((GtkRange*) _data12_->range_slices, (gdouble) 12, (gdouble) 96);
	gtk_range_set_increments ((GtkRange*) _data12_->range_slices, (gdouble) 4, (gdouble) 12);
	_tmp147_ = gnome_pie_config_get_global ();
	_tmp148_ = _tmp147_;
	_tmp149_ = gnome_pie_config_get_max_visible_slices (_tmp148_);
	_tmp150_ = _tmp149_;
	gtk_range_set_value ((GtkRange*) _data12_->range_slices, (gdouble) _tmp150_);
	g_signal_connect_data ((GtkRange*) _data12_->range_slices, "value-changed", (GCallback) ___lambda87__gtk_range_value_changed, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
	_tmp151_ = builder;
	_tmp152_ = gtk_builder_get_object (_tmp151_, "info-box");
	_tmp153_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp152_, gtk_box_get_type ()) ? ((GtkBox*) _tmp152_) : NULL);
	info_box = _tmp153_;
	_tmp154_ = g_strdup (_ ("Pies can be opened with the terminal command \"gnome-pie --open=ID\"."));
	_tmp155_ = g_strdup_printf (_ ("Feel free to visit Gnome-Pie's homepage at %s!"), "<a href='http://schneegans.github.io/gnome-pie.html'>gnome-pie.simonsc" \
"hneegans.de</a>");
	_tmp156_ = g_strdup_printf (_ ("If you want to give some feedback, please write an e-mail to %s!"), "<a href='mailto:code@simonschneegans.de'>code@simonschneegans.de</a>");
	_tmp157_ = g_strdup_printf (_ ("You can support the development of Gnome-Pie by donating via %s."), "<a href='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hoste" \
"d_button_id=X65SUVC4ZTQSC'>Paypal</a>");
	_tmp158_ = g_strdup_printf (_ ("Translating Gnome-Pie to your language is easy. Translations are manag" \
"ed at %s."), "<a href='https://translate.zanata.org/zanata/iteration/view/gnome-pie/" \
"develop'>Zanata</a>");
	_tmp159_ = g_strdup_printf (_ ("It's easy to create new themes for Gnome-Pie. Read the <a href='%s'>Tu" \
"torial</a> online."), "http://schneegans.github.io/lessons/2015/04/26/themes-for-gnome-pie/");
	_tmp160_ = g_strdup (_ ("It's usually a good practice to have at most twelve slices per pie."));
	_tmp161_ = g_strdup (_ ("You can export themes you created and share them with the community!"));
	_tmp162_ = g_strdup_printf (_ ("The source code of Gnome-Pie is available on %s."), "<a href='https://github.com/schneegans/Gnome-Pie'>Github</a>");
	_tmp163_ = g_strdup_printf (_ ("Bugs can be reported at %s!"), "<a href='https://github.com/schneegans/gnome-pie/issues'>Github</a>");
	_tmp164_ = g_strdup_printf (_ ("Suggestions can be posted on %s!"), "<a href='https://github.com/schneegans/gnome-pie/issues'>Github</a>");
	_tmp165_ = g_strdup_printf (_ ("An awesome companion of Gnome-Pie is %s. It will make using your compu" \
"ter feel like magic!"), "<a href='https://github.com/thjaeger/easystroke/wiki'>Easystroke</a>");
	_tmp166_ = g_strdup (_ ("You can drag'n'drop applications from your main menu to the pie above."));
	_tmp167_ = g_strdup (_ ("You may drag'n'drop URLs and bookmarks from your internet browser to t" \
"he pie above."));
	_tmp168_ = g_strdup (_ ("You can drag'n'drop files and folders from your file browser to the pi" \
"e above."));
	_tmp169_ = g_strdup (_ ("You can drag'n'drop pies from the list on the left into other pies in " \
"order to create sub-pies."));
	_tmp170_ = g_strdup (_ ("You can drag'n'drop pies from the list on the left to your desktop or " \
"dock to create a launcher for this pie."));
	_tmp171_ = g_new0 (gchar*, 17 + 1);
	_tmp171_[0] = _tmp154_;
	_tmp171_[1] = _tmp155_;
	_tmp171_[2] = _tmp156_;
	_tmp171_[3] = _tmp157_;
	_tmp171_[4] = _tmp158_;
	_tmp171_[5] = _tmp159_;
	_tmp171_[6] = _tmp160_;
	_tmp171_[7] = _tmp161_;
	_tmp171_[8] = _tmp162_;
	_tmp171_[9] = _tmp163_;
	_tmp171_[10] = _tmp164_;
	_tmp171_[11] = _tmp165_;
	_tmp171_[12] = _tmp166_;
	_tmp171_[13] = _tmp167_;
	_tmp171_[14] = _tmp168_;
	_tmp171_[15] = _tmp169_;
	_tmp171_[16] = _tmp170_;
	_tmp172_ = _tmp171_;
	_tmp172__length1 = 17;
	_tmp173_ = gnome_pie_tip_viewer_new (_tmp172_, 17);
	g_object_ref_sink (_tmp173_);
	_tmp174_ = _tmp173_;
	_tmp172_ = (_vala_array_free (_tmp172_, _tmp172__length1, (GDestroyNotify) g_free), NULL);
	info_label = _tmp174_;
	_tmp175_ = self->priv->window;
	g_signal_connect_object ((GtkWidget*) _tmp175_, "show", (GCallback) _gnome_pie_tip_viewer_start_slide_show_gtk_widget_show, info_label, 0);
	_tmp176_ = self->priv->window;
	g_signal_connect_object ((GtkWidget*) _tmp176_, "hide", (GCallback) _gnome_pie_tip_viewer_stop_slide_show_gtk_widget_hide, info_label, 0);
	gtk_box_pack_end (info_box, (GtkWidget*) info_label, TRUE, TRUE, (guint) 0);
	_tmp177_ = self->priv->window;
	g_signal_connect_object ((GtkWidget*) _tmp177_, "hide", (GCallback) ___lambda92__gtk_widget_hide, self, 0);
	_tmp178_ = self->priv->window;
	_tmp179_ = self->priv->window;
	g_signal_connect_object ((GtkWidget*) _tmp178_, "delete-event", (GCallback) _gtk_widget_hide_on_delete_gtk_widget_delete_event, (GtkWidget*) _tmp179_, 0);
	_g_object_unref0 (info_label);
	_g_object_unref0 (info_box);
	_g_object_unref0 (scroll_area);
	_g_object_unref0 (builder);
	block12_data_unref (_data12_);
	_data12_ = NULL;
	return self;
}

GnomePiePreferencesWindow*
gnome_pie_preferences_window_new (void)
{
	return gnome_pie_preferences_window_construct (GNOME_PIE_TYPE_PREFERENCES_WINDOW);
}

void
gnome_pie_preferences_window_show (GnomePiePreferencesWindow* self)
{
	GnomePiePiePreview* _tmp0_;
	GtkWindow* _tmp1_;
	GnomePiePieList* _tmp2_;
	GtkToggleButton* _tmp3_;
	GnomePieConfig* _tmp4_;
	GnomePieConfig* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	GtkToggleButton* _tmp8_;
	GnomePieConfig* _tmp9_;
	GnomePieConfig* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	GtkToggleButton* _tmp13_;
	GnomePieConfig* _tmp14_;
	GnomePieConfig* _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	GtkToggleButton* _tmp18_;
	GnomePieConfig* _tmp19_;
	GnomePieConfig* _tmp20_;
	gboolean _tmp21_;
	gboolean _tmp22_;
	GnomePieConfig* _tmp23_;
	GnomePieConfig* _tmp24_;
	GnomePieTheme* _tmp25_;
	GnomePieTheme* _tmp26_;
	gboolean _tmp27_;
	gboolean _tmp28_;
	GnomePieConfig* _tmp31_;
	GnomePieConfig* _tmp32_;
	GnomePieTheme* _tmp33_;
	GnomePieTheme* _tmp34_;
	GnomePiePieList* _tmp39_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->preview;
	gnome_pie_pie_preview_draw_loop (_tmp0_);
	_tmp1_ = self->priv->window;
	gtk_widget_show_all ((GtkWidget*) _tmp1_);
	_tmp2_ = self->priv->pie_list;
	gnome_pie_pie_list_select_first (_tmp2_);
	_tmp3_ = self->priv->indicator;
	_tmp4_ = gnome_pie_config_get_global ();
	_tmp5_ = _tmp4_;
	_tmp6_ = gnome_pie_config_get_show_indicator (_tmp5_);
	_tmp7_ = _tmp6_;
	gtk_toggle_button_set_active (_tmp3_, _tmp7_);
	_tmp8_ = self->priv->autostart;
	_tmp9_ = gnome_pie_config_get_global ();
	_tmp10_ = _tmp9_;
	_tmp11_ = gnome_pie_config_get_auto_start (_tmp10_);
	_tmp12_ = _tmp11_;
	gtk_toggle_button_set_active (_tmp8_, _tmp12_);
	_tmp13_ = self->priv->captions;
	_tmp14_ = gnome_pie_config_get_global ();
	_tmp15_ = _tmp14_;
	_tmp16_ = gnome_pie_config_get_show_captions (_tmp15_);
	_tmp17_ = _tmp16_;
	gtk_toggle_button_set_active (_tmp13_, _tmp17_);
	_tmp18_ = self->priv->search_by_string;
	_tmp19_ = gnome_pie_config_get_global ();
	_tmp20_ = _tmp19_;
	_tmp21_ = gnome_pie_config_get_search_by_string (_tmp20_);
	_tmp22_ = _tmp21_;
	gtk_toggle_button_set_active (_tmp18_, _tmp22_);
	_tmp23_ = gnome_pie_config_get_global ();
	_tmp24_ = _tmp23_;
	_tmp25_ = gnome_pie_config_get_theme (_tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = gnome_pie_theme_get_has_slice_captions (_tmp26_);
	_tmp28_ = _tmp27_;
	if (_tmp28_) {
		GtkToggleButton* _tmp29_;
		_tmp29_ = self->priv->captions;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp29_, TRUE);
	} else {
		GtkToggleButton* _tmp30_;
		_tmp30_ = self->priv->captions;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp30_, FALSE);
	}
	_tmp31_ = gnome_pie_config_get_global ();
	_tmp32_ = _tmp31_;
	_tmp33_ = gnome_pie_config_get_theme (_tmp32_);
	_tmp34_ = _tmp33_;
	if (gnome_pie_theme_is_local (_tmp34_)) {
		GtkButton* _tmp35_;
		_tmp35_ = self->priv->theme_delete_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp35_, TRUE);
	} else {
		GtkButton* _tmp36_;
		_tmp36_ = self->priv->theme_delete_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp36_, FALSE);
	}
	if (!gnome_pie_daemon_disable_stack_switcher) {
		GtkStack* _tmp37_;
		_tmp37_ = self->priv->stack;
		gtk_stack_set_visible_child_full (_tmp37_, "2", GTK_STACK_TRANSITION_TYPE_NONE);
	} else {
		GtkNotebook* _tmp38_;
		_tmp38_ = self->priv->notebook;
		gtk_notebook_set_current_page (_tmp38_, 1);
	}
	_tmp39_ = self->priv->pie_list;
	g_object_set ((GtkWidget*) _tmp39_, "has-focus", TRUE, NULL);
}

static void
gnome_pie_preferences_window_on_autostart_toggled (GnomePiePreferencesWindow* self,
                                                   GtkToggleButton* check_box)
{
	gboolean active = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_ = FALSE;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (check_box != NULL);
	_tmp0_ = gtk_toggle_button_get_active (check_box);
	_tmp1_ = _tmp0_;
	active = _tmp1_;
	if (!active) {
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = gnome_pie_paths_get_autostart ();
		_tmp4_ = _tmp3_;
		_tmp2_ = g_file_test (_tmp4_, G_FILE_TEST_EXISTS);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GnomePieConfig* _tmp5_;
		GnomePieConfig* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp5_ = gnome_pie_config_get_global ();
		_tmp6_ = _tmp5_;
		gnome_pie_config_set_auto_start (_tmp6_, FALSE);
		_tmp7_ = gnome_pie_paths_get_autostart ();
		_tmp8_ = _tmp7_;
		g_remove (_tmp8_);
	} else {
		gboolean _tmp9_ = FALSE;
		if (active) {
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			_tmp10_ = gnome_pie_paths_get_autostart ();
			_tmp11_ = _tmp10_;
			_tmp9_ = !g_file_test (_tmp11_, G_FILE_TEST_EXISTS);
		} else {
			_tmp9_ = FALSE;
		}
		if (_tmp9_) {
			GnomePieConfig* _tmp12_;
			GnomePieConfig* _tmp13_;
			gchar* autostart_entry = NULL;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			gchar* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
			gchar* autostart_dir = NULL;
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			gchar* _tmp30_;
			const gchar* _tmp31_;
			_tmp12_ = gnome_pie_config_get_global ();
			_tmp13_ = _tmp12_;
			gnome_pie_config_set_auto_start (_tmp13_, TRUE);
			_tmp14_ = gnome_pie_paths_get_executable ();
			_tmp15_ = _tmp14_;
			_tmp16_ = g_strconcat ("#!/usr/bin/env xdg-open\n" "[Desktop Entry]\n" "Name=Gnome-Pie\n" "Exec=", _tmp15_, NULL);
			_tmp17_ = _tmp16_;
			_tmp18_ = g_strconcat (_tmp17_, "\n", NULL);
			_tmp19_ = _tmp18_;
			_tmp20_ = g_strconcat (_tmp19_, "Encoding=UTF-8\n", NULL);
			_tmp21_ = _tmp20_;
			_tmp22_ = g_strconcat (_tmp21_, "Type=Application\n", NULL);
			_tmp23_ = _tmp22_;
			_tmp24_ = g_strconcat (_tmp23_, "X-GNOME-Autostart-enabled=true\n", NULL);
			_tmp25_ = _tmp24_;
			_tmp26_ = g_strconcat (_tmp25_, "Icon=gnome-pie\n", NULL);
			_tmp27_ = _tmp26_;
			_g_free0 (_tmp25_);
			_g_free0 (_tmp23_);
			_g_free0 (_tmp21_);
			_g_free0 (_tmp19_);
			_g_free0 (_tmp17_);
			autostart_entry = _tmp27_;
			_tmp28_ = gnome_pie_paths_get_autostart ();
			_tmp29_ = _tmp28_;
			_tmp30_ = g_path_get_dirname (_tmp29_);
			autostart_dir = _tmp30_;
			_tmp31_ = autostart_dir;
			if (!g_file_test (_tmp31_, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
				const gchar* _tmp32_;
				_tmp32_ = autostart_dir;
				g_mkdir_with_parents (_tmp32_, 0755);
			}
			{
				const gchar* _tmp33_;
				const gchar* _tmp34_;
				const gchar* _tmp35_;
				const gchar* _tmp36_;
				const gchar* _tmp37_;
				_tmp33_ = gnome_pie_paths_get_autostart ();
				_tmp34_ = _tmp33_;
				_tmp35_ = autostart_entry;
				g_file_set_contents (_tmp34_, _tmp35_, (gssize) -1, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
				_tmp36_ = gnome_pie_paths_get_autostart ();
				_tmp37_ = _tmp36_;
				g_chmod (_tmp37_, 0755);
			}
			goto __finally0;
			__catch0_g_error:
			{
				GError* e = NULL;
				GtkMessageDialog* d = NULL;
				GtkWindow* _tmp38_;
				GError* _tmp39_;
				const gchar* _tmp40_;
				GtkMessageDialog* _tmp41_;
				GtkMessageDialog* _tmp42_;
				GtkMessageDialog* _tmp43_;
				e = _inner_error0_;
				_inner_error0_ = NULL;
				_tmp38_ = self->priv->window;
				_tmp39_ = e;
				_tmp40_ = _tmp39_->message;
				_tmp41_ = (GtkMessageDialog*) gtk_message_dialog_new (_tmp38_, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _tmp40_);
				g_object_ref_sink (_tmp41_);
				d = _tmp41_;
				_tmp42_ = d;
				gtk_dialog_run ((GtkDialog*) _tmp42_);
				_tmp43_ = d;
				gtk_widget_destroy ((GtkWidget*) _tmp43_);
				_g_object_unref0 (d);
				_g_error_free0 (e);
			}
			__finally0:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_free0 (autostart_dir);
				_g_free0 (autostart_entry);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return;
			}
			_g_free0 (autostart_dir);
			_g_free0 (autostart_entry);
		}
	}
}

static Block13Data*
block13_data_ref (Block13Data* _data13_)
{
	g_atomic_int_inc (&_data13_->_ref_count_);
	return _data13_;
}

static void
block13_data_unref (void * _userdata_)
{
	Block13Data* _data13_;
	_data13_ = (Block13Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data13_->_ref_count_)) {
		GnomePiePreferencesWindow* self;
		self = _data13_->self;
		_g_object_unref0 (_data13_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block13Data, _data13_);
	}
}

static void
__lambda81_ (Block13Data* _data13_,
             GtkDialog* d,
             gint _result_)
{
	GnomePiePreferencesWindow* self;
	self = _data13_->self;
	g_return_if_fail (d != NULL);
	if (_result_ == ((gint) GTK_RESPONSE_ACCEPT)) {
		gchar* file = NULL;
		gchar* _tmp0_;
		const gchar* _tmp1_;
		GnomePieConfig* _tmp4_;
		GnomePieConfig* _tmp5_;
		GnomePieTheme* _tmp6_;
		GnomePieTheme* _tmp7_;
		const gchar* _tmp8_;
		_tmp0_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _data13_->dialog);
		file = _tmp0_;
		_tmp1_ = file;
		if (!g_str_has_suffix (_tmp1_, ".tar.gz")) {
			const gchar* _tmp2_;
			gchar* _tmp3_;
			_tmp2_ = file;
			_tmp3_ = g_strconcat (_tmp2_, ".tar.gz", NULL);
			_g_free0 (file);
			file = _tmp3_;
		}
		_tmp4_ = gnome_pie_config_get_global ();
		_tmp5_ = _tmp4_;
		_tmp6_ = gnome_pie_config_get_theme (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = file;
		gnome_pie_theme_export (_tmp7_, _tmp8_);
		_g_free0 (file);
	}
	gtk_widget_destroy ((GtkWidget*) _data13_->dialog);
}

static void
___lambda81__gtk_dialog_response (GtkDialog* _sender,
                                  gint response_id,
                                  gpointer self)
{
	__lambda81_ (self, _sender, response_id);
}

static void
gnome_pie_preferences_window_on_export_theme_button_clicked (GnomePiePreferencesWindow* self,
                                                             GtkButton* button)
{
	Block13Data* _data13_;
	GtkWindow* _tmp0_;
	GtkFileChooserDialog* _tmp1_;
	GtkFileFilter* _tmp2_;
	GtkFileFilter* _tmp3_;
	GtkFileFilter* _tmp4_;
	GtkFileFilter* _tmp5_;
	GnomePieConfig* _tmp6_;
	GnomePieConfig* _tmp7_;
	GnomePieTheme* _tmp8_;
	GnomePieTheme* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_data13_ = g_slice_new0 (Block13Data);
	_data13_->_ref_count_ = 1;
	_data13_->self = g_object_ref (self);
	_tmp0_ = self->priv->window;
	_tmp1_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new ("Pick a file", _tmp0_, GTK_FILE_CHOOSER_ACTION_SAVE, "_Cancel", GTK_RESPONSE_CANCEL, "_Save", GTK_RESPONSE_ACCEPT, NULL);
	g_object_ref_sink (_tmp1_);
	_data13_->dialog = _tmp1_;
	gtk_file_chooser_set_do_overwrite_confirmation ((GtkFileChooser*) _data13_->dialog, TRUE);
	gtk_window_set_modal ((GtkWindow*) _data13_->dialog, TRUE);
	_tmp2_ = gtk_file_filter_new ();
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	gtk_file_chooser_set_filter ((GtkFileChooser*) _data13_->dialog, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = gtk_file_chooser_get_filter ((GtkFileChooser*) _data13_->dialog);
	_tmp5_ = _tmp4_;
	gtk_file_filter_add_pattern (_tmp5_, "*.tar.gz");
	_tmp6_ = gnome_pie_config_get_global ();
	_tmp7_ = _tmp6_;
	_tmp8_ = gnome_pie_config_get_theme (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = gnome_pie_theme_get_name (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_strconcat (_tmp11_, ".tar.gz", NULL);
	_tmp13_ = _tmp12_;
	gtk_file_chooser_set_current_name ((GtkFileChooser*) _data13_->dialog, _tmp13_);
	_g_free0 (_tmp13_);
	g_signal_connect_data ((GtkDialog*) _data13_->dialog, "response", (GCallback) ___lambda81__gtk_dialog_response, block13_data_ref (_data13_), (GClosureNotify) block13_data_unref, 0);
	gtk_widget_show ((GtkWidget*) _data13_->dialog);
	block13_data_unref (_data13_);
	_data13_ = NULL;
}

static Block14Data*
block14_data_ref (Block14Data* _data14_)
{
	g_atomic_int_inc (&_data14_->_ref_count_);
	return _data14_;
}

static void
block14_data_unref (void * _userdata_)
{
	Block14Data* _data14_;
	_data14_ = (Block14Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data14_->_ref_count_)) {
		GnomePiePreferencesWindow* self;
		self = _data14_->self;
		_g_free0 (_data14_->message);
		_g_object_unref0 (_data14_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block14Data, _data14_);
	}
}

static void
__lambda82_ (Block14Data* _data14_,
             GtkDialog* d,
             gint r)
{
	GnomePiePreferencesWindow* self;
	self = _data14_->self;
	g_return_if_fail (d != NULL);
	if (r == ((gint) GTK_RESPONSE_ACCEPT)) {
		gchar* file = NULL;
		gchar* _tmp0_;
		GnomePieThemeImporter* a = NULL;
		GnomePieThemeImporter* _tmp1_;
		GnomePieThemeImporter* _tmp2_;
		const gchar* _tmp3_;
		GnomePieThemeImporter* _tmp28_;
		GtkMessageDialog* result_dialog = NULL;
		GtkMessageDialog* _tmp29_;
		GtkMessageDialog* _tmp30_;
		GtkMessageDialog* _tmp31_;
		_tmp0_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _data14_->dialog);
		file = _tmp0_;
		_tmp1_ = gnome_pie_theme_importer_new ();
		a = _tmp1_;
		_tmp2_ = a;
		_tmp3_ = file;
		if (gnome_pie_theme_importer_open (_tmp2_, _tmp3_)) {
			GnomePieThemeImporter* _tmp4_;
			_tmp4_ = a;
			if (_tmp4_->is_valid_theme) {
				GnomePieConfig* _tmp5_;
				GnomePieConfig* _tmp6_;
				GnomePieThemeImporter* _tmp7_;
				const gchar* _tmp8_;
				_tmp5_ = gnome_pie_config_get_global ();
				_tmp6_ = _tmp5_;
				_tmp7_ = a;
				_tmp8_ = _tmp7_->theme_name;
				if (!gnome_pie_config_has_theme (_tmp6_, _tmp8_)) {
					GnomePieThemeImporter* _tmp9_;
					const gchar* _tmp10_;
					const gchar* _tmp11_;
					gchar* _tmp12_;
					gchar* _tmp13_;
					GnomePieThemeImporter* _tmp14_;
					const gchar* _tmp15_;
					gchar* _tmp16_;
					gchar* _tmp17_;
					gboolean _tmp18_;
					_tmp9_ = a;
					_tmp10_ = gnome_pie_paths_get_local_themes ();
					_tmp11_ = _tmp10_;
					_tmp12_ = g_strconcat (_tmp11_, "/", NULL);
					_tmp13_ = _tmp12_;
					_tmp14_ = a;
					_tmp15_ = _tmp14_->theme_name;
					_tmp16_ = g_strconcat (_tmp13_, _tmp15_, NULL);
					_tmp17_ = _tmp16_;
					_tmp18_ = gnome_pie_archive_reader_extract_to ((GnomePieArchiveReader*) _tmp9_, _tmp17_);
					_g_free0 (_tmp17_);
					_g_free0 (_tmp13_);
					if (_tmp18_) {
						GnomePieConfig* _tmp19_;
						GnomePieConfig* _tmp20_;
						GnomePieThemeImporter* _tmp21_;
						const gchar* _tmp22_;
						GnomePieThemeList* _tmp23_;
						_tmp19_ = gnome_pie_config_get_global ();
						_tmp20_ = _tmp19_;
						_tmp21_ = a;
						_tmp22_ = _tmp21_->theme_name;
						gnome_pie_config_load_themes (_tmp20_, _tmp22_);
						_tmp23_ = self->priv->theme_list;
						gnome_pie_theme_list_reload (_tmp23_);
					} else {
						gchar* _tmp24_;
						_tmp24_ = g_strdup (_ ("An error occurred while importing the theme: Failed to extract theme!"));
						_g_free0 (_data14_->message);
						_data14_->message = _tmp24_;
						_data14_->_result_ = GTK_MESSAGE_ERROR;
					}
				} else {
					gchar* _tmp25_;
					_tmp25_ = g_strdup (_ ("An error occurred while importing the theme: A theme with this name do" \
"es already exist!"));
					_g_free0 (_data14_->message);
					_data14_->message = _tmp25_;
					_data14_->_result_ = GTK_MESSAGE_ERROR;
				}
			} else {
				gchar* _tmp26_;
				_tmp26_ = g_strdup (_ ("An error occurred while importing the theme: Theme archive does not co" \
"ntain a valid theme!"));
				_g_free0 (_data14_->message);
				_data14_->message = _tmp26_;
				_data14_->_result_ = GTK_MESSAGE_ERROR;
			}
		} else {
			gchar* _tmp27_;
			_tmp27_ = g_strdup (_ ("An error occurred while importing the theme: Failed to open theme arch" \
"ive!"));
			_g_free0 (_data14_->message);
			_data14_->message = _tmp27_;
			_data14_->_result_ = GTK_MESSAGE_ERROR;
		}
		_tmp28_ = a;
		gnome_pie_archive_reader_close ((GnomePieArchiveReader*) _tmp28_);
		_tmp29_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, _data14_->_result_, GTK_BUTTONS_CLOSE, "%s", _data14_->message);
		g_object_ref_sink (_tmp29_);
		result_dialog = _tmp29_;
		_tmp30_ = result_dialog;
		gtk_dialog_run ((GtkDialog*) _tmp30_);
		_tmp31_ = result_dialog;
		gtk_widget_destroy ((GtkWidget*) _tmp31_);
		_g_object_unref0 (result_dialog);
		_g_object_unref0 (a);
		_g_free0 (file);
	}
	gtk_widget_destroy ((GtkWidget*) _data14_->dialog);
}

static void
___lambda82__gtk_dialog_response (GtkDialog* _sender,
                                  gint response_id,
                                  gpointer self)
{
	__lambda82_ (self, _sender, response_id);
}

static void
gnome_pie_preferences_window_on_import_theme_button_clicked (GnomePiePreferencesWindow* self,
                                                             GtkButton* button)
{
	Block14Data* _data14_;
	GtkWindow* _tmp0_;
	GtkFileChooserDialog* _tmp1_;
	GtkFileFilter* _tmp2_;
	GtkFileFilter* _tmp3_;
	GtkFileFilter* _tmp4_;
	GtkFileFilter* _tmp5_;
	gchar* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_data14_ = g_slice_new0 (Block14Data);
	_data14_->_ref_count_ = 1;
	_data14_->self = g_object_ref (self);
	_tmp0_ = self->priv->window;
	_tmp1_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new ("Pick a file", _tmp0_, GTK_FILE_CHOOSER_ACTION_OPEN, "_Cancel", GTK_RESPONSE_CANCEL, "_Open", GTK_RESPONSE_ACCEPT, NULL);
	g_object_ref_sink (_tmp1_);
	_data14_->dialog = _tmp1_;
	gtk_window_set_modal ((GtkWindow*) _data14_->dialog, TRUE);
	_tmp2_ = gtk_file_filter_new ();
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	gtk_file_chooser_set_filter ((GtkFileChooser*) _data14_->dialog, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = gtk_file_chooser_get_filter ((GtkFileChooser*) _data14_->dialog);
	_tmp5_ = _tmp4_;
	gtk_file_filter_add_pattern (_tmp5_, "*.tar.gz");
	_data14_->_result_ = GTK_MESSAGE_INFO;
	_tmp6_ = g_strdup (_ ("Successfully imported new theme!"));
	_data14_->message = _tmp6_;
	g_signal_connect_data ((GtkDialog*) _data14_->dialog, "response", (GCallback) ___lambda82__gtk_dialog_response, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	gtk_widget_show ((GtkWidget*) _data14_->dialog);
	block14_data_unref (_data14_);
	_data14_ = NULL;
}

static void
__lambda83_ (GnomePiePreferencesWindow* self,
             gint response)
{
	if (response == ((gint) GTK_RESPONSE_YES)) {
		GnomePieConfig* _tmp0_;
		GnomePieConfig* _tmp1_;
		GnomePieTheme* _tmp2_;
		GnomePieTheme* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		GnomePieConfig* _tmp6_;
		GnomePieConfig* _tmp7_;
		GnomePieThemeList* _tmp8_;
		_tmp0_ = gnome_pie_config_get_global ();
		_tmp1_ = _tmp0_;
		_tmp2_ = gnome_pie_config_get_theme (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = gnome_pie_theme_get_directory (_tmp3_);
		_tmp5_ = _tmp4_;
		gnome_pie_paths_delete_directory (_tmp5_);
		_tmp6_ = gnome_pie_config_get_global ();
		_tmp7_ = _tmp6_;
		gnome_pie_config_load_themes (_tmp7_, "");
		_tmp8_ = self->priv->theme_list;
		gnome_pie_theme_list_reload (_tmp8_);
	}
}

static void
___lambda83__gtk_dialog_response (GtkDialog* _sender,
                                  gint response_id,
                                  gpointer self)
{
	__lambda83_ ((GnomePiePreferencesWindow*) self, response_id);
}

static void
gnome_pie_preferences_window_on_delete_theme_button_clicked (GnomePiePreferencesWindow* self,
                                                             GtkButton* button)
{
	GtkMessageDialog* dialog = NULL;
	GtkWindow* _tmp0_;
	GtkWidget* _tmp1_;
	GnomePieConfig* _tmp2_;
	GnomePieConfig* _tmp3_;
	GnomePieTheme* _tmp4_;
	GnomePieTheme* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	GtkMessageDialog* _tmp10_;
	GtkMessageDialog* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = self->priv->window;
	_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp0_);
	_tmp2_ = gnome_pie_config_get_global ();
	_tmp3_ = _tmp2_;
	_tmp4_ = gnome_pie_config_get_theme (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gnome_pie_theme_get_directory (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf (_ ("Do you really want to delete the selected theme from %s?"), _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = (GtkMessageDialog*) gtk_message_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_window_get_type (), GtkWindow), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", _tmp9_);
	g_object_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	_g_free0 (_tmp9_);
	dialog = _tmp11_;
	g_signal_connect_object ((GtkDialog*) dialog, "response", (GCallback) ___lambda83__gtk_dialog_response, self, 0);
	gtk_dialog_run ((GtkDialog*) dialog);
	gtk_widget_destroy ((GtkWidget*) dialog);
	_g_object_unref0 (dialog);
}

static void
gnome_pie_preferences_window_on_reload_theme_button_clicked (GnomePiePreferencesWindow* self,
                                                             GtkButton* button)
{
	GnomePieConfig* _tmp0_;
	GnomePieConfig* _tmp1_;
	GnomePieConfig* _tmp2_;
	GnomePieConfig* _tmp3_;
	GnomePieTheme* _tmp4_;
	GnomePieTheme* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GnomePieThemeList* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = gnome_pie_config_get_global ();
	_tmp1_ = _tmp0_;
	_tmp2_ = gnome_pie_config_get_global ();
	_tmp3_ = _tmp2_;
	_tmp4_ = gnome_pie_config_get_theme (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gnome_pie_theme_get_name (_tmp5_);
	_tmp7_ = _tmp6_;
	gnome_pie_config_load_themes (_tmp1_, _tmp7_);
	_tmp8_ = self->priv->theme_list;
	gnome_pie_theme_list_reload (_tmp8_);
}

static void
gnome_pie_preferences_window_on_open_theme_button_clicked (GnomePiePreferencesWindow* self,
                                                           GtkButton* button)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	{
		GnomePieConfig* _tmp0_;
		GnomePieConfig* _tmp1_;
		GnomePieTheme* _tmp2_;
		GnomePieTheme* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp0_ = gnome_pie_config_get_global ();
		_tmp1_ = _tmp0_;
		_tmp2_ = gnome_pie_config_get_theme (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = gnome_pie_theme_get_directory (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = g_strconcat ("file://", _tmp5_, NULL);
		_tmp7_ = _tmp6_;
		g_app_info_launch_default_for_uri (_tmp7_, NULL, &_inner_error0_);
		_g_free0 (_tmp7_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp8_;
		const gchar* _tmp9_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp8_ = e;
		_tmp9_ = _tmp8_->message;
		g_warning ("preferencesWindow.vala:488: %s", _tmp9_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
gnome_pie_preferences_window_on_indicator_toggled (GnomePiePreferencesWindow* self,
                                                   GtkToggleButton* check_box)
{
	GtkCheckButton* check = NULL;
	GtkCheckButton* _tmp0_;
	GnomePieConfig* _tmp1_;
	GnomePieConfig* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (check_box != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (check_box, gtk_check_button_get_type ()) ? ((GtkCheckButton*) check_box) : NULL);
	check = _tmp0_;
	_tmp1_ = gnome_pie_config_get_global ();
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_toggle_button_get_active ((GtkToggleButton*) check);
	_tmp4_ = _tmp3_;
	gnome_pie_config_set_show_indicator (_tmp2_, _tmp4_);
	_g_object_unref0 (check);
}

static void
gnome_pie_preferences_window_on_captions_toggled (GnomePiePreferencesWindow* self,
                                                  GtkToggleButton* check_box)
{
	GtkCheckButton* check = NULL;
	GtkCheckButton* _tmp0_;
	GnomePieConfig* _tmp1_;
	GnomePieConfig* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (check_box != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (check_box, gtk_check_button_get_type ()) ? ((GtkCheckButton*) check_box) : NULL);
	check = _tmp0_;
	_tmp1_ = gnome_pie_config_get_global ();
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_toggle_button_get_active ((GtkToggleButton*) check);
	_tmp4_ = _tmp3_;
	gnome_pie_config_set_show_captions (_tmp2_, _tmp4_);
	_g_object_unref0 (check);
}

static void
gnome_pie_preferences_window_on_search_by_string_toggled (GnomePiePreferencesWindow* self,
                                                          GtkToggleButton* check_box)
{
	GtkCheckButton* check = NULL;
	GtkCheckButton* _tmp0_;
	GnomePieConfig* _tmp1_;
	GnomePieConfig* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (check_box != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (check_box, gtk_check_button_get_type ()) ? ((GtkCheckButton*) check_box) : NULL);
	check = _tmp0_;
	_tmp1_ = gnome_pie_config_get_global ();
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_toggle_button_get_active ((GtkToggleButton*) check);
	_tmp4_ = _tmp3_;
	gnome_pie_config_set_search_by_string (_tmp2_, _tmp4_);
	_g_object_unref0 (check);
}

static void
gnome_pie_preferences_window_on_pie_select (GnomePiePreferencesWindow* self,
                                            const gchar* id)
{
	gchar* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkBox* _tmp3_;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (id != NULL);
	_tmp0_ = g_strdup (id);
	_g_free0 (self->priv->selected_id);
	self->priv->selected_id = _tmp0_;
	_tmp1_ = self->priv->no_slice_label;
	gtk_widget_hide ((GtkWidget*) _tmp1_);
	_tmp2_ = self->priv->no_pie_label;
	gtk_widget_hide ((GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->preview_box;
	gtk_widget_hide ((GtkWidget*) _tmp3_);
	_tmp4_ = self->priv->remove_pie_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, FALSE);
	_tmp5_ = self->priv->edit_pie_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, FALSE);
	if (g_strcmp0 (id, "") == 0) {
		GtkLabel* _tmp6_;
		_tmp6_ = self->priv->no_pie_label;
		gtk_widget_show ((GtkWidget*) _tmp6_);
	} else {
		GnomePiePie* pie = NULL;
		GeeHashMap* _tmp7_;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		gpointer _tmp10_;
		GnomePiePie* _tmp11_;
		_tmp7_ = gnome_pie_pie_manager_get_all_pies ();
		_tmp8_ = _tmp7_;
		_tmp9_ = self->priv->selected_id;
		_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, _tmp9_);
		pie = (GnomePiePie*) _tmp10_;
		_tmp11_ = pie;
		if (_tmp11_ != NULL) {
			GnomePiePiePreview* _tmp12_;
			GtkBox* _tmp13_;
			GnomePiePie* _tmp14_;
			GeeArrayList* _tmp15_;
			GeeArrayList* _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			GtkButton* _tmp20_;
			GtkButton* _tmp21_;
			_tmp12_ = self->priv->preview;
			gnome_pie_pie_preview_set_pie (_tmp12_, id);
			_tmp13_ = self->priv->preview_box;
			gtk_widget_show ((GtkWidget*) _tmp13_);
			_tmp14_ = pie;
			_tmp15_ = gnome_pie_pie_get_action_groups (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp16_);
			_tmp18_ = _tmp17_;
			if (_tmp18_ == 0) {
				GtkLabel* _tmp19_;
				_tmp19_ = self->priv->no_slice_label;
				gtk_widget_show ((GtkWidget*) _tmp19_);
			}
			_tmp20_ = self->priv->remove_pie_button;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp20_, TRUE);
			_tmp21_ = self->priv->edit_pie_button;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp21_, TRUE);
		}
		_g_object_unref0 (pie);
	}
}

static void
gnome_pie_preferences_window_on_add_pie_button_clicked (GnomePiePreferencesWindow* self,
                                                        GtkButton* button)
{
	GnomePiePie* new_pie = NULL;
	GnomePiePie* _tmp0_;
	GnomePiePieList* _tmp1_;
	GnomePiePieList* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = gnome_pie_pie_manager_create_persistent_pie (_ ("New Pie"), "stock_unknown", NULL, NULL);
	new_pie = _tmp0_;
	_tmp1_ = self->priv->pie_list;
	gnome_pie_pie_list_reload_all (_tmp1_);
	_tmp2_ = self->priv->pie_list;
	_tmp3_ = gnome_pie_pie_get_id (new_pie);
	_tmp4_ = _tmp3_;
	gnome_pie_pie_list_select (_tmp2_, _tmp4_);
	gnome_pie_preferences_window_on_edit_pie_button_clicked (self, NULL);
	_g_object_unref0 (new_pie);
}

static void
___lambda78_ (GnomePiePreferencesWindow* self,
              gint response)
{
	if (response == ((gint) GTK_RESPONSE_YES)) {
		const gchar* _tmp0_;
		GnomePiePieList* _tmp1_;
		GnomePiePieList* _tmp2_;
		_tmp0_ = self->priv->selected_id;
		gnome_pie_pie_manager_remove_pie (_tmp0_);
		_tmp1_ = self->priv->pie_list;
		gnome_pie_pie_list_reload_all (_tmp1_);
		_tmp2_ = self->priv->pie_list;
		gnome_pie_pie_list_select_first (_tmp2_);
	}
}

static void
____lambda78__gtk_dialog_response (GtkDialog* _sender,
                                   gint response_id,
                                   gpointer self)
{
	___lambda78_ ((GnomePiePreferencesWindow*) self, response_id);
}

static void
gnome_pie_preferences_window_on_remove_pie_button_clicked (GnomePiePreferencesWindow* self,
                                                           GtkButton* button)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = self->priv->selected_id;
	if (g_strcmp0 (_tmp0_, "") != 0) {
		GtkMessageDialog* dialog = NULL;
		GtkWindow* _tmp1_;
		GtkWidget* _tmp2_;
		GtkMessageDialog* _tmp3_;
		GtkMessageDialog* _tmp4_;
		GtkMessageDialog* _tmp5_;
		GtkMessageDialog* _tmp6_;
		_tmp1_ = self->priv->window;
		_tmp2_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp1_);
		_tmp3_ = (GtkMessageDialog*) gtk_message_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_window_get_type (), GtkWindow), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", _ ("Do you really want to delete the selected Pie with all contained Slice" \
"s?"));
		g_object_ref_sink (_tmp3_);
		dialog = _tmp3_;
		_tmp4_ = dialog;
		g_signal_connect_object ((GtkDialog*) _tmp4_, "response", (GCallback) ____lambda78__gtk_dialog_response, self, 0);
		_tmp5_ = dialog;
		gtk_dialog_run ((GtkDialog*) _tmp5_);
		_tmp6_ = dialog;
		gtk_widget_destroy ((GtkWidget*) _tmp6_);
		_g_object_unref0 (dialog);
	}
}

static void
___lambda75_ (GnomePiePreferencesWindow* self,
              GnomePieTrigger* trigger,
              const gchar* name,
              const gchar* icon)
{
	GnomePiePie* pie = NULL;
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	const gchar* _tmp2_;
	gpointer _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GnomePiePieList* _tmp7_;
	g_return_if_fail (trigger != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (icon != NULL);
	_tmp0_ = gnome_pie_pie_manager_get_all_pies ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->selected_id;
	_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, _tmp2_);
	pie = (GnomePiePie*) _tmp3_;
	gnome_pie_pie_set_name (pie, name);
	gnome_pie_pie_set_icon (pie, icon);
	_tmp4_ = self->priv->selected_id;
	gnome_pie_pie_manager_bind_trigger (trigger, _tmp4_);
	_tmp5_ = gnome_pie_pie_get_id (pie);
	_tmp6_ = _tmp5_;
	gnome_pie_pie_manager_create_launcher (_tmp6_);
	_tmp7_ = self->priv->pie_list;
	gnome_pie_pie_list_reload_all (_tmp7_);
	_g_object_unref0 (pie);
}

static void
____lambda75__gnome_pie_pie_options_window_on_ok (GnomePiePieOptionsWindow* _sender,
                                                  GnomePieTrigger* trigger,
                                                  const gchar* pie_name,
                                                  const gchar* icon_name,
                                                  gpointer self)
{
	___lambda75_ ((GnomePiePreferencesWindow*) self, trigger, pie_name, icon_name);
}

static void
gnome_pie_preferences_window_on_edit_pie_button_clicked (GnomePiePreferencesWindow* self,
                                                         GtkButton* button)
{
	GnomePiePieOptionsWindow* _tmp0_;
	GnomePiePieOptionsWindow* _tmp5_;
	const gchar* _tmp6_;
	GnomePiePieOptionsWindow* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->pie_options_window;
	if (_tmp0_ == NULL) {
		GnomePiePieOptionsWindow* _tmp1_;
		GnomePiePieOptionsWindow* _tmp2_;
		GtkWindow* _tmp3_;
		GnomePiePieOptionsWindow* _tmp4_;
		_tmp1_ = gnome_pie_pie_options_window_new ();
		_g_object_unref0 (self->priv->pie_options_window);
		self->priv->pie_options_window = _tmp1_;
		_tmp2_ = self->priv->pie_options_window;
		_tmp3_ = self->priv->window;
		gnome_pie_pie_options_window_set_parent (_tmp2_, _tmp3_);
		_tmp4_ = self->priv->pie_options_window;
		g_signal_connect_object (_tmp4_, "on-ok", (GCallback) ____lambda75__gnome_pie_pie_options_window_on_ok, self, 0);
	}
	_tmp5_ = self->priv->pie_options_window;
	_tmp6_ = self->priv->selected_id;
	gnome_pie_pie_options_window_set_pie (_tmp5_, _tmp6_);
	_tmp7_ = self->priv->pie_options_window;
	gnome_pie_pie_options_window_show (_tmp7_);
}

static void
gnome_pie_preferences_window_class_init (GnomePiePreferencesWindowClass * klass,
                                         gpointer klass_data)
{
	gnome_pie_preferences_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GnomePiePreferencesWindow_private_offset);
	G_OBJECT_CLASS (klass)->finalize = gnome_pie_preferences_window_finalize;
}

static void
gnome_pie_preferences_window_instance_init (GnomePiePreferencesWindow * self,
                                            gpointer klass)
{
	gchar* _tmp0_;
	self->priv = gnome_pie_preferences_window_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->selected_id = _tmp0_;
	self->priv->stack = NULL;
	self->priv->notebook = NULL;
	self->priv->window = NULL;
	self->priv->no_pie_label = NULL;
	self->priv->no_slice_label = NULL;
	self->priv->preview_box = NULL;
	self->priv->preview_background = NULL;
	self->priv->remove_pie_button = NULL;
	self->priv->edit_pie_button = NULL;
	self->priv->theme_delete_button = NULL;
	self->priv->theme_list = NULL;
	self->priv->indicator = NULL;
	self->priv->search_by_string = NULL;
	self->priv->autostart = NULL;
	self->priv->captions = NULL;
	self->priv->preview = NULL;
	self->priv->pie_list = NULL;
	self->priv->pie_options_window = NULL;
}

static void
gnome_pie_preferences_window_finalize (GObject * obj)
{
	GnomePiePreferencesWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_PIE_TYPE_PREFERENCES_WINDOW, GnomePiePreferencesWindow);
	_g_free0 (self->priv->selected_id);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->notebook);
	_g_object_unref0 (self->priv->window);
	_g_object_unref0 (self->priv->no_pie_label);
	_g_object_unref0 (self->priv->no_slice_label);
	_g_object_unref0 (self->priv->preview_box);
	_g_object_unref0 (self->priv->preview_background);
	_g_object_unref0 (self->priv->remove_pie_button);
	_g_object_unref0 (self->priv->edit_pie_button);
	_g_object_unref0 (self->priv->theme_delete_button);
	_g_object_unref0 (self->priv->theme_list);
	_g_object_unref0 (self->priv->indicator);
	_g_object_unref0 (self->priv->search_by_string);
	_g_object_unref0 (self->priv->autostart);
	_g_object_unref0 (self->priv->captions);
	_g_object_unref0 (self->priv->preview);
	_g_object_unref0 (self->priv->pie_list);
	_g_object_unref0 (self->priv->pie_options_window);
	G_OBJECT_CLASS (gnome_pie_preferences_window_parent_class)->finalize (obj);
}

static GType
gnome_pie_preferences_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GnomePiePreferencesWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gnome_pie_preferences_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnomePiePreferencesWindow), 0, (GInstanceInitFunc) gnome_pie_preferences_window_instance_init, NULL };
	GType gnome_pie_preferences_window_type_id;
	gnome_pie_preferences_window_type_id = g_type_register_static (G_TYPE_OBJECT, "GnomePiePreferencesWindow", &g_define_type_info, 0);
	GnomePiePreferencesWindow_private_offset = g_type_add_instance_private (gnome_pie_preferences_window_type_id, sizeof (GnomePiePreferencesWindowPrivate));
	return gnome_pie_preferences_window_type_id;
}

GType
gnome_pie_preferences_window_get_type (void)
{
	static volatile gsize gnome_pie_preferences_window_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_preferences_window_type_id__once)) {
		GType gnome_pie_preferences_window_type_id;
		gnome_pie_preferences_window_type_id = gnome_pie_preferences_window_get_type_once ();
		g_once_init_leave (&gnome_pie_preferences_window_type_id__once, gnome_pie_preferences_window_type_id);
	}
	return gnome_pie_preferences_window_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize 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,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

