示例#1
0
gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	Indicate* _tmp0_;
	Indicate* app;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gtk_init (&args_length1, &args);
	_tmp0_ = indicate_new ();
	app = _tmp0_;
	_tmp1_ = args;
	_tmp1__length1 = args_length1;
	if (_vala_string_array_contains (_tmp1_, _tmp1__length1, "--with-preferences")) {
		PreferencesDialog* _tmp2_;
		PreferencesDialog* dialog;
		PreferencesDialog* _tmp3_;
		Indicate* _tmp4_;
		PreferencesDialog* _tmp5_;
		_tmp2_ = preferences_dialog_new ();
		dialog = _tmp2_;
		_tmp3_ = dialog;
		_tmp4_ = app;
		g_signal_connect (_tmp3_, "preferences-update", (GCallback) _indicate_on_preferences_update_preferences_dialog_preferences_update, _tmp4_);
		_tmp5_ = dialog;
		preferences_dialog_show (_tmp5_);
		_preferences_dialog_unref0 (dialog);
	}
	gtk_main ();
	result = 0;
	_indicate_unref0 (app);
	return result;
}
GeeArrayList* settings_manager_fetch_interested (SettingsManager* self) {
	GeeArrayList* result = NULL;
	gint _tmp0_ = 0;
	gchar** _tmp1_ = NULL;
	gchar** blacklisted;
	gint blacklisted_length1;
	gint _blacklisted_size_;
	GSettings* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_ = NULL;
	gchar** interested;
	gint interested_length1;
	gint _interested_size_;
	GeeArrayList* _tmp5_;
	GeeArrayList* list;
	gchar** _tmp6_;
	gint _tmp6__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = settings_manager_fetch_blacklist (self, &_tmp0_);
	blacklisted = _tmp1_;
	blacklisted_length1 = _tmp0_;
	_blacklisted_size_ = blacklisted_length1;
	_tmp2_ = self->priv->settings;
	_tmp4_ = _tmp3_ = g_settings_get_strv (_tmp2_, "interested-media-players");
	interested = _tmp4_;
	interested_length1 = _vala_array_length (_tmp3_);
	_interested_size_ = interested_length1;
	_tmp5_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
	list = _tmp5_;
	_tmp6_ = interested;
	_tmp6__length1 = interested_length1;
	{
		gchar** s_collection = NULL;
		gint s_collection_length1 = 0;
		gint _s_collection_size_ = 0;
		gint s_it = 0;
		s_collection = _tmp6_;
		s_collection_length1 = _tmp6__length1;
		for (s_it = 0; s_it < _tmp6__length1; s_it = s_it + 1) {
			gchar* _tmp7_;
			gchar* s = NULL;
			_tmp7_ = g_strdup (s_collection[s_it]);
			s = _tmp7_;
			{
				const gchar* _tmp8_;
				GeeArrayList* _tmp10_;
				const gchar* _tmp11_;
				gboolean _tmp12_ = FALSE;
				const gchar* _tmp13_;
				gchar** _tmp14_;
				gint _tmp14__length1;
				GeeArrayList* _tmp15_;
				const gchar* _tmp16_;
				_tmp8_ = s;
				if (g_strcmp0 (_tmp8_, "banshee-1") == 0) {
					gchar* _tmp9_;
					_tmp9_ = g_strdup ("banshee");
					_g_free0 (s);
					s = _tmp9_;
				}
				_tmp10_ = list;
				_tmp11_ = s;
				_tmp12_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp10_, _tmp11_);
				if (_tmp12_) {
					_g_free0 (s);
					continue;
				}
				_tmp13_ = s;
				_tmp14_ = blacklisted;
				_tmp14__length1 = blacklisted_length1;
				if (_vala_string_array_contains (_tmp14_, _tmp14__length1, _tmp13_)) {
					_g_free0 (s);
					continue;
				}
				_tmp15_ = list;
				_tmp16_ = s;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, _tmp16_);
				_g_free0 (s);
			}
		}
	}
	result = list;
	interested = (_vala_array_free (interested, interested_length1, (GDestroyNotify) g_free), NULL);
	blacklisted = (_vala_array_free (blacklisted, blacklisted_length1, (GDestroyNotify) g_free), NULL);
	return result;
}