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

/*
* Copyright (c) 2011–2018 elementary, Inc. (https://elementary.io)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
*/

#include "pantheon-desktop.h"
#include <gtk/gtk.h>
#include <switchboard.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <gee.h>
#include <glib-object.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>
#include <gmodule.h>

enum  {
	PANTHEON_SHELL_PLUG_0_PROPERTY,
	PANTHEON_SHELL_PLUG_NUM_PROPERTIES
};
static GParamSpec* pantheon_shell_plug_properties[PANTHEON_SHELL_PLUG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _PantheonShellPlugSearchData PantheonShellPlugSearchData;

struct _PantheonShellPlugPrivate {
	GtkStack* stack;
	GtkGrid* main_grid;
	PantheonShellWallpaper* wallpaper_view;
};

struct _PantheonShellPlugSearchData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PantheonShellPlug* self;
	gchar* search;
	GeeTreeMap* result;
	GeeTreeMap* search_results;
	GeeTreeMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	const gchar* _tmp49_;
	const gchar* _tmp50_;
	gchar* _tmp51_;
	gchar* _tmp52_;
	const gchar* _tmp53_;
	const gchar* _tmp54_;
	gchar* _tmp55_;
	gchar* _tmp56_;
	const gchar* _tmp57_;
	const gchar* _tmp58_;
	gchar* _tmp59_;
	gchar* _tmp60_;
	const gchar* _tmp61_;
	const gchar* _tmp62_;
	gchar* _tmp63_;
	gchar* _tmp64_;
	const gchar* _tmp65_;
	const gchar* _tmp66_;
	gchar* _tmp67_;
	gchar* _tmp68_;
};

static gint PantheonShellPlug_private_offset;
static gpointer pantheon_shell_plug_parent_class = NULL;

static GtkWidget* pantheon_shell_plug_real_get_widget (SwitchboardPlug* base);
static void pantheon_shell_plug_real_shown (SwitchboardPlug* base);
static void pantheon_shell_plug_real_hidden (SwitchboardPlug* base);
static void pantheon_shell_plug_real_search_callback (SwitchboardPlug* base,
                                               const gchar* location);
