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

/*
 * Copyright 2025 elementary, Inc. <https://elementary.io>
 * SPDX-License-Identifier: GPL-3.0-or-later
*
* Authored by: Jeremy Wootten <jeremywootten@gmail.com>
*/

#include <glib-object.h>
#include <gtk/gtk.h>
#include <libgit2-glib/ggit.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <granite.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>

#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

typedef enum  {
	SCRATCH_BRANCH_ACTION_CHECKOUT,
	SCRATCH_BRANCH_ACTION_COMMIT,
	SCRATCH_BRANCH_ACTION_PUSH,
	SCRATCH_BRANCH_ACTION_PULL,
	SCRATCH_BRANCH_ACTION_MERGE,
	SCRATCH_BRANCH_ACTION_DELETE,
	SCRATCH_BRANCH_ACTION_CREATE
} ScratchBranchAction;

#define SCRATCH_TYPE_BRANCH_ACTION (scratch_branch_action_get_type ())

#define SCRATCH_TYPE_BRANCH_ACTION_PAGE (scratch_branch_action_page_get_type ())
#define SCRATCH_BRANCH_ACTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCRATCH_TYPE_BRANCH_ACTION_PAGE, ScratchBranchActionPage))
#define SCRATCH_IS_BRANCH_ACTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCRATCH_TYPE_BRANCH_ACTION_PAGE))
#define SCRATCH_BRANCH_ACTION_PAGE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SCRATCH_TYPE_BRANCH_ACTION_PAGE, ScratchBranchActionPageIface))

typedef struct _ScratchBranchActionPage ScratchBranchActionPage;
typedef struct _ScratchBranchActionPageIface ScratchBranchActionPageIface;

#define SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG (scratch_dialogs_branch_action_dialog_get_type ())
#define SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG, ScratchDialogsBranchActionDialog))
#define SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG, ScratchDialogsBranchActionDialogClass))
#define SCRATCH_DIALOGS_IS_BRANCH_ACTION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG))
#define SCRATCH_DIALOGS_IS_BRANCH_ACTION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG))
#define SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG, ScratchDialogsBranchActionDialogClass))

typedef struct _ScratchDialogsBranchActionDialog ScratchDialogsBranchActionDialog;
typedef struct _ScratchDialogsBranchActionDialogClass ScratchDialogsBranchActionDialogClass;
typedef struct _ScratchDialogsBranchActionDialogPrivate ScratchDialogsBranchActionDialogPrivate;

#define CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM (code_widgets_source_list_item_get_type ())
#define CODE_WIDGETS_SOURCE_LIST_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM, CodeWidgetsSourceListItem))
#define CODE_WIDGETS_SOURCE_LIST_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM, CodeWidgetsSourceListItemClass))
#define CODE_WIDGETS_SOURCE_LIST_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM))
#define CODE_WIDGETS_SOURCE_LIST_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM))
#define CODE_WIDGETS_SOURCE_LIST_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM, CodeWidgetsSourceListItemClass))

typedef struct _CodeWidgetsSourceListItem CodeWidgetsSourceListItem;
typedef struct _CodeWidgetsSourceListItemClass CodeWidgetsSourceListItemClass;

#define CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM (code_widgets_source_list_expandable_item_get_type ())
#define CODE_WIDGETS_SOURCE_LIST_EXPANDABLE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM, CodeWidgetsSourceListExpandableItem))
#define CODE_WIDGETS_SOURCE_LIST_EXPANDABLE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM, CodeWidgetsSourceListExpandableItemClass))
#define CODE_WIDGETS_SOURCE_LIST_IS_EXPANDABLE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM))
#define CODE_WIDGETS_SOURCE_LIST_IS_EXPANDABLE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM))
#define CODE_WIDGETS_SOURCE_LIST_EXPANDABLE_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM, CodeWidgetsSourceListExpandableItemClass))

typedef struct _CodeWidgetsSourceListExpandableItem CodeWidgetsSourceListExpandableItem;
typedef struct _CodeWidgetsSourceListExpandableItemClass CodeWidgetsSourceListExpandableItemClass;

#define SCRATCH_FOLDER_MANAGER_TYPE_ITEM (scratch_folder_manager_item_get_type ())
#define SCRATCH_FOLDER_MANAGER_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCRATCH_FOLDER_MANAGER_TYPE_ITEM, ScratchFolderManagerItem))
#define SCRATCH_FOLDER_MANAGER_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCRATCH_FOLDER_MANAGER_TYPE_ITEM, ScratchFolderManagerItemClass))
#define SCRATCH_FOLDER_MANAGER_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCRATCH_FOLDER_MANAGER_TYPE_ITEM))
#define SCRATCH_FOLDER_MANAGER_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCRATCH_FOLDER_MANAGER_TYPE_ITEM))
#define SCRATCH_FOLDER_MANAGER_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SCRATCH_FOLDER_MANAGER_TYPE_ITEM, ScratchFolderManagerItemClass))

typedef struct _ScratchFolderManagerItem ScratchFolderManagerItem;
typedef struct _ScratchFolderManagerItemClass ScratchFolderManagerItemClass;

