/* AppChooser.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from AppChooser.vala, do not modify */

/*-
* Copyright (c) 2014-2022 elementary, Inc. (https://elementary.io)
*
* This program 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 3 of the License, or (at your option) any later version.
*
* This program 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, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Julien Spautz <spautz.julien@gmail.com>
*              Corentin Noël <corentin@elementaryos.org>
*/

#include "security-privacy.h"
#include <gtk/gtk.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gdesktopappinfo.h>
#include <gio/gio.h>
#include <glib-object.h>
#include <glib/gi18n-lib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	SECURITY_PRIVACY_DIALOGS_APP_CHOOSER_0_PROPERTY,
	SECURITY_PRIVACY_DIALOGS_APP_CHOOSER_NUM_PROPERTIES
};
static GParamSpec* security_privacy_dialogs_app_chooser_properties[SECURITY_PRIVACY_DIALOGS_APP_CHOOSER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block6Data Block6Data;
enum  {
	SECURITY_PRIVACY_DIALOGS_APP_CHOOSER_APP_CHOSEN_SIGNAL,
	SECURITY_PRIVACY_DIALOGS_APP_CHOOSER_NUM_SIGNALS
};
static guint security_privacy_dialogs_app_chooser_signals[SECURITY_PRIVACY_DIALOGS_APP_CHOOSER_NUM_SIGNALS] = {0};

struct _SecurityPrivacyDialogsAppChooserPrivate {
	GtkSearchEntry* search_entry;
};

struct _Block6Data {
	int _ref_count_;
	SecurityPrivacyDialogsAppChooser* self;
	GtkListBox* list;
};

static gint SecurityPrivacyDialogsAppChooser_private_offset;
static gpointer security_privacy_dialogs_app_chooser_parent_class = NULL;

static gint security_privacy_dialogs_app_chooser_sort_function (SecurityPrivacyDialogsAppChooser* self,
                                                         GtkListBoxRow* list_box_row_1,
                                                         GtkListBoxRow* list_box_row_2);
static gboolean security_privacy_dialogs_app_chooser_filter_function (SecurityPrivacyDialogsAppChooser* self,
                                                               GtkListBoxRow* list_box_row);
static void security_privacy_dialogs_app_chooser_on_app_selected (SecurityPrivacyDialogsAppChooser* self,
                                                           GtkListBoxRow* list_box_row);
static GObject * security_privacy_dialogs_app_chooser_constructor (GType type,
                                                            guint n_construct_properties,
                                                            GObjectConstructParam * construct_properties);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static gint _security_privacy_dialogs_app_chooser_sort_function_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                                 GtkListBoxRow* row2,
                                                                                 gpointer self);
static gboolean _security_privacy_dialogs_app_chooser_filter_function_gtk_list_box_filter_func (GtkListBoxRow* row,
                                                                                         gpointer self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void _security_privacy_dialogs_app_chooser_on_app_selected_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                       GtkListBoxRow* row,
                                                                                       gpointer self);
static void _security_privacy_dialogs_app_chooser___lambda5_ (Block6Data* _data6_);
static void __security_privacy_dialogs_app_chooser___lambda5__gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                                        gpointer self);
static void security_privacy_dialogs_app_chooser_finalize (GObject * obj);
static GType security_privacy_dialogs_app_chooser_get_type_once (void);

static inline gpointer
security_privacy_dialogs_app_chooser_get_instance_private (SecurityPrivacyDialogsAppChooser* self)
{
	return G_STRUCT_MEMBER_P (self, SecurityPrivacyDialogsAppChooser_private_offset);
}

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

