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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <handy.h>
#include <gee.h>
#include <libsoup/soup.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>

#define TOOTLE_VIEWS_TYPE_BASE (tootle_views_base_get_type ())
#define TOOTLE_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBase))
#define TOOTLE_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBaseClass))
#define TOOTLE_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_BASE))
#define TOOTLE_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_BASE))
#define TOOTLE_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBaseClass))

typedef struct _TootleViewsBase TootleViewsBase;
typedef struct _TootleViewsBaseClass TootleViewsBaseClass;
typedef struct _TootleViewsBasePrivate TootleViewsBasePrivate;

#define TOOTLE_TYPE_IACCOUNT_LISTENER (tootle_iaccount_listener_get_type ())
#define TOOTLE_IACCOUNT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_IACCOUNT_LISTENER, TootleIAccountListener))
#define TOOTLE_IS_IACCOUNT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_IACCOUNT_LISTENER))
#define TOOTLE_IACCOUNT_LISTENER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TOOTLE_TYPE_IACCOUNT_LISTENER, TootleIAccountListenerIface))

typedef struct _TootleIAccountListener TootleIAccountListener;
typedef struct _TootleIAccountListenerIface TootleIAccountListenerIface;

#define TOOTLE_TYPE_ENTITY (tootle_entity_get_type ())
#define TOOTLE_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_ENTITY, TootleEntity))
#define TOOTLE_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_ENTITY, TootleEntityClass))
#define TOOTLE_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_ENTITY))
#define TOOTLE_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_ENTITY))
#define TOOTLE_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_ENTITY, TootleEntityClass))

typedef struct _TootleEntity TootleEntity;
typedef struct _TootleEntityClass TootleEntityClass;

#define TOOTLE_API_TYPE_ACCOUNT (tootle_api_account_get_type ())
#define TOOTLE_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_API_TYPE_ACCOUNT, TootleAPIAccount))
#define TOOTLE_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_API_TYPE_ACCOUNT, TootleAPIAccountClass))
#define TOOTLE_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_API_TYPE_ACCOUNT))
#define TOOTLE_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_API_TYPE_ACCOUNT))
#define TOOTLE_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_API_TYPE_ACCOUNT, TootleAPIAccountClass))

typedef struct _TootleAPIAccount TootleAPIAccount;
typedef struct _TootleAPIAccountClass TootleAPIAccountClass;

#define TOOTLE_TYPE_INSTANCE_ACCOUNT (tootle_instance_account_get_type ())
#define TOOTLE_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_INSTANCE_ACCOUNT, TootleInstanceAccount))
#define TOOTLE_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_INSTANCE_ACCOUNT, TootleInstanceAccountClass))
#define TOOTLE_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_INSTANCE_ACCOUNT))
#define TOOTLE_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_INSTANCE_ACCOUNT))
#define TOOTLE_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_INSTANCE_ACCOUNT, TootleInstanceAccountClass))

typedef struct _TootleInstanceAccount TootleInstanceAccount;
typedef struct _TootleInstanceAccountClass TootleInstanceAccountClass;

#define TOOTLE_TYPE_ISTREAM_LISTENER (tootle_istream_listener_get_type ())
#define TOOTLE_ISTREAM_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_ISTREAM_LISTENER, TootleIStreamListener))
#define TOOTLE_IS_ISTREAM_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_ISTREAM_LISTENER))
#define TOOTLE_ISTREAM_LISTENER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TOOTLE_TYPE_ISTREAM_LISTENER, TootleIStreamListenerIface))

typedef struct _TootleIStreamListener TootleIStreamListener;
typedef struct _TootleIStreamListenerIface TootleIStreamListenerIface;

#define TOOTLE_VIEWS_TYPE_TIMELINE (tootle_views_timeline_get_type ())
#define TOOTLE_VIEWS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_TIMELINE, TootleViewsTimeline))
#define TOOTLE_VIEWS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_TIMELINE, TootleViewsTimelineClass))
#define TOOTLE_VIEWS_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_TIMELINE))
#define TOOTLE_VIEWS_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_TIMELINE))
#define TOOTLE_VIEWS_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_TIMELINE, TootleViewsTimelineClass))

typedef struct _TootleViewsTimeline TootleViewsTimeline;
typedef struct _TootleViewsTimelineClass TootleViewsTimelineClass;
typedef struct _TootleViewsTimelinePrivate TootleViewsTimelinePrivate;

#define TOOTLE_API_TYPE_STATUS (tootle_api_status_get_type ())
#define TOOTLE_API_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_API_TYPE_STATUS, TootleAPIStatus))
#define TOOTLE_API_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_API_TYPE_STATUS, TootleAPIStatusClass))
#define TOOTLE_API_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_API_TYPE_STATUS))
#define TOOTLE_API_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_API_TYPE_STATUS))
#define TOOTLE_API_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_API_TYPE_STATUS, TootleAPIStatusClass))

typedef struct _TootleAPIStatus TootleAPIStatus;
typedef struct _TootleAPIStatusClass TootleAPIStatusClass;

#define TOOTLE_TYPE_REQUEST (tootle_request_get_type ())
#define TOOTLE_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_REQUEST, TootleRequest))
#define TOOTLE_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_REQUEST, TootleRequestClass))
#define TOOTLE_IS_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_REQUEST))
#define TOOTLE_IS_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_REQUEST))
#define TOOTLE_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_REQUEST, TootleRequestClass))

typedef struct _TootleRequest TootleRequest;
typedef struct _TootleRequestClass TootleRequestClass;

#define TOOTLE_VIEWS_TYPE_PROFILE (tootle_views_profile_get_type ())
#define TOOTLE_VIEWS_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_PROFILE, TootleViewsProfile))
#define TOOTLE_VIEWS_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_PROFILE, TootleViewsProfileClass))
#define TOOTLE_VIEWS_IS_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_PROFILE))
#define TOOTLE_VIEWS_IS_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_PROFILE))
#define TOOTLE_VIEWS_PROFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_PROFILE, TootleViewsProfileClass))

typedef struct _TootleViewsProfile TootleViewsProfile;
typedef struct _TootleViewsProfileClass TootleViewsProfileClass;
typedef struct _TootleViewsProfilePrivate TootleViewsProfilePrivate;

#define TOOTLE_API_TYPE_RELATIONSHIP (tootle_api_relationship_get_type ())
#define TOOTLE_API_RELATIONSHIP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_API_TYPE_RELATIONSHIP, TootleAPIRelationship))
#define TOOTLE_API_RELATIONSHIP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_API_TYPE_RELATIONSHIP, TootleAPIRelationshipClass))
#define TOOTLE_API_IS_RELATIONSHIP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_API_TYPE_RELATIONSHIP))
#define TOOTLE_API_IS_RELATIONSHIP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_API_TYPE_RELATIONSHIP))
#define TOOTLE_API_RELATIONSHIP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_API_TYPE_RELATIONSHIP, TootleAPIRelationshipClass))

typedef struct _TootleAPIRelationship TootleAPIRelationship;
typedef struct _TootleAPIRelationshipClass TootleAPIRelationshipClass;

#define TOOTLE_WIDGETS_TYPE_TIMELINE_MENU (tootle_widgets_timeline_menu_get_type ())
#define TOOTLE_WIDGETS_TIMELINE_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_WIDGETS_TYPE_TIMELINE_MENU, TootleWidgetsTimelineMenu))
#define TOOTLE_WIDGETS_TIMELINE_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_WIDGETS_TYPE_TIMELINE_MENU, TootleWidgetsTimelineMenuClass))
#define TOOTLE_WIDGETS_IS_TIMELINE_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_WIDGETS_TYPE_TIMELINE_MENU))
#define TOOTLE_WIDGETS_IS_TIMELINE_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_WIDGETS_TYPE_TIMELINE_MENU))
#define TOOTLE_WIDGETS_TIMELINE_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_WIDGETS_TYPE_TIMELINE_MENU, TootleWidgetsTimelineMenuClass))

typedef struct _TootleWidgetsTimelineMenu TootleWidgetsTimelineMenu;
typedef struct _TootleWidgetsTimelineMenuClass TootleWidgetsTimelineMenuClass;

#define TOOTLE_WIDGETS_TYPE_ADAPTIVE_BUTTON (tootle_widgets_adaptive_button_get_type ())
#define TOOTLE_WIDGETS_ADAPTIVE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_WIDGETS_TYPE_ADAPTIVE_BUTTON, TootleWidgetsAdaptiveButton))
#define TOOTLE_WIDGETS_ADAPTIVE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_WIDGETS_TYPE_ADAPTIVE_BUTTON, TootleWidgetsAdaptiveButtonClass))
#define TOOTLE_WIDGETS_IS_ADAPTIVE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_WIDGETS_TYPE_ADAPTIVE_BUTTON))
#define TOOTLE_WIDGETS_IS_ADAPTIVE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_WIDGETS_TYPE_ADAPTIVE_BUTTON))
#define TOOTLE_WIDGETS_ADAPTIVE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_WIDGETS_TYPE_ADAPTIVE_BUTTON, TootleWidgetsAdaptiveButtonClass))

typedef struct _TootleWidgetsAdaptiveButton TootleWidgetsAdaptiveButton;
typedef struct _TootleWidgetsAdaptiveButtonClass TootleWidgetsAdaptiveButtonClass;
enum  {
	TOOTLE_VIEWS_PROFILE_0_PROPERTY,
	TOOTLE_VIEWS_PROFILE_PROFILE_PROPERTY,
	TOOTLE_VIEWS_PROFILE_RS_PROPERTY,
	TOOTLE_VIEWS_PROFILE_INCLUDE_REPLIES_PROPERTY,
	TOOTLE_VIEWS_PROFILE_ONLY_MEDIA_PROPERTY,
	TOOTLE_VIEWS_PROFILE_SOURCE_PROPERTY,
	TOOTLE_VIEWS_PROFILE_NUM_PROPERTIES
};
static GParamSpec* tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TOOTLE_TYPE_ACCOUNTS (tootle_accounts_get_type ())
#define TOOTLE_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_ACCOUNTS, TootleAccounts))
#define TOOTLE_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_ACCOUNTS, TootleAccountsClass))
#define TOOTLE_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_ACCOUNTS))
#define TOOTLE_IS_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_ACCOUNTS))
#define TOOTLE_ACCOUNTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_ACCOUNTS, TootleAccountsClass))

typedef struct _TootleAccounts TootleAccounts;
typedef struct _TootleAccountsClass TootleAccountsClass;
typedef struct _Block40Data Block40Data;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef enum  {
	TOOTLE_API_VISIBILITY_PUBLIC,
	TOOTLE_API_VISIBILITY_UNLISTED,
	TOOTLE_API_VISIBILITY_PRIVATE,
	TOOTLE_API_VISIBILITY_DIRECT
} TootleAPIVisibility;

#define TOOTLE_API_TYPE_VISIBILITY (tootle_api_visibility_get_type ())

#define TOOTLE_DIALOGS_TYPE_COMPOSE (tootle_dialogs_compose_get_type ())
#define TOOTLE_DIALOGS_COMPOSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_COMPOSE, TootleDialogsCompose))
#define TOOTLE_DIALOGS_COMPOSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_COMPOSE, TootleDialogsComposeClass))
#define TOOTLE_DIALOGS_IS_COMPOSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_COMPOSE))
#define TOOTLE_DIALOGS_IS_COMPOSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_COMPOSE))
#define TOOTLE_DIALOGS_COMPOSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_COMPOSE, TootleDialogsComposeClass))

typedef struct _TootleDialogsCompose TootleDialogsCompose;
typedef struct _TootleDialogsComposeClass TootleDialogsComposeClass;

#define TOOTLE_TYPE_APPLICATION (tootle_application_get_type ())
#define TOOTLE_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_APPLICATION, TootleApplication))
#define TOOTLE_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_APPLICATION, TootleApplicationClass))
#define TOOTLE_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_APPLICATION))
#define TOOTLE_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_APPLICATION))
#define TOOTLE_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_APPLICATION, TootleApplicationClass))

typedef struct _TootleApplication TootleApplication;
typedef struct _TootleApplicationClass TootleApplicationClass;

#define TOOTLE_DIALOGS_TYPE_MAIN_WINDOW (tootle_dialogs_main_window_get_type ())
#define TOOTLE_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindow))
#define TOOTLE_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))

typedef struct _TootleDialogsMainWindow TootleDialogsMainWindow;
typedef struct _TootleDialogsMainWindowClass TootleDialogsMainWindowClass;
typedef void (*TootleNetworkSuccessCallback) (SoupSession* session, SoupMessage* msg, gpointer user_data, GError** error);

#define TOOTLE_TYPE_NETWORK (tootle_network_get_type ())
#define TOOTLE_NETWORK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_NETWORK, TootleNetwork))
#define TOOTLE_NETWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_NETWORK, TootleNetworkClass))
#define TOOTLE_IS_NETWORK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_NETWORK))
#define TOOTLE_IS_NETWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_NETWORK))
#define TOOTLE_NETWORK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_NETWORK, TootleNetworkClass))

typedef struct _TootleNetwork TootleNetwork;
typedef struct _TootleNetworkClass TootleNetworkClass;
typedef void (*TootleNetworkErrorCallback) (gint32 code, const gchar* reason, gpointer user_data);
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))

