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

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

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

#define PUBLISHING_UI_PUBLISHING_DIALOG_LARGE_WINDOW_WIDTH 860
#define PUBLISHING_UI_PUBLISHING_DIALOG_LARGE_WINDOW_HEIGHT 688
#define PUBLISHING_UI_PUBLISHING_DIALOG_COLOSSAL_WINDOW_WIDTH 1024
#define PUBLISHING_UI_PUBLISHING_DIALOG_COLOSSAL_WINDOW_HEIGHT 688
#define PUBLISHING_UI_PUBLISHING_DIALOG_STANDARD_WINDOW_WIDTH 632
#define PUBLISHING_UI_PUBLISHING_DIALOG_STANDARD_WINDOW_HEIGHT 540
#define PUBLISHING_UI_PUBLISHING_DIALOG_BORDER_REGION_WIDTH 16
#define PUBLISHING_UI_PUBLISHING_DIALOG_BORDER_REGION_HEIGHT 100
#define PUBLISHING_UI_PUBLISHING_DIALOG_STANDARD_CONTENT_LABEL_WIDTH 500
#define PUBLISHING_UI_PUBLISHING_DIALOG_STANDARD_ACTION_BUTTON_WIDTH 128
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define PUBLISHING_UI_TYPE_PUBLISHING_DIALOG (publishing_ui_publishing_dialog_get_type ())
#define PUBLISHING_UI_PUBLISHING_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_UI_TYPE_PUBLISHING_DIALOG, PublishingUIPublishingDialog))
#define PUBLISHING_UI_PUBLISHING_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_UI_TYPE_PUBLISHING_DIALOG, PublishingUIPublishingDialogClass))
#define PUBLISHING_UI_IS_PUBLISHING_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_UI_TYPE_PUBLISHING_DIALOG))
#define PUBLISHING_UI_IS_PUBLISHING_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_UI_TYPE_PUBLISHING_DIALOG))
#define PUBLISHING_UI_PUBLISHING_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_UI_TYPE_PUBLISHING_DIALOG, PublishingUIPublishingDialogClass))

typedef struct _PublishingUIPublishingDialog PublishingUIPublishingDialog;
typedef struct _PublishingUIPublishingDialogClass PublishingUIPublishingDialogClass;
typedef struct _PublishingUIPublishingDialogPrivate PublishingUIPublishingDialogPrivate;

#define PLUGINS_TYPE_STANDARD_HOST_INTERFACE (plugins_standard_host_interface_get_type ())
#define PLUGINS_STANDARD_HOST_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUGINS_TYPE_STANDARD_HOST_INTERFACE, PluginsStandardHostInterface))
#define PLUGINS_STANDARD_HOST_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLUGINS_TYPE_STANDARD_HOST_INTERFACE, PluginsStandardHostInterfaceClass))
#define PLUGINS_IS_STANDARD_HOST_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUGINS_TYPE_STANDARD_HOST_INTERFACE))
#define PLUGINS_IS_STANDARD_HOST_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLUGINS_TYPE_STANDARD_HOST_INTERFACE))
#define PLUGINS_STANDARD_HOST_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLUGINS_TYPE_STANDARD_HOST_INTERFACE, PluginsStandardHostInterfaceClass))

typedef struct _PluginsStandardHostInterface PluginsStandardHostInterface;
typedef struct _PluginsStandardHostInterfaceClass PluginsStandardHostInterfaceClass;

#define SPIT_PUBLISHING_TYPE_CONCRETE_PUBLISHING_HOST (spit_publishing_concrete_publishing_host_get_type ())
#define SPIT_PUBLISHING_CONCRETE_PUBLISHING_HOST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPIT_PUBLISHING_TYPE_CONCRETE_PUBLISHING_HOST, SpitPublishingConcretePublishingHost))
#define SPIT_PUBLISHING_CONCRETE_PUBLISHING_HOST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SPIT_PUBLISHING_TYPE_CONCRETE_PUBLISHING_HOST, SpitPublishingConcretePublishingHostClass))
#define SPIT_PUBLISHING_IS_CONCRETE_PUBLISHING_HOST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SPIT_PUBLISHING_TYPE_CONCRETE_PUBLISHING_HOST))
#define SPIT_PUBLISHING_IS_CONCRETE_PUBLISHING_HOST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPIT_PUBLISHING_TYPE_CONCRETE_PUBLISHING_HOST))
#define SPIT_PUBLISHING_CONCRETE_PUBLISHING_HOST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SPIT_PUBLISHING_TYPE_CONCRETE_PUBLISHING_HOST, SpitPublishingConcretePublishingHostClass))

typedef struct _SpitPublishingConcretePublishingHost SpitPublishingConcretePublishingHost;
typedef struct _SpitPublishingConcretePublishingHostClass SpitPublishingConcretePublishingHostClass;
enum  {
	PUBLISHING_UI_PUBLISHING_DIALOG_0_PROPERTY,
	PUBLISHING_UI_PUBLISHING_DIALOG_NUM_PROPERTIES
};
static GParamSpec* publishing_ui_publishing_dialog_properties[PUBLISHING_UI_PUBLISHING_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))

typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;

#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))

typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;

#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ())
#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource))
#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE))
#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE))
#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))

typedef struct _ThumbnailSource ThumbnailSource;
typedef struct _ThumbnailSourceClass ThumbnailSourceClass;

#define TYPE_MEDIA_SOURCE (media_source_get_type ())
#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource))
#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass))
#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE))
#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE))
#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass))

typedef struct _MediaSource MediaSource;
typedef struct _MediaSourceClass MediaSourceClass;

#define TYPE_PAGE_WINDOW (page_window_get_type ())
#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow))
#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass))
#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW))
#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW))
#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass))

typedef struct _PageWindow PageWindow;
typedef struct _PageWindowClass PageWindowClass;

#define TYPE_APP_WINDOW (app_window_get_type ())
#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))

typedef struct _AppWindow AppWindow;
typedef struct _AppWindowClass AppWindowClass;

#define PUBLISHING_GLUE_TYPE_MEDIA_SOURCE_PUBLISHABLE_WRAPPER (publishing_glue_media_source_publishable_wrapper_get_type ())
#define PUBLISHING_GLUE_MEDIA_SOURCE_PUBLISHABLE_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_GLUE_TYPE_MEDIA_SOURCE_PUBLISHABLE_WRAPPER, PublishingGlueMediaSourcePublishableWrapper))
#define PUBLISHING_GLUE_MEDIA_SOURCE_PUBLISHABLE_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_GLUE_TYPE_MEDIA_SOURCE_PUBLISHABLE_WRAPPER, PublishingGlueMediaSourcePublishableWrapperClass))
#define PUBLISHING_GLUE_IS_MEDIA_SOURCE_PUBLISHABLE_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_GLUE_TYPE_MEDIA_SOURCE_PUBLISHABLE_WRAPPER))
#define PUBLISHING_GLUE_IS_MEDIA_SOURCE_PUBLISHABLE_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_GLUE_TYPE_MEDIA_SOURCE_PUBLISHABLE_WRAPPER))
#define PUBLISHING_GLUE_MEDIA_SOURCE_PUBLISHABLE_WRAPPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_GLUE_TYPE_MEDIA_SOURCE_PUBLISHABLE_WRAPPER, PublishingGlueMediaSourcePublishableWrapperClass))

typedef struct _PublishingGlueMediaSourcePublishableWrapper PublishingGlueMediaSourcePublishableWrapper;
typedef struct _PublishingGlueMediaSourcePublishableWrapperClass PublishingGlueMediaSourcePublishableWrapperClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ())
#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade))
#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE))
#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE))
#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))

typedef struct _ConfigurationFacade ConfigurationFacade;
typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;

#define CONFIG_TYPE_FACADE (config_facade_get_type ())
#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade))
#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass))
#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE))
#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE))
#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass))

typedef struct _ConfigFacade ConfigFacade;
typedef struct _ConfigFacadeClass ConfigFacadeClass;

#define SHOTWELL_TYPE_PROFILE_MANAGER (shotwell_profile_manager_get_type ())
#define SHOTWELL_PROFILE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHOTWELL_TYPE_PROFILE_MANAGER, ShotwellProfileManager))
#define SHOTWELL_PROFILE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHOTWELL_TYPE_PROFILE_MANAGER, ShotwellProfileManagerClass))
#define SHOTWELL_IS_PROFILE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHOTWELL_TYPE_PROFILE_MANAGER))
#define SHOTWELL_IS_PROFILE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHOTWELL_TYPE_PROFILE_MANAGER))
#define SHOTWELL_PROFILE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHOTWELL_TYPE_PROFILE_MANAGER, ShotwellProfileManagerClass))

typedef struct _ShotwellProfileManager ShotwellProfileManager;
typedef struct _ShotwellProfileManagerClass ShotwellProfileManagerClass;
#define _g_timer_destroy0(var) ((var == NULL) ? NULL : (var = (g_timer_destroy (var), NULL)))

#define TYPE_PHOTO_SOURCE (photo_source_get_type ())
#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource))
#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass))
#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE))
#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE))
#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass))

typedef struct _PhotoSource PhotoSource;
typedef struct _PhotoSourceClass PhotoSourceClass;

#define TYPE_PHOTO (photo_get_type ())
#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo))
#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass))
#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO))
#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO))
#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass))

typedef struct _Photo Photo;
typedef struct _PhotoClass PhotoClass;

#define TYPE_LIBRARY_PHOTO (library_photo_get_type ())
#define LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO, LibraryPhoto))
#define LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
#define IS_LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO))
#define IS_LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO))
#define LIBRARY_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))