static gint
security_privacy_dialogs_app_chooser_sort_function (SecurityPrivacyDialogsAppChooser* self,
                                                    GtkListBoxRow* list_box_row_1,
                                                    GtkListBoxRow* list_box_row_2)
{
	AppRow* row_1 = NULL;
	AppRow* _tmp0_;
	AppRow* row_2 = NULL;
	AppRow* _tmp1_;
	gchar* name_1 = NULL;
	GDesktopAppInfo* _tmp2_;
	GDesktopAppInfo* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* name_2 = NULL;
	GDesktopAppInfo* _tmp6_;
	GDesktopAppInfo* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (list_box_row_1 != NULL, 0);
	g_return_val_if_fail (list_box_row_2 != NULL, 0);
	_tmp0_ = _g_object_ref0 (IS_APP_ROW (list_box_row_1) ? ((AppRow*) list_box_row_1) : NULL);
	row_1 = _tmp0_;
	_tmp1_ = _g_object_ref0 (IS_APP_ROW (list_box_row_2) ? ((AppRow*) list_box_row_2) : NULL);
	row_2 = _tmp1_;
	_tmp2_ = app_row_get_app_info (row_1);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_app_info_get_display_name ((GAppInfo*) _tmp3_);
	_tmp5_ = g_strdup (_tmp4_);
	name_1 = _tmp5_;
	_tmp6_ = app_row_get_app_info (row_2);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_app_info_get_display_name ((GAppInfo*) _tmp7_);
	_tmp9_ = g_strdup (_tmp8_);
	name_2 = _tmp9_;
	result = g_utf8_collate (name_1, name_2);
	_g_free0 (name_2);
	_g_free0 (name_1);
	_g_object_unref0 (row_2);
	_g_object_unref0 (row_1);
	return result;
}

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

