/* WeatherShow.c generated by valac 0.56.19, the Vala compiler
 * generated from WeatherShow.vala, do not modify */

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <config.h>
#include <glib/gi18n-lib.h>
#include <gee.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "weathershow.h"
#include <glib/gstdio.h>
#include <libsoup/soup.h>
#include <json-glib/json-glib.h>
#include <float.h>
#include <math.h>
#include <gobject/gvaluecollector.h>
#include <gdk/gdk.h>
#include <plugin.h>
#include <libpeas.h>
#include <locale.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _weather_show_applet_get_weatherdata_unref0(var) ((var == NULL) ? NULL : (var = (weather_show_applet_get_weatherdata_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))
typedef struct _Block2Data Block2Data;
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
typedef struct _Block3Data Block3Data;
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))
#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL)))
typedef struct _WeatherShowAppletParamSpecGetWeatherdata WeatherShowAppletParamSpecGetWeatherdata;
enum  {
	WEATHER_SHOW_APPLET_WEATHER_SHOW_SETTINGS_0_PROPERTY,
	WEATHER_SHOW_APPLET_WEATHER_SHOW_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* weather_show_applet_weather_show_settings_properties[WEATHER_SHOW_APPLET_WEATHER_SHOW_SETTINGS_NUM_PROPERTIES];
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
enum  {
	WEATHER_SHOW_APPLET_PLUGIN_0_PROPERTY,
	WEATHER_SHOW_APPLET_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* weather_show_applet_plugin_properties[WEATHER_SHOW_APPLET_PLUGIN_NUM_PROPERTIES];
enum  {
	WEATHER_SHOW_APPLET_WEATHER_SHOW_POPOVER_0_PROPERTY,
	WEATHER_SHOW_APPLET_WEATHER_SHOW_POPOVER_NUM_PROPERTIES
};
static GParamSpec* weather_show_applet_weather_show_popover_properties[WEATHER_SHOW_APPLET_WEATHER_SHOW_POPOVER_NUM_PROPERTIES];
enum  {
	WEATHER_SHOW_APPLET_APPLET_0_PROPERTY,
	WEATHER_SHOW_APPLET_APPLET_UUID_PROPERTY,
	WEATHER_SHOW_APPLET_APPLET_NUM_PROPERTIES
};
static GParamSpec* weather_show_applet_applet_properties[WEATHER_SHOW_APPLET_APPLET_NUM_PROPERTIES];
#define _g_thread_unref0(var) ((var == NULL) ? NULL : (var = (g_thread_unref (var), NULL)))
typedef struct _Block4Data Block4Data;
typedef struct _Block5Data Block5Data;
typedef struct _Block6Data Block6Data;
#define _g_dir_close0(var) ((var == NULL) ? NULL : (var = (g_dir_close (var), NULL)))

struct _Block1Data {
	int _ref_count_;
	GeeHashMap* result_forecast;
	GeeArrayList* sorted_keys;
	gint n_fc;
	gint curr_index;
};

struct _Block2Data {
	int _ref_count_;
	WeatherShowAppletGetWeatherdata* self;
	gchar* tempdisplay;
};

struct _Block3Data {
	int _ref_count_;
	Block2Data * _data2_;
	gint icon_index;
};

struct _WeatherShowAppletParamSpecGetWeatherdata {
	GParamSpec parent_instance;
};

struct _WeatherShowAppletWeatherShowSettingsPrivate {
	GtkCheckButton** cbuttons;
	gint cbuttons_length1;
	gint _cbuttons_size_;
	gchar** add_args;
	gint add_args_length1;
	gint _add_args_size_;
	gchar* css_template;
	gchar* css_data2;
	GtkScale* transparency_slider;
	GtkButton* weathercbutton;
	GtkLabel* colorlabel;
	GtkCheckButton* setposbutton;
	GtkEntry* xpos;
	GtkEntry* ypos;
	GtkLabel* xpos_label;
	GtkLabel* ypos_label;
	GtkButton* apply;
	GtkButton* apply_cityname;
	GtkLabel* transparency_label;
	GtkStack* stack;
	GtkButton* button_desktop;
	GtkButton* button_general;
	GtkLabel* currmarker_label1;
	GtkLabel* currmarker_label2;
	GtkCssProvider* css_provider;
	GtkEntry* cityentry;
	GtkMenu* citymenu;
	GdkScreen* screen;
	GtkMenuButton* search_button;
	gchar** city_menurefs;
	gint city_menurefs_length1;
	gint _city_menurefs_size_;
	gchar** city_menucodes;
	gint city_menucodes_length1;
	gint _city_menucodes_size_;
	gboolean edit_citymenu;
	GtkCheckButton* customcity_checkbox;
	GtkEntry* customcity_entry;
	gchar* uuid;
};

struct _WeatherShowAppletWeatherShowPopoverPrivate {
	GtkEventBox* indicatorBox;
};

struct _WeatherShowAppletAppletPrivate {
	GtkEventBox* indicatorBox;
	WeatherShowAppletWeatherShowPopover* popover;
	BudgiePopoverManager* manager;
	gchar* _uuid;
	GThread* update_thread;
	gboolean weather_onpanel;
};

struct _Block4Data {
	int _ref_count_;
	WeatherShowAppletApplet* self;
	gchar** applets;
	gint applets_length1;
	gint _applets_size_;
	gchar* uuid;
};

struct _Block5Data {
	int _ref_count_;
	Block4Data * _data4_;
	GSettings* currpanelsubject_settings;
};

struct _Block6Data {
	int _ref_count_;
	WeatherShowAppletApplet* self;
	gchar* uuid;
};

VALA_EXTERN GSettings* weather_show_applet_ws_settings;
GSettings* weather_show_applet_ws_settings = NULL;
VALA_EXTERN gboolean weather_show_applet_show_ondesktop;
gboolean weather_show_applet_show_ondesktop = FALSE;
VALA_EXTERN gboolean weather_show_applet_dynamic_icon;
gboolean weather_show_applet_dynamic_icon = FALSE;
VALA_EXTERN gboolean weather_show_applet_show_forecast;
gboolean weather_show_applet_show_forecast = FALSE;
VALA_EXTERN gchar* weather_show_applet_lang;
gchar* weather_show_applet_lang = NULL;
VALA_EXTERN gchar* weather_show_applet_tempunit;
gchar* weather_show_applet_tempunit = NULL;
VALA_EXTERN gchar* weather_show_applet_windunit;
gchar* weather_show_applet_windunit = NULL;
VALA_EXTERN gchar** weather_show_applet_directions;
VALA_EXTERN gint weather_show_applet_directions_length1;
gchar** weather_show_applet_directions = NULL;
gint weather_show_applet_directions_length1 = 0;
static gint _weather_show_applet_directions_size_ = 0;
VALA_EXTERN gchar* weather_show_applet_key;
gchar* weather_show_applet_key = NULL;
VALA_EXTERN GtkImage* weather_show_applet_indicatorIcon;
GtkImage* weather_show_applet_indicatorIcon = NULL;
VALA_EXTERN GdkPixbuf** weather_show_applet_iconpixbufs;
VALA_EXTERN gint weather_show_applet_iconpixbufs_length1;
GdkPixbuf** weather_show_applet_iconpixbufs = NULL;
gint weather_show_applet_iconpixbufs_length1 = 0;
static gint _weather_show_applet_iconpixbufs_size_ = 0;
VALA_EXTERN GdkPixbuf** weather_show_applet_iconpixbufs_large;
VALA_EXTERN gint weather_show_applet_iconpixbufs_large_length1;
GdkPixbuf** weather_show_applet_iconpixbufs_large = NULL;
gint weather_show_applet_iconpixbufs_large_length1 = 0;
static gint _weather_show_applet_iconpixbufs_large_size_ = 0;
VALA_EXTERN gchar** weather_show_applet_iconnames;
VALA_EXTERN gint weather_show_applet_iconnames_length1;
gchar** weather_show_applet_iconnames = NULL;
gint weather_show_applet_iconnames_length1 = 0;
static gint _weather_show_applet_iconnames_size_ = 0;
VALA_EXTERN gchar* weather_show_applet_citycode;
gchar* weather_show_applet_citycode = NULL;
VALA_EXTERN GtkBox* weather_show_applet_container;
GtkBox* weather_show_applet_container = NULL;
VALA_EXTERN GtkLabel* weather_show_applet_templabel;
GtkLabel* weather_show_applet_templabel = NULL;
VALA_EXTERN GtkStack* weather_show_applet_popoverstack;
GtkStack* weather_show_applet_popoverstack = NULL;
VALA_EXTERN gint weather_show_applet_fc_stackindex;
gint weather_show_applet_fc_stackindex = 0;
VALA_EXTERN gchar** weather_show_applet_fc_stacknames;
VALA_EXTERN gint weather_show_applet_fc_stacknames_length1;
gchar** weather_show_applet_fc_stacknames = NULL;
gint weather_show_applet_fc_stacknames_length1 = 0;
static gint _weather_show_applet_fc_stacknames_size_ = 0;
VALA_EXTERN GtkGrid** weather_show_applet_popover_subgrids;
VALA_EXTERN gint weather_show_applet_popover_subgrids_length1;
GtkGrid** weather_show_applet_popover_subgrids = NULL;
gint weather_show_applet_popover_subgrids_length1 = 0;
static gint _weather_show_applet_popover_subgrids_size_ = 0;
VALA_EXTERN GtkGrid* weather_show_applet_popover_mastergrid;
GtkGrid* weather_show_applet_popover_mastergrid = NULL;
VALA_EXTERN gchar* weather_show_applet_default_icon;
gchar* weather_show_applet_default_icon = NULL;
VALA_EXTERN gchar* weather_show_applet_desktop_window;
gchar* weather_show_applet_desktop_window = NULL;
VALA_EXTERN gchar* weather_show_applet_color_window;
gchar* weather_show_applet_color_window = NULL;
VALA_EXTERN gchar* weather_show_applet_moduledir;
gchar* weather_show_applet_moduledir = NULL;
VALA_EXTERN gboolean weather_show_applet_lasttime_failed;
gboolean weather_show_applet_lasttime_failed = FALSE;
VALA_EXTERN gchar* weather_show_applet_customcityname;
gchar* weather_show_applet_customcityname = NULL;
VALA_EXTERN gboolean weather_show_applet_use_custom_cityname;
gboolean weather_show_applet_use_custom_cityname = FALSE;
static gpointer weather_show_applet_get_weatherdata_parent_class = NULL;
static GType weather_show_applet_get_weatherdata_type_id = 0;
static gint WeatherShowAppletWeatherShowSettings_private_offset;
static gpointer weather_show_applet_weather_show_settings_parent_class = NULL;
static GType weather_show_applet_weather_show_settings_type_id = 0;
static gpointer weather_show_applet_plugin_parent_class = NULL;
static BudgiePluginIface * weather_show_applet_plugin_budgie_plugin_parent_iface = NULL;
static GType weather_show_applet_plugin_type_id = 0;
static gint WeatherShowAppletWeatherShowPopover_private_offset;
static gpointer weather_show_applet_weather_show_popover_parent_class = NULL;
static GType weather_show_applet_weather_show_popover_type_id = 0;
static gint WeatherShowAppletApplet_private_offset;
static gpointer weather_show_applet_applet_parent_class = NULL;
static GType weather_show_applet_applet_type_id = 0;

VALA_EXTERN GSettings* weather_show_functions_get_settings (const gchar* path);
VALA_EXTERN gint weather_show_functions_escape_missingicon (const gchar* loglocation,
                                                const gchar* iconname,
                                                gchar** iconnames,
                                                gint iconnames_length1);
VALA_EXTERN void weather_show_functions_write_tofile (const gchar* path,
                                          const gchar* data);
VALA_EXTERN gint weather_show_functions_get_stringindex (const gchar* s,
                                             gchar** arr,
                                             gint arr_length1);
VALA_EXTERN void weather_show_functions_delete_file (GFile* file);
VALA_EXTERN gchar* weather_show_functions_get_langmatch (void);
static gchar** _vala_array_dup1 (gchar** self,
                          gssize length);
VALA_EXTERN gboolean weather_show_functions_check_onwindow (const gchar* path);
VALA_EXTERN void weather_show_functions_open_window (const gchar* path,
                                         const gchar* uuid);
VALA_EXTERN gchar* weather_show_functions_find_mappedid (const gchar* icon_id);
VALA_EXTERN gchar* weather_show_functions_weekday (gint day);
VALA_EXTERN GeeArrayList* weather_show_functions_sort_timespan (GeeHashMap* span);
VALA_EXTERN gchar** weather_show_functions_get_matches (const gchar* lookfor,
                                            gint* result_length1);
static void _vala_array_add1 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
VALA_EXTERN gchar* weather_show_applet_to_hrs (gint t);
VALA_EXTERN void weather_show_applet_update_weathershow (void);
VALA_EXTERN void weather_show_applet_get_weather (WeatherShowAppletGetWeatherdata* weather_obj);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static gboolean ___lambda5_ (Block1Data* _data1_);
static void _vala_array_add2 (GtkGrid** * array,
                       gint* length,
                       gint* size,
                       GtkGrid* value);
static void _vala_array_add3 (GtkGrid** * array,
                       gint* length,
                       gint* size,
                       GtkGrid* value);
static gboolean ____lambda5__gsource_func (gpointer self);
VALA_EXTERN gchar* weather_show_applet_currtime (void);
VALA_EXTERN void weather_show_applet_update_log (const gchar* wtype,
                                     const gchar* output);
static gchar** _vala_array_dup2 (gchar** self,
                          gssize length);
static gchar** _vala_array_dup3 (gchar** self,
                          gssize length);
static void _vala_array_add4 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static gchar* weather_show_applet_get_weatherdata_fetch_fromsite (WeatherShowAppletGetWeatherdata* self,
                                                           const gchar* wtype,
                                                           const gchar* city);
static JsonParser* weather_show_applet_get_weatherdata_load_data (WeatherShowAppletGetWeatherdata* self,
                                                           const gchar* data);
static gchar* weather_show_applet_get_weatherdata_check_stringvalue (WeatherShowAppletGetWeatherdata* self,
                                                              JsonObject* obj,
                                                              const gchar* val);
static gfloat weather_show_applet_get_weatherdata_check_numvalue (WeatherShowAppletGetWeatherdata* self,
                                                           JsonObject* obj,
                                                           const gchar* val);
static GeeHashMap* weather_show_applet_get_weatherdata_get_categories (WeatherShowAppletGetWeatherdata* self,
                                                                JsonObject* rootobj);
static gchar* weather_show_applet_get_weatherdata_getsnapshot (WeatherShowAppletGetWeatherdata* self,
                                                        const gchar* data);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static gchar* weather_show_applet_get_weatherdata_get_dayornight (WeatherShowAppletGetWeatherdata* self,
                                                           const gchar* dn);
static gchar* weather_show_applet_get_weatherdata_get_temperature (WeatherShowAppletGetWeatherdata* self,
                                                            GeeHashMap* categories);
static gchar* weather_show_applet_get_weatherdata_get_windspeed (WeatherShowAppletGetWeatherdata* self,
                                                          GeeHashMap* categories);
static gchar* weather_show_applet_get_weatherdata_get_winddirection (WeatherShowAppletGetWeatherdata* self,
                                                              GeeHashMap* categories);
static gchar* weather_show_applet_get_weatherdata_get_humidity (WeatherShowAppletGetWeatherdata* self,
                                                         GeeHashMap* categories);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static gboolean ___lambda4_ (Block3Data* _data3_);
static gboolean ____lambda4__gsource_func (gpointer self);
static GeeHashMap* weather_show_applet_get_weatherdata_getspan (WeatherShowAppletGetWeatherdata* self,
                                                         const gchar* data);
static JsonNode* _vala_JsonNode_copy (JsonNode* self);
static void _vala_JsonNode_free (JsonNode* self);
static void weather_show_applet_get_weatherdata_finalize (WeatherShowAppletGetWeatherdata * obj);
static void weather_show_applet_weather_show_settings_on_button_general_clicked (WeatherShowAppletWeatherShowSettings* self,
                                                                          GtkButton* button);
static void _weather_show_applet_weather_show_settings_on_button_general_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                              gpointer self);
static void weather_show_applet_weather_show_settings_on_button_desktop_clicked (WeatherShowAppletWeatherShowSettings* self,
                                                                          GtkButton* button);
static void _weather_show_applet_weather_show_settings_on_button_desktop_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                              gpointer self);
static gchar* weather_show_applet_weather_show_settings_set_initialcity (WeatherShowAppletWeatherShowSettings* self);
static void weather_show_applet_weather_show_settings_update_citylist (WeatherShowAppletWeatherShowSettings* self,
                                                                GtkEditable* entry);
static void _weather_show_applet_weather_show_settings_update_citylist_gtk_editable_changed (GtkEditable* _sender,
                                                                                      gpointer self);
static void weather_show_applet_weather_show_settings_toggle_value (WeatherShowAppletWeatherShowSettings* self,
                                                             GtkToggleButton* button);
static void _weather_show_applet_weather_show_settings_toggle_value_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                        gpointer self);
static gboolean weather_show_applet_weather_show_settings_get_tempstate (WeatherShowAppletWeatherShowSettings* self);
static void weather_show_applet_weather_show_settings_set_tempunit (WeatherShowAppletWeatherShowSettings* self,
                                                             GtkToggleButton* button);
static void _weather_show_applet_weather_show_settings_set_tempunit_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                        gpointer self);
static gboolean weather_show_applet_weather_show_settings_get_windstate (WeatherShowAppletWeatherShowSettings* self);
static void weather_show_applet_weather_show_settings_set_windunit (WeatherShowAppletWeatherShowSettings* self,
                                                             GtkToggleButton* button);
static void _weather_show_applet_weather_show_settings_set_windunit_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                        gpointer self);
static void weather_show_applet_weather_show_settings_set_initialtransparency (WeatherShowAppletWeatherShowSettings* self);
static void weather_show_applet_weather_show_settings_update_transparencysettings (WeatherShowAppletWeatherShowSettings* self,
                                                                            GtkRange* slider);
static void _weather_show_applet_weather_show_settings_update_transparencysettings_gtk_range_value_changed (GtkRange* _sender,
                                                                                                     gpointer self);
static void weather_show_applet_weather_show_settings_set_buttoncolor (WeatherShowAppletWeatherShowSettings* self);
static void __lambda6_ (WeatherShowAppletWeatherShowSettings* self);
static void ___lambda6__gtk_button_clicked (GtkButton* _sender,
                                     gpointer self);
static void weather_show_applet_weather_show_settings_update_xysetting (WeatherShowAppletWeatherShowSettings* self,
                                                                 GtkButton* button);
static void _weather_show_applet_weather_show_settings_update_xysetting_gtk_button_clicked (GtkButton* _sender,
                                                                                     gpointer self);
static void weather_show_applet_weather_show_settings_update_customname (WeatherShowAppletWeatherShowSettings* self);
static void _weather_show_applet_weather_show_settings_update_customname_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
static void weather_show_applet_weather_show_settings_set_initialpos (WeatherShowAppletWeatherShowSettings* self);
static void weather_show_applet_weather_show_settings_set_initialcustom (WeatherShowAppletWeatherShowSettings* self);
static void __lambda7_ (WeatherShowAppletWeatherShowSettings* self);
static void ___lambda7__g_settings_changed (GSettings* _sender,
                                     const gchar* key,
                                     gpointer self);
static void weather_show_applet_weather_show_settings_update_citysettings (WeatherShowAppletWeatherShowSettings* self,
                                                                    GtkMenuItem* m);
static void _vala_array_add5 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void _vala_array_add6 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void _weather_show_applet_weather_show_settings_update_citysettings_gtk_menu_item_activate (GtkMenuItem* _sender,
                                                                                            gpointer self);
static gint weather_show_applet_weather_show_settings_get_buttonarg (WeatherShowAppletWeatherShowSettings* self,
                                                              GtkToggleButton* button);
static void weather_show_applet_weather_show_settings_finalize (GObject * obj);
static BudgieApplet* weather_show_applet_plugin_real_get_panel_widget (BudgiePlugin* base,
                                                                const gchar* uuid);
static void weather_show_applet_weather_show_popover_previous_stack (WeatherShowAppletWeatherShowPopover* self,
                                                              GtkButton* button);
static void _weather_show_applet_weather_show_popover_previous_stack_gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self);
static void weather_show_applet_weather_show_popover_next_stack (WeatherShowAppletWeatherShowPopover* self,
                                                          GtkButton* button);
static void _weather_show_applet_weather_show_popover_next_stack_gtk_button_clicked (GtkButton* _sender,
                                                                              gpointer self);
static void weather_show_applet_weather_show_popover_finalize (GObject * obj);
static gboolean weather_show_applet_applet_real_supports_settings (BudgieApplet* base);
static GtkWidget* weather_show_applet_applet_real_get_settings_ui (BudgieApplet* base);
static gboolean weather_show_applet_applet_find_applet (WeatherShowAppletApplet* self,
                                                 const gchar* uuid,
                                                 gchar** applets,
                                                 gint applets_length1);
static void weather_show_applet_applet_watchapplet (WeatherShowAppletApplet* self,
                                             const gchar* uuid);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
static void _____lambda8_ (Block5Data* _data5_);
static void ______lambda8__g_settings_changed (GSettings* _sender,
                                        const gchar* key,
                                        gpointer self);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static gboolean __lambda9_ (Block6Data* _data6_);
static gboolean ___lambda9__gsource_func (gpointer self);
static void weather_show_applet_applet_get_icondata (WeatherShowAppletApplet* self);
static void __lambda10_ (WeatherShowAppletApplet* self);
static void ___lambda10__g_settings_changed (GSettings* _sender,
                                      const gchar* key,
                                      gpointer self);
static void __lambda11_ (WeatherShowAppletApplet* self);
static void ___lambda11__g_settings_changed (GSettings* _sender,
                                      const gchar* key,
                                      gpointer self);
static void __lambda12_ (WeatherShowAppletApplet* self);
static void ___lambda12__g_settings_changed (GSettings* _sender,
                                      const gchar* key,
                                      gpointer self);
static void __lambda13_ (WeatherShowAppletApplet* self);
static void ___lambda13__g_settings_changed (GSettings* _sender,
                                      const gchar* key,
                                      gpointer self);
static void __lambda14_ (WeatherShowAppletApplet* self);
static void ___lambda14__g_settings_changed (GSettings* _sender,
                                      const gchar* key,
                                      gpointer self);
static void __lambda15_ (WeatherShowAppletApplet* self);
static void ___lambda15__g_settings_changed (GSettings* _sender,
                                      const gchar* key,
                                      gpointer self);
static void __lambda16_ (WeatherShowAppletApplet* self);
static void ___lambda16__g_settings_changed (GSettings* _sender,
                                      const gchar* key,
                                      gpointer self);
static void __lambda17_ (WeatherShowAppletApplet* self);
static void ___lambda17__g_settings_changed (GSettings* _sender,
                                      const gchar* key,
                                      gpointer self);
static gboolean ___lambda18_ (Block6Data* _data6_);
static gboolean ____lambda18__gsource_func (gpointer self);
static gboolean __lambda19_ (WeatherShowAppletApplet* self,
                      GdkEventButton* e);
static gboolean ___lambda19__gtk_widget_button_press_event (GtkWidget* _sender,
                                                     GdkEventButton* event,
                                                     gpointer self);
static gboolean weather_show_applet_applet_run_periodiccheck (WeatherShowAppletApplet* self);
static gpointer _weather_show_applet_applet_run_periodiccheck_gthread_func (gpointer self);
static void weather_show_applet_applet_real_panel_position_changed (BudgieApplet* base,
                                                             BudgiePanelPosition position);
static void _vala_array_add7 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void _vala_array_add8 (GdkPixbuf** * array,
                       gint* length,
                       gint* size,
                       GdkPixbuf* value);
static void _vala_array_add9 (GdkPixbuf** * array,
                       gint* length,
                       gint* size,
                       GdkPixbuf* value);
static void weather_show_applet_applet_real_update_popovers (BudgieApplet* base,
                                                      BudgiePopoverManager* manager);
static void weather_show_applet_applet_finalize (GObject * obj);
static void _vala_weather_show_applet_applet_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_weather_show_applet_applet_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

GSettings*
weather_show_functions_get_settings (const gchar* path)
{
	GSettings* settings = NULL;
	GSettings* _tmp0_;
	GSettings* result;
	g_return_val_if_fail (path != NULL, NULL);
	_tmp0_ = g_settings_new (path);
	settings = _tmp0_;
	result = settings;
	return result;
}

gint
weather_show_functions_escape_missingicon (const gchar* loglocation,
                                           const gchar* iconname,
                                           gchar** iconnames,
                                           gint iconnames_length1)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (loglocation != NULL, -1);
	g_return_val_if_fail (iconname != NULL, -1);
	_tmp0_ = g_strconcat ("icon not found: ", iconname, NULL);
	_tmp1_ = _tmp0_;
	weather_show_functions_write_tofile (loglocation, _tmp1_);
	_g_free0 (_tmp1_);
	result = weather_show_functions_get_stringindex ("erro", iconnames, (gint) iconnames_length1);
	return result;
}

