/* PhotosPublishingPane.c generated by valac 0.56.19, the Vala compiler
 * generated from PhotosPublishingPane.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 * Copyright 2019 Jens Georg <mail@jensge.org>
 *
 * This software is licensed under the GNU LGPL (version 2.1 or later).
 * See the COPYING file in this distribution.
 */

#include <gtk/gtk.h>
#include "shotwell-plugin-dev-1.0.h"
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include "shotwell-publishing.h"

#define PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_PARAMETERS_ORIGINAL_SIZE -1
#define PUBLISHING_GOOGLE_PHOTOS_DEFAULT_ALBUM_NAME N_ ("Shotwell Connect")
#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

#define PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE (publishing_google_photos_publishing_options_pane_get_type ())
#define PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, PublishingGooglePhotosPublishingOptionsPane))
#define PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, PublishingGooglePhotosPublishingOptionsPaneClass))
#define PUBLISHING_GOOGLE_PHOTOS_IS_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE))
#define PUBLISHING_GOOGLE_PHOTOS_IS_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE))
#define PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, PublishingGooglePhotosPublishingOptionsPaneClass))

typedef struct _PublishingGooglePhotosPublishingOptionsPane PublishingGooglePhotosPublishingOptionsPane;
typedef struct _PublishingGooglePhotosPublishingOptionsPaneClass PublishingGooglePhotosPublishingOptionsPaneClass;
typedef struct _PublishingGooglePhotosPublishingOptionsPanePrivate PublishingGooglePhotosPublishingOptionsPanePrivate;

#define PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_PARAMETERS (publishing_google_photos_publishing_parameters_get_type ())
#define PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_PARAMETERS, PublishingGooglePhotosPublishingParameters))
#define PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_PARAMETERS, PublishingGooglePhotosPublishingParametersClass))
#define PUBLISHING_GOOGLE_PHOTOS_IS_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_PARAMETERS))
#define PUBLISHING_GOOGLE_PHOTOS_IS_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_PARAMETERS))
#define PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_PARAMETERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_PARAMETERS, PublishingGooglePhotosPublishingParametersClass))

typedef struct _PublishingGooglePhotosPublishingParameters PublishingGooglePhotosPublishingParameters;
typedef struct _PublishingGooglePhotosPublishingParametersClass PublishingGooglePhotosPublishingParametersClass;
enum  {
	PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_0_PROPERTY,
	PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_NUM_PROPERTIES
};
static GParamSpec* publishing_google_photos_publishing_options_pane_properties[PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_NUM_PROPERTIES];

#define PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION (publishing_google_photos_publishing_options_pane_size_description_get_type ())
typedef struct _PublishingGooglePhotosPublishingOptionsPaneSizeDescription PublishingGooglePhotosPublishingOptionsPaneSizeDescription;
#define _publishing_google_photos_publishing_parameters_unref0(var) ((var == NULL) ? NULL : (var = (publishing_google_photos_publishing_parameters_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define PUBLISHING_GOOGLE_PHOTOS_TYPE_ALBUM (publishing_google_photos_album_get_type ())
#define PUBLISHING_GOOGLE_PHOTOS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_GOOGLE_PHOTOS_TYPE_ALBUM, PublishingGooglePhotosAlbum))
#define PUBLISHING_GOOGLE_PHOTOS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_GOOGLE_PHOTOS_TYPE_ALBUM, PublishingGooglePhotosAlbumClass))
#define PUBLISHING_GOOGLE_PHOTOS_IS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_GOOGLE_PHOTOS_TYPE_ALBUM))
#define PUBLISHING_GOOGLE_PHOTOS_IS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_GOOGLE_PHOTOS_TYPE_ALBUM))
#define PUBLISHING_GOOGLE_PHOTOS_ALBUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_GOOGLE_PHOTOS_TYPE_ALBUM, PublishingGooglePhotosAlbumClass))

typedef struct _PublishingGooglePhotosAlbum PublishingGooglePhotosAlbum;
typedef struct _PublishingGooglePhotosAlbumClass PublishingGooglePhotosAlbumClass;
typedef struct _PublishingGooglePhotosAlbumPrivate PublishingGooglePhotosAlbumPrivate;
enum  {
	PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL,
	PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL,
	PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_NUM_SIGNALS
};
static guint publishing_google_photos_publishing_options_pane_signals[PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_NUM_SIGNALS] = {0};

struct _PublishingGooglePhotosPublishingOptionsPane {
	GtkBox parent_instance;
	PublishingGooglePhotosPublishingOptionsPanePrivate * priv;
};

struct _PublishingGooglePhotosPublishingOptionsPaneClass {
	GtkBoxClass parent_class;
};