typedef struct _LibraryPhoto LibraryPhoto;
typedef struct _LibraryPhotoClass LibraryPhotoClass;

#define TYPE_VIDEO_SOURCE (video_source_get_type ())
#define VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE, VideoSource))
#define VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE, VideoSourceClass))
#define IS_VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE))
#define IS_VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE))
#define VIDEO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE, VideoSourceClass))

typedef struct _VideoSource VideoSource;
typedef struct _VideoSourceClass VideoSourceClass;

#define TYPE_VIDEO (video_get_type ())
#define VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO, Video))
#define VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO, VideoClass))
#define IS_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO))
#define IS_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO))
#define VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO, VideoClass))

typedef struct _Video Video;
typedef struct _VideoClass VideoClass;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _PublishingUIPublishingDialog {
	GtkDialog parent_instance;
	PublishingUIPublishingDialogPrivate * priv;
};

struct _PublishingUIPublishingDialogClass {
	GtkDialogClass parent_class;
};

struct _PublishingUIPublishingDialogPrivate {
	GtkListStore* service_selector_box_model;
	GtkComboBox* service_selector_box;
	GtkBox* central_area_layouter;
	GtkButton* close_cancel_button;
	SpitPublishingDialogPane* active_pane;
	SpitPublishingPublishable** publishables;
	gint publishables_length1;
	gint _publishables_size_;
	SpitPublishingConcretePublishingHost* host;
	SpitPluggableInfo* info;
};

static gint PublishingUIPublishingDialog_private_offset;
static gpointer publishing_ui_publishing_dialog_parent_class = NULL;
static PublishingUIPublishingDialog* publishing_ui_publishing_dialog_active_instance;
static PublishingUIPublishingDialog* publishing_ui_publishing_dialog_active_instance = NULL;
static GTimer* publishing_ui_publishing_dialog_since_last_start;
static GTimer* publishing_ui_publishing_dialog_since_last_start = NULL;
static gboolean publishing_ui_publishing_dialog_elapsed_is_valid;
static gboolean publishing_ui_publishing_dialog_elapsed_is_valid = FALSE;

VALA_EXTERN GType publishing_ui_publishing_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PublishingUIPublishingDialog, g_object_unref)
VALA_EXTERN GType plugins_standard_host_interface_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PluginsStandardHostInterface, g_object_unref)
VALA_EXTERN GType spit_publishing_concrete_publishing_host_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SpitPublishingConcretePublishingHost, g_object_unref)
VALA_EXTERN GType data_object_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataObject, g_object_unref)
VALA_EXTERN GType data_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataSource, g_object_unref)
VALA_EXTERN GType thumbnail_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ThumbnailSource, g_object_unref)
VALA_EXTERN GType media_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MediaSource, g_object_unref)
VALA_EXTERN PublishingUIPublishingDialog* publishing_ui_publishing_dialog_new (GeeCollection* to_publish);
VALA_EXTERN PublishingUIPublishingDialog* publishing_ui_publishing_dialog_construct (GType object_type,
                                                                         GeeCollection* to_publish);
VALA_EXTERN gint resources_use_header_bar (void);
VALA_EXTERN GType page_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PageWindow, g_object_unref)
VALA_EXTERN GType app_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AppWindow, g_object_unref)
VALA_EXTERN AppWindow* app_window_get_instance (void);
static gboolean publishing_ui_publishing_dialog_on_window_close (PublishingUIPublishingDialog* self,
                                                          GdkEventAny* evt);
static gboolean _publishing_ui_publishing_dialog_on_window_close_gtk_widget_delete_event (GtkWidget* _sender,
                                                                                   GdkEventAny* event,
                                                                                   gpointer self);
VALA_EXTERN PublishingGlueMediaSourcePublishableWrapper* publishing_glue_media_source_publishable_wrapper_new (MediaSource* to_wrap);
VALA_EXTERN PublishingGlueMediaSourcePublishableWrapper* publishing_glue_media_source_publishable_wrapper_construct (GType object_type,
                                                                                                         MediaSource* to_wrap);
VALA_EXTERN GType publishing_glue_media_source_publishable_wrapper_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PublishingGlueMediaSourcePublishableWrapper, g_object_unref)
static void _vala_array_add55 (SpitPublishingPublishable** * array,
                        gint* length,
                        gint* size,
                        SpitPublishingPublishable* value);
VALA_EXTERN GType configuration_facade_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigurationFacade, g_object_unref)
VALA_EXTERN GType config_facade_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigFacade, g_object_unref)
VALA_EXTERN ConfigFacade* config_facade_get_instance (void);
VALA_EXTERN gchar* configuration_facade_get_last_used_service (ConfigurationFacade* self);
static SpitPublishingService** publishing_ui_publishing_dialog_load_services (gboolean has_photos,
                                                                       gboolean has_videos,
                                                                       gint* result_length1);
VALA_EXTERN GType shotwell_profile_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ShotwellProfileManager, g_object_unref)
VALA_EXTERN ShotwellProfileManager* shotwell_profile_manager_get_instance (void);
VALA_EXTERN gchar* shotwell_profile_manager_id (ShotwellProfileManager* self);
static void publishing_ui_publishing_dialog_on_service_changed (PublishingUIPublishingDialog* self);
static void _publishing_ui_publishing_dialog_on_service_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                                gpointer self);
static void publishing_ui_publishing_dialog_on_close_cancel_clicked (PublishingUIPublishingDialog* self);
static void _publishing_ui_publishing_dialog_on_close_cancel_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self);
static void publishing_ui_publishing_dialog_set_standard_window_mode (PublishingUIPublishingDialog* self);
static SpitPublishingService** publishing_ui_publishing_dialog_load_all_services (gint* result_length1);
VALA_EXTERN GeeCollection* plugins_get_pluggables_for_type (GType type,
                                                GCompareDataFunc compare_func,
                                                gpointer compare_func_target,
                                                GDestroyNotify compare_func_target_destroy_notify,
                                                gboolean include_disabled);
VALA_EXTERN gchar* plugins_get_pluggable_module_id (SpitPluggable* needle);
static void _vala_array_add56 (SpitPublishingService** * array,
                        gint* length,
                        gint* size,
                        SpitPublishingService* value);
static gint __lambda19_ (void* a,
                  void* b);
VALA_EXTERN gint utf8_cs_compare (const gchar* a,
                      const gchar* b);
static gint ___lambda19____compar_fn_t (void* key1,
                                 void* key2);
static void _vala_array_add57 (SpitPublishingService** * array,
                        gint* length,
                        gint* size,
                        SpitPublishingService* value);
static void _vala_array_add58 (SpitPublishingService** * array,
                        gint* length,
                        gint* size,
                        SpitPublishingService* value);
static void _vala_array_add59 (SpitPublishingService** * array,
                        gint* length,
                        gint* size,
                        SpitPublishingService* value);
VALA_EXTERN void publishing_ui_publishing_dialog_go (GeeCollection* to_publish);
VALA_EXTERN GType photo_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PhotoSource, g_object_unref)
VALA_EXTERN GType photo_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Photo, g_object_unref)
VALA_EXTERN GType library_photo_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LibraryPhoto, g_object_unref)
VALA_EXTERN GType video_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (VideoSource, g_object_unref)
VALA_EXTERN GType video_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Video, g_object_unref)
VALA_EXTERN void media_source_collection_filter_media (GeeCollection* media,
                                           GeeCollection* photos,
                                           GeeCollection* videos);
VALA_EXTERN void app_window_error_message_with_title (const gchar* title,
                                          const gchar* message,
                                          GtkWindow* parent,
                                          gboolean should_escape);
VALA_EXTERN gint publishing_ui_publishing_dialog_run (PublishingUIPublishingDialog* self);
VALA_EXTERN void configuration_facade_set_last_used_service (ConfigurationFacade* self,
                                                 const gchar* service_name);
VALA_EXTERN SpitPublishingConcretePublishingHost* spit_publishing_concrete_publishing_host_new (SpitPublishingService* service,
                                                                                    PublishingUIPublishingDialog* dialog,
                                                                                    SpitPublishingPublishable** publishables,
                                                                                    gint publishables_length1,
                                                                                    SpitPublishingAccount* account);
VALA_EXTERN SpitPublishingConcretePublishingHost* spit_publishing_concrete_publishing_host_construct (GType object_type,
                                                                                          SpitPublishingService* service,
                                                                                          PublishingUIPublishingDialog* dialog,
                                                                                          SpitPublishingPublishable** publishables,
                                                                                          gint publishables_length1,
                                                                                          SpitPublishingAccount* account);
VALA_EXTERN void spit_publishing_concrete_publishing_host_start_publishing (SpitPublishingConcretePublishingHost* self);
static void publishing_ui_publishing_dialog_set_large_window_mode (PublishingUIPublishingDialog* self);
static void publishing_ui_publishing_dialog_set_colossal_window_mode (PublishingUIPublishingDialog* self);
static void publishing_ui_publishing_dialog_set_free_sizable_window_mode (PublishingUIPublishingDialog* self);
static void publishing_ui_publishing_dialog_clear_free_sizable_window_mode (PublishingUIPublishingDialog* self);
VALA_EXTERN SpitPublishingDialogPane* publishing_ui_publishing_dialog_get_active_pane (PublishingUIPublishingDialog* self);
VALA_EXTERN void publishing_ui_publishing_dialog_set_close_button_mode (PublishingUIPublishingDialog* self);
VALA_EXTERN void publishing_ui_publishing_dialog_set_cancel_button_mode (PublishingUIPublishingDialog* self);
VALA_EXTERN void publishing_ui_publishing_dialog_lock_service (PublishingUIPublishingDialog* self);
VALA_EXTERN void publishing_ui_publishing_dialog_unlock_service (PublishingUIPublishingDialog* self);
VALA_EXTERN void publishing_ui_publishing_dialog_install_pane (PublishingUIPublishingDialog* self,
                                                   SpitPublishingDialogPane* pane);