#define TOOTLE_API_TYPE_ACCOUNT_FIELD (tootle_api_account_field_get_type ())
#define TOOTLE_API_ACCOUNT_FIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_API_TYPE_ACCOUNT_FIELD, TootleAPIAccountField))
#define TOOTLE_API_ACCOUNT_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_API_TYPE_ACCOUNT_FIELD, TootleAPIAccountFieldClass))
#define TOOTLE_API_IS_ACCOUNT_FIELD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_API_TYPE_ACCOUNT_FIELD))
#define TOOTLE_API_IS_ACCOUNT_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_API_TYPE_ACCOUNT_FIELD))
#define TOOTLE_API_ACCOUNT_FIELD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_API_TYPE_ACCOUNT_FIELD, TootleAPIAccountFieldClass))

typedef struct _TootleAPIAccountField TootleAPIAccountField;
typedef struct _TootleAPIAccountFieldClass TootleAPIAccountFieldClass;

#define TOOTLE_VIEWS_PROFILE_TYPE_FIELD (tootle_views_profile_field_get_type ())
#define TOOTLE_VIEWS_PROFILE_FIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_PROFILE_TYPE_FIELD, TootleViewsProfileField))
#define TOOTLE_VIEWS_PROFILE_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_PROFILE_TYPE_FIELD, TootleViewsProfileFieldClass))
#define TOOTLE_VIEWS_PROFILE_IS_FIELD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_PROFILE_TYPE_FIELD))
#define TOOTLE_VIEWS_PROFILE_IS_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_PROFILE_TYPE_FIELD))
#define TOOTLE_VIEWS_PROFILE_FIELD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_PROFILE_TYPE_FIELD, TootleViewsProfileFieldClass))

typedef struct _TootleViewsProfileField TootleViewsProfileField;
typedef struct _TootleViewsProfileFieldClass TootleViewsProfileFieldClass;
typedef struct _TootleViewsProfileFieldPrivate TootleViewsProfileFieldPrivate;

#define TOOTLE_WIDGETS_TYPE_RICH_LABEL (tootle_widgets_rich_label_get_type ())
#define TOOTLE_WIDGETS_RICH_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_WIDGETS_TYPE_RICH_LABEL, TootleWidgetsRichLabel))
#define TOOTLE_WIDGETS_RICH_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_WIDGETS_TYPE_RICH_LABEL, TootleWidgetsRichLabelClass))
#define TOOTLE_WIDGETS_IS_RICH_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_WIDGETS_TYPE_RICH_LABEL))
#define TOOTLE_WIDGETS_IS_RICH_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_WIDGETS_TYPE_RICH_LABEL))
#define TOOTLE_WIDGETS_RICH_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_WIDGETS_TYPE_RICH_LABEL, TootleWidgetsRichLabelClass))

typedef struct _TootleWidgetsRichLabel TootleWidgetsRichLabel;
typedef struct _TootleWidgetsRichLabelClass TootleWidgetsRichLabelClass;
enum  {
	TOOTLE_VIEWS_PROFILE_FIELD_0_PROPERTY,
	TOOTLE_VIEWS_PROFILE_FIELD_NUM_PROPERTIES
};
static GParamSpec* tootle_views_profile_field_properties[TOOTLE_VIEWS_PROFILE_FIELD_NUM_PROPERTIES];

#define TOOTLE_WIDGETS_TYPE_AVATAR (tootle_widgets_avatar_get_type ())
#define TOOTLE_WIDGETS_AVATAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_WIDGETS_TYPE_AVATAR, TootleWidgetsAvatar))
#define TOOTLE_WIDGETS_AVATAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_WIDGETS_TYPE_AVATAR, TootleWidgetsAvatarClass))
#define TOOTLE_WIDGETS_IS_AVATAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_WIDGETS_TYPE_AVATAR))
#define TOOTLE_WIDGETS_IS_AVATAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_WIDGETS_TYPE_AVATAR))
#define TOOTLE_WIDGETS_AVATAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_WIDGETS_TYPE_AVATAR, TootleWidgetsAvatarClass))

typedef struct _TootleWidgetsAvatar TootleWidgetsAvatar;
typedef struct _TootleWidgetsAvatarClass TootleWidgetsAvatarClass;
typedef struct _TootleWidgetsTimelineMenuPrivate TootleWidgetsTimelineMenuPrivate;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

#define TOOTLE_WIDGETS_TYPE_MARKUP_VIEW (tootle_widgets_markup_view_get_type ())
#define TOOTLE_WIDGETS_MARKUP_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_WIDGETS_TYPE_MARKUP_VIEW, TootleWidgetsMarkupView))
#define TOOTLE_WIDGETS_MARKUP_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_WIDGETS_TYPE_MARKUP_VIEW, TootleWidgetsMarkupViewClass))
#define TOOTLE_WIDGETS_IS_MARKUP_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_WIDGETS_TYPE_MARKUP_VIEW))
#define TOOTLE_WIDGETS_IS_MARKUP_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_WIDGETS_TYPE_MARKUP_VIEW))
#define TOOTLE_WIDGETS_MARKUP_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_WIDGETS_TYPE_MARKUP_VIEW, TootleWidgetsMarkupViewClass))

typedef struct _TootleWidgetsMarkupView TootleWidgetsMarkupView;
typedef struct _TootleWidgetsMarkupViewClass TootleWidgetsMarkupViewClass;

struct _TootleViewsBase {
	GtkBox parent_instance;
	TootleViewsBasePrivate * priv;
	HdyHeaderBar* header;
	GtkButton* back_button;
	GtkScrolledWindow* scrolled;
	GtkBox* view;
	HdyClamp* clamp;
	GtkBox* column_view;
	GtkStack* states;
	GtkBox* content_box;
	GtkListBox* content_list;
	GtkButton* status_button;
};

struct _TootleViewsBaseClass {
	GtkBoxClass parent_class;
	void (*build_header) (TootleViewsBase* self);
	void (*clear) (TootleViewsBase* self);
	void (*on_bottom_reached) (TootleViewsBase* self);
	void (*on_shown) (TootleViewsBase* self);
	void (*on_hidden) (TootleViewsBase* self);
	void (*on_content_changed) (TootleViewsBase* self);
	void (*on_error) (TootleViewsBase* self, gint32 code, const gchar* reason);
	void (*on_content_item_activated) (TootleViewsBase* self, GtkListBoxRow* row);
};

struct _TootleIAccountListenerIface {
	GTypeInterface parent_iface;
	void (*on_account_changed) (TootleIAccountListener* self, TootleInstanceAccount* account);
	void (*on_accounts_changed) (TootleIAccountListener* self, GeeArrayList* accounts);
};

struct _TootleIStreamListenerIface {
	GTypeInterface parent_iface;
};

struct _TootleViewsTimeline {
	TootleViewsBase parent_instance;
	TootleViewsTimelinePrivate * priv;
	TootleInstanceAccount* account;
	gulong on_status_added_sigig;
	gchar* stream;
};

struct _TootleViewsTimelineClass {
	TootleViewsBaseClass parent_class;
	gboolean (*is_status_owned) (TootleViewsTimeline* self, TootleAPIStatus* status);
	void (*append) (TootleViewsTimeline* self, GtkWidget* w, gboolean first);
	gchar* (*get_req_url) (TootleViewsTimeline* self);
	TootleRequest* (*append_params) (TootleViewsTimeline* self, TootleRequest* req);
	void (*on_request_finish) (TootleViewsTimeline* self);
	gboolean (*request) (TootleViewsTimeline* self);
	void (*on_refresh) (TootleViewsTimeline* self);
	gchar* (*get_stream_url) (TootleViewsTimeline* self);
	void (*on_account_changed) (TootleViewsTimeline* self, TootleInstanceAccount* acc);
	void (*add_status) (TootleViewsTimeline* self, TootleAPIStatus* status);
	void (*remove_status) (TootleViewsTimeline* self, const gchar* id);
};

struct _TootleViewsProfile {
	TootleViewsTimeline parent_instance;
	TootleViewsProfilePrivate * priv;
};

struct _TootleViewsProfileClass {
	TootleViewsTimelineClass parent_class;
};

struct _TootleViewsProfilePrivate {
	TootleAPIAccount* _profile;
	TootleAPIRelationship* _rs;
	gboolean _include_replies;
	gboolean _only_media;
	gchar* _source;
	GSimpleAction* media_action;
	GSimpleAction* replies_action;
	GSimpleAction* muting_action;
	GSimpleAction* hiding_reblogs_action;
	GSimpleAction* blocking_action;
	GSimpleAction* domain_blocking_action;
	GtkListBox* profile_list;
	GtkLabel* relationship;
	TootleWidgetsTimelineMenu* menu_button;
	TootleWidgetsAdaptiveButton* rs_button;
	GSourceFunc rs_button_action;
	gpointer rs_button_action_target;
	GDestroyNotify rs_button_action_target_destroy_notify;
	GtkListBoxRow* note_row;
};

struct _Block40Data {
	int _ref_count_;
	TootleViewsProfile* self;
	GSimpleAction* source_action;
};

struct _TootleViewsProfileField {
	GtkListBoxRow parent_instance;
	TootleViewsProfileFieldPrivate * priv;
};

struct _TootleViewsProfileFieldClass {
	GtkListBoxRowClass parent_class;
};

struct _TootleViewsProfileFieldPrivate {
	TootleWidgetsRichLabel* name_label;
	TootleWidgetsRichLabel* value_label;
};

struct _TootleWidgetsTimelineMenu {
	GtkMenuButton parent_instance;
	TootleWidgetsTimelineMenuPrivate * priv;
	GtkLabel* title;
	GtkLabel* subtitle;
};

struct _TootleWidgetsTimelineMenuClass {
	GtkMenuButtonClass parent_class;
};

static gint TootleViewsProfile_private_offset;
static gpointer tootle_views_profile_parent_class = NULL;
extern TootleAccounts* tootle_accounts;
extern TootleApplication* tootle_app;
extern TootleDialogsMainWindow* tootle_window;
extern TootleNetwork* tootle_network;
static gint TootleViewsProfileField_private_offset;
static gpointer tootle_views_profile_field_parent_class = NULL;

GType tootle_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsBase, g_object_unref)
GType tootle_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleEntity, g_object_unref)
GType tootle_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAPIAccount, g_object_unref)
GType tootle_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleInstanceAccount, g_object_unref)
GType tootle_iaccount_listener_get_type (void) G_GNUC_CONST ;
GType tootle_istream_listener_get_type (void) G_GNUC_CONST ;
GType tootle_views_timeline_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsTimeline, g_object_unref)
GType tootle_api_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAPIStatus, g_object_unref)
GType tootle_request_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleRequest, g_object_unref)
GType tootle_views_profile_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsProfile, g_object_unref)
GType tootle_api_relationship_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAPIRelationship, g_object_unref)
GType tootle_widgets_timeline_menu_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleWidgetsTimelineMenu, g_object_unref)
GType tootle_widgets_adaptive_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleWidgetsAdaptiveButton, g_object_unref)
void tootle_views_base_build_header (TootleViewsBase* self);
TootleRequest* tootle_views_timeline_append_params (TootleViewsTimeline* self,
                                                    TootleRequest* req);
TootleViewsProfile* tootle_views_profile_new (TootleAPIAccount* acc);
TootleViewsProfile* tootle_views_profile_construct (GType object_type,
                                                    TootleAPIAccount* acc);
TootleAPIRelationship* tootle_api_relationship_new_for_account (TootleAPIAccount* acc);
TootleAPIRelationship* tootle_api_relationship_construct_for_account (GType object_type,
                                                                      TootleAPIAccount* acc);
const gchar* tootle_api_account_get_acct (TootleAPIAccount* self);
const gchar* tootle_api_account_get_id (TootleAPIAccount* self);
static void tootle_views_profile_real_build_header (TootleViewsBase* base);
TootleWidgetsAdaptiveButton* tootle_widgets_adaptive_button_new (void);
TootleWidgetsAdaptiveButton* tootle_widgets_adaptive_button_construct (GType object_type);
static void __lambda77_ (TootleViewsProfile* self);
static void ___lambda77__tootle_widgets_adaptive_button_clicked (TootleWidgetsAdaptiveButton* _sender,
                                                          gpointer self);
TootleWidgetsTimelineMenu* tootle_widgets_timeline_menu_new (const gchar* id);
TootleWidgetsTimelineMenu* tootle_widgets_timeline_menu_construct (GType object_type,
                                                                   const gchar* id);
TootleAPIAccount* tootle_views_profile_get_profile (TootleViewsProfile* self);
GType tootle_accounts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAccounts, g_object_unref)
TootleInstanceAccount* tootle_accounts_get_active (TootleAccounts* self);
static void tootle_views_profile_build_actions (TootleViewsProfile* self);
static Block40Data* block40_data_ref (Block40Data* _data40_);
static void block40_data_unref (void * _userdata_);
void tootle_views_base_set_actions (TootleViewsBase* self,
                                    GSimpleActionGroup* value);
static GVariant* _variant_new1 (gboolean value);
static void __lambda78_ (TootleViewsProfile* self,
                  GVariant* v);
void tootle_views_profile_set_only_media (TootleViewsProfile* self,
                                          gboolean value);
static GVariant* _variant_new2 (gboolean value);
static void tootle_views_profile_invalidate_actions (TootleViewsProfile* self,
                                              gboolean refresh);
static void ___lambda78__g_simple_action_change_state (GSimpleAction* _sender,
                                                GVariant* value,
                                                gpointer self);
GSimpleActionGroup* tootle_views_base_get_actions (TootleViewsBase* self);
static GVariant* _variant_new3 (gboolean value);
static void __lambda79_ (TootleViewsProfile* self,
                  GVariant* v);