static void pantheon_shell_plug_real_search_data_free (gpointer _data);
static void pantheon_shell_plug_real_search (SwitchboardPlug* base,
                                      const gchar* search,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
static gboolean pantheon_shell_plug_real_search_co (PantheonShellPlugSearchData* _data_);
static void pantheon_shell_plug_finalize (GObject * obj);
static GType pantheon_shell_plug_get_type_once (void);

static inline gpointer
pantheon_shell_plug_get_instance_private (PantheonShellPlug* self)
{
	return G_STRUCT_MEMBER_P (self, PantheonShellPlug_private_offset);
}

PantheonShellPlug*
pantheon_shell_plug_construct (GType object_type)
{
	PantheonShellPlug * self = NULL;
	GeeTreeMap* settings = NULL;
	GeeTreeMap* _tmp0_;
	GtkCssProvider* provider = NULL;
	GtkCssProvider* _tmp1_;
	GdkScreen* _tmp2_;
	bindtextdomain (CONSTANTS_GETTEXT_PACKAGE, CONSTANTS_LOCALEDIR);
	bind_textdomain_codeset (CONSTANTS_GETTEXT_PACKAGE, "UTF-8");
	_tmp0_ = gee_tree_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	settings = _tmp0_;
	gee_abstract_map_set ((GeeAbstractMap*) settings, "desktop", NULL);
	gee_abstract_map_set ((GeeAbstractMap*) settings, "desktop/appearance/wallpaper", "wallpaper");
	gee_abstract_map_set ((GeeAbstractMap*) settings, "desktop/appearance", "appearance");
	gee_abstract_map_set ((GeeAbstractMap*) settings, "desktop/dock", "dock");
	gee_abstract_map_set ((GeeAbstractMap*) settings, "desktop/multitasking", "multitasking");
	gee_abstract_map_set ((GeeAbstractMap*) settings, "desktop/text", "text");
	_tmp1_ = gtk_css_provider_new ();
	provider = _tmp1_;
	gtk_css_provider_load_from_resource (provider, "/io/elementary/switchboard/plug/pantheon-shell/plug.css");
	_tmp2_ = gdk_screen_get_default ();
	gtk_style_context_add_provider_for_screen (_tmp2_, (GtkStyleProvider*) provider, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
	gee_abstract_map_set ((GeeAbstractMap*) settings, "desktop/wallpaper", "wallpaper");
	gee_abstract_map_set ((GeeAbstractMap*) settings, "desktop/hot-corners", "multitasking");
	self = (PantheonShellPlug*) g_object_new (object_type, "category", SWITCHBOARD_PLUG_CATEGORY_PERSONAL, "code-name", "io.elementary.switchboard.pantheon-shell", "display-name", _ ("Desktop"), "description", _ ("Configure the dock, hot corners, and change wallpaper"), "icon", "preferences-desktop-wallpaper", "supported-settings", settings, NULL);
	_g_object_unref0 (provider);
	_g_object_unref0 (settings);
	return self;
}

PantheonShellPlug*
pantheon_shell_plug_new (void)
{
	return pantheon_shell_plug_construct (PANTHEON_SHELL_TYPE_PLUG);
}

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

static GtkWidget*
pantheon_shell_plug_real_get_widget (SwitchboardPlug* base)
{
	PantheonShellPlug * self;
	GtkGrid* _tmp0_;
	GtkGrid* _tmp32_;
	GtkWidget* _tmp33_;
	GtkWidget* result;
	self = (PantheonShellPlug*) base;
	_tmp0_ = self->priv->main_grid;
	if (_tmp0_ == NULL) {
		GtkGrid* _tmp1_;
		PantheonShellWallpaper* _tmp2_;
		PantheonShellMultitasking* multitasking = NULL;
		PantheonShellMultitasking* _tmp3_;
		PantheonShellAppearance* appearance = NULL;
		PantheonShellAppearance* _tmp4_;
		PantheonShellText* text = NULL;
		PantheonShellText* _tmp5_;
		GtkStack* _tmp6_;
		GtkStack* _tmp7_;
		PantheonShellWallpaper* _tmp8_;
		GtkStack* _tmp9_;
		PantheonShellAppearance* _tmp10_;
		GtkStack* _tmp11_;
		PantheonShellText* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		gboolean _tmp15_;
		GtkStack* _tmp19_;
		PantheonShellMultitasking* _tmp20_;
		GtkStackSwitcher* stack_switcher = NULL;
		GtkStackSwitcher* _tmp21_;
		GtkStackSwitcher* _tmp22_;
		GtkStack* _tmp23_;
		GtkStackSwitcher* _tmp24_;
		GtkStackSwitcher* _tmp25_;
		GtkStackSwitcher* _tmp26_;
		GtkGrid* _tmp27_;
		GtkStackSwitcher* _tmp28_;
		GtkGrid* _tmp29_;
		GtkStack* _tmp30_;
		GtkGrid* _tmp31_;
		_tmp1_ = (GtkGrid*) gtk_grid_new ();
		g_object_ref_sink (_tmp1_);
		_g_object_unref0 (self->priv->main_grid);
		self->priv->main_grid = _tmp1_;
		_tmp2_ = pantheon_shell_wallpaper_new ((SwitchboardPlug*) self);
		g_object_ref_sink (_tmp2_);
		_g_object_unref0 (self->priv->wallpaper_view);
		self->priv->wallpaper_view = _tmp2_;
		_tmp3_ = pantheon_shell_multitasking_new ();
		g_object_ref_sink (_tmp3_);
		multitasking = _tmp3_;
		_tmp4_ = pantheon_shell_appearance_new ();
		g_object_ref_sink (_tmp4_);
		appearance = _tmp4_;
		_tmp5_ = pantheon_shell_text_new ();
		g_object_ref_sink (_tmp5_);
		text = _tmp5_;
		_tmp6_ = (GtkStack*) gtk_stack_new ();
		g_object_ref_sink (_tmp6_);
		_g_object_unref0 (self->priv->stack);
		self->priv->stack = _tmp6_;
		_tmp7_ = self->priv->stack;
		_tmp8_ = self->priv->wallpaper_view;
		gtk_stack_add_titled (_tmp7_, (GtkWidget*) _tmp8_, "wallpaper", _ ("Wallpaper"));
		_tmp9_ = self->priv->stack;
		_tmp10_ = appearance;
		gtk_stack_add_titled (_tmp9_, (GtkWidget*) _tmp10_, "appearance", _ ("Appearance"));
		_tmp11_ = self->priv->stack;
		_tmp12_ = text;
		gtk_stack_add_titled (_tmp11_, (GtkWidget*) _tmp12_, "text", _ ("Text"));
		_tmp13_ = g_find_program_in_path ("plank");
		_tmp14_ = _tmp13_;
		_tmp15_ = _tmp14_ != NULL;
		_g_free0 (_tmp14_);
		if (_tmp15_) {
			PantheonShellDock* dock = NULL;
			PantheonShellDock* _tmp16_;
			GtkStack* _tmp17_;
			PantheonShellDock* _tmp18_;
			_tmp16_ = pantheon_shell_dock_new ();
			g_object_ref_sink (_tmp16_);
			dock = _tmp16_;
			_tmp17_ = self->priv->stack;
			_tmp18_ = dock;
			gtk_stack_add_titled (_tmp17_, (GtkWidget*) _tmp18_, "dock", _ ("Dock & Panel"));
			_g_object_unref0 (dock);
		}
		_tmp19_ = self->priv->stack;
		_tmp20_ = multitasking;
		gtk_stack_add_titled (_tmp19_, (GtkWidget*) _tmp20_, "multitasking", _ ("Multitasking"));
		_tmp21_ = (GtkStackSwitcher*) gtk_stack_switcher_new ();
		g_object_ref_sink (_tmp21_);
		stack_switcher = _tmp21_;
		_tmp22_ = stack_switcher;
		_tmp23_ = self->priv->stack;
		gtk_stack_switcher_set_stack (_tmp22_, _tmp23_);
		_tmp24_ = stack_switcher;
		gtk_widget_set_halign ((GtkWidget*) _tmp24_, GTK_ALIGN_CENTER);
		_tmp25_ = stack_switcher;
		gtk_box_set_homogeneous ((GtkBox*) _tmp25_, TRUE);
		_tmp26_ = stack_switcher;
		g_object_set ((GtkWidget*) _tmp26_, "margin", 24, NULL);
		_tmp27_ = self->priv->main_grid;
		_tmp28_ = stack_switcher;
		gtk_grid_attach (_tmp27_, (GtkWidget*) _tmp28_, 0, 0, 1, 1);
		_tmp29_ = self->priv->main_grid;
		_tmp30_ = self->priv->stack;
		gtk_grid_attach (_tmp29_, (GtkWidget*) _tmp30_, 0, 1, 1, 1);
		_tmp31_ = self->priv->main_grid;
		gtk_widget_show_all ((GtkWidget*) _tmp31_);
		_g_object_unref0 (stack_switcher);
		_g_object_unref0 (text);
		_g_object_unref0 (appearance);
		_g_object_unref0 (multitasking);
	}
	_tmp32_ = self->priv->main_grid;
	_tmp33_ = _g_object_ref0 ((GtkWidget*) _tmp32_);
	result = _tmp33_;
	return result;
}

static void
pantheon_shell_plug_real_shown (SwitchboardPlug* base)
{
	PantheonShellPlug * self;
	PantheonShellWallpaper* _tmp0_;
	self = (PantheonShellPlug*) base;
	_tmp0_ = self->priv->wallpaper_view;
	pantheon_shell_wallpaper_update_wallpaper_folder (_tmp0_);
}

static void
pantheon_shell_plug_real_hidden (SwitchboardPlug* base)
{
	PantheonShellPlug * self;
	PantheonShellWallpaper* _tmp0_;
	self = (PantheonShellPlug*) base;
	_tmp0_ = self->priv->wallpaper_view;
	pantheon_shell_wallpaper_cancel_thumbnail_generation (_tmp0_);
}

static void
pantheon_shell_plug_real_search_callback (SwitchboardPlug* base,
                                          const gchar* location)
{
	PantheonShellPlug * self;
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	self = (PantheonShellPlug*) base;
	g_return_if_fail (location != NULL);
	_tmp0_ = location;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("wallpaper")))) {
		switch (0) {
			default:
			{
				GtkStack* _tmp3_;
				_tmp3_ = self->priv->stack;
				gtk_stack_set_visible_child_name (_tmp3_, "wallpaper");
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("appearance")))) {
		switch (0) {
			default:
			{
				GtkStack* _tmp4_;
				_tmp4_ = self->priv->stack;
				gtk_stack_set_visible_child_name (_tmp4_, "appearance");
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("dock")))) {
		switch (0) {
			default:
			{
				GtkStack* _tmp5_;
				_tmp5_ = self->priv->stack;
				gtk_stack_set_visible_child_name (_tmp5_, "dock");
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("text")))) {
		switch (0) {
			default:
			{
				GtkStack* _tmp6_;
				_tmp6_ = self->priv->stack;
				gtk_stack_set_visible_child_name (_tmp6_, "text");
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("multitasking")))) {
		switch (0) {
			default:
			{
				GtkStack* _tmp7_;
				_tmp7_ = self->priv->stack;
				gtk_stack_set_visible_child_name (_tmp7_, "multitasking");
				break;
			}
		}
	}
}