struct _PublishingGooglePhotosPublishingOptionsPanePrivate {
	GtkButton* logout_button;
	GtkButton* publish_button;
	GtkRadioButton* existing_album_radio;
	GtkComboBoxText* existing_albums_combo;
	GtkComboBoxText* size_combo;
	GtkLabel* publish_to_label;
	GtkLabel* login_identity_label;
	GtkCheckButton* strip_metadata_check;
	GtkRadioButton* new_album_radio;
	GtkEntry* new_album_entry;
	PublishingGooglePhotosPublishingParameters* parameters;
};

struct _PublishingGooglePhotosPublishingOptionsPaneSizeDescription {
	gchar* name;
	gint major_axis_pixels;
};

struct _PublishingGooglePhotosAlbum {
	GTypeInstance parent_instance;
	volatile int ref_count;
	PublishingGooglePhotosAlbumPrivate * priv;
	gchar* name;
	gchar* id;
};

struct _PublishingGooglePhotosAlbumClass {
	GTypeClass parent_class;
	void (*finalize) (PublishingGooglePhotosAlbum *self);
};

static gint PublishingGooglePhotosPublishingOptionsPane_private_offset;
static gpointer publishing_google_photos_publishing_options_pane_parent_class = NULL;
static SpitPublishingDialogPaneIface * publishing_google_photos_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = NULL;

VALA_EXTERN GType publishing_google_photos_publishing_options_pane_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gpointer publishing_google_photos_publishing_parameters_ref (gpointer instance);
VALA_EXTERN void publishing_google_photos_publishing_parameters_unref (gpointer instance);
VALA_EXTERN GParamSpec* publishing_google_photos_param_spec_publishing_parameters (const gchar* name,
                                                                       const gchar* nick,
                                                                       const gchar* blurb,
                                                                       GType object_type,
                                                                       GParamFlags flags);
VALA_EXTERN void publishing_google_photos_value_set_publishing_parameters (GValue* value,
                                                               gpointer v_object);
VALA_EXTERN void publishing_google_photos_value_take_publishing_parameters (GValue* value,
                                                                gpointer v_object);
VALA_EXTERN gpointer publishing_google_photos_value_get_publishing_parameters (const GValue* value);
VALA_EXTERN GType publishing_google_photos_publishing_parameters_get_type (void) G_GNUC_CONST ;
static GType publishing_google_photos_publishing_options_pane_size_description_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static PublishingGooglePhotosPublishingOptionsPaneSizeDescription* publishing_google_photos_publishing_options_pane_size_description_dup (const PublishingGooglePhotosPublishingOptionsPaneSizeDescription* self);
static void publishing_google_photos_publishing_options_pane_size_description_free (PublishingGooglePhotosPublishingOptionsPaneSizeDescription* self);
static void publishing_google_photos_publishing_options_pane_size_description_copy (const PublishingGooglePhotosPublishingOptionsPaneSizeDescription* self,
                                                                             PublishingGooglePhotosPublishingOptionsPaneSizeDescription* dest);
static void publishing_google_photos_publishing_options_pane_size_description_destroy (PublishingGooglePhotosPublishingOptionsPaneSizeDescription* self);
VALA_EXTERN PublishingGooglePhotosPublishingOptionsPane* publishing_google_photos_publishing_options_pane_new (PublishingGooglePhotosPublishingParameters* parameters,
                                                                                                   gboolean can_logout);
VALA_EXTERN PublishingGooglePhotosPublishingOptionsPane* publishing_google_photos_publishing_options_pane_construct (GType object_type,
                                                                                                         PublishingGooglePhotosPublishingParameters* parameters,
                                                                                                         gboolean can_logout);
VALA_EXTERN gchar* publishing_google_photos_publishing_parameters_get_user_name (PublishingGooglePhotosPublishingParameters* self);
VALA_EXTERN gboolean publishing_google_photos_publishing_parameters_get_strip_metadata (PublishingGooglePhotosPublishingParameters* self);
VALA_EXTERN SpitPublishingPublisherMediaType publishing_google_photos_publishing_parameters_get_media_type (PublishingGooglePhotosPublishingParameters* self);
VALA_EXTERN gint publishing_google_photos_publishing_parameters_get_major_axis_size_selection_id (PublishingGooglePhotosPublishingParameters* self);
static void publishing_google_photos_publishing_options_pane_on_publish_clicked (PublishingGooglePhotosPublishingOptionsPane* self);
static void _publishing_google_photos_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                              gpointer self);
static void publishing_google_photos_publishing_options_pane_on_logout_clicked (PublishingGooglePhotosPublishingOptionsPane* self);
static void _publishing_google_photos_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                             gpointer self);
static GtkWidget* publishing_google_photos_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base);
static SpitPublishingDialogPaneGeometryOptions publishing_google_photos_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base);
static void publishing_google_photos_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base);
VALA_EXTERN gchar* publishing_google_photos_publishing_parameters_get_target_album_name (PublishingGooglePhotosPublishingParameters* self);
VALA_EXTERN gpointer publishing_google_photos_album_ref (gpointer instance);
VALA_EXTERN void publishing_google_photos_album_unref (gpointer instance);
VALA_EXTERN GParamSpec* publishing_google_photos_param_spec_album (const gchar* name,
                                                       const gchar* nick,
                                                       const gchar* blurb,
                                                       GType object_type,
                                                       GParamFlags flags);