#define SCRATCH_FOLDER_MANAGER_TYPE_FOLDER_ITEM (scratch_folder_manager_folder_item_get_type ())
#define SCRATCH_FOLDER_MANAGER_FOLDER_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCRATCH_FOLDER_MANAGER_TYPE_FOLDER_ITEM, ScratchFolderManagerFolderItem))
#define SCRATCH_FOLDER_MANAGER_FOLDER_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCRATCH_FOLDER_MANAGER_TYPE_FOLDER_ITEM, ScratchFolderManagerFolderItemClass))
#define SCRATCH_FOLDER_MANAGER_IS_FOLDER_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCRATCH_FOLDER_MANAGER_TYPE_FOLDER_ITEM))
#define SCRATCH_FOLDER_MANAGER_IS_FOLDER_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCRATCH_FOLDER_MANAGER_TYPE_FOLDER_ITEM))
#define SCRATCH_FOLDER_MANAGER_FOLDER_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SCRATCH_FOLDER_MANAGER_TYPE_FOLDER_ITEM, ScratchFolderManagerFolderItemClass))

typedef struct _ScratchFolderManagerFolderItem ScratchFolderManagerFolderItem;
typedef struct _ScratchFolderManagerFolderItemClass ScratchFolderManagerFolderItemClass;

#define SCRATCH_FOLDER_MANAGER_TYPE_PROJECT_FOLDER_ITEM (scratch_folder_manager_project_folder_item_get_type ())
#define SCRATCH_FOLDER_MANAGER_PROJECT_FOLDER_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCRATCH_FOLDER_MANAGER_TYPE_PROJECT_FOLDER_ITEM, ScratchFolderManagerProjectFolderItem))
#define SCRATCH_FOLDER_MANAGER_PROJECT_FOLDER_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCRATCH_FOLDER_MANAGER_TYPE_PROJECT_FOLDER_ITEM, ScratchFolderManagerProjectFolderItemClass))
#define SCRATCH_FOLDER_MANAGER_IS_PROJECT_FOLDER_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCRATCH_FOLDER_MANAGER_TYPE_PROJECT_FOLDER_ITEM))
#define SCRATCH_FOLDER_MANAGER_IS_PROJECT_FOLDER_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCRATCH_FOLDER_MANAGER_TYPE_PROJECT_FOLDER_ITEM))
#define SCRATCH_FOLDER_MANAGER_PROJECT_FOLDER_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SCRATCH_FOLDER_MANAGER_TYPE_PROJECT_FOLDER_ITEM, ScratchFolderManagerProjectFolderItemClass))

