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

#include "slingshot.h"
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <plugin.h>
#include <locale.h>
#include <glib/gi18n-lib.h>
#include <config.h>
#include <gdk/gdk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libpeas.h>

#define APP_MENU_APPLET_APP_MENU_APPLET_KEYBINDING_SCHEMA "org.gnome.desktop.wm.keybindings"
#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

enum  {
	APP_MENU_APPLET_APP_MENU_SETTINGS_0_PROPERTY,
	APP_MENU_APPLET_APP_MENU_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* app_menu_applet_app_menu_settings_properties[APP_MENU_APPLET_APP_MENU_SETTINGS_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))
enum  {
	APP_MENU_APPLET_PLUGIN_0_PROPERTY,
	APP_MENU_APPLET_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* app_menu_applet_plugin_properties[APP_MENU_APPLET_PLUGIN_NUM_PROPERTIES];
enum  {
	APP_MENU_APPLET_APP_MENU_APPLET_0_PROPERTY,
	APP_MENU_APPLET_APP_MENU_APPLET_UUID_PROPERTY,
	APP_MENU_APPLET_APP_MENU_APPLET_NUM_PROPERTIES
};
static GParamSpec* app_menu_applet_app_menu_applet_properties[APP_MENU_APPLET_APP_MENU_APPLET_NUM_PROPERTIES];
#define _g_settings_schema_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _AppMenuAppletAppMenuSettingsPrivate {
	GtkSwitch* switch_menu_label;
	GtkEntry* entry_label;
	GtkEntry* entry_icon_pick;
	GtkButton* button_icon_pick;
	GtkSpinButton* spin_rows;
	GtkSpinButton* spin_columns;
	GtkSwitch* show_terminal_apps;
	GtkSwitch* switch_powerstrip;
	GtkSwitch* switch_rollover;
	GtkSpinButton* spin_category_spacing;
	GtkSwitch* switch_favorites;
	GSettings* settings;
};

struct _AppMenuAppletAppMenuAppletPrivate {
	GtkToggleButton* widget;
	BudgiePopover* popover;
	BudgiePopoverManager* manager;
	gchar* _uuid;
	SlingshotDBusService* dbus_service;
	SlingshotSlingshotView* view;
	GtkIconTheme* default_theme;
	GtkGrid* indicator_grid;
	GtkImage* img;
	GtkLabel* label;
	BudgiePanelPosition panel_position;
	gint pixel_size;
};

static gint AppMenuAppletAppMenuSettings_private_offset;
static gpointer app_menu_applet_app_menu_settings_parent_class = NULL;
static GSettings* app_menu_applet_app_menu_settings__appmenu_settings;
static GSettings* app_menu_applet_app_menu_settings__appmenu_settings = NULL;
static GType app_menu_applet_app_menu_settings_type_id = 0;
static gpointer app_menu_applet_plugin_parent_class = NULL;
static BudgiePluginIface * app_menu_applet_plugin_budgie_plugin_parent_iface = NULL;
static GType app_menu_applet_plugin_type_id = 0;
static gint AppMenuAppletAppMenuApplet_private_offset;
static gpointer app_menu_applet_app_menu_applet_parent_class = NULL;
static GSettings* app_menu_applet_app_menu_applet_keybinding_settings;
static GSettings* app_menu_applet_app_menu_applet_keybinding_settings = NULL;
static GType app_menu_applet_app_menu_applet_type_id = 0;

static GSettings* app_menu_applet_app_menu_settings_get_appmenu_settings (void);
static void app_menu_applet_app_menu_settings_on_pick_click (AppMenuAppletAppMenuSettings* self);
static void _app_menu_applet_app_menu_settings_on_pick_click_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self);
static void app_menu_applet_app_menu_settings_set_appmenu_settings (GSettings* value);
static void app_menu_applet_app_menu_settings_finalize (GObject * obj);
static void _vala_app_menu_applet_app_menu_settings_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec);
static void _vala_app_menu_applet_app_menu_settings_set_property (GObject * object,
                                                           guint property_id,
                                                           const GValue * value,
                                                           GParamSpec * pspec);
static BudgieApplet* app_menu_applet_plugin_real_get_panel_widget (BudgiePlugin* base,
                                                            const gchar* uuid);
static gboolean app_menu_applet_app_menu_applet_real_supports_settings (BudgieApplet* base);
static GtkWidget* app_menu_applet_app_menu_applet_real_get_settings_ui (BudgieApplet* base);
static void _app_menu_applet_app_menu_applet_on_settings_changed_g_settings_changed (GSettings* _sender,
                                                                              const gchar* key,
                                                                              gpointer self);
static void app_menu_applet_app_menu_applet_update_tooltip (AppMenuAppletAppMenuApplet* self);
static void ___lambda116_ (AppMenuAppletAppMenuApplet* self,
                    const gchar* key);
static void ____lambda116__g_settings_changed (GSettings* _sender,
                                        const gchar* key,
                                        gpointer self);
static gboolean __lambda117_ (AppMenuAppletAppMenuApplet* self,
                       GdkEventButton* e);
static gboolean ___lambda117__gtk_widget_button_press_event (GtkWidget* _sender,
                                                      GdkEventButton* event,
                                                      gpointer self);
static void app_menu_applet_app_menu_applet_on_close_indicator (AppMenuAppletAppMenuApplet* self);
static void _app_menu_applet_app_menu_applet_on_close_indicator_slingshot_slingshot_view_close_indicator (SlingshotSlingshotView* _sender,
                                                                                                   gpointer self);
static void __lambda118_ (AppMenuAppletAppMenuApplet* self,
                   gint p,
                   gint i,
                   gint s);
static void ___lambda118__budgie_applet_panel_size_changed (BudgieApplet* _sender,
                                                     gint panel_size,
                                                     gint icon_size,
                                                     gint small_icon_size,
                                                     gpointer self);
static void app_menu_applet_app_menu_applet_real_panel_position_changed (BudgieApplet* base,
                                                                  BudgiePanelPosition position);
static void app_menu_applet_app_menu_applet_real_invoke_action (BudgieApplet* base,
                                                         BudgiePanelAction action);
static void _vala_array_add1 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void app_menu_applet_app_menu_applet_real_update_popovers (BudgieApplet* base,
                                                           BudgiePopoverManager* manager);
