/* moonshot-password-dialog.c generated by valac 0.34.9, the Vala compiler
 * generated from moonshot-password-dialog.vala, do not modify */

/*
 * Copyright (c) 2011-2016, JANET(UK)
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * 3. Neither the name of JANET(UK) nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
*/

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <atk/atk.h>


#define TYPE_ADD_PASSWORD_DIALOG (add_password_dialog_get_type ())
#define ADD_PASSWORD_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADD_PASSWORD_DIALOG, AddPasswordDialog))
#define ADD_PASSWORD_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADD_PASSWORD_DIALOG, AddPasswordDialogClass))
#define IS_ADD_PASSWORD_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADD_PASSWORD_DIALOG))
#define IS_ADD_PASSWORD_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADD_PASSWORD_DIALOG))
#define ADD_PASSWORD_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADD_PASSWORD_DIALOG, AddPasswordDialogClass))

typedef struct _AddPasswordDialog AddPasswordDialog;
typedef struct _AddPasswordDialogClass AddPasswordDialogClass;
typedef struct _AddPasswordDialogPrivate AddPasswordDialogPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_ID_CARD (id_card_get_type ())
#define ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ID_CARD, IdCard))
#define ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ID_CARD, IdCardClass))
#define IS_ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ID_CARD))
#define IS_ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ID_CARD))
#define ID_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ID_CARD, IdCardClass))

typedef struct _IdCard IdCard;
typedef struct _IdCardClass IdCardClass;

#define TYPE_IDENTITY_REQUEST (identity_request_get_type ())
#define IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_REQUEST, IdentityRequest))
#define IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
#define IS_IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_REQUEST))
#define IS_IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_REQUEST))
#define IDENTITY_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_REQUEST, IdentityRequestClass))

typedef struct _IdentityRequest IdentityRequest;
typedef struct _IdentityRequestClass IdentityRequestClass;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _AddPasswordDialog {
	GtkDialog parent_instance;
	AddPasswordDialogPrivate * priv;
};

struct _AddPasswordDialogClass {
	GtkDialogClass parent_class;
};

struct _AddPasswordDialogPrivate {
	GtkEntry* password_entry;
	GtkCheckButton* remember_checkbutton;
};


static gpointer add_password_dialog_parent_class = NULL;
static GdkColor add_password_dialog_white;
static GdkColor add_password_dialog_white = {0};

GType add_password_dialog_get_type (void) G_GNUC_CONST;
#define ADD_PASSWORD_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ADD_PASSWORD_DIALOG, AddPasswordDialogPrivate))
enum  {
	ADD_PASSWORD_DIALOG_DUMMY_PROPERTY,
	ADD_PASSWORD_DIALOG_PASSWORD,
	ADD_PASSWORD_DIALOG_REMEMBER
};
void make_color (guint16 red, guint16 green, guint16 blue, GdkColor* result);
void add_password_dialog_clear_password (AddPasswordDialog* self);
void clear_password_entry (GtkEntry* entry);
GType id_card_get_type (void) G_GNUC_CONST;
GType identity_request_get_type (void) G_GNUC_CONST;
AddPasswordDialog* add_password_dialog_new (IdCard* id_card, IdentityRequest* request);
AddPasswordDialog* add_password_dialog_construct (GType object_type, IdCard* id_card, IdentityRequest* request);
void set_bg_color (GtkWidget* w);
const gchar* id_card_get_display_name (IdCard* self);
const gchar* id_card_get_nai (IdCard* self);
void set_atk_relation (GtkWidget* widget, GtkWidget* target_widget, AtkRelationType relationship);
const gchar* add_password_dialog_get_password (AddPasswordDialog* self);
gboolean add_password_dialog_get_remember (AddPasswordDialog* self);
static void add_password_dialog_finalize (GObject* obj);
static void _vala_add_password_dialog_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