static gboolean
security_privacy_dialogs_app_chooser_filter_function (SecurityPrivacyDialogsAppChooser* self,
                                                      GtkListBoxRow* list_box_row)
{
	AppRow* app_row = NULL;
	AppRow* _tmp0_;
	gchar* name = NULL;
	AppRow* _tmp1_;
	GDesktopAppInfo* _tmp2_;
	GDesktopAppInfo* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* description = NULL;
	AppRow* _tmp12_;
	GDesktopAppInfo* _tmp13_;
	GDesktopAppInfo* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* search = NULL;
	GtkSearchEntry* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	gboolean _tmp23_ = FALSE;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	const gchar* _tmp27_;
	gboolean _tmp28_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (list_box_row != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (IS_APP_ROW (list_box_row) ? ((AppRow*) list_box_row) : NULL);
	app_row = _tmp0_;
	_tmp1_ = app_row;
	_tmp2_ = app_row_get_app_info (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_app_info_get_display_name ((GAppInfo*) _tmp3_);
	_tmp5_ = g_strdup (_tmp4_);
	name = _tmp5_;
	_tmp6_ = name;
	if (_tmp6_ == NULL) {
		AppRow* _tmp7_;
		GDesktopAppInfo* _tmp8_;
		GDesktopAppInfo* _tmp9_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp7_ = app_row;
		_tmp8_ = app_row_get_app_info (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_app_info_get_name ((GAppInfo*) _tmp9_);
		_tmp11_ = g_strdup (_tmp10_);
		_g_free0 (name);
		name = _tmp11_;
	}
	_tmp12_ = app_row;
	_tmp13_ = app_row_get_app_info (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = g_app_info_get_description ((GAppInfo*) _tmp14_);
	_tmp16_ = g_strdup (_tmp15_);
	description = _tmp16_;
	_tmp17_ = description;
	if (_tmp17_ == NULL) {
		gchar* _tmp18_;
		_tmp18_ = g_strdup ("");
		_g_free0 (description);
		description = _tmp18_;
	}
	_tmp19_ = self->priv->search_entry;
	_tmp20_ = gtk_editable_get_text ((GtkEditable*) _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = g_utf8_strdown (_tmp21_, (gssize) -1);
	search = _tmp22_;
	_tmp24_ = name;
	_tmp25_ = g_utf8_strdown (_tmp24_, (gssize) -1);
	_tmp26_ = _tmp25_;
	_tmp27_ = search;
	_tmp28_ = string_contains (_tmp26_, _tmp27_);
	_g_free0 (_tmp26_);
	if (_tmp28_) {
		_tmp23_ = TRUE;
	} else {
		const gchar* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		const gchar* _tmp32_;
		_tmp29_ = description;
		_tmp30_ = g_utf8_strdown (_tmp29_, (gssize) -1);
		_tmp31_ = _tmp30_;
		_tmp32_ = search;
		_tmp23_ = string_contains (_tmp31_, _tmp32_);
		_g_free0 (_tmp31_);
	}
	result = _tmp23_;
	_g_free0 (search);
	_g_free0 (description);
	_g_free0 (name);
	_g_object_unref0 (app_row);
	return result;
}

static void
security_privacy_dialogs_app_chooser_on_app_selected (SecurityPrivacyDialogsAppChooser* self,
                                                      GtkListBoxRow* list_box_row)
{
	AppRow* app_row = NULL;
	AppRow* _tmp0_;
	GDesktopAppInfo* _tmp1_;
	GDesktopAppInfo* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (list_box_row != NULL);
	_tmp0_ = _g_object_ref0 (IS_APP_ROW (list_box_row) ? ((AppRow*) list_box_row) : NULL);
	app_row = _tmp0_;
	_tmp1_ = app_row_get_app_info (app_row);
	_tmp2_ = _tmp1_;
	g_signal_emit (self, security_privacy_dialogs_app_chooser_signals[SECURITY_PRIVACY_DIALOGS_APP_CHOOSER_APP_CHOSEN_SIGNAL], 0, _tmp2_);
	gtk_popover_popdown ((GtkPopover*) self);
	_g_object_unref0 (app_row);
}

SecurityPrivacyDialogsAppChooser*
security_privacy_dialogs_app_chooser_construct (GType object_type)
{
	SecurityPrivacyDialogsAppChooser * self = NULL;
	self = (SecurityPrivacyDialogsAppChooser*) g_object_new (object_type, NULL);
	return self;
}

SecurityPrivacyDialogsAppChooser*
security_privacy_dialogs_app_chooser_new (void)
{
	return security_privacy_dialogs_app_chooser_construct (SECURITY_PRIVACY_DIALOGS_TYPE_APP_CHOOSER);
}

static Block6Data*
block6_data_ref (Block6Data* _data6_)
{
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}

static void
block6_data_unref (void * _userdata_)
{
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		SecurityPrivacyDialogsAppChooser* self;
		self = _data6_->self;
		_g_object_unref0 (_data6_->list);
		_g_object_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}

static gint
_security_privacy_dialogs_app_chooser_sort_function_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                            GtkListBoxRow* row2,
                                                                            gpointer self)
{
	gint result;
	result = security_privacy_dialogs_app_chooser_sort_function ((SecurityPrivacyDialogsAppChooser*) self, row1, row2);
	return result;
}

static gboolean
_security_privacy_dialogs_app_chooser_filter_function_gtk_list_box_filter_func (GtkListBoxRow* row,
                                                                                gpointer self)
{
	gboolean result;
	result = security_privacy_dialogs_app_chooser_filter_function ((SecurityPrivacyDialogsAppChooser*) self, row);
	return result;
}

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

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

static void
_security_privacy_dialogs_app_chooser_on_app_selected_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                  GtkListBoxRow* row,
                                                                                  gpointer self)
{
	security_privacy_dialogs_app_chooser_on_app_selected ((SecurityPrivacyDialogsAppChooser*) self, row);
}

static void
_security_privacy_dialogs_app_chooser___lambda5_ (Block6Data* _data6_)
{
	SecurityPrivacyDialogsAppChooser* self;
	GtkListBox* _tmp0_;
	self = _data6_->self;
	_tmp0_ = _data6_->list;
	gtk_list_box_invalidate_filter (_tmp0_);
}

static void
__security_privacy_dialogs_app_chooser___lambda5__gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                                   gpointer self)
{
	_security_privacy_dialogs_app_chooser___lambda5_ (self);
}

static GObject *
security_privacy_dialogs_app_chooser_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SecurityPrivacyDialogsAppChooser * self;
	Block6Data* _data6_;
	gchar* _tmp0_;
	GtkSearchEntry* _tmp1_ = NULL;
	GtkListBox* _tmp2_ = NULL;
	GtkListBox* _tmp3_;
	GtkListBox* _tmp4_;
	GtkScrolledWindow* scrolled = NULL;
	GtkListBox* _tmp5_;
	GtkWidget* _tmp6_;
	GtkScrolledWindow* _tmp7_ = NULL;
	GtkBox* box = NULL;
	GtkBox* _tmp8_ = NULL;
	GtkBox* _tmp9_;
	GtkSearchEntry* _tmp10_;
	GtkBox* _tmp11_;
	GtkScrolledWindow* _tmp12_;
	GtkBox* _tmp13_;
	GList* _tmp14_;
	GtkSearchEntry* _tmp22_;
	GtkListBox* _tmp23_;
	GtkSearchEntry* _tmp24_;
	parent_class = G_OBJECT_CLASS (security_privacy_dialogs_app_chooser_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SECURITY_PRIVACY_DIALOGS_TYPE_APP_CHOOSER, SecurityPrivacyDialogsAppChooser);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_data6_->self = g_object_ref (self);
	_tmp0_ = g_strdup (_ ("Search Application"));
	_tmp1_ = (GtkSearchEntry*) gtk_search_entry_new ();
	gtk_widget_set_margin_end ((GtkWidget*) _tmp1_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp1_, 12);
	g_object_set (_tmp1_, "placeholder-text", _tmp0_, NULL);
	_g_free0 (_tmp0_);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->search_entry);
	self->priv->search_entry = _tmp1_;
	_tmp2_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp2_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp2_, TRUE);
	g_object_ref_sink (_tmp2_);
	_data6_->list = _tmp2_;
	_tmp3_ = _data6_->list;
	gtk_list_box_set_sort_func (_tmp3_, _security_privacy_dialogs_app_chooser_sort_function_gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	_tmp4_ = _data6_->list;
	gtk_list_box_set_filter_func (_tmp4_, _security_privacy_dialogs_app_chooser_filter_function_gtk_list_box_filter_func, g_object_ref (self), g_object_unref);
	_tmp5_ = _data6_->list;
	_tmp6_ = _g_object_ref0 ((GtkWidget*) _tmp5_);
	_tmp7_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_scrolled_window_set_child (_tmp7_, _tmp6_);
	_g_object_unref0 (_tmp6_);
	g_object_set ((GtkWidget*) _tmp7_, "height-request", 200, NULL);
	g_object_set ((GtkWidget*) _tmp7_, "width-request", 500, NULL);
	g_object_ref_sink (_tmp7_);
	scrolled = _tmp7_;
	_tmp8_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp8_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp8_, 6);
	g_object_ref_sink (_tmp8_);
	box = _tmp8_;
	_tmp9_ = box;
	_tmp10_ = self->priv->search_entry;
	gtk_box_append (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = box;
	_tmp12_ = scrolled;
	gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = box;
	gtk_popover_set_child ((GtkPopover*) self, (GtkWidget*) _tmp13_);
	_tmp14_ = g_app_info_get_all ();
	{
		GList* app_info_collection = NULL;
		GList* app_info_it = NULL;
		app_info_collection = _tmp14_;
		for (app_info_it = app_info_collection; app_info_it != NULL; app_info_it = app_info_it->next) {
			GAppInfo* app_info = NULL;
			app_info = (GAppInfo*) app_info_it->data;
			{
				gboolean _tmp15_ = FALSE;
				GAppInfo* _tmp16_;
				_tmp16_ = app_info;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, G_TYPE_DESKTOP_APP_INFO)) {
					GAppInfo* _tmp17_;
					_tmp17_ = app_info;
					_tmp15_ = g_app_info_should_show (_tmp17_);
				} else {
					_tmp15_ = FALSE;
				}
				if (_tmp15_) {
					AppRow* app_row = NULL;
					GAppInfo* _tmp18_;
					AppRow* _tmp19_;
					GtkListBox* _tmp20_;
					AppRow* _tmp21_;
					_tmp18_ = app_info;
					_tmp19_ = app_row_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfo));
					g_object_ref_sink (_tmp19_);
					app_row = _tmp19_;
					_tmp20_ = _data6_->list;
					_tmp21_ = app_row;
					gtk_list_box_prepend (_tmp20_, (GtkWidget*) _tmp21_);
					_g_object_unref0 (app_row);
				}
			}
		}
		(app_info_collection == NULL) ? NULL : (app_info_collection = (_g_list_free__g_object_unref0_ (app_info_collection), NULL));
	}
	_tmp22_ = self->priv->search_entry;
	gtk_widget_grab_focus ((GtkWidget*) _tmp22_);
	_tmp23_ = _data6_->list;
	g_signal_connect_object (_tmp23_, "row-activated", (GCallback) _security_privacy_dialogs_app_chooser_on_app_selected_gtk_list_box_row_activated, self, 0);
	_tmp24_ = self->priv->search_entry;
	g_signal_connect_data (_tmp24_, "search-changed", (GCallback) __security_privacy_dialogs_app_chooser___lambda5__gtk_search_entry_search_changed, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
	_g_object_unref0 (box);
	_g_object_unref0 (scrolled);
	block6_data_unref (_data6_);
	_data6_ = NULL;
	return obj;
}