static void app_menu_applet_app_menu_applet_finalize (GObject * obj);
static void _vala_app_menu_applet_app_menu_applet_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
static void _vala_app_menu_applet_app_menu_applet_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec);
GType app_menu_icon_chooser_register_type (GTypeModule * module);
GType app_menu_power_strip_register_type (GTypeModule * module);
GType app_menu_screenlock_register_type (GTypeModule * module);
VALA_EXTERN void app_menu_screenlock_proxy_register_dynamic_type (GTypeModule* module);
GType app_menu_logind_interface_register_type (GTypeModule * module);
VALA_EXTERN void app_menu_logind_interface_proxy_register_dynamic_type (GTypeModule* module);
GType app_menu_session_manager_register_type (GTypeModule * module);
VALA_EXTERN void app_menu_session_manager_proxy_register_dynamic_type (GTypeModule* module);
GType slingshot_backend_app_center_register_type (GTypeModule * module);
GType slingshot_backend_app_system_register_type (GTypeModule * module);
GType slingshot_backend_app_register_type (GTypeModule * module);
GType slingshot_backend_category_register_type (GTypeModule * module);
GType slingshot_backend_synapse_search_register_type (GTypeModule * module);
GType slingshot_backend_switcheroo_control_register_type (GTypeModule * module);
GType slingshot_backend_favorites_manager_register_type (GTypeModule * module);
GType slingshot_backend_session_manager_register_type (GTypeModule * module);
GType slingshot_backend_screenlock_register_type (GTypeModule * module);
VALA_EXTERN void slingshot_backend_screenlock_proxy_register_dynamic_type (GTypeModule* module);
GType slingshot_backend_logind_interface_register_type (GTypeModule * module);
VALA_EXTERN void slingshot_backend_logind_interface_proxy_register_dynamic_type (GTypeModule* module);
GType slingshot_backend_gnome_session_manager_register_type (GTypeModule * module);
VALA_EXTERN void slingshot_backend_gnome_session_manager_proxy_register_dynamic_type (GTypeModule* module);
GType slingshot_widgets_category_view_register_type (GTypeModule * module);
GType slingshot_widgets_category_view_category_row_register_type (GTypeModule * module);
GType slingshot_widgets_category_view_nav_list_box_register_type (GTypeModule * module);
GType slingshot_widgets_grid_register_type (GTypeModule * module);
GType slingshot_widgets_search_view_register_type (GTypeModule * module);
GType slingshot_widgets_app_button_register_type (GTypeModule * module);
GType slingshot_widgets_switcher_register_type (GTypeModule * module);
GType slingshot_widgets_search_item_register_type (GTypeModule * module);
GType slingshot_widgets_page_checker_register_type (GTypeModule * module);
GType slingshot_widgets_favorites_sidebar_register_type (GTypeModule * module);
GType slingshot_widgets_favorites_sidebar_favorite_row_register_type (GTypeModule * module);
GType slingshot_slingshot_view_register_type (GTypeModule * module);
GType slingshot_dbus_service_register_type (GTypeModule * module);
GType slingshot_dbus_service_service_register_type (GTypeModule * module);
GType slingshot_app_context_menu_register_type (GTypeModule * module);
GType slingshot_app_list_box_register_type (GTypeModule * module);
GType synapse_utils_async_once_register_type (GTypeModule * module);
GType synapse_match_register_type (GTypeModule * module);
GType synapse_base_action_register_type (GTypeModule * module);
GType synapse_terminal_runner_action_register_type (GTypeModule * module);
GType synapse_runner_action_register_type (GTypeModule * module);
GType synapse_activatable_register_type (GTypeModule * module);
GType synapse_action_provider_register_type (GTypeModule * module);
GType synapse_common_actions_register_type (GTypeModule * module);
GType synapse_clipboard_copy_action_register_type (GTypeModule * module);
GType synapse_default_match_register_type (GTypeModule * module);
GType synapse_config_object_register_type (GTypeModule * module);
GType synapse_config_service_register_type (GTypeModule * module);
GType synapse_search_provider_register_type (GTypeModule * module);
GType synapse_data_sink_register_type (GTypeModule * module);
GType synapse_data_sink_plugin_registry_register_type (GTypeModule * module);
GType synapse_data_sink_plugin_registry_plugin_info_register_type (GTypeModule * module);
GType synapse_data_sink_data_sink_configuration_register_type (GTypeModule * module);
GType synapse_dbus_service_register_type (GTypeModule * module);
GType synapse_desktop_file_info_register_type (GTypeModule * module);
GType synapse_desktop_file_service_register_type (GTypeModule * module);
GType synapse_relevancy_service_register_type (GTypeModule * module);
GType synapse_result_set_register_type (GTypeModule * module);
GType synapse_worker_link_register_type (GTypeModule * module);
GType synapse_item_provider_register_type (GTypeModule * module);
GType synapse_calculator_plugin_register_type (GTypeModule * module);
GType synapse_text_match_register_type (GTypeModule * module);
GType synapse_calculator_plugin_result_register_type (GTypeModule * module);
GType synapse_command_plugin_register_type (GTypeModule * module);
GType synapse_application_match_register_type (GTypeModule * module);
GType synapse_command_plugin_command_object_register_type (GTypeModule * module);
GType synapse_desktop_file_plugin_register_type (GTypeModule * module);
GType synapse_desktop_file_plugin_action_match_register_type (GTypeModule * module);
GType synapse_desktop_file_plugin_desktop_file_match_register_type (GTypeModule * module);
GType synapse_desktop_file_plugin_open_with_action_register_type (GTypeModule * module);
GType synapse_file_bookmark_plugin_register_type (GTypeModule * module);
GType synapse_file_bookmark_plugin_result_register_type (GTypeModule * module);
GType synapse_system_management_plugin_register_type (GTypeModule * module);
GType synapse_system_management_plugin_system_action_register_type (GTypeModule * module);
GType synapse_system_management_plugin_lock_action_register_type (GTypeModule * module);
GType synapse_system_management_plugin_log_out_action_register_type (GTypeModule * module);
GType synapse_system_management_plugin_suspend_action_register_type (GTypeModule * module);
GType synapse_system_management_plugin_hibernate_action_register_type (GTypeModule * module);
GType synapse_system_management_plugin_shutdown_action_register_type (GTypeModule * module);
GType synapse_system_management_plugin_restart_action_register_type (GTypeModule * module);
GType synapse_link_plugin_register_type (GTypeModule * module);
GType synapse_link_plugin_result_register_type (GTypeModule * module);
GType synapse_control_panel_plugin_register_type (GTypeModule * module);
GType synapse_control_panel_plugin_action_match_register_type (GTypeModule * module);
GType synapse_control_panel_plugin_desktop_file_match_register_type (GTypeModule * module);
GType synapse_control_panel_plugin_open_with_action_register_type (GTypeModule * module);
GType synapse_configurable_register_type (GTypeModule * module);
GType synapse_uri_match_register_type (GTypeModule * module);
GType synapse_search_match_register_type (GTypeModule * module);
GType synapse_free_desktop_dbus_register_type (GTypeModule * module);
VALA_EXTERN void synapse_free_desktop_dbus_proxy_register_dynamic_type (GTypeModule* module);
GType synapse_relevancy_backend_register_type (GTypeModule * module);
GType synapse_upower_object_register_type (GTypeModule * module);
VALA_EXTERN void synapse_upower_object_proxy_register_dynamic_type (GTypeModule* module);
GType synapse_console_kit_object_register_type (GTypeModule * module);
VALA_EXTERN void synapse_console_kit_object_proxy_register_dynamic_type (GTypeModule* module);
GType synapse_lock_object_register_type (GTypeModule * module);
VALA_EXTERN void synapse_lock_object_proxy_register_dynamic_type (GTypeModule* module);
GType synapse_log_out_object_register_type (GTypeModule * module);
VALA_EXTERN void synapse_log_out_object_proxy_register_dynamic_type (GTypeModule* module);
GType synapse_systemd_object_register_type (GTypeModule * module);
VALA_EXTERN void synapse_systemd_object_proxy_register_dynamic_type (GTypeModule* module);
GType app_list_row_register_type (GTypeModule * module);
GType app_center_dbus_register_type (GTypeModule * module);
VALA_EXTERN void app_center_dbus_proxy_register_dynamic_type (GTypeModule* module);
GType switcheroo_control_dbus_register_type (GTypeModule * module);
VALA_EXTERN void switcheroo_control_dbus_proxy_register_dynamic_type (GTypeModule* module);
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 gssize _vala_array_length (gpointer array);

static inline gpointer
app_menu_applet_app_menu_settings_get_instance_private (AppMenuAppletAppMenuSettings* self)
{
	return G_STRUCT_MEMBER_P (self, AppMenuAppletAppMenuSettings_private_offset);
}

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

static void
_app_menu_applet_app_menu_settings_on_pick_click_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self)
{
	app_menu_applet_app_menu_settings_on_pick_click ((AppMenuAppletAppMenuSettings*) self);
}

