Пример #1
0
static void preferences_instance_init (Preferences * self) {
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	self->priv = PREFERENCES_GET_PRIVATE (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_VARIANT, (GBoxedCopyFunc) g_variant_ref, g_variant_unref, NULL, NULL, NULL);
	self->priv->_default = (GeeMap*) _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_VARIANT, (GBoxedCopyFunc) g_variant_ref, g_variant_unref, NULL, NULL, NULL);
	self->priv->current = (GeeMap*) _tmp1_;
}
static GObject * playlists_menuitem_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	PlaylistsMenuitem * self;
	GeeHashMap* _tmp0_;
	DbusmenuMenuitem* _tmp1_;
	DbusmenuMenuitem* _tmp2_;
	const gchar* _tmp3_ = NULL;
	DbusmenuMenuitem* _tmp4_;
	parent_class = G_OBJECT_CLASS (playlists_menuitem_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = PLAYLISTS_MENUITEM (obj);
	_tmp0_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, dbusmenu_menuitem_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->current_playlists);
	self->priv->current_playlists = _tmp0_;
	_tmp1_ = dbusmenu_menuitem_new ();
	_g_object_unref0 (self->root_item);
	self->root_item = _tmp1_;
	_tmp2_ = self->root_item;
	_tmp3_ = _ ("Choose Playlist");
	dbusmenu_menuitem_property_set (_tmp2_, DBUSMENU_MENUITEM_PROP_LABEL, _tmp3_);
	_tmp4_ = self->root_item;
	dbusmenu_menuitem_property_set (_tmp4_, DBUSMENU_PLAYLIST_MENUITEM_PATH, "");
	return obj;
}
Пример #3
0
soyscenesTDSide* soy_scenes_td_side_construct (GType object_type) {
	soyscenesTDSide * self = NULL;
	GeeLinkedList* _tmp0_ = NULL;
	GeeHashMap* _tmp1_ = NULL;
	soyfieldsAccelerate* _tmp2_ = NULL;
#line 31 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	self = (soyscenesTDSide*) soy_scenes_scene_construct (object_type);
#line 32 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	_tmp0_ = gee_linked_list_new (SOY_BODIES_TYPE_BODY, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 32 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	_g_object_unref0 (self->tdbodies);
#line 32 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	self->tdbodies = _tmp0_;
#line 33 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	_tmp1_ = gee_hash_map_new (SOY_BODIES_TYPE_BODY, (GBoxedCopyFunc) g_object_ref, g_object_unref, SOY_JOINTS_TYPE_PLANE2_D, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 33 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	_g_object_unref0 (self->plane2ds);
#line 33 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	self->plane2ds = _tmp1_;
#line 35 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	_tmp2_ = soy_fields_accelerate_new (0.0f, 0.0f, 0.0f);
#line 35 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	_g_object_unref0 (self->priv->_tdgravity);
#line 35 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	self->priv->_tdgravity = _tmp2_;
#line 31 "/home/jeff/Documents/libraries/libsoy/src/scenes/TDSide.gs"
	return self;
#line 313 "TDSide.c"
}
Пример #4
0
GeeHashMap* gtk_mate_pattern_make_captures_from_plist (PListDict* pd) {
	PListDict* pcd;
	PListString* ns;
	GeeHashMap* captures;
	GeeHashMap* _tmp5;
	if (pd == NULL) {
		return gee_hash_map_new (G_TYPE_INT, NULL, NULL, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_direct_hash, g_direct_equal, g_direct_equal);
	}
	pcd = NULL;
	ns = NULL;
	captures = gee_hash_map_new (G_TYPE_INT, NULL, NULL, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_direct_hash, g_direct_equal, g_direct_equal);
	{
		gint _tmp1;
		char** s_capnum_collection;
		int s_capnum_collection_length1;
		int s_capnum_it;
		s_capnum_collection = plist_dict_keys (pd, &_tmp1);
		s_capnum_collection_length1 = _tmp1;
		for (s_capnum_it = 0; s_capnum_it < _tmp1; s_capnum_it = s_capnum_it + 1) {
			const char* _tmp4;
			char* s_capnum;
			_tmp4 = NULL;
			s_capnum = (_tmp4 = s_capnum_collection[s_capnum_it], (_tmp4 == NULL) ? NULL : g_strdup (_tmp4));
			{
				gint capnum;
				PListDict* _tmp2;
				PListString* _tmp3;
				capnum = atoi (s_capnum);
				_tmp2 = NULL;
				pcd = (_tmp2 = PLIST_DICT (plist_dict_get (pd, s_capnum)), (pcd == NULL) ? NULL : (pcd = (g_object_unref (pcd), NULL)), _tmp2);
				_tmp3 = NULL;
				ns = (_tmp3 = PLIST_STRING (plist_dict_get (pcd, "name")), (ns == NULL) ? NULL : (ns = (g_object_unref (ns), NULL)), _tmp3);
				/* stdout.printf("capture: %d, %s\n", capnum, ns.str);*/
				gee_map_set ((GeeMap*) captures, GINT_TO_POINTER (capnum), ns->str);
				s_capnum = (g_free (s_capnum), NULL);
			}
		}
		s_capnum_collection = (_vala_array_free (s_capnum_collection, s_capnum_collection_length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp5 = NULL;
	return (_tmp5 = captures, (pcd == NULL) ? NULL : (pcd = (g_object_unref (pcd), NULL)), (ns == NULL) ? NULL : (ns = (g_object_unref (ns), NULL)), _tmp5);
}
Пример #5
0
GtkMateThemeSetting* gtk_mate_theme_setting_create_from_plist (PListDict* dict) {
	GtkMateThemeSetting* tsetting;
	PListNode* nm;
	PListNode* _tmp2;
	GeeHashMap* _tmp5;
	PListDict* pd;
	GtkMateThemeSetting* _tmp9;
	g_return_val_if_fail (dict != NULL, NULL);
	tsetting = g_object_ref_sink (gtk_mate_theme_setting_new ());
	nm = plist_dict_get (dict, "name");
	if (nm != NULL) {
		char* _tmp1;
		const char* _tmp0;
		_tmp1 = NULL;
		_tmp0 = NULL;
		tsetting->name = (_tmp1 = (_tmp0 = PLIST_STRING (nm)->str, (_tmp0 == NULL) ? NULL : g_strdup (_tmp0)), tsetting->name = (g_free (tsetting->name), NULL), _tmp1);
	}
	_tmp2 = NULL;
	nm = (_tmp2 = plist_dict_get (dict, "scope"), (nm == NULL) ? NULL : (nm = (g_object_unref (nm), NULL)), _tmp2);
	if (nm != NULL) {
		char* _tmp4;
		const char* _tmp3;
		_tmp4 = NULL;
		_tmp3 = NULL;
		tsetting->selector = (_tmp4 = (_tmp3 = PLIST_STRING (nm)->str, (_tmp3 == NULL) ? NULL : g_strdup (_tmp3)), tsetting->selector = (g_free (tsetting->selector), NULL), _tmp4);
	}
	_tmp5 = NULL;
	tsetting->settings = (_tmp5 = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_str_hash, g_str_equal, g_direct_equal), (tsetting->settings == NULL) ? NULL : (tsetting->settings = (g_object_unref (tsetting->settings), NULL)), _tmp5);
	pd = PLIST_DICT (plist_dict_get (dict, "settings"));
	{
		GeeSet* _tmp6;
		GeeIterator* _tmp7;
		GeeIterator* _key_it;
		_tmp6 = NULL;
		_tmp7 = NULL;
		_key_it = (_tmp7 = gee_iterable_iterator ((GeeIterable*) (_tmp6 = gee_map_get_keys ((GeeMap*) pd->map))), (_tmp6 == NULL) ? NULL : (_tmp6 = (g_object_unref (_tmp6), NULL)), _tmp7);
		while (gee_iterator_next (_key_it)) {
			char* key;
			PListString* _tmp8;
			key = (char*) gee_iterator_get (_key_it);
			_tmp8 = NULL;
			gee_map_set ((GeeMap*) tsetting->settings, key, (_tmp8 = PLIST_STRING ((PListNode*) gee_map_get ((GeeMap*) pd->map, key)))->str);
			(_tmp8 == NULL) ? NULL : (_tmp8 = (g_object_unref (_tmp8), NULL));
			key = (g_free (key), NULL);
		}
		(_key_it == NULL) ? NULL : (_key_it = (g_object_unref (_key_it), NULL));
	}
	_tmp9 = NULL;
	return (_tmp9 = tsetting, (nm == NULL) ? NULL : (nm = (g_object_unref (nm), NULL)), (pd == NULL) ? NULL : (pd = (g_object_unref (pd), NULL)), _tmp9);
}
static void
rygel_media_export_query_container_factory_constructed (GObject *object) {
  RygelMediaExportQueryContainerFactory *self = RYGEL_MEDIA_EXPORT_QUERY_CONTAINER_FACTORY (object);

  G_OBJECT_CLASS (rygel_media_export_query_container_factory_parent_class)->constructed (object);

  self->priv->virtual_container_map = gee_hash_map_new (G_TYPE_STRING,
                                                        (GBoxedCopyFunc) g_strdup,
                                                        g_free,
                                                        G_TYPE_STRING,
                                                        (GBoxedCopyFunc) g_strdup,
                                                        g_free,
                                                        NULL, NULL, NULL, NULL,
                                                        NULL, NULL, NULL, NULL, NULL);
}
Пример #7
0
static GObject * soy_textures_bumpmap_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	soytexturesBumpmap * self;
	GeeHashMap* _tmp0_;
	parent_class = G_OBJECT_CLASS (soy_textures_bumpmap_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SOY_TEXTURES_TYPE_BUMPMAP, soytexturesBumpmap);
	_tmp0_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, SOY_ATOMS_TYPE_VECTOR, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->_texel_objs);
	self->priv->_texel_objs = _tmp0_;
	_vala_clear_GMutex (&self->priv->_mutex);
	g_mutex_init (&self->priv->_mutex);
	soy_textures_texture_set_channels ((soytexturesTexture*) self, 3);
	((soytexturesTexture*) self)->translucent = FALSE;
	return obj;
}
Пример #8
0
void gtk_mate_theme_init_for_use (GtkMateTheme* self) {
	GeeHashMap* _tmp0;
	g_return_if_fail (self != NULL);
	if (self->is_initialized) {
		return;
	}
	self->is_initialized = TRUE;
	/* stdout.printf("initializing theme for use: %s\n", name);*/
	_tmp0 = NULL;
	self->cached_setting_for_scopes = (_tmp0 = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, GTK_MATE_TYPE_THEME_SETTING, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_str_hash, g_str_equal, g_direct_equal), (self->cached_setting_for_scopes == NULL) ? NULL : (self->cached_setting_for_scopes = (g_object_unref (self->cached_setting_for_scopes), NULL)), _tmp0);
	{
		GeeIterator* _setting_it;
		_setting_it = gee_iterable_iterator ((GeeIterable*) self->settings);
		while (gee_iterator_next (_setting_it)) {
			GtkMateThemeSetting* setting;
			setting = (GtkMateThemeSetting*) gee_iterator_get (_setting_it);
			gtk_mate_theme_setting_compile_scope_matchers (setting);
			(setting == NULL) ? NULL : (setting = (g_object_unref (setting), NULL));
		}
		(_setting_it == NULL) ? NULL : (_setting_it = (g_object_unref (_setting_it), NULL));
	}
}
Пример #9
0
GtkMateTheme* gtk_mate_theme_create_from_plist (PListDict* dict) {
	GtkMateTheme* theme;
	PListNode* nm;
	PListNode* _tmp2;
	GeeHashMap* _tmp5;
	GeeArrayList* _tmp6;
	PListArray* na;
	GtkMateTheme* _tmp14;
	g_return_val_if_fail (dict != NULL, NULL);
	theme = g_object_ref_sink (gtk_mate_theme_new ());
	theme->is_initialized = FALSE;
	nm = plist_dict_get (dict, "name");
	if (nm != NULL) {
		char* _tmp1;
		const char* _tmp0;
		_tmp1 = NULL;
		_tmp0 = NULL;
		theme->name = (_tmp1 = (_tmp0 = PLIST_STRING (nm)->str, (_tmp0 == NULL) ? NULL : g_strdup (_tmp0)), theme->name = (g_free (theme->name), NULL), _tmp1);
	}
	_tmp2 = NULL;
	nm = (_tmp2 = plist_dict_get (dict, "author"), (nm == NULL) ? NULL : (nm = (g_object_unref (nm), NULL)), _tmp2);
	if (nm != NULL) {
		char* _tmp4;
		const char* _tmp3;
		_tmp4 = NULL;
		_tmp3 = NULL;
		theme->author = (_tmp4 = (_tmp3 = PLIST_STRING (nm)->str, (_tmp3 == NULL) ? NULL : g_strdup (_tmp3)), theme->author = (g_free (theme->author), NULL), _tmp4);
	}
	_tmp5 = NULL;
	theme->global_settings = (_tmp5 = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_str_hash, g_str_equal, g_direct_equal), (theme->global_settings == NULL) ? NULL : (theme->global_settings = (g_object_unref (theme->global_settings), NULL)), _tmp5);
	_tmp6 = NULL;
	theme->settings = (_tmp6 = gee_array_list_new (GTK_MATE_TYPE_THEME_SETTING, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_direct_equal), (theme->settings == NULL) ? NULL : (theme->settings = (g_object_unref (theme->settings), NULL)), _tmp6);
	na = PLIST_ARRAY (plist_dict_get (dict, "settings"));
	{
		GeeIterator* _nn_it;
		_nn_it = gee_iterable_iterator ((GeeIterable*) na->array);
		while (gee_iterator_next (_nn_it)) {
			PListNode* nn;
			PListDict* _tmp7;
			PListDict* nd;
			PListNode* _tmp8;
			gboolean _tmp9;
			nn = (PListNode*) gee_iterator_get (_nn_it);
			_tmp7 = NULL;
			nd = (_tmp7 = PLIST_DICT (nn), (_tmp7 == NULL) ? NULL : g_object_ref (_tmp7));
			_tmp8 = NULL;
			if ((_tmp9 = (_tmp8 = plist_dict_get (nd, "scope")) == NULL, (_tmp8 == NULL) ? NULL : (_tmp8 = (g_object_unref (_tmp8), NULL)), _tmp9)) {
				PListDict* gsd;
				gsd = PLIST_DICT (plist_dict_get (nd, "settings"));
				{
					gint _tmp10;
					char** key_collection;
					int key_collection_length1;
					int key_it;
					key_collection = plist_dict_keys (gsd, &_tmp10);
					key_collection_length1 = _tmp10;
					for (key_it = 0; key_it < _tmp10; key_it = key_it + 1) {
						const char* _tmp12;
						char* key;
						_tmp12 = NULL;
						key = (_tmp12 = key_collection[key_it], (_tmp12 == NULL) ? NULL : g_strdup (_tmp12));
						{
							PListString* _tmp11;
							_tmp11 = NULL;
							gee_map_set ((GeeMap*) theme->global_settings, key, (_tmp11 = PLIST_STRING (plist_dict_get (gsd, key)))->str);
							(_tmp11 == NULL) ? NULL : (_tmp11 = (g_object_unref (_tmp11), NULL));
							key = (g_free (key), NULL);
						}
					}
					key_collection = (_vala_array_free (key_collection, key_collection_length1, (GDestroyNotify) g_free), NULL);
				}
				(gsd == NULL) ? NULL : (gsd = (g_object_unref (gsd), NULL));
			} else {
				GtkMateThemeSetting* _tmp13;
				_tmp13 = NULL;
				gee_collection_add ((GeeCollection*) theme->settings, _tmp13 = gtk_mate_theme_setting_create_from_plist (nd));
				(_tmp13 == NULL) ? NULL : (_tmp13 = (g_object_unref (_tmp13), NULL));
			}
			(nn == NULL) ? NULL : (nn = (g_object_unref (nn), NULL));
			(nd == NULL) ? NULL : (nd = (g_object_unref (nd), NULL));
		}
		(_nn_it == NULL) ? NULL : (_nn_it = (g_object_unref (_nn_it), NULL));
	}
	_tmp14 = NULL;
	return (_tmp14 = theme, (nm == NULL) ? NULL : (nm = (g_object_unref (nm), NULL)), (na == NULL) ? NULL : (na = (g_object_unref (na), NULL)), _tmp14);
}
Пример #10
0
static GObject * soy_net_xmpp_agent_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	soynetXMPPAgent * self;
	GeeHashMap* _tmp0_ = NULL;
	GeeHashMap* _tmp1_ = NULL;
	GeeHashMap* _tmp2_ = NULL;
	GeeHashMap* _tmp3_ = NULL;
	GeeHashMap* _tmp4_ = NULL;
	GeeHashMap* _tmp5_ = NULL;
	GeeHashMap* _tmp6_ = NULL;
	GeeHashMap* _tmp7_ = NULL;
	GeeHashMap* _tmp8_ = NULL;
	GeeHashMap* _tmp9_ = NULL;
