Пример #1
0
GVariant* preferences_get (Preferences* self, const gchar* name) {
	GVariant* result = NULL;
	GeeMap* _tmp0_;
	const gchar* _tmp1_;
	gpointer _tmp2_ = NULL;
	GVariant* value;
	GVariant* _tmp3_;
	GeeMap* _tmp4_;
	const gchar* _tmp5_;
	gpointer _tmp6_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = self->priv->current;
	_tmp1_ = name;
	_tmp2_ = gee_map_get (_tmp0_, _tmp1_);
	value = (GVariant*) _tmp2_;
	_tmp3_ = value;
	if (_tmp3_ != NULL) {
		result = value;
		return result;
	}
	_tmp4_ = self->priv->_default;
	_tmp5_ = name;
	_tmp6_ = gee_map_get (_tmp4_, _tmp5_);
	result = (GVariant*) _tmp6_;
	_g_variant_unref0 (value);
	return result;
}
Пример #2
0
GeeMap* skk_map_file_get (SkkMapFile* self, const gchar* name) {
	GeeMap* result = NULL;
	GeeMap* _tmp0_;
	const gchar* _tmp1_;
	gpointer _tmp2_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = self->priv->maps;
	_tmp1_ = name;
	_tmp2_ = gee_map_get (_tmp0_, _tmp1_);
	result = (GeeMap*) _tmp2_;
	return result;
}
Пример #3
0
/**
 * cinnamon_contact_system_get_individual:
 * @self: A #CinnamonContactSystem
 * @id: A #gchar with the ID of the FolksIndividual to be returned.
 *
 * Returns: (transfer full): A #FolksIndividual or NULL if @id could not be found.
 */
FolksIndividual *
cinnamon_contact_system_get_individual (CinnamonContactSystem *self,
                                     gchar              *id)
{
  GeeMap *individuals;
  gpointer key, value;

  key = (gpointer) id;

  g_return_val_if_fail (CINNAMON_IS_CONTACT_SYSTEM (self), NULL);

  individuals = folks_individual_aggregator_get_individuals (self->priv->aggregator);

  value = gee_map_get (individuals, key);

  return FOLKS_INDIVIDUAL (value);
}
Пример #4
0
/* TODO make this return multiple themes if they are identical
 (see 13.5 of Textmate manual)*/