typedef struct _ScratchFolderManagerProjectFolderItem ScratchFolderManagerProjectFolderItem;
typedef struct _ScratchFolderManagerProjectFolderItemClass ScratchFolderManagerProjectFolderItemClass;
enum  {
	SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_0_PROPERTY,
	SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_ACTION_PROPERTY,
	SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_BRANCH_REF_PROPERTY,
	SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_NEW_BRANCH_NAME_PROPERTY,
	SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_CAN_APPLY_PROPERTY,
	SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_PROJECT_PROPERTY,
	SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_NUM_PROPERTIES
};
static GParamSpec* scratch_dialogs_branch_action_dialog_properties[SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define SCRATCH_FOLDER_MANAGER_TYPE_FILE (scratch_folder_manager_file_get_type ())
#define SCRATCH_FOLDER_MANAGER_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCRATCH_FOLDER_MANAGER_TYPE_FILE, ScratchFolderManagerFile))
#define SCRATCH_FOLDER_MANAGER_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCRATCH_FOLDER_MANAGER_TYPE_FILE, ScratchFolderManagerFileClass))
#define SCRATCH_FOLDER_MANAGER_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCRATCH_FOLDER_MANAGER_TYPE_FILE))
#define SCRATCH_FOLDER_MANAGER_IS_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCRATCH_FOLDER_MANAGER_TYPE_FILE))
#define SCRATCH_FOLDER_MANAGER_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SCRATCH_FOLDER_MANAGER_TYPE_FILE, ScratchFolderManagerFileClass))

typedef struct _ScratchFolderManagerFile ScratchFolderManagerFile;
typedef struct _ScratchFolderManagerFileClass ScratchFolderManagerFileClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define SCRATCH_DIALOGS_TYPE_BRANCH_CHECKOUT_PAGE (scratch_dialogs_branch_checkout_page_get_type ())
#define SCRATCH_DIALOGS_BRANCH_CHECKOUT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCRATCH_DIALOGS_TYPE_BRANCH_CHECKOUT_PAGE, ScratchDialogsBranchCheckoutPage))
#define SCRATCH_DIALOGS_BRANCH_CHECKOUT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCRATCH_DIALOGS_TYPE_BRANCH_CHECKOUT_PAGE, ScratchDialogsBranchCheckoutPageClass))
#define SCRATCH_DIALOGS_IS_BRANCH_CHECKOUT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCRATCH_DIALOGS_TYPE_BRANCH_CHECKOUT_PAGE))
#define SCRATCH_DIALOGS_IS_BRANCH_CHECKOUT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCRATCH_DIALOGS_TYPE_BRANCH_CHECKOUT_PAGE))
#define SCRATCH_DIALOGS_BRANCH_CHECKOUT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SCRATCH_DIALOGS_TYPE_BRANCH_CHECKOUT_PAGE, ScratchDialogsBranchCheckoutPageClass))

typedef struct _ScratchDialogsBranchCheckoutPage ScratchDialogsBranchCheckoutPage;
typedef struct _ScratchDialogsBranchCheckoutPageClass ScratchDialogsBranchCheckoutPageClass;

#define SCRATCH_DIALOGS_TYPE_BRANCH_CREATE_PAGE (scratch_dialogs_branch_create_page_get_type ())
#define SCRATCH_DIALOGS_BRANCH_CREATE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCRATCH_DIALOGS_TYPE_BRANCH_CREATE_PAGE, ScratchDialogsBranchCreatePage))
#define SCRATCH_DIALOGS_BRANCH_CREATE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCRATCH_DIALOGS_TYPE_BRANCH_CREATE_PAGE, ScratchDialogsBranchCreatePageClass))
#define SCRATCH_DIALOGS_IS_BRANCH_CREATE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCRATCH_DIALOGS_TYPE_BRANCH_CREATE_PAGE))
#define SCRATCH_DIALOGS_IS_BRANCH_CREATE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCRATCH_DIALOGS_TYPE_BRANCH_CREATE_PAGE))
#define SCRATCH_DIALOGS_BRANCH_CREATE_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SCRATCH_DIALOGS_TYPE_BRANCH_CREATE_PAGE, ScratchDialogsBranchCreatePageClass))

typedef struct _ScratchDialogsBranchCreatePage ScratchDialogsBranchCreatePage;
typedef struct _ScratchDialogsBranchCreatePageClass ScratchDialogsBranchCreatePageClass;
enum  {
	SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_PAGE_ACTIVATED_SIGNAL,
	SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_NUM_SIGNALS
};
static guint scratch_dialogs_branch_action_dialog_signals[SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_NUM_SIGNALS] = {0};

struct _ScratchBranchActionPageIface {
	GTypeInterface parent_iface;
	void (*focus_start_widget) (ScratchBranchActionPage* self);
	ScratchBranchAction (*get_action) (ScratchBranchActionPage* self);
	GgitRef* (*get_branch_ref) (ScratchBranchActionPage* self);
	const gchar* (*get_new_branch_name) (ScratchBranchActionPage* self);
};

struct _ScratchDialogsBranchActionDialog {
	GraniteMessageDialog parent_instance;
	ScratchDialogsBranchActionDialogPrivate * priv;
};

struct _ScratchDialogsBranchActionDialogClass {
	GraniteMessageDialogClass parent_class;
};

struct _ScratchDialogsBranchActionDialogPrivate {
	gboolean _can_apply;
	ScratchFolderManagerProjectFolderItem* _project;
	GtkStack* stack;
};

static gint ScratchDialogsBranchActionDialog_private_offset;
static gpointer scratch_dialogs_branch_action_dialog_parent_class = NULL;

VALA_EXTERN GType scratch_branch_action_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType scratch_branch_action_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScratchBranchActionPage, g_object_unref)
VALA_EXTERN void scratch_branch_action_page_focus_start_widget (ScratchBranchActionPage* self);
static void scratch_branch_action_page_real_focus_start_widget (ScratchBranchActionPage* self);
VALA_EXTERN ScratchBranchAction scratch_branch_action_page_get_action (ScratchBranchActionPage* self);
VALA_EXTERN GgitRef* scratch_branch_action_page_get_branch_ref (ScratchBranchActionPage* self);
VALA_EXTERN const gchar* scratch_branch_action_page_get_new_branch_name (ScratchBranchActionPage* self);
static GType scratch_branch_action_page_get_type_once (void);
VALA_EXTERN GType scratch_dialogs_branch_action_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScratchDialogsBranchActionDialog, g_object_unref)
VALA_EXTERN GType code_widgets_source_list_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CodeWidgetsSourceListItem, g_object_unref)
VALA_EXTERN GType code_widgets_source_list_expandable_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CodeWidgetsSourceListExpandableItem, g_object_unref)
VALA_EXTERN GType scratch_folder_manager_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScratchFolderManagerItem, g_object_unref)
VALA_EXTERN GType scratch_folder_manager_folder_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScratchFolderManagerFolderItem, g_object_unref)
VALA_EXTERN GType scratch_folder_manager_project_folder_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScratchFolderManagerProjectFolderItem, g_object_unref)
VALA_EXTERN ScratchDialogsBranchActionDialog* scratch_dialogs_branch_action_dialog_new (ScratchFolderManagerProjectFolderItem* project);
VALA_EXTERN ScratchDialogsBranchActionDialog* scratch_dialogs_branch_action_dialog_construct (GType object_type,
                                                                                  ScratchFolderManagerProjectFolderItem* project);
VALA_EXTERN ScratchBranchAction scratch_dialogs_branch_action_dialog_get_action (ScratchDialogsBranchActionDialog* self);
VALA_EXTERN GgitRef* scratch_dialogs_branch_action_dialog_get_branch_ref (ScratchDialogsBranchActionDialog* self);
VALA_EXTERN const gchar* scratch_dialogs_branch_action_dialog_get_new_branch_name (ScratchDialogsBranchActionDialog* self);
VALA_EXTERN gboolean scratch_dialogs_branch_action_dialog_get_can_apply (ScratchDialogsBranchActionDialog* self);
VALA_EXTERN void scratch_dialogs_branch_action_dialog_set_can_apply (ScratchDialogsBranchActionDialog* self,
                                                         gboolean value);
VALA_EXTERN ScratchFolderManagerProjectFolderItem* scratch_dialogs_branch_action_dialog_get_project (ScratchDialogsBranchActionDialog* self);
static void scratch_dialogs_branch_action_dialog_set_project (ScratchDialogsBranchActionDialog* self,
                                                       ScratchFolderManagerProjectFolderItem* value);
static GObject * scratch_dialogs_branch_action_dialog_constructor (GType type,
                                                            guint n_construct_properties,
                                                            GObjectConstructParam * construct_properties);