#line 51 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	parent_class = G_OBJECT_CLASS (soy_net_xmpp_agent_parent_class);
#line 51 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 51 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SOY_NET_TYPE_XMPP_AGENT, soynetXMPPAgent);
#line 52 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_tmp0_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 52 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_g_object_unref0 (soy_net_xmpp_agent_candidate_type_strs);
#line 52 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	soy_net_xmpp_agent_candidate_type_strs = _tmp0_;
#line 53 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_tmp1_ = soy_net_xmpp_agent_candidate_type_strs;
#line 53 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp1_, (gpointer) ((gintptr) ((gint) NICE_CANDIDATE_TYPE_HOST)), "host");
#line 54 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_tmp2_ = soy_net_xmpp_agent_candidate_type_strs;
#line 54 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp2_, (gpointer) ((gintptr) ((gint) NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE)), "srflx");
#line 55 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_tmp3_ = soy_net_xmpp_agent_candidate_type_strs;
#line 55 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, (gpointer) ((gintptr) ((gint) NICE_CANDIDATE_TYPE_PEER_REFLEXIVE)), "prflx");
#line 56 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_tmp4_ = soy_net_xmpp_agent_candidate_type_strs;
#line 56 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp4_, (gpointer) ((gintptr) ((gint) NICE_CANDIDATE_TYPE_RELAYED)), "relay");
#line 58 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_tmp5_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_INT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 58 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_g_object_unref0 (soy_net_xmpp_agent_candidate_type_dict);
#line 58 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	soy_net_xmpp_agent_candidate_type_dict = _tmp5_;
#line 59 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_tmp6_ = soy_net_xmpp_agent_candidate_type_dict;
#line 59 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp6_, "host", (gpointer) ((gintptr) ((gint) NICE_CANDIDATE_TYPE_HOST)));
#line 60 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_tmp7_ = soy_net_xmpp_agent_candidate_type_dict;
#line 60 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, "srflx", (gpointer) ((gintptr) ((gint) NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE)));
#line 61 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_tmp8_ = soy_net_xmpp_agent_candidate_type_dict;
#line 61 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp8_, "prflx", (gpointer) ((gintptr) ((gint) NICE_CANDIDATE_TYPE_PEER_REFLEXIVE)));
#line 62 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	_tmp9_ = soy_net_xmpp_agent_candidate_type_dict;
#line 62 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, "relay", (gpointer) ((gintptr) ((gint) NICE_CANDIDATE_TYPE_RELAYED)));
#line 51 "/home/jeff/Documents/libraries/libsoy/src/net/XMPPAgent.gs"
	return obj;