VALA_EXTERN void publishing_google_photos_value_set_album (GValue* value,
                                               gpointer v_object);
VALA_EXTERN void publishing_google_photos_value_take_album (GValue* value,
                                                gpointer v_object);
VALA_EXTERN gpointer publishing_google_photos_value_get_album (const GValue* value);
VALA_EXTERN GType publishing_google_photos_album_get_type (void) G_GNUC_CONST ;
VALA_EXTERN PublishingGooglePhotosAlbum** publishing_google_photos_publishing_parameters_get_albums (PublishingGooglePhotosPublishingParameters* self,
                                                                                         gint* result_length1);
static void publishing_google_photos_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base);
VALA_EXTERN void publishing_google_photos_publishing_parameters_set_major_axis_size_selection_id (PublishingGooglePhotosPublishingParameters* self,
                                                                                      gint selection_id);
VALA_EXTERN void publishing_google_photos_publishing_parameters_set_major_axis_size_pixels (PublishingGooglePhotosPublishingParameters* self,
                                                                                gint pixels);
VALA_EXTERN void publishing_google_photos_publishing_parameters_set_strip_metadata (PublishingGooglePhotosPublishingParameters* self,
                                                                        gboolean strip_metadata);
VALA_EXTERN void publishing_google_photos_publishing_parameters_set_target_album_name (PublishingGooglePhotosPublishingParameters* self,
                                                                           const gchar* target_album_name);
VALA_EXTERN void publishing_google_photos_publishing_parameters_set_target_album_entry_id (PublishingGooglePhotosPublishingParameters* self,
                                                                               const gchar* target_album_id);
static void publishing_google_photos_publishing_options_pane_finalize (GObject * obj);
static GType publishing_google_photos_publishing_options_pane_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static const PublishingGooglePhotosPublishingOptionsPaneSizeDescription PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_size_descriptions[5] = {{N_ ("Small (640 × 480 pixels)"), 640}, {N_ ("Medium (1024 × 768 pixels)"), 1024}, {N_ ("Recommended (1600 × 1200 pixels)"), 1600}, {N_ ("Google+ (2048 × 1536 pixels)"), 2048}, {N_ ("Original Size"), PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_PARAMETERS_ORIGINAL_SIZE}};

static inline gpointer
publishing_google_photos_publishing_options_pane_get_instance_private (PublishingGooglePhotosPublishingOptionsPane* self)
{
	return G_STRUCT_MEMBER_P (self, PublishingGooglePhotosPublishingOptionsPane_private_offset);
}

static gpointer
_publishing_google_photos_publishing_parameters_ref0 (gpointer self)
{
	return self ? publishing_google_photos_publishing_parameters_ref (self) : NULL;
}

static void
_publishing_google_photos_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                         gpointer self)
{
	publishing_google_photos_publishing_options_pane_on_publish_clicked ((PublishingGooglePhotosPublishingOptionsPane*) self);
}

static void
_publishing_google_photos_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                        gpointer self)
{
	publishing_google_photos_publishing_options_pane_on_logout_clicked ((PublishingGooglePhotosPublishingOptionsPane*) self);
}