void
weather_show_functions_write_tofile (const gchar* path,
                                     const gchar* data)
{
	GFile* datasrc = NULL;
	GFile* _tmp0_;
	GFile* _tmp1_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (path != NULL);
	g_return_if_fail (data != NULL);
	_tmp0_ = g_file_new_for_path (path);
	datasrc = _tmp0_;
	_tmp1_ = datasrc;
	weather_show_functions_delete_file (_tmp1_);
	{
		GFileOutputStream* file_stream = NULL;
		GFile* _tmp2_;
		GFileOutputStream* _tmp3_;
		GDataOutputStream* data_stream = NULL;
		GFileOutputStream* _tmp4_;
		GDataOutputStream* _tmp5_;
		GDataOutputStream* _tmp6_;
		_tmp2_ = datasrc;
		_tmp3_ = g_file_create (_tmp2_, G_FILE_CREATE_NONE, NULL, &_inner_error0_);
		file_stream = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp4_ = file_stream;
		_tmp5_ = g_data_output_stream_new ((GOutputStream*) _tmp4_);
		data_stream = _tmp5_;
		_tmp6_ = data_stream;
		g_data_output_stream_put_string (_tmp6_, data, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (data_stream);
			_g_object_unref0 (file_stream);
			goto __catch0_g_error;
		}
		_g_object_unref0 (data_stream);
		_g_object_unref0 (file_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		g_print ("Error writing to file\n");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (datasrc);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_object_unref0 (datasrc);
}

void
weather_show_functions_delete_file (GFile* file)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (file != NULL);
	{
		g_file_delete (file, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		g_print ("File does not exist\n");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static gchar**
_vala_array_dup1 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

gchar*
weather_show_functions_get_langmatch (void)
{
	gchar** lang_names = NULL;
	gchar** _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gint lang_names_length1;
	gint _lang_names_size_;
	gchar** langcodes = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar** _tmp36_;
	gint langcodes_length1;
	gint _langcodes_size_;
	gchar* default_lang = NULL;
	gchar* _tmp37_;
	gchar** _tmp38_;
	gint _tmp38__length1;
	gchar* result;
	_tmp1_ = _tmp0_ = g_get_language_names ();
	_tmp2_ = (_tmp1_ != NULL) ? _vala_array_dup1 (_tmp1_, _vala_array_length (_tmp0_)) : _tmp1_;
	_tmp2__length1 = _vala_array_length (_tmp0_);
	lang_names = _tmp2_;
	lang_names_length1 = _tmp2__length1;
	_lang_names_size_ = lang_names_length1;
	_tmp3_ = g_strdup ("ar");
	_tmp4_ = g_strdup ("bg");
	_tmp5_ = g_strdup ("ca");
	_tmp6_ = g_strdup ("cz");
	_tmp7_ = g_strdup ("de");
	_tmp8_ = g_strdup ("el");
	_tmp9_ = g_strdup ("en");
	_tmp10_ = g_strdup ("fa");
	_tmp11_ = g_strdup ("fi");
	_tmp12_ = g_strdup ("fr");
	_tmp13_ = g_strdup ("gl");
	_tmp14_ = g_strdup ("hr");
	_tmp15_ = g_strdup ("hu");
	_tmp16_ = g_strdup ("it");
	_tmp17_ = g_strdup ("ja");
	_tmp18_ = g_strdup ("kr");
	_tmp19_ = g_strdup ("la");
	_tmp20_ = g_strdup ("lt");
	_tmp21_ = g_strdup ("mk");
	_tmp22_ = g_strdup ("nl");
	_tmp23_ = g_strdup ("pl");
	_tmp24_ = g_strdup ("pt");
	_tmp25_ = g_strdup ("ro");
	_tmp26_ = g_strdup ("ru");
	_tmp27_ = g_strdup ("se");
	_tmp28_ = g_strdup ("sk");
	_tmp29_ = g_strdup ("sl");
	_tmp30_ = g_strdup ("es");
	_tmp31_ = g_strdup ("tr");
	_tmp32_ = g_strdup ("ua");
	_tmp33_ = g_strdup ("vi");
	_tmp34_ = g_strdup ("zh_cn");
	_tmp35_ = g_strdup ("zh_tw");
	_tmp36_ = g_new0 (gchar*, 33 + 1);
	_tmp36_[0] = _tmp3_;
	_tmp36_[1] = _tmp4_;
	_tmp36_[2] = _tmp5_;
	_tmp36_[3] = _tmp6_;
	_tmp36_[4] = _tmp7_;
	_tmp36_[5] = _tmp8_;
	_tmp36_[6] = _tmp9_;
	_tmp36_[7] = _tmp10_;
	_tmp36_[8] = _tmp11_;
	_tmp36_[9] = _tmp12_;
	_tmp36_[10] = _tmp13_;
	_tmp36_[11] = _tmp14_;
	_tmp36_[12] = _tmp15_;
	_tmp36_[13] = _tmp16_;
	_tmp36_[14] = _tmp17_;
	_tmp36_[15] = _tmp18_;
	_tmp36_[16] = _tmp19_;
	_tmp36_[17] = _tmp20_;
	_tmp36_[18] = _tmp21_;
	_tmp36_[19] = _tmp22_;
	_tmp36_[20] = _tmp23_;
	_tmp36_[21] = _tmp24_;
	_tmp36_[22] = _tmp25_;
	_tmp36_[23] = _tmp26_;
	_tmp36_[24] = _tmp27_;
	_tmp36_[25] = _tmp28_;
	_tmp36_[26] = _tmp29_;
	_tmp36_[27] = _tmp30_;
	_tmp36_[28] = _tmp31_;
	_tmp36_[29] = _tmp32_;
	_tmp36_[30] = _tmp33_;
	_tmp36_[31] = _tmp34_;
	_tmp36_[32] = _tmp35_;
	langcodes = _tmp36_;
	langcodes_length1 = 33;
	_langcodes_size_ = langcodes_length1;
	_tmp37_ = g_strdup ("en");
	default_lang = _tmp37_;
	_tmp38_ = lang_names;
	_tmp38__length1 = lang_names_length1;
	{
		gchar** set_lang_collection = NULL;
		gint set_lang_collection_length1 = 0;
		gint _set_lang_collection_size_ = 0;
		gint set_lang_it = 0;
		set_lang_collection = _tmp38_;
		set_lang_collection_length1 = _tmp38__length1;
		for (set_lang_it = 0; set_lang_it < set_lang_collection_length1; set_lang_it = set_lang_it + 1) {
			gchar* _tmp39_;
			gchar* set_lang = NULL;
			_tmp39_ = g_strdup (set_lang_collection[set_lang_it]);
			set_lang = _tmp39_;
			{
				gchar** _tmp40_;
				gint _tmp40__length1;
				_tmp40_ = langcodes;
				_tmp40__length1 = langcodes_length1;
				{
					gchar** l_collection = NULL;
					gint l_collection_length1 = 0;
					gint _l_collection_size_ = 0;
					gint l_it = 0;
					l_collection = _tmp40_;
					l_collection_length1 = _tmp40__length1;
					for (l_it = 0; l_it < l_collection_length1; l_it = l_it + 1) {
						gchar* _tmp41_;
						gchar* l = NULL;
						_tmp41_ = g_strdup (l_collection[l_it]);
						l = _tmp41_;
						{
							gboolean _tmp42_ = FALSE;
							const gchar* _tmp43_;
							_tmp43_ = set_lang;
							if (g_strcmp0 (_tmp43_, "C") != 0) {
								gboolean _tmp44_ = FALSE;
								const gchar* _tmp45_;
								const gchar* _tmp46_;
								_tmp45_ = l;
								_tmp46_ = set_lang;
								if (g_strcmp0 (_tmp45_, _tmp46_) == 0) {
									_tmp44_ = TRUE;
								} else {
									const gchar* _tmp47_;
									const gchar* _tmp48_;
									gchar** _tmp49_;
									gchar** _tmp50_;
									gchar** _tmp51_;
									gint _tmp51__length1;
									const gchar* _tmp52_;
									_tmp47_ = l;
									_tmp48_ = set_lang;
									_tmp50_ = _tmp49_ = g_strsplit (_tmp48_, "_", 0);
									_tmp51_ = _tmp50_;
									_tmp51__length1 = _vala_array_length (_tmp49_);
									_tmp52_ = _tmp51_[0];
									_tmp44_ = g_strcmp0 (_tmp47_, _tmp52_) == 0;
									_tmp51_ = (_vala_array_free (_tmp51_, _tmp51__length1, (GDestroyNotify) g_free), NULL);
								}
								_tmp42_ = _tmp44_;
							} else {
								_tmp42_ = FALSE;
							}
							if (_tmp42_) {
								result = l;
								_g_free0 (set_lang);
								_g_free0 (default_lang);
								langcodes = (_vala_array_free (langcodes, langcodes_length1, (GDestroyNotify) g_free), NULL);
								lang_names = (_vala_array_free (lang_names, lang_names_length1, (GDestroyNotify) g_free), NULL);
								return result;
							}
							_g_free0 (l);
						}
					}
				}
				_g_free0 (set_lang);
			}
		}
	}
	result = default_lang;
	langcodes = (_vala_array_free (langcodes, langcodes_length1, (GDestroyNotify) g_free), NULL);
	lang_names = (_vala_array_free (lang_names, lang_names_length1, (GDestroyNotify) g_free), NULL);
	return result;
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

gboolean
weather_show_functions_check_onwindow (const gchar* path)
{
	gchar* username = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* cmd_check = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* output = NULL;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (path != NULL, FALSE);
	_tmp0_ = g_get_user_name ();
	_tmp1_ = g_strdup (_tmp0_);
	username = _tmp1_;
	_tmp2_ = string_to_string (username);
	_tmp3_ = string_to_string (path);
	_tmp4_ = g_strconcat ("/pgrep -u ", _tmp2_, " -f ", _tmp3_, NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strconcat (PACKAGE_BINDIR, _tmp5_, NULL);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	cmd_check = _tmp7_;
	{
		gchar* _tmp8_ = NULL;
		g_spawn_command_line_sync (cmd_check, &_tmp8_, NULL, NULL, &_inner_error0_);
		_g_free0 (output);
		output = _tmp8_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp9_ = FALSE;
			if (_inner_error0_->domain == G_SPAWN_ERROR) {
				goto __catch0_g_spawn_error;
			}
			_g_free0 (output);
			_g_free0 (cmd_check);
			_g_free0 (username);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp9_;
		}
		if (g_strcmp0 (output, "") == 0) {
			result = FALSE;
			_g_free0 (output);
			_g_free0 (cmd_check);
			_g_free0 (username);
			return result;
		}
	}
	goto __finally0;
	__catch0_g_spawn_error:
	{
		g_clear_error (&_inner_error0_);
		result = FALSE;
		_g_free0 (output);
		_g_free0 (cmd_check);
		_g_free0 (username);
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp10_ = FALSE;
		_g_free0 (output);
		_g_free0 (cmd_check);
		_g_free0 (username);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp10_;
	}
	result = TRUE;
	_g_free0 (output);
	_g_free0 (cmd_check);
	_g_free0 (username);
	return result;
}

void
weather_show_functions_open_window (const gchar* path,
                                    const gchar* uuid)
{
	gchar* argstring = NULL;
	gchar* _tmp0_;
	gboolean win_exists = FALSE;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (path != NULL);
	_tmp0_ = g_strdup ("");
	argstring = _tmp0_;
	if (uuid != NULL) {
		const gchar* _tmp1_;
		gchar* _tmp2_;
		_tmp1_ = string_to_string (uuid);
		_tmp2_ = g_strconcat (" ", _tmp1_, NULL);
		_g_free0 (argstring);
		argstring = _tmp2_;
	}
	win_exists = weather_show_functions_check_onwindow (path);
	if (!win_exists) {
		{
			const gchar* _tmp3_;
			gchar* _tmp4_;
			gchar* _tmp5_;
			_tmp3_ = argstring;
			_tmp4_ = g_strconcat (path, _tmp3_, NULL);
			_tmp5_ = _tmp4_;
			g_spawn_command_line_async (_tmp5_, &_inner_error0_);
			_g_free0 (_tmp5_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == G_SPAWN_ERROR) {
					goto __catch0_g_spawn_error;
				}
				_g_free0 (argstring);
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return;
			}
		}
		goto __finally0;
		__catch0_g_spawn_error:
		{
			g_clear_error (&_inner_error0_);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (argstring);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
	_g_free0 (argstring);
}

gchar*
weather_show_functions_find_mappedid (const gchar* icon_id)
{
	gchar** replacements = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar** _tmp42_;
	gint replacements_length1;
	gint replacements_length2;
	gint lenrep = 0;
	gchar** _tmp43_;
	gint _tmp43__length1;
	gint _tmp43__length2;
	gint _tmp44_;
	gchar* _tmp52_;
	gchar* result;
	g_return_val_if_fail (icon_id != NULL, NULL);
	_tmp0_ = g_strdup ("221");
	_tmp1_ = g_strdup ("212");
	_tmp2_ = g_strdup ("231");
	_tmp3_ = g_strdup ("230");
	_tmp4_ = g_strdup ("232");
	_tmp5_ = g_strdup ("230");
	_tmp6_ = g_strdup ("301");
	_tmp7_ = g_strdup ("300");
	_tmp8_ = g_strdup ("302");
	_tmp9_ = g_strdup ("300");
	_tmp10_ = g_strdup ("310");
	_tmp11_ = g_strdup ("300");
	_tmp12_ = g_strdup ("312");
	_tmp13_ = g_strdup ("311");
	_tmp14_ = g_strdup ("321");
	_tmp15_ = g_strdup ("314");
	_tmp16_ = g_strdup ("502");
	_tmp17_ = g_strdup ("501");
	_tmp18_ = g_strdup ("503");
	_tmp19_ = g_strdup ("501");
	_tmp20_ = g_strdup ("504");
	_tmp21_ = g_strdup ("501");
	_tmp22_ = g_strdup ("522");
	_tmp23_ = g_strdup ("521");
	_tmp24_ = g_strdup ("531");
	_tmp25_ = g_strdup ("521");
	_tmp26_ = g_strdup ("622");
	_tmp27_ = g_strdup ("621");
	_tmp28_ = g_strdup ("711");
	_tmp29_ = g_strdup ("701");
	_tmp30_ = g_strdup ("721");
	_tmp31_ = g_strdup ("701");
	_tmp32_ = g_strdup ("731");
	_tmp33_ = g_strdup ("701");
	_tmp34_ = g_strdup ("741");
	_tmp35_ = g_strdup ("701");
	_tmp36_ = g_strdup ("751");
	_tmp37_ = g_strdup ("701");
	_tmp38_ = g_strdup ("761");
	_tmp39_ = g_strdup ("701");
	_tmp40_ = g_strdup ("762");
	_tmp41_ = g_strdup ("701");
	_tmp42_ = g_new0 (gchar*, (21 * 2) + 1);
	_tmp42_[0] = _tmp0_;
	_tmp42_[1] = _tmp1_;
	_tmp42_[2] = _tmp2_;
	_tmp42_[3] = _tmp3_;
	_tmp42_[4] = _tmp4_;
	_tmp42_[5] = _tmp5_;
	_tmp42_[6] = _tmp6_;
	_tmp42_[7] = _tmp7_;
	_tmp42_[8] = _tmp8_;
	_tmp42_[9] = _tmp9_;
	_tmp42_[10] = _tmp10_;
	_tmp42_[11] = _tmp11_;
	_tmp42_[12] = _tmp12_;
	_tmp42_[13] = _tmp13_;
	_tmp42_[14] = _tmp14_;
	_tmp42_[15] = _tmp15_;
	_tmp42_[16] = _tmp16_;
	_tmp42_[17] = _tmp17_;
	_tmp42_[18] = _tmp18_;
	_tmp42_[19] = _tmp19_;
	_tmp42_[20] = _tmp20_;
	_tmp42_[21] = _tmp21_;
	_tmp42_[22] = _tmp22_;
	_tmp42_[23] = _tmp23_;
	_tmp42_[24] = _tmp24_;
	_tmp42_[25] = _tmp25_;
	_tmp42_[26] = _tmp26_;
	_tmp42_[27] = _tmp27_;
	_tmp42_[28] = _tmp28_;
	_tmp42_[29] = _tmp29_;
	_tmp42_[30] = _tmp30_;
	_tmp42_[31] = _tmp31_;
	_tmp42_[32] = _tmp32_;
	_tmp42_[33] = _tmp33_;
	_tmp42_[34] = _tmp34_;
	_tmp42_[35] = _tmp35_;
	_tmp42_[36] = _tmp36_;
	_tmp42_[37] = _tmp37_;
	_tmp42_[38] = _tmp38_;
	_tmp42_[39] = _tmp39_;
	_tmp42_[40] = _tmp40_;
	_tmp42_[41] = _tmp41_;
	replacements = _tmp42_;
	replacements_length1 = 21;
	replacements_length2 = 2;
	_tmp43_ = replacements;
	_tmp43__length1 = replacements_length1;
	_tmp43__length2 = replacements_length2;
	_tmp44_ = _tmp43__length1;
	lenrep = _tmp44_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp45_ = FALSE;
			_tmp45_ = TRUE;
			while (TRUE) {
				gchar** _tmp47_;
				gint _tmp47__length1;
				gint _tmp47__length2;
				const gchar* _tmp48_;
				if (!_tmp45_) {
					gint _tmp46_;
					_tmp46_ = i;
					i = _tmp46_ + 1;
				}
				_tmp45_ = FALSE;
				if (!(i < lenrep)) {
					break;
				}
				_tmp47_ = replacements;
				_tmp47__length1 = replacements_length1;
				_tmp47__length2 = replacements_length2;
				_tmp48_ = _tmp47_[(i * _tmp47__length2) + 0];
				if (g_strcmp0 (icon_id, _tmp48_) == 0) {
					gchar** _tmp49_;
					gint _tmp49__length1;
					gint _tmp49__length2;
					const gchar* _tmp50_;
					gchar* _tmp51_;
					_tmp49_ = replacements;
					_tmp49__length1 = replacements_length1;
					_tmp49__length2 = replacements_length2;
					_tmp50_ = _tmp49_[(i * _tmp49__length2) + 1];
					_tmp51_ = g_strdup (_tmp50_);
					result = _tmp51_;
					replacements = (_vala_array_free (replacements, replacements_length1 * replacements_length2, (GDestroyNotify) g_free), NULL);
					return result;
				}
			}
		}
	}
	_tmp52_ = g_strdup (icon_id);
	result = _tmp52_;
	replacements = (_vala_array_free (replacements, replacements_length1 * replacements_length2, (GDestroyNotify) g_free), NULL);
	return result;
}

gchar*
weather_show_functions_weekday (gint day)
{
	gchar** days = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_;
	gint days_length1;
	gint _days_size_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* result;
	_tmp0_ = g_strdup (_ ("Monday"));
	_tmp1_ = g_strdup (_ ("Tuesday"));
	_tmp2_ = g_strdup (_ ("Wednesday"));
	_tmp3_ = g_strdup (_ ("Thursday"));
	_tmp4_ = g_strdup (_ ("Friday"));
	_tmp5_ = g_strdup (_ ("Saturday"));
	_tmp6_ = g_strdup (_ ("Sunday"));
	_tmp7_ = g_new0 (gchar*, 7 + 1);
	_tmp7_[0] = _tmp0_;
	_tmp7_[1] = _tmp1_;
	_tmp7_[2] = _tmp2_;
	_tmp7_[3] = _tmp3_;
	_tmp7_[4] = _tmp4_;
	_tmp7_[5] = _tmp5_;
	_tmp7_[6] = _tmp6_;
	days = _tmp7_;
	days_length1 = 7;
	_days_size_ = days_length1;
	_tmp8_ = days[day - 1];
	_tmp9_ = g_strdup (_tmp8_);
	result = _tmp9_;
	days = (_vala_array_free (days, days_length1, (GDestroyNotify) g_free), NULL);
	return result;
}

GeeArrayList*
weather_show_functions_sort_timespan (GeeHashMap* span)
{
	GeeArrayList* sortlist = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp13_;
	GeeArrayList* result;
	g_return_val_if_fail (span != NULL, NULL);
	_tmp0_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
	sortlist = _tmp0_;
	{
		GeeIterator* _entry_it = NULL;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp1_ = gee_abstract_map_get_entries ((GeeAbstractMap*) span);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_entry_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GeeArrayList* _tmp9_;
			GeeMapEntry* _tmp10_;
			gconstpointer _tmp11_;
			gconstpointer _tmp12_;
			_tmp6_ = _entry_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _entry_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			entry = (GeeMapEntry*) _tmp8_;
			_tmp9_ = sortlist;
			_tmp10_ = entry;
			_tmp11_ = gee_map_entry_get_key (_tmp10_);
			_tmp12_ = _tmp11_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, (gpointer) ((gintptr) _tmp12_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp13_ = sortlist;
	gee_list_sort ((GeeList*) _tmp13_, NULL, NULL, NULL);
	result = sortlist;
	return result;
}

gint
weather_show_functions_get_stringindex (const gchar* s,
                                        gchar** arr,
                                        gint arr_length1)
{
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				const gchar* _tmp2_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(i < arr_length1)) {
					break;
				}
				_tmp2_ = arr[i];
				if (g_strcmp0 (s, _tmp2_) == 0) {
					result = i;
					return result;
				}
			}
		}
	}
	result = -1;
	return result;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static void
_vala_array_add1 (gchar** * array,
                  gint* length,
                  gint* size,
                  gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

gchar**
weather_show_functions_get_matches (const gchar* lookfor,
                                    gint* result_length1)
{
	gchar* citiesfile = NULL;
	gchar* _tmp0_;
	GFile* datasrc = NULL;
	const gchar* _tmp1_;
	GFile* _tmp2_;
	gchar* fixed = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GError* _inner_error0_ = NULL;
	gchar** result;
	g_return_val_if_fail (lookfor != NULL, NULL);
	_tmp0_ = g_build_filename (WEATHERSHOW_DATADIR, "cities", NULL);
	citiesfile = _tmp0_;
	_tmp1_ = citiesfile;
	_tmp2_ = g_file_new_for_path (_tmp1_);
	datasrc = _tmp2_;
	_tmp3_ = g_utf8_strdown (lookfor, (gssize) -1);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_str_to_ascii (_tmp4_, NULL);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	fixed = _tmp6_;
	{
		GFileInputStream* _tmp7_ = NULL;
		GFile* _tmp8_;
		GFileInputStream* _tmp9_;
		GDataInputStream* dis = NULL;
		GDataInputStream* _tmp10_;
		gchar* line = NULL;
		gchar** matches = NULL;
		gchar** _tmp11_;
		gint matches_length1;
		gint _matches_size_;
		gchar** _tmp26_;
		gint _tmp26__length1;
		_tmp8_ = datasrc;
		_tmp9_ = g_file_read (_tmp8_, NULL, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp10_ = g_data_input_stream_new ((GInputStream*) _tmp7_);
		dis = _tmp10_;
		_tmp11_ = g_new0 (gchar*, 0 + 1);
		matches = _tmp11_;
		matches_length1 = 0;
		_matches_size_ = matches_length1;
		while (TRUE) {
			gchar* _tmp12_ = NULL;
			GDataInputStream* _tmp13_;
			gchar* _tmp14_;
			gchar* _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			gchar* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			const gchar* _tmp22_;
			gboolean _tmp23_;
			_tmp13_ = dis;
			_tmp14_ = g_data_input_stream_read_line (_tmp13_, NULL, NULL, &_inner_error0_);
			_tmp12_ = _tmp14_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				matches = (_vala_array_free (matches, matches_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (line);
				_g_object_unref0 (dis);
				_g_object_unref0 (_tmp7_);
				goto __catch0_g_error;
			}
			_tmp15_ = _tmp12_;
			_tmp12_ = NULL;
			_g_free0 (line);
			line = _tmp15_;
			_tmp16_ = line;
			if (!(_tmp16_ != NULL)) {
				_g_free0 (_tmp12_);
				break;
			}
			_tmp17_ = line;
			_tmp18_ = g_utf8_strdown (_tmp17_, (gssize) -1);
			_tmp19_ = _tmp18_;
			_tmp20_ = g_str_to_ascii (_tmp19_, NULL);
			_tmp21_ = _tmp20_;
			_tmp22_ = fixed;
			_tmp23_ = string_contains (_tmp21_, _tmp22_);
			_g_free0 (_tmp21_);
			_g_free0 (_tmp19_);
			if (_tmp23_) {
				const gchar* _tmp24_;
				gchar* _tmp25_;
				_tmp24_ = line;
				_tmp25_ = g_strdup (_tmp24_);
				_vala_array_add1 (&matches, &matches_length1, &_matches_size_, _tmp25_);
			}
			_g_free0 (_tmp12_);
		}
		_tmp26_ = matches;
		_tmp26__length1 = matches_length1;
		if (result_length1) {
			*result_length1 = _tmp26__length1;
		}
		result = _tmp26_;
		_g_free0 (line);
		_g_object_unref0 (dis);
		_g_object_unref0 (_tmp7_);
		_g_free0 (fixed);
		_g_object_unref0 (datasrc);
		_g_free0 (citiesfile);
		return result;
	}
	goto __finally0;
	__catch0_g_error:
	{
		gchar** _tmp27_;
		gchar** _tmp28_;
		gint _tmp28__length1;
		g_clear_error (&_inner_error0_);
		_tmp27_ = g_new0 (gchar*, 0 + 1);
		_tmp28_ = _tmp27_;
		_tmp28__length1 = 0;
		if (result_length1) {
			*result_length1 = _tmp28__length1;
		}
		result = _tmp28_;
		_g_free0 (fixed);
		_g_object_unref0 (datasrc);
		_g_free0 (citiesfile);
		return result;
	}
	__finally0:
	_g_free0 (fixed);
	_g_object_unref0 (datasrc);
	_g_free0 (citiesfile);
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

gchar*
weather_show_applet_to_hrs (gint t)
{
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* result;
	if (t < 10) {
		gchar* _tmp0_;
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp0_ = g_strdup_printf ("%i", t);
		_tmp1_ = _tmp0_;
		_tmp2_ = g_strconcat ("0", _tmp1_, NULL);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_strconcat (_tmp3_, ":00", NULL);
		_tmp5_ = _tmp4_;
		_g_free0 (_tmp3_);
		_g_free0 (_tmp1_);
		result = _tmp5_;
		return result;
	}
	_tmp6_ = g_strdup_printf ("%i", t);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strconcat (_tmp7_, ":00", NULL);
	_tmp9_ = _tmp8_;
	_g_free0 (_tmp7_);
	result = _tmp9_;
	return result;
}

void
weather_show_applet_update_weathershow (void)
{
	WeatherShowAppletGetWeatherdata* weather_obj = NULL;
	WeatherShowAppletGetWeatherdata* _tmp0_;
	_tmp0_ = weather_show_applet_get_weatherdata_new ();
	weather_obj = _tmp0_;
	weather_show_applet_get_weather (weather_obj);
	_weather_show_applet_get_weatherdata_unref0 (weather_obj);
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		_g_object_unref0 (_data1_->sorted_keys);
		_g_object_unref0 (_data1_->result_forecast);
		g_slice_free (Block1Data, _data1_);
	}
}

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

static void
_vala_array_add2 (GtkGrid** * array,
                  gint* length,
                  gint* size,
                  GtkGrid* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GtkGrid*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add3 (GtkGrid** * array,
                  gint* length,
                  gint* size,
                  GtkGrid* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GtkGrid*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
___lambda5_ (Block1Data* _data1_)
{
	GtkGrid** _tmp0_;
	gint _tmp0__length1;
	GtkStack* _tmp3_;
	GtkGrid** _tmp5_;
	GtkStack* _tmp11_;
	GtkStack* _tmp12_;
	GtkStack* _tmp13_;
	GtkStack* _tmp14_;
	GtkStack* _tmp15_;
	GtkGrid* currgrid = NULL;
	GtkGrid** _tmp16_;
	gint _tmp16__length1;
	GtkGrid* _tmp17_;
	GtkGrid* _tmp18_;
	gboolean result;
	_tmp0_ = weather_show_applet_popover_subgrids;
	_tmp0__length1 = weather_show_applet_popover_subgrids_length1;
	{
		GtkGrid** gr_collection = NULL;
		gint gr_collection_length1 = 0;
		gint _gr_collection_size_ = 0;
		gint gr_it = 0;
		gr_collection = _tmp0_;
		gr_collection_length1 = _tmp0__length1;
		for (gr_it = 0; gr_it < gr_collection_length1; gr_it = gr_it + 1) {
			GtkGrid* _tmp1_;
			GtkGrid* gr = NULL;
			_tmp1_ = _g_object_ref0 (gr_collection[gr_it]);
			gr = _tmp1_;
			{
				GtkGrid* _tmp2_;
				_tmp2_ = gr;
				gtk_widget_destroy ((GtkWidget*) _tmp2_);
				_g_object_unref0 (gr);
			}
		}
	}
	_tmp3_ = weather_show_applet_popoverstack;
	if (_tmp3_ != NULL) {
		GtkStack* _tmp4_;
		_tmp4_ = weather_show_applet_popoverstack;
		gtk_widget_destroy ((GtkWidget*) _tmp4_);
	}
	_tmp5_ = g_new0 (GtkGrid*, 0 + 1);
	weather_show_applet_popover_subgrids = (_vala_array_free (weather_show_applet_popover_subgrids, weather_show_applet_popover_subgrids_length1, (GDestroyNotify) g_object_unref), NULL);
	weather_show_applet_popover_subgrids = _tmp5_;
	weather_show_applet_popover_subgrids_length1 = 0;
	_weather_show_applet_popover_subgrids_size_ = weather_show_applet_popover_subgrids_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp6_ = FALSE;
			_tmp6_ = TRUE;
			while (TRUE) {
				GtkGrid* newpagegrid = NULL;
				GtkGrid* _tmp8_;
				GtkGrid* _tmp9_;
				GtkGrid* _tmp10_;
				if (!_tmp6_) {
					gint _tmp7_;
					_tmp7_ = i;
					i = _tmp7_ + 1;
				}
				_tmp6_ = FALSE;
				if (!(i < 4)) {
					break;
				}
				_tmp8_ = (GtkGrid*) gtk_grid_new ();
				g_object_ref_sink (_tmp8_);
				newpagegrid = _tmp8_;
				_tmp9_ = newpagegrid;
				_tmp10_ = _g_object_ref0 (_tmp9_);
				_vala_array_add2 (&weather_show_applet_popover_subgrids, &weather_show_applet_popover_subgrids_length1, &_weather_show_applet_popover_subgrids_size_, _tmp10_);
				_g_object_unref0 (newpagegrid);
			}
		}
	}
	_tmp11_ = (GtkStack*) gtk_stack_new ();
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (weather_show_applet_popoverstack);
	weather_show_applet_popoverstack = _tmp11_;
	_tmp12_ = weather_show_applet_popoverstack;
	gtk_stack_set_transition_type (_tmp12_, GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT);
	_tmp13_ = weather_show_applet_popoverstack;
	gtk_stack_set_transition_duration (_tmp13_, (guint) 500);
	_tmp14_ = weather_show_applet_popoverstack;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp14_, TRUE);
	_tmp15_ = weather_show_applet_popoverstack;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp15_, TRUE);
	_tmp16_ = weather_show_applet_popover_subgrids;
	_tmp16__length1 = weather_show_applet_popover_subgrids_length1;
	_tmp17_ = _tmp16_[0];
	_tmp18_ = _g_object_ref0 (_tmp17_);
	currgrid = _tmp18_;
	{
		GeeArrayList* _stamp_list = NULL;
		GeeArrayList* _tmp19_;
		gint _stamp_size = 0;
		GeeArrayList* _tmp20_;
		gint _tmp21_;
		gint _tmp22_;
		gint _stamp_index = 0;
		_tmp19_ = _data1_->sorted_keys;
		_stamp_list = _tmp19_;
		_tmp20_ = _stamp_list;
		_tmp21_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp20_);
		_tmp22_ = _tmp21_;
		_stamp_size = _tmp22_;
		_stamp_index = -1;
		while (TRUE) {
			gint _tmp23_;
			gint _tmp24_;
			gint stamp = 0;
			GeeArrayList* _tmp25_;
			gpointer _tmp26_;
			GDateTime* time = NULL;
			GDateTime* _tmp27_;
			gchar* hour = NULL;
			GDateTime* _tmp28_;
			gchar* _tmp29_;
			gchar* day = NULL;
			GDateTime* _tmp30_;
			gchar* _tmp31_;
			GtkGrid** _tmp32_;
			gint _tmp32__length1;
			GtkGrid* _tmp33_;
			GtkGrid* _tmp34_;
			GtkGrid* _tmp35_;
			GtkGrid* _tmp36_;
			GtkLabel* _tmp37_;
			GtkLabel* _tmp38_;
			GtkGrid* _tmp39_;
			GtkLabel* _tmp40_;
			GtkLabel* _tmp41_;
			GtkImage* weather_image = NULL;
			GtkImage* _tmp42_;
			GtkGrid* _tmp43_;
			GtkImage* _tmp44_;
			GtkLabel* timelabel = NULL;
			const gchar* _tmp45_;
			GtkLabel* _tmp46_;
			GtkGrid* _tmp47_;
			GtkLabel* _tmp48_;
			GtkLabel* daylabel = NULL;
			const gchar* _tmp49_;
			GtkLabel* _tmp50_;
			GtkGrid* _tmp51_;
			GtkLabel* _tmp52_;
			gchar** labelsrc = NULL;
			GeeHashMap* _tmp53_;
			gpointer _tmp54_;
			gchar* _tmp55_;
			gchar** _tmp56_;
			gchar** _tmp57_;
			gchar** _tmp58_;
			gint _tmp58__length1;
			gint labelsrc_length1;
			gint _labelsrc_size_;
			gchar* iconname = NULL;
			gchar** _tmp59_;
			gint _tmp59__length1;
			const gchar* _tmp60_;
			gchar* _tmp61_;
			gchar* _tmp62_;
			gchar** _tmp63_;
			gint _tmp63__length1;
			const gchar* _tmp64_;
			gchar* _tmp65_;
			gchar* _tmp66_;
			gint ic_index = 0;
			const gchar* _tmp67_;
			gchar** _tmp68_;
			gint _tmp68__length1;
			gint line_index = 0;
			gchar** _tmp73_;
			gint _tmp73__length1;
			GtkImage* _tmp79_;
			GdkPixbuf** _tmp80_;
			gint _tmp80__length1;
			GdkPixbuf* _tmp81_;
			_stamp_index = _stamp_index + 1;
			_tmp23_ = _stamp_index;
			_tmp24_ = _stamp_size;
			if (!(_tmp23_ < _tmp24_)) {
				break;
			}
			_tmp25_ = _stamp_list;
			_tmp26_ = gee_abstract_list_get ((GeeAbstractList*) _tmp25_, _stamp_index);
			stamp = (gint) ((gintptr) _tmp26_);
			_tmp27_ = g_date_time_new_from_unix_local ((gint64) stamp);
			time = _tmp27_;
			_tmp28_ = time;
			_tmp29_ = weather_show_applet_to_hrs (g_date_time_get_hour (_tmp28_));
			hour = _tmp29_;
			_tmp30_ = time;
			_tmp31_ = weather_show_functions_weekday (g_date_time_get_day_of_week (_tmp30_));
			day = _tmp31_;
			_tmp32_ = weather_show_applet_popover_subgrids;
			_tmp32__length1 = weather_show_applet_popover_subgrids_length1;
			_tmp33_ = _tmp32_[_data1_->curr_index];
			_tmp34_ = _g_object_ref0 (_tmp33_);
			_g_object_unref0 (currgrid);
			currgrid = _tmp34_;
			_tmp35_ = currgrid;
			gtk_grid_set_column_spacing (_tmp35_, (guint) 40);
			_tmp36_ = currgrid;
			_tmp37_ = (GtkLabel*) gtk_label_new ("");
			g_object_ref_sink (_tmp37_);
			_tmp38_ = _tmp37_;
			gtk_grid_attach (_tmp36_, (GtkWidget*) _tmp38_, 0, 0, 1, 1);
			_g_object_unref0 (_tmp38_);
			_tmp39_ = currgrid;
			_tmp40_ = (GtkLabel*) gtk_label_new ("");
			g_object_ref_sink (_tmp40_);
			_tmp41_ = _tmp40_;
			gtk_grid_attach (_tmp39_, (GtkWidget*) _tmp41_, 0, 10, 1, 1);
			_g_object_unref0 (_tmp41_);
			_tmp42_ = (GtkImage*) gtk_image_new ();
			g_object_ref_sink (_tmp42_);
			weather_image = _tmp42_;
			_tmp43_ = currgrid;
			_tmp44_ = weather_image;
			gtk_grid_attach (_tmp43_, (GtkWidget*) _tmp44_, _data1_->n_fc, 3, 1, 1);
			_tmp45_ = hour;
			_tmp46_ = (GtkLabel*) gtk_label_new (_tmp45_);
			g_object_ref_sink (_tmp46_);
			timelabel = _tmp46_;
			_tmp47_ = currgrid;
			_tmp48_ = timelabel;
			gtk_grid_attach (_tmp47_, (GtkWidget*) _tmp48_, _data1_->n_fc, 2, 1, 1);
			_tmp49_ = day;
			_tmp50_ = (GtkLabel*) gtk_label_new (_tmp49_);
			g_object_ref_sink (_tmp50_);
			daylabel = _tmp50_;
			_tmp51_ = currgrid;
			_tmp52_ = daylabel;
			gtk_grid_attach (_tmp51_, (GtkWidget*) _tmp52_, _data1_->n_fc, 1, 1, 1);
			_tmp53_ = _data1_->result_forecast;
			_tmp54_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp53_, (gpointer) ((gintptr) stamp));
			_tmp55_ = (gchar*) _tmp54_;
			_tmp57_ = _tmp56_ = g_strsplit (_tmp55_, "\n", 0);
			_tmp58_ = _tmp57_;
			_tmp58__length1 = _vala_array_length (_tmp56_);
			_g_free0 (_tmp55_);
			labelsrc = _tmp58_;
			labelsrc_length1 = _tmp58__length1;
			_labelsrc_size_ = labelsrc_length1;
			_tmp59_ = labelsrc;
			_tmp59__length1 = labelsrc_length1;
			_tmp60_ = _tmp59_[0];
			_tmp61_ = weather_show_functions_find_mappedid (_tmp60_);
			_tmp62_ = _tmp61_;
			_tmp63_ = labelsrc;
			_tmp63__length1 = labelsrc_length1;
			_tmp64_ = _tmp63_[1];
			_tmp65_ = g_strconcat (_tmp62_, _tmp64_, NULL);
			_tmp66_ = _tmp65_;
			_g_free0 (_tmp62_);
			iconname = _tmp66_;
			_tmp67_ = iconname;
			_tmp68_ = weather_show_applet_iconnames;
			_tmp68__length1 = weather_show_applet_iconnames_length1;
			ic_index = weather_show_functions_get_stringindex (_tmp67_, _tmp68_, (gint) _tmp68__length1);
			if (ic_index == -1) {
				gchar* loglocation = NULL;
				gchar* _tmp69_;
				const gchar* _tmp70_;
				const gchar* _tmp71_;
				gchar** _tmp72_;
				gint _tmp72__length1;
				_tmp69_ = weather_show_applet_create_dirs_file (".config/budgie-extras", "icon_error");
				loglocation = _tmp69_;
				_tmp70_ = loglocation;
				_tmp71_ = iconname;
				_tmp72_ = weather_show_applet_iconnames;
				_tmp72__length1 = weather_show_applet_iconnames_length1;
				ic_index = weather_show_functions_escape_missingicon (_tmp70_, _tmp71_, _tmp72_, (gint) _tmp72__length1);
				_g_free0 (loglocation);
			}
			line_index = 4;
			_tmp73_ = labelsrc;
			_tmp73__length1 = labelsrc_length1;
			{
				gchar** l_collection = NULL;
				gint l_collection_length1 = 0;
				gint _l_collection_size_ = 0;
				gint l_it = 0;
				l_collection = _tmp73_ + 2;
				l_collection_length1 = 6 - 2;
				for (l_it = 0; l_it < l_collection_length1; l_it = l_it + 1) {
					gchar* _tmp74_;
					gchar* l = NULL;
					_tmp74_ = g_strdup (l_collection[l_it]);
					l = _tmp74_;
					{
						GtkGrid* _tmp75_;
						const gchar* _tmp76_;
						GtkLabel* _tmp77_;
						GtkLabel* _tmp78_;
						_tmp75_ = currgrid;
						_tmp76_ = l;
						_tmp77_ = (GtkLabel*) gtk_label_new (_tmp76_);
						g_object_ref_sink (_tmp77_);
						_tmp78_ = _tmp77_;
						gtk_grid_attach (_tmp75_, (GtkWidget*) _tmp78_, _data1_->n_fc, line_index, 1, 1);
						_g_object_unref0 (_tmp78_);
						line_index += 1;
						_g_free0 (l);
					}
				}
			}
			_tmp79_ = weather_image;
			_tmp80_ = weather_show_applet_iconpixbufs_large;
			_tmp80__length1 = weather_show_applet_iconpixbufs_large_length1;
			_tmp81_ = _tmp80_[ic_index];
			gtk_image_set_from_pixbuf (_tmp79_, _tmp81_);
			_data1_->n_fc += 1;
			if (_data1_->n_fc == 4) {
				GtkGrid* _tmp82_;
				GtkGrid* _tmp83_;
				GtkGrid* _tmp84_;
				GtkStack* _tmp85_;
				GtkGrid* _tmp86_;
				gchar* _tmp87_;
				gchar* _tmp88_;
				gchar* _tmp89_;
				gchar* _tmp90_;
				GtkStack* _tmp93_;
				GtkGrid* _tmp94_;
				GtkGrid* _tmp95_;
				_tmp82_ = currgrid;
				gtk_grid_set_column_homogeneous (_tmp82_, TRUE);
				_tmp83_ = currgrid;
				_tmp84_ = _g_object_ref0 (_tmp83_);
				_vala_array_add3 (&weather_show_applet_popover_subgrids, &weather_show_applet_popover_subgrids_length1, &_weather_show_applet_popover_subgrids_size_, _tmp84_);
				_tmp85_ = weather_show_applet_popoverstack;
				_tmp86_ = currgrid;
				_tmp87_ = g_strdup_printf ("%i", _data1_->curr_index);
				_tmp88_ = _tmp87_;
				_tmp89_ = g_strconcat ("forecast", _tmp88_, NULL);
				_tmp90_ = _tmp89_;
				gtk_stack_add_named (_tmp85_, (GtkWidget*) _tmp86_, _tmp90_);
				_g_free0 (_tmp90_);
				_g_free0 (_tmp88_);
				_data1_->curr_index += 1;
				if (_data1_->curr_index == 4) {
					GtkGrid* _tmp91_;
					GtkStack* _tmp92_;
					_tmp91_ = weather_show_applet_popover_mastergrid;
					_tmp92_ = weather_show_applet_popoverstack;
					gtk_grid_attach (_tmp91_, (GtkWidget*) _tmp92_, 1, 0, 1, 1);
				}
				_tmp93_ = weather_show_applet_popoverstack;
				gtk_stack_set_visible_child_name (_tmp93_, "forecast0");
				_tmp94_ = currgrid;
				gtk_widget_show_all ((GtkWidget*) _tmp94_);
				_tmp95_ = weather_show_applet_popover_mastergrid;
				gtk_widget_show_all ((GtkWidget*) _tmp95_);
				_data1_->n_fc = 0;
			}
			_g_free0 (iconname);
			labelsrc = (_vala_array_free (labelsrc, labelsrc_length1, (GDestroyNotify) g_free), NULL);
			_g_object_unref0 (daylabel);
			_g_object_unref0 (timelabel);
			_g_object_unref0 (weather_image);
			_g_free0 (day);
			_g_free0 (hour);
			_g_date_time_unref0 (time);
		}
	}
	result = FALSE;
	_g_object_unref0 (currgrid);
	return result;
}

static gboolean
____lambda5__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda5_ (self);
	return result;
}

void
weather_show_applet_get_weather (WeatherShowAppletGetWeatherdata* weather_obj)
{
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (weather_obj != NULL);
	if (weather_show_applet_show_forecast == TRUE) {
		Block1Data* _data1_;
		GeeHashMap* _tmp0_;
		GeeHashMap* _tmp1_;
		GeeArrayList* _tmp2_;
		_data1_ = g_slice_new0 (Block1Data);
		_data1_->_ref_count_ = 1;
		_tmp0_ = weather_show_applet_get_weatherdata_get_forecast (weather_obj);
		_data1_->result_forecast = _tmp0_;
		_tmp1_ = _data1_->result_forecast;
		_tmp2_ = weather_show_functions_sort_timespan (_tmp1_);
		_data1_->sorted_keys = _tmp2_;
		weather_show_applet_fc_stackindex = 0;
		_data1_->n_fc = 0;
		_data1_->curr_index = 0;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda5__gsource_func, block1_data_ref (_data1_), block1_data_unref);
		block1_data_unref (_data1_);
		_data1_ = NULL;
	}
	if (weather_show_applet_show_ondesktop == TRUE) {
		_tmp3_ = TRUE;
	} else {
		_tmp3_ = weather_show_applet_dynamic_icon == TRUE;
	}
	if (_tmp3_) {
		gchar* result_current = NULL;
		gchar* _tmp4_;
		_tmp4_ = weather_show_applet_get_weatherdata_get_current (weather_obj);
		result_current = _tmp4_;
		if (weather_show_applet_show_ondesktop == TRUE) {
			const gchar* _tmp5_ = NULL;
			const gchar* _tmp6_;
			gchar* tmpdir = NULL;
			gchar* _tmp8_;
			gchar* src = NULL;
			const gchar* _tmp9_;
			gchar* _tmp10_;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			_tmp6_ = g_getenv ("XDG_RUNTIME_DIR");
			_tmp5_ = _tmp6_;
			if (_tmp5_ == NULL) {
				const gchar* _tmp7_;
				_tmp7_ = g_getenv ("HOME");
				_tmp5_ = _tmp7_;
			}
			_tmp8_ = g_strdup (_tmp5_);
			tmpdir = _tmp8_;
			_tmp9_ = tmpdir;
			_tmp10_ = g_build_path (G_DIR_SEPARATOR_S, _tmp9_, ".weatherdata", NULL);
			src = _tmp10_;
			_tmp11_ = src;
			_tmp12_ = result_current;
			weather_show_functions_write_tofile (_tmp11_, _tmp12_);
			_g_free0 (src);
			_g_free0 (tmpdir);
		}
		_g_free0 (result_current);
	}
}

