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

/*  This file is part of corebird, a Gtk+ linux Twitter client.
 *  Copyright (C) 2013 Timm Bäder
 *
 *  corebird is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  corebird is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with corebird.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <json-glib/json-glib.h>


#define TYPE_MAIN_WIDGET (main_widget_get_type ())
#define MAIN_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN_WIDGET, MainWidget))
#define MAIN_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN_WIDGET, MainWidgetClass))
#define IS_MAIN_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN_WIDGET))
#define IS_MAIN_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN_WIDGET))
#define MAIN_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN_WIDGET, MainWidgetClass))

typedef struct _MainWidget MainWidget;
typedef struct _MainWidgetClass MainWidgetClass;
typedef struct _MainWidgetPrivate MainWidgetPrivate;

#define TYPE_ACCOUNT (account_get_type ())
#define ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ACCOUNT, Account))
#define ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ACCOUNT, AccountClass))
#define IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ACCOUNT))
#define IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ACCOUNT))
#define ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ACCOUNT, AccountClass))

typedef struct _Account Account;
typedef struct _AccountClass AccountClass;

#define TYPE_COREBIRD (corebird_get_type ())
#define COREBIRD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COREBIRD, Corebird))
#define COREBIRD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COREBIRD, CorebirdClass))
#define IS_COREBIRD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COREBIRD))
#define IS_COREBIRD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COREBIRD))
#define COREBIRD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COREBIRD, CorebirdClass))

typedef struct _Corebird Corebird;
typedef struct _CorebirdClass CorebirdClass;

#define TYPE_IPAGE (ipage_get_type ())
#define IPAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IPAGE, IPage))
#define IS_IPAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IPAGE))
#define IPAGE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_IPAGE, IPageIface))

typedef struct _IPage IPage;
typedef struct _IPageIface IPageIface;

#define TYPE_BUNDLE (bundle_get_type ())
#define BUNDLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BUNDLE, Bundle))
#define BUNDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BUNDLE, BundleClass))
#define IS_BUNDLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BUNDLE))
#define IS_BUNDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BUNDLE))
#define BUNDLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BUNDLE, BundleClass))

typedef struct _Bundle Bundle;
typedef struct _BundleClass BundleClass;

#define TYPE_MAIN_WINDOW (main_window_get_type ())
#define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN_WINDOW, MainWindow))
#define MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN_WINDOW, MainWindowClass))
#define IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN_WINDOW))
#define IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN_WINDOW))
#define MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN_WINDOW, MainWindowClass))

typedef struct _MainWindow MainWindow;
typedef struct _MainWindowClass MainWindowClass;

#define TYPE_BUNDLE_HISTORY (bundle_history_get_type ())
#define BUNDLE_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BUNDLE_HISTORY, BundleHistory))
#define BUNDLE_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BUNDLE_HISTORY, BundleHistoryClass))
#define IS_BUNDLE_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BUNDLE_HISTORY))
#define IS_BUNDLE_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BUNDLE_HISTORY))
#define BUNDLE_HISTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BUNDLE_HISTORY, BundleHistoryClass))

typedef struct _BundleHistory BundleHistory;
typedef struct _BundleHistoryClass BundleHistoryClass;

#define TYPE_DELTA_UPDATER (delta_updater_get_type ())
#define DELTA_UPDATER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELTA_UPDATER, DeltaUpdater))
#define DELTA_UPDATER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELTA_UPDATER, DeltaUpdaterClass))
#define IS_DELTA_UPDATER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELTA_UPDATER))
#define IS_DELTA_UPDATER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELTA_UPDATER))
#define DELTA_UPDATER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELTA_UPDATER, DeltaUpdaterClass))

typedef struct _DeltaUpdater DeltaUpdater;
typedef struct _DeltaUpdaterClass DeltaUpdaterClass;

#define TYPE_IMPOSTOR_WIDGET (impostor_widget_get_type ())
#define IMPOSTOR_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPOSTOR_WIDGET, ImpostorWidget))
#define IMPOSTOR_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPOSTOR_WIDGET, ImpostorWidgetClass))
#define IS_IMPOSTOR_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPOSTOR_WIDGET))
#define IS_IMPOSTOR_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPOSTOR_WIDGET))
#define IMPOSTOR_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPOSTOR_WIDGET, ImpostorWidgetClass))

typedef struct _ImpostorWidget ImpostorWidget;
typedef struct _ImpostorWidgetClass ImpostorWidgetClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _bundle_history_unref0(var) ((var == NULL) ? NULL : (var = (bundle_history_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_USER_STREAM (user_stream_get_type ())
#define USER_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_USER_STREAM, UserStream))
#define USER_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_USER_STREAM, UserStreamClass))
#define IS_USER_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_USER_STREAM))
#define IS_USER_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_USER_STREAM))
#define USER_STREAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_USER_STREAM, UserStreamClass))

typedef struct _UserStream UserStream;
typedef struct _UserStreamClass UserStreamClass;

#define TYPE_PAGE (page_get_type ())

#define TYPE_SCROLL_WIDGET (scroll_widget_get_type ())
#define SCROLL_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCROLL_WIDGET, ScrollWidget))
#define SCROLL_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCROLL_WIDGET, ScrollWidgetClass))
#define IS_SCROLL_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCROLL_WIDGET))
#define IS_SCROLL_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCROLL_WIDGET))
#define SCROLL_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCROLL_WIDGET, ScrollWidgetClass))

typedef struct _ScrollWidget ScrollWidget;
typedef struct _ScrollWidgetClass ScrollWidgetClass;

#define TYPE_DEFAULT_TIMELINE (default_timeline_get_type ())
#define DEFAULT_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DEFAULT_TIMELINE, DefaultTimeline))
#define DEFAULT_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DEFAULT_TIMELINE, DefaultTimelineClass))
#define IS_DEFAULT_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEFAULT_TIMELINE))
#define IS_DEFAULT_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEFAULT_TIMELINE))
#define DEFAULT_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DEFAULT_TIMELINE, DefaultTimelineClass))

typedef struct _DefaultTimeline DefaultTimeline;
typedef struct _DefaultTimelineClass DefaultTimelineClass;

#define TYPE_HOME_TIMELINE (home_timeline_get_type ())
#define HOME_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HOME_TIMELINE, HomeTimeline))
#define HOME_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HOME_TIMELINE, HomeTimelineClass))
#define IS_HOME_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HOME_TIMELINE))
#define IS_HOME_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HOME_TIMELINE))
#define HOME_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HOME_TIMELINE, HomeTimelineClass))

typedef struct _HomeTimeline HomeTimeline;
typedef struct _HomeTimelineClass HomeTimelineClass;

#define TYPE_MENTIONS_TIMELINE (mentions_timeline_get_type ())
#define MENTIONS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MENTIONS_TIMELINE, MentionsTimeline))
#define MENTIONS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MENTIONS_TIMELINE, MentionsTimelineClass))
#define IS_MENTIONS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MENTIONS_TIMELINE))
#define IS_MENTIONS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MENTIONS_TIMELINE))
#define MENTIONS_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MENTIONS_TIMELINE, MentionsTimelineClass))

typedef struct _MentionsTimeline MentionsTimeline;
typedef struct _MentionsTimelineClass MentionsTimelineClass;

#define TYPE_FAVORITES_TIMELINE (favorites_timeline_get_type ())
#define FAVORITES_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FAVORITES_TIMELINE, FavoritesTimeline))
#define FAVORITES_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FAVORITES_TIMELINE, FavoritesTimelineClass))
#define IS_FAVORITES_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FAVORITES_TIMELINE))
#define IS_FAVORITES_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FAVORITES_TIMELINE))
#define FAVORITES_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FAVORITES_TIMELINE, FavoritesTimelineClass))

typedef struct _FavoritesTimeline FavoritesTimeline;
typedef struct _FavoritesTimelineClass FavoritesTimelineClass;

#define TYPE_DM_THREADS_PAGE (dm_threads_page_get_type ())
#define DM_THREADS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DM_THREADS_PAGE, DMThreadsPage))
#define DM_THREADS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DM_THREADS_PAGE, DMThreadsPageClass))
#define IS_DM_THREADS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DM_THREADS_PAGE))
#define IS_DM_THREADS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DM_THREADS_PAGE))
#define DM_THREADS_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DM_THREADS_PAGE, DMThreadsPageClass))

typedef struct _DMThreadsPage DMThreadsPage;
typedef struct _DMThreadsPageClass DMThreadsPageClass;

#define TYPE_LISTS_PAGE (lists_page_get_type ())
#define LISTS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LISTS_PAGE, ListsPage))
#define LISTS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LISTS_PAGE, ListsPageClass))
#define IS_LISTS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LISTS_PAGE))
#define IS_LISTS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LISTS_PAGE))
#define LISTS_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LISTS_PAGE, ListsPageClass))

typedef struct _ListsPage ListsPage;
typedef struct _ListsPageClass ListsPageClass;

#define TYPE_FILTER_PAGE (filter_page_get_type ())
#define FILTER_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FILTER_PAGE, FilterPage))
#define FILTER_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FILTER_PAGE, FilterPageClass))
#define IS_FILTER_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FILTER_PAGE))
#define IS_FILTER_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FILTER_PAGE))
#define FILTER_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FILTER_PAGE, FilterPageClass))

typedef struct _FilterPage FilterPage;
typedef struct _FilterPageClass FilterPageClass;

#define TYPE_SEARCH_PAGE (search_page_get_type ())
#define SEARCH_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_PAGE, SearchPage))
#define SEARCH_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_PAGE, SearchPageClass))
#define IS_SEARCH_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_PAGE))
#define IS_SEARCH_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_PAGE))
#define SEARCH_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_PAGE, SearchPageClass))

typedef struct _SearchPage SearchPage;
typedef struct _SearchPageClass SearchPageClass;

#define TYPE_PROFILE_PAGE (profile_page_get_type ())
#define PROFILE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROFILE_PAGE, ProfilePage))
#define PROFILE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROFILE_PAGE, ProfilePageClass))
#define IS_PROFILE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROFILE_PAGE))
#define IS_PROFILE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROFILE_PAGE))
#define PROFILE_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROFILE_PAGE, ProfilePageClass))

typedef struct _ProfilePage ProfilePage;
typedef struct _ProfilePageClass ProfilePageClass;

#define TYPE_TWEET_INFO_PAGE (tweet_info_page_get_type ())
#define TWEET_INFO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TWEET_INFO_PAGE, TweetInfoPage))
#define TWEET_INFO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TWEET_INFO_PAGE, TweetInfoPageClass))
#define IS_TWEET_INFO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TWEET_INFO_PAGE))
#define IS_TWEET_INFO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TWEET_INFO_PAGE))
#define TWEET_INFO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TWEET_INFO_PAGE, TweetInfoPageClass))

typedef struct _TweetInfoPage TweetInfoPage;
typedef struct _TweetInfoPageClass TweetInfoPageClass;

#define TYPE_DM_PAGE (dm_page_get_type ())
#define DM_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DM_PAGE, DMPage))
#define DM_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DM_PAGE, DMPageClass))
#define IS_DM_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DM_PAGE))
#define IS_DM_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DM_PAGE))
#define DM_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DM_PAGE, DMPageClass))

typedef struct _DMPage DMPage;
typedef struct _DMPageClass DMPageClass;

#define TYPE_LIST_STATUSES_PAGE (list_statuses_page_get_type ())
#define LIST_STATUSES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIST_STATUSES_PAGE, ListStatusesPage))
#define LIST_STATUSES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIST_STATUSES_PAGE, ListStatusesPageClass))
#define IS_LIST_STATUSES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIST_STATUSES_PAGE))
#define IS_LIST_STATUSES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIST_STATUSES_PAGE))
#define LIST_STATUSES_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIST_STATUSES_PAGE, ListStatusesPageClass))

typedef struct _ListStatusesPage ListStatusesPage;
typedef struct _ListStatusesPageClass ListStatusesPageClass;
typedef struct _Block3Data Block3Data;

#define TYPE_IMESSAGE_RECEIVER (imessage_receiver_get_type ())
#define IMESSAGE_RECEIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMESSAGE_RECEIVER, IMessageReceiver))
#define IS_IMESSAGE_RECEIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMESSAGE_RECEIVER))
#define IMESSAGE_RECEIVER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_IMESSAGE_RECEIVER, IMessageReceiverIface))

typedef struct _IMessageReceiver IMessageReceiver;
typedef struct _IMessageReceiverIface IMessageReceiverIface;

#define TYPE_STREAM_MESSAGE_TYPE (stream_message_type_get_type ())

#define TYPE_ITIMELINE (itimeline_get_type ())
#define ITIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ITIMELINE, ITimeline))
#define IS_ITIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ITIMELINE))
#define ITIMELINE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_ITIMELINE, ITimelineIface))

typedef struct _ITimeline ITimeline;
typedef struct _ITimelineIface ITimelineIface;

#define TYPE_TWEET_LIST_BOX (tweet_list_box_get_type ())
#define TWEET_LIST_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TWEET_LIST_BOX, TweetListBox))
#define TWEET_LIST_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TWEET_LIST_BOX, TweetListBoxClass))
#define IS_TWEET_LIST_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TWEET_LIST_BOX))
#define IS_TWEET_LIST_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TWEET_LIST_BOX))
#define TWEET_LIST_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TWEET_LIST_BOX, TweetListBoxClass))

typedef struct _TweetListBox TweetListBox;
typedef struct _TweetListBoxClass TweetListBoxClass;
typedef struct _SearchPagePrivate SearchPagePrivate;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _MainWindowPrivate MainWindowPrivate;

struct _MainWidget {
	GtkBox parent_instance;
	MainWidgetPrivate * priv;
	GtkSizeGroup* sidebar_size_group;
};

struct _MainWidgetClass {
	GtkBoxClass parent_class;
};

struct _IPageIface {
	GTypeInterface parent_iface;
	void (*on_join) (IPage* self, gint page_id, Bundle* args);
	void (*on_leave) (IPage* self);
	void (*create_tool_button) (IPage* self, GtkRadioButton* group);
	GtkRadioButton* (*get_tool_button) (IPage* self);
	gchar* (*get_title) (IPage* self);
	gboolean (*handles_double_open) (IPage* self);
	void (*double_open) (IPage* self);
	gint (*get_id) (IPage* self);
	void (*set_id) (IPage* self, gint value);
	MainWindow* (*get_main_window) (IPage* self);
	void (*set_main_window) (IPage* self, MainWindow* value);
	Account* (*get_account) (IPage* self);
	void (*set_account) (IPage* self, Account* value);
};

struct _MainWidgetPrivate {
	Account* account;
	Corebird* app;
	GtkRadioButton* dummy_button;
	IPage** pages;
	gint pages_length1;
	gint _pages_size_;
	BundleHistory* history;
	DeltaUpdater* delta_updater;
	gboolean page_switch_lock;
	ImpostorWidget* stack_impostor;
	GtkBox* left_box;
	GtkStack* stack;
	GtkRevealer* sidebar_revealer;
};

typedef enum  {
	PAGE_STREAM = 0,
	PAGE_MENTIONS,
	PAGE_FAVORITES,
	PAGE_DM_THREADS,
	PAGE_LISTS,
	PAGE_FILTERS,
	PAGE_SEARCH,
	PAGE_PROFILE,
	PAGE_TWEET_INFO,
	PAGE_DM,
	PAGE_LIST_STATUSES,
	PAGE_PREVIOUS = 1024,
	PAGE_NEXT = 2048
} Page;

struct _Block3Data {
	int _ref_count_;
	MainWidget* self;
	IPage* page;
};

typedef enum  {
	STREAM_MESSAGE_TYPE_UNSUPPORTED,
	STREAM_MESSAGE_TYPE_DELETE,
	STREAM_MESSAGE_TYPE_SCRUB_GEO,
	STREAM_MESSAGE_TYPE_LIMIT,
	STREAM_MESSAGE_TYPE_DISCONNECT,
	STREAM_MESSAGE_TYPE_FRIENDS,
	STREAM_MESSAGE_TYPE_EVENT,
	STREAM_MESSAGE_TYPE_WARNING,
	STREAM_MESSAGE_TYPE_DIRECT_MESSAGE,
	STREAM_MESSAGE_TYPE_TWEET,
	STREAM_MESSAGE_TYPE_EVENT_LIST_CREATED,
	STREAM_MESSAGE_TYPE_EVENT_LIST_DESTROYED,
	STREAM_MESSAGE_TYPE_EVENT_LIST_UPDATED,
	STREAM_MESSAGE_TYPE_EVENT_LIST_UNSUBSCRIBED,
	STREAM_MESSAGE_TYPE_EVENT_LIST_SUBSCRIBED,
	STREAM_MESSAGE_TYPE_EVENT_LIST_MEMBER_ADDED,
	STREAM_MESSAGE_TYPE_EVENT_LIST_MEMBER_REMOVED,
	STREAM_MESSAGE_TYPE_EVENT_FAVORITE,
	STREAM_MESSAGE_TYPE_EVENT_UNFAVORITE,
	STREAM_MESSAGE_TYPE_EVENT_FOLLOW,
	STREAM_MESSAGE_TYPE_EVENT_UNFOLLOW,
	STREAM_MESSAGE_TYPE_EVENT_BLOCK,
	STREAM_MESSAGE_TYPE_EVENT_UNBLOCK,
	STREAM_MESSAGE_TYPE_EVENT_MUTE,
	STREAM_MESSAGE_TYPE_EVENT_UNMUTE,
	STREAM_MESSAGE_TYPE_EVENT_USER_UPDATE
} StreamMessageType;

struct _IMessageReceiverIface {
	GTypeInterface parent_iface;
	void (*stream_message_received) (IMessageReceiver* self, StreamMessageType type, JsonNode* root_node);
};

struct _ITimelineIface {
	GTypeInterface parent_iface;
	gint64 (*get_lowest_id) (ITimeline* self);
	void (*set_lowest_id) (ITimeline* self, gint64 value);
	gint64 (*get_max_id) (ITimeline* self);
	void (*set_max_id) (ITimeline* self, gint64 value);
	TweetListBox* (*get_tweet_list) (ITimeline* self);
	void (*set_tweet_list) (ITimeline* self, TweetListBox* value);
	gint (*get_unread_count) (ITimeline* self);
	void (*set_unread_count) (ITimeline* self, gint value);
	DeltaUpdater* (*get_delta_updater) (ITimeline* self);
	void (*set_delta_updater) (ITimeline* self, DeltaUpdater* value);
	const gchar* (*get_function) (ITimeline* self);
};

struct _SearchPage {
	GtkBox parent_instance;
	SearchPagePrivate * priv;
	DeltaUpdater* delta_updater;
};

struct _SearchPageClass {
	GtkBoxClass parent_class;
};

struct _MainWindow {
	GtkApplicationWindow parent_instance;
	MainWindowPrivate * priv;
	GtkButton* back_button;
	GtkToggleButton* compose_tweet_button;
	MainWidget* main_widget;
};

struct _MainWindowClass {
	GtkApplicationWindowClass parent_class;
};


static gpointer main_widget_parent_class = NULL;
extern GMenu* corebird_account_menu;

GType main_widget_get_type (void) G_GNUC_CONST;
GType account_get_type (void) G_GNUC_CONST;
GType corebird_get_type (void) G_GNUC_CONST;
GType bundle_get_type (void) G_GNUC_CONST;
GType main_window_get_type (void) G_GNUC_CONST;
GType ipage_get_type (void) G_GNUC_CONST;
gpointer bundle_history_ref (gpointer instance);
void bundle_history_unref (gpointer instance);
GParamSpec* param_spec_bundle_history (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_bundle_history (GValue* value, gpointer v_object);
void value_take_bundle_history (GValue* value, gpointer v_object);
gpointer value_get_bundle_history (const GValue* value);
GType bundle_history_get_type (void) G_GNUC_CONST;
GType delta_updater_get_type (void) G_GNUC_CONST;
GType impostor_widget_get_type (void) G_GNUC_CONST;
#define MAIN_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MAIN_WIDGET, MainWidgetPrivate))
enum  {
	MAIN_WIDGET_DUMMY_PROPERTY,
	MAIN_WIDGET_CUR_PAGE_ID
};
BundleHistory* bundle_history_new (gint size);
BundleHistory* bundle_history_construct (GType object_type, gint size);
DeltaUpdater* delta_updater_new (void);
DeltaUpdater* delta_updater_construct (GType object_type);
ImpostorWidget* impostor_widget_new (void);
ImpostorWidget* impostor_widget_construct (GType object_type);
MainWidget* main_widget_new (Account* account, MainWindow* parent, Corebird* app);
MainWidget* main_widget_construct (GType object_type, Account* account, MainWindow* parent, Corebird* app);
void account_init_proxy (Account* self, gboolean load_secrets, gboolean force);
gint64 account_get_id (Account* self);
GType user_stream_get_type (void) G_GNUC_CONST;
UserStream* account_get_user_stream (Account* self);
void user_stream_start (UserStream* self);
void account_init_information (Account* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void account_init_information_finish (Account* self, GAsyncResult* _res_);
GType page_get_type (void) G_GNUC_CONST;
HomeTimeline* home_timeline_new (gint id);
HomeTimeline* home_timeline_construct (GType object_type, gint id);
GType scroll_widget_get_type (void) G_GNUC_CONST;
GType default_timeline_get_type (void) G_GNUC_CONST;
GType home_timeline_get_type (void) G_GNUC_CONST;
MentionsTimeline* mentions_timeline_new (gint id);
MentionsTimeline* mentions_timeline_construct (GType object_type, gint id);
GType mentions_timeline_get_type (void) G_GNUC_CONST;
FavoritesTimeline* favorites_timeline_new (gint id);
FavoritesTimeline* favorites_timeline_construct (GType object_type, gint id);
GType favorites_timeline_get_type (void) G_GNUC_CONST;
DMThreadsPage* dm_threads_page_new (gint id, Account* account);
DMThreadsPage* dm_threads_page_construct (GType object_type, gint id, Account* account);
GType dm_threads_page_get_type (void) G_GNUC_CONST;
ListsPage* lists_page_new (gint id);
ListsPage* lists_page_construct (GType object_type, gint id);
GType lists_page_get_type (void) G_GNUC_CONST;
FilterPage* filter_page_new (gint id);
FilterPage* filter_page_construct (GType object_type, gint id);
GType filter_page_get_type (void) G_GNUC_CONST;
SearchPage* search_page_new (gint id);
SearchPage* search_page_construct (GType object_type, gint id);
GType search_page_get_type (void) G_GNUC_CONST;
ProfilePage* profile_page_new (gint id);
ProfilePage* profile_page_construct (GType object_type, gint id);
GType profile_page_get_type (void) G_GNUC_CONST;
TweetInfoPage* tweet_info_page_new (gint id);
TweetInfoPage* tweet_info_page_construct (GType object_type, gint id);
GType tweet_info_page_get_type (void) G_GNUC_CONST;
DMPage* dm_page_new (gint id);
DMPage* dm_page_construct (GType object_type, gint id);
GType dm_page_get_type (void) G_GNUC_CONST;
ListStatusesPage* list_statuses_page_new (gint id);
ListStatusesPage* list_statuses_page_construct (GType object_type, gint id);
GType list_statuses_page_get_type (void) G_GNUC_CONST;
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
void ipage_set_main_window (IPage* self, MainWindow* value);
void ipage_set_account (IPage* self, Account* value);
GType stream_message_type_get_type (void) G_GNUC_CONST;
GType imessage_receiver_get_type (void) G_GNUC_CONST;
void user_stream_register (UserStream* self, IMessageReceiver* receiver);
void ipage_create_tool_button (IPage* self, GtkRadioButton* group);
GtkRadioButton* ipage_get_tool_button (IPage* self);
static void ______lambda204_ (Block3Data* _data3_);
void main_widget_switch_page (MainWidget* self, gint page_id, Bundle* args);
gint ipage_get_id (IPage* self);
static void _______lambda204__gtk_button_clicked (GtkButton* _sender, gpointer self);
GType tweet_list_box_get_type (void) G_GNUC_CONST;
GType itimeline_get_type (void) G_GNUC_CONST;
void itimeline_set_delta_updater (ITimeline* self, DeltaUpdater* value);
void dm_threads_page_set_delta_updater (DMThreadsPage* self, DeltaUpdater* value);
void dm_page_set_delta_updater (DMPage* self, DeltaUpdater* value);
void profile_page_set_delta_updater (ProfilePage* self, DeltaUpdater* value);
void list_statuses_page_set_delta_updater (ListStatusesPage* self, DeltaUpdater* value);
GSettings* settings_get (void);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
gint bundle_history_get_current (BundleHistory* self);
gboolean ipage_handles_double_open (IPage* self);
void ipage_double_open (IPage* self);
Bundle* bundle_history_get_current_bundle (BundleHistory* self);
gboolean bundle_equals (Bundle* self, Bundle* other);
void ipage_on_leave (IPage* self);
gboolean bundle_history_at_start (BundleHistory* self);
gint bundle_history_back (BundleHistory* self);
gboolean bundle_history_at_end (BundleHistory* self);
gint bundle_history_forward (BundleHistory* self);
void impostor_widget_clone (ImpostorWidget* self, GtkWidget* widget);
void bundle_history_push (BundleHistory* self, gint v, Bundle* b);
void ipage_on_join (IPage* self, gint page_id, Bundle* args);
gchar* ipage_get_title (IPage* self);
IPage* main_widget_get_page (MainWidget* self, gint page_id);
void main_widget_stop (MainWidget* self);
void account_uninit (Account* self);
gint main_widget_get_cur_page_id (MainWidget* self);
static void main_widget_finalize (GObject* obj);
static void _vala_main_widget_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


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


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		MainWidget* self;
		self = _data3_->self;
		_g_object_unref0 (_data3_->page);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}


static void ______lambda204_ (Block3Data* _data3_) {
	MainWidget* self;
	gboolean _tmp0_ = FALSE;
	IPage* _tmp1_ = NULL;
	GtkRadioButton* _tmp2_ = NULL;
	GtkRadioButton* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	self = _data3_->self;
	_tmp1_ = _data3_->page;
	_tmp2_ = ipage_get_tool_button (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_toggle_button_get_type (), GtkToggleButton));
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp3_);
	if (_tmp6_) {
		gboolean _tmp7_ = FALSE;
		_tmp7_ = self->priv->page_switch_lock;
		_tmp0_ = !_tmp7_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		IPage* _tmp8_ = NULL;
		gint _tmp9_ = 0;
		gint _tmp10_ = 0;
		_tmp8_ = _data3_->page;
		_tmp9_ = ipage_get_id (_tmp8_);
		_tmp10_ = _tmp9_;
		main_widget_switch_page (self, _tmp10_, NULL);
	}
}


static void _______lambda204__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	______lambda204_ (self);
}


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


MainWidget* main_widget_construct (GType object_type, Account* account, MainWindow* parent, Corebird* app) {
	MainWidget * self = NULL;
	Account* _tmp0_ = NULL;
	Corebird* _tmp1_ = NULL;
	Account* _tmp2_ = NULL;
	GMenu* acc_menu = NULL;
	GMenu* _tmp3_ = NULL;
	GMenu* _tmp4_ = NULL;
	Account* _tmp30_ = NULL;
	UserStream* _tmp31_ = NULL;
	UserStream* _tmp32_ = NULL;
	Account* _tmp33_ = NULL;
	GtkStack* _tmp34_ = NULL;
	ImpostorWidget* _tmp35_ = NULL;
	IPage** _tmp36_ = NULL;
	gint _tmp36__length1 = 0;
	HomeTimeline* _tmp37_ = NULL;
	IPage* _tmp38_ = NULL;
	IPage** _tmp39_ = NULL;
	gint _tmp39__length1 = 0;
	MentionsTimeline* _tmp40_ = NULL;
	IPage* _tmp41_ = NULL;
	IPage** _tmp42_ = NULL;
	gint _tmp42__length1 = 0;
	FavoritesTimeline* _tmp43_ = NULL;
	IPage* _tmp44_ = NULL;
	IPage** _tmp45_ = NULL;
	gint _tmp45__length1 = 0;
	Account* _tmp46_ = NULL;
	DMThreadsPage* _tmp47_ = NULL;
	IPage* _tmp48_ = NULL;
	IPage** _tmp49_ = NULL;
	gint _tmp49__length1 = 0;
	ListsPage* _tmp50_ = NULL;
	IPage* _tmp51_ = NULL;
	IPage** _tmp52_ = NULL;
	gint _tmp52__length1 = 0;
	FilterPage* _tmp53_ = NULL;
	IPage* _tmp54_ = NULL;
	IPage** _tmp55_ = NULL;
	gint _tmp55__length1 = 0;
	SearchPage* _tmp56_ = NULL;
	IPage* _tmp57_ = NULL;
	IPage** _tmp58_ = NULL;
	gint _tmp58__length1 = 0;
	ProfilePage* _tmp59_ = NULL;
	IPage* _tmp60_ = NULL;
	IPage** _tmp61_ = NULL;
	gint _tmp61__length1 = 0;
	TweetInfoPage* _tmp62_ = NULL;
	IPage* _tmp63_ = NULL;
	IPage** _tmp64_ = NULL;
	gint _tmp64__length1 = 0;
	DMPage* _tmp65_ = NULL;
	IPage* _tmp66_ = NULL;
	IPage** _tmp67_ = NULL;
	gint _tmp67__length1 = 0;
	ListStatusesPage* _tmp68_ = NULL;
	IPage* _tmp69_ = NULL;
	IPage** _tmp111_ = NULL;
	gint _tmp111__length1 = 0;
	IPage* _tmp112_ = NULL;
	DeltaUpdater* _tmp113_ = NULL;
	DeltaUpdater* _tmp114_ = NULL;
	IPage** _tmp115_ = NULL;
	gint _tmp115__length1 = 0;
	IPage* _tmp116_ = NULL;
	DeltaUpdater* _tmp117_ = NULL;
	IPage** _tmp118_ = NULL;
	gint _tmp118__length1 = 0;
	IPage* _tmp119_ = NULL;
	DeltaUpdater* _tmp120_ = NULL;
	IPage** _tmp121_ = NULL;
	gint _tmp121__length1 = 0;
	IPage* _tmp122_ = NULL;
	DeltaUpdater* _tmp123_ = NULL;
	IPage** _tmp124_ = NULL;
	gint _tmp124__length1 = 0;
	IPage* _tmp125_ = NULL;
	DeltaUpdater* _tmp126_ = NULL;
	GSettings* _tmp127_ = NULL;
	GSettings* _tmp128_ = NULL;
	GtkRevealer* _tmp129_ = NULL;
	GList* list = NULL;
	GtkStack* _tmp130_ = NULL;
	GtkWidget* _tmp131_ = NULL;
	GtkBox* _tmp132_ = NULL;
	g_return_val_if_fail (IS_ACCOUNT (account), NULL);
	g_return_val_if_fail (IS_MAIN_WINDOW (parent), NULL);
	g_return_val_if_fail (IS_COREBIRD (app), NULL);
	self = (MainWidget*) g_object_new (object_type, NULL);
	_tmp0_ = account;
	self->priv->account = _tmp0_;
	_tmp1_ = app;
	self->priv->app = _tmp1_;
	_tmp2_ = account;
	account_init_proxy (_tmp2_, TRUE, FALSE);
	_tmp3_ = corebird_account_menu;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, g_menu_get_type (), GMenu));
	acc_menu = _tmp4_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				gint _tmp7_ = 0;
				GMenu* _tmp8_ = NULL;
				gint _tmp9_ = 0;
				gint64 item_id = 0LL;
				GMenu* _tmp10_ = NULL;
				gint _tmp11_ = 0;
				const GVariantType* _tmp12_ = NULL;
				GVariant* _tmp13_ = NULL;
				GVariant* _tmp14_ = NULL;
				gint64 _tmp15_ = 0LL;
				gint64 _tmp16_ = 0LL;
				gint64 _tmp17_ = 0LL;
				Account* _tmp18_ = NULL;
				gint64 _tmp19_ = 0LL;
				gint64 _tmp20_ = 0LL;
				if (!_tmp5_) {
					gint _tmp6_ = 0;
					_tmp6_ = i;
					i = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = i;
				_tmp8_ = acc_menu;
				_tmp9_ = g_menu_model_get_n_items (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, g_menu_model_get_type (), GMenuModel));
				if (!(_tmp7_ < _tmp9_)) {
					break;
				}
				_tmp10_ = acc_menu;
				_tmp11_ = i;
				_tmp12_ = G_VARIANT_TYPE_INT64;
				_tmp13_ = g_menu_model_get_item_attribute_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, g_menu_model_get_type (), GMenuModel), _tmp11_, "user-id", _tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = g_variant_get_int64 (_tmp14_);
				_tmp16_ = _tmp15_;
				_g_variant_unref0 (_tmp14_);
				item_id = _tmp16_;
				_tmp17_ = item_id;
				_tmp18_ = account;
				_tmp19_ = account_get_id (_tmp18_);
				_tmp20_ = _tmp19_;
				if (_tmp17_ == _tmp20_) {
					Corebird* _tmp21_ = NULL;
					Account* _tmp22_ = NULL;
					gint64 _tmp23_ = 0LL;
					gint64 _tmp24_ = 0LL;
					gchar* _tmp25_ = NULL;
					gchar* _tmp26_ = NULL;
					gchar* _tmp27_ = NULL;
					gchar* _tmp28_ = NULL;
					GAction* _tmp29_ = NULL;
					_tmp21_ = app;
					_tmp22_ = account;
					_tmp23_ = account_get_id (_tmp22_);
					_tmp24_ = _tmp23_;
					_tmp25_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp24_);
					_tmp26_ = _tmp25_;
					_tmp27_ = g_strconcat ("show-", _tmp26_, NULL);
					_tmp28_ = _tmp27_;
					_tmp29_ = g_action_map_lookup_action (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, g_action_map_get_type (), GActionMap), _tmp28_);
					g_simple_action_set_enabled (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, g_simple_action_get_type (), GSimpleAction), FALSE);
					_g_free0 (_tmp28_);
					_g_free0 (_tmp26_);
					break;
				}
			}
		}
	}
	_tmp30_ = account;
	_tmp31_ = account_get_user_stream (_tmp30_);
	_tmp32_ = _tmp31_;
	user_stream_start (_tmp32_);
	_tmp33_ = account;
	account_init_information (_tmp33_, NULL, NULL);
	_tmp34_ = self->priv->stack;
	_tmp35_ = self->priv->stack_impostor;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_widget_get_type (), GtkWidget));
	_tmp36_ = self->priv->pages;
	_tmp36__length1 = self->priv->pages_length1;
	_tmp37_ = home_timeline_new ((gint) PAGE_STREAM);
	g_object_ref_sink (_tmp37_);
	_g_object_unref0 (_tmp36_[0]);
	_tmp36_[0] = G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, TYPE_IPAGE, IPage);
	_tmp38_ = _tmp36_[0];
	_tmp39_ = self->priv->pages;
	_tmp39__length1 = self->priv->pages_length1;
	_tmp40_ = mentions_timeline_new ((gint) PAGE_MENTIONS);
	g_object_ref_sink (_tmp40_);
	_g_object_unref0 (_tmp39_[1]);
	_tmp39_[1] = G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, TYPE_IPAGE, IPage);
	_tmp41_ = _tmp39_[1];
	_tmp42_ = self->priv->pages;
	_tmp42__length1 = self->priv->pages_length1;
	_tmp43_ = favorites_timeline_new ((gint) PAGE_FAVORITES);
	g_object_ref_sink (_tmp43_);
	_g_object_unref0 (_tmp42_[2]);
	_tmp42_[2] = G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_IPAGE, IPage);
	_tmp44_ = _tmp42_[2];
	_tmp45_ = self->priv->pages;
	_tmp45__length1 = self->priv->pages_length1;
	_tmp46_ = account;
	_tmp47_ = dm_threads_page_new ((gint) PAGE_DM_THREADS, _tmp46_);
	g_object_ref_sink (_tmp47_);
	_g_object_unref0 (_tmp45_[3]);
	_tmp45_[3] = G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, TYPE_IPAGE, IPage);
	_tmp48_ = _tmp45_[3];
	_tmp49_ = self->priv->pages;
	_tmp49__length1 = self->priv->pages_length1;
	_tmp50_ = lists_page_new ((gint) PAGE_LISTS);
	g_object_ref_sink (_tmp50_);
	_g_object_unref0 (_tmp49_[4]);
	_tmp49_[4] = G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, TYPE_IPAGE, IPage);
	_tmp51_ = _tmp49_[4];
	_tmp52_ = self->priv->pages;
	_tmp52__length1 = self->priv->pages_length1;
	_tmp53_ = filter_page_new ((gint) PAGE_FILTERS);
	g_object_ref_sink (_tmp53_);
	_g_object_unref0 (_tmp52_[5]);
	_tmp52_[5] = G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, TYPE_IPAGE, IPage);
	_tmp54_ = _tmp52_[5];
	_tmp55_ = self->priv->pages;
	_tmp55__length1 = self->priv->pages_length1;
	_tmp56_ = search_page_new ((gint) PAGE_SEARCH);
	g_object_ref_sink (_tmp56_);
	_g_object_unref0 (_tmp55_[6]);
	_tmp55_[6] = G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, TYPE_IPAGE, IPage);
	_tmp57_ = _tmp55_[6];
	_tmp58_ = self->priv->pages;
	_tmp58__length1 = self->priv->pages_length1;
	_tmp59_ = profile_page_new ((gint) PAGE_PROFILE);
	g_object_ref_sink (_tmp59_);
	_g_object_unref0 (_tmp58_[7]);
	_tmp58_[7] = G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, TYPE_IPAGE, IPage);
	_tmp60_ = _tmp58_[7];
	_tmp61_ = self->priv->pages;
	_tmp61__length1 = self->priv->pages_length1;
	_tmp62_ = tweet_info_page_new ((gint) PAGE_TWEET_INFO);
	g_object_ref_sink (_tmp62_);
	_g_object_unref0 (_tmp61_[8]);
	_tmp61_[8] = G_TYPE_CHECK_INSTANCE_CAST (_tmp62_, TYPE_IPAGE, IPage);
	_tmp63_ = _tmp61_[8];
	_tmp64_ = self->priv->pages;
	_tmp64__length1 = self->priv->pages_length1;
	_tmp65_ = dm_page_new ((gint) PAGE_DM);
	g_object_ref_sink (_tmp65_);
	_g_object_unref0 (_tmp64_[9]);
	_tmp64_[9] = G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, TYPE_IPAGE, IPage);
	_tmp66_ = _tmp64_[9];
	_tmp67_ = self->priv->pages;
	_tmp67__length1 = self->priv->pages_length1;
	_tmp68_ = list_statuses_page_new ((gint) PAGE_LIST_STATUSES);
	g_object_ref_sink (_tmp68_);
	_g_object_unref0 (_tmp67_[10]);
	_tmp67_[10] = G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, TYPE_IPAGE, IPage);
	_tmp69_ = _tmp67_[10];
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp70_ = FALSE;
			_tmp70_ = TRUE;
			while (TRUE) {
				Block3Data* _data3_;
				gint _tmp72_ = 0;
				IPage** _tmp73_ = NULL;
				gint _tmp73__length1 = 0;
				IPage** _tmp74_ = NULL;
				gint _tmp74__length1 = 0;
				gint _tmp75_ = 0;
				IPage* _tmp76_ = NULL;
				IPage* _tmp77_ = NULL;
				IPage* _tmp78_ = NULL;
				MainWindow* _tmp79_ = NULL;
				IPage* _tmp80_ = NULL;
				Account* _tmp81_ = NULL;
				IPage* _tmp82_ = NULL;
				IPage* _tmp87_ = NULL;
				GtkRadioButton* _tmp88_ = NULL;
				GtkStack* _tmp89_ = NULL;
				IPage* _tmp90_ = NULL;
				IPage* _tmp91_ = NULL;
				GtkRadioButton* _tmp92_ = NULL;
				GtkRadioButton* _tmp93_ = NULL;
				gboolean _tmp94_ = FALSE;
				IPage* _tmp106_ = NULL;
				ITimeline* tl = NULL;
				IPage* _tmp107_ = NULL;
				ITimeline* _tmp108_ = NULL;
				ITimeline* _tmp109_ = NULL;
				DeltaUpdater* _tmp110_ = NULL;
				_data3_ = g_slice_new0 (Block3Data);
				_data3_->_ref_count_ = 1;
				_data3_->self = g_object_ref (self);
				if (!_tmp70_) {
					gint _tmp71_ = 0;
					_tmp71_ = i;
					i = _tmp71_ + 1;
				}
				_tmp70_ = FALSE;
				_tmp72_ = i;
				_tmp73_ = self->priv->pages;
				_tmp73__length1 = self->priv->pages_length1;
				if (!(_tmp72_ < _tmp73__length1)) {
					block3_data_unref (_data3_);
					_data3_ = NULL;
					break;
				}
				_tmp74_ = self->priv->pages;
				_tmp74__length1 = self->priv->pages_length1;
				_tmp75_ = i;
				_tmp76_ = _tmp74_[_tmp75_];
				_tmp77_ = _g_object_ref0 (_tmp76_);
				_data3_->page = _tmp77_;
				_tmp78_ = _data3_->page;
				_tmp79_ = parent;
				ipage_set_main_window (_tmp78_, _tmp79_);
				_tmp80_ = _data3_->page;
				_tmp81_ = self->priv->account;
				ipage_set_account (_tmp80_, _tmp81_);
				_tmp82_ = _data3_->page;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp82_, TYPE_IMESSAGE_RECEIVER)) {
					Account* _tmp83_ = NULL;
					UserStream* _tmp84_ = NULL;
					UserStream* _tmp85_ = NULL;
					IPage* _tmp86_ = NULL;
					_tmp83_ = account;
					_tmp84_ = account_get_user_stream (_tmp83_);
					_tmp85_ = _tmp84_;
					_tmp86_ = _data3_->page;
					user_stream_register (_tmp85_, G_TYPE_CHECK_INSTANCE_CAST (_tmp86_, TYPE_IMESSAGE_RECEIVER, IMessageReceiver));
				}
				_tmp87_ = _data3_->page;
				_tmp88_ = self->priv->dummy_button;
				ipage_create_tool_button (_tmp87_, _tmp88_);
				_tmp89_ = self->priv->stack;
				_tmp90_ = _data3_->page;
				gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp89_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp90_, gtk_widget_get_type (), GtkWidget));
				_tmp91_ = _data3_->page;
				_tmp92_ = ipage_get_tool_button (_tmp91_);
				_tmp93_ = _tmp92_;
				_tmp94_ = _tmp93_ != NULL;
				_g_object_unref0 (_tmp93_);
				if (_tmp94_) {
					GtkBox* _tmp95_ = NULL;
					IPage* _tmp96_ = NULL;
					GtkRadioButton* _tmp97_ = NULL;
					GtkRadioButton* _tmp98_ = NULL;
					GtkSizeGroup* _tmp99_ = NULL;
					IPage* _tmp100_ = NULL;
					GtkRadioButton* _tmp101_ = NULL;
					GtkRadioButton* _tmp102_ = NULL;
					IPage* _tmp103_ = NULL;
					GtkRadioButton* _tmp104_ = NULL;
					GtkRadioButton* _tmp105_ = NULL;
					_tmp95_ = self->priv->left_box;
					_tmp96_ = _data3_->page;
					_tmp97_ = ipage_get_tool_button (_tmp96_);
					_tmp98_ = _tmp97_;
					gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp95_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp98_, gtk_widget_get_type (), GtkWidget));
					_g_object_unref0 (_tmp98_);
					_tmp99_ = self->sidebar_size_group;
					_tmp100_ = _data3_->page;
					_tmp101_ = ipage_get_tool_button (_tmp100_);
					_tmp102_ = _tmp101_;
					gtk_size_group_add_widget (_tmp99_, G_TYPE_CHECK_INSTANCE_CAST (_tmp102_, gtk_widget_get_type (), GtkWidget));
					_g_object_unref0 (_tmp102_);
					_tmp103_ = _data3_->page;
					_tmp104_ = ipage_get_tool_button (_tmp103_);
					_tmp105_ = _tmp104_;
					g_signal_connect_data (G_TYPE_CHECK_INSTANCE_CAST (_tmp105_, gtk_button_get_type (), GtkButton), "clicked", (GCallback) _______lambda204__gtk_button_clicked, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
					_g_object_unref0 (_tmp105_);
				}
				_tmp106_ = _data3_->page;
				if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp106_, TYPE_ITIMELINE)) {
					block3_data_unref (_data3_);
					_data3_ = NULL;
					continue;
				}
				_tmp107_ = _data3_->page;
				_tmp108_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp107_, TYPE_ITIMELINE, ITimeline));
				tl = _tmp108_;
				_tmp109_ = tl;
				_tmp110_ = self->priv->delta_updater;
				itimeline_set_delta_updater (_tmp109_, _tmp110_);
				_g_object_unref0 (tl);
				block3_data_unref (_data3_);
				_data3_ = NULL;
			}
		}
	}
	_tmp111_ = self->priv->pages;
	_tmp111__length1 = self->priv->pages_length1;
	_tmp112_ = _tmp111_[PAGE_SEARCH];
	_tmp113_ = self->priv->delta_updater;
	_tmp114_ = _g_object_ref0 (_tmp113_);
	_g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp112_, TYPE_SEARCH_PAGE, SearchPage)->delta_updater);
	G_TYPE_CHECK_INSTANCE_CAST (_tmp112_, TYPE_SEARCH_PAGE, SearchPage)->delta_updater = _tmp114_;
	_tmp115_ = self->priv->pages;
	_tmp115__length1 = self->priv->pages_length1;
	_tmp116_ = _tmp115_[PAGE_DM_THREADS];
	_tmp117_ = self->priv->delta_updater;
	dm_threads_page_set_delta_updater (G_TYPE_CHECK_INSTANCE_CAST (_tmp116_, TYPE_DM_THREADS_PAGE, DMThreadsPage), _tmp117_);
	_tmp118_ = self->priv->pages;
	_tmp118__length1 = self->priv->pages_length1;
	_tmp119_ = _tmp118_[PAGE_DM];
	_tmp120_ = self->priv->delta_updater;
	dm_page_set_delta_updater (G_TYPE_CHECK_INSTANCE_CAST (_tmp119_, TYPE_DM_PAGE, DMPage), _tmp120_);
	_tmp121_ = self->priv->pages;
	_tmp121__length1 = self->priv->pages_length1;
	_tmp122_ = _tmp121_[PAGE_PROFILE];
	_tmp123_ = self->priv->delta_updater;
	profile_page_set_delta_updater (G_TYPE_CHECK_INSTANCE_CAST (_tmp122_, TYPE_PROFILE_PAGE, ProfilePage), _tmp123_);
	_tmp124_ = self->priv->pages;
	_tmp124__length1 = self->priv->pages_length1;
	_tmp125_ = _tmp124_[PAGE_LIST_STATUSES];
	_tmp126_ = self->priv->delta_updater;
	list_statuses_page_set_delta_updater (G_TYPE_CHECK_INSTANCE_CAST (_tmp125_, TYPE_LIST_STATUSES_PAGE, ListStatusesPage), _tmp126_);
	_tmp127_ = settings_get ();
	_tmp128_ = _tmp127_;
	_tmp129_ = self->priv->sidebar_revealer;
	g_settings_bind (_tmp128_, "sidebar-visible", G_TYPE_CHECK_INSTANCE_CAST (_tmp129_, G_TYPE_OBJECT, GObject), "reveal-child", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp128_);
	list = NULL;
	_tmp130_ = self->priv->stack;
	_tmp131_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp130_, gtk_widget_get_type (), GtkWidget));
	list = g_list_append (list, _tmp131_);
	_tmp132_ = self->priv->left_box;
	gtk_container_set_focus_chain (G_TYPE_CHECK_INSTANCE_CAST (_tmp132_, gtk_container_get_type (), GtkContainer), list);
	__g_list_free__g_object_unref0_0 (list);
	_g_object_unref0 (acc_menu);
	return self;
}


MainWidget* main_widget_new (Account* account, MainWindow* parent, Corebird* app) {
	return main_widget_construct (TYPE_MAIN_WIDGET, account, parent, app);
}


/**
   * Switches the window's main notebook to the given page.
   *
   * @param page_id The id of the page to switch to.
   *                See the Page.* constants.
   *
   */