static void
security_privacy_dialogs_app_chooser_class_init (SecurityPrivacyDialogsAppChooserClass * klass,
                                                 gpointer klass_data)
{
	security_privacy_dialogs_app_chooser_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SecurityPrivacyDialogsAppChooser_private_offset);
	G_OBJECT_CLASS (klass)->constructor = security_privacy_dialogs_app_chooser_constructor;
	G_OBJECT_CLASS (klass)->finalize = security_privacy_dialogs_app_chooser_finalize;
	security_privacy_dialogs_app_chooser_signals[SECURITY_PRIVACY_DIALOGS_APP_CHOOSER_APP_CHOSEN_SIGNAL] = g_signal_new ("app-chosen", SECURITY_PRIVACY_DIALOGS_TYPE_APP_CHOOSER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_DESKTOP_APP_INFO);
}

static void
security_privacy_dialogs_app_chooser_instance_init (SecurityPrivacyDialogsAppChooser * self,
                                                    gpointer klass)
{
	self->priv = security_privacy_dialogs_app_chooser_get_instance_private (self);
}

static void
security_privacy_dialogs_app_chooser_finalize (GObject * obj)
{
	SecurityPrivacyDialogsAppChooser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SECURITY_PRIVACY_DIALOGS_TYPE_APP_CHOOSER, SecurityPrivacyDialogsAppChooser);
	_g_object_unref0 (self->priv->search_entry);
	G_OBJECT_CLASS (security_privacy_dialogs_app_chooser_parent_class)->finalize (obj);
}