static void
pantheon_shell_plug_real_search_data_free (gpointer _data)
{
	PantheonShellPlugSearchData* _data_;
	_data_ = _data;
	_g_free0 (_data_->search);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (PantheonShellPlugSearchData, _data_);
}

static void
pantheon_shell_plug_real_search (SwitchboardPlug* base,
                                 const gchar* search,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	PantheonShellPlug * self;
	PantheonShellPlugSearchData* _data_;
	PantheonShellPlug* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (search != NULL);
	self = (PantheonShellPlug*) base;
	_data_ = g_slice_new0 (PantheonShellPlugSearchData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pantheon_shell_plug_real_search_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (search);
	_g_free0 (_data_->search);
	_data_->search = _tmp1_;
	pantheon_shell_plug_real_search_co (_data_);
}

static GeeTreeMap*
pantheon_shell_plug_search_finish (SwitchboardPlug* base,
                                   GAsyncResult* _res_)
{
	GeeTreeMap* result;
	PantheonShellPlugSearchData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static gboolean
pantheon_shell_plug_real_search_co (PantheonShellPlugSearchData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = gee_tree_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	_data_->search_results = _data_->_tmp0_;
	_data_->_tmp1_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = g_strdup_printf ("%s → %s", _data_->_tmp2_, _ ("Wallpaper"));
	_data_->_tmp4_ = _data_->_tmp3_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp4_, "wallpaper");
	_g_free0 (_data_->_tmp4_);
	_data_->_tmp5_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = g_strdup_printf ("%s → %s", _data_->_tmp6_, _ ("Dock & Panel"));
	_data_->_tmp8_ = _data_->_tmp7_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp8_, "dock");
	_g_free0 (_data_->_tmp8_);
	_data_->_tmp9_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp10_, _ ("Dock & Panel"), _ ("Hide Mode"));
	_data_->_tmp12_ = _data_->_tmp11_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp12_, "dock");
	_g_free0 (_data_->_tmp12_);
	_data_->_tmp13_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp14_, _ ("Dock & Panel"), _ ("Icon Size"));
	_data_->_tmp16_ = _data_->_tmp15_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp16_, "dock");
	_g_free0 (_data_->_tmp16_);
	_data_->_tmp17_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp18_, _ ("Dock & Panel"), _ ("Pressure reveal"));
	_data_->_tmp20_ = _data_->_tmp19_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp20_, "dock");
	_g_free0 (_data_->_tmp20_);
	_data_->_tmp21_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp22_ = _data_->_tmp21_;
	_data_->_tmp23_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp22_, _ ("Dock & Panel"), _ ("Display"));
	_data_->_tmp24_ = _data_->_tmp23_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp24_, "dock");
	_g_free0 (_data_->_tmp24_);
	_data_->_tmp25_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp26_ = _data_->_tmp25_;
	_data_->_tmp27_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp26_, _ ("Dock & Panel"), _ ("Panel translucency"));
	_data_->_tmp28_ = _data_->_tmp27_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp28_, "dock");
	_g_free0 (_data_->_tmp28_);
	_data_->_tmp29_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp30_ = _data_->_tmp29_;
	_data_->_tmp31_ = g_strdup_printf ("%s → %s", _data_->_tmp30_, _ ("Appearance"));
	_data_->_tmp32_ = _data_->_tmp31_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp32_, "appearance");
	_g_free0 (_data_->_tmp32_);
	_data_->_tmp33_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp34_ = _data_->_tmp33_;
	_data_->_tmp35_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp34_, _ ("Appearance"), _ ("Dark style"));
	_data_->_tmp36_ = _data_->_tmp35_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp36_, "appearance");
	_g_free0 (_data_->_tmp36_);
	_data_->_tmp37_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp38_ = _data_->_tmp37_;
	_data_->_tmp39_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp38_, _ ("Appearance"), _ ("Accent color"));
	_data_->_tmp40_ = _data_->_tmp39_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp40_, "appearance");
	_g_free0 (_data_->_tmp40_);
	_data_->_tmp41_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp42_ = _data_->_tmp41_;
	_data_->_tmp43_ = g_strdup_printf ("%s → %s", _data_->_tmp42_, _ ("Text"));
	_data_->_tmp44_ = _data_->_tmp43_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp44_, "text");
	_g_free0 (_data_->_tmp44_);
	_data_->_tmp45_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp46_ = _data_->_tmp45_;
	_data_->_tmp47_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp46_, _ ("Text"), _ ("Size"));
	_data_->_tmp48_ = _data_->_tmp47_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp48_, "text");
	_g_free0 (_data_->_tmp48_);
	_data_->_tmp49_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp50_ = _data_->_tmp49_;
	_data_->_tmp51_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp50_, _ ("Text"), _ ("Dyslexia-friendly"));
	_data_->_tmp52_ = _data_->_tmp51_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp52_, "text");
	_g_free0 (_data_->_tmp52_);
	_data_->_tmp53_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp54_ = _data_->_tmp53_;
	_data_->_tmp55_ = g_strdup_printf ("%s → %s", _data_->_tmp54_, _ ("Multitasking"));
	_data_->_tmp56_ = _data_->_tmp55_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp56_, "multitasking");
	_g_free0 (_data_->_tmp56_);
	_data_->_tmp57_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp58_ = _data_->_tmp57_;
	_data_->_tmp59_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp58_, _ ("Multitasking"), _ ("Hot Corners"));
	_data_->_tmp60_ = _data_->_tmp59_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp60_, "multitasking");
	_g_free0 (_data_->_tmp60_);
	_data_->_tmp61_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp62_ = _data_->_tmp61_;
	_data_->_tmp63_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp62_, _ ("Multitasking"), _ ("Move windows to a new workspace"));
	_data_->_tmp64_ = _data_->_tmp63_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp64_, "multitasking");
	_g_free0 (_data_->_tmp64_);
	_data_->_tmp65_ = switchboard_plug_get_display_name ((SwitchboardPlug*) _data_->self);
	_data_->_tmp66_ = _data_->_tmp65_;
	_data_->_tmp67_ = g_strdup_printf ("%s → %s → %s", _data_->_tmp66_, _ ("Multitasking"), _ ("Window animations"));
	_data_->_tmp68_ = _data_->_tmp67_;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->search_results, _data_->_tmp68_, "multitasking");
	_g_free0 (_data_->_tmp68_);
	_data_->result = _data_->search_results;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pantheon_shell_plug_class_init (PantheonShellPlugClass * klass,
                                gpointer klass_data)
{
	pantheon_shell_plug_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PantheonShellPlug_private_offset);
	((SwitchboardPlugClass *) klass)->get_widget = (GtkWidget* (*) (SwitchboardPlug*)) pantheon_shell_plug_real_get_widget;
	((SwitchboardPlugClass *) klass)->shown = (void (*) (SwitchboardPlug*)) pantheon_shell_plug_real_shown;
	((SwitchboardPlugClass *) klass)->hidden = (void (*) (SwitchboardPlug*)) pantheon_shell_plug_real_hidden;
	((SwitchboardPlugClass *) klass)->search_callback = (void (*) (SwitchboardPlug*, const gchar*)) pantheon_shell_plug_real_search_callback;
	((SwitchboardPlugClass *) klass)->search = (void (*) (SwitchboardPlug*, const gchar*, GAsyncReadyCallback, gpointer)) pantheon_shell_plug_real_search;
	((SwitchboardPlugClass *) klass)->search_finish = (GeeTreeMap* (*) (SwitchboardPlug*, GAsyncResult*)) pantheon_shell_plug_search_finish;
	G_OBJECT_CLASS (klass)->finalize = pantheon_shell_plug_finalize;
}