gchar*
weather_show_applet_currtime (void)
{
	GDateTime* logtime = NULL;
	GDateTime* _tmp0_;
	gint hrs = 0;
	GDateTime* _tmp1_;
	gint mins = 0;
	GDateTime* _tmp2_;
	gchar* pre = NULL;
	gchar* _tmp3_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* result;
	_tmp0_ = g_date_time_new_now_local ();
	logtime = _tmp0_;
	_tmp1_ = logtime;
	hrs = g_date_time_get_hour (_tmp1_);
	_tmp2_ = logtime;
	mins = g_date_time_get_minute (_tmp2_);
	_tmp3_ = g_strdup ("");
	pre = _tmp3_;
	if (mins < 10) {
		gchar* _tmp4_;
		_tmp4_ = g_strdup ("0");
		_g_free0 (pre);
		pre = _tmp4_;
	}
	_tmp5_ = g_strdup_printf ("%i", hrs);
	_tmp6_ = _tmp5_;
	_tmp7_ = pre;
	_tmp8_ = string_to_string (_tmp7_);
	_tmp9_ = g_strdup_printf ("%i", mins);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strconcat (_tmp6_, ":", _tmp8_, _tmp10_, NULL);
	_tmp12_ = _tmp11_;
	_g_free0 (_tmp10_);
	_g_free0 (_tmp6_);
	result = _tmp12_;
	_g_free0 (pre);
	_g_date_time_unref0 (logtime);
	return result;
}