VALA_EXTERN gboolean scratch_folder_manager_project_folder_item_get_is_git_repo (ScratchFolderManagerProjectFolderItem* self);
VALA_EXTERN GType scratch_folder_manager_file_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScratchFolderManagerFile, g_object_unref)
VALA_EXTERN ScratchFolderManagerFile* scratch_folder_manager_item_get_file (ScratchFolderManagerItem* self);
VALA_EXTERN GFile* scratch_folder_manager_file_get_file (ScratchFolderManagerFile* self);
VALA_EXTERN GType scratch_dialogs_branch_checkout_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScratchDialogsBranchCheckoutPage, g_object_unref)
VALA_EXTERN ScratchDialogsBranchCheckoutPage* scratch_dialogs_branch_checkout_page_new (ScratchDialogsBranchActionDialog* dialog);
VALA_EXTERN ScratchDialogsBranchCheckoutPage* scratch_dialogs_branch_checkout_page_construct (GType object_type,
                                                                                  ScratchDialogsBranchActionDialog* dialog);
VALA_EXTERN GType scratch_dialogs_branch_create_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScratchDialogsBranchCreatePage, g_object_unref)
VALA_EXTERN ScratchDialogsBranchCreatePage* scratch_dialogs_branch_create_page_new (ScratchDialogsBranchActionDialog* dialog);
VALA_EXTERN ScratchDialogsBranchCreatePage* scratch_dialogs_branch_create_page_construct (GType object_type,
                                                                              ScratchDialogsBranchActionDialog* dialog);
static void _scratch_dialogs_branch_action_dialog___lambda109_ (ScratchDialogsBranchActionDialog* self);
static void __scratch_dialogs_branch_action_dialog___lambda109__gtk_widget_realize (GtkWidget* _sender,
                                                                             gpointer self);
static void _scratch_dialogs_branch_action_dialog___lambda110_ (ScratchDialogsBranchActionDialog* self);
static void __scratch_dialogs_branch_action_dialog___lambda110__scratch_dialogs_branch_action_dialog_page_activated (ScratchDialogsBranchActionDialog* _sender,
                                                                                                              gpointer self);
static void scratch_dialogs_branch_action_dialog_finalize (GObject * obj);
static GType scratch_dialogs_branch_action_dialog_get_type_once (void);
static void _vala_scratch_dialogs_branch_action_dialog_get_property (GObject * object,
                                                              guint property_id,
                                                              GValue * value,
                                                              GParamSpec * pspec);
static void _vala_scratch_dialogs_branch_action_dialog_set_property (GObject * object,
                                                              guint property_id,
                                                              const GValue * value,
                                                              GParamSpec * pspec);

 G_GNUC_NO_INLINE static GType
scratch_branch_action_get_type_once (void)
{
	static const GEnumValue values[] = {{SCRATCH_BRANCH_ACTION_CHECKOUT, "SCRATCH_BRANCH_ACTION_CHECKOUT", "checkout"}, {SCRATCH_BRANCH_ACTION_COMMIT, "SCRATCH_BRANCH_ACTION_COMMIT", "commit"}, {SCRATCH_BRANCH_ACTION_PUSH, "SCRATCH_BRANCH_ACTION_PUSH", "push"}, {SCRATCH_BRANCH_ACTION_PULL, "SCRATCH_BRANCH_ACTION_PULL", "pull"}, {SCRATCH_BRANCH_ACTION_MERGE, "SCRATCH_BRANCH_ACTION_MERGE", "merge"}, {SCRATCH_BRANCH_ACTION_DELETE, "SCRATCH_BRANCH_ACTION_DELETE", "delete"}, {SCRATCH_BRANCH_ACTION_CREATE, "SCRATCH_BRANCH_ACTION_CREATE", "create"}, {0, NULL, NULL}};
	GType scratch_branch_action_type_id;
	scratch_branch_action_type_id = g_enum_register_static ("ScratchBranchAction", values);
	return scratch_branch_action_type_id;
}

GType
scratch_branch_action_get_type (void)
{
	static gsize scratch_branch_action_type_id__once = 0;
	if (g_once_init_enter (&scratch_branch_action_type_id__once)) {
		GType scratch_branch_action_type_id;
		scratch_branch_action_type_id = scratch_branch_action_get_type_once ();
		g_once_init_leave (&scratch_branch_action_type_id__once, scratch_branch_action_type_id);
	}
	return scratch_branch_action_type_id__once;
}

static void
scratch_branch_action_page_real_focus_start_widget (ScratchBranchActionPage* self)
{
}

void
scratch_branch_action_page_focus_start_widget (ScratchBranchActionPage* self)
{
	ScratchBranchActionPageIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SCRATCH_BRANCH_ACTION_PAGE_GET_INTERFACE (self);
	if (_iface_->focus_start_widget) {
		_iface_->focus_start_widget (self);
	}
}

ScratchBranchAction
scratch_branch_action_page_get_action (ScratchBranchActionPage* self)
{
	ScratchBranchActionPageIface* _iface_;
	g_return_val_if_fail (self != NULL, 0);
	_iface_ = SCRATCH_BRANCH_ACTION_PAGE_GET_INTERFACE (self);
	if (_iface_->get_action) {
		return _iface_->get_action (self);
	}
	return 0;
}

GgitRef*
scratch_branch_action_page_get_branch_ref (ScratchBranchActionPage* self)
{
	ScratchBranchActionPageIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SCRATCH_BRANCH_ACTION_PAGE_GET_INTERFACE (self);
	if (_iface_->get_branch_ref) {
		return _iface_->get_branch_ref (self);
	}
	return NULL;
}

