/* unified-privacy.c generated by valac 0.20.1, the Vala compiler
 * generated from unified-privacy.vala, do not modify */

/* -*- Mode: vala; tab-width: 4; intend-tabs-mode: t -*- */
/* alm
 * Copyright (C) 2012 Stefano Candori <scandori@gnome.org>
 *
 * alm is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 * 
 * alm 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 Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <zeitgeist.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.h>
#include <float.h>
#include <math.h>
#include <gio/gio.h>
#include <gio/gdesktopappinfo.h>
#include <gdk/gdk.h>
#include <cairo.h>


#define ALM_TYPE_ITEM_TYPE (alm_item_type_get_type ())

#define ALM_TYPE_PRIVACY_WIDGET (alm_privacy_widget_get_type ())
#define ALM_PRIVACY_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_PRIVACY_WIDGET, AlmPrivacyWidget))
#define ALM_PRIVACY_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_PRIVACY_WIDGET, AlmPrivacyWidgetClass))
#define ALM_IS_PRIVACY_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_PRIVACY_WIDGET))
#define ALM_IS_PRIVACY_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_PRIVACY_WIDGET))
#define ALM_PRIVACY_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_PRIVACY_WIDGET, AlmPrivacyWidgetClass))

typedef struct _AlmPrivacyWidget AlmPrivacyWidget;
typedef struct _AlmPrivacyWidgetClass AlmPrivacyWidgetClass;
typedef struct _AlmPrivacyWidgetPrivate AlmPrivacyWidgetPrivate;

#define ALM_TYPE_BLACKLIST (alm_blacklist_get_type ())
#define ALM_BLACKLIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_BLACKLIST, AlmBlacklist))
#define ALM_BLACKLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_BLACKLIST, AlmBlacklistClass))
#define ALM_IS_BLACKLIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_BLACKLIST))
#define ALM_IS_BLACKLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_BLACKLIST))
#define ALM_BLACKLIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_BLACKLIST, AlmBlacklistClass))

typedef struct _AlmBlacklist AlmBlacklist;
typedef struct _AlmBlacklistClass AlmBlacklistClass;

#define ALM_TYPE_FILE_TYPE_BLACKLIST (alm_file_type_blacklist_get_type ())
#define ALM_FILE_TYPE_BLACKLIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_FILE_TYPE_BLACKLIST, AlmFileTypeBlacklist))
#define ALM_FILE_TYPE_BLACKLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_FILE_TYPE_BLACKLIST, AlmFileTypeBlacklistClass))
#define ALM_IS_FILE_TYPE_BLACKLIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_FILE_TYPE_BLACKLIST))
#define ALM_IS_FILE_TYPE_BLACKLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_FILE_TYPE_BLACKLIST))
#define ALM_FILE_TYPE_BLACKLIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_FILE_TYPE_BLACKLIST, AlmFileTypeBlacklistClass))

typedef struct _AlmFileTypeBlacklist AlmFileTypeBlacklist;
typedef struct _AlmFileTypeBlacklistClass AlmFileTypeBlacklistClass;

#define ALM_TYPE_PATH_BLACKLIST (alm_path_blacklist_get_type ())
#define ALM_PATH_BLACKLIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_PATH_BLACKLIST, AlmPathBlacklist))
#define ALM_PATH_BLACKLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_PATH_BLACKLIST, AlmPathBlacklistClass))
#define ALM_IS_PATH_BLACKLIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_PATH_BLACKLIST))
#define ALM_IS_PATH_BLACKLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_PATH_BLACKLIST))
#define ALM_PATH_BLACKLIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_PATH_BLACKLIST, AlmPathBlacklistClass))

typedef struct _AlmPathBlacklist AlmPathBlacklist;
typedef struct _AlmPathBlacklistClass AlmPathBlacklistClass;

#define ALM_TYPE_APPLICATION_BLACKLIST (alm_application_blacklist_get_type ())
#define ALM_APPLICATION_BLACKLIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_APPLICATION_BLACKLIST, AlmApplicationBlacklist))
#define ALM_APPLICATION_BLACKLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_APPLICATION_BLACKLIST, AlmApplicationBlacklistClass))
#define ALM_IS_APPLICATION_BLACKLIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_APPLICATION_BLACKLIST))
#define ALM_IS_APPLICATION_BLACKLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_APPLICATION_BLACKLIST))
#define ALM_APPLICATION_BLACKLIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_APPLICATION_BLACKLIST, AlmApplicationBlacklistClass))

typedef struct _AlmApplicationBlacklist AlmApplicationBlacklist;
typedef struct _AlmApplicationBlacklistClass AlmApplicationBlacklistClass;

#define ALM_TYPE_APPLICATIONS_CHOOSER_DIALOG (alm_applications_chooser_dialog_get_type ())
#define ALM_APPLICATIONS_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_APPLICATIONS_CHOOSER_DIALOG, AlmApplicationsChooserDialog))
#define ALM_APPLICATIONS_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_APPLICATIONS_CHOOSER_DIALOG, AlmApplicationsChooserDialogClass))
#define ALM_IS_APPLICATIONS_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_APPLICATIONS_CHOOSER_DIALOG))
#define ALM_IS_APPLICATIONS_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_APPLICATIONS_CHOOSER_DIALOG))
#define ALM_APPLICATIONS_CHOOSER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_APPLICATIONS_CHOOSER_DIALOG, AlmApplicationsChooserDialogClass))

typedef struct _AlmApplicationsChooserDialog AlmApplicationsChooserDialog;
typedef struct _AlmApplicationsChooserDialogClass AlmApplicationsChooserDialogClass;

#define ALM_TYPE_APPLICATIONS_TREE_VIEW (alm_applications_tree_view_get_type ())
#define ALM_APPLICATIONS_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_APPLICATIONS_TREE_VIEW, AlmApplicationsTreeView))
#define ALM_APPLICATIONS_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_APPLICATIONS_TREE_VIEW, AlmApplicationsTreeViewClass))
#define ALM_IS_APPLICATIONS_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_APPLICATIONS_TREE_VIEW))
#define ALM_IS_APPLICATIONS_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_APPLICATIONS_TREE_VIEW))
#define ALM_APPLICATIONS_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_APPLICATIONS_TREE_VIEW, AlmApplicationsTreeViewClass))

typedef struct _AlmApplicationsTreeView AlmApplicationsTreeView;
typedef struct _AlmApplicationsTreeViewClass AlmApplicationsTreeViewClass;

#define ALM_TYPE_APP_CHOOSE_INFO (alm_app_choose_info_get_type ())
#define ALM_APP_CHOOSE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_APP_CHOOSE_INFO, AlmAppChooseInfo))
#define ALM_APP_CHOOSE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_APP_CHOOSE_INFO, AlmAppChooseInfoClass))
#define ALM_IS_APP_CHOOSE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_APP_CHOOSE_INFO))
#define ALM_IS_APP_CHOOSE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_APP_CHOOSE_INFO))
#define ALM_APP_CHOOSE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_APP_CHOOSE_INFO, AlmAppChooseInfoClass))

typedef struct _AlmAppChooseInfo AlmAppChooseInfo;
typedef struct _AlmAppChooseInfoClass AlmAppChooseInfoClass;

#define ALM_TYPE_DELETE_HISTORY_DIALOG (alm_delete_history_dialog_get_type ())
#define ALM_DELETE_HISTORY_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_DELETE_HISTORY_DIALOG, AlmDeleteHistoryDialog))
#define ALM_DELETE_HISTORY_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_DELETE_HISTORY_DIALOG, AlmDeleteHistoryDialogClass))
#define ALM_IS_DELETE_HISTORY_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_DELETE_HISTORY_DIALOG))
#define ALM_IS_DELETE_HISTORY_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_DELETE_HISTORY_DIALOG))
#define ALM_DELETE_HISTORY_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_DELETE_HISTORY_DIALOG, AlmDeleteHistoryDialogClass))

typedef struct _AlmDeleteHistoryDialog AlmDeleteHistoryDialog;
typedef struct _AlmDeleteHistoryDialogClass AlmDeleteHistoryDialogClass;
#define _alm_blacklist_unref0(var) ((var == NULL) ? NULL : (var = (alm_blacklist_unref (var), NULL)))
#define _alm_file_type_blacklist_unref0(var) ((var == NULL) ? NULL : (var = (alm_file_type_blacklist_unref (var), NULL)))
#define _alm_path_blacklist_unref0(var) ((var == NULL) ? NULL : (var = (alm_path_blacklist_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _alm_application_blacklist_unref0(var) ((var == NULL) ? NULL : (var = (alm_application_blacklist_unref (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block3Data Block3Data;

#define ALM_TYPE_EXCEPTION_CELL_RENDERER (alm_exception_cell_renderer_get_type ())
#define ALM_EXCEPTION_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_EXCEPTION_CELL_RENDERER, AlmExceptionCellRenderer))
#define ALM_EXCEPTION_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_EXCEPTION_CELL_RENDERER, AlmExceptionCellRendererClass))
#define ALM_IS_EXCEPTION_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_EXCEPTION_CELL_RENDERER))
#define ALM_IS_EXCEPTION_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_EXCEPTION_CELL_RENDERER))
#define ALM_EXCEPTION_CELL_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_EXCEPTION_CELL_RENDERER, AlmExceptionCellRendererClass))

typedef struct _AlmExceptionCellRenderer AlmExceptionCellRenderer;
typedef struct _AlmExceptionCellRendererClass AlmExceptionCellRendererClass;
#define _alm_app_choose_info_unref0(var) ((var == NULL) ? NULL : (var = (alm_app_choose_info_unref (var), NULL)))
typedef struct _AlmExceptionCellRendererPrivate AlmExceptionCellRendererPrivate;
#define _pango_attribute_destroy0(var) ((var == NULL) ? NULL : (var = (pango_attribute_destroy (var), NULL)))
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))
#define __vala_PangoAttrList_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoAttrList_free (var), NULL)))
typedef struct _AlmDeleteHistoryDialogPrivate AlmDeleteHistoryDialogPrivate;

#define ALM_TYPE_CALENDAR_WIDGET (alm_calendar_widget_get_type ())
#define ALM_CALENDAR_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_CALENDAR_WIDGET, AlmCalendarWidget))
#define ALM_CALENDAR_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_CALENDAR_WIDGET, AlmCalendarWidgetClass))
#define ALM_IS_CALENDAR_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_CALENDAR_WIDGET))
#define ALM_IS_CALENDAR_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_CALENDAR_WIDGET))
#define ALM_CALENDAR_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_CALENDAR_WIDGET, AlmCalendarWidgetClass))

typedef struct _AlmCalendarWidget AlmCalendarWidget;
typedef struct _AlmCalendarWidgetClass AlmCalendarWidgetClass;
#define _g_array_unref0(var) ((var == NULL) ? NULL : (var = (g_array_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
typedef struct _AlmDeleteHistoryDialogGetHistoryData AlmDeleteHistoryDialogGetHistoryData;
typedef struct _AlmDeleteHistoryDialogDeleteHistoryData AlmDeleteHistoryDialogDeleteHistoryData;

typedef enum  {
	ALM_ITEM_TYPE_FILE,
	ALM_ITEM_TYPE_APPLICATION
} AlmItemType;

struct _AlmPrivacyWidget {
	GtkBox parent_instance;
	AlmPrivacyWidgetPrivate * priv;
};

struct _AlmPrivacyWidgetClass {
	GtkBoxClass parent_class;
};

struct _AlmPrivacyWidgetPrivate {
	AlmBlacklist* blacklist;
	gboolean file_type_fire_signal;
	AlmFileTypeBlacklist* files_type_blacklist;
	AlmPathBlacklist* path_blacklist;
	GeeHashMap* mime_dict;
	GeeHashMap* checkboxes;
	GeeHashSet* button_list;
	GeeHashMap* defined_dirs;
	AlmApplicationBlacklist* app_blacklist;
	AlmApplicationsChooserDialog* app_dialog;
	AlmApplicationsTreeView* app_treeview;
	GtkBox* container_box;
	GHashTable* blocked_list;
	GHashTable* unblocked_list;
	gboolean app_change_recursive;
	GtkTreeView* exception_list;
	GtkListStore* exception_list_store;
	GtkSwitch* record_button;
	GtkButton* del_button;
	AlmDeleteHistoryDialog* delete_dialog;
	GdkPixbuf* stock_folder_icon;
	GtkMenu* exception_menu;
};

struct _Block3Data {
	int _ref_count_;
	AlmPrivacyWidget * self;
	GtkCheckButton* check_button;
};

struct _AlmExceptionCellRenderer {
	GtkCellRenderer parent_instance;
	AlmExceptionCellRendererPrivate * priv;
};

struct _AlmExceptionCellRendererClass {
	GtkCellRendererClass parent_class;
};

struct _AlmExceptionCellRendererPrivate {
	GtkWidget* current_widget;
	GdkPixbuf* pixbuf_;
	gchar* text_;
};

struct _AlmDeleteHistoryDialog {
	GtkDialog parent_instance;
	AlmDeleteHistoryDialogPrivate * priv;
};

struct _AlmDeleteHistoryDialogClass {
	GtkDialogClass parent_class;
};

struct _AlmDeleteHistoryDialogPrivate {
	GtkRadioButton* r_hour;
	GtkRadioButton* r_day;
	GtkRadioButton* r_week;
	GtkRadioButton* r_calendar;
	GtkRadioButton* r_ever;
	ZeitgeistLog* zg_log;
	AlmCalendarWidget* calendar_box;
};

struct _AlmDeleteHistoryDialogGetHistoryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	AlmDeleteHistoryDialog* self;
	ZeitgeistTimeRange* tr;
	GtkDialog* _tmp0_;
	GtkDialog* dialog;
	GtkDialog* _tmp1_;
	GtkDialog* _tmp2_;
	GtkDialog* _tmp3_;
	const gchar* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* label;
	GtkLabel* _tmp6_;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	GtkDialog* _tmp9_;
	GtkBox* _tmp10_;
	GtkLabel* _tmp11_;
	GtkDialog* _tmp12_;
	GtkWidget* _tmp13_;
	GtkDialog* _tmp14_;
	GtkDialog* _tmp15_;
	GtkDialog* _tmp16_;
	gint _tmp17_;
	gint res;
	GtkDialog* _tmp18_;
	gint _tmp19_;
	GPtrArray* _tmp20_;
	GPtrArray* ptr_arr;
	GPtrArray* _tmp21_;
	ZeitgeistEvent* _tmp22_;
	ZeitgeistLog* _tmp23_;
	ZeitgeistTimeRange* _tmp24_;
	GPtrArray* _tmp25_;
	GArray* _tmp26_;
	GArray* ids;
	GArray* _tmp27_;
	GError* err;
	GError* _tmp28_;
	const gchar* _tmp29_;
	GError * _inner_error_;
};

struct _AlmDeleteHistoryDialogDeleteHistoryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	AlmDeleteHistoryDialog* self;
	GArray* ids;
	ZeitgeistLog* _tmp0_;
	GArray* _tmp1_;
	GArray* _tmp2_;
	gboolean _tmp3_;
	gboolean rs;
	GError* err;
	GError* _tmp4_;
	const gchar* _tmp5_;
	GError * _inner_error_;
};


static gpointer alm_privacy_widget_parent_class = NULL;
extern gchar* alm_file_type_blacklist_interpretation_prefix;
static gpointer alm_exception_cell_renderer_parent_class = NULL;
static gpointer alm_delete_history_dialog_parent_class = NULL;

GType alm_item_type_get_type (void) G_GNUC_CONST;
GType alm_privacy_widget_get_type (void) G_GNUC_CONST;
gpointer alm_blacklist_ref (gpointer instance);
void alm_blacklist_unref (gpointer instance);
GParamSpec* alm_param_spec_blacklist (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void alm_value_set_blacklist (GValue* value, gpointer v_object);
void alm_value_take_blacklist (GValue* value, gpointer v_object);
gpointer alm_value_get_blacklist (const GValue* value);
GType alm_blacklist_get_type (void) G_GNUC_CONST;
gpointer alm_file_type_blacklist_ref (gpointer instance);
void alm_file_type_blacklist_unref (gpointer instance);
GParamSpec* alm_param_spec_file_type_blacklist (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void alm_value_set_file_type_blacklist (GValue* value, gpointer v_object);
void alm_value_take_file_type_blacklist (GValue* value, gpointer v_object);
gpointer alm_value_get_file_type_blacklist (const GValue* value);
GType alm_file_type_blacklist_get_type (void) G_GNUC_CONST;
gpointer alm_path_blacklist_ref (gpointer instance);
void alm_path_blacklist_unref (gpointer instance);
GParamSpec* alm_param_spec_path_blacklist (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void alm_value_set_path_blacklist (GValue* value, gpointer v_object);
void alm_value_take_path_blacklist (GValue* value, gpointer v_object);
gpointer alm_value_get_path_blacklist (const GValue* value);
GType alm_path_blacklist_get_type (void) G_GNUC_CONST;
gpointer alm_application_blacklist_ref (gpointer instance);
void alm_application_blacklist_unref (gpointer instance);
GParamSpec* alm_param_spec_application_blacklist (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void alm_value_set_application_blacklist (GValue* value, gpointer v_object);
void alm_value_take_application_blacklist (GValue* value, gpointer v_object);
gpointer alm_value_get_application_blacklist (const GValue* value);
GType alm_application_blacklist_get_type (void) G_GNUC_CONST;
GType alm_applications_chooser_dialog_get_type (void) G_GNUC_CONST;
GType alm_applications_tree_view_get_type (void) G_GNUC_CONST;
gpointer alm_app_choose_info_ref (gpointer instance);
void alm_app_choose_info_unref (gpointer instance);
GParamSpec* alm_param_spec_app_choose_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void alm_value_set_app_choose_info (GValue* value, gpointer v_object);
void alm_value_take_app_choose_info (GValue* value, gpointer v_object);
gpointer alm_value_get_app_choose_info (const GValue* value);
GType alm_app_choose_info_get_type (void) G_GNUC_CONST;
GType alm_delete_history_dialog_get_type (void) G_GNUC_CONST;
#define ALM_PRIVACY_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), ALM_TYPE_PRIVACY_WIDGET, AlmPrivacyWidgetPrivate))
enum  {
	ALM_PRIVACY_WIDGET_DUMMY_PROPERTY
};
AlmPrivacyWidget* alm_privacy_widget_new (AlmBlacklist* blacklist_interface);
AlmPrivacyWidget* alm_privacy_widget_construct (GType object_type, AlmBlacklist* blacklist_interface);
AlmFileTypeBlacklist* alm_file_type_blacklist_new (AlmBlacklist* blacklist_inter, GeeHashMap* all_checkboxes);
AlmFileTypeBlacklist* alm_file_type_blacklist_construct (GType object_type, AlmBlacklist* blacklist_inter, GeeHashMap* all_checkboxes);
AlmPathBlacklist* alm_path_blacklist_new (AlmBlacklist* blacklist_inter);
AlmPathBlacklist* alm_path_blacklist_construct (GType object_type, AlmBlacklist* blacklist_inter);
static void __lambda6_ (AlmPrivacyWidget* self, const gchar* blacklist_id, ZeitgeistEvent* blacklist_template);
static void ___lambda6__alm_blacklist_template_added (AlmBlacklist* _sender, const gchar* blacklist_id, ZeitgeistEvent* blacklist_template, gpointer self);
static void __lambda7_ (AlmPrivacyWidget* self, const gchar* blacklist_id, ZeitgeistEvent* blacklist_template);
static void ___lambda7__alm_blacklist_template_removed (AlmBlacklist* _sender, const gchar* blacklist_id, ZeitgeistEvent* blacklist_template, gpointer self);
static void __lambda8_ (AlmPrivacyWidget* self, const gchar* folder);
gboolean alm_path_blacklist_is_duplicate (AlmPathBlacklist* self, const gchar* path);
static void alm_privacy_widget_add_folder_to_view (AlmPrivacyWidget* self, const gchar* folder);
static void ___lambda8__alm_path_blacklist_folder_added (AlmPathBlacklist* _sender, const gchar* path, gpointer self);
static void __lambda9_ (AlmPrivacyWidget* self, const gchar* folder);
static gboolean alm_privacy_widget_remove_folder_from_view (AlmPrivacyWidget* self, const gchar* folder);
static void ___lambda9__alm_path_blacklist_folder_removed (AlmPathBlacklist* _sender, const gchar* path, gpointer self);
static void _g_free0_ (gpointer var);
static void _alm_app_choose_info_unref0_ (gpointer var);
AlmApplicationBlacklist* alm_application_blacklist_new (AlmBlacklist* blacklist);
AlmApplicationBlacklist* alm_application_blacklist_construct (GType object_type, AlmBlacklist* blacklist);
AlmApplicationsTreeView* alm_applications_tree_view_new (AlmApplicationBlacklist* app_blacklist, GHashTable* blocked, GHashTable* unblocked);
AlmApplicationsTreeView* alm_applications_tree_view_construct (GType object_type, AlmApplicationBlacklist* app_blacklist, GHashTable* blocked, GHashTable* unblocked);
static void __lambda10_ (AlmPrivacyWidget* self, const gchar* app, ZeitgeistEvent* event);
static void alm_privacy_widget_remove_app_from_view (AlmPrivacyWidget* self, const gchar* app);
static void ___lambda10__alm_application_blacklist_application_removed (AlmApplicationBlacklist* _sender, const gchar* app, ZeitgeistEvent* ev, gpointer self);
static void __lambda11_ (AlmPrivacyWidget* self, const gchar* app, ZeitgeistEvent* event);
static void alm_privacy_widget_add_app_to_view (AlmPrivacyWidget* self, const gchar* app);
static void ___lambda11__alm_application_blacklist_application_added (AlmApplicationBlacklist* _sender, const gchar* app, ZeitgeistEvent* ev, gpointer self);
static void alm_privacy_widget_setup_ui (AlmPrivacyWidget* self);
gboolean alm_blacklist_get_incognito (AlmBlacklist* self);
static void __lambda12_ (AlmPrivacyWidget* self, gboolean status);
static void ___lambda12__alm_blacklist_incognito_toggled (AlmBlacklist* _sender, gboolean status, gpointer self);
static void __lambda13_ (AlmPrivacyWidget* self);
void alm_blacklist_set_incognito (AlmBlacklist* self, gboolean status);
static void ___lambda13__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __lambda14_ (AlmPrivacyWidget* self);
void alm_delete_history_dialog_on_delete_history (AlmDeleteHistoryDialog* self);
static void ___lambda14__gtk_button_clicked (GtkButton* _sender, gpointer self);
static gint __lambda15_ (const gchar* s1, const gchar* s2);
static gint ___lambda15__gcompare_func (gconstpointer a, gconstpointer b);
void alm_file_type_blacklist_populate_file_types (AlmFileTypeBlacklist* self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void ____lambda16_ (Block3Data* _data3_);
void alm_file_type_blacklist_unblock (AlmFileTypeBlacklist* self, const gchar* interpretation);
void alm_file_type_blacklist_block (AlmFileTypeBlacklist* self, const gchar* interpretation);
static void _____lambda16__gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
AlmExceptionCellRenderer* alm_exception_cell_renderer_new (void);
AlmExceptionCellRenderer* alm_exception_cell_renderer_construct (GType object_type);
GType alm_exception_cell_renderer_get_type (void) G_GNUC_CONST;
static void alm_privacy_widget_on_add_exception (AlmPrivacyWidget* self);
static void _alm_privacy_widget_on_add_exception_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static void alm_privacy_widget_on_remove_exception (AlmPrivacyWidget* self);
static void _alm_privacy_widget_on_remove_exception_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static void alm_privacy_widget_on_add_folder (AlmPrivacyWidget* self);
static void _alm_privacy_widget_on_add_folder_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void alm_privacy_widget_on_add_application (AlmPrivacyWidget* self);
static void _alm_privacy_widget_on_add_application_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
AlmApplicationsChooserDialog* alm_applications_chooser_dialog_new (AlmApplicationBlacklist* app_blacklist, GHashTable* blocked_list, GHashTable* unblocked_list);
AlmApplicationsChooserDialog* alm_applications_chooser_dialog_construct (GType object_type, AlmApplicationBlacklist* app_blacklist, GHashTable* blocked_list, GHashTable* unblocked_list);
AlmDeleteHistoryDialog* alm_delete_history_dialog_new (GtkButton* del_button);
AlmDeleteHistoryDialog* alm_delete_history_dialog_construct (GType object_type, GtkButton* del_button);
static void alm_privacy_widget_folders_populate (AlmPrivacyWidget* self);
static void alm_privacy_widget_app_populate (AlmPrivacyWidget* self);
gint alm_privacy_widget_compare_mimes (AlmPrivacyWidget* self, const gchar* s1, const gchar* s2);
GeeHashSet* alm_path_blacklist_get_all_folders (AlmPathBlacklist* self);
GeeHashSet* alm_application_blacklist_get_all_apps (AlmApplicationBlacklist* self);
void alm_path_blacklist_unblock (AlmPathBlacklist* self, const gchar* folder);
void alm_application_blacklist_unblock (AlmApplicationBlacklist* self, const gchar* application);
void alm_path_blacklist_block (AlmPathBlacklist* self, const gchar* folder);
static void alm_privacy_widget_on_add_file (AlmPrivacyWidget* self);
GtkTreeView* alm_applications_chooser_dialog_get_tree (AlmApplicationsChooserDialog* self);
GtkListStore* alm_applications_chooser_dialog_get_liststore (AlmApplicationsChooserDialog* self);
void alm_application_blacklist_block (AlmApplicationBlacklist* self, const gchar* application);
const gchar* g_user_directory_to_string (GUserDirectory self);
static const char* _g_user_directory_to_string (GUserDirectory value);
GdkPixbuf* alm_applications_tree_view_get_pixbuf_from_gio_icon (GIcon* icon, gint size);
gchar* alm_applications_tree_view_markup_for_app (GDesktopAppInfo* app_info);
AlmAppChooseInfo* alm_app_choose_info_new (const gchar* id, const gchar* app_name, GdkPixbuf* app_icon, const gchar* last_accessed_time_s, gint64 last_accessed_time_i, guint usage_rating);
AlmAppChooseInfo* alm_app_choose_info_construct (GType object_type, const gchar* id, const gchar* app_name, GdkPixbuf* app_icon, const gchar* last_accessed_time_s, gint64 last_accessed_time_i, guint usage_rating);
static void alm_privacy_widget_finalize (GObject* obj);
#define ALM_EXCEPTION_CELL_RENDERER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), ALM_TYPE_EXCEPTION_CELL_RENDERER, AlmExceptionCellRendererPrivate))
enum  {
	ALM_EXCEPTION_CELL_RENDERER_DUMMY_PROPERTY,
	ALM_EXCEPTION_CELL_RENDERER_PIXBUF,
	ALM_EXCEPTION_CELL_RENDERER_TEXT
};
#define ALM_EXCEPTION_CELL_RENDERER_PIXBUF_SIZE 24
#define ALM_EXCEPTION_CELL_RENDERER_xspacing 3
#define ALM_EXCEPTION_CELL_RENDERER_default_width 60
#define ALM_EXCEPTION_CELL_RENDERER_renderer_height 30
static PangoLayout* alm_exception_cell_renderer_get_text_layout (AlmExceptionCellRenderer* self, GtkWidget* widget, GdkRectangle* cell_area, GtkCellRendererState flags, const gchar* text, gboolean bold, gint size);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
static PangoAttrList* _vala_PangoAttrList_copy (PangoAttrList* self);
static void _vala_PangoAttrList_free (PangoAttrList* self);
static void alm_exception_cell_renderer_real_get_size (GtkCellRenderer* base, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height);
static void alm_exception_cell_renderer_do_get_size (AlmExceptionCellRenderer* self, GtkWidget* widget, GdkRectangle* cell_area, PangoLayout* layout, gint* x_offset, gint* y_offset);
static void alm_exception_cell_renderer_real_render (GtkCellRenderer* base, cairo_t* cr, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags);
const gchar* alm_exception_cell_renderer_get_text (AlmExceptionCellRenderer* self);
GdkPixbuf* alm_exception_cell_renderer_get_pixbuf (AlmExceptionCellRenderer* self);
static void alm_exception_cell_renderer_real_get_preferred_width (GtkCellRenderer* base, GtkWidget* widget, gint* min_width, gint* nat_width);
static void alm_exception_cell_renderer_real_get_preferred_height_for_width (GtkCellRenderer* base, GtkWidget* widget, gint width, gint* minimum_height, gint* natural_height);
static void alm_exception_cell_renderer_real_get_preferred_height (GtkCellRenderer* base, GtkWidget* widget, gint* minimum_size, gint* natural_size);
void alm_exception_cell_renderer_set_pixbuf (AlmExceptionCellRenderer* self, GdkPixbuf* value);
void alm_exception_cell_renderer_set_text (AlmExceptionCellRenderer* self, const gchar* value);
static void alm_exception_cell_renderer_finalize (GObject* obj);
static void _vala_alm_exception_cell_renderer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_alm_exception_cell_renderer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType alm_calendar_widget_get_type (void) G_GNUC_CONST;
#define ALM_DELETE_HISTORY_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), ALM_TYPE_DELETE_HISTORY_DIALOG, AlmDeleteHistoryDialogPrivate))
enum  {
	ALM_DELETE_HISTORY_DIALOG_DUMMY_PROPERTY
};
AlmCalendarWidget* alm_calendar_widget_new (GtkButton* button);
AlmCalendarWidget* alm_calendar_widget_construct (GType object_type, GtkButton* button);
static void alm_delete_history_dialog_set_up_ui (AlmDeleteHistoryDialog* self);
gint alm_delete_history_dialog_get_active_radio_button (AlmDeleteHistoryDialog* self);
static void alm_delete_history_dialog_get_history (AlmDeleteHistoryDialog* self, ZeitgeistTimeRange* tr, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void alm_delete_history_dialog_get_history_finish (AlmDeleteHistoryDialog* self, GAsyncResult* _res_);
ZeitgeistTimeRange* alm_calendar_widget_get_range (AlmCalendarWidget* self);
static void alm_delete_history_dialog_get_history_data_free (gpointer _data);
static gboolean alm_delete_history_dialog_get_history_co (AlmDeleteHistoryDialogGetHistoryData* _data_);
static gboolean _alm_delete_history_dialog_get_history_co_gsource_func (gpointer self);
static void alm_delete_history_dialog_get_history_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void alm_delete_history_dialog_delete_history (AlmDeleteHistoryDialog* self, GArray* ids, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void alm_delete_history_dialog_delete_history_finish (AlmDeleteHistoryDialog* self, GAsyncResult* _res_);
static void alm_delete_history_dialog_delete_history_data_free (gpointer _data);
static gboolean alm_delete_history_dialog_delete_history_co (AlmDeleteHistoryDialogDeleteHistoryData* _data_);
static gboolean _alm_delete_history_dialog_delete_history_co_gsource_func (gpointer self);
static void alm_delete_history_dialog_delete_history_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void alm_delete_history_dialog_finalize (GObject* obj);


GType alm_item_type_get_type (void) {
	static volatile gsize alm_item_type_type_id__volatile = 0;
	if (g_once_init_enter (&alm_item_type_type_id__volatile)) {
		static const GEnumValue values[] = {{ALM_ITEM_TYPE_FILE, "ALM_ITEM_TYPE_FILE", "file"}, {ALM_ITEM_TYPE_APPLICATION, "ALM_ITEM_TYPE_APPLICATION", "application"}, {0, NULL, NULL}};
		GType alm_item_type_type_id;
		alm_item_type_type_id = g_enum_register_static ("AlmItemType", values);
		g_once_init_leave (&alm_item_type_type_id__volatile, alm_item_type_type_id);
	}
	return alm_item_type_type_id__volatile;
}


static gpointer _alm_blacklist_ref0 (gpointer self) {
	return self ? alm_blacklist_ref (self) : NULL;
}


static void __lambda6_ (AlmPrivacyWidget* self, const gchar* blacklist_id, ZeitgeistEvent* blacklist_template) {
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (blacklist_id != NULL);
	g_return_if_fail (blacklist_template != NULL);
	_tmp0_ = blacklist_id;
	_tmp1_ = alm_file_type_blacklist_interpretation_prefix;
	_tmp2_ = g_str_has_prefix (_tmp0_, _tmp1_);
	if (_tmp2_) {
		ZeitgeistEvent* _tmp3_;
		ZeitgeistSubject* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_;
		gchar* inter;
		GeeHashMap* _tmp7_;
		const gchar* _tmp8_;
		gboolean _tmp9_ = FALSE;
		self->priv->file_type_fire_signal = FALSE;
		_tmp3_ = blacklist_template;
		_tmp4_ = zeitgeist_event_get_subject (_tmp3_, 0);
		_tmp5_ = zeitgeist_subject_get_interpretation (_tmp4_);
		_tmp6_ = g_strdup (_tmp5_);
		inter = _tmp6_;
		_tmp7_ = self->priv->checkboxes;
		_tmp8_ = inter;
		_tmp9_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp7_, _tmp8_);
		if (_tmp9_) {
			GeeHashMap* _tmp10_;
			const gchar* _tmp11_;
			gpointer _tmp12_ = NULL;
			GtkCheckButton* _tmp13_;
			_tmp10_ = self->priv->checkboxes;
			_tmp11_ = inter;
			_tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp10_, _tmp11_);
			_tmp13_ = (GtkCheckButton*) _tmp12_;
			gtk_toggle_button_set_active ((GtkToggleButton*) _tmp13_, FALSE);
			_g_object_unref0 (_tmp13_);
		}
		self->priv->file_type_fire_signal = TRUE;
		_g_free0 (inter);
	}
}


static void ___lambda6__alm_blacklist_template_added (AlmBlacklist* _sender, const gchar* blacklist_id, ZeitgeistEvent* blacklist_template, gpointer self) {
	__lambda6_ (self, blacklist_id, blacklist_template);
}


static void __lambda7_ (AlmPrivacyWidget* self, const gchar* blacklist_id, ZeitgeistEvent* blacklist_template) {
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (blacklist_id != NULL);
	g_return_if_fail (blacklist_template != NULL);
	_tmp0_ = blacklist_id;
	_tmp1_ = alm_file_type_blacklist_interpretation_prefix;
	_tmp2_ = g_str_has_prefix (_tmp0_, _tmp1_);
	if (_tmp2_) {
		ZeitgeistEvent* _tmp3_;
		ZeitgeistSubject* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_;
		gchar* inter;
		GeeHashMap* _tmp7_;
		const gchar* _tmp8_;
		gboolean _tmp9_ = FALSE;
		self->priv->file_type_fire_signal = FALSE;
		_tmp3_ = blacklist_template;
		_tmp4_ = zeitgeist_event_get_subject (_tmp3_, 0);
		_tmp5_ = zeitgeist_subject_get_interpretation (_tmp4_);
		_tmp6_ = g_strdup (_tmp5_);
		inter = _tmp6_;
		_tmp7_ = self->priv->checkboxes;
		_tmp8_ = inter;
		_tmp9_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp7_, _tmp8_);
		if (_tmp9_) {
			GeeHashMap* _tmp10_;
			const gchar* _tmp11_;
			gpointer _tmp12_ = NULL;
			GtkCheckButton* _tmp13_;
			_tmp10_ = self->priv->checkboxes;
			_tmp11_ = inter;
			_tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp10_, _tmp11_);
			_tmp13_ = (GtkCheckButton*) _tmp12_;
			gtk_toggle_button_set_active ((GtkToggleButton*) _tmp13_, TRUE);
			_g_object_unref0 (_tmp13_);
		}
		self->priv->file_type_fire_signal = TRUE;
		_g_free0 (inter);
	}
}


static void ___lambda7__alm_blacklist_template_removed (AlmBlacklist* _sender, const gchar* blacklist_id, ZeitgeistEvent* blacklist_template, gpointer self) {
	__lambda7_ (self, blacklist_id, blacklist_template);
}


static void __lambda8_ (AlmPrivacyWidget* self, const gchar* folder) {
	AlmPathBlacklist* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (folder != NULL);
	_tmp0_ = self->priv->path_blacklist;
	_tmp1_ = folder;
	_tmp2_ = alm_path_blacklist_is_duplicate (_tmp0_, _tmp1_);
	if (!_tmp2_) {
		const gchar* _tmp3_;
		_tmp3_ = folder;
		alm_privacy_widget_add_folder_to_view (self, _tmp3_);
	}
}


static void ___lambda8__alm_path_blacklist_folder_added (AlmPathBlacklist* _sender, const gchar* path, gpointer self) {
	__lambda8_ (self, path);
}


static void __lambda9_ (AlmPrivacyWidget* self, const gchar* folder) {
	const gchar* _tmp0_;
	g_return_if_fail (folder != NULL);
	_tmp0_ = folder;
	alm_privacy_widget_remove_folder_from_view (self, _tmp0_);
}


static void ___lambda9__alm_path_blacklist_folder_removed (AlmPathBlacklist* _sender, const gchar* path, gpointer self) {
	__lambda9_ (self, path);
}


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


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static void _alm_app_choose_info_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (alm_app_choose_info_unref (var), NULL));
}


static void __lambda10_ (AlmPrivacyWidget* self, const gchar* app, ZeitgeistEvent* event) {
	gboolean _tmp0_;
	g_return_if_fail (app != NULL);
	g_return_if_fail (event != NULL);
	_tmp0_ = self->priv->app_change_recursive;
	if (!_tmp0_) {
		const gchar* _tmp1_;
		_tmp1_ = app;
		alm_privacy_widget_remove_app_from_view (self, _tmp1_);
	}
	self->priv->app_change_recursive = FALSE;
}


static void ___lambda10__alm_application_blacklist_application_removed (AlmApplicationBlacklist* _sender, const gchar* app, ZeitgeistEvent* ev, gpointer self) {
	__lambda10_ (self, app, ev);
}


static void __lambda11_ (AlmPrivacyWidget* self, const gchar* app, ZeitgeistEvent* event) {
	gboolean _tmp0_;
	g_return_if_fail (app != NULL);
	g_return_if_fail (event != NULL);
	_tmp0_ = self->priv->app_change_recursive;
	if (!_tmp0_) {
		const gchar* _tmp1_;
		_tmp1_ = app;
		alm_privacy_widget_add_app_to_view (self, _tmp1_);
	}
	self->priv->app_change_recursive = FALSE;
}


static void ___lambda11__alm_application_blacklist_application_added (AlmApplicationBlacklist* _sender, const gchar* app, ZeitgeistEvent* ev, gpointer self) {
	__lambda11_ (self, app, ev);
}


AlmPrivacyWidget* alm_privacy_widget_construct (GType object_type, AlmBlacklist* blacklist_interface) {
	AlmPrivacyWidget * self = NULL;
	AlmBlacklist* _tmp0_;
	AlmBlacklist* _tmp1_;
	GeeHashMap* _tmp2_;
	GeeHashSet* _tmp3_;
	AlmBlacklist* _tmp4_;
	GeeHashMap* _tmp5_;
	AlmFileTypeBlacklist* _tmp6_;
	AlmBlacklist* _tmp7_;
	AlmPathBlacklist* _tmp8_;
	AlmBlacklist* _tmp9_;
	AlmBlacklist* _tmp10_;
	AlmPathBlacklist* _tmp11_;
	AlmPathBlacklist* _tmp12_;
	GHashFunc _tmp13_;
	GEqualFunc _tmp14_;
	GeeHashMap* _tmp15_;
	GeeHashMap* _tmp16_;
	const gchar* _tmp17_ = NULL;
	GeeHashMap* _tmp18_;
	const gchar* _tmp19_ = NULL;
	GeeHashMap* _tmp20_;
	const gchar* _tmp21_ = NULL;
	GeeHashMap* _tmp22_;
	const gchar* _tmp23_ = NULL;
	GeeHashMap* _tmp24_;
	const gchar* _tmp25_ = NULL;
	GeeHashMap* _tmp26_;
	const gchar* _tmp27_ = NULL;
	GeeHashMap* _tmp28_;
	const gchar* _tmp29_ = NULL;
	GeeHashMap* _tmp30_;
	const gchar* _tmp31_ = NULL;
	GeeHashMap* _tmp32_;
	const gchar* _tmp33_ = NULL;
	GUserDirectory* _tmp34_ = NULL;
	GUserDirectory* special_dirs;
	gint special_dirs_length1;
	gint _special_dirs_size_;
	GdkPixbuf* _tmp51_ = NULL;
	GdkPixbuf* _tmp52_;
	GHashFunc _tmp53_;
	GEqualFunc _tmp54_;
	GHashTable* _tmp55_;
	GHashFunc _tmp56_;
	GEqualFunc _tmp57_;
	GHashTable* _tmp58_;
	AlmBlacklist* _tmp59_;
	AlmApplicationBlacklist* _tmp60_;
	AlmApplicationBlacklist* _tmp61_;
	GHashTable* _tmp62_;
	GHashTable* _tmp63_;
	AlmApplicationsTreeView* _tmp64_;
	AlmApplicationBlacklist* _tmp65_;
	AlmApplicationBlacklist* _tmp66_;
	g_return_val_if_fail (blacklist_interface != NULL, NULL);
	self = (AlmPrivacyWidget*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 10, NULL);
	_tmp0_ = blacklist_interface;
	_tmp1_ = _alm_blacklist_ref0 (_tmp0_);
	_alm_blacklist_unref0 (self->priv->blacklist);
	self->priv->blacklist = _tmp1_;
	_tmp2_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, GTK_TYPE_CHECK_BUTTON, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->checkboxes);
	self->priv->checkboxes = _tmp2_;
	_tmp3_ = gee_hash_set_new (GTK_TYPE_CHECK_BUTTON, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
	_g_object_unref0 (self->priv->button_list);
	self->priv->button_list = _tmp3_;
	_tmp4_ = blacklist_interface;
	_tmp5_ = self->priv->checkboxes;
	_tmp6_ = alm_file_type_blacklist_new (_tmp4_, _tmp5_);
	_alm_file_type_blacklist_unref0 (self->priv->files_type_blacklist);
	self->priv->files_type_blacklist = _tmp6_;
	_tmp7_ = blacklist_interface;
	_tmp8_ = alm_path_blacklist_new (_tmp7_);
	_alm_path_blacklist_unref0 (self->priv->path_blacklist);
	self->priv->path_blacklist = _tmp8_;
	_tmp9_ = blacklist_interface;
	g_signal_connect_object (_tmp9_, "template-added", (GCallback) ___lambda6__alm_blacklist_template_added, self, 0);
	_tmp10_ = blacklist_interface;
	g_signal_connect_object (_tmp10_, "template-removed", (GCallback) ___lambda7__alm_blacklist_template_removed, self, 0);
	_tmp11_ = self->priv->path_blacklist;
	g_signal_connect_object (_tmp11_, "folder-added", (GCallback) ___lambda8__alm_path_blacklist_folder_added, self, 0);
	_tmp12_ = self->priv->path_blacklist;
	g_signal_connect_object (_tmp12_, "folder-removed", (GCallback) ___lambda9__alm_path_blacklist_folder_removed, self, 0);
	_tmp13_ = g_str_hash;
	_tmp14_ = g_str_equal;
	_tmp15_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp13_, _tmp14_, NULL);
	_g_object_unref0 (self->priv->mime_dict);
	self->priv->mime_dict = _tmp15_;
	_tmp16_ = self->priv->mime_dict;
	_tmp17_ = _ ("Music");
	gee_abstract_map_set ((GeeAbstractMap*) _tmp16_, _tmp17_, ZEITGEIST_NFO_AUDIO);
	_tmp18_ = self->priv->mime_dict;
	_tmp19_ = _ ("Videos");
	gee_abstract_map_set ((GeeAbstractMap*) _tmp18_, _tmp19_, ZEITGEIST_NFO_VIDEO);
	_tmp20_ = self->priv->mime_dict;
	_tmp21_ = _ ("Pictures");
	gee_abstract_map_set ((GeeAbstractMap*) _tmp20_, _tmp21_, ZEITGEIST_NFO_IMAGE);
	_tmp22_ = self->priv->mime_dict;
	_tmp23_ = _ ("Documents");
	gee_abstract_map_set ((GeeAbstractMap*) _tmp22_, _tmp23_, ZEITGEIST_NFO_DOCUMENT);
	_tmp24_ = self->priv->mime_dict;
	_tmp25_ = _ ("Presentations");
	gee_abstract_map_set ((GeeAbstractMap*) _tmp24_, _tmp25_, ZEITGEIST_NFO_PRESENTATION);
	_tmp26_ = self->priv->mime_dict;
	_tmp27_ = _ ("Spreadsheets");
	gee_abstract_map_set ((GeeAbstractMap*) _tmp26_, _tmp27_, ZEITGEIST_NFO_SPREADSHEET);
	_tmp28_ = self->priv->mime_dict;
	_tmp29_ = _ ("Instant Messaging");
	gee_abstract_map_set ((GeeAbstractMap*) _tmp28_, _tmp29_, ZEITGEIST_NMO_IMMESSAGE);
	_tmp30_ = self->priv->mime_dict;
	_tmp31_ = _ ("Emails");
	gee_abstract_map_set ((GeeAbstractMap*) _tmp30_, _tmp31_, ZEITGEIST_NMO_EMAIL);
	_tmp32_ = self->priv->mime_dict;
	_tmp33_ = _ ("Websites");
	gee_abstract_map_set ((GeeAbstractMap*) _tmp32_, _tmp33_, ZEITGEIST_NFO_WEBSITE);
	_tmp34_ = g_new0 (GUserDirectory, 8);
	_tmp34_[0] = G_USER_DIRECTORY_DESKTOP;
	_tmp34_[1] = G_USER_DIRECTORY_DOCUMENTS;
	_tmp34_[2] = G_USER_DIRECTORY_DOWNLOAD;
	_tmp34_[3] = G_USER_DIRECTORY_MUSIC;
	_tmp34_[4] = G_USER_DIRECTORY_PICTURES;
	_tmp34_[5] = G_USER_DIRECTORY_PUBLIC_SHARE;
	_tmp34_[6] = G_USER_DIRECTORY_TEMPLATES;
	_tmp34_[7] = G_USER_DIRECTORY_VIDEOS;
	special_dirs = _tmp34_;
	special_dirs_length1 = 8;
	_special_dirs_size_ = special_dirs_length1;
	{
		gint i;
		i = 0;
		{
			gboolean _tmp35_;
			_tmp35_ = TRUE;
			while (TRUE) {
				gboolean _tmp36_;
				gint _tmp38_;
				GUserDirectory* _tmp39_;
				gint _tmp39__length1;
				GUserDirectory* _tmp40_;
				gint _tmp40__length1;
				gint _tmp41_;
				GUserDirectory _tmp42_;
				const gchar* _tmp43_ = NULL;
				gchar* _tmp44_;
				gchar* dir_path;
				const gchar* _tmp45_;
				_tmp36_ = _tmp35_;
				if (!_tmp36_) {
					gint _tmp37_;
					_tmp37_ = i;
					i = _tmp37_ + 1;
				}
				_tmp35_ = FALSE;
				_tmp38_ = i;
				_tmp39_ = special_dirs;
				_tmp39__length1 = special_dirs_length1;
				if (!(_tmp38_ < _tmp39__length1)) {
					break;
				}
				_tmp40_ = special_dirs;
				_tmp40__length1 = special_dirs_length1;
				_tmp41_ = i;
				_tmp42_ = _tmp40_[_tmp41_];
				_tmp43_ = g_get_user_special_dir (_tmp42_);
				_tmp44_ = g_strdup (_tmp43_);
				dir_path = _tmp44_;
				_tmp45_ = dir_path;
				if (_tmp45_ != NULL) {
					GeeHashMap* _tmp46_;
					const gchar* _tmp47_;
					GUserDirectory* _tmp48_;
					gint _tmp48__length1;
					gint _tmp49_;
					GUserDirectory _tmp50_;
					_tmp46_ = self->priv->defined_dirs;
					_tmp47_ = dir_path;
					_tmp48_ = special_dirs;
					_tmp48__length1 = special_dirs_length1;
					_tmp49_ = i;
					_tmp50_ = _tmp48_[_tmp49_];
					gee_abstract_map_set ((GeeAbstractMap*) _tmp46_, _tmp47_, (gpointer) ((gintptr) _tmp50_));
				}
				_g_free0 (dir_path);
			}
		}
	}
	_tmp51_ = gtk_widget_render_icon_pixbuf ((GtkWidget*) self, GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_LARGE_TOOLBAR);
	_tmp52_ = _g_object_ref0 (_tmp51_);
	_g_object_unref0 (self->priv->stock_folder_icon);
	self->priv->stock_folder_icon = _tmp52_;
	_tmp53_ = g_str_hash;
	_tmp54_ = g_str_equal;
	_tmp55_ = g_hash_table_new_full (_tmp53_, _tmp54_, _g_free0_, _alm_app_choose_info_unref0_);
	_g_hash_table_unref0 (self->priv->blocked_list);
	self->priv->blocked_list = _tmp55_;
	_tmp56_ = g_str_hash;
	_tmp57_ = g_str_equal;
	_tmp58_ = g_hash_table_new_full (_tmp56_, _tmp57_, _g_free0_, _alm_app_choose_info_unref0_);
	_g_hash_table_unref0 (self->priv->unblocked_list);
	self->priv->unblocked_list = _tmp58_;
	_tmp59_ = blacklist_interface;
	_tmp60_ = alm_application_blacklist_new (_tmp59_);
	_alm_application_blacklist_unref0 (self->priv->app_blacklist);
	self->priv->app_blacklist = _tmp60_;
	_tmp61_ = self->priv->app_blacklist;
	_tmp62_ = self->priv->blocked_list;
	_tmp63_ = self->priv->unblocked_list;
	_tmp64_ = alm_applications_tree_view_new (_tmp61_, _tmp62_, _tmp63_);
	g_object_ref_sink (_tmp64_);
	_g_object_unref0 (self->priv->app_treeview);
	self->priv->app_treeview = _tmp64_;
	_tmp65_ = self->priv->app_blacklist;
	g_signal_connect_object (_tmp65_, "application-removed", (GCallback) ___lambda10__alm_application_blacklist_application_removed, self, 0);
	_tmp66_ = self->priv->app_blacklist;
	g_signal_connect_object (_tmp66_, "application-added", (GCallback) ___lambda11__alm_application_blacklist_application_added, self, 0);
	alm_privacy_widget_setup_ui (self);
	special_dirs = (g_free (special_dirs), NULL);
	return self;
}


AlmPrivacyWidget* alm_privacy_widget_new (AlmBlacklist* blacklist_interface) {
	return alm_privacy_widget_construct (ALM_TYPE_PRIVACY_WIDGET, blacklist_interface);
}


static void __lambda12_ (AlmPrivacyWidget* self, gboolean status) {
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	_tmp0_ = self->priv->record_button;
	_tmp1_ = status;
	gtk_switch_set_active (_tmp0_, !_tmp1_);
}


static void ___lambda12__alm_blacklist_incognito_toggled (AlmBlacklist* _sender, gboolean status, gpointer self) {
	__lambda12_ (self, status);
}


static void __lambda13_ (AlmPrivacyWidget* self) {
	AlmBlacklist* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean recording;
	GtkSwitch* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	_tmp0_ = self->priv->blacklist;
	_tmp1_ = alm_blacklist_get_incognito (_tmp0_);
	recording = !_tmp1_;
	_tmp2_ = self->priv->record_button;
	_tmp3_ = gtk_switch_get_active (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = recording;
	if (_tmp4_ != _tmp5_) {
		AlmBlacklist* _tmp6_;
		gboolean _tmp7_;
		_tmp6_ = self->priv->blacklist;
		_tmp7_ = recording;
		alm_blacklist_set_incognito (_tmp6_, _tmp7_);
	}
}


static void ___lambda13__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda13_ (self);
}


static void __lambda14_ (AlmPrivacyWidget* self) {
	AlmDeleteHistoryDialog* _tmp0_;
	_tmp0_ = self->priv->delete_dialog;
	alm_delete_history_dialog_on_delete_history (_tmp0_);
}


static void ___lambda14__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda14_ (self);
}


static gint __lambda15_ (const gchar* s1, const gchar* s2) {
	gint result = 0;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gint _tmp2_ = 0;
	g_return_val_if_fail (s1 != NULL, 0);
	g_return_val_if_fail (s2 != NULL, 0);
	_tmp0_ = s1;
	_tmp1_ = s2;
	_tmp2_ = g_utf8_collate (_tmp0_, _tmp1_);
	result = _tmp2_;
	return result;
}


static gint ___lambda15__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda15_ (a, b);
	return result;
}


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_)) {
		AlmPrivacyWidget * self;
		self = _data3_->self;
		_g_object_unref0 (_data3_->check_button);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}


static void ____lambda16_ (Block3Data* _data3_) {
	AlmPrivacyWidget * self;
	gboolean _tmp0_;
	self = _data3_->self;
	_tmp0_ = self->priv->file_type_fire_signal;
	if (_tmp0_) {
		GtkCheckButton* _tmp1_;
		gboolean _tmp2_;
		gboolean _tmp3_;
		self->priv->file_type_fire_signal = FALSE;
		_tmp1_ = _data3_->check_button;
		_tmp2_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp1_);
		_tmp3_ = _tmp2_;
		if (_tmp3_) {
			AlmFileTypeBlacklist* _tmp4_;
			GeeHashMap* _tmp5_;
			GtkCheckButton* _tmp6_;
			const gchar* _tmp7_;
			const gchar* _tmp8_;
			gpointer _tmp9_ = NULL;
			gchar* _tmp10_;
			_tmp4_ = self->priv->files_type_blacklist;
			_tmp5_ = self->priv->mime_dict;
			_tmp6_ = _data3_->check_button;
			_tmp7_ = gtk_button_get_label ((GtkButton*) _tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, _tmp8_);
			_tmp10_ = (gchar*) _tmp9_;
			alm_file_type_blacklist_unblock (_tmp4_, _tmp10_);
			_g_free0 (_tmp10_);
		} else {
			AlmFileTypeBlacklist* _tmp11_;
			GeeHashMap* _tmp12_;
			GtkCheckButton* _tmp13_;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			gpointer _tmp16_ = NULL;
			gchar* _tmp17_;
			_tmp11_ = self->priv->files_type_blacklist;
			_tmp12_ = self->priv->mime_dict;
			_tmp13_ = _data3_->check_button;
			_tmp14_ = gtk_button_get_label ((GtkButton*) _tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp12_, _tmp15_);
			_tmp17_ = (gchar*) _tmp16_;
			alm_file_type_blacklist_block (_tmp11_, _tmp17_);
			_g_free0 (_tmp17_);
		}
		self->priv->file_type_fire_signal = TRUE;
	}
}


static void _____lambda16__gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	____lambda16_ (self);
}


static void _alm_privacy_widget_on_add_exception_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	alm_privacy_widget_on_add_exception (self);
}


static void _alm_privacy_widget_on_remove_exception_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	alm_privacy_widget_on_remove_exception (self);
}


static void _alm_privacy_widget_on_add_folder_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	alm_privacy_widget_on_add_folder (self);
}


static void _alm_privacy_widget_on_add_application_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	alm_privacy_widget_on_add_application (self);
}


static void alm_privacy_widget_setup_ui (AlmPrivacyWidget* self) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_;
	gchar* text;
	GtkLabel* _tmp2_;
	GtkLabel* label;
	GtkLabel* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	GtkSwitch* _tmp11_;
	GtkLabel* _tmp12_;
	GtkLabel* record_label;
	GtkLabel* _tmp13_;
	const gchar* _tmp14_ = NULL;
	gchar* _tmp15_ = NULL;
	gchar* _tmp16_;
	GtkSwitch* _tmp17_;
	AlmBlacklist* _tmp18_;
	gboolean _tmp19_ = FALSE;
	AlmBlacklist* _tmp20_;
	GtkSwitch* _tmp21_;
	GtkButton* _tmp22_;
	GtkButton* _tmp23_;
	const gchar* _tmp24_ = NULL;
	GtkButton* _tmp25_;
	GtkBox* _tmp26_;
	GtkBox* hbox;
	GtkBox* _tmp27_;
	GtkSwitch* _tmp28_;
	GtkBox* _tmp29_;
	GtkLabel* _tmp30_;
	GtkBox* _tmp31_;
	GtkLabel* _tmp32_;
	GtkLabel* _tmp33_;
	GtkBox* _tmp34_;
	GtkButton* _tmp35_;
	GtkBox* _tmp36_;
	GtkBox* _tmp37_;
	GtkBox* checkbox_hbox;
	GCompareFunc mime_compare;
	GeeArrayList* _tmp38_;
	GeeArrayList* keys;
	GeeArrayList* _tmp39_;
	GeeHashMap* _tmp40_;
	GeeSet* _tmp41_;
	GeeSet* _tmp42_;
	GeeSet* _tmp43_;
	GeeArrayList* _tmp44_;
	GCompareFunc _tmp45_;
	AlmFileTypeBlacklist* _tmp70_;
	const gchar* _tmp78_ = NULL;
	GtkLabel* _tmp79_;
	GtkLabel* checkbox_label;
	GtkAlignment* _tmp80_;
	GtkAlignment* al;
	GtkBox* _tmp81_;
	GtkBox* checkbox_vbox;
	GtkBox* _tmp82_;
	GtkBox* _tmp83_;
	GtkBox* exception_vbox;
	const gchar* _tmp84_ = NULL;
	GtkLabel* _tmp85_;
	GtkLabel* exception_label;
	GtkAlignment* _tmp86_;
	GtkAlignment* al2;
	GtkListStore* _tmp87_;
	GtkListStore* _tmp88_;
	GtkTreeView* _tmp89_;
	GtkTreeView* _tmp90_;
	GtkTreeView* _tmp91_;
	GtkTreeViewColumn* _tmp92_;
	GtkTreeViewColumn* column_pix_name;
	const gchar* _tmp93_ = NULL;
	GtkTreeView* _tmp94_;
	AlmExceptionCellRenderer* _tmp95_;
	AlmExceptionCellRenderer* pix_rend;
	GtkScrolledWindow* _tmp96_;
	GtkScrolledWindow* scroll;
	GtkTreeView* _tmp97_;
	GtkToolbar* _tmp98_;
	GtkToolbar* exception_toolbar;
	GtkStyleContext* _tmp99_ = NULL;
	GtkStyleContext* _tmp100_ = NULL;
	GtkStyleContext* _tmp101_ = NULL;
	const gchar* _tmp102_ = NULL;
	GtkToolButton* _tmp103_;
	GtkToolButton* exception_add;
	const gchar* _tmp104_ = NULL;
	GtkToolButton* _tmp105_;
	GtkToolButton* exception_remove;
	GtkMenu* _tmp106_;
	GtkMenuItem* _tmp107_;
	GtkMenuItem* folder_menu;
	GtkMenuItem* _tmp108_;
	GtkMenuItem* app_menu;
	GtkMenu* _tmp109_;
	GtkMenu* _tmp110_;
	GtkMenu* _tmp111_;
	GtkBox* _tmp112_;
	GtkBox* general_hbox;
	AlmApplicationBlacklist* _tmp113_;
	GHashTable* _tmp114_;
	GHashTable* _tmp115_;
	AlmApplicationsChooserDialog* _tmp116_;
	GtkButton* _tmp117_;
	AlmDeleteHistoryDialog* _tmp118_;
	g_return_if_fail (self != NULL);
	gtk_container_set_border_width ((GtkContainer*) self, (guint) 12);
	_tmp0_ = _ ("This Operating System keeps track of Files and Applications you've use" \
"d to provide extra functionality. If other people can see or access yo" \
"ur user account, you may wish to limit which items are recorded.");
	_tmp1_ = g_strdup (_tmp0_);
	text = _tmp1_;
	_tmp2_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp2_);
	label = _tmp2_;
	_tmp3_ = label;
	_tmp4_ = text;
	_tmp5_ = g_strdup_printf ("%s", _tmp4_);
	_tmp6_ = _tmp5_;
	gtk_label_set_markup (_tmp3_, _tmp6_);
	_g_free0 (_tmp6_);
	_tmp7_ = label;
	gtk_label_set_line_wrap (_tmp7_, TRUE);
	_tmp8_ = label;
	gtk_label_set_line_wrap_mode (_tmp8_, PANGO_WRAP_WORD);
	_tmp9_ = label;
	gtk_misc_set_alignment ((GtkMisc*) _tmp9_, (gfloat) 0, 0.5f);
	_tmp10_ = label;
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp10_, FALSE, TRUE, (guint) 0);
	_tmp11_ = (GtkSwitch*) gtk_switch_new ();
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->record_button);
	self->priv->record_button = _tmp11_;
	_tmp12_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp12_);
	record_label = _tmp12_;
	_tmp13_ = record_label;
	_tmp14_ = _ ("Record file and application usage");
	_tmp15_ = g_strdup_printf ("<b>%s</b>", _tmp14_);
	_tmp16_ = _tmp15_;
	gtk_label_set_markup (_tmp13_, _tmp16_);
	_g_free0 (_tmp16_);
	_tmp17_ = self->priv->record_button;
	_tmp18_ = self->priv->blacklist;
	_tmp19_ = alm_blacklist_get_incognito (_tmp18_);
	gtk_switch_set_active (_tmp17_, !_tmp19_);
	_tmp20_ = self->priv->blacklist;
	g_signal_connect_object (_tmp20_, "incognito-toggled", (GCallback) ___lambda12__alm_blacklist_incognito_toggled, self, 0);
	_tmp21_ = self->priv->record_button;
	g_signal_connect_object ((GObject*) _tmp21_, "notify::active", (GCallback) ___lambda13__g_object_notify, self, 0);
	_tmp22_ = (GtkButton*) gtk_button_new_from_stock (GTK_STOCK_DELETE);
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (self->priv->del_button);
	self->priv->del_button = _tmp22_;
	_tmp23_ = self->priv->del_button;
	_tmp24_ = _ ("Clear Usage Data...");
	gtk_button_set_label (_tmp23_, _tmp24_);
	_tmp25_ = self->priv->del_button;
	g_signal_connect_object (_tmp25_, "clicked", (GCallback) ___lambda14__gtk_button_clicked, self, 0);
	_tmp26_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
	g_object_ref_sink (_tmp26_);
	hbox = _tmp26_;
	_tmp27_ = hbox;
	_tmp28_ = self->priv->record_button;
	gtk_box_pack_start (_tmp27_, (GtkWidget*) _tmp28_, FALSE, FALSE, (guint) 3);
	_tmp29_ = hbox;
	_tmp30_ = record_label;
	gtk_box_pack_start (_tmp29_, (GtkWidget*) _tmp30_, FALSE, FALSE, (guint) 3);
	_tmp31_ = hbox;
	_tmp32_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp32_);
	_tmp33_ = _tmp32_;
	gtk_box_pack_start (_tmp31_, (GtkWidget*) _tmp33_, TRUE, TRUE, (guint) 3);
	_g_object_unref0 (_tmp33_);
	_tmp34_ = hbox;
	_tmp35_ = self->priv->del_button;
	gtk_box_pack_start (_tmp34_, (GtkWidget*) _tmp35_, FALSE, FALSE, (guint) 3);
	_tmp36_ = hbox;
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp36_, FALSE, TRUE, (guint) 0);
	_tmp37_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp37_);
	checkbox_hbox = _tmp37_;
	mime_compare = ___lambda15__gcompare_func;
	_tmp38_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
	keys = _tmp38_;
	_tmp39_ = keys;
	_tmp40_ = self->priv->mime_dict;
	_tmp41_ = gee_abstract_map_get_keys ((GeeMap*) _tmp40_);
	_tmp42_ = _tmp41_;
	_tmp43_ = _tmp42_;
	gee_abstract_collection_add_all ((GeeAbstractCollection*) _tmp39_, (GeeCollection*) _tmp43_);
	_g_object_unref0 (_tmp43_);
	_tmp44_ = keys;
	_tmp45_ = mime_compare;
	gee_list_sort ((GeeList*) _tmp44_, _tmp45_);
	{
		GeeArrayList* _tmp46_;
		GeeArrayList* _tmp47_;
		GeeArrayList* _key_list;
		GeeArrayList* _tmp48_;
		gint _tmp49_;
		gint _tmp50_;
		gint _key_size;
		gint _key_index;
		_tmp46_ = keys;
		_tmp47_ = _g_object_ref0 (_tmp46_);
		_key_list = _tmp47_;
		_tmp48_ = _key_list;
		_tmp49_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp48_);
		_tmp50_ = _tmp49_;
		_key_size = _tmp50_;
		_key_index = -1;
		while (TRUE) {
			gint _tmp51_;
			gint _tmp52_;
			gint _tmp53_;
			GeeArrayList* _tmp54_;
			gint _tmp55_;
			gpointer _tmp56_ = NULL;
			gchar* key;
			const gchar* _tmp57_;
			GtkCheckButton* _tmp58_;
			GtkCheckButton* check_button;
			GtkCheckButton* _tmp59_;
			GeeHashSet* _tmp60_;
			GtkCheckButton* _tmp61_;
			GeeHashMap* _tmp62_;
			GeeHashMap* _tmp63_;
			const gchar* _tmp64_;
			gpointer _tmp65_ = NULL;
			gchar* _tmp66_;
			GtkCheckButton* _tmp67_;
			GtkBox* _tmp68_;
			GtkCheckButton* _tmp69_;
			_tmp51_ = _key_index;
			_key_index = _tmp51_ + 1;
			_tmp52_ = _key_index;
			_tmp53_ = _key_size;
			if (!(_tmp52_ < _tmp53_)) {
				break;
			}
			_tmp54_ = _key_list;
			_tmp55_ = _key_index;
			_tmp56_ = gee_abstract_list_get ((GeeAbstractList*) _tmp54_, _tmp55_);
			key = (gchar*) _tmp56_;
			_tmp57_ = key;
			_tmp58_ = (GtkCheckButton*) gtk_check_button_new_with_label (_tmp57_);
			g_object_ref_sink (_tmp58_);
			check_button = _tmp58_;
			_tmp59_ = check_button;
			gtk_toggle_button_set_active ((GtkToggleButton*) _tmp59_, TRUE);
			_tmp60_ = self->priv->button_list;
			_tmp61_ = check_button;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp60_, _tmp61_);
			_tmp62_ = self->priv->checkboxes;
			_tmp63_ = self->priv->mime_dict;
			_tmp64_ = key;
			_tmp65_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp63_, _tmp64_);
			_tmp66_ = (gchar*) _tmp65_;
			_tmp67_ = check_button;
			gee_abstract_map_set ((GeeAbstractMap*) _tmp62_, _tmp66_, _tmp67_);
			_g_free0 (_tmp66_);
			_tmp68_ = checkbox_hbox;
			_tmp69_ = check_button;
			gtk_box_pack_start (_tmp68_, (GtkWidget*) _tmp69_, FALSE, FALSE, (guint) 0);
			_g_object_unref0 (check_button);
			_g_free0 (key);
		}
		_g_object_unref0 (_key_list);
	}
	_tmp70_ = self->priv->files_type_blacklist;
	alm_file_type_blacklist_populate_file_types (_tmp70_);
	{
		GeeHashSet* _tmp71_;
		GeeIterator* _tmp72_ = NULL;
		GeeIterator* _check_button_it;
		_tmp71_ = self->priv->button_list;
		_tmp72_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp71_);
		_check_button_it = _tmp72_;
		while (TRUE) {
			Block3Data* _data3_;
			GeeIterator* _tmp73_;
			gboolean _tmp74_ = FALSE;
			GeeIterator* _tmp75_;
			gpointer _tmp76_ = NULL;
			GtkCheckButton* _tmp77_;
			_data3_ = g_slice_new0 (Block3Data);
			_data3_->_ref_count_ = 1;
			_data3_->self = g_object_ref (self);
			_tmp73_ = _check_button_it;
			_tmp74_ = gee_iterator_next (_tmp73_);
			if (!_tmp74_) {
				block3_data_unref (_data3_);
				_data3_ = NULL;
				break;
			}
			_tmp75_ = _check_button_it;
			_tmp76_ = gee_iterator_get (_tmp75_);
			_data3_->check_button = (GtkCheckButton*) _tmp76_;
			_tmp77_ = _data3_->check_button;
			g_signal_connect_data ((GtkToggleButton*) _tmp77_, "toggled", (GCallback) _____lambda16__gtk_toggle_button_toggled, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
			block3_data_unref (_data3_);
			_data3_ = NULL;
		}
		_g_object_unref0 (_check_button_it);
	}
	_tmp78_ = _ ("Include:");
	_tmp79_ = (GtkLabel*) gtk_label_new (_tmp78_);
	g_object_ref_sink (_tmp79_);
	checkbox_label = _tmp79_;
	_tmp80_ = (GtkAlignment*) gtk_alignment_new ((gfloat) 0, 0.5f, (gfloat) 0, (gfloat) 0);
	g_object_ref_sink (_tmp80_);
	al = _tmp80_;
	gtk_container_add ((GtkContainer*) al, (GtkWidget*) checkbox_label);
	_tmp81_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp81_);
	checkbox_vbox = _tmp81_;
	gtk_box_pack_start (checkbox_vbox, (GtkWidget*) al, FALSE, TRUE, (guint) 0);
	_tmp82_ = checkbox_hbox;
	gtk_box_pack_start (checkbox_vbox, (GtkWidget*) _tmp82_, TRUE, TRUE, (guint) 0);
	_tmp83_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp83_);
	exception_vbox = _tmp83_;
	_tmp84_ = _ ("Exclude:");
	_tmp85_ = (GtkLabel*) gtk_label_new (_tmp84_);
	g_object_ref_sink (_tmp85_);
	exception_label = _tmp85_;
	_tmp86_ = (GtkAlignment*) gtk_alignment_new ((gfloat) 0, 0.5f, (gfloat) 0, (gfloat) 0);
	g_object_ref_sink (_tmp86_);
	al2 = _tmp86_;
	gtk_container_add ((GtkContainer*) al2, (GtkWidget*) exception_label);
	gtk_box_pack_start (exception_vbox, (GtkWidget*) al2, FALSE, FALSE, (guint) 5);
	_tmp87_ = gtk_list_store_new (4, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_STRING, ALM_TYPE_ITEM_TYPE);
	_g_object_unref0 (self->priv->exception_list_store);
	self->priv->exception_list_store = _tmp87_;
	_tmp88_ = self->priv->exception_list_store;
	_tmp89_ = (GtkTreeView*) gtk_tree_view_new_with_model ((GtkTreeModel*) _tmp88_);
	g_object_ref_sink (_tmp89_);
	_g_object_unref0 (self->priv->exception_list);
	self->priv->exception_list = _tmp89_;
	_tmp90_ = self->priv->exception_list;
	gtk_tree_view_set_headers_visible (_tmp90_, FALSE);
	_tmp91_ = self->priv->exception_list;
	gtk_tree_view_set_rules_hint (_tmp91_, TRUE);
	_tmp92_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp92_);
	column_pix_name = _tmp92_;
	_tmp93_ = _ ("Name");
	gtk_tree_view_column_set_title (column_pix_name, _tmp93_);
	_tmp94_ = self->priv->exception_list;
	gtk_tree_view_append_column (_tmp94_, column_pix_name);
	_tmp95_ = alm_exception_cell_renderer_new ();
	g_object_ref_sink (_tmp95_);
	pix_rend = _tmp95_;
	gtk_cell_layout_pack_start ((GtkCellLayout*) column_pix_name, (GtkCellRenderer*) pix_rend, FALSE);
	gtk_cell_layout_add_attribute ((GtkCellLayout*) column_pix_name, (GtkCellRenderer*) pix_rend, "pixbuf", 1);
	gtk_cell_layout_add_attribute ((GtkCellLayout*) column_pix_name, (GtkCellRenderer*) pix_rend, "text", 2);
	_tmp96_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp96_);
	scroll = _tmp96_;
	_tmp97_ = self->priv->exception_list;
	gtk_container_add ((GtkContainer*) scroll, (GtkWidget*) _tmp97_);
	gtk_scrolled_window_set_policy (scroll, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
	gtk_scrolled_window_set_shadow_type (scroll, GTK_SHADOW_IN);
	gtk_container_set_border_width ((GtkContainer*) scroll, (guint) 1);
	gtk_box_pack_start (exception_vbox, (GtkWidget*) scroll, TRUE, TRUE, (guint) 0);
	_tmp98_ = (GtkToolbar*) gtk_toolbar_new ();
	g_object_ref_sink (_tmp98_);
	exception_toolbar = _tmp98_;
	g_object_set (exception_toolbar, "toolbar-style", GTK_TOOLBAR_ICONS, NULL);
	gtk_toolbar_set_icon_size (exception_toolbar, 1);
	g_object_set (exception_toolbar, "icon-size-set", TRUE, NULL);
	gtk_widget_set_visible ((GtkWidget*) exception_toolbar, TRUE);
	_tmp99_ = gtk_widget_get_style_context ((GtkWidget*) scroll);
	gtk_style_context_set_junction_sides (_tmp99_, GTK_JUNCTION_BOTTOM);
	_tmp100_ = gtk_widget_get_style_context ((GtkWidget*) exception_toolbar);
	gtk_style_context_add_class (_tmp100_, GTK_STYLE_CLASS_INLINE_TOOLBAR);
	_tmp101_ = gtk_widget_get_style_context ((GtkWidget*) exception_toolbar);
	gtk_style_context_set_junction_sides (_tmp101_, GTK_JUNCTION_TOP);
	_tmp102_ = _ ("Add Item");
	_tmp103_ = (GtkToolButton*) gtk_tool_button_new (NULL, _tmp102_);
	g_object_ref_sink (_tmp103_);
	exception_add = _tmp103_;
	gtk_tool_button_set_icon_name (exception_add, "list-add-symbolic");
	g_signal_connect_object (exception_add, "clicked", (GCallback) _alm_privacy_widget_on_add_exception_gtk_tool_button_clicked, self, 0);
	_tmp104_ = _ ("Remove Item");
	_tmp105_ = (GtkToolButton*) gtk_tool_button_new (NULL, _tmp104_);
	g_object_ref_sink (_tmp105_);
	exception_remove = _tmp105_;
	gtk_tool_button_set_icon_name (exception_remove, "list-remove-symbolic");
	g_signal_connect_object (exception_remove, "clicked", (GCallback) _alm_privacy_widget_on_remove_exception_gtk_tool_button_clicked, self, 0);
	gtk_toolbar_insert (exception_toolbar, (GtkToolItem*) exception_add, 0);
	gtk_toolbar_insert (exception_toolbar, (GtkToolItem*) exception_remove, 1);
	_tmp106_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp106_);
	_g_object_unref0 (self->priv->exception_menu);
	self->priv->exception_menu = _tmp106_;
	_tmp107_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Add Folder...");
	g_object_ref_sink (_tmp107_);
	folder_menu = _tmp107_;
	g_signal_connect_object (folder_menu, "activate", (GCallback) _alm_privacy_widget_on_add_folder_gtk_menu_item_activate, self, 0);
	_tmp108_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Add Application...");
	g_object_ref_sink (_tmp108_);
	app_menu = _tmp108_;
	g_signal_connect_object (app_menu, "activate", (GCallback) _alm_privacy_widget_on_add_application_gtk_menu_item_activate, self, 0);
	_tmp109_ = self->priv->exception_menu;
	gtk_menu_shell_append ((GtkMenuShell*) _tmp109_, (GtkWidget*) folder_menu);
	_tmp110_ = self->priv->exception_menu;
	gtk_menu_shell_append ((GtkMenuShell*) _tmp110_, (GtkWidget*) app_menu);
	_tmp111_ = self->priv->exception_menu;
	gtk_widget_show_all ((GtkWidget*) _tmp111_);
	gtk_box_pack_start (exception_vbox, (GtkWidget*) exception_toolbar, FALSE, FALSE, (guint) 0);
	_tmp112_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp112_);
	general_hbox = _tmp112_;
	gtk_box_pack_start (general_hbox, (GtkWidget*) checkbox_vbox, TRUE, TRUE, (guint) 0);
	gtk_box_pack_start (general_hbox, (GtkWidget*) exception_vbox, TRUE, TRUE, (guint) 0);
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) general_hbox, FALSE, TRUE, (guint) 0);
	_tmp113_ = self->priv->app_blacklist;
	_tmp114_ = self->priv->blocked_list;
	_tmp115_ = self->priv->unblocked_list;
	_tmp116_ = alm_applications_chooser_dialog_new (_tmp113_, _tmp114_, _tmp115_);
	g_object_ref_sink (_tmp116_);
	_g_object_unref0 (self->priv->app_dialog);
	self->priv->app_dialog = _tmp116_;
	_tmp117_ = self->priv->del_button;
	_tmp118_ = alm_delete_history_dialog_new (_tmp117_);
	g_object_ref_sink (_tmp118_);
	_g_object_unref0 (self->priv->delete_dialog);
	self->priv->delete_dialog = _tmp118_;
	alm_privacy_widget_folders_populate (self);
	alm_privacy_widget_app_populate (self);
	_g_object_unref0 (general_hbox);
	_g_object_unref0 (app_menu);
	_g_object_unref0 (folder_menu);
	_g_object_unref0 (exception_remove);
	_g_object_unref0 (exception_add);
	_g_object_unref0 (exception_toolbar);
	_g_object_unref0 (scroll);
	_g_object_unref0 (pix_rend);
	_g_object_unref0 (column_pix_name);
	_g_object_unref0 (al2);
	_g_object_unref0 (exception_label);
	_g_object_unref0 (exception_vbox);
	_g_object_unref0 (checkbox_vbox);
	_g_object_unref0 (al);
	_g_object_unref0 (checkbox_label);
	_g_object_unref0 (keys);
	_g_object_unref0 (checkbox_hbox);
	_g_object_unref0 (hbox);
	_g_object_unref0 (record_label);
	_g_object_unref0 (label);
	_g_free0 (text);
}


gint alm_privacy_widget_compare_mimes (AlmPrivacyWidget* self, const gchar* s1, const gchar* s2) {
	gint result = 0;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gint _tmp2_ = 0;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (s1 != NULL, 0);
	g_return_val_if_fail (s2 != NULL, 0);
	_tmp0_ = s1;
	_tmp1_ = s2;
	_tmp2_ = g_utf8_collate (_tmp0_, _tmp1_);
	result = _tmp2_;
	return result;
}


static void alm_privacy_widget_folders_populate (AlmPrivacyWidget* self) {
	g_return_if_fail (self != NULL);
	{
		AlmPathBlacklist* _tmp0_;
		GeeHashSet* _tmp1_;
		GeeHashSet* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _folder_it;
		_tmp0_ = self->priv->path_blacklist;
		_tmp1_ = alm_path_blacklist_get_all_folders (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp2_);
		_folder_it = _tmp3_;
		while (TRUE) {
			GeeIterator* _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeIterator* _tmp6_;
			gpointer _tmp7_ = NULL;
			gchar* folder;
			const gchar* _tmp8_;
			_tmp4_ = _folder_it;
			_tmp5_ = gee_iterator_next (_tmp4_);
			if (!_tmp5_) {
				break;
			}
			_tmp6_ = _folder_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			folder = (gchar*) _tmp7_;
			_tmp8_ = folder;
			alm_privacy_widget_add_folder_to_view (self, _tmp8_);
			_g_free0 (folder);
		}
		_g_object_unref0 (_folder_it);
	}
}


static void alm_privacy_widget_app_populate (AlmPrivacyWidget* self) {
	g_return_if_fail (self != NULL);
	{
		AlmApplicationBlacklist* _tmp0_;
		GeeHashSet* _tmp1_;
		GeeHashSet* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _app_it;
		_tmp0_ = self->priv->app_blacklist;
		_tmp1_ = alm_application_blacklist_get_all_apps (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp2_);
		_app_it = _tmp3_;
		while (TRUE) {
			GeeIterator* _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeIterator* _tmp6_;
			gpointer _tmp7_ = NULL;
			gchar* app;
			const gchar* _tmp8_;
			_tmp4_ = _app_it;
			_tmp5_ = gee_iterator_next (_tmp4_);
			if (!_tmp5_) {
				break;
			}
			_tmp6_ = _app_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			app = (gchar*) _tmp7_;
			_tmp8_ = app;
			alm_privacy_widget_add_app_to_view (self, _tmp8_);
			_g_free0 (app);
		}
		_g_object_unref0 (_app_it);
	}
}


static void alm_privacy_widget_on_add_exception (AlmPrivacyWidget* self) {
	GtkMenu* _tmp0_;
	guint32 _tmp1_ = 0U;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->exception_menu;
	_tmp1_ = gtk_get_current_event_time ();
	gtk_menu_popup (_tmp0_, NULL, NULL, NULL, NULL, (guint) 1, _tmp1_);
}


static void alm_privacy_widget_on_remove_exception (AlmPrivacyWidget* self) {
	GtkTreeView* _tmp0_;
	GtkTreeSelection* _tmp1_ = NULL;
	GtkTreeSelection* _tmp2_;
	GtkTreeSelection* sel;
	GtkTreeSelection* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->exception_list;
	_tmp1_ = gtk_tree_view_get_selection (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	sel = _tmp2_;
	_tmp3_ = sel;
	if (_tmp3_ != NULL) {
		GtkTreeModel* model = NULL;
		GtkTreeIter iter = {0};
		GtkTreeSelection* _tmp4_;
		GtkTreeModel* _tmp5_ = NULL;
		GtkTreeIter _tmp6_ = {0};
		gboolean _tmp7_ = FALSE;
		GtkTreeModel* _tmp8_;
		_tmp4_ = sel;
		_tmp7_ = gtk_tree_selection_get_selected (_tmp4_, &_tmp5_, &_tmp6_);
		_g_object_unref0 (model);
		_tmp8_ = _g_object_ref0 (_tmp5_);
		model = _tmp8_;
		iter = _tmp6_;
		if (_tmp7_) {
			gchar* name = NULL;
			AlmItemType type = 0;
			GtkTreeModel* _tmp9_;
			GtkTreeIter _tmp10_;
			const gchar* _tmp11_;
			_tmp9_ = model;
			_tmp10_ = iter;
			gtk_tree_model_get (_tmp9_, &_tmp10_, 0, &name, 3, &type, -1);
			_tmp11_ = name;
			if (_tmp11_ != NULL) {
				GtkListStore* _tmp12_;
				GtkTreeIter _tmp13_;
				AlmItemType _tmp14_;
				_tmp12_ = self->priv->exception_list_store;
				_tmp13_ = iter;
				gtk_list_store_remove (_tmp12_, &_tmp13_);
				_tmp14_ = type;
				if (_tmp14_ == ALM_ITEM_TYPE_FILE) {
					AlmPathBlacklist* _tmp15_;
					const gchar* _tmp16_;
					_tmp15_ = self->priv->path_blacklist;
					_tmp16_ = name;
					alm_path_blacklist_unblock (_tmp15_, _tmp16_);
				} else {
					AlmApplicationBlacklist* _tmp17_;
					const gchar* _tmp18_;
					_tmp17_ = self->priv->app_blacklist;
					_tmp18_ = name;
					alm_application_blacklist_unblock (_tmp17_, _tmp18_);
				}
			}
			_g_free0 (name);
		}
		_g_object_unref0 (model);
	}
	_g_object_unref0 (sel);
}


static void alm_privacy_widget_on_add_folder (AlmPrivacyWidget* self) {
	const gchar* _tmp0_ = NULL;
	GtkFileChooserDialog* _tmp1_;
	GtkFileChooserDialog* chooser;
	GtkFileChooserDialog* _tmp2_;
	GtkFileChooserDialog* _tmp3_;
	gint _tmp4_ = 0;
	gint res;
	GtkFileChooserDialog* _tmp5_;
	gint _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _ ("Select a directory to blacklist");
	_tmp1_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp0_, NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, NULL);
	g_object_ref_sink (_tmp1_);
	chooser = _tmp1_;
	_tmp2_ = chooser;
	gtk_dialog_add_buttons ((GtkDialog*) _tmp2_, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
	_tmp3_ = chooser;
	_tmp4_ = gtk_dialog_run ((GtkDialog*) _tmp3_);
	res = _tmp4_;
	_tmp5_ = chooser;
	gtk_widget_hide ((GtkWidget*) _tmp5_);
	_tmp6_ = res;
	if (_tmp6_ == ((gint) GTK_RESPONSE_OK)) {
		GtkFileChooserDialog* _tmp7_;
		gchar* _tmp8_ = NULL;
		gchar* folder;
		AlmPathBlacklist* _tmp9_;
		const gchar* _tmp10_;
		gboolean _tmp11_ = FALSE;
		_tmp7_ = chooser;
		_tmp8_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _tmp7_);
		folder = _tmp8_;
		_tmp9_ = self->priv->path_blacklist;
		_tmp10_ = folder;
		_tmp11_ = alm_path_blacklist_is_duplicate (_tmp9_, _tmp10_);
		if (!_tmp11_) {
			const gchar* _tmp12_;
			AlmPathBlacklist* _tmp13_;
			const gchar* _tmp14_;
			_tmp12_ = folder;
			alm_privacy_widget_add_folder_to_view (self, _tmp12_);
			_tmp13_ = self->priv->path_blacklist;
			_tmp14_ = folder;
			alm_path_blacklist_block (_tmp13_, _tmp14_);
		}
		_g_free0 (folder);
	}
	_g_object_unref0 (chooser);
}


static void alm_privacy_widget_on_add_file (AlmPrivacyWidget* self) {
	const gchar* _tmp0_ = NULL;
	GtkFileChooserDialog* _tmp1_;
	GtkFileChooserDialog* chooser;
	GtkFileChooserDialog* _tmp2_;
	GtkFileChooserDialog* _tmp3_;
	gint _tmp4_ = 0;
	gint res;
	GtkFileChooserDialog* _tmp5_;
	gint _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _ ("Select a file to blacklist");
	_tmp1_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp0_, NULL, GTK_FILE_CHOOSER_ACTION_OPEN, NULL);
	g_object_ref_sink (_tmp1_);
	chooser = _tmp1_;
	_tmp2_ = chooser;
	gtk_dialog_add_buttons ((GtkDialog*) _tmp2_, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
	_tmp3_ = chooser;
	_tmp4_ = gtk_dialog_run ((GtkDialog*) _tmp3_);
	res = _tmp4_;
	_tmp5_ = chooser;
	gtk_widget_hide ((GtkWidget*) _tmp5_);
	_tmp6_ = res;
	if (_tmp6_ == ((gint) GTK_RESPONSE_OK)) {
		GtkFileChooserDialog* _tmp7_;
		gchar* _tmp8_ = NULL;
		gchar* filename;
		AlmPathBlacklist* _tmp9_;
		const gchar* _tmp10_;
		gboolean _tmp11_ = FALSE;
		_tmp7_ = chooser;
		_tmp8_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _tmp7_);
		filename = _tmp8_;
		_tmp9_ = self->priv->path_blacklist;
		_tmp10_ = filename;
		_tmp11_ = alm_path_blacklist_is_duplicate (_tmp9_, _tmp10_);
		if (!_tmp11_) {
			const gchar* _tmp12_;
			AlmPathBlacklist* _tmp13_;
			const gchar* _tmp14_;
			_tmp12_ = filename;
			alm_privacy_widget_add_folder_to_view (self, _tmp12_);
			_tmp13_ = self->priv->path_blacklist;
			_tmp14_ = filename;
			alm_path_blacklist_block (_tmp13_, _tmp14_);
		}
		_g_free0 (filename);
	}
	_g_object_unref0 (chooser);
}


static gpointer _alm_app_choose_info_ref0 (gpointer self) {
	return self ? alm_app_choose_info_ref (self) : NULL;
}


static void alm_privacy_widget_on_add_application (AlmPrivacyWidget* self) {
	AlmApplicationsChooserDialog* _tmp0_;
	GtkWidget* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	AlmApplicationsChooserDialog* _tmp3_;
	AlmApplicationsChooserDialog* _tmp4_;
	const gchar* _tmp5_ = NULL;
	AlmApplicationsChooserDialog* _tmp6_;
	gint _tmp7_ = 0;
	gint res;
	GtkWidget* _tmp8_ = NULL;
	gint _tmp9_;
	AlmApplicationsChooserDialog* _tmp48_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->app_dialog;
	_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	gtk_window_set_transient_for ((GtkWindow*) _tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GTK_TYPE_WINDOW, GtkWindow));
	_tmp2_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	gtk_widget_set_sensitive (_tmp2_, FALSE);
	_tmp3_ = self->priv->app_dialog;
	gtk_window_set_modal ((GtkWindow*) _tmp3_, TRUE);
	_tmp4_ = self->priv->app_dialog;
	_tmp5_ = _ ("Select Application");
	gtk_window_set_title ((GtkWindow*) _tmp4_, _tmp5_);
	_tmp6_ = self->priv->app_dialog;
	_tmp7_ = gtk_dialog_run ((GtkDialog*) _tmp6_);
	res = _tmp7_;
	_tmp8_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	gtk_widget_set_sensitive (_tmp8_, TRUE);
	_tmp9_ = res;
	if (_tmp9_ == ((gint) GTK_RESPONSE_OK)) {
		AlmApplicationsChooserDialog* _tmp10_;
		GtkTreeView* _tmp11_;
		GtkTreeView* _tmp12_;
		GtkTreeSelection* _tmp13_ = NULL;
		GtkTreeSelection* _tmp14_;
		GtkTreeSelection* sel;
		GtkTreeModel* model = NULL;
		GtkTreeIter iter = {0};
		GtkTreeSelection* _tmp15_;
		GtkTreeModel* _tmp16_ = NULL;
		GtkTreeIter _tmp17_ = {0};
		GtkTreeModel* _tmp18_;
		gchar* app = NULL;
		GtkTreeModel* _tmp19_;
		GtkTreeIter _tmp20_;
		AlmApplicationsChooserDialog* _tmp21_;
		GtkListStore* _tmp22_;
		GtkListStore* _tmp23_;
		GtkTreeIter _tmp24_;
		const gchar* _tmp25_;
		AlmApplicationBlacklist* _tmp26_;
		const gchar* _tmp27_;
		GHashTable* _tmp28_;
		const gchar* _tmp29_;
		gconstpointer _tmp30_ = NULL;
		AlmAppChooseInfo* _tmp31_;
		AlmAppChooseInfo* info;
		AlmAppChooseInfo* _tmp32_;
		_tmp10_ = self->priv->app_dialog;
		_tmp11_ = alm_applications_chooser_dialog_get_tree (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = gtk_tree_view_get_selection (_tmp12_);
		_tmp14_ = _g_object_ref0 (_tmp13_);
		sel = _tmp14_;
		_tmp15_ = sel;
		gtk_tree_selection_get_selected (_tmp15_, &_tmp16_, &_tmp17_);
		_g_object_unref0 (model);
		_tmp18_ = _g_object_ref0 (_tmp16_);
		model = _tmp18_;
		iter = _tmp17_;
		_tmp19_ = model;
		_tmp20_ = iter;
		gtk_tree_model_get (_tmp19_, &_tmp20_, 2, &app, -1);
		_tmp21_ = self->priv->app_dialog;
		_tmp22_ = alm_applications_chooser_dialog_get_liststore (_tmp21_);
		_tmp23_ = _tmp22_;
		_tmp24_ = iter;
		gtk_list_store_remove (_tmp23_, &_tmp24_);
		self->priv->app_change_recursive = TRUE;
		_tmp25_ = app;
		alm_privacy_widget_add_app_to_view (self, _tmp25_);
		_tmp26_ = self->priv->app_blacklist;
		_tmp27_ = app;
		alm_application_blacklist_block (_tmp26_, _tmp27_);
		_tmp28_ = self->priv->unblocked_list;
		_tmp29_ = app;
		_tmp30_ = g_hash_table_lookup (_tmp28_, _tmp29_);
		_tmp31_ = _alm_app_choose_info_ref0 ((AlmAppChooseInfo*) _tmp30_);
		info = _tmp31_;
		_tmp32_ = info;
		if (_tmp32_ != NULL) {
			GHashTable* _tmp33_;
			const gchar* _tmp34_;
			GHashTable* _tmp35_;
			const gchar* _tmp36_;
			gconstpointer _tmp37_ = NULL;
			_tmp33_ = self->priv->unblocked_list;
			_tmp34_ = app;
			g_hash_table_remove (_tmp33_, _tmp34_);
			_tmp35_ = self->priv->blocked_list;
			_tmp36_ = app;
			_tmp37_ = g_hash_table_lookup (_tmp35_, _tmp36_);
			if (((AlmAppChooseInfo*) _tmp37_) == NULL) {
				GHashTable* _tmp38_;
				const gchar* _tmp39_;
				gchar* _tmp40_;
				AlmAppChooseInfo* _tmp41_;
				AlmAppChooseInfo* _tmp42_;
				_tmp38_ = self->priv->blocked_list;
				_tmp39_ = app;
				_tmp40_ = g_strdup (_tmp39_);
				_tmp41_ = info;
				_tmp42_ = _alm_app_choose_info_ref0 (_tmp41_);
				g_hash_table_insert (_tmp38_, _tmp40_, _tmp42_);
			} else {
				GHashTable* _tmp43_;
				const gchar* _tmp44_;
				gchar* _tmp45_;
				AlmAppChooseInfo* _tmp46_;
				AlmAppChooseInfo* _tmp47_;
				_tmp43_ = self->priv->blocked_list;
				_tmp44_ = app;
				_tmp45_ = g_strdup (_tmp44_);
				_tmp46_ = info;
				_tmp47_ = _alm_app_choose_info_ref0 (_tmp46_);
				g_hash_table_replace (_tmp43_, _tmp45_, _tmp47_);
			}
		}
		_alm_app_choose_info_unref0 (info);
		_g_free0 (app);
		_g_object_unref0 (model);
		_g_object_unref0 (sel);
	}
	_tmp48_ = self->priv->app_dialog;
	gtk_widget_hide ((GtkWidget*) _tmp48_);
}


static const char* _g_user_directory_to_string (GUserDirectory value) {
	switch (value) {
		case G_USER_DIRECTORY_DESKTOP:
		return "G_USER_DIRECTORY_DESKTOP";
		case G_USER_DIRECTORY_DOCUMENTS:
		return "G_USER_DIRECTORY_DOCUMENTS";
		case G_USER_DIRECTORY_DOWNLOAD:
		return "G_USER_DIRECTORY_DOWNLOAD";
		case G_USER_DIRECTORY_MUSIC:
		return "G_USER_DIRECTORY_MUSIC";
		case G_USER_DIRECTORY_PICTURES:
		return "G_USER_DIRECTORY_PICTURES";
		case G_USER_DIRECTORY_PUBLIC_SHARE:
		return "G_USER_DIRECTORY_PUBLIC_SHARE";
		case G_USER_DIRECTORY_TEMPLATES:
		return "G_USER_DIRECTORY_TEMPLATES";
		case G_USER_DIRECTORY_VIDEOS:
		return "G_USER_DIRECTORY_VIDEOS";
		case G_USER_N_DIRECTORIES:
		return "G_USER_N_DIRECTORIES";
	}
	return NULL;
}


static gchar* string_strip (const gchar* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _result_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strstrip (_tmp1_);
	result = _result_;
	return result;
}


static void alm_privacy_widget_add_folder_to_view (AlmPrivacyWidget* self, const gchar* folder) {
	GdkPixbuf* _tmp0_;
	GdkPixbuf* _tmp1_;
	GdkPixbuf* icon;
	GThemedIcon* nautilus_icon;
	GeeHashMap* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_ = FALSE;
	const gchar* _tmp38_;
	gchar* _tmp39_ = NULL;
	gchar* _tmp40_;
	gchar* _tmp41_ = NULL;
	gchar* _tmp42_;
	gchar* name;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp43_;
	GtkTreeIter _tmp44_ = {0};
	GtkListStore* _tmp45_;
	GtkTreeIter _tmp46_;
	const gchar* _tmp47_;
	GdkPixbuf* _tmp48_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (folder != NULL);
	_tmp0_ = self->priv->stock_folder_icon;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	icon = _tmp1_;
	nautilus_icon = NULL;
	_tmp2_ = self->priv->defined_dirs;
	_tmp3_ = folder;
	_tmp4_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, _tmp3_);
	if (_tmp4_) {
		GeeHashMap* _tmp5_;
		const gchar* _tmp6_;
		gpointer _tmp7_ = NULL;
		GUserDirectory dir;
		GUserDirectory _tmp8_;
		const gchar* _tmp9_ = NULL;
		GThemedIcon* _tmp32_;
		_tmp5_ = self->priv->defined_dirs;
		_tmp6_ = folder;
		_tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, _tmp6_);
		dir = (GUserDirectory) ((gintptr) _tmp7_);
		_tmp8_ = dir;
		_tmp9_ = _g_user_directory_to_string (_tmp8_);
		if (g_strcmp0 (_tmp9_, "G_USER_DIRECTORY_DOCUMENTS") == 0) {
			GThemedIcon* _tmp10_;
			_tmp10_ = (GThemedIcon*) g_themed_icon_new ("folder-documents");
			_g_object_unref0 (nautilus_icon);
			nautilus_icon = _tmp10_;
		} else {
			GUserDirectory _tmp11_;
			const gchar* _tmp12_ = NULL;
			_tmp11_ = dir;
			_tmp12_ = _g_user_directory_to_string (_tmp11_);
			if (g_strcmp0 (_tmp12_, "G_USER_DIRECTORY_DOWNLOAD") == 0) {
				GThemedIcon* _tmp13_;
				_tmp13_ = (GThemedIcon*) g_themed_icon_new ("folder-download");
				_g_object_unref0 (nautilus_icon);
				nautilus_icon = _tmp13_;
			} else {
				GUserDirectory _tmp14_;
				const gchar* _tmp15_ = NULL;
				_tmp14_ = dir;
				_tmp15_ = _g_user_directory_to_string (_tmp14_);
				if (g_strcmp0 (_tmp15_, "G_USER_DIRECTORY_MUSIC") == 0) {
					GThemedIcon* _tmp16_;
					_tmp16_ = (GThemedIcon*) g_themed_icon_new ("folder-music");
					_g_object_unref0 (nautilus_icon);
					nautilus_icon = _tmp16_;
				} else {
					GUserDirectory _tmp17_;
					const gchar* _tmp18_ = NULL;
					_tmp17_ = dir;
					_tmp18_ = _g_user_directory_to_string (_tmp17_);
					if (g_strcmp0 (_tmp18_, "G_USER_DIRECTORY_DESKTOP") == 0) {
						GThemedIcon* _tmp19_;
						_tmp19_ = (GThemedIcon*) g_themed_icon_new ("user-desktop");
						_g_object_unref0 (nautilus_icon);
						nautilus_icon = _tmp19_;
					} else {
						GUserDirectory _tmp20_;
						const gchar* _tmp21_ = NULL;
						_tmp20_ = dir;
						_tmp21_ = _g_user_directory_to_string (_tmp20_);
						if (g_strcmp0 (_tmp21_, "G_USER_DIRECTORY_PICTURES") == 0) {
							GThemedIcon* _tmp22_;
							_tmp22_ = (GThemedIcon*) g_themed_icon_new ("folder-pictures");
							_g_object_unref0 (nautilus_icon);
							nautilus_icon = _tmp22_;
						} else {
							GUserDirectory _tmp23_;
							const gchar* _tmp24_ = NULL;
							_tmp23_ = dir;
							_tmp24_ = _g_user_directory_to_string (_tmp23_);
							if (g_strcmp0 (_tmp24_, "G_USER_DIRECTORY_VIDEOS") == 0) {
								GThemedIcon* _tmp25_;
								_tmp25_ = (GThemedIcon*) g_themed_icon_new ("folder-videos");
								_g_object_unref0 (nautilus_icon);
								nautilus_icon = _tmp25_;
							} else {
								GUserDirectory _tmp26_;
								const gchar* _tmp27_ = NULL;
								_tmp26_ = dir;
								_tmp27_ = _g_user_directory_to_string (_tmp26_);
								if (g_strcmp0 (_tmp27_, "G_USER_DIRECTORY_TEMPLATES") == 0) {
									GThemedIcon* _tmp28_;
									_tmp28_ = (GThemedIcon*) g_themed_icon_new ("folder-templates");
									_g_object_unref0 (nautilus_icon);
									nautilus_icon = _tmp28_;
								} else {
									GUserDirectory _tmp29_;
									const gchar* _tmp30_ = NULL;
									_tmp29_ = dir;
									_tmp30_ = _g_user_directory_to_string (_tmp29_);
									if (g_strcmp0 (_tmp30_, "G_USER_DIRECTORY_PUBLIC_SHARE") == 0) {
										GThemedIcon* _tmp31_;
										_tmp31_ = (GThemedIcon*) g_themed_icon_new ("folder-publicshare");
										_g_object_unref0 (nautilus_icon);
										nautilus_icon = _tmp31_;
									}
								}
							}
						}
					}
				}
			}
		}
		_tmp32_ = nautilus_icon;
		if (_tmp32_ != NULL) {
			GThemedIcon* _tmp33_;
			GdkPixbuf* _tmp34_ = NULL;
			GdkPixbuf* pixbuf;
			GdkPixbuf* _tmp35_;
			_tmp33_ = nautilus_icon;
			_tmp34_ = alm_applications_tree_view_get_pixbuf_from_gio_icon ((GIcon*) _tmp33_, 24);
			pixbuf = _tmp34_;
			_tmp35_ = pixbuf;
			if (_tmp35_ != NULL) {
				GdkPixbuf* _tmp36_;
				GdkPixbuf* _tmp37_;
				_tmp36_ = pixbuf;
				_tmp37_ = _g_object_ref0 (_tmp36_);
				_g_object_unref0 (icon);
				icon = _tmp37_;
			}
			_g_object_unref0 (pixbuf);
		}
	}
	_tmp38_ = folder;
	_tmp39_ = string_strip (_tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = g_path_get_basename (_tmp40_);
	_tmp42_ = _tmp41_;
	_g_free0 (_tmp40_);
	name = _tmp42_;
	_tmp43_ = self->priv->exception_list_store;
	gtk_list_store_append (_tmp43_, &_tmp44_);
	iter = _tmp44_;
	_tmp45_ = self->priv->exception_list_store;
	_tmp46_ = iter;
	_tmp47_ = folder;
	_tmp48_ = icon;
	gtk_list_store_set (_tmp45_, &_tmp46_, 0, _tmp47_, 1, _tmp48_, 2, name, 3, ALM_ITEM_TYPE_FILE, -1, -1);
	_g_free0 (name);
	_g_object_unref0 (nautilus_icon);
	_g_object_unref0 (icon);
}


static gboolean alm_privacy_widget_remove_folder_from_view (AlmPrivacyWidget* self, const gchar* folder) {
	gboolean result = FALSE;
	GtkTreeView* _tmp0_;
	GtkTreeModel* _tmp1_ = NULL;
	GtkTreeModel* _tmp2_;
	GtkTreeModel* model;
	GtkTreeIter iter = {0};
	GtkTreeModel* _tmp3_;
	GtkTreeIter _tmp4_ = {0};
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (folder != NULL, FALSE);
	_tmp0_ = self->priv->exception_list;
	_tmp1_ = gtk_tree_view_get_model (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	model = _tmp2_;
	_tmp3_ = model;
	gtk_tree_model_get_iter_first (_tmp3_, &_tmp4_);
	iter = _tmp4_;
	while (TRUE) {
		GValue can_app_value = {0};
		GtkTreeModel* _tmp5_;
		GtkTreeIter _tmp6_;
		GValue _tmp7_ = {0};
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_;
		gchar* cand_folder;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		GtkTreeModel* _tmp14_;
		gboolean _tmp15_ = FALSE;
		gboolean more_entires;
		gboolean _tmp16_;
		_tmp5_ = model;
		_tmp6_ = iter;
		gtk_tree_model_get_value (_tmp5_, &_tmp6_, 0, &_tmp7_);
		G_IS_VALUE (&can_app_value) ? (g_value_unset (&can_app_value), NULL) : NULL;
		can_app_value = _tmp7_;
		_tmp8_ = g_value_get_string (&can_app_value);
		_tmp9_ = g_strdup (_tmp8_);
		cand_folder = _tmp9_;
		_tmp10_ = folder;
		_tmp11_ = cand_folder;
		if (g_strcmp0 (_tmp10_, _tmp11_) == 0) {
			GtkListStore* _tmp12_;
			GtkTreeIter _tmp13_;
			_tmp12_ = self->priv->exception_list_store;
			_tmp13_ = iter;
			gtk_list_store_remove (_tmp12_, &_tmp13_);
			result = TRUE;
			_g_free0 (cand_folder);
			G_IS_VALUE (&can_app_value) ? (g_value_unset (&can_app_value), NULL) : NULL;
			_g_object_unref0 (model);
			return result;
		}
		_tmp14_ = model;
		_tmp15_ = gtk_tree_model_iter_next (_tmp14_, &iter);
		more_entires = _tmp15_;
		_tmp16_ = more_entires;
		if (!_tmp16_) {
			result = FALSE;
			_g_free0 (cand_folder);
			G_IS_VALUE (&can_app_value) ? (g_value_unset (&can_app_value), NULL) : NULL;
			_g_object_unref0 (model);
			return result;
		}
		_g_free0 (cand_folder);
		G_IS_VALUE (&can_app_value) ? (g_value_unset (&can_app_value), NULL) : NULL;
	}
	_g_object_unref0 (model);
}


static void alm_privacy_widget_add_app_to_view (AlmPrivacyWidget* self, const gchar* app) {
	const gchar* _tmp0_;
	GDesktopAppInfo* _tmp1_;
	GDesktopAppInfo* app_info;
	GDesktopAppInfo* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (app != NULL);
	_tmp0_ = app;
	_tmp1_ = g_desktop_app_info_new (_tmp0_);
	app_info = _tmp1_;
	_tmp2_ = app_info;
	if (_tmp2_ != NULL) {
		GDesktopAppInfo* _tmp3_;
		GIcon* _tmp4_ = NULL;
		GdkPixbuf* _tmp5_ = NULL;
		GdkPixbuf* pix;
		GDesktopAppInfo* _tmp6_;
		gchar* _tmp7_ = NULL;
		gchar* markup;
		GtkTreeIter iter = {0};
		GtkListStore* _tmp8_;
		GtkTreeIter _tmp9_ = {0};
		GtkListStore* _tmp10_;
		GtkTreeIter _tmp11_;
		const gchar* _tmp12_;
		GdkPixbuf* _tmp13_;
		GDesktopAppInfo* _tmp14_;
		const gchar* _tmp15_ = NULL;
		GHashTable* _tmp16_;
		const gchar* _tmp17_;
		gconstpointer _tmp18_ = NULL;
		_tmp3_ = app_info;
		_tmp4_ = g_app_info_get_icon ((GAppInfo*) _tmp3_);
		_tmp5_ = alm_applications_tree_view_get_pixbuf_from_gio_icon (_tmp4_, 24);
		pix = _tmp5_;
		_tmp6_ = app_info;
		_tmp7_ = alm_applications_tree_view_markup_for_app (_tmp6_);
		markup = _tmp7_;
		_tmp8_ = self->priv->exception_list_store;
		gtk_list_store_append (_tmp8_, &_tmp9_);
		iter = _tmp9_;
		_tmp10_ = self->priv->exception_list_store;
		_tmp11_ = iter;
		_tmp12_ = app;
		_tmp13_ = pix;
		_tmp14_ = app_info;
		_tmp15_ = g_app_info_get_name ((GAppInfo*) _tmp14_);
		gtk_list_store_set (_tmp10_, &_tmp11_, 0, _tmp12_, 1, _tmp13_, 2, _tmp15_, 3, ALM_ITEM_TYPE_APPLICATION, -1, -1);
		_tmp16_ = self->priv->blocked_list;
		_tmp17_ = app;
		_tmp18_ = g_hash_table_lookup (_tmp16_, _tmp17_);
		if (((AlmAppChooseInfo*) _tmp18_) == NULL) {
			GHashTable* _tmp19_;
			const gchar* _tmp20_;
			gchar* _tmp21_;
			GDesktopAppInfo* _tmp22_;
			const gchar* _tmp23_ = NULL;
			GDesktopAppInfo* _tmp24_;
			const gchar* _tmp25_ = NULL;
			GdkPixbuf* _tmp26_;
			AlmAppChooseInfo* _tmp27_;
			_tmp19_ = self->priv->blocked_list;
			_tmp20_ = app;
			_tmp21_ = g_strdup (_tmp20_);
			_tmp22_ = app_info;
			_tmp23_ = g_app_info_get_id ((GAppInfo*) _tmp22_);
			_tmp24_ = app_info;
			_tmp25_ = g_app_info_get_name ((GAppInfo*) _tmp24_);
			_tmp26_ = pix;
			_tmp27_ = alm_app_choose_info_new (_tmp23_, _tmp25_, _tmp26_, "", (gint64) 0, (guint) 0);
			g_hash_table_insert (_tmp19_, _tmp21_, _tmp27_);
		}
		_g_free0 (markup);
		_g_object_unref0 (pix);
	}
	_g_object_unref0 (app_info);
}


static void alm_privacy_widget_remove_app_from_view (AlmPrivacyWidget* self, const gchar* app) {
	GtkTreeView* _tmp0_;
	GtkTreeModel* _tmp1_ = NULL;
	GtkTreeModel* _tmp2_;
	GtkTreeModel* model;
	GtkTreeIter iter = {0};
	GtkTreeModel* _tmp3_;
	GtkTreeIter _tmp4_ = {0};
	g_return_if_fail (self != NULL);
	g_return_if_fail (app != NULL);
	_tmp0_ = self->priv->exception_list;
	_tmp1_ = gtk_tree_view_get_model (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	model = _tmp2_;
	_tmp3_ = model;
	gtk_tree_model_get_iter_first (_tmp3_, &_tmp4_);
	iter = _tmp4_;
	while (TRUE) {
		GValue can_app_value = {0};
		GtkTreeModel* _tmp5_;
		GtkTreeIter _tmp6_;
		GValue _tmp7_ = {0};
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_;
		gchar* can_app;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		GtkTreeModel* _tmp14_;
		gboolean _tmp15_ = FALSE;
		gboolean more_entires;
		gboolean _tmp16_;
		_tmp5_ = model;
		_tmp6_ = iter;
		gtk_tree_model_get_value (_tmp5_, &_tmp6_, 2, &_tmp7_);
		G_IS_VALUE (&can_app_value) ? (g_value_unset (&can_app_value), NULL) : NULL;
		can_app_value = _tmp7_;
		_tmp8_ = g_value_get_string (&can_app_value);
		_tmp9_ = g_strdup (_tmp8_);
		can_app = _tmp9_;
		_tmp10_ = app;
		_tmp11_ = can_app;
		if (g_strcmp0 (_tmp10_, _tmp11_) == 0) {
			GtkListStore* _tmp12_;
			GtkTreeIter _tmp13_;
			_tmp12_ = self->priv->exception_list_store;
			_tmp13_ = iter;
			gtk_list_store_remove (_tmp12_, &_tmp13_);
			_g_free0 (can_app);
			G_IS_VALUE (&can_app_value) ? (g_value_unset (&can_app_value), NULL) : NULL;
			break;
		}
		_tmp14_ = model;
		_tmp15_ = gtk_tree_model_iter_next (_tmp14_, &iter);
		more_entires = _tmp15_;
		_tmp16_ = more_entires;
		if (!_tmp16_) {
			_g_free0 (can_app);
			G_IS_VALUE (&can_app_value) ? (g_value_unset (&can_app_value), NULL) : NULL;
			break;
		}
		_g_free0 (can_app);
		G_IS_VALUE (&can_app_value) ? (g_value_unset (&can_app_value), NULL) : NULL;
	}
	_g_object_unref0 (model);
}


static void alm_privacy_widget_class_init (AlmPrivacyWidgetClass * klass) {
	alm_privacy_widget_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (AlmPrivacyWidgetPrivate));
	G_OBJECT_CLASS (klass)->finalize = alm_privacy_widget_finalize;
}


static void alm_privacy_widget_instance_init (AlmPrivacyWidget * self) {
	self->priv = ALM_PRIVACY_WIDGET_GET_PRIVATE (self);
	self->priv->file_type_fire_signal = TRUE;
}


static void alm_privacy_widget_finalize (GObject* obj) {
	AlmPrivacyWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ALM_TYPE_PRIVACY_WIDGET, AlmPrivacyWidget);
	_alm_blacklist_unref0 (self->priv->blacklist);
	_alm_file_type_blacklist_unref0 (self->priv->files_type_blacklist);
	_alm_path_blacklist_unref0 (self->priv->path_blacklist);
	_g_object_unref0 (self->priv->mime_dict);
	_g_object_unref0 (self->priv->checkboxes);
	_g_object_unref0 (self->priv->button_list);
	_g_object_unref0 (self->priv->defined_dirs);
	_alm_application_blacklist_unref0 (self->priv->app_blacklist);
	_g_object_unref0 (self->priv->app_dialog);
	_g_object_unref0 (self->priv->app_treeview);
	_g_object_unref0 (self->priv->container_box);
	_g_hash_table_unref0 (self->priv->blocked_list);
	_g_hash_table_unref0 (self->priv->unblocked_list);
	_g_object_unref0 (self->priv->exception_list);
	_g_object_unref0 (self->priv->exception_list_store);
	_g_object_unref0 (self->priv->record_button);
	_g_object_unref0 (self->priv->del_button);
	_g_object_unref0 (self->priv->delete_dialog);
	_g_object_unref0 (self->priv->stock_folder_icon);
	_g_object_unref0 (self->priv->exception_menu);
	G_OBJECT_CLASS (alm_privacy_widget_parent_class)->finalize (obj);
}


GType alm_privacy_widget_get_type (void) {
	static volatile gsize alm_privacy_widget_type_id__volatile = 0;
	if (g_once_init_enter (&alm_privacy_widget_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AlmPrivacyWidgetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) alm_privacy_widget_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AlmPrivacyWidget), 0, (GInstanceInitFunc) alm_privacy_widget_instance_init, NULL };
		GType alm_privacy_widget_type_id;
		alm_privacy_widget_type_id = g_type_register_static (GTK_TYPE_BOX, "AlmPrivacyWidget", &g_define_type_info, 0);
		g_once_init_leave (&alm_privacy_widget_type_id__volatile, alm_privacy_widget_type_id);
	}
	return alm_privacy_widget_type_id__volatile;
}


AlmExceptionCellRenderer* alm_exception_cell_renderer_construct (GType object_type) {
	AlmExceptionCellRenderer * self = NULL;
	self = (AlmExceptionCellRenderer*) g_object_new (object_type, NULL);
	return self;
}


AlmExceptionCellRenderer* alm_exception_cell_renderer_new (void) {
	return alm_exception_cell_renderer_construct (ALM_TYPE_EXCEPTION_CELL_RENDERER);
}


static void _vala_PangoFontDescription_free (PangoFontDescription* self) {
	g_boxed_free (pango_font_description_get_type (), self);
}


static PangoAttrList* _vala_PangoAttrList_copy (PangoAttrList* self) {
	return g_boxed_copy (pango_attr_list_get_type (), self);
}


static gpointer __vala_PangoAttrList_copy0 (gpointer self) {
	return self ? _vala_PangoAttrList_copy (self) : NULL;
}


static void _vala_PangoAttrList_free (PangoAttrList* self) {
	g_boxed_free (pango_attr_list_get_type (), self);
}


static PangoLayout* alm_exception_cell_renderer_get_text_layout (AlmExceptionCellRenderer* self, GtkWidget* widget, GdkRectangle* cell_area, GtkCellRendererState flags, const gchar* text, gboolean bold, gint size) {
	PangoLayout* result = NULL;
	PangoLayout* layout = NULL;
	gint xpad = 0;
	PangoAttrList* _tmp0_;
	PangoAttrList* attr_list;
	GtkWidget* _tmp1_;
	const gchar* _tmp2_;
	PangoLayout* _tmp3_ = NULL;
	gint _tmp4_;
	PangoAttrSize* _tmp5_;
	PangoAttrSize* attr;
	PangoAttrSize* _tmp6_;
	PangoAttrSize* _tmp7_;
	PangoAttrSize* _tmp8_;
	PangoAttrSize* _tmp9_;
	guint _tmp10_;
	const gchar* _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	PangoAttrList* _tmp14_;
	PangoAttrSize* _tmp15_;
	gboolean _tmp16_;
	PangoLayout* _tmp23_;
	PangoAttrList* _tmp24_;
	PangoAttrList* _tmp25_;
	gint _tmp26_ = 0;
	PangoLayout* _tmp27_;
	PangoRectangle rect = {0};
	gint width = 0;
	gint text_width = 0;
	PangoLayout* _tmp28_;
	PangoRectangle _tmp29_ = {0};
	PangoRectangle _tmp30_;
	gint _tmp31_;
	GdkRectangle* _tmp32_;
	gint _tmp36_;
	gint _tmp37_;
	gint _tmp38_ = 0;
	PangoLayout* _tmp39_;
	gint _tmp40_;
	PangoAlignment align = 0;
	GtkWidget* _tmp41_;
	GtkTextDirection _tmp42_ = 0;
	PangoLayout* _tmp43_;
	PangoAlignment _tmp44_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (widget != NULL, NULL);
	g_return_val_if_fail (text != NULL, NULL);
	_tmp0_ = pango_attr_list_new ();
	attr_list = _tmp0_;
	_tmp1_ = widget;
	_tmp2_ = text;
	_tmp3_ = gtk_widget_create_pango_layout (_tmp1_, _tmp2_);
	_g_object_unref0 (layout);
	layout = _tmp3_;
	_tmp4_ = size;
	_tmp5_ = (PangoAttrSize*) pango_attr_size_new (_tmp4_ * PANGO_SCALE);
	attr = _tmp5_;
	_tmp6_ = attr;
	_tmp6_->absolute = (guint) 1;
	_tmp7_ = attr;
	((PangoAttribute*) _tmp7_)->start_index = (guint) 0;
	_tmp8_ = attr;
	_tmp9_ = attr;
	_tmp10_ = ((PangoAttribute*) _tmp9_)->start_index;
	_tmp11_ = text;
	_tmp12_ = strlen (_tmp11_);
	_tmp13_ = _tmp12_;
	((PangoAttribute*) _tmp8_)->end_index = _tmp10_ + _tmp13_;
	_tmp14_ = attr_list;
	_tmp15_ = attr;
	attr = NULL;
	pango_attr_list_insert (_tmp14_, (PangoAttribute*) _tmp15_);
	_tmp16_ = bold;
	if (_tmp16_) {
		PangoFontDescription* _tmp17_;
		PangoFontDescription* desc;
		PangoFontDescription* _tmp18_;
		PangoFontDescription* _tmp19_;
		PangoAttrFontDesc* _tmp20_;
		PangoAttrFontDesc* attr_f;
		PangoAttrList* _tmp21_;
		PangoAttrFontDesc* _tmp22_;
		_tmp17_ = pango_font_description_new ();
		desc = _tmp17_;
		_tmp18_ = desc;
		pango_font_description_set_weight (_tmp18_, PANGO_WEIGHT_BOLD);
		_tmp19_ = desc;
		_tmp20_ = (PangoAttrFontDesc*) pango_attr_font_desc_new (_tmp19_);
		attr_f = _tmp20_;
		_tmp21_ = attr_list;
		_tmp22_ = attr_f;
		attr_f = NULL;
		pango_attr_list_insert (_tmp21_, (PangoAttribute*) _tmp22_);
		_pango_attribute_destroy0 (attr_f);
		__vala_PangoFontDescription_free0 (desc);
	}
	_tmp23_ = layout;
	_tmp24_ = attr_list;
	_tmp25_ = __vala_PangoAttrList_copy0 (_tmp24_);
	pango_layout_set_attributes (_tmp23_, _tmp25_);
	gtk_cell_renderer_get_padding ((GtkCellRenderer*) self, &_tmp26_, NULL);
	xpad = _tmp26_;
	_tmp27_ = layout;
	pango_layout_set_ellipsize (_tmp27_, PANGO_ELLIPSIZE_END);
	_tmp28_ = layout;
	pango_layout_get_extents (_tmp28_, NULL, &_tmp29_);
	rect = _tmp29_;
	_tmp30_ = rect;
	_tmp31_ = _tmp30_.width;
	text_width = _tmp31_;
	_tmp32_ = cell_area;
	if (_tmp32_ != NULL) {
		GdkRectangle* _tmp33_;
		gint _tmp34_;
		gint _tmp35_;
		_tmp33_ = cell_area;
		_tmp34_ = (*_tmp33_).width;
		_tmp35_ = xpad;
		width = (_tmp34_ - _tmp35_) * PANGO_SCALE;
	} else {
		width = ALM_EXCEPTION_CELL_RENDERER_default_width * PANGO_SCALE;
	}
	_tmp36_ = width;
	_tmp37_ = text_width;
	_tmp38_ = MIN (_tmp36_, _tmp37_);
	width = _tmp38_;
	_tmp39_ = layout;
	_tmp40_ = width;
	pango_layout_set_width (_tmp39_, _tmp40_);
	_tmp41_ = widget;
	_tmp42_ = gtk_widget_get_direction (_tmp41_);
	if (_tmp42_ == GTK_TEXT_DIR_RTL) {
		align = PANGO_ALIGN_RIGHT;
	} else {
		align = PANGO_ALIGN_LEFT;
	}
	_tmp43_ = layout;
	_tmp44_ = align;
	pango_layout_set_alignment (_tmp43_, _tmp44_);
	result = layout;
	_pango_attribute_destroy0 (attr);
	__vala_PangoAttrList_free0 (attr_list);
	return result;
}


static void alm_exception_cell_renderer_real_get_size (GtkCellRenderer* base, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height) {
	AlmExceptionCellRenderer * self;
	gint _vala_x_offset = 0;
	gint _vala_y_offset = 0;
	gint _vala_width = 0;
	gint _vala_height = 0;
	self = (AlmExceptionCellRenderer*) base;
	g_return_if_fail (widget != NULL);
	_vala_height = 0;
	_vala_width = _vala_height;
	_vala_y_offset = _vala_width;
	_vala_x_offset = _vala_y_offset;
	if (x_offset) {
		*x_offset = _vala_x_offset;
	}
	if (y_offset) {
		*y_offset = _vala_y_offset;
	}
	if (width) {
		*width = _vala_width;
	}
	if (height) {
		*height = _vala_height;
	}
}


static void alm_exception_cell_renderer_do_get_size (AlmExceptionCellRenderer* self, GtkWidget* widget, GdkRectangle* cell_area, PangoLayout* layout, gint* x_offset, gint* y_offset) {
	gint _vala_x_offset = 0;
	gint _vala_y_offset = 0;
	PangoRectangle rect = {0};
	gint xpad = 0;
	gint ypad = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	PangoLayout* _tmp2_;
	PangoRectangle _tmp3_ = {0};
	GdkRectangle* _tmp4_;
	gint _tmp21_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	gtk_cell_renderer_get_padding ((GtkCellRenderer*) self, &_tmp0_, &_tmp1_);
	xpad = _tmp0_;
	ypad = _tmp1_;
	_tmp2_ = layout;
	pango_layout_get_pixel_extents (_tmp2_, NULL, &_tmp3_);
	rect = _tmp3_;
	_tmp4_ = cell_area;
	if (_tmp4_ != NULL) {
		PangoRectangle _tmp5_;
		gint _tmp6_;
		GdkRectangle* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _tmp10_ = 0;
		GtkWidget* _tmp11_;
		GtkTextDirection _tmp12_ = 0;
		gint _tmp19_;
		gint _tmp20_ = 0;
		_tmp5_ = rect;
		_tmp6_ = _tmp5_.width;
		_tmp7_ = cell_area;
		_tmp8_ = (*_tmp7_).width;
		_tmp9_ = xpad;
		_tmp10_ = MIN (_tmp6_, (_tmp8_ - (2 * _tmp9_)) + ALM_EXCEPTION_CELL_RENDERER_xspacing);
		rect.width = _tmp10_;
		_tmp11_ = widget;
		_tmp12_ = gtk_widget_get_direction (_tmp11_);
		if (_tmp12_ == GTK_TEXT_DIR_RTL) {
			GdkRectangle* _tmp13_;
			gint _tmp14_;
			PangoRectangle _tmp15_;
			gint _tmp16_;
			gint _tmp17_;
			_tmp13_ = cell_area;
			_tmp14_ = (*_tmp13_).width;
			_tmp15_ = rect;
			_tmp16_ = _tmp15_.width;
			_tmp17_ = xpad;
			_vala_x_offset = _tmp14_ - (_tmp16_ + _tmp17_);
		} else {
			gint _tmp18_;
			_tmp18_ = xpad;
			_vala_x_offset = _tmp18_;
		}
		_tmp19_ = _vala_x_offset;
		_tmp20_ = MAX (_tmp19_, 0);
		_vala_x_offset = _tmp20_;
	} else {
		_vala_x_offset = 0;
	}
	_tmp21_ = ypad;
	_vala_y_offset = _tmp21_;
	if (x_offset) {
		*x_offset = _vala_x_offset;
	}
	if (y_offset) {
		*y_offset = _vala_y_offset;
	}
}


static void alm_exception_cell_renderer_real_render (GtkCellRenderer* base, cairo_t* cr, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags) {
	AlmExceptionCellRenderer * self;
	GtkStyleContext* context = NULL;
	PangoLayout* text_layout = NULL;
	gint text_x_offset;
	gint text_y_offset;
	gint xpad = 0;
	PangoRectangle text_rect = {0};
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkStyleContext* _tmp3_ = NULL;
	GtkStyleContext* _tmp4_;
	PangoFontDescription* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	gint font_size;
	gint _tmp7_ = 0;
	GtkWidget* _tmp8_;
	GdkRectangle _tmp9_;
	GtkCellRendererState _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	PangoLayout* _tmp13_ = NULL;
	GtkWidget* _tmp14_;
	GdkRectangle _tmp15_;
	gint _tmp16_ = 0;
	gint _tmp17_ = 0;
	PangoRectangle _tmp18_ = {0};
	gint _tmp19_;
	PangoRectangle _tmp20_;
	gint _tmp21_;
	cairo_t* _tmp22_;
	cairo_t* _tmp23_;
	GdkRectangle _tmp24_;
	cairo_t* _tmp25_;
	cairo_t* _tmp26_;
	GdkPixbuf* _tmp27_;
	GdkPixbuf* _tmp28_;
	GdkRectangle _tmp29_;
	gint _tmp30_;
	GdkRectangle _tmp31_;
	gint _tmp32_;
	cairo_t* _tmp33_;
	cairo_t* _tmp34_;
	GdkRectangle _tmp35_;
	gint _tmp36_;
	gint _tmp37_;
	GdkPixbuf* _tmp38_;
	GdkPixbuf* _tmp39_;
	gint _tmp40_;
	gint _tmp41_;
	GdkRectangle _tmp42_;
	gint _tmp43_;
	gint _tmp44_;
	cairo_t* _tmp45_;
	self = (AlmExceptionCellRenderer*) base;
	g_return_if_fail (cr != NULL);
	g_return_if_fail (widget != NULL);
	g_return_if_fail (background_area != NULL);
	g_return_if_fail (cell_area != NULL);
	text_x_offset = 0;
	text_y_offset = 0;
	_tmp0_ = widget;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->current_widget);
	self->priv->current_widget = _tmp1_;
	_tmp2_ = widget;
	_tmp3_ = gtk_widget_get_style_context (_tmp2_);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (context);
	context = _tmp4_;
	_tmp5_ = gtk_style_context_get_font (context, GTK_STATE_FLAG_NORMAL);
	_tmp6_ = pango_font_description_get_size (_tmp5_);
	font_size = _tmp6_ / PANGO_SCALE;
	gtk_cell_renderer_get_padding ((GtkCellRenderer*) self, &_tmp7_, NULL);
	xpad = _tmp7_;
	_tmp8_ = widget;
	_tmp9_ = *cell_area;
	_tmp10_ = flags;
	_tmp11_ = alm_exception_cell_renderer_get_text (self);
	_tmp12_ = _tmp11_;
	_tmp13_ = alm_exception_cell_renderer_get_text_layout (self, _tmp8_, &_tmp9_, _tmp10_, _tmp12_, TRUE, font_size);
	_g_object_unref0 (text_layout);
	text_layout = _tmp13_;
	_tmp14_ = widget;
	_tmp15_ = *cell_area;
	alm_exception_cell_renderer_do_get_size (self, _tmp14_, &_tmp15_, text_layout, &_tmp16_, &_tmp17_);
	text_x_offset = _tmp16_;
	text_y_offset = _tmp17_;
	pango_layout_get_pixel_extents (text_layout, NULL, &_tmp18_);
	text_rect = _tmp18_;
	_tmp19_ = text_x_offset;
	_tmp20_ = text_rect;
	_tmp21_ = _tmp20_.x;
	text_x_offset = _tmp19_ - _tmp21_;
	_tmp22_ = cr;
	cairo_save (_tmp22_);
	_tmp23_ = cr;
	_tmp24_ = *cell_area;
	gdk_cairo_rectangle (_tmp23_, &_tmp24_);
	_tmp25_ = cr;
	cairo_clip (_tmp25_);
	_tmp26_ = cr;
	_tmp27_ = alm_exception_cell_renderer_get_pixbuf (self);
	_tmp28_ = _tmp27_;
	_tmp29_ = *cell_area;
	_tmp30_ = _tmp29_.x;
	_tmp31_ = *cell_area;
	_tmp32_ = _tmp31_.y;
	gdk_cairo_set_source_pixbuf (_tmp26_, _tmp28_, (gdouble) _tmp30_, (gdouble) _tmp32_);
	_tmp33_ = cr;
	cairo_paint (_tmp33_);
	_tmp34_ = cr;
	_tmp35_ = *cell_area;
	_tmp36_ = _tmp35_.x;
	_tmp37_ = text_x_offset;
	_tmp38_ = alm_exception_cell_renderer_get_pixbuf (self);
	_tmp39_ = _tmp38_;
	_tmp40_ = gdk_pixbuf_get_width (_tmp39_);
	_tmp41_ = _tmp40_;
	_tmp42_ = *cell_area;
	_tmp43_ = _tmp42_.y;
	_tmp44_ = text_y_offset;
	gtk_render_layout (context, _tmp34_, (gdouble) (((_tmp36_ + _tmp37_) + _tmp41_) + ALM_EXCEPTION_CELL_RENDERER_xspacing), (gdouble) ((_tmp43_ + _tmp44_) + 2), text_layout);
	_tmp45_ = cr;
	cairo_restore (_tmp45_);
	_g_object_unref0 (text_layout);
	_g_object_unref0 (context);
}


static void alm_exception_cell_renderer_real_get_preferred_width (GtkCellRenderer* base, GtkWidget* widget, gint* min_width, gint* nat_width) {
	AlmExceptionCellRenderer * self;
	gint _vala_min_width = 0;
	gint _vala_nat_width = 0;
	gint xpad = 0;
	gint _tmp0_ = 0;
	self = (AlmExceptionCellRenderer*) base;
	g_return_if_fail (widget != NULL);
	gtk_cell_renderer_get_padding ((GtkCellRenderer*) self, &_tmp0_, NULL);
	xpad = _tmp0_;
	_vala_min_width = xpad + ALM_EXCEPTION_CELL_RENDERER_default_width;
	_vala_nat_width = _vala_min_width;
	if (min_width) {
		*min_width = _vala_min_width;
	}
	if (nat_width) {
		*nat_width = _vala_nat_width;
	}
}


static void alm_exception_cell_renderer_real_get_preferred_height_for_width (GtkCellRenderer* base, GtkWidget* widget, gint width, gint* minimum_height, gint* natural_height) {
	AlmExceptionCellRenderer * self;
	gint _vala_minimum_height = 0;
	gint _vala_natural_height = 0;
	gint ypad = 0;
	gint _tmp0_ = 0;
	self = (AlmExceptionCellRenderer*) base;
	g_return_if_fail (widget != NULL);
	gtk_cell_renderer_get_padding ((GtkCellRenderer*) self, NULL, &_tmp0_);
	ypad = _tmp0_;
	_vala_minimum_height = ALM_EXCEPTION_CELL_RENDERER_renderer_height + ypad;
	_vala_natural_height = ALM_EXCEPTION_CELL_RENDERER_renderer_height + ypad;
	if (minimum_height) {
		*minimum_height = _vala_minimum_height;
	}
	if (natural_height) {
		*natural_height = _vala_natural_height;
	}
}


static void alm_exception_cell_renderer_real_get_preferred_height (GtkCellRenderer* base, GtkWidget* widget, gint* minimum_size, gint* natural_size) {
	AlmExceptionCellRenderer * self;
	gint _vala_minimum_size = 0;
	gint _vala_natural_size = 0;
	gint min_width = 0;
	GtkWidget* _tmp0_;
	gint _tmp1_ = 0;
	GtkWidget* _tmp2_;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	self = (AlmExceptionCellRenderer*) base;
	g_return_if_fail (widget != NULL);
	_tmp0_ = widget;
	gtk_cell_renderer_get_preferred_width ((GtkCellRenderer*) self, _tmp0_, &_tmp1_, NULL);
	min_width = _tmp1_;
	_tmp2_ = widget;
	gtk_cell_renderer_get_preferred_height_for_width ((GtkCellRenderer*) self, _tmp2_, min_width, &_tmp3_, &_tmp4_);
	_vala_minimum_size = _tmp3_;
	_vala_natural_size = _tmp4_;
	if (minimum_size) {
		*minimum_size = _vala_minimum_size;
	}
	if (natural_size) {
		*natural_size = _vala_natural_size;
	}
}


GdkPixbuf* alm_exception_cell_renderer_get_pixbuf (AlmExceptionCellRenderer* self) {
	GdkPixbuf* result;
	GdkPixbuf* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->pixbuf_;
	result = _tmp0_;
	return result;
}


void alm_exception_cell_renderer_set_pixbuf (AlmExceptionCellRenderer* self, GdkPixbuf* value) {
	GdkPixbuf* _tmp0_;
	GdkPixbuf* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->pixbuf_);
	self->priv->pixbuf_ = _tmp1_;
	g_object_notify ((GObject *) self, "pixbuf");
}


const gchar* alm_exception_cell_renderer_get_text (AlmExceptionCellRenderer* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->text_;
	result = _tmp0_;
	return result;
}


void alm_exception_cell_renderer_set_text (AlmExceptionCellRenderer* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->text_);
	self->priv->text_ = _tmp1_;
	g_object_notify ((GObject *) self, "text");
}


static void alm_exception_cell_renderer_class_init (AlmExceptionCellRendererClass * klass) {
	alm_exception_cell_renderer_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (AlmExceptionCellRendererPrivate));
	GTK_CELL_RENDERER_CLASS (klass)->get_size = alm_exception_cell_renderer_real_get_size;
	GTK_CELL_RENDERER_CLASS (klass)->render = alm_exception_cell_renderer_real_render;
	GTK_CELL_RENDERER_CLASS (klass)->get_preferred_width = alm_exception_cell_renderer_real_get_preferred_width;
	GTK_CELL_RENDERER_CLASS (klass)->get_preferred_height_for_width = alm_exception_cell_renderer_real_get_preferred_height_for_width;
	GTK_CELL_RENDERER_CLASS (klass)->get_preferred_height = alm_exception_cell_renderer_real_get_preferred_height;
	G_OBJECT_CLASS (klass)->get_property = _vala_alm_exception_cell_renderer_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_alm_exception_cell_renderer_set_property;
	G_OBJECT_CLASS (klass)->finalize = alm_exception_cell_renderer_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ALM_EXCEPTION_CELL_RENDERER_PIXBUF, g_param_spec_object ("pixbuf", "pixbuf", "pixbuf", GDK_TYPE_PIXBUF, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ALM_EXCEPTION_CELL_RENDERER_TEXT, g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void alm_exception_cell_renderer_instance_init (AlmExceptionCellRenderer * self) {
	self->priv = ALM_EXCEPTION_CELL_RENDERER_GET_PRIVATE (self);
}


static void alm_exception_cell_renderer_finalize (GObject* obj) {
	AlmExceptionCellRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ALM_TYPE_EXCEPTION_CELL_RENDERER, AlmExceptionCellRenderer);
	_g_object_unref0 (self->priv->current_widget);
	_g_object_unref0 (self->priv->pixbuf_);
	_g_free0 (self->priv->text_);
	G_OBJECT_CLASS (alm_exception_cell_renderer_parent_class)->finalize (obj);
}


GType alm_exception_cell_renderer_get_type (void) {
	static volatile gsize alm_exception_cell_renderer_type_id__volatile = 0;
	if (g_once_init_enter (&alm_exception_cell_renderer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AlmExceptionCellRendererClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) alm_exception_cell_renderer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AlmExceptionCellRenderer), 0, (GInstanceInitFunc) alm_exception_cell_renderer_instance_init, NULL };
		GType alm_exception_cell_renderer_type_id;
		alm_exception_cell_renderer_type_id = g_type_register_static (GTK_TYPE_CELL_RENDERER, "AlmExceptionCellRenderer", &g_define_type_info, 0);
		g_once_init_leave (&alm_exception_cell_renderer_type_id__volatile, alm_exception_cell_renderer_type_id);
	}
	return alm_exception_cell_renderer_type_id__volatile;
}


static void _vala_alm_exception_cell_renderer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	AlmExceptionCellRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ALM_TYPE_EXCEPTION_CELL_RENDERER, AlmExceptionCellRenderer);
	switch (property_id) {
		case ALM_EXCEPTION_CELL_RENDERER_PIXBUF:
		g_value_set_object (value, alm_exception_cell_renderer_get_pixbuf (self));
		break;
		case ALM_EXCEPTION_CELL_RENDERER_TEXT:
		g_value_set_string (value, alm_exception_cell_renderer_get_text (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_alm_exception_cell_renderer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	AlmExceptionCellRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ALM_TYPE_EXCEPTION_CELL_RENDERER, AlmExceptionCellRenderer);
	switch (property_id) {
		case ALM_EXCEPTION_CELL_RENDERER_PIXBUF:
		alm_exception_cell_renderer_set_pixbuf (self, g_value_get_object (value));
		break;
		case ALM_EXCEPTION_CELL_RENDERER_TEXT:
		alm_exception_cell_renderer_set_text (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


AlmDeleteHistoryDialog* alm_delete_history_dialog_construct (GType object_type, GtkButton* del_button) {
	AlmDeleteHistoryDialog * self = NULL;
	const gchar* _tmp0_ = NULL;
	ZeitgeistLog* _tmp1_;
	GtkButton* _tmp2_;
	AlmCalendarWidget* _tmp3_;
	g_return_val_if_fail (del_button != NULL, NULL);
	self = (AlmDeleteHistoryDialog*) g_object_new (object_type, NULL);
	_tmp0_ = _ ("Clear Usage Data");
	gtk_window_set_title ((GtkWindow*) self, _tmp0_);
	gtk_window_set_destroy_with_parent ((GtkWindow*) self, TRUE);
	gtk_window_set_skip_taskbar_hint ((GtkWindow*) self, TRUE);
	gtk_container_set_border_width ((GtkContainer*) self, (guint) 12);
	gtk_window_set_resizable ((GtkWindow*) self, FALSE);
	_tmp1_ = zeitgeist_log_new ();
	_g_object_unref0 (self->priv->zg_log);
	self->priv->zg_log = _tmp1_;
	_tmp2_ = del_button;
	_tmp3_ = alm_calendar_widget_new (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->calendar_box);
	self->priv->calendar_box = _tmp3_;
	alm_delete_history_dialog_set_up_ui (self);
	return self;
}


AlmDeleteHistoryDialog* alm_delete_history_dialog_new (GtkButton* del_button) {
	return alm_delete_history_dialog_construct (ALM_TYPE_DELETE_HISTORY_DIALOG, del_button);
}


static void alm_delete_history_dialog_set_up_ui (AlmDeleteHistoryDialog* self) {
	const gchar* _tmp0_ = NULL;
	GtkLabel* _tmp1_;
	GtkLabel* label;
	const gchar* _tmp2_ = NULL;
	GtkRadioButton* _tmp3_;
	GtkRadioButton* _tmp4_;
	GSList* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GtkRadioButton* _tmp7_;
	GtkRadioButton* _tmp8_;
	GSList* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	GtkRadioButton* _tmp11_;
	GtkRadioButton* _tmp12_;
	const gchar* _tmp13_ = NULL;
	GtkRadioButton* _tmp14_;
	GtkRadioButton* _tmp15_;
	const gchar* _tmp16_ = NULL;
	GtkRadioButton* _tmp17_;
	GtkBox* _tmp18_;
	GtkBox* hbox_calendar;
	GtkRadioButton* _tmp19_;
	AlmCalendarWidget* _tmp20_;
	GtkBox* _tmp21_;
	GtkBox* vbox;
	GtkRadioButton* _tmp22_;
	GtkRadioButton* _tmp23_;
	GtkRadioButton* _tmp24_;
	GtkRadioButton* _tmp25_;
	GtkBox* _tmp26_ = NULL;
	GtkBox* _tmp27_;
	GtkBox* area;
	g_return_if_fail (self != NULL);
	_tmp0_ = _ ("Delete records of which files and applications were used:");
	_tmp1_ = (GtkLabel*) gtk_label_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	label = _tmp1_;
	gtk_label_set_line_wrap (label, TRUE);
	gtk_label_set_line_wrap_mode (label, PANGO_WRAP_WORD);
	gtk_misc_set_alignment ((GtkMisc*) label, (gfloat) 0, 0.5f);
	_tmp2_ = _ ("In the past hour");
	_tmp3_ = (GtkRadioButton*) gtk_radio_button_new_with_label (NULL, _tmp2_);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->r_hour);
	self->priv->r_hour = _tmp3_;
	_tmp4_ = self->priv->r_hour;
	_tmp5_ = gtk_radio_button_get_group (_tmp4_);
	_tmp6_ = _ ("In the past day");
	_tmp7_ = (GtkRadioButton*) gtk_radio_button_new_with_label (_tmp5_, _tmp6_);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->r_day);
	self->priv->r_day = _tmp7_;
	_tmp8_ = self->priv->r_hour;
	_tmp9_ = gtk_radio_button_get_group (_tmp8_);
	_tmp10_ = _ ("In the past week");
	_tmp11_ = (GtkRadioButton*) gtk_radio_button_new_with_label (_tmp9_, _tmp10_);
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->r_week);
	self->priv->r_week = _tmp11_;
	_tmp12_ = self->priv->r_hour;
	_tmp13_ = _ ("From:");
	_tmp14_ = (GtkRadioButton*) gtk_radio_button_new_with_label_from_widget (_tmp12_, _tmp13_);
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->r_calendar);
	self->priv->r_calendar = _tmp14_;
	_tmp15_ = self->priv->r_hour;
	_tmp16_ = _ ("From all time");
	_tmp17_ = (GtkRadioButton*) gtk_radio_button_new_with_label_from_widget (_tmp15_, _tmp16_);
	g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->r_ever);
	self->priv->r_ever = _tmp17_;
	_tmp18_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	g_object_ref_sink (_tmp18_);
	hbox_calendar = _tmp18_;
	_tmp19_ = self->priv->r_calendar;
	gtk_box_pack_start (hbox_calendar, (GtkWidget*) _tmp19_, FALSE, FALSE, (guint) 0);
	_tmp20_ = self->priv->calendar_box;
	gtk_box_pack_start (hbox_calendar, (GtkWidget*) _tmp20_, FALSE, FALSE, (guint) 0);
	_tmp21_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
	g_object_ref_sink (_tmp21_);
	vbox = _tmp21_;
	gtk_box_pack_start (vbox, (GtkWidget*) label, FALSE, TRUE, (guint) 0);
	_tmp22_ = self->priv->r_hour;
	gtk_box_pack_start (vbox, (GtkWidget*) _tmp22_, FALSE, TRUE, (guint) 0);
	_tmp23_ = self->priv->r_day;
	gtk_box_pack_start (vbox, (GtkWidget*) _tmp23_, FALSE, TRUE, (guint) 0);
	_tmp24_ = self->priv->r_week;
	gtk_box_pack_start (vbox, (GtkWidget*) _tmp24_, FALSE, TRUE, (guint) 0);
	gtk_box_pack_start (vbox, (GtkWidget*) hbox_calendar, FALSE, TRUE, (guint) 0);
	_tmp25_ = self->priv->r_ever;
	gtk_box_pack_start (vbox, (GtkWidget*) _tmp25_, FALSE, TRUE, (guint) 0);
	_tmp26_ = gtk_dialog_get_content_area ((GtkDialog*) self);
	_tmp27_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, GTK_TYPE_BOX) ? ((GtkBox*) _tmp26_) : NULL);
	area = _tmp27_;
	gtk_box_pack_start (area, (GtkWidget*) vbox, FALSE, FALSE, (guint) 0);
	gtk_dialog_add_buttons ((GtkDialog*) self, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
	_g_object_unref0 (area);
	_g_object_unref0 (vbox);
	_g_object_unref0 (hbox_calendar);
	_g_object_unref0 (label);
}


gint alm_delete_history_dialog_get_active_radio_button (AlmDeleteHistoryDialog* self) {
	gint result = 0;
	GtkRadioButton* _tmp0_;
	gboolean _tmp1_ = FALSE;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->r_hour;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_);
	if (_tmp1_) {
		result = 0;
		return result;
	} else {
		GtkRadioButton* _tmp2_;
		gboolean _tmp3_ = FALSE;
		_tmp2_ = self->priv->r_day;
		_tmp3_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp2_);
		if (_tmp3_) {
			result = 1;
			return result;
		} else {
			GtkRadioButton* _tmp4_;
			gboolean _tmp5_ = FALSE;
			_tmp4_ = self->priv->r_week;
			_tmp5_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp4_);
			if (_tmp5_) {
				result = 2;
				return result;
			} else {
				GtkRadioButton* _tmp6_;
				gboolean _tmp7_ = FALSE;
				_tmp6_ = self->priv->r_calendar;
				_tmp7_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp6_);
				if (_tmp7_) {
					result = 3;
					return result;
				} else {
					GtkRadioButton* _tmp8_;
					gboolean _tmp9_ = FALSE;
					_tmp8_ = self->priv->r_ever;
					_tmp9_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp8_);
					if (_tmp9_) {
						result = 4;
						return result;
					} else {
						result = -1;
						return result;
					}
				}
			}
		}
	}
}


void alm_delete_history_dialog_on_delete_history (AlmDeleteHistoryDialog* self) {
	gint _tmp0_ = 0;
	gint res;
	gint _tmp1_;
	g_return_if_fail (self != NULL);
	gtk_widget_show_all ((GtkWidget*) self);
	_tmp0_ = gtk_dialog_run ((GtkDialog*) self);
	res = _tmp0_;
	_tmp1_ = res;
	if (_tmp1_ == ((gint) GTK_RESPONSE_OK)) {
		ZeitgeistTimeRange* tr = NULL;
		gint _tmp2_ = 0;
		gint index;
		gint _tmp3_;
		_tmp2_ = alm_delete_history_dialog_get_active_radio_button (self);
		index = _tmp2_;
		_tmp3_ = index;
		if (_tmp3_ < 3) {
			gint range;
			gint _tmp4_;
			gint64 _tmp10_ = 0LL;
			gint64 end;
			gint64 _tmp11_;
			gint _tmp12_;
			gint64 start;
			gint64 _tmp13_;
			gint64 _tmp14_;
			ZeitgeistTimeRange* _tmp15_;
			ZeitgeistTimeRange* _tmp16_;
			range = (60 * 60) * 1000;
			_tmp4_ = index;
			if (_tmp4_ == 0) {
				gint _tmp5_;
				_tmp5_ = range;
				range = 1 * _tmp5_;
			} else {
				gint _tmp6_;
				_tmp6_ = index;
				if (_tmp6_ == 1) {
					gint _tmp7_;
					_tmp7_ = range;
					range = _tmp7_ * 24;
				} else {
					gint _tmp8_;
					_tmp8_ = index;
					if (_tmp8_ == 2) {
						gint _tmp9_;
						_tmp9_ = range;
						range = (_tmp9_ * 24) * 7;
					}
				}
			}
			_tmp10_ = zeitgeist_timestamp_for_now ();
			end = _tmp10_;
			_tmp11_ = end;
			_tmp12_ = range;
			start = _tmp11_ - _tmp12_;
			_tmp13_ = start;
			_tmp14_ = end;
			_tmp15_ = zeitgeist_time_range_new (_tmp13_, _tmp14_);
			g_object_ref_sink (_tmp15_);
			_g_object_unref0 (tr);
			tr = _tmp15_;
			_tmp16_ = tr;
			alm_delete_history_dialog_get_history (self, _tmp16_, NULL, NULL);
		} else {
			gint _tmp17_;
			_tmp17_ = index;
			if (_tmp17_ == 3) {
				AlmCalendarWidget* _tmp18_;
				ZeitgeistTimeRange* _tmp19_ = NULL;
				ZeitgeistTimeRange* _tmp20_;
				_tmp18_ = self->priv->calendar_box;
				_tmp19_ = alm_calendar_widget_get_range (_tmp18_);
				_g_object_unref0 (tr);
				tr = _tmp19_;
				_tmp20_ = tr;
				alm_delete_history_dialog_get_history (self, _tmp20_, NULL, NULL);
			} else {
				gint _tmp21_;
				_tmp21_ = index;
				if (_tmp21_ == 4) {
					ZeitgeistTimeRange* _tmp22_;
					ZeitgeistTimeRange* _tmp23_;
					_tmp22_ = zeitgeist_time_range_new_anytime ();
					g_object_ref_sink (_tmp22_);
					_g_object_unref0 (tr);
					tr = _tmp22_;
					_tmp23_ = tr;
					alm_delete_history_dialog_get_history (self, _tmp23_, NULL, NULL);
				}
			}
		}
		_g_object_unref0 (tr);
	}
	gtk_widget_hide ((GtkWidget*) self);
}


static void alm_delete_history_dialog_get_history_data_free (gpointer _data) {
	AlmDeleteHistoryDialogGetHistoryData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->tr);
	_g_object_unref0 (_data_->self);
	g_slice_free (AlmDeleteHistoryDialogGetHistoryData, _data_);
}


static void alm_delete_history_dialog_get_history (AlmDeleteHistoryDialog* self, ZeitgeistTimeRange* tr, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	AlmDeleteHistoryDialogGetHistoryData* _data_;
	AlmDeleteHistoryDialog* _tmp0_;
	ZeitgeistTimeRange* _tmp1_;
	ZeitgeistTimeRange* _tmp2_;
	_data_ = g_slice_new0 (AlmDeleteHistoryDialogGetHistoryData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, alm_delete_history_dialog_get_history);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, alm_delete_history_dialog_get_history_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = tr;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->tr);
	_data_->tr = _tmp2_;
	alm_delete_history_dialog_get_history_co (_data_);
}


static void alm_delete_history_dialog_get_history_finish (AlmDeleteHistoryDialog* self, GAsyncResult* _res_) {
	AlmDeleteHistoryDialogGetHistoryData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean _alm_delete_history_dialog_get_history_co_gsource_func (gpointer self) {
	gboolean result;
	result = alm_delete_history_dialog_get_history_co (self);
	return result;
}


static void alm_delete_history_dialog_get_history_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	AlmDeleteHistoryDialogGetHistoryData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	alm_delete_history_dialog_get_history_co (_data_);
}


static gboolean alm_delete_history_dialog_get_history_co (AlmDeleteHistoryDialogGetHistoryData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_idle_add_full (G_PRIORITY_LOW, _alm_delete_history_dialog_get_history_co_gsource_func, _data_, NULL);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp0_ = (GtkDialog*) gtk_dialog_new ();
	g_object_ref_sink (_data_->_tmp0_);
	_data_->dialog = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->dialog;
	gtk_dialog_add_button (_data_->_tmp1_, GTK_STOCK_CANCEL, (gint) GTK_RESPONSE_CANCEL);
	_data_->_tmp2_ = _data_->dialog;
	gtk_dialog_add_button (_data_->_tmp2_, GTK_STOCK_YES, (gint) GTK_RESPONSE_OK);
	_data_->_tmp3_ = _data_->dialog;
	gtk_window_set_title ((GtkWindow*) _data_->_tmp3_, "");
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _ ("This operation cannot be undone, are you sure you want to delete this " \
"activity?");
	_data_->_tmp5_ = (GtkLabel*) gtk_label_new (_data_->_tmp4_);
	g_object_ref_sink (_data_->_tmp5_);
	_data_->label = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->label;
	gtk_label_set_line_wrap (_data_->_tmp6_, TRUE);
	_data_->_tmp7_ = _data_->label;
	gtk_label_set_line_wrap_mode (_data_->_tmp7_, PANGO_WRAP_WORD);
	_data_->_tmp8_ = _data_->label;
	gtk_misc_set_padding ((GtkMisc*) _data_->_tmp8_, 9, 9);
	_data_->_tmp9_ = _data_->dialog;
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = gtk_dialog_get_content_area (_data_->_tmp9_);
	_data_->_tmp11_ = _data_->label;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp10_, GTK_TYPE_CONTAINER, GtkContainer), (GtkWidget*) _data_->_tmp11_);
	_data_->_tmp12_ = _data_->dialog;
	_data_->_tmp13_ = NULL;
	_data_->_tmp13_ = gtk_widget_get_toplevel ((GtkWidget*) _data_->self);
	gtk_window_set_transient_for ((GtkWindow*) _data_->_tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp13_, GTK_TYPE_WINDOW, GtkWindow));
	_data_->_tmp14_ = _data_->dialog;
	gtk_window_set_modal ((GtkWindow*) _data_->_tmp14_, TRUE);
	_data_->_tmp15_ = _data_->dialog;
	gtk_widget_show_all ((GtkWidget*) _data_->_tmp15_);
	_data_->_tmp16_ = _data_->dialog;
	_data_->_tmp17_ = 0;
	_data_->_tmp17_ = gtk_dialog_run (_data_->_tmp16_);
	_data_->res = _data_->_tmp17_;
	_data_->_tmp18_ = _data_->dialog;
	gtk_widget_destroy ((GtkWidget*) _data_->_tmp18_);
	_data_->_tmp19_ = _data_->res;
	if (_data_->_tmp19_ == ((gint) GTK_RESPONSE_OK)) {
		_data_->_tmp20_ = g_ptr_array_new ();
		_data_->ptr_arr = _data_->_tmp20_;
		_data_->_tmp21_ = _data_->ptr_arr;
		_data_->_tmp22_ = zeitgeist_event_new ();
		g_object_ref_sink (_data_->_tmp22_);
		g_ptr_array_add (_data_->_tmp21_, _data_->_tmp22_);
		{
			_data_->_tmp23_ = _data_->self->priv->zg_log;
			_data_->_tmp24_ = _data_->tr;
			_data_->_tmp25_ = _data_->ptr_arr;
			_data_->ptr_arr = NULL;
			_data_->_state_ = 2;
			zeitgeist_log_find_event_ids (_data_->_tmp23_, _data_->_tmp24_, _data_->_tmp25_, ZEITGEIST_STORAGE_STATE_ANY, (guint32) 0, 0, NULL, alm_delete_history_dialog_get_history_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp26_ = NULL;
			_data_->_tmp26_ = zeitgeist_log_find_event_ids_finish (_data_->_tmp23_, _data_->_res_, &_data_->_inner_error_);
			_data_->ids = _data_->_tmp26_;
			if (_data_->_inner_error_ != NULL) {
				goto __catch2_g_error;
			}
			_data_->_tmp27_ = _data_->ids;
			alm_delete_history_dialog_delete_history (_data_->self, _data_->_tmp27_, NULL, NULL);
			_g_array_unref0 (_data_->ids);
		}
		goto __finally2;
		__catch2_g_error:
		{
			_data_->err = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp28_ = _data_->err;
			_data_->_tmp29_ = _data_->_tmp28_->message;
			g_warning ("unified-privacy.vala:888: %s", _data_->_tmp29_);
			_g_error_free0 (_data_->err);
		}
		__finally2:
		if (_data_->_inner_error_ != NULL) {
			_g_ptr_array_unref0 (_data_->ptr_arr);
			_g_object_unref0 (_data_->label);
			_g_object_unref0 (_data_->dialog);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
		_g_ptr_array_unref0 (_data_->ptr_arr);
	}
	_g_object_unref0 (_data_->label);
	_g_object_unref0 (_data_->dialog);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void alm_delete_history_dialog_delete_history_data_free (gpointer _data) {
	AlmDeleteHistoryDialogDeleteHistoryData* _data_;
	_data_ = _data;
	_g_array_unref0 (_data_->ids);
	_g_object_unref0 (_data_->self);
	g_slice_free (AlmDeleteHistoryDialogDeleteHistoryData, _data_);
}


static gpointer _g_array_ref0 (gpointer self) {
	return self ? g_array_ref (self) : NULL;
}


static void alm_delete_history_dialog_delete_history (AlmDeleteHistoryDialog* self, GArray* ids, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	AlmDeleteHistoryDialogDeleteHistoryData* _data_;
	AlmDeleteHistoryDialog* _tmp0_;
	GArray* _tmp1_;
	GArray* _tmp2_;
	_data_ = g_slice_new0 (AlmDeleteHistoryDialogDeleteHistoryData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, alm_delete_history_dialog_delete_history);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, alm_delete_history_dialog_delete_history_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = ids;
	_tmp2_ = _g_array_ref0 (_tmp1_);
	_g_array_unref0 (_data_->ids);
	_data_->ids = _tmp2_;
	alm_delete_history_dialog_delete_history_co (_data_);
}


static void alm_delete_history_dialog_delete_history_finish (AlmDeleteHistoryDialog* self, GAsyncResult* _res_) {
	AlmDeleteHistoryDialogDeleteHistoryData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean _alm_delete_history_dialog_delete_history_co_gsource_func (gpointer self) {
	gboolean result;
	result = alm_delete_history_dialog_delete_history_co (self);
	return result;
}


static void alm_delete_history_dialog_delete_history_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	AlmDeleteHistoryDialogDeleteHistoryData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	alm_delete_history_dialog_delete_history_co (_data_);
}


static gboolean alm_delete_history_dialog_delete_history_co (AlmDeleteHistoryDialogDeleteHistoryData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_idle_add_full (G_PRIORITY_LOW, _alm_delete_history_dialog_delete_history_co_gsource_func, _data_, NULL);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	{
		_data_->_tmp0_ = _data_->self->priv->zg_log;
		_data_->_tmp1_ = _data_->ids;
		_data_->_tmp2_ = _g_array_ref0 (_data_->_tmp1_);
		_data_->_state_ = 2;
		zeitgeist_log_delete_events (_data_->_tmp0_, _data_->_tmp2_, NULL, alm_delete_history_dialog_delete_history_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp3_ = FALSE;
		_data_->_tmp3_ = zeitgeist_log_delete_events_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error_);
		_data_->rs = _data_->_tmp3_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch3_g_error;
		}
	}
	goto __finally3;
	__catch3_g_error:
	{
		_data_->err = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp4_ = _data_->err;
		_data_->_tmp5_ = _data_->_tmp4_->message;
		g_warning ("unified-privacy.vala:901: %s", _data_->_tmp5_);
		_g_error_free0 (_data_->err);
	}
	__finally3:
	if (_data_->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void alm_delete_history_dialog_class_init (AlmDeleteHistoryDialogClass * klass) {
	alm_delete_history_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (AlmDeleteHistoryDialogPrivate));
	G_OBJECT_CLASS (klass)->finalize = alm_delete_history_dialog_finalize;
}


static void alm_delete_history_dialog_instance_init (AlmDeleteHistoryDialog * self) {
	self->priv = ALM_DELETE_HISTORY_DIALOG_GET_PRIVATE (self);
}


static void alm_delete_history_dialog_finalize (GObject* obj) {
	AlmDeleteHistoryDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ALM_TYPE_DELETE_HISTORY_DIALOG, AlmDeleteHistoryDialog);
	_g_object_unref0 (self->priv->r_hour);
	_g_object_unref0 (self->priv->r_day);
	_g_object_unref0 (self->priv->r_week);
	_g_object_unref0 (self->priv->r_calendar);
	_g_object_unref0 (self->priv->r_ever);
	_g_object_unref0 (self->priv->zg_log);
	_g_object_unref0 (self->priv->calendar_box);
	G_OBJECT_CLASS (alm_delete_history_dialog_parent_class)->finalize (obj);
}


GType alm_delete_history_dialog_get_type (void) {
	static volatile gsize alm_delete_history_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&alm_delete_history_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AlmDeleteHistoryDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) alm_delete_history_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AlmDeleteHistoryDialog), 0, (GInstanceInitFunc) alm_delete_history_dialog_instance_init, NULL };
		GType alm_delete_history_dialog_type_id;
		alm_delete_history_dialog_type_id = g_type_register_static (GTK_TYPE_DIALOG, "AlmDeleteHistoryDialog", &g_define_type_info, 0);
		g_once_init_leave (&alm_delete_history_dialog_type_id__volatile, alm_delete_history_dialog_type_id);
	}
	return alm_delete_history_dialog_type_id__volatile;
}



