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

/*
 * Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
 *
 * 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
 *
 * Authored by: Alain M. <alainmh23@gmail.com>
 */

#include <glib-object.h>
#include <adwaita.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gee.h>
#include <gtk/gtk.h>
#include "planify.h"
#include <gdk/gdk.h>

#define SERVICES_ACTION_MANAGER_ACTION_PREFIX "win."
#define SERVICES_ACTION_MANAGER_ACTION_QUIT_Q "action_quit_q"
#define SERVICES_ACTION_MANAGER_ACTION_QUIT_W "action_quit_w"
#define SERVICES_ACTION_MANAGER_ACTION_PREFERENCES "action_preferences"
#define SERVICES_ACTION_MANAGER_ACTION_SHORTCUTS "action_shortcuts"
#define SERVICES_ACTION_MANAGER_ACTION_ADD_TASK "action_add_task"
#define SERVICES_ACTION_MANAGER_ACTION_ADD_TASK_PASTE "action_add_task_paste"
#define SERVICES_ACTION_MANAGER_ACTION_OPEN_SEARCH "action_open_search"
#define SERVICES_ACTION_MANAGER_ACTION_SYNC_MANUALLY "action_sync_manually"
#define SERVICES_ACTION_MANAGER_ACTION_NEW_PROJECT "action_new_project"
#define SERVICES_ACTION_MANAGER_ACTION_NEW_SECTION "action_new_section"
#define SERVICES_ACTION_MANAGER_ACTION_VIEW_HOMEPAGE "action_view_homepage"
#define SERVICES_ACTION_MANAGER_ACTION_VIEW_INBOX "action_view_inbox"
#define SERVICES_ACTION_MANAGER_ACTION_VIEW_TODAY "action_view_today"
#define SERVICES_ACTION_MANAGER_ACTION_VIEW_SCHEDULED "action_view_scheduled"
#define SERVICES_ACTION_MANAGER_ACTION_VIEW_PINBOARD "action_view_pinboard"
#define SERVICES_ACTION_MANAGER_ACTION_VIEW_LABELS "action_view_labels"
#define SERVICES_ACTION_MANAGER_ACTION_VIEW_HOME "action_view_home"
#define SERVICES_ACTION_MANAGER_ACTION_SHOW_HIDE_SIDEBAR "action_show_hide_sidebar"
#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 SERVICES_TYPE_ACTION_MANAGER (services_action_manager_get_type ())
#define SERVICES_ACTION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SERVICES_TYPE_ACTION_MANAGER, ServicesActionManager))
#define SERVICES_ACTION_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SERVICES_TYPE_ACTION_MANAGER, ServicesActionManagerClass))
#define SERVICES_IS_ACTION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SERVICES_TYPE_ACTION_MANAGER))
#define SERVICES_IS_ACTION_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SERVICES_TYPE_ACTION_MANAGER))
#define SERVICES_ACTION_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SERVICES_TYPE_ACTION_MANAGER, ServicesActionManagerClass))

typedef struct _ServicesActionManager ServicesActionManager;
typedef struct _ServicesActionManagerClass ServicesActionManagerClass;
typedef struct _ServicesActionManagerPrivate ServicesActionManagerPrivate;

#define TYPE_PLANIFY (planify_get_type ())
#define PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PLANIFY, Planify))
#define PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PLANIFY, PlanifyClass))
#define IS_PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PLANIFY))
#define IS_PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PLANIFY))
#define PLANIFY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PLANIFY, PlanifyClass))

typedef struct _Planify Planify;
typedef struct _PlanifyClass PlanifyClass;

#define TYPE_MAIN_WINDOW (main_window_get_type ())
#define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN_WINDOW, MainWindow))
#define MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN_WINDOW, MainWindowClass))
#define IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN_WINDOW))
#define IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN_WINDOW))
#define MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN_WINDOW, MainWindowClass))

typedef struct _MainWindow MainWindow;
typedef struct _MainWindowClass MainWindowClass;
enum  {
	SERVICES_ACTION_MANAGER_0_PROPERTY,
	SERVICES_ACTION_MANAGER_APP_PROPERTY,
	SERVICES_ACTION_MANAGER_WINDOW_PROPERTY,
	SERVICES_ACTION_MANAGER_ACTIONS_PROPERTY,
	SERVICES_ACTION_MANAGER_NUM_PROPERTIES
};
static GParamSpec* services_action_manager_properties[SERVICES_ACTION_MANAGER_NUM_PROPERTIES];
typedef void (*GSimpleActionActivateCallback) (GSimpleAction* action, GVariant* parameter, gpointer user_data);
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define DIALOGS_QUICK_FIND_TYPE_QUICK_FIND (dialogs_quick_find_quick_find_get_type ())
#define DIALOGS_QUICK_FIND_QUICK_FIND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_QUICK_FIND_TYPE_QUICK_FIND, DialogsQuickFindQuickFind))
#define DIALOGS_QUICK_FIND_QUICK_FIND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_QUICK_FIND_TYPE_QUICK_FIND, DialogsQuickFindQuickFindClass))
#define DIALOGS_QUICK_FIND_IS_QUICK_FIND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_QUICK_FIND_TYPE_QUICK_FIND))
#define DIALOGS_QUICK_FIND_IS_QUICK_FIND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_QUICK_FIND_TYPE_QUICK_FIND))
#define DIALOGS_QUICK_FIND_QUICK_FIND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_QUICK_FIND_TYPE_QUICK_FIND, DialogsQuickFindQuickFindClass))

typedef struct _DialogsQuickFindQuickFind DialogsQuickFindQuickFind;
typedef struct _DialogsQuickFindQuickFindClass DialogsQuickFindQuickFindClass;
typedef struct _PlanifyPrivate PlanifyPrivate;

#define DIALOGS_TYPE_PROJECT (dialogs_project_get_type ())
#define DIALOGS_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_TYPE_PROJECT, DialogsProject))
#define DIALOGS_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_TYPE_PROJECT, DialogsProjectClass))
#define DIALOGS_IS_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_TYPE_PROJECT))
#define DIALOGS_IS_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_TYPE_PROJECT))
#define DIALOGS_PROJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_TYPE_PROJECT, DialogsProjectClass))

typedef struct _DialogsProject DialogsProject;
typedef struct _DialogsProjectClass DialogsProjectClass;
typedef struct _Block11Data Block11Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _ServicesActionManager {
	GObject parent_instance;
	ServicesActionManagerPrivate * priv;
};

struct _ServicesActionManagerClass {
	GObjectClass parent_class;
};

struct _ServicesActionManagerPrivate {
	Planify* _app;
	MainWindow* _window;
	GSimpleActionGroup* _actions;
};