const gchar*
scratch_branch_action_page_get_new_branch_name (ScratchBranchActionPage* self)
{
	ScratchBranchActionPageIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SCRATCH_BRANCH_ACTION_PAGE_GET_INTERFACE (self);
	if (_iface_->get_new_branch_name) {
		return _iface_->get_new_branch_name (self);
	}
	return NULL;
}

static void
scratch_branch_action_page_default_init (ScratchBranchActionPageIface * iface,
                                         gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_enum ("action", "action", "action", SCRATCH_TYPE_BRANCH_ACTION, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("branch-ref", "branch-ref", "branch-ref", ggit_ref_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_string ("new-branch-name", "new-branch-name", "new-branch-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	iface->focus_start_widget = scratch_branch_action_page_real_focus_start_widget;
}

 G_GNUC_NO_INLINE static GType
scratch_branch_action_page_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ScratchBranchActionPageIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) scratch_branch_action_page_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType scratch_branch_action_page_type_id;
	scratch_branch_action_page_type_id = g_type_register_static (G_TYPE_INTERFACE, "ScratchBranchActionPage", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_interface_add_prerequisite (scratch_branch_action_page_type_id, gtk_widget_get_type ());
	return scratch_branch_action_page_type_id;
}

GType
scratch_branch_action_page_get_type (void)
{
	static gsize scratch_branch_action_page_type_id__once = 0;
	if (g_once_init_enter (&scratch_branch_action_page_type_id__once)) {
		GType scratch_branch_action_page_type_id;
		scratch_branch_action_page_type_id = scratch_branch_action_page_get_type_once ();
		g_once_init_leave (&scratch_branch_action_page_type_id__once, scratch_branch_action_page_type_id);
	}
	return scratch_branch_action_page_type_id__once;
}

static inline gpointer
scratch_dialogs_branch_action_dialog_get_instance_private (ScratchDialogsBranchActionDialog* self)
{
	return G_STRUCT_MEMBER_P (self, ScratchDialogsBranchActionDialog_private_offset);
}

ScratchDialogsBranchActionDialog*
scratch_dialogs_branch_action_dialog_construct (GType object_type,
                                                ScratchFolderManagerProjectFolderItem* project)
{
	ScratchDialogsBranchActionDialog * self = NULL;
	g_return_val_if_fail (project != NULL, NULL);
	self = (ScratchDialogsBranchActionDialog*) g_object_new (object_type, "project", project, NULL);
	return self;
}

ScratchDialogsBranchActionDialog*
scratch_dialogs_branch_action_dialog_new (ScratchFolderManagerProjectFolderItem* project)
{
	return scratch_dialogs_branch_action_dialog_construct (SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG, project);
}

ScratchBranchAction
scratch_dialogs_branch_action_dialog_get_action (ScratchDialogsBranchActionDialog* self)
{
	ScratchBranchAction result;
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	ScratchBranchAction _tmp2_;
	ScratchBranchAction _tmp3_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->stack;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	_tmp2_ = scratch_branch_action_page_get_action (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SCRATCH_TYPE_BRANCH_ACTION_PAGE, ScratchBranchActionPage));
	_tmp3_ = _tmp2_;
	result = _tmp3_;
	return result;
}

GgitRef*
scratch_dialogs_branch_action_dialog_get_branch_ref (ScratchDialogsBranchActionDialog* self)
{
	GgitRef* result;
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	GgitRef* _tmp2_;
	GgitRef* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->stack;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	_tmp2_ = scratch_branch_action_page_get_branch_ref (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SCRATCH_TYPE_BRANCH_ACTION_PAGE, ScratchBranchActionPage));
	_tmp3_ = _tmp2_;
	result = _tmp3_;
	return result;
}

const gchar*
scratch_dialogs_branch_action_dialog_get_new_branch_name (ScratchDialogsBranchActionDialog* self)
{
	const gchar* result;
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->stack;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	_tmp2_ = scratch_branch_action_page_get_new_branch_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SCRATCH_TYPE_BRANCH_ACTION_PAGE, ScratchBranchActionPage));
	_tmp3_ = _tmp2_;
	result = _tmp3_;
	return result;
}

gboolean
scratch_dialogs_branch_action_dialog_get_can_apply (ScratchDialogsBranchActionDialog* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_can_apply;
	return result;
}

void
scratch_dialogs_branch_action_dialog_set_can_apply (ScratchDialogsBranchActionDialog* self,
                                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = scratch_dialogs_branch_action_dialog_get_can_apply (self);
	if (old_value != value) {
		self->priv->_can_apply = value;
		g_object_notify_by_pspec ((GObject *) self, scratch_dialogs_branch_action_dialog_properties[SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_CAN_APPLY_PROPERTY]);
	}
}

ScratchFolderManagerProjectFolderItem*
scratch_dialogs_branch_action_dialog_get_project (ScratchDialogsBranchActionDialog* self)
{
	ScratchFolderManagerProjectFolderItem* result;
	ScratchFolderManagerProjectFolderItem* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_project;
	result = _tmp0_;
	return result;
}

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

static void
scratch_dialogs_branch_action_dialog_set_project (ScratchDialogsBranchActionDialog* self,
                                                  ScratchFolderManagerProjectFolderItem* value)
{
	ScratchFolderManagerProjectFolderItem* old_value;
	g_return_if_fail (self != NULL);
	old_value = scratch_dialogs_branch_action_dialog_get_project (self);
	if (old_value != value) {
		ScratchFolderManagerProjectFolderItem* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_project);
		self->priv->_project = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, scratch_dialogs_branch_action_dialog_properties[SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_PROJECT_PROPERTY]);
	}
}

