/* gitg-authentication-dialog.c generated by valac 0.32.1, the Vala compiler
 * generated from gitg-authentication-dialog.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.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>


#define GITG_TYPE_AUTHENTICATION_LIFE_TIME (gitg_authentication_life_time_get_type ())

#define GITG_TYPE_AUTHENTICATION_DIALOG (gitg_authentication_dialog_get_type ())
#define GITG_AUTHENTICATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_AUTHENTICATION_DIALOG, GitgAuthenticationDialog))
#define GITG_AUTHENTICATION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_AUTHENTICATION_DIALOG, GitgAuthenticationDialogClass))
#define GITG_IS_AUTHENTICATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_AUTHENTICATION_DIALOG))
#define GITG_IS_AUTHENTICATION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_AUTHENTICATION_DIALOG))
#define GITG_AUTHENTICATION_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_AUTHENTICATION_DIALOG, GitgAuthenticationDialogClass))

typedef struct _GitgAuthenticationDialog GitgAuthenticationDialog;
typedef struct _GitgAuthenticationDialogClass GitgAuthenticationDialogClass;
typedef struct _GitgAuthenticationDialogPrivate GitgAuthenticationDialogPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

typedef enum  {
	GITG_AUTHENTICATION_LIFE_TIME_FORGET,
	GITG_AUTHENTICATION_LIFE_TIME_SESSION,
	GITG_AUTHENTICATION_LIFE_TIME_FOREVER
} GitgAuthenticationLifeTime;

struct _GitgAuthenticationDialog {
	GtkDialog parent_instance;
	GitgAuthenticationDialogPrivate * priv;
};

struct _GitgAuthenticationDialogClass {
	GtkDialogClass parent_class;
};

struct _GitgAuthenticationDialogPrivate {
	GtkLabel* d_label_title;
	GtkLabel* d_label_failed;
	GtkEntry* d_entry_username;
	GtkEntry* d_entry_password;
	GtkRadioButton* d_radio_button_forget;
	GtkRadioButton* d_radio_button_session;
	GtkRadioButton* d_radio_button_forever;
};


static gpointer gitg_authentication_dialog_parent_class = NULL;
static GitgAuthenticationLifeTime gitg_authentication_dialog_s_last_lifetime;
static GitgAuthenticationLifeTime gitg_authentication_dialog_s_last_lifetime = 0;

GType gitg_authentication_life_time_get_type (void) G_GNUC_CONST;
GType gitg_authentication_dialog_get_type (void) G_GNUC_CONST;
#define GITG_AUTHENTICATION_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_TYPE_AUTHENTICATION_DIALOG, GitgAuthenticationDialogPrivate))
enum  {
	GITG_AUTHENTICATION_DIALOG_DUMMY_PROPERTY,
	GITG_AUTHENTICATION_DIALOG_USERNAME,
	GITG_AUTHENTICATION_DIALOG_PASSWORD,
	GITG_AUTHENTICATION_DIALOG_LIFE_TIME
};
GitgAuthenticationDialog* gitg_authentication_dialog_new (const gchar* url, const gchar* username, gboolean failed);
GitgAuthenticationDialog* gitg_authentication_dialog_construct (GType object_type, const gchar* url, const gchar* username, gboolean failed);
const gchar* gitg_authentication_dialog_get_username (GitgAuthenticationDialog* self);
const gchar* gitg_authentication_dialog_get_password (GitgAuthenticationDialog* self);
GitgAuthenticationLifeTime gitg_authentication_dialog_get_life_time (GitgAuthenticationDialog* self);
static void gitg_authentication_dialog_finalize (GObject* obj);
static void _vala_gitg_authentication_dialog_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


GType gitg_authentication_life_time_get_type (void) {
	static volatile gsize gitg_authentication_life_time_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_authentication_life_time_type_id__volatile)) {
		static const GEnumValue values[] = {{GITG_AUTHENTICATION_LIFE_TIME_FORGET, "GITG_AUTHENTICATION_LIFE_TIME_FORGET", "forget"}, {GITG_AUTHENTICATION_LIFE_TIME_SESSION, "GITG_AUTHENTICATION_LIFE_TIME_SESSION", "session"}, {GITG_AUTHENTICATION_LIFE_TIME_FOREVER, "GITG_AUTHENTICATION_LIFE_TIME_FOREVER", "forever"}, {0, NULL, NULL}};
		GType gitg_authentication_life_time_type_id;
		gitg_authentication_life_time_type_id = g_enum_register_static ("GitgAuthenticationLifeTime", values);
		g_once_init_leave (&gitg_authentication_life_time_type_id__volatile, gitg_authentication_life_time_type_id);
	}
	return gitg_authentication_life_time_type_id__volatile;
}


GitgAuthenticationDialog* gitg_authentication_dialog_construct (GType object_type, const gchar* url, const gchar* username, gboolean failed) {
	GitgAuthenticationDialog * self = NULL;
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GtkLabel* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_ = NULL;
	GitgAuthenticationLifeTime _tmp11_ = 0;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	g_return_val_if_fail (url != NULL, NULL);
#line 63 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	self = (GitgAuthenticationDialog*) g_object_new (object_type, "use-header-bar", 1, NULL);
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_dialog_set_default_response ((GtkDialog*) self, (gint) GTK_RESPONSE_OK);
#line 69 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp0_ = self->priv->d_label_title;
#line 69 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp1_ = _ ("Password required for %s");
#line 69 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp2_ = url;
#line 69 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp3_ = g_strdup_printf (_tmp1_, _tmp2_);
#line 69 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp4_ = _tmp3_;
#line 69 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_label_set_label (_tmp0_, _tmp4_);
#line 69 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_g_free0 (_tmp4_);
#line 70 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp5_ = self->priv->d_label_failed;
#line 70 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp6_ = failed;
#line 70 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_widget_set_visible ((GtkWidget*) _tmp5_, _tmp6_);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp7_ = username;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	if (_tmp7_ != NULL) {
#line 148 "gitg-authentication-dialog.c"
		GtkEntry* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
		GtkEntry* _tmp10_ = NULL;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		_tmp8_ = self->priv->d_entry_username;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		_tmp9_ = username;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		gtk_entry_set_text (_tmp8_, _tmp9_);
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		_tmp10_ = self->priv->d_entry_password;
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		gtk_widget_grab_focus ((GtkWidget*) _tmp10_);
#line 162 "gitg-authentication-dialog.c"
	}
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp11_ = gitg_authentication_dialog_s_last_lifetime;
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	switch (_tmp11_) {
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		case GITG_AUTHENTICATION_LIFE_TIME_FORGET:
#line 170 "gitg-authentication-dialog.c"
		{
			GtkRadioButton* _tmp12_ = NULL;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			_tmp12_ = self->priv->d_radio_button_forget;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			gtk_toggle_button_set_active ((GtkToggleButton*) _tmp12_, TRUE);
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			break;
#line 179 "gitg-authentication-dialog.c"
		}
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		case GITG_AUTHENTICATION_LIFE_TIME_SESSION:
#line 183 "gitg-authentication-dialog.c"
		{
			GtkRadioButton* _tmp13_ = NULL;
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			_tmp13_ = self->priv->d_radio_button_session;
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			gtk_toggle_button_set_active ((GtkToggleButton*) _tmp13_, TRUE);
#line 85 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			break;
#line 192 "gitg-authentication-dialog.c"
		}
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		case GITG_AUTHENTICATION_LIFE_TIME_FOREVER:
#line 196 "gitg-authentication-dialog.c"
		{
			GtkRadioButton* _tmp14_ = NULL;
#line 87 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			_tmp14_ = self->priv->d_radio_button_forever;
#line 87 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			gtk_toggle_button_set_active ((GtkToggleButton*) _tmp14_, TRUE);
#line 88 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			break;
#line 205 "gitg-authentication-dialog.c"
		}
		default:
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		break;
#line 210 "gitg-authentication-dialog.c"
	}
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	return self;
#line 214 "gitg-authentication-dialog.c"
}


GitgAuthenticationDialog* gitg_authentication_dialog_new (const gchar* url, const gchar* username, gboolean failed) {
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	return gitg_authentication_dialog_construct (GITG_TYPE_AUTHENTICATION_DIALOG, url, username, failed);
#line 221 "gitg-authentication-dialog.c"
}


const gchar* gitg_authentication_dialog_get_username (GitgAuthenticationDialog* self) {
	const gchar* result;
	GtkEntry* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp0_ = self->priv->d_entry_username;
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp1_ = gtk_entry_get_text (_tmp0_);
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp2_ = _tmp1_;
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	result = _tmp2_;
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	return result;
#line 242 "gitg-authentication-dialog.c"
}


const gchar* gitg_authentication_dialog_get_password (GitgAuthenticationDialog* self) {
	const gchar* result;
	GtkEntry* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp0_ = self->priv->d_entry_password;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp1_ = gtk_entry_get_text (_tmp0_);
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp2_ = _tmp1_;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	result = _tmp2_;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	return result;
#line 263 "gitg-authentication-dialog.c"
}


GitgAuthenticationLifeTime gitg_authentication_dialog_get_life_time (GitgAuthenticationDialog* self) {
	GitgAuthenticationLifeTime result;
	GtkRadioButton* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
#line 104 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 106 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp0_ = self->priv->d_radio_button_forget;
#line 106 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_);
#line 106 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_tmp2_ = _tmp1_;
#line 106 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	if (_tmp2_) {
#line 108 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		result = GITG_AUTHENTICATION_LIFE_TIME_FORGET;
#line 108 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		return result;
#line 286 "gitg-authentication-dialog.c"
	} else {
		GtkRadioButton* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
#line 110 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		_tmp3_ = self->priv->d_radio_button_session;
#line 110 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		_tmp4_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp3_);
#line 110 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		_tmp5_ = _tmp4_;
#line 110 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		if (_tmp5_) {
#line 112 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			result = GITG_AUTHENTICATION_LIFE_TIME_SESSION;
#line 112 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			return result;
#line 303 "gitg-authentication-dialog.c"
		} else {
#line 116 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			result = GITG_AUTHENTICATION_LIFE_TIME_FOREVER;
#line 116 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
			return result;
#line 309 "gitg-authentication-dialog.c"
		}
	}
}


static void gitg_authentication_dialog_class_init (GitgAuthenticationDialogClass * klass) {
	gint GitgAuthenticationDialog_private_offset;
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gitg_authentication_dialog_parent_class = g_type_class_peek_parent (klass);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	g_type_class_add_private (klass, sizeof (GitgAuthenticationDialogPrivate));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_authentication_dialog_get_property;
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_authentication_dialog_finalize;
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_AUTHENTICATION_DIALOG_USERNAME, g_param_spec_string ("username", "username", "username", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_AUTHENTICATION_DIALOG_PASSWORD, g_param_spec_string ("password", "password", "password", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_AUTHENTICATION_DIALOG_LIFE_TIME, g_param_spec_enum ("life-time", "life-time", "life-time", GITG_TYPE_AUTHENTICATION_LIFE_TIME, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	GitgAuthenticationDialog_private_offset = g_type_class_get_instance_private_offset (klass);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/gitg/ui/gitg-authentication-dialog.ui");
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "label_title", FALSE, GitgAuthenticationDialog_private_offset + G_STRUCT_OFFSET (GitgAuthenticationDialogPrivate, d_label_title));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "label_failed", FALSE, GitgAuthenticationDialog_private_offset + G_STRUCT_OFFSET (GitgAuthenticationDialogPrivate, d_label_failed));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "entry_username", FALSE, GitgAuthenticationDialog_private_offset + G_STRUCT_OFFSET (GitgAuthenticationDialogPrivate, d_entry_username));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "entry_password", FALSE, GitgAuthenticationDialog_private_offset + G_STRUCT_OFFSET (GitgAuthenticationDialogPrivate, d_entry_password));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "radio_button_forget", FALSE, GitgAuthenticationDialog_private_offset + G_STRUCT_OFFSET (GitgAuthenticationDialogPrivate, d_radio_button_forget));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "radio_button_session", FALSE, GitgAuthenticationDialog_private_offset + G_STRUCT_OFFSET (GitgAuthenticationDialogPrivate, d_radio_button_session));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "radio_button_forever", FALSE, GitgAuthenticationDialog_private_offset + G_STRUCT_OFFSET (GitgAuthenticationDialogPrivate, d_radio_button_forever));
#line 58 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gitg_authentication_dialog_s_last_lifetime = GITG_AUTHENTICATION_LIFE_TIME_SESSION;
#line 351 "gitg-authentication-dialog.c"
}


static void gitg_authentication_dialog_instance_init (GitgAuthenticationDialog * self) {
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	self->priv = GITG_AUTHENTICATION_DIALOG_GET_PRIVATE (self);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 360 "gitg-authentication-dialog.c"
}


static void gitg_authentication_dialog_finalize (GObject* obj) {
	GitgAuthenticationDialog * self;
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_AUTHENTICATION_DIALOG, GitgAuthenticationDialog);
#line 34 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_g_object_unref0 (self->priv->d_label_title);
#line 37 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_g_object_unref0 (self->priv->d_label_failed);
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_g_object_unref0 (self->priv->d_entry_username);
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_g_object_unref0 (self->priv->d_entry_password);
#line 46 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_g_object_unref0 (self->priv->d_radio_button_forget);
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_g_object_unref0 (self->priv->d_radio_button_session);
#line 52 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	_g_object_unref0 (self->priv->d_radio_button_forever);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	G_OBJECT_CLASS (gitg_authentication_dialog_parent_class)->finalize (obj);
#line 384 "gitg-authentication-dialog.c"
}


GType gitg_authentication_dialog_get_type (void) {
	static volatile gsize gitg_authentication_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_authentication_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgAuthenticationDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_authentication_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgAuthenticationDialog), 0, (GInstanceInitFunc) gitg_authentication_dialog_instance_init, NULL };
		GType gitg_authentication_dialog_type_id;
		gitg_authentication_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "GitgAuthenticationDialog", &g_define_type_info, 0);
		g_once_init_leave (&gitg_authentication_dialog_type_id__volatile, gitg_authentication_dialog_type_id);
	}
	return gitg_authentication_dialog_type_id__volatile;
}


static void _vala_gitg_authentication_dialog_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GitgAuthenticationDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_AUTHENTICATION_DIALOG, GitgAuthenticationDialog);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
	switch (property_id) {
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		case GITG_AUTHENTICATION_DIALOG_USERNAME:
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		g_value_set_string (value, gitg_authentication_dialog_get_username (self));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		break;
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		case GITG_AUTHENTICATION_DIALOG_PASSWORD:
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		g_value_set_string (value, gitg_authentication_dialog_get_password (self));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		break;
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		case GITG_AUTHENTICATION_DIALOG_LIFE_TIME:
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		g_value_set_enum (value, gitg_authentication_dialog_get_life_time (self));
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		break;
#line 423 "gitg-authentication-dialog.c"
		default:
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-authentication-dialog.vala"
		break;
#line 429 "gitg-authentication-dialog.c"
	}
}