static void
pantheon_shell_plug_instance_init (PantheonShellPlug * self,
                                   gpointer klass)
{
	self->priv = pantheon_shell_plug_get_instance_private (self);
}

static void
pantheon_shell_plug_finalize (GObject * obj)
{
	PantheonShellPlug * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PANTHEON_SHELL_TYPE_PLUG, PantheonShellPlug);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->main_grid);
	_g_object_unref0 (self->priv->wallpaper_view);
	G_OBJECT_CLASS (pantheon_shell_plug_parent_class)->finalize (obj);
}

static GType
pantheon_shell_plug_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PantheonShellPlugClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pantheon_shell_plug_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PantheonShellPlug), 0, (GInstanceInitFunc) pantheon_shell_plug_instance_init, NULL };
	GType pantheon_shell_plug_type_id;
	pantheon_shell_plug_type_id = g_type_register_static (SWITCHBOARD_TYPE_PLUG, "PantheonShellPlug", &g_define_type_info, 0);
	PantheonShellPlug_private_offset = g_type_add_instance_private (pantheon_shell_plug_type_id, sizeof (PantheonShellPlugPrivate));
	return pantheon_shell_plug_type_id;
}

GType
pantheon_shell_plug_get_type (void)
{
	static volatile gsize pantheon_shell_plug_type_id__once = 0;
	if (g_once_init_enter (&pantheon_shell_plug_type_id__once)) {
		GType pantheon_shell_plug_type_id;
		pantheon_shell_plug_type_id = pantheon_shell_plug_get_type_once ();
		g_once_init_leave (&pantheon_shell_plug_type_id__once, pantheon_shell_plug_type_id);
	}
	return pantheon_shell_plug_type_id__once;
}

SwitchboardPlug*
get_plug (GModule* module)
{
	PantheonShellPlug* plug = NULL;
	PantheonShellPlug* _tmp0_;
	SwitchboardPlug* result;
	g_return_val_if_fail (module != NULL, NULL);
	g_debug ("Plug.vala:144: Activating Desktop plug");
	_tmp0_ = pantheon_shell_plug_new ();
	plug = _tmp0_;
	result = (SwitchboardPlug*) plug;
	return result;
}