static void publishing_ui_publishing_dialog_finalize (GObject * obj);
static GType publishing_ui_publishing_dialog_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 inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
publishing_ui_publishing_dialog_get_instance_private (PublishingUIPublishingDialog* self)
{
	return G_STRUCT_MEMBER_P (self, PublishingUIPublishingDialog_private_offset);
}

static gboolean
_publishing_ui_publishing_dialog_on_window_close_gtk_widget_delete_event (GtkWidget* _sender,
                                                                          GdkEventAny* event,
                                                                          gpointer self)
{
	gboolean result;
	result = publishing_ui_publishing_dialog_on_window_close ((PublishingUIPublishingDialog*) self, event);
	return result;
}

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

static void
_vala_array_add55 (SpitPublishingPublishable** * array,
                   gint* length,
                   gint* size,
                   SpitPublishingPublishable* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (SpitPublishingPublishable*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_publishing_ui_publishing_dialog_on_service_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                           gpointer self)
{
	publishing_ui_publishing_dialog_on_service_changed ((PublishingUIPublishingDialog*) self);
}

static void
_publishing_ui_publishing_dialog_on_close_cancel_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self)
{
	publishing_ui_publishing_dialog_on_close_cancel_clicked ((PublishingUIPublishingDialog*) self);
}

PublishingUIPublishingDialog*
publishing_ui_publishing_dialog_construct (GType object_type,
                                           GeeCollection* to_publish)
{
	PublishingUIPublishingDialog * self = NULL;
	gint _tmp0_;
	gint _tmp1_;
	gboolean use_header = FALSE;
	AppWindow* _tmp4_;
	AppWindow* _tmp5_;
	SpitPublishingPublishable** _tmp6_;
	gboolean has_photos = FALSE;
	gboolean has_videos = FALSE;
	gchar* title = NULL;
	gchar* label = NULL;
	gboolean _tmp17_ = FALSE;
	const gchar* _tmp25_;
	GtkListStore* _tmp26_;
	GtkListStore* _tmp27_;
	GtkComboBox* _tmp28_;
	GtkCellRendererPixbuf* renderer_pix = NULL;
	GtkCellRendererPixbuf* _tmp29_;
	GtkComboBox* _tmp30_;
	GtkCellRendererPixbuf* _tmp31_;
	GtkComboBox* _tmp32_;
	GtkCellRendererPixbuf* _tmp33_;
	GtkCellRendererText* renderer_text = NULL;
	GtkCellRendererText* _tmp34_;
	GtkComboBox* _tmp35_;
	GtkCellRendererText* _tmp36_;
	GtkComboBox* _tmp37_;
	GtkCellRendererText* _tmp38_;
	GtkComboBox* _tmp39_;
	gchar* last_used_service = NULL;
	ConfigFacade* _tmp40_;
	ConfigFacade* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	SpitPublishingService** loaded_services = NULL;
	gint _tmp44_ = 0;
	SpitPublishingService** _tmp45_;
	gint loaded_services_length1;
	gint _loaded_services_size_;
	GtkTreeIter iter = {0};
	SpitPublishingService** _tmp46_;
	gint _tmp46__length1;
	GtkComboBox* _tmp97_;
	GtkBox* _tmp127_;
	GtkBox* _tmp128_;
	GtkBox* _tmp129_;
	GtkButton* _tmp138_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (to_publish, GEE_TYPE_COLLECTION), NULL);
	_tmp0_ = gee_collection_get_size (to_publish);
	_tmp1_ = _tmp0_;
	_vala_assert (_tmp1_ > 0, "to_publish.size > 0");
	use_header = resources_use_header_bar () == 1;
	self = (PublishingUIPublishingDialog*) g_object_new (object_type, "use-header-bar", resources_use_header_bar (), NULL);
	if (use_header) {
		GtkHeaderBar* _tmp2_;
		_tmp2_ = gtk_dialog_get_header_bar (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
		gtk_header_bar_set_show_close_button (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_header_bar_get_type (), GtkHeaderBar), FALSE);
	} else {
		GtkBox* _tmp3_;
		_tmp3_ = gtk_dialog_get_content_area (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
		gtk_box_set_spacing (_tmp3_, 6);
	}
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
	gtk_window_set_modal (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), TRUE);
	_tmp4_ = app_window_get_instance ();
	_tmp5_ = _tmp4_;
	gtk_window_set_transient_for (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_window_get_type (), GtkWindow));
	_g_object_unref0 (_tmp5_);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "delete-event", (GCallback) _publishing_ui_publishing_dialog_on_window_close_gtk_widget_delete_event, self, 0);
	_tmp6_ = g_new0 (SpitPublishingPublishable*, 0 + 1);
	self->priv->publishables = (_vala_array_free (self->priv->publishables, self->priv->publishables_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->publishables = _tmp6_;
	self->priv->publishables_length1 = 0;
	self->priv->_publishables_size_ = self->priv->publishables_length1;
	has_photos = FALSE;
	has_videos = FALSE;
	{
		GeeIterator* _media_it = NULL;
		GeeIterator* _tmp7_;
		_tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (to_publish, GEE_TYPE_ITERABLE, GeeIterable));
		_media_it = _tmp7_;
		while (TRUE) {
			GeeIterator* _tmp8_;
			MediaSource* media = NULL;
			GeeIterator* _tmp9_;
			gpointer _tmp10_;
			SpitPublishingPublishable* publishable = NULL;
			MediaSource* _tmp11_;
			PublishingGlueMediaSourcePublishableWrapper* _tmp12_;
			SpitPublishingPublishable* _tmp13_;
			SpitPublishingPublishable* _tmp15_;
			SpitPublishingPublishable* _tmp16_;
			_tmp8_ = _media_it;
			if (!gee_iterator_next (_tmp8_)) {
				break;
			}
			_tmp9_ = _media_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			media = (MediaSource*) _tmp10_;
			_tmp11_ = media;
			_tmp12_ = publishing_glue_media_source_publishable_wrapper_new (_tmp11_);
			publishable = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, SPIT_PUBLISHING_TYPE_PUBLISHABLE, SpitPublishingPublishable);
			_tmp13_ = publishable;
			if (spit_publishing_publishable_get_media_type (_tmp13_) == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) {
				has_photos = TRUE;
			} else {
				SpitPublishingPublishable* _tmp14_;
				_tmp14_ = publishable;
				if (spit_publishing_publishable_get_media_type (_tmp14_) == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) {
					has_videos = TRUE;
				} else {
					g_assert_not_reached ();
				}
			}
			_tmp15_ = publishable;
			_tmp16_ = _g_object_ref0 (_tmp15_);
			_vala_array_add55 (&self->priv->publishables, &self->priv->publishables_length1, &self->priv->_publishables_size_, _tmp16_);
			_g_object_unref0 (publishable);
			_g_object_unref0 (media);
		}
		_g_object_unref0 (_media_it);
	}
	title = NULL;
	label = NULL;
	if (has_photos) {
		_tmp17_ = !has_videos;
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		gchar* _tmp18_;
		gchar* _tmp19_;
		_tmp18_ = g_strdup (_ ("Publish Photos"));
		_g_free0 (title);
		title = _tmp18_;
		_tmp19_ = g_strdup (_ ("Publish photos _to:"));
		_g_free0 (label);
		label = _tmp19_;
	} else {
		gboolean _tmp20_ = FALSE;
		if (!has_photos) {
			_tmp20_ = has_videos;
		} else {
			_tmp20_ = FALSE;
		}
		if (_tmp20_) {
			gchar* _tmp21_;
			gchar* _tmp22_;
			_tmp21_ = g_strdup (_ ("Publish Videos"));
			_g_free0 (title);
			title = _tmp21_;
			_tmp22_ = g_strdup (_ ("Publish videos _to"));
			_g_free0 (label);
			label = _tmp22_;
		} else {
			gchar* _tmp23_;
			gchar* _tmp24_;
			_tmp23_ = g_strdup (_ ("Publish Photos and Videos"));
			_g_free0 (title);
			title = _tmp23_;
			_tmp24_ = g_strdup (_ ("Publish photos and videos _to"));
			_g_free0 (label);
			label = _tmp24_;
		}
	}
	_tmp25_ = title;
	gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), _tmp25_);
	_tmp26_ = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, SPIT_PUBLISHING_TYPE_ACCOUNT, -1);
	_g_object_unref0 (self->priv->service_selector_box_model);
	self->priv->service_selector_box_model = _tmp26_;
	_tmp27_ = self->priv->service_selector_box_model;
	_tmp28_ = (GtkComboBox*) gtk_combo_box_new_with_model (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_tree_model_get_type (), GtkTreeModel));
	g_object_ref_sink (_tmp28_);
	_g_object_unref0 (self->priv->service_selector_box);
	self->priv->service_selector_box = _tmp28_;
	_tmp29_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
	g_object_ref_sink (_tmp29_);
	renderer_pix = _tmp29_;
	_tmp30_ = self->priv->service_selector_box;
	_tmp31_ = renderer_pix;
	gtk_cell_layout_pack_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_cell_layout_get_type (), GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_cell_renderer_get_type (), GtkCellRenderer), TRUE);
	_tmp32_ = self->priv->service_selector_box;
	_tmp33_ = renderer_pix;
	gtk_cell_layout_add_attribute (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_cell_layout_get_type (), GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_cell_renderer_get_type (), GtkCellRenderer), "icon-name", 0);
	_tmp34_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp34_);
	renderer_text = _tmp34_;
	_tmp35_ = self->priv->service_selector_box;
	_tmp36_ = renderer_text;
	gtk_cell_layout_pack_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_cell_layout_get_type (), GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_cell_renderer_get_type (), GtkCellRenderer), TRUE);
	_tmp37_ = self->priv->service_selector_box;
	_tmp38_ = renderer_text;
	gtk_cell_layout_add_attribute (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_cell_layout_get_type (), GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_cell_renderer_get_type (), GtkCellRenderer), "text", 1);
	_tmp39_ = self->priv->service_selector_box;
	gtk_combo_box_set_active (_tmp39_, 0);
	_tmp40_ = config_facade_get_instance ();
	_tmp41_ = _tmp40_;
	_tmp42_ = configuration_facade_get_last_used_service (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
	_tmp43_ = _tmp42_;
	_g_object_unref0 (_tmp41_);
	last_used_service = _tmp43_;
	_tmp45_ = publishing_ui_publishing_dialog_load_services (has_photos, has_videos, &_tmp44_);
	loaded_services = _tmp45_;
	loaded_services_length1 = _tmp44_;
	_loaded_services_size_ = loaded_services_length1;
	_tmp46_ = loaded_services;
	_tmp46__length1 = loaded_services_length1;
	{
		SpitPublishingService** service_collection = NULL;
		gint service_collection_length1 = 0;
		gint _service_collection_size_ = 0;
		gint service_it = 0;
		service_collection = _tmp46_;
		service_collection_length1 = _tmp46__length1;
		for (service_it = 0; service_it < service_collection_length1; service_it = service_it + 1) {
			SpitPublishingService* _tmp47_;
			SpitPublishingService* service = NULL;
			_tmp47_ = _g_object_ref0 (service_collection[service_it]);
			service = _tmp47_;
			{
				gchar* curr_service_id = NULL;
				SpitPublishingService* _tmp48_;
				const gchar* _tmp49_;
				gchar* _tmp50_;
				SpitPublishingService* _tmp51_;
				SpitPluggableInfo* _tmp52_;
				GeeList* accounts = NULL;
				SpitPublishingService* _tmp53_;
				ShotwellProfileManager* _tmp54_;
				ShotwellProfileManager* _tmp55_;
				gchar* _tmp56_;
				gchar* _tmp57_;
				GeeList* _tmp58_;
				GeeList* _tmp59_;
				_tmp48_ = service;
				_tmp49_ = spit_pluggable_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
				_tmp50_ = g_strdup (_tmp49_);
				curr_service_id = _tmp50_;
				_tmp51_ = service;
				_tmp52_ = spit_pluggable_get_info (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
				_g_object_unref0 (self->priv->info);
				self->priv->info = _tmp52_;
				_tmp53_ = service;
				_tmp54_ = shotwell_profile_manager_get_instance ();
				_tmp55_ = _tmp54_;
				_tmp56_ = shotwell_profile_manager_id (_tmp55_);
				_tmp57_ = _tmp56_;
				_tmp58_ = spit_publishing_service_get_accounts (_tmp53_, _tmp57_);
				_tmp59_ = _tmp58_;
				_g_free0 (_tmp57_);
				_g_object_unref0 (_tmp55_);
				accounts = _tmp59_;
				{
					GeeList* _account_list = NULL;
					GeeList* _tmp60_;
					gint _account_size = 0;
					GeeList* _tmp61_;
					gint _tmp62_;
					gint _tmp63_;
					gint _account_index = 0;
					_tmp60_ = accounts;
					_account_list = _tmp60_;
					_tmp61_ = _account_list;
					_tmp62_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, GEE_TYPE_COLLECTION, GeeCollection));
					_tmp63_ = _tmp62_;
					_account_size = _tmp63_;
					_account_index = -1;
					while (TRUE) {
						gint _tmp64_;
						gint _tmp65_;
						SpitPublishingAccount* account = NULL;
						GeeList* _tmp66_;
						gpointer _tmp67_;
						GtkListStore* _tmp68_;
						GtkTreeIter _tmp69_ = {0};
						gchar* account_name = NULL;
						SpitPublishingAccount* _tmp70_;
						gchar* _tmp71_;
						gchar* _tmp72_ = NULL;
						const gchar* _tmp73_;
						gchar* display_name = NULL;
						SpitPublishingService* _tmp77_;
						const gchar* _tmp78_;
						gchar* _tmp79_;
						GtkListStore* _tmp80_;
						GtkTreeIter _tmp81_;
						SpitPluggableInfo* _tmp82_;
						const gchar* _tmp83_;
						const gchar* _tmp84_;
						const gchar* _tmp85_;
						SpitPublishingAccount* _tmp86_;
						const gchar* _tmp87_;
						_account_index = _account_index + 1;
						_tmp64_ = _account_index;
						_tmp65_ = _account_size;
						if (!(_tmp64_ < _tmp65_)) {
							break;
						}
						_tmp66_ = _account_list;
						_tmp67_ = gee_list_get (_tmp66_, _account_index);
						account = (SpitPublishingAccount*) _tmp67_;
						_tmp68_ = self->priv->service_selector_box_model;
						gtk_list_store_append (_tmp68_, &_tmp69_);
						iter = _tmp69_;
						_tmp70_ = account;
						_tmp71_ = spit_publishing_account_display_name (_tmp70_);
						account_name = _tmp71_;
						_tmp73_ = account_name;
						if (g_strcmp0 (_tmp73_, "") == 0) {
							gchar* _tmp74_;
							_tmp74_ = g_strdup ("");
							_g_free0 (_tmp72_);
							_tmp72_ = _tmp74_;
						} else {
							const gchar* _tmp75_;
							gchar* _tmp76_;
							_tmp75_ = account_name;
							_tmp76_ = g_strconcat ("/", _tmp75_, NULL);
							_g_free0 (_tmp72_);
							_tmp72_ = _tmp76_;
						}
						_tmp77_ = service;
						_tmp78_ = spit_pluggable_get_pluggable_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
						_tmp79_ = g_strconcat (_tmp78_, _tmp72_, NULL);
						display_name = _tmp79_;
						_tmp80_ = self->priv->service_selector_box_model;
						_tmp81_ = iter;
						_tmp82_ = self->priv->info;
						_tmp83_ = spit_pluggable_info_get_icon_name (_tmp82_);
						_tmp84_ = _tmp83_;
						_tmp85_ = display_name;
						_tmp86_ = account;
						gtk_list_store_set (_tmp80_, &_tmp81_, 0, _tmp84_, 1, _tmp85_, 2, _tmp86_, -1);
						_tmp87_ = last_used_service;
						if (_tmp87_ == NULL) {
							GtkComboBox* _tmp88_;
							GtkTreeIter _tmp89_;
							SpitPublishingService* _tmp90_;
							const gchar* _tmp91_;
							gchar* _tmp92_;
							_tmp88_ = self->priv->service_selector_box;
							_tmp89_ = iter;
							gtk_combo_box_set_active_iter (_tmp88_, &_tmp89_);
							_tmp90_ = service;
							_tmp91_ = spit_pluggable_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp90_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
							_tmp92_ = g_strdup (_tmp91_);
							_g_free0 (last_used_service);
							last_used_service = _tmp92_;
						} else {
							const gchar* _tmp93_;
							const gchar* _tmp94_;
							_tmp93_ = last_used_service;
							_tmp94_ = curr_service_id;
							if (g_strcmp0 (_tmp93_, _tmp94_) == 0) {
								GtkComboBox* _tmp95_;
								GtkTreeIter _tmp96_;
								_tmp95_ = self->priv->service_selector_box;
								_tmp96_ = iter;
								gtk_combo_box_set_active_iter (_tmp95_, &_tmp96_);
							}
						}
						_g_free0 (display_name);
						_g_free0 (_tmp72_);
						_g_free0 (account_name);
						_g_object_unref0 (account);
					}
				}
				_g_object_unref0 (accounts);
				_g_free0 (curr_service_id);
				_g_object_unref0 (service);
			}
		}
	}
	_tmp97_ = self->priv->service_selector_box;
	g_signal_connect_object (_tmp97_, "changed", (GCallback) _publishing_ui_publishing_dialog_on_service_changed_gtk_combo_box_changed, self, 0);
	if (!use_header) {
		GtkLabel* service_selector_box_label = NULL;
		const gchar* _tmp98_;
		GtkLabel* _tmp99_;
		GtkLabel* _tmp100_;
		GtkComboBox* _tmp101_;
		GtkLabel* _tmp102_;
		GtkLabel* _tmp103_;
		GtkComboBox* _tmp104_;
		GtkComboBox* _tmp105_;
		GtkComboBox* _tmp106_;
		GtkComboBox* _tmp107_;
		GtkBox* service_selector_layouter = NULL;
		GtkBox* _tmp108_;
		GtkBox* _tmp109_;
		GtkBox* _tmp110_;
		GtkBox* _tmp111_;
		GtkLabel* _tmp112_;
		GtkBox* _tmp113_;
		GtkComboBox* _tmp114_;
		GtkBox* service_area_layouter = NULL;
		GtkBox* _tmp115_;
		GtkBox* _tmp116_;
		GtkBox* _tmp117_;
		GtkBox* _tmp118_;
		GtkSeparator* _tmp119_;
		GtkSeparator* _tmp120_;
		GtkBox* _tmp121_;
		GtkBox* _tmp122_;
		GtkBox* _tmp123_;
		GtkBox* _tmp124_;
		GtkBox* _tmp125_;
		GtkBox* _tmp126_;
		_tmp98_ = label;
		_tmp99_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp98_);
		g_object_ref_sink (_tmp99_);
		service_selector_box_label = _tmp99_;
		_tmp100_ = service_selector_box_label;
		_tmp101_ = self->priv->service_selector_box;
		gtk_label_set_mnemonic_widget (_tmp100_, G_TYPE_CHECK_INSTANCE_CAST (_tmp101_, gtk_widget_get_type (), GtkWidget));
		_tmp102_ = service_selector_box_label;
		gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp102_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START);
		_tmp103_ = service_selector_box_label;
		gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp103_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER);
		_tmp104_ = self->priv->service_selector_box;
		gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp104_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_END);
		_tmp105_ = self->priv->service_selector_box;
		gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp105_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER);
		_tmp106_ = self->priv->service_selector_box;
		gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp106_, gtk_widget_get_type (), GtkWidget), FALSE);
		_tmp107_ = self->priv->service_selector_box;
		gtk_widget_set_vexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp107_, gtk_widget_get_type (), GtkWidget), FALSE);
		_tmp108_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
		g_object_ref_sink (_tmp108_);
		service_selector_layouter = _tmp108_;
		_tmp109_ = service_selector_layouter;
		gtk_container_set_border_width (G_TYPE_CHECK_INSTANCE_CAST (_tmp109_, gtk_container_get_type (), GtkContainer), (guint) 12);
		_tmp110_ = service_selector_layouter;
		gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp110_, gtk_widget_get_type (), GtkWidget), TRUE);
		_tmp111_ = service_selector_layouter;
		_tmp112_ = service_selector_box_label;
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp111_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp112_, gtk_widget_get_type (), GtkWidget));
		_tmp113_ = service_selector_layouter;
		_tmp114_ = self->priv->service_selector_box;
		gtk_box_pack_start (_tmp113_, G_TYPE_CHECK_INSTANCE_CAST (_tmp114_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
		_tmp115_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
		g_object_ref_sink (_tmp115_);
		service_area_layouter = _tmp115_;
		_tmp116_ = service_area_layouter;
		_tmp117_ = service_selector_layouter;
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp116_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp117_, gtk_widget_get_type (), GtkWidget));
		_tmp118_ = service_area_layouter;
		_tmp119_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_tmp119_);
		_tmp120_ = _tmp119_;
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp118_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp120_, gtk_widget_get_type (), GtkWidget));
		_g_object_unref0 (_tmp120_);
		_tmp121_ = service_area_layouter;
		gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp121_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_FILL);
		_tmp122_ = service_area_layouter;
		gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp122_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START);
		_tmp123_ = service_area_layouter;
		gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp123_, gtk_widget_get_type (), GtkWidget), TRUE);
		_tmp124_ = service_area_layouter;
		gtk_widget_set_vexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp124_, gtk_widget_get_type (), GtkWidget), FALSE);
		_tmp125_ = gtk_dialog_get_content_area (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
		_tmp126_ = service_area_layouter;
		gtk_box_pack_start (_tmp125_, G_TYPE_CHECK_INSTANCE_CAST (_tmp126_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
		_g_object_unref0 (service_area_layouter);
		_g_object_unref0 (service_selector_layouter);
		_g_object_unref0 (service_selector_box_label);
	}
	_tmp127_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp127_);
	_g_object_unref0 (self->priv->central_area_layouter);
	self->priv->central_area_layouter = _tmp127_;
	_tmp128_ = gtk_dialog_get_content_area (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
	_tmp129_ = self->priv->central_area_layouter;
	gtk_box_pack_start (_tmp128_, G_TYPE_CHECK_INSTANCE_CAST (_tmp129_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
	if (use_header) {
		GtkButton* _tmp130_;
		GtkButton* _tmp131_;
		GtkHeaderBar* _tmp132_;
		GtkButton* _tmp133_;
		GtkHeaderBar* _tmp134_;
		GtkComboBox* _tmp135_;
		_tmp130_ = (GtkButton*) gtk_button_new_with_mnemonic ("_Cancel");
		g_object_ref_sink (_tmp130_);
		_g_object_unref0 (self->priv->close_cancel_button);
		self->priv->close_cancel_button = _tmp130_;
		_tmp131_ = self->priv->close_cancel_button;
		gtk_widget_set_can_default (G_TYPE_CHECK_INSTANCE_CAST (_tmp131_, gtk_widget_get_type (), GtkWidget), TRUE);
		_tmp132_ = gtk_dialog_get_header_bar (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
		_tmp133_ = self->priv->close_cancel_button;
		gtk_header_bar_pack_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp132_, gtk_header_bar_get_type (), GtkHeaderBar), G_TYPE_CHECK_INSTANCE_CAST (_tmp133_, gtk_widget_get_type (), GtkWidget));
		_tmp134_ = gtk_dialog_get_header_bar (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
		_tmp135_ = self->priv->service_selector_box;
		gtk_header_bar_pack_end (G_TYPE_CHECK_INSTANCE_CAST (_tmp134_, gtk_header_bar_get_type (), GtkHeaderBar), G_TYPE_CHECK_INSTANCE_CAST (_tmp135_, gtk_widget_get_type (), GtkWidget));
	} else {
		GtkWidget* _tmp136_;
		GtkButton* _tmp137_;
		gtk_dialog_add_button (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), _ ("_Cancel"), (gint) GTK_RESPONSE_CANCEL);
		_tmp136_ = gtk_dialog_get_widget_for_response (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), (gint) GTK_RESPONSE_CANCEL);
		_tmp137_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp136_, gtk_button_get_type ()) ? ((GtkButton*) _tmp136_) : NULL);
		_g_object_unref0 (self->priv->close_cancel_button);
		self->priv->close_cancel_button = _tmp137_;
	}
	_tmp138_ = self->priv->close_cancel_button;
	g_signal_connect_object (_tmp138_, "clicked", (GCallback) _publishing_ui_publishing_dialog_on_close_cancel_clicked_gtk_button_clicked, self, 0);
	publishing_ui_publishing_dialog_set_standard_window_mode (self);
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	loaded_services = (_vala_array_free (loaded_services, loaded_services_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_free0 (last_used_service);
	_g_object_unref0 (renderer_text);
	_g_object_unref0 (renderer_pix);
	_g_free0 (label);
	_g_free0 (title);
	return self;
}

PublishingUIPublishingDialog*
publishing_ui_publishing_dialog_new (GeeCollection* to_publish)
{
	return publishing_ui_publishing_dialog_construct (PUBLISHING_UI_TYPE_PUBLISHING_DIALOG, to_publish);
}

static void
_vala_array_add56 (SpitPublishingService** * array,
                   gint* length,
                   gint* size,
                   SpitPublishingService* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (SpitPublishingService*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gint
__lambda19_ (void* a,
             void* b)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gint result;
	_tmp0_ = spit_pluggable_get_pluggable_name (G_TYPE_CHECK_INSTANCE_CAST (*((SpitPublishingService**) a), SPIT_TYPE_PLUGGABLE, SpitPluggable));
	_tmp1_ = spit_pluggable_get_pluggable_name (G_TYPE_CHECK_INSTANCE_CAST (*((SpitPublishingService**) b), SPIT_TYPE_PLUGGABLE, SpitPluggable));
	result = utf8_cs_compare (_tmp0_, _tmp1_);
	return result;
}

static gint
___lambda19____compar_fn_t (void* key1,
                            void* key2)
{
	gint result;
	result = __lambda19_ (key1, key2);
	return result;
}

static SpitPublishingService**
publishing_ui_publishing_dialog_load_all_services (gint* result_length1)
{
	SpitPublishingService** loaded_services = NULL;
	SpitPublishingService** _tmp0_;
	gint loaded_services_length1;
	gint _loaded_services_size_;
	GeeCollection* pluggables = NULL;
	GeeCollection* _tmp1_;
	GeeCollection* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	SpitPublishingService** _tmp20_;
	gint _tmp20__length1;
	SpitPublishingService** _tmp21_;
	gint _tmp21__length1;
	SpitPublishingService** _tmp22_;
	gint _tmp22__length1;
	SpitPublishingService** result;
	_tmp0_ = g_new0 (SpitPublishingService*, 0 + 1);
	loaded_services = _tmp0_;
	loaded_services_length1 = 0;
	_loaded_services_size_ = loaded_services_length1;
	_tmp1_ = plugins_get_pluggables_for_type (SPIT_PUBLISHING_TYPE_SERVICE, NULL, NULL, NULL, FALSE);
	pluggables = _tmp1_;
	_tmp2_ = pluggables;
	_tmp3_ = gee_collection_get_size (_tmp2_);
	_tmp4_ = _tmp3_;
	g_debug ("PublishingUI.vala:191: PublisingDialog: discovered %d pluggable publis" \
"hing services.", _tmp4_);
	{
		GeeIterator* _pluggable_it = NULL;
		GeeCollection* _tmp5_;
		GeeIterator* _tmp6_;
		_tmp5_ = pluggables;
		_tmp6_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ITERABLE, GeeIterable));
		_pluggable_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_;
			SpitPluggable* pluggable = NULL;
			GeeIterator* _tmp8_;
			gpointer _tmp9_;
			gint pluggable_interface = 0;
			SpitPluggable* _tmp10_;
			SpitPublishingService* service = NULL;
			SpitPluggable* _tmp14_;
			SpitPublishingService* _tmp15_;
			SpitPublishingService* _tmp16_;
			const gchar* _tmp17_;
			SpitPublishingService* _tmp18_;
			SpitPublishingService* _tmp19_;
			_tmp7_ = _pluggable_it;
			if (!gee_iterator_next (_tmp7_)) {
				break;
			}
			_tmp8_ = _pluggable_it;
			_tmp9_ = gee_iterator_get (_tmp8_);
			pluggable = (SpitPluggable*) _tmp9_;
			_tmp10_ = pluggable;
			pluggable_interface = spit_pluggable_get_pluggable_interface (_tmp10_, SPIT_PUBLISHING_CURRENT_INTERFACE, SPIT_PUBLISHING_CURRENT_INTERFACE);
			if (pluggable_interface != SPIT_PUBLISHING_CURRENT_INTERFACE) {
				SpitPluggable* _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				_tmp11_ = pluggable;
				_tmp12_ = plugins_get_pluggable_module_id (_tmp11_);
				_tmp13_ = _tmp12_;
				g_warning ("PublishingUI.vala:197: Unable to load publisher %s: reported interface" \
" %d.", _tmp13_, pluggable_interface);
				_g_free0 (_tmp13_);
				_g_object_unref0 (pluggable);
				continue;
			}
			_tmp14_ = pluggable;
			_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, SPIT_PUBLISHING_TYPE_SERVICE, SpitPublishingService));
			service = _tmp15_;
			_tmp16_ = service;
			_tmp17_ = spit_pluggable_get_pluggable_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
			g_debug ("PublishingUI.vala:206: PublishingDialog: discovered pluggable publishi" \
"ng service '%s'.", _tmp17_);
			_tmp18_ = service;
			_tmp19_ = _g_object_ref0 (_tmp18_);
			_vala_array_add56 (&loaded_services, &loaded_services_length1, &_loaded_services_size_, _tmp19_);
			_g_object_unref0 (service);
			_g_object_unref0 (pluggable);
		}
		_g_object_unref0 (_pluggable_it);
	}
	_tmp20_ = loaded_services;
	_tmp20__length1 = loaded_services_length1;
	_tmp21_ = loaded_services;
	_tmp21__length1 = loaded_services_length1;
	qsort (_tmp20_, (gsize) _tmp21__length1, (gsize) sizeof (SpitPublishingService*), ___lambda19____compar_fn_t);
	_tmp22_ = loaded_services;
	_tmp22__length1 = loaded_services_length1;
	if (result_length1) {
		*result_length1 = _tmp22__length1;
	}
	result = _tmp22_;
	_g_object_unref0 (pluggables);
	return result;
}