gchar*
weather_show_applet_create_dirs_file (const gchar* subpath,
                                      const gchar* filename)
{
	gchar* homedir = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* fullpath = NULL;
	gchar* _tmp2_;
	GFile* file = NULL;
	GFile* _tmp3_;
	gchar* _tmp4_;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (subpath != NULL, NULL);
	g_return_val_if_fail (filename != NULL, NULL);
	_tmp0_ = g_get_home_dir ();
	_tmp1_ = g_strdup (_tmp0_);
	homedir = _tmp1_;
	_tmp2_ = g_build_path (G_DIR_SEPARATOR_S, homedir, subpath, filename, NULL);
	fullpath = _tmp2_;
	_tmp3_ = g_file_new_for_path (fullpath);
	file = _tmp3_;
	{
		g_file_make_directory_with_parents (file, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (file);
		_g_free0 (fullpath);
		_g_free0 (homedir);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	_tmp4_ = g_build_filename (fullpath, filename, NULL);
	result = _tmp4_;
	_g_object_unref0 (file);
	_g_free0 (fullpath);
	_g_free0 (homedir);
	return result;
}

static gchar**
_vala_array_dup2 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static gchar**
_vala_array_dup3 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static void
_vala_array_add4 (gchar** * array,
                  gint* length,
                  gint* size,
                  gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

void
weather_show_applet_update_log (const gchar* wtype,
                                const gchar* output)
{
	gchar* loglocation = NULL;
	gchar* _tmp0_;
	gchar* logtime = NULL;
	gchar* _tmp4_;
	gchar* glue = NULL;
	gchar* _tmp5_;
	gchar* file_contents = NULL;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (wtype != NULL);
	g_return_if_fail (output != NULL);
	_tmp0_ = weather_show_applet_create_dirs_file (".config/budgie-extras", "weatherlog");
	loglocation = _tmp0_;
	{
		GFile* curr_log = NULL;
		GFile* _tmp1_;
		GFileOutputStream* _tmp2_;
		GFileOutputStream* _tmp3_;
		_tmp1_ = g_file_new_for_path (loglocation);
		curr_log = _tmp1_;
		_tmp2_ = g_file_create (curr_log, G_FILE_CREATE_NONE, NULL, &_inner_error0_);
		_tmp3_ = _tmp2_;
		_g_object_unref0 (_tmp3_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (curr_log);
			goto __catch0_g_error;
		}
		_g_object_unref0 (curr_log);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (loglocation);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_tmp4_ = weather_show_applet_currtime ();
	logtime = _tmp4_;
	_tmp5_ = g_strdup ("\n=\n");
	glue = _tmp5_;
	{
		gchar* _tmp6_ = NULL;
		gchar** records = NULL;
		gchar** _tmp7_;
		gchar** _tmp8_;
		gint records_length1;
		gint _records_size_;
		gint length = 0;
		gchar** _tmp9_;
		gint _tmp9__length1;
		gchar** keeprecords = NULL;
		gint keeprecords_length1 = 0;
		gint _keeprecords_size_ = 0;
		gchar* log_output = NULL;
		gchar* _tmp14_;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* newlog = NULL;
		gchar** _tmp17_;
		gint _tmp17__length1;
		gchar* _tmp18_;
		const gchar* _tmp19_;
		g_file_get_contents (loglocation, &_tmp6_, NULL, &_inner_error0_);
		_g_free0 (file_contents);
		file_contents = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch1_g_error;
		}
		_tmp8_ = _tmp7_ = g_strsplit (file_contents, glue, 0);
		records = _tmp8_;
		records_length1 = _vala_array_length (_tmp7_);
		_records_size_ = records_length1;
		_tmp9_ = records;
		_tmp9__length1 = records_length1;
		length = _tmp9__length1;
		if (length > 40) {
			gchar** _tmp10_;
			gint _tmp10__length1;
			gchar** _tmp11_;
			gint _tmp11__length1;
			_tmp10_ = records;
			_tmp10__length1 = records_length1;
			_tmp11_ = (_tmp10_ != NULL) ? _vala_array_dup2 (_tmp10_ + (length - 40), length - (length - 40)) : _tmp10_;
			_tmp11__length1 = length - (length - 40);
			keeprecords = (_vala_array_free (keeprecords, keeprecords_length1, (GDestroyNotify) g_free), NULL);
			keeprecords = _tmp11_;
			keeprecords_length1 = _tmp11__length1;
			_keeprecords_size_ = keeprecords_length1;
		} else {
			gchar** _tmp12_;
			gint _tmp12__length1;
			gchar** _tmp13_;
			gint _tmp13__length1;
			_tmp12_ = records;
			_tmp12__length1 = records_length1;
			_tmp13_ = (_tmp12_ != NULL) ? _vala_array_dup3 (_tmp12_, _tmp12__length1) : _tmp12_;
			_tmp13__length1 = _tmp12__length1;
			keeprecords = (_vala_array_free (keeprecords, keeprecords_length1, (GDestroyNotify) g_free), NULL);
			keeprecords = _tmp13_;
			keeprecords_length1 = _tmp13__length1;
			_keeprecords_size_ = keeprecords_length1;
		}
		_tmp14_ = g_strconcat (wtype, " time: ", logtime, "\n\n", output, glue, NULL);
		log_output = _tmp14_;
		_tmp15_ = log_output;
		_tmp16_ = g_strdup (_tmp15_);
		_vala_array_add4 (&keeprecords, &keeprecords_length1, &_keeprecords_size_, _tmp16_);
		_tmp17_ = keeprecords;
		_tmp17__length1 = keeprecords_length1;
		_tmp18_ = _vala_g_strjoinv (glue, _tmp17_, (gint) _tmp17__length1);
		newlog = _tmp18_;
		_tmp19_ = newlog;
		weather_show_functions_write_tofile (loglocation, _tmp19_);
		_g_free0 (newlog);
		_g_free0 (log_output);
		keeprecords = (_vala_array_free (keeprecords, keeprecords_length1, (GDestroyNotify) g_free), NULL);
		records = (_vala_array_free (records, records_length1, (GDestroyNotify) g_free), NULL);
	}
	goto __finally1;
	__catch1_g_error:
	{
		g_clear_error (&_inner_error0_);
		g_print ("Error writing to logfile\n");
	}
	__finally1:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (file_contents);
		_g_free0 (glue);
		_g_free0 (logtime);
		_g_free0 (loglocation);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_free0 (file_contents);
	_g_free0 (glue);
	_g_free0 (logtime);
	_g_free0 (loglocation);
}

static gint
_vala_g_bytes_get_length (GBytes* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = (gint) g_bytes_get_size (self);
	return result;
}

static gchar*
weather_show_applet_get_weatherdata_fetch_fromsite (WeatherShowAppletGetWeatherdata* self,
                                                    const gchar* wtype,
                                                    const gchar* city)
{
	gchar* website = NULL;
	gchar* _tmp0_;
	gchar* langstring = NULL;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* url = NULL;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	SoupSession* session = NULL;
	SoupSession* _tmp7_;
	SoupMessage* message = NULL;
	const gchar* _tmp8_;
	SoupMessage* _tmp9_;
	SoupMessage* _tmp10_;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (wtype != NULL, NULL);
	g_return_val_if_fail (city != NULL, NULL);
	_tmp0_ = g_strdup ("http://api.openweathermap.org/data/2.5/");
	website = _tmp0_;
	_tmp1_ = weather_show_applet_lang;
	_tmp2_ = g_strconcat ("&", "lang=", _tmp1_, NULL);
	langstring = _tmp2_;
	_tmp3_ = website;
	_tmp4_ = weather_show_applet_key;
	_tmp5_ = langstring;
	_tmp6_ = g_strconcat (_tmp3_, wtype, "?id=", city, "&APPID=", _tmp4_, "&", _tmp5_, NULL);
	url = _tmp6_;
	_tmp7_ = soup_session_new ();
	session = _tmp7_;
	_tmp8_ = url;
	_tmp9_ = soup_message_new ("GET", _tmp8_);
	message = _tmp9_;
	_tmp10_ = message;
	soup_message_add_flags (_tmp10_, SOUP_MESSAGE_NO_REDIRECT);
	{
		GBytes* retbytes = NULL;
		SoupSession* _tmp11_;
		SoupMessage* _tmp12_;
		GBytes* _tmp13_;
		GBytes* _tmp14_;
		gint _tmp15_;
		gint _tmp16_;
		gchar* output = NULL;
		GBytes* _tmp18_;
		gsize _tmp19_ = 0;
		guint8* _tmp20_;
		gchar* _tmp21_;
		const gchar* _tmp22_;
		gchar* forecast_ok = NULL;
		gchar* _tmp23_;
		gchar* weather_ok = NULL;
		gchar* _tmp24_;
		gboolean _tmp25_ = FALSE;
		const gchar* _tmp26_;
		const gchar* _tmp27_;
		_tmp11_ = session;
		_tmp12_ = message;
		_tmp13_ = soup_session_send_and_read (_tmp11_, _tmp12_, NULL, &_inner_error0_);
		retbytes = _tmp13_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp14_ = retbytes;
		_tmp15_ = _vala_g_bytes_get_length (_tmp14_);
		_tmp16_ = _tmp15_;
		if (_tmp16_ == 0) {
			gchar* _tmp17_;
			_tmp17_ = g_strdup ("no data");
			result = _tmp17_;
			_g_bytes_unref0 (retbytes);
			_g_object_unref0 (message);
			_g_object_unref0 (session);
			_g_free0 (url);
			_g_free0 (langstring);
			_g_free0 (website);
			return result;
		}
		_tmp18_ = retbytes;
		_tmp20_ = g_bytes_get_data (_tmp18_, &_tmp19_);
		_tmp21_ = g_strdup ((const gchar*) _tmp20_);
		output = _tmp21_;
		_tmp22_ = output;
		weather_show_applet_update_log (wtype, _tmp22_);
		_tmp23_ = g_strdup ("cod\":\"200");
		forecast_ok = _tmp23_;
		_tmp24_ = g_strdup ("cod\":200");
		weather_ok = _tmp24_;
		_tmp26_ = output;
		_tmp27_ = forecast_ok;
		if (string_contains (_tmp26_, _tmp27_)) {
			_tmp25_ = TRUE;
		} else {
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			_tmp28_ = output;
			_tmp29_ = weather_ok;
			_tmp25_ = string_contains (_tmp28_, _tmp29_);
		}
		if (_tmp25_) {
			result = output;
			_g_free0 (weather_ok);
			_g_free0 (forecast_ok);
			_g_bytes_unref0 (retbytes);
			_g_object_unref0 (message);
			_g_object_unref0 (session);
			_g_free0 (url);
			_g_free0 (langstring);
			_g_free0 (website);
			return result;
		} else {
			gchar* _tmp30_;
			_tmp30_ = g_strdup ("no data");
			result = _tmp30_;
			_g_free0 (weather_ok);
			_g_free0 (forecast_ok);
			_g_free0 (output);
			_g_bytes_unref0 (retbytes);
			_g_object_unref0 (message);
			_g_object_unref0 (session);
			_g_free0 (url);
			_g_free0 (langstring);
			_g_free0 (website);
			return result;
		}
		_g_free0 (weather_ok);
		_g_free0 (forecast_ok);
		_g_free0 (output);
		_g_bytes_unref0 (retbytes);
	}
	goto __finally0;
	__catch0_g_error:
	{
		gchar* _tmp31_;
		g_clear_error (&_inner_error0_);
		_tmp31_ = g_strdup ("no data");
		result = _tmp31_;
		_g_object_unref0 (message);
		_g_object_unref0 (session);
		_g_free0 (url);
		_g_free0 (langstring);
		_g_free0 (website);
		return result;
	}
	__finally0:
	_g_object_unref0 (message);
	_g_object_unref0 (session);
	_g_free0 (url);
	_g_free0 (langstring);
	_g_free0 (website);
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static JsonParser*
weather_show_applet_get_weatherdata_load_data (WeatherShowAppletGetWeatherdata* self,
                                               const gchar* data)
{
	JsonParser* parser = NULL;
	JsonParser* _tmp0_;
	GError* _inner_error0_ = NULL;
	JsonParser* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (data != NULL, NULL);
	_tmp0_ = json_parser_new ();
	parser = _tmp0_;
	{
		json_parser_load_from_data (parser, data, (gssize) -1, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		g_print ("Error loading data\n");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (parser);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	result = parser;
	return result;
}

static gchar*
weather_show_applet_get_weatherdata_check_stringvalue (WeatherShowAppletGetWeatherdata* self,
                                                       JsonObject* obj,
                                                       const gchar* val)
{
	gchar* _tmp2_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (obj != NULL, NULL);
	g_return_val_if_fail (val != NULL, NULL);
	if (json_object_has_member (obj, val)) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = json_object_get_string_member (obj, val);
		_tmp1_ = g_strdup (_tmp0_);
		result = _tmp1_;
		return result;
	}
	_tmp2_ = g_strdup ("");
	result = _tmp2_;
	return result;
}

static gfloat
weather_show_applet_get_weatherdata_check_numvalue (WeatherShowAppletGetWeatherdata* self,
                                                    JsonObject* obj,
                                                    const gchar* val)
{
	gfloat result;
	g_return_val_if_fail (self != NULL, -1.0F);
	g_return_val_if_fail (obj != NULL, -1.0F);
	g_return_val_if_fail (val != NULL, -1.0F);
	if (json_object_has_member (obj, val)) {
		gfloat info = 0.0F;
		info = (gfloat) json_object_get_double_member (obj, val);
		result = info;
		return result;
	}
	result = (gfloat) 1000;
	return result;
}

static GeeHashMap*
weather_show_applet_get_weatherdata_get_categories (WeatherShowAppletGetWeatherdata* self,
                                                    JsonObject* rootobj)
{
	GeeHashMap* map = NULL;
	GeeHashMap* _tmp0_;
	JsonArray* _tmp1_;
	JsonObject* _tmp2_;
	JsonObject* _tmp3_;
	JsonObject* _tmp4_;
	JsonObject* _tmp5_;
	GeeHashMap* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (rootobj != NULL, NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, json_object_get_type (), (GBoxedCopyFunc) json_object_ref, (GDestroyNotify) json_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	map = _tmp0_;
	_tmp1_ = json_object_get_array_member (rootobj, "weather");
	_tmp2_ = json_array_get_object_element (_tmp1_, (guint) 0);
	gee_abstract_map_set ((GeeAbstractMap*) map, "weather", _tmp2_);
	_tmp3_ = json_object_get_object_member (rootobj, "wind");
	gee_abstract_map_set ((GeeAbstractMap*) map, "wind", _tmp3_);
	_tmp4_ = json_object_get_object_member (rootobj, "main");
	gee_abstract_map_set ((GeeAbstractMap*) map, "main", _tmp4_);
	_tmp5_ = json_object_get_object_member (rootobj, "sys");
	gee_abstract_map_set ((GeeAbstractMap*) map, "sys", _tmp5_);
	result = map;
	return result;
}

static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		WeatherShowAppletGetWeatherdata* self;
		self = _data2_->self;
		_g_free0 (_data2_->tempdisplay);
		_weather_show_applet_get_weatherdata_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}

static gpointer
_json_object_ref0 (gpointer self)
{
	return self ? json_object_ref (self) : NULL;
}

static Block3Data*
block3_data_ref (Block3Data* _data3_)
{
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}

static void
block3_data_unref (void * _userdata_)
{
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		WeatherShowAppletGetWeatherdata* self;
		self = _data3_->_data2_->self;
		block2_data_unref (_data3_->_data2_);
		_data3_->_data2_ = NULL;
		g_slice_free (Block3Data, _data3_);
	}
}

static gboolean
___lambda4_ (Block3Data* _data3_)
{
	Block2Data* _data2_;
	WeatherShowAppletGetWeatherdata* self;
	GdkPixbuf* pbuf = NULL;
	GdkPixbuf** _tmp0_;
	gint _tmp0__length1;
	GdkPixbuf* _tmp1_;
	GdkPixbuf* _tmp2_;
	GtkImage* _tmp3_;
	GtkLabel* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gboolean result;
	_data2_ = _data3_->_data2_;
	self = _data2_->self;
	_tmp0_ = weather_show_applet_iconpixbufs;
	_tmp0__length1 = weather_show_applet_iconpixbufs_length1;
	_tmp1_ = _tmp0_[_data3_->icon_index];
	_tmp2_ = _g_object_ref0 (_tmp1_);
	pbuf = _tmp2_;
	_tmp3_ = weather_show_applet_indicatorIcon;
	gtk_image_set_from_pixbuf (_tmp3_, pbuf);
	_tmp4_ = weather_show_applet_templabel;
	_tmp5_ = _data2_->tempdisplay;
	_tmp6_ = g_strconcat (" ", _tmp5_, NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strconcat (_tmp7_, " ", NULL);
	_tmp9_ = _tmp8_;
	gtk_label_set_text (_tmp4_, _tmp9_);
	_g_free0 (_tmp9_);
	_g_free0 (_tmp7_);
	result = FALSE;
	_g_object_unref0 (pbuf);
	return result;
}

static gboolean
____lambda4__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda4_ (self);
	return result;
}

static gchar*
weather_show_applet_get_weatherdata_getsnapshot (WeatherShowAppletGetWeatherdata* self,
                                                 const gchar* data)
{
	Block2Data* _data2_;
	JsonParser* parser = NULL;
	JsonParser* _tmp0_;
	JsonObject* root_object = NULL;
	JsonParser* _tmp1_;
	JsonNode* _tmp2_;
	JsonObject* _tmp3_;
	JsonObject* _tmp4_;
	GeeHashMap* map = NULL;
	JsonObject* _tmp5_;
	GeeHashMap* _tmp6_;
	gchar* id = NULL;
	GeeHashMap* _tmp7_;
	gpointer _tmp8_;
	JsonObject* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* daynight = NULL;
	GeeHashMap* _tmp12_;
	gpointer _tmp13_;
	JsonObject* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* add_daytime = NULL;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* city = NULL;
	JsonObject* _tmp22_;
	gchar* _tmp23_;
	gchar* country = NULL;
	GeeHashMap* _tmp24_;
	gpointer _tmp25_;
	JsonObject* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* citydisplay = NULL;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	gchar* _tmp31_;
	gboolean _tmp32_ = FALSE;
	gboolean _tmp33_ = FALSE;
	gchar* skydisplay = NULL;
	GeeHashMap* _tmp38_;
	gpointer _tmp39_;
	JsonObject* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	GeeHashMap* _tmp43_;
	gchar* _tmp44_;
	gchar* wspeeddisplay = NULL;
	GeeHashMap* _tmp45_;
	gchar* _tmp46_;
	gchar* wdirectiondisplay = NULL;
	GeeHashMap* _tmp47_;
	gchar* _tmp48_;
	gchar* humiddisplay = NULL;
	GeeHashMap* _tmp49_;
	gchar* _tmp50_;
	gchar** collected = NULL;
	const gchar* _tmp51_;
	gchar* _tmp52_;
	const gchar* _tmp53_;
	gchar* _tmp54_;
	const gchar* _tmp55_;
	gchar* _tmp56_;
	const gchar* _tmp57_;
	gchar* _tmp58_;
	const gchar* _tmp59_;
	gchar* _tmp60_;
	const gchar* _tmp61_;
	const gchar* _tmp62_;
	gchar* _tmp63_;
	const gchar* _tmp64_;
	gchar* _tmp65_;
	gchar** _tmp66_;
	gint collected_length1;
	gint _collected_size_;
	gboolean _tmp67_ = FALSE;
	gchar* output = NULL;
	gchar** _tmp83_;
	gint _tmp83__length1;
	gchar* _tmp84_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (data != NULL, NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = weather_show_applet_get_weatherdata_ref (self);
	_tmp0_ = weather_show_applet_get_weatherdata_load_data (self, data);
	parser = _tmp0_;
	_tmp1_ = parser;
	_tmp2_ = json_parser_get_root (_tmp1_);
	_tmp3_ = json_node_get_object (_tmp2_);
	_tmp4_ = _json_object_ref0 (_tmp3_);
	root_object = _tmp4_;
	_tmp5_ = root_object;
	_tmp6_ = weather_show_applet_get_weatherdata_get_categories (self, _tmp5_);
	map = _tmp6_;
	_tmp7_ = map;
	_tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp7_, "weather");
	_tmp9_ = (JsonObject*) _tmp8_;
	_tmp10_ = g_strdup_printf ("%g", weather_show_applet_get_weatherdata_check_numvalue (self, _tmp9_, "id"));
	_tmp11_ = _tmp10_;
	_json_object_unref0 (_tmp9_);
	id = _tmp11_;
	_tmp12_ = map;
	_tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp12_, "weather");
	_tmp14_ = (JsonObject*) _tmp13_;
	_tmp15_ = weather_show_applet_get_weatherdata_check_stringvalue (self, _tmp14_, "icon");
	_tmp16_ = _tmp15_;
	_tmp17_ = string_to_string (_tmp16_);
	_tmp18_ = g_strdup (_tmp17_);
	_tmp19_ = _tmp18_;
	_g_free0 (_tmp16_);
	_json_object_unref0 (_tmp14_);
	daynight = _tmp19_;
	_tmp20_ = daynight;
	_tmp21_ = weather_show_applet_get_weatherdata_get_dayornight (self, _tmp20_);
	add_daytime = _tmp21_;
	_tmp22_ = root_object;
	_tmp23_ = weather_show_applet_get_weatherdata_check_stringvalue (self, _tmp22_, "name");
	city = _tmp23_;
	_tmp24_ = map;
	_tmp25_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp24_, "sys");
	_tmp26_ = (JsonObject*) _tmp25_;
	_tmp27_ = weather_show_applet_get_weatherdata_check_stringvalue (self, _tmp26_, "country");
	_tmp28_ = _tmp27_;
	_json_object_unref0 (_tmp26_);
	country = _tmp28_;
	_tmp29_ = city;
	_tmp30_ = country;
	_tmp31_ = g_strconcat (_tmp29_, ", ", _tmp30_, NULL);
	citydisplay = _tmp31_;
	if (weather_show_applet_use_custom_cityname) {
		const gchar* _tmp34_;
		_tmp34_ = weather_show_applet_customcityname;
		_tmp33_ = _tmp34_ != NULL;
	} else {
		_tmp33_ = FALSE;
	}
	if (_tmp33_) {
		const gchar* _tmp35_;
		_tmp35_ = weather_show_applet_customcityname;
		_tmp32_ = g_strcmp0 (_tmp35_, "") != 0;
	} else {
		_tmp32_ = FALSE;
	}
	if (_tmp32_) {
		const gchar* _tmp36_;
		gchar* _tmp37_;
		_tmp36_ = weather_show_applet_customcityname;
		_tmp37_ = g_strdup (_tmp36_);
		_g_free0 (citydisplay);
		citydisplay = _tmp37_;
	}
	_tmp38_ = map;
	_tmp39_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp38_, "weather");
	_tmp40_ = (JsonObject*) _tmp39_;
	_tmp41_ = weather_show_applet_get_weatherdata_check_stringvalue (self, _tmp40_, "description");
	_tmp42_ = _tmp41_;
	_json_object_unref0 (_tmp40_);
	skydisplay = _tmp42_;
	_tmp43_ = map;
	_tmp44_ = weather_show_applet_get_weatherdata_get_temperature (self, _tmp43_);
	_data2_->tempdisplay = _tmp44_;
	_tmp45_ = map;
	_tmp46_ = weather_show_applet_get_weatherdata_get_windspeed (self, _tmp45_);
	wspeeddisplay = _tmp46_;
	_tmp47_ = map;
	_tmp48_ = weather_show_applet_get_weatherdata_get_winddirection (self, _tmp47_);
	wdirectiondisplay = _tmp48_;
	_tmp49_ = map;
	_tmp50_ = weather_show_applet_get_weatherdata_get_humidity (self, _tmp49_);
	humiddisplay = _tmp50_;
	_tmp51_ = id;
	_tmp52_ = g_strdup (_tmp51_);
	_tmp53_ = add_daytime;
	_tmp54_ = g_strdup (_tmp53_);
	_tmp55_ = citydisplay;
	_tmp56_ = g_strdup (_tmp55_);
	_tmp57_ = skydisplay;
	_tmp58_ = g_strdup (_tmp57_);
	_tmp59_ = _data2_->tempdisplay;
	_tmp60_ = g_strdup (_tmp59_);
	_tmp61_ = wspeeddisplay;
	_tmp62_ = wdirectiondisplay;
	_tmp63_ = g_strconcat (_tmp61_, " ", _tmp62_, NULL);
	_tmp64_ = humiddisplay;
	_tmp65_ = g_strdup (_tmp64_);
	_tmp66_ = g_new0 (gchar*, 7 + 1);
	_tmp66_[0] = _tmp52_;
	_tmp66_[1] = _tmp54_;
	_tmp66_[2] = _tmp56_;
	_tmp66_[3] = _tmp58_;
	_tmp66_[4] = _tmp60_;
	_tmp66_[5] = _tmp63_;
	_tmp66_[6] = _tmp65_;
	collected = _tmp66_;
	collected_length1 = 7;
	_collected_size_ = collected_length1;
	if (weather_show_applet_dynamic_icon == TRUE) {
		const gchar* _tmp68_;
		_tmp68_ = id;
		_tmp67_ = g_strcmp0 (_tmp68_, "") != 0;
	} else {
		_tmp67_ = FALSE;
	}
	if (_tmp67_) {
		Block3Data* _data3_;
		gchar* mapped_id = NULL;
		const gchar* _tmp69_;
		gchar* _tmp70_;
		const gchar* _tmp71_;
		const gchar* _tmp72_;
		gchar* _tmp73_;
		gchar* _tmp74_;
		gchar** _tmp75_;
		gint _tmp75__length1;
		gint _tmp76_;
		gboolean _tmp77_ = FALSE;
		_data3_ = g_slice_new0 (Block3Data);
		_data3_->_ref_count_ = 1;
		_data3_->_data2_ = block2_data_ref (_data2_);
		_tmp69_ = id;
		_tmp70_ = weather_show_functions_find_mappedid (_tmp69_);
		mapped_id = _tmp70_;
		_tmp71_ = mapped_id;
		_tmp72_ = add_daytime;
		_tmp73_ = g_strconcat (_tmp71_, _tmp72_, NULL);
		_tmp74_ = _tmp73_;
		_tmp75_ = weather_show_applet_iconnames;
		_tmp75__length1 = weather_show_applet_iconnames_length1;
		_tmp76_ = weather_show_functions_get_stringindex (_tmp74_, _tmp75_, (gint) _tmp75__length1);
		_g_free0 (_tmp74_);
		_data3_->icon_index = _tmp76_;
		if (_data3_->icon_index == -1) {
			_tmp77_ = TRUE;
		} else {
			GdkPixbuf** _tmp78_;
			gint _tmp78__length1;
			_tmp78_ = weather_show_applet_iconpixbufs;
			_tmp78__length1 = weather_show_applet_iconpixbufs_length1;
			_tmp77_ = _data3_->icon_index > (_tmp78__length1 - 1);
		}
		if (_tmp77_) {
			gchar* loglocation = NULL;
			gchar* _tmp79_;
			const gchar* _tmp80_;
			const gchar* _tmp81_;
			gchar** _tmp82_;
			gint _tmp82__length1;
			_tmp79_ = weather_show_applet_create_dirs_file (".config/budgie-extras", "icon_error");
			loglocation = _tmp79_;
			_tmp80_ = loglocation;
			_tmp81_ = add_daytime;
			_tmp82_ = weather_show_applet_iconnames;
			_tmp82__length1 = weather_show_applet_iconnames_length1;
			_data3_->icon_index = weather_show_functions_escape_missingicon (_tmp80_, _tmp81_, _tmp82_, (gint) _tmp82__length1);
			_g_free0 (loglocation);
		}
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda4__gsource_func, block3_data_ref (_data3_), block3_data_unref);
		_g_free0 (mapped_id);
		block3_data_unref (_data3_);
		_data3_ = NULL;
	} else {
		g_print ("no icon\n");
	}
	_tmp83_ = collected;
	_tmp83__length1 = collected_length1;
	_tmp84_ = _vala_g_strjoinv ("\n", _tmp83_, (gint) _tmp83__length1);
	output = _tmp84_;
	result = output;
	collected = (_vala_array_free (collected, collected_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (humiddisplay);
	_g_free0 (wdirectiondisplay);
	_g_free0 (wspeeddisplay);
	_g_free0 (skydisplay);
	_g_free0 (citydisplay);
	_g_free0 (country);
	_g_free0 (city);
	_g_free0 (add_daytime);
	_g_free0 (daynight);
	_g_free0 (id);
	_g_object_unref0 (map);
	_json_object_unref0 (root_object);
	_g_object_unref0 (parser);
	block2_data_unref (_data2_);
	_data2_ = NULL;
	return result;
}

gchar*
weather_show_applet_get_weatherdata_get_current (WeatherShowAppletGetWeatherdata* self)
{
	gchar* data = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = weather_show_applet_citycode;
	_tmp1_ = weather_show_applet_get_weatherdata_fetch_fromsite (self, "weather", _tmp0_);
	data = _tmp1_;
	_tmp2_ = data;
	if (g_strcmp0 (_tmp2_, "no data") != 0) {
		const gchar* _tmp3_;
		gchar* _tmp4_;
		weather_show_applet_lasttime_failed = FALSE;
		_tmp3_ = data;
		_tmp4_ = weather_show_applet_get_weatherdata_getsnapshot (self, _tmp3_);
		result = _tmp4_;
		_g_free0 (data);
		return result;
	} else {
		gchar* _tmp5_;
		weather_show_applet_lasttime_failed = TRUE;
		_tmp5_ = g_strdup ("");
		result = _tmp5_;
		_g_free0 (data);
		return result;
	}
}

static gchar*
double_to_string (gdouble self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	_tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
	_tmp2_ = g_ascii_dtostr (_tmp1_, (gint) G_ASCII_DTOSTR_BUF_SIZE, self);
	_tmp3_ = g_strdup (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp1_ = (g_free (_tmp1_), NULL);
	result = _tmp4_;
	return result;
}

static gchar*
weather_show_applet_get_weatherdata_get_windspeed (WeatherShowAppletGetWeatherdata* self,
                                                   GeeHashMap* categories)
{
	gfloat wspeed = 0.0F;
	gpointer _tmp0_;
	JsonObject* _tmp1_;
	gfloat _tmp2_;
	gchar* wspeeddisplay = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (categories != NULL, NULL);
	_tmp0_ = gee_abstract_map_get ((GeeAbstractMap*) categories, "wind");
	_tmp1_ = (JsonObject*) _tmp0_;
	_tmp2_ = weather_show_applet_get_weatherdata_check_numvalue (self, _tmp1_, "speed");
	_json_object_unref0 (_tmp1_);
	wspeed = _tmp2_;
	if (wspeed != ((gfloat) 1000)) {
		const gchar* _tmp3_;
		_tmp3_ = weather_show_applet_windunit;
		if (g_strcmp0 (_tmp3_, "Miles") == 0) {
			gdouble rounded_wspeed = 0.0;
			gchar* _tmp4_;
			gchar* _tmp5_;
			gchar* _tmp6_;
			wspeed = wspeed * ((gfloat) 2.237);
			rounded_wspeed = round ((gdouble) wspeed);
			_tmp4_ = double_to_string (rounded_wspeed);
			_tmp5_ = _tmp4_;
			_tmp6_ = g_strconcat (_tmp5_, " MPH", NULL);
			_g_free0 (wspeeddisplay);
			wspeeddisplay = _tmp6_;
			_g_free0 (_tmp5_);
		} else {
			gchar* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_;
			_tmp7_ = g_strdup_printf ("%g", wspeed);
			_tmp8_ = _tmp7_;
			_tmp9_ = g_strconcat (_tmp8_, " m/sec", NULL);
			_g_free0 (wspeeddisplay);
			wspeeddisplay = _tmp9_;
			_g_free0 (_tmp8_);
		}
	} else {
		gchar* _tmp10_;
		_tmp10_ = g_strdup ("");
		_g_free0 (wspeeddisplay);
		wspeeddisplay = _tmp10_;
	}
	result = wspeeddisplay;
	return result;
}

static gchar*
weather_show_applet_get_weatherdata_get_temperature (WeatherShowAppletGetWeatherdata* self,
                                                     GeeHashMap* categories)
{
	gchar* tempdisplay = NULL;
	gfloat temp = 0.0F;
	gpointer _tmp0_;
	JsonObject* _tmp1_;
	gfloat _tmp2_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (categories != NULL, NULL);
	_tmp0_ = gee_abstract_map_get ((GeeAbstractMap*) categories, "main");
	_tmp1_ = (JsonObject*) _tmp0_;
	_tmp2_ = weather_show_applet_get_weatherdata_check_numvalue (self, _tmp1_, "temp");
	_json_object_unref0 (_tmp1_);
	temp = _tmp2_;
	if (temp != ((gfloat) 1000)) {
		gchar* dsp_unit = NULL;
		const gchar* _tmp3_;
		gdouble rounded_temp = 0.0;
		gchar* _tmp6_;
		gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp3_ = weather_show_applet_tempunit;
		if (g_strcmp0 (_tmp3_, "Celsius") == 0) {
			gchar* _tmp4_;
			temp = temp - ((gfloat) 273.15);
			_tmp4_ = g_strdup ("℃");
			_g_free0 (dsp_unit);
			dsp_unit = _tmp4_;
		} else {
			gchar* _tmp5_;
			temp = (temp * ((gfloat) 1.80)) - ((gfloat) 459.67);
			_tmp5_ = g_strdup ("℉");
			_g_free0 (dsp_unit);
			dsp_unit = _tmp5_;
		}
		rounded_temp = round ((gdouble) temp);
		_tmp6_ = double_to_string (rounded_temp);
		_tmp7_ = _tmp6_;
		_tmp8_ = dsp_unit;
		_tmp9_ = g_strconcat (_tmp7_, _tmp8_, NULL);
		_g_free0 (tempdisplay);
		tempdisplay = _tmp9_;
		_g_free0 (_tmp7_);
		_g_free0 (dsp_unit);
	} else {
		gchar* _tmp10_;
		_tmp10_ = g_strdup ("");
		_g_free0 (tempdisplay);
		tempdisplay = _tmp10_;
	}
	result = tempdisplay;
	return result;
}

static gchar*
weather_show_applet_get_weatherdata_get_winddirection (WeatherShowAppletGetWeatherdata* self,
                                                       GeeHashMap* categories)
{
	gfloat wdirection = 0.0F;
	gpointer _tmp0_;
	JsonObject* _tmp1_;
	gfloat _tmp2_;
	gchar* wdirectiondisplay = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (categories != NULL, NULL);
	_tmp0_ = gee_abstract_map_get ((GeeAbstractMap*) categories, "wind");
	_tmp1_ = (JsonObject*) _tmp0_;
	_tmp2_ = weather_show_applet_get_weatherdata_check_numvalue (self, _tmp1_, "deg");
	_json_object_unref0 (_tmp1_);
	wdirection = _tmp2_;
	if (wdirection != ((gfloat) 1000)) {
		gint iconindex = 0;
		gchar** _tmp3_;
		gint _tmp3__length1;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		iconindex = (gint) round ((gdouble) (wdirection / 45));
		_tmp3_ = weather_show_applet_directions;
		_tmp3__length1 = weather_show_applet_directions_length1;
		_tmp4_ = _tmp3_[iconindex];
		_tmp5_ = g_strdup (_tmp4_);
		_g_free0 (wdirectiondisplay);
		wdirectiondisplay = _tmp5_;
	} else {
		gchar* _tmp6_;
		_tmp6_ = g_strdup ("");
		_g_free0 (wdirectiondisplay);
		wdirectiondisplay = _tmp6_;
	}
	result = wdirectiondisplay;
	return result;
}

static gchar*
weather_show_applet_get_weatherdata_get_humidity (WeatherShowAppletGetWeatherdata* self,
                                                  GeeHashMap* categories)
{
	gchar* humiddisplay = NULL;
	gint humid = 0;
	gpointer _tmp0_;
	JsonObject* _tmp1_;
	gint _tmp2_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (categories != NULL, NULL);
	_tmp0_ = gee_abstract_map_get ((GeeAbstractMap*) categories, "main");
	_tmp1_ = (JsonObject*) _tmp0_;
	_tmp2_ = (gint) weather_show_applet_get_weatherdata_check_numvalue (self, _tmp1_, "humidity");
	_json_object_unref0 (_tmp1_);
	humid = _tmp2_;
	if (humid != 1000) {
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp3_ = g_strdup_printf ("%i", humid);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strconcat (_tmp4_, "%", NULL);
		_g_free0 (humiddisplay);
		humiddisplay = _tmp5_;
		_g_free0 (_tmp4_);
	} else {
		gchar* _tmp6_;
		_tmp6_ = g_strdup ("");
		_g_free0 (humiddisplay);
		humiddisplay = _tmp6_;
	}
	result = humiddisplay;
	return result;
}

static gpointer
_json_array_ref0 (gpointer self)
{
	return self ? json_array_ref (self) : NULL;
}

static JsonNode*
_vala_JsonNode_copy (JsonNode* self)
{
	return g_boxed_copy (json_node_get_type (), self);
}

static gpointer
__vala_JsonNode_copy0 (gpointer self)
{
	return self ? _vala_JsonNode_copy (self) : NULL;
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

static GeeHashMap*
weather_show_applet_get_weatherdata_getspan (WeatherShowAppletGetWeatherdata* self,
                                             const gchar* data)
{
	GeeHashMap* map = NULL;
	GeeHashMap* _tmp0_;
	JsonParser* parser = NULL;
	JsonParser* _tmp1_;
	JsonObject* root_object = NULL;
	JsonParser* _tmp2_;
	JsonNode* _tmp3_;
	JsonObject* _tmp4_;
	JsonObject* _tmp5_;
	JsonArray* newroot = NULL;
	JsonObject* _tmp6_;
	JsonArray* _tmp7_;
	JsonArray* _tmp8_;
	GList* nodes = NULL;
	JsonArray* _tmp9_;
	GList* _tmp10_;
	gint n_snapshots = 0;
	GList* _tmp11_;
	GeeHashMap* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (data != NULL, NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	map = _tmp0_;
	_tmp1_ = weather_show_applet_get_weatherdata_load_data (self, data);
	parser = _tmp1_;
	_tmp2_ = parser;
	_tmp3_ = json_parser_get_root (_tmp2_);
	_tmp4_ = json_node_get_object (_tmp3_);
	_tmp5_ = _json_object_ref0 (_tmp4_);
	root_object = _tmp5_;
	_tmp6_ = root_object;
	_tmp7_ = json_object_get_array_member (_tmp6_, "list");
	_tmp8_ = _json_array_ref0 (_tmp7_);
	newroot = _tmp8_;
	_tmp9_ = newroot;
	_tmp10_ = json_array_get_elements (_tmp9_);
	nodes = _tmp10_;
	n_snapshots = 0;
	_tmp11_ = nodes;
	{
		GList* n_collection = NULL;
		GList* n_it = NULL;
		n_collection = _tmp11_;
		for (n_it = n_collection; n_it != NULL; n_it = n_it->next) {
			JsonNode* _tmp12_;
			JsonNode* n = NULL;
			_tmp12_ = __vala_JsonNode_copy0 ((JsonNode*) n_it->data);
			n = _tmp12_;
			{
				JsonObject* obj = NULL;
				JsonNode* _tmp13_;
				JsonObject* _tmp14_;
				JsonObject* _tmp15_;
				GeeHashMap* categories = NULL;
				JsonObject* _tmp16_;
				GeeHashMap* _tmp17_;
				gchar* id = NULL;
				GeeHashMap* _tmp18_;
				gpointer _tmp19_;
				JsonObject* _tmp20_;
				gchar* _tmp21_;
				gchar* _tmp22_;
				gchar* add_dn = NULL;
				GeeHashMap* _tmp23_;
				gpointer _tmp24_;
				JsonObject* _tmp25_;
				gchar* _tmp26_;
				gchar* _tmp27_;
				gchar* dayornight = NULL;
				const gchar* _tmp28_;
				gchar* _tmp29_;
				gint timestamp = 0;
				JsonObject* _tmp30_;
				gchar* skydisplay = NULL;
				GeeHashMap* _tmp31_;
				gpointer _tmp32_;
				JsonObject* _tmp33_;
				gchar* _tmp34_;
				gchar* _tmp35_;
				gchar* temp = NULL;
				GeeHashMap* _tmp36_;
				gchar* _tmp37_;
				gchar* wspeed = NULL;
				GeeHashMap* _tmp38_;
				gchar* _tmp39_;
				gchar* wind = NULL;
				GeeHashMap* _tmp40_;
				gchar* _tmp41_;
				gchar* _tmp42_;
				const gchar* _tmp43_;
				gchar* _tmp44_;
				gchar* _tmp45_;
				gchar* humidity = NULL;
				GeeHashMap* _tmp46_;
				gchar* _tmp47_;
				GeeHashMap* _tmp48_;
				const gchar* _tmp49_;
				gchar* _tmp50_;
				const gchar* _tmp51_;
				gchar* _tmp52_;
				const gchar* _tmp53_;
				gchar* _tmp54_;
				const gchar* _tmp55_;
				gchar* _tmp56_;
				const gchar* _tmp57_;
				gchar* _tmp58_;
				const gchar* _tmp59_;
				gchar* _tmp60_;
				gchar** _tmp61_;
				gchar** _tmp62_;
				gint _tmp62__length1;
				gchar* _tmp63_;
				gchar* _tmp64_;
				_tmp13_ = n;
				_tmp14_ = json_node_get_object (_tmp13_);
				_tmp15_ = _json_object_ref0 (_tmp14_);
				obj = _tmp15_;
				_tmp16_ = obj;
				_tmp17_ = weather_show_applet_get_weatherdata_get_categories (self, _tmp16_);
				categories = _tmp17_;
				_tmp18_ = categories;
				_tmp19_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp18_, "weather");
				_tmp20_ = (JsonObject*) _tmp19_;
				_tmp21_ = g_strdup_printf ("%g", weather_show_applet_get_weatherdata_check_numvalue (self, _tmp20_, "id"));
				_tmp22_ = _tmp21_;
				_json_object_unref0 (_tmp20_);
				id = _tmp22_;
				_tmp23_ = categories;
				_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp23_, "weather");
				_tmp25_ = (JsonObject*) _tmp24_;
				_tmp26_ = weather_show_applet_get_weatherdata_check_stringvalue (self, _tmp25_, "icon");
				_tmp27_ = _tmp26_;
				_json_object_unref0 (_tmp25_);
				add_dn = _tmp27_;
				_tmp28_ = add_dn;
				_tmp29_ = weather_show_applet_get_weatherdata_get_dayornight (self, _tmp28_);
				dayornight = _tmp29_;
				_tmp30_ = obj;
				timestamp = (gint) json_object_get_int_member (_tmp30_, "dt");
				_tmp31_ = categories;
				_tmp32_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp31_, "weather");
				_tmp33_ = (JsonObject*) _tmp32_;
				_tmp34_ = weather_show_applet_get_weatherdata_check_stringvalue (self, _tmp33_, "description");
				_tmp35_ = _tmp34_;
				_json_object_unref0 (_tmp33_);
				skydisplay = _tmp35_;
				_tmp36_ = categories;
				_tmp37_ = weather_show_applet_get_weatherdata_get_temperature (self, _tmp36_);
				temp = _tmp37_;
				_tmp38_ = categories;
				_tmp39_ = weather_show_applet_get_weatherdata_get_windspeed (self, _tmp38_);
				wspeed = _tmp39_;
				_tmp40_ = categories;
				_tmp41_ = weather_show_applet_get_weatherdata_get_winddirection (self, _tmp40_);
				_tmp42_ = _tmp41_;
				_tmp43_ = wspeed;
				_tmp44_ = g_strconcat (_tmp42_, " ", _tmp43_, NULL);
				_tmp45_ = _tmp44_;
				_g_free0 (_tmp42_);
				wind = _tmp45_;
				_tmp46_ = categories;
				_tmp47_ = weather_show_applet_get_weatherdata_get_humidity (self, _tmp46_);
				humidity = _tmp47_;
				_tmp48_ = map;
				_tmp49_ = id;
				_tmp50_ = g_strdup (_tmp49_);
				_tmp51_ = dayornight;
				_tmp52_ = g_strdup (_tmp51_);
				_tmp53_ = skydisplay;
				_tmp54_ = g_strdup (_tmp53_);
				_tmp55_ = temp;
				_tmp56_ = g_strdup (_tmp55_);
				_tmp57_ = wind;
				_tmp58_ = g_strdup (_tmp57_);
				_tmp59_ = humidity;
				_tmp60_ = g_strdup (_tmp59_);
				_tmp61_ = g_new0 (gchar*, 6 + 1);
				_tmp61_[0] = _tmp50_;
				_tmp61_[1] = _tmp52_;
				_tmp61_[2] = _tmp54_;
				_tmp61_[3] = _tmp56_;
				_tmp61_[4] = _tmp58_;
				_tmp61_[5] = _tmp60_;
				_tmp62_ = _tmp61_;
				_tmp62__length1 = 6;
				_tmp63_ = _vala_g_strjoinv ("\n", _tmp62_, (gint) 6);
				_tmp64_ = _tmp63_;
				gee_abstract_map_set ((GeeAbstractMap*) _tmp48_, (gpointer) ((gintptr) timestamp), _tmp64_);
				_g_free0 (_tmp64_);
				_tmp62_ = (_vala_array_free (_tmp62_, _tmp62__length1, (GDestroyNotify) g_free), NULL);
				n_snapshots += 1;
				if (n_snapshots == 16) {
					_g_free0 (humidity);
					_g_free0 (wind);
					_g_free0 (wspeed);
					_g_free0 (temp);
					_g_free0 (skydisplay);
					_g_free0 (dayornight);
					_g_free0 (add_dn);
					_g_free0 (id);
					_g_object_unref0 (categories);
					_json_object_unref0 (obj);
					__vala_JsonNode_free0 (n);
					break;
				}
				_g_free0 (humidity);
				_g_free0 (wind);
				_g_free0 (wspeed);
				_g_free0 (temp);
				_g_free0 (skydisplay);
				_g_free0 (dayornight);
				_g_free0 (add_dn);
				_g_free0 (id);
				_g_object_unref0 (categories);
				_json_object_unref0 (obj);
				__vala_JsonNode_free0 (n);
			}
		}
	}
	result = map;
	(nodes == NULL) ? NULL : (nodes = (g_list_free (nodes), NULL));
	_json_array_unref0 (newroot);
	_json_object_unref0 (root_object);
	_g_object_unref0 (parser);
	return result;
}

GeeHashMap*
weather_show_applet_get_weatherdata_get_forecast (WeatherShowAppletGetWeatherdata* self)
{
	gchar* data = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	GeeHashMap* map = NULL;
	GeeHashMap* _tmp2_;
	const gchar* _tmp3_;
	GeeHashMap* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = weather_show_applet_citycode;
	_tmp1_ = weather_show_applet_get_weatherdata_fetch_fromsite (self, "forecast", _tmp0_);
	data = _tmp1_;
	_tmp2_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	map = _tmp2_;
	_tmp3_ = data;
	if (g_strcmp0 (_tmp3_, "no data") != 0) {
		const gchar* _tmp4_;
		GeeHashMap* _tmp5_;
		_tmp4_ = data;
		_tmp5_ = weather_show_applet_get_weatherdata_getspan (self, _tmp4_);
		_g_object_unref0 (map);
		map = _tmp5_;
		weather_show_applet_lasttime_failed = FALSE;
	} else {
		weather_show_applet_lasttime_failed = TRUE;
	}
	result = map;
	_g_free0 (data);
	return result;
}

static gchar*
string_slice (const gchar* self,
              glong start,
              glong end)
{
	glong string_length = 0L;
	gint _tmp0_;
	gint _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gchar* _tmp4_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	string_length = (glong) _tmp1_;
	if (start < ((glong) 0)) {
		start = string_length + start;
	}
	if (end < ((glong) 0)) {
		end = string_length + end;
	}
	if (start >= ((glong) 0)) {
		_tmp2_ = start <= string_length;
	} else {
		_tmp2_ = FALSE;
	}
	g_return_val_if_fail (_tmp2_, NULL);
	if (end >= ((glong) 0)) {
		_tmp3_ = end <= string_length;
	} else {
		_tmp3_ = FALSE;
	}
	g_return_val_if_fail (_tmp3_, NULL);
	g_return_val_if_fail (start <= end, NULL);
	_tmp4_ = g_strndup (((gchar*) self) + start, (gsize) (end - start));
	result = _tmp4_;
	return result;
}

static gchar*
weather_show_applet_get_weatherdata_get_dayornight (WeatherShowAppletGetWeatherdata* self,
                                                    const gchar* dn)
{
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (dn != NULL, NULL);
	if (g_strcmp0 (dn, "") != 0) {
		gint len = 0;
		gint _tmp0_;
		gint _tmp1_;
		gchar* _tmp2_;
		_tmp0_ = strlen (dn);
		_tmp1_ = _tmp0_;
		len = _tmp1_;
		_tmp2_ = string_slice (dn, (glong) (len - 1), (glong) len);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = g_strdup ("d");
	result = _tmp3_;
	return result;
}

WeatherShowAppletGetWeatherdata*
weather_show_applet_get_weatherdata_construct (GType object_type)
{
	WeatherShowAppletGetWeatherdata* self = NULL;
	self = (WeatherShowAppletGetWeatherdata*) g_type_create_instance (object_type);
	return self;
}

WeatherShowAppletGetWeatherdata*
weather_show_applet_get_weatherdata_new (void)
{
	return weather_show_applet_get_weatherdata_construct (WEATHER_SHOW_APPLET_TYPE_GET_WEATHERDATA);
}

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

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

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

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

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

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

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

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

void
weather_show_applet_value_set_get_weatherdata (GValue* value,
                                               gpointer v_object)
{
	WeatherShowAppletGetWeatherdata * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, WEATHER_SHOW_APPLET_TYPE_GET_WEATHERDATA));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, WEATHER_SHOW_APPLET_TYPE_GET_WEATHERDATA));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		weather_show_applet_get_weatherdata_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		weather_show_applet_get_weatherdata_unref (old);
	}
}