PublishingGooglePhotosPublishingOptionsPane*
publishing_google_photos_publishing_options_pane_construct (GType object_type,
                                                            PublishingGooglePhotosPublishingParameters* parameters,
                                                            gboolean can_logout)
{
	PublishingGooglePhotosPublishingOptionsPane * self = NULL;
	PublishingGooglePhotosPublishingParameters* _tmp0_;
	GtkLabel* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	GtkCheckButton* _tmp10_;
	GtkRadioButton* _tmp23_;
	GtkComboBoxText* _tmp24_;
	GtkRadioButton* _tmp25_;
	GtkEntry* _tmp26_;
	GtkButton* _tmp27_;
	GtkButton* _tmp28_;
	g_return_val_if_fail (PUBLISHING_GOOGLE_PHOTOS_IS_PUBLISHING_PARAMETERS (parameters), NULL);
	self = (PublishingGooglePhotosPublishingOptionsPane*) g_object_new (object_type, NULL);
	_tmp0_ = _publishing_google_photos_publishing_parameters_ref0 (parameters);
	_publishing_google_photos_publishing_parameters_unref0 (self->priv->parameters);
	self->priv->parameters = _tmp0_;
	if (!can_logout) {
		GtkButton* _tmp1_;
		GtkContainer* _tmp2_;
		GtkContainer* _tmp3_;
		GtkButton* _tmp4_;
		_tmp1_ = self->priv->logout_button;
		_tmp2_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget));
		_tmp3_ = _tmp2_;
		_tmp4_ = self->priv->logout_button;
		gtk_container_remove (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget));
	}
	_tmp5_ = self->priv->login_identity_label;
	_tmp6_ = publishing_google_photos_publishing_parameters_get_user_name (parameters);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf (_ ("You are logged into Google Photos as %s."), _tmp7_);
	_tmp9_ = _tmp8_;
	gtk_label_set_label (_tmp5_, _tmp9_);
	_g_free0 (_tmp9_);
	_g_free0 (_tmp7_);
	_tmp10_ = self->priv->strip_metadata_check;
	gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_toggle_button_get_type (), GtkToggleButton), publishing_google_photos_publishing_parameters_get_strip_metadata (parameters));
	if ((publishing_google_photos_publishing_parameters_get_media_type (parameters) & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) == 0) {
		GtkLabel* _tmp11_;
		GtkComboBoxText* _tmp12_;
		GtkComboBoxText* _tmp13_;
		_tmp11_ = self->priv->publish_to_label;
		gtk_label_set_label (_tmp11_, _ ("Videos will appear in:"));
		_tmp12_ = self->priv->size_combo;
		gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget), FALSE);
		_tmp13_ = self->priv->size_combo;
		gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget), FALSE);
	} else {
		GtkLabel* _tmp14_;
		GtkComboBoxText* _tmp20_;
		GtkComboBoxText* _tmp21_;
		GtkComboBoxText* _tmp22_;
		_tmp14_ = self->priv->publish_to_label;
		gtk_label_set_label (_tmp14_, _ ("Photos will appear in:"));
		{
			PublishingGooglePhotosPublishingOptionsPaneSizeDescription* desc_collection = NULL;
			gint desc_collection_length1 = 0;
			gint _desc_collection_size_ = 0;
			gint desc_it = 0;
			desc_collection = PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_size_descriptions;
			desc_collection_length1 = G_N_ELEMENTS (PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_size_descriptions);
			for (desc_it = 0; desc_it < desc_collection_length1; desc_it = desc_it + 1) {
				PublishingGooglePhotosPublishingOptionsPaneSizeDescription _tmp15_;
				PublishingGooglePhotosPublishingOptionsPaneSizeDescription _tmp16_ = {0};
				PublishingGooglePhotosPublishingOptionsPaneSizeDescription desc = {0};
				_tmp15_ = desc_collection[desc_it];
				publishing_google_photos_publishing_options_pane_size_description_copy (&_tmp15_, &_tmp16_);
				desc = _tmp16_;
				{
					GtkComboBoxText* _tmp17_;
					PublishingGooglePhotosPublishingOptionsPaneSizeDescription _tmp18_;
					const gchar* _tmp19_;
					_tmp17_ = self->priv->size_combo;
					_tmp18_ = desc;
					_tmp19_ = _tmp18_.name;
					gtk_combo_box_text_append_text (_tmp17_, _tmp19_);
					publishing_google_photos_publishing_options_pane_size_description_destroy (&desc);
				}
			}
		}
		_tmp20_ = self->priv->size_combo;
		gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget), TRUE);
		_tmp21_ = self->priv->size_combo;
		gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_widget_get_type (), GtkWidget), TRUE);
		_tmp22_ = self->priv->size_combo;
		gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_combo_box_get_type (), GtkComboBox), publishing_google_photos_publishing_parameters_get_major_axis_size_selection_id (parameters));
	}
	_tmp23_ = self->priv->existing_album_radio;
	_tmp24_ = self->priv->existing_albums_combo;
	g_object_bind_property_with_closures (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, G_TYPE_OBJECT, GObject), "active", G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, G_TYPE_OBJECT, GObject), "sensitive", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp25_ = self->priv->new_album_radio;
	_tmp26_ = self->priv->new_album_entry;
	g_object_bind_property_with_closures (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, G_TYPE_OBJECT, GObject), "active", G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, G_TYPE_OBJECT, GObject), "sensitive", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp27_ = self->priv->publish_button;
	g_signal_connect_object (_tmp27_, "clicked", (GCallback) _publishing_google_photos_publishing_options_pane_on_publish_clicked_gtk_button_clicked, self, 0);
	_tmp28_ = self->priv->logout_button;
	g_signal_connect_object (_tmp28_, "clicked", (GCallback) _publishing_google_photos_publishing_options_pane_on_logout_clicked_gtk_button_clicked, self, 0);
	return self;
}

PublishingGooglePhotosPublishingOptionsPane*
publishing_google_photos_publishing_options_pane_new (PublishingGooglePhotosPublishingParameters* parameters,
                                                      gboolean can_logout)
{
	return publishing_google_photos_publishing_options_pane_construct (PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, parameters, can_logout);
}

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