struct _Planify {
	AdwApplication parent_instance;
	PlanifyPrivate * priv;
	MainWindow* main_window;
};

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

struct _Block11Data {
	int _ref_count_;
	ServicesActionManager* self;
	GdkClipboard* clipboard;
};

static gint ServicesActionManager_private_offset;
static gpointer services_action_manager_parent_class = NULL;
VALA_EXTERN GeeMultiMap* services_action_manager_action_accelerators;
GeeMultiMap* services_action_manager_action_accelerators = NULL;
VALA_EXTERN GeeMultiMap* services_action_manager_typing_accelerators;
GeeMultiMap* services_action_manager_typing_accelerators = NULL;
VALA_EXTERN Planify* planify__instance;

VALA_EXTERN GType services_action_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ServicesActionManager, g_object_unref)
VALA_EXTERN GType planify_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Planify, g_object_unref)
VALA_EXTERN GType main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MainWindow, g_object_unref)
static void services_action_manager_action_quit (ServicesActionManager* self);
static void _services_action_manager_action_quit_gsimple_action_activate_callback (GSimpleAction* action,
                                                                            GVariant* parameter,
                                                                            gpointer self);
static void services_action_manager_action_preferences (ServicesActionManager* self);
static void _services_action_manager_action_preferences_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                   GVariant* parameter,
                                                                                   gpointer self);
static void services_action_manager_action_shortcuts (ServicesActionManager* self);
static void _services_action_manager_action_shortcuts_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                 GVariant* parameter,
                                                                                 gpointer self);
static void services_action_manager_action_add_task (ServicesActionManager* self);
static void _services_action_manager_action_add_task_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                GVariant* parameter,
                                                                                gpointer self);
static void services_action_manager_action_add_task_paste (ServicesActionManager* self);
static void _services_action_manager_action_add_task_paste_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                      GVariant* parameter,
                                                                                      gpointer self);
static void services_action_manager_action_open_search (ServicesActionManager* self);
static void _services_action_manager_action_open_search_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                   GVariant* parameter,
                                                                                   gpointer self);
static void services_action_manager_action_sync_manually (ServicesActionManager* self);
static void _services_action_manager_action_sync_manually_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                     GVariant* parameter,
                                                                                     gpointer self);
static void services_action_manager_action_new_project (ServicesActionManager* self);
static void _services_action_manager_action_new_project_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                   GVariant* parameter,
                                                                                   gpointer self);
static void services_action_manager_action_new_section (ServicesActionManager* self);
static void _services_action_manager_action_new_section_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                   GVariant* parameter,
                                                                                   gpointer self);
static void services_action_manager_action_view_homepage (ServicesActionManager* self);
static void _services_action_manager_action_view_homepage_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                     GVariant* parameter,
                                                                                     gpointer self);
static void services_action_manager_action_view_inbox (ServicesActionManager* self);
static void _services_action_manager_action_view_inbox_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                  GVariant* parameter,
                                                                                  gpointer self);
static void services_action_manager_action_view_today (ServicesActionManager* self);
static void _services_action_manager_action_view_today_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                  GVariant* parameter,
                                                                                  gpointer self);
static void services_action_manager_action_view_scheduled (ServicesActionManager* self);
static void _services_action_manager_action_view_scheduled_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                      GVariant* parameter,
                                                                                      gpointer self);
static void services_action_manager_action_view_pinboard (ServicesActionManager* self);
static void _services_action_manager_action_view_pinboard_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                     GVariant* parameter,
                                                                                     gpointer self);
static void services_action_manager_action_view_labels (ServicesActionManager* self);
static void _services_action_manager_action_view_labels_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                   GVariant* parameter,
                                                                                   gpointer self);
static void services_action_manager_action_view_home (ServicesActionManager* self);
static void _services_action_manager_action_view_home_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                 GVariant* parameter,
                                                                                 gpointer self);
static void services_action_manager_action_show_hide_sidebar (ServicesActionManager* self);
static void _services_action_manager_action_show_hide_sidebar_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                         GVariant* parameter,
                                                                                         gpointer self);
VALA_EXTERN ServicesActionManager* services_action_manager_new (Planify* app,
                                                    MainWindow* window);
VALA_EXTERN ServicesActionManager* services_action_manager_construct (GType object_type,
                                                          Planify* app,
                                                          MainWindow* window);
static void services_action_manager_disable_typing_accels (ServicesActionManager* self);
VALA_EXTERN Planify* services_action_manager_get_app (ServicesActionManager* self);
static void services_action_manager_disable_action_accels (ServicesActionManager* self);
static void services_action_manager_enable_typing_accels (ServicesActionManager* self);
static void _vala_array_add1 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void services_action_manager_enable_action_accels (ServicesActionManager* self);
static void _vala_array_add2 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void services_action_manager_disable_all_accel (ServicesActionManager* self);
static void services_action_manager_enable_all_accel (ServicesActionManager* self);
VALA_EXTERN MainWindow* services_action_manager_get_window (ServicesActionManager* self);
VALA_EXTERN void main_window_open_preferences_window (MainWindow* self);
VALA_EXTERN GType dialogs_quick_find_quick_find_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsQuickFindQuickFind, g_object_unref)
VALA_EXTERN DialogsQuickFindQuickFind* dialogs_quick_find_quick_find_new (void);
VALA_EXTERN DialogsQuickFindQuickFind* dialogs_quick_find_quick_find_construct (GType object_type);
VALA_EXTERN GType dialogs_project_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsProject, g_object_unref)
VALA_EXTERN DialogsProject* dialogs_project_new_new (const gchar* source_id,
                                         gboolean backend_picker,
                                         const gchar* parent_id);
VALA_EXTERN DialogsProject* dialogs_project_construct_new (GType object_type,
                                               const gchar* source_id,
                                               gboolean backend_picker,
                                               const gchar* parent_id);
VALA_EXTERN void main_window_go_homepage (MainWindow* self);
VALA_EXTERN void main_window_show_hide_sidebar (MainWindow* self);
VALA_EXTERN void main_window_new_section_action (MainWindow* self);
VALA_EXTERN void main_window_add_task_action (MainWindow* self,
                                  const gchar* content);
static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static void __lambda891_ (Block11Data* _data11_,
                   GObject* obj,
                   GAsyncResult* res);
static void ___lambda891__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
VALA_EXTERN void main_window_open_shortcuts_window (MainWindow* self);
static void services_action_manager_set_app (ServicesActionManager* self,
                                      Planify* value);
static void services_action_manager_set_window (ServicesActionManager* self,
                                         MainWindow* value);