void
weather_show_applet_value_take_get_weatherdata (GValue* value,
                                                gpointer v_object)
{
	WeatherShowAppletGetWeatherdata * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, WEATHER_SHOW_APPLET_TYPE_GET_WEATHERDATA));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, WEATHER_SHOW_APPLET_TYPE_GET_WEATHERDATA));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		weather_show_applet_get_weatherdata_unref (old);
	}
}

static void
weather_show_applet_get_weatherdata_class_init (WeatherShowAppletGetWeatherdataClass * klass,
                                                gpointer klass_data)
{
	weather_show_applet_get_weatherdata_parent_class = g_type_class_peek_parent (klass);
	((WeatherShowAppletGetWeatherdataClass *) klass)->finalize = weather_show_applet_get_weatherdata_finalize;
}

static void
weather_show_applet_get_weatherdata_instance_init (WeatherShowAppletGetWeatherdata * self,
                                                   gpointer klass)
{
	self->ref_count = 1;
}

static void
weather_show_applet_get_weatherdata_finalize (WeatherShowAppletGetWeatherdata * obj)
{
	WeatherShowAppletGetWeatherdata * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WEATHER_SHOW_APPLET_TYPE_GET_WEATHERDATA, WeatherShowAppletGetWeatherdata);
	g_signal_handlers_destroy (self);
}

GType
weather_show_applet_get_weatherdata_get_type (void)
{
	return weather_show_applet_get_weatherdata_type_id;
}

GType
weather_show_applet_get_weatherdata_register_type (GTypeModule * module)
{
	static const GTypeValueTable g_define_type_value_table = { weather_show_applet_value_get_weatherdata_init, weather_show_applet_value_get_weatherdata_free_value, weather_show_applet_value_get_weatherdata_copy_value, weather_show_applet_value_get_weatherdata_peek_pointer, "p", weather_show_applet_value_get_weatherdata_collect_value, "p", weather_show_applet_value_get_weatherdata_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (WeatherShowAppletGetWeatherdataClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) weather_show_applet_get_weatherdata_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WeatherShowAppletGetWeatherdata), 0, (GInstanceInitFunc) weather_show_applet_get_weatherdata_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	weather_show_applet_get_weatherdata_type_id = g_type_register_fundamental (g_type_fundamental_next (), "WeatherShowAppletGetWeatherdata", &g_define_type_info, &g_define_type_fundamental_info, 0);
	return weather_show_applet_get_weatherdata_type_id;
}

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

void
weather_show_applet_get_weatherdata_unref (gpointer instance)
{
	WeatherShowAppletGetWeatherdata * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		WEATHER_SHOW_APPLET_GET_WEATHERDATA_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
weather_show_applet_weather_show_settings_get_instance_private (WeatherShowAppletWeatherShowSettings* self)
{
	return G_STRUCT_MEMBER_P (self, WeatherShowAppletWeatherShowSettings_private_offset);
}

static void
_weather_show_applet_weather_show_settings_on_button_general_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                         gpointer self)
{
	weather_show_applet_weather_show_settings_on_button_general_clicked ((WeatherShowAppletWeatherShowSettings*) self, _sender);
}

static void
_weather_show_applet_weather_show_settings_on_button_desktop_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                         gpointer self)
{
	weather_show_applet_weather_show_settings_on_button_desktop_clicked ((WeatherShowAppletWeatherShowSettings*) self, _sender);
}

static void
_weather_show_applet_weather_show_settings_update_citylist_gtk_editable_changed (GtkEditable* _sender,
                                                                                 gpointer self)
{
	weather_show_applet_weather_show_settings_update_citylist ((WeatherShowAppletWeatherShowSettings*) self, _sender);
}

static void
_weather_show_applet_weather_show_settings_toggle_value_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                   gpointer self)
{
	weather_show_applet_weather_show_settings_toggle_value ((WeatherShowAppletWeatherShowSettings*) self, _sender);
}

static void
_weather_show_applet_weather_show_settings_set_tempunit_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                   gpointer self)
{
	weather_show_applet_weather_show_settings_set_tempunit ((WeatherShowAppletWeatherShowSettings*) self, _sender);
}

static void
_weather_show_applet_weather_show_settings_set_windunit_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                   gpointer self)
{
	weather_show_applet_weather_show_settings_set_windunit ((WeatherShowAppletWeatherShowSettings*) self, _sender);
}

static void
_weather_show_applet_weather_show_settings_update_transparencysettings_gtk_range_value_changed (GtkRange* _sender,
                                                                                                gpointer self)
{
	weather_show_applet_weather_show_settings_update_transparencysettings ((WeatherShowAppletWeatherShowSettings*) self, _sender);
}

static void
__lambda6_ (WeatherShowAppletWeatherShowSettings* self)
{
	const gchar* _tmp0_;
	_tmp0_ = weather_show_applet_color_window;
	weather_show_functions_open_window (_tmp0_, NULL);
}

static void
___lambda6__gtk_button_clicked (GtkButton* _sender,
                                gpointer self)
{
	__lambda6_ ((WeatherShowAppletWeatherShowSettings*) self);
}

static void
_weather_show_applet_weather_show_settings_update_xysetting_gtk_button_clicked (GtkButton* _sender,
                                                                                gpointer self)
{
	weather_show_applet_weather_show_settings_update_xysetting ((WeatherShowAppletWeatherShowSettings*) self, _sender);
}

static void
_weather_show_applet_weather_show_settings_update_customname_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	weather_show_applet_weather_show_settings_update_customname ((WeatherShowAppletWeatherShowSettings*) self);
}

static void
__lambda7_ (WeatherShowAppletWeatherShowSettings* self)
{
	weather_show_applet_weather_show_settings_set_buttoncolor (self);
}

static void
___lambda7__g_settings_changed (GSettings* _sender,
                                const gchar* key,
                                gpointer self)
{
	__lambda7_ ((WeatherShowAppletWeatherShowSettings*) self);
}

WeatherShowAppletWeatherShowSettings*
weather_show_applet_weather_show_settings_construct (GType object_type,
                                                     GSettings* settings,
                                                     const gchar* uuid)
{
	WeatherShowAppletWeatherShowSettings * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	GtkStack* _tmp2_;
	GtkStack* _tmp3_;
	GtkStack* _tmp4_;
	GtkStack* _tmp5_;
	GtkStack* _tmp6_;
	GtkLabel* header_space = NULL;
	GtkLabel* _tmp7_;
	GtkButton* _tmp8_;
	GtkButton* _tmp9_;
	GtkButton* _tmp10_;
	GtkButton* _tmp11_;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	GtkButton* _tmp14_;
	GtkButton* _tmp15_;
	GtkButton* _tmp16_;
	GtkButton* _tmp17_;
	GtkLabel* _tmp18_;
	GtkLabel* _tmp19_;
	GtkGrid* subgrid_general = NULL;
	GtkGrid* _tmp20_;
	GtkStack* _tmp21_;
	GtkGrid* subgrid_desktop = NULL;
	GtkGrid* _tmp22_;
	GtkStack* _tmp23_;
	GtkLabel* citylabel = NULL;
	GtkLabel* _tmp24_;
	GtkBox* citybox = NULL;
	GtkBox* _tmp25_;
	GtkEntry* _tmp26_;
	gchar* initialcity = NULL;
	gchar* _tmp27_;
	GtkEntry* _tmp28_;
	GtkEntry* _tmp29_;
	GtkEntry* _tmp30_;
	GtkMenuButton* _tmp31_;
	GtkImage* searchicon = NULL;
	GtkImage* _tmp32_;
	GtkMenuButton* _tmp33_;
	GtkMenuButton* _tmp34_;
	GtkMenu* _tmp35_;
	GtkLabel* spacelabel1 = NULL;
	GtkLabel* _tmp36_;
	GtkLabel* spacelabel2 = NULL;
	GtkLabel* _tmp37_;
	GtkCheckButton* ondesktop_checkbox = NULL;
	GtkCheckButton* _tmp38_;
	GtkCheckButton* dynamicicon_checkbox = NULL;
	GtkCheckButton* _tmp39_;
	GtkCheckButton* forecast_checkbox = NULL;
	GtkCheckButton* _tmp40_;
	GtkLabel* spacelabel3 = NULL;
	GtkLabel* _tmp41_;
	GtkCheckButton* tempunit_checkbox = NULL;
	GtkCheckButton* _tmp42_;
	GtkCheckButton* windunit_checkbox = NULL;
	GtkCheckButton* _tmp43_;
	GtkLabel* spacelabel5 = NULL;
	GtkLabel* _tmp44_;
	GtkLabel* _tmp45_;
	GtkLabel* _tmp46_;
	GtkLabel* _tmp47_;
	GtkScale* _tmp48_;
	GtkScale* _tmp49_;
	GtkScale* _tmp50_;
	GtkLabel* spacelabel6 = NULL;
	GtkLabel* _tmp51_;
	GtkBox* colorbox = NULL;
	GtkBox* _tmp52_;
	GtkButton* _tmp53_;
	GtkButton* _tmp54_;
	GtkButton* _tmp55_;
	GtkButton* _tmp56_;
	gchar* _tmp57_;
	gchar* _tmp58_;
	GtkLabel* _tmp59_;
	GtkLabel* _tmp60_;
	GtkLabel* _tmp61_;
	GtkLabel* spacelabel7 = NULL;
	GtkLabel* _tmp62_;
	GtkCheckButton* _tmp63_;
	GtkCheckButton* _tmp64_;
	GtkCheckButton* _tmp65_;
	GtkBox* posholder = NULL;
	GtkBox* _tmp66_;
	GtkEntry* _tmp67_;
	GtkEntry* _tmp68_;
	GtkLabel* _tmp69_;
	GtkEntry* _tmp70_;
	GtkEntry* _tmp71_;
	GtkLabel* _tmp72_;
	GtkLabel* _tmp73_;
	GtkEntry* _tmp74_;
	GtkLabel* _tmp75_;
	GtkEntry* _tmp76_;
	GtkButton* _tmp77_;
	GtkButton* _tmp78_;
	GtkButton* _tmp79_;
	GtkLabel* spacelabel8 = NULL;
	GtkLabel* _tmp80_;
	GtkCheckButton* _tmp81_;
	GtkEntry* _tmp82_;
	GtkEntry* _tmp83_;
	GtkCheckButton* _tmp84_;
	GtkEntry* _tmp85_;
	GtkButton* _tmp86_;
	GtkButton* _tmp87_;
	GtkButton* _tmp88_;
	GtkCheckButton* _tmp89_;
	GtkButton* _tmp90_;
	GtkCheckButton* _tmp91_;
	GtkCheckButton* _tmp92_;
	GtkCheckButton* _tmp93_;
	GtkCheckButton* _tmp94_;
	GtkCheckButton* _tmp95_;
	GtkCheckButton* _tmp96_;
	GtkCheckButton* _tmp97_;
	GtkCheckButton** _tmp98_;
	gchar* _tmp99_;
	gchar* _tmp100_;
	gchar* _tmp101_;
	gchar* _tmp102_;
	gchar* _tmp103_;
	gchar** _tmp104_;
	GSettings* _tmp105_;
	g_return_val_if_fail (uuid != NULL, NULL);
	self = (WeatherShowAppletWeatherShowSettings*) g_object_new (object_type, NULL);
	_tmp0_ = g_strdup (uuid);
	_g_free0 (self->priv->uuid);
	self->priv->uuid = _tmp0_;
	_tmp1_ = g_strdup ("\n" \
"            .weathercbutton {\n" \
"              border-color: transparent;\n" \
"              background-color: rgb(xxx, xxx, xxx);\n" \
"              padding: 0px;\n" \
"              border-width: 1px;\n" \
"              border-radius: 4px;\n" \
"            }\n" \
"            .activebutton {\n" \
"            }\n" \
"            ");
	_g_free0 (self->priv->css_template);
	self->priv->css_template = _tmp1_;
	_tmp2_ = (GtkStack*) gtk_stack_new ();
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->stack);
	self->priv->stack = _tmp2_;
	_tmp3_ = self->priv->stack;
	gtk_stack_set_transition_type (_tmp3_, GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT);
	_tmp4_ = self->priv->stack;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp4_, TRUE);
	_tmp5_ = self->priv->stack;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
	_tmp6_ = self->priv->stack;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp6_, 0, 10, 2, 1);
	_tmp7_ = (GtkLabel*) gtk_label_new ("\n");
	g_object_ref_sink (_tmp7_);
	header_space = _tmp7_;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) header_space, 0, 2, 1, 1);
	_tmp8_ = (GtkButton*) gtk_button_new_with_label (_ ("General"));
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->button_general);
	self->priv->button_general = _tmp8_;
	_tmp9_ = self->priv->button_general;
	g_signal_connect_object (_tmp9_, "clicked", (GCallback) _weather_show_applet_weather_show_settings_on_button_general_clicked_gtk_button_clicked, self, 0);
	_tmp10_ = self->priv->button_general;
	gtk_widget_set_size_request ((GtkWidget*) _tmp10_, 100, 20);
	_tmp11_ = self->priv->button_general;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp11_, 0, 0, 1, 1);
	_tmp12_ = (GtkLabel*) gtk_label_new ("⸻");
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->currmarker_label1);
	self->priv->currmarker_label1 = _tmp12_;
	_tmp13_ = self->priv->currmarker_label1;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp13_, 0, 1, 1, 1);
	_tmp14_ = (GtkButton*) gtk_button_new_with_label (_ ("Desktop"));
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->button_desktop);
	self->priv->button_desktop = _tmp14_;
	_tmp15_ = self->priv->button_desktop;
	g_signal_connect_object (_tmp15_, "clicked", (GCallback) _weather_show_applet_weather_show_settings_on_button_desktop_clicked_gtk_button_clicked, self, 0);
	_tmp16_ = self->priv->button_desktop;
	gtk_widget_set_size_request ((GtkWidget*) _tmp16_, 100, 20);
	_tmp17_ = self->priv->button_desktop;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp17_, 1, 0, 1, 1);
	_tmp18_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->currmarker_label2);
	self->priv->currmarker_label2 = _tmp18_;
	_tmp19_ = self->priv->currmarker_label2;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp19_, 1, 1, 1, 1);
	_tmp20_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp20_);
	subgrid_general = _tmp20_;
	_tmp21_ = self->priv->stack;
	gtk_stack_add_named (_tmp21_, (GtkWidget*) subgrid_general, "Page1");
	_tmp22_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp22_);
	subgrid_desktop = _tmp22_;
	_tmp23_ = self->priv->stack;
	gtk_stack_add_named (_tmp23_, (GtkWidget*) subgrid_desktop, "Page2");
	self->priv->edit_citymenu = TRUE;
	_tmp24_ = (GtkLabel*) gtk_label_new (_ ("City"));
	g_object_ref_sink (_tmp24_);
	citylabel = _tmp24_;
	gtk_label_set_xalign (citylabel, (gfloat) 0);
	gtk_grid_attach (subgrid_general, (GtkWidget*) citylabel, 0, 0, 1, 1);
	_tmp25_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp25_);
	citybox = _tmp25_;
	gtk_grid_attach (subgrid_general, (GtkWidget*) citybox, 0, 1, 1, 1);
	_tmp26_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp26_);
	_g_object_unref0 (self->priv->cityentry);
	self->priv->cityentry = _tmp26_;
	_tmp27_ = weather_show_applet_weather_show_settings_set_initialcity (self);
	initialcity = _tmp27_;
	_tmp28_ = self->priv->cityentry;
	gtk_entry_set_text (_tmp28_, initialcity);
	_tmp29_ = self->priv->cityentry;
	g_signal_connect_object ((GtkEditable*) _tmp29_, "changed", (GCallback) _weather_show_applet_weather_show_settings_update_citylist_gtk_editable_changed, self, 0);
	_tmp30_ = self->priv->cityentry;
	gtk_box_pack_start (citybox, (GtkWidget*) _tmp30_, FALSE, FALSE, (guint) 0);
	_tmp31_ = (GtkMenuButton*) gtk_menu_button_new ();
	g_object_ref_sink (_tmp31_);
	_g_object_unref0 (self->priv->search_button);
	self->priv->search_button = _tmp31_;
	_tmp32_ = (GtkImage*) gtk_image_new_from_icon_name ("system-search-symbolic", (GtkIconSize) GTK_ICON_SIZE_DND);
	g_object_ref_sink (_tmp32_);
	searchicon = _tmp32_;
	_tmp33_ = self->priv->search_button;
	gtk_button_set_image ((GtkButton*) _tmp33_, (GtkWidget*) searchicon);
	_tmp34_ = self->priv->search_button;
	gtk_box_pack_end (citybox, (GtkWidget*) _tmp34_, FALSE, FALSE, (guint) 0);
	_tmp35_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp35_);
	_g_object_unref0 (self->priv->citymenu);
	self->priv->citymenu = _tmp35_;
	_tmp36_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp36_);
	spacelabel1 = _tmp36_;
	gtk_grid_attach (subgrid_general, (GtkWidget*) spacelabel1, 0, 2, 1, 1);
	_tmp37_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp37_);
	spacelabel2 = _tmp37_;
	gtk_grid_attach (subgrid_general, (GtkWidget*) spacelabel2, 0, 5, 1, 1);
	_tmp38_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Show on desktop"));
	g_object_ref_sink (_tmp38_);
	ondesktop_checkbox = _tmp38_;
	gtk_grid_attach (subgrid_general, (GtkWidget*) ondesktop_checkbox, 0, 10, 1, 1);
	gtk_toggle_button_set_active ((GtkToggleButton*) ondesktop_checkbox, weather_show_applet_show_ondesktop);
	g_signal_connect_object ((GtkToggleButton*) ondesktop_checkbox, "toggled", (GCallback) _weather_show_applet_weather_show_settings_toggle_value_gtk_toggle_button_toggled, self, 0);
	_tmp39_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Show dynamic panel icon"));
	g_object_ref_sink (_tmp39_);
	dynamicicon_checkbox = _tmp39_;
	gtk_grid_attach (subgrid_general, (GtkWidget*) dynamicicon_checkbox, 0, 11, 1, 1);
	gtk_toggle_button_set_active ((GtkToggleButton*) dynamicicon_checkbox, weather_show_applet_dynamic_icon);
	g_signal_connect_object ((GtkToggleButton*) dynamicicon_checkbox, "toggled", (GCallback) _weather_show_applet_weather_show_settings_toggle_value_gtk_toggle_button_toggled, self, 0);
	_tmp40_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Show forecast in popover"));
	g_object_ref_sink (_tmp40_);
	forecast_checkbox = _tmp40_;
	gtk_grid_attach (subgrid_general, (GtkWidget*) forecast_checkbox, 0, 12, 1, 1);
	gtk_toggle_button_set_active ((GtkToggleButton*) forecast_checkbox, weather_show_applet_show_forecast);
	g_signal_connect_object ((GtkToggleButton*) forecast_checkbox, "toggled", (GCallback) _weather_show_applet_weather_show_settings_toggle_value_gtk_toggle_button_toggled, self, 0);
	_tmp41_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp41_);
	spacelabel3 = _tmp41_;
	gtk_grid_attach (subgrid_general, (GtkWidget*) spacelabel3, 0, 13, 1, 1);
	_tmp42_ = (GtkCheckButton*) gtk_check_button_new_with_label ("Fahrenheit");
	g_object_ref_sink (_tmp42_);
	tempunit_checkbox = _tmp42_;
	gtk_grid_attach (subgrid_general, (GtkWidget*) tempunit_checkbox, 0, 14, 1, 1);
	gtk_toggle_button_set_active ((GtkToggleButton*) tempunit_checkbox, weather_show_applet_weather_show_settings_get_tempstate (self));
	g_signal_connect_object ((GtkToggleButton*) tempunit_checkbox, "toggled", (GCallback) _weather_show_applet_weather_show_settings_set_tempunit_gtk_toggle_button_toggled, self, 0);
	_tmp43_ = (GtkCheckButton*) gtk_check_button_new_with_label ("Wind speed in MPH");
	g_object_ref_sink (_tmp43_);
	windunit_checkbox = _tmp43_;
	gtk_grid_attach (subgrid_general, (GtkWidget*) windunit_checkbox, 0, 15, 1, 1);
	gtk_toggle_button_set_active ((GtkToggleButton*) windunit_checkbox, weather_show_applet_weather_show_settings_get_windstate (self));
	g_signal_connect_object ((GtkToggleButton*) windunit_checkbox, "toggled", (GCallback) _weather_show_applet_weather_show_settings_set_windunit_gtk_toggle_button_toggled, self, 0);
	_tmp44_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp44_);
	spacelabel5 = _tmp44_;
	gtk_grid_attach (subgrid_general, (GtkWidget*) spacelabel5, 0, 17, 1, 1);
	_tmp45_ = (GtkLabel*) gtk_label_new (_ ("Transparency"));
	g_object_ref_sink (_tmp45_);
	_g_object_unref0 (self->priv->transparency_label);
	self->priv->transparency_label = _tmp45_;
	_tmp46_ = self->priv->transparency_label;
	gtk_label_set_xalign (_tmp46_, (gfloat) 0);
	_tmp47_ = self->priv->transparency_label;
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) _tmp47_, 0, 22, 1, 1);
	_tmp48_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 0, (gdouble) 100, (gdouble) 5);
	g_object_ref_sink (_tmp48_);
	_g_object_unref0 (self->priv->transparency_slider);
	self->priv->transparency_slider = _tmp48_;
	weather_show_applet_weather_show_settings_set_initialtransparency (self);
	_tmp49_ = self->priv->transparency_slider;
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) _tmp49_, 0, 23, 1, 1);
	_tmp50_ = self->priv->transparency_slider;
	g_signal_connect_object ((GtkRange*) _tmp50_, "value-changed", (GCallback) _weather_show_applet_weather_show_settings_update_transparencysettings_gtk_range_value_changed, self, 0);
	_tmp51_ = (GtkLabel*) gtk_label_new ("\n");
	g_object_ref_sink (_tmp51_);
	spacelabel6 = _tmp51_;
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) spacelabel6, 0, 24, 1, 1);
	_tmp52_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp52_);
	colorbox = _tmp52_;
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) colorbox, 0, 30, 1, 1);
	_tmp53_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp53_);
	_g_object_unref0 (self->priv->weathercbutton);
	self->priv->weathercbutton = _tmp53_;
	weather_show_applet_weather_show_settings_set_buttoncolor (self);
	_tmp54_ = self->priv->weathercbutton;
	gtk_widget_set_size_request ((GtkWidget*) _tmp54_, 10, 10);
	_tmp55_ = self->priv->weathercbutton;
	g_signal_connect_object (_tmp55_, "clicked", (GCallback) ___lambda6__gtk_button_clicked, self, 0);
	_tmp56_ = self->priv->weathercbutton;
	gtk_box_pack_start (colorbox, (GtkWidget*) _tmp56_, FALSE, FALSE, (guint) 0);
	_tmp57_ = g_strconcat ("\t", _ ("Set text color"), NULL);
	_tmp58_ = _tmp57_;
	_tmp59_ = (GtkLabel*) gtk_label_new (_tmp58_);
	g_object_ref_sink (_tmp59_);
	_g_object_unref0 (self->priv->colorlabel);
	self->priv->colorlabel = _tmp59_;
	_g_free0 (_tmp58_);
	_tmp60_ = self->priv->colorlabel;
	gtk_label_set_xalign (_tmp60_, (gfloat) 0);
	_tmp61_ = self->priv->colorlabel;
	gtk_box_pack_start (colorbox, (GtkWidget*) _tmp61_, FALSE, FALSE, (guint) 0);
	_tmp62_ = (GtkLabel*) gtk_label_new ("\n");
	g_object_ref_sink (_tmp62_);
	spacelabel7 = _tmp62_;
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) spacelabel7, 0, 31, 1, 1);
	_tmp63_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Set custom position (px)"));
	g_object_ref_sink (_tmp63_);
	_g_object_unref0 (self->priv->setposbutton);
	self->priv->setposbutton = _tmp63_;
	_tmp64_ = self->priv->setposbutton;
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) _tmp64_, 0, 50, 1, 1);
	_tmp65_ = self->priv->setposbutton;
	g_signal_connect_object ((GtkToggleButton*) _tmp65_, "toggled", (GCallback) _weather_show_applet_weather_show_settings_toggle_value_gtk_toggle_button_toggled, self, 0);
	_tmp66_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp66_);
	posholder = _tmp66_;
	_tmp67_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp67_);
	_g_object_unref0 (self->priv->xpos);
	self->priv->xpos = _tmp67_;
	_tmp68_ = self->priv->xpos;
	gtk_entry_set_width_chars (_tmp68_, 4);
	_tmp69_ = (GtkLabel*) gtk_label_new ("x: ");
	g_object_ref_sink (_tmp69_);
	_g_object_unref0 (self->priv->xpos_label);
	self->priv->xpos_label = _tmp69_;
	_tmp70_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp70_);
	_g_object_unref0 (self->priv->ypos);
	self->priv->ypos = _tmp70_;
	_tmp71_ = self->priv->ypos;
	gtk_entry_set_width_chars (_tmp71_, 4);
	_tmp72_ = (GtkLabel*) gtk_label_new (" y: ");
	g_object_ref_sink (_tmp72_);
	_g_object_unref0 (self->priv->ypos_label);
	self->priv->ypos_label = _tmp72_;
	_tmp73_ = self->priv->xpos_label;
	gtk_box_pack_start (posholder, (GtkWidget*) _tmp73_, FALSE, FALSE, (guint) 0);
	_tmp74_ = self->priv->xpos;
	gtk_box_pack_start (posholder, (GtkWidget*) _tmp74_, FALSE, FALSE, (guint) 0);
	_tmp75_ = self->priv->ypos_label;
	gtk_box_pack_start (posholder, (GtkWidget*) _tmp75_, FALSE, FALSE, (guint) 0);
	_tmp76_ = self->priv->ypos;
	gtk_box_pack_start (posholder, (GtkWidget*) _tmp76_, FALSE, FALSE, (guint) 0);
	_tmp77_ = (GtkButton*) gtk_button_new_with_label ("OK");
	g_object_ref_sink (_tmp77_);
	_g_object_unref0 (self->priv->apply);
	self->priv->apply = _tmp77_;
	_tmp78_ = self->priv->apply;
	g_signal_connect_object (_tmp78_, "clicked", (GCallback) _weather_show_applet_weather_show_settings_update_xysetting_gtk_button_clicked, self, 0);
	_tmp79_ = self->priv->apply;
	gtk_box_pack_end (posholder, (GtkWidget*) _tmp79_, FALSE, FALSE, (guint) 0);
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) posholder, 0, 51, 1, 1);
	_tmp80_ = (GtkLabel*) gtk_label_new ("\n");
	g_object_ref_sink (_tmp80_);
	spacelabel8 = _tmp80_;
	_tmp81_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Custom location name"));
	g_object_ref_sink (_tmp81_);
	_g_object_unref0 (self->priv->customcity_checkbox);
	self->priv->customcity_checkbox = _tmp81_;
	_tmp82_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp82_);
	_g_object_unref0 (self->priv->customcity_entry);
	self->priv->customcity_entry = _tmp82_;
	_tmp83_ = self->priv->customcity_entry;
	gtk_entry_set_max_length (_tmp83_, 50);
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) spacelabel8, 0, 52, 1, 1);
	_tmp84_ = self->priv->customcity_checkbox;
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) _tmp84_, 0, 53, 1, 1);
	_tmp85_ = self->priv->customcity_entry;
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) _tmp85_, 0, 54, 1, 1);
	_tmp86_ = (GtkButton*) gtk_button_new_with_label ("Set");
	g_object_ref_sink (_tmp86_);
	_g_object_unref0 (self->priv->apply_cityname);
	self->priv->apply_cityname = _tmp86_;
	_tmp87_ = self->priv->apply_cityname;
	g_signal_connect_object (_tmp87_, "clicked", (GCallback) _weather_show_applet_weather_show_settings_update_customname_gtk_button_clicked, self, 0);
	_tmp88_ = self->priv->apply_cityname;
	gtk_grid_attach (subgrid_desktop, (GtkWidget*) _tmp88_, 1, 54, 1, 1);
	_tmp89_ = self->priv->customcity_checkbox;
	g_signal_connect_object ((GtkToggleButton*) _tmp89_, "toggled", (GCallback) _weather_show_applet_weather_show_settings_toggle_value_gtk_toggle_button_toggled, self, 0);
	_tmp90_ = self->priv->button_desktop;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp90_, weather_show_applet_show_ondesktop);
	_tmp91_ = _g_object_ref0 (ondesktop_checkbox);
	_tmp92_ = _g_object_ref0 (dynamicicon_checkbox);
	_tmp93_ = _g_object_ref0 (forecast_checkbox);
	_tmp94_ = self->priv->setposbutton;
	_tmp95_ = _g_object_ref0 (_tmp94_);
	_tmp96_ = self->priv->customcity_checkbox;
	_tmp97_ = _g_object_ref0 (_tmp96_);
	_tmp98_ = g_new0 (GtkCheckButton*, 5 + 1);
	_tmp98_[0] = _tmp91_;
	_tmp98_[1] = _tmp92_;
	_tmp98_[2] = _tmp93_;
	_tmp98_[3] = _tmp95_;
	_tmp98_[4] = _tmp97_;
	self->priv->cbuttons = (_vala_array_free (self->priv->cbuttons, self->priv->cbuttons_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->cbuttons = _tmp98_;
	self->priv->cbuttons_length1 = 5;
	self->priv->_cbuttons_size_ = self->priv->cbuttons_length1;
	_tmp99_ = g_strdup ("desktopweather");
	_tmp100_ = g_strdup ("dynamicicon");
	_tmp101_ = g_strdup ("forecast");
	_tmp102_ = g_strdup ("");
	_tmp103_ = g_strdup ("usecustomcity");
	_tmp104_ = g_new0 (gchar*, 5 + 1);
	_tmp104_[0] = _tmp99_;
	_tmp104_[1] = _tmp100_;
	_tmp104_[2] = _tmp101_;
	_tmp104_[3] = _tmp102_;
	_tmp104_[4] = _tmp103_;
	self->priv->add_args = (_vala_array_free (self->priv->add_args, self->priv->add_args_length1, (GDestroyNotify) g_free), NULL);
	self->priv->add_args = _tmp104_;
	self->priv->add_args_length1 = 5;
	self->priv->_add_args_size_ = self->priv->add_args_length1;
	weather_show_applet_weather_show_settings_set_initialpos (self);
	weather_show_applet_weather_show_settings_set_initialcustom (self);
	weather_show_applet_weather_show_settings_set_buttoncolor (self);
	_tmp105_ = weather_show_applet_ws_settings;
	g_signal_connect_object (_tmp105_, "changed::textcolor", (GCallback) ___lambda7__g_settings_changed, self, 0);
	gtk_widget_show_all ((GtkWidget*) self);
	_g_object_unref0 (spacelabel8);
	_g_object_unref0 (posholder);
	_g_object_unref0 (spacelabel7);
	_g_object_unref0 (colorbox);
	_g_object_unref0 (spacelabel6);
	_g_object_unref0 (spacelabel5);
	_g_object_unref0 (windunit_checkbox);
	_g_object_unref0 (tempunit_checkbox);
	_g_object_unref0 (spacelabel3);
	_g_object_unref0 (forecast_checkbox);
	_g_object_unref0 (dynamicicon_checkbox);
	_g_object_unref0 (ondesktop_checkbox);
	_g_object_unref0 (spacelabel2);
	_g_object_unref0 (spacelabel1);
	_g_object_unref0 (searchicon);
	_g_free0 (initialcity);
	_g_object_unref0 (citybox);
	_g_object_unref0 (citylabel);
	_g_object_unref0 (subgrid_desktop);
	_g_object_unref0 (subgrid_general);
	_g_object_unref0 (header_space);
	return self;
}

WeatherShowAppletWeatherShowSettings*
weather_show_applet_weather_show_settings_new (GSettings* settings,
                                               const gchar* uuid)
{
	return weather_show_applet_weather_show_settings_construct (WEATHER_SHOW_APPLET_TYPE_WEATHER_SHOW_SETTINGS, settings, uuid);
}

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

static void
weather_show_applet_weather_show_settings_update_customname (WeatherShowAppletWeatherShowSettings* self)
{
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GSettings* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->customcity_entry;
	_tmp1_ = gtk_entry_get_text (_tmp0_);
	_tmp2_ = string_strip (_tmp1_);
	_g_free0 (weather_show_applet_customcityname);
	weather_show_applet_customcityname = _tmp2_;
	_tmp3_ = weather_show_applet_ws_settings;
	_tmp4_ = weather_show_applet_customcityname;
	g_settings_set_string (_tmp3_, "customcityname", _tmp4_);
	weather_show_applet_update_weathershow ();
}

static gchar*
weather_show_applet_weather_show_settings_set_initialcity (WeatherShowAppletWeatherShowSettings* self)
{
	gchar* initial_citycode = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** initline = NULL;
	const gchar* _tmp2_;
	gint _tmp3_ = 0;
	gchar** _tmp4_;
	gint initline_length1;
	gint _initline_size_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gchar** _tmp8_;
	gint _tmp8__length1;
	const gchar* _tmp9_;
	gchar** _tmp10_;
	gchar** _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = weather_show_applet_citycode;
	_tmp1_ = g_strdup (_tmp0_);
	initial_citycode = _tmp1_;
	_tmp2_ = initial_citycode;
	_tmp4_ = weather_show_functions_get_matches (_tmp2_, &_tmp3_);
	initline = _tmp4_;
	initline_length1 = _tmp3_;
	_initline_size_ = initline_length1;
	_tmp5_ = initline;
	_tmp5__length1 = initline_length1;
	if (_tmp5__length1 == 0) {
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = g_strdup ("2643743");
		_g_free0 (weather_show_applet_citycode);
		weather_show_applet_citycode = _tmp6_;
		_tmp7_ = g_strdup ("London, GB");
		result = _tmp7_;
		initline = (_vala_array_free (initline, initline_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (initial_citycode);
		return result;
	}
	_tmp8_ = initline;
	_tmp8__length1 = initline_length1;
	_tmp9_ = _tmp8_[0];
	_tmp11_ = _tmp10_ = g_strsplit (_tmp9_, " ", 2);
	_tmp12_ = _tmp11_;
	_tmp12__length1 = _vala_array_length (_tmp10_);
	_tmp13_ = _tmp12_[1];
	_tmp14_ = g_strdup (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp12_ = (_vala_array_free (_tmp12_, _tmp12__length1, (GDestroyNotify) g_free), NULL);
	result = _tmp15_;
	initline = (_vala_array_free (initline, initline_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (initial_citycode);
	return result;
}

static void
weather_show_applet_weather_show_settings_set_initialpos (WeatherShowAppletWeatherShowSettings* self)
{
	gint set_xpos = 0;
	GSettings* _tmp0_;
	gint set_ypos = 0;
	GSettings* _tmp1_;
	gboolean currcustom = FALSE;
	gboolean _tmp2_ = FALSE;
	GtkCheckButton* _tmp9_;
	GtkEntry* _tmp10_;
	GtkEntry* _tmp11_;
	GtkButton* _tmp12_;
	GtkLabel* _tmp13_;
	GtkLabel* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = weather_show_applet_ws_settings;
	set_xpos = g_settings_get_int (_tmp0_, "xposition");
	_tmp1_ = weather_show_applet_ws_settings;
	set_ypos = g_settings_get_int (_tmp1_, "yposition");
	if (set_xpos != 200) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = set_ypos != 200;
	}
	if (_tmp2_) {
		GtkEntry* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		GtkEntry* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		currcustom = TRUE;
		_tmp3_ = self->priv->xpos;
		_tmp4_ = g_strdup_printf ("%i", set_xpos);
		_tmp5_ = _tmp4_;
		gtk_entry_set_text (_tmp3_, _tmp5_);
		_g_free0 (_tmp5_);
		_tmp6_ = self->priv->ypos;
		_tmp7_ = g_strdup_printf ("%i", set_ypos);
		_tmp8_ = _tmp7_;
		gtk_entry_set_text (_tmp6_, _tmp8_);
		_g_free0 (_tmp8_);
	} else {
		currcustom = FALSE;
	}
	_tmp9_ = self->priv->setposbutton;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp9_, currcustom);
	_tmp10_ = self->priv->xpos;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp10_, currcustom);
	_tmp11_ = self->priv->ypos;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp11_, currcustom);
	_tmp12_ = self->priv->apply;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp12_, currcustom);
	_tmp13_ = self->priv->xpos_label;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp13_, currcustom);
	_tmp14_ = self->priv->ypos_label;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp14_, currcustom);
}