void tootle_views_profile_set_include_replies (TootleViewsProfile* self,
                                               gboolean value);
static GVariant* _variant_new4 (gboolean value);
static void ___lambda79__g_simple_action_change_state (GSimpleAction* _sender,
                                                GVariant* value,
                                                gpointer self);
const gchar* tootle_views_profile_get_source (TootleViewsProfile* self);
static GVariant* _variant_new5 (const gchar* value);
static void __lambda80_ (Block40Data* _data40_,
                  GVariant* v);
void tootle_views_profile_set_source (TootleViewsProfile* self,
                                      const gchar* value);
static GVariant* _variant_new6 (const gchar* value);
void tootle_views_timeline_set_accepts (TootleViewsTimeline* self,
                                        GType value);
void tootle_views_timeline_set_url (TootleViewsTimeline* self,
                                    const gchar* value);
static void ___lambda80__g_simple_action_change_state (GSimpleAction* _sender,
                                                GVariant* value,
                                                gpointer self);
static void __lambda81_ (TootleViewsProfile* self,
                  GVariant* v);
TootleAPIStatus* tootle_api_status_new_empty (void);
TootleAPIStatus* tootle_api_status_construct_empty (GType object_type);
GType tootle_api_visibility_get_type (void) G_GNUC_CONST ;
TootleAPIVisibility tootle_api_visibility_from_string (const gchar* str);
void tootle_api_status_set_visibility (TootleAPIStatus* self,
                                       TootleAPIVisibility value);
gchar* tootle_api_account_get_handle (TootleAPIAccount* self);
void tootle_api_status_set_content (TootleAPIStatus* self,
                                    const gchar* value);
TootleDialogsCompose* tootle_dialogs_compose_new (TootleAPIStatus* template);
TootleDialogsCompose* tootle_dialogs_compose_construct (GType object_type,
                                                        TootleAPIStatus* template);
GType tootle_dialogs_compose_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsCompose, g_object_unref)
static void ___lambda81__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
static void __lambda82_ (TootleViewsProfile* self,
                  GVariant* v);
void tootle_desktop_copy (const gchar* str);
static void ___lambda82__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
static GVariant* _variant_new7 (gboolean value);
static void __lambda83_ (TootleViewsProfile* self,
                  GVariant* v);
TootleAPIRelationship* tootle_views_profile_get_rs (TootleViewsProfile* self);
void tootle_api_relationship_modify (TootleAPIRelationship* self,
                                     const gchar* operation,
                                     const gchar* param,
                                     const gchar* val);
static void ___lambda83__g_simple_action_change_state (GSimpleAction* _sender,
                                                GVariant* value,
                                                gpointer self);
static GVariant* _variant_new8 (gboolean value);
static void __lambda84_ (TootleViewsProfile* self,
                  GVariant* v);
static void ___lambda84__g_simple_action_change_state (GSimpleAction* _sender,
                                                GVariant* value,
                                                gpointer self);
static GVariant* _variant_new9 (gboolean value);
static void __lambda85_ (TootleViewsProfile* self,
                  GVariant* v);
GType tootle_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleApplication, g_object_unref)
gboolean tootle_application_question (TootleApplication* self,
                                      const gchar* text,
                                      const gchar* msg,
                                      GtkWindow* win);
GType tootle_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsMainWindow, g_object_unref)
static void ___lambda85__g_simple_action_change_state (GSimpleAction* _sender,
                                                GVariant* value,
                                                gpointer self);
static GVariant* _variant_new10 (gboolean value);
static void __lambda86_ (TootleViewsProfile* self,
                  GVariant* v);
gchar* tootle_api_account_get_domain (TootleAPIAccount* self);
TootleRequest* tootle_request_new_POST (const gchar* url);
TootleRequest* tootle_request_construct_POST (GType object_type,
                                              const gchar* url);
TootleRequest* tootle_request_with_account (TootleRequest* self,
                                            TootleInstanceAccount* account);
TootleRequest* tootle_request_with_param (TootleRequest* self,
                                          const gchar* name,
                                          const gchar* val);
TootleRequest* tootle_request_then (TootleRequest* self,
                                    TootleNetworkSuccessCallback cb,
                                    gpointer cb_target,
                                    GDestroyNotify cb_target_destroy_notify);
static void ___lambda87_ (TootleViewsProfile* self,
                   GError** error);
void tootle_api_relationship_request (TootleAPIRelationship* self);
static void ____lambda87__tootle_network_success_callback (SoupSession* session,
                                                    SoupMessage* msg,
                                                    gpointer self,
                                                    GError** error);
TootleRequest* tootle_request_exec (TootleRequest* self);
static void ___lambda86__g_simple_action_change_state (GSimpleAction* _sender,
                                                GVariant* value,
                                                gpointer self);
GType tootle_views_timeline_get_accepts (TootleViewsTimeline* self);
gboolean tootle_api_relationship_get_muting (TootleAPIRelationship* self);
static GVariant* _variant_new11 (gboolean value);
gboolean tootle_api_relationship_get_showing_reblogs (TootleAPIRelationship* self);
static GVariant* _variant_new12 (gboolean value);
gboolean tootle_api_relationship_get_following (TootleAPIRelationship* self);
gboolean tootle_api_relationship_get_blocking (TootleAPIRelationship* self);
static GVariant* _variant_new13 (gboolean value);
gboolean tootle_api_relationship_get_domain_blocking (TootleAPIRelationship* self);
static GVariant* _variant_new14 (gboolean value);
void tootle_views_timeline_set_page_next (TootleViewsTimeline* self,
                                          const gchar* value);
void tootle_views_timeline_on_refresh (TootleViewsTimeline* self);
static void tootle_views_profile_on_rs_updated (TootleViewsProfile* self);
gboolean tootle_api_relationship_get_requested (TootleAPIRelationship* self);
gboolean tootle_api_relationship_get_followed_by (TootleAPIRelationship* self);
static void tootle_views_profile_get_rs_button_state (TootleViewsProfile* self,
                                               gchar* * label,
                                               gchar* * icon_name,
                                               GSourceFunc* fn,
                                               gpointer* fn_target,
                                               GDestroyNotify* fn_target_destroy_notify);
void tootle_widgets_adaptive_button_set_icon_name (TootleWidgetsAdaptiveButton* self,
                                                   const gchar* value);
void tootle_widgets_adaptive_button_set_label (TootleWidgetsAdaptiveButton* self,
                                               const gchar* value);
static gboolean ___lambda88_ (TootleViewsProfile* self);
static GVariant* _variant_new15 (gboolean value);
static gboolean ____lambda88__gsource_func (gpointer self);
static gboolean ____lambda89_ (TootleViewsProfile* self);
static gboolean _____lambda89__gsource_func (gpointer self);
static gboolean _____lambda90_ (TootleViewsProfile* self);
static gboolean ______lambda90__gsource_func (gpointer self);
static TootleRequest* tootle_views_profile_real_append_params (TootleViewsTimeline* base,
                                                        TootleRequest* req);
const gchar* tootle_views_timeline_get_page_next (TootleViewsTimeline* self);
gboolean tootle_views_profile_get_include_replies (TootleViewsProfile* self);
gboolean tootle_views_profile_get_only_media (TootleViewsProfile* self);
void tootle_views_profile_open_from_id (const gchar* id);
const gchar* tootle_instance_account_get_instance (TootleInstanceAccount* self);
GType tootle_network_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleNetwork, g_object_unref)
void tootle_network_queue (TootleNetwork* self,
                           SoupMessage* mess,
                           TootleNetworkSuccessCallback cb,
                           gpointer cb_target,
                           GDestroyNotify cb_target_destroy_notify,
                           TootleNetworkErrorCallback ecb,
                           gpointer ecb_target,
                           GDestroyNotify ecb_target_destroy_notify);
static void __lambda91_ (SoupSession* sess,
                  SoupMessage* mess,
                  GError** error);
JsonNode* tootle_network_parse_node (TootleNetwork* self,
                                     SoupMessage* msg,
                                     GError** error);
TootleAPIAccount* tootle_api_account_from (JsonNode* node,
                                           GError** error);
static void _vala_JsonNode_free (JsonNode* self);
TootleViewsBase* tootle_dialogs_main_window_open_view (TootleDialogsMainWindow* self,
                                                       TootleViewsBase* view);
static void ___lambda91__tootle_network_success_callback (SoupSession* session,
                                                   SoupMessage* msg,
                                                   gpointer self,
                                                   GError** error);
static void __lambda92_ (gint32 status,
                  const gchar* reason);
void tootle_network_on_error (TootleNetwork* self,
                              gint32 code,
                              const gchar* message);
static void ___lambda92__tootle_network_error_callback (gint32 code,
                                                 const gchar* reason,
                                                 gpointer self);
static void tootle_views_profile_rebuild_fields (TootleViewsProfile* self);
GType tootle_api_account_field_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAPIAccountField, g_object_unref)
GeeArrayList* tootle_api_account_get_fields (TootleAPIAccount* self);
GType tootle_views_profile_field_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsProfileField, g_object_unref)
TootleViewsProfileField* tootle_views_profile_field_new (TootleAPIAccountField* field);
TootleViewsProfileField* tootle_views_profile_field_construct (GType object_type,
                                                               TootleAPIAccountField* field);
void tootle_views_profile_set_profile (TootleViewsProfile* self,
                                       TootleAPIAccount* value);
void tootle_views_profile_set_rs (TootleViewsProfile* self,
                                  TootleAPIRelationship* value);
GType tootle_widgets_rich_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleWidgetsRichLabel, g_object_unref)
const gchar* tootle_api_account_field_get_name (TootleAPIAccountField* self);
void tootle_widgets_rich_label_set_text (TootleWidgetsRichLabel* self,
                                         const gchar* value);
const gchar* tootle_api_account_field_get_val (TootleAPIAccountField* self);
static void tootle_views_profile_field_finalize (GObject * obj);
static GType tootle_views_profile_field_get_type_once (void);
static GObject * tootle_views_profile_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties);
#define BUILD_RESOURCES "/com/github/bleakgrey/tootle/"
GType tootle_widgets_avatar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleWidgetsAvatar, g_object_unref)
void tootle_widgets_avatar_set_account (TootleWidgetsAvatar* self,
                                        TootleAPIAccount* value);
GType tootle_widgets_markup_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleWidgetsMarkupView, g_object_unref)
static gboolean _tootle_views_profile___lambda93_ (TootleViewsProfile* self,
                                            GBinding* b,
                                            GValue* src,
                                            GValue* target);
static gboolean __tootle_views_profile___lambda93__gbinding_transform_func (GBinding* binding,
                                                                     GValue* from_value,
                                                                     GValue* to_value,
                                                                     gpointer self);
static void _tootle_views_profile_on_rs_updated_g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self);
static void tootle_views_profile_finalize (GObject * obj);
static GType tootle_views_profile_get_type_once (void);
static void _vala_tootle_views_profile_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_tootle_views_profile_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
tootle_views_profile_get_instance_private (TootleViewsProfile* self)
{
	return G_STRUCT_MEMBER_P (self, TootleViewsProfile_private_offset);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

TootleViewsProfile*
tootle_views_profile_construct (GType object_type,
                                TootleAPIAccount* acc)
{
	TootleViewsProfile * self = NULL;
	TootleAPIRelationship* _tmp0_;
	TootleAPIRelationship* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	g_return_val_if_fail (acc != NULL, NULL);
	_tmp0_ = tootle_api_relationship_new_for_account (acc);
	_tmp1_ = _tmp0_;
	_tmp2_ = tootle_api_account_get_acct (acc);
	_tmp3_ = _tmp2_;
	_tmp4_ = tootle_api_account_get_id (acc);
	_tmp5_ = _tmp4_;
	_tmp6_ = string_to_string (_tmp5_);
	_tmp7_ = g_strconcat ("/api/v1/accounts/", _tmp6_, "/statuses", NULL);
	_tmp8_ = _tmp7_;
	self = (TootleViewsProfile*) g_object_new (object_type, "profile", acc, "rs", _tmp1_, "label", _tmp3_, "url", _tmp8_, NULL);
	_g_free0 (_tmp8_);
	_g_object_unref0 (_tmp1_);
	return self;
}

TootleViewsProfile*
tootle_views_profile_new (TootleAPIAccount* acc)
{
	return tootle_views_profile_construct (TOOTLE_VIEWS_TYPE_PROFILE, acc);
}

static void
__lambda77_ (TootleViewsProfile* self)
{
	GSourceFunc _tmp0_;
	gpointer _tmp0__target;
	_tmp0_ = self->priv->rs_button_action;
	_tmp0__target = self->priv->rs_button_action_target;
	if (_tmp0_ != NULL) {
		TootleWidgetsAdaptiveButton* _tmp1_;
		GSourceFunc _tmp2_;
		gpointer _tmp2__target;
		_tmp1_ = self->priv->rs_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, FALSE);
		_tmp2_ = self->priv->rs_button_action;
		_tmp2__target = self->priv->rs_button_action_target;
		_tmp2_ (_tmp2__target);
	}
}

static void
___lambda77__tootle_widgets_adaptive_button_clicked (TootleWidgetsAdaptiveButton* _sender,
                                                     gpointer self)
{
	__lambda77_ ((TootleViewsProfile*) self);
}