VALA_EXTERN GSimpleActionGroup* services_action_manager_get_actions (ServicesActionManager* self);
static void services_action_manager_set_actions (ServicesActionManager* self,
                                          GSimpleActionGroup* value);
static GObject * services_action_manager_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
static void _vala_array_add3 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void _services_action_manager_disable_typing_accels_services_event_bus_disconnect_typing_accel (ServicesEventBus* _sender,
                                                                                                gpointer self);
static void _services_action_manager_enable_typing_accels_services_event_bus_connect_typing_accel (ServicesEventBus* _sender,
                                                                                            gpointer self);
static void _services_action_manager_disable_all_accel_services_event_bus_disconnect_all_accels (ServicesEventBus* _sender,
                                                                                          gpointer self);
static void _services_action_manager_enable_all_accel_services_event_bus_connect_all_accels (ServicesEventBus* _sender,
                                                                                      gpointer self);
static void services_action_manager_finalize (GObject * obj);
static GType services_action_manager_get_type_once (void);
static void _vala_services_action_manager_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_services_action_manager_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);
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 const GActionEntry SERVICES_ACTION_MANAGER_ACTION_ENTRIES[18] = {{SERVICES_ACTION_MANAGER_ACTION_QUIT_Q, _services_action_manager_action_quit_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_QUIT_W, _services_action_manager_action_quit_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_PREFERENCES, _services_action_manager_action_preferences_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_SHORTCUTS, _services_action_manager_action_shortcuts_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_ADD_TASK, _services_action_manager_action_add_task_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_ADD_TASK_PASTE, _services_action_manager_action_add_task_paste_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_OPEN_SEARCH, _services_action_manager_action_open_search_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_SYNC_MANUALLY, _services_action_manager_action_sync_manually_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_NEW_PROJECT, _services_action_manager_action_new_project_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_NEW_SECTION, _services_action_manager_action_new_section_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_VIEW_HOMEPAGE, _services_action_manager_action_view_homepage_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_VIEW_INBOX, _services_action_manager_action_view_inbox_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_VIEW_TODAY, _services_action_manager_action_view_today_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_VIEW_SCHEDULED, _services_action_manager_action_view_scheduled_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_VIEW_PINBOARD, _services_action_manager_action_view_pinboard_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_VIEW_LABELS, _services_action_manager_action_view_labels_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_VIEW_HOME, _services_action_manager_action_view_home_gsimple_action_activate_callback}, {SERVICES_ACTION_MANAGER_ACTION_SHOW_HIDE_SIDEBAR, _services_action_manager_action_show_hide_sidebar_gsimple_action_activate_callback}};

static inline gpointer
services_action_manager_get_instance_private (ServicesActionManager* self)
{
	return G_STRUCT_MEMBER_P (self, ServicesActionManager_private_offset);
}

static void
_services_action_manager_action_quit_gsimple_action_activate_callback (GSimpleAction* action,
                                                                       GVariant* parameter,
                                                                       gpointer self)
{
	services_action_manager_action_quit ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_preferences_gsimple_action_activate_callback (GSimpleAction* action,
                                                                              GVariant* parameter,
                                                                              gpointer self)
{
	services_action_manager_action_preferences ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_shortcuts_gsimple_action_activate_callback (GSimpleAction* action,
                                                                            GVariant* parameter,
                                                                            gpointer self)
{
	services_action_manager_action_shortcuts ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_add_task_gsimple_action_activate_callback (GSimpleAction* action,
                                                                           GVariant* parameter,
                                                                           gpointer self)
{
	services_action_manager_action_add_task ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_add_task_paste_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                 GVariant* parameter,
                                                                                 gpointer self)
{
	services_action_manager_action_add_task_paste ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_open_search_gsimple_action_activate_callback (GSimpleAction* action,
                                                                              GVariant* parameter,
                                                                              gpointer self)
{
	services_action_manager_action_open_search ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_sync_manually_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                GVariant* parameter,
                                                                                gpointer self)
{
	services_action_manager_action_sync_manually ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_new_project_gsimple_action_activate_callback (GSimpleAction* action,
                                                                              GVariant* parameter,
                                                                              gpointer self)
{
	services_action_manager_action_new_project ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_new_section_gsimple_action_activate_callback (GSimpleAction* action,
                                                                              GVariant* parameter,
                                                                              gpointer self)
{
	services_action_manager_action_new_section ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_view_homepage_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                GVariant* parameter,
                                                                                gpointer self)
{
	services_action_manager_action_view_homepage ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_view_inbox_gsimple_action_activate_callback (GSimpleAction* action,
                                                                             GVariant* parameter,
                                                                             gpointer self)
{
	services_action_manager_action_view_inbox ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_view_today_gsimple_action_activate_callback (GSimpleAction* action,
                                                                             GVariant* parameter,
                                                                             gpointer self)
{
	services_action_manager_action_view_today ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_view_scheduled_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                 GVariant* parameter,
                                                                                 gpointer self)
{
	services_action_manager_action_view_scheduled ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_view_pinboard_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                GVariant* parameter,
                                                                                gpointer self)
{
	services_action_manager_action_view_pinboard ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_view_labels_gsimple_action_activate_callback (GSimpleAction* action,
                                                                              GVariant* parameter,
                                                                              gpointer self)
{
	services_action_manager_action_view_labels ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_view_home_gsimple_action_activate_callback (GSimpleAction* action,
                                                                            GVariant* parameter,
                                                                            gpointer self)
{
	services_action_manager_action_view_home ((ServicesActionManager*) self);
}

static void
_services_action_manager_action_show_hide_sidebar_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                    GVariant* parameter,
                                                                                    gpointer self)
{
	services_action_manager_action_show_hide_sidebar ((ServicesActionManager*) self);
}

ServicesActionManager*
services_action_manager_construct (GType object_type,
                                   Planify* app,
                                   MainWindow* window)
{
	ServicesActionManager * self = NULL;
	g_return_val_if_fail (app != NULL, NULL);
	g_return_val_if_fail (window != NULL, NULL);
	self = (ServicesActionManager*) g_object_new (object_type, "app", app, "window", window, NULL);
	return self;
}

ServicesActionManager*
services_action_manager_new (Planify* app,
                             MainWindow* window)
{
	return services_action_manager_construct (SERVICES_TYPE_ACTION_MANAGER, app, window);
}

static void
services_action_manager_disable_typing_accels (ServicesActionManager* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _action_it = NULL;
		GeeMultiMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeIterator* _tmp3_;
		GeeIterator* _tmp4_;
		_tmp0_ = services_action_manager_typing_accelerators;
		_tmp1_ = gee_multi_map_get_keys (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
		_tmp4_ = _tmp3_;
		_g_object_unref0 (_tmp2_);
		_action_it = _tmp4_;
		while (TRUE) {
			GeeIterator* _tmp5_;
			gchar* action = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			Planify* _tmp8_;
			const gchar* _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			gchar** _tmp12_;
			gchar** _tmp13_;
			gint _tmp13__length1;
			_tmp5_ = _action_it;
			if (!gee_iterator_next (_tmp5_)) {
				break;
			}
			_tmp6_ = _action_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			action = (gchar*) _tmp7_;
			_tmp8_ = self->priv->_app;
			_tmp9_ = action;
			_tmp10_ = g_strconcat (SERVICES_ACTION_MANAGER_ACTION_PREFIX, _tmp9_, NULL);
			_tmp11_ = _tmp10_;
			_tmp12_ = g_new0 (gchar*, 0 + 1);
			_tmp13_ = _tmp12_;
			_tmp13__length1 = 0;
			gtk_application_set_accels_for_action ((GtkApplication*) _tmp8_, _tmp11_, _tmp13_);
			_tmp13_ = (_vala_array_free (_tmp13_, _tmp13__length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_tmp11_);
			_g_free0 (action);
		}
		_g_object_unref0 (_action_it);
	}
}

static void
services_action_manager_disable_action_accels (ServicesActionManager* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _action_it = NULL;
		GeeMultiMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeIterator* _tmp3_;
		GeeIterator* _tmp4_;
		_tmp0_ = services_action_manager_action_accelerators;
		_tmp1_ = gee_multi_map_get_keys (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
		_tmp4_ = _tmp3_;
		_g_object_unref0 (_tmp2_);
		_action_it = _tmp4_;
		while (TRUE) {
			GeeIterator* _tmp5_;
			gchar* action = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			Planify* _tmp8_;
			const gchar* _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			gchar** _tmp12_;
			gchar** _tmp13_;
			gint _tmp13__length1;
			_tmp5_ = _action_it;
			if (!gee_iterator_next (_tmp5_)) {
				break;
			}
			_tmp6_ = _action_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			action = (gchar*) _tmp7_;
			_tmp8_ = self->priv->_app;
			_tmp9_ = action;
			_tmp10_ = g_strconcat (SERVICES_ACTION_MANAGER_ACTION_PREFIX, _tmp9_, NULL);
			_tmp11_ = _tmp10_;
			_tmp12_ = g_new0 (gchar*, 0 + 1);
			_tmp13_ = _tmp12_;
			_tmp13__length1 = 0;
			gtk_application_set_accels_for_action ((GtkApplication*) _tmp8_, _tmp11_, _tmp13_);
			_tmp13_ = (_vala_array_free (_tmp13_, _tmp13__length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_tmp11_);
			_g_free0 (action);
		}
		_g_object_unref0 (_action_it);
	}
}

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
services_action_manager_enable_typing_accels (ServicesActionManager* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _action_it = NULL;
		GeeMultiMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeIterator* _tmp3_;
		GeeIterator* _tmp4_;
		_tmp0_ = services_action_manager_typing_accelerators;
		_tmp1_ = gee_multi_map_get_keys (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
		_tmp4_ = _tmp3_;
		_g_object_unref0 (_tmp2_);
		_action_it = _tmp4_;
		while (TRUE) {
			GeeIterator* _tmp5_;
			gchar* action = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			gchar** accels_array = NULL;
			GeeMultiMap* _tmp8_;
			const gchar* _tmp9_;
			GeeCollection* _tmp10_;
			GeeCollection* _tmp11_;
			gint _tmp12_ = 0;
			gpointer* _tmp13_;
			gchar** _tmp14_;
			gint _tmp14__length1;
			gint accels_array_length1;
			gint _accels_array_size_;
			Planify* _tmp15_;
			const gchar* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			gchar** _tmp19_;
			gint _tmp19__length1;
			_tmp5_ = _action_it;
			if (!gee_iterator_next (_tmp5_)) {
				break;
			}
			_tmp6_ = _action_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			action = (gchar*) _tmp7_;
			_tmp8_ = services_action_manager_typing_accelerators;
			_tmp9_ = action;
			_tmp10_ = gee_multi_map_get (_tmp8_, _tmp9_);
			_tmp11_ = _tmp10_;
			_tmp13_ = gee_collection_to_array (_tmp11_, &_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp14__length1 = _tmp12_;
			_g_object_unref0 (_tmp11_);
			accels_array = _tmp14_;
			accels_array_length1 = _tmp14__length1;
			_accels_array_size_ = accels_array_length1;
			_vala_array_add1 (&accels_array, &accels_array_length1, &_accels_array_size_, NULL);
			_tmp15_ = self->priv->_app;
			_tmp16_ = action;
			_tmp17_ = g_strconcat (SERVICES_ACTION_MANAGER_ACTION_PREFIX, _tmp16_, NULL);
			_tmp18_ = _tmp17_;
			_tmp19_ = accels_array;
			_tmp19__length1 = accels_array_length1;
			gtk_application_set_accels_for_action ((GtkApplication*) _tmp15_, _tmp18_, _tmp19_);
			_g_free0 (_tmp18_);
			accels_array = (_vala_array_free (accels_array, accels_array_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (action);
		}
		_g_object_unref0 (_action_it);
	}
}

static void
_vala_array_add2 (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
services_action_manager_enable_action_accels (ServicesActionManager* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _action_it = NULL;
		GeeMultiMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeIterator* _tmp3_;
		GeeIterator* _tmp4_;
		_tmp0_ = services_action_manager_action_accelerators;
		_tmp1_ = gee_multi_map_get_keys (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
		_tmp4_ = _tmp3_;
		_g_object_unref0 (_tmp2_);
		_action_it = _tmp4_;
		while (TRUE) {
			GeeIterator* _tmp5_;
			gchar* action = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			gchar** accels_array = NULL;
			GeeMultiMap* _tmp8_;
			const gchar* _tmp9_;
			GeeCollection* _tmp10_;
			GeeCollection* _tmp11_;
			gint _tmp12_ = 0;
			gpointer* _tmp13_;
			gchar** _tmp14_;
			gint _tmp14__length1;
			gint accels_array_length1;
			gint _accels_array_size_;
			Planify* _tmp15_;
			const gchar* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			gchar** _tmp19_;
			gint _tmp19__length1;
			_tmp5_ = _action_it;
			if (!gee_iterator_next (_tmp5_)) {
				break;
			}
			_tmp6_ = _action_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			action = (gchar*) _tmp7_;
			_tmp8_ = services_action_manager_action_accelerators;
			_tmp9_ = action;
			_tmp10_ = gee_multi_map_get (_tmp8_, _tmp9_);
			_tmp11_ = _tmp10_;
			_tmp13_ = gee_collection_to_array (_tmp11_, &_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp14__length1 = _tmp12_;
			_g_object_unref0 (_tmp11_);
			accels_array = _tmp14_;
			accels_array_length1 = _tmp14__length1;
			_accels_array_size_ = accels_array_length1;
			_vala_array_add2 (&accels_array, &accels_array_length1, &_accels_array_size_, NULL);
			_tmp15_ = self->priv->_app;
			_tmp16_ = action;
			_tmp17_ = g_strconcat (SERVICES_ACTION_MANAGER_ACTION_PREFIX, _tmp16_, NULL);
			_tmp18_ = _tmp17_;
			_tmp19_ = accels_array;
			_tmp19__length1 = accels_array_length1;
			gtk_application_set_accels_for_action ((GtkApplication*) _tmp15_, _tmp18_, _tmp19_);
			_g_free0 (_tmp18_);
			accels_array = (_vala_array_free (accels_array, accels_array_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (action);
		}
		_g_object_unref0 (_action_it);
	}
}

static void
services_action_manager_disable_all_accel (ServicesActionManager* self)
{
	g_return_if_fail (self != NULL);
	services_action_manager_disable_typing_accels (self);
	services_action_manager_disable_action_accels (self);
}

static void
services_action_manager_enable_all_accel (ServicesActionManager* self)
{
	g_return_if_fail (self != NULL);
	services_action_manager_enable_typing_accels (self);
	services_action_manager_enable_action_accels (self);
}

static void
services_action_manager_action_quit (ServicesActionManager* self)
{
	MainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_window;
	gtk_window_destroy ((GtkWindow*) _tmp0_);
}

static void
services_action_manager_action_preferences (ServicesActionManager* self)
{
	MainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_window;
	main_window_open_preferences_window (_tmp0_);
}

static void
services_action_manager_action_open_search (ServicesActionManager* self)
{
	DialogsQuickFindQuickFind* dialog = NULL;
	DialogsQuickFindQuickFind* _tmp0_;
	Planify* _tmp1_;
	MainWindow* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = dialogs_quick_find_quick_find_new ();
	g_object_ref_sink (_tmp0_);
	dialog = _tmp0_;
	_tmp1_ = planify__instance;
	_tmp2_ = _tmp1_->main_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp2_);
	_g_object_unref0 (dialog);
}

static void
services_action_manager_action_sync_manually (ServicesActionManager* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeArrayList* _source_list = NULL;
		ServicesStore* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _tmp2_;
		gint _source_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _source_index = 0;
		_tmp0_ = services_store_instance ();
		_tmp1_ = services_store_get_sources (_tmp0_);
		_tmp2_ = _tmp1_;
		_source_list = _tmp2_;
		_tmp3_ = _source_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_source_size = _tmp5_;
		_source_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			ObjectsSource* source = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			ObjectsSource* _tmp10_;
			_source_index = _source_index + 1;
			_tmp6_ = _source_index;
			_tmp7_ = _source_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _source_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _source_index);
			source = (ObjectsSource*) _tmp9_;
			_tmp10_ = source;
			objects_source_run_server (_tmp10_, FALSE);
			_g_object_unref0 (source);
		}
	}
}

static void
services_action_manager_action_new_project (ServicesActionManager* self)
{
	ObjectsSource* default_source = NULL;
	ServicesStore* _tmp0_;
	ObjectsSource* _tmp1_;
	gchar* _tmp2_ = NULL;
	ObjectsSource* _tmp3_;
	gchar* source_id = NULL;
	gchar* _tmp9_;
	DialogsProject* dialog = NULL;
	DialogsProject* _tmp10_;
	Planify* _tmp11_;
	MainWindow* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = services_store_instance ();
	_tmp1_ = services_store_get_default_source (_tmp0_);
	default_source = _tmp1_;
	_tmp3_ = default_source;
	if (_tmp3_ != NULL) {
		ObjectsSource* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = default_source;
		_tmp5_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strdup (_tmp6_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp7_;
	} else {
		gchar* _tmp8_;
		_tmp8_ = source_type_to_string (SOURCE_TYPE_LOCAL);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp8_;
	}
	_tmp9_ = _tmp2_;
	_tmp2_ = NULL;
	source_id = _tmp9_;
	_tmp10_ = dialogs_project_new_new (source_id, TRUE, "");
	g_object_ref_sink (_tmp10_);
	dialog = _tmp10_;
	_tmp11_ = planify__instance;
	_tmp12_ = _tmp11_->main_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp12_);
	_g_object_unref0 (dialog);
	_g_free0 (source_id);
	_g_free0 (_tmp2_);
	_g_object_unref0 (default_source);
}

static void
services_action_manager_action_view_homepage (ServicesActionManager* self)
{
	MainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_window;
	main_window_go_homepage (_tmp0_);
}

static void
services_action_manager_action_view_inbox (ServicesActionManager* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	ObjectsFiltersInbox* _tmp2_;
	ObjectsFiltersInbox* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_filters_inbox_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_base_object_get_view_id ((ObjectsBaseObject*) _tmp3_);
	_tmp5_ = _tmp4_;
	g_signal_emit_by_name (_tmp1_, "pane-selected", PANE_TYPE_FILTER, _tmp5_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
}

static void
services_action_manager_action_view_today (ServicesActionManager* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	ObjectsFiltersToday* _tmp2_;
	ObjectsFiltersToday* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_filters_today_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_base_object_get_view_id ((ObjectsBaseObject*) _tmp3_);
	_tmp5_ = _tmp4_;
	g_signal_emit_by_name (_tmp1_, "pane-selected", PANE_TYPE_FILTER, _tmp5_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
}

static void
services_action_manager_action_view_scheduled (ServicesActionManager* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	ObjectsFiltersScheduled* _tmp2_;
	ObjectsFiltersScheduled* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_filters_scheduled_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_base_object_get_view_id ((ObjectsBaseObject*) _tmp3_);
	_tmp5_ = _tmp4_;
	g_signal_emit_by_name (_tmp1_, "pane-selected", PANE_TYPE_FILTER, _tmp5_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
}

static void
services_action_manager_action_view_labels (ServicesActionManager* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	ObjectsFiltersLabels* _tmp2_;
	ObjectsFiltersLabels* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_filters_labels_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_base_object_get_view_id ((ObjectsBaseObject*) _tmp3_);
	_tmp5_ = _tmp4_;
	g_signal_emit_by_name (_tmp1_, "pane-selected", PANE_TYPE_FILTER, _tmp5_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
}

static void
services_action_manager_action_view_pinboard (ServicesActionManager* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	ObjectsFiltersPinboard* _tmp2_;
	ObjectsFiltersPinboard* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_filters_pinboard_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_base_object_get_view_id ((ObjectsBaseObject*) _tmp3_);
	_tmp5_ = _tmp4_;
	g_signal_emit_by_name (_tmp1_, "pane-selected", PANE_TYPE_FILTER, _tmp5_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
}

static void
services_action_manager_action_show_hide_sidebar (ServicesActionManager* self)
{
	MainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_window;
	main_window_show_hide_sidebar (_tmp0_);
}

static void
services_action_manager_action_new_section (ServicesActionManager* self)
{
	MainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_window;
	main_window_new_section_action (_tmp0_);
}

static void
services_action_manager_action_add_task (ServicesActionManager* self)
{
	MainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_window;
	main_window_add_task_action (_tmp0_, "");
}

static Block11Data*
block11_data_ref (Block11Data* _data11_)
{
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}

static void
block11_data_unref (void * _userdata_)
{
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		ServicesActionManager* self;
		self = _data11_->self;
		_g_object_unref0 (_data11_->clipboard);
		_g_object_unref0 (self);
		g_slice_free (Block11Data, _data11_);
	}
}

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

static void
__lambda891_ (Block11Data* _data11_,
              GObject* obj,
              GAsyncResult* res)
{
	ServicesActionManager* self;
	GError* _inner_error0_ = NULL;
	self = _data11_->self;
	g_return_if_fail (res != NULL);
	{
		gchar* content = NULL;
		gchar* _tmp0_;
		MainWindow* _tmp1_;
		_tmp0_ = gdk_clipboard_read_text_finish (_data11_->clipboard, res, &_inner_error0_);
		content = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = self->priv->_window;
		main_window_add_task_action (_tmp1_, content);
		_g_free0 (content);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = _error_;
		_tmp3_ = _tmp2_->message;
		g_debug ("ActionManager.vala:231: %s", _tmp3_);
		_g_error_free0 (_error_);
	}
	__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
___lambda891__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda891_ (self, source_object, res);
	block11_data_unref (self);
}

static void
services_action_manager_action_add_task_paste (ServicesActionManager* self)
{
	Block11Data* _data11_;
	GdkDisplay* _tmp0_;
	GdkClipboard* _tmp1_;
	GdkClipboard* _tmp2_;
	g_return_if_fail (self != NULL);
	_data11_ = g_slice_new0 (Block11Data);
	_data11_->_ref_count_ = 1;
	_data11_->self = g_object_ref (self);
	_tmp0_ = gdk_display_get_default ();
	_tmp1_ = gdk_display_get_clipboard (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data11_->clipboard = _tmp2_;
	gdk_clipboard_read_text_async (_data11_->clipboard, NULL, ___lambda891__gasync_ready_callback, block11_data_ref (_data11_));
	block11_data_unref (_data11_);
	_data11_ = NULL;
}

static void
services_action_manager_action_shortcuts (ServicesActionManager* self)
{
	MainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_window;
	main_window_open_shortcuts_window (_tmp0_);
}

static void
services_action_manager_action_view_home (ServicesActionManager* self)
{
	MainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_window;
	main_window_go_homepage (_tmp0_);
}

Planify*
services_action_manager_get_app (ServicesActionManager* self)
{
	Planify* result;
	Planify* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_app;
	result = _tmp0_;
	return result;
}

static void
services_action_manager_set_app (ServicesActionManager* self,
                                 Planify* value)
{
	Planify* old_value;
	g_return_if_fail (self != NULL);
	old_value = services_action_manager_get_app (self);
	if (old_value != value) {
		Planify* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_app);
		self->priv->_app = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, services_action_manager_properties[SERVICES_ACTION_MANAGER_APP_PROPERTY]);
	}
}

MainWindow*
services_action_manager_get_window (ServicesActionManager* self)
{
	MainWindow* result;
	MainWindow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_window;
	result = _tmp0_;
	return result;
}

static void
services_action_manager_set_window (ServicesActionManager* self,
                                    MainWindow* value)
{
	MainWindow* old_value;
	g_return_if_fail (self != NULL);
	old_value = services_action_manager_get_window (self);
	if (old_value != value) {
		MainWindow* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_window);
		self->priv->_window = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, services_action_manager_properties[SERVICES_ACTION_MANAGER_WINDOW_PROPERTY]);
	}
}

GSimpleActionGroup*
services_action_manager_get_actions (ServicesActionManager* self)
{
	GSimpleActionGroup* result;
	GSimpleActionGroup* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_actions;
	result = _tmp0_;
	return result;
}

static void
services_action_manager_set_actions (ServicesActionManager* self,
                                     GSimpleActionGroup* value)
{
	GSimpleActionGroup* old_value;
	g_return_if_fail (self != NULL);
	old_value = services_action_manager_get_actions (self);
	if (old_value != value) {
		GSimpleActionGroup* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_actions);
		self->priv->_actions = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, services_action_manager_properties[SERVICES_ACTION_MANAGER_ACTIONS_PROPERTY]);
	}
}

static void
_vala_array_add3 (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
_services_action_manager_disable_typing_accels_services_event_bus_disconnect_typing_accel (ServicesEventBus* _sender,
                                                                                           gpointer self)
{
	services_action_manager_disable_typing_accels ((ServicesActionManager*) self);
}

static void
_services_action_manager_enable_typing_accels_services_event_bus_connect_typing_accel (ServicesEventBus* _sender,
                                                                                       gpointer self)
{
	services_action_manager_enable_typing_accels ((ServicesActionManager*) self);
}

static void
_services_action_manager_disable_all_accel_services_event_bus_disconnect_all_accels (ServicesEventBus* _sender,
                                                                                     gpointer self)
{
	services_action_manager_disable_all_accel ((ServicesActionManager*) self);
}

static void
_services_action_manager_enable_all_accel_services_event_bus_connect_all_accels (ServicesEventBus* _sender,
                                                                                 gpointer self)
{
	services_action_manager_enable_all_accel ((ServicesActionManager*) self);
}

static GObject *
services_action_manager_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ServicesActionManager * self;
	GSimpleActionGroup* _tmp0_;
	GSimpleActionGroup* _tmp1_;
	GSimpleActionGroup* _tmp2_;
	MainWindow* _tmp3_;
	GSimpleActionGroup* _tmp4_;
	ServicesEventBus* _tmp25_;
	ServicesEventBus* _tmp26_;
	ServicesEventBus* _tmp27_;
	ServicesEventBus* _tmp28_;
	ServicesEventBus* _tmp29_;
	ServicesEventBus* _tmp30_;
	ServicesEventBus* _tmp31_;
	ServicesEventBus* _tmp32_;
	parent_class = G_OBJECT_CLASS (services_action_manager_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SERVICES_TYPE_ACTION_MANAGER, ServicesActionManager);
	_tmp0_ = g_simple_action_group_new ();
	_tmp1_ = _tmp0_;
	services_action_manager_set_actions (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = self->priv->_actions;
	g_action_map_add_action_entries ((GActionMap*) _tmp2_, SERVICES_ACTION_MANAGER_ACTION_ENTRIES, (gint) G_N_ELEMENTS (SERVICES_ACTION_MANAGER_ACTION_ENTRIES), self);
	_tmp3_ = self->priv->_window;
	_tmp4_ = self->priv->_actions;
	gtk_widget_insert_action_group ((GtkWidget*) _tmp3_, "win", (GActionGroup*) _tmp4_);
	{
		GeeIterator* _action_it = NULL;
		GeeMultiMap* _tmp5_;
		GeeSet* _tmp6_;
		GeeSet* _tmp7_;
		GeeIterator* _tmp8_;
		GeeIterator* _tmp9_;
		_tmp5_ = services_action_manager_action_accelerators;
		_tmp6_ = gee_multi_map_get_keys (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_);
		_tmp9_ = _tmp8_;
		_g_object_unref0 (_tmp7_);
		_action_it = _tmp9_;
		while (TRUE) {
			GeeIterator* _tmp10_;
			gchar* action = NULL;
			GeeIterator* _tmp11_;
			gpointer _tmp12_;
			gchar** accels_array = NULL;
			GeeMultiMap* _tmp13_;
			const gchar* _tmp14_;
			GeeCollection* _tmp15_;
			GeeCollection* _tmp16_;
			gint _tmp17_ = 0;
			gpointer* _tmp18_;
			gchar** _tmp19_;
			gint _tmp19__length1;
			gint accels_array_length1;
			gint _accels_array_size_;
			Planify* _tmp20_;
			const gchar* _tmp21_;
			gchar* _tmp22_;
			gchar* _tmp23_;
			gchar** _tmp24_;
			gint _tmp24__length1;
			_tmp10_ = _action_it;
			if (!gee_iterator_next (_tmp10_)) {
				break;
			}
			_tmp11_ = _action_it;
			_tmp12_ = gee_iterator_get (_tmp11_);
			action = (gchar*) _tmp12_;
			_tmp13_ = services_action_manager_action_accelerators;
			_tmp14_ = action;
			_tmp15_ = gee_multi_map_get (_tmp13_, _tmp14_);
			_tmp16_ = _tmp15_;
			_tmp18_ = gee_collection_to_array (_tmp16_, &_tmp17_);
			_tmp19_ = _tmp18_;
			_tmp19__length1 = _tmp17_;
			_g_object_unref0 (_tmp16_);
			accels_array = _tmp19_;
			accels_array_length1 = _tmp19__length1;
			_accels_array_size_ = accels_array_length1;
			_vala_array_add3 (&accels_array, &accels_array_length1, &_accels_array_size_, NULL);
			_tmp20_ = self->priv->_app;
			_tmp21_ = action;
			_tmp22_ = g_strconcat (SERVICES_ACTION_MANAGER_ACTION_PREFIX, _tmp21_, NULL);
			_tmp23_ = _tmp22_;
			_tmp24_ = accels_array;
			_tmp24__length1 = accels_array_length1;
			gtk_application_set_accels_for_action ((GtkApplication*) _tmp20_, _tmp23_, _tmp24_);
			_g_free0 (_tmp23_);
			accels_array = (_vala_array_free (accels_array, accels_array_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (action);
		}
		_g_object_unref0 (_action_it);
	}
	services_action_manager_enable_typing_accels (self);
	_tmp25_ = services_event_bus_get_default ();
	_tmp26_ = _tmp25_;
	g_signal_connect_object (_tmp26_, "disconnect-typing-accel", (GCallback) _services_action_manager_disable_typing_accels_services_event_bus_disconnect_typing_accel, self, 0);
	_g_object_unref0 (_tmp26_);
	_tmp27_ = services_event_bus_get_default ();
	_tmp28_ = _tmp27_;
	g_signal_connect_object (_tmp28_, "connect-typing-accel", (GCallback) _services_action_manager_enable_typing_accels_services_event_bus_connect_typing_accel, self, 0);
	_g_object_unref0 (_tmp28_);
	_tmp29_ = services_event_bus_get_default ();
	_tmp30_ = _tmp29_;
	g_signal_connect_object (_tmp30_, "disconnect-all-accels", (GCallback) _services_action_manager_disable_all_accel_services_event_bus_disconnect_all_accels, self, 0);
	_g_object_unref0 (_tmp30_);
	_tmp31_ = services_event_bus_get_default ();
	_tmp32_ = _tmp31_;
	g_signal_connect_object (_tmp32_, "connect-all-accels", (GCallback) _services_action_manager_enable_all_accel_services_event_bus_connect_all_accels, self, 0);
	_g_object_unref0 (_tmp32_);
	return obj;
}

static void
services_action_manager_class_init (ServicesActionManagerClass * klass,
                                    gpointer klass_data)
{
	GeeHashMultiMap* _tmp0_;
	GeeHashMultiMap* _tmp1_;
	GeeMultiMap* _tmp2_;
	GeeMultiMap* _tmp3_;
	GeeMultiMap* _tmp4_;
	GeeMultiMap* _tmp5_;
	GeeMultiMap* _tmp6_;
	GeeMultiMap* _tmp7_;
	GeeMultiMap* _tmp8_;
	GeeMultiMap* _tmp9_;
	GeeMultiMap* _tmp10_;
	GeeMultiMap* _tmp11_;
	GeeMultiMap* _tmp12_;
	GeeMultiMap* _tmp13_;
	GeeMultiMap* _tmp14_;
	GeeMultiMap* _tmp15_;
	GeeMultiMap* _tmp16_;
	GeeMultiMap* _tmp17_;
	GeeMultiMap* _tmp18_;
	GeeMultiMap* _tmp19_;
	services_action_manager_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ServicesActionManager_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_services_action_manager_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_services_action_manager_set_property;
	G_OBJECT_CLASS (klass)->constructor = services_action_manager_constructor;
	G_OBJECT_CLASS (klass)->finalize = services_action_manager_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SERVICES_ACTION_MANAGER_APP_PROPERTY, services_action_manager_properties[SERVICES_ACTION_MANAGER_APP_PROPERTY] = g_param_spec_object ("app", "app", "app", TYPE_PLANIFY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SERVICES_ACTION_MANAGER_WINDOW_PROPERTY, services_action_manager_properties[SERVICES_ACTION_MANAGER_WINDOW_PROPERTY] = g_param_spec_object ("window", "window", "window", TYPE_MAIN_WINDOW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SERVICES_ACTION_MANAGER_ACTIONS_PROPERTY, services_action_manager_properties[SERVICES_ACTION_MANAGER_ACTIONS_PROPERTY] = g_param_spec_object ("actions", "actions", "actions", g_simple_action_group_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	_tmp0_ = gee_hash_multi_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, NULL, NULL, NULL, NULL, NULL, NULL);
	services_action_manager_action_accelerators = (GeeMultiMap*) _tmp0_;
	_tmp1_ = gee_hash_multi_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, NULL, NULL, NULL, NULL, NULL, NULL);
	services_action_manager_typing_accelerators = (GeeMultiMap*) _tmp1_;
	_tmp2_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp2_, SERVICES_ACTION_MANAGER_ACTION_QUIT_Q, "<Control>q");
	_tmp3_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp3_, SERVICES_ACTION_MANAGER_ACTION_QUIT_W, "<Control>w");
	_tmp4_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp4_, SERVICES_ACTION_MANAGER_ACTION_PREFERENCES, "<Control>comma");
	_tmp5_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp5_, SERVICES_ACTION_MANAGER_ACTION_SHORTCUTS, "F1");
	_tmp6_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp6_, SERVICES_ACTION_MANAGER_ACTION_OPEN_SEARCH, "<Control>f");
	_tmp7_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp7_, SERVICES_ACTION_MANAGER_ACTION_SYNC_MANUALLY, "<Control>s");
	_tmp8_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp8_, SERVICES_ACTION_MANAGER_ACTION_VIEW_HOMEPAGE, "<Control>h");
	_tmp9_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp9_, SERVICES_ACTION_MANAGER_ACTION_VIEW_INBOX, "<Control>i");
	_tmp10_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp10_, SERVICES_ACTION_MANAGER_ACTION_VIEW_TODAY, "<Control>t");
	_tmp11_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp11_, SERVICES_ACTION_MANAGER_ACTION_VIEW_SCHEDULED, "<Control>u");
	_tmp12_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp12_, SERVICES_ACTION_MANAGER_ACTION_VIEW_LABELS, "<Control>l");
	_tmp13_ = services_action_manager_action_accelerators;
	gee_multi_map_set (_tmp13_, SERVICES_ACTION_MANAGER_ACTION_VIEW_PINBOARD, "<Control>p");
	_tmp14_ = services_action_manager_typing_accelerators;
	gee_multi_map_set (_tmp14_, SERVICES_ACTION_MANAGER_ACTION_ADD_TASK, "a");
	_tmp15_ = services_action_manager_typing_accelerators;
	gee_multi_map_set (_tmp15_, SERVICES_ACTION_MANAGER_ACTION_ADD_TASK_PASTE, "<Control>v");
	_tmp16_ = services_action_manager_typing_accelerators;
	gee_multi_map_set (_tmp16_, SERVICES_ACTION_MANAGER_ACTION_NEW_PROJECT, "p");
	_tmp17_ = services_action_manager_typing_accelerators;
	gee_multi_map_set (_tmp17_, SERVICES_ACTION_MANAGER_ACTION_NEW_SECTION, "s");
	_tmp18_ = services_action_manager_typing_accelerators;
	gee_multi_map_set (_tmp18_, SERVICES_ACTION_MANAGER_ACTION_VIEW_HOME, "h");
	_tmp19_ = services_action_manager_typing_accelerators;
	gee_multi_map_set (_tmp19_, SERVICES_ACTION_MANAGER_ACTION_SHOW_HIDE_SIDEBAR, "m");
}

static void
services_action_manager_instance_init (ServicesActionManager * self,
                                       gpointer klass)
{
	self->priv = services_action_manager_get_instance_private (self);
}

static void
services_action_manager_finalize (GObject * obj)
{
	ServicesActionManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SERVICES_TYPE_ACTION_MANAGER, ServicesActionManager);
	_g_object_unref0 (self->priv->_app);
	_g_object_unref0 (self->priv->_window);
	_g_object_unref0 (self->priv->_actions);
	G_OBJECT_CLASS (services_action_manager_parent_class)->finalize (obj);
}

static GType
services_action_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ServicesActionManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) services_action_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ServicesActionManager), 0, (GInstanceInitFunc) services_action_manager_instance_init, NULL };
	GType services_action_manager_type_id;
	services_action_manager_type_id = g_type_register_static (G_TYPE_OBJECT, "ServicesActionManager", &g_define_type_info, 0);
	ServicesActionManager_private_offset = g_type_add_instance_private (services_action_manager_type_id, sizeof (ServicesActionManagerPrivate));
	return services_action_manager_type_id;
}

GType
services_action_manager_get_type (void)
{
	static volatile gsize services_action_manager_type_id__once = 0;
	if (g_once_init_enter (&services_action_manager_type_id__once)) {
		GType services_action_manager_type_id;
		services_action_manager_type_id = services_action_manager_get_type_once ();
		g_once_init_leave (&services_action_manager_type_id__once, services_action_manager_type_id);
	}
	return services_action_manager_type_id__once;
}

static void
_vala_services_action_manager_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	ServicesActionManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SERVICES_TYPE_ACTION_MANAGER, ServicesActionManager);
	switch (property_id) {
		case SERVICES_ACTION_MANAGER_APP_PROPERTY:
		g_value_set_object (value, services_action_manager_get_app (self));
		break;
		case SERVICES_ACTION_MANAGER_WINDOW_PROPERTY:
		g_value_set_object (value, services_action_manager_get_window (self));
		break;
		case SERVICES_ACTION_MANAGER_ACTIONS_PROPERTY:
		g_value_set_object (value, services_action_manager_get_actions (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_services_action_manager_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	ServicesActionManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SERVICES_TYPE_ACTION_MANAGER, ServicesActionManager);
	switch (property_id) {
		case SERVICES_ACTION_MANAGER_APP_PROPERTY:
		services_action_manager_set_app (self, g_value_get_object (value));
		break;
		case SERVICES_ACTION_MANAGER_WINDOW_PROPERTY:
		services_action_manager_set_window (self, g_value_get_object (value));
		break;
		case SERVICES_ACTION_MANAGER_ACTIONS_PROPERTY:
		services_action_manager_set_actions (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