static void
_vala_array_add57 (SpitPublishingService** * array,
                   gint* length,
                   gint* size,
                   SpitPublishingService* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (SpitPublishingService*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add58 (SpitPublishingService** * array,
                   gint* length,
                   gint* size,
                   SpitPublishingService* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (SpitPublishingService*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add59 (SpitPublishingService** * array,
                   gint* length,
                   gint* size,
                   SpitPublishingService* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (SpitPublishingService*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static SpitPublishingService**
publishing_ui_publishing_dialog_load_services (gboolean has_photos,
                                               gboolean has_videos,
                                               gint* result_length1)
{
	gboolean _tmp0_ = FALSE;
	SpitPublishingService** filtered_services = NULL;
	SpitPublishingService** _tmp1_;
	gint filtered_services_length1;
	gint _filtered_services_size_;
	SpitPublishingService** all_services = NULL;
	gint _tmp2_ = 0;
	SpitPublishingService** _tmp3_;
	gint all_services_length1;
	gint _all_services_size_;
	SpitPublishingService** _tmp4_;
	gint _tmp4__length1;
	SpitPublishingService** _tmp19_;
	gint _tmp19__length1;
	SpitPublishingService** result;
	if (has_photos) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = has_videos;
	}
	_vala_assert (_tmp0_, "has_photos || has_videos");
	_tmp1_ = g_new0 (SpitPublishingService*, 0 + 1);
	filtered_services = _tmp1_;
	filtered_services_length1 = 0;
	_filtered_services_size_ = filtered_services_length1;
	_tmp3_ = publishing_ui_publishing_dialog_load_all_services (&_tmp2_);
	all_services = _tmp3_;
	all_services_length1 = _tmp2_;
	_all_services_size_ = all_services_length1;
	_tmp4_ = all_services;
	_tmp4__length1 = all_services_length1;
	{
		SpitPublishingService** service_collection = NULL;
		gint service_collection_length1 = 0;
		gint _service_collection_size_ = 0;
		gint service_it = 0;
		service_collection = _tmp4_;
		service_collection_length1 = _tmp4__length1;
		for (service_it = 0; service_it < service_collection_length1; service_it = service_it + 1) {
			SpitPublishingService* _tmp5_;
			SpitPublishingService* service = NULL;
			_tmp5_ = _g_object_ref0 (service_collection[service_it]);
			service = _tmp5_;
			{
				gboolean _tmp6_ = FALSE;
				if (has_photos) {
					_tmp6_ = !has_videos;
				} else {
					_tmp6_ = FALSE;
				}
				if (_tmp6_) {
					SpitPublishingService* _tmp7_;
					_tmp7_ = service;
					if ((spit_publishing_service_get_supported_media (_tmp7_) & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) != 0) {
						SpitPublishingService* _tmp8_;
						SpitPublishingService* _tmp9_;
						_tmp8_ = service;
						_tmp9_ = _g_object_ref0 (_tmp8_);
						_vala_array_add57 (&filtered_services, &filtered_services_length1, &_filtered_services_size_, _tmp9_);
					}
				} else {
					gboolean _tmp10_ = FALSE;
					if (!has_photos) {
						_tmp10_ = has_videos;
					} else {
						_tmp10_ = FALSE;
					}
					if (_tmp10_) {
						SpitPublishingService* _tmp11_;
						_tmp11_ = service;
						if ((spit_publishing_service_get_supported_media (_tmp11_) & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) != 0) {
							SpitPublishingService* _tmp12_;
							SpitPublishingService* _tmp13_;
							_tmp12_ = service;
							_tmp13_ = _g_object_ref0 (_tmp12_);
							_vala_array_add58 (&filtered_services, &filtered_services_length1, &_filtered_services_size_, _tmp13_);
						}
					} else {
						gboolean _tmp14_ = FALSE;
						SpitPublishingService* _tmp15_;
						_tmp15_ = service;
						if ((spit_publishing_service_get_supported_media (_tmp15_) & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) != 0) {
							SpitPublishingService* _tmp16_;
							_tmp16_ = service;
							_tmp14_ = (spit_publishing_service_get_supported_media (_tmp16_) & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) != 0;
						} else {
							_tmp14_ = FALSE;
						}
						if (_tmp14_) {
							SpitPublishingService* _tmp17_;
							SpitPublishingService* _tmp18_;
							_tmp17_ = service;
							_tmp18_ = _g_object_ref0 (_tmp17_);
							_vala_array_add59 (&filtered_services, &filtered_services_length1, &_filtered_services_size_, _tmp18_);
						}
					}
				}
				_g_object_unref0 (service);
			}
		}
	}
	_tmp19_ = filtered_services;
	_tmp19__length1 = filtered_services_length1;
	if (result_length1) {
		*result_length1 = _tmp19__length1;
	}
	result = _tmp19_;
	all_services = (_vala_array_free (all_services, all_services_length1, (GDestroyNotify) g_object_unref), NULL);
	return result;
}

void
publishing_ui_publishing_dialog_go (GeeCollection* to_publish)
{
	PublishingUIPublishingDialog* _tmp0_;
	GTimer* _tmp1_;
	GeeArrayList* photos = NULL;
	GeeArrayList* _tmp7_;
	GeeArrayList* videos = NULL;
	GeeArrayList* _tmp8_;
	GeeArrayList* _tmp9_;
	GeeArrayList* _tmp10_;
	SpitPublishingService** avail_services = NULL;
	GeeArrayList* _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	GeeArrayList* _tmp14_;
	gint _tmp15_;
	gint _tmp16_;
	gint _tmp17_ = 0;
	SpitPublishingService** _tmp18_;
	gint avail_services_length1;
	gint _avail_services_size_;
	SpitPublishingService** _tmp19_;
	gint _tmp19__length1;
	PublishingUIPublishingDialog* _tmp22_;
	PublishingUIPublishingDialog* _tmp23_;
	GTimer* _tmp24_;
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (to_publish, GEE_TYPE_COLLECTION));
	_tmp0_ = publishing_ui_publishing_dialog_active_instance;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = publishing_ui_publishing_dialog_since_last_start;
	if (_tmp1_ == NULL) {
		GTimer* _tmp2_;
		GTimer* _tmp3_;
		GTimer* _tmp4_;
		_tmp2_ = g_timer_new ();
		_g_timer_destroy0 (publishing_ui_publishing_dialog_since_last_start);
		publishing_ui_publishing_dialog_since_last_start = _tmp2_;
		_tmp3_ = publishing_ui_publishing_dialog_since_last_start;
		g_timer_stop (_tmp3_);
		_tmp4_ = publishing_ui_publishing_dialog_since_last_start;
		g_timer_reset (_tmp4_);
		publishing_ui_publishing_dialog_elapsed_is_valid = FALSE;
	} else {
		gdouble elapsed = 0.0;
		GTimer* _tmp5_;
		gboolean _tmp6_ = FALSE;
		_tmp5_ = publishing_ui_publishing_dialog_since_last_start;
		elapsed = g_timer_elapsed (_tmp5_, NULL);
		if (elapsed < 0.05) {
			_tmp6_ = publishing_ui_publishing_dialog_elapsed_is_valid;
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			return;
		}
	}
	_tmp7_ = gee_array_list_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	photos = _tmp7_;
	_tmp8_ = gee_array_list_new (TYPE_VIDEO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	videos = _tmp8_;
	_tmp9_ = photos;
	_tmp10_ = videos;
	media_source_collection_filter_media (to_publish, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection));
	_tmp11_ = photos;
	_tmp12_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
	_tmp13_ = _tmp12_;
	_tmp14_ = videos;
	_tmp15_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
	_tmp16_ = _tmp15_;
	_tmp18_ = publishing_ui_publishing_dialog_load_services (_tmp13_ > 0, _tmp16_ > 0, &_tmp17_);
	avail_services = _tmp18_;
	avail_services_length1 = _tmp17_;
	_avail_services_size_ = avail_services_length1;
	_tmp19_ = avail_services;
	_tmp19__length1 = avail_services_length1;
	if (_tmp19__length1 == 0) {
		gchar* _tmp20_;
		gchar* _tmp21_;
		_tmp20_ = g_strdup_printf (_ ("Shotwell cannot publish the selected items because you do not have a c" \
"ompatible publishing plugin enabled. To correct this, choose Edit %s P" \
"references and enable one or more of the publishing plugins on the <b>" \
"Plugins</b> tab."), "▸");
		_tmp21_ = _tmp20_;
		app_window_error_message_with_title (_ ("Unable to publish"), _tmp21_, NULL, FALSE);
		_g_free0 (_tmp21_);
		avail_services = (_vala_array_free (avail_services, avail_services_length1, (GDestroyNotify) g_object_unref), NULL);
		_g_object_unref0 (videos);
		_g_object_unref0 (photos);
		return;
	}
	g_debug ("PublishingUI.vala:295: PublishingDialog.go( )");
	_tmp22_ = publishing_ui_publishing_dialog_new (to_publish);
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (publishing_ui_publishing_dialog_active_instance);
	publishing_ui_publishing_dialog_active_instance = _tmp22_;
	_tmp23_ = publishing_ui_publishing_dialog_active_instance;
	publishing_ui_publishing_dialog_run (_tmp23_);
	_g_object_unref0 (publishing_ui_publishing_dialog_active_instance);
	publishing_ui_publishing_dialog_active_instance = NULL;
	_tmp24_ = publishing_ui_publishing_dialog_since_last_start;
	g_timer_start (_tmp24_);
	publishing_ui_publishing_dialog_elapsed_is_valid = TRUE;
	avail_services = (_vala_array_free (avail_services, avail_services_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (videos);
	_g_object_unref0 (photos);
}

static gboolean
publishing_ui_publishing_dialog_on_window_close (PublishingUIPublishingDialog* self,
                                                 GdkEventAny* evt)
{
	SpitPublishingConcretePublishingHost* _tmp0_;
	gboolean result;
	g_return_val_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self), FALSE);
	g_return_val_if_fail (evt != NULL, FALSE);
	_tmp0_ = self->priv->host;
	spit_publishing_plugin_host_stop_publishing (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_PUBLISHING_TYPE_PLUGIN_HOST, SpitPublishingPluginHost));
	_g_object_unref0 (self->priv->host);
	self->priv->host = NULL;
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	result = TRUE;
	return result;
}

static void
publishing_ui_publishing_dialog_on_service_changed (PublishingUIPublishingDialog* self)
{
	GtkTreeIter iter = {0};
	gboolean have_active_iter = FALSE;
	GtkComboBox* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_;
	GValue service_name_val = {0};
	GValue account_val = {0};
	GtkListStore* _tmp6_;
	GtkTreeIter _tmp7_;
	GValue _tmp8_ = {0};
	GtkListStore* _tmp9_;
	GtkTreeIter _tmp10_;
	GValue _tmp11_ = {0};
	gchar* service_name = NULL;
	GValue _tmp12_;
	gchar* _tmp13_;
	SpitPublishingAccount* service_account = NULL;
	GValue _tmp14_;
	SpitPublishingAccount* _tmp15_;
	SpitPublishingService* selected_service = NULL;
	SpitPublishingService** services = NULL;
	gint _tmp16_ = 0;
	SpitPublishingService** _tmp17_;
	gint services_length1;
	gint _services_size_;
	SpitPublishingService** _tmp18_;
	gint _tmp18__length1;
	SpitPublishingService* _tmp25_;
	ConfigFacade* _tmp26_;
	ConfigFacade* _tmp27_;
	SpitPublishingService* _tmp28_;
	const gchar* _tmp29_;
	SpitPublishingService* _tmp30_;
	SpitPublishingPublishable** _tmp31_;
	gint _tmp31__length1;
	SpitPublishingAccount* _tmp32_;
	SpitPublishingConcretePublishingHost* _tmp33_;
	SpitPublishingConcretePublishingHost* _tmp34_;
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	have_active_iter = FALSE;
	_tmp0_ = self->priv->service_selector_box;
	_tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_);
	iter = _tmp1_;
	have_active_iter = _tmp2_;
	if (!have_active_iter) {
		GtkComboBox* _tmp3_;
		GtkComboBox* _tmp4_;
		GtkTreeIter _tmp5_ = {0};
		_tmp3_ = self->priv->service_selector_box;
		gtk_combo_box_set_active (_tmp3_, 0);
		_tmp4_ = self->priv->service_selector_box;
		gtk_combo_box_get_active_iter (_tmp4_, &_tmp5_);
		iter = _tmp5_;
	}
	_tmp6_ = self->priv->service_selector_box_model;
	_tmp7_ = iter;
	gtk_tree_model_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_tree_model_get_type (), GtkTreeModel), &_tmp7_, 1, &_tmp8_);
	G_IS_VALUE (&service_name_val) ? (g_value_unset (&service_name_val), NULL) : NULL;
	service_name_val = _tmp8_;
	_tmp9_ = self->priv->service_selector_box_model;
	_tmp10_ = iter;
	gtk_tree_model_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_tree_model_get_type (), GtkTreeModel), &_tmp10_, 2, &_tmp11_);
	G_IS_VALUE (&account_val) ? (g_value_unset (&account_val), NULL) : NULL;
	account_val = _tmp11_;
	_tmp12_ = service_name_val;
	_tmp13_ = g_strdup (g_value_get_string (&_tmp12_));
	service_name = _tmp13_;
	_tmp14_ = account_val;
	_tmp15_ = _g_object_ref0 (g_value_get_object (&_tmp14_));
	service_account = _tmp15_;
	selected_service = NULL;
	_tmp17_ = publishing_ui_publishing_dialog_load_all_services (&_tmp16_);
	services = _tmp17_;
	services_length1 = _tmp16_;
	_services_size_ = services_length1;
	_tmp18_ = services;
	_tmp18__length1 = services_length1;
	{
		SpitPublishingService** service_collection = NULL;
		gint service_collection_length1 = 0;
		gint _service_collection_size_ = 0;
		gint service_it = 0;
		service_collection = _tmp18_;
		service_collection_length1 = _tmp18__length1;
		for (service_it = 0; service_it < service_collection_length1; service_it = service_it + 1) {
			SpitPublishingService* _tmp19_;
			SpitPublishingService* service = NULL;
			_tmp19_ = _g_object_ref0 (service_collection[service_it]);
			service = _tmp19_;
			{
				const gchar* _tmp20_;
				SpitPublishingService* _tmp21_;
				const gchar* _tmp22_;
				_tmp20_ = service_name;
				_tmp21_ = service;
				_tmp22_ = spit_pluggable_get_pluggable_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
				if (g_str_has_prefix (_tmp20_, _tmp22_)) {
					SpitPublishingService* _tmp23_;
					SpitPublishingService* _tmp24_;
					_tmp23_ = service;
					_tmp24_ = _g_object_ref0 (_tmp23_);
					_g_object_unref0 (selected_service);
					selected_service = _tmp24_;
					_g_object_unref0 (service);
					break;
				}
				_g_object_unref0 (service);
			}
		}
	}
	_tmp25_ = selected_service;
	_vala_assert (_tmp25_ != NULL, "selected_service != null");
	_tmp26_ = config_facade_get_instance ();
	_tmp27_ = _tmp26_;
	_tmp28_ = selected_service;
	_tmp29_ = spit_pluggable_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
	configuration_facade_set_last_used_service (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp29_);
	_g_object_unref0 (_tmp27_);
	_tmp30_ = selected_service;
	_tmp31_ = self->priv->publishables;
	_tmp31__length1 = self->priv->publishables_length1;
	_tmp32_ = service_account;
	_tmp33_ = spit_publishing_concrete_publishing_host_new (_tmp30_, self, _tmp31_, _tmp31__length1, _tmp32_);
	_g_object_unref0 (self->priv->host);
	self->priv->host = _tmp33_;
	_tmp34_ = self->priv->host;
	spit_publishing_concrete_publishing_host_start_publishing (_tmp34_);
	services = (_vala_array_free (services, services_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (selected_service);
	_g_object_unref0 (service_account);
	_g_free0 (service_name);
	G_IS_VALUE (&account_val) ? (g_value_unset (&account_val), NULL) : NULL;
	G_IS_VALUE (&service_name_val) ? (g_value_unset (&service_name_val), NULL) : NULL;
}

static void
publishing_ui_publishing_dialog_on_close_cancel_clicked (PublishingUIPublishingDialog* self)
{
	SpitPublishingConcretePublishingHost* _tmp0_;
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	g_debug ("PublishingUI.vala:356: PublishingDialog: on_close_cancel_clicked( ): i" \
"nvoked.");
	_tmp0_ = self->priv->host;
	spit_publishing_plugin_host_stop_publishing (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_PUBLISHING_TYPE_PLUGIN_HOST, SpitPublishingPluginHost));
	_g_object_unref0 (self->priv->host);
	self->priv->host = NULL;
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
}