/**
     * Don't leave passwords in memory longer than necessary.
     * This may not actually erase the password data bytes, but it seems to be the best we can do.
     */
void add_password_dialog_clear_password (AddPasswordDialog* self) {
	GtkEntry* _tmp0_ = NULL;
#line 49 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_return_if_fail (self != NULL);
#line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp0_ = self->priv->password_entry;
#line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	clear_password_entry (_tmp0_);
#line 137 "moonshot-password-dialog.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 68 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	return self ? g_object_ref (self) : NULL;
#line 144 "moonshot-password-dialog.c"
}


AddPasswordDialog* add_password_dialog_construct (GType object_type, IdCard* id_card, IdentityRequest* request) {
	AddPasswordDialog * self = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	GtkWidget* content_area = NULL;
	GtkWidget* _tmp3_ = NULL;
	GtkWidget* _tmp4_ = NULL;
	GtkLabel* dialog_label = NULL;
	const gchar* _tmp5_ = NULL;
	IdCard* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	GtkLabel* _tmp11_ = NULL;
	GtkLabel* _tmp12_ = NULL;
	GtkLabel* nai_label = NULL;
	const gchar* _tmp13_ = NULL;
	GtkLabel* _tmp14_ = NULL;
	GtkLabel* nai_value = NULL;
	IdCard* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	const gchar* _tmp17_ = NULL;
	GtkLabel* _tmp18_ = NULL;
	GtkLabel* password_label = NULL;
	const gchar* _tmp19_ = NULL;
	GtkLabel* _tmp20_ = NULL;
	GtkEntry* _tmp21_ = NULL;
	GtkEntry* _tmp22_ = NULL;
	GtkEntry* _tmp23_ = NULL;
	GtkEntry* _tmp24_ = NULL;
	const gchar* _tmp25_ = NULL;
	GtkCheckButton* _tmp26_ = NULL;
	GtkEntry* _tmp27_ = NULL;
	GtkTable* table = NULL;
	GtkTable* _tmp28_ = NULL;
	GtkAttachOptions opts = 0;
	gint row = 0;
	gint _tmp29_ = 0;
	gint _tmp30_ = 0;
	gint _tmp31_ = 0;
	GtkVBox* nai_vbox = NULL;
	GtkVBox* _tmp32_ = NULL;
	gint _tmp33_ = 0;
	gint _tmp34_ = 0;
	gint _tmp35_ = 0;
	GtkVBox* password_vbox = NULL;
	GtkVBox* _tmp36_ = NULL;
	GtkVBox* empty_box2 = NULL;
	GtkVBox* _tmp37_ = NULL;
	GtkEntry* _tmp38_ = NULL;
	gint _tmp39_ = 0;
	gint _tmp40_ = 0;
	gint _tmp41_ = 0;
	GtkCheckButton* _tmp42_ = NULL;
	gint _tmp43_ = 0;
	gint _tmp44_ = 0;
	gint _tmp45_ = 0;
	GtkVBox* empty_box3 = NULL;
	GtkVBox* _tmp46_ = NULL;
	gint _tmp47_ = 0;
	gint _tmp48_ = 0;
	gint _tmp49_ = 0;
	GtkVBox* vbox = NULL;
	GtkVBox* _tmp50_ = NULL;
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_return_val_if_fail (id_card != NULL, NULL);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	self = (AddPasswordDialog*) g_object_new (object_type, NULL);
#line 59 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp0_ = _ ("Moonshot - Password");
#line 59 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_window_set_title ((GtkWindow*) self, _tmp0_);
#line 60 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_window_set_modal ((GtkWindow*) self, TRUE);
#line 61 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	set_bg_color ((GtkWidget*) self);
#line 63 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp1_ = _ ("Cancel");
#line 63 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp2_ = _ ("Connect");
#line 63 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_dialog_add_buttons ((GtkDialog*) self, _tmp1_, GTK_RESPONSE_CANCEL, _tmp2_, GTK_RESPONSE_OK, NULL);
#line 66 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_dialog_set_default_response ((GtkDialog*) self, (gint) GTK_RESPONSE_OK);
#line 68 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp3_ = gtk_dialog_get_content_area ((GtkDialog*) self);
#line 68 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 68 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	content_area = _tmp4_;
#line 69 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_box_set_spacing (G_TYPE_CHECK_INSTANCE_CAST (content_area, GTK_TYPE_BOX, GtkBox), 12);
#line 70 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	set_bg_color (content_area);
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp5_ = _ ("Enter the password for ");
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp6_ = id_card;
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp7_ = id_card_get_display_name (_tmp6_);
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp8_ = _tmp7_;
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp9_ = g_strconcat (_tmp5_, _tmp8_, NULL);
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp10_ = _tmp9_;
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp11_ = (GtkLabel*) gtk_label_new (_tmp10_);
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp11_);
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp12_ = _tmp11_;
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_free0 (_tmp10_);
#line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	dialog_label = _tmp12_;
#line 73 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_misc_set_alignment ((GtkMisc*) dialog_label, (gfloat) 0, (gfloat) 0);
#line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp13_ = _ ("User (NAI):");
#line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp14_ = (GtkLabel*) gtk_label_new (_tmp13_);
#line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp14_);
#line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	nai_label = _tmp14_;
#line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_misc_set_alignment ((GtkMisc*) nai_label, (gfloat) 0, (gfloat) 1);
#line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp15_ = id_card;
#line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp16_ = id_card_get_nai (_tmp15_);
#line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp17_ = _tmp16_;
#line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp18_ = (GtkLabel*) gtk_label_new (_tmp17_);
#line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp18_);
#line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	nai_value = _tmp18_;
#line 78 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_misc_set_alignment ((GtkMisc*) nai_value, (gfloat) 0, (gfloat) 0);
#line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp19_ = _ ("Password:");
#line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp20_ = (GtkLabel*) gtk_label_new (_tmp19_);
#line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp20_);
#line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	password_label = _tmp20_;
#line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_misc_set_alignment ((GtkMisc*) password_label, (gfloat) 0, (gfloat) 1);
#line 82 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp21_ = (GtkEntry*) gtk_entry_new ();
#line 82 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp21_);
#line 82 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (self->priv->password_entry);
#line 82 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	self->priv->password_entry = _tmp21_;
#line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp22_ = self->priv->password_entry;
#line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_entry_set_invisible_char (_tmp22_, (gunichar) '*');
#line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp23_ = self->priv->password_entry;
#line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_entry_set_visibility (_tmp23_, FALSE);
#line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp24_ = self->priv->password_entry;
#line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_entry_set_activates_default (_tmp24_, TRUE);
#line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp25_ = _ ("Remember password");
#line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp26_ = (GtkCheckButton*) gtk_check_button_new_with_label (_tmp25_);
#line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp26_);
#line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (self->priv->remember_checkbutton);
#line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	self->priv->remember_checkbutton = _tmp26_;
#line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp27_ = self->priv->password_entry;
#line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	set_atk_relation ((GtkWidget*) password_label, (GtkWidget*) _tmp27_, ATK_RELATION_LABEL_FOR);
#line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp28_ = (GtkTable*) gtk_table_new ((guint) 6, (guint) 1, FALSE);
#line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp28_);
#line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	table = _tmp28_;
#line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	opts = GTK_EXPAND | GTK_FILL;
#line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	row = 0;
#line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_table_set_col_spacings (table, (guint) 6);
#line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_table_set_row_spacings (table, (guint) 0);
#line 95 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp29_ = row;
#line 95 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp30_ = row;
#line 95 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_table_attach (table, (GtkWidget*) dialog_label, (guint) 0, (guint) 1, (guint) _tmp29_, (guint) (_tmp30_ + 1), opts, opts, (guint) 0, (guint) 2);
#line 97 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp31_ = row;
#line 97 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	row = _tmp31_ + 1;
#line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp32_ = (GtkVBox*) gtk_vbox_new (FALSE, 0);
#line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp32_);
#line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	nai_vbox = _tmp32_;
#line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_box_pack_start ((GtkBox*) nai_vbox, (GtkWidget*) nai_label, FALSE, FALSE, (guint) 0);
#line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_box_pack_start ((GtkBox*) nai_vbox, (GtkWidget*) nai_value, FALSE, FALSE, (guint) 0);
#line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp33_ = row;
#line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp34_ = row;
#line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_table_attach (table, (GtkWidget*) nai_vbox, (guint) 0, (guint) 1, (guint) _tmp33_, (guint) (_tmp34_ + 1), opts, opts, (guint) 0, (guint) 12);
#line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp35_ = row;
#line 103 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	row = _tmp35_ + 1;
#line 105 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp36_ = (GtkVBox*) gtk_vbox_new (FALSE, 1);
#line 105 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp36_);
#line 105 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	password_vbox = _tmp36_;
#line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp37_ = (GtkVBox*) gtk_vbox_new (FALSE, 0);
#line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp37_);
#line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	empty_box2 = _tmp37_;
#line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_widget_set_size_request ((GtkWidget*) empty_box2, 0, 0);
#line 108 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_box_pack_start ((GtkBox*) password_vbox, (GtkWidget*) empty_box2, FALSE, FALSE, (guint) 3);
#line 109 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_box_pack_start ((GtkBox*) password_vbox, (GtkWidget*) password_label, FALSE, FALSE, (guint) 0);
#line 110 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp38_ = self->priv->password_entry;
#line 110 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_box_pack_start ((GtkBox*) password_vbox, (GtkWidget*) _tmp38_, FALSE, FALSE, (guint) 0);
#line 111 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp39_ = row;
#line 111 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp40_ = row;
#line 111 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_table_attach (table, (GtkWidget*) password_vbox, (guint) 0, (guint) 1, (guint) _tmp39_, (guint) (_tmp40_ + 1), opts, opts, (guint) 0, (guint) 0);
#line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp41_ = row;
#line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	row = _tmp41_ + 1;
#line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp42_ = self->priv->remember_checkbutton;
#line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp43_ = row;
#line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp44_ = row;
#line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_table_attach (table, (GtkWidget*) _tmp42_, (guint) 0, (guint) 1, (guint) _tmp43_, (guint) (_tmp44_ + 1), opts, opts, (guint) 20, (guint) 2);
#line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp45_ = row;
#line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	row = _tmp45_ + 1;
#line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp46_ = (GtkVBox*) gtk_vbox_new (FALSE, 0);
#line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp46_);
#line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	empty_box3 = _tmp46_;
#line 118 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_widget_set_size_request ((GtkWidget*) empty_box3, 0, 0);
#line 119 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp47_ = row;
#line 119 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp48_ = row;
#line 119 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_table_attach (table, (GtkWidget*) empty_box3, (guint) 0, (guint) 1, (guint) _tmp47_, (guint) (_tmp48_ + 1), opts, opts, (guint) 0, (guint) 10);
#line 120 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp49_ = row;
#line 120 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	row = _tmp49_ + 1;
#line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp50_ = (GtkVBox*) gtk_vbox_new (FALSE, 0);
#line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_ref_sink (_tmp50_);
#line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	vbox = _tmp50_;
#line 123 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_container_set_border_width ((GtkContainer*) vbox, (guint) 6);
#line 124 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_box_pack_start ((GtkBox*) vbox, (GtkWidget*) table, FALSE, FALSE, (guint) 0);
#line 126 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (content_area, GTK_TYPE_CONTAINER, GtkContainer), (GtkWidget*) vbox);
#line 128 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_container_set_border_width ((GtkContainer*) self, (guint) 6);
#line 130 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	gtk_widget_show_all ((GtkWidget*) self);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (vbox);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (empty_box3);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (empty_box2);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (password_vbox);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (nai_vbox);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (table);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (password_label);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (nai_value);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (nai_label);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (dialog_label);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (content_area);
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	return self;
#line 482 "moonshot-password-dialog.c"
}