static void
_scratch_dialogs_branch_action_dialog___lambda109_ (ScratchDialogsBranchActionDialog* self)
{
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	_tmp0_ = self->priv->stack;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	scratch_branch_action_page_focus_start_widget (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SCRATCH_TYPE_BRANCH_ACTION_PAGE, ScratchBranchActionPage));
}

static void
__scratch_dialogs_branch_action_dialog___lambda109__gtk_widget_realize (GtkWidget* _sender,
                                                                        gpointer self)
{
	_scratch_dialogs_branch_action_dialog___lambda109_ ((ScratchDialogsBranchActionDialog*) self);
}

static void
_scratch_dialogs_branch_action_dialog___lambda110_ (ScratchDialogsBranchActionDialog* self)
{
	gboolean _tmp0_;
	_tmp0_ = self->priv->_can_apply;
	if (_tmp0_) {
		gtk_dialog_response ((GtkDialog*) self, (gint) GTK_RESPONSE_APPLY);
	}
}

static void
__scratch_dialogs_branch_action_dialog___lambda110__scratch_dialogs_branch_action_dialog_page_activated (ScratchDialogsBranchActionDialog* _sender,
                                                                                                         gpointer self)
{
	_scratch_dialogs_branch_action_dialog___lambda110_ ((ScratchDialogsBranchActionDialog*) self);
}