static void
publishing_ui_publishing_dialog_set_large_window_mode (PublishingUIPublishingDialog* self)
{
	GtkBox* _tmp0_;
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), PUBLISHING_UI_PUBLISHING_DIALOG_LARGE_WINDOW_WIDTH, PUBLISHING_UI_PUBLISHING_DIALOG_LARGE_WINDOW_HEIGHT);
	_tmp0_ = self->priv->central_area_layouter;
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), PUBLISHING_UI_PUBLISHING_DIALOG_LARGE_WINDOW_WIDTH - PUBLISHING_UI_PUBLISHING_DIALOG_BORDER_REGION_WIDTH, PUBLISHING_UI_PUBLISHING_DIALOG_LARGE_WINDOW_HEIGHT - PUBLISHING_UI_PUBLISHING_DIALOG_BORDER_REGION_HEIGHT);
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
}

static void
publishing_ui_publishing_dialog_set_colossal_window_mode (PublishingUIPublishingDialog* self)
{
	GtkBox* _tmp0_;
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), PUBLISHING_UI_PUBLISHING_DIALOG_COLOSSAL_WINDOW_WIDTH, PUBLISHING_UI_PUBLISHING_DIALOG_COLOSSAL_WINDOW_HEIGHT);
	_tmp0_ = self->priv->central_area_layouter;
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), PUBLISHING_UI_PUBLISHING_DIALOG_COLOSSAL_WINDOW_WIDTH - PUBLISHING_UI_PUBLISHING_DIALOG_BORDER_REGION_WIDTH, PUBLISHING_UI_PUBLISHING_DIALOG_COLOSSAL_WINDOW_HEIGHT - PUBLISHING_UI_PUBLISHING_DIALOG_BORDER_REGION_HEIGHT);
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
}

