/* finance.c generated by valac 0.40.0.227-717ea, the Vala compiler
 * generated from finance.vala, do not modify */

/*
 * This file is part of GNOME LaTeX.
 *
 * Copyright © 2015 - Sébastien Wilmet
 *
 * GNOME LaTeX is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * GNOME LaTeX is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GNOME LaTeX.  If not, see <http://www.gnu.org/licenses/>.
 */


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

#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))



void finance_show_dialog (GtkWindow* parent_window,
                          gboolean startup);
gboolean finance_should_show_dialog_on_startup (void);
void finance_open_donate_page (GtkWidget* widget);
void finance_save_date (void);
static void _vala_array_destroy (gpointer array,
                          gint array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gint array_length,
                       GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


void
finance_show_dialog (GtkWindow* parent_window,
                     gboolean startup)
{
	gboolean _tmp0_ = FALSE;
	gchar* title = NULL;
	GtkDialog* dialog = NULL;
	const gchar* _tmp3_;
	GtkDialog* _tmp4_;
	GtkDialog* _tmp5_;
	GtkDialog* _tmp6_;
	GtkBox* content_area = NULL;
	GtkDialog* _tmp7_;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	GtkBox* _tmp10_;
	GtkBox* _tmp11_;
	GtkImage* image = NULL;
	GtkImage* _tmp12_;
	GtkImage* _tmp13_;
	GtkBox* _tmp14_;
	GtkImage* _tmp15_;
	GtkLabel* label = NULL;
	GtkLabel* _tmp16_;
	GtkLabel* _tmp17_;
	GtkBox* _tmp18_;
	GtkLabel* _tmp19_;
	GtkLabel* _tmp20_;
	GtkBox* _tmp21_;
	GtkLabel* _tmp22_;
	GtkLabel* _tmp23_;
	GtkLabel* _tmp24_;
	GtkLabel* _tmp25_;
	GtkLabel* _tmp26_;
	GtkLabel* _tmp27_;
	GtkBox* _tmp28_;
	GtkLabel* _tmp29_;
	GtkLabel* _tmp36_;
	GtkLabel* _tmp37_;
	GtkBox* _tmp38_;
	GtkLabel* _tmp39_;
	GtkCheckButton* remind_later_checkbutton = NULL;
	GtkCheckButton* _tmp40_;
	GtkCheckButton* _tmp41_;
	GtkCheckButton* _tmp42_;
	GtkCheckButton* _tmp43_;
	GtkBox* _tmp44_;
	GtkCheckButton* _tmp45_;
	GtkBox* _tmp46_;
	GtkDialog* _tmp53_;
#line 24 "finance.vala"
	g_return_if_fail (parent_window != NULL);
#line 26 "finance.vala"
	if (startup) {
#line 26 "finance.vala"
		_tmp0_ = !finance_should_show_dialog_on_startup ();
#line 113 "finance.c"
	} else {
#line 26 "finance.vala"
		_tmp0_ = FALSE;
#line 117 "finance.c"
	}
#line 26 "finance.vala"
	if (_tmp0_) {
#line 27 "finance.vala"
		return;
#line 123 "finance.c"
	}
#line 30 "finance.vala"
	if (startup) {
#line 127 "finance.c"
		gchar* _tmp1_;
#line 31 "finance.vala"
		_tmp1_ = g_strdup ("Welcome in GNOME LaTeX!");
#line 31 "finance.vala"
		_g_free0 (title);
#line 31 "finance.vala"
		title = _tmp1_;
#line 135 "finance.c"
	} else {
		gchar* _tmp2_;
#line 33 "finance.vala"
		_tmp2_ = g_strdup ("GNOME LaTeX Finance");
#line 33 "finance.vala"
		_g_free0 (title);
#line 33 "finance.vala"
		title = _tmp2_;
#line 144 "finance.c"
	}
#line 35 "finance.vala"
	_tmp3_ = title;
#line 35 "finance.vala"
	_tmp4_ = (GtkDialog*) gtk_dialog_new_with_buttons (_tmp3_, parent_window, GTK_DIALOG_DESTROY_WITH_PARENT, "_Close", GTK_RESPONSE_CLOSE, "GNOME LaTeX _Fundraising", GTK_RESPONSE_ACCEPT, NULL, NULL);
#line 35 "finance.vala"
	g_object_ref_sink (_tmp4_);
#line 35 "finance.vala"
	dialog = _tmp4_;
#line 42 "finance.vala"
	_tmp5_ = dialog;
#line 42 "finance.vala"
	gtk_window_set_resizable ((GtkWindow*) _tmp5_, FALSE);
#line 43 "finance.vala"
	_tmp6_ = dialog;
#line 43 "finance.vala"
	gtk_dialog_set_default_response (_tmp6_, (gint) GTK_RESPONSE_ACCEPT);
#line 45 "finance.vala"
	_tmp7_ = dialog;
#line 45 "finance.vala"
	_tmp8_ = gtk_dialog_get_content_area (_tmp7_);
#line 45 "finance.vala"
	content_area = _tmp8_;
#line 46 "finance.vala"
	_tmp9_ = content_area;
#line 46 "finance.vala"
	gtk_box_set_spacing (_tmp9_, 6);
#line 47 "finance.vala"
	_tmp10_ = content_area;
#line 47 "finance.vala"
	g_object_set ((GtkWidget*) _tmp10_, "margin", 12, NULL);
#line 48 "finance.vala"
	_tmp11_ = content_area;
#line 48 "finance.vala"
	gtk_widget_set_margin_top ((GtkWidget*) _tmp11_, 6);
#line 50 "finance.vala"
	_tmp12_ = (GtkImage*) gtk_image_new_from_icon_name ("gnome-latex", (GtkIconSize) GTK_ICON_SIZE_DIALOG);
#line 50 "finance.vala"
	g_object_ref_sink (_tmp12_);
#line 50 "finance.vala"
	image = _tmp12_;
#line 51 "finance.vala"
	_tmp13_ = image;
#line 51 "finance.vala"
	gtk_image_set_pixel_size (_tmp13_, 128);
#line 52 "finance.vala"
	_tmp14_ = content_area;
#line 52 "finance.vala"
	_tmp15_ = image;
#line 52 "finance.vala"
	gtk_container_add ((GtkContainer*) _tmp14_, (GtkWidget*) _tmp15_);
#line 54 "finance.vala"
	_tmp16_ = (GtkLabel*) gtk_label_new (NULL);
#line 54 "finance.vala"
	g_object_ref_sink (_tmp16_);
#line 54 "finance.vala"
	label = _tmp16_;
#line 55 "finance.vala"
	_tmp17_ = label;
#line 55 "finance.vala"
	gtk_label_set_markup (_tmp17_, "<big>Did you know...</big>");
#line 56 "finance.vala"
	_tmp18_ = content_area;
#line 56 "finance.vala"
	_tmp19_ = label;
#line 56 "finance.vala"
	gtk_container_add ((GtkContainer*) _tmp18_, (GtkWidget*) _tmp19_);
#line 58 "finance.vala"
	_tmp20_ = (GtkLabel*) gtk_label_new ("...that you can support GNOME LaTeX financially?");
#line 58 "finance.vala"
	g_object_ref_sink (_tmp20_);
#line 58 "finance.vala"
	_g_object_unref0 (label);
#line 58 "finance.vala"
	label = _tmp20_;
#line 59 "finance.vala"
	_tmp21_ = content_area;
#line 59 "finance.vala"
	_tmp22_ = label;
#line 59 "finance.vala"
	gtk_container_add ((GtkContainer*) _tmp21_, (GtkWidget*) _tmp22_);
#line 61 "finance.vala"
	_tmp23_ = (GtkLabel*) gtk_label_new (NULL);
#line 61 "finance.vala"
	g_object_ref_sink (_tmp23_);
#line 61 "finance.vala"
	_g_object_unref0 (label);
#line 61 "finance.vala"
	label = _tmp23_;
#line 62 "finance.vala"
	_tmp24_ = label;
#line 62 "finance.vala"
	gtk_label_set_markup (_tmp24_, "GNOME LaTeX is a Free/<i>Libre</i> LaTeX editor and comes" " free of charge. But if you appreciate this software, you are encourag" \
"ed" " to make a donation to help its future development.");
#line 65 "finance.vala"
	_tmp25_ = label;
#line 65 "finance.vala"
	gtk_label_set_max_width_chars (_tmp25_, 60);
#line 66 "finance.vala"
	_tmp26_ = label;
#line 66 "finance.vala"
	gtk_label_set_line_wrap (_tmp26_, TRUE);
#line 67 "finance.vala"
	_tmp27_ = label;
#line 67 "finance.vala"
	gtk_label_set_xalign (_tmp27_, (gfloat) 0);
#line 68 "finance.vala"
	_tmp28_ = content_area;
#line 68 "finance.vala"
	_tmp29_ = label;
#line 68 "finance.vala"
	gtk_container_add ((GtkContainer*) _tmp28_, (GtkWidget*) _tmp29_);
#line 70 "finance.vala"
	if (startup) {
#line 258 "finance.c"
		GtkLabel* _tmp30_;
		GtkLabel* _tmp31_;
		GtkLabel* _tmp32_;
		GtkLabel* _tmp33_;
		GtkBox* _tmp34_;
		GtkLabel* _tmp35_;
#line 72 "finance.vala"
		_tmp30_ = (GtkLabel*) gtk_label_new ("You can see again this information at any time by going to the Help me" \
"nu.");
#line 72 "finance.vala"
		g_object_ref_sink (_tmp30_);
#line 72 "finance.vala"
		_g_object_unref0 (label);
#line 72 "finance.vala"
		label = _tmp30_;
#line 73 "finance.vala"
		_tmp31_ = label;
#line 73 "finance.vala"
		gtk_label_set_max_width_chars (_tmp31_, 60);
#line 74 "finance.vala"
		_tmp32_ = label;
#line 74 "finance.vala"
		gtk_label_set_line_wrap (_tmp32_, TRUE);
#line 75 "finance.vala"
		_tmp33_ = label;
#line 75 "finance.vala"
		gtk_label_set_xalign (_tmp33_, (gfloat) 0);
#line 76 "finance.vala"
		_tmp34_ = content_area;
#line 76 "finance.vala"
		_tmp35_ = label;
#line 76 "finance.vala"
		gtk_container_add ((GtkContainer*) _tmp34_, (GtkWidget*) _tmp35_);
#line 291 "finance.c"
	}
#line 79 "finance.vala"
	_tmp36_ = (GtkLabel*) gtk_label_new ("Thanks!");
#line 79 "finance.vala"
	g_object_ref_sink (_tmp36_);
#line 79 "finance.vala"
	_g_object_unref0 (label);
#line 79 "finance.vala"
	label = _tmp36_;
#line 80 "finance.vala"
	_tmp37_ = label;
#line 80 "finance.vala"
	gtk_label_set_xalign (_tmp37_, (gfloat) 0);
#line 81 "finance.vala"
	_tmp38_ = content_area;
#line 81 "finance.vala"
	_tmp39_ = label;
#line 81 "finance.vala"
	gtk_container_add ((GtkContainer*) _tmp38_, (GtkWidget*) _tmp39_);
#line 83 "finance.vala"
	_tmp40_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic ("_Remind me later (in one month)");
#line 83 "finance.vala"
	g_object_ref_sink (_tmp40_);
#line 83 "finance.vala"
	remind_later_checkbutton = _tmp40_;
#line 86 "finance.vala"
	_tmp41_ = remind_later_checkbutton;
#line 86 "finance.vala"
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp41_, FALSE);
#line 87 "finance.vala"
	_tmp42_ = remind_later_checkbutton;
#line 87 "finance.vala"
	gtk_widget_set_margin_top ((GtkWidget*) _tmp42_, 12);
#line 88 "finance.vala"
	_tmp43_ = remind_later_checkbutton;
#line 88 "finance.vala"
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp43_, 6);
#line 90 "finance.vala"
	_tmp44_ = content_area;