static void
tootle_views_profile_real_build_header (TootleViewsBase* base)
{
	TootleViewsProfile * self;
	TootleWidgetsAdaptiveButton* _tmp0_;
	TootleWidgetsAdaptiveButton* _tmp1_;
	HdyHeaderBar* _tmp2_;
	TootleWidgetsTimelineMenu* _tmp3_;
	TootleWidgetsTimelineMenu* _tmp4_;
	TootleAPIAccount* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	TootleAccounts* _tmp8_;
	TootleInstanceAccount* _tmp9_;
	TootleInstanceAccount* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	self = (TootleViewsProfile*) base;
	_tmp0_ = tootle_widgets_adaptive_button_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->rs_button);
	self->priv->rs_button = _tmp0_;
	_tmp1_ = self->priv->rs_button;
	g_signal_connect_object (_tmp1_, "clicked", (GCallback) ___lambda77__tootle_widgets_adaptive_button_clicked, self, 0);
	_tmp2_ = ((TootleViewsBase*) self)->header;
	_tmp3_ = tootle_widgets_timeline_menu_new ("profile-menu");
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->menu_button);
	self->priv->menu_button = _tmp3_;
	_tmp4_ = self->priv->menu_button;
	hdy_header_bar_set_custom_title (_tmp2_, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->_profile;
	_tmp6_ = tootle_api_account_get_id (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = tootle_accounts;
	_tmp9_ = tootle_accounts_get_active (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = tootle_api_account_get_id ((TootleAPIAccount*) _tmp10_);
	_tmp12_ = _tmp11_;
	if (g_strcmp0 (_tmp7_, _tmp12_) != 0) {
		HdyHeaderBar* _tmp13_;
		TootleWidgetsAdaptiveButton* _tmp14_;
		_tmp13_ = ((TootleViewsBase*) self)->header;
		_tmp14_ = self->priv->rs_button;
		hdy_header_bar_pack_end (_tmp13_, (GtkWidget*) _tmp14_);
	}
}

static Block40Data*
block40_data_ref (Block40Data* _data40_)
{
	g_atomic_int_inc (&_data40_->_ref_count_);
	return _data40_;
}

static void
block40_data_unref (void * _userdata_)
{
	Block40Data* _data40_;
	_data40_ = (Block40Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data40_->_ref_count_)) {
		TootleViewsProfile* self;
		self = _data40_->self;
		_g_object_unref0 (_data40_->source_action);
		_g_object_unref0 (self);
		g_slice_free (Block40Data, _data40_);
	}
}

static GVariant*
_variant_new1 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static GVariant*
_variant_new2 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static void
__lambda78_ (TootleViewsProfile* self,
             GVariant* v)
{
	GSimpleAction* _tmp0_;
	GVariant* _tmp1_;
	_tmp0_ = self->priv->media_action;
	tootle_views_profile_set_only_media (self, g_variant_get_boolean (v));
	_tmp1_ = _variant_new2 (g_variant_get_boolean (v));
	g_simple_action_set_state (_tmp0_, _tmp1_);
	_g_variant_unref0 (_tmp1_);
	tootle_views_profile_invalidate_actions (self, TRUE);
}

static void
___lambda78__g_simple_action_change_state (GSimpleAction* _sender,
                                           GVariant* value,
                                           gpointer self)
{
	__lambda78_ ((TootleViewsProfile*) self, value);
}

static GVariant*
_variant_new3 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static GVariant*
_variant_new4 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static void
__lambda79_ (TootleViewsProfile* self,
             GVariant* v)
{
	GSimpleAction* _tmp0_;
	GVariant* _tmp1_;
	_tmp0_ = self->priv->replies_action;
	tootle_views_profile_set_include_replies (self, g_variant_get_boolean (v));
	_tmp1_ = _variant_new4 (g_variant_get_boolean (v));
	g_simple_action_set_state (_tmp0_, _tmp1_);
	_g_variant_unref0 (_tmp1_);
	tootle_views_profile_invalidate_actions (self, TRUE);
}

static void
___lambda79__g_simple_action_change_state (GSimpleAction* _sender,
                                           GVariant* value,
                                           gpointer self)
{
	__lambda79_ ((TootleViewsProfile*) self, value);
}

static GVariant*
_variant_new5 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new6 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static void
__lambda80_ (Block40Data* _data40_,
             GVariant* v)
{
	TootleViewsProfile* self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GVariant* _tmp2_;
	GType _tmp3_ = 0UL;
	const gchar* _tmp4_;
	TootleAPIAccount* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	self = _data40_->self;
	_tmp0_ = g_variant_get_string (v, NULL);
	tootle_views_profile_set_source (self, _tmp0_);
	_tmp1_ = self->priv->_source;
	_tmp2_ = _variant_new6 (_tmp1_);
	g_simple_action_set_state (_data40_->source_action, _tmp2_);
	_g_variant_unref0 (_tmp2_);
	_tmp4_ = self->priv->_source;
	if (g_strcmp0 (_tmp4_, "statuses") == 0) {
		_tmp3_ = TOOTLE_API_TYPE_STATUS;
	} else {
		_tmp3_ = TOOTLE_API_TYPE_ACCOUNT;
	}
	tootle_views_timeline_set_accepts ((TootleViewsTimeline*) self, _tmp3_);
	_tmp5_ = self->priv->_profile;
	_tmp6_ = tootle_api_account_get_id (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = string_to_string (_tmp7_);
	_tmp9_ = self->priv->_source;
	_tmp10_ = string_to_string (_tmp9_);
	_tmp11_ = g_strconcat ("/api/v1/accounts/", _tmp8_, "/", _tmp10_, NULL);
	_tmp12_ = _tmp11_;
	tootle_views_timeline_set_url ((TootleViewsTimeline*) self, _tmp12_);
	_g_free0 (_tmp12_);
	tootle_views_profile_invalidate_actions (self, TRUE);
}

static void
___lambda80__g_simple_action_change_state (GSimpleAction* _sender,
                                           GVariant* value,
                                           gpointer self)
{
	__lambda80_ (self, value);
}

static void
__lambda81_ (TootleViewsProfile* self,
             GVariant* v)
{
	TootleAPIStatus* status = NULL;
	TootleAPIStatus* _tmp0_;
	const gchar* _tmp1_;
	TootleAPIAccount* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	TootleDialogsCompose* _tmp9_;
	TootleDialogsCompose* _tmp10_;
	_tmp0_ = tootle_api_status_new_empty ();
	status = _tmp0_;
	_tmp1_ = g_variant_get_string (v, NULL);
	tootle_api_status_set_visibility (status, tootle_api_visibility_from_string (_tmp1_));
	_tmp2_ = self->priv->_profile;
	_tmp3_ = tootle_api_account_get_handle (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = string_to_string (_tmp5_);
	_tmp7_ = g_strconcat (_tmp6_, " ", NULL);
	_tmp8_ = _tmp7_;
	tootle_api_status_set_content (status, _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp5_);
	_tmp9_ = tootle_dialogs_compose_new (status);
	g_object_ref_sink (_tmp9_);
	_tmp10_ = _tmp9_;
	_g_object_unref0 (_tmp10_);
	_g_object_unref0 (status);
}

static void
___lambda81__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda81_ ((TootleViewsProfile*) self, parameter);
}

static void
__lambda82_ (TootleViewsProfile* self,
             GVariant* v)
{
	TootleAPIAccount* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	_tmp0_ = self->priv->_profile;
	_tmp1_ = tootle_api_account_get_handle (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	tootle_desktop_copy (_tmp3_);
	_g_free0 (_tmp3_);
}

static void
___lambda82__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda82_ ((TootleViewsProfile*) self, parameter);
}

static GVariant*
_variant_new7 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static void
__lambda83_ (TootleViewsProfile* self,
             GVariant* v)
{
	gboolean state = FALSE;
	const gchar* _tmp0_ = NULL;
	TootleAPIRelationship* _tmp1_;
	state = g_variant_get_boolean (v);
	if (state) {
		_tmp0_ = "mute";
	} else {
		_tmp0_ = "unmute";
	}
	_tmp1_ = self->priv->_rs;
	tootle_api_relationship_modify (_tmp1_, _tmp0_, NULL, NULL);
}

static void
___lambda83__g_simple_action_change_state (GSimpleAction* _sender,
                                           GVariant* value,
                                           gpointer self)
{
	__lambda83_ ((TootleViewsProfile*) self, value);
}

static GVariant*
_variant_new8 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result = NULL;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

static void
__lambda84_ (TootleViewsProfile* self,
             GVariant* v)
{
	gboolean state = FALSE;
	TootleAPIRelationship* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	state = !g_variant_get_boolean (v);
	_tmp0_ = self->priv->_rs;
	_tmp1_ = bool_to_string (state);
	_tmp2_ = _tmp1_;
	tootle_api_relationship_modify (_tmp0_, "follow", "reblogs", _tmp2_);
	_g_free0 (_tmp2_);
}

static void
___lambda84__g_simple_action_change_state (GSimpleAction* _sender,
                                           GVariant* value,
                                           gpointer self)
{
	__lambda84_ ((TootleViewsProfile*) self, value);
}

static GVariant*
_variant_new9 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static void
__lambda85_ (TootleViewsProfile* self,
             GVariant* v)
{
	gboolean block = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* q = NULL;
	gchar* _tmp1_;
	gboolean yes = FALSE;
	TootleApplication* _tmp2_;
	const gchar* _tmp3_;
	TootleAPIAccount* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	TootleDialogsMainWindow* _tmp10_;
	gboolean _tmp11_;
	block = g_variant_get_boolean (v);
	if (block) {
		_tmp0_ = _ ("Block \"%s\"?");
	} else {
		_tmp0_ = _ ("Unblock \"%s\"?");
	}
	_tmp1_ = g_strdup (_tmp0_);
	q = _tmp1_;
	_tmp2_ = tootle_app;
	_tmp3_ = q;
	_tmp4_ = self->priv->_profile;
	_tmp5_ = tootle_api_account_get_handle (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf (_tmp3_, _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = tootle_window;
	_tmp11_ = tootle_application_question (_tmp2_, _tmp9_, NULL, (GtkWindow*) _tmp10_);
	_g_free0 (_tmp9_);
	_g_free0 (_tmp7_);
	yes = _tmp11_;
	if (yes) {
		const gchar* _tmp12_ = NULL;
		TootleAPIRelationship* _tmp13_;
		if (block) {
			_tmp12_ = "block";
		} else {
			_tmp12_ = "unblock";
		}
		_tmp13_ = self->priv->_rs;
		tootle_api_relationship_modify (_tmp13_, _tmp12_, NULL, NULL);
	}
	_g_free0 (q);
}

static void
___lambda85__g_simple_action_change_state (GSimpleAction* _sender,
                                           GVariant* value,
                                           gpointer self)
{
	__lambda85_ ((TootleViewsProfile*) self, value);
}

static GVariant*
_variant_new10 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static void
___lambda87_ (TootleViewsProfile* self,
              GError** error)
{
	TootleAPIRelationship* _tmp0_;
	_tmp0_ = self->priv->_rs;
	tootle_api_relationship_request (_tmp0_);
}

static void
____lambda87__tootle_network_success_callback (SoupSession* session,
                                               SoupMessage* msg,
                                               gpointer self,
                                               GError** error)
{
	___lambda87_ ((TootleViewsProfile*) self, error);
}

static void
__lambda86_ (TootleViewsProfile* self,
             GVariant* v)
{
	gboolean block = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* q = NULL;
	gchar* _tmp1_;
	gboolean yes = FALSE;
	TootleApplication* _tmp2_;
	const gchar* _tmp3_;
	TootleAPIAccount* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	TootleDialogsMainWindow* _tmp10_;
	gboolean _tmp11_;
	block = g_variant_get_boolean (v);
	if (block) {
		_tmp0_ = _ ("Block Entire \"%s\"?");
	} else {
		_tmp0_ = _ ("Unblock Entire \"%s\"?");
	}
	_tmp1_ = g_strdup (_tmp0_);
	q = _tmp1_;
	_tmp2_ = tootle_app;
	_tmp3_ = q;
	_tmp4_ = self->priv->_profile;
	_tmp5_ = tootle_api_account_get_domain (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf (_tmp3_, _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = tootle_window;
	_tmp11_ = tootle_application_question (_tmp2_, _tmp9_, _ ("Blocking a domain will:\n" \
"\n" \
"• Remove its public posts and notifications from your timelines\n" \
"• Remove its followers from your account\n" \
"• Prevent you from following its users"), (GtkWindow*) _tmp10_);
	_g_free0 (_tmp9_);
	_g_free0 (_tmp7_);
	yes = _tmp11_;
	if (yes) {
		TootleRequest* req = NULL;
		TootleRequest* _tmp12_;
		TootleRequest* _tmp13_;
		TootleAccounts* _tmp14_;
		TootleInstanceAccount* _tmp15_;
		TootleInstanceAccount* _tmp16_;
		TootleRequest* _tmp17_;
		TootleRequest* _tmp18_;
		TootleAPIAccount* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		TootleRequest* _tmp23_;
		TootleRequest* _tmp24_;
		TootleRequest* _tmp25_;
		TootleRequest* _tmp26_;
		TootleRequest* _tmp28_;
		TootleRequest* _tmp29_;
		TootleRequest* _tmp30_;
		_tmp12_ = tootle_request_new_POST ("/api/v1/domain_blocks");
		_tmp13_ = _tmp12_;
		_tmp14_ = tootle_accounts;
		_tmp15_ = tootle_accounts_get_active (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = tootle_request_with_account (_tmp13_, _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = self->priv->_profile;
		_tmp20_ = tootle_api_account_get_domain (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = _tmp21_;
		_tmp23_ = tootle_request_with_param (_tmp18_, "domain", _tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = tootle_request_then (_tmp24_, ____lambda87__tootle_network_success_callback, g_object_ref (self), g_object_unref);
		_tmp26_ = _tmp25_;
		_g_object_unref0 (_tmp24_);
		_g_free0 (_tmp22_);
		_g_object_unref0 (_tmp18_);
		_g_object_unref0 (_tmp13_);
		req = _tmp26_;
		if (!block) {
			TootleRequest* _tmp27_;
			_tmp27_ = req;
			g_object_set ((SoupMessage*) _tmp27_, "method", "DELETE", NULL);
		}
		_tmp28_ = req;
		_tmp29_ = tootle_request_exec (_tmp28_);
		_tmp30_ = _tmp29_;
		_g_object_unref0 (_tmp30_);
		_g_object_unref0 (req);
	}
	_g_free0 (q);
}

static void
___lambda86__g_simple_action_change_state (GSimpleAction* _sender,
                                           GVariant* value,
                                           gpointer self)
{
	__lambda86_ ((TootleViewsProfile*) self, value);
}

static void
tootle_views_profile_build_actions (TootleViewsProfile* self)
{
	Block40Data* _data40_;
	GSimpleActionGroup* _tmp0_;
	GSimpleActionGroup* _tmp1_;
	GVariant* _tmp2_;
	GSimpleAction* _tmp3_;
	GSimpleAction* _tmp4_;
	GSimpleActionGroup* _tmp5_;
	GSimpleActionGroup* _tmp6_;
	GSimpleAction* _tmp7_;
	GVariant* _tmp8_;
	GSimpleAction* _tmp9_;
	GSimpleAction* _tmp10_;
	GSimpleActionGroup* _tmp11_;
	GSimpleActionGroup* _tmp12_;
	GSimpleAction* _tmp13_;
	const GVariantType* _tmp14_;
	const gchar* _tmp15_;
	GVariant* _tmp16_;
	GSimpleAction* _tmp17_;
	GSimpleAction* _tmp18_;
	GSimpleActionGroup* _tmp19_;
	GSimpleActionGroup* _tmp20_;
	GSimpleAction* mention_action = NULL;
	const GVariantType* _tmp21_;
	GSimpleAction* _tmp22_;
	GSimpleActionGroup* _tmp23_;
	GSimpleActionGroup* _tmp24_;
	GSimpleAction* copy_handle_action = NULL;
	GSimpleAction* _tmp25_;
	GSimpleActionGroup* _tmp26_;
	GSimpleActionGroup* _tmp27_;
	GVariant* _tmp28_;
	GSimpleAction* _tmp29_;
	GSimpleAction* _tmp30_;
	GSimpleActionGroup* _tmp31_;
	GSimpleActionGroup* _tmp32_;
	GSimpleAction* _tmp33_;
	GVariant* _tmp34_;
	GSimpleAction* _tmp35_;
	GSimpleAction* _tmp36_;
	GSimpleActionGroup* _tmp37_;
	GSimpleActionGroup* _tmp38_;
	GSimpleAction* _tmp39_;
	GVariant* _tmp40_;
	GSimpleAction* _tmp41_;
	GSimpleAction* _tmp42_;
	GSimpleActionGroup* _tmp43_;
	GSimpleActionGroup* _tmp44_;
	GSimpleAction* _tmp45_;
	GVariant* _tmp46_;
	GSimpleAction* _tmp47_;
	GSimpleAction* _tmp48_;
	GSimpleActionGroup* _tmp49_;
	GSimpleActionGroup* _tmp50_;
	GSimpleAction* _tmp51_;
	g_return_if_fail (self != NULL);
	_data40_ = g_slice_new0 (Block40Data);
	_data40_->_ref_count_ = 1;
	_data40_->self = g_object_ref (self);
	_tmp0_ = g_simple_action_group_new ();
	_tmp1_ = _tmp0_;
	tootle_views_base_set_actions ((TootleViewsBase*) self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = _variant_new1 (FALSE);
	_tmp3_ = g_simple_action_new_stateful ("only-media", NULL, _tmp2_);
	_g_object_unref0 (self->priv->media_action);
	self->priv->media_action = _tmp3_;
	_g_variant_unref0 (_tmp2_);
	_tmp4_ = self->priv->media_action;
	g_signal_connect_object (_tmp4_, "change-state", (GCallback) ___lambda78__g_simple_action_change_state, self, 0);
	_tmp5_ = tootle_views_base_get_actions ((TootleViewsBase*) self);
	_tmp6_ = _tmp5_;
	_tmp7_ = self->priv->media_action;
	g_action_map_add_action ((GActionMap*) _tmp6_, (GAction*) _tmp7_);
	_tmp8_ = _variant_new3 (FALSE);
	_tmp9_ = g_simple_action_new_stateful ("include-replies", NULL, _tmp8_);
	_g_object_unref0 (self->priv->replies_action);
	self->priv->replies_action = _tmp9_;
	_g_variant_unref0 (_tmp8_);
	_tmp10_ = self->priv->replies_action;
	g_signal_connect_object (_tmp10_, "change-state", (GCallback) ___lambda79__g_simple_action_change_state, self, 0);
	_tmp11_ = tootle_views_base_get_actions ((TootleViewsBase*) self);
	_tmp12_ = _tmp11_;
	_tmp13_ = self->priv->replies_action;
	g_action_map_add_action ((GActionMap*) _tmp12_, (GAction*) _tmp13_);
	_tmp14_ = G_VARIANT_TYPE_STRING;
	_tmp15_ = self->priv->_source;
	_tmp16_ = _variant_new5 (_tmp15_);
	_tmp17_ = g_simple_action_new_stateful ("source", _tmp14_, _tmp16_);
	_tmp18_ = _tmp17_;
	_g_variant_unref0 (_tmp16_);
	_data40_->source_action = _tmp18_;
	g_signal_connect_data (_data40_->source_action, "change-state", (GCallback) ___lambda80__g_simple_action_change_state, block40_data_ref (_data40_), (GClosureNotify) block40_data_unref, 0);
	_tmp19_ = tootle_views_base_get_actions ((TootleViewsBase*) self);
	_tmp20_ = _tmp19_;
	g_action_map_add_action ((GActionMap*) _tmp20_, (GAction*) _data40_->source_action);
	_tmp21_ = G_VARIANT_TYPE_STRING;
	_tmp22_ = g_simple_action_new ("mention", _tmp21_);
	mention_action = _tmp22_;
	g_signal_connect_object (mention_action, "activate", (GCallback) ___lambda81__g_simple_action_activate, self, 0);
	_tmp23_ = tootle_views_base_get_actions ((TootleViewsBase*) self);
	_tmp24_ = _tmp23_;
	g_action_map_add_action ((GActionMap*) _tmp24_, (GAction*) mention_action);
	_tmp25_ = g_simple_action_new ("copy_handle", NULL);
	copy_handle_action = _tmp25_;
	g_signal_connect_object (copy_handle_action, "activate", (GCallback) ___lambda82__g_simple_action_activate, self, 0);
	_tmp26_ = tootle_views_base_get_actions ((TootleViewsBase*) self);
	_tmp27_ = _tmp26_;
	g_action_map_add_action ((GActionMap*) _tmp27_, (GAction*) copy_handle_action);
	_tmp28_ = _variant_new7 (FALSE);
	_tmp29_ = g_simple_action_new_stateful ("muting", NULL, _tmp28_);
	_g_object_unref0 (self->priv->muting_action);
	self->priv->muting_action = _tmp29_;
	_g_variant_unref0 (_tmp28_);
	_tmp30_ = self->priv->muting_action;
	g_signal_connect_object (_tmp30_, "change-state", (GCallback) ___lambda83__g_simple_action_change_state, self, 0);
	_tmp31_ = tootle_views_base_get_actions ((TootleViewsBase*) self);
	_tmp32_ = _tmp31_;
	_tmp33_ = self->priv->muting_action;
	g_action_map_add_action ((GActionMap*) _tmp32_, (GAction*) _tmp33_);
	_tmp34_ = _variant_new8 (FALSE);
	_tmp35_ = g_simple_action_new_stateful ("hiding_reblogs", NULL, _tmp34_);
	_g_object_unref0 (self->priv->hiding_reblogs_action);
	self->priv->hiding_reblogs_action = _tmp35_;
	_g_variant_unref0 (_tmp34_);
	_tmp36_ = self->priv->hiding_reblogs_action;
	g_signal_connect_object (_tmp36_, "change-state", (GCallback) ___lambda84__g_simple_action_change_state, self, 0);
	_tmp37_ = tootle_views_base_get_actions ((TootleViewsBase*) self);
	_tmp38_ = _tmp37_;
	_tmp39_ = self->priv->hiding_reblogs_action;
	g_action_map_add_action ((GActionMap*) _tmp38_, (GAction*) _tmp39_);
	_tmp40_ = _variant_new9 (FALSE);
	_tmp41_ = g_simple_action_new_stateful ("blocking", NULL, _tmp40_);
	_g_object_unref0 (self->priv->blocking_action);
	self->priv->blocking_action = _tmp41_;
	_g_variant_unref0 (_tmp40_);
	_tmp42_ = self->priv->blocking_action;
	g_signal_connect_object (_tmp42_, "change-state", (GCallback) ___lambda85__g_simple_action_change_state, self, 0);
	_tmp43_ = tootle_views_base_get_actions ((TootleViewsBase*) self);
	_tmp44_ = _tmp43_;
	_tmp45_ = self->priv->blocking_action;
	g_action_map_add_action ((GActionMap*) _tmp44_, (GAction*) _tmp45_);
	_tmp46_ = _variant_new10 (FALSE);
	_tmp47_ = g_simple_action_new_stateful ("domain_blocking", NULL, _tmp46_);
	_g_object_unref0 (self->priv->domain_blocking_action);
	self->priv->domain_blocking_action = _tmp47_;
	_g_variant_unref0 (_tmp46_);
	_tmp48_ = self->priv->domain_blocking_action;
	g_signal_connect_object (_tmp48_, "change-state", (GCallback) ___lambda86__g_simple_action_change_state, self, 0);
	_tmp49_ = tootle_views_base_get_actions ((TootleViewsBase*) self);
	_tmp50_ = _tmp49_;
	_tmp51_ = self->priv->domain_blocking_action;
	g_action_map_add_action ((GActionMap*) _tmp50_, (GAction*) _tmp51_);
	tootle_views_profile_invalidate_actions (self, FALSE);
	_g_object_unref0 (copy_handle_action);
	_g_object_unref0 (mention_action);
	block40_data_unref (_data40_);
	_data40_ = NULL;
}

static GVariant*
_variant_new11 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static GVariant*
_variant_new12 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static GVariant*
_variant_new13 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static GVariant*
_variant_new14 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static void
tootle_views_profile_invalidate_actions (TootleViewsProfile* self,
                                         gboolean refresh)
{
	GSimpleAction* _tmp0_;
	GType _tmp1_;
	GType _tmp2_;
	GSimpleAction* _tmp3_;
	GType _tmp4_;
	GType _tmp5_;
	GSimpleAction* _tmp6_;
	TootleAPIRelationship* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	GVariant* _tmp10_;
	GSimpleAction* _tmp11_;
	TootleAPIRelationship* _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	GVariant* _tmp15_;
	GSimpleAction* _tmp16_;
	TootleAPIRelationship* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	GSimpleAction* _tmp20_;
	TootleAPIRelationship* _tmp21_;
	gboolean _tmp22_;
	gboolean _tmp23_;
	GVariant* _tmp24_;
	GSimpleAction* _tmp25_;
	TootleAPIRelationship* _tmp26_;
	gboolean _tmp27_;
	gboolean _tmp28_;
	GVariant* _tmp29_;
	GSimpleAction* _tmp30_;
	TootleAccounts* _tmp31_;
	TootleInstanceAccount* _tmp32_;
	TootleInstanceAccount* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	TootleAPIAccount* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->replies_action;
	_tmp1_ = tootle_views_timeline_get_accepts ((TootleViewsTimeline*) self);
	_tmp2_ = _tmp1_;
	g_simple_action_set_enabled (_tmp0_, _tmp2_ == TOOTLE_API_TYPE_STATUS);
	_tmp3_ = self->priv->media_action;
	_tmp4_ = tootle_views_timeline_get_accepts ((TootleViewsTimeline*) self);
	_tmp5_ = _tmp4_;
	g_simple_action_set_enabled (_tmp3_, _tmp5_ == TOOTLE_API_TYPE_STATUS);
	_tmp6_ = self->priv->muting_action;
	_tmp7_ = self->priv->_rs;
	_tmp8_ = tootle_api_relationship_get_muting (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _variant_new11 (_tmp9_);
	g_simple_action_set_state (_tmp6_, _tmp10_);
	_g_variant_unref0 (_tmp10_);
	_tmp11_ = self->priv->hiding_reblogs_action;
	_tmp12_ = self->priv->_rs;
	_tmp13_ = tootle_api_relationship_get_showing_reblogs (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = _variant_new12 (!_tmp14_);
	g_simple_action_set_state (_tmp11_, _tmp15_);
	_g_variant_unref0 (_tmp15_);
	_tmp16_ = self->priv->hiding_reblogs_action;
	_tmp17_ = self->priv->_rs;
	_tmp18_ = tootle_api_relationship_get_following (_tmp17_);
	_tmp19_ = _tmp18_;
	g_simple_action_set_enabled (_tmp16_, _tmp19_);
	_tmp20_ = self->priv->blocking_action;
	_tmp21_ = self->priv->_rs;
	_tmp22_ = tootle_api_relationship_get_blocking (_tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = _variant_new13 (_tmp23_);
	g_simple_action_set_state (_tmp20_, _tmp24_);
	_g_variant_unref0 (_tmp24_);
	_tmp25_ = self->priv->domain_blocking_action;
	_tmp26_ = self->priv->_rs;
	_tmp27_ = tootle_api_relationship_get_domain_blocking (_tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = _variant_new14 (_tmp28_);
	g_simple_action_set_state (_tmp25_, _tmp29_);
	_g_variant_unref0 (_tmp29_);
	_tmp30_ = self->priv->domain_blocking_action;
	_tmp31_ = tootle_accounts;
	_tmp32_ = tootle_accounts_get_active (_tmp31_);
	_tmp33_ = _tmp32_;
	_tmp34_ = tootle_api_account_get_domain ((TootleAPIAccount*) _tmp33_);
	_tmp35_ = _tmp34_;
	_tmp36_ = _tmp35_;
	_tmp37_ = self->priv->_profile;
	_tmp38_ = tootle_api_account_get_domain (_tmp37_);
	_tmp39_ = _tmp38_;
	_tmp40_ = _tmp39_;
	g_simple_action_set_enabled (_tmp30_, g_strcmp0 (_tmp36_, _tmp40_) != 0);
	_g_free0 (_tmp40_);
	_g_free0 (_tmp36_);
	if (refresh) {
		tootle_views_timeline_set_page_next ((TootleViewsTimeline*) self, NULL);
		tootle_views_timeline_on_refresh ((TootleViewsTimeline*) self);
	}
}

static void
tootle_views_profile_on_rs_updated (TootleViewsProfile* self)
{
	gchar* label = NULL;
	gchar* _tmp0_;
	TootleWidgetsAdaptiveButton* _tmp1_;
	TootleAPIRelationship* _tmp2_;
	GtkLabel* _tmp25_;
	const gchar* _tmp26_;
	GtkLabel* _tmp27_;
	const gchar* _tmp28_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup ("");
	label = _tmp0_;
	_tmp1_ = self->priv->rs_button;
	_tmp2_ = self->priv->_rs;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, _tmp2_ != NULL);
	if (_tmp2_ != NULL) {
		TootleAPIRelationship* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		gchar* action_icon = NULL;
		gchar* _tmp19_;
		gchar* action_label = NULL;
		gchar* _tmp20_;
		TootleWidgetsAdaptiveButton* _tmp21_;
		const gchar* _tmp22_;
		TootleWidgetsAdaptiveButton* _tmp23_;
		const gchar* _tmp24_;
		_tmp3_ = self->priv->_rs;
		_tmp4_ = tootle_api_relationship_get_requested (_tmp3_);
		_tmp5_ = _tmp4_;
		if (_tmp5_) {
			gchar* _tmp6_;
			_tmp6_ = g_strdup (_ ("Sent follow request"));
			_g_free0 (label);
			label = _tmp6_;
		} else {
			gboolean _tmp7_ = FALSE;
			TootleAPIRelationship* _tmp8_;
			gboolean _tmp9_;
			gboolean _tmp10_;
			_tmp8_ = self->priv->_rs;
			_tmp9_ = tootle_api_relationship_get_followed_by (_tmp8_);
			_tmp10_ = _tmp9_;
			if (_tmp10_) {
				TootleAPIRelationship* _tmp11_;
				gboolean _tmp12_;
				gboolean _tmp13_;
				_tmp11_ = self->priv->_rs;
				_tmp12_ = tootle_api_relationship_get_following (_tmp11_);
				_tmp13_ = _tmp12_;
				_tmp7_ = _tmp13_;
			} else {
				_tmp7_ = FALSE;
			}
			if (_tmp7_) {
				gchar* _tmp14_;
				_tmp14_ = g_strdup (_ ("Mutually follows you"));
				_g_free0 (label);
				label = _tmp14_;
			} else {
				TootleAPIRelationship* _tmp15_;
				gboolean _tmp16_;
				gboolean _tmp17_;
				_tmp15_ = self->priv->_rs;
				_tmp16_ = tootle_api_relationship_get_followed_by (_tmp15_);
				_tmp17_ = _tmp16_;
				if (_tmp17_) {
					gchar* _tmp18_;
					_tmp18_ = g_strdup (_ ("Follows you"));
					_g_free0 (label);
					label = _tmp18_;
				}
			}
		}
		_tmp19_ = g_strdup ("");
		action_icon = _tmp19_;
		_tmp20_ = g_strdup ("");
		action_label = _tmp20_;
		tootle_views_profile_get_rs_button_state (self, &action_label, &action_icon, &self->priv->rs_button_action, &self->priv->rs_button_action_target, &self->priv->rs_button_action_target_destroy_notify);
		_tmp21_ = self->priv->rs_button;
		_tmp22_ = action_icon;
		tootle_widgets_adaptive_button_set_icon_name (_tmp21_, _tmp22_);
		_tmp23_ = self->priv->rs_button;
		_tmp24_ = action_label;
		tootle_widgets_adaptive_button_set_label (_tmp23_, _tmp24_);
		_g_free0 (action_label);
		_g_free0 (action_icon);
	}
	_tmp25_ = self->priv->relationship;
	_tmp26_ = label;
	gtk_label_set_label (_tmp25_, _tmp26_);
	_tmp27_ = self->priv->relationship;
	_tmp28_ = label;
	gtk_widget_set_visible ((GtkWidget*) _tmp27_, g_strcmp0 (_tmp28_, "") != 0);
	tootle_views_profile_invalidate_actions (self, FALSE);
	_g_free0 (label);
}

static GVariant*
_variant_new15 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static gboolean
___lambda88_ (TootleViewsProfile* self)
{
	GSimpleAction* _tmp0_;
	GVariant* _tmp1_;
	TootleWidgetsAdaptiveButton* _tmp2_;
	gboolean result = FALSE;
	_tmp0_ = self->priv->blocking_action;
	_tmp1_ = _variant_new15 (FALSE);
	g_signal_emit_by_name (_tmp0_, "change-state", _tmp1_);
	_g_variant_unref0 (_tmp1_);
	_tmp2_ = self->priv->rs_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, TRUE);
	result = TRUE;
	return result;
}

static gboolean
____lambda88__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda88_ ((TootleViewsProfile*) self);
	return result;
}

static gboolean
____lambda89_ (TootleViewsProfile* self)
{
	TootleAPIRelationship* _tmp0_;
	gboolean result = FALSE;
	_tmp0_ = self->priv->_rs;
	tootle_api_relationship_modify (_tmp0_, "unfollow", NULL, NULL);
	result = TRUE;
	return result;
}

static gboolean
_____lambda89__gsource_func (gpointer self)
{
	gboolean result;
	result = ____lambda89_ ((TootleViewsProfile*) self);
	return result;
}

static gboolean
_____lambda90_ (TootleViewsProfile* self)
{
	TootleAPIRelationship* _tmp0_;
	gboolean result = FALSE;
	_tmp0_ = self->priv->_rs;
	tootle_api_relationship_modify (_tmp0_, "follow", NULL, NULL);
	result = TRUE;
	return result;
}

static gboolean
______lambda90__gsource_func (gpointer self)
{
	gboolean result;
	result = _____lambda90_ ((TootleViewsProfile*) self);
	return result;
}

static void
tootle_views_profile_get_rs_button_state (TootleViewsProfile* self,
                                          gchar* * label,
                                          gchar* * icon_name,
                                          GSourceFunc* fn,
                                          gpointer* fn_target,
                                          GDestroyNotify* fn_target_destroy_notify)
{
	TootleAPIRelationship* _tmp0_;
	TootleAPIRelationship* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*label != NULL);
	g_return_if_fail (*icon_name != NULL);
	_tmp0_ = self->priv->_rs;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->_rs;
	_tmp2_ = tootle_api_relationship_get_blocking (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = g_strdup (_ ("Unblock"));
		_g_free0 (*label);
		*label = _tmp4_;
		_tmp5_ = g_strdup ("view-reveal-symbolic");
		_g_free0 (*icon_name);
		*icon_name = _tmp5_;
		((*fn_target_destroy_notify) == NULL) ? NULL : ((*fn_target_destroy_notify) (*fn_target), NULL);
		*fn = NULL;
		*fn_target = NULL;
		*fn_target_destroy_notify = NULL;
		*fn = ____lambda88__gsource_func;
		*fn_target = g_object_ref (self);
		*fn_target_destroy_notify = g_object_unref;
		return;
	} else {
		gboolean _tmp6_ = FALSE;
		TootleAPIRelationship* _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp9_;
		_tmp7_ = self->priv->_rs;
		_tmp8_ = tootle_api_relationship_get_following (_tmp7_);
		_tmp9_ = _tmp8_;
		if (_tmp9_) {
			_tmp6_ = TRUE;
		} else {
			TootleAPIRelationship* _tmp10_;
			gboolean _tmp11_;
			gboolean _tmp12_;
			_tmp10_ = self->priv->_rs;
			_tmp11_ = tootle_api_relationship_get_requested (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp6_ = _tmp12_;
		}
		if (_tmp6_) {
			gchar* _tmp13_;
			gchar* _tmp14_;
			_tmp13_ = g_strdup (_ ("Unfollow"));
			_g_free0 (*label);
			*label = _tmp13_;
			_tmp14_ = g_strdup ("list-remove-symbolic");
			_g_free0 (*icon_name);
			*icon_name = _tmp14_;
			((*fn_target_destroy_notify) == NULL) ? NULL : ((*fn_target_destroy_notify) (*fn_target), NULL);
			*fn = NULL;
			*fn_target = NULL;
			*fn_target_destroy_notify = NULL;
			*fn = _____lambda89__gsource_func;
			*fn_target = g_object_ref (self);
			*fn_target_destroy_notify = g_object_unref;
			return;
		} else {
			TootleAPIRelationship* _tmp15_;
			gboolean _tmp16_;
			gboolean _tmp17_;
			_tmp15_ = self->priv->_rs;
			_tmp16_ = tootle_api_relationship_get_following (_tmp15_);
			_tmp17_ = _tmp16_;
			if (!_tmp17_) {
				gchar* _tmp18_;
				gchar* _tmp19_;
				_tmp18_ = g_strdup (_ ("Follow"));
				_g_free0 (*label);
				*label = _tmp18_;
				_tmp19_ = g_strdup ("list-add-symbolic");
				_g_free0 (*icon_name);
				*icon_name = _tmp19_;
				((*fn_target_destroy_notify) == NULL) ? NULL : ((*fn_target_destroy_notify) (*fn_target), NULL);
				*fn = NULL;
				*fn_target = NULL;
				*fn_target_destroy_notify = NULL;
				*fn = ______lambda90__gsource_func;
				*fn_target = g_object_ref (self);
				*fn_target_destroy_notify = g_object_unref;
				return;
			}
		}
	}
}

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

static TootleRequest*
tootle_views_profile_real_append_params (TootleViewsTimeline* base,
                                         TootleRequest* req)
{
	TootleViewsProfile * self;
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	TootleRequest* result = NULL;
	self = (TootleViewsProfile*) base;
	g_return_val_if_fail (req != NULL, NULL);
	_tmp1_ = tootle_views_timeline_get_page_next ((TootleViewsTimeline*) self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NULL) {
		const gchar* _tmp3_;
		_tmp3_ = self->priv->_source;
		_tmp0_ = g_strcmp0 (_tmp3_, "statuses") == 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gboolean _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		TootleRequest* _tmp7_;
		TootleRequest* _tmp8_;
		gboolean _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		TootleRequest* _tmp12_;
		TootleRequest* _tmp13_;
		TootleRequest* _tmp14_;
		_tmp4_ = self->priv->_include_replies;
		_tmp5_ = bool_to_string (!_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = tootle_request_with_param (req, "exclude_replies", _tmp6_);
		_tmp8_ = _tmp7_;
		_g_object_unref0 (_tmp8_);
		_g_free0 (_tmp6_);
		_tmp9_ = self->priv->_only_media;
		_tmp10_ = bool_to_string (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = tootle_request_with_param (req, "only_media", _tmp11_);
		_tmp13_ = _tmp12_;
		_g_object_unref0 (_tmp13_);
		_g_free0 (_tmp11_);
		_tmp14_ = TOOTLE_VIEWS_TIMELINE_CLASS (tootle_views_profile_parent_class)->append_params (G_TYPE_CHECK_INSTANCE_CAST (self, TOOTLE_VIEWS_TYPE_TIMELINE, TootleViewsTimeline), req);
		result = _tmp14_;
		return result;
	} else {
		TootleRequest* _tmp15_;
		_tmp15_ = _g_object_ref0 (req);
		result = _tmp15_;
		return result;
	}
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

static void
__lambda91_ (SoupSession* sess,
             SoupMessage* mess,
             GError** error)
{
	JsonNode* node = NULL;
	TootleNetwork* _tmp0_;
	JsonNode* _tmp1_;
	TootleAPIAccount* acc = NULL;
	JsonNode* _tmp2_;
	TootleAPIAccount* _tmp3_;
	TootleDialogsMainWindow* _tmp4_;
	TootleAPIAccount* _tmp5_;
	TootleViewsProfile* _tmp6_;
	TootleViewsProfile* _tmp7_;
	TootleViewsBase* _tmp8_;
	TootleViewsBase* _tmp9_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (sess != NULL);
	g_return_if_fail (mess != NULL);
	_tmp0_ = tootle_network;
	_tmp1_ = tootle_network_parse_node (_tmp0_, mess, &_inner_error0_);
	node = _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp2_ = node;
	_tmp3_ = tootle_api_account_from (_tmp2_, &_inner_error0_);
	acc = _tmp3_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		__vala_JsonNode_free0 (node);
		return;
	}
	_tmp4_ = tootle_window;
	_tmp5_ = acc;
	_tmp6_ = tootle_views_profile_new (_tmp5_);
	g_object_ref_sink (_tmp6_);
	_tmp7_ = _tmp6_;
	_tmp8_ = tootle_dialogs_main_window_open_view (_tmp4_, (TootleViewsBase*) _tmp7_);
	_tmp9_ = _tmp8_;
	_g_object_unref0 (_tmp9_);
	_g_object_unref0 (_tmp7_);
	_g_object_unref0 (acc);
	__vala_JsonNode_free0 (node);
}

static void
___lambda91__tootle_network_success_callback (SoupSession* session,
                                              SoupMessage* msg,
                                              gpointer self,
                                              GError** error)
{
	__lambda91_ (session, msg, error);
}

static void
__lambda92_ (gint32 status,
             const gchar* reason)
{
	TootleNetwork* _tmp0_;
	g_return_if_fail (reason != NULL);
	_tmp0_ = tootle_network;
	tootle_network_on_error (_tmp0_, status, reason);
}

static void
___lambda92__tootle_network_error_callback (gint32 code,
                                            const gchar* reason,
                                            gpointer self)
{
	__lambda92_ (code, reason);
}

void
tootle_views_profile_open_from_id (const gchar* id)
{
	SoupMessage* msg = NULL;
	TootleAccounts* _tmp0_;
	TootleInstanceAccount* _tmp1_;
	TootleInstanceAccount* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	SoupMessage* _tmp9_;
	SoupMessage* _tmp10_;
	TootleNetwork* _tmp11_;
	SoupMessage* _tmp12_;
	g_return_if_fail (id != NULL);
	_tmp0_ = tootle_accounts;
	_tmp1_ = tootle_accounts_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tootle_instance_account_get_instance (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = string_to_string (_tmp4_);
	_tmp6_ = string_to_string (id);
	_tmp7_ = g_strconcat (_tmp5_, "/api/v1/accounts/", _tmp6_, NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = soup_message_new ("GET", _tmp8_);
	_tmp10_ = _tmp9_;
	_g_free0 (_tmp8_);
	msg = _tmp10_;
	_tmp11_ = tootle_network;
	_tmp12_ = _g_object_ref0 (msg);
	tootle_network_queue (_tmp11_, _tmp12_, ___lambda91__tootle_network_success_callback, NULL, NULL, ___lambda92__tootle_network_error_callback, NULL, NULL);
	_g_object_unref0 (msg);
}

static void
tootle_views_profile_rebuild_fields (TootleViewsProfile* self)
{
	TootleAPIAccount* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_profile;
	_tmp1_ = tootle_api_account_get_fields (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		{
			GeeArrayList* _e_list = NULL;
			TootleAPIAccount* _tmp3_;
			GeeArrayList* _tmp4_;
			GeeArrayList* _tmp5_;
			gint _e_size = 0;
			GeeArrayList* _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			gint _e_index = 0;
			_tmp3_ = self->priv->_profile;
			_tmp4_ = tootle_api_account_get_fields (_tmp3_);
			_tmp5_ = _tmp4_;
			_e_list = _tmp5_;
			_tmp6_ = _e_list;
			_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
			_tmp8_ = _tmp7_;
			_e_size = _tmp8_;
			_e_index = -1;
			while (TRUE) {
				gint _tmp9_;
				gint _tmp10_;
				TootleEntity* e = NULL;
				GeeArrayList* _tmp11_;
				gpointer _tmp12_;
				TootleViewsProfileField* w = NULL;
				TootleEntity* _tmp13_;
				TootleViewsProfileField* _tmp14_;
				GtkListBox* _tmp15_;
				TootleViewsProfileField* _tmp16_;
				_e_index = _e_index + 1;
				_tmp9_ = _e_index;
				_tmp10_ = _e_size;
				if (!(_tmp9_ < _tmp10_)) {
					break;
				}
				_tmp11_ = _e_list;
				_tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, _e_index);
				e = (TootleEntity*) ((TootleAPIAccountField*) _tmp12_);
				_tmp13_ = e;
				_tmp14_ = tootle_views_profile_field_new (TOOTLE_API_IS_ACCOUNT_FIELD (_tmp13_) ? ((TootleAPIAccountField*) _tmp13_) : NULL);
				g_object_ref_sink (_tmp14_);
				w = _tmp14_;
				_tmp15_ = self->priv->profile_list;
				_tmp16_ = w;
				gtk_list_box_insert (_tmp15_, (GtkWidget*) _tmp16_, -1);
				_g_object_unref0 (w);
				_g_object_unref0 (e);
			}
		}
	}
}

TootleAPIAccount*
tootle_views_profile_get_profile (TootleViewsProfile* self)
{
	TootleAPIAccount* result;
	TootleAPIAccount* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_profile;
	result = _tmp0_;
	return result;
}

void
tootle_views_profile_set_profile (TootleViewsProfile* self,
                                  TootleAPIAccount* value)
{
	TootleAPIAccount* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_profile_get_profile (self);
	if (old_value != value) {
		TootleAPIAccount* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_profile);
		self->priv->_profile = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_PROFILE_PROPERTY]);
	}
}

TootleAPIRelationship*
tootle_views_profile_get_rs (TootleViewsProfile* self)
{
	TootleAPIRelationship* result;
	TootleAPIRelationship* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_rs;
	result = _tmp0_;
	return result;
}

void
tootle_views_profile_set_rs (TootleViewsProfile* self,
                             TootleAPIRelationship* value)
{
	TootleAPIRelationship* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_profile_get_rs (self);
	if (old_value != value) {
		TootleAPIRelationship* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_rs);
		self->priv->_rs = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_RS_PROPERTY]);
	}
}

gboolean
tootle_views_profile_get_include_replies (TootleViewsProfile* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_include_replies;
	return result;
}

void
tootle_views_profile_set_include_replies (TootleViewsProfile* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_profile_get_include_replies (self);
	if (old_value != value) {
		self->priv->_include_replies = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_INCLUDE_REPLIES_PROPERTY]);
	}
}

gboolean
tootle_views_profile_get_only_media (TootleViewsProfile* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_only_media;
	return result;
}

void
tootle_views_profile_set_only_media (TootleViewsProfile* self,
                                     gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_profile_get_only_media (self);
	if (old_value != value) {
		self->priv->_only_media = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_ONLY_MEDIA_PROPERTY]);
	}
}

const gchar*
tootle_views_profile_get_source (TootleViewsProfile* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_source;
	result = _tmp0_;
	return result;
}

void
tootle_views_profile_set_source (TootleViewsProfile* self,
                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_views_profile_get_source (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_source);
		self->priv->_source = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_SOURCE_PROPERTY]);
	}
}

static inline gpointer
tootle_views_profile_field_get_instance_private (TootleViewsProfileField* self)
{
	return G_STRUCT_MEMBER_P (self, TootleViewsProfileField_private_offset);
}

TootleViewsProfileField*
tootle_views_profile_field_construct (GType object_type,
                                      TootleAPIAccountField* field)
{
	TootleViewsProfileField * self = NULL;
	TootleWidgetsRichLabel* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	TootleWidgetsRichLabel* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_val_if_fail (field != NULL, NULL);
	self = (TootleViewsProfileField*) g_object_new (object_type, NULL);
	_tmp0_ = self->priv->name_label;
	_tmp1_ = tootle_api_account_field_get_name (field);
	_tmp2_ = _tmp1_;
	tootle_widgets_rich_label_set_text (_tmp0_, _tmp2_);
	_tmp3_ = self->priv->value_label;
	_tmp4_ = tootle_api_account_field_get_val (field);
	_tmp5_ = _tmp4_;
	tootle_widgets_rich_label_set_text (_tmp3_, _tmp5_);
	return self;
}

TootleViewsProfileField*
tootle_views_profile_field_new (TootleAPIAccountField* field)
{
	return tootle_views_profile_field_construct (TOOTLE_VIEWS_PROFILE_TYPE_FIELD, field);
}

static void
tootle_views_profile_field_class_init (TootleViewsProfileFieldClass * klass,
                                       gpointer klass_data)
{
	tootle_views_profile_field_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TootleViewsProfileField_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tootle_views_profile_field_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/bleakgrey/tootle/ui/widgets/profile_field_row.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "name_label", FALSE, TootleViewsProfileField_private_offset + G_STRUCT_OFFSET (TootleViewsProfileFieldPrivate, name_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "value_label", FALSE, TootleViewsProfileField_private_offset + G_STRUCT_OFFSET (TootleViewsProfileFieldPrivate, value_label));
}

static void
tootle_views_profile_field_instance_init (TootleViewsProfileField * self,
                                          gpointer klass)
{
	self->priv = tootle_views_profile_field_get_instance_private (self);
	g_type_ensure (TOOTLE_WIDGETS_TYPE_RICH_LABEL);
	g_type_ensure (TOOTLE_WIDGETS_TYPE_RICH_LABEL);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
tootle_views_profile_field_finalize (GObject * obj)
{
	TootleViewsProfileField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_VIEWS_PROFILE_TYPE_FIELD, TootleViewsProfileField);
	G_OBJECT_CLASS (tootle_views_profile_field_parent_class)->finalize (obj);
}

static GType
tootle_views_profile_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TootleViewsProfileFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tootle_views_profile_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TootleViewsProfileField), 0, (GInstanceInitFunc) tootle_views_profile_field_instance_init, NULL };
	GType tootle_views_profile_field_type_id;
	tootle_views_profile_field_type_id = g_type_register_static (gtk_list_box_row_get_type (), "TootleViewsProfileField", &g_define_type_info, 0);
	TootleViewsProfileField_private_offset = g_type_add_instance_private (tootle_views_profile_field_type_id, sizeof (TootleViewsProfileFieldPrivate));
	return tootle_views_profile_field_type_id;
}