static void
weather_show_applet_weather_show_settings_set_initialcustom (WeatherShowAppletWeatherShowSettings* self)
{
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GtkCheckButton* _tmp5_;
	GtkEntry* _tmp6_;
	GtkEntry* _tmp7_;
	const gchar* _tmp8_;
	GtkButton* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = weather_show_applet_ws_settings;
	weather_show_applet_use_custom_cityname = g_settings_get_boolean (_tmp0_, "usecustomcity");
	_tmp1_ = weather_show_applet_ws_settings;
	_tmp2_ = g_settings_get_string (_tmp1_, "customcityname");
	_tmp3_ = _tmp2_;
	_tmp4_ = string_strip (_tmp3_);
	_g_free0 (weather_show_applet_customcityname);
	weather_show_applet_customcityname = _tmp4_;
	_g_free0 (_tmp3_);
	_tmp5_ = self->priv->customcity_checkbox;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp5_, weather_show_applet_use_custom_cityname);
	_tmp6_ = self->priv->customcity_entry;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, weather_show_applet_use_custom_cityname);
	_tmp7_ = self->priv->customcity_entry;
	_tmp8_ = weather_show_applet_customcityname;
	gtk_entry_set_text (_tmp7_, _tmp8_);
	_tmp9_ = self->priv->apply_cityname;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp9_, weather_show_applet_use_custom_cityname);
}

static void
weather_show_applet_weather_show_settings_update_xysetting (WeatherShowAppletWeatherShowSettings* self,
                                                            GtkButton* button)
{
	gchar* newxpos_str = NULL;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gint newx = 0;
	const gchar* _tmp3_;
	gchar* newypos_str = NULL;
	GtkEntry* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gint newy = 0;
	const gchar* _tmp7_;
	gboolean _tmp8_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = self->priv->xpos;
	_tmp1_ = gtk_entry_get_text (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	newxpos_str = _tmp2_;
	_tmp3_ = newxpos_str;
	newx = atoi (_tmp3_);
	_tmp4_ = self->priv->ypos;
	_tmp5_ = gtk_entry_get_text (_tmp4_);
	_tmp6_ = g_strdup (_tmp5_);
	newypos_str = _tmp6_;
	_tmp7_ = newypos_str;
	newy = atoi (_tmp7_);
	if (newx != 0) {
		_tmp8_ = newy != 0;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		GSettings* _tmp9_;
		GSettings* _tmp10_;
		_tmp9_ = weather_show_applet_ws_settings;
		g_settings_set_int (_tmp9_, "xposition", newx);
		_tmp10_ = weather_show_applet_ws_settings;
		g_settings_set_int (_tmp10_, "yposition", newy);
	} else {
		g_print ("incorrect input: no integer");
	}
	_g_free0 (newypos_str);
	_g_free0 (newxpos_str);
}

static void
weather_show_applet_weather_show_settings_update_citysettings (WeatherShowAppletWeatherShowSettings* self,
                                                               GtkMenuItem* m)
{
	gchar* newselect = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gint index = 0;
	const gchar* _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gchar* newcode = NULL;
	gchar** _tmp4_;
	gint _tmp4__length1;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	GSettings* _tmp7_;
	const gchar* _tmp8_;
	GtkEntry* _tmp9_;
	const gchar* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (m != NULL);
	_tmp0_ = gtk_menu_item_get_label (m);
	_tmp1_ = g_strdup (_tmp0_);
	newselect = _tmp1_;
	_tmp2_ = newselect;
	_tmp3_ = self->priv->city_menurefs;
	_tmp3__length1 = self->priv->city_menurefs_length1;
	index = weather_show_functions_get_stringindex (_tmp2_, _tmp3_, (gint) _tmp3__length1);
	_tmp4_ = self->priv->city_menucodes;
	_tmp4__length1 = self->priv->city_menucodes_length1;
	_tmp5_ = _tmp4_[index];
	_tmp6_ = g_strdup (_tmp5_);
	newcode = _tmp6_;
	_tmp7_ = weather_show_applet_ws_settings;
	_tmp8_ = newcode;
	g_settings_set_string (_tmp7_, "citycode", _tmp8_);
	self->priv->edit_citymenu = FALSE;
	_tmp9_ = self->priv->cityentry;
	_tmp10_ = newselect;
	gtk_entry_set_text (_tmp9_, _tmp10_);
	self->priv->edit_citymenu = TRUE;
	if (weather_show_applet_use_custom_cityname) {
		GtkCheckButton* _tmp11_;
		_tmp11_ = self->priv->customcity_checkbox;
		gtk_toggle_button_set_active ((GtkToggleButton*) _tmp11_, FALSE);
	}
	weather_show_applet_update_weathershow ();
	_g_free0 (newcode);
	_g_free0 (newselect);
}

static void
weather_show_applet_weather_show_settings_update_transparencysettings (WeatherShowAppletWeatherShowSettings* self,
                                                                       GtkRange* slider)
{
	gint newval = 0;
	GSettings* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (slider != NULL);
	newval = (gint) gtk_range_get_value (slider);
	_tmp0_ = weather_show_applet_ws_settings;
	g_settings_set_int (_tmp0_, "transparency", newval);
}

static void
weather_show_applet_weather_show_settings_set_initialtransparency (WeatherShowAppletWeatherShowSettings* self)
{
	gint intialsetting = 0;
	GSettings* _tmp0_;
	GtkScale* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = weather_show_applet_ws_settings;
	intialsetting = g_settings_get_int (_tmp0_, "transparency");
	_tmp1_ = self->priv->transparency_slider;
	gtk_range_set_value ((GtkRange*) _tmp1_, (gdouble) intialsetting);
}

static void
_vala_array_add5 (gchar** * array,
                  gint* length,
                  gint* size,
                  gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add6 (gchar** * array,
                  gint* length,
                  gint* size,
                  gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_weather_show_applet_weather_show_settings_update_citysettings_gtk_menu_item_activate (GtkMenuItem* _sender,
                                                                                       gpointer self)
{
	weather_show_applet_weather_show_settings_update_citysettings ((WeatherShowAppletWeatherShowSettings*) self, _sender);
}

static void
weather_show_applet_weather_show_settings_update_citylist (WeatherShowAppletWeatherShowSettings* self,
                                                           GtkEditable* entry)
{
	gchar** _tmp0_;
	gchar** _tmp1_;
	gchar* currentry = NULL;
	GtkEntry* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	GtkMenu* _tmp5_;
	GtkMenu* _tmp6_;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	const gchar* _tmp9_;
	GtkMenu* _tmp38_;
	GtkMenuButton* _tmp39_;
	GtkMenu* _tmp40_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (entry != NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	self->priv->city_menurefs = (_vala_array_free (self->priv->city_menurefs, self->priv->city_menurefs_length1, (GDestroyNotify) g_free), NULL);
	self->priv->city_menurefs = _tmp0_;
	self->priv->city_menurefs_length1 = 0;
	self->priv->_city_menurefs_size_ = self->priv->city_menurefs_length1;
	_tmp1_ = g_new0 (gchar*, 0 + 1);
	self->priv->city_menucodes = (_vala_array_free (self->priv->city_menucodes, self->priv->city_menucodes_length1, (GDestroyNotify) g_free), NULL);
	self->priv->city_menucodes = _tmp1_;
	self->priv->city_menucodes_length1 = 0;
	self->priv->_city_menucodes_size_ = self->priv->city_menucodes_length1;
	_tmp2_ = self->priv->cityentry;
	_tmp3_ = gtk_entry_get_text (_tmp2_);
	_tmp4_ = g_strdup (_tmp3_);
	currentry = _tmp4_;
	_tmp5_ = self->priv->citymenu;
	gtk_widget_destroy ((GtkWidget*) _tmp5_);
	_tmp6_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->citymenu);
	self->priv->citymenu = _tmp6_;
	_tmp9_ = currentry;
	if (g_utf8_strlen (_tmp9_, (gssize) -1) > 2) {
		_tmp8_ = self->priv->edit_citymenu == TRUE;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		_tmp7_ = entry != NULL;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		gchar** matches = NULL;
		const gchar* _tmp10_;
		gint _tmp11_ = 0;
		gchar** _tmp12_;
		gint matches_length1;
		gint _matches_size_;
		gint n_matches = 0;
		gchar** _tmp13_;
		gint _tmp13__length1;
		_tmp10_ = currentry;
		_tmp12_ = weather_show_functions_get_matches (_tmp10_, &_tmp11_);
		matches = _tmp12_;
		matches_length1 = _tmp11_;
		_matches_size_ = matches_length1;
		_tmp13_ = matches;
		_tmp13__length1 = matches_length1;
		n_matches = _tmp13__length1;
		if (n_matches > 0) {
			gchar** _tmp14_;
			gint _tmp14__length1;
			_tmp14_ = matches;
			_tmp14__length1 = matches_length1;
			{
				gchar** s_collection = NULL;
				gint s_collection_length1 = 0;
				gint _s_collection_size_ = 0;
				gint s_it = 0;
				s_collection = _tmp14_;
				s_collection_length1 = _tmp14__length1;
				for (s_it = 0; s_it < s_collection_length1; s_it = s_it + 1) {
					gchar* _tmp15_;
					gchar* s = NULL;
					_tmp15_ = g_strdup (s_collection[s_it]);
					s = _tmp15_;
					{
						gchar** new_ref = NULL;
						const gchar* _tmp16_;
						gchar** _tmp17_;
						gchar** _tmp18_;
						gint new_ref_length1;
						gint _new_ref_size_;
						gchar* newref = NULL;
						gchar** _tmp19_;
						gint _tmp19__length1;
						const gchar* _tmp20_;
						gchar* _tmp21_;
						GtkMenuItem* newitem = NULL;
						const gchar* _tmp22_;
						GtkMenuItem* _tmp23_;
						const gchar* _tmp24_;
						gchar* _tmp25_;
						gchar** _tmp26_;
						gint _tmp26__length1;
						const gchar* _tmp27_;
						gchar* _tmp28_;
						GtkMenuItem* _tmp29_;
						GtkMenu* _tmp30_;
						GtkMenuItem* _tmp31_;
						_tmp16_ = s;
						_tmp18_ = _tmp17_ = g_strsplit (_tmp16_, " ", 2);
						new_ref = _tmp18_;
						new_ref_length1 = _vala_array_length (_tmp17_);
						_new_ref_size_ = new_ref_length1;
						_tmp19_ = new_ref;
						_tmp19__length1 = new_ref_length1;
						_tmp20_ = _tmp19_[1];
						_tmp21_ = g_strdup (_tmp20_);
						newref = _tmp21_;
						_tmp22_ = newref;
						_tmp23_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp22_);
						g_object_ref_sink (_tmp23_);
						newitem = _tmp23_;
						_tmp24_ = newref;
						_tmp25_ = g_strdup (_tmp24_);
						_vala_array_add5 (&self->priv->city_menurefs, &self->priv->city_menurefs_length1, &self->priv->_city_menurefs_size_, _tmp25_);
						_tmp26_ = new_ref;
						_tmp26__length1 = new_ref_length1;
						_tmp27_ = _tmp26_[0];
						_tmp28_ = g_strdup (_tmp27_);
						_vala_array_add6 (&self->priv->city_menucodes, &self->priv->city_menucodes_length1, &self->priv->_city_menucodes_size_, _tmp28_);
						_tmp29_ = newitem;
						g_signal_connect_object (_tmp29_, "activate", (GCallback) _weather_show_applet_weather_show_settings_update_citysettings_gtk_menu_item_activate, self, 0);
						_tmp30_ = self->priv->citymenu;
						_tmp31_ = newitem;
						gtk_container_add ((GtkContainer*) _tmp30_, (GtkWidget*) _tmp31_);
						_g_object_unref0 (newitem);
						_g_free0 (newref);
						new_ref = (_vala_array_free (new_ref, new_ref_length1, (GDestroyNotify) g_free), NULL);
						_g_free0 (s);
					}
				}
			}
		} else {
			GtkMenuItem* newitem = NULL;
			GtkMenuItem* _tmp32_;
			GtkMenu* _tmp33_;
			GtkMenuItem* _tmp34_;
			_tmp32_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("No matches found");
			g_object_ref_sink (_tmp32_);
			newitem = _tmp32_;
			_tmp33_ = self->priv->citymenu;
			_tmp34_ = newitem;
			gtk_container_add ((GtkContainer*) _tmp33_, (GtkWidget*) _tmp34_);
			_g_object_unref0 (newitem);
		}
		matches = (_vala_array_free (matches, matches_length1, (GDestroyNotify) g_free), NULL);
	} else {
		GtkMenuItem* newitem = NULL;
		GtkMenuItem* _tmp35_;
		GtkMenu* _tmp36_;
		GtkMenuItem* _tmp37_;
		_tmp35_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_ ("Please enter at least 3 characters"));
		g_object_ref_sink (_tmp35_);
		newitem = _tmp35_;
		_tmp36_ = self->priv->citymenu;
		_tmp37_ = newitem;
		gtk_container_add ((GtkContainer*) _tmp36_, (GtkWidget*) _tmp37_);
		_g_object_unref0 (newitem);
	}
	_tmp38_ = self->priv->citymenu;
	gtk_widget_show_all ((GtkWidget*) _tmp38_);
	_tmp39_ = self->priv->search_button;
	_tmp40_ = self->priv->citymenu;
	gtk_menu_button_set_popup (_tmp39_, (GtkWidget*) _tmp40_);
	_g_free0 (currentry);
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static void
weather_show_applet_weather_show_settings_set_buttoncolor (WeatherShowAppletWeatherShowSettings* self)
{
	GtkButton* _tmp0_;
	GdkScreen* _tmp1_;
	GdkScreen* _tmp2_;
	GtkCssProvider* _tmp3_;
	gchar** readcolor = NULL;
	GSettings* _tmp4_;
	gchar** _tmp5_;
	gchar** _tmp6_;
	gint readcolor_length1;
	gint _readcolor_size_;
	gchar* newcsscolor = NULL;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	GtkButton* _tmp10_;
	GtkStyleContext* _tmp11_;
	GdkScreen* _tmp14_;
	GtkCssProvider* _tmp15_;
	GtkButton* _tmp16_;
	GtkStyleContext* _tmp17_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->weathercbutton;
	_tmp1_ = gtk_widget_get_screen ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (self->priv->screen);
	self->priv->screen = _tmp2_;
	_tmp3_ = gtk_css_provider_new ();
	_g_object_unref0 (self->priv->css_provider);
	self->priv->css_provider = _tmp3_;
	_tmp4_ = weather_show_applet_ws_settings;
	_tmp6_ = _tmp5_ = g_settings_get_strv (_tmp4_, "textcolor");
	readcolor = _tmp6_;
	readcolor_length1 = _vala_array_length (_tmp5_);
	_readcolor_size_ = readcolor_length1;
	_tmp7_ = _vala_g_strjoinv (", ", readcolor, (gint) readcolor_length1);
	newcsscolor = _tmp7_;
	_tmp8_ = self->priv->css_template;
	_tmp9_ = string_replace (_tmp8_, "xxx, xxx, xxx", newcsscolor);
	_g_free0 (self->priv->css_data2);
	self->priv->css_data2 = _tmp9_;
	_tmp10_ = self->priv->weathercbutton;
	_tmp11_ = gtk_widget_get_style_context ((GtkWidget*) _tmp10_);
	gtk_style_context_remove_class (_tmp11_, "weathercbutton");
	{
		GtkCssProvider* _tmp12_;
		const gchar* _tmp13_;
		_tmp12_ = self->priv->css_provider;
		_tmp13_ = self->priv->css_data2;
		gtk_css_provider_load_from_data (_tmp12_, _tmp13_, (gssize) -1, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		g_print ("Error loading css\n");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (newcsscolor);
		readcolor = (_vala_array_free (readcolor, readcolor_length1, (GDestroyNotify) g_free), NULL);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_tmp14_ = self->priv->screen;
	_tmp15_ = self->priv->css_provider;
	gtk_style_context_add_provider_for_screen (_tmp14_, (GtkStyleProvider*) _tmp15_, (guint) GTK_STYLE_PROVIDER_PRIORITY_USER);
	_tmp16_ = self->priv->weathercbutton;
	_tmp17_ = gtk_widget_get_style_context ((GtkWidget*) _tmp16_);
	gtk_style_context_add_class (_tmp17_, "weathercbutton");
	gtk_widget_show_all ((GtkWidget*) self);
	_g_free0 (newcsscolor);
	readcolor = (_vala_array_free (readcolor, readcolor_length1, (GDestroyNotify) g_free), NULL);
}

static void
weather_show_applet_weather_show_settings_on_button_general_clicked (WeatherShowAppletWeatherShowSettings* self,
                                                                     GtkButton* button)
{
	GtkStack* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = self->priv->stack;
	gtk_stack_set_visible_child_name (_tmp0_, "Page1");
	_tmp1_ = self->priv->currmarker_label1;
	gtk_label_set_text (_tmp1_, "⸻");
	_tmp2_ = self->priv->currmarker_label2;
	gtk_label_set_text (_tmp2_, "");
}

static void
weather_show_applet_weather_show_settings_on_button_desktop_clicked (WeatherShowAppletWeatherShowSettings* self,
                                                                     GtkButton* button)
{
	GtkStack* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = self->priv->stack;
	gtk_stack_set_visible_child_name (_tmp0_, "Page2");
	_tmp1_ = self->priv->currmarker_label2;
	gtk_label_set_text (_tmp1_, "⸻");
	_tmp2_ = self->priv->currmarker_label1;
	gtk_label_set_text (_tmp2_, "");
}

static gint
weather_show_applet_weather_show_settings_get_buttonarg (WeatherShowAppletWeatherShowSettings* self,
                                                         GtkToggleButton* button)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (button != NULL, -1);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GtkCheckButton** _tmp2_;
				gint _tmp2__length1;
				GtkCheckButton** _tmp3_;
				gint _tmp3__length1;
				GtkCheckButton* _tmp4_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->cbuttons;
				_tmp2__length1 = self->priv->cbuttons_length1;
				if (!(i < _tmp2__length1)) {
					break;
				}
				_tmp3_ = self->priv->cbuttons;
				_tmp3__length1 = self->priv->cbuttons_length1;
				_tmp4_ = _tmp3_[i];
				if (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_toggle_button_get_type (), GtkToggleButton) == button) {
					result = i;
					return result;
				}
			}
		}
	}
	result = -1;
	return result;
}

static gboolean
weather_show_applet_weather_show_settings_get_tempstate (WeatherShowAppletWeatherShowSettings* self)
{
	const gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = weather_show_applet_tempunit;
	result = g_strcmp0 (_tmp0_, "Fahrenheit") == 0;
	return result;
}

static gboolean
weather_show_applet_weather_show_settings_get_windstate (WeatherShowAppletWeatherShowSettings* self)
{
	const gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = weather_show_applet_windunit;
	result = g_strcmp0 (_tmp0_, "Miles") == 0;
	return result;
}

static void
weather_show_applet_weather_show_settings_set_tempunit (WeatherShowAppletWeatherShowSettings* self,
                                                        GtkToggleButton* button)
{
	gboolean newsetting = FALSE;
	GSettings* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	newsetting = gtk_toggle_button_get_active (button);
	if (newsetting == TRUE) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("Fahrenheit");
		_g_free0 (weather_show_applet_tempunit);
		weather_show_applet_tempunit = _tmp0_;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("Celsius");
		_g_free0 (weather_show_applet_tempunit);
		weather_show_applet_tempunit = _tmp1_;
	}
	weather_show_applet_update_weathershow ();
	_tmp2_ = weather_show_applet_ws_settings;
	_tmp3_ = weather_show_applet_tempunit;
	g_settings_set_string (_tmp2_, "tempunit", _tmp3_);
}