static GtkWidget*
publishing_google_photos_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base)
{
	PublishingGooglePhotosPublishingOptionsPane * self;
	GtkWidget* _tmp0_;
	GtkWidget* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, PublishingGooglePhotosPublishingOptionsPane);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	result = _tmp0_;
	return result;
}

static SpitPublishingDialogPaneGeometryOptions
publishing_google_photos_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base)
{
	PublishingGooglePhotosPublishingOptionsPane * self;
	SpitPublishingDialogPaneGeometryOptions result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, PublishingGooglePhotosPublishingOptionsPane);
	result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE;
	return result;
}

static void
publishing_google_photos_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base)
{
	PublishingGooglePhotosPublishingOptionsPane * self;
	gint default_album_id = 0;
	gchar* last_album = NULL;
	PublishingGooglePhotosPublishingParameters* _tmp0_;
	gchar* _tmp1_;
	PublishingGooglePhotosAlbum** albums = NULL;
	PublishingGooglePhotosPublishingParameters* _tmp2_;
	gint _tmp3_ = 0;
	PublishingGooglePhotosAlbum** _tmp4_;
	gint albums_length1;
	gint _albums_size_;
	PublishingGooglePhotosAlbum** _tmp27_;
	gint _tmp27__length1;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, PublishingGooglePhotosPublishingOptionsPane);
	default_album_id = -1;
	_tmp0_ = self->priv->parameters;
	_tmp1_ = publishing_google_photos_publishing_parameters_get_target_album_name (_tmp0_);
	last_album = _tmp1_;
	_tmp2_ = self->priv->parameters;
	_tmp4_ = publishing_google_photos_publishing_parameters_get_albums (_tmp2_, &_tmp3_);
	albums = _tmp4_;
	albums_length1 = _tmp3_;
	_albums_size_ = albums_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				PublishingGooglePhotosAlbum** _tmp7_;
				gint _tmp7__length1;
				GtkComboBoxText* _tmp8_;
				PublishingGooglePhotosAlbum** _tmp9_;
				gint _tmp9__length1;
				PublishingGooglePhotosAlbum* _tmp10_;
				const gchar* _tmp11_;
				gboolean _tmp12_ = FALSE;
				PublishingGooglePhotosAlbum** _tmp13_;
				gint _tmp13__length1;
				PublishingGooglePhotosAlbum* _tmp14_;
				const gchar* _tmp15_;
				const gchar* _tmp16_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = i;
					i = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = albums;
				_tmp7__length1 = albums_length1;
				if (!(i < _tmp7__length1)) {
					break;
				}
				_tmp8_ = self->priv->existing_albums_combo;
				_tmp9_ = albums;
				_tmp9__length1 = albums_length1;
				_tmp10_ = _tmp9_[i];
				_tmp11_ = _tmp10_->name;
				gtk_combo_box_text_append_text (_tmp8_, _tmp11_);
				_tmp13_ = albums;
				_tmp13__length1 = albums_length1;
				_tmp14_ = _tmp13_[i];
				_tmp15_ = _tmp14_->name;
				_tmp16_ = last_album;
				if (g_strcmp0 (_tmp15_, _tmp16_) == 0) {
					_tmp12_ = TRUE;
				} else {
					gboolean _tmp17_ = FALSE;
					gboolean _tmp18_ = FALSE;
					PublishingGooglePhotosAlbum** _tmp19_;
					gint _tmp19__length1;
					PublishingGooglePhotosAlbum* _tmp20_;
					const gchar* _tmp21_;
					_tmp19_ = albums;
					_tmp19__length1 = albums_length1;
					_tmp20_ = _tmp19_[i];
					_tmp21_ = _tmp20_->name;
					if (g_strcmp0 (_tmp21_, PUBLISHING_GOOGLE_PHOTOS_DEFAULT_ALBUM_NAME) == 0) {
						_tmp18_ = TRUE;
					} else {
						PublishingGooglePhotosAlbum** _tmp22_;
						gint _tmp22__length1;
						PublishingGooglePhotosAlbum* _tmp23_;
						const gchar* _tmp24_;
						_tmp22_ = albums;
						_tmp22__length1 = albums_length1;
						_tmp23_ = _tmp22_[i];
						_tmp24_ = _tmp23_->name;
						_tmp18_ = g_strcmp0 (_tmp24_, _ ("Default album")) == 0;
					}
					if (_tmp18_) {
						_tmp17_ = default_album_id == -1;
					} else {
						_tmp17_ = FALSE;
					}
					_tmp12_ = _tmp17_;
				}
				if (_tmp12_) {
					default_album_id = i;
				}
			}
		}
	}
	if (default_album_id >= 0) {
		GtkComboBoxText* _tmp25_;
		GtkRadioButton* _tmp26_;
		_tmp25_ = self->priv->existing_albums_combo;
		gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_combo_box_get_type (), GtkComboBox), default_album_id);
		_tmp26_ = self->priv->existing_album_radio;
		gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE);
	}
	_tmp27_ = albums;
	_tmp27__length1 = albums_length1;
	if (_tmp27__length1 == 0) {
		GtkRadioButton* _tmp28_;
		GtkRadioButton* _tmp29_;
		_tmp28_ = self->priv->existing_album_radio;
		gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_widget_get_type (), GtkWidget), FALSE);
		_tmp29_ = self->priv->new_album_radio;
		gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE);
	}
	albums = (_vala_array_free (albums, albums_length1, (GDestroyNotify) publishing_google_photos_album_unref), NULL);
	_g_free0 (last_album);
}