void main_widget_switch_page (MainWidget* self, gint page_id, Bundle* args) {
	gint _tmp0_ = 0;
	BundleHistory* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gboolean push = FALSE;
	BundleHistory* _tmp25_ = NULL;
	gint _tmp26_ = 0;
	gint _tmp27_ = 0;
	gboolean _tmp33_ = FALSE;
	gint _tmp34_ = 0;
	gint current_page = 0;
	BundleHistory* _tmp47_ = NULL;
	gint _tmp48_ = 0;
	gint _tmp49_ = 0;
	gint _tmp50_ = 0;
	gint _tmp66_ = 0;
	gint _tmp67_ = 0;
	gboolean _tmp80_ = FALSE;
	IPage* page = NULL;
	IPage** _tmp84_ = NULL;
	gint _tmp84__length1 = 0;
	gint _tmp85_ = 0;
	IPage* _tmp86_ = NULL;
	IPage* _tmp87_ = NULL;
	GtkToggleButton* button = NULL;
	IPage* _tmp88_ = NULL;
	GtkRadioButton* _tmp89_ = NULL;
	GtkToggleButton* _tmp90_ = NULL;
	IPage* _tmp93_ = NULL;
	gint _tmp94_ = 0;
	Bundle* _tmp95_ = NULL;
	GtkStack* _tmp96_ = NULL;
	IPage** _tmp97_ = NULL;
	gint _tmp97__length1 = 0;
	gint _tmp98_ = 0;
	IPage* _tmp99_ = NULL;
	IPage* _tmp100_ = NULL;
	gchar* _tmp101_ = NULL;
	gchar* _tmp102_ = NULL;
	gboolean _tmp103_ = FALSE;
	GtkContainer* _tmp109_ = NULL;
	GtkContainer* _tmp110_ = NULL;
	GtkButton* _tmp111_ = NULL;
	BundleHistory* _tmp112_ = NULL;
	gboolean _tmp113_ = FALSE;
	g_return_if_fail (IS_MAIN_WIDGET (self));
	g_return_if_fail ((args == NULL) || IS_BUNDLE (args));
	_tmp0_ = page_id;
	_tmp1_ = self->priv->history;
	_tmp2_ = bundle_history_get_current (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp0_ == _tmp3_) {
		IPage** _tmp4_ = NULL;
		gint _tmp4__length1 = 0;
		gint _tmp5_ = 0;
		IPage* _tmp6_ = NULL;
		gboolean _tmp7_ = FALSE;
		gboolean _tmp11_ = FALSE;
		gboolean _tmp12_ = FALSE;
		BundleHistory* _tmp13_ = NULL;
		Bundle* _tmp14_ = NULL;
		Bundle* _tmp15_ = NULL;
		_tmp4_ = self->priv->pages;
		_tmp4__length1 = self->priv->pages_length1;
		_tmp5_ = page_id;
		_tmp6_ = _tmp4_[_tmp5_];
		_tmp7_ = ipage_handles_double_open (_tmp6_);
		if (_tmp7_) {
			IPage** _tmp8_ = NULL;
			gint _tmp8__length1 = 0;
			gint _tmp9_ = 0;
			IPage* _tmp10_ = NULL;
			_tmp8_ = self->priv->pages;
			_tmp8__length1 = self->priv->pages_length1;
			_tmp9_ = page_id;
			_tmp10_ = _tmp8_[_tmp9_];
			ipage_double_open (_tmp10_);
		}
		_tmp13_ = self->priv->history;
		_tmp14_ = bundle_history_get_current_bundle (_tmp13_);
		_tmp15_ = _tmp14_;
		if (_tmp15_ != NULL) {
			BundleHistory* _tmp16_ = NULL;
			Bundle* _tmp17_ = NULL;
			Bundle* _tmp18_ = NULL;
			Bundle* _tmp19_ = NULL;
			gboolean _tmp20_ = FALSE;
			_tmp16_ = self->priv->history;
			_tmp17_ = bundle_history_get_current_bundle (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = args;
			_tmp20_ = bundle_equals (_tmp18_, _tmp19_);
			_tmp12_ = _tmp20_;
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			_tmp11_ = TRUE;
		} else {
			BundleHistory* _tmp21_ = NULL;
			Bundle* _tmp22_ = NULL;
			Bundle* _tmp23_ = NULL;
			Bundle* _tmp24_ = NULL;
			_tmp21_ = self->priv->history;
			_tmp22_ = bundle_history_get_current_bundle (_tmp21_);
			_tmp23_ = _tmp22_;
			_tmp24_ = args;
			_tmp11_ = _tmp23_ == _tmp24_;
		}
		if (_tmp11_) {
			return;
		}
	}
	push = TRUE;
	_tmp25_ = self->priv->history;
	_tmp26_ = bundle_history_get_current (_tmp25_);
	_tmp27_ = _tmp26_;
	if (_tmp27_ != (-1)) {
		IPage** _tmp28_ = NULL;
		gint _tmp28__length1 = 0;
		BundleHistory* _tmp29_ = NULL;
		gint _tmp30_ = 0;
		gint _tmp31_ = 0;
		IPage* _tmp32_ = NULL;
		_tmp28_ = self->priv->pages;
		_tmp28__length1 = self->priv->pages_length1;
		_tmp29_ = self->priv->history;
		_tmp30_ = bundle_history_get_current (_tmp29_);
		_tmp31_ = _tmp30_;
		_tmp32_ = _tmp28_[_tmp31_];
		ipage_on_leave (_tmp32_);
	}
	_tmp34_ = page_id;
	if (_tmp34_ == ((gint) PAGE_PREVIOUS)) {
		_tmp33_ = TRUE;
	} else {
		gint _tmp35_ = 0;
		BundleHistory* _tmp36_ = NULL;
		gint _tmp37_ = 0;
		gint _tmp38_ = 0;
		_tmp35_ = page_id;
		_tmp36_ = self->priv->history;
		_tmp37_ = bundle_history_get_current (_tmp36_);
		_tmp38_ = _tmp37_;
		_tmp33_ = _tmp35_ < _tmp38_;
	}
	if (_tmp33_) {
		GtkStack* _tmp39_ = NULL;
		_tmp39_ = self->priv->stack;
		gtk_stack_set_transition_type (_tmp39_, GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT);
	} else {
		gboolean _tmp40_ = FALSE;
		gint _tmp41_ = 0;
		_tmp41_ = page_id;
		if (_tmp41_ == ((gint) PAGE_NEXT)) {
			_tmp40_ = TRUE;
		} else {
			gint _tmp42_ = 0;
			BundleHistory* _tmp43_ = NULL;
			gint _tmp44_ = 0;
			gint _tmp45_ = 0;
			_tmp42_ = page_id;
			_tmp43_ = self->priv->history;
			_tmp44_ = bundle_history_get_current (_tmp43_);
			_tmp45_ = _tmp44_;
			_tmp40_ = _tmp42_ > _tmp45_;
		}
		if (_tmp40_) {
			GtkStack* _tmp46_ = NULL;
			_tmp46_ = self->priv->stack;
			gtk_stack_set_transition_type (_tmp46_, GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT);
		}
	}
	_tmp47_ = self->priv->history;
	_tmp48_ = bundle_history_get_current (_tmp47_);
	_tmp49_ = _tmp48_;
	current_page = _tmp49_;
	_tmp50_ = page_id;
	if (_tmp50_ == ((gint) PAGE_PREVIOUS)) {
		BundleHistory* _tmp51_ = NULL;
		gboolean _tmp52_ = FALSE;
		BundleHistory* _tmp53_ = NULL;
		gint _tmp54_ = 0;
		BundleHistory* _tmp55_ = NULL;
		Bundle* _tmp56_ = NULL;
		Bundle* _tmp57_ = NULL;
		_tmp51_ = self->priv->history;
		_tmp52_ = bundle_history_at_start (_tmp51_);
		if (_tmp52_) {
			return;
		}
		push = FALSE;
		_tmp53_ = self->priv->history;
		_tmp54_ = bundle_history_back (_tmp53_);
		page_id = _tmp54_;
		_tmp55_ = self->priv->history;
		_tmp56_ = bundle_history_get_current_bundle (_tmp55_);
		_tmp57_ = _tmp56_;
		args = _tmp57_;
	} else {
		gint _tmp58_ = 0;
		_tmp58_ = page_id;
		if (_tmp58_ == ((gint) PAGE_NEXT)) {
			BundleHistory* _tmp59_ = NULL;
			gboolean _tmp60_ = FALSE;
			BundleHistory* _tmp61_ = NULL;
			gint _tmp62_ = 0;
			BundleHistory* _tmp63_ = NULL;
			Bundle* _tmp64_ = NULL;
			Bundle* _tmp65_ = NULL;
			_tmp59_ = self->priv->history;
			_tmp60_ = bundle_history_at_end (_tmp59_);
			if (_tmp60_) {
				return;
			}
			push = FALSE;
			_tmp61_ = self->priv->history;
			_tmp62_ = bundle_history_forward (_tmp61_);
			page_id = _tmp62_;
			_tmp63_ = self->priv->history;
			_tmp64_ = bundle_history_get_current_bundle (_tmp63_);
			_tmp65_ = _tmp64_;
			args = _tmp65_;
		}
	}
	_tmp66_ = page_id;
	_tmp67_ = current_page;
	if (_tmp66_ == _tmp67_) {
		GtkStackTransitionType transition_type = 0;
		GtkStack* _tmp68_ = NULL;
		GtkStackTransitionType _tmp69_ = 0;
		GtkStackTransitionType _tmp70_ = 0;
		GtkStack* _tmp71_ = NULL;
		ImpostorWidget* _tmp72_ = NULL;
		IPage** _tmp73_ = NULL;
		gint _tmp73__length1 = 0;
		gint _tmp74_ = 0;
		IPage* _tmp75_ = NULL;
		GtkStack* _tmp76_ = NULL;
		ImpostorWidget* _tmp77_ = NULL;
		GtkStack* _tmp78_ = NULL;
		GtkStackTransitionType _tmp79_ = 0;
		_tmp68_ = self->priv->stack;
		_tmp69_ = gtk_stack_get_transition_type (_tmp68_);
		_tmp70_ = _tmp69_;
		transition_type = _tmp70_;
		_tmp71_ = self->priv->stack;
		gtk_stack_set_transition_type (_tmp71_, GTK_STACK_TRANSITION_TYPE_NONE);
		_tmp72_ = self->priv->stack_impostor;
		_tmp73_ = self->priv->pages;
		_tmp73__length1 = self->priv->pages_length1;
		_tmp74_ = page_id;
		_tmp75_ = _tmp73_[_tmp74_];
		impostor_widget_clone (_tmp72_, G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, gtk_widget_get_type (), GtkWidget));
		_tmp76_ = self->priv->stack;
		_tmp77_ = self->priv->stack_impostor;
		gtk_stack_set_visible_child (_tmp76_, G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, gtk_widget_get_type (), GtkWidget));
		_tmp78_ = self->priv->stack;
		_tmp79_ = transition_type;
		gtk_stack_set_transition_type (_tmp78_, _tmp79_);
	}
	_tmp80_ = push;
	if (_tmp80_) {
		BundleHistory* _tmp81_ = NULL;
		gint _tmp82_ = 0;
		Bundle* _tmp83_ = NULL;
		_tmp81_ = self->priv->history;
		_tmp82_ = page_id;
		_tmp83_ = args;
		bundle_history_push (_tmp81_, _tmp82_, _tmp83_);
	}
	_tmp84_ = self->priv->pages;
	_tmp84__length1 = self->priv->pages_length1;
	_tmp85_ = page_id;
	_tmp86_ = _tmp84_[_tmp85_];
	_tmp87_ = _g_object_ref0 (_tmp86_);
	page = _tmp87_;
	_tmp88_ = page;
	_tmp89_ = ipage_get_tool_button (_tmp88_);
	button = G_TYPE_CHECK_INSTANCE_CAST (_tmp89_, gtk_toggle_button_get_type (), GtkToggleButton);
	self->priv->page_switch_lock = TRUE;
	_tmp90_ = button;
	if (_tmp90_ != NULL) {
		GtkToggleButton* _tmp91_ = NULL;
		_tmp91_ = button;
		gtk_toggle_button_set_active (_tmp91_, TRUE);
	} else {
		GtkRadioButton* _tmp92_ = NULL;
		_tmp92_ = self->priv->dummy_button;
		gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp92_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE);
	}
	_tmp93_ = page;
	_tmp94_ = page_id;
	_tmp95_ = args;
	ipage_on_join (_tmp93_, _tmp94_, _tmp95_);
	_tmp96_ = self->priv->stack;
	_tmp97_ = self->priv->pages;
	_tmp97__length1 = self->priv->pages_length1;
	_tmp98_ = page_id;
	_tmp99_ = _tmp97_[_tmp98_];
	gtk_stack_set_visible_child (_tmp96_, G_TYPE_CHECK_INSTANCE_CAST (_tmp99_, gtk_widget_get_type (), GtkWidget));
	_tmp100_ = page;
	_tmp101_ = ipage_get_title (_tmp100_);
	_tmp102_ = _tmp101_;
	_tmp103_ = _tmp102_ != NULL;
	_g_free0 (_tmp102_);
	if (_tmp103_) {
		GtkContainer* _tmp104_ = NULL;
		GtkContainer* _tmp105_ = NULL;
		IPage* _tmp106_ = NULL;
		gchar* _tmp107_ = NULL;
		gchar* _tmp108_ = NULL;
		_tmp104_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
		_tmp105_ = _tmp104_;
		_tmp106_ = page;
		_tmp107_ = ipage_get_title (_tmp106_);
		_tmp108_ = _tmp107_;
		gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp105_, TYPE_MAIN_WINDOW, MainWindow), gtk_window_get_type (), GtkWindow), _tmp108_);
		_g_free0 (_tmp108_);
	}
	self->priv->page_switch_lock = FALSE;
	_tmp109_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp110_ = _tmp109_;
	_tmp111_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp110_, TYPE_MAIN_WINDOW, MainWindow)->back_button;
	_tmp112_ = self->priv->history;
	_tmp113_ = bundle_history_at_start (_tmp112_);
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp111_, gtk_widget_get_type (), GtkWidget), !_tmp113_);
	_g_object_unref0 (button);
	_g_object_unref0 (page);
}