GtkMateThemeSetting* gtk_mate_theme_settings_for_scope (GtkMateTheme* self, GtkMateScope* scope, gboolean inner, GtkMateThemeSetting* exclude_setting) {
	char* scope_name;
	GtkMateThemeSetting* cached;
	OnigMatch* current_m;
	OnigMatch* m;
	GtkMateThemeSetting* current;
	GtkMateThemeSetting* _tmp14;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (scope != NULL, NULL);
	scope_name = gtk_mate_scope_hierarchy_names (scope, inner);
	/*stdout.printf("  finding settings for '%s'\n", scope_name);*/
	cached = NULL;
	if (gee_map_contains ((GeeMap*) self->cached_setting_for_scopes, scope_name)) {
		GtkMateThemeSetting* _tmp0;
		GtkMateThemeSetting* _tmp1;
		_tmp0 = NULL;
		cached = (_tmp0 = (GtkMateThemeSetting*) gee_map_get ((GeeMap*) self->cached_setting_for_scopes, scope_name), (cached == NULL) ? NULL : (cached = (g_object_unref (cached), NULL)), _tmp0);
		_tmp1 = NULL;
		return (_tmp1 = cached, scope_name = (g_free (scope_name), NULL), _tmp1);
	}
	current_m = NULL;
	m = NULL;
	current = NULL;
	{
		GeeIterator* _setting_it;
		_setting_it = gee_iterable_iterator ((GeeIterable*) self->settings);
		while (gee_iterator_next (_setting_it)) {
			GtkMateThemeSetting* setting;
			gboolean _tmp2;
			setting = (GtkMateThemeSetting*) gee_iterator_get (_setting_it);
			_tmp2 = FALSE;
			if (setting == exclude_setting) {
				_tmp2 = exclude_setting != NULL;
			} else {
				_tmp2 = FALSE;
			}
			if (_tmp2) {
			} else {
				OnigMatch* _tmp5;
				gboolean _tmp4;
				OnigMatch* _tmp3;
				/*stdout.printf("    setting '%s' excluded due to parent\n", exclude_setting.name);*/
				_tmp5 = NULL;
				_tmp3 = NULL;
				if ((_tmp4 = gtk_mate_theme_setting_match (setting, scope_name, &_tmp3), m = (_tmp5 = _tmp3, (m == NULL) ? NULL : (m = (g_object_unref (m), NULL)), _tmp5), _tmp4)) {
					/*stdout.printf("    setting '%s' matches selector '%s'\n", setting.name, setting.selector); */
					if (current == NULL) {
						GtkMateThemeSetting* _tmp7;
						GtkMateThemeSetting* _tmp6;
						OnigMatch* _tmp9;
						OnigMatch* _tmp8;
						_tmp7 = NULL;
						_tmp6 = NULL;
						current = (_tmp7 = (_tmp6 = setting, (_tmp6 == NULL) ? NULL : g_object_ref (_tmp6)), (current == NULL) ? NULL : (current = (g_object_unref (current), NULL)), _tmp7);
						_tmp9 = NULL;
						_tmp8 = NULL;
						current_m = (_tmp9 = (_tmp8 = m, (_tmp8 == NULL) ? NULL : g_object_ref (_tmp8)), (current_m == NULL) ? NULL : (current_m = (g_object_unref (current_m), NULL)), _tmp9);
					} else {
						if (gtk_mate_matcher_compare_match (scope_name, current_m, m) < 0) {
							GtkMateThemeSetting* _tmp11;
							GtkMateThemeSetting* _tmp10;
							OnigMatch* _tmp13;
							OnigMatch* _tmp12;
							_tmp11 = NULL;
							_tmp10 = NULL;
							current = (_tmp11 = (_tmp10 = setting, (_tmp10 == NULL) ? NULL : g_object_ref (_tmp10)), (current == NULL) ? NULL : (current = (g_object_unref (current), NULL)), _tmp11);
							_tmp13 = NULL;
							_tmp12 = NULL;
							current_m = (_tmp13 = (_tmp12 = m, (_tmp12 == NULL) ? NULL : g_object_ref (_tmp12)), (current_m == NULL) ? NULL : (current_m = (g_object_unref (current_m), NULL)), _tmp13);
						}
					}
				}
			}
			(setting == NULL) ? NULL : (setting = (g_object_unref (setting), NULL));
		}
		(_setting_it == NULL) ? NULL : (_setting_it = (g_object_unref (_setting_it), NULL));
	}
	/*if (current == null) {
	stdout.printf("none match\n");
	}
	else {
	stdout.printf("    best: '%s'\n", current.name);
	}*/
	gee_map_set ((GeeMap*) self->cached_setting_for_scopes, scope_name, current);
	_tmp14 = NULL;
	return (_tmp14 = current, scope_name = (g_free (scope_name), NULL), (cached == NULL) ? NULL : (cached = (g_object_unref (cached), NULL)), (current_m == NULL) ? NULL : (current_m = (g_object_unref (current_m), NULL)), (m == NULL) ? NULL : (m = (g_object_unref (m), NULL)), _tmp14);
}
Пример #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);
}
Пример #6
0
void gtk_mate_pattern_replace_repository_includes (GeeArrayList* patlist, GtkMateGrammar* g) {
	GeeArrayList* include_patterns;
	GeeArrayList* patterns_to_include;
	gboolean any_included;
	g_return_if_fail (patlist != NULL);
	g_return_if_fail (g != NULL);
	include_patterns = gee_array_list_new (GTK_MATE_TYPE_PATTERN, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_direct_equal);
	patterns_to_include = gee_array_list_new (GTK_MATE_TYPE_PATTERN, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_direct_equal);
	any_included = TRUE;
	while (any_included) {
		/* stdout.printf("repo replacement pass\n");*/
		any_included = FALSE;
		{
			GeeIterator* _p_it;
			_p_it = gee_iterable_iterator ((GeeIterable*) patlist);
			while (gee_iterator_next (_p_it)) {
				GtkMatePattern* p;
				gboolean _tmp0;
				p = (GtkMatePattern*) gee_iterator_get (_p_it);
				_tmp0 = FALSE;
				if (GTK_MATE_IS_INCLUDE_PATTERN (p)) {
					_tmp0 = g_str_has_prefix (p->name, "#");
				} else {
					_tmp0 = FALSE;
				}
				if (_tmp0) {
					char* reponame;
					GeeArrayList* ps;
					gee_collection_add ((GeeCollection*) include_patterns, p);
					reponame = string_substring (p->name, (glong) 1, (glong) (((gint) strlen (p->name)) - 1));
					ps = (GeeArrayList*) gee_map_get ((GeeMap*) g->repository, reponame);
					/* stdout.printf("(%s) getting reponame: %s (%d)\n", this.name, reponame, ps.size);*/
					if (ps != NULL) {
						{
							GeeIterator* _p1_it;
							_p1_it = gee_iterable_iterator ((GeeIterable*) ps);
							while (gee_iterator_next (_p1_it)) {
								GtkMatePattern* p1;
								p1 = (GtkMatePattern*) gee_iterator_get (_p1_it);
								any_included = TRUE;
								gee_collection_add ((GeeCollection*) patterns_to_include, p1);
								(p1 == NULL) ? NULL : (p1 = (g_object_unref (p1), NULL));
							}
							(_p1_it == NULL) ? NULL : (_p1_it = (g_object_unref (_p1_it), NULL));
						}
					} else {
						fprintf (stdout, "warning: couldn't find repository key '%s' in grammar '%s'\n", reponame, gtk_mate_grammar_get_name (g));
					}
					reponame = (g_free (reponame), NULL);
					(ps == NULL) ? NULL : (ps = (g_object_unref (ps), NULL));
				}
				(p == NULL) ? NULL : (p = (g_object_unref (p), NULL));
			}
			(_p_it == NULL) ? NULL : (_p_it = (g_object_unref (_p_it), NULL));
		}
		gtk_mate_pattern_remove_patterns (patlist, include_patterns);
		gtk_mate_pattern_add_patterns (patlist, patterns_to_include);
		gee_collection_clear ((GeeCollection*) include_patterns);
		gee_collection_clear ((GeeCollection*) patterns_to_include);
	}
	(include_patterns == NULL) ? NULL : (include_patterns = (g_object_unref (include_patterns), NULL));
	(patterns_to_include == NULL) ? NULL : (patterns_to_include = (g_object_unref (patterns_to_include), NULL));
}
Пример #7
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);
}
static gdouble kkc_text_trigram_language_model_real_trigram_cost (KkcTrigramLanguageModel* base, KkcLanguageModelEntry* ppentry, KkcLanguageModelEntry* pentry, KkcLanguageModelEntry* entry) {
	KkcTextTrigramLanguageModel * self;
	gdouble result = 0.0;
	gchar* key = NULL;
	KkcLanguageModelEntry _tmp0_ = {0};
	guint _tmp1_ = 0U;
	KkcLanguageModelEntry _tmp2_ = {0};
	guint _tmp3_ = 0U;
	KkcLanguageModelEntry _tmp4_ = {0};
	guint _tmp5_ = 0U;
	guint* _tmp6_ = NULL;
	guint* _tmp7_ = NULL;
	gint _tmp7__length1 = 0;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	GeeMap* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	gboolean _tmp12_ = FALSE;
	self = (KkcTextTrigramLanguageModel*) base;
	g_return_val_if_fail (ppentry != NULL, 0.0);
	g_return_val_if_fail (pentry != NULL, 0.0);
	g_return_val_if_fail (entry != NULL, 0.0);
	_tmp0_ = *ppentry;
	_tmp1_ = _tmp0_.id;
	_tmp2_ = *pentry;
	_tmp3_ = _tmp2_.id;
	_tmp4_ = *entry;
	_tmp5_ = _tmp4_.id;
	_tmp6_ = g_new0 (guint, 3);
	_tmp6_[0] = _tmp1_;
	_tmp6_[1] = _tmp3_;
	_tmp6_[2] = _tmp5_;
	_tmp7_ = _tmp6_;
	_tmp7__length1 = 3;
	_tmp8_ = kkc_text_bigram_language_model_get_key ((KkcTextBigramLanguageModel*) self, _tmp7_, 3);
	_tmp9_ = _tmp8_;
	_tmp7_ = (g_free (_tmp7_), NULL);
	key = _tmp9_;
	_tmp10_ = ((KkcTextBigramLanguageModel*) self)->cost_map;
	_tmp11_ = key;
	_tmp12_ = gee_map_has_key (_tmp10_, _tmp11_);
	if (_tmp12_) {
		GeeMap* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
		gpointer _tmp15_ = NULL;
		gdouble* _tmp16_ = NULL;
		gdouble _tmp17_ = 0.0;
		_tmp13_ = ((KkcTextBigramLanguageModel*) self)->cost_map;
		_tmp14_ = key;
		_tmp15_ = gee_map_get (_tmp13_, _tmp14_);
		_tmp16_ = (gdouble*) _tmp15_;
		_tmp17_ = *_tmp16_;
		_g_free0 (_tmp16_);
		result = _tmp17_;
		_g_free0 (key);
		return result;
	}
	result = (gdouble) 0;
	_g_free0 (key);
	return result;
}
void
empathy_individual_manager_add_from_contact (EmpathyIndividualManager *self,
    EmpathyContact *contact)
{
  EmpathyIndividualManagerPriv *priv;
  FolksBackendStore *backend_store;
  FolksBackend *backend;
  FolksPersonaStore *persona_store;
  GHashTable* details;
  GeeMap *persona_stores;
  TpAccount *account;
  const gchar *store_id;

  g_return_if_fail (EMPATHY_IS_INDIVIDUAL_MANAGER (self));
  g_return_if_fail (EMPATHY_IS_CONTACT (contact));

  priv = GET_PRIV (self);

  /* We need to ref the contact since otherwise its linked TpHandle will be
   * destroyed. */
  g_object_ref (contact);

  DEBUG ("adding individual from contact %s (%s)",
      empathy_contact_get_id (contact), empathy_contact_get_alias (contact));

  account = empathy_contact_get_account (contact);
  store_id = tp_proxy_get_object_path (TP_PROXY (account));

  /* Get the persona store to use */
  backend_store = folks_backend_store_dup ();
  backend =
      folks_backend_store_dup_backend_by_name (backend_store, "telepathy");

  if (backend == NULL)
    {
      g_warning ("Failed to add individual from contact: couldn't get "
          "'telepathy' backend");
      goto finish;
    }

  persona_stores = folks_backend_get_persona_stores (backend);
  persona_store = gee_map_get (persona_stores, store_id);

  if (persona_store == NULL)
    {
      g_warning ("Failed to add individual from contact: couldn't get persona "
          "store '%s'", store_id);
      goto finish;
    }

  details = tp_asv_new (
      "contact", G_TYPE_STRING, empathy_contact_get_id (contact),
      NULL);

  folks_individual_aggregator_add_persona_from_details (
      priv->aggregator, NULL, persona_store, details,
      aggregator_add_persona_from_details_cb, contact);

  g_hash_table_unref (details);
  g_object_unref (persona_store);

finish:
  tp_clear_object (&backend);
  tp_clear_object (&backend_store);
}
Пример #10
0
static char* gtk_mate_exporter_css (GtkMateExporter* self) {
	GtkMateColourer* _tmp0_;
	GtkMateColourer* colourer;
	GString* _result_;
	char* _tmp3_;
	char* _tmp2_;
	char* _tmp1_;
	char* _tmp13_;
	char* _tmp12_;
	char* _tmp11_;
	char* _tmp10_;
	char* _tmp9_;
	char* _tmp8_;
	char* _tmp7_;
	char* _tmp6_;
	char* _tmp5_;
	char* _tmp4_;
	char* _tmp16_;
	char* _tmp15_;
	char* _tmp14_;
	char* selection_colour;
	gboolean _tmp17_;
	const char* _tmp44_;
	char* _tmp45_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = NULL;
	colourer = (_tmp0_ = gtk_mate_parser_get_colourer (GTK_MATE_BUFFER (gtk_text_view_get_buffer ((GtkTextView*) self->view))->parser), (_tmp0_ == NULL) ? NULL : g_object_ref (_tmp0_));
	_result_ = g_string_new ("");
	_tmp3_ = NULL;
	_tmp2_ = NULL;
	_tmp1_ = NULL;
	g_string_append (_result_, _tmp3_ = g_strconcat (_tmp2_ = g_strconcat ("/* Stylesheet generated from theme: ", _tmp1_ = gtk_mate_exporter_theme_name (self), NULL), " */\n\n", NULL));
	_tmp3_ = (g_free (_tmp3_), NULL);
	_tmp2_ = (g_free (_tmp2_), NULL);
	_tmp1_ = (g_free (_tmp1_), NULL);
	g_string_append (_result_, "body {\n\tmargin: 0;\n\tpadding: 0;\n}\n\n");
	g_string_append (_result_, "pre.textmate-source {\n\tmargin: 0;\n\tpadding: 0 0 0 2px;\n\tfont-family: Monaco, monospace;\n" "\tfont-size: 11px;\n\tline-height: 1.3em;\n\tword-wrap: break-word;\n\twhite-space: pre;\n" "\twhite-space: pre-wrap;\n\twhite-space: -moz-pre-wrap;\n\twhite-space: -o-pre-wrap;\n}\n\n");
	_tmp13_ = NULL;
	_tmp12_ = NULL;
	_tmp11_ = NULL;
	_tmp10_ = NULL;
	_tmp9_ = NULL;
	_tmp8_ = NULL;
	_tmp7_ = NULL;
	_tmp6_ = NULL;
	_tmp5_ = NULL;
	_tmp4_ = NULL;
	g_string_append (_result_, _tmp13_ = g_strconcat (_tmp12_ = g_strconcat (_tmp10_ = g_strconcat (_tmp9_ = g_strconcat (_tmp7_ = g_strconcat (_tmp6_ = g_strconcat (_tmp5_ = g_strconcat ("pre.textmate-source.", _tmp4_ = gtk_mate_exporter_theme_name_css (self), NULL), " {\n", NULL), "\tcolor: ", NULL), _tmp8_ = gtk_mate_colourer_global_foreground_colour (colourer), NULL), ";\n\tbackground-color: ", NULL), _tmp11_ = gtk_mate_colourer_global_background_colour (colourer), NULL), ";\n}\n\n", NULL));
	_tmp13_ = (g_free (_tmp13_), NULL);
	_tmp12_ = (g_free (_tmp12_), NULL);
	_tmp11_ = (g_free (_tmp11_), NULL);
	_tmp10_ = (g_free (_tmp10_), NULL);
	_tmp9_ = (g_free (_tmp9_), NULL);
	_tmp8_ = (g_free (_tmp8_), NULL);
	_tmp7_ = (g_free (_tmp7_), NULL);
	_tmp6_ = (g_free (_tmp6_), NULL);
	_tmp5_ = (g_free (_tmp5_), NULL);
	_tmp4_ = (g_free (_tmp4_), NULL);
	g_string_append (_result_, "pre.textmate-source .linenum {\n");
	g_string_append (_result_, "\twidth: 75px;\n");
	g_string_append (_result_, "\tpadding: 0.1em 1em 0.2em 0;\n");
	g_string_append (_result_, "\tcolor: #888;\n");
	g_string_append (_result_, "\tbackground-color: #eee;\n");
	g_string_append (_result_, "}\n\n");
	_tmp16_ = NULL;
	_tmp15_ = NULL;
	_tmp14_ = NULL;
	g_string_append (_result_, _tmp16_ = g_strconcat (_tmp15_ = g_strconcat ("pre.textmate-source.", _tmp14_ = gtk_mate_exporter_theme_name_css (self), NULL), " span {\n", NULL));
	_tmp16_ = (g_free (_tmp16_), NULL);
	_tmp15_ = (g_free (_tmp15_), NULL);
	_tmp14_ = (g_free (_tmp14_), NULL);
	g_string_append (_result_, "\tpadding-top: 0.2em;\n");
	g_string_append (_result_, "\tpadding-bottom: 0.1em;\n");
	g_string_append (_result_, "}\n\n");
	selection_colour = (char*) gee_map_get ((GeeMap*) gtk_mate_colourer_get_theme (colourer)->global_settings, "selection");
	_tmp17_ = FALSE;
	if (selection_colour != NULL) {
		_tmp17_ = _vala_strcmp0 (selection_colour, "") != 0;
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		char* _tmp20_;
		char* _tmp19_;
		char* _tmp18_;
		char* _tmp21_;
		_tmp20_ = NULL;
		_tmp19_ = NULL;
		_tmp18_ = NULL;
		g_string_append (_result_, _tmp20_ = g_strconcat (_tmp19_ = g_strconcat ("pre.textmate-source.", _tmp18_ = gtk_mate_exporter_theme_name_css (self), NULL), " ::selection {\n", NULL));
		_tmp20_ = (g_free (_tmp20_), NULL);
		_tmp19_ = (g_free (_tmp19_), NULL);
		_tmp18_ = (g_free (_tmp18_), NULL);
		_tmp21_ = NULL;
		g_string_append (_result_, _tmp21_ = gtk_mate_exporter_colour (self, selection_colour));
		_tmp21_ = (g_free (_tmp21_), NULL);
		g_string_append (_result_, "}\n\n");
	}
	{
		GeeIterator* _setting_it;
		_setting_it = gee_iterable_iterator ((GeeIterable*) gtk_mate_colourer_get_theme (colourer)->settings);
		while (gee_iterator_next (_setting_it)) {
			GtkMateThemeSetting* setting;
			char* _tmp23_;
			char* _tmp22_;
			char* _tmp34_;
			char* _tmp33_;
			char* _tmp32_;
			char* _tmp31_;
			char* _tmp30_;
			char* _tmp29_;
			char* _tmp28_;
			char* _tmp27_;
			char* _tmp26_;
			char* _tmp25_;
			char* _tmp24_;
			char* _tmp35_;
			gboolean _tmp36_;
			char* font_style;
			gboolean _tmp40_;
			gboolean _tmp41_;
			gboolean _tmp42_;
			char* bg_colour;
			setting = (GtkMateThemeSetting*) gee_iterator_get (_setting_it);
			_tmp23_ = NULL;
			_tmp22_ = NULL;
			g_string_append (_result_, _tmp23_ = g_strconcat (_tmp22_ = g_strconcat ("/* ", setting->name, NULL), " */\n", NULL));
			_tmp23_ = (g_free (_tmp23_), NULL);
			_tmp22_ = (g_free (_tmp22_), NULL);
			_tmp34_ = NULL;
			_tmp33_ = NULL;
			_tmp32_ = NULL;
			_tmp31_ = NULL;
			_tmp30_ = NULL;
			_tmp29_ = NULL;
			_tmp28_ = NULL;
			_tmp27_ = NULL;
			_tmp26_ = NULL;
			_tmp25_ = NULL;
			_tmp24_ = NULL;
			g_string_append (_result_, _tmp34_ = g_strconcat (_tmp33_ = g_strconcat (_tmp26_ = g_strconcat (_tmp25_ = g_strconcat ("pre.textmate-source.", _tmp24_ = gtk_mate_exporter_theme_name_css (self), NULL), " .", NULL), _tmp32_ = string_helper_gsub (_tmp28_ = string_helper_gsub (_tmp27_ = string_helper_gsub (setting->selector, ".", "_"), " ", " ."), ", ", _tmp31_ = g_strconcat (_tmp30_ = g_strconcat (", pre.textmate-source.", _tmp29_ = gtk_mate_exporter_theme_name_css (self), NULL), " ", NULL)), NULL), " {\n", NULL));
			_tmp34_ = (g_free (_tmp34_), NULL);
			_tmp33_ = (g_free (_tmp33_), NULL);
			_tmp32_ = (g_free (_tmp32_), NULL);
			_tmp31_ = (g_free (_tmp31_), NULL);
			_tmp30_ = (g_free (_tmp30_), NULL);
			_tmp29_ = (g_free (_tmp29_), NULL);
			_tmp28_ = (g_free (_tmp28_), NULL);
			_tmp27_ = (g_free (_tmp27_), NULL);
			_tmp26_ = (g_free (_tmp26_), NULL);
			_tmp25_ = (g_free (_tmp25_), NULL);
			_tmp24_ = (g_free (_tmp24_), NULL);
			_tmp35_ = NULL;
			if ((_tmp36_ = (_tmp35_ = (char*) gee_map_get ((GeeMap*) setting->settings, "foreground")) != NULL, _tmp35_ = (g_free (_tmp35_), NULL), _tmp36_)) {
				char* _tmp39_;
				char* _tmp38_;
				char* _tmp37_;
				_tmp39_ = NULL;
				_tmp38_ = NULL;
				_tmp37_ = NULL;
				g_string_append (_result_, _tmp39_ = g_strconcat (_tmp38_ = g_strconcat ("\tcolor: ", _tmp37_ = (char*) gee_map_get ((GeeMap*) setting->settings, "foreground"), NULL), ";\n", NULL));
				_tmp39_ = (g_free (_tmp39_), NULL);
				_tmp38_ = (g_free (_tmp38_), NULL);
				_tmp37_ = (g_free (_tmp37_), NULL);
			}
			font_style = (char*) gee_map_get ((GeeMap*) setting->settings, "fontStyle");
			_tmp40_ = FALSE;
			if (font_style != NULL) {
				_tmp40_ = strstr (font_style, "italic") != NULL;
			} else {
				_tmp40_ = FALSE;
			}
			if (_tmp40_) {
				g_string_append (_result_, "\tfont-style: italic;\n");
			}
			_tmp41_ = FALSE;
			if (font_style != NULL) {
				_tmp41_ = strstr (font_style, "underline") != NULL;
			} else {
				_tmp41_ = FALSE;
			}
			if (_tmp41_) {
				g_string_append (_result_, "\ttext-decoration: underline;\n");
			}
			_tmp42_ = FALSE;
			if (font_style != NULL) {
				_tmp42_ = strstr (font_style, "bold") != NULL;
			} else {
				_tmp42_ = FALSE;
			}
			if (_tmp42_) {
				g_string_append (_result_, "\tfont-weight: bold;\n");
			}
			bg_colour = (char*) gee_map_get ((GeeMap*) setting->settings, "background");
			if (bg_colour != NULL) {
				char* _tmp43_;
				_tmp43_ = NULL;
				g_string_append (_result_, _tmp43_ = gtk_mate_exporter_colour (self, bg_colour));
				_tmp43_ = (g_free (_tmp43_), NULL);
			}
			g_string_append (_result_, "}\n\n");
			(setting == NULL) ? NULL : (setting = (g_object_unref (setting), NULL));
			font_style = (g_free (font_style), NULL);
			bg_colour = (g_free (bg_colour), NULL);
		}
		(_setting_it == NULL) ? NULL : (_setting_it = (g_object_unref (_setting_it), NULL));
	}
	_tmp44_ = NULL;
	_tmp45_ = NULL;
	return (_tmp45_ = (_tmp44_ = _result_->str, (_tmp44_ == NULL) ? NULL : g_strdup (_tmp44_)), (colourer == NULL) ? NULL : (colourer = (g_object_unref (colourer), NULL)), (_result_ == NULL) ? NULL : (_result_ = (g_string_free (_result_, TRUE), NULL)), selection_colour = (g_free (selection_colour), NULL), _tmp45_);
}