AddPasswordDialog* add_password_dialog_new (IdCard* id_card, IdentityRequest* request) {
#line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	return add_password_dialog_construct (TYPE_ADD_PASSWORD_DIALOG, id_card, request);
#line 489 "moonshot-password-dialog.c"
}


const gchar* add_password_dialog_get_password (AddPasswordDialog* self) {
	const gchar* result;
	GtkEntry* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp0_ = self->priv->password_entry;
#line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp1_ = gtk_entry_get_text (_tmp0_);
#line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	result = _tmp1_;
#line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	return result;
#line 507 "moonshot-password-dialog.c"
}


gboolean add_password_dialog_get_remember (AddPasswordDialog* self) {
	gboolean result;
	GtkCheckButton* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp0_ = self->priv->remember_checkbutton;
#line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_);
#line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	result = _tmp1_;
#line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	return result;
#line 525 "moonshot-password-dialog.c"
}


static void add_password_dialog_class_init (AddPasswordDialogClass * klass) {
	GdkColor _tmp0_ = {0};
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	add_password_dialog_parent_class = g_type_class_peek_parent (klass);
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_type_class_add_private (klass, sizeof (AddPasswordDialogPrivate));
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_add_password_dialog_get_property;
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	G_OBJECT_CLASS (klass)->finalize = add_password_dialog_finalize;
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), ADD_PASSWORD_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 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), ADD_PASSWORD_DIALOG_REMEMBER, g_param_spec_boolean ("remember", "remember", "remember", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 36 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	make_color ((guint16) 65535, (guint16) 65535, (guint16) 65535, &_tmp0_);
#line 36 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	add_password_dialog_white = _tmp0_;
#line 547 "moonshot-password-dialog.c"
}