AppMenuAppletAppMenuSettings*
app_menu_applet_app_menu_settings_construct (GType object_type,
                                             GSettings* settings)
{
	AppMenuAppletAppMenuSettings * self = NULL;
	GSettings* _tmp0_;
	GtkSwitch* _tmp1_;
	GtkEntry* _tmp2_;
	GtkEntry* _tmp3_;
	GSettings* _tmp4_;
	GSettings* _tmp5_;
	GtkSpinButton* _tmp6_;
	GSettings* _tmp7_;
	GSettings* _tmp8_;
	GtkSpinButton* _tmp9_;
	GSettings* _tmp10_;
	GSettings* _tmp11_;
	GtkSwitch* _tmp12_;
	GSettings* _tmp13_;
	GSettings* _tmp14_;
	GtkSwitch* _tmp15_;
	GSettings* _tmp16_;
	GSettings* _tmp17_;
	GtkSwitch* _tmp18_;
	GSettings* _tmp19_;
	GSettings* _tmp20_;
	GtkSpinButton* _tmp21_;
	GSettings* _tmp22_;
	GSettings* _tmp23_;
	GtkSwitch* _tmp24_;
	GtkButton* _tmp25_;
	self = (AppMenuAppletAppMenuSettings*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (settings);
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp0_;
	_tmp1_ = self->priv->switch_menu_label;
	g_settings_bind (settings, "enable-menu-label", (GObject*) _tmp1_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp2_ = self->priv->entry_label;
	g_settings_bind (settings, "menu-label", (GObject*) _tmp2_, "text", G_SETTINGS_BIND_DEFAULT);
	_tmp3_ = self->priv->entry_icon_pick;
	g_settings_bind (settings, "menu-icon", (GObject*) _tmp3_, "text", G_SETTINGS_BIND_DEFAULT);
	_tmp4_ = app_menu_applet_app_menu_settings_get_appmenu_settings ();
	_tmp5_ = _tmp4_;
	_tmp6_ = self->priv->spin_columns;
	g_settings_bind (_tmp5_, "columns", (GObject*) _tmp6_, "value", G_SETTINGS_BIND_DEFAULT);
	_tmp7_ = app_menu_applet_app_menu_settings_get_appmenu_settings ();
	_tmp8_ = _tmp7_;
	_tmp9_ = self->priv->spin_rows;
	g_settings_bind (_tmp8_, "rows", (GObject*) _tmp9_, "value", G_SETTINGS_BIND_DEFAULT);
	_tmp10_ = app_menu_applet_app_menu_settings_get_appmenu_settings ();
	_tmp11_ = _tmp10_;
	_tmp12_ = self->priv->show_terminal_apps;
	g_settings_bind (_tmp11_, "show-terminal-apps", (GObject*) _tmp12_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp13_ = app_menu_applet_app_menu_settings_get_appmenu_settings ();
	_tmp14_ = _tmp13_;
	_tmp15_ = self->priv->switch_powerstrip;
	g_settings_bind (_tmp14_, "enable-powerstrip", (GObject*) _tmp15_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp16_ = app_menu_applet_app_menu_settings_get_appmenu_settings ();
	_tmp17_ = _tmp16_;
	_tmp18_ = self->priv->switch_rollover;
	g_settings_bind (_tmp17_, "rollover-menu", (GObject*) _tmp18_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp19_ = app_menu_applet_app_menu_settings_get_appmenu_settings ();
	_tmp20_ = _tmp19_;
	_tmp21_ = self->priv->spin_category_spacing;
	g_settings_bind (_tmp20_, "category-spacing", (GObject*) _tmp21_, "value", G_SETTINGS_BIND_DEFAULT);
	_tmp22_ = app_menu_applet_app_menu_settings_get_appmenu_settings ();
	_tmp23_ = _tmp22_;
	_tmp24_ = self->priv->switch_favorites;
	g_settings_bind (_tmp23_, "enable-favorites", (GObject*) _tmp24_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp25_ = self->priv->button_icon_pick;
	g_signal_connect_object (_tmp25_, "clicked", (GCallback) _app_menu_applet_app_menu_settings_on_pick_click_gtk_button_clicked, self, 0);
	return self;
}

AppMenuAppletAppMenuSettings*
app_menu_applet_app_menu_settings_new (GSettings* settings)
{
	return app_menu_applet_app_menu_settings_construct (APP_MENU_APPLET_TYPE_APP_MENU_SETTINGS, settings);
}

/**
        * Handle the icon picker
        */
static void
app_menu_applet_app_menu_settings_on_pick_click (AppMenuAppletAppMenuSettings* self)
{
	AppMenuIconChooser* chooser = NULL;
	GtkWidget* _tmp0_;
	AppMenuIconChooser* _tmp1_;
	gchar* response = NULL;
	AppMenuIconChooser* _tmp2_;
	gchar* _tmp3_;
	AppMenuIconChooser* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	_tmp1_ = app_menu_icon_chooser_new (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp0_) : NULL);
	g_object_ref_sink (_tmp1_);
	chooser = _tmp1_;
	_tmp2_ = chooser;
	_tmp3_ = app_menu_icon_chooser_run (_tmp2_);
	response = _tmp3_;
	_tmp4_ = chooser;
	gtk_widget_destroy ((GtkWidget*) _tmp4_);
	_tmp5_ = response;
	if (_tmp5_ != NULL) {
		GtkEntry* _tmp6_;
		const gchar* _tmp7_;
		_tmp6_ = self->priv->entry_icon_pick;
		_tmp7_ = response;
		gtk_entry_set_text (_tmp6_, _tmp7_);
	}
	_g_free0 (response);
	_g_object_unref0 (chooser);
}

static GSettings*
app_menu_applet_app_menu_settings_get_appmenu_settings (void)
{
	GSettings* result;
	GSettings* _tmp0_;
	_tmp0_ = app_menu_applet_app_menu_settings__appmenu_settings;
	result = _tmp0_;
	return result;
}

static void
app_menu_applet_app_menu_settings_set_appmenu_settings (GSettings* value)
{
	GSettings* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (app_menu_applet_app_menu_settings__appmenu_settings);
	app_menu_applet_app_menu_settings__appmenu_settings = _tmp0_;
}

static void
app_menu_applet_app_menu_settings_class_init (AppMenuAppletAppMenuSettingsClass * klass,
                                              gpointer klass_data)
{
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	app_menu_applet_app_menu_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AppMenuAppletAppMenuSettings_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_app_menu_applet_app_menu_settings_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_app_menu_applet_app_menu_settings_set_property;
	G_OBJECT_CLASS (klass)->finalize = app_menu_applet_app_menu_settings_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/ubuntubudgie/appmenu/settings.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "switch_menu_label", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, switch_menu_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "entry_label", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, entry_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "entry_icon_pick", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, entry_icon_pick));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_icon_pick", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, button_icon_pick));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "spin_rows", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, spin_rows));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "spin_columns", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, spin_columns));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "show_terminal_apps", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, show_terminal_apps));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "switch_powerstrip", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, switch_powerstrip));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "switch_rollover", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, switch_rollover));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "spin_category_spacing", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, spin_category_spacing));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "switch_favorites", FALSE, AppMenuAppletAppMenuSettings_private_offset + G_STRUCT_OFFSET (AppMenuAppletAppMenuSettingsPrivate, switch_favorites));
	_tmp0_ = g_settings_new ("org.ubuntubudgie.plugins.budgie-appmenu");
	_tmp1_ = _tmp0_;
	app_menu_applet_app_menu_settings_set_appmenu_settings (_tmp1_);
	_g_object_unref0 (_tmp1_);
}

static void
app_menu_applet_app_menu_settings_instance_init (AppMenuAppletAppMenuSettings * self,
                                                 gpointer klass)
{
	self->priv = app_menu_applet_app_menu_settings_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
app_menu_applet_app_menu_settings_finalize (GObject * obj)
{
	AppMenuAppletAppMenuSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, APP_MENU_APPLET_TYPE_APP_MENU_SETTINGS, AppMenuAppletAppMenuSettings);
	_g_object_unref0 (self->priv->settings);
	G_OBJECT_CLASS (app_menu_applet_app_menu_settings_parent_class)->finalize (obj);
}

GType
app_menu_applet_app_menu_settings_get_type (void)
{
	return app_menu_applet_app_menu_settings_type_id;
}

GType
app_menu_applet_app_menu_settings_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (AppMenuAppletAppMenuSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) app_menu_applet_app_menu_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AppMenuAppletAppMenuSettings), 0, (GInstanceInitFunc) app_menu_applet_app_menu_settings_instance_init, NULL };
	app_menu_applet_app_menu_settings_type_id = g_type_module_register_type (module, gtk_grid_get_type (), "AppMenuAppletAppMenuSettings", &g_define_type_info, 0);
	AppMenuAppletAppMenuSettings_private_offset = sizeof (AppMenuAppletAppMenuSettingsPrivate);
	return app_menu_applet_app_menu_settings_type_id;
}

