Logo Search packages:      
Sourcecode: d-conf version File versions  Download package

dconf-editor.c

/* dconf-editor.c generated by valac 0.12.0, the Vala compiler
 * generated from dconf-editor.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.h>
#include <gobject/gvaluecollector.h>


#define TYPE_CONFIGURATION_EDITOR (configuration_editor_get_type ())
#define CONFIGURATION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_EDITOR, ConfigurationEditor))
#define CONFIGURATION_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_EDITOR, ConfigurationEditorClass))
#define IS_CONFIGURATION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_EDITOR))
#define IS_CONFIGURATION_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_EDITOR))
#define CONFIGURATION_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_EDITOR, ConfigurationEditorClass))

typedef struct _ConfigurationEditor ConfigurationEditor;
typedef struct _ConfigurationEditorClass ConfigurationEditorClass;
typedef struct _ConfigurationEditorPrivate ConfigurationEditorPrivate;

#define TYPE_SETTINGS_MODEL (settings_model_get_type ())
#define SETTINGS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SETTINGS_MODEL, SettingsModel))
#define SETTINGS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SETTINGS_MODEL, SettingsModelClass))
#define IS_SETTINGS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SETTINGS_MODEL))
#define IS_SETTINGS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SETTINGS_MODEL))
#define SETTINGS_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SETTINGS_MODEL, SettingsModelClass))

typedef struct _SettingsModel SettingsModel;
typedef struct _SettingsModelClass SettingsModelClass;

#define TYPE_KEY (key_get_type ())
#define KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY, Key))
#define KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY, KeyClass))
#define IS_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY))
#define IS_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY))
#define KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY, KeyClass))

typedef struct _Key Key;
typedef struct _KeyClass KeyClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define TYPE_DCONF_DIR_VIEW (dconf_dir_view_get_type ())
#define DCONF_DIR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DCONF_DIR_VIEW, DConfDirView))
#define DCONF_DIR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DCONF_DIR_VIEW, DConfDirViewClass))
#define IS_DCONF_DIR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DCONF_DIR_VIEW))
#define IS_DCONF_DIR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DCONF_DIR_VIEW))
#define DCONF_DIR_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DCONF_DIR_VIEW, DConfDirViewClass))

typedef struct _DConfDirView DConfDirView;
typedef struct _DConfDirViewClass DConfDirViewClass;

#define TYPE_DCONF_KEY_VIEW (dconf_key_view_get_type ())
#define DCONF_KEY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DCONF_KEY_VIEW, DConfKeyView))
#define DCONF_KEY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DCONF_KEY_VIEW, DConfKeyViewClass))
#define IS_DCONF_KEY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DCONF_KEY_VIEW))
#define IS_DCONF_KEY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DCONF_KEY_VIEW))
#define DCONF_KEY_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DCONF_KEY_VIEW, DConfKeyViewClass))

typedef struct _DConfKeyView DConfKeyView;
typedef struct _DConfKeyViewClass DConfKeyViewClass;

#define TYPE_KEY_MODEL (key_model_get_type ())
#define KEY_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_MODEL, KeyModel))
#define KEY_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_MODEL, KeyModelClass))
#define IS_KEY_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_MODEL))
#define IS_KEY_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_MODEL))
#define KEY_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_MODEL, KeyModelClass))

typedef struct _KeyModel KeyModel;
typedef struct _KeyModelClass KeyModelClass;

#define TYPE_DIRECTORY (directory_get_type ())
#define DIRECTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECTORY, Directory))
#define DIRECTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECTORY, DirectoryClass))
#define IS_DIRECTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECTORY))
#define IS_DIRECTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECTORY))
#define DIRECTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECTORY, DirectoryClass))

typedef struct _Directory Directory;
typedef struct _DirectoryClass DirectoryClass;
typedef struct _KeyPrivate KeyPrivate;

#define TYPE_SCHEMA_KEY (schema_key_get_type ())
#define SCHEMA_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_KEY, SchemaKey))
#define SCHEMA_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_KEY, SchemaKeyClass))
#define IS_SCHEMA_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_KEY))
#define IS_SCHEMA_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_KEY))
#define SCHEMA_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_KEY, SchemaKeyClass))

typedef struct _SchemaKey SchemaKey;
typedef struct _SchemaKeyClass SchemaKeyClass;
typedef struct _SchemaKeyPrivate SchemaKeyPrivate;

#define TYPE_SCHEMA (schema_get_type ())
#define SCHEMA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA, Schema))
#define SCHEMA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA, SchemaClass))
#define IS_SCHEMA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA))
#define IS_SCHEMA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA))
#define SCHEMA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA, SchemaClass))

typedef struct _Schema Schema;
typedef struct _SchemaClass SchemaClass;

#define TYPE_SCHEMA_VALUE_RANGE (schema_value_range_get_type ())
#define SCHEMA_VALUE_RANGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_VALUE_RANGE, SchemaValueRange))
#define SCHEMA_VALUE_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_VALUE_RANGE, SchemaValueRangeClass))
#define IS_SCHEMA_VALUE_RANGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_VALUE_RANGE))
#define IS_SCHEMA_VALUE_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_VALUE_RANGE))
#define SCHEMA_VALUE_RANGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_VALUE_RANGE, SchemaValueRangeClass))

typedef struct _SchemaValueRange SchemaValueRange;
typedef struct _SchemaValueRangeClass SchemaValueRangeClass;

#define TYPE_SCHEMA_CHOICE (schema_choice_get_type ())
#define SCHEMA_CHOICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_CHOICE, SchemaChoice))
#define SCHEMA_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_CHOICE, SchemaChoiceClass))
#define IS_SCHEMA_CHOICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_CHOICE))
#define IS_SCHEMA_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_CHOICE))
#define SCHEMA_CHOICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_CHOICE, SchemaChoiceClass))

typedef struct _SchemaChoice SchemaChoice;
typedef struct _SchemaChoiceClass SchemaChoiceClass;
typedef struct _SchemaValueRangePrivate SchemaValueRangePrivate;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _SchemaPrivate SchemaPrivate;

#define TYPE_SCHEMA_LIST (schema_list_get_type ())
#define SCHEMA_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_LIST, SchemaList))
#define SCHEMA_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_LIST, SchemaListClass))
#define IS_SCHEMA_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_LIST))
#define IS_SCHEMA_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_LIST))
#define SCHEMA_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_LIST, SchemaListClass))

typedef struct _SchemaList SchemaList;
typedef struct _SchemaListClass SchemaListClass;
#define _configuration_editor_unref0(var) ((var == NULL) ? NULL : (var = (configuration_editor_unref (var), NULL)))
typedef struct _ParamSpecConfigurationEditor ParamSpecConfigurationEditor;

00147 struct _ConfigurationEditor {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ConfigurationEditorPrivate * priv;
};

00153 struct _ConfigurationEditorClass {
      GTypeClass parent_class;
      void (*finalize) (ConfigurationEditor *self);
};

00158 struct _ConfigurationEditorPrivate {
      SettingsModel* model;
      GSettings* settings;
      GtkBuilder* ui;
      GtkWindow* window;
      GtkTreeView* dir_tree_view;
      GtkTreeView* key_tree_view;
      GtkTable* key_info_table;
      GtkLabel* schema_label;
      GtkLabel* summary_label;
      GtkLabel* description_label;
      GtkLabel* type_label;
      GtkLabel* default_label;
      GtkAction* set_default_action;
      Key* selected_key;
};

00175 struct _Key {
      GObject parent_instance;
      KeyPrivate * priv;
      Directory* parent;
      gchar* name;
      gchar* full_name;
      SchemaKey* schema;
};

00184 struct _KeyClass {
      GObjectClass parent_class;
};

00188 struct _SchemaKey {
      GTypeInstance parent_instance;
      volatile int ref_count;
      SchemaKeyPrivate * priv;
      Schema* schema;
      gchar* name;
      gchar* type;
      GVariant* default_value;
      SchemaValueRange* range;
      SchemaValueRange* type_range;
      GList* choices;
      gchar* enum_name;
      gchar* summary;
      gchar* description;
      gchar* gettext_domain;
};

00205 struct _SchemaKeyClass {
      GTypeClass parent_class;
      void (*finalize) (SchemaKey *self);
};

00210 struct _SchemaValueRange {
      GTypeInstance parent_instance;
      volatile int ref_count;
      SchemaValueRangePrivate * priv;
      GVariant* min;
      GVariant* max;
};

00218 struct _SchemaValueRangeClass {
      GTypeClass parent_class;
      void (*finalize) (SchemaValueRange *self);
};

00223 struct _Schema {
      GTypeInstance parent_instance;
      volatile int ref_count;
      SchemaPrivate * priv;
      SchemaList* list;
      gchar* id;
      gchar* path;
      GHashTable* keys;
};

00233 struct _SchemaClass {
      GTypeClass parent_class;
      void (*finalize) (Schema *self);
};

00238 struct _ParamSpecConfigurationEditor {
      GParamSpec parent_instance;
};


static gpointer configuration_editor_parent_class = NULL;

gpointer configuration_editor_ref (gpointer instance);
void configuration_editor_unref (gpointer instance);
GParamSpec* param_spec_configuration_editor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_configuration_editor (GValue* value, gpointer v_object);
void value_take_configuration_editor (GValue* value, gpointer v_object);
gpointer value_get_configuration_editor (const GValue* value);
GType configuration_editor_get_type (void) G_GNUC_CONST;
GType settings_model_get_type (void) G_GNUC_CONST;
GType key_get_type (void) G_GNUC_CONST;
#define CONFIGURATION_EDITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CONFIGURATION_EDITOR, ConfigurationEditorPrivate))
enum  {
      CONFIGURATION_EDITOR_DUMMY_PROPERTY
};
ConfigurationEditor* configuration_editor_new (void);
ConfigurationEditor* configuration_editor_construct (GType object_type);
SettingsModel* settings_model_new (void);
SettingsModel* settings_model_construct (GType object_type);
static void _gtk_main_quit_gtk_widget_destroy (GtkWidget* _sender, gpointer self);
DConfDirView* dconf_dir_view_new (void);
DConfDirView* dconf_dir_view_construct (GType object_type);
GType dconf_dir_view_get_type (void) G_GNUC_CONST;
static void configuration_editor_dir_selected_cb (ConfigurationEditor* self);
static void _configuration_editor_dir_selected_cb_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
DConfKeyView* dconf_key_view_new (void);
DConfKeyView* dconf_key_view_construct (GType object_type);
GType dconf_key_view_get_type (void) G_GNUC_CONST;
static void configuration_editor_key_selected_cb (ConfigurationEditor* self);
static void _configuration_editor_key_selected_cb_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
void configuration_editor_show (ConfigurationEditor* self);
GType key_model_get_type (void) G_GNUC_CONST;
GType directory_get_type (void) G_GNUC_CONST;
Directory* settings_model_get_directory (SettingsModel* self, GtkTreeIter* iter);
KeyModel* directory_get_key_model (Directory* self);
static gchar* configuration_editor_key_to_description (ConfigurationEditor* self, Key* key);
gpointer schema_key_ref (gpointer instance);
void schema_key_unref (gpointer instance);
GParamSpec* param_spec_schema_key (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema_key (GValue* value, gpointer v_object);
void value_take_schema_key (GValue* value, gpointer v_object);
gpointer value_get_schema_key (const GValue* value);
GType schema_key_get_type (void) G_GNUC_CONST;
gpointer schema_ref (gpointer instance);
void schema_unref (gpointer instance);
GParamSpec* param_spec_schema (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema (GValue* value, gpointer v_object);
void value_take_schema (GValue* value, gpointer v_object);
gpointer value_get_schema (const GValue* value);
GType schema_get_type (void) G_GNUC_CONST;
gpointer schema_value_range_ref (gpointer instance);
void schema_value_range_unref (gpointer instance);
GParamSpec* param_spec_schema_value_range (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema_value_range (GValue* value, gpointer v_object);
void value_take_schema_value_range (GValue* value, gpointer v_object);
gpointer value_get_schema_value_range (const GValue* value);
GType schema_value_range_get_type (void) G_GNUC_CONST;
gpointer schema_choice_ref (gpointer instance);
void schema_choice_unref (gpointer instance);
GParamSpec* param_spec_schema_choice (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema_choice (GValue* value, gpointer v_object);
void value_take_schema_choice (GValue* value, gpointer v_object);
gpointer value_get_schema_choice (const GValue* value);
GType schema_choice_get_type (void) G_GNUC_CONST;
GVariant* key_get_min (Key* self);
GVariant* key_get_max (Key* self);
static void configuration_editor_key_changed_cb (ConfigurationEditor* self, Key* key);
static void _configuration_editor_key_changed_cb_key_value_changed (Key* _sender, gpointer self);
Key* key_model_get_key (KeyModel* self, GtkTreeIter* iter);
gboolean key_get_is_default (Key* self);
gpointer schema_list_ref (gpointer instance);
void schema_list_unref (gpointer instance);
GParamSpec* param_spec_schema_list (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema_list (GValue* value, gpointer v_object);
void value_take_schema_list (GValue* value, gpointer v_object);
gpointer value_get_schema_list (const GValue* value);
GType schema_list_get_type (void) G_GNUC_CONST;
void G_MODULE_EXPORT set_default_cb (GtkAction* action, ConfigurationEditor* self);
void key_set_to_default (Key* self);
gboolean G_MODULE_EXPORT main_window_configure_event_cb (GtkWidget* widget, GdkEventConfigure* event, ConfigurationEditor* self);
gboolean G_MODULE_EXPORT main_window_window_state_event_cb (GtkWidget* widget, GdkEventWindowState* event, ConfigurationEditor* self);
gint configuration_editor_main (gchar** args, int args_length1);
static void configuration_editor_finalize (ConfigurationEditor* obj);


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


static void _gtk_main_quit_gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
      gtk_main_quit ();
}


static void _configuration_editor_dir_selected_cb_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
      configuration_editor_dir_selected_cb (self);
}


static void _configuration_editor_key_selected_cb_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
      configuration_editor_key_selected_cb (self);
}


ConfigurationEditor* configuration_editor_construct (GType object_type) {
      ConfigurationEditor* self = NULL;
      GSettings* _tmp0_ = NULL;
      SettingsModel* _tmp1_ = NULL;
      GtkBuilder* _tmp2_ = NULL;
      gchar* _tmp3_ = NULL;
      gchar* _tmp4_;
      GObject* _tmp5_ = NULL;
      GtkWindow* _tmp6_;
      gint _tmp7_;
      gint _tmp8_;
      gboolean _tmp9_;
      DConfDirView* _tmp10_ = NULL;
      GtkTreeSelection* _tmp11_ = NULL;
      GObject* _tmp12_ = NULL;
      GtkScrolledWindow* _tmp13_;
      GtkScrolledWindow* scroll;
      DConfKeyView* _tmp14_ = NULL;
      GtkTreeSelection* _tmp15_ = NULL;
      GObject* _tmp16_ = NULL;
      GtkScrolledWindow* _tmp17_;
      GObject* _tmp18_ = NULL;
      GtkTable* _tmp19_;
      GObject* _tmp20_ = NULL;
      GtkLabel* _tmp21_;
      GObject* _tmp22_ = NULL;
      GtkLabel* _tmp23_;
      GObject* _tmp24_ = NULL;
      GtkLabel* _tmp25_;
      GObject* _tmp26_ = NULL;
      GtkLabel* _tmp27_;
      GObject* _tmp28_ = NULL;
      GtkLabel* _tmp29_;
      GObject* _tmp30_ = NULL;
      GtkAction* _tmp31_;
      GtkTreeIter iter = {0};
      GtkTreeIter _tmp32_ = {0};
      gboolean _tmp33_;
      GError * _inner_error_ = NULL;
      self = (ConfigurationEditor*) g_type_create_instance (object_type);
      _tmp0_ = g_settings_new ("ca.desrt.dconf-editor.Settings");
      _g_object_unref0 (self->priv->settings);
      self->priv->settings = _tmp0_;
      _tmp1_ = settings_model_new ();
      _g_object_unref0 (self->priv->model);
      self->priv->model = _tmp1_;
      _tmp2_ = gtk_builder_new ();
      _g_object_unref0 (self->priv->ui);
      self->priv->ui = _tmp2_;
      _tmp3_ = g_build_filename (PKGDATADIR, "dconf-editor.ui", NULL);
      _tmp4_ = _tmp3_;
      gtk_builder_add_from_file (self->priv->ui, _tmp4_, &_inner_error_);
      _g_free0 (_tmp4_);
      if (_inner_error_ != NULL) {
            goto __catch0_g_error;
      }
      goto __finally0;
      __catch0_g_error:
      {
            GError * e;
            e = _inner_error_;
            _inner_error_ = NULL;
            g_critical ("dconf-editor.vala:33: Failed to load UI: %s", e->message);
            _g_error_free0 (e);
      }
      __finally0:
      if (_inner_error_ != 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;
      }
      gtk_builder_connect_signals (self->priv->ui, self);
      _tmp5_ = gtk_builder_get_object (self->priv->ui, "main_window");
      _tmp6_ = _g_object_ref0 (GTK_WINDOW (_tmp5_));
      _g_object_unref0 (self->priv->window);
      self->priv->window = _tmp6_;
      g_signal_connect ((GtkWidget*) self->priv->window, "destroy", (GCallback) _gtk_main_quit_gtk_widget_destroy, NULL);
      _tmp7_ = g_settings_get_int (self->priv->settings, "width");
      _tmp8_ = g_settings_get_int (self->priv->settings, "height");
      gtk_window_set_default_size (self->priv->window, _tmp7_, _tmp8_);
      _tmp9_ = g_settings_get_boolean (self->priv->settings, "maximized");
      if (_tmp9_) {
            gtk_window_maximize (self->priv->window);
      }
      _tmp10_ = dconf_dir_view_new ();
      _g_object_unref0 (self->priv->dir_tree_view);
      self->priv->dir_tree_view = (GtkTreeView*) g_object_ref_sink (_tmp10_);
      gtk_tree_view_set_model (self->priv->dir_tree_view, (GtkTreeModel*) self->priv->model);
      _tmp11_ = gtk_tree_view_get_selection (self->priv->dir_tree_view);
      g_signal_connect (_tmp11_, "changed", (GCallback) _configuration_editor_dir_selected_cb_gtk_tree_selection_changed, self);
      gtk_widget_show ((GtkWidget*) self->priv->dir_tree_view);
      _tmp12_ = gtk_builder_get_object (self->priv->ui, "directory_scrolledwindow");
      _tmp13_ = _g_object_ref0 (GTK_SCROLLED_WINDOW (_tmp12_));
      scroll = _tmp13_;
      gtk_container_add ((GtkContainer*) scroll, (GtkWidget*) self->priv->dir_tree_view);
      _tmp14_ = dconf_key_view_new ();
      _g_object_unref0 (self->priv->key_tree_view);
      self->priv->key_tree_view = (GtkTreeView*) g_object_ref_sink (_tmp14_);
      gtk_widget_show ((GtkWidget*) self->priv->key_tree_view);
      _tmp15_ = gtk_tree_view_get_selection (self->priv->key_tree_view);
      g_signal_connect (_tmp15_, "changed", (GCallback) _configuration_editor_key_selected_cb_gtk_tree_selection_changed, self);
      _tmp16_ = gtk_builder_get_object (self->priv->ui, "key_scrolledwindow");
      _tmp17_ = _g_object_ref0 (GTK_SCROLLED_WINDOW (_tmp16_));
      _g_object_unref0 (scroll);
      scroll = _tmp17_;
      gtk_container_add ((GtkContainer*) scroll, (GtkWidget*) self->priv->key_tree_view);
      _tmp18_ = gtk_builder_get_object (self->priv->ui, "key_info_table");
      _tmp19_ = _g_object_ref0 (GTK_TABLE (_tmp18_));
      _g_object_unref0 (self->priv->key_info_table);
      self->priv->key_info_table = _tmp19_;
      _tmp20_ = gtk_builder_get_object (self->priv->ui, "schema_label");
      _tmp21_ = _g_object_ref0 (GTK_LABEL (_tmp20_));
      _g_object_unref0 (self->priv->schema_label);
      self->priv->schema_label = _tmp21_;
      _tmp22_ = gtk_builder_get_object (self->priv->ui, "summary_label");
      _tmp23_ = _g_object_ref0 (GTK_LABEL (_tmp22_));
      _g_object_unref0 (self->priv->summary_label);
      self->priv->summary_label = _tmp23_;
      _tmp24_ = gtk_builder_get_object (self->priv->ui, "description_label");
      _tmp25_ = _g_object_ref0 (GTK_LABEL (_tmp24_));
      _g_object_unref0 (self->priv->description_label);
      self->priv->description_label = _tmp25_;
      _tmp26_ = gtk_builder_get_object (self->priv->ui, "type_label");
      _tmp27_ = _g_object_ref0 (GTK_LABEL (_tmp26_));
      _g_object_unref0 (self->priv->type_label);
      self->priv->type_label = _tmp27_;
      _tmp28_ = gtk_builder_get_object (self->priv->ui, "default_label");
      _tmp29_ = _g_object_ref0 (GTK_LABEL (_tmp28_));
      _g_object_unref0 (self->priv->default_label);
      self->priv->default_label = _tmp29_;
      _tmp30_ = gtk_builder_get_object (self->priv->ui, "set_default_action");
      _tmp31_ = _g_object_ref0 (GTK_ACTION (_tmp30_));
      _g_object_unref0 (self->priv->set_default_action);
      self->priv->set_default_action = _tmp31_;
      _tmp33_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) self->priv->model, &_tmp32_);
      iter = _tmp32_;
      if (_tmp33_) {
            GtkTreeSelection* _tmp34_ = NULL;
            _tmp34_ = gtk_tree_view_get_selection (self->priv->dir_tree_view);
            gtk_tree_selection_select_iter (_tmp34_, &iter);
      }
      _g_object_unref0 (scroll);
      return self;
}


ConfigurationEditor* configuration_editor_new (void) {
      return configuration_editor_construct (TYPE_CONFIGURATION_EDITOR);
}


void configuration_editor_show (ConfigurationEditor* self) {
      g_return_if_fail (self != NULL);
      gtk_widget_show ((GtkWidget*) self->priv->window);
}


static void configuration_editor_dir_selected_cb (ConfigurationEditor* self) {
      KeyModel* key_model;
      GtkTreeIter iter = {0};
      GtkTreeSelection* _tmp0_ = NULL;
      GtkTreeIter _tmp1_ = {0};
      gboolean _tmp2_;
      gboolean _tmp7_ = FALSE;
      g_return_if_fail (self != NULL);
      key_model = NULL;
      _tmp0_ = gtk_tree_view_get_selection (self->priv->dir_tree_view);
      _tmp2_ = gtk_tree_selection_get_selected (_tmp0_, NULL, &_tmp1_);
      iter = _tmp1_;
      if (_tmp2_) {
            Directory* _tmp3_ = NULL;
            Directory* _tmp4_;
            KeyModel* _tmp5_ = NULL;
            KeyModel* _tmp6_;
            _tmp3_ = settings_model_get_directory (self->priv->model, &iter);
            _tmp4_ = _tmp3_;
            _tmp5_ = directory_get_key_model (_tmp4_);
            _tmp6_ = _g_object_ref0 (_tmp5_);
            _g_object_unref0 (key_model);
            key_model = _tmp6_;
            _g_object_unref0 (_tmp4_);
      }
      gtk_tree_view_set_model (self->priv->key_tree_view, (GtkTreeModel*) key_model);
      if (key_model != NULL) {
            GtkTreeIter _tmp8_ = {0};
            gboolean _tmp9_;
            _tmp9_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) key_model, &_tmp8_);
            iter = _tmp8_;
            _tmp7_ = _tmp9_;
      } else {
            _tmp7_ = FALSE;
      }
      if (_tmp7_) {
            GtkTreeSelection* _tmp10_ = NULL;
            _tmp10_ = gtk_tree_view_get_selection (self->priv->key_tree_view);
            gtk_tree_selection_select_iter (_tmp10_, &iter);
      }
      _g_object_unref0 (key_model);
}


static gpointer _g_variant_ref0 (gpointer self) {
      return self ? g_variant_ref (self) : NULL;
}


static gchar* configuration_editor_key_to_description (ConfigurationEditor* self, Key* key) {
      gchar* result = NULL;
      const gchar* _tmp0_;
      GQuark _tmp1_;
      static GQuark _tmp1__label0 = 0;
      static GQuark _tmp1__label1 = 0;
      static GQuark _tmp1__label2 = 0;
      static GQuark _tmp1__label3 = 0;
      static GQuark _tmp1__label4 = 0;
      static GQuark _tmp1__label5 = 0;
      static GQuark _tmp1__label6 = 0;
      static GQuark _tmp1__label7 = 0;
      static GQuark _tmp1__label8 = 0;
      static GQuark _tmp1__label9 = 0;
      static GQuark _tmp1__label10 = 0;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (key != NULL, NULL);
      _tmp0_ = key->schema->type;
      _tmp1_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
      if ((((((((_tmp1_ == ((0 != _tmp1__label0) ? _tmp1__label0 : (_tmp1__label0 = g_quark_from_static_string ("y")))) || (_tmp1_ == ((0 != _tmp1__label1) ? _tmp1__label1 : (_tmp1__label1 = g_quark_from_static_string ("n"))))) || (_tmp1_ == ((0 != _tmp1__label2) ? _tmp1__label2 : (_tmp1__label2 = g_quark_from_static_string ("q"))))) || (_tmp1_ == ((0 != _tmp1__label3) ? _tmp1__label3 : (_tmp1__label3 = g_quark_from_static_string ("i"))))) || (_tmp1_ == ((0 != _tmp1__label4) ? _tmp1__label4 : (_tmp1__label4 = g_quark_from_static_string ("u"))))) || (_tmp1_ == ((0 != _tmp1__label5) ? _tmp1__label5 : (_tmp1__label5 = g_quark_from_static_string ("x"))))) || (_tmp1_ == ((0 != _tmp1__label6) ? _tmp1__label6 : (_tmp1__label6 = g_quark_from_static_string ("t"))))) || (_tmp1_ == ((0 != _tmp1__label7) ? _tmp1__label7 : (_tmp1__label7 = g_quark_from_static_string ("d"))))) {
            switch (0) {
                  default:
                  {
                        GVariant* min = NULL;
                        GVariant* max = NULL;
                        gchar* _tmp6_ = NULL;
                        gchar* _tmp7_;
                        gchar* _tmp8_ = NULL;
                        gchar* _tmp9_;
                        gchar* _tmp10_ = NULL;
                        gchar* _tmp11_;
                        if (key->schema->range != NULL) {
                              GVariant* _tmp2_;
                              GVariant* _tmp3_;
                              _tmp2_ = _g_variant_ref0 (key->schema->range->min);
                              _g_variant_unref0 (min);
                              min = _tmp2_;
                              _tmp3_ = _g_variant_ref0 (key->schema->range->max);
                              _g_variant_unref0 (max);
                              max = _tmp3_;
                        } else {
                              GVariant* _tmp4_ = NULL;
                              GVariant* _tmp5_ = NULL;
                              _tmp4_ = key_get_min (key);
                              _g_variant_unref0 (min);
                              min = _tmp4_;
                              _tmp5_ = key_get_max (key);
                              _g_variant_unref0 (max);
                              max = _tmp5_;
                        }
                        _tmp6_ = g_variant_print (min, FALSE);
                        _tmp7_ = _tmp6_;
                        _tmp8_ = g_variant_print (max, FALSE);
                        _tmp9_ = _tmp8_;
                        _tmp10_ = g_strdup_printf ("Integer [%s..%s]", _tmp7_, _tmp9_);
                        _tmp11_ = _tmp10_;
                        _g_free0 (_tmp9_);
                        _g_free0 (_tmp7_);
                        result = _tmp11_;
                        _g_variant_unref0 (max);
                        _g_variant_unref0 (min);
                        return result;
                  }
            }
      } else if (_tmp1_ == ((0 != _tmp1__label8) ? _tmp1__label8 : (_tmp1__label8 = g_quark_from_static_string ("b")))) {
            switch (0) {
                  default:
                  {
                        gchar* _tmp12_;
                        _tmp12_ = g_strdup ("Boolean");
                        result = _tmp12_;
                        return result;
                  }
            }
      } else if (_tmp1_ == ((0 != _tmp1__label9) ? _tmp1__label9 : (_tmp1__label9 = g_quark_from_static_string ("s")))) {
            switch (0) {
                  default:
                  {
                        gchar* _tmp13_;
                        _tmp13_ = g_strdup ("String");
                        result = _tmp13_;
                        return result;
                  }
            }
      } else if (_tmp1_ == ((0 != _tmp1__label10) ? _tmp1__label10 : (_tmp1__label10 = g_quark_from_static_string ("<enum>")))) {
            switch (0) {
                  default:
                  {
                        gchar* _tmp14_;
                        _tmp14_ = g_strdup ("Enumeration");
                        result = _tmp14_;
                        return result;
                  }
            }
      } else {
            switch (0) {
                  default:
                  {
                        gchar* _tmp15_;
                        _tmp15_ = g_strdup (key->schema->type);
                        result = _tmp15_;
                        return result;
                  }
            }
      }
}


static void _configuration_editor_key_changed_cb_key_value_changed (Key* _sender, gpointer self) {
      configuration_editor_key_changed_cb (self, _sender);
}


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


static void configuration_editor_key_selected_cb (ConfigurationEditor* self) {
      GtkTreeIter iter = {0};
      GtkTreeModel* model = NULL;
      GtkTreeSelection* _tmp1_ = NULL;
      GtkTreeModel* _tmp2_ = NULL;
      GtkTreeIter _tmp3_ = {0};
      gboolean _tmp4_;
      GtkTreeModel* _tmp5_;
      gboolean _tmp8_ = FALSE;
      gchar* _tmp10_;
      gchar* schema_name;
      gchar* _tmp11_;
      gchar* summary;
      gchar* _tmp12_;
      gchar* description;
      gchar* _tmp13_;
      gchar* type;
      gchar* _tmp14_;
      gchar* default_value;
      gchar* _tmp21_ = NULL;
      gchar* _tmp22_;
      gchar* _tmp23_ = NULL;
      gchar* _tmp24_;
      g_return_if_fail (self != NULL);
      if (self->priv->selected_key != NULL) {
            guint _tmp0_;
            g_signal_parse_name ("value-changed", TYPE_KEY, &_tmp0_, NULL, FALSE);
            g_signal_handlers_disconnect_matched (self->priv->selected_key, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _configuration_editor_key_changed_cb_key_value_changed, self);
      }
      _tmp1_ = gtk_tree_view_get_selection (self->priv->key_tree_view);
      _tmp4_ = gtk_tree_selection_get_selected (_tmp1_, &_tmp2_, &_tmp3_);
      _g_object_unref0 (model);
      _tmp5_ = _g_object_ref0 (_tmp2_);
      model = _tmp5_;
      iter = _tmp3_;
      if (_tmp4_) {
            KeyModel* _tmp6_;
            KeyModel* key_model;
            Key* _tmp7_ = NULL;
            _tmp6_ = _g_object_ref0 (KEY_MODEL (model));
            key_model = _tmp6_;
            _tmp7_ = key_model_get_key (key_model, &iter);
            _g_object_unref0 (self->priv->selected_key);
            self->priv->selected_key = _tmp7_;
            _g_object_unref0 (key_model);
      } else {
            _g_object_unref0 (self->priv->selected_key);
            self->priv->selected_key = NULL;
      }
      if (self->priv->selected_key != NULL) {
            g_signal_connect (self->priv->selected_key, "value-changed", (GCallback) _configuration_editor_key_changed_cb_key_value_changed, self);
      }
      gtk_widget_set_sensitive ((GtkWidget*) self->priv->key_info_table, self->priv->selected_key != NULL);
      if (self->priv->selected_key != NULL) {
            gboolean _tmp9_;
            _tmp9_ = key_get_is_default (self->priv->selected_key);
            _tmp8_ = !_tmp9_;
      } else {
            _tmp8_ = FALSE;
      }
      gtk_action_set_sensitive (self->priv->set_default_action, _tmp8_);
      _tmp10_ = g_strdup ("");
      schema_name = _tmp10_;
      _tmp11_ = g_strdup ("");
      summary = _tmp11_;
      _tmp12_ = g_strdup ("");
      description = _tmp12_;
      _tmp13_ = g_strdup ("");
      type = _tmp13_;
      _tmp14_ = g_strdup ("");
      default_value = _tmp14_;
      if (self->priv->selected_key != NULL) {
            if (self->priv->selected_key->schema != NULL) {
                  gchar* _tmp15_;
                  gchar* _tmp18_ = NULL;
                  gchar* _tmp19_ = NULL;
                  _tmp15_ = g_strdup (self->priv->selected_key->schema->schema->id);
                  _g_free0 (schema_name);
                  schema_name = _tmp15_;
                  if (self->priv->selected_key->schema->summary != NULL) {
                        gchar* _tmp16_;
                        _tmp16_ = g_strdup (self->priv->selected_key->schema->summary);
                        _g_free0 (summary);
                        summary = _tmp16_;
                  }
                  if (self->priv->selected_key->schema->description != NULL) {
                        gchar* _tmp17_;
                        _tmp17_ = g_strdup (self->priv->selected_key->schema->description);
                        _g_free0 (description);
                        description = _tmp17_;
                  }
                  _tmp18_ = configuration_editor_key_to_description (self, self->priv->selected_key);
                  _g_free0 (type);
                  type = _tmp18_;
                  _tmp19_ = g_variant_print (self->priv->selected_key->schema->default_value, FALSE);
                  _g_free0 (default_value);
                  default_value = _tmp19_;
            } else {
                  gchar* _tmp20_;
                  _tmp20_ = g_strdup ("No schema");
                  _g_free0 (schema_name);
                  schema_name = _tmp20_;
            }
      }
      gtk_label_set_text (self->priv->schema_label, schema_name);
      _tmp21_ = string_strip (summary);
      _tmp22_ = _tmp21_;
      gtk_label_set_text (self->priv->summary_label, _tmp22_);
      _g_free0 (_tmp22_);
      _tmp23_ = string_strip (description);
      _tmp24_ = _tmp23_;
      gtk_label_set_text (self->priv->description_label, _tmp24_);
      _g_free0 (_tmp24_);
      gtk_label_set_text (self->priv->type_label, type);
      gtk_label_set_text (self->priv->default_label, default_value);
      _g_free0 (default_value);
      _g_free0 (type);
      _g_free0 (description);
      _g_free0 (summary);
      _g_free0 (schema_name);
      _g_object_unref0 (model);
}


static void configuration_editor_key_changed_cb (ConfigurationEditor* self, Key* key) {
      gboolean _tmp0_ = FALSE;
      g_return_if_fail (self != NULL);
      g_return_if_fail (key != NULL);
      if (self->priv->selected_key != NULL) {
            gboolean _tmp1_;
            _tmp1_ = key_get_is_default (self->priv->selected_key);
            _tmp0_ = !_tmp1_;
      } else {
            _tmp0_ = FALSE;
      }
      gtk_action_set_sensitive (self->priv->set_default_action, _tmp0_);
}


void G_MODULE_EXPORT set_default_cb (GtkAction* action, ConfigurationEditor* self) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (action != NULL);
      if (self->priv->selected_key == NULL) {
            return;
      }
      key_set_to_default (self->priv->selected_key);
}


gboolean G_MODULE_EXPORT main_window_configure_event_cb (GtkWidget* widget, GdkEventConfigure* event, ConfigurationEditor* self) {
      gboolean result = FALSE;
      gboolean _tmp0_;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (widget != NULL, FALSE);
      _tmp0_ = g_settings_get_boolean (self->priv->settings, "maximized");
      if (!_tmp0_) {
            g_settings_set_int (self->priv->settings, "width", (*event).width);
            g_settings_set_int (self->priv->settings, "height", (*event).height);
      }
      result = FALSE;
      return result;
}


gboolean G_MODULE_EXPORT main_window_window_state_event_cb (GtkWidget* widget, GdkEventWindowState* event, ConfigurationEditor* self) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (widget != NULL, FALSE);
      if (((*event).changed_mask & GDK_WINDOW_STATE_MAXIMIZED) != 0) {
            gboolean is_maximized;
            is_maximized = ((*event).new_window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
            g_settings_set_boolean (self->priv->settings, "maximized", is_maximized);
      }
      result = FALSE;
      return result;
}


gint configuration_editor_main (gchar** args, int args_length1) {
      gint result = 0;
      ConfigurationEditor* _tmp0_ = NULL;
      ConfigurationEditor* editor;
      gtk_init (&args_length1, &args);
      _tmp0_ = configuration_editor_new ();
      editor = _tmp0_;
      configuration_editor_show (editor);
      gtk_main ();
      result = 0;
      _configuration_editor_unref0 (editor);
      return result;
}


int main (int argc, char ** argv) {
      g_type_init ();
      return configuration_editor_main (argv, argc);
}


static void value_configuration_editor_init (GValue* value) {
      value->data[0].v_pointer = NULL;
}


static void value_configuration_editor_free_value (GValue* value) {
      if (value->data[0].v_pointer) {
            configuration_editor_unref (value->data[0].v_pointer);
      }
}


static void value_configuration_editor_copy_value (const GValue* src_value, GValue* dest_value) {
      if (src_value->data[0].v_pointer) {
            dest_value->data[0].v_pointer = configuration_editor_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


static gpointer value_configuration_editor_peek_pointer (const GValue* value) {
      return value->data[0].v_pointer;
}


static gchar* value_configuration_editor_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ConfigurationEditor* object;
            object = collect_values[0].v_pointer;
            if (object->parent_instance.g_class == NULL) {
                  return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                  return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            }
            value->data[0].v_pointer = configuration_editor_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* value_configuration_editor_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ConfigurationEditor** object_p;
      object_p = collect_values[0].v_pointer;
      if (!object_p) {
            return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
      }
      if (!value->data[0].v_pointer) {
            *object_p = NULL;
      } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
            *object_p = value->data[0].v_pointer;
      } else {
            *object_p = configuration_editor_ref (value->data[0].v_pointer);
      }
      return NULL;
}


GParamSpec* param_spec_configuration_editor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ParamSpecConfigurationEditor* spec;
      g_return_val_if_fail (g_type_is_a (object_type, TYPE_CONFIGURATION_EDITOR), NULL);
      spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
      G_PARAM_SPEC (spec)->value_type = object_type;
      return G_PARAM_SPEC (spec);
}


gpointer value_get_configuration_editor (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CONFIGURATION_EDITOR), NULL);
      return value->data[0].v_pointer;
}


void value_set_configuration_editor (GValue* value, gpointer v_object) {
      ConfigurationEditor* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CONFIGURATION_EDITOR));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_CONFIGURATION_EDITOR));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
            configuration_editor_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            configuration_editor_unref (old);
      }
}


void value_take_configuration_editor (GValue* value, gpointer v_object) {
      ConfigurationEditor* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CONFIGURATION_EDITOR));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_CONFIGURATION_EDITOR));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            configuration_editor_unref (old);
      }
}


static void configuration_editor_class_init (ConfigurationEditorClass * klass) {
      configuration_editor_parent_class = g_type_class_peek_parent (klass);
      CONFIGURATION_EDITOR_CLASS (klass)->finalize = configuration_editor_finalize;
      g_type_class_add_private (klass, sizeof (ConfigurationEditorPrivate));
}


static void configuration_editor_instance_init (ConfigurationEditor * self) {
      self->priv = CONFIGURATION_EDITOR_GET_PRIVATE (self);
      self->ref_count = 1;
}


static void configuration_editor_finalize (ConfigurationEditor* obj) {
      ConfigurationEditor * self;
      self = CONFIGURATION_EDITOR (obj);
      _g_object_unref0 (self->priv->model);
      _g_object_unref0 (self->priv->settings);
      _g_object_unref0 (self->priv->ui);
      _g_object_unref0 (self->priv->window);
      _g_object_unref0 (self->priv->dir_tree_view);
      _g_object_unref0 (self->priv->key_tree_view);
      _g_object_unref0 (self->priv->key_info_table);
      _g_object_unref0 (self->priv->schema_label);
      _g_object_unref0 (self->priv->summary_label);
      _g_object_unref0 (self->priv->description_label);
      _g_object_unref0 (self->priv->type_label);
      _g_object_unref0 (self->priv->default_label);
      _g_object_unref0 (self->priv->set_default_action);
      _g_object_unref0 (self->priv->selected_key);
}


GType configuration_editor_get_type (void) {
      static volatile gsize configuration_editor_type_id__volatile = 0;
      if (g_once_init_enter (&configuration_editor_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { value_configuration_editor_init, value_configuration_editor_free_value, value_configuration_editor_copy_value, value_configuration_editor_peek_pointer, "p", value_configuration_editor_collect_value, "p", value_configuration_editor_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (ConfigurationEditorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) configuration_editor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ConfigurationEditor), 0, (GInstanceInitFunc) configuration_editor_instance_init, &g_define_type_value_table };
            static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
            GType configuration_editor_type_id;
            configuration_editor_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ConfigurationEditor", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&configuration_editor_type_id__volatile, configuration_editor_type_id);
      }
      return configuration_editor_type_id__volatile;
}


gpointer configuration_editor_ref (gpointer instance) {
      ConfigurationEditor* self;
      self = instance;
      g_atomic_int_inc (&self->ref_count);
      return instance;
}


void configuration_editor_unref (gpointer instance) {
      ConfigurationEditor* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            CONFIGURATION_EDITOR_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}




Generated by  Doxygen 1.6.0   Back to index