static void add_password_dialog_instance_init (AddPasswordDialog * self) {
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	self->priv = ADD_PASSWORD_DIALOG_GET_PRIVATE (self);
#line 554 "moonshot-password-dialog.c"
}


static void add_password_dialog_finalize (GObject* obj) {
	AddPasswordDialog * self;
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ADD_PASSWORD_DIALOG, AddPasswordDialog);
#line 38 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (self->priv->password_entry);
#line 39 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	_g_object_unref0 (self->priv->remember_checkbutton);
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	G_OBJECT_CLASS (add_password_dialog_parent_class)->finalize (obj);
#line 568 "moonshot-password-dialog.c"
}


GType add_password_dialog_get_type (void) {
	static volatile gsize add_password_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&add_password_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AddPasswordDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) add_password_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AddPasswordDialog), 0, (GInstanceInitFunc) add_password_dialog_instance_init, NULL };
		GType add_password_dialog_type_id;
		add_password_dialog_type_id = g_type_register_static (GTK_TYPE_DIALOG, "AddPasswordDialog", &g_define_type_info, 0);
		g_once_init_leave (&add_password_dialog_type_id__volatile, add_password_dialog_type_id);
	}
	return add_password_dialog_type_id__volatile;
}


static void _vala_add_password_dialog_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	AddPasswordDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_ADD_PASSWORD_DIALOG, AddPasswordDialog);
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
	switch (property_id) {
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
		case ADD_PASSWORD_DIALOG_PASSWORD:
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
		g_value_set_string (value, add_password_dialog_get_password (self));
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
		break;
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
		case ADD_PASSWORD_DIALOG_REMEMBER:
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
		g_value_set_boolean (value, add_password_dialog_get_remember (self));
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
		break;
#line 601 "moonshot-password-dialog.c"
		default:
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-password-dialog.vala"
		break;
#line 607 "moonshot-password-dialog.c"
	}
}