static void
weather_show_applet_weather_show_settings_set_windunit (WeatherShowAppletWeatherShowSettings* self,
                                                        GtkToggleButton* button)
{
	gboolean newsetting = FALSE;
	GSettings* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	newsetting = gtk_toggle_button_get_active (button);
	if (newsetting == TRUE) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("Miles");
		_g_free0 (weather_show_applet_windunit);
		weather_show_applet_windunit = _tmp0_;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("Meters");
		_g_free0 (weather_show_applet_windunit);
		weather_show_applet_windunit = _tmp1_;
	}
	weather_show_applet_update_weathershow ();
	_tmp2_ = weather_show_applet_ws_settings;
	_tmp3_ = weather_show_applet_windunit;
	g_settings_set_string (_tmp2_, "windunit", _tmp3_);
}

static void
weather_show_applet_weather_show_settings_toggle_value (WeatherShowAppletWeatherShowSettings* self,
                                                        GtkToggleButton* button)
{
	gboolean newsetting = FALSE;
	gint val_index = 0;
	gchar* currsetting = NULL;
	gchar** _tmp0_;
	gint _tmp0__length1;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	newsetting = gtk_toggle_button_get_active (button);
	val_index = weather_show_applet_weather_show_settings_get_buttonarg (self, button);
	_tmp0_ = self->priv->add_args;
	_tmp0__length1 = self->priv->add_args_length1;
	_tmp1_ = _tmp0_[val_index];
	_tmp2_ = g_strdup (_tmp1_);
	currsetting = _tmp2_;
	if (val_index != 3) {
		GSettings* _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = weather_show_applet_ws_settings;
		_tmp4_ = currsetting;
		g_settings_set_boolean (_tmp3_, _tmp4_, newsetting);
	}
	if (val_index == 0) {
		GtkButton* _tmp5_;
		_tmp5_ = self->priv->button_desktop;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, newsetting);
		if (newsetting == TRUE) {
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			_tmp6_ = weather_show_applet_desktop_window;
			_tmp7_ = self->priv->uuid;
			weather_show_functions_open_window (_tmp6_, _tmp7_);
		}
	} else {
		if (val_index == 3) {
			GtkLabel* _tmp8_;
			GtkLabel* _tmp9_;
			GtkEntry* _tmp10_;
			GtkEntry* _tmp11_;
			GtkButton* _tmp12_;
			_tmp8_ = self->priv->xpos_label;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, newsetting);
			_tmp9_ = self->priv->ypos_label;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp9_, newsetting);
			_tmp10_ = self->priv->xpos;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp10_, newsetting);
			_tmp11_ = self->priv->ypos;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp11_, newsetting);
			_tmp12_ = self->priv->apply;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp12_, newsetting);
			if (newsetting == FALSE) {
				GtkEntry* _tmp13_;
				GtkEntry* _tmp14_;
				GSettings* _tmp15_;
				GSettings* _tmp16_;
				_tmp13_ = self->priv->xpos;
				gtk_entry_set_text (_tmp13_, "");
				_tmp14_ = self->priv->ypos;
				gtk_entry_set_text (_tmp14_, "");
				_tmp15_ = weather_show_applet_ws_settings;
				g_settings_set_int (_tmp15_, "xposition", 200);
				_tmp16_ = weather_show_applet_ws_settings;
				g_settings_set_int (_tmp16_, "yposition", 200);
			}
		} else {
			if (val_index == 4) {
				GtkEntry* _tmp17_;
				GtkEntry* _tmp18_;
				const gchar* _tmp19_;
				GtkButton* _tmp20_;
				_tmp17_ = self->priv->customcity_entry;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp17_, newsetting);
				_tmp18_ = self->priv->customcity_entry;
				_tmp19_ = weather_show_applet_customcityname;
				gtk_entry_set_text (_tmp18_, _tmp19_);
				_tmp20_ = self->priv->apply_cityname;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp20_, newsetting);
			} else {
				gboolean _tmp21_ = FALSE;
				if (val_index == 1) {
					_tmp21_ = newsetting == FALSE;
				} else {
					_tmp21_ = FALSE;
				}
				if (_tmp21_) {
					GtkImage* _tmp22_;
					const gchar* _tmp23_;
					GtkLabel* _tmp24_;
					_tmp22_ = weather_show_applet_indicatorIcon;
					_tmp23_ = weather_show_applet_default_icon;
					gtk_image_set_from_icon_name (_tmp22_, _tmp23_, (GtkIconSize) GTK_ICON_SIZE_MENU);
					_tmp24_ = weather_show_applet_templabel;
					gtk_label_set_text (_tmp24_, "");
				}
			}
		}
	}
	weather_show_applet_update_weathershow ();
	_g_free0 (currsetting);
}

static void
weather_show_applet_weather_show_settings_class_init (WeatherShowAppletWeatherShowSettingsClass * klass,
                                                      gpointer klass_data)
{
	weather_show_applet_weather_show_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WeatherShowAppletWeatherShowSettings_private_offset);
	G_OBJECT_CLASS (klass)->finalize = weather_show_applet_weather_show_settings_finalize;
}

static void
weather_show_applet_weather_show_settings_instance_init (WeatherShowAppletWeatherShowSettings * self,
                                                         gpointer klass)
{
	self->priv = weather_show_applet_weather_show_settings_get_instance_private (self);
}

static void
weather_show_applet_weather_show_settings_finalize (GObject * obj)
{
	WeatherShowAppletWeatherShowSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WEATHER_SHOW_APPLET_TYPE_WEATHER_SHOW_SETTINGS, WeatherShowAppletWeatherShowSettings);
	self->priv->cbuttons = (_vala_array_free (self->priv->cbuttons, self->priv->cbuttons_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->add_args = (_vala_array_free (self->priv->add_args, self->priv->add_args_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (self->priv->css_template);
	_g_free0 (self->priv->css_data2);
	_g_object_unref0 (self->priv->transparency_slider);
	_g_object_unref0 (self->priv->weathercbutton);
	_g_object_unref0 (self->priv->colorlabel);
	_g_object_unref0 (self->priv->setposbutton);
	_g_object_unref0 (self->priv->xpos);
	_g_object_unref0 (self->priv->ypos);
	_g_object_unref0 (self->priv->xpos_label);
	_g_object_unref0 (self->priv->ypos_label);
	_g_object_unref0 (self->priv->apply);
	_g_object_unref0 (self->priv->apply_cityname);
	_g_object_unref0 (self->priv->transparency_label);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->button_desktop);
	_g_object_unref0 (self->priv->button_general);
	_g_object_unref0 (self->priv->currmarker_label1);
	_g_object_unref0 (self->priv->currmarker_label2);
	_g_object_unref0 (self->priv->css_provider);
	_g_object_unref0 (self->priv->cityentry);
	_g_object_unref0 (self->priv->citymenu);
	_g_object_unref0 (self->priv->screen);
	_g_object_unref0 (self->priv->search_button);
	self->priv->city_menurefs = (_vala_array_free (self->priv->city_menurefs, self->priv->city_menurefs_length1, (GDestroyNotify) g_free), NULL);
	self->priv->city_menucodes = (_vala_array_free (self->priv->city_menucodes, self->priv->city_menucodes_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (self->priv->customcity_checkbox);
	_g_object_unref0 (self->priv->customcity_entry);
	_g_free0 (self->priv->uuid);
	G_OBJECT_CLASS (weather_show_applet_weather_show_settings_parent_class)->finalize (obj);
}

GType
weather_show_applet_weather_show_settings_get_type (void)
{
	return weather_show_applet_weather_show_settings_type_id;
}

GType
weather_show_applet_weather_show_settings_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (WeatherShowAppletWeatherShowSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) weather_show_applet_weather_show_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WeatherShowAppletWeatherShowSettings), 0, (GInstanceInitFunc) weather_show_applet_weather_show_settings_instance_init, NULL };
	weather_show_applet_weather_show_settings_type_id = g_type_module_register_type (module, gtk_grid_get_type (), "WeatherShowAppletWeatherShowSettings", &g_define_type_info, 0);
	WeatherShowAppletWeatherShowSettings_private_offset = sizeof (WeatherShowAppletWeatherShowSettingsPrivate);
	return weather_show_applet_weather_show_settings_type_id;
}

static BudgieApplet*
weather_show_applet_plugin_real_get_panel_widget (BudgiePlugin* base,
                                                  const gchar* uuid)
{
	WeatherShowAppletPlugin * self;
	PeasPluginInfo* info = NULL;
	PeasPluginInfo* _tmp0_;
	PeasPluginInfo* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	WeatherShowAppletApplet* _tmp4_;
	BudgieApplet* result;
	self = (WeatherShowAppletPlugin*) base;
	g_return_val_if_fail (uuid != NULL, NULL);
	_tmp0_ = peas_extension_base_get_plugin_info ((PeasExtensionBase*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	info = _tmp1_;
	_tmp2_ = peas_plugin_info_get_module_dir (info);
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (weather_show_applet_moduledir);
	weather_show_applet_moduledir = _tmp3_;
	_tmp4_ = weather_show_applet_applet_new (uuid);
	g_object_ref_sink (_tmp4_);
	result = (BudgieApplet*) _tmp4_;
	_g_object_unref0 (info);
	return result;
}

WeatherShowAppletPlugin*
weather_show_applet_plugin_construct (GType object_type)
{
	WeatherShowAppletPlugin * self = NULL;
	self = (WeatherShowAppletPlugin*) g_object_new (object_type, NULL);
	return self;
}

WeatherShowAppletPlugin*
weather_show_applet_plugin_new (void)
{
	return weather_show_applet_plugin_construct (WEATHER_SHOW_APPLET_TYPE_PLUGIN);
}

static void
weather_show_applet_plugin_class_init (WeatherShowAppletPluginClass * klass,
                                       gpointer klass_data)
{
	weather_show_applet_plugin_parent_class = g_type_class_peek_parent (klass);
}

static void
weather_show_applet_plugin_budgie_plugin_interface_init (BudgiePluginIface * iface,
                                                         gpointer iface_data)
{
	weather_show_applet_plugin_budgie_plugin_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_panel_widget = (BudgieApplet* (*) (BudgiePlugin*, const gchar*)) weather_show_applet_plugin_real_get_panel_widget;
}

static void
weather_show_applet_plugin_instance_init (WeatherShowAppletPlugin * self,
                                          gpointer klass)
{
}

GType
weather_show_applet_plugin_get_type (void)
{
	return weather_show_applet_plugin_type_id;
}

GType
weather_show_applet_plugin_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (WeatherShowAppletPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) weather_show_applet_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WeatherShowAppletPlugin), 0, (GInstanceInitFunc) weather_show_applet_plugin_instance_init, NULL };
	static const GInterfaceInfo budgie_plugin_info = { (GInterfaceInitFunc) weather_show_applet_plugin_budgie_plugin_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	weather_show_applet_plugin_type_id = g_type_module_register_type (module, peas_extension_base_get_type (), "WeatherShowAppletPlugin", &g_define_type_info, 0);
	g_type_module_add_interface (module, weather_show_applet_plugin_type_id, budgie_plugin_get_type (), &budgie_plugin_info);
	return weather_show_applet_plugin_type_id;
}

static inline gpointer
weather_show_applet_weather_show_popover_get_instance_private (WeatherShowAppletWeatherShowPopover* self)
{
	return G_STRUCT_MEMBER_P (self, WeatherShowAppletWeatherShowPopover_private_offset);
}

static void
_weather_show_applet_weather_show_popover_previous_stack_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self)
{
	weather_show_applet_weather_show_popover_previous_stack ((WeatherShowAppletWeatherShowPopover*) self, _sender);
}

static void
_weather_show_applet_weather_show_popover_next_stack_gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self)
{
	weather_show_applet_weather_show_popover_next_stack ((WeatherShowAppletWeatherShowPopover*) self, _sender);
}

WeatherShowAppletWeatherShowPopover*
weather_show_applet_weather_show_popover_construct (GType object_type,
                                                    GtkEventBox* indicatorBox)
{
	WeatherShowAppletWeatherShowPopover * self = NULL;
	GtkEventBox* _tmp0_;
	GtkImage* _tmp1_;
	GtkImage* _tmp2_;
	const gchar* _tmp3_;
	GtkLabel* _tmp4_;
	GtkBox* _tmp5_;
	GtkImage* _tmp6_;
	GtkBox* _tmp7_;
	GtkLabel* _tmp8_;
	GtkGrid* _tmp9_;
	GtkGrid* _tmp10_;
	GtkBox* leftbox = NULL;
	GtkBox* _tmp11_;
	GtkButton* browseleft = NULL;
	GtkButton* _tmp12_;
	GtkBox* rightbox = NULL;
	GtkBox* _tmp13_;
	GtkButton* browseright = NULL;
	GtkButton* _tmp14_;
	GtkGrid* _tmp15_;
	GtkGrid* _tmp16_;
	GtkGrid* _tmp17_;
	g_return_val_if_fail (indicatorBox != NULL, NULL);
	self = (WeatherShowAppletWeatherShowPopover*) g_object_new (object_type, "relative-to", indicatorBox, NULL);
	_tmp0_ = _g_object_ref0 (indicatorBox);
	_g_object_unref0 (self->priv->indicatorBox);
	self->priv->indicatorBox = _tmp0_;
	_tmp1_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (weather_show_applet_indicatorIcon);
	weather_show_applet_indicatorIcon = _tmp1_;
	_tmp2_ = weather_show_applet_indicatorIcon;
	_tmp3_ = weather_show_applet_default_icon;
	gtk_image_set_from_icon_name (_tmp2_, _tmp3_, (GtkIconSize) GTK_ICON_SIZE_MENU);
	_tmp4_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (weather_show_applet_templabel);
	weather_show_applet_templabel = _tmp4_;
	_tmp5_ = weather_show_applet_container;
	_tmp6_ = weather_show_applet_indicatorIcon;
	gtk_box_pack_start (_tmp5_, (GtkWidget*) _tmp6_, FALSE, FALSE, (guint) 0);
	_tmp7_ = weather_show_applet_container;
	_tmp8_ = weather_show_applet_templabel;
	gtk_box_pack_end (_tmp7_, (GtkWidget*) _tmp8_, FALSE, FALSE, (guint) 0);
	_tmp9_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (weather_show_applet_popover_mastergrid);
	weather_show_applet_popover_mastergrid = _tmp9_;
	_tmp10_ = weather_show_applet_popover_mastergrid;
	gtk_grid_set_column_spacing (_tmp10_, (guint) 30);
	_tmp11_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp11_);
	leftbox = _tmp11_;
	_tmp12_ = (GtkButton*) gtk_button_new_from_icon_name ("go-previous-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
	g_object_ref_sink (_tmp12_);
	browseleft = _tmp12_;
	gtk_widget_set_size_request ((GtkWidget*) browseleft, 10, 10);
	gtk_button_set_relief (browseleft, GTK_RELIEF_NONE);
	g_signal_connect_object (browseleft, "clicked", (GCallback) _weather_show_applet_weather_show_popover_previous_stack_gtk_button_clicked, self, 0);
	gtk_box_pack_end (leftbox, (GtkWidget*) browseleft, FALSE, FALSE, (guint) 0);
	_tmp13_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp13_);
	rightbox = _tmp13_;
	_tmp14_ = (GtkButton*) gtk_button_new_from_icon_name ("go-next-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
	g_object_ref_sink (_tmp14_);
	browseright = _tmp14_;
	gtk_widget_set_size_request ((GtkWidget*) browseright, 10, 10);
	gtk_button_set_relief (browseright, GTK_RELIEF_NONE);
	g_signal_connect_object (browseright, "clicked", (GCallback) _weather_show_applet_weather_show_popover_next_stack_gtk_button_clicked, self, 0);
	gtk_box_pack_end (rightbox, (GtkWidget*) browseright, FALSE, FALSE, (guint) 0);
	_tmp15_ = weather_show_applet_popover_mastergrid;
	gtk_grid_attach (_tmp15_, (GtkWidget*) leftbox, 0, 0, 1, 1);
	_tmp16_ = weather_show_applet_popover_mastergrid;
	gtk_grid_attach (_tmp16_, (GtkWidget*) rightbox, 2, 0, 1, 1);
	_tmp17_ = weather_show_applet_popover_mastergrid;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp17_);
	_g_object_unref0 (browseright);
	_g_object_unref0 (rightbox);
	_g_object_unref0 (browseleft);
	_g_object_unref0 (leftbox);
	return self;
}

WeatherShowAppletWeatherShowPopover*
weather_show_applet_weather_show_popover_new (GtkEventBox* indicatorBox)
{
	return weather_show_applet_weather_show_popover_construct (WEATHER_SHOW_APPLET_TYPE_WEATHER_SHOW_POPOVER, indicatorBox);
}

static void
weather_show_applet_weather_show_popover_next_stack (WeatherShowAppletWeatherShowPopover* self,
                                                     GtkButton* button)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	if (weather_show_applet_fc_stackindex != 3) {
		gint newindex = 0;
		GtkStack* _tmp0_;
		gchar** _tmp1_;
		gint _tmp1__length1;
		const gchar* _tmp2_;
		newindex = weather_show_applet_fc_stackindex + 1;
		_tmp0_ = weather_show_applet_popoverstack;
		_tmp1_ = weather_show_applet_fc_stacknames;
		_tmp1__length1 = weather_show_applet_fc_stacknames_length1;
		_tmp2_ = _tmp1_[newindex];
		gtk_stack_set_visible_child_name (_tmp0_, _tmp2_);
		weather_show_applet_fc_stackindex = newindex;
	}
}

static void
weather_show_applet_weather_show_popover_previous_stack (WeatherShowAppletWeatherShowPopover* self,
                                                         GtkButton* button)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	if (weather_show_applet_fc_stackindex != 0) {
		gint newindex = 0;
		GtkStack* _tmp0_;
		gchar** _tmp1_;
		gint _tmp1__length1;
		const gchar* _tmp2_;
		newindex = weather_show_applet_fc_stackindex - 1;
		_tmp0_ = weather_show_applet_popoverstack;
		_tmp1_ = weather_show_applet_fc_stacknames;
		_tmp1__length1 = weather_show_applet_fc_stacknames_length1;
		_tmp2_ = _tmp1_[newindex];
		gtk_stack_set_visible_child_name (_tmp0_, _tmp2_);
		weather_show_applet_fc_stackindex = newindex;
	}
}

static void
weather_show_applet_weather_show_popover_class_init (WeatherShowAppletWeatherShowPopoverClass * klass,
                                                     gpointer klass_data)
{
	weather_show_applet_weather_show_popover_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WeatherShowAppletWeatherShowPopover_private_offset);
	G_OBJECT_CLASS (klass)->finalize = weather_show_applet_weather_show_popover_finalize;
}

static void
weather_show_applet_weather_show_popover_instance_init (WeatherShowAppletWeatherShowPopover * self,
                                                        gpointer klass)
{
	self->priv = weather_show_applet_weather_show_popover_get_instance_private (self);
}

static void
weather_show_applet_weather_show_popover_finalize (GObject * obj)
{
	WeatherShowAppletWeatherShowPopover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WEATHER_SHOW_APPLET_TYPE_WEATHER_SHOW_POPOVER, WeatherShowAppletWeatherShowPopover);
	_g_object_unref0 (self->priv->indicatorBox);
	G_OBJECT_CLASS (weather_show_applet_weather_show_popover_parent_class)->finalize (obj);
}

GType
weather_show_applet_weather_show_popover_get_type (void)
{
	return weather_show_applet_weather_show_popover_type_id;
}

GType
weather_show_applet_weather_show_popover_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (WeatherShowAppletWeatherShowPopoverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) weather_show_applet_weather_show_popover_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WeatherShowAppletWeatherShowPopover), 0, (GInstanceInitFunc) weather_show_applet_weather_show_popover_instance_init, NULL };
	weather_show_applet_weather_show_popover_type_id = g_type_module_register_type (module, budgie_popover_get_type (), "WeatherShowAppletWeatherShowPopover", &g_define_type_info, 0);
	WeatherShowAppletWeatherShowPopover_private_offset = sizeof (WeatherShowAppletWeatherShowPopoverPrivate);
	return weather_show_applet_weather_show_popover_type_id;
}

static inline gpointer
weather_show_applet_applet_get_instance_private (WeatherShowAppletApplet* self)
{
	return G_STRUCT_MEMBER_P (self, WeatherShowAppletApplet_private_offset);
}

static gboolean
weather_show_applet_applet_real_supports_settings (BudgieApplet* base)
{
	WeatherShowAppletApplet * self;
	gboolean result;
	self = (WeatherShowAppletApplet*) base;
	result = TRUE;
	return result;
}

static GtkWidget*
weather_show_applet_applet_real_get_settings_ui (BudgieApplet* base)
{
	WeatherShowAppletApplet * self;
	const gchar* _tmp0_;
	GSettings* _tmp1_;
	GSettings* _tmp2_;
	const gchar* _tmp3_;
	WeatherShowAppletWeatherShowSettings* _tmp4_;
	GtkWidget* _tmp5_;
	GtkWidget* result;
	self = (WeatherShowAppletApplet*) base;
	_tmp0_ = self->priv->_uuid;
	_tmp1_ = budgie_applet_get_applet_settings ((BudgieApplet*) self, _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_uuid;
	_tmp4_ = weather_show_applet_weather_show_settings_new (_tmp2_, _tmp3_);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = (GtkWidget*) _tmp4_;
	_g_object_unref0 (_tmp2_);
	result = _tmp5_;
	return result;
}

static gboolean
weather_show_applet_applet_find_applet (WeatherShowAppletApplet* self,
                                        const gchar* uuid,
                                        gchar** applets,
                                        gint applets_length1)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (uuid != NULL, FALSE);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				const gchar* _tmp2_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(i < applets_length1)) {
					break;
				}
				_tmp2_ = applets[i];
				if (g_strcmp0 (_tmp2_, uuid) == 0) {
					result = TRUE;
					return result;
				}
			}
		}
	}
	result = FALSE;
	return result;
}

static Block4Data*
block4_data_ref (Block4Data* _data4_)
{
	g_atomic_int_inc (&_data4_->_ref_count_);
	return _data4_;
}

static void
block4_data_unref (void * _userdata_)
{
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		WeatherShowAppletApplet* self;
		self = _data4_->self;
		_data4_->applets = (_vala_array_free (_data4_->applets, _data4_->applets_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (_data4_->uuid);
		_g_object_unref0 (self);
		g_slice_free (Block4Data, _data4_);
	}
}

static Block5Data*
block5_data_ref (Block5Data* _data5_)
{
	g_atomic_int_inc (&_data5_->_ref_count_);
	return _data5_;
}

static void
block5_data_unref (void * _userdata_)
{
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
		WeatherShowAppletApplet* self;
		self = _data5_->_data4_->self;
		_g_object_unref0 (_data5_->currpanelsubject_settings);
		block4_data_unref (_data5_->_data4_);
		_data5_->_data4_ = NULL;
		g_slice_free (Block5Data, _data5_);
	}
}

static void
_____lambda8_ (Block5Data* _data5_)
{
	Block4Data* _data4_;
	WeatherShowAppletApplet* self;
	GSettings* _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	_data4_ = _data5_->_data4_;
	self = _data4_->self;
	_tmp0_ = _data5_->currpanelsubject_settings;
	_tmp2_ = _tmp1_ = g_settings_get_strv (_tmp0_, "applets");
	_data4_->applets = (_vala_array_free (_data4_->applets, _data4_->applets_length1, (GDestroyNotify) g_free), NULL);
	_data4_->applets = _tmp2_;
	_data4_->applets_length1 = _vala_array_length (_tmp1_);
	_data4_->_applets_size_ = _data4_->applets_length1;
	_tmp3_ = _data4_->applets;
	_tmp3__length1 = _data4_->applets_length1;
	if (!weather_show_applet_applet_find_applet (self, _data4_->uuid, _tmp3_, (gint) _tmp3__length1)) {
		self->priv->weather_onpanel = FALSE;
	}
}

static void
______lambda8__g_settings_changed (GSettings* _sender,
                                   const gchar* key,
                                   gpointer self)
{
	_____lambda8_ (self);
}

static void
weather_show_applet_applet_watchapplet (WeatherShowAppletApplet* self,
                                        const gchar* uuid)
{
	Block4Data* _data4_;
	gchar* _tmp0_;
	gchar* general_path = NULL;
	gchar* _tmp1_;
	GSettings* panel_settings = NULL;
	const gchar* _tmp2_;
	GSettings* _tmp3_;
	gchar** allpanels_list = NULL;
	GSettings* _tmp4_;
	gchar** _tmp5_;
	gchar** _tmp6_;
	gint allpanels_list_length1;
	gint _allpanels_list_size_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (uuid != NULL);
	_data4_ = g_slice_new0 (Block4Data);
	_data4_->_ref_count_ = 1;
	_data4_->self = g_object_ref (self);
	_tmp0_ = g_strdup (uuid);
	_g_free0 (_data4_->uuid);
	_data4_->uuid = _tmp0_;
	_tmp1_ = g_strdup ("com.solus-project.budgie-panel");
	general_path = _tmp1_;
	_tmp2_ = general_path;
	_tmp3_ = g_settings_new (_tmp2_);
	panel_settings = _tmp3_;
	_tmp4_ = panel_settings;
	_tmp6_ = _tmp5_ = g_settings_get_strv (_tmp4_, "panels");
	allpanels_list = _tmp6_;
	allpanels_list_length1 = _vala_array_length (_tmp5_);
	_allpanels_list_size_ = allpanels_list_length1;
	_tmp7_ = allpanels_list;
	_tmp7__length1 = allpanels_list_length1;
	{
		gchar** p_collection = NULL;
		gint p_collection_length1 = 0;
		gint _p_collection_size_ = 0;
		gint p_it = 0;
		p_collection = _tmp7_;
		p_collection_length1 = _tmp7__length1;
		for (p_it = 0; p_it < p_collection_length1; p_it = p_it + 1) {
			gchar* _tmp8_;
			gchar* p = NULL;
			_tmp8_ = g_strdup (p_collection[p_it]);
			p = _tmp8_;
			{
				Block5Data* _data5_;
				gchar* panelpath = NULL;
				const gchar* _tmp9_;
				gchar* _tmp10_;
				const gchar* _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				const gchar* _tmp14_;
				GSettings* _tmp15_;
				GSettings* _tmp16_;
				GSettings* _tmp17_;
				gchar** _tmp18_;
				gchar** _tmp19_;
				gchar** _tmp20_;
				gint _tmp20__length1;
				_data5_ = g_slice_new0 (Block5Data);
				_data5_->_ref_count_ = 1;
				_data5_->_data4_ = block4_data_ref (_data4_);
				_tmp9_ = p;
				_tmp10_ = g_strconcat ("/com/solus-project/budgie-panel/panels/", "{", _tmp9_, "}/", NULL);
				panelpath = _tmp10_;
				_tmp11_ = general_path;
				_tmp12_ = g_strconcat (_tmp11_, ".panel", NULL);
				_tmp13_ = _tmp12_;
				_tmp14_ = panelpath;
				_tmp15_ = g_settings_new_with_path (_tmp13_, _tmp14_);
				_tmp16_ = _tmp15_;
				_g_free0 (_tmp13_);
				_data5_->currpanelsubject_settings = _tmp16_;
				_tmp17_ = _data5_->currpanelsubject_settings;
				_tmp19_ = _tmp18_ = g_settings_get_strv (_tmp17_, "applets");
				_data4_->applets = (_vala_array_free (_data4_->applets, _data4_->applets_length1, (GDestroyNotify) g_free), NULL);
				_data4_->applets = _tmp19_;
				_data4_->applets_length1 = _vala_array_length (_tmp18_);
				_data4_->_applets_size_ = _data4_->applets_length1;
				_tmp20_ = _data4_->applets;
				_tmp20__length1 = _data4_->applets_length1;
				if (weather_show_applet_applet_find_applet (self, _data4_->uuid, _tmp20_, (gint) _tmp20__length1)) {
					GSettings* _tmp21_;
					_tmp21_ = _data5_->currpanelsubject_settings;
					g_signal_connect_data (_tmp21_, "changed::applets", (GCallback) ______lambda8__g_settings_changed, block5_data_ref (_data5_), (GClosureNotify) block5_data_unref, 0);
					_g_free0 (panelpath);
					_g_free0 (p);
					block5_data_unref (_data5_);
					_data5_ = NULL;
					break;
				}
				_g_free0 (panelpath);
				_g_free0 (p);
				block5_data_unref (_data5_);
				_data5_ = NULL;
			}
		}
	}
	allpanels_list = (_vala_array_free (allpanels_list, allpanels_list_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (panel_settings);
	_g_free0 (general_path);
	block4_data_unref (_data4_);
	_data4_ = NULL;
}

static Block6Data*
block6_data_ref (Block6Data* _data6_)
{
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}

static void
block6_data_unref (void * _userdata_)
{
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		WeatherShowAppletApplet* self;
		self = _data6_->self;
		_g_free0 (_data6_->uuid);
		_g_object_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}

static gboolean
__lambda9_ (Block6Data* _data6_)
{
	WeatherShowAppletApplet* self;
	gboolean result;
	self = _data6_->self;
	weather_show_applet_applet_watchapplet (self, _data6_->uuid);
	result = FALSE;
	return result;
}

static gboolean
___lambda9__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda9_ (self);
	return result;
}

static void
__lambda10_ (WeatherShowAppletApplet* self)
{
	GSettings* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = weather_show_applet_ws_settings;
	_tmp1_ = g_settings_get_string (_tmp0_, "tempunit");
	_g_free0 (weather_show_applet_tempunit);
	weather_show_applet_tempunit = _tmp1_;
}

static void
___lambda10__g_settings_changed (GSettings* _sender,
                                 const gchar* key,
                                 gpointer self)
{
	__lambda10_ ((WeatherShowAppletApplet*) self);
}

static void
__lambda11_ (WeatherShowAppletApplet* self)
{
	GSettings* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = weather_show_applet_ws_settings;
	_tmp1_ = g_settings_get_string (_tmp0_, "windunit");
	_g_free0 (weather_show_applet_windunit);
	weather_show_applet_windunit = _tmp1_;
}

static void
___lambda11__g_settings_changed (GSettings* _sender,
                                 const gchar* key,
                                 gpointer self)
{
	__lambda11_ ((WeatherShowAppletApplet*) self);
}

static void
__lambda12_ (WeatherShowAppletApplet* self)
{
	GSettings* _tmp0_;
	_tmp0_ = weather_show_applet_ws_settings;
	weather_show_applet_show_ondesktop = g_settings_get_boolean (_tmp0_, "desktopweather");
}

static void
___lambda12__g_settings_changed (GSettings* _sender,
                                 const gchar* key,
                                 gpointer self)
{
	__lambda12_ ((WeatherShowAppletApplet*) self);
}

static void
__lambda13_ (WeatherShowAppletApplet* self)
{
	GSettings* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = weather_show_applet_ws_settings;
	_tmp1_ = g_settings_get_string (_tmp0_, "citycode");
	_g_free0 (weather_show_applet_citycode);
	weather_show_applet_citycode = _tmp1_;
}

static void
___lambda13__g_settings_changed (GSettings* _sender,
                                 const gchar* key,
                                 gpointer self)
{
	__lambda13_ ((WeatherShowAppletApplet*) self);
}

static void
__lambda14_ (WeatherShowAppletApplet* self)
{
	GSettings* _tmp0_;
	_tmp0_ = weather_show_applet_ws_settings;
	weather_show_applet_dynamic_icon = g_settings_get_boolean (_tmp0_, "dynamicicon");
}

static void
___lambda14__g_settings_changed (GSettings* _sender,
                                 const gchar* key,
                                 gpointer self)
{
	__lambda14_ ((WeatherShowAppletApplet*) self);
}

static void
__lambda15_ (WeatherShowAppletApplet* self)
{
	GSettings* _tmp0_;
	_tmp0_ = weather_show_applet_ws_settings;
	weather_show_applet_show_forecast = g_settings_get_boolean (_tmp0_, "forecast");
}

static void
___lambda15__g_settings_changed (GSettings* _sender,
                                 const gchar* key,
                                 gpointer self)
{
	__lambda15_ ((WeatherShowAppletApplet*) self);
}

static void
__lambda16_ (WeatherShowAppletApplet* self)
{
	GSettings* _tmp0_;
	_tmp0_ = weather_show_applet_ws_settings;
	weather_show_applet_use_custom_cityname = g_settings_get_boolean (_tmp0_, "usecustomcity");
}

static void
___lambda16__g_settings_changed (GSettings* _sender,
                                 const gchar* key,
                                 gpointer self)
{
	__lambda16_ ((WeatherShowAppletApplet*) self);
}

static void
__lambda17_ (WeatherShowAppletApplet* self)
{
	GSettings* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	_tmp0_ = weather_show_applet_ws_settings;
	_tmp1_ = g_settings_get_string (_tmp0_, "customcityname");
	_tmp2_ = _tmp1_;
	_tmp3_ = string_strip (_tmp2_);
	_g_free0 (weather_show_applet_customcityname);
	weather_show_applet_customcityname = _tmp3_;
	_g_free0 (_tmp2_);
}

static void
___lambda17__g_settings_changed (GSettings* _sender,
                                 const gchar* key,
                                 gpointer self)
{
	__lambda17_ ((WeatherShowAppletApplet*) self);
}

static gboolean
___lambda18_ (Block6Data* _data6_)
{
	WeatherShowAppletApplet* self;
	const gchar* _tmp0_;
	gboolean result;
	self = _data6_->self;
	_tmp0_ = weather_show_applet_desktop_window;
	weather_show_functions_open_window (_tmp0_, _data6_->uuid);
	result = FALSE;
	return result;
}

static gboolean
____lambda18__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda18_ (self);
	return result;
}