static void
_vala_app_menu_applet_app_menu_settings_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec)
{
	AppMenuAppletAppMenuSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, APP_MENU_APPLET_TYPE_APP_MENU_SETTINGS, AppMenuAppletAppMenuSettings);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_app_menu_applet_app_menu_settings_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec)
{
	AppMenuAppletAppMenuSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, APP_MENU_APPLET_TYPE_APP_MENU_SETTINGS, AppMenuAppletAppMenuSettings);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static BudgieApplet*
app_menu_applet_plugin_real_get_panel_widget (BudgiePlugin* base,
                                              const gchar* uuid)
{
	AppMenuAppletPlugin * self;
	AppMenuAppletAppMenuApplet* _tmp0_;
	BudgieApplet* result;
	self = (AppMenuAppletPlugin*) base;
	g_return_val_if_fail (uuid != NULL, NULL);
	_tmp0_ = app_menu_applet_app_menu_applet_new (uuid);
	g_object_ref_sink (_tmp0_);
	result = (BudgieApplet*) _tmp0_;
	return result;
}

AppMenuAppletPlugin*
app_menu_applet_plugin_construct (GType object_type)
{
	AppMenuAppletPlugin * self = NULL;
	self = (AppMenuAppletPlugin*) g_object_new (object_type, NULL);
	return self;
}

AppMenuAppletPlugin*
app_menu_applet_plugin_new (void)
{
	return app_menu_applet_plugin_construct (APP_MENU_APPLET_TYPE_PLUGIN);
}

static void
app_menu_applet_plugin_class_init (AppMenuAppletPluginClass * klass,
                                   gpointer klass_data)
{
	app_menu_applet_plugin_parent_class = g_type_class_peek_parent (klass);
}

static void
app_menu_applet_plugin_budgie_plugin_interface_init (BudgiePluginIface * iface,
                                                     gpointer iface_data)
{
	app_menu_applet_plugin_budgie_plugin_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_panel_widget = (BudgieApplet* (*) (BudgiePlugin*, const gchar*)) app_menu_applet_plugin_real_get_panel_widget;
}

static void
app_menu_applet_plugin_instance_init (AppMenuAppletPlugin * self,
                                      gpointer klass)
{
}

GType
app_menu_applet_plugin_get_type (void)
{
	return app_menu_applet_plugin_type_id;
}

GType
app_menu_applet_plugin_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (AppMenuAppletPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) app_menu_applet_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AppMenuAppletPlugin), 0, (GInstanceInitFunc) app_menu_applet_plugin_instance_init, NULL };
	static const GInterfaceInfo budgie_plugin_info = { (GInterfaceInitFunc) app_menu_applet_plugin_budgie_plugin_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	app_menu_applet_plugin_type_id = g_type_module_register_type (module, peas_extension_base_get_type (), "AppMenuAppletPlugin", &g_define_type_info, 0);
	g_type_module_add_interface (module, app_menu_applet_plugin_type_id, budgie_plugin_get_type (), &budgie_plugin_info);
	return app_menu_applet_plugin_type_id;
}

static inline gpointer
app_menu_applet_app_menu_applet_get_instance_private (AppMenuAppletAppMenuApplet* self)
{
	return G_STRUCT_MEMBER_P (self, AppMenuAppletAppMenuApplet_private_offset);
}

static gboolean
app_menu_applet_app_menu_applet_real_supports_settings (BudgieApplet* base)
{
	AppMenuAppletAppMenuApplet * self;
	gboolean result;
	self = (AppMenuAppletAppMenuApplet*) base;
	result = TRUE;
	return result;
}