GType
tootle_views_profile_field_get_type (void)
{
	static volatile gsize tootle_views_profile_field_type_id__volatile = 0;
	if (g_once_init_enter (&tootle_views_profile_field_type_id__volatile)) {
		GType tootle_views_profile_field_type_id;
		tootle_views_profile_field_type_id = tootle_views_profile_field_get_type_once ();
		g_once_init_leave (&tootle_views_profile_field_type_id__volatile, tootle_views_profile_field_type_id);
	}
	return tootle_views_profile_field_type_id__volatile;
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static gboolean
_tootle_views_profile___lambda93_ (TootleViewsProfile* self,
                                   GBinding* b,
                                   GValue* src,
                                   GValue* target)
{
	gchar* text = NULL;
	GValue _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	GtkListBoxRow* _tmp3_;
	const gchar* _tmp4_;
	gboolean result = FALSE;
	g_return_val_if_fail (b != NULL, FALSE);
	g_return_val_if_fail (src != NULL, FALSE);
	g_return_val_if_fail (target != NULL, FALSE);
	_tmp0_ = *src;
	_tmp1_ = g_strdup (g_value_get_string (&_tmp0_));
	text = _tmp1_;
	_tmp2_ = text;
	g_value_set_string (target, _tmp2_);
	_tmp3_ = self->priv->note_row;
	_tmp4_ = text;
	gtk_widget_set_visible ((GtkWidget*) _tmp3_, g_strcmp0 (_tmp4_, "") != 0);
	result = TRUE;
	_g_free0 (text);
	return result;
}

static gboolean
__tootle_views_profile___lambda93__gbinding_transform_func (GBinding* binding,
                                                            GValue* from_value,
                                                            GValue* to_value,
                                                            gpointer self)
{
	gboolean result;
	result = _tootle_views_profile___lambda93_ ((TootleViewsProfile*) self, binding, from_value, to_value);
	return result;
}

static void
_tootle_views_profile_on_rs_updated_g_object_notify (GObject* _sender,
                                                     GParamSpec* pspec,
                                                     gpointer self)
{
	tootle_views_profile_on_rs_updated ((TootleViewsProfile*) self);
}

static GObject *
tootle_views_profile_constructor (GType type,
                                  guint n_construct_properties,
                                  GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TootleViewsProfile * self;
	GtkBuilder* builder = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GtkBuilder* _tmp3_;
	GtkBuilder* _tmp4_;
	GtkBuilder* _tmp5_;
	GObject* _tmp6_;
	GtkListBox* _tmp7_;
	GtkGrid* hdr = NULL;
	GtkBuilder* _tmp8_;
	GObject* _tmp9_;
	GtkGrid* _tmp10_;
	GtkBox* _tmp11_;
	GtkGrid* _tmp12_;
	GtkBox* _tmp13_;
	GtkGrid* _tmp14_;
	TootleWidgetsAvatar* avatar = NULL;
	GtkBuilder* _tmp15_;
	GObject* _tmp16_;
	TootleWidgetsAvatar* _tmp17_;
	TootleWidgetsAvatar* _tmp18_;
	TootleAPIAccount* _tmp19_;
	gchar* domain = NULL;
	TootleAPIAccount* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	TootleWidgetsTimelineMenu* _tmp26_;
	GtkLabel* _tmp27_;
	TootleAPIAccount* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	const gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	TootleWidgetsTimelineMenu* _tmp35_;
	GtkLabel* _tmp36_;
	const gchar* _tmp37_;
	TootleAPIAccount* _tmp38_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	TootleWidgetsRichLabel* handle = NULL;
	GtkBuilder* _tmp43_;
	GObject* _tmp44_;
	TootleWidgetsRichLabel* _tmp45_;
	TootleAPIAccount* _tmp46_;
	TootleWidgetsRichLabel* _tmp47_;
	GtkBuilder* _tmp48_;
	GObject* _tmp49_;
	TootleWidgetsMarkupView* note = NULL;
	GtkBuilder* _tmp50_;
	GObject* _tmp51_;
	TootleWidgetsMarkupView* _tmp52_;
	TootleAPIAccount* _tmp53_;
	TootleWidgetsMarkupView* _tmp54_;
	GtkBuilder* _tmp55_;
	GObject* _tmp56_;
	GtkLabel* _tmp57_;
	TootleAPIRelationship* _tmp58_;
	parent_class = G_OBJECT_CLASS (tootle_views_profile_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_VIEWS_TYPE_PROFILE, TootleViewsProfile);
	tootle_views_profile_build_actions (self);
	_tmp0_ = string_to_string (BUILD_RESOURCES);
	_tmp1_ = g_strconcat (_tmp0_, "ui/views/profile_header.ui", NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_builder_new_from_resource (_tmp2_);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	builder = _tmp4_;
	_tmp5_ = builder;
	_tmp6_ = gtk_builder_get_object (_tmp5_, "profile_list");
	_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, gtk_list_box_get_type ()) ? ((GtkListBox*) _tmp6_) : NULL);
	_g_object_unref0 (self->priv->profile_list);
	self->priv->profile_list = _tmp7_;
	_tmp8_ = builder;
	_tmp9_ = gtk_builder_get_object (_tmp8_, "grid");
	_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, gtk_grid_get_type ()) ? ((GtkGrid*) _tmp9_) : NULL);
	hdr = _tmp10_;
	_tmp11_ = ((TootleViewsBase*) self)->column_view;
	_tmp12_ = hdr;
	gtk_box_pack_start (_tmp11_, (GtkWidget*) _tmp12_, FALSE, FALSE, (guint) 0);
	_tmp13_ = ((TootleViewsBase*) self)->column_view;
	_tmp14_ = hdr;
	gtk_box_reorder_child (_tmp13_, (GtkWidget*) _tmp14_, 0);
	_tmp15_ = builder;
	_tmp16_ = gtk_builder_get_object (_tmp15_, "avatar");
	_tmp17_ = _g_object_ref0 (TOOTLE_WIDGETS_IS_AVATAR (_tmp16_) ? ((TootleWidgetsAvatar*) _tmp16_) : NULL);
	avatar = _tmp17_;
	_tmp18_ = avatar;
	_tmp19_ = self->priv->_profile;
	tootle_widgets_avatar_set_account (_tmp18_, _tmp19_);
	_tmp20_ = self->priv->_profile;
	_tmp21_ = tootle_api_account_get_domain (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = _tmp22_;
	_tmp24_ = g_strconcat ("@", _tmp23_, NULL);
	_tmp25_ = _tmp24_;
	_g_free0 (_tmp23_);
	domain = _tmp25_;
	_tmp26_ = self->priv->menu_button;
	_tmp27_ = _tmp26_->title;
	_tmp28_ = self->priv->_profile;
	_tmp29_ = tootle_api_account_get_handle (_tmp28_);
	_tmp30_ = _tmp29_;
	_tmp31_ = _tmp30_;
	_tmp32_ = domain;
	_tmp33_ = string_replace (_tmp31_, _tmp32_, "");
	_tmp34_ = _tmp33_;
	gtk_label_set_label (_tmp27_, _tmp34_);
	_g_free0 (_tmp34_);
	_g_free0 (_tmp31_);
	_tmp35_ = self->priv->menu_button;
	_tmp36_ = _tmp35_->subtitle;
	_tmp37_ = domain;
	gtk_label_set_label (_tmp36_, _tmp37_);
	_tmp38_ = self->priv->_profile;
	_tmp39_ = tootle_api_account_get_acct (_tmp38_);
	_tmp40_ = _tmp39_;
	if (string_contains (_tmp40_, "@")) {
		TootleWidgetsTimelineMenu* _tmp41_;
		GtkLabel* _tmp42_;
		_tmp41_ = self->priv->menu_button;
		_tmp42_ = _tmp41_->subtitle;
		gtk_widget_show ((GtkWidget*) _tmp42_);
	}
	_tmp43_ = builder;
	_tmp44_ = gtk_builder_get_object (_tmp43_, "handle");
	_tmp45_ = _g_object_ref0 (TOOTLE_WIDGETS_IS_RICH_LABEL (_tmp44_) ? ((TootleWidgetsRichLabel*) _tmp44_) : NULL);
	handle = _tmp45_;
	_tmp46_ = self->priv->_profile;
	_tmp47_ = handle;
	g_object_bind_property_with_closures ((GObject*) _tmp46_, "display-name", (GObject*) _tmp47_, "text", 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)));
	_tmp48_ = builder;
	_tmp49_ = gtk_builder_get_object (_tmp48_, "note_row");
	self->priv->note_row = G_TYPE_CHECK_INSTANCE_TYPE (_tmp49_, gtk_list_box_row_get_type ()) ? ((GtkListBoxRow*) _tmp49_) : NULL;
	_tmp50_ = builder;
	_tmp51_ = gtk_builder_get_object (_tmp50_, "note");
	_tmp52_ = _g_object_ref0 (TOOTLE_WIDGETS_IS_MARKUP_VIEW (_tmp51_) ? ((TootleWidgetsMarkupView*) _tmp51_) : NULL);
	note = _tmp52_;
	_tmp53_ = self->priv->_profile;
	_tmp54_ = note;
	g_object_bind_property_with_closures ((GObject*) _tmp53_, "note", (GObject*) _tmp54_, "content", G_BINDING_SYNC_CREATE, (GClosure*) ((__tootle_views_profile___lambda93__gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) __tootle_views_profile___lambda93__gbinding_transform_func, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp55_ = builder;
	_tmp56_ = gtk_builder_get_object (_tmp55_, "relationship");
	_tmp57_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp56_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp56_) : NULL);
	_g_object_unref0 (self->priv->relationship);
	self->priv->relationship = _tmp57_;
	_tmp58_ = self->priv->_rs;
	g_signal_connect_object ((GObject*) _tmp58_, "notify::id", (GCallback) _tootle_views_profile_on_rs_updated_g_object_notify, self, 0);
	tootle_views_profile_rebuild_fields (self);
	_g_object_unref0 (note);
	_g_object_unref0 (handle);
	_g_free0 (domain);
	_g_object_unref0 (avatar);
	_g_object_unref0 (hdr);
	_g_object_unref0 (builder);
	return obj;
}