IPage* main_widget_get_page (MainWidget* self, gint page_id) {
	IPage* result = NULL;
	IPage** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	gint _tmp1_ = 0;
	IPage* _tmp2_ = NULL;
	IPage* _tmp3_ = NULL;
	g_return_val_if_fail (IS_MAIN_WIDGET (self), NULL);
	_tmp0_ = self->priv->pages;
	_tmp0__length1 = self->priv->pages_length1;
	_tmp1_ = page_id;
	_tmp2_ = _tmp0_[_tmp1_];
	_tmp3_ = _g_object_ref0 (_tmp2_);
	result = _tmp3_;
	return result;
}


void main_widget_stop (MainWidget* self) {
	Account* _tmp0_ = NULL;
	g_return_if_fail (IS_MAIN_WIDGET (self));
	_tmp0_ = self->priv->account;
	account_uninit (_tmp0_);
}


gint main_widget_get_cur_page_id (MainWidget* self) {
	gint result;
	BundleHistory* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	g_return_val_if_fail (IS_MAIN_WIDGET (self), 0);
	_tmp0_ = self->priv->history;
	_tmp1_ = bundle_history_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


static void main_widget_class_init (MainWidgetClass * klass) {
	gint MainWidget_private_offset;
	main_widget_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (MainWidgetPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_main_widget_get_property;
	G_OBJECT_CLASS (klass)->finalize = main_widget_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), MAIN_WIDGET_CUR_PAGE_ID, g_param_spec_int ("cur-page-id", "cur-page-id", "cur-page-id", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	MainWidget_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/baedert/corebird/ui/main-widget.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "left_box", FALSE, MainWidget_private_offset + G_STRUCT_OFFSET (MainWidgetPrivate, left_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack", FALSE, MainWidget_private_offset + G_STRUCT_OFFSET (MainWidgetPrivate, stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sidebar_revealer", FALSE, MainWidget_private_offset + G_STRUCT_OFFSET (MainWidgetPrivate, sidebar_revealer));
}


static void main_widget_instance_init (MainWidget * self) {
	GtkRadioButton* _tmp0_ = NULL;
	IPage** _tmp1_ = NULL;
	BundleHistory* _tmp2_ = NULL;
	DeltaUpdater* _tmp3_ = NULL;
	GtkSizeGroup* _tmp4_ = NULL;
	ImpostorWidget* _tmp5_ = NULL;
	self->priv = MAIN_WIDGET_GET_PRIVATE (self);
	_tmp0_ = (GtkRadioButton*) gtk_radio_button_new (NULL);
	g_object_ref_sink (_tmp0_);
	self->priv->dummy_button = _tmp0_;
	_tmp1_ = g_new0 (IPage*, 11 + 1);
	self->priv->pages = _tmp1_;
	self->priv->pages_length1 = 11;
	self->priv->_pages_size_ = self->priv->pages_length1;
	_tmp2_ = bundle_history_new (5);
	self->priv->history = _tmp2_;
	_tmp3_ = delta_updater_new ();
	self->priv->delta_updater = _tmp3_;
	self->priv->page_switch_lock = FALSE;
	_tmp4_ = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
	self->sidebar_size_group = _tmp4_;
	_tmp5_ = impostor_widget_new ();
	g_object_ref_sink (_tmp5_);
	self->priv->stack_impostor = _tmp5_;
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void main_widget_finalize (GObject* obj) {
	MainWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MAIN_WIDGET, MainWidget);
	_g_object_unref0 (self->priv->dummy_button);
	self->priv->pages = (_vala_array_free (self->priv->pages, self->priv->pages_length1, (GDestroyNotify) g_object_unref), NULL);
	_bundle_history_unref0 (self->priv->history);
	_g_object_unref0 (self->priv->delta_updater);
	_g_object_unref0 (self->sidebar_size_group);
	_g_object_unref0 (self->priv->stack_impostor);
	_g_object_unref0 (self->priv->left_box);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->sidebar_revealer);
	G_OBJECT_CLASS (main_widget_parent_class)->finalize (obj);
}


GType main_widget_get_type (void) {
	static volatile gsize main_widget_type_id__volatile = 0;
	if (g_once_init_enter (&main_widget_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MainWidgetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) main_widget_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MainWidget), 0, (GInstanceInitFunc) main_widget_instance_init, NULL };
		GType main_widget_type_id;
		main_widget_type_id = g_type_register_static (gtk_box_get_type (), "MainWidget", &g_define_type_info, 0);
		g_once_init_leave (&main_widget_type_id__volatile, main_widget_type_id);
	}
	return main_widget_type_id__volatile;
}


static void _vala_main_widget_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	MainWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MAIN_WIDGET, MainWidget);
	switch (property_id) {
		case MAIN_WIDGET_CUR_PAGE_ID:
		g_value_set_int (value, main_widget_get_cur_page_id (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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


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