#line 90 "finance.vala"
	_tmp45_ = remind_later_checkbutton;
#line 90 "finance.vala"
	gtk_container_add ((GtkContainer*) _tmp44_, (GtkWidget*) _tmp45_);
#line 91 "finance.vala"
	_tmp46_ = content_area;
#line 91 "finance.vala"
	gtk_widget_show_all ((GtkWidget*) _tmp46_);
#line 93 "finance.vala"
	while (TRUE) {
#line 341 "finance.c"
		gint response = 0;
		GtkDialog* _tmp47_;
		gint _tmp48_;
		GSettings* settings = NULL;
		GSettings* _tmp50_;
		GSettings* _tmp51_;
		GtkCheckButton* _tmp52_;
#line 95 "finance.vala"
		_tmp47_ = dialog;
#line 95 "finance.vala"
		response = gtk_dialog_run (_tmp47_);
#line 97 "finance.vala"
		_tmp48_ = response;
#line 97 "finance.vala"
		if (_tmp48_ == ((gint) GTK_RESPONSE_ACCEPT)) {
#line 357 "finance.c"
			GtkDialog* _tmp49_;
#line 99 "finance.vala"
			_tmp49_ = dialog;
#line 99 "finance.vala"
			finance_open_donate_page ((GtkWidget*) _tmp49_);
#line 100 "finance.vala"
			continue;
#line 365 "finance.c"
		}
#line 103 "finance.vala"
		_tmp50_ = g_settings_new ("org.gnome.gnome-latex.state.dialogs.finance");
#line 103 "finance.vala"
		settings = _tmp50_;
#line 106 "finance.vala"
		_tmp51_ = settings;
#line 106 "finance.vala"
		_tmp52_ = remind_later_checkbutton;
#line 106 "finance.vala"
		g_settings_set_boolean (_tmp51_, "remind-later", gtk_toggle_button_get_active ((GtkToggleButton*) _tmp52_));
#line 107 "finance.vala"
		_g_object_unref0 (settings);
#line 107 "finance.vala"
		break;
#line 381 "finance.c"
	}
#line 110 "finance.vala"
	_tmp53_ = dialog;
#line 110 "finance.vala"
	gtk_widget_destroy ((GtkWidget*) _tmp53_);
#line 111 "finance.vala"
	finance_save_date ();
#line 24 "finance.vala"
	_g_object_unref0 (remind_later_checkbutton);
#line 24 "finance.vala"
	_g_object_unref0 (label);
#line 24 "finance.vala"
	_g_object_unref0 (image);
#line 24 "finance.vala"
	_g_object_unref0 (dialog);
#line 24 "finance.vala"
	_g_free0 (title);
#line 399 "finance.c"
}


gboolean
finance_should_show_dialog_on_startup (void)
{
	gboolean result = FALSE;
	GSettings* settings = NULL;
	GSettings* _tmp0_;
	gchar* date = NULL;
	GSettings* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	GSettings* _tmp4_;
#line 116 "finance.vala"
	_tmp0_ = g_settings_new ("org.gnome.gnome-latex.state.dialogs.finance");
#line 116 "finance.vala"
	settings = _tmp0_;
#line 119 "finance.vala"
	_tmp1_ = settings;
#line 119 "finance.vala"
	_tmp2_ = g_settings_get_string (_tmp1_, "last-shown-date");
#line 119 "finance.vala"
	date = _tmp2_;
#line 121 "finance.vala"
	_tmp3_ = date;
#line 121 "finance.vala"
	if (g_strcmp0 (_tmp3_, "") == 0) {
#line 122 "finance.vala"
		result = TRUE;
#line 122 "finance.vala"
		_g_free0 (date);
#line 122 "finance.vala"
		_g_object_unref0 (settings);
#line 122 "finance.vala"
		return result;
#line 436 "finance.c"
	}
#line 124 "finance.vala"
	_tmp4_ = settings;
#line 124 "finance.vala"
	if (g_settings_get_boolean (_tmp4_, "remind-later")) {
#line 442 "finance.c"
		gchar** ymd = NULL;
		const gchar* _tmp5_;
		gchar** _tmp6_;
		gchar** _tmp7_;
		gint ymd_length1;
		gint _ymd_size_;
		gchar** _tmp8_;
		gint _tmp8__length1;
		gint year = 0;
		gchar** _tmp9_;
		gint _tmp9__length1;
		const gchar* _tmp10_;
		gint month = 0;
		gchar** _tmp11_;
		gint _tmp11__length1;
		const gchar* _tmp12_;
		gint day = 0;
		gchar** _tmp13_;
		gint _tmp13__length1;
		const gchar* _tmp14_;
		GDateTime* last_time = NULL;
		gint _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		GDateTime* _tmp18_;
		GDateTime* cur_time = NULL;
		GDateTime* _tmp19_;
		GDateTime* time_limit = NULL;
		GDateTime* _tmp20_;
		GDateTime* _tmp21_;
		GDateTime* _tmp22_;
		GDateTime* _tmp23_;
#line 126 "finance.vala"
		_tmp5_ = date;
#line 126 "finance.vala"
		_tmp7_ = _tmp6_ = g_strsplit (_tmp5_, "-", 0);
#line 126 "finance.vala"
		ymd = _tmp7_;
#line 126 "finance.vala"
		ymd_length1 = _vala_array_length (_tmp6_);
#line 126 "finance.vala"
		_ymd_size_ = ymd_length1;
#line 127 "finance.vala"
		_tmp8_ = ymd;
#line 127 "finance.vala"
		_tmp8__length1 = ymd_length1;
#line 127 "finance.vala"
		if (_tmp8__length1 != 3) {
#line 128 "finance.vala"
			result = FALSE;
#line 128 "finance.vala"
			ymd = (_vala_array_free (ymd, ymd_length1, (GDestroyNotify) g_free), NULL);
#line 128 "finance.vala"
			_g_free0 (date);
#line 128 "finance.vala"
			_g_object_unref0 (settings);
#line 128 "finance.vala"
			return result;
#line 501 "finance.c"
		}
#line 130 "finance.vala"
		_tmp9_ = ymd;
#line 130 "finance.vala"
		_tmp9__length1 = ymd_length1;
#line 130 "finance.vala"
		_tmp10_ = _tmp9_[0];
#line 130 "finance.vala"
		year = atoi (_tmp10_);
#line 131 "finance.vala"
		_tmp11_ = ymd;
#line 131 "finance.vala"
		_tmp11__length1 = ymd_length1;
#line 131 "finance.vala"
		_tmp12_ = _tmp11_[1];
#line 131 "finance.vala"
		month = atoi (_tmp12_);
#line 132 "finance.vala"
		_tmp13_ = ymd;
#line 132 "finance.vala"
		_tmp13__length1 = ymd_length1;
#line 132 "finance.vala"
		_tmp14_ = _tmp13_[2];
#line 132 "finance.vala"
		day = atoi (_tmp14_);
#line 134 "finance.vala"
		_tmp15_ = year;
#line 134 "finance.vala"
		_tmp16_ = month;
#line 134 "finance.vala"
		_tmp17_ = day;
#line 134 "finance.vala"
		_tmp18_ = g_date_time_new_utc (_tmp15_, _tmp16_, _tmp17_, 0, 0, (gdouble) 0);
#line 134 "finance.vala"
		last_time = _tmp18_;
#line 135 "finance.vala"
		_tmp19_ = g_date_time_new_now_utc ();
#line 135 "finance.vala"
		cur_time = _tmp19_;
#line 138 "finance.vala"
		_tmp20_ = last_time;
#line 138 "finance.vala"
		_tmp21_ = g_date_time_add_months (_tmp20_, 1);
#line 138 "finance.vala"
		time_limit = _tmp21_;
#line 140 "finance.vala"
		_tmp22_ = time_limit;
#line 140 "finance.vala"
		_tmp23_ = cur_time;
#line 140 "finance.vala"
		if (g_date_time_compare (_tmp22_, _tmp23_) <= 0) {
#line 141 "finance.vala"
			result = TRUE;
#line 141 "finance.vala"
			_g_date_time_unref0 (time_limit);
#line 141 "finance.vala"
			_g_date_time_unref0 (cur_time);
#line 141 "finance.vala"
			_g_date_time_unref0 (last_time);
#line 141 "finance.vala"
			ymd = (_vala_array_free (ymd, ymd_length1, (GDestroyNotify) g_free), NULL);
#line 141 "finance.vala"
			_g_free0 (date);
#line 141 "finance.vala"
			_g_object_unref0 (settings);
#line 141 "finance.vala"
			return result;
#line 569 "finance.c"
		}
#line 124 "finance.vala"
		_g_date_time_unref0 (time_limit);
#line 124 "finance.vala"
		_g_date_time_unref0 (cur_time);
#line 124 "finance.vala"
		_g_date_time_unref0 (last_time);
#line 124 "finance.vala"
		ymd = (_vala_array_free (ymd, ymd_length1, (GDestroyNotify) g_free), NULL);
#line 579 "finance.c"
	}
#line 144 "finance.vala"
	result = FALSE;
#line 144 "finance.vala"
	_g_free0 (date);
#line 144 "finance.vala"
	_g_object_unref0 (settings);
#line 144 "finance.vala"
	return result;
#line 589 "finance.c"
}