static void
tootle_views_profile_class_init (TootleViewsProfileClass * klass,
                                 gpointer klass_data)
{
	tootle_views_profile_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TootleViewsProfile_private_offset);
	((TootleViewsBaseClass *) klass)->build_header = (void (*) (TootleViewsBase*)) tootle_views_profile_real_build_header;
	((TootleViewsTimelineClass *) klass)->append_params = (TootleRequest* (*) (TootleViewsTimeline*, TootleRequest*)) tootle_views_profile_real_append_params;
	G_OBJECT_CLASS (klass)->get_property = _vala_tootle_views_profile_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tootle_views_profile_set_property;
	G_OBJECT_CLASS (klass)->constructor = tootle_views_profile_constructor;
	G_OBJECT_CLASS (klass)->finalize = tootle_views_profile_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_PROFILE_PROFILE_PROPERTY, tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_PROFILE_PROPERTY] = g_param_spec_object ("profile", "profile", "profile", TOOTLE_API_TYPE_ACCOUNT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_PROFILE_RS_PROPERTY, tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_RS_PROPERTY] = g_param_spec_object ("rs", "rs", "rs", TOOTLE_API_TYPE_RELATIONSHIP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_PROFILE_INCLUDE_REPLIES_PROPERTY, tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_INCLUDE_REPLIES_PROPERTY] = g_param_spec_boolean ("include-replies", "include-replies", "include-replies", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_PROFILE_ONLY_MEDIA_PROPERTY, tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_ONLY_MEDIA_PROPERTY] = g_param_spec_boolean ("only-media", "only-media", "only-media", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_VIEWS_PROFILE_SOURCE_PROPERTY, tootle_views_profile_properties[TOOTLE_VIEWS_PROFILE_SOURCE_PROPERTY] = g_param_spec_string ("source", "source", "source", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tootle_views_profile_instance_init (TootleViewsProfile * self,
                                    gpointer klass)
{
	gchar* _tmp0_;
	self->priv = tootle_views_profile_get_instance_private (self);
	self->priv->_include_replies = FALSE;
	self->priv->_only_media = FALSE;
	_tmp0_ = g_strdup ("statuses");
	self->priv->_source = _tmp0_;
}

static void
tootle_views_profile_finalize (GObject * obj)
{
	TootleViewsProfile * self;
	TootleWidgetsTimelineMenu* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_VIEWS_TYPE_PROFILE, TootleViewsProfile);
	_tmp0_ = self->priv->menu_button;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
	_g_object_unref0 (self->priv->_profile);
	_g_object_unref0 (self->priv->_rs);
	_g_free0 (self->priv->_source);
	_g_object_unref0 (self->priv->media_action);
	_g_object_unref0 (self->priv->replies_action);
	_g_object_unref0 (self->priv->muting_action);
	_g_object_unref0 (self->priv->hiding_reblogs_action);
	_g_object_unref0 (self->priv->blocking_action);
	_g_object_unref0 (self->priv->domain_blocking_action);
	_g_object_unref0 (self->priv->profile_list);
	_g_object_unref0 (self->priv->relationship);
	_g_object_unref0 (self->priv->menu_button);
	_g_object_unref0 (self->priv->rs_button);
	(self->priv->rs_button_action_target_destroy_notify == NULL) ? NULL : (self->priv->rs_button_action_target_destroy_notify (self->priv->rs_button_action_target), NULL);
	self->priv->rs_button_action = NULL;
	self->priv->rs_button_action_target = NULL;
	self->priv->rs_button_action_target_destroy_notify = NULL;
	G_OBJECT_CLASS (tootle_views_profile_parent_class)->finalize (obj);
}

static GType
tootle_views_profile_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TootleViewsProfileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tootle_views_profile_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TootleViewsProfile), 0, (GInstanceInitFunc) tootle_views_profile_instance_init, NULL };
	GType tootle_views_profile_type_id;
	tootle_views_profile_type_id = g_type_register_static (TOOTLE_VIEWS_TYPE_TIMELINE, "TootleViewsProfile", &g_define_type_info, 0);
	TootleViewsProfile_private_offset = g_type_add_instance_private (tootle_views_profile_type_id, sizeof (TootleViewsProfilePrivate));
	return tootle_views_profile_type_id;
}