static GtkWidget*
app_menu_applet_app_menu_applet_real_get_settings_ui (BudgieApplet* base)
{
	AppMenuAppletAppMenuApplet * self;
	const gchar* _tmp0_;
	GSettings* _tmp1_;
	GSettings* _tmp2_;
	AppMenuAppletAppMenuSettings* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* result;
	self = (AppMenuAppletAppMenuApplet*) base;
	_tmp0_ = self->priv->_uuid;
	_tmp1_ = budgie_applet_get_applet_settings ((BudgieApplet*) self, _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = app_menu_applet_app_menu_settings_new (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = (GtkWidget*) _tmp3_;
	_g_object_unref0 (_tmp2_);
	result = _tmp4_;
	return result;
}

static void
_app_menu_applet_app_menu_applet_on_settings_changed_g_settings_changed (GSettings* _sender,
                                                                         const gchar* key,
                                                                         gpointer self)
{
	app_menu_applet_app_menu_applet_on_settings_changed ((AppMenuAppletAppMenuApplet*) self, key);
}

static void
___lambda116_ (AppMenuAppletAppMenuApplet* self,
               const gchar* key)
{
	g_return_if_fail (key != NULL);
	if (g_strcmp0 (key, "panel-main-menu") == 0) {
		app_menu_applet_app_menu_applet_update_tooltip (self);
	}
}

static void
____lambda116__g_settings_changed (GSettings* _sender,
                                   const gchar* key,
                                   gpointer self)
{
	___lambda116_ ((AppMenuAppletAppMenuApplet*) self, key);
}

static gboolean
__lambda117_ (AppMenuAppletAppMenuApplet* self,
              GdkEventButton* e)
{
	BudgiePopover* _tmp0_;
	gboolean result;
	g_return_val_if_fail (e != NULL, FALSE);
	if (e->button != ((guint) 1)) {
		result = GDK_EVENT_PROPAGATE;
		return result;
	}
	_tmp0_ = self->priv->popover;
	if (gtk_widget_get_visible ((GtkWidget*) _tmp0_)) {
		BudgiePopover* _tmp1_;
		_tmp1_ = self->priv->popover;
		gtk_widget_hide ((GtkWidget*) _tmp1_);
	} else {
		SlingshotSlingshotView* _tmp2_;
		BudgiePopoverManager* _tmp3_;
		GtkToggleButton* _tmp4_;
		_tmp2_ = self->priv->view;
		slingshot_slingshot_view_show_slingshot (_tmp2_);
		_tmp3_ = self->priv->manager;
		_tmp4_ = self->priv->widget;
		budgie_popover_manager_show_popover (_tmp3_, (GtkWidget*) _tmp4_);
	}
	result = GDK_EVENT_STOP;
	return result;
}

static gboolean
___lambda117__gtk_widget_button_press_event (GtkWidget* _sender,
                                             GdkEventButton* event,
                                             gpointer self)
{
	gboolean result;
	result = __lambda117_ ((AppMenuAppletAppMenuApplet*) self, event);
	return result;
}

static void
_app_menu_applet_app_menu_applet_on_close_indicator_slingshot_slingshot_view_close_indicator (SlingshotSlingshotView* _sender,
                                                                                              gpointer self)
{
	app_menu_applet_app_menu_applet_on_close_indicator ((AppMenuAppletAppMenuApplet*) self);
}

static void
__lambda118_ (AppMenuAppletAppMenuApplet* self,
              gint p,
              gint i,
              gint s)
{
	if (self->priv->pixel_size != i) {
		self->priv->pixel_size = (gint) i;
		app_menu_applet_app_menu_applet_on_settings_changed (self, "menu-icon");
	}
}

static void
___lambda118__budgie_applet_panel_size_changed (BudgieApplet* _sender,
                                                gint panel_size,
                                                gint icon_size,
                                                gint small_icon_size,
                                                gpointer self)
{
	__lambda118_ ((AppMenuAppletAppMenuApplet*) self, panel_size, icon_size, small_icon_size);
}

AppMenuAppletAppMenuApplet*
app_menu_applet_app_menu_applet_construct (GType object_type,
                                           const gchar* uuid)
{
	AppMenuAppletAppMenuApplet * self = NULL;
	GSettingsSchemaSource* _tmp0_;
	GSettingsSchema* _tmp1_;
	GSettingsSchema* _tmp2_;
	gboolean _tmp3_;
	GSettings* _tmp5_;
	GSettings* _tmp6_;
	GtkIconTheme* _tmp7_;
	GtkIconTheme* _tmp8_;
	SlingshotSlingshotView* _tmp9_;
	GtkToggleButton* _tmp14_;
	GtkToggleButton* _tmp15_;
	GtkImage* _tmp16_;
	GtkImage* _tmp17_;
	GtkImage* _tmp18_;
	GtkBox* layout = NULL;
	GtkBox* _tmp19_;
	GtkBox* _tmp20_;
	GtkImage* _tmp21_;
	GtkLabel* _tmp22_;
	GtkLabel* _tmp23_;
	GtkBox* _tmp24_;
	GtkLabel* _tmp25_;
	GtkToggleButton* _tmp26_;
	GtkBox* _tmp27_;
	GtkStyleContext* st = NULL;
	GtkToggleButton* _tmp28_;
	GtkStyleContext* _tmp29_;
	GtkStyleContext* _tmp30_;
	GtkStyleContext* _tmp31_;
	GtkStyleContext* _tmp32_;
	GtkToggleButton* _tmp33_;
	BudgiePopover* _tmp34_;
	GtkGrid* _tmp35_;
	GtkGrid* _tmp36_;
	SlingshotSlingshotView* _tmp37_;
	BudgiePopover* _tmp38_;
	GtkGrid* _tmp39_;
	GSettings* _tmp40_;
	GtkToggleButton* _tmp42_;
	BudgiePopover* _tmp43_;
	GtkWidget* _tmp44_;
	GtkToggleButton* _tmp45_;
	SlingshotSlingshotView* _tmp46_;
	g_return_val_if_fail (uuid != NULL, NULL);
	setlocale (LC_ALL, "");
	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALEDIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
	_tmp0_ = g_settings_schema_source_get_default ();
	_tmp1_ = g_settings_schema_source_lookup (_tmp0_, APP_MENU_APPLET_APP_MENU_APPLET_KEYBINDING_SCHEMA, TRUE);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_ != NULL;
	_g_settings_schema_unref0 (_tmp2_);
	if (_tmp3_) {
		GSettings* _tmp4_;
		_tmp4_ = g_settings_new (APP_MENU_APPLET_APP_MENU_APPLET_KEYBINDING_SCHEMA);
		_g_object_unref0 (app_menu_applet_app_menu_applet_keybinding_settings);
		app_menu_applet_app_menu_applet_keybinding_settings = _tmp4_;
	}
	self = (AppMenuAppletAppMenuApplet*) g_object_new (object_type, "uuid", uuid, NULL);
	budgie_applet_set_settings_schema ((BudgieApplet*) self, "com.solus-project.budgie-menu");
	budgie_applet_set_settings_prefix ((BudgieApplet*) self, "/org/solus-project/budgie-panel/instance/budgie-menu");
	_tmp5_ = budgie_applet_get_applet_settings ((BudgieApplet*) self, uuid);
	_g_object_unref0 (self->settings);
	self->settings = _tmp5_;
	_tmp6_ = self->settings;
	g_signal_connect_object (_tmp6_, "changed", (GCallback) _app_menu_applet_app_menu_applet_on_settings_changed_g_settings_changed, self, 0);
	_tmp7_ = gtk_icon_theme_get_default ();
	self->priv->default_theme = _tmp7_;
	_tmp8_ = self->priv->default_theme;
	gtk_icon_theme_add_resource_path (_tmp8_, "/io/elementary/desktop/wingpanel/applications-menu/icons");
	_tmp9_ = self->priv->view;
	if (_tmp9_ == NULL) {
		SlingshotSlingshotView* _tmp10_;
		SlingshotDBusService* _tmp11_;
		_tmp10_ = slingshot_slingshot_view_new ();
		g_object_ref_sink (_tmp10_);
		_g_object_unref0 (self->priv->view);
		self->priv->view = _tmp10_;
		_tmp11_ = self->priv->dbus_service;
		if (_tmp11_ == NULL) {
			SlingshotSlingshotView* _tmp12_;
			SlingshotDBusService* _tmp13_;
			_tmp12_ = self->priv->view;
			_tmp13_ = slingshot_dbus_service_new (_tmp12_);
			_g_object_unref0 (self->priv->dbus_service);
			self->priv->dbus_service = _tmp13_;
		}
	}
	_tmp14_ = (GtkToggleButton*) gtk_toggle_button_new ();
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->widget);
	self->priv->widget = _tmp14_;
	_tmp15_ = self->priv->widget;
	gtk_button_set_relief ((GtkButton*) _tmp15_, GTK_RELIEF_NONE);
	_tmp16_ = (GtkImage*) gtk_image_new_from_icon_name ("view-grid-symbolic", (GtkIconSize) GTK_ICON_SIZE_INVALID);
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->img);
	self->priv->img = _tmp16_;
	_tmp17_ = self->priv->img;
	gtk_image_set_pixel_size (_tmp17_, self->priv->pixel_size);
	_tmp18_ = self->priv->img;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp18_, TRUE);
	_tmp19_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp19_);
	layout = _tmp19_;
	_tmp20_ = layout;
	_tmp21_ = self->priv->img;
	gtk_box_pack_start (_tmp20_, (GtkWidget*) _tmp21_, TRUE, TRUE, (guint) 0);
	_tmp22_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (self->priv->label);
	self->priv->label = _tmp22_;
	_tmp23_ = self->priv->label;
	gtk_widget_set_halign ((GtkWidget*) _tmp23_, GTK_ALIGN_START);
	_tmp24_ = layout;
	_tmp25_ = self->priv->label;
	gtk_box_pack_start (_tmp24_, (GtkWidget*) _tmp25_, TRUE, TRUE, (guint) 3);
	_tmp26_ = self->priv->widget;
	_tmp27_ = layout;
	gtk_container_add ((GtkContainer*) _tmp26_, (GtkWidget*) _tmp27_);
	_tmp28_ = self->priv->widget;
	_tmp29_ = gtk_widget_get_style_context ((GtkWidget*) _tmp28_);
	_tmp30_ = _g_object_ref0 (_tmp29_);
	st = _tmp30_;
	_tmp31_ = st;
	gtk_style_context_add_class (_tmp31_, "budgie-menu-launcher");
	_tmp32_ = st;
	gtk_style_context_add_class (_tmp32_, "panel-button");
	_tmp33_ = self->priv->widget;
	_tmp34_ = (BudgiePopover*) budgie_popover_new ((GtkWidget*) _tmp33_);
	g_object_ref_sink (_tmp34_);
	_g_object_unref0 (self->priv->popover);
	self->priv->popover = _tmp34_;
	_tmp35_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp35_);
	_g_object_unref0 (self->priv->indicator_grid);
	self->priv->indicator_grid = _tmp35_;
	_tmp36_ = self->priv->indicator_grid;
	_tmp37_ = self->priv->view;
	gtk_grid_attach (_tmp36_, (GtkWidget*) _tmp37_, 0, 0, 1, 1);
	_tmp38_ = self->priv->popover;
	_tmp39_ = self->priv->indicator_grid;
	gtk_container_add ((GtkContainer*) _tmp38_, (GtkWidget*) _tmp39_);
	app_menu_applet_app_menu_applet_update_tooltip (self);
	_tmp40_ = app_menu_applet_app_menu_applet_keybinding_settings;
	if (_tmp40_ != NULL) {
		GSettings* _tmp41_;
		_tmp41_ = app_menu_applet_app_menu_applet_keybinding_settings;
		g_signal_connect_object (_tmp41_, "changed", (GCallback) ____lambda116__g_settings_changed, self, 0);
	}
	g_object_set ((BudgieApplet*) self, "supported-actions", BUDGIE_PANEL_ACTION_MENU, NULL);
	_tmp42_ = self->priv->widget;
	g_signal_connect_object ((GtkWidget*) _tmp42_, "button-press-event", (GCallback) ___lambda117__gtk_widget_button_press_event, self, 0);
	_tmp43_ = self->priv->popover;
	_tmp44_ = gtk_bin_get_child ((GtkBin*) _tmp43_);
	gtk_widget_show_all (_tmp44_);
	_tmp45_ = self->priv->widget;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp45_);
	gtk_widget_show_all ((GtkWidget*) self);
	app_menu_applet_app_menu_applet_on_settings_changed (self, "enable-menu-label");
	app_menu_applet_app_menu_applet_on_settings_changed (self, "menu-icon");
	app_menu_applet_app_menu_applet_on_settings_changed (self, "menu-label");
	_tmp46_ = self->priv->view;
	g_signal_connect_object (_tmp46_, "close-indicator", (GCallback) _app_menu_applet_app_menu_applet_on_close_indicator_slingshot_slingshot_view_close_indicator, self, 0);
	g_signal_connect_object ((BudgieApplet*) self, "panel-size-changed", (GCallback) ___lambda118__budgie_applet_panel_size_changed, self, 0);
	_g_object_unref0 (st);
	_g_object_unref0 (layout);
	return self;
}