void
finance_save_date (void)
{
	GSettings* settings = NULL;
	GSettings* _tmp0_;
	GDateTime* time = NULL;
	GDateTime* _tmp1_;
	gchar* date = NULL;
	gchar* _tmp2_;
#line 149 "finance.vala"
	_tmp0_ = g_settings_new ("org.gnome.gnome-latex.state.dialogs.finance");
#line 149 "finance.vala"
	settings = _tmp0_;
#line 152 "finance.vala"
	_tmp1_ = g_date_time_new_now_utc ();
#line 152 "finance.vala"
	time = _tmp1_;
#line 153 "finance.vala"
	_tmp2_ = g_strdup_printf ("%d-%d-%d", g_date_time_get_year (time), g_date_time_get_month (time), g_date_time_get_day_of_month (time));
#line 153 "finance.vala"
	date = _tmp2_;
#line 156 "finance.vala"
	g_settings_set_string (settings, "last-shown-date", date);
#line 147 "finance.vala"
	_g_free0 (date);
#line 147 "finance.vala"
	_g_date_time_unref0 (time);
#line 147 "finance.vala"
	_g_object_unref0 (settings);
#line 622 "finance.c"
}


void
finance_open_donate_page (GtkWidget* widget)
{
	GError * _inner_error_ = NULL;
#line 159 "finance.vala"
	g_return_if_fail (widget != NULL);
#line 632 "finance.c"
	{
		gchar* uri = NULL;
		gchar* _tmp0_;
#line 163 "finance.vala"
		_tmp0_ = g_strdup ("https://liberapay.com/GNOME-LaTeX/");
#line 163 "finance.vala"
		uri = _tmp0_;
#line 164 "finance.vala"
		latexila_utils_show_uri (widget, uri, (guint32) GDK_CURRENT_TIME, &_inner_error_);
#line 164 "finance.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 164 "finance.vala"
			_g_free0 (uri);
#line 646 "finance.c"
			goto __catch25_g_error;
		}
#line 161 "finance.vala"
		_g_free0 (uri);
#line 651 "finance.c"
	}
	goto __finally25;
	__catch25_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