static void
publishing_google_photos_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base)
{
	PublishingGooglePhotosPublishingOptionsPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, PublishingGooglePhotosPublishingOptionsPane);
}

static void
publishing_google_photos_publishing_options_pane_on_publish_clicked (PublishingGooglePhotosPublishingOptionsPane* self)
{
	gint _tmp0_ = 0;
	GtkComboBoxText* _tmp1_;
	gint size_combo_last_active = 0;
	PublishingGooglePhotosPublishingParameters* _tmp3_;
	PublishingGooglePhotosPublishingParameters* _tmp4_;
	PublishingGooglePhotosPublishingOptionsPaneSizeDescription _tmp5_;
	PublishingGooglePhotosPublishingParameters* _tmp6_;
	GtkCheckButton* _tmp7_;
	PublishingGooglePhotosAlbum** albums = NULL;
	PublishingGooglePhotosPublishingParameters* _tmp8_;
	gint _tmp9_ = 0;
	PublishingGooglePhotosAlbum** _tmp10_;
	gint albums_length1;
	gint _albums_size_;
	GtkRadioButton* _tmp11_;
	g_return_if_fail (PUBLISHING_GOOGLE_PHOTOS_IS_PUBLISHING_OPTIONS_PANE (self));
	_tmp1_ = self->priv->size_combo;
	if (gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)) >= 0) {
		GtkComboBoxText* _tmp2_;
		_tmp2_ = self->priv->size_combo;
		_tmp0_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_combo_box_get_type (), GtkComboBox));
	} else {
		_tmp0_ = 0;
	}
	size_combo_last_active = _tmp0_;
	_tmp3_ = self->priv->parameters;
	publishing_google_photos_publishing_parameters_set_major_axis_size_selection_id (_tmp3_, size_combo_last_active);
	_tmp4_ = self->priv->parameters;
	_tmp5_ = PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_size_descriptions[size_combo_last_active];
	publishing_google_photos_publishing_parameters_set_major_axis_size_pixels (_tmp4_, _tmp5_.major_axis_pixels);
	_tmp6_ = self->priv->parameters;
	_tmp7_ = self->priv->strip_metadata_check;
	publishing_google_photos_publishing_parameters_set_strip_metadata (_tmp6_, gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_toggle_button_get_type (), GtkToggleButton)));
	_tmp8_ = self->priv->parameters;
	_tmp10_ = publishing_google_photos_publishing_parameters_get_albums (_tmp8_, &_tmp9_);
	albums = _tmp10_;
	albums_length1 = _tmp9_;
	_albums_size_ = albums_length1;
	_tmp11_ = self->priv->new_album_radio;
	if (gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_toggle_button_get_type (), GtkToggleButton))) {
		PublishingGooglePhotosPublishingParameters* _tmp12_;
		GtkEntry* _tmp13_;
		const gchar* _tmp14_;
		_tmp12_ = self->priv->parameters;
		_tmp13_ = self->priv->new_album_entry;
		_tmp14_ = gtk_entry_get_text (_tmp13_);
		publishing_google_photos_publishing_parameters_set_target_album_name (_tmp12_, _tmp14_);
	} else {
		PublishingGooglePhotosPublishingParameters* _tmp15_;
		PublishingGooglePhotosAlbum** _tmp16_;
		gint _tmp16__length1;
		GtkComboBoxText* _tmp17_;
		PublishingGooglePhotosAlbum* _tmp18_;
		const gchar* _tmp19_;
		PublishingGooglePhotosPublishingParameters* _tmp20_;
		PublishingGooglePhotosAlbum** _tmp21_;
		gint _tmp21__length1;
		GtkComboBoxText* _tmp22_;
		PublishingGooglePhotosAlbum* _tmp23_;
		const gchar* _tmp24_;
		_tmp15_ = self->priv->parameters;
		_tmp16_ = albums;
		_tmp16__length1 = albums_length1;
		_tmp17_ = self->priv->existing_albums_combo;
		_tmp18_ = _tmp16_[gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_combo_box_get_type (), GtkComboBox))];
		_tmp19_ = _tmp18_->name;
		publishing_google_photos_publishing_parameters_set_target_album_name (_tmp15_, _tmp19_);
		_tmp20_ = self->priv->parameters;
		_tmp21_ = albums;
		_tmp21__length1 = albums_length1;
		_tmp22_ = self->priv->existing_albums_combo;
		_tmp23_ = _tmp21_[gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_combo_box_get_type (), GtkComboBox))];
		_tmp24_ = _tmp23_->id;
		publishing_google_photos_publishing_parameters_set_target_album_entry_id (_tmp20_, _tmp24_);
	}
	g_signal_emit (self, publishing_google_photos_publishing_options_pane_signals[PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL], 0);
	albums = (_vala_array_free (albums, albums_length1, (GDestroyNotify) publishing_google_photos_album_unref), NULL);
}