static GType
security_privacy_dialogs_app_chooser_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SecurityPrivacyDialogsAppChooserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) security_privacy_dialogs_app_chooser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SecurityPrivacyDialogsAppChooser), 0, (GInstanceInitFunc) security_privacy_dialogs_app_chooser_instance_init, NULL };
	GType security_privacy_dialogs_app_chooser_type_id;
	security_privacy_dialogs_app_chooser_type_id = g_type_register_static (gtk_popover_get_type (), "SecurityPrivacyDialogsAppChooser", &g_define_type_info, 0);
	SecurityPrivacyDialogsAppChooser_private_offset = g_type_add_instance_private (security_privacy_dialogs_app_chooser_type_id, sizeof (SecurityPrivacyDialogsAppChooserPrivate));
	return security_privacy_dialogs_app_chooser_type_id;
}

GType
security_privacy_dialogs_app_chooser_get_type (void)
{
	static volatile gsize security_privacy_dialogs_app_chooser_type_id__once = 0;
	if (g_once_init_enter (&security_privacy_dialogs_app_chooser_type_id__once)) {
		GType security_privacy_dialogs_app_chooser_type_id;
		security_privacy_dialogs_app_chooser_type_id = security_privacy_dialogs_app_chooser_get_type_once ();
		g_once_init_leave (&security_privacy_dialogs_app_chooser_type_id__once, security_privacy_dialogs_app_chooser_type_id);
	}
	return security_privacy_dialogs_app_chooser_type_id__once;
}