#line 839 "XMPPAgent.c"
}
Пример #11
0
void slingshot_backend_gmenu_entries_enumerate_apps (GeeArrayList* source, GeeHashMap* icons, gint icon_size, GeeArrayList** list) {
    GeeArrayList* _vala_list = NULL;
    GtkIconTheme* _tmp0_ = NULL;
    GtkIconTheme* _tmp1_;
    GtkIconTheme* icon_theme;
    GeeArrayList* _tmp2_;
    GError * _inner_error_ = NULL;
    g_return_if_fail (source != NULL);
    g_return_if_fail (icons != NULL);
    _tmp0_ = gtk_icon_theme_get_default ();
    _tmp1_ = _g_object_ref0 (_tmp0_);
    icon_theme = _tmp1_;
    _tmp2_ = gee_array_list_new (GEE_TYPE_HASH_MAP, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
    _g_object_unref0 (_vala_list);
    _vala_list = _tmp2_;
    {
        GeeArrayList* _tmp3_;
        GeeArrayList* _tmp4_;
        GeeArrayList* _app_list;
        GeeArrayList* _tmp5_;
        gint _tmp6_;
        gint _tmp7_;
        gint _app_size;
        gint _app_index;
        _tmp3_ = source;
        _tmp4_ = _g_object_ref0 (_tmp3_);
        _app_list = _tmp4_;
        _tmp5_ = _app_list;
        _tmp6_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp5_);
        _tmp7_ = _tmp6_;
        _app_size = _tmp7_;
        _app_index = -1;
        while (TRUE) {
            gint _tmp8_;
            gint _tmp9_;
            gint _tmp10_;
            GeeArrayList* _tmp11_;
            gint _tmp12_;
            gpointer _tmp13_ = NULL;
            GMenuTreeEntry* app;
            gboolean _tmp14_ = FALSE;
            gboolean _tmp15_ = FALSE;
            GMenuTreeEntry* _tmp16_;
            gboolean _tmp17_ = FALSE;
            gboolean _tmp20_;
            gboolean _tmp23_;
            _tmp8_ = _app_index;
            _app_index = _tmp8_ + 1;
            _tmp9_ = _app_index;
            _tmp10_ = _app_size;
            if (!(_tmp9_ < _tmp10_)) {
                break;
            }
            _tmp11_ = _app_list;
            _tmp12_ = _app_index;
            _tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, _tmp12_);
            app = (GMenuTreeEntry*) _tmp13_;
            _tmp16_ = app;
            _tmp17_ = gmenu_tree_entry_get_is_nodisplay (_tmp16_);
            if (_tmp17_ == FALSE) {
                GMenuTreeEntry* _tmp18_;
                gboolean _tmp19_ = FALSE;
                _tmp18_ = app;
                _tmp19_ = gmenu_tree_entry_get_is_excluded (_tmp18_);
                _tmp15_ = _tmp19_ == FALSE;
            } else {
                _tmp15_ = FALSE;
            }
            _tmp20_ = _tmp15_;
            if (_tmp20_) {
                GMenuTreeEntry* _tmp21_;
                const gchar* _tmp22_ = NULL;
                _tmp21_ = app;
                _tmp22_ = gmenu_tree_entry_get_icon (_tmp21_);
                _tmp14_ = _tmp22_ != NULL;
            } else {
                _tmp14_ = FALSE;
            }
            _tmp23_ = _tmp14_;
            if (_tmp23_) {
                GeeHashMap* _tmp24_;
                GeeHashMap* app_to_add;
                GeeHashMap* _tmp25_;
                GMenuTreeEntry* _tmp26_;
                const gchar* _tmp27_ = NULL;
                GeeHashMap* _tmp28_;
                GMenuTreeEntry* _tmp29_;
                const gchar* _tmp30_ = NULL;
                GeeHashMap* _tmp31_;
                GMenuTreeEntry* _tmp32_;
                const gchar* _tmp33_ = NULL;
                GeeHashMap* _tmp34_;
                GMenuTreeEntry* _tmp35_;
                const gchar* _tmp36_ = NULL;
                GeeHashMap* _tmp37_;
                GeeHashMap* _tmp38_;
                gpointer _tmp39_ = NULL;
                gchar* _tmp40_;
                gboolean _tmp41_ = FALSE;
                gboolean _tmp42_;
                GeeArrayList* _tmp102_;
                GeeHashMap* _tmp103_;
                _tmp24_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
                app_to_add = _tmp24_;
                _tmp25_ = app_to_add;
                _tmp26_ = app;
                _tmp27_ = gmenu_tree_entry_get_comment (_tmp26_);
                gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, "description", _tmp27_);
                _tmp28_ = app_to_add;
                _tmp29_ = app;
                _tmp30_ = gmenu_tree_entry_get_name (_tmp29_);
                gee_abstract_map_set ((GeeAbstractMap*) _tmp28_, "name", _tmp30_);
                _tmp31_ = app_to_add;
                _tmp32_ = app;
                _tmp33_ = gmenu_tree_entry_get_exec (_tmp32_);
                gee_abstract_map_set ((GeeAbstractMap*) _tmp31_, "command", _tmp33_);
                _tmp34_ = app_to_add;
                _tmp35_ = app;
                _tmp36_ = gmenu_tree_entry_get_desktop_file_path (_tmp35_);
                gee_abstract_map_set ((GeeAbstractMap*) _tmp34_, "desktop_file", _tmp36_);
                _tmp37_ = icons;
                _tmp38_ = app_to_add;
                _tmp39_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp38_, "command");
                _tmp40_ = (gchar*) _tmp39_;
                _tmp41_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp37_, _tmp40_);
                _tmp42_ = !_tmp41_;
                _g_free0 (_tmp40_);
                if (_tmp42_) {
                    GMenuTreeEntry* _tmp43_;
                    const gchar* _tmp44_ = NULL;
                    gchar* _tmp45_;
                    gchar* app_icon;
                    GtkIconTheme* _tmp46_;
                    const gchar* _tmp47_;
                    gboolean _tmp48_ = FALSE;
                    _tmp43_ = app;
                    _tmp44_ = gmenu_tree_entry_get_icon (_tmp43_);
                    _tmp45_ = g_strdup (_tmp44_);
                    app_icon = _tmp45_;
                    _tmp46_ = icon_theme;
                    _tmp47_ = app_icon;
                    _tmp48_ = gtk_icon_theme_has_icon (_tmp46_, _tmp47_);
                    if (_tmp48_) {
                        GtkIconTheme* _tmp49_;
                        const gchar* _tmp50_;
                        gint _tmp51_;
                        GtkIconInfo* _tmp52_ = NULL;
                        GtkIconInfo* _tmp53_;
                        GdkPixbuf* _tmp54_ = NULL;
                        GdkPixbuf* _tmp55_;
                        GdkPixbuf* _tmp56_;
                        GeeHashMap* _tmp57_;
                        GeeHashMap* _tmp58_;
                        gpointer _tmp59_ = NULL;
                        gchar* _tmp60_;
                        GdkPixbuf* _tmp61_;
                        _tmp49_ = icon_theme;
                        _tmp50_ = app_icon;
                        _tmp51_ = icon_size;
                        _tmp52_ = gtk_icon_theme_lookup_icon (_tmp49_, _tmp50_, _tmp51_, 0);
                        _tmp53_ = _tmp52_;
                        _tmp54_ = gtk_icon_info_load_icon (_tmp53_, &_inner_error_);
                        _tmp55_ = _tmp54_;
                        _gtk_icon_info_free0 (_tmp53_);
                        _tmp56_ = _tmp55_;
                        if (_inner_error_ != NULL) {
                            _g_free0 (app_icon);
                            _g_object_unref0 (app_to_add);
                            _gmenu_tree_item_unref0 (app);
                            _g_object_unref0 (_app_list);
                            _g_object_unref0 (icon_theme);
                            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;
                        }
                        _tmp57_ = icons;
                        _tmp58_ = app_to_add;
                        _tmp59_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp58_, "command");
                        _tmp60_ = (gchar*) _tmp59_;
                        _tmp61_ = _tmp56_;
                        gee_abstract_map_set ((GeeAbstractMap*) _tmp57_, _tmp60_, _tmp61_);
                        _g_object_unref0 (_tmp61_);
                        _g_free0 (_tmp60_);
                    } else {
                        const gchar* _tmp62_;
                        GFile* _tmp63_ = NULL;
                        GFile* _tmp64_;
                        gboolean _tmp65_ = FALSE;
                        gboolean _tmp66_;
                        _tmp62_ = app_icon;
                        _tmp63_ = g_file_new_for_path (_tmp62_);
                        _tmp64_ = _tmp63_;
                        _tmp65_ = g_file_query_exists (_tmp64_, NULL);
                        _tmp66_ = _tmp65_;
                        _g_object_unref0 (_tmp64_);
                        if (_tmp66_) {
                            {
                                const gchar* _tmp67_;
                                const gchar* _tmp68_ = NULL;
                                gint _tmp69_;
                                GdkPixbuf* _tmp70_;
                                GdkPixbuf* _tmp71_;
                                GeeHashMap* _tmp72_;
                                GeeHashMap* _tmp73_;
                                gpointer _tmp74_ = NULL;
                                gchar* _tmp75_;
                                GdkPixbuf* _tmp76_;
                                _tmp67_ = app_icon;
                                _tmp68_ = string_to_string (_tmp67_);
                                _tmp69_ = icon_size;
                                _tmp70_ = gdk_pixbuf_new_from_file_at_scale (_tmp68_, -1, _tmp69_, TRUE, &_inner_error_);
                                _tmp71_ = _tmp70_;
                                if (_inner_error_ != NULL) {
                                    goto __catch1_g_error;
                                }
                                _tmp72_ = icons;
                                _tmp73_ = app_to_add;
                                _tmp74_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp73_, "command");
                                _tmp75_ = (gchar*) _tmp74_;
                                _tmp76_ = _tmp71_;
                                gee_abstract_map_set ((GeeAbstractMap*) _tmp72_, _tmp75_, _tmp76_);
                                _g_object_unref0 (_tmp76_);
                                _g_free0 (_tmp75_);
                            }
                            goto __finally1;
__catch1_g_error:
                            {
                                GtkIconTheme* _tmp77_;
                                gint _tmp78_;
                                GtkIconInfo* _tmp79_ = NULL;
                                GtkIconInfo* _tmp80_;
                                GdkPixbuf* _tmp81_ = NULL;
                                GdkPixbuf* _tmp82_;
                                GdkPixbuf* _tmp83_;
                                GeeHashMap* _tmp84_;
                                GeeHashMap* _tmp85_;
                                gpointer _tmp86_ = NULL;
                                gchar* _tmp87_;
                                GdkPixbuf* _tmp88_;
                                FILE* _tmp89_;
                                g_clear_error (&_inner_error_);
                                _inner_error_ = NULL;
                                _tmp77_ = icon_theme;
                                _tmp78_ = icon_size;
                                _tmp79_ = gtk_icon_theme_lookup_icon (_tmp77_, "application-default-icon", _tmp78_, 0);
                                _tmp80_ = _tmp79_;
                                _tmp81_ = gtk_icon_info_load_icon (_tmp80_, &_inner_error_);
                                _tmp82_ = _tmp81_;
                                _gtk_icon_info_free0 (_tmp80_);
                                _tmp83_ = _tmp82_;
                                if (_inner_error_ != NULL) {
                                    goto __finally1;
                                }
                                _tmp84_ = icons;
                                _tmp85_ = app_to_add;
                                _tmp86_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp85_, "command");
                                _tmp87_ = (gchar*) _tmp86_;
                                _tmp88_ = _tmp83_;
                                gee_abstract_map_set ((GeeAbstractMap*) _tmp84_, _tmp87_, _tmp88_);
                                _g_object_unref0 (_tmp88_);
                                _g_free0 (_tmp87_);
                                _tmp89_ = stdout;
                                fprintf (_tmp89_, "Failed to load icon from file.\n");
                            }
