/* themes-dialog.c generated by valac 0.38.1.9-3e35a, the Vala compiler
 * generated from themes-dialog.vala, do not modify */

/* -*- Mode: vala; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * Copyright (C) 2015 Arnaud Bonatti <arnaud.bonatti@gmail.com>
 *
 * This file is part of a GNOME game.
 *
 * This application is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this application. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>


#define TYPE_THEMES_DIALOG (themes_dialog_get_type ())
#define THEMES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THEMES_DIALOG, ThemesDialog))
#define THEMES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THEMES_DIALOG, ThemesDialogClass))
#define IS_THEMES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THEMES_DIALOG))
#define IS_THEMES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THEMES_DIALOG))
#define THEMES_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THEMES_DIALOG, ThemesDialogClass))

typedef struct _ThemesDialog ThemesDialog;
typedef struct _ThemesDialogClass ThemesDialogClass;
typedef struct _ThemesDialogPrivate ThemesDialogPrivate;

#define TYPE_GAME_VIEW (game_view_get_type ())
#define GAME_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GAME_VIEW, GameView))
#define GAME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GAME_VIEW, GameViewClass))
#define IS_GAME_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GAME_VIEW))
#define IS_GAME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GAME_VIEW))
#define GAME_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GAME_VIEW, GameViewClass))

typedef struct _GameView GameView;
typedef struct _GameViewClass GameViewClass;
enum  {
	THEMES_DIALOG_DUMMY_PROPERTY,
	THEMES_DIALOG_LAST_PROPERTY
};
static GParamSpec* themes_dialog_properties[THEMES_DIALOG_LAST_PROPERTY];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block4Data Block4Data;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_dir_close0(var) ((var == NULL) ? NULL : (var = (g_dir_close (var), NULL)))
#define _g_key_file_unref0(var) ((var == NULL) ? NULL : (var = (g_key_file_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))

struct _ThemesDialog {
	GtkDialog parent_instance;
	ThemesDialogPrivate * priv;
};

struct _ThemesDialogClass {
	GtkDialogClass parent_class;
};

struct _ThemesDialogPrivate {
	GameView* view;
	GtkListBox* listbox;
};

struct _Block4Data {
	int _ref_count_;
	ThemesDialog* self;
	GSettings* settings;
	GameView* view;
};


static gpointer themes_dialog_parent_class = NULL;

GType themes_dialog_get_type (void) G_GNUC_CONST;
GType game_view_get_type (void) G_GNUC_CONST;
#define THEMES_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_THEMES_DIALOG, ThemesDialogPrivate))
#define THEMES_DIALOG_PREFIX "theme-"
ThemesDialog* themes_dialog_new (GSettings* settings, GameView* view);
ThemesDialog* themes_dialog_construct (GType object_type, GSettings* settings, GameView* view);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static gboolean themes_dialog_do_not_close (ThemesDialog* self, GtkWidget* widget, GdkEventAny* event);
static gboolean _themes_dialog_do_not_close_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self);
static void ___lambda7_ (Block4Data* _data4_, GtkListBoxRow* row);
void game_view_set_theme (GameView* self, const gchar* value);
const gchar* game_view_get_theme (GameView* self);
static void ____lambda7__gtk_list_box_row_selected (GtkListBox* _sender, GtkListBoxRow* row, gpointer self);
static void themes_dialog_finalize (GObject * obj);


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


static Block4Data* block4_data_ref (Block4Data* _data4_) {
	g_atomic_int_inc (&_data4_->_ref_count_);
	return _data4_;
}


static void block4_data_unref (void * _userdata_) {
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		ThemesDialog* self;
		self = _data4_->self;
		_g_object_unref0 (_data4_->settings);
		_g_object_unref0 (_data4_->view);
		_g_object_unref0 (self);
		g_slice_free (Block4Data, _data4_);
	}
}


static gboolean _themes_dialog_do_not_close_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) {
	gboolean result;
	result = themes_dialog_do_not_close ((ThemesDialog*) self, _sender, event);
	return result;
}


static void ___lambda7_ (Block4Data* _data4_, GtkListBoxRow* row) {
	ThemesDialog* self;
	GameView* _tmp0_;
	GtkListBoxRow* _tmp1_;
	GtkWidget* _tmp2_;
	GList* _tmp3_;
	GList* _tmp4_;
	gconstpointer _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GSettings* _tmp8_;
	GameView* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	self = _data4_->self;
	_tmp0_ = _data4_->view;
	_tmp1_ = row;
	_tmp2_ = gtk_bin_get_child ((GtkBin*) _tmp1_);
	_tmp3_ = gtk_container_get_children ((GtkContainer*) G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_box_get_type (), GtkBox));
	_tmp4_ = _tmp3_;
	_tmp5_ = g_list_nth_data (_tmp4_, (guint) 2);
	_tmp6_ = gtk_label_get_label (G_TYPE_CHECK_INSTANCE_CAST ((GtkWidget*) _tmp5_, gtk_label_get_type (), GtkLabel));
	_tmp7_ = _tmp6_;
	game_view_set_theme (_tmp0_, _tmp7_);
	_g_list_free0 (_tmp4_);
	_tmp8_ = _data4_->settings;
	_tmp9_ = _data4_->view;
	_tmp10_ = game_view_get_theme (_tmp9_);
	_tmp11_ = _tmp10_;
	g_settings_set_string (_tmp8_, "theme", _tmp11_);
	gtk_widget_queue_draw ((GtkWidget*) self);
}


static void ____lambda7__gtk_list_box_row_selected (GtkListBox* _sender, GtkListBoxRow* row, gpointer self) {
	___lambda7_ (self, row);
}


ThemesDialog* themes_dialog_construct (GType object_type, GSettings* settings, GameView* view) {
	ThemesDialog * self = NULL;
	Block4Data* _data4_;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	GameView* _tmp2_;
	GameView* _tmp3_;
	gint _tmp4_ = 0;
	GtkSettings* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	GameView* _tmp8_;
	GameView* _tmp9_;
	GDir* dir = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (settings != NULL, NULL);
	g_return_val_if_fail (view != NULL, NULL);
	_data4_ = g_slice_new0 (Block4Data);
	_data4_->_ref_count_ = 1;
	_tmp0_ = settings;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (_data4_->settings);
	_data4_->settings = _tmp1_;
	_tmp2_ = view;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (_data4_->view);
	_data4_->view = _tmp3_;
	_tmp5_ = gtk_settings_get_default ();
	g_object_get (_tmp5_, "gtk-dialogs-use-header", &_tmp6_, NULL);
	_tmp7_ = _tmp6_;
	if (_tmp7_) {
		_tmp4_ = 1;
	} else {
		_tmp4_ = 0;
	}
	self = (ThemesDialog*) g_object_new (object_type, "use-header-bar", _tmp4_, NULL);
	_data4_->self = g_object_ref (self);
	_tmp8_ = _data4_->view;
	_tmp9_ = _g_object_ref0 (_tmp8_);
	_g_object_unref0 (self->priv->view);
	self->priv->view = _tmp9_;
	g_signal_connect_object ((GtkWidget*) self, "delete-event", (GCallback) _themes_dialog_do_not_close_gtk_widget_delete_event, self, 0);
	{
		GDir* _tmp10_ = NULL;
		gchar* _tmp11_;
		gchar* _tmp12_;
		GDir* _tmp13_;
		GDir* _tmp14_;
		GDir* _tmp15_;
		GtkListBox* _tmp64_;
		_tmp11_ = g_build_filename (DATA_DIRECTORY, "themes", "key", NULL);
		_tmp12_ = _tmp11_;
		_tmp13_ = g_dir_open (_tmp12_, (guint) 0, &_inner_error_);
		_tmp14_ = _tmp13_;
		_g_free0 (_tmp12_);
		_tmp10_ = _tmp14_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_FILE_ERROR) {
				goto __catch6_g_file_error;
			}
			_g_dir_close0 (dir);
			block4_data_unref (_data4_);
			_data4_ = NULL;
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
		_tmp15_ = _tmp10_;
		_tmp10_ = NULL;
		_g_dir_close0 (dir);
		dir = _tmp15_;
		while (TRUE) {
			gchar* filename = NULL;
			GDir* _tmp16_;
			const gchar* _tmp17_;
			gchar* _tmp18_;
			const gchar* _tmp19_;
			gchar* path = NULL;
			const gchar* _tmp20_;
			gchar* _tmp21_;
			GKeyFile* key = NULL;
			GKeyFile* _tmp22_;
			gchar* name = NULL;
			GtkListBoxRow* row = NULL;
			GtkListBoxRow* _tmp31_;
			GtkListBoxRow* _tmp32_;
			GtkListBoxRow* _tmp33_;
			GtkBox* box = NULL;
			GtkBox* _tmp34_;
			GtkBox* _tmp35_;
			GtkImage* img = NULL;
			GtkImage* _tmp36_;
			GtkImage* _tmp37_;
			GtkImage* _tmp38_;
			GtkImage* _tmp39_;
			GtkLabel* lbl = NULL;
			const gchar* _tmp40_;
			GtkLabel* _tmp41_;
			GtkLabel* _tmp42_;
			GtkLabel* _tmp43_;
			GtkLabel* data = NULL;
			const gchar* _tmp44_;
			GtkLabel* _tmp45_;
			GtkLabel* _tmp46_;
			GtkBox* _tmp47_;
			GtkImage* _tmp48_;
			GtkBox* _tmp49_;
			GtkLabel* _tmp50_;
			GtkBox* _tmp51_;
			GtkLabel* _tmp52_;
			GtkListBoxRow* _tmp53_;
			GtkBox* _tmp54_;
			GtkListBox* _tmp55_;
			GtkListBoxRow* _tmp56_;
			const gchar* _tmp57_;
			GSettings* _tmp58_;
			gchar* _tmp59_;
			gchar* _tmp60_;
			gboolean _tmp61_;
			_tmp16_ = dir;
			_tmp17_ = g_dir_read_name (_tmp16_);
			_tmp18_ = g_strdup (_tmp17_);
			filename = _tmp18_;
			_tmp19_ = filename;
			if (_tmp19_ == NULL) {
				_g_free0 (filename);
				break;
			}
			_tmp20_ = filename;
			_tmp21_ = g_build_filename (DATA_DIRECTORY, "themes", "key", _tmp20_, NULL);
			path = _tmp21_;
			_tmp22_ = g_key_file_new ();
			key = _tmp22_;
			{
				GKeyFile* _tmp23_;
				const gchar* _tmp24_;
				gchar* _tmp25_ = NULL;
				GKeyFile* _tmp26_;
				gchar* _tmp27_;
				gchar* _tmp28_;
				_tmp23_ = key;
				_tmp24_ = path;
				g_key_file_load_from_file (_tmp23_, _tmp24_, G_KEY_FILE_NONE, &_inner_error_);
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					if (_inner_error_->domain == G_KEY_FILE_ERROR) {
						goto __catch7_g_key_file_error;
					}
					goto __finally7;
				}
				_tmp26_ = key;
				_tmp27_ = g_key_file_get_locale_string (_tmp26_, "Theme", "Name", NULL, &_inner_error_);
				_tmp25_ = _tmp27_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					if (_inner_error_->domain == G_KEY_FILE_ERROR) {
						goto __catch7_g_key_file_error;
					}
					_g_free0 (name);
					_g_key_file_unref0 (key);
					_g_free0 (path);
					_g_free0 (filename);
					_g_dir_close0 (_tmp10_);
					_g_dir_close0 (dir);
					block4_data_unref (_data4_);
					_data4_ = NULL;
					g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
					g_clear_error (&_inner_error_);
					return NULL;
				}
				_tmp28_ = _tmp25_;
				_tmp25_ = NULL;
				_g_free0 (name);
				name = _tmp28_;
				_g_free0 (_tmp25_);
			}
			goto __finally7;
			__catch7_g_key_file_error:
			{
				GError* e = NULL;
				GError* _tmp29_;
				const gchar* _tmp30_;
				e = _inner_error_;
				_inner_error_ = NULL;
				_tmp29_ = e;
				_tmp30_ = _tmp29_->message;
				g_warning ("themes-dialog.vala:60: oops: %s", _tmp30_);
				_g_error_free0 (e);
				_g_free0 (name);
				_g_key_file_unref0 (key);
				_g_free0 (path);
				_g_free0 (filename);
				continue;
			}
			__finally7:
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				_g_free0 (name);
				_g_key_file_unref0 (key);
				_g_free0 (path);
				_g_free0 (filename);
				_g_dir_close0 (_tmp10_);
				if (_inner_error_->domain == G_FILE_ERROR) {
					goto __catch6_g_file_error;
				}
				_g_free0 (name);
				_g_key_file_unref0 (key);
				_g_free0 (path);
				_g_free0 (filename);
				_g_dir_close0 (_tmp10_);
				_g_dir_close0 (dir);
				block4_data_unref (_data4_);
				_data4_ = NULL;
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return NULL;
			}
			_tmp31_ = (GtkListBoxRow*) gtk_list_box_row_new ();
			g_object_ref_sink (_tmp31_);
			row = _tmp31_;
			_tmp32_ = row;
			gtk_widget_set_visible ((GtkWidget*) _tmp32_, TRUE);
			_tmp33_ = row;
			g_object_set ((GtkWidget*) _tmp33_, "height-request", 50, NULL);
			_tmp34_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
			g_object_ref_sink (_tmp34_);
			box = _tmp34_;
			_tmp35_ = box;
			gtk_widget_set_visible ((GtkWidget*) _tmp35_, TRUE);
			_tmp36_ = (GtkImage*) gtk_image_new ();
			g_object_ref_sink (_tmp36_);
			img = _tmp36_;
			_tmp37_ = img;
			gtk_widget_set_visible ((GtkWidget*) _tmp37_, TRUE);
			_tmp38_ = img;
			g_object_set ((GtkWidget*) _tmp38_, "width-request", 50, NULL);
			_tmp39_ = img;
			g_object_set (_tmp39_, "icon-name", "object-select-symbolic", NULL);
			_tmp40_ = name;
			_tmp41_ = (GtkLabel*) gtk_label_new (_tmp40_);
			g_object_ref_sink (_tmp41_);
			lbl = _tmp41_;
			_tmp42_ = lbl;
			gtk_widget_set_visible ((GtkWidget*) _tmp42_, TRUE);
			_tmp43_ = lbl;
			gtk_label_set_xalign (_tmp43_, (gfloat) 0);
			_tmp44_ = filename;
			_tmp45_ = (GtkLabel*) gtk_label_new (_tmp44_);
			g_object_ref_sink (_tmp45_);
			data = _tmp45_;
			_tmp46_ = data;
			gtk_widget_set_visible ((GtkWidget*) _tmp46_, FALSE);
			_tmp47_ = box;
			_tmp48_ = img;
			gtk_container_add ((GtkContainer*) _tmp47_, (GtkWidget*) _tmp48_);
			_tmp49_ = box;
			_tmp50_ = lbl;
			gtk_container_add ((GtkContainer*) _tmp49_, (GtkWidget*) _tmp50_);
			_tmp51_ = box;
			_tmp52_ = data;
			gtk_container_add ((GtkContainer*) _tmp51_, (GtkWidget*) _tmp52_);
			_tmp53_ = row;
			_tmp54_ = box;
			gtk_container_add ((GtkContainer*) _tmp53_, (GtkWidget*) _tmp54_);
			_tmp55_ = self->priv->listbox;
			_tmp56_ = row;
			gtk_container_add ((GtkContainer*) _tmp55_, (GtkWidget*) _tmp56_);
			_tmp57_ = filename;
			_tmp58_ = _data4_->settings;
			_tmp59_ = g_settings_get_string (_tmp58_, "theme");
			_tmp60_ = _tmp59_;
			_tmp61_ = g_strcmp0 (_tmp57_, _tmp60_) == 0;
			_g_free0 (_tmp60_);
			if (_tmp61_) {
				GtkListBox* _tmp62_;
				GtkListBoxRow* _tmp63_;
				_tmp62_ = self->priv->listbox;
				_tmp63_ = row;
				gtk_list_box_select_row (_tmp62_, _tmp63_);
			}
			_g_object_unref0 (data);
			_g_object_unref0 (lbl);
			_g_object_unref0 (img);
			_g_object_unref0 (box);
			_g_object_unref0 (row);
			_g_free0 (name);
			_g_key_file_unref0 (key);
			_g_free0 (path);
			_g_free0 (filename);
		}
		_tmp64_ = self->priv->listbox;
		g_signal_connect_data (_tmp64_, "row-selected", (GCallback) ____lambda7__gtk_list_box_row_selected, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0);
		_g_dir_close0 (_tmp10_);
	}
	goto __finally6;
	__catch6_g_file_error:
	{
		GError* e = NULL;
		GError* _tmp65_;
		const gchar* _tmp66_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp65_ = e;
		_tmp66_ = _tmp65_->message;
		g_warning ("themes-dialog.vala:98: Failed to load themes: %s", _tmp66_);
		_g_error_free0 (e);
	}
	__finally6:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_dir_close0 (dir);
		block4_data_unref (_data4_);
		_data4_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
	_g_dir_close0 (dir);
	block4_data_unref (_data4_);
	_data4_ = NULL;
	return self;
}


ThemesDialog* themes_dialog_new (GSettings* settings, GameView* view) {
	return themes_dialog_construct (TYPE_THEMES_DIALOG, settings, view);
}


static gboolean themes_dialog_do_not_close (ThemesDialog* self, GtkWidget* widget, GdkEventAny* event) {
	gboolean result = FALSE;
	GtkWidget* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = widget;
	gtk_widget_hide (_tmp0_);
	result = TRUE;
	return result;
}


static void themes_dialog_class_init (ThemesDialogClass * klass) {
	gint ThemesDialog_private_offset;
	themes_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ThemesDialogPrivate));
	G_OBJECT_CLASS (klass)->finalize = themes_dialog_finalize;
	ThemesDialog_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/iagno/ui/themes.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "listbox", FALSE, ThemesDialog_private_offset + G_STRUCT_OFFSET (ThemesDialogPrivate, listbox));
}


static void themes_dialog_instance_init (ThemesDialog * self) {
	self->priv = THEMES_DIALOG_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void themes_dialog_finalize (GObject * obj) {
	ThemesDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_THEMES_DIALOG, ThemesDialog);
	_g_object_unref0 (self->priv->view);
	_g_object_unref0 (self->priv->listbox);
	G_OBJECT_CLASS (themes_dialog_parent_class)->finalize (obj);
}


GType themes_dialog_get_type (void) {
	static volatile gsize themes_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&themes_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ThemesDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) themes_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ThemesDialog), 0, (GInstanceInitFunc) themes_dialog_instance_init, NULL };
		GType themes_dialog_type_id;
		themes_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "ThemesDialog", &g_define_type_info, 0);
		g_once_init_leave (&themes_dialog_type_id__volatile, themes_dialog_type_id);
	}
	return themes_dialog_type_id__volatile;
}