#line 161 "finance.vala"
		e = _inner_error_;
#line 161 "finance.vala"
		_inner_error_ = NULL;
#line 168 "finance.vala"
		_tmp1_ = e;
#line 168 "finance.vala"
		_tmp2_ = _tmp1_->message;
#line 168 "finance.vala"
		g_warning ("finance.vala:168: Impossible to open the donate page: %s", _tmp2_);
#line 161 "finance.vala"
		_g_error_free0 (e);
#line 671 "finance.c"
	}
	__finally25:
#line 161 "finance.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 161 "finance.vala"
		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);
#line 161 "finance.vala"
		g_clear_error (&_inner_error_);
#line 161 "finance.vala"
		return;
#line 682 "finance.c"
	}
}


static void
_vala_array_destroy (gpointer array,
                     gint array_length,
                     GDestroyNotify destroy_func)
{
#line 27 "build_tools_preferences.vala"
	if ((array != NULL) && (destroy_func != NULL)) {
#line 694 "finance.c"
		int i;
#line 27 "build_tools_preferences.vala"
		for (i = 0; i < array_length; i = i + 1) {
#line 27 "build_tools_preferences.vala"
			if (((gpointer*) array)[i] != NULL) {
#line 27 "build_tools_preferences.vala"
				destroy_func (((gpointer*) array)[i]);
#line 702 "finance.c"
			}
		}
	}
}


static void
_vala_array_free (gpointer array,
                  gint array_length,
                  GDestroyNotify destroy_func)
{
#line 27 "build_tools_preferences.vala"
	_vala_array_destroy (array, array_length, destroy_func);
#line 27 "build_tools_preferences.vala"
	g_free (array);
#line 718 "finance.c"
}


static gint
_vala_array_length (gpointer array)
{
	int length;
	length = 0;
#line 27 "build_tools_preferences.vala"
	if (array) {
#line 27 "build_tools_preferences.vala"
		while (((gpointer*) array)[length]) {
#line 27 "build_tools_preferences.vala"
			length++;
#line 733 "finance.c"
		}
	}
#line 27 "build_tools_preferences.vala"
	return length;
#line 738 "finance.c"
}