__finally1:
                            if (_inner_error_ != NULL) {
                                _g_free0 (app_icon);
                                _g_object_unref0 (app_to_add);
                                _gmenu_tree_item_unref0 (app);
                                _g_object_unref0 (_app_list);
                                _g_object_unref0 (icon_theme);
                                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;
                            }
                        } else {
                            GtkIconTheme* _tmp90_;
                            gint _tmp91_;
                            GtkIconInfo* _tmp92_ = NULL;
                            GtkIconInfo* _tmp93_;
                            GdkPixbuf* _tmp94_ = NULL;
                            GdkPixbuf* _tmp95_;
                            GdkPixbuf* _tmp96_;
                            GeeHashMap* _tmp97_;
                            GeeHashMap* _tmp98_;
                            gpointer _tmp99_ = NULL;
                            gchar* _tmp100_;
                            GdkPixbuf* _tmp101_;
                            _tmp90_ = icon_theme;
                            _tmp91_ = icon_size;
                            _tmp92_ = gtk_icon_theme_lookup_icon (_tmp90_, "application-default-icon", _tmp91_, 0);
                            _tmp93_ = _tmp92_;
                            _tmp94_ = gtk_icon_info_load_icon (_tmp93_, &_inner_error_);
                            _tmp95_ = _tmp94_;
                            _gtk_icon_info_free0 (_tmp93_);
                            _tmp96_ = _tmp95_;
                            if (_inner_error_ != NULL) {
                                _g_free0 (app_icon);
                                _g_object_unref0 (app_to_add);
                                _gmenu_tree_item_unref0 (app);
                                _g_object_unref0 (_app_list);
                                _g_object_unref0 (icon_theme);
                                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;
                            }
                            _tmp97_ = icons;
                            _tmp98_ = app_to_add;
                            _tmp99_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp98_, "command");
                            _tmp100_ = (gchar*) _tmp99_;
                            _tmp101_ = _tmp96_;
                            gee_abstract_map_set ((GeeAbstractMap*) _tmp97_, _tmp100_, _tmp101_);
                            _g_object_unref0 (_tmp101_);
                            _g_free0 (_tmp100_);
                        }
                    }
                    _g_free0 (app_icon);
                }
                _tmp102_ = _vala_list;
                _tmp103_ = app_to_add;
                gee_abstract_collection_add ((GeeAbstractCollection*) _tmp102_, _tmp103_);
                _g_object_unref0 (app_to_add);
            }
            _gmenu_tree_item_unref0 (app);
        }
        _g_object_unref0 (_app_list);
    }
    _g_object_unref0 (icon_theme);
    if (list) {
        *list = _vala_list;
    } else {
        _g_object_unref0 (_vala_list);
    }
}
Пример #12
0
static void skk_map_file_instance_init (SkkMapFile * self) {
	GeeHashMap* _tmp0_;
	self->priv = SKK_MAP_FILE_GET_PRIVATE (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, GEE_TYPE_MAP, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	self->priv->maps = (GeeMap*) _tmp0_;
}
Пример #13
0
static void skk_map_file_load (SkkMapFile* self, const gchar* rule, const gchar* type, const gchar* name, GeeSet* included, GError** error) {
	const gchar* _tmp0_;
	SkkRuleMetadata* _tmp1_ = NULL;
	SkkRuleMetadata* metadata;
	SkkRuleMetadata* _tmp2_;
	SkkRuleMetadata* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_;
	gchar* filename;
	const gchar* _tmp13_;
	gboolean _tmp14_ = FALSE;
	JsonParser* _tmp17_;
	JsonParser* parser;
	JsonParser* _tmp30_;
	JsonNode* _tmp31_ = NULL;
	JsonNode* _tmp32_;
	JsonNode* root;
	JsonNode* _tmp33_;
	JsonNodeType _tmp34_ = 0;
	JsonNode* _tmp36_;
	JsonObject* _tmp37_ = NULL;
	JsonObject* _tmp38_;
	JsonObject* object;
	JsonNode* member = NULL;
	JsonObject* _tmp39_;
	gboolean _tmp40_ = FALSE;
	JsonObject* _tmp83_;
	gboolean _tmp84_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (rule != NULL);
	g_return_if_fail (type != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (included != NULL);
	_tmp0_ = rule;
	_tmp1_ = skk_rule_find_rule (_tmp0_);
	metadata = _tmp1_;
	_tmp2_ = metadata;
	if (_tmp2_ == NULL) {
		const gchar* _tmp3_;
		GError* _tmp4_;
		_tmp3_ = rule;
		_tmp4_ = g_error_new (SKK_RULE_PARSE_ERROR, SKK_RULE_PARSE_ERROR_FAILED, "can't find rule %s", _tmp3_);
		_inner_error_ = _tmp4_;
		if (_inner_error_->domain == SKK_RULE_PARSE_ERROR) {
			g_propagate_error (error, _inner_error_);
			_skk_rule_metadata_free0 (metadata);
			return;
		} else {
			_skk_rule_metadata_free0 (metadata);
			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;
		}
	}
	_tmp5_ = metadata;
	_tmp6_ = (*_tmp5_).base_dir;
	_tmp7_ = type;
	_tmp8_ = name;
	_tmp9_ = g_strconcat (_tmp8_, ".json", NULL);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_build_filename (_tmp6_, _tmp7_, _tmp10_, NULL);
	_tmp12_ = _tmp11_;
	_g_free0 (_tmp10_);
	filename = _tmp12_;
	_tmp13_ = filename;
	_tmp14_ = g_file_test (_tmp13_, G_FILE_TEST_EXISTS);
	if (!_tmp14_) {
		const gchar* _tmp15_;
		GError* _tmp16_;
		_tmp15_ = filename;
		_tmp16_ = g_error_new (SKK_RULE_PARSE_ERROR, SKK_RULE_PARSE_ERROR_FAILED, "no such file %s", _tmp15_);
		_inner_error_ = _tmp16_;
		if (_inner_error_->domain == SKK_RULE_PARSE_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (filename);
			_skk_rule_metadata_free0 (metadata);
			return;
		} else {
			_g_free0 (filename);
			_skk_rule_metadata_free0 (metadata);
			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;
		}
	}
	_tmp17_ = json_parser_new ();
	parser = _tmp17_;
	{
		JsonParser* _tmp18_;
		const gchar* _tmp19_;
		gboolean _tmp20_ = FALSE;
		gboolean _tmp21_;
		_tmp18_ = parser;
		_tmp19_ = filename;
		_tmp20_ = json_parser_load_from_file (_tmp18_, _tmp19_, &_inner_error_);
		_tmp21_ = _tmp20_;
		if (_inner_error_ != NULL) {
			goto __catch28_g_error;
		}
		if (!_tmp21_) {
			GError* _tmp22_;
			_tmp22_ = g_error_new_literal (SKK_RULE_PARSE_ERROR, SKK_RULE_PARSE_ERROR_FAILED, "");
			_inner_error_ = _tmp22_;
			goto __catch28_g_error;
		}
	}
	goto __finally28;
	__catch28_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp23_;
		GError* _tmp24_;
		const gchar* _tmp25_;
		gchar* _tmp26_ = NULL;
		gchar* _tmp27_;
		GError* _tmp28_;
		GError* _tmp29_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp23_ = filename;
		_tmp24_ = e;
		_tmp25_ = _tmp24_->message;
		_tmp26_ = g_strdup_printf ("can't load %s: %s", _tmp23_, _tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = g_error_new_literal (SKK_RULE_PARSE_ERROR, SKK_RULE_PARSE_ERROR_FAILED, _tmp27_);
		_tmp29_ = _tmp28_;
		_g_free0 (_tmp27_);
		_inner_error_ = _tmp29_;
		_g_error_free0 (e);
		goto __finally28;
	}
	__finally28:
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SKK_RULE_PARSE_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_object_unref0 (parser);
			_g_free0 (filename);
			_skk_rule_metadata_free0 (metadata);
			return;
		} else {
			_g_object_unref0 (parser);
			_g_free0 (filename);
			_skk_rule_metadata_free0 (metadata);
			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;
		}
	}
	_tmp30_ = parser;
	_tmp31_ = json_parser_get_root (_tmp30_);
	_tmp32_ = __vala_JsonNode_copy0 (_tmp31_);
	root = _tmp32_;
	_tmp33_ = root;
	_tmp34_ = json_node_get_node_type (_tmp33_);
	if (_tmp34_ != JSON_NODE_OBJECT) {
		GError* _tmp35_;
		_tmp35_ = g_error_new_literal (SKK_RULE_PARSE_ERROR, SKK_RULE_PARSE_ERROR_FAILED, "root element must be an object");
		_inner_error_ = _tmp35_;
		if (_inner_error_->domain == SKK_RULE_PARSE_ERROR) {
			g_propagate_error (error, _inner_error_);
			__vala_JsonNode_free0 (root);
			_g_object_unref0 (parser);
			_g_free0 (filename);
			_skk_rule_metadata_free0 (metadata);
			return;
		} else {
			__vala_JsonNode_free0 (root);
			_g_object_unref0 (parser);
			_g_free0 (filename);
			_skk_rule_metadata_free0 (metadata);
			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;
		}
	}
	_tmp36_ = root;
	_tmp37_ = json_node_get_object (_tmp36_);
	_tmp38_ = __vala_JsonObject_copy0 (_tmp37_);
	object = _tmp38_;
	_tmp39_ = object;
	_tmp40_ = json_object_has_member (_tmp39_, "include");
	if (_tmp40_) {
		JsonObject* _tmp41_;
		JsonNode* _tmp42_ = NULL;
		JsonNode* _tmp43_;
		JsonNode* _tmp44_;
		JsonNodeType _tmp45_ = 0;
		JsonNode* _tmp47_;
		JsonArray* _tmp48_ = NULL;
		JsonArray* _tmp49_;
		JsonArray* include;
		JsonArray* _tmp50_;
		GList* _tmp51_ = NULL;
		GList* elements;
		GList* _tmp52_;
		_tmp41_ = object;
		_tmp42_ = json_object_get_member (_tmp41_, "include");
		_tmp43_ = __vala_JsonNode_copy0 (_tmp42_);
		__vala_JsonNode_free0 (member);
		member = _tmp43_;
		_tmp44_ = member;
		_tmp45_ = json_node_get_node_type (_tmp44_);
		if (_tmp45_ != JSON_NODE_ARRAY) {
			GError* _tmp46_;
			_tmp46_ = g_error_new_literal (SKK_RULE_PARSE_ERROR, SKK_RULE_PARSE_ERROR_FAILED, "\"include\" element must be an array");
			_inner_error_ = _tmp46_;
			if (_inner_error_->domain == SKK_RULE_PARSE_ERROR) {
				g_propagate_error (error, _inner_error_);
				__vala_JsonNode_free0 (member);
				__vala_JsonObject_free0 (object);
				__vala_JsonNode_free0 (root);
				_g_object_unref0 (parser);
				_g_free0 (filename);
				_skk_rule_metadata_free0 (metadata);
				return;
			} else {
				__vala_JsonNode_free0 (member);
				__vala_JsonObject_free0 (object);
				__vala_JsonNode_free0 (root);
				_g_object_unref0 (parser);
				_g_free0 (filename);
				_skk_rule_metadata_free0 (metadata);
				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;
			}
		}
		_tmp47_ = member;
		_tmp48_ = json_node_get_array (_tmp47_);
		_tmp49_ = __vala_JsonArray_copy0 (_tmp48_);
		include = _tmp49_;
		_tmp50_ = include;
		_tmp51_ = json_array_get_elements (_tmp50_);
		elements = _tmp51_;
		_tmp52_ = elements;
		{
			GList* element_collection = NULL;
			GList* element_it = NULL;
			element_collection = _tmp52_;
			for (element_it = element_collection; element_it != NULL; element_it = element_it->next) {
				JsonNode* element = NULL;
				element = (JsonNode*) element_it->data;
				{
					JsonNode* _tmp53_;
					const gchar* _tmp54_ = NULL;
					gchar* _tmp55_;
					gchar* parent;
					GeeSet* _tmp56_;
					const gchar* _tmp57_;
					gboolean _tmp58_ = FALSE;
					const gchar* _tmp61_;
					gint _tmp62_ = 0;
					gint index;
					gint _tmp63_;
					GeeSet* _tmp81_;
					const gchar* _tmp82_;
					_tmp53_ = element;
					_tmp54_ = json_node_get_string (_tmp53_);
					_tmp55_ = g_strdup (_tmp54_);
					parent = _tmp55_;
					_tmp56_ = included;
					_tmp57_ = parent;
					_tmp58_ = gee_collection_contains ((GeeCollection*) _tmp56_, _tmp57_);
					if (_tmp58_) {
						const gchar* _tmp59_;
						GError* _tmp60_;
						_tmp59_ = parent;
						_tmp60_ = g_error_new (SKK_RULE_PARSE_ERROR, SKK_RULE_PARSE_ERROR_FAILED, "found circular include of %s", _tmp59_);
						_inner_error_ = _tmp60_;
						if (_inner_error_->domain == SKK_RULE_PARSE_ERROR) {
							g_propagate_error (error, _inner_error_);
							_g_free0 (parent);
							_g_list_free0 (elements);
							__vala_JsonArray_free0 (include);
							__vala_JsonNode_free0 (member);
							__vala_JsonObject_free0 (object);
							__vala_JsonNode_free0 (root);
							_g_object_unref0 (parser);
							_g_free0 (filename);
							_skk_rule_metadata_free0 (metadata);
							return;
						} else {
							_g_free0 (parent);
							_g_list_free0 (elements);
							__vala_JsonArray_free0 (include);
							__vala_JsonNode_free0 (member);
							__vala_JsonObject_free0 (object);
							__vala_JsonNode_free0 (root);
							_g_object_unref0 (parser);
							_g_free0 (filename);
							_skk_rule_metadata_free0 (metadata);
							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;
						}
					}
					_tmp61_ = parent;
					_tmp62_ = string_index_of (_tmp61_, "/", 0);
					index = _tmp62_;
					_tmp63_ = index;
					if (_tmp63_ < 0) {
						const gchar* _tmp64_;
						const gchar* _tmp65_;
						const gchar* _tmp66_;
						GeeSet* _tmp67_;
						_tmp64_ = rule;
						_tmp65_ = type;
						_tmp66_ = parent;
						_tmp67_ = included;
						skk_map_file_load (self, _tmp64_, _tmp65_, _tmp66_, _tmp67_, &_inner_error_);
						if (_inner_error_ != NULL) {
							if (_inner_error_->domain == SKK_RULE_PARSE_ERROR) {
								g_propagate_error (error, _inner_error_);
								_g_free0 (parent);
								_g_list_free0 (elements);
								__vala_JsonArray_free0 (include);
								__vala_JsonNode_free0 (member);
								__vala_JsonObject_free0 (object);
								__vala_JsonNode_free0 (root);
								_g_object_unref0 (parser);
								_g_free0 (filename);
								_skk_rule_metadata_free0 (metadata);
								return;
							} else {
								_g_free0 (parent);
								_g_list_free0 (elements);
								__vala_JsonArray_free0 (include);
								__vala_JsonNode_free0 (member);
								__vala_JsonObject_free0 (object);
								__vala_JsonNode_free0 (root);
								_g_object_unref0 (parser);
								_g_free0 (filename);
								_skk_rule_metadata_free0 (metadata);
								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;
							}
						}
					} else {
						const gchar* _tmp68_;
						gint _tmp69_;
						gchar* _tmp70_ = NULL;
						gchar* _tmp71_;
						const gchar* _tmp72_;
						const gchar* _tmp73_;
						gint _tmp74_;
						const gchar* _tmp75_;
						gint _tmp76_;
						gint _tmp77_;
						gchar* _tmp78_ = NULL;
						gchar* _tmp79_;
						GeeSet* _tmp80_;
						_tmp68_ = parent;
						_tmp69_ = index;
						_tmp70_ = string_slice (_tmp68_, (glong) 0, (glong) _tmp69_);
						_tmp71_ = _tmp70_;
						_tmp72_ = type;
						_tmp73_ = parent;
						_tmp74_ = index;
						_tmp75_ = parent;
						_tmp76_ = strlen (_tmp75_);
						_tmp77_ = _tmp76_;
						_tmp78_ = string_slice (_tmp73_, (glong) (_tmp74_ + 1), (glong) _tmp77_);
						_tmp79_ = _tmp78_;
						_tmp80_ = included;
						skk_map_file_load (self, _tmp71_, _tmp72_, _tmp79_, _tmp80_, &_inner_error_);
						_g_free0 (_tmp79_);
						_g_free0 (_tmp71_);
						if (_inner_error_ != NULL) {
							if (_inner_error_->domain == SKK_RULE_PARSE_ERROR) {
								g_propagate_error (error, _inner_error_);
								_g_free0 (parent);
								_g_list_free0 (elements);
								__vala_JsonArray_free0 (include);
								__vala_JsonNode_free0 (member);
								__vala_JsonObject_free0 (object);
								__vala_JsonNode_free0 (root);
								_g_object_unref0 (parser);
								_g_free0 (filename);
								_skk_rule_metadata_free0 (metadata);
								return;
							} else {
								_g_free0 (parent);
								_g_list_free0 (elements);
								__vala_JsonArray_free0 (include);
								__vala_JsonNode_free0 (member);
								__vala_JsonObject_free0 (object);
								__vala_JsonNode_free0 (root);
								_g_object_unref0 (parser);
								_g_free0 (filename);
								_skk_rule_metadata_free0 (metadata);
								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;
							}
						}
					}
					_tmp81_ = included;
					_tmp82_ = parent;
					gee_collection_add ((GeeCollection*) _tmp81_, _tmp82_);
					_g_free0 (parent);
				}
			}
		}
		_g_list_free0 (elements);
		__vala_JsonArray_free0 (include);
	}
	_tmp83_ = object;
	_tmp84_ = json_object_has_member (_tmp83_, "define");
	if (_tmp84_) {
		JsonObject* _tmp85_;
		JsonNode* _tmp86_ = NULL;
		JsonNode* _tmp87_;
		JsonNode* _tmp88_;
		JsonNodeType _tmp89_ = 0;
		JsonNode* _tmp91_;
		JsonObject* _tmp92_ = NULL;
		JsonObject* _tmp93_;
		JsonObject* define;
		JsonObject* _tmp94_;
		GList* _tmp95_ = NULL;
		GList* keys;
		GList* _tmp96_;
		_tmp85_ = object;
		_tmp86_ = json_object_get_member (_tmp85_, "define");
		_tmp87_ = __vala_JsonNode_copy0 (_tmp86_);
		__vala_JsonNode_free0 (member);
		member = _tmp87_;
		_tmp88_ = member;
		_tmp89_ = json_node_get_node_type (_tmp88_);
		if (_tmp89_ != JSON_NODE_OBJECT) {
			GError* _tmp90_;
			_tmp90_ = g_error_new_literal (SKK_RULE_PARSE_ERROR, SKK_RULE_PARSE_ERROR_FAILED, "\"define\" element must be an object");
			_inner_error_ = _tmp90_;
			if (_inner_error_->domain == SKK_RULE_PARSE_ERROR) {
				g_propagate_error (error, _inner_error_);
				__vala_JsonNode_free0 (member);
				__vala_JsonObject_free0 (object);
				__vala_JsonNode_free0 (root);
				_g_object_unref0 (parser);
				_g_free0 (filename);
				_skk_rule_metadata_free0 (metadata);
				return;
			} else {
				__vala_JsonNode_free0 (member);
				__vala_JsonObject_free0 (object);
				__vala_JsonNode_free0 (root);
				_g_object_unref0 (parser);
				_g_free0 (filename);
				_skk_rule_metadata_free0 (metadata);
				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;
			}
		}
		_tmp91_ = member;
		_tmp92_ = json_node_get_object (_tmp91_);
		_tmp93_ = __vala_JsonObject_copy0 (_tmp92_);
		define = _tmp93_;
		_tmp94_ = define;
		_tmp95_ = json_object_get_members (_tmp94_);
		keys = _tmp95_;
		_tmp96_ = keys;
		{
			GList* key_collection = NULL;
			GList* key_it = NULL;
			key_collection = _tmp96_;
			for (key_it = key_collection; key_it != NULL; key_it = key_it->next) {
				const gchar* key = NULL;
				key = (const gchar*) key_it->data;
				{
					GeeMap* _tmp97_;
					const gchar* _tmp98_;
					gboolean _tmp99_ = FALSE;
					JsonObject* _tmp104_;
					const gchar* _tmp105_;
					JsonNode* _tmp106_ = NULL;
					JsonNode* _tmp107_;
					JsonNode* _tmp108_;
					JsonNodeType _tmp109_ = 0;
					GeeMap* _tmp111_;
					const gchar* _tmp112_;
					gpointer _tmp113_ = NULL;
					GeeMap* _tmp114_;
					JsonNode* _tmp115_;
					JsonObject* _tmp116_ = NULL;
					_tmp97_ = self->priv->maps;
					_tmp98_ = key;
					_tmp99_ = gee_map_has_key (_tmp97_, _tmp98_);
					if (!_tmp99_) {
						GeeHashMap* _tmp100_;
						GeeHashMap* map;
						GeeMap* _tmp101_;
						const gchar* _tmp102_;
						GeeHashMap* _tmp103_;
						_tmp100_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, json_node_get_type (), (GBoxedCopyFunc) _vala_JsonNode_copy, _vala_JsonNode_free, NULL, NULL, NULL);
						map = _tmp100_;
						_tmp101_ = self->priv->maps;
						_tmp102_ = key;
						_tmp103_ = map;
						gee_map_set (_tmp101_, _tmp102_, (GeeMap*) _tmp103_);
						_g_object_unref0 (map);
					}
					_tmp104_ = define;
					_tmp105_ = key;
					_tmp106_ = json_object_get_member (_tmp104_, _tmp105_);
					_tmp107_ = __vala_JsonNode_copy0 (_tmp106_);
					__vala_JsonNode_free0 (member);
					member = _tmp107_;
					_tmp108_ = member;
					_tmp109_ = json_node_get_node_type (_tmp108_);
					if (_tmp109_ != JSON_NODE_OBJECT) {
						GError* _tmp110_;
						_tmp110_ = g_error_new_literal (SKK_RULE_PARSE_ERROR, SKK_RULE_PARSE_ERROR_FAILED, "map element must be an object");
						_inner_error_ = _tmp110_;
						if (_inner_error_->domain == SKK_RULE_PARSE_ERROR) {
							g_propagate_error (error, _inner_error_);
							_g_list_free0 (keys);
							__vala_JsonObject_free0 (define);
							__vala_JsonNode_free0 (member);
							__vala_JsonObject_free0 (object);
							__vala_JsonNode_free0 (root);
							_g_object_unref0 (parser);
							_g_free0 (filename);
							_skk_rule_metadata_free0 (metadata);
							return;
						} else {
							_g_list_free0 (keys);
							__vala_JsonObject_free0 (define);
							__vala_JsonNode_free0 (member);
							__vala_JsonObject_free0 (object);
							__vala_JsonNode_free0 (root);
							_g_object_unref0 (parser);
							_g_free0 (filename);
							_skk_rule_metadata_free0 (metadata);
							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;
						}
					}
					_tmp111_ = self->priv->maps;
					_tmp112_ = key;
					_tmp113_ = gee_map_get (_tmp111_, _tmp112_);
					_tmp114_ = (GeeMap*) _tmp113_;
					_tmp115_ = member;
					_tmp116_ = json_node_get_object (_tmp115_);
					skk_map_file_load_map (self, _tmp114_, _tmp116_);
					_g_object_unref0 (_tmp114_);
				}
			}
		}
		_g_list_free0 (keys);
		__vala_JsonObject_free0 (define);
	}
	__vala_JsonNode_free0 (member);
	__vala_JsonObject_free0 (object);
	__vala_JsonNode_free0 (root);
	_g_object_unref0 (parser);
	_g_free0 (filename);
	_skk_rule_metadata_free0 (metadata);
}
Пример #14
0
/* Loads the properties of the grammar that are required
 for parsing. Loads patterns into memory, and sets
 up possible patterns.*/