AppMenuAppletAppMenuApplet*
app_menu_applet_app_menu_applet_new (const gchar* uuid)
{
	return app_menu_applet_app_menu_applet_construct (APP_MENU_APPLET_TYPE_APP_MENU_APPLET, uuid);
}

static void
app_menu_applet_app_menu_applet_on_close_indicator (AppMenuAppletAppMenuApplet* self)
{
	BudgiePopover* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->popover;
	gtk_widget_hide ((GtkWidget*) _tmp0_);
}

static void
app_menu_applet_app_menu_applet_real_panel_position_changed (BudgieApplet* base,
                                                             BudgiePanelPosition position)
{
	AppMenuAppletAppMenuApplet * self;
	gboolean _tmp0_ = FALSE;
	gboolean vertical = FALSE;
	gint _tmp1_ = 0;
	gint margin = 0;
	GtkImage* _tmp2_;
	SlingshotSlingshotView* _tmp3_;
	self = (AppMenuAppletAppMenuApplet*) base;
	self->priv->panel_position = position;
	if (position == BUDGIE_PANEL_POSITION_LEFT) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = position == BUDGIE_PANEL_POSITION_RIGHT;
	}
	vertical = _tmp0_;
	if (vertical) {
		_tmp1_ = 0;
	} else {
		_tmp1_ = 3;
	}
	margin = _tmp1_;
	_tmp2_ = self->priv->img;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp2_, margin);
	app_menu_applet_app_menu_applet_on_settings_changed (self, "enable-menu-label");
	_tmp3_ = self->priv->view;
	slingshot_slingshot_view_panel_position_changed (_tmp3_, position);
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

void
app_menu_applet_app_menu_applet_on_settings_changed (AppMenuAppletAppMenuApplet* self,
                                                     const gchar* key)
{
	gboolean should_show = FALSE;
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key != NULL);
	should_show = TRUE;
	_tmp0_ = key;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("menu-icon")))) {
		switch (0) {
			default:
			{
				gchar* icon = NULL;
				GSettings* _tmp3_;
				gchar* _tmp4_;
				const gchar* _tmp5_;
				GtkImage* _tmp18_;
				GtkImage* _tmp19_;
				_tmp3_ = self->settings;
				_tmp4_ = g_settings_get_string (_tmp3_, key);
				icon = _tmp4_;
				_tmp5_ = icon;
				if (string_contains (_tmp5_, "/")) {
					{
						GdkPixbuf* pixbuf = NULL;
						const gchar* _tmp6_;
						GdkPixbuf* _tmp7_;
						GtkImage* _tmp8_;
						GdkPixbuf* _tmp9_;
						GdkPixbuf* _tmp10_;
						GdkPixbuf* _tmp11_;
						_tmp6_ = icon;
						_tmp7_ = gdk_pixbuf_new_from_file (_tmp6_, &_inner_error0_);
						pixbuf = _tmp7_;
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							goto __catch0_g_error;
						}
						_tmp8_ = self->priv->img;
						_tmp9_ = pixbuf;
						_tmp10_ = gdk_pixbuf_scale_simple (_tmp9_, self->priv->pixel_size, self->priv->pixel_size, GDK_INTERP_BILINEAR);
						_tmp11_ = _tmp10_;
						gtk_image_set_from_pixbuf (_tmp8_, _tmp11_);
						_g_object_unref0 (_tmp11_);
						_g_object_unref0 (pixbuf);
					}
					goto __finally0;
					__catch0_g_error:
					{
						GError* e = NULL;
						GError* _tmp12_;
						const gchar* _tmp13_;
						GtkImage* _tmp14_;
						e = _inner_error0_;
						_inner_error0_ = NULL;
						_tmp12_ = e;
						_tmp13_ = _tmp12_->message;
						g_warning ("AppMenu.vala:286: Failed to update Budgie Menu applet icon: %s", _tmp13_);
						_tmp14_ = self->priv->img;
						gtk_image_set_from_icon_name (_tmp14_, "view-grid-symbolic", (GtkIconSize) GTK_ICON_SIZE_INVALID);
						_g_error_free0 (e);
					}
					__finally0:
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						_g_free0 (icon);
						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;
					}
				} else {
					const gchar* _tmp15_;
					_tmp15_ = icon;
					if (g_strcmp0 (_tmp15_, "") == 0) {
						should_show = FALSE;
					} else {
						GtkImage* _tmp16_;
						const gchar* _tmp17_;
						_tmp16_ = self->priv->img;
						_tmp17_ = icon;
						gtk_image_set_from_icon_name (_tmp16_, _tmp17_, (GtkIconSize) GTK_ICON_SIZE_INVALID);
					}
				}
				_tmp18_ = self->priv->img;
				gtk_image_set_pixel_size (_tmp18_, self->priv->pixel_size);
				_tmp19_ = self->priv->img;
				gtk_widget_set_visible ((GtkWidget*) _tmp19_, should_show);
				_g_free0 (icon);
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("menu-label")))) {
		switch (0) {
			default:
			{
				GtkLabel* _tmp20_;
				GSettings* _tmp21_;
				gchar* _tmp22_;
				gchar* _tmp23_;
				_tmp20_ = self->priv->label;
				_tmp21_ = self->settings;
				_tmp22_ = g_settings_get_string (_tmp21_, key);
				_tmp23_ = _tmp22_;
				gtk_label_set_label (_tmp20_, _tmp23_);
				_g_free0 (_tmp23_);
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("enable-menu-label")))) {
		switch (0) {
			default:
			{
				gboolean _tmp24_ = FALSE;
				gboolean _tmp25_ = FALSE;
				gboolean visible = FALSE;
				GtkLabel* _tmp27_;
				if (self->priv->panel_position == BUDGIE_PANEL_POSITION_TOP) {
					_tmp25_ = TRUE;
				} else {
					_tmp25_ = self->priv->panel_position == BUDGIE_PANEL_POSITION_BOTTOM;
				}
				if (_tmp25_) {
					GSettings* _tmp26_;
					_tmp26_ = self->settings;
					_tmp24_ = g_settings_get_boolean (_tmp26_, key);
				} else {
					_tmp24_ = FALSE;
				}
				visible = _tmp24_;
				_tmp27_ = self->priv->label;
				gtk_widget_set_visible ((GtkWidget*) _tmp27_, visible);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				break;
			}
		}
	}
}