static void
publishing_google_photos_publishing_options_pane_on_logout_clicked (PublishingGooglePhotosPublishingOptionsPane* self)
{
	g_return_if_fail (PUBLISHING_GOOGLE_PHOTOS_IS_PUBLISHING_OPTIONS_PANE (self));
	g_signal_emit (self, publishing_google_photos_publishing_options_pane_signals[PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL], 0);
}

static void
publishing_google_photos_publishing_options_pane_size_description_copy (const PublishingGooglePhotosPublishingOptionsPaneSizeDescription* self,
                                                                        PublishingGooglePhotosPublishingOptionsPaneSizeDescription* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = (*self).name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).name);
	(*dest).name = _tmp1_;
	(*dest).major_axis_pixels = (*self).major_axis_pixels;
}

static void
publishing_google_photos_publishing_options_pane_size_description_destroy (PublishingGooglePhotosPublishingOptionsPaneSizeDescription* self)
{
	_g_free0 ((*self).name);
}

static PublishingGooglePhotosPublishingOptionsPaneSizeDescription*
publishing_google_photos_publishing_options_pane_size_description_dup (const PublishingGooglePhotosPublishingOptionsPaneSizeDescription* self)
{
	PublishingGooglePhotosPublishingOptionsPaneSizeDescription* dup;
	dup = g_new0 (PublishingGooglePhotosPublishingOptionsPaneSizeDescription, 1);
	publishing_google_photos_publishing_options_pane_size_description_copy (self, dup);
	return dup;
}

static void
publishing_google_photos_publishing_options_pane_size_description_free (PublishingGooglePhotosPublishingOptionsPaneSizeDescription* self)
{
	publishing_google_photos_publishing_options_pane_size_description_destroy (self);
	g_free (self);
}

static GType
publishing_google_photos_publishing_options_pane_size_description_get_type_once (void)
{
	GType publishing_google_photos_publishing_options_pane_size_description_type_id;
	publishing_google_photos_publishing_options_pane_size_description_type_id = g_boxed_type_register_static ("PublishingGooglePhotosPublishingOptionsPaneSizeDescription", (GBoxedCopyFunc) publishing_google_photos_publishing_options_pane_size_description_dup, (GBoxedFreeFunc) publishing_google_photos_publishing_options_pane_size_description_free);
	return publishing_google_photos_publishing_options_pane_size_description_type_id;
}

static GType
publishing_google_photos_publishing_options_pane_size_description_get_type (void)
{
	static volatile gsize publishing_google_photos_publishing_options_pane_size_description_type_id__once = 0;
	if (g_once_init_enter (&publishing_google_photos_publishing_options_pane_size_description_type_id__once)) {
		GType publishing_google_photos_publishing_options_pane_size_description_type_id;
		publishing_google_photos_publishing_options_pane_size_description_type_id = publishing_google_photos_publishing_options_pane_size_description_get_type_once ();
		g_once_init_leave (&publishing_google_photos_publishing_options_pane_size_description_type_id__once, publishing_google_photos_publishing_options_pane_size_description_type_id);
	}
	return publishing_google_photos_publishing_options_pane_size_description_type_id__once;
}