GType
tootle_views_profile_get_type (void)
{
	static volatile gsize tootle_views_profile_type_id__volatile = 0;
	if (g_once_init_enter (&tootle_views_profile_type_id__volatile)) {
		GType tootle_views_profile_type_id;
		tootle_views_profile_type_id = tootle_views_profile_get_type_once ();
		g_once_init_leave (&tootle_views_profile_type_id__volatile, tootle_views_profile_type_id);
	}
	return tootle_views_profile_type_id__volatile;
}

static void
_vala_tootle_views_profile_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	TootleViewsProfile * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TOOTLE_VIEWS_TYPE_PROFILE, TootleViewsProfile);
	switch (property_id) {
		case TOOTLE_VIEWS_PROFILE_PROFILE_PROPERTY:
		g_value_set_object (value, tootle_views_profile_get_profile (self));
		break;
		case TOOTLE_VIEWS_PROFILE_RS_PROPERTY:
		g_value_set_object (value, tootle_views_profile_get_rs (self));
		break;
		case TOOTLE_VIEWS_PROFILE_INCLUDE_REPLIES_PROPERTY:
		g_value_set_boolean (value, tootle_views_profile_get_include_replies (self));
		break;
		case TOOTLE_VIEWS_PROFILE_ONLY_MEDIA_PROPERTY:
		g_value_set_boolean (value, tootle_views_profile_get_only_media (self));
		break;
		case TOOTLE_VIEWS_PROFILE_SOURCE_PROPERTY:
		g_value_set_string (value, tootle_views_profile_get_source (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tootle_views_profile_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	TootleViewsProfile * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TOOTLE_VIEWS_TYPE_PROFILE, TootleViewsProfile);
	switch (property_id) {
		case TOOTLE_VIEWS_PROFILE_PROFILE_PROPERTY:
		tootle_views_profile_set_profile (self, g_value_get_object (value));
		break;
		case TOOTLE_VIEWS_PROFILE_RS_PROPERTY:
		tootle_views_profile_set_rs (self, g_value_get_object (value));
		break;
		case TOOTLE_VIEWS_PROFILE_INCLUDE_REPLIES_PROPERTY:
		tootle_views_profile_set_include_replies (self, g_value_get_boolean (value));
		break;
		case TOOTLE_VIEWS_PROFILE_ONLY_MEDIA_PROPERTY:
		tootle_views_profile_set_only_media (self, g_value_get_boolean (value));
		break;
		case TOOTLE_VIEWS_PROFILE_SOURCE_PROPERTY:
		tootle_views_profile_set_source (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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;
}