static gboolean
__lambda19_ (WeatherShowAppletApplet* self,
             GdkEventButton* e)
{
	gboolean result;
	g_return_val_if_fail (e != NULL, FALSE);
	if (weather_show_applet_show_forecast == TRUE) {
		WeatherShowAppletWeatherShowPopover* _tmp0_;
		if (e->button != ((guint) 1)) {
			result = GDK_EVENT_PROPAGATE;
			return result;
		}
		_tmp0_ = self->priv->popover;
		if (gtk_widget_get_visible ((GtkWidget*) _tmp0_)) {
			WeatherShowAppletWeatherShowPopover* _tmp1_;
			_tmp1_ = self->priv->popover;
			gtk_widget_hide ((GtkWidget*) _tmp1_);
		} else {
			BudgiePopoverManager* _tmp2_;
			GtkEventBox* _tmp3_;
			_tmp2_ = self->priv->manager;
			_tmp3_ = self->priv->indicatorBox;
			budgie_popover_manager_show_popover (_tmp2_, (GtkWidget*) _tmp3_);
		}
		result = GDK_EVENT_STOP;
		return result;
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda19__gtk_widget_button_press_event (GtkWidget* _sender,
                                            GdkEventButton* event,
                                            gpointer self)
{
	gboolean result;
	result = __lambda19_ ((WeatherShowAppletApplet*) self, event);
	return result;
}

static gpointer
_weather_show_applet_applet_run_periodiccheck_gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) weather_show_applet_applet_run_periodiccheck ((WeatherShowAppletApplet*) self));
	g_object_unref (self);
	return result;
}

WeatherShowAppletApplet*
weather_show_applet_applet_construct (GType object_type,
                                      const gchar* uuid)
{
	WeatherShowAppletApplet * self = NULL;
	Block6Data* _data6_;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar** _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	gchar* _tmp20_;
	GSettings* _tmp21_;
	GSettings* _tmp22_;
	gchar* _tmp23_;
	GSettings* _tmp24_;
	GSettings* _tmp25_;
	gchar* _tmp26_;
	GSettings* _tmp27_;
	gchar* _tmp28_;
	GSettings* _tmp29_;
	gchar* _tmp30_;
	GSettings* _tmp31_;
	GSettings* _tmp32_;
	GSettings* _tmp33_;
	gchar* _tmp34_;
	GSettings* _tmp35_;
	GSettings* _tmp36_;
	GSettings* _tmp37_;
	GSettings* _tmp38_;
	GSettings* _tmp39_;
	GSettings* _tmp40_;
	GSettings* _tmp41_;
	GSettings* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	GSettings* _tmp46_;
	GtkEventBox* _tmp47_;
	GtkBox* _tmp48_;
	GtkEventBox* _tmp49_;
	GtkBox* _tmp50_;
	GtkEventBox* _tmp51_;
	GtkEventBox* _tmp52_;
	WeatherShowAppletWeatherShowPopover* _tmp53_;
	GtkEventBox* _tmp54_;
	WeatherShowAppletWeatherShowPopover* _tmp55_;
	GtkWidget* _tmp56_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (uuid != NULL, NULL);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_tmp0_ = g_strdup (uuid);
	_g_free0 (_data6_->uuid);
	_data6_->uuid = _tmp0_;
	self = (WeatherShowAppletApplet*) g_object_new (object_type, NULL);
	_data6_->self = g_object_ref (self);
	weather_show_applet_applet_set_uuid (self, _data6_->uuid);
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda9__gsource_func, block6_data_ref (_data6_), block6_data_unref);
	_tmp1_ = weather_show_applet_moduledir;
	_tmp2_ = g_strconcat (_tmp1_, "/desktop_weather", NULL);
	_g_free0 (weather_show_applet_desktop_window);
	weather_show_applet_desktop_window = _tmp2_;
	_tmp3_ = weather_show_applet_moduledir;
	_tmp4_ = g_strconcat (_tmp3_, "/get_color", NULL);
	_g_free0 (weather_show_applet_color_window);
	weather_show_applet_color_window = _tmp4_;
	_tmp5_ = g_strdup ("↓");
	_tmp6_ = g_strdup ("↙");
	_tmp7_ = g_strdup ("←");
	_tmp8_ = g_strdup ("↖");
	_tmp9_ = g_strdup ("↑");
	_tmp10_ = g_strdup ("↗");
	_tmp11_ = g_strdup ("→");
	_tmp12_ = g_strdup ("↘");
	_tmp13_ = g_strdup ("↓");
	_tmp14_ = g_new0 (gchar*, 9 + 1);
	_tmp14_[0] = _tmp5_;
	_tmp14_[1] = _tmp6_;
	_tmp14_[2] = _tmp7_;
	_tmp14_[3] = _tmp8_;
	_tmp14_[4] = _tmp9_;
	_tmp14_[5] = _tmp10_;
	_tmp14_[6] = _tmp11_;
	_tmp14_[7] = _tmp12_;
	_tmp14_[8] = _tmp13_;
	weather_show_applet_directions = (_vala_array_free (weather_show_applet_directions, weather_show_applet_directions_length1, (GDestroyNotify) g_free), NULL);
	weather_show_applet_directions = _tmp14_;
	weather_show_applet_directions_length1 = 9;
	_weather_show_applet_directions_size_ = weather_show_applet_directions_length1;
	_tmp15_ = g_strdup ("forecast0");
	_tmp16_ = g_strdup ("forecast1");
	_tmp17_ = g_strdup ("forecast2");
	_tmp18_ = g_strdup ("forecast3");
	_tmp19_ = g_new0 (gchar*, 4 + 1);
	_tmp19_[0] = _tmp15_;
	_tmp19_[1] = _tmp16_;
	_tmp19_[2] = _tmp17_;
	_tmp19_[3] = _tmp18_;
	weather_show_applet_fc_stacknames = (_vala_array_free (weather_show_applet_fc_stacknames, weather_show_applet_fc_stacknames_length1, (GDestroyNotify) g_free), NULL);
	weather_show_applet_fc_stacknames = _tmp19_;
	weather_show_applet_fc_stacknames_length1 = 4;
	_weather_show_applet_fc_stacknames_size_ = weather_show_applet_fc_stacknames_length1;
	weather_show_applet_applet_get_icondata (self);
	_tmp20_ = g_strdup ("budgie-wticon-symbolic");
	_g_free0 (weather_show_applet_default_icon);
	weather_show_applet_default_icon = _tmp20_;
	_tmp21_ = weather_show_functions_get_settings ("org.ubuntubudgie.plugins.weathershow");
	_g_object_unref0 (weather_show_applet_ws_settings);
	weather_show_applet_ws_settings = _tmp21_;
	_tmp22_ = weather_show_applet_ws_settings;
	_tmp23_ = g_settings_get_string (_tmp22_, "tempunit");
	_g_free0 (weather_show_applet_tempunit);
	weather_show_applet_tempunit = _tmp23_;
	_tmp24_ = weather_show_applet_ws_settings;
	g_signal_connect_object (_tmp24_, "changed::tempunit", (GCallback) ___lambda10__g_settings_changed, self, 0);
	_tmp25_ = weather_show_applet_ws_settings;
	_tmp26_ = g_settings_get_string (_tmp25_, "windunit");
	_g_free0 (weather_show_applet_windunit);
	weather_show_applet_windunit = _tmp26_;
	_tmp27_ = weather_show_applet_ws_settings;
	g_signal_connect_object (_tmp27_, "changed::windunit", (GCallback) ___lambda11__g_settings_changed, self, 0);
	_tmp28_ = weather_show_functions_get_langmatch ();
	_g_free0 (weather_show_applet_lang);
	weather_show_applet_lang = _tmp28_;
	_tmp29_ = weather_show_applet_ws_settings;
	_tmp30_ = g_settings_get_string (_tmp29_, "key");
	_g_free0 (weather_show_applet_key);
	weather_show_applet_key = _tmp30_;
	_tmp31_ = weather_show_applet_ws_settings;
	weather_show_applet_show_ondesktop = g_settings_get_boolean (_tmp31_, "desktopweather");
	_tmp32_ = weather_show_applet_ws_settings;
	g_signal_connect_object (_tmp32_, "changed::desktopweather", (GCallback) ___lambda12__g_settings_changed, self, 0);
	_tmp33_ = weather_show_applet_ws_settings;
	_tmp34_ = g_settings_get_string (_tmp33_, "citycode");
	_g_free0 (weather_show_applet_citycode);
	weather_show_applet_citycode = _tmp34_;
	_tmp35_ = weather_show_applet_ws_settings;
	g_signal_connect_object (_tmp35_, "changed::citycode", (GCallback) ___lambda13__g_settings_changed, self, 0);
	_tmp36_ = weather_show_applet_ws_settings;
	weather_show_applet_dynamic_icon = g_settings_get_boolean (_tmp36_, "dynamicicon");
	_tmp37_ = weather_show_applet_ws_settings;
	g_signal_connect_object (_tmp37_, "changed::dynamicicon", (GCallback) ___lambda14__g_settings_changed, self, 0);
	_tmp38_ = weather_show_applet_ws_settings;
	weather_show_applet_show_forecast = g_settings_get_boolean (_tmp38_, "forecast");
	_tmp39_ = weather_show_applet_ws_settings;
	g_signal_connect_object (_tmp39_, "changed::forecast", (GCallback) ___lambda15__g_settings_changed, self, 0);
	_tmp40_ = weather_show_applet_ws_settings;
	weather_show_applet_use_custom_cityname = g_settings_get_boolean (_tmp40_, "usecustomcity");
	_tmp41_ = weather_show_applet_ws_settings;
	g_signal_connect_object (_tmp41_, "changed::usecustomcity", (GCallback) ___lambda16__g_settings_changed, self, 0);
	_tmp42_ = weather_show_applet_ws_settings;
	_tmp43_ = g_settings_get_string (_tmp42_, "customcityname");
	_tmp44_ = _tmp43_;
	_tmp45_ = string_strip (_tmp44_);
	_g_free0 (weather_show_applet_customcityname);
	weather_show_applet_customcityname = _tmp45_;
	_g_free0 (_tmp44_);
	_tmp46_ = weather_show_applet_ws_settings;
	g_signal_connect_object (_tmp46_, "changed::customcityname", (GCallback) ___lambda17__g_settings_changed, self, 0);
	if (weather_show_applet_show_ondesktop == TRUE) {
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda18__gsource_func, block6_data_ref (_data6_), block6_data_unref);
	}
	weather_show_applet_applet_initialiseLocaleLanguageSupport (self);
	_tmp47_ = (GtkEventBox*) gtk_event_box_new ();
	g_object_ref_sink (_tmp47_);
	_g_object_unref0 (self->priv->indicatorBox);
	self->priv->indicatorBox = _tmp47_;
	_tmp48_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp48_);
	_g_object_unref0 (weather_show_applet_container);
	weather_show_applet_container = _tmp48_;
	_tmp49_ = self->priv->indicatorBox;
	_tmp50_ = weather_show_applet_container;
	gtk_container_add ((GtkContainer*) _tmp49_, (GtkWidget*) _tmp50_);
	_tmp51_ = self->priv->indicatorBox;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp51_);
	_tmp52_ = self->priv->indicatorBox;
	_tmp53_ = weather_show_applet_weather_show_popover_new (_tmp52_);
	g_object_ref_sink (_tmp53_);
	_g_object_unref0 (self->priv->popover);
	self->priv->popover = _tmp53_;
	_tmp54_ = self->priv->indicatorBox;
	g_signal_connect_object ((GtkWidget*) _tmp54_, "button-press-event", (GCallback) ___lambda19__gtk_widget_button_press_event, self, 0);
	_tmp55_ = self->priv->popover;
	_tmp56_ = gtk_bin_get_child ((GtkBin*) _tmp55_);
	gtk_widget_show_all (_tmp56_);
	gtk_widget_show_all ((GtkWidget*) self);
	weather_show_applet_update_weathershow ();
	{
		GThread* _tmp57_ = NULL;
		GThread* _tmp58_;
		GThread* _tmp59_;
		_tmp58_ = g_thread_try_new ("oldtimer", _weather_show_applet_applet_run_periodiccheck_gthread_func, g_object_ref (self), &_inner_error0_);
		_tmp57_ = _tmp58_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp59_ = _tmp57_;
		_tmp57_ = NULL;
		_g_thread_unref0 (self->priv->update_thread);
		self->priv->update_thread = _tmp59_;
		_g_thread_unref0 (_tmp57_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		g_print ("Cannot start thread\n");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		block6_data_unref (_data6_);
		_data6_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	block6_data_unref (_data6_);
	_data6_ = NULL;
	return self;
}

WeatherShowAppletApplet*
weather_show_applet_applet_new (const gchar* uuid)
{
	return weather_show_applet_applet_construct (WEATHER_SHOW_APPLET_TYPE_APPLET, uuid);
}

static void
weather_show_applet_applet_real_panel_position_changed (BudgieApplet* base,
                                                        BudgiePanelPosition position)
{
	WeatherShowAppletApplet * self;
	gboolean _tmp0_ = FALSE;
	self = (WeatherShowAppletApplet*) base;
	if (position == BUDGIE_PANEL_POSITION_LEFT) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = position == BUDGIE_PANEL_POSITION_RIGHT;
	}
	if (_tmp0_) {
		GtkBox* _tmp1_;
		_tmp1_ = weather_show_applet_container;
		gtk_orientable_set_orientation ((GtkOrientable*) _tmp1_, GTK_ORIENTATION_VERTICAL);
	} else {
		GtkBox* _tmp2_;
		_tmp2_ = weather_show_applet_container;
		gtk_orientable_set_orientation ((GtkOrientable*) _tmp2_, GTK_ORIENTATION_HORIZONTAL);
	}
}

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

static gboolean
weather_show_applet_applet_run_periodiccheck (WeatherShowAppletApplet* self)
{
	GDateTime* currtime1 = NULL;
	GDateTime* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = g_date_time_new_now_utc ();
	currtime1 = _tmp0_;
	while (TRUE) {
		GDateTime* currtime2 = NULL;
		GDateTime* _tmp1_;
		GTimeSpan diff = 0LL;
		GDateTime* _tmp2_;
		GDateTime* _tmp3_;
		gboolean _tmp4_ = FALSE;
		if (!self->priv->weather_onpanel) {
			break;
		}
		_tmp1_ = g_date_time_new_now_utc ();
		currtime2 = _tmp1_;
		_tmp2_ = currtime2;
		_tmp3_ = currtime1;
		diff = g_date_time_difference (_tmp2_, _tmp3_);
		if (diff > ((GTimeSpan) 600000000)) {
			_tmp4_ = TRUE;
		} else {
			_tmp4_ = weather_show_applet_lasttime_failed == TRUE;
		}
		if (_tmp4_) {
			GDateTime* _tmp5_;
			GDateTime* _tmp6_;
			weather_show_applet_update_weathershow ();
			_tmp5_ = currtime2;
			_tmp6_ = _g_date_time_ref0 (_tmp5_);
			_g_date_time_unref0 (currtime1);
			currtime1 = _tmp6_;
		}
		g_usleep ((gulong) (15 * 1000000));
		_g_date_time_unref0 (currtime2);
	}
	result = TRUE;
	_g_date_time_unref0 (currtime1);
	return result;
}

static void
_vala_array_add7 (gchar** * array,
                  gint* length,
                  gint* size,
                  gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add8 (GdkPixbuf** * array,
                  gint* length,
                  gint* size,
                  GdkPixbuf* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GdkPixbuf*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add9 (GdkPixbuf** * array,
                  gint* length,
                  gint* size,
                  GdkPixbuf* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GdkPixbuf*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
weather_show_applet_applet_get_icondata (WeatherShowAppletApplet* self)
{
	gchar* icondir = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	GdkPixbuf** _tmp2_;
	GdkPixbuf** _tmp3_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_build_filename (WEATHERSHOW_DATADIR, "weather_icons", NULL);
	icondir = _tmp0_;
	_tmp1_ = g_new0 (gchar*, 0 + 1);
	weather_show_applet_iconnames = (_vala_array_free (weather_show_applet_iconnames, weather_show_applet_iconnames_length1, (GDestroyNotify) g_free), NULL);
	weather_show_applet_iconnames = _tmp1_;
	weather_show_applet_iconnames_length1 = 0;
	_weather_show_applet_iconnames_size_ = weather_show_applet_iconnames_length1;
	_tmp2_ = g_new0 (GdkPixbuf*, 0 + 1);
	weather_show_applet_iconpixbufs = (_vala_array_free (weather_show_applet_iconpixbufs, weather_show_applet_iconpixbufs_length1, (GDestroyNotify) g_object_unref), NULL);
	weather_show_applet_iconpixbufs = _tmp2_;
	weather_show_applet_iconpixbufs_length1 = 0;
	_weather_show_applet_iconpixbufs_size_ = weather_show_applet_iconpixbufs_length1;
	_tmp3_ = g_new0 (GdkPixbuf*, 0 + 1);
	weather_show_applet_iconpixbufs_large = (_vala_array_free (weather_show_applet_iconpixbufs_large, weather_show_applet_iconpixbufs_large_length1, (GDestroyNotify) g_object_unref), NULL);
	weather_show_applet_iconpixbufs_large = _tmp3_;
	weather_show_applet_iconpixbufs_large_length1 = 0;
	_weather_show_applet_iconpixbufs_large_size_ = weather_show_applet_iconpixbufs_large_length1;
	{
		GDir* dr = NULL;
		const gchar* _tmp4_;
		GDir* _tmp5_;
		gchar* filename = NULL;
		_tmp4_ = icondir;
		_tmp5_ = g_dir_open (_tmp4_, (guint) 0, &_inner_error0_);
		dr = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_FILE_ERROR) {
				goto __catch0_g_file_error;
			}
			_g_free0 (icondir);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		filename = NULL;
		while (TRUE) {
			GDir* _tmp6_;
			const gchar* _tmp7_;
			gchar* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			gchar* _tmp11_;
			gchar* iconpath = NULL;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			gchar* _tmp14_;
			_tmp6_ = dr;
			_tmp7_ = g_dir_read_name (_tmp6_);
			_tmp8_ = g_strdup (_tmp7_);
			_g_free0 (filename);
			filename = _tmp8_;
			_tmp9_ = filename;
			if (!(_tmp9_ != NULL)) {
				break;
			}
			_tmp10_ = filename;
			_tmp11_ = string_slice (_tmp10_, (glong) 0, (glong) 4);
			_vala_array_add7 (&weather_show_applet_iconnames, &weather_show_applet_iconnames_length1, &_weather_show_applet_iconnames_size_, _tmp11_);
			_tmp12_ = icondir;
			_tmp13_ = filename;
			_tmp14_ = g_build_filename (_tmp12_, _tmp13_, NULL);
			iconpath = _tmp14_;
			{
				GdkPixbuf* _tmp15_ = NULL;
				const gchar* _tmp16_;
				GdkPixbuf* _tmp17_;
				GdkPixbuf* _tmp18_;
				GdkPixbuf* _tmp19_ = NULL;
				const gchar* _tmp20_;
				GdkPixbuf* _tmp21_;
				GdkPixbuf* _tmp22_;
				_tmp16_ = iconpath;
				_tmp17_ = gdk_pixbuf_new_from_file_at_size (_tmp16_, 22, 22, &_inner_error0_);
				_tmp15_ = _tmp17_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch1_g_error;
				}
				_tmp18_ = _tmp15_;
				_tmp15_ = NULL;
				_vala_array_add8 (&weather_show_applet_iconpixbufs, &weather_show_applet_iconpixbufs_length1, &_weather_show_applet_iconpixbufs_size_, _tmp18_);
				_tmp20_ = iconpath;
				_tmp21_ = gdk_pixbuf_new_from_file_at_size (_tmp20_, 65, 65, &_inner_error0_);
				_tmp19_ = _tmp21_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_object_unref0 (_tmp15_);
					goto __catch1_g_error;
				}
				_tmp22_ = _tmp19_;
				_tmp19_ = NULL;
				_vala_array_add9 (&weather_show_applet_iconpixbufs_large, &weather_show_applet_iconpixbufs_large_length1, &_weather_show_applet_iconpixbufs_large_size_, _tmp22_);
				_g_object_unref0 (_tmp19_);
				_g_object_unref0 (_tmp15_);
			}
			goto __finally1;
			__catch1_g_error:
			{
				g_clear_error (&_inner_error0_);
				g_print ("Error loading icons\n");
			}
			__finally1:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_free0 (iconpath);
				_g_free0 (filename);
				_g_dir_close0 (dr);
				if (_inner_error0_->domain == G_FILE_ERROR) {
					goto __catch0_g_file_error;
				}
				_g_free0 (icondir);
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return;
			}
			_g_free0 (iconpath);
		}
		_g_free0 (filename);
		_g_dir_close0 (dr);
	}
	goto __finally0;
	__catch0_g_file_error:
	{
		g_clear_error (&_inner_error0_);
		g_print ("Something went wrong loading the icons");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (icondir);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_free0 (icondir);
}

static void
weather_show_applet_applet_real_update_popovers (BudgieApplet* base,
                                                 BudgiePopoverManager* manager)
{
	WeatherShowAppletApplet * self;
	GtkEventBox* _tmp0_;
	WeatherShowAppletWeatherShowPopover* _tmp1_;
	self = (WeatherShowAppletApplet*) base;
	self->priv->manager = manager;
	_tmp0_ = self->priv->indicatorBox;
	_tmp1_ = self->priv->popover;
	budgie_popover_manager_register_popover (manager, (GtkWidget*) _tmp0_, (GtkPopover*) _tmp1_);
}

void
weather_show_applet_applet_initialiseLocaleLanguageSupport (WeatherShowAppletApplet* self)
{
	g_return_if_fail (self != NULL);
	setlocale (LC_ALL, "");
	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALEDIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
}

const gchar*
weather_show_applet_applet_get_uuid (WeatherShowAppletApplet* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_uuid;
	result = _tmp0_;
	return result;
}

void
weather_show_applet_applet_set_uuid (WeatherShowAppletApplet* self,
                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = weather_show_applet_applet_get_uuid (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_uuid);
		self->priv->_uuid = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, weather_show_applet_applet_properties[WEATHER_SHOW_APPLET_APPLET_UUID_PROPERTY]);
	}
}

static void
weather_show_applet_applet_class_init (WeatherShowAppletAppletClass * klass,
                                       gpointer klass_data)
{
	weather_show_applet_applet_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WeatherShowAppletApplet_private_offset);
	((BudgieAppletClass *) klass)->supports_settings = (gboolean (*) (BudgieApplet*)) weather_show_applet_applet_real_supports_settings;
	((BudgieAppletClass *) klass)->get_settings_ui = (GtkWidget* (*) (BudgieApplet*)) weather_show_applet_applet_real_get_settings_ui;
	((BudgieAppletClass *) klass)->panel_position_changed = (void (*) (BudgieApplet*, BudgiePanelPosition)) weather_show_applet_applet_real_panel_position_changed;
	((BudgieAppletClass *) klass)->update_popovers = (void (*) (BudgieApplet*, BudgiePopoverManager*)) weather_show_applet_applet_real_update_popovers;
	G_OBJECT_CLASS (klass)->get_property = _vala_weather_show_applet_applet_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_weather_show_applet_applet_set_property;
	G_OBJECT_CLASS (klass)->finalize = weather_show_applet_applet_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WEATHER_SHOW_APPLET_APPLET_UUID_PROPERTY, weather_show_applet_applet_properties[WEATHER_SHOW_APPLET_APPLET_UUID_PROPERTY] = g_param_spec_string ("uuid", "uuid", "uuid", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
weather_show_applet_applet_instance_init (WeatherShowAppletApplet * self,
                                          gpointer klass)
{
	self->priv = weather_show_applet_applet_get_instance_private (self);
	self->priv->popover = NULL;
	self->priv->manager = NULL;
	self->priv->weather_onpanel = TRUE;
}

static void
weather_show_applet_applet_finalize (GObject * obj)
{
	WeatherShowAppletApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WEATHER_SHOW_APPLET_TYPE_APPLET, WeatherShowAppletApplet);
	_g_object_unref0 (self->priv->indicatorBox);
	_g_object_unref0 (self->priv->popover);
	_g_free0 (self->priv->_uuid);
	_g_thread_unref0 (self->priv->update_thread);
	G_OBJECT_CLASS (weather_show_applet_applet_parent_class)->finalize (obj);
}

GType
weather_show_applet_applet_get_type (void)
{
	return weather_show_applet_applet_type_id;
}

GType
weather_show_applet_applet_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (WeatherShowAppletAppletClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) weather_show_applet_applet_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WeatherShowAppletApplet), 0, (GInstanceInitFunc) weather_show_applet_applet_instance_init, NULL };
	weather_show_applet_applet_type_id = g_type_module_register_type (module, budgie_applet_get_type (), "WeatherShowAppletApplet", &g_define_type_info, 0);
	WeatherShowAppletApplet_private_offset = sizeof (WeatherShowAppletAppletPrivate);
	return weather_show_applet_applet_type_id;
}

static void
_vala_weather_show_applet_applet_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	WeatherShowAppletApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WEATHER_SHOW_APPLET_TYPE_APPLET, WeatherShowAppletApplet);
	switch (property_id) {
		case WEATHER_SHOW_APPLET_APPLET_UUID_PROPERTY:
		g_value_set_string (value, weather_show_applet_applet_get_uuid (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_weather_show_applet_applet_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	WeatherShowAppletApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WEATHER_SHOW_APPLET_TYPE_APPLET, WeatherShowAppletApplet);
	switch (property_id) {
		case WEATHER_SHOW_APPLET_APPLET_UUID_PROPERTY:
		weather_show_applet_applet_set_uuid (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

void
peas_register_types (GTypeModule* module)
{
	PeasObjectModule* objmodule = NULL;
	PeasObjectModule* _tmp0_;
	g_return_if_fail (module != NULL);
	weather_show_applet_get_weatherdata_register_type (module);
	weather_show_applet_weather_show_settings_register_type (module);
	weather_show_applet_plugin_register_type (module);
	weather_show_applet_weather_show_popover_register_type (module);
	weather_show_applet_applet_register_type (module);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (module, peas_object_module_get_type ()) ? ((PeasObjectModule*) module) : NULL);
	objmodule = _tmp0_;
	peas_object_module_register_extension_type (objmodule, budgie_plugin_get_type (), WEATHER_SHOW_APPLET_TYPE_PLUGIN);
	_g_object_unref0 (objmodule);
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