static void
app_menu_applet_app_menu_applet_real_invoke_action (BudgieApplet* base,
                                                    BudgiePanelAction action)
{
	AppMenuAppletAppMenuApplet * self;
	self = (AppMenuAppletAppMenuApplet*) base;
	if ((action & BUDGIE_PANEL_ACTION_MENU) != 0) {
		BudgiePopover* _tmp0_;
		_tmp0_ = self->priv->popover;
		if (gtk_widget_get_visible ((GtkWidget*) _tmp0_)) {
			BudgiePopover* _tmp1_;
			_tmp1_ = self->priv->popover;
			gtk_widget_hide ((GtkWidget*) _tmp1_);
		} else {
			SlingshotSlingshotView* _tmp2_;
			BudgiePopoverManager* _tmp3_;
			GtkToggleButton* _tmp4_;
			_tmp2_ = self->priv->view;
			slingshot_slingshot_view_show_slingshot (_tmp2_);
			_tmp3_ = self->priv->manager;
			_tmp4_ = self->priv->widget;
			budgie_popover_manager_show_popover (_tmp3_, (GtkWidget*) _tmp4_);
		}
	}
}

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

static void
app_menu_applet_app_menu_applet_update_tooltip (AppMenuAppletAppMenuApplet* self)
{
	gchar** accels = NULL;
	gchar** _tmp0_;
	gint accels_length1;
	gint _accels_size_;
	gboolean _tmp1_ = FALSE;
	GSettings* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	accels = _tmp0_;
	accels_length1 = 0;
	_accels_size_ = accels_length1;
	_tmp2_ = app_menu_applet_app_menu_applet_keybinding_settings;
	if (_tmp2_ != NULL) {
		GtkGrid* _tmp3_;
		_tmp3_ = self->priv->indicator_grid;
		_tmp1_ = _tmp3_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gchar** raw_accels = NULL;
		GSettings* _tmp4_;
		gchar** _tmp5_;
		gchar** _tmp6_;
		gint raw_accels_length1;
		gint _raw_accels_size_;
		gchar** _tmp7_;
		gint _tmp7__length1;
		_tmp4_ = app_menu_applet_app_menu_applet_keybinding_settings;
		_tmp6_ = _tmp5_ = g_settings_get_strv (_tmp4_, "panel-main-menu");
		raw_accels = _tmp6_;
		raw_accels_length1 = _vala_array_length (_tmp5_);
		_raw_accels_size_ = raw_accels_length1;
		_tmp7_ = raw_accels;
		_tmp7__length1 = raw_accels_length1;
		{
			gchar** raw_accel_collection = NULL;
			gint raw_accel_collection_length1 = 0;
			gint _raw_accel_collection_size_ = 0;
			gint raw_accel_it = 0;
			raw_accel_collection = _tmp7_;
			raw_accel_collection_length1 = _tmp7__length1;
			for (raw_accel_it = 0; raw_accel_it < raw_accel_collection_length1; raw_accel_it = raw_accel_it + 1) {
				const gchar* raw_accel = NULL;
				raw_accel = raw_accel_collection[raw_accel_it];
				{
					const gchar* _tmp8_;
					_tmp8_ = raw_accel;
					if (g_strcmp0 (_tmp8_, "") != 0) {
						const gchar* _tmp9_;
						gchar* _tmp10_;
						_tmp9_ = raw_accel;
						_tmp10_ = g_strdup (_tmp9_);
						_vala_array_add1 (&accels, &accels_length1, &_accels_size_, _tmp10_);
					}
				}
			}
		}
		raw_accels = (_vala_array_free (raw_accels, raw_accels_length1, (GDestroyNotify) g_free), NULL);
	}
	accels = (_vala_array_free (accels, accels_length1, (GDestroyNotify) g_free), NULL);
}

static void
app_menu_applet_app_menu_applet_real_update_popovers (BudgieApplet* base,
                                                      BudgiePopoverManager* manager)
{
	AppMenuAppletAppMenuApplet * self;
	GtkToggleButton* _tmp0_;
	BudgiePopover* _tmp1_;
	self = (AppMenuAppletAppMenuApplet*) base;
	self->priv->manager = manager;
	_tmp0_ = self->priv->widget;
	_tmp1_ = self->priv->popover;
	budgie_popover_manager_register_popover (manager, (GtkWidget*) _tmp0_, (GtkPopover*) _tmp1_);
}

const gchar*
app_menu_applet_app_menu_applet_get_uuid (AppMenuAppletAppMenuApplet* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_uuid;
	result = _tmp0_;
	return result;
}

void
app_menu_applet_app_menu_applet_set_uuid (AppMenuAppletAppMenuApplet* self,
                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = app_menu_applet_app_menu_applet_get_uuid (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_uuid);
		self->priv->_uuid = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, app_menu_applet_app_menu_applet_properties[APP_MENU_APPLET_APP_MENU_APPLET_UUID_PROPERTY]);
	}
}

static void
app_menu_applet_app_menu_applet_class_init (AppMenuAppletAppMenuAppletClass * klass,
                                            gpointer klass_data)
{
	app_menu_applet_app_menu_applet_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AppMenuAppletAppMenuApplet_private_offset);
	((BudgieAppletClass *) klass)->supports_settings = (gboolean (*) (BudgieApplet*)) app_menu_applet_app_menu_applet_real_supports_settings;
	((BudgieAppletClass *) klass)->get_settings_ui = (GtkWidget* (*) (BudgieApplet*)) app_menu_applet_app_menu_applet_real_get_settings_ui;
	((BudgieAppletClass *) klass)->panel_position_changed = (void (*) (BudgieApplet*, BudgiePanelPosition)) app_menu_applet_app_menu_applet_real_panel_position_changed;
	((BudgieAppletClass *) klass)->invoke_action = (void (*) (BudgieApplet*, BudgiePanelAction)) app_menu_applet_app_menu_applet_real_invoke_action;
	((BudgieAppletClass *) klass)->update_popovers = (void (*) (BudgieApplet*, BudgiePopoverManager*)) app_menu_applet_app_menu_applet_real_update_popovers;
	G_OBJECT_CLASS (klass)->get_property = _vala_app_menu_applet_app_menu_applet_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_app_menu_applet_app_menu_applet_set_property;
	G_OBJECT_CLASS (klass)->finalize = app_menu_applet_app_menu_applet_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), APP_MENU_APPLET_APP_MENU_APPLET_UUID_PROPERTY, app_menu_applet_app_menu_applet_properties[APP_MENU_APPLET_APP_MENU_APPLET_UUID_PROPERTY] = g_param_spec_string ("uuid", "uuid", "uuid", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
app_menu_applet_app_menu_applet_instance_init (AppMenuAppletAppMenuApplet * self,
                                               gpointer klass)
{
	self->priv = app_menu_applet_app_menu_applet_get_instance_private (self);
	self->priv->popover = NULL;
	self->priv->manager = NULL;
	self->priv->dbus_service = NULL;
	self->priv->view = NULL;
	self->priv->default_theme = NULL;
	self->priv->indicator_grid = NULL;
	self->priv->panel_position = BUDGIE_PANEL_POSITION_BOTTOM;
	self->priv->pixel_size = 32;
}

static void
app_menu_applet_app_menu_applet_finalize (GObject * obj)
{
	AppMenuAppletAppMenuApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, APP_MENU_APPLET_TYPE_APP_MENU_APPLET, AppMenuAppletAppMenuApplet);
	_g_object_unref0 (self->priv->widget);
	_g_object_unref0 (self->priv->popover);
	_g_free0 (self->priv->_uuid);
	_g_object_unref0 (self->priv->dbus_service);
	_g_object_unref0 (self->priv->view);
	_g_object_unref0 (self->settings);
	_g_object_unref0 (self->priv->indicator_grid);
	_g_object_unref0 (self->priv->img);
	_g_object_unref0 (self->priv->label);
	G_OBJECT_CLASS (app_menu_applet_app_menu_applet_parent_class)->finalize (obj);
}

GType
app_menu_applet_app_menu_applet_get_type (void)
{
	return app_menu_applet_app_menu_applet_type_id;
}