static void
publishing_google_photos_publishing_options_pane_class_init (PublishingGooglePhotosPublishingOptionsPaneClass * klass,
                                                             gpointer klass_data)
{
	publishing_google_photos_publishing_options_pane_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PublishingGooglePhotosPublishingOptionsPane_private_offset);
	G_OBJECT_CLASS (klass)->finalize = publishing_google_photos_publishing_options_pane_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Shotwell/Publishing/google_photos_publishing_options_pane.ui");
	publishing_google_photos_publishing_options_pane_signals[PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL] = g_signal_new ("publish", PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	publishing_google_photos_publishing_options_pane_signals[PUBLISHING_GOOGLE_PHOTOS_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL] = g_signal_new ("logout", PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "logout_button", FALSE, PublishingGooglePhotosPublishingOptionsPane_private_offset + G_STRUCT_OFFSET (PublishingGooglePhotosPublishingOptionsPanePrivate, logout_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "publish_button", FALSE, PublishingGooglePhotosPublishingOptionsPane_private_offset + G_STRUCT_OFFSET (PublishingGooglePhotosPublishingOptionsPanePrivate, publish_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "existing_album_radio", FALSE, PublishingGooglePhotosPublishingOptionsPane_private_offset + G_STRUCT_OFFSET (PublishingGooglePhotosPublishingOptionsPanePrivate, existing_album_radio));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "existing_albums_combo", FALSE, PublishingGooglePhotosPublishingOptionsPane_private_offset + G_STRUCT_OFFSET (PublishingGooglePhotosPublishingOptionsPanePrivate, existing_albums_combo));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "size_combo", FALSE, PublishingGooglePhotosPublishingOptionsPane_private_offset + G_STRUCT_OFFSET (PublishingGooglePhotosPublishingOptionsPanePrivate, size_combo));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "publish_to_label", FALSE, PublishingGooglePhotosPublishingOptionsPane_private_offset + G_STRUCT_OFFSET (PublishingGooglePhotosPublishingOptionsPanePrivate, publish_to_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "login_identity_label", FALSE, PublishingGooglePhotosPublishingOptionsPane_private_offset + G_STRUCT_OFFSET (PublishingGooglePhotosPublishingOptionsPanePrivate, login_identity_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "strip_metadata_check", FALSE, PublishingGooglePhotosPublishingOptionsPane_private_offset + G_STRUCT_OFFSET (PublishingGooglePhotosPublishingOptionsPanePrivate, strip_metadata_check));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "new_album_radio", FALSE, PublishingGooglePhotosPublishingOptionsPane_private_offset + G_STRUCT_OFFSET (PublishingGooglePhotosPublishingOptionsPanePrivate, new_album_radio));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "new_album_entry", FALSE, PublishingGooglePhotosPublishingOptionsPane_private_offset + G_STRUCT_OFFSET (PublishingGooglePhotosPublishingOptionsPanePrivate, new_album_entry));
}

static void
publishing_google_photos_publishing_options_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface,
                                                                                             gpointer iface_data)
{
	publishing_google_photos_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_widget = (GtkWidget* (*) (SpitPublishingDialogPane*)) publishing_google_photos_publishing_options_pane_real_get_widget;
	iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*) (SpitPublishingDialogPane*)) publishing_google_photos_publishing_options_pane_real_get_preferred_geometry;
	iface->on_pane_installed = (void (*) (SpitPublishingDialogPane*)) publishing_google_photos_publishing_options_pane_real_on_pane_installed;
	iface->on_pane_uninstalled = (void (*) (SpitPublishingDialogPane*)) publishing_google_photos_publishing_options_pane_real_on_pane_uninstalled;
}

static void
publishing_google_photos_publishing_options_pane_instance_init (PublishingGooglePhotosPublishingOptionsPane * self,
                                                                gpointer klass)
{
	self->priv = publishing_google_photos_publishing_options_pane_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
publishing_google_photos_publishing_options_pane_finalize (GObject * obj)
{
	PublishingGooglePhotosPublishingOptionsPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_GOOGLE_PHOTOS_TYPE_PUBLISHING_OPTIONS_PANE, PublishingGooglePhotosPublishingOptionsPane);
	_publishing_google_photos_publishing_parameters_unref0 (self->priv->parameters);
	G_OBJECT_CLASS (publishing_google_photos_publishing_options_pane_parent_class)->finalize (obj);
}

static GType
publishing_google_photos_publishing_options_pane_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PublishingGooglePhotosPublishingOptionsPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_google_photos_publishing_options_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingGooglePhotosPublishingOptionsPane), 0, (GInstanceInitFunc) publishing_google_photos_publishing_options_pane_instance_init, NULL };
	static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_google_photos_publishing_options_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType publishing_google_photos_publishing_options_pane_type_id;
	publishing_google_photos_publishing_options_pane_type_id = g_type_register_static (gtk_box_get_type (), "PublishingGooglePhotosPublishingOptionsPane", &g_define_type_info, 0);
	g_type_add_interface_static (publishing_google_photos_publishing_options_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info);
	PublishingGooglePhotosPublishingOptionsPane_private_offset = g_type_add_instance_private (publishing_google_photos_publishing_options_pane_type_id, sizeof (PublishingGooglePhotosPublishingOptionsPanePrivate));
	return publishing_google_photos_publishing_options_pane_type_id;
}

GType
publishing_google_photos_publishing_options_pane_get_type (void)
{
	static volatile gsize publishing_google_photos_publishing_options_pane_type_id__once = 0;
	if (g_once_init_enter (&publishing_google_photos_publishing_options_pane_type_id__once)) {
		GType publishing_google_photos_publishing_options_pane_type_id;
		publishing_google_photos_publishing_options_pane_type_id = publishing_google_photos_publishing_options_pane_get_type_once ();
		g_once_init_leave (&publishing_google_photos_publishing_options_pane_type_id__once, publishing_google_photos_publishing_options_pane_type_id);
	}
	return publishing_google_photos_publishing_options_pane_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