void gtk_mate_grammar_init_for_use (GtkMateGrammar* self) {
	PListNode* fsm;
	PListNode* ftm;
	GeeArrayList* _tmp2;
	GeeArrayList* _tmp3;
	PListNode* ps;
	GtkMatePattern* pattern;
	GeeHashMap* _tmp5;
	PListDict* pd;
	PListDict* pd1;
	PListNode* pa1;
	g_return_if_fail (self != NULL);
	if (self->loaded) {
		return;
	}
	self->loaded = TRUE;
	/*stdout.printf("initializing grammar for use: %s\n", name);*/
	fsm = plist_dict_get (self->priv->_plist, "foldingStartMarker");
	if (fsm != NULL) {
		OnigRx* _tmp0;
		_tmp0 = NULL;
		self->folding_start_marker = (_tmp0 = onig_rx_make1 (PLIST_STRING (fsm)->str), (self->folding_start_marker == NULL) ? NULL : (self->folding_start_marker = (g_object_unref (self->folding_start_marker), NULL)), _tmp0);
	}
	ftm = plist_dict_get (self->priv->_plist, "foldingStopMarker");
	if (ftm != NULL) {
		OnigRx* _tmp1;
		_tmp1 = NULL;
		self->folding_stop_marker = (_tmp1 = onig_rx_make1 (PLIST_STRING (ftm)->str), (self->folding_stop_marker == NULL) ? NULL : (self->folding_stop_marker = (g_object_unref (self->folding_stop_marker), NULL)), _tmp1);
	}
	_tmp2 = NULL;
	self->all_patterns = (_tmp2 = gee_array_list_new (GTK_MATE_TYPE_PATTERN, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_direct_equal), (self->all_patterns == NULL) ? NULL : (self->all_patterns = (g_object_unref (self->all_patterns), NULL)), _tmp2);
	/* stdout.printf("getting patterns\n");*/
	_tmp3 = NULL;
	self->patterns = (_tmp3 = gee_array_list_new (GTK_MATE_TYPE_PATTERN, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_direct_equal), (self->patterns == NULL) ? NULL : (self->patterns = (g_object_unref (self->patterns), NULL)), _tmp3);
	ps = plist_dict_get (self->priv->_plist, "patterns");
	pattern = NULL;
	if (ps != NULL) {
		{
			GeeIterator* _p_it;
			_p_it = gee_iterable_iterator ((GeeIterable*) PLIST_ARRAY (ps)->array);
			while (gee_iterator_next (_p_it)) {
				PListNode* p;
				GtkMatePattern* _tmp4;
				p = (PListNode*) gee_iterator_get (_p_it);
				_tmp4 = NULL;
				pattern = (_tmp4 = gtk_mate_pattern_create_from_plist (self->all_patterns, PLIST_DICT (p)), (pattern == NULL) ? NULL : (pattern = (g_object_unref (pattern), NULL)), _tmp4);
				gtk_mate_pattern_set_grammar (pattern, self);
				if (pattern != NULL) {
					gee_collection_add ((GeeCollection*) self->patterns, pattern);
				}
				(p == NULL) ? NULL : (p = (g_object_unref (p), NULL));
			}
			(_p_it == NULL) ? NULL : (_p_it = (g_object_unref (_p_it), NULL));
		}
	}
	/* stdout.printf("getting repository\n");*/
	_tmp5 = NULL;
	self->repository = (_tmp5 = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, GEE_TYPE_ARRAY_LIST, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_str_hash, g_str_equal, g_direct_equal), (self->repository == NULL) ? NULL : (self->repository = (g_object_unref (self->repository), NULL)), _tmp5);
	pd = PLIST_DICT (plist_dict_get (self->priv->_plist, "repository"));
	pd1 = NULL;
	pa1 = NULL;
	if (pd != NULL) {
		{
			GeeSet* _tmp6;
			GeeIterator* _tmp7;
			GeeIterator* _key_it;
			_tmp6 = NULL;
			_tmp7 = NULL;
			_key_it = (_tmp7 = gee_iterable_iterator ((GeeIterable*) (_tmp6 = gee_map_get_keys ((GeeMap*) pd->map))), (_tmp6 == NULL) ? NULL : (_tmp6 = (g_object_unref (_tmp6), NULL)), _tmp7);
			while (gee_iterator_next (_key_it)) {
				char* key;
				GeeArrayList* repo_array;
				PListDict* _tmp8;
				gboolean _tmp9;
				PListNode* _tmp10;
				gboolean _tmp11;
				key = (char*) gee_iterator_get (_key_it);
				/* stdout.printf("convert repo name: %s\n", key);*/
				repo_array = gee_array_list_new (GTK_MATE_TYPE_PATTERN, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_direct_equal);
				_tmp8 = NULL;
				pd1 = (_tmp8 = PLIST_DICT (plist_dict_get (pd, key)), (pd1 == NULL) ? NULL : (pd1 = (g_object_unref (pd1), NULL)), _tmp8);
				_tmp9 = FALSE;
				_tmp10 = NULL;
				if ((_tmp11 = (_tmp10 = plist_dict_get (pd1, "begin")) != NULL, (_tmp10 == NULL) ? NULL : (_tmp10 = (g_object_unref (_tmp10), NULL)), _tmp11)) {
					_tmp9 = TRUE;
				} else {
					PListNode* _tmp12;
					_tmp12 = NULL;
					_tmp9 = (_tmp12 = plist_dict_get (pd1, "match")) != NULL;
					(_tmp12 == NULL) ? NULL : (_tmp12 = (g_object_unref (_tmp12), NULL));
				}
				/* repository name can go straight to a pattern*/
				if (_tmp9) {
					GtkMatePattern* _tmp13;
					_tmp13 = NULL;
					pattern = (_tmp13 = gtk_mate_pattern_create_from_plist (self->all_patterns, PLIST_DICT (pd1)), (pattern == NULL) ? NULL : (pattern = (g_object_unref (pattern), NULL)), _tmp13);
					gtk_mate_pattern_set_grammar (pattern, self);
					if (pattern != NULL) {
						gee_collection_add ((GeeCollection*) repo_array, pattern);
					}
				} else {
					PListNode* _tmp14;
					_tmp14 = NULL;
					if ((pa1 = (_tmp14 = plist_dict_get (pd1, "patterns"), (pa1 == NULL) ? NULL : (pa1 = (g_object_unref (pa1), NULL)), _tmp14)) != NULL) {
						{
							GeeIterator* _ps1_it;
							_ps1_it = gee_iterable_iterator ((GeeIterable*) PLIST_ARRAY (pa1)->array);
							while (gee_iterator_next (_ps1_it)) {
								PListNode* ps1;
								GtkMatePattern* _tmp15;
								ps1 = (PListNode*) gee_iterator_get (_ps1_it);
								_tmp15 = NULL;
								pattern = (_tmp15 = gtk_mate_pattern_create_from_plist (self->all_patterns, PLIST_DICT (ps1)), (pattern == NULL) ? NULL : (pattern = (g_object_unref (pattern), NULL)), _tmp15);
								gtk_mate_pattern_set_grammar (pattern, self);
								if (pattern != NULL) {
									gee_collection_add ((GeeCollection*) repo_array, pattern);
								}
								(ps1 == NULL) ? NULL : (ps1 = (g_object_unref (ps1), NULL));
							}
							(_ps1_it == NULL) ? NULL : (_ps1_it = (g_object_unref (_ps1_it), NULL));
						}
					}
				}
				gee_map_set ((GeeMap*) self->repository, key, repo_array);
				key = (g_free (key), NULL);
				(repo_array == NULL) ? NULL : (repo_array = (g_object_unref (repo_array), NULL));
			}
			(_key_it == NULL) ? NULL : (_key_it = (g_object_unref (_key_it), NULL));
		}
	}
	/* stdout.printf("all_patterns: %d\n", all_patterns.size);*/
	{
		GeeIterator* _p_it;
		/* stdout.printf("all_patterns: %d\n", all_patterns.size);*/
		_p_it = gee_iterable_iterator ((GeeIterable*) self->all_patterns);
		/* stdout.printf("all_patterns: %d\n", all_patterns.size);*/
		while (gee_iterator_next (_p_it)) {
			GtkMatePattern* p;
			/* stdout.printf("all_patterns: %d\n", all_patterns.size);*/
			p = (GtkMatePattern*) gee_iterator_get (_p_it);
			if (GTK_MATE_IS_DOUBLE_PATTERN (p)) {
				gtk_mate_pattern_replace_include_patterns (GTK_MATE_DOUBLE_PATTERN (p)->patterns, self);
			}
			(p == NULL) ? NULL : (p = (g_object_unref (p), NULL));
		}
		(_p_it == NULL) ? NULL : (_p_it = (g_object_unref (_p_it), NULL));
	}
	gtk_mate_pattern_replace_include_patterns (self->patterns, self);
	(fsm == NULL) ? NULL : (fsm = (g_object_unref (fsm), NULL));
	(ftm == NULL) ? NULL : (ftm = (g_object_unref (ftm), NULL));
	(ps == NULL) ? NULL : (ps = (g_object_unref (ps), NULL));
	(pattern == NULL) ? NULL : (pattern = (g_object_unref (pattern), NULL));
	(pd == NULL) ? NULL : (pd = (g_object_unref (pd), NULL));
	(pd1 == NULL) ? NULL : (pd1 = (g_object_unref (pd1), NULL));
	(pa1 == NULL) ? NULL : (pa1 = (g_object_unref (pa1), NULL));
}