/* gitg-commit-action-push.c generated by valac 0.56.19, the Vala compiler
 * generated from gitg-commit-action-push.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2025 - Alberto Fanjul
 *
 * gitg 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 2 of the License, or
 * (at your option) any later version.
 *
 * gitg 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 gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib-object.h>
#include "libgitg-ext.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "libgitg.h"
#include "config.h"
#include <libgit2-glib/ggit.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <stdio.h>

#define GITG_COMMIT_ACTION_PUSH_version VERSION
#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 GITG_TYPE_COMMIT_ACTION_PUSH (gitg_commit_action_push_get_type ())
#define GITG_COMMIT_ACTION_PUSH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_COMMIT_ACTION_PUSH, GitgCommitActionPush))
#define GITG_COMMIT_ACTION_PUSH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_COMMIT_ACTION_PUSH, GitgCommitActionPushClass))
#define GITG_IS_COMMIT_ACTION_PUSH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_COMMIT_ACTION_PUSH))
#define GITG_IS_COMMIT_ACTION_PUSH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_COMMIT_ACTION_PUSH))
#define GITG_COMMIT_ACTION_PUSH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_COMMIT_ACTION_PUSH, GitgCommitActionPushClass))

typedef struct _GitgCommitActionPush GitgCommitActionPush;
typedef struct _GitgCommitActionPushClass GitgCommitActionPushClass;
typedef struct _GitgCommitActionPushPrivate GitgCommitActionPushPrivate;
enum  {
	GITG_COMMIT_ACTION_PUSH_0_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_APPLICATION_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_ACTION_INTERFACE_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_COMMIT_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_SMART_PUSH_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_ENABLED_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_ID_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_DISPLAY_NAME_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_DESCRIPTION_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_NUM_PROPERTIES
};
static GParamSpec* gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __vala_GgitOId_free0(var) ((var == NULL) ? NULL : (var = (_vala_GgitOId_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define GITG_TYPE_REMOTE_NOTIFICATION (gitg_remote_notification_get_type ())
#define GITG_REMOTE_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_REMOTE_NOTIFICATION, GitgRemoteNotification))
#define GITG_REMOTE_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_REMOTE_NOTIFICATION, GitgRemoteNotificationClass))
#define GITG_IS_REMOTE_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_REMOTE_NOTIFICATION))
#define GITG_IS_REMOTE_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_REMOTE_NOTIFICATION))
#define GITG_REMOTE_NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_REMOTE_NOTIFICATION, GitgRemoteNotificationClass))

typedef struct _GitgRemoteNotification GitgRemoteNotification;
typedef struct _GitgRemoteNotificationClass GitgRemoteNotificationClass;

#define GITG_COMMIT_ACTION_PUSH_TYPE_PUSH_CALLBACKS (gitg_commit_action_push_push_callbacks_get_type ())
#define GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_COMMIT_ACTION_PUSH_TYPE_PUSH_CALLBACKS, GitgCommitActionPushPushCallbacks))
#define GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_COMMIT_ACTION_PUSH_TYPE_PUSH_CALLBACKS, GitgCommitActionPushPushCallbacksClass))
#define GITG_COMMIT_ACTION_PUSH_IS_PUSH_CALLBACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_COMMIT_ACTION_PUSH_TYPE_PUSH_CALLBACKS))
#define GITG_COMMIT_ACTION_PUSH_IS_PUSH_CALLBACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_COMMIT_ACTION_PUSH_TYPE_PUSH_CALLBACKS))
#define GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_COMMIT_ACTION_PUSH_TYPE_PUSH_CALLBACKS, GitgCommitActionPushPushCallbacksClass))

typedef struct _GitgCommitActionPushPushCallbacks GitgCommitActionPushPushCallbacks;
typedef struct _GitgCommitActionPushPushCallbacksClass GitgCommitActionPushPushCallbacksClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _GitgCommitActionPushPushData GitgCommitActionPushPushData;

#define GITG_TYPE_PUSH_DIALOG (gitg_push_dialog_get_type ())
#define GITG_PUSH_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_PUSH_DIALOG, GitgPushDialog))
#define GITG_PUSH_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_PUSH_DIALOG, GitgPushDialogClass))
#define GITG_IS_PUSH_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_PUSH_DIALOG))
#define GITG_IS_PUSH_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_PUSH_DIALOG))
#define GITG_PUSH_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_PUSH_DIALOG, GitgPushDialogClass))

typedef struct _GitgPushDialog GitgPushDialog;
typedef struct _GitgPushDialogClass GitgPushDialogClass;
typedef struct _Block67Data Block67Data;
typedef struct _Block68Data Block68Data;
typedef struct _GitgCommitActionPushPushCallbacksPrivate GitgCommitActionPushPushCallbacksPrivate;

#define GITG_TYPE_RESULT_DIALOG (gitg_result_dialog_get_type ())
#define GITG_RESULT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_RESULT_DIALOG, GitgResultDialog))
#define GITG_RESULT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_RESULT_DIALOG, GitgResultDialogClass))
#define GITG_IS_RESULT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_RESULT_DIALOG))
#define GITG_IS_RESULT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_RESULT_DIALOG))
#define GITG_RESULT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_RESULT_DIALOG, GitgResultDialogClass))

typedef struct _GitgResultDialog GitgResultDialog;
typedef struct _GitgResultDialogClass GitgResultDialogClass;
enum  {
	GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_0_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_APPLICATION_PROPERTY,
	GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_NUM_PROPERTIES
};
static GParamSpec* gitg_commit_action_push_push_callbacks_properties[GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_NUM_PROPERTIES];

struct _GitgCommitActionPush {
	GObject parent_instance;
	GitgCommitActionPushPrivate * priv;
};

struct _GitgCommitActionPushClass {
	GObjectClass parent_class;
	gchar* (*get_ref_name) (GitgCommitActionPush* self);
	gchar* (*get_ref_shortname) (GitgCommitActionPush* self);
	GObject* (*get_ref) (GitgCommitActionPush* self);
	void (*activate) (GitgCommitActionPush* self);
	void (*after_successful_push) (GitgCommitActionPush* self, gboolean set_upstream, const gchar* remote_name, const gchar* remote_ref_name);
	gchar* (*get_id) (GitgCommitActionPush* self);
	gchar* (*get_description) (GitgCommitActionPush* self);
};

struct _GitgCommitActionPushPrivate {
	GitgExtApplication* _application;
	GitgExtRefActionInterface* _action_interface;
	GitgCommit* _commit;
	gboolean _smart_push;
};

struct _GitgCommitActionPushPushData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GitgCommitActionPush* self;
	GitgRemote* remote;
	gboolean force;
	gchar* local_branch;
	gchar* remote_branch;
	gboolean result;
	GitgRemoteNotification* notification;
	GitgRemoteNotification* _tmp0_;
	GitgExtApplication* _tmp1_;
	GitgExtApplication* _tmp2_;
	GitgExtApplication* _tmp3_;
	GitgExtNotifications* _tmp4_;
	GitgExtNotifications* _tmp5_;
	GitgExtNotifications* _tmp6_;
	GitgRemoteNotification* _tmp7_;
	GitgRemoteNotification* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	GitgExtApplication* _tmp12_;
	GitgExtApplication* _tmp13_;
	GitgExtApplication* _tmp14_;
	GitgCommitActionPushPushCallbacks* _tmp15_;
	GitgCommitActionPushPushCallbacks* _tmp16_;
	GitgExtApplication* _tmp17_;
	GitgExtApplication* _tmp18_;
	GtkApplicationWindow* _tmp19_;
	GError* e;
	GitgRemoteNotification* _tmp20_;
	const gchar* _tmp21_;
	GError* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	FILE* _tmp26_;
	GError* _tmp27_;
	const gchar* _tmp28_;
	GitgRemoteNotification* _tmp29_;
	const gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	GError* _inner_error0_;
};

struct _Block67Data {
	int _ref_count_;
	GitgCommitActionPush* self;
	gboolean do_push;
	gchar* remote_name;
	gchar* remote_ref_name;
	gboolean set_upstream;
};

struct _Block68Data {
	int _ref_count_;
	Block67Data * _data67_;
	GtkMessageDialog* alert_dialog;
};

struct _GitgCommitActionPushPushCallbacks {
	GgitRemoteCallbacks parent_instance;
	GitgCommitActionPushPushCallbacksPrivate * priv;
	GitgResultDialog* push_dlg;
};

struct _GitgCommitActionPushPushCallbacksClass {
	GgitRemoteCallbacksClass parent_class;
};

struct _GitgCommitActionPushPushCallbacksPrivate {
	GitgExtApplication* _application;
};

static gint GitgCommitActionPush_private_offset;
static gpointer gitg_commit_action_push_parent_class = NULL;
static gint GitgCommitActionPushPushCallbacks_private_offset;
static gpointer gitg_commit_action_push_push_callbacks_parent_class = NULL;
static GitgExtUIElementIface * gitg_commit_action_push_gitg_ext_ui_element_parent_iface = NULL;
static GitgExtActionIface * gitg_commit_action_push_gitg_ext_action_parent_iface = NULL;
static GitgExtCommitActionIface * gitg_commit_action_push_gitg_ext_commit_action_parent_iface = NULL;

VALA_EXTERN GType gitg_commit_action_push_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgCommitActionPush, g_object_unref)
VALA_EXTERN gchar* gitg_commit_action_push_get_ref_name (GitgCommitActionPush* self);
VALA_EXTERN gchar* gitg_commit_action_push_get_ref_shortname (GitgCommitActionPush* self);
VALA_EXTERN GObject* gitg_commit_action_push_get_ref (GitgCommitActionPush* self);
VALA_EXTERN void gitg_commit_action_push_activate (GitgCommitActionPush* self);
VALA_EXTERN void gitg_commit_action_push_after_successful_push (GitgCommitActionPush* self,
                                                    gboolean set_upstream,
                                                    const gchar* remote_name,
                                                    const gchar* remote_ref_name);
VALA_EXTERN gchar* gitg_commit_action_push_get_id (GitgCommitActionPush* self);
VALA_EXTERN gchar* gitg_commit_action_push_get_description (GitgCommitActionPush* self);
VALA_EXTERN GitgCommitActionPush* gitg_commit_action_push_new (GitgExtApplication* application,
                                                   GitgExtRefActionInterface* action_interface,
                                                   GitgCommit* commit);
VALA_EXTERN GitgCommitActionPush* gitg_commit_action_push_construct (GType object_type,
                                                         GitgExtApplication* application,
                                                         GitgExtRefActionInterface* action_interface,
                                                         GitgCommit* commit);
static gchar* gitg_commit_action_push_real_get_ref_name (GitgCommitActionPush* self);
static void _vala_GgitOId_free (GgitOId* self);
static gchar* gitg_commit_action_push_real_get_ref_shortname (GitgCommitActionPush* self);
static GObject* gitg_commit_action_push_real_get_ref (GitgCommitActionPush* self);
static void gitg_commit_action_push_push_data_free (gpointer _data);
VALA_EXTERN void gitg_commit_action_push_push (GitgCommitActionPush* self,
                                   GitgRemote* remote,
                                   gboolean force,
                                   const gchar* local_branch,
                                   const gchar* remote_branch,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_);
VALA_EXTERN gboolean gitg_commit_action_push_push_finish (GitgCommitActionPush* self,
                                              GAsyncResult* _res_);
static gboolean gitg_commit_action_push_push_co (GitgCommitActionPushPushData* _data_);
VALA_EXTERN GType gitg_remote_notification_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgRemoteNotification, g_object_unref)
VALA_EXTERN GitgRemoteNotification* gitg_remote_notification_new (GitgRemote* remote);
VALA_EXTERN GitgRemoteNotification* gitg_remote_notification_construct (GType object_type,
                                                            GitgRemote* remote);
VALA_EXTERN void gitg_remote_notification_set_text (GitgRemoteNotification* self,
                                        const gchar* value);
static GitgCommitActionPushPushCallbacks* gitg_commit_action_push_push_callbacks_new (GitgExtApplication* application);
static GitgCommitActionPushPushCallbacks* gitg_commit_action_push_push_callbacks_construct (GType object_type,
                                                                                     GitgExtApplication* application);
static GType gitg_commit_action_push_push_callbacks_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgCommitActionPushPushCallbacks, g_object_unref)
static void gitg_commit_action_push_push_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_);
VALA_EXTERN void gitg_remote_notification_error (GitgRemoteNotification* self,
                                     const gchar* text);
VALA_EXTERN void gitg_remote_notification_success (GitgRemoteNotification* self,
                                       const gchar* text);
static void gitg_commit_action_push_real_activate (GitgCommitActionPush* self);
VALA_EXTERN GType gitg_push_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgPushDialog, g_object_unref)
VALA_EXTERN gboolean gitg_commit_action_push_get_smart_push (GitgCommitActionPush* self);
VALA_EXTERN GitgPushDialog* gitg_push_dialog_new (GtkWindow* parent,
                                      GitgRepository* repository,
                                      GObject* reference,
                                      gboolean smart);
VALA_EXTERN GitgPushDialog* gitg_push_dialog_construct (GType object_type,
                                            GtkWindow* parent,
                                            GitgRepository* repository,
                                            GObject* reference,
                                            gboolean smart);
static void gitg_commit_action_push_on_push_dialog_response (GitgCommitActionPush* self,
                                                      GtkDialog* dialog,
                                                      gint response_id);
static void _gitg_commit_action_push_on_push_dialog_response_gtk_dialog_response (GtkDialog* _sender,
                                                                           gint response_id,
                                                                           gpointer self);
VALA_EXTERN gchar* gitg_push_dialog_get_remote_name (GitgPushDialog* self);
VALA_EXTERN gchar* gitg_push_dialog_get_remote_ref_name (GitgPushDialog* self);
VALA_EXTERN gchar* gitg_push_dialog_get_remote_ref (GitgPushDialog* self);
VALA_EXTERN gboolean gitg_push_dialog_get_force (GitgPushDialog* self);
VALA_EXTERN gboolean gitg_push_dialog_get_set_upstream (GitgPushDialog* self);
static void gitg_commit_action_push_run_push (GitgCommitActionPush* self,
                                       const gchar* ref_name,
                                       const gchar* remote_name,
                                       const gchar* remote_ref_name,
                                       GitgRemote* remote,
                                       const gchar* remote_ref,
                                       gboolean force,
                                       gboolean set_upstream);
static Block67Data* block67_data_ref (Block67Data* _data67_);
static void block67_data_unref (void * _userdata_);
static Block68Data* block68_data_ref (Block68Data* _data68_);
static void block68_data_unref (void * _userdata_);
static void ___lambda223_ (Block68Data* _data68_,
                    gint r);
static void ____lambda223__gtk_dialog_response (GtkDialog* _sender,
                                         gint response_id,
                                         gpointer self);
static void ___lambda224_ (Block67Data* _data67_,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda224__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void gitg_commit_action_push_real_after_successful_push (GitgCommitActionPush* self,
                                                         gboolean set_upstream,
                                                         const gchar* remote_name,
                                                         const gchar* remote_ref_name);
VALA_EXTERN void gitg_commit_action_push_set_smart_push (GitgCommitActionPush* self,
                                             gboolean value);
VALA_EXTERN GType gitg_result_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgResultDialog, g_object_unref)
VALA_EXTERN GitgResultDialog* gitg_result_dialog_new (GtkWindow* parent,
                                          const gchar* title,
                                          const gchar* label_text);
VALA_EXTERN GitgResultDialog* gitg_result_dialog_construct (GType object_type,
                                                GtkWindow* parent,
                                                const gchar* title,
                                                const gchar* label_text);
static void __lambda220_ (GitgCommitActionPushPushCallbacks* self,
                   GtkDialog* d,
                   gint resp);
static void ___lambda220__gtk_dialog_response (GtkDialog* _sender,
                                        gint response_id,
                                        gpointer self);
static void gitg_commit_action_push_push_callbacks_real_progress (GgitRemoteCallbacks* base,
                                                           const gchar* message);
VALA_EXTERN void gitg_result_dialog_append_message (GitgResultDialog* self,
                                        const gchar* message);
static gboolean ___lambda221_ (GitgCommitActionPushPushCallbacks* self);
static gboolean ____lambda221__gsource_func (gpointer self);
static GitgExtApplication* gitg_commit_action_push_push_callbacks_get_application (GitgCommitActionPushPushCallbacks* self);
static void gitg_commit_action_push_push_callbacks_set_application (GitgCommitActionPushPushCallbacks* self,
                                                             GitgExtApplication* value);
static void gitg_commit_action_push_push_callbacks_finalize (GObject * obj);
static GType gitg_commit_action_push_push_callbacks_get_type_once (void);
static void _vala_gitg_commit_action_push_push_callbacks_get_property (GObject * object,
                                                                guint property_id,
                                                                GValue * value,
                                                                GParamSpec * pspec);
static void _vala_gitg_commit_action_push_push_callbacks_set_property (GObject * object,
                                                                guint property_id,
                                                                const GValue * value,
                                                                GParamSpec * pspec);
static GObject * gitg_commit_action_push_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
static void gitg_commit_action_push_finalize (GObject * obj);
static GType gitg_commit_action_push_get_type_once (void);
static void _vala_gitg_commit_action_push_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_gitg_commit_action_push_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 gssize _vala_array_length (gpointer array);

static inline gpointer
gitg_commit_action_push_get_instance_private (GitgCommitActionPush* self)
{
	return G_STRUCT_MEMBER_P (self, GitgCommitActionPush_private_offset);
}

GitgCommitActionPush*
gitg_commit_action_push_construct (GType object_type,
                                   GitgExtApplication* application,
                                   GitgExtRefActionInterface* action_interface,
                                   GitgCommit* commit)
{
	GitgCommitActionPush * self = NULL;
	g_return_val_if_fail (application != NULL, NULL);
	g_return_val_if_fail (action_interface != NULL, NULL);
	g_return_val_if_fail (commit != NULL, NULL);
	self = (GitgCommitActionPush*) g_object_new (object_type, "application", application, "action-interface", action_interface, "commit", commit, NULL);
	return self;
}

GitgCommitActionPush*
gitg_commit_action_push_new (GitgExtApplication* application,
                             GitgExtRefActionInterface* action_interface,
                             GitgCommit* commit)
{
	return gitg_commit_action_push_construct (GITG_TYPE_COMMIT_ACTION_PUSH, application, action_interface, commit);
}

static void
_vala_GgitOId_free (GgitOId* self)
{
	g_boxed_free (ggit_oid_get_type (), self);
}

static gchar*
gitg_commit_action_push_real_get_ref_name (GitgCommitActionPush* self)
{
	GitgCommit* _tmp0_;
	GitgCommit* _tmp1_;
	GgitOId* _tmp2_;
	GgitOId* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* result;
	_tmp0_ = gitg_ext_commit_action_get_commit ((GitgExtCommitAction*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = ggit_object_get_id ((GgitObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = ggit_oid_to_string (_tmp3_);
	_tmp5_ = _tmp4_;
	__vala_GgitOId_free0 (_tmp3_);
	result = _tmp5_;
	return result;
}

gchar*
gitg_commit_action_push_get_ref_name (GitgCommitActionPush* self)
{
	GitgCommitActionPushClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = GITG_COMMIT_ACTION_PUSH_GET_CLASS (self);
	if (_klass_->get_ref_name) {
		return _klass_->get_ref_name (self);
	}
	return NULL;
}

static gchar*
gitg_commit_action_push_real_get_ref_shortname (GitgCommitActionPush* self)
{
	GitgCommit* _tmp0_;
	GitgCommit* _tmp1_;
	GgitOId* _tmp2_;
	GgitOId* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* result;
	_tmp0_ = gitg_ext_commit_action_get_commit ((GitgExtCommitAction*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = ggit_object_get_id ((GgitObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = ggit_oid_to_string (_tmp3_);
	_tmp5_ = _tmp4_;
	__vala_GgitOId_free0 (_tmp3_);
	result = _tmp5_;
	return result;
}

gchar*
gitg_commit_action_push_get_ref_shortname (GitgCommitActionPush* self)
{
	GitgCommitActionPushClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = GITG_COMMIT_ACTION_PUSH_GET_CLASS (self);
	if (_klass_->get_ref_shortname) {
		return _klass_->get_ref_shortname (self);
	}
	return NULL;
}

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

static GObject*
gitg_commit_action_push_real_get_ref (GitgCommitActionPush* self)
{
	GitgCommit* _tmp0_;
	GitgCommit* _tmp1_;
	GObject* _tmp2_;
	GObject* result;
	_tmp0_ = gitg_ext_commit_action_get_commit ((GitgExtCommitAction*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 ((GObject*) _tmp1_);
	result = _tmp2_;
	return result;
}

GObject*
gitg_commit_action_push_get_ref (GitgCommitActionPush* self)
{
	GitgCommitActionPushClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = GITG_COMMIT_ACTION_PUSH_GET_CLASS (self);
	if (_klass_->get_ref) {
		return _klass_->get_ref (self);
	}
	return NULL;
}

static void
gitg_commit_action_push_push_data_free (gpointer _data)
{
	GitgCommitActionPushPushData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->remote);
	_g_free0 (_data_->local_branch);
	_g_free0 (_data_->remote_branch);
	_g_object_unref0 (_data_->self);
	g_slice_free (GitgCommitActionPushPushData, _data_);
}

void
gitg_commit_action_push_push (GitgCommitActionPush* self,
                              GitgRemote* remote,
                              gboolean force,
                              const gchar* local_branch,
                              const gchar* remote_branch,
                              GAsyncReadyCallback _callback_,
                              gpointer _user_data_)
{
	GitgCommitActionPushPushData* _data_;
	GitgCommitActionPush* _tmp0_;
	GitgRemote* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (remote != NULL);
	g_return_if_fail (local_branch != NULL);
	g_return_if_fail (remote_branch != NULL);
	_data_ = g_slice_new0 (GitgCommitActionPushPushData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gitg_commit_action_push_push_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (remote);
	_g_object_unref0 (_data_->remote);
	_data_->remote = _tmp1_;
	_data_->force = force;
	_tmp2_ = g_strdup (local_branch);
	_g_free0 (_data_->local_branch);
	_data_->local_branch = _tmp2_;
	_tmp3_ = g_strdup (remote_branch);
	_g_free0 (_data_->remote_branch);
	_data_->remote_branch = _tmp3_;
	gitg_commit_action_push_push_co (_data_);
}

gboolean
gitg_commit_action_push_push_finish (GitgCommitActionPush* self,
                                     GAsyncResult* _res_)
{
	gboolean result;
	GitgCommitActionPushPushData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
gitg_commit_action_push_push_ready (GObject* source_object,
                                    GAsyncResult* _res_,
                                    gpointer _user_data_)
{
	GitgCommitActionPushPushData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	gitg_commit_action_push_push_co (_data_);
}

static gboolean
gitg_commit_action_push_push_co (GitgCommitActionPushPushData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = gitg_remote_notification_new (_data_->remote);
	g_object_ref_sink (_data_->_tmp0_);
	_data_->notification = _data_->_tmp0_;
	_data_->_tmp1_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) _data_->self);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = gitg_ext_application_get_notifications (_data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = _data_->notification;
	gitg_ext_notifications_add (_data_->_tmp6_, (GitgExtNotification*) _data_->_tmp7_);
	_g_object_unref0 (_data_->_tmp6_);
	_g_object_unref0 (_data_->_tmp3_);
	_data_->_tmp8_ = _data_->notification;
	_data_->_tmp9_ = ggit_remote_get_url ((GgitRemote*) _data_->remote);
	_data_->_tmp10_ = g_strdup_printf (_ ("Pushing to “%s”"), _data_->_tmp9_);
	_data_->_tmp11_ = _data_->_tmp10_;
	gitg_remote_notification_set_text (_data_->_tmp8_, _data_->_tmp11_);
	_g_free0 (_data_->_tmp11_);
	{
		_data_->_tmp12_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) _data_->self);
		_data_->_tmp13_ = _data_->_tmp12_;
		_data_->_tmp14_ = _data_->_tmp13_;
		_data_->_tmp15_ = gitg_commit_action_push_push_callbacks_new (_data_->_tmp14_);
		_data_->_tmp16_ = _data_->_tmp15_;
		_data_->_state_ = 1;
		gitg_remote_push (_data_->remote, _data_->force, _data_->local_branch, _data_->remote_branch, (GgitRemoteCallbacks*) _data_->_tmp16_, gitg_commit_action_push_push_ready, _data_);
		return FALSE;
		_state_1:
		gitg_remote_push_finish (_data_->remote, _data_->_res_, &_data_->_inner_error0_);
		_g_object_unref0 (_data_->_tmp16_);
		_g_object_unref0 (_data_->_tmp14_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp17_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) _data_->self);
		_data_->_tmp18_ = _data_->_tmp17_;
		_data_->_tmp19_ = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp18_, gtk_application_window_get_type (), GtkApplicationWindow);
		g_action_group_activate_action ((GActionGroup*) _data_->_tmp19_, "reload", NULL);
		_g_object_unref0 (_data_->_tmp19_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp20_ = _data_->notification;
		_data_->_tmp21_ = ggit_remote_get_url ((GgitRemote*) _data_->remote);
		_data_->_tmp22_ = _data_->e;
		_data_->_tmp23_ = _data_->_tmp22_->message;
		_data_->_tmp24_ = g_strdup_printf (_ ("Failed to push to “%s”: %s"), _data_->_tmp21_, _data_->_tmp23_);
		_data_->_tmp25_ = _data_->_tmp24_;
		gitg_remote_notification_error (_data_->_tmp20_, _data_->_tmp25_);
		_g_free0 (_data_->_tmp25_);
		_data_->_tmp26_ = stderr;
		_data_->_tmp27_ = _data_->e;
		_data_->_tmp28_ = _data_->_tmp27_->message;
		fprintf (_data_->_tmp26_, "Failed to push: %s\n", _data_->_tmp28_);
		_data_->result = FALSE;
		_g_error_free0 (_data_->e);
		_g_object_unref0 (_data_->notification);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->notification);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp29_ = _data_->notification;
	_data_->_tmp30_ = ggit_remote_get_url ((GgitRemote*) _data_->remote);
	_data_->_tmp31_ = g_strdup_printf (_ ("Pushed to “%s”"), _data_->_tmp30_);
	_data_->_tmp32_ = _data_->_tmp31_;
	gitg_remote_notification_success (_data_->_tmp29_, _data_->_tmp32_);
	_g_free0 (_data_->_tmp32_);
	_data_->result = TRUE;
	_g_object_unref0 (_data_->notification);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_gitg_commit_action_push_on_push_dialog_response_gtk_dialog_response (GtkDialog* _sender,
                                                                      gint response_id,
                                                                      gpointer self)
{
	gitg_commit_action_push_on_push_dialog_response ((GitgCommitActionPush*) self, _sender, response_id);
}

static void
gitg_commit_action_push_real_activate (GitgCommitActionPush* self)
{
	GitgPushDialog* dlg = NULL;
	GitgExtApplication* _tmp0_;
	GitgExtApplication* _tmp1_;
	GtkWindow* _tmp2_;
	GitgExtApplication* _tmp3_;
	GitgExtApplication* _tmp4_;
	GitgExtApplication* _tmp5_;
	GitgRepository* _tmp6_;
	GitgRepository* _tmp7_;
	GitgRepository* _tmp8_;
	GObject* _tmp9_;
	GObject* _tmp10_;
	gboolean _tmp11_;
	GitgPushDialog* _tmp12_;
	GitgPushDialog* _tmp13_;
	_tmp0_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_window_get_type (), GtkWindow);
	_tmp3_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = gitg_ext_application_get_repository (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	_tmp9_ = gitg_commit_action_push_get_ref (self);
	_tmp10_ = _tmp9_;
	_tmp11_ = self->priv->_smart_push;
	_tmp12_ = gitg_push_dialog_new (_tmp2_, _tmp8_, _tmp10_, _tmp11_);
	g_object_ref_sink (_tmp12_);
	_tmp13_ = _tmp12_;
	_g_object_unref0 (_tmp10_);
	_g_object_unref0 (_tmp8_);
	_g_object_unref0 (_tmp5_);
	_g_object_unref0 (_tmp2_);
	dlg = _tmp13_;
	g_signal_connect_object ((GtkDialog*) dlg, "response", (GCallback) _gitg_commit_action_push_on_push_dialog_response_gtk_dialog_response, self, 0);
	gtk_widget_show ((GtkWidget*) dlg);
	_g_object_unref0 (dlg);
}

void
gitg_commit_action_push_activate (GitgCommitActionPush* self)
{
	GitgCommitActionPushClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = GITG_COMMIT_ACTION_PUSH_GET_CLASS (self);
	if (_klass_->activate) {
		_klass_->activate (self);
	}
}

static void
gitg_commit_action_push_on_push_dialog_response (GitgCommitActionPush* self,
                                                 GtkDialog* dialog,
                                                 gint response_id)
{
	GitgPushDialog* dlg = NULL;
	GitgPushDialog* _tmp0_;
	gchar* ref_name = NULL;
	gchar* _tmp2_;
	gchar* remote_name = NULL;
	GitgPushDialog* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* remote_ref_name = NULL;
	GitgPushDialog* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GitgRemote* remote = NULL;
	GitgExtApplication* _tmp9_;
	GitgExtApplication* _tmp10_;
	GitgExtApplication* _tmp11_;
	GitgExtRemoteLookup* _tmp12_;
	GitgExtRemoteLookup* _tmp13_;
	GitgExtRemoteLookup* _tmp14_;
	const gchar* _tmp15_;
	GitgRemote* _tmp16_;
	GitgRemote* _tmp17_;
	gchar* remote_ref = NULL;
	GitgPushDialog* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gboolean force = FALSE;
	GitgPushDialog* _tmp21_;
	gboolean _tmp22_;
	gboolean _tmp23_;
	gboolean set_upstream = FALSE;
	GitgPushDialog* _tmp24_;
	gboolean _tmp25_;
	gboolean _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	GitgRemote* _tmp30_;
	const gchar* _tmp31_;
	GitgPushDialog* _tmp32_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dialog != NULL);
	_tmp0_ = _g_object_ref0 (GITG_IS_PUSH_DIALOG (dialog) ? ((GitgPushDialog*) dialog) : NULL);
	dlg = _tmp0_;
	if (response_id != ((gint) GTK_RESPONSE_OK)) {
		GitgPushDialog* _tmp1_;
		_tmp1_ = dlg;
		gtk_widget_destroy ((GtkWidget*) _tmp1_);
		_g_object_unref0 (dlg);
		return;
	}
	_tmp2_ = gitg_commit_action_push_get_ref_name (self);
	ref_name = _tmp2_;
	_tmp3_ = dlg;
	_tmp4_ = gitg_push_dialog_get_remote_name (_tmp3_);
	_tmp5_ = _tmp4_;
	remote_name = _tmp5_;
	_tmp6_ = dlg;
	_tmp7_ = gitg_push_dialog_get_remote_ref_name (_tmp6_);
	_tmp8_ = _tmp7_;
	remote_ref_name = _tmp8_;
	_tmp9_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
	_tmp10_ = _tmp9_;
	_tmp11_ = _tmp10_;
	_tmp12_ = gitg_ext_application_get_remote_lookup (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = _tmp13_;
	_tmp15_ = remote_name;
	_tmp16_ = gitg_ext_remote_lookup_lookup (_tmp14_, _tmp15_);
	_tmp17_ = _tmp16_;
	_g_object_unref0 (_tmp14_);
	_g_object_unref0 (_tmp11_);
	remote = _tmp17_;
	_tmp18_ = dlg;
	_tmp19_ = gitg_push_dialog_get_remote_ref (_tmp18_);
	_tmp20_ = _tmp19_;
	remote_ref = _tmp20_;
	_tmp21_ = dlg;
	_tmp22_ = gitg_push_dialog_get_force (_tmp21_);
	_tmp23_ = _tmp22_;
	force = _tmp23_;
	_tmp24_ = dlg;
	_tmp25_ = gitg_push_dialog_get_set_upstream (_tmp24_);
	_tmp26_ = _tmp25_;
	set_upstream = _tmp26_;
	_tmp27_ = ref_name;
	_tmp28_ = remote_name;
	_tmp29_ = remote_ref_name;
	_tmp30_ = remote;
	_tmp31_ = remote_ref;
	gitg_commit_action_push_run_push (self, _tmp27_, _tmp28_, _tmp29_, _tmp30_, _tmp31_, force, set_upstream);
	_tmp32_ = dlg;
	gtk_widget_destroy ((GtkWidget*) _tmp32_);
	g_signal_emit_by_name ((GitgExtCommitAction*) self, "finished");
	_g_free0 (remote_ref);
	_g_object_unref0 (remote);
	_g_free0 (remote_ref_name);
	_g_free0 (remote_name);
	_g_free0 (ref_name);
	_g_object_unref0 (dlg);
}

static Block67Data*
block67_data_ref (Block67Data* _data67_)
{
	g_atomic_int_inc (&_data67_->_ref_count_);
	return _data67_;
}

static void
block67_data_unref (void * _userdata_)
{
	Block67Data* _data67_;
	_data67_ = (Block67Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data67_->_ref_count_)) {
		GitgCommitActionPush* self;
		self = _data67_->self;
		_g_free0 (_data67_->remote_name);
		_g_free0 (_data67_->remote_ref_name);
		_g_object_unref0 (self);
		g_slice_free (Block67Data, _data67_);
	}
}

static Block68Data*
block68_data_ref (Block68Data* _data68_)
{
	g_atomic_int_inc (&_data68_->_ref_count_);
	return _data68_;
}

static void
block68_data_unref (void * _userdata_)
{
	Block68Data* _data68_;
	_data68_ = (Block68Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data68_->_ref_count_)) {
		GitgCommitActionPush* self;
		self = _data68_->_data67_->self;
		_g_object_unref0 (_data68_->alert_dialog);
		block67_data_unref (_data68_->_data67_);
		_data68_->_data67_ = NULL;
		g_slice_free (Block68Data, _data68_);
	}
}

static void
___lambda223_ (Block68Data* _data68_,
               gint r)
{
	Block67Data* _data67_;
	GitgCommitActionPush* self;
	GtkMessageDialog* _tmp0_;
	_data67_ = _data68_->_data67_;
	self = _data67_->self;
	if (r == ((gint) GTK_RESPONSE_OK)) {
		_data67_->do_push = TRUE;
	}
	_tmp0_ = _data68_->alert_dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}

static void
____lambda223__gtk_dialog_response (GtkDialog* _sender,
                                    gint response_id,
                                    gpointer self)
{
	___lambda223_ (self, response_id);
}

static void
___lambda224_ (Block67Data* _data67_,
               GObject* obj,
               GAsyncResult* res)
{
	GitgCommitActionPush* self;
	self = _data67_->self;
	g_return_if_fail (res != NULL);
	if (gitg_commit_action_push_push_finish (self, res)) {
		gitg_commit_action_push_after_successful_push (self, _data67_->set_upstream, _data67_->remote_name, _data67_->remote_ref_name);
	}
}

static void
____lambda224__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda224_ (self, source_object, res);
	block67_data_unref (self);
}

static void
gitg_commit_action_push_run_push (GitgCommitActionPush* self,
                                  const gchar* ref_name,
                                  const gchar* remote_name,
                                  const gchar* remote_ref_name,
                                  GitgRemote* remote,
                                  const gchar* remote_ref,
                                  gboolean force,
                                  gboolean set_upstream)
{
	Block67Data* _data67_;
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ref_name != NULL);
	g_return_if_fail (remote_name != NULL);
	g_return_if_fail (remote_ref_name != NULL);
	g_return_if_fail (remote != NULL);
	g_return_if_fail (remote_ref != NULL);
	_data67_ = g_slice_new0 (Block67Data);
	_data67_->_ref_count_ = 1;
	_data67_->self = g_object_ref (self);
	_tmp0_ = g_strdup (remote_name);
	_g_free0 (_data67_->remote_name);
	_data67_->remote_name = _tmp0_;
	_tmp1_ = g_strdup (remote_ref_name);
	_g_free0 (_data67_->remote_ref_name);
	_data67_->remote_ref_name = _tmp1_;
	_data67_->set_upstream = set_upstream;
	_data67_->do_push = FALSE;
	if (force) {
		Block68Data* _data68_;
		GitgExtApplication* _tmp2_;
		GitgExtApplication* _tmp3_;
		GtkWindow* _tmp4_;
		GtkMessageDialog* _tmp5_;
		GtkMessageDialog* _tmp6_;
		GtkMessageDialog* _tmp7_;
		GtkMessageDialog* _tmp8_;
		GtkWidget* push_force_button = NULL;
		GtkMessageDialog* _tmp9_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		GtkWidget* _tmp12_;
		GtkStyleContext* _tmp13_;
		GtkMessageDialog* _tmp14_;
		GtkMessageDialog* _tmp15_;
		_data68_ = g_slice_new0 (Block68Data);
		_data68_->_ref_count_ = 1;
		_data68_->_data67_ = block67_data_ref (_data67_);
		_tmp2_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
		_tmp3_ = _tmp2_;
		_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_window_get_type (), GtkWindow);
		_tmp5_ = (GtkMessageDialog*) gtk_message_dialog_new (_tmp4_, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, _ ("Push force will rewrite remote ref “%s”. Are you sure?"), remote_ref);
		g_object_ref_sink (_tmp5_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_data68_->alert_dialog = _tmp6_;
		_tmp7_ = _data68_->alert_dialog;
		gtk_dialog_add_button ((GtkDialog*) _tmp7_, _ ("Cancel"), (gint) GTK_RESPONSE_CANCEL);
		_tmp8_ = _data68_->alert_dialog;
		gtk_dialog_add_button ((GtkDialog*) _tmp8_, _ ("Push force"), (gint) GTK_RESPONSE_OK);
		_tmp9_ = _data68_->alert_dialog;
		_tmp10_ = gtk_dialog_get_widget_for_response ((GtkDialog*) _tmp9_, (gint) GTK_RESPONSE_OK);
		_tmp11_ = _g_object_ref0 (_tmp10_);
		push_force_button = _tmp11_;
		_tmp12_ = push_force_button;
		_tmp13_ = gtk_widget_get_style_context (_tmp12_);
		gtk_style_context_add_class (_tmp13_, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
		_tmp14_ = _data68_->alert_dialog;
		g_signal_connect_data ((GtkDialog*) _tmp14_, "response", (GCallback) ____lambda223__gtk_dialog_response, block68_data_ref (_data68_), (GClosureNotify) block68_data_unref, 0);
		_tmp15_ = _data68_->alert_dialog;
		gtk_dialog_run ((GtkDialog*) _tmp15_);
		_g_object_unref0 (push_force_button);
		block68_data_unref (_data68_);
		_data68_ = NULL;
	} else {
		_data67_->do_push = TRUE;
	}
	if (_data67_->do_push) {
		gitg_commit_action_push_push (self, remote, force, ref_name, remote_ref, ____lambda224__gasync_ready_callback, block67_data_ref (_data67_));
	}
	block67_data_unref (_data67_);
	_data67_ = NULL;
}

static void
gitg_commit_action_push_real_after_successful_push (GitgCommitActionPush* self,
                                                    gboolean set_upstream,
                                                    const gchar* remote_name,
                                                    const gchar* remote_ref_name)
{
	g_return_if_fail (remote_name != NULL);
	g_return_if_fail (remote_ref_name != NULL);
}

void
gitg_commit_action_push_after_successful_push (GitgCommitActionPush* self,
                                               gboolean set_upstream,
                                               const gchar* remote_name,
                                               const gchar* remote_ref_name)
{
	GitgCommitActionPushClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = GITG_COMMIT_ACTION_PUSH_GET_CLASS (self);
	if (_klass_->after_successful_push) {
		_klass_->after_successful_push (self, set_upstream, remote_name, remote_ref_name);
	}
}

static GitgExtApplication*
gitg_commit_action_push_real_get_application (GitgExtUIElement* base)
{
	GitgExtApplication* result;
	GitgCommitActionPush* self;
	GitgExtApplication* _tmp0_;
	GitgExtApplication* _tmp1_;
	self = (GitgCommitActionPush*) base;
	_tmp0_ = self->priv->_application;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
gitg_commit_action_push_real_set_application (GitgExtUIElement* base,
                                              GitgExtApplication* value)
{
	GitgCommitActionPush* self;
	GitgExtApplication* old_value;
	self = (GitgCommitActionPush*) base;
	old_value = gitg_commit_action_push_real_get_application (base);
	if (old_value != value) {
		GitgExtApplication* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_application);
		self->priv->_application = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_APPLICATION_PROPERTY]);
	}
	_g_object_unref0 (old_value);
}

static GitgExtRefActionInterface*
gitg_commit_action_push_real_get_action_interface (GitgExtCommitAction* base)
{
	GitgExtRefActionInterface* result;
	GitgCommitActionPush* self;
	GitgExtRefActionInterface* _tmp0_;
	self = (GitgCommitActionPush*) base;
	_tmp0_ = self->priv->_action_interface;
	result = _tmp0_;
	return result;
}

static void
gitg_commit_action_push_real_set_action_interface (GitgExtCommitAction* base,
                                                   GitgExtRefActionInterface* value)
{
	GitgCommitActionPush* self;
	GitgExtRefActionInterface* old_value;
	self = (GitgCommitActionPush*) base;
	old_value = gitg_commit_action_push_real_get_action_interface (base);
	if (old_value != value) {
		GitgExtRefActionInterface* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_action_interface);
		self->priv->_action_interface = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_ACTION_INTERFACE_PROPERTY]);
	}
}

static GitgCommit*
gitg_commit_action_push_real_get_commit (GitgExtCommitAction* base)
{
	GitgCommit* result;
	GitgCommitActionPush* self;
	GitgCommit* _tmp0_;
	self = (GitgCommitActionPush*) base;
	_tmp0_ = self->priv->_commit;
	result = _tmp0_;
	return result;
}

static void
gitg_commit_action_push_real_set_commit (GitgExtCommitAction* base,
                                         GitgCommit* value)
{
	GitgCommitActionPush* self;
	GitgCommit* old_value;
	self = (GitgCommitActionPush*) base;
	old_value = gitg_commit_action_push_real_get_commit (base);
	if (old_value != value) {
		GitgCommit* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_commit);
		self->priv->_commit = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_COMMIT_PROPERTY]);
	}
}

gboolean
gitg_commit_action_push_get_smart_push (GitgCommitActionPush* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_smart_push;
	return result;
}

void
gitg_commit_action_push_set_smart_push (GitgCommitActionPush* self,
                                        gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gitg_commit_action_push_get_smart_push (self);
	if (old_value != value) {
		self->priv->_smart_push = value;
		g_object_notify_by_pspec ((GObject *) self, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_SMART_PUSH_PROPERTY]);
	}
}

static gboolean
gitg_commit_action_push_real_get_enabled (GitgExtUIElement* base)
{
	gboolean result;
	GitgCommitActionPush* self;
	gchar** _tmp0_ = NULL;
	GitgExtApplication* _tmp1_;
	GitgExtApplication* _tmp2_;
	GitgExtApplication* _tmp3_;
	GitgRepository* _tmp4_;
	GitgRepository* _tmp5_;
	GitgRepository* _tmp6_;
	gchar** _tmp7_;
	gchar** _tmp8_;
	gchar** _tmp9_;
	gint _tmp9__length1;
	gint _tmp0__length1;
	gint __tmp0__size_;
	GError* _inner_error0_ = NULL;
	self = (GitgCommitActionPush*) base;
	_tmp1_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = gitg_ext_application_get_repository (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp8_ = _tmp7_ = ggit_repository_list_remotes ((GgitRepository*) _tmp6_, &_inner_error0_);
	_tmp9_ = _tmp8_;
	_tmp9__length1 = _vala_array_length (_tmp7_);
	_g_object_unref0 (_tmp6_);
	_g_object_unref0 (_tmp3_);
	_tmp0_ = _tmp9_;
	_tmp0__length1 = _tmp9__length1;
	__tmp0__size_ = _tmp0__length1;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp10_ = FALSE;
		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 _tmp10_;
	}
	result = _tmp0__length1 > 0;
	_tmp0_ = (_vala_array_free (_tmp0_, _tmp0__length1, (GDestroyNotify) g_free), NULL);
	return result;
}

gchar*
gitg_commit_action_push_get_id (GitgCommitActionPush* self)
{
	GitgCommitActionPushClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = GITG_COMMIT_ACTION_PUSH_GET_CLASS (self);
	if (_klass_->get_id) {
		return _klass_->get_id (self);
	}
	return NULL;
}

static gchar*
gitg_commit_action_push_real_get_id (GitgCommitActionPush* base)
{
	gchar* result;
	GitgCommitActionPush* self;
	gchar* _tmp0_;
	self = base;
	_tmp0_ = g_strdup ("/org/gnome/gitg/commit-actions/push");
	result = _tmp0_;
	return result;
}

static gchar*
gitg_commit_action_push_real_get_display_name (GitgExtUIElement* base)
{
	gchar* result;
	GitgCommitActionPush* self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	self = (GitgCommitActionPush*) base;
	_tmp0_ = gitg_commit_action_push_get_ref_shortname (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf (_ ("Push “%s”…"), _tmp1_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	result = _tmp3_;
	return result;
}

gchar*
gitg_commit_action_push_get_description (GitgCommitActionPush* self)
{
	GitgCommitActionPushClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = GITG_COMMIT_ACTION_PUSH_GET_CLASS (self);
	if (_klass_->get_description) {
		return _klass_->get_description (self);
	}
	return NULL;
}

static gchar*
gitg_commit_action_push_real_get_description (GitgCommitActionPush* base)
{
	gchar* result;
	GitgCommitActionPush* self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	self = base;
	_tmp0_ = gitg_commit_action_push_get_ref_shortname (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf (_ ("Push “%s” to some remote"), _tmp1_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	result = _tmp3_;
	return result;
}

static inline gpointer
gitg_commit_action_push_push_callbacks_get_instance_private (GitgCommitActionPushPushCallbacks* self)
{
	return G_STRUCT_MEMBER_P (self, GitgCommitActionPushPushCallbacks_private_offset);
}

static void
__lambda220_ (GitgCommitActionPushPushCallbacks* self,
              GtkDialog* d,
              gint resp)
{
	GitgResultDialog* _tmp0_;
	g_return_if_fail (d != NULL);
	_tmp0_ = self->push_dlg;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}

static void
___lambda220__gtk_dialog_response (GtkDialog* _sender,
                                   gint response_id,
                                   gpointer self)
{
	__lambda220_ ((GitgCommitActionPushPushCallbacks*) self, _sender, response_id);
}

static GitgCommitActionPushPushCallbacks*
gitg_commit_action_push_push_callbacks_construct (GType object_type,
                                                  GitgExtApplication* application)
{
	GitgCommitActionPushPushCallbacks * self = NULL;
	GitgResultDialog* _tmp0_;
	GitgResultDialog* _tmp1_;
	g_return_val_if_fail (application != NULL, NULL);
	self = (GitgCommitActionPushPushCallbacks*) g_object_new (object_type, "application", application, NULL);
	_tmp0_ = gitg_result_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (application, gtk_window_get_type (), GtkWindow), _ ("Push Output"), NULL);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->push_dlg);
	self->push_dlg = _tmp0_;
	_tmp1_ = self->push_dlg;
	g_signal_connect_object ((GtkDialog*) _tmp1_, "response", (GCallback) ___lambda220__gtk_dialog_response, self, 0);
	return self;
}

static GitgCommitActionPushPushCallbacks*
gitg_commit_action_push_push_callbacks_new (GitgExtApplication* application)
{
	return gitg_commit_action_push_push_callbacks_construct (GITG_COMMIT_ACTION_PUSH_TYPE_PUSH_CALLBACKS, application);
}

static gboolean
___lambda221_ (GitgCommitActionPushPushCallbacks* self)
{
	GitgResultDialog* _tmp0_;
	gboolean result;
	_tmp0_ = self->push_dlg;
	gtk_widget_show ((GtkWidget*) _tmp0_);
	result = FALSE;
	return result;
}

static gboolean
____lambda221__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda221_ ((GitgCommitActionPushPushCallbacks*) self);
	return result;
}

static void
gitg_commit_action_push_push_callbacks_real_progress (GgitRemoteCallbacks* base,
                                                      const gchar* message)
{
	GitgCommitActionPushPushCallbacks * self;
	GitgResultDialog* _tmp0_;
	GitgResultDialog* _tmp1_;
	self = (GitgCommitActionPushPushCallbacks*) base;
	g_return_if_fail (message != NULL);
	if (g_strcmp0 (message, "") == 0) {
		return;
	}
	_tmp0_ = self->push_dlg;
	gitg_result_dialog_append_message (_tmp0_, message);
	_tmp1_ = self->push_dlg;
	if (!gtk_widget_is_visible ((GtkWidget*) _tmp1_)) {
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda221__gsource_func, g_object_ref (self), g_object_unref);
	}
}

static GitgExtApplication*
gitg_commit_action_push_push_callbacks_get_application (GitgCommitActionPushPushCallbacks* self)
{
	GitgExtApplication* result;
	GitgExtApplication* _tmp0_;
	GitgExtApplication* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_application;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
gitg_commit_action_push_push_callbacks_set_application (GitgCommitActionPushPushCallbacks* self,
                                                        GitgExtApplication* value)
{
	GitgExtApplication* old_value;
	g_return_if_fail (self != NULL);
	old_value = gitg_commit_action_push_push_callbacks_get_application (self);
	if (old_value != value) {
		GitgExtApplication* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_application);
		self->priv->_application = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_commit_action_push_push_callbacks_properties[GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_APPLICATION_PROPERTY]);
	}
	_g_object_unref0 (old_value);
}

static void
gitg_commit_action_push_push_callbacks_class_init (GitgCommitActionPushPushCallbacksClass * klass,
                                                   gpointer klass_data)
{
	gitg_commit_action_push_push_callbacks_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GitgCommitActionPushPushCallbacks_private_offset);
	((GgitRemoteCallbacksClass *) klass)->progress = (void (*) (GgitRemoteCallbacks*, const gchar*)) gitg_commit_action_push_push_callbacks_real_progress;
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_commit_action_push_push_callbacks_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_commit_action_push_push_callbacks_set_property;
	G_OBJECT_CLASS (klass)->finalize = gitg_commit_action_push_push_callbacks_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_APPLICATION_PROPERTY, gitg_commit_action_push_push_callbacks_properties[GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_APPLICATION_PROPERTY] = g_param_spec_object ("application", "application", "application", GITG_EXT_TYPE_APPLICATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}

static void
gitg_commit_action_push_push_callbacks_instance_init (GitgCommitActionPushPushCallbacks * self,
                                                      gpointer klass)
{
	self->priv = gitg_commit_action_push_push_callbacks_get_instance_private (self);
}

static void
gitg_commit_action_push_push_callbacks_finalize (GObject * obj)
{
	GitgCommitActionPushPushCallbacks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_COMMIT_ACTION_PUSH_TYPE_PUSH_CALLBACKS, GitgCommitActionPushPushCallbacks);
	_g_object_unref0 (self->priv->_application);
	_g_object_unref0 (self->push_dlg);
	G_OBJECT_CLASS (gitg_commit_action_push_push_callbacks_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gitg_commit_action_push_push_callbacks_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgCommitActionPushPushCallbacksClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_commit_action_push_push_callbacks_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgCommitActionPushPushCallbacks), 0, (GInstanceInitFunc) gitg_commit_action_push_push_callbacks_instance_init, NULL };
	GType gitg_commit_action_push_push_callbacks_type_id;
	gitg_commit_action_push_push_callbacks_type_id = g_type_register_static (ggit_remote_callbacks_get_type (), "GitgCommitActionPushPushCallbacks", &g_define_type_info, 0);
	GitgCommitActionPushPushCallbacks_private_offset = g_type_add_instance_private (gitg_commit_action_push_push_callbacks_type_id, sizeof (GitgCommitActionPushPushCallbacksPrivate));
	return gitg_commit_action_push_push_callbacks_type_id;
}

static GType
gitg_commit_action_push_push_callbacks_get_type (void)
{
	static gsize gitg_commit_action_push_push_callbacks_type_id__once = 0;
	if (g_once_init_enter (&gitg_commit_action_push_push_callbacks_type_id__once)) {
		GType gitg_commit_action_push_push_callbacks_type_id;
		gitg_commit_action_push_push_callbacks_type_id = gitg_commit_action_push_push_callbacks_get_type_once ();
		g_once_init_leave (&gitg_commit_action_push_push_callbacks_type_id__once, gitg_commit_action_push_push_callbacks_type_id);
	}
	return gitg_commit_action_push_push_callbacks_type_id__once;
}

static void
_vala_gitg_commit_action_push_push_callbacks_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec)
{
	GitgCommitActionPushPushCallbacks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_COMMIT_ACTION_PUSH_TYPE_PUSH_CALLBACKS, GitgCommitActionPushPushCallbacks);
	switch (property_id) {
		case GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_APPLICATION_PROPERTY:
		g_value_take_object (value, gitg_commit_action_push_push_callbacks_get_application (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gitg_commit_action_push_push_callbacks_set_property (GObject * object,
                                                           guint property_id,
                                                           const GValue * value,
                                                           GParamSpec * pspec)
{
	GitgCommitActionPushPushCallbacks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_COMMIT_ACTION_PUSH_TYPE_PUSH_CALLBACKS, GitgCommitActionPushPushCallbacks);
	switch (property_id) {
		case GITG_COMMIT_ACTION_PUSH_PUSH_CALLBACKS_APPLICATION_PROPERTY:
		gitg_commit_action_push_push_callbacks_set_application (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static GObject *
gitg_commit_action_push_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GitgCommitActionPush * self;
	GSettings* settings = NULL;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	parent_class = G_OBJECT_CLASS (gitg_commit_action_push_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_COMMIT_ACTION_PUSH, GitgCommitActionPush);
	_tmp0_ = g_settings_new (APPLICATION_ID ".preferences.general");
	settings = _tmp0_;
	_tmp1_ = settings;
	g_settings_bind (_tmp1_, "smart-push", (GObject*) self, "smart-push", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (settings);
	return obj;
}

static void
gitg_commit_action_push_class_init (GitgCommitActionPushClass * klass,
                                    gpointer klass_data)
{
	gitg_commit_action_push_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GitgCommitActionPush_private_offset);
	((GitgCommitActionPushClass *) klass)->get_ref_name = (gchar* (*) (GitgCommitActionPush*)) gitg_commit_action_push_real_get_ref_name;
	((GitgCommitActionPushClass *) klass)->get_ref_shortname = (gchar* (*) (GitgCommitActionPush*)) gitg_commit_action_push_real_get_ref_shortname;
	((GitgCommitActionPushClass *) klass)->get_ref = (GObject* (*) (GitgCommitActionPush*)) gitg_commit_action_push_real_get_ref;
	((GitgCommitActionPushClass *) klass)->activate = (void (*) (GitgCommitActionPush*)) gitg_commit_action_push_real_activate;
	((GitgCommitActionPushClass *) klass)->after_successful_push = (void (*) (GitgCommitActionPush*, gboolean, const gchar*, const gchar*)) gitg_commit_action_push_real_after_successful_push;
	GITG_COMMIT_ACTION_PUSH_CLASS (klass)->get_id = (gchar* (*) (GitgCommitActionPush*)) gitg_commit_action_push_real_get_id;
	GITG_COMMIT_ACTION_PUSH_CLASS (klass)->get_description = (gchar* (*) (GitgCommitActionPush*)) gitg_commit_action_push_real_get_description;
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_commit_action_push_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_commit_action_push_set_property;
	G_OBJECT_CLASS (klass)->constructor = gitg_commit_action_push_constructor;
	G_OBJECT_CLASS (klass)->finalize = gitg_commit_action_push_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_PUSH_APPLICATION_PROPERTY, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_APPLICATION_PROPERTY] = g_param_spec_object ("application", "application", "application", GITG_EXT_TYPE_APPLICATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_PUSH_ACTION_INTERFACE_PROPERTY, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_ACTION_INTERFACE_PROPERTY] = g_param_spec_object ("action-interface", "action-interface", "action-interface", GITG_EXT_TYPE_REF_ACTION_INTERFACE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_PUSH_COMMIT_PROPERTY, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_COMMIT_PROPERTY] = g_param_spec_object ("commit", "commit", "commit", GITG_TYPE_COMMIT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_PUSH_SMART_PUSH_PROPERTY, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_SMART_PUSH_PROPERTY] = g_param_spec_boolean ("smart-push", "smart-push", "smart-push", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_PUSH_ENABLED_PROPERTY, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_ENABLED_PROPERTY] = g_param_spec_boolean ("enabled", "enabled", "enabled", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_PUSH_ID_PROPERTY, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_PUSH_DISPLAY_NAME_PROPERTY, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_DISPLAY_NAME_PROPERTY] = g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_COMMIT_ACTION_PUSH_DESCRIPTION_PROPERTY, gitg_commit_action_push_properties[GITG_COMMIT_ACTION_PUSH_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gitg_commit_action_push_gitg_ext_ui_element_interface_init (GitgExtUIElementIface * iface,
                                                            gpointer iface_data)
{
	gitg_commit_action_push_gitg_ext_ui_element_parent_iface = g_type_interface_peek_parent (iface);
	iface->activate = (void (*) (GitgExtUIElement*)) gitg_commit_action_push_activate;
	iface->get_application = gitg_commit_action_push_real_get_application;
	iface->set_application = gitg_commit_action_push_real_set_application;
	iface->get_enabled = gitg_commit_action_push_real_get_enabled;
	iface->get_id = (gchar* (*) (GitgExtUIElement*)) gitg_commit_action_push_get_id;
	iface->get_display_name = gitg_commit_action_push_real_get_display_name;
	iface->get_description = (gchar* (*) (GitgExtUIElement*)) gitg_commit_action_push_get_description;
}

static void
gitg_commit_action_push_gitg_ext_action_interface_init (GitgExtActionIface * iface,
                                                        gpointer iface_data)
{
	gitg_commit_action_push_gitg_ext_action_parent_iface = g_type_interface_peek_parent (iface);
}

static void
gitg_commit_action_push_gitg_ext_commit_action_interface_init (GitgExtCommitActionIface * iface,
                                                               gpointer iface_data)
{
	gitg_commit_action_push_gitg_ext_commit_action_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_action_interface = gitg_commit_action_push_real_get_action_interface;
	iface->set_action_interface = gitg_commit_action_push_real_set_action_interface;
	iface->get_commit = gitg_commit_action_push_real_get_commit;
	iface->set_commit = gitg_commit_action_push_real_set_commit;
}

static void
gitg_commit_action_push_instance_init (GitgCommitActionPush * self,
                                       gpointer klass)
{
	self->priv = gitg_commit_action_push_get_instance_private (self);
}

static void
gitg_commit_action_push_finalize (GObject * obj)
{
	GitgCommitActionPush * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_COMMIT_ACTION_PUSH, GitgCommitActionPush);
	_g_object_unref0 (self->priv->_application);
	_g_object_unref0 (self->priv->_action_interface);
	_g_object_unref0 (self->priv->_commit);
	G_OBJECT_CLASS (gitg_commit_action_push_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gitg_commit_action_push_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgCommitActionPushClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_commit_action_push_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgCommitActionPush), 0, (GInstanceInitFunc) gitg_commit_action_push_instance_init, NULL };
	static const GInterfaceInfo gitg_ext_ui_element_info = { (GInterfaceInitFunc) gitg_commit_action_push_gitg_ext_ui_element_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gitg_ext_action_info = { (GInterfaceInitFunc) gitg_commit_action_push_gitg_ext_action_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gitg_ext_commit_action_info = { (GInterfaceInitFunc) gitg_commit_action_push_gitg_ext_commit_action_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gitg_commit_action_push_type_id;
	gitg_commit_action_push_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgCommitActionPush", &g_define_type_info, 0);
	g_type_add_interface_static (gitg_commit_action_push_type_id, GITG_EXT_TYPE_UI_ELEMENT, &gitg_ext_ui_element_info);
	g_type_add_interface_static (gitg_commit_action_push_type_id, GITG_EXT_TYPE_ACTION, &gitg_ext_action_info);
	g_type_add_interface_static (gitg_commit_action_push_type_id, GITG_EXT_TYPE_COMMIT_ACTION, &gitg_ext_commit_action_info);
	GitgCommitActionPush_private_offset = g_type_add_instance_private (gitg_commit_action_push_type_id, sizeof (GitgCommitActionPushPrivate));
	return gitg_commit_action_push_type_id;
}

GType
gitg_commit_action_push_get_type (void)
{
	static gsize gitg_commit_action_push_type_id__once = 0;
	if (g_once_init_enter (&gitg_commit_action_push_type_id__once)) {
		GType gitg_commit_action_push_type_id;
		gitg_commit_action_push_type_id = gitg_commit_action_push_get_type_once ();
		g_once_init_leave (&gitg_commit_action_push_type_id__once, gitg_commit_action_push_type_id);
	}
	return gitg_commit_action_push_type_id__once;
}

static void
_vala_gitg_commit_action_push_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	GitgCommitActionPush * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_COMMIT_ACTION_PUSH, GitgCommitActionPush);
	switch (property_id) {
		case GITG_COMMIT_ACTION_PUSH_APPLICATION_PROPERTY:
		g_value_take_object (value, gitg_ext_ui_element_get_application ((GitgExtUIElement*) self));
		break;
		case GITG_COMMIT_ACTION_PUSH_ACTION_INTERFACE_PROPERTY:
		g_value_set_object (value, gitg_ext_commit_action_get_action_interface ((GitgExtCommitAction*) self));
		break;
		case GITG_COMMIT_ACTION_PUSH_COMMIT_PROPERTY:
		g_value_set_object (value, gitg_ext_commit_action_get_commit ((GitgExtCommitAction*) self));
		break;
		case GITG_COMMIT_ACTION_PUSH_SMART_PUSH_PROPERTY:
		g_value_set_boolean (value, gitg_commit_action_push_get_smart_push (self));
		break;
		case GITG_COMMIT_ACTION_PUSH_ENABLED_PROPERTY:
		g_value_set_boolean (value, gitg_ext_ui_element_get_enabled ((GitgExtUIElement*) self));
		break;
		case GITG_COMMIT_ACTION_PUSH_ID_PROPERTY:
		g_value_take_string (value, gitg_commit_action_push_get_id (self));
		break;
		case GITG_COMMIT_ACTION_PUSH_DISPLAY_NAME_PROPERTY:
		g_value_take_string (value, gitg_ext_ui_element_get_display_name ((GitgExtUIElement*) self));
		break;
		case GITG_COMMIT_ACTION_PUSH_DESCRIPTION_PROPERTY:
		g_value_take_string (value, gitg_commit_action_push_get_description (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gitg_commit_action_push_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	GitgCommitActionPush * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_COMMIT_ACTION_PUSH, GitgCommitActionPush);
	switch (property_id) {
		case GITG_COMMIT_ACTION_PUSH_APPLICATION_PROPERTY:
		gitg_ext_ui_element_set_application ((GitgExtUIElement*) self, g_value_get_object (value));
		break;
		case GITG_COMMIT_ACTION_PUSH_ACTION_INTERFACE_PROPERTY:
		gitg_ext_commit_action_set_action_interface ((GitgExtCommitAction*) self, g_value_get_object (value));
		break;
		case GITG_COMMIT_ACTION_PUSH_COMMIT_PROPERTY:
		gitg_ext_commit_action_set_commit ((GitgExtCommitAction*) self, g_value_get_object (value));
		break;
		case GITG_COMMIT_ACTION_PUSH_SMART_PUSH_PROPERTY:
		gitg_commit_action_push_set_smart_push (self, g_value_get_boolean (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);
}

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