GType
app_menu_applet_app_menu_applet_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (AppMenuAppletAppMenuAppletClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) app_menu_applet_app_menu_applet_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AppMenuAppletAppMenuApplet), 0, (GInstanceInitFunc) app_menu_applet_app_menu_applet_instance_init, NULL };
	app_menu_applet_app_menu_applet_type_id = g_type_module_register_type (module, budgie_applet_get_type (), "AppMenuAppletAppMenuApplet", &g_define_type_info, 0);
	AppMenuAppletAppMenuApplet_private_offset = sizeof (AppMenuAppletAppMenuAppletPrivate);
	return app_menu_applet_app_menu_applet_type_id;
}

static void
_vala_app_menu_applet_app_menu_applet_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	AppMenuAppletAppMenuApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, APP_MENU_APPLET_TYPE_APP_MENU_APPLET, AppMenuAppletAppMenuApplet);
	switch (property_id) {
		case APP_MENU_APPLET_APP_MENU_APPLET_UUID_PROPERTY:
		g_value_set_string (value, app_menu_applet_app_menu_applet_get_uuid (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_app_menu_applet_app_menu_applet_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec)
{
	AppMenuAppletAppMenuApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, APP_MENU_APPLET_TYPE_APP_MENU_APPLET, AppMenuAppletAppMenuApplet);
	switch (property_id) {
		case APP_MENU_APPLET_APP_MENU_APPLET_UUID_PROPERTY:
		app_menu_applet_app_menu_applet_set_uuid (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

void
peas_register_types (GTypeModule* module)
{
	PeasObjectModule* objmodule = NULL;
	PeasObjectModule* _tmp0_;
	g_return_if_fail (module != NULL);
	app_menu_applet_app_menu_settings_register_type (module);
	app_menu_applet_plugin_register_type (module);
	app_menu_applet_app_menu_applet_register_type (module);
	app_menu_icon_chooser_register_type (module);
	app_menu_power_strip_register_type (module);
	app_menu_screenlock_register_type (module);
	app_menu_screenlock_proxy_register_dynamic_type (module);
	app_menu_logind_interface_register_type (module);
	app_menu_logind_interface_proxy_register_dynamic_type (module);
	app_menu_session_manager_register_type (module);
	app_menu_session_manager_proxy_register_dynamic_type (module);
	slingshot_backend_app_center_register_type (module);
	slingshot_backend_app_system_register_type (module);
	slingshot_backend_app_register_type (module);
	slingshot_backend_category_register_type (module);
	slingshot_backend_synapse_search_register_type (module);
	slingshot_backend_switcheroo_control_register_type (module);
	slingshot_backend_favorites_manager_register_type (module);
	slingshot_backend_session_manager_register_type (module);
	slingshot_backend_screenlock_register_type (module);
	slingshot_backend_screenlock_proxy_register_dynamic_type (module);
	slingshot_backend_logind_interface_register_type (module);
	slingshot_backend_logind_interface_proxy_register_dynamic_type (module);
	slingshot_backend_gnome_session_manager_register_type (module);
	slingshot_backend_gnome_session_manager_proxy_register_dynamic_type (module);
	slingshot_widgets_category_view_register_type (module);
	slingshot_widgets_category_view_category_row_register_type (module);
	slingshot_widgets_category_view_nav_list_box_register_type (module);
	slingshot_widgets_grid_register_type (module);
	slingshot_widgets_search_view_register_type (module);
	slingshot_widgets_app_button_register_type (module);
	slingshot_widgets_switcher_register_type (module);
	slingshot_widgets_search_item_register_type (module);
	slingshot_widgets_page_checker_register_type (module);
	slingshot_widgets_favorites_sidebar_register_type (module);
	slingshot_widgets_favorites_sidebar_favorite_row_register_type (module);
	slingshot_slingshot_view_register_type (module);
	slingshot_dbus_service_register_type (module);
	slingshot_dbus_service_service_register_type (module);
	slingshot_app_context_menu_register_type (module);
	slingshot_app_list_box_register_type (module);
	synapse_utils_async_once_register_type (module);
	synapse_match_register_type (module);
	synapse_base_action_register_type (module);
	synapse_terminal_runner_action_register_type (module);
	synapse_runner_action_register_type (module);
	synapse_activatable_register_type (module);
	synapse_action_provider_register_type (module);
	synapse_common_actions_register_type (module);
	synapse_clipboard_copy_action_register_type (module);
	synapse_default_match_register_type (module);
	synapse_config_object_register_type (module);
	synapse_config_service_register_type (module);
	synapse_search_provider_register_type (module);
	synapse_data_sink_register_type (module);
	synapse_data_sink_plugin_registry_register_type (module);
	synapse_data_sink_plugin_registry_plugin_info_register_type (module);
	synapse_data_sink_data_sink_configuration_register_type (module);
	synapse_dbus_service_register_type (module);
	synapse_desktop_file_info_register_type (module);
	synapse_desktop_file_service_register_type (module);
	synapse_relevancy_service_register_type (module);
	synapse_result_set_register_type (module);
	synapse_worker_link_register_type (module);
	synapse_item_provider_register_type (module);
	synapse_calculator_plugin_register_type (module);
	synapse_text_match_register_type (module);
	synapse_calculator_plugin_result_register_type (module);
	synapse_command_plugin_register_type (module);
	synapse_application_match_register_type (module);
	synapse_command_plugin_command_object_register_type (module);
	synapse_desktop_file_plugin_register_type (module);
	synapse_desktop_file_plugin_action_match_register_type (module);
	synapse_desktop_file_plugin_desktop_file_match_register_type (module);
	synapse_desktop_file_plugin_open_with_action_register_type (module);
	synapse_file_bookmark_plugin_register_type (module);
	synapse_file_bookmark_plugin_result_register_type (module);
	synapse_system_management_plugin_register_type (module);
	synapse_system_management_plugin_system_action_register_type (module);
	synapse_system_management_plugin_lock_action_register_type (module);
	synapse_system_management_plugin_log_out_action_register_type (module);
	synapse_system_management_plugin_suspend_action_register_type (module);
	synapse_system_management_plugin_hibernate_action_register_type (module);
	synapse_system_management_plugin_shutdown_action_register_type (module);
	synapse_system_management_plugin_restart_action_register_type (module);
	synapse_link_plugin_register_type (module);
	synapse_link_plugin_result_register_type (module);
	synapse_control_panel_plugin_register_type (module);
	synapse_control_panel_plugin_action_match_register_type (module);
	synapse_control_panel_plugin_desktop_file_match_register_type (module);
	synapse_control_panel_plugin_open_with_action_register_type (module);
	synapse_configurable_register_type (module);
	synapse_uri_match_register_type (module);
	synapse_search_match_register_type (module);
	synapse_free_desktop_dbus_register_type (module);
	synapse_free_desktop_dbus_proxy_register_dynamic_type (module);
	synapse_relevancy_backend_register_type (module);
	synapse_upower_object_register_type (module);
	synapse_upower_object_proxy_register_dynamic_type (module);
	synapse_console_kit_object_register_type (module);
	synapse_console_kit_object_proxy_register_dynamic_type (module);
	synapse_lock_object_register_type (module);
	synapse_lock_object_proxy_register_dynamic_type (module);
	synapse_log_out_object_register_type (module);
	synapse_log_out_object_proxy_register_dynamic_type (module);
	synapse_systemd_object_register_type (module);
	synapse_systemd_object_proxy_register_dynamic_type (module);
	app_list_row_register_type (module);
	app_center_dbus_register_type (module);
	app_center_dbus_proxy_register_dynamic_type (module);
	switcheroo_control_dbus_register_type (module);
	switcheroo_control_dbus_proxy_register_dynamic_type (module);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (module, peas_object_module_get_type ()) ? ((PeasObjectModule*) module) : NULL);
	objmodule = _tmp0_;
	peas_object_module_register_extension_type (objmodule, budgie_plugin_get_type (), APP_MENU_APPLET_TYPE_PLUGIN);
	_g_object_unref0 (objmodule);
}

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);
}

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