static void
publishing_ui_publishing_dialog_set_standard_window_mode (PublishingUIPublishingDialog* self)
{
	GtkBox* _tmp0_;
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), PUBLISHING_UI_PUBLISHING_DIALOG_STANDARD_WINDOW_WIDTH, PUBLISHING_UI_PUBLISHING_DIALOG_STANDARD_WINDOW_HEIGHT);
	_tmp0_ = self->priv->central_area_layouter;
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), PUBLISHING_UI_PUBLISHING_DIALOG_STANDARD_WINDOW_WIDTH - PUBLISHING_UI_PUBLISHING_DIALOG_BORDER_REGION_WIDTH, PUBLISHING_UI_PUBLISHING_DIALOG_STANDARD_WINDOW_HEIGHT - PUBLISHING_UI_PUBLISHING_DIALOG_BORDER_REGION_HEIGHT);
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
}

static void
publishing_ui_publishing_dialog_set_free_sizable_window_mode (PublishingUIPublishingDialog* self)
{
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), TRUE);
}

static void
publishing_ui_publishing_dialog_clear_free_sizable_window_mode (PublishingUIPublishingDialog* self)
{
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
}

SpitPublishingDialogPane*
publishing_ui_publishing_dialog_get_active_pane (PublishingUIPublishingDialog* self)
{
	SpitPublishingDialogPane* _tmp0_;
	SpitPublishingDialogPane* _tmp1_;
	SpitPublishingDialogPane* result;
	g_return_val_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self), NULL);
	_tmp0_ = self->priv->active_pane;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

