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

/*
 * This file is part of gitg
 *
 * Copyright (C) 2014 - Jesse van den Kieboom
 *
 * 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 "libgitg.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "config.h"
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>

#define GITG_REF_ACTION_COPY_NAME_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_REF_ACTION_COPY_NAME (gitg_ref_action_copy_name_get_type ())
#define GITG_REF_ACTION_COPY_NAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_REF_ACTION_COPY_NAME, GitgRefActionCopyName))
#define GITG_REF_ACTION_COPY_NAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_REF_ACTION_COPY_NAME, GitgRefActionCopyNameClass))
#define GITG_IS_REF_ACTION_COPY_NAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_REF_ACTION_COPY_NAME))
#define GITG_IS_REF_ACTION_COPY_NAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_REF_ACTION_COPY_NAME))
#define GITG_REF_ACTION_COPY_NAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_REF_ACTION_COPY_NAME, GitgRefActionCopyNameClass))

typedef struct _GitgRefActionCopyName GitgRefActionCopyName;
typedef struct _GitgRefActionCopyNameClass GitgRefActionCopyNameClass;
typedef struct _GitgRefActionCopyNamePrivate GitgRefActionCopyNamePrivate;
enum  {
	GITG_REF_ACTION_COPY_NAME_0_PROPERTY,
	GITG_REF_ACTION_COPY_NAME_APPLICATION_PROPERTY,
	GITG_REF_ACTION_COPY_NAME_ACTION_INTERFACE_PROPERTY,
	GITG_REF_ACTION_COPY_NAME_REFERENCE_PROPERTY,
	GITG_REF_ACTION_COPY_NAME_ID_PROPERTY,
	GITG_REF_ACTION_COPY_NAME_DISPLAY_NAME_PROPERTY,
	GITG_REF_ACTION_COPY_NAME_DESCRIPTION_PROPERTY,
	GITG_REF_ACTION_COPY_NAME_ENABLED_PROPERTY,
	GITG_REF_ACTION_COPY_NAME_NUM_PROPERTIES
};
static GParamSpec* gitg_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _GitgRefActionCopyName {
	GObject parent_instance;
	GitgRefActionCopyNamePrivate * priv;
};

struct _GitgRefActionCopyNameClass {
	GObjectClass parent_class;
};

struct _GitgRefActionCopyNamePrivate {
	GitgExtApplication* _application;
	GitgExtRefActionInterface* _action_interface;
	GitgRef* _reference;
};

static gint GitgRefActionCopyName_private_offset;
static gpointer gitg_ref_action_copy_name_parent_class = NULL;
static GitgExtUIElementIface * gitg_ref_action_copy_name_gitg_ext_ui_element_parent_iface = NULL;
static GitgExtActionIface * gitg_ref_action_copy_name_gitg_ext_action_parent_iface = NULL;
static GitgExtRefActionIface * gitg_ref_action_copy_name_gitg_ext_ref_action_parent_iface = NULL;

VALA_EXTERN GType gitg_ref_action_copy_name_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgRefActionCopyName, g_object_unref)
VALA_EXTERN GitgRefActionCopyName* gitg_ref_action_copy_name_new (GitgExtApplication* application,
                                                      GitgExtRefActionInterface* action_interface,
                                                      GitgRef* reference);
VALA_EXTERN GitgRefActionCopyName* gitg_ref_action_copy_name_construct (GType object_type,
                                                            GitgExtApplication* application,
                                                            GitgExtRefActionInterface* action_interface,
                                                            GitgRef* reference);
static void gitg_ref_action_copy_name_real_activate (GitgExtUIElement* base);
static void gitg_ref_action_copy_name_finalize (GObject * obj);
static GType gitg_ref_action_copy_name_get_type_once (void);
static void _vala_gitg_ref_action_copy_name_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_gitg_ref_action_copy_name_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);

static inline gpointer
gitg_ref_action_copy_name_get_instance_private (GitgRefActionCopyName* self)
{
	return G_STRUCT_MEMBER_P (self, GitgRefActionCopyName_private_offset);
}

GitgRefActionCopyName*
gitg_ref_action_copy_name_construct (GType object_type,
                                     GitgExtApplication* application,
                                     GitgExtRefActionInterface* action_interface,
                                     GitgRef* reference)
{
	GitgRefActionCopyName * self = NULL;
	g_return_val_if_fail (application != NULL, NULL);
	g_return_val_if_fail (action_interface != NULL, NULL);
	g_return_val_if_fail (reference != NULL, NULL);
	self = (GitgRefActionCopyName*) g_object_new (object_type, "application", application, "action-interface", action_interface, "reference", reference, NULL);
	return self;
}

GitgRefActionCopyName*
gitg_ref_action_copy_name_new (GitgExtApplication* application,
                               GitgExtRefActionInterface* action_interface,
                               GitgRef* reference)
{
	return gitg_ref_action_copy_name_construct (GITG_TYPE_REF_ACTION_COPY_NAME, application, action_interface, reference);
}

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

static void
gitg_ref_action_copy_name_real_activate (GitgExtUIElement* base)
{
	GitgRefActionCopyName * self;
	GtkClipboard* clip = NULL;
	GitgExtApplication* _tmp0_;
	GitgExtApplication* _tmp1_;
	GtkWidget* _tmp2_;
	GtkClipboard* _tmp3_;
	GtkClipboard* _tmp4_;
	GtkClipboard* _tmp5_;
	GtkClipboard* _tmp6_;
	GitgRef* _tmp7_;
	GitgRef* _tmp8_;
	GitgParsedRefName* _tmp9_;
	GitgParsedRefName* _tmp10_;
	GitgParsedRefName* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	GitgExtApplication* _tmp15_;
	GitgExtApplication* _tmp16_;
	GtkWidget* _tmp17_;
	GtkClipboard* _tmp18_;
	GtkClipboard* _tmp19_;
	GtkClipboard* _tmp20_;
	GitgRef* _tmp21_;
	GitgRef* _tmp22_;
	GitgParsedRefName* _tmp23_;
	GitgParsedRefName* _tmp24_;
	GitgParsedRefName* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	self = (GitgRefActionCopyName*) base;
	_tmp0_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget);
	_tmp3_ = gtk_widget_get_clipboard (_tmp2_, GDK_SELECTION_CLIPBOARD);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp2_);
	clip = _tmp5_;
	_tmp6_ = clip;
	_tmp7_ = gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self);
	_tmp8_ = _tmp7_;
	_tmp9_ = gitg_ref_get_parsed_name (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = _tmp10_;
	_tmp12_ = gitg_parsed_ref_name_get_shortname (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = _tmp13_;
	gtk_clipboard_set_text (_tmp6_, _tmp14_, -1);
	_g_free0 (_tmp14_);
	_g_object_unref0 (_tmp11_);
	_tmp15_ = gitg_ext_ui_element_get_application ((GitgExtUIElement*) self);
	_tmp16_ = _tmp15_;
	_tmp17_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget);
	_tmp18_ = gtk_widget_get_clipboard (_tmp17_, GDK_SELECTION_PRIMARY);
	_tmp19_ = _g_object_ref0 (_tmp18_);
	_g_object_unref0 (clip);
	clip = _tmp19_;
	_g_object_unref0 (_tmp17_);
	_tmp20_ = clip;
	_tmp21_ = gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self);
	_tmp22_ = _tmp21_;
	_tmp23_ = gitg_ref_get_parsed_name (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = _tmp24_;
	_tmp26_ = gitg_parsed_ref_name_get_shortname (_tmp25_);
	_tmp27_ = _tmp26_;
	_tmp28_ = _tmp27_;
	gtk_clipboard_set_text (_tmp20_, _tmp28_, -1);
	_g_free0 (_tmp28_);
	_g_object_unref0 (_tmp25_);
	_g_object_unref0 (clip);
}

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

static void
gitg_ref_action_copy_name_real_set_application (GitgExtUIElement* base,
                                                GitgExtApplication* value)
{
	GitgRefActionCopyName* self;
	GitgExtApplication* old_value;
	self = (GitgRefActionCopyName*) base;
	old_value = gitg_ref_action_copy_name_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_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_APPLICATION_PROPERTY]);
	}
	_g_object_unref0 (old_value);
}

static GitgExtRefActionInterface*
gitg_ref_action_copy_name_real_get_action_interface (GitgExtRefAction* base)
{
	GitgExtRefActionInterface* result;
	GitgRefActionCopyName* self;
	GitgExtRefActionInterface* _tmp0_;
	self = (GitgRefActionCopyName*) base;
	_tmp0_ = self->priv->_action_interface;
	result = _tmp0_;
	return result;
}

static void
gitg_ref_action_copy_name_real_set_action_interface (GitgExtRefAction* base,
                                                     GitgExtRefActionInterface* value)
{
	GitgRefActionCopyName* self;
	GitgExtRefActionInterface* old_value;
	self = (GitgRefActionCopyName*) base;
	old_value = gitg_ref_action_copy_name_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_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_ACTION_INTERFACE_PROPERTY]);
	}
}

static GitgRef*
gitg_ref_action_copy_name_real_get_reference (GitgExtRefAction* base)
{
	GitgRef* result;
	GitgRefActionCopyName* self;
	GitgRef* _tmp0_;
	self = (GitgRefActionCopyName*) base;
	_tmp0_ = self->priv->_reference;
	result = _tmp0_;
	return result;
}

static void
gitg_ref_action_copy_name_real_set_reference (GitgExtRefAction* base,
                                              GitgRef* value)
{
	GitgRefActionCopyName* self;
	GitgRef* old_value;
	self = (GitgRefActionCopyName*) base;
	old_value = gitg_ref_action_copy_name_real_get_reference (base);
	if (old_value != value) {
		GitgRef* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_reference);
		self->priv->_reference = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_REFERENCE_PROPERTY]);
	}
}

static gchar*
gitg_ref_action_copy_name_real_get_id (GitgExtUIElement* base)
{
	gchar* result;
	GitgRefActionCopyName* self;
	gchar* _tmp0_;
	self = (GitgRefActionCopyName*) base;
	_tmp0_ = g_strdup ("/org/gnome/gitg/ref-actions/copy-name");
	result = _tmp0_;
	return result;
}

static gchar*
gitg_ref_action_copy_name_real_get_display_name (GitgExtUIElement* base)
{
	gchar* result;
	GitgRefActionCopyName* self;
	gchar* _tmp0_;
	self = (GitgRefActionCopyName*) base;
	_tmp0_ = g_strdup (_ ("Copy name"));
	result = _tmp0_;
	return result;
}

static gchar*
gitg_ref_action_copy_name_real_get_description (GitgExtUIElement* base)
{
	gchar* result;
	GitgRefActionCopyName* self;
	gchar* _tmp0_;
	self = (GitgRefActionCopyName*) base;
	_tmp0_ = g_strdup (_ ("Copy the name of the reference to the clipboard"));
	result = _tmp0_;
	return result;
}

static gboolean
gitg_ref_action_copy_name_real_get_enabled (GitgExtUIElement* base)
{
	gboolean result;
	GitgRefActionCopyName* self;
	self = (GitgRefActionCopyName*) base;
	result = TRUE;
	return result;
}

static void
gitg_ref_action_copy_name_class_init (GitgRefActionCopyNameClass * klass,
                                      gpointer klass_data)
{
	gitg_ref_action_copy_name_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GitgRefActionCopyName_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_ref_action_copy_name_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_ref_action_copy_name_set_property;
	G_OBJECT_CLASS (klass)->finalize = gitg_ref_action_copy_name_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_REF_ACTION_COPY_NAME_APPLICATION_PROPERTY, gitg_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_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_REF_ACTION_COPY_NAME_ACTION_INTERFACE_PROPERTY, gitg_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_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_REF_ACTION_COPY_NAME_REFERENCE_PROPERTY, gitg_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_REFERENCE_PROPERTY] = g_param_spec_object ("reference", "reference", "reference", GITG_TYPE_REF, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_REF_ACTION_COPY_NAME_ID_PROPERTY, gitg_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_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_REF_ACTION_COPY_NAME_DISPLAY_NAME_PROPERTY, gitg_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_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_REF_ACTION_COPY_NAME_DESCRIPTION_PROPERTY, gitg_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_REF_ACTION_COPY_NAME_ENABLED_PROPERTY, gitg_ref_action_copy_name_properties[GITG_REF_ACTION_COPY_NAME_ENABLED_PROPERTY] = g_param_spec_boolean ("enabled", "enabled", "enabled", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gitg_ref_action_copy_name_gitg_ext_ui_element_interface_init (GitgExtUIElementIface * iface,
                                                              gpointer iface_data)
{
	gitg_ref_action_copy_name_gitg_ext_ui_element_parent_iface = g_type_interface_peek_parent (iface);
	iface->activate = (void (*) (GitgExtUIElement*)) gitg_ref_action_copy_name_real_activate;
	iface->get_application = gitg_ref_action_copy_name_real_get_application;
	iface->set_application = gitg_ref_action_copy_name_real_set_application;
	iface->get_id = gitg_ref_action_copy_name_real_get_id;
	iface->get_display_name = gitg_ref_action_copy_name_real_get_display_name;
	iface->get_description = gitg_ref_action_copy_name_real_get_description;
	iface->get_enabled = gitg_ref_action_copy_name_real_get_enabled;
}

static void
gitg_ref_action_copy_name_gitg_ext_action_interface_init (GitgExtActionIface * iface,
                                                          gpointer iface_data)
{
	gitg_ref_action_copy_name_gitg_ext_action_parent_iface = g_type_interface_peek_parent (iface);
}

static void
gitg_ref_action_copy_name_gitg_ext_ref_action_interface_init (GitgExtRefActionIface * iface,
                                                              gpointer iface_data)
{
	gitg_ref_action_copy_name_gitg_ext_ref_action_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_action_interface = gitg_ref_action_copy_name_real_get_action_interface;
	iface->set_action_interface = gitg_ref_action_copy_name_real_set_action_interface;
	iface->get_reference = gitg_ref_action_copy_name_real_get_reference;
	iface->set_reference = gitg_ref_action_copy_name_real_set_reference;
}

static void
gitg_ref_action_copy_name_instance_init (GitgRefActionCopyName * self,
                                         gpointer klass)
{
	self->priv = gitg_ref_action_copy_name_get_instance_private (self);
}

static void
gitg_ref_action_copy_name_finalize (GObject * obj)
{
	GitgRefActionCopyName * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_REF_ACTION_COPY_NAME, GitgRefActionCopyName);
	_g_object_unref0 (self->priv->_application);
	_g_object_unref0 (self->priv->_action_interface);
	_g_object_unref0 (self->priv->_reference);
	G_OBJECT_CLASS (gitg_ref_action_copy_name_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gitg_ref_action_copy_name_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgRefActionCopyNameClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_ref_action_copy_name_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgRefActionCopyName), 0, (GInstanceInitFunc) gitg_ref_action_copy_name_instance_init, NULL };
	static const GInterfaceInfo gitg_ext_ui_element_info = { (GInterfaceInitFunc) gitg_ref_action_copy_name_gitg_ext_ui_element_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gitg_ext_action_info = { (GInterfaceInitFunc) gitg_ref_action_copy_name_gitg_ext_action_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gitg_ext_ref_action_info = { (GInterfaceInitFunc) gitg_ref_action_copy_name_gitg_ext_ref_action_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gitg_ref_action_copy_name_type_id;
	gitg_ref_action_copy_name_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgRefActionCopyName", &g_define_type_info, 0);
	g_type_add_interface_static (gitg_ref_action_copy_name_type_id, GITG_EXT_TYPE_UI_ELEMENT, &gitg_ext_ui_element_info);
	g_type_add_interface_static (gitg_ref_action_copy_name_type_id, GITG_EXT_TYPE_ACTION, &gitg_ext_action_info);
	g_type_add_interface_static (gitg_ref_action_copy_name_type_id, GITG_EXT_TYPE_REF_ACTION, &gitg_ext_ref_action_info);
	GitgRefActionCopyName_private_offset = g_type_add_instance_private (gitg_ref_action_copy_name_type_id, sizeof (GitgRefActionCopyNamePrivate));
	return gitg_ref_action_copy_name_type_id;
}

GType
gitg_ref_action_copy_name_get_type (void)
{
	static gsize gitg_ref_action_copy_name_type_id__once = 0;
	if (g_once_init_enter (&gitg_ref_action_copy_name_type_id__once)) {
		GType gitg_ref_action_copy_name_type_id;
		gitg_ref_action_copy_name_type_id = gitg_ref_action_copy_name_get_type_once ();
		g_once_init_leave (&gitg_ref_action_copy_name_type_id__once, gitg_ref_action_copy_name_type_id);
	}
	return gitg_ref_action_copy_name_type_id__once;
}

static void
_vala_gitg_ref_action_copy_name_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	GitgRefActionCopyName * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_REF_ACTION_COPY_NAME, GitgRefActionCopyName);
	switch (property_id) {
		case GITG_REF_ACTION_COPY_NAME_APPLICATION_PROPERTY:
		g_value_take_object (value, gitg_ext_ui_element_get_application ((GitgExtUIElement*) self));
		break;
		case GITG_REF_ACTION_COPY_NAME_ACTION_INTERFACE_PROPERTY:
		g_value_set_object (value, gitg_ext_ref_action_get_action_interface ((GitgExtRefAction*) self));
		break;
		case GITG_REF_ACTION_COPY_NAME_REFERENCE_PROPERTY:
		g_value_set_object (value, gitg_ext_ref_action_get_reference ((GitgExtRefAction*) self));
		break;
		case GITG_REF_ACTION_COPY_NAME_ID_PROPERTY:
		g_value_take_string (value, gitg_ext_ui_element_get_id ((GitgExtUIElement*) self));
		break;
		case GITG_REF_ACTION_COPY_NAME_DISPLAY_NAME_PROPERTY:
		g_value_take_string (value, gitg_ext_ui_element_get_display_name ((GitgExtUIElement*) self));
		break;
		case GITG_REF_ACTION_COPY_NAME_DESCRIPTION_PROPERTY:
		g_value_take_string (value, gitg_ext_ui_element_get_description ((GitgExtUIElement*) self));
		break;
		case GITG_REF_ACTION_COPY_NAME_ENABLED_PROPERTY:
		g_value_set_boolean (value, gitg_ext_ui_element_get_enabled ((GitgExtUIElement*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gitg_ref_action_copy_name_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	GitgRefActionCopyName * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_REF_ACTION_COPY_NAME, GitgRefActionCopyName);
	switch (property_id) {
		case GITG_REF_ACTION_COPY_NAME_APPLICATION_PROPERTY:
		gitg_ext_ui_element_set_application ((GitgExtUIElement*) self, g_value_get_object (value));
		break;
		case GITG_REF_ACTION_COPY_NAME_ACTION_INTERFACE_PROPERTY:
		gitg_ext_ref_action_set_action_interface ((GitgExtRefAction*) self, g_value_get_object (value));
		break;
		case GITG_REF_ACTION_COPY_NAME_REFERENCE_PROPERTY:
		gitg_ext_ref_action_set_reference ((GitgExtRefAction*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

