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

/*
 * This file is part of gitg
 *
 * Copyright (C) 2022 - Adwait Rawat
 *
 * 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 <gtk/gtk.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include <gee.h>
#include "libgitg.h"
#include <libgit2-glib/ggit.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>

#define GITG_FETCH_ALL_REMOTES_ACTION_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_FETCH_ALL_REMOTES_ACTION (gitg_fetch_all_remotes_action_get_type ())
#define GITG_FETCH_ALL_REMOTES_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_FETCH_ALL_REMOTES_ACTION, GitgFetchAllRemotesAction))
#define GITG_FETCH_ALL_REMOTES_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_FETCH_ALL_REMOTES_ACTION, GitgFetchAllRemotesActionClass))
#define GITG_IS_FETCH_ALL_REMOTES_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_FETCH_ALL_REMOTES_ACTION))
#define GITG_IS_FETCH_ALL_REMOTES_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_FETCH_ALL_REMOTES_ACTION))
#define GITG_FETCH_ALL_REMOTES_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_FETCH_ALL_REMOTES_ACTION, GitgFetchAllRemotesActionClass))

typedef struct _GitgFetchAllRemotesAction GitgFetchAllRemotesAction;
typedef struct _GitgFetchAllRemotesActionClass GitgFetchAllRemotesActionClass;
typedef struct _GitgFetchAllRemotesActionPrivate GitgFetchAllRemotesActionPrivate;

#define GITG_HISTORY_TYPE_REFS_LIST (gitg_history_refs_list_get_type ())
#define GITG_HISTORY_REFS_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_HISTORY_TYPE_REFS_LIST, GitgHistoryRefsList))
#define GITG_HISTORY_REFS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_HISTORY_TYPE_REFS_LIST, GitgHistoryRefsListClass))
#define GITG_HISTORY_IS_REFS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_HISTORY_TYPE_REFS_LIST))
#define GITG_HISTORY_IS_REFS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_HISTORY_TYPE_REFS_LIST))
#define GITG_HISTORY_REFS_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_HISTORY_TYPE_REFS_LIST, GitgHistoryRefsListClass))

typedef struct _GitgHistoryRefsList GitgHistoryRefsList;
typedef struct _GitgHistoryRefsListClass GitgHistoryRefsListClass;
enum  {
	GITG_FETCH_ALL_REMOTES_ACTION_0_PROPERTY,
	GITG_FETCH_ALL_REMOTES_ACTION_APPLICATION_PROPERTY,
	GITG_FETCH_ALL_REMOTES_ACTION_NO_TAGS_PROPERTY,
	GITG_FETCH_ALL_REMOTES_ACTION_ID_PROPERTY,
	GITG_FETCH_ALL_REMOTES_ACTION_DISPLAY_NAME_PROPERTY,
	GITG_FETCH_ALL_REMOTES_ACTION_DESCRIPTION_PROPERTY,
	GITG_FETCH_ALL_REMOTES_ACTION_NUM_PROPERTIES
};
static GParamSpec* gitg_fetch_all_remotes_action_properties[GITG_FETCH_ALL_REMOTES_ACTION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block86Data Block86Data;
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))

struct _GitgFetchAllRemotesAction {
	GObject parent_instance;
	GitgFetchAllRemotesActionPrivate * priv;
	GitgHistoryRefsList* refs_list;
};

struct _GitgFetchAllRemotesActionClass {
	GObjectClass parent_class;
};

struct _GitgFetchAllRemotesActionPrivate {
	GitgExtApplication* _application;
	gboolean _no_tags;
};

struct _Block86Data {
	int _ref_count_;
	GitgFetchAllRemotesAction* self;
	GitgRemote* remote;
};

static gint GitgFetchAllRemotesAction_private_offset;
static gpointer gitg_fetch_all_remotes_action_parent_class = NULL;
static GitgExtUIElementIface * gitg_fetch_all_remotes_action_gitg_ext_ui_element_parent_iface = NULL;
static GitgExtActionIface * gitg_fetch_all_remotes_action_gitg_ext_action_parent_iface = NULL;
static GitgExtFetchAvoidTagsIface * gitg_fetch_all_remotes_action_gitg_ext_fetch_avoid_tags_parent_iface = NULL;

VALA_EXTERN GType gitg_fetch_all_remotes_action_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgFetchAllRemotesAction, g_object_unref)
VALA_EXTERN GType gitg_history_refs_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgHistoryRefsList, g_object_unref)
VALA_EXTERN GitgFetchAllRemotesAction* gitg_fetch_all_remotes_action_new (GitgExtApplication* application,
                                                              GitgHistoryRefsList* refs_list);
VALA_EXTERN GitgFetchAllRemotesAction* gitg_fetch_all_remotes_action_construct (GType object_type,
                                                                    GitgExtApplication* application,
                                                                    GitgHistoryRefsList* refs_list);
static void gitg_fetch_all_remotes_action_real_activate (GitgExtUIElement* base);
VALA_EXTERN GeeList* gitg_history_refs_list_get_references (GitgHistoryRefsList* self);
static gboolean __lambda237_ (GitgFetchAllRemotesAction* self,
                       GitgRef* r);
static Block86Data* block86_data_ref (Block86Data* _data86_);
static void block86_data_unref (void * _userdata_);
static GgitRemoteDownloadTagsType* _ggit_remote_download_tags_type_dup (GgitRemoteDownloadTagsType* self);
static void __lambda238_ (Block86Data* _data86_,
                   GObject* obj,
                   GAsyncResult* res);
static void ___lambda238__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static gboolean ___lambda237__gee_forall_func (gpointer g,
                                        gpointer self);
static void gitg_fetch_all_remotes_action_finalize (GObject * obj);
static GType gitg_fetch_all_remotes_action_get_type_once (void);
static void _vala_gitg_fetch_all_remotes_action_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_gitg_fetch_all_remotes_action_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);

static inline gpointer
gitg_fetch_all_remotes_action_get_instance_private (GitgFetchAllRemotesAction* self)
{
	return G_STRUCT_MEMBER_P (self, GitgFetchAllRemotesAction_private_offset);
}

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

GitgFetchAllRemotesAction*
gitg_fetch_all_remotes_action_construct (GType object_type,
                                         GitgExtApplication* application,
                                         GitgHistoryRefsList* refs_list)
{
	GitgFetchAllRemotesAction * self = NULL;
	GitgHistoryRefsList* _tmp0_;
	g_return_val_if_fail (application != NULL, NULL);
	g_return_val_if_fail (refs_list != NULL, NULL);
	self = (GitgFetchAllRemotesAction*) g_object_new (object_type, "application", application, NULL);
	_tmp0_ = _g_object_ref0 (refs_list);
	_g_object_unref0 (self->refs_list);
	self->refs_list = _tmp0_;
	return self;
}

GitgFetchAllRemotesAction*
gitg_fetch_all_remotes_action_new (GitgExtApplication* application,
                                   GitgHistoryRefsList* refs_list)
{
	return gitg_fetch_all_remotes_action_construct (GITG_TYPE_FETCH_ALL_REMOTES_ACTION, application, refs_list);
}

static Block86Data*
block86_data_ref (Block86Data* _data86_)
{
	g_atomic_int_inc (&_data86_->_ref_count_);
	return _data86_;
}

static void
block86_data_unref (void * _userdata_)
{
	Block86Data* _data86_;
	_data86_ = (Block86Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data86_->_ref_count_)) {
		GitgFetchAllRemotesAction* self;
		self = _data86_->self;
		_g_object_unref0 (_data86_->remote);
		_g_object_unref0 (self);
		g_slice_free (Block86Data, _data86_);
	}
}

static GgitRemoteDownloadTagsType*
_ggit_remote_download_tags_type_dup (GgitRemoteDownloadTagsType* self)
{
	GgitRemoteDownloadTagsType* dup;
	dup = g_new0 (GgitRemoteDownloadTagsType, 1);
	memcpy (dup, self, sizeof (GgitRemoteDownloadTagsType));
	return dup;
}

static gpointer
__ggit_remote_download_tags_type_dup0 (gpointer self)
{
	return self ? _ggit_remote_download_tags_type_dup (self) : NULL;
}

static void
__lambda238_ (Block86Data* _data86_,
              GObject* obj,
              GAsyncResult* res)
{
	GitgFetchAllRemotesAction* self;
	GitgRemote* _tmp0_;
	GError* _inner_error0_ = NULL;
	self = _data86_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = _data86_->remote;
	gitg_remote_fetch_finish (_tmp0_, res, &_inner_error0_);
	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
___lambda238__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda238_ (self, source_object, res);
	block86_data_unref (self);
}

static gboolean
__lambda237_ (GitgFetchAllRemotesAction* self,
              GitgRef* r)
{
	Block86Data* _data86_;
	gchar* remote_name = NULL;
	GitgParsedRefName* _tmp0_;
	GitgParsedRefName* _tmp1_;
	GitgParsedRefName* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GitgExtApplication* _tmp6_;
	GitgExtApplication* _tmp7_;
	GitgExtApplication* _tmp8_;
	GitgExtRemoteLookup* _tmp9_;
	GitgExtRemoteLookup* _tmp10_;
	GitgExtRemoteLookup* _tmp11_;
	const gchar* _tmp12_;
	GitgRemote* _tmp13_;
	GitgRemote* _tmp14_;
	GgitRemoteDownloadTagsType* download_tags = NULL;
	gboolean _tmp15_;
	gboolean _tmp16_;
	GitgRemote* _tmp19_;
	GgitRemoteDownloadTagsType* _tmp20_;
	gboolean result;
	g_return_val_if_fail (r != NULL, FALSE);
	_data86_ = g_slice_new0 (Block86Data);
	_data86_->_ref_count_ = 1;
	_data86_->self = g_object_ref (self);
	_tmp0_ = gitg_ref_get_parsed_name (r);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = gitg_parsed_ref_name_get_remote_name (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp2_);
	remote_name = _tmp5_;
	_tmp6_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	_tmp9_ = gitg_ext_application_get_remote_lookup (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = _tmp10_;
	_tmp12_ = remote_name;
	_tmp13_ = gitg_ext_remote_lookup_lookup (_tmp11_, _tmp12_);
	_tmp14_ = _tmp13_;
	_g_object_unref0 (_tmp11_);
	_g_object_unref0 (_tmp8_);
	_data86_->remote = _tmp14_;
	download_tags = NULL;
	_tmp15_ = gitg_ext_fetch_avoid_tags_get_no_tags ((GitgExtFetchAvoidTags*) self);
	_tmp16_ = _tmp15_;
	if (_tmp16_) {
		GgitRemoteDownloadTagsType _tmp17_;
		GgitRemoteDownloadTagsType* _tmp18_;
		_tmp17_ = GGIT_REMOTE_DOWNLOAD_TAGS_NONE;
		_tmp18_ = __ggit_remote_download_tags_type_dup0 (&_tmp17_);
		_g_free0 (download_tags);
		download_tags = _tmp18_;
	}
	_tmp19_ = _data86_->remote;
	_tmp20_ = download_tags;
	gitg_remote_fetch (_tmp19_, NULL, NULL, _tmp20_, ___lambda238__gasync_ready_callback, block86_data_ref (_data86_));
	result = TRUE;
	_g_free0 (download_tags);
	_g_free0 (remote_name);
	block86_data_unref (_data86_);
	_data86_ = NULL;
	_g_object_unref0 (r);
	return result;
}

static gboolean
___lambda237__gee_forall_func (gpointer g,
                               gpointer self)
{
	gboolean result;
	result = __lambda237_ ((GitgFetchAllRemotesAction*) self, (GitgRef*) g);
	return result;
}

static void
gitg_fetch_all_remotes_action_real_activate (GitgExtUIElement* base)
{
	GitgFetchAllRemotesAction * self;
	GitgHistoryRefsList* _tmp0_;
	GeeList* _tmp1_;
	GeeList* _tmp2_;
	GeeList* _tmp3_;
	self = (GitgFetchAllRemotesAction*) base;
	_tmp0_ = self->refs_list;
	_tmp1_ = gitg_history_refs_list_get_references (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	gee_traversable_foreach ((GeeTraversable*) _tmp3_, ___lambda237__gee_forall_func, self);
	_g_object_unref0 (_tmp3_);
}

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

static void
gitg_fetch_all_remotes_action_real_set_application (GitgExtUIElement* base,
                                                    GitgExtApplication* value)
{
	GitgFetchAllRemotesAction* self;
	GitgExtApplication* old_value;
	self = (GitgFetchAllRemotesAction*) base;
	old_value = gitg_fetch_all_remotes_action_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_fetch_all_remotes_action_properties[GITG_FETCH_ALL_REMOTES_ACTION_APPLICATION_PROPERTY]);
	}
	_g_object_unref0 (old_value);
}

static gboolean
gitg_fetch_all_remotes_action_real_get_no_tags (GitgExtFetchAvoidTags* base)
{
	gboolean result;
	GitgFetchAllRemotesAction* self;
	self = (GitgFetchAllRemotesAction*) base;
	result = self->priv->_no_tags;
	return result;
}

static void
gitg_fetch_all_remotes_action_real_set_no_tags (GitgExtFetchAvoidTags* base,
                                                gboolean value)
{
	GitgFetchAllRemotesAction* self;
	gboolean old_value;
	self = (GitgFetchAllRemotesAction*) base;
	old_value = gitg_fetch_all_remotes_action_real_get_no_tags (base);
	if (old_value != value) {
		self->priv->_no_tags = value;
		g_object_notify_by_pspec ((GObject *) self, gitg_fetch_all_remotes_action_properties[GITG_FETCH_ALL_REMOTES_ACTION_NO_TAGS_PROPERTY]);
	}
}

static gchar*
gitg_fetch_all_remotes_action_real_get_id (GitgExtUIElement* base)
{
	gchar* result;
	GitgFetchAllRemotesAction* self;
	gchar* _tmp0_;
	self = (GitgFetchAllRemotesAction*) base;
	_tmp0_ = g_strdup ("/org/gnome/gitg/ref-actions/fetch-all-remotes");
	result = _tmp0_;
	return result;
}

static gchar*
gitg_fetch_all_remotes_action_real_get_display_name (GitgExtUIElement* base)
{
	gchar* result;
	GitgFetchAllRemotesAction* self;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gchar* suffix = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	self = (GitgFetchAllRemotesAction*) base;
	_tmp1_ = gitg_ext_fetch_avoid_tags_get_no_tags ((GitgExtFetchAvoidTags*) self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = _ (" (without tags)");
	} else {
		_tmp0_ = "";
	}
	_tmp3_ = g_strdup (_tmp0_);
	suffix = _tmp3_;
	_tmp4_ = g_strdup_printf (_ ("Fetch all remotes%s"), suffix);
	result = _tmp4_;
	_g_free0 (suffix);
	return result;
}

static gchar*
gitg_fetch_all_remotes_action_real_get_description (GitgExtUIElement* base)
{
	gchar* result;
	GitgFetchAllRemotesAction* self;
	gchar* _tmp0_;
	self = (GitgFetchAllRemotesAction*) base;
	_tmp0_ = g_strdup (_ ("Fetch objects from all remotes. (hold Shift to ignore tags)"));
	result = _tmp0_;
	return result;
}

static void
gitg_fetch_all_remotes_action_class_init (GitgFetchAllRemotesActionClass * klass,
                                          gpointer klass_data)
{
	gitg_fetch_all_remotes_action_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GitgFetchAllRemotesAction_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_fetch_all_remotes_action_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_fetch_all_remotes_action_set_property;
	G_OBJECT_CLASS (klass)->finalize = gitg_fetch_all_remotes_action_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_FETCH_ALL_REMOTES_ACTION_APPLICATION_PROPERTY, gitg_fetch_all_remotes_action_properties[GITG_FETCH_ALL_REMOTES_ACTION_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_FETCH_ALL_REMOTES_ACTION_NO_TAGS_PROPERTY, gitg_fetch_all_remotes_action_properties[GITG_FETCH_ALL_REMOTES_ACTION_NO_TAGS_PROPERTY] = g_param_spec_boolean ("no-tags", "no-tags", "no-tags", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_FETCH_ALL_REMOTES_ACTION_ID_PROPERTY, gitg_fetch_all_remotes_action_properties[GITG_FETCH_ALL_REMOTES_ACTION_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_FETCH_ALL_REMOTES_ACTION_DISPLAY_NAME_PROPERTY, gitg_fetch_all_remotes_action_properties[GITG_FETCH_ALL_REMOTES_ACTION_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_FETCH_ALL_REMOTES_ACTION_DESCRIPTION_PROPERTY, gitg_fetch_all_remotes_action_properties[GITG_FETCH_ALL_REMOTES_ACTION_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gitg_fetch_all_remotes_action_gitg_ext_ui_element_interface_init (GitgExtUIElementIface * iface,
                                                                  gpointer iface_data)
{
	gitg_fetch_all_remotes_action_gitg_ext_ui_element_parent_iface = g_type_interface_peek_parent (iface);
	iface->activate = (void (*) (GitgExtUIElement*)) gitg_fetch_all_remotes_action_real_activate;
	iface->get_application = gitg_fetch_all_remotes_action_real_get_application;
	iface->set_application = gitg_fetch_all_remotes_action_real_set_application;
	iface->get_id = gitg_fetch_all_remotes_action_real_get_id;
	iface->get_display_name = gitg_fetch_all_remotes_action_real_get_display_name;
	iface->get_description = gitg_fetch_all_remotes_action_real_get_description;
}

static void
gitg_fetch_all_remotes_action_gitg_ext_action_interface_init (GitgExtActionIface * iface,
                                                              gpointer iface_data)
{
	gitg_fetch_all_remotes_action_gitg_ext_action_parent_iface = g_type_interface_peek_parent (iface);
}

static void
gitg_fetch_all_remotes_action_gitg_ext_fetch_avoid_tags_interface_init (GitgExtFetchAvoidTagsIface * iface,
                                                                        gpointer iface_data)
{
	gitg_fetch_all_remotes_action_gitg_ext_fetch_avoid_tags_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_no_tags = gitg_fetch_all_remotes_action_real_get_no_tags;
	iface->set_no_tags = gitg_fetch_all_remotes_action_real_set_no_tags;
}

static void
gitg_fetch_all_remotes_action_instance_init (GitgFetchAllRemotesAction * self,
                                             gpointer klass)
{
	self->priv = gitg_fetch_all_remotes_action_get_instance_private (self);
}

static void
gitg_fetch_all_remotes_action_finalize (GObject * obj)
{
	GitgFetchAllRemotesAction * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_FETCH_ALL_REMOTES_ACTION, GitgFetchAllRemotesAction);
	_g_object_unref0 (self->priv->_application);
	_g_object_unref0 (self->refs_list);
	G_OBJECT_CLASS (gitg_fetch_all_remotes_action_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gitg_fetch_all_remotes_action_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgFetchAllRemotesActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_fetch_all_remotes_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgFetchAllRemotesAction), 0, (GInstanceInitFunc) gitg_fetch_all_remotes_action_instance_init, NULL };
	static const GInterfaceInfo gitg_ext_ui_element_info = { (GInterfaceInitFunc) gitg_fetch_all_remotes_action_gitg_ext_ui_element_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gitg_ext_action_info = { (GInterfaceInitFunc) gitg_fetch_all_remotes_action_gitg_ext_action_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gitg_ext_fetch_avoid_tags_info = { (GInterfaceInitFunc) gitg_fetch_all_remotes_action_gitg_ext_fetch_avoid_tags_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gitg_fetch_all_remotes_action_type_id;
	gitg_fetch_all_remotes_action_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgFetchAllRemotesAction", &g_define_type_info, 0);
	g_type_add_interface_static (gitg_fetch_all_remotes_action_type_id, GITG_EXT_TYPE_UI_ELEMENT, &gitg_ext_ui_element_info);
	g_type_add_interface_static (gitg_fetch_all_remotes_action_type_id, GITG_EXT_TYPE_ACTION, &gitg_ext_action_info);
	g_type_add_interface_static (gitg_fetch_all_remotes_action_type_id, GITG_EXT_TYPE_FETCH_AVOID_TAGS, &gitg_ext_fetch_avoid_tags_info);
	GitgFetchAllRemotesAction_private_offset = g_type_add_instance_private (gitg_fetch_all_remotes_action_type_id, sizeof (GitgFetchAllRemotesActionPrivate));
	return gitg_fetch_all_remotes_action_type_id;
}

GType
gitg_fetch_all_remotes_action_get_type (void)
{
	static gsize gitg_fetch_all_remotes_action_type_id__once = 0;
	if (g_once_init_enter (&gitg_fetch_all_remotes_action_type_id__once)) {
		GType gitg_fetch_all_remotes_action_type_id;
		gitg_fetch_all_remotes_action_type_id = gitg_fetch_all_remotes_action_get_type_once ();
		g_once_init_leave (&gitg_fetch_all_remotes_action_type_id__once, gitg_fetch_all_remotes_action_type_id);
	}
	return gitg_fetch_all_remotes_action_type_id__once;
}

static void
_vala_gitg_fetch_all_remotes_action_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	GitgFetchAllRemotesAction * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_FETCH_ALL_REMOTES_ACTION, GitgFetchAllRemotesAction);
	switch (property_id) {
		case GITG_FETCH_ALL_REMOTES_ACTION_APPLICATION_PROPERTY:
		g_value_take_object (value, gitg_ext_ui_element_get_application ((GitgExtUIElement*) self));
		break;
		case GITG_FETCH_ALL_REMOTES_ACTION_NO_TAGS_PROPERTY:
		g_value_set_boolean (value, gitg_ext_fetch_avoid_tags_get_no_tags ((GitgExtFetchAvoidTags*) self));
		break;
		case GITG_FETCH_ALL_REMOTES_ACTION_ID_PROPERTY:
		g_value_take_string (value, gitg_ext_ui_element_get_id ((GitgExtUIElement*) self));
		break;
		case GITG_FETCH_ALL_REMOTES_ACTION_DISPLAY_NAME_PROPERTY:
		g_value_take_string (value, gitg_ext_ui_element_get_display_name ((GitgExtUIElement*) self));
		break;
		case GITG_FETCH_ALL_REMOTES_ACTION_DESCRIPTION_PROPERTY:
		g_value_take_string (value, gitg_ext_ui_element_get_description ((GitgExtUIElement*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gitg_fetch_all_remotes_action_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	GitgFetchAllRemotesAction * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_FETCH_ALL_REMOTES_ACTION, GitgFetchAllRemotesAction);
	switch (property_id) {
		case GITG_FETCH_ALL_REMOTES_ACTION_APPLICATION_PROPERTY:
		gitg_ext_ui_element_set_application ((GitgExtUIElement*) self, g_value_get_object (value));
		break;
		case GITG_FETCH_ALL_REMOTES_ACTION_NO_TAGS_PROPERTY:
		gitg_ext_fetch_avoid_tags_set_no_tags ((GitgExtFetchAvoidTags*) self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