void
publishing_ui_publishing_dialog_set_close_button_mode (PublishingUIPublishingDialog* self)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	_tmp0_ = self->priv->close_cancel_button;
	gtk_button_set_label (_tmp0_, _ ("_Close"));
	_tmp1_ = self->priv->close_cancel_button;
	gtk_window_set_default (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget));
}

void
publishing_ui_publishing_dialog_set_cancel_button_mode (PublishingUIPublishingDialog* self)
{
	GtkButton* _tmp0_;
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	_tmp0_ = self->priv->close_cancel_button;
	gtk_button_set_label (_tmp0_, _ ("_Cancel"));
	gtk_window_set_default (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), NULL);
}

void
publishing_ui_publishing_dialog_lock_service (PublishingUIPublishingDialog* self)
{
	GtkComboBox* _tmp0_;
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	_tmp0_ = self->priv->service_selector_box;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), FALSE);
}

void
publishing_ui_publishing_dialog_unlock_service (PublishingUIPublishingDialog* self)
{
	GtkComboBox* _tmp0_;
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	_tmp0_ = self->priv->service_selector_box;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), TRUE);
}

void
publishing_ui_publishing_dialog_install_pane (PublishingUIPublishingDialog* self,
                                              SpitPublishingDialogPane* pane)
{
	SpitPublishingDialogPane* _tmp0_;
	GtkBox* _tmp6_;
	GtkWidget* _tmp7_;
	GtkWidget* _tmp8_;
	SpitPublishingDialogPaneGeometryOptions geometry_options = 0;
	SpitPublishingDialogPane* _tmp9_;
	g_return_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE));
	g_debug ("PublishingUI.vala:416: PublishingDialog: install_pane( ): invoked.");
	_tmp0_ = self->priv->active_pane;
	if (_tmp0_ != NULL) {
		SpitPublishingDialogPane* _tmp1_;
		GtkBox* _tmp2_;
		SpitPublishingDialogPane* _tmp3_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp5_;
		g_debug ("PublishingUI.vala:419: PublishingDialog: install_pane( ): a pane is al" \
"ready installed; removing it.");
		_tmp1_ = self->priv->active_pane;
		spit_publishing_dialog_pane_on_pane_uninstalled (_tmp1_);
		_tmp2_ = self->priv->central_area_layouter;
		_tmp3_ = self->priv->active_pane;
		_tmp4_ = spit_publishing_dialog_pane_get_widget (_tmp3_);
		_tmp5_ = _tmp4_;
		gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_container_get_type (), GtkContainer), _tmp5_);
		_g_object_unref0 (_tmp5_);
	}
	_tmp6_ = self->priv->central_area_layouter;
	_tmp7_ = spit_publishing_dialog_pane_get_widget (pane);
	_tmp8_ = _tmp7_;
	gtk_box_pack_start (_tmp6_, _tmp8_, TRUE, TRUE, (guint) 0);
	_g_object_unref0 (_tmp8_);
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	geometry_options = spit_publishing_dialog_pane_get_preferred_geometry (pane);
	if ((geometry_options & SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_EXTENDED_SIZE) != 0) {
		publishing_ui_publishing_dialog_set_large_window_mode (self);
	} else {
		if ((geometry_options & SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_COLOSSAL_SIZE) != 0) {
			publishing_ui_publishing_dialog_set_colossal_window_mode (self);
		} else {
			publishing_ui_publishing_dialog_set_standard_window_mode (self);
		}
	}
	if ((geometry_options & SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_RESIZABLE) != 0) {
		publishing_ui_publishing_dialog_set_free_sizable_window_mode (self);
	} else {
		publishing_ui_publishing_dialog_clear_free_sizable_window_mode (self);
	}
	_tmp9_ = _g_object_ref0 (pane);
	_g_object_unref0 (self->priv->active_pane);
	self->priv->active_pane = _tmp9_;
	spit_publishing_dialog_pane_on_pane_installed (pane);
}