static GObject *
scratch_dialogs_branch_action_dialog_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ScratchDialogsBranchActionDialog * self;
	GApplication* _tmp0_;
	GtkWindow* _tmp1_;
	ScratchFolderManagerProjectFolderItem* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	parent_class = G_OBJECT_CLASS (scratch_dialogs_branch_action_dialog_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG, ScratchDialogsBranchActionDialog);
	_tmp0_ = g_application_get_default ();
	_tmp1_ = gtk_application_get_active_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_application_get_type (), GtkApplication));
	gtk_window_set_transient_for ((GtkWindow*) self, _tmp1_);
	gtk_dialog_add_button ((GtkDialog*) self, _ ("Cancel"), (gint) GTK_RESPONSE_CANCEL);
	_tmp2_ = self->priv->_project;
	_tmp3_ = scratch_folder_manager_project_folder_item_get_is_git_repo (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		ScratchFolderManagerProjectFolderItem* _tmp5_;
		ScratchFolderManagerFile* _tmp6_;
		ScratchFolderManagerFile* _tmp7_;
		GFile* _tmp8_;
		GFile* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		GtkLabel* _tmp14_;
		GtkLabel* _tmp15_;
		GThemedIcon* _tmp16_;
		GThemedIcon* _tmp17_;
		GtkWidget* apply_button = NULL;
		GtkWidget* _tmp18_;
		GtkWidget* _tmp19_;
		GtkWidget* _tmp20_;
		ScratchDialogsBranchCheckoutPage* checkout_page = NULL;
		ScratchDialogsBranchCheckoutPage* _tmp21_;
		ScratchDialogsBranchCreatePage* create_page = NULL;
		ScratchDialogsBranchCreatePage* _tmp22_;
		GtkStack* _tmp23_;
		GtkStack* _tmp24_;
		ScratchDialogsBranchCheckoutPage* _tmp25_;
		gchar* _tmp26_;
		GtkStack* _tmp27_;
		ScratchDialogsBranchCreatePage* _tmp28_;
		gchar* _tmp29_;
		GtkStackSidebar* sidebar = NULL;
		GtkStack* _tmp30_;
		GtkStack* _tmp31_;
		GtkStackSidebar* _tmp32_ = NULL;
		GtkBox* content_box = NULL;
		GtkBox* _tmp33_;
		GtkBox* _tmp34_;
		GtkStackSidebar* _tmp35_;
		GtkBox* _tmp36_;
		GtkStack* _tmp37_;
		GtkBin* _tmp38_;
		GtkBin* _tmp39_;
		GtkBox* _tmp40_;
		GtkBin* _tmp41_;
		GtkBin* _tmp42_;
		_tmp5_ = self->priv->_project;
		_tmp6_ = scratch_folder_manager_item_get_file ((ScratchFolderManagerItem*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = scratch_folder_manager_file_get_file (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_file_get_basename (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = g_strdup_printf (_ ("Perform branch action on project '%s'"), _tmp11_);
		_tmp13_ = _tmp12_;
		granite_message_dialog_set_primary_text ((GraniteMessageDialog*) self, _tmp13_);
		_g_free0 (_tmp13_);
		_g_free0 (_tmp11_);
		_tmp14_ = granite_message_dialog_get_primary_label ((GraniteMessageDialog*) self);
		_tmp15_ = _tmp14_;
		gtk_widget_set_can_focus ((GtkWidget*) _tmp15_, FALSE);
		_tmp16_ = (GThemedIcon*) g_themed_icon_new ("git");
		_tmp17_ = _tmp16_;
		granite_message_dialog_set_image_icon ((GraniteMessageDialog*) self, (GIcon*) _tmp17_);
		_g_object_unref0 (_tmp17_);
		_tmp18_ = gtk_dialog_add_button ((GtkDialog*) self, _ ("Apply"), (gint) GTK_RESPONSE_APPLY);
		_tmp19_ = _g_object_ref0 (_tmp18_);
		apply_button = _tmp19_;
		_tmp20_ = apply_button;
		g_object_bind_property_with_closures ((GObject*) self, "can-apply", (GObject*) _tmp20_, "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)));
		_tmp21_ = scratch_dialogs_branch_checkout_page_new (self);
		g_object_ref_sink (_tmp21_);
		checkout_page = _tmp21_;
		_tmp22_ = scratch_dialogs_branch_create_page_new (self);
		g_object_ref_sink (_tmp22_);
		create_page = _tmp22_;
		_tmp23_ = (GtkStack*) gtk_stack_new ();
		g_object_ref_sink (_tmp23_);
		_g_object_unref0 (self->priv->stack);
		self->priv->stack = _tmp23_;
		_tmp24_ = self->priv->stack;
		_tmp25_ = checkout_page;
		_tmp26_ = g_enum_to_string (SCRATCH_TYPE_BRANCH_ACTION, SCRATCH_BRANCH_ACTION_CHECKOUT);
		gtk_stack_add_titled (_tmp24_, (GtkWidget*) _tmp25_, _tmp26_, _ ("Checkout"));
		_g_free0 (_tmp26_);
		_tmp27_ = self->priv->stack;
		_tmp28_ = create_page;
		_tmp29_ = g_enum_to_string (SCRATCH_TYPE_BRANCH_ACTION, SCRATCH_BRANCH_ACTION_CREATE);
		gtk_stack_add_titled (_tmp27_, (GtkWidget*) _tmp28_, _tmp29_, _ ("New"));
		_g_free0 (_tmp29_);
		_tmp30_ = self->priv->stack;
		_tmp31_ = _g_object_ref0 (_tmp30_);
		_tmp32_ = (GtkStackSidebar*) gtk_stack_sidebar_new ();
		gtk_stack_sidebar_set_stack (_tmp32_, _tmp31_);
		_g_object_unref0 (_tmp31_);
		g_object_ref_sink (_tmp32_);
		sidebar = _tmp32_;
		_tmp33_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
		g_object_ref_sink (_tmp33_);
		content_box = _tmp33_;
		_tmp34_ = content_box;
		_tmp35_ = sidebar;
		gtk_container_add ((GtkContainer*) _tmp34_, (GtkWidget*) _tmp35_);
		_tmp36_ = content_box;
		_tmp37_ = self->priv->stack;
		gtk_container_add ((GtkContainer*) _tmp36_, (GtkWidget*) _tmp37_);
		_tmp38_ = granite_message_dialog_get_custom_bin ((GraniteMessageDialog*) self);
		_tmp39_ = _tmp38_;
		_tmp40_ = content_box;
		gtk_container_add ((GtkContainer*) _tmp39_, (GtkWidget*) _tmp40_);
		_tmp41_ = granite_message_dialog_get_custom_bin ((GraniteMessageDialog*) self);
		_tmp42_ = _tmp41_;
		gtk_widget_show_all ((GtkWidget*) _tmp42_);
		_g_object_unref0 (content_box);
		_g_object_unref0 (sidebar);
		_g_object_unref0 (create_page);
		_g_object_unref0 (checkout_page);
		_g_object_unref0 (apply_button);
	} else {
		ScratchFolderManagerProjectFolderItem* _tmp43_;
		ScratchFolderManagerFile* _tmp44_;
		ScratchFolderManagerFile* _tmp45_;
		GFile* _tmp46_;
		GFile* _tmp47_;
		gchar* _tmp48_;
		gchar* _tmp49_;
		gchar* _tmp50_;
		gchar* _tmp51_;
		GThemedIcon* _tmp52_;
		GThemedIcon* _tmp53_;
		_tmp43_ = self->priv->_project;
		_tmp44_ = scratch_folder_manager_item_get_file ((ScratchFolderManagerItem*) _tmp43_);
		_tmp45_ = _tmp44_;
		_tmp46_ = scratch_folder_manager_file_get_file (_tmp45_);
		_tmp47_ = _tmp46_;
		_tmp48_ = g_file_get_basename (_tmp47_);
		_tmp49_ = _tmp48_;
		_tmp50_ = g_strdup_printf (_ ("'%s' is not a git repository"), _tmp49_);
		_tmp51_ = _tmp50_;
		granite_message_dialog_set_primary_text ((GraniteMessageDialog*) self, _tmp51_);
		_g_free0 (_tmp51_);
		_g_free0 (_tmp49_);
		granite_message_dialog_set_secondary_text ((GraniteMessageDialog*) self, _ ("Unable to perform branch actions"));
		_tmp52_ = (GThemedIcon*) g_themed_icon_new ("dialog-error");
		_tmp53_ = _tmp52_;
		granite_message_dialog_set_image_icon ((GraniteMessageDialog*) self, (GIcon*) _tmp53_);
		_g_object_unref0 (_tmp53_);
	}
	g_signal_connect_object ((GtkWidget*) self, "realize", (GCallback) __scratch_dialogs_branch_action_dialog___lambda109__gtk_widget_realize, self, 0);
	g_signal_connect_object (self, "page-activated", (GCallback) __scratch_dialogs_branch_action_dialog___lambda110__scratch_dialogs_branch_action_dialog_page_activated, self, 0);
	return obj;
}

static void
scratch_dialogs_branch_action_dialog_class_init (ScratchDialogsBranchActionDialogClass * klass,
                                                 gpointer klass_data)
{
	scratch_dialogs_branch_action_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ScratchDialogsBranchActionDialog_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_scratch_dialogs_branch_action_dialog_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_scratch_dialogs_branch_action_dialog_set_property;
	G_OBJECT_CLASS (klass)->constructor = scratch_dialogs_branch_action_dialog_constructor;
	G_OBJECT_CLASS (klass)->finalize = scratch_dialogs_branch_action_dialog_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_ACTION_PROPERTY, scratch_dialogs_branch_action_dialog_properties[SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_ACTION_PROPERTY] = g_param_spec_enum ("action", "action", "action", SCRATCH_TYPE_BRANCH_ACTION, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_BRANCH_REF_PROPERTY, scratch_dialogs_branch_action_dialog_properties[SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_BRANCH_REF_PROPERTY] = g_param_spec_object ("branch-ref", "branch-ref", "branch-ref", ggit_ref_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_NEW_BRANCH_NAME_PROPERTY, scratch_dialogs_branch_action_dialog_properties[SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_NEW_BRANCH_NAME_PROPERTY] = g_param_spec_string ("new-branch-name", "new-branch-name", "new-branch-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_CAN_APPLY_PROPERTY, scratch_dialogs_branch_action_dialog_properties[SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_CAN_APPLY_PROPERTY] = g_param_spec_boolean ("can-apply", "can-apply", "can-apply", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_PROJECT_PROPERTY, scratch_dialogs_branch_action_dialog_properties[SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_PROJECT_PROPERTY] = g_param_spec_object ("project", "project", "project", SCRATCH_FOLDER_MANAGER_TYPE_PROJECT_FOLDER_ITEM, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	scratch_dialogs_branch_action_dialog_signals[SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_PAGE_ACTIVATED_SIGNAL] = g_signal_new ("page-activated", SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
scratch_dialogs_branch_action_dialog_instance_init (ScratchDialogsBranchActionDialog * self,
                                                    gpointer klass)
{
	self->priv = scratch_dialogs_branch_action_dialog_get_instance_private (self);
	self->priv->_can_apply = FALSE;
}

static void
scratch_dialogs_branch_action_dialog_finalize (GObject * obj)
{
	ScratchDialogsBranchActionDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG, ScratchDialogsBranchActionDialog);
	_g_object_unref0 (self->priv->_project);
	_g_object_unref0 (self->priv->stack);
	G_OBJECT_CLASS (scratch_dialogs_branch_action_dialog_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
scratch_dialogs_branch_action_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ScratchDialogsBranchActionDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) scratch_dialogs_branch_action_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ScratchDialogsBranchActionDialog), 0, (GInstanceInitFunc) scratch_dialogs_branch_action_dialog_instance_init, NULL };
	GType scratch_dialogs_branch_action_dialog_type_id;
	scratch_dialogs_branch_action_dialog_type_id = g_type_register_static (GRANITE_TYPE_MESSAGE_DIALOG, "ScratchDialogsBranchActionDialog", &g_define_type_info, G_TYPE_FLAG_NONE);
	ScratchDialogsBranchActionDialog_private_offset = g_type_add_instance_private (scratch_dialogs_branch_action_dialog_type_id, sizeof (ScratchDialogsBranchActionDialogPrivate));
	return scratch_dialogs_branch_action_dialog_type_id;
}

GType
scratch_dialogs_branch_action_dialog_get_type (void)
{
	static gsize scratch_dialogs_branch_action_dialog_type_id__once = 0;
	if (g_once_init_enter (&scratch_dialogs_branch_action_dialog_type_id__once)) {
		GType scratch_dialogs_branch_action_dialog_type_id;
		scratch_dialogs_branch_action_dialog_type_id = scratch_dialogs_branch_action_dialog_get_type_once ();
		g_once_init_leave (&scratch_dialogs_branch_action_dialog_type_id__once, scratch_dialogs_branch_action_dialog_type_id);
	}
	return scratch_dialogs_branch_action_dialog_type_id__once;
}

static void
_vala_scratch_dialogs_branch_action_dialog_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec)
{
	ScratchDialogsBranchActionDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG, ScratchDialogsBranchActionDialog);
	switch (property_id) {
		case SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_ACTION_PROPERTY:
		g_value_set_enum (value, scratch_dialogs_branch_action_dialog_get_action (self));
		break;
		case SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_BRANCH_REF_PROPERTY:
		g_value_set_object (value, scratch_dialogs_branch_action_dialog_get_branch_ref (self));
		break;
		case SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_NEW_BRANCH_NAME_PROPERTY:
		g_value_set_string (value, scratch_dialogs_branch_action_dialog_get_new_branch_name (self));
		break;
		case SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_CAN_APPLY_PROPERTY:
		g_value_set_boolean (value, scratch_dialogs_branch_action_dialog_get_can_apply (self));
		break;
		case SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_PROJECT_PROPERTY:
		g_value_set_object (value, scratch_dialogs_branch_action_dialog_get_project (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_scratch_dialogs_branch_action_dialog_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec)
{
	ScratchDialogsBranchActionDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SCRATCH_DIALOGS_TYPE_BRANCH_ACTION_DIALOG, ScratchDialogsBranchActionDialog);
	switch (property_id) {
		case SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_CAN_APPLY_PROPERTY:
		scratch_dialogs_branch_action_dialog_set_can_apply (self, g_value_get_boolean (value));
		break;
		case SCRATCH_DIALOGS_BRANCH_ACTION_DIALOG_PROJECT_PROPERTY:
		scratch_dialogs_branch_action_dialog_set_project (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