gint
publishing_ui_publishing_dialog_run (PublishingUIPublishingDialog* self)
{
	gint _result_ = 0;
	gint result;
	g_return_val_if_fail (PUBLISHING_UI_IS_PUBLISHING_DIALOG (self), -1);
	publishing_ui_publishing_dialog_on_service_changed (self);
	_result_ = gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
	_g_object_unref0 (self->priv->host);
	self->priv->host = NULL;
	result = _result_;
	return result;
}

static void
publishing_ui_publishing_dialog_class_init (PublishingUIPublishingDialogClass * klass,
                                            gpointer klass_data)
{
	publishing_ui_publishing_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PublishingUIPublishingDialog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = publishing_ui_publishing_dialog_finalize;
}

static void
publishing_ui_publishing_dialog_instance_init (PublishingUIPublishingDialog * self,
                                               gpointer klass)
{
	self->priv = publishing_ui_publishing_dialog_get_instance_private (self);
}

static void
publishing_ui_publishing_dialog_finalize (GObject * obj)
{
	PublishingUIPublishingDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_UI_TYPE_PUBLISHING_DIALOG, PublishingUIPublishingDialog);
	_g_object_unref0 (self->priv->service_selector_box_model);
	_g_object_unref0 (self->priv->service_selector_box);
	_g_object_unref0 (self->priv->central_area_layouter);
	_g_object_unref0 (self->priv->close_cancel_button);
	_g_object_unref0 (self->priv->active_pane);
	self->priv->publishables = (_vala_array_free (self->priv->publishables, self->priv->publishables_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (self->priv->host);
	_g_object_unref0 (self->priv->info);
	G_OBJECT_CLASS (publishing_ui_publishing_dialog_parent_class)->finalize (obj);
}

static GType
publishing_ui_publishing_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PublishingUIPublishingDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_ui_publishing_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingUIPublishingDialog), 0, (GInstanceInitFunc) publishing_ui_publishing_dialog_instance_init, NULL };
	GType publishing_ui_publishing_dialog_type_id;
	publishing_ui_publishing_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "PublishingUIPublishingDialog", &g_define_type_info, 0);
	PublishingUIPublishingDialog_private_offset = g_type_add_instance_private (publishing_ui_publishing_dialog_type_id, sizeof (PublishingUIPublishingDialogPrivate));
	return publishing_ui_publishing_dialog_type_id;
}

GType
publishing_ui_publishing_dialog_get_type (void)
{
	static volatile gsize publishing_ui_publishing_dialog_type_id__once = 0;
	if (g_once_init_enter (&publishing_ui_publishing_dialog_type_id__once)) {
		GType publishing_ui_publishing_dialog_type_id;
		publishing_ui_publishing_dialog_type_id = publishing_ui_publishing_dialog_get_type_once ();
		g_once_init_leave (&publishing_ui_publishing_dialog_type_id__once, publishing_ui_publishing_dialog_type_id);
	}
	return publishing_ui_publishing_dialog_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);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

