Bug Summary

File:cafeweather/cafeweather-dialog.c
Warning:line 82, column 2
Value stored to 'settings' is never read

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cafeweather-dialog.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/cafeweather -fcoverage-compilation-dir=/rootdir/cafeweather -resource-dir /usr/lib/llvm-21/lib/clang/21 -isystem /usr/include/mit-krb5 -isystem /usr/include/mit-krb5 -D HAVE_CONFIG_H -I . -I .. -I . -I .. -D CAFEWEATHER_MENU_UI_DIR="/usr/share/cafe/ui" -I /usr/include/cafe-panel-4.0/libcafe-panel-applet -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/cairo -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/glycin-2 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/atk-1.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/fribidi -I /usr/include/pixman-1 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/sysprof-6 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/glycin-2 -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/gio-unix-2.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/sysprof-6 -I /usr/include/ctk-3.0 -I /usr/include/pango-1.0 -I /usr/include/cairo -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/glycin-2 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/atk-1.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/fribidi -I /usr/include/pixman-1 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/gio-unix-2.0 -I /usr/include/libxml2 -I /usr/include/libsoup-3.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/sysprof-6 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -internal-isystem /usr/lib/llvm-21/lib/clang/21/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/15/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker security.ArrayBound -analyzer-checker unix.cstring.NotNullTerminated -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2026-03-14-184915-83912-1 -x c cafeweather-dialog.c
1/* $Id$ */
2
3/*
4 * Papadimitriou Spiros <spapadim+@cs.cmu.edu>
5 *
6 * This code released under the GNU GPL.
7 * Read the file COPYING for more information.
8 *
9 * Main status dialog
10 *
11 */
12
13#ifdef HAVE_CONFIG_H1
14# include <config.h>
15#endif
16
17#include <stdio.h>
18#include <stdlib.h>
19#include <assert.h>
20
21#include <gio/gio.h>
22
23#define CAFEWEATHER_I_KNOW_THIS_IS_UNSTABLE
24
25#include "cafeweather.h"
26#include "cafeweather-applet.h"
27#include "cafeweather-pref.h"
28#include "cafeweather-dialog.h"
29
30struct _CafeWeatherDialogPrivate {
31 CtkWidget* cond_location;
32 CtkWidget* cond_update;
33 CtkWidget* cond_cond;
34 CtkWidget* cond_sky;
35 CtkWidget* cond_temp;
36 CtkWidget* cond_dew;
37 CtkWidget* cond_humidity;
38 CtkWidget* cond_wind;
39 CtkWidget* cond_pressure;
40 CtkWidget* cond_vis;
41 CtkWidget* cond_apparent;
42 CtkWidget* cond_sunrise;
43 CtkWidget* cond_sunset;
44 CtkWidget* cond_image;
45 CtkWidget* forecast_text;
46 CtkWidget* radar_image;
47
48 CafeWeatherApplet* applet;
49};
50
51enum {
52 PROP_0,
53 PROP_CAFEWEATHER_APPLET,
54};
55
56G_DEFINE_TYPE_WITH_PRIVATE (CafeWeatherDialog, cafeweather_dialog, CTK_TYPE_DIALOG)static void cafeweather_dialog_init (CafeWeatherDialog *self)
; static void cafeweather_dialog_class_init (CafeWeatherDialogClass
*klass); static GType cafeweather_dialog_get_type_once (void
); static gpointer cafeweather_dialog_parent_class = ((void*)
0); static gint CafeWeatherDialog_private_offset; static void
cafeweather_dialog_class_intern_init (gpointer klass) { cafeweather_dialog_parent_class
= g_type_class_peek_parent (klass); if (CafeWeatherDialog_private_offset
!= 0) g_type_class_adjust_private_offset (klass, &CafeWeatherDialog_private_offset
); cafeweather_dialog_class_init ((CafeWeatherDialogClass*) klass
); } __attribute__ ((__unused__)) static inline gpointer cafeweather_dialog_get_instance_private
(CafeWeatherDialog *self) { return (((gpointer) ((guint8*) (
self) + (glong) (CafeWeatherDialog_private_offset)))); } GType
cafeweather_dialog_get_type (void) { static GType static_g_define_type_id
= 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id
) == sizeof (gpointer), "Expression evaluates to false"); (void
) (0 ? (gpointer) * (&static_g_define_type_id) : ((void*)
0)); (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id
) == sizeof (gpointer), "Expression evaluates to false"); __typeof__
(*(&static_g_define_type_id)) gapg_temp_newval; __typeof__
((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id
); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5)
; gapg_temp_newval; })) && g_once_init_enter_pointer (
&static_g_define_type_id)); })) ) { GType g_define_type_id
= cafeweather_dialog_get_type_once (); (__extension__ ({ _Static_assert
(sizeof *(&static_g_define_type_id) == sizeof (gpointer)
, "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id
) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer
((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id
)); })) ; } return static_g_define_type_id; } __attribute__ (
(__noinline__)) static GType cafeweather_dialog_get_type_once
(void) { GType g_define_type_id = g_type_register_static_simple
((ctk_dialog_get_type ()), g_intern_static_string ("CafeWeatherDialog"
), sizeof (CafeWeatherDialogClass), (GClassInitFunc)(void (*)
(void)) cafeweather_dialog_class_intern_init, sizeof (CafeWeatherDialog
), (GInstanceInitFunc)(void (*)(void)) cafeweather_dialog_init
, (GTypeFlags) 0); { {{ CafeWeatherDialog_private_offset = g_type_add_instance_private
(g_define_type_id, sizeof (CafeWeatherDialogPrivate)); };} }
return g_define_type_id; }
;
57
58#define MONOSPACE_FONT_SCHEMA"org.cafe.interface" "org.cafe.interface"
59#define MONOSPACE_FONT_KEY"monospace-font-name" "monospace-font-name"
60
61static void cafeweather_dialog_save_geometry(CafeWeatherDialog* dialog)
62{
63 GSettings* settings;
64 int w, h;
65
66 settings = dialog->priv->applet->settings;
67
68 ctk_window_get_size(CTK_WINDOW(dialog)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_window_get_type ()))))))
, &w, &h);
69
70#if 0
71 /* FIXME those keys are not in org.cafe.weather! */
72 g_settings_set_int (settings, "dialog-width", w);
73 g_settings_set_int (settings, "dialog-height", h);
74#endif
75}
76
77static void cafeweather_dialog_load_geometry(CafeWeatherDialog* dialog)
78{
79 GSettings* settings;
80 int w, h;
81
82 settings = dialog->priv->applet->settings;
Value stored to 'settings' is never read
83
84#if 0
85 /* FIXME those keys are not in org.cafe.weather! */
86 w = g_settings_get_int (settings, "dialog-width");
87 h = g_settings_get_int (settings, "dialog-height");
88
89 if (w > 0 && h > 0)
90 {
91 ctk_window_resize(CTK_WINDOW(dialog)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_window_get_type ()))))))
, w, h);
92 }
93#endif
94}
95
96static void response_cb (CafeWeatherDialog *dialog,
97 gint id,
98 gpointer data G_GNUC_UNUSED__attribute__ ((__unused__)))
99{
100 if (id == CTK_RESPONSE_OK) {
101 cafeweather_update (dialog->priv->applet);
102
103 cafeweather_dialog_update (dialog);
104 } else {
105 ctk_widget_destroy (CTK_WIDGET(dialog)((((CtkWidget*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_widget_get_type ()))))))
);
106 }
107}
108
109static void link_cb (CtkButton *button G_GNUC_UNUSED__attribute__ ((__unused__)),
110 gpointer data G_GNUC_UNUSED__attribute__ ((__unused__)))
111{
112 ctk_show_uri_on_window (NULL((void*)0),
113 "http://www.weather.com/",
114 ctk_get_current_event_time (),
115 NULL((void*)0));
116}
117
118static gchar* replace_multiple_new_lines(gchar* s)
119{
120 gchar *prev_s = s;
121 gint count = 0;
122 gint i;
123
124 if (s == NULL((void*)0)) {
125 return s;
126 }
127
128 for (;*s != '\0';s++) {
129
130 count = 0;
131
132 if (*s == '\n') {
133 s++;
134 while (*s == '\n' || *s == ' ') {
135 count++;
136 s++;
137 }
138 }
139 for (i = count; i > 1; i--) {
140 *(s - i) = ' ';
141 }
142 }
143 return prev_s;
144}
145
146static void cafeweather_dialog_create(CafeWeatherDialog* dialog)
147{
148 CafeWeatherDialogPrivate *priv;
149 CafeWeatherApplet *gw_applet;
150
151 CtkWidget *weather_vbox;
152 CtkWidget *weather_notebook;
153 CtkWidget *cond_hbox;
154 CtkWidget *cond_grid;
155 CtkWidget *cond_location_lbl;
156 CtkWidget *cond_update_lbl;
157 CtkWidget *cond_temp_lbl;
158 CtkWidget *cond_cond_lbl;
159 CtkWidget *cond_sky_lbl;
160 CtkWidget *cond_wind_lbl;
161 CtkWidget *cond_humidity_lbl;
162 CtkWidget *cond_pressure_lbl;
163 CtkWidget *cond_vis_lbl;
164 CtkWidget *cond_dew_lbl;
165 CtkWidget *cond_apparent_lbl;
166 CtkWidget *cond_sunrise_lbl;
167 CtkWidget *cond_sunset_lbl;
168 CtkWidget *cond_vbox;
169 CtkWidget *current_note_lbl;
170 CtkWidget *forecast_note_lbl;
171 CtkWidget *radar_note_lbl;
172 CtkWidget *radar_vbox;
173 CtkWidget *radar_link_btn;
174 CtkWidget *radar_link_box;
175 CtkWidget *forecast_hbox;
176 CtkWidget *ebox;
177 CtkWidget *scrolled_window;
178 CtkWidget *imagescroll_window;
179
180 priv = dialog->priv;
181 gw_applet = priv->applet;
182
183 g_object_set (dialog, "destroy-with-parent", TRUE(!(0)), NULL((void*)0));
184 ctk_window_set_title (CTK_WINDOW (dialog)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_window_get_type ()))))))
, _("Details")gettext ("Details"));
185 ctk_dialog_add_buttons (CTK_DIALOG (dialog)((((CtkDialog*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_dialog_get_type ()))))))
,
186 _("_Update")gettext ("_Update"), CTK_RESPONSE_OK,
187 "ctk-close", CTK_RESPONSE_CLOSE,
188 NULL((void*)0));
189 ctk_dialog_set_default_response (CTK_DIALOG (dialog)((((CtkDialog*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_dialog_get_type ()))))))
, CTK_RESPONSE_CLOSE);
190 ctk_container_set_border_width (CTK_CONTAINER (dialog)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_container_get_type ()))))))
, 5);
191 ctk_box_set_spacing (CTK_BOX (ctk_dialog_get_content_area (CTK_DIALOG (dialog)))((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((ctk_dialog_get_content_area (((((CtkDialog*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((dialog)), ((ctk_dialog_get_type ()))))))
))), ((ctk_box_get_type ()))))))
, 2);
192 ctk_container_set_border_width (CTK_CONTAINER (dialog)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_container_get_type ()))))))
, 5);
193
194 if (gw_applet->cafeweather_pref.radar_enabled)
195 ctk_window_set_default_size (CTK_WINDOW (dialog)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_window_get_type ()))))))
, 570,440);
196 else
197 ctk_window_set_default_size (CTK_WINDOW (dialog)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_window_get_type ()))))))
, 590, 340);
198
199 ctk_window_set_screen (CTK_WINDOW (dialog)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_window_get_type ()))))))
,
200 ctk_widget_get_screen (CTK_WIDGET (gw_applet->applet)((((CtkWidget*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((gw_applet->applet)), ((ctk_widget_get_type ()))))))
));
201 cafeweather_dialog_load_geometry (dialog);
202
203 /* Must come after load geometry, otherwise it will get reset. */
204 ctk_window_set_resizable (CTK_WINDOW (dialog)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_window_get_type ()))))))
, TRUE(!(0)));
205
206 weather_vbox = ctk_dialog_get_content_area (CTK_DIALOG (dialog)((((CtkDialog*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((dialog)), ((ctk_dialog_get_type ()))))))
);
207 ctk_widget_show (weather_vbox);
208
209 weather_notebook = ctk_notebook_new ();
210 ctk_container_set_border_width (CTK_CONTAINER (weather_notebook)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((weather_notebook)), ((ctk_container_get_type ()))))))
, 5);
211 ctk_widget_show (weather_notebook);
212 ctk_box_pack_start (CTK_BOX (weather_vbox)((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((weather_vbox)), ((ctk_box_get_type ()))))))
, weather_notebook, TRUE(!(0)), TRUE(!(0)), 0);
213
214 cond_hbox = ctk_box_new (CTK_ORIENTATION_HORIZONTAL, 2);
215 ctk_widget_show (cond_hbox);
216 ctk_container_add (CTK_CONTAINER (weather_notebook)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((weather_notebook)), ((ctk_container_get_type ()))))))
, cond_hbox);
217 ctk_container_set_border_width (CTK_CONTAINER (cond_hbox)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_hbox)), ((ctk_container_get_type ()))))))
, 4);
218
219 cond_grid = ctk_grid_new ();
220 ctk_widget_show (cond_grid);
221 ctk_box_pack_start (CTK_BOX (cond_hbox)((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_hbox)), ((ctk_box_get_type ()))))))
, cond_grid, TRUE(!(0)), TRUE(!(0)), 0);
222 ctk_container_set_border_width (CTK_CONTAINER (cond_grid)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_container_get_type ()))))))
, 12);
223 ctk_grid_set_row_spacing (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, 6);
224 ctk_grid_set_column_spacing (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, 12);
225
226 cond_location_lbl = ctk_label_new (_("City:")gettext ("City:"));
227 ctk_widget_show (cond_location_lbl);
228 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_location_lbl, 0, 0, 1, 1);
229 ctk_label_set_justify (CTK_LABEL (cond_location_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_location_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
230 ctk_label_set_xalign (CTK_LABEL (cond_location_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_location_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
231
232 cond_update_lbl = ctk_label_new (_("Last update:")gettext ("Last update:"));
233 ctk_widget_show (cond_update_lbl);
234 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_update_lbl, 0, 1, 1, 1);
235 ctk_label_set_justify (CTK_LABEL (cond_update_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_update_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
236 ctk_label_set_xalign (CTK_LABEL (cond_update_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_update_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
237
238 cond_cond_lbl = ctk_label_new (_("Conditions:")gettext ("Conditions:"));
239 ctk_widget_show (cond_cond_lbl);
240 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_cond_lbl, 0, 2, 1, 1);
241 ctk_label_set_justify (CTK_LABEL (cond_cond_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_cond_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
242 ctk_label_set_xalign (CTK_LABEL (cond_cond_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_cond_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
243
244 cond_sky_lbl = ctk_label_new (_("Sky:")gettext ("Sky:"));
245 ctk_widget_show (cond_sky_lbl);
246 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_sky_lbl, 0, 3, 1, 1);
247 ctk_label_set_justify (CTK_LABEL (cond_sky_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_sky_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
248 ctk_label_set_xalign (CTK_LABEL (cond_sky_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_sky_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
249
250 cond_temp_lbl = ctk_label_new (_("Temperature:")gettext ("Temperature:"));
251 ctk_widget_show (cond_temp_lbl);
252 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_temp_lbl, 0, 4, 1, 1);
253 ctk_label_set_justify (CTK_LABEL (cond_temp_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_temp_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
254 ctk_label_set_xalign (CTK_LABEL (cond_temp_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_temp_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
255
256 cond_apparent_lbl = ctk_label_new (_("Feels like:")gettext ("Feels like:"));
257 ctk_widget_show (cond_apparent_lbl);
258 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_apparent_lbl, 0, 5, 1, 1);
259 ctk_label_set_justify (CTK_LABEL (cond_apparent_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_apparent_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
260 ctk_label_set_xalign (CTK_LABEL (cond_apparent_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_apparent_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
261
262 cond_dew_lbl = ctk_label_new (_("Dew point:")gettext ("Dew point:"));
263 ctk_widget_show (cond_dew_lbl);
264 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_dew_lbl, 0, 6, 1, 1);
265 ctk_label_set_justify (CTK_LABEL (cond_dew_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_dew_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
266 ctk_label_set_xalign (CTK_LABEL (cond_dew_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_dew_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
267
268 cond_humidity_lbl = ctk_label_new (_("Relative humidity:")gettext ("Relative humidity:"));
269 ctk_widget_show (cond_humidity_lbl);
270 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_humidity_lbl, 0, 7, 1, 1);
271 ctk_label_set_justify (CTK_LABEL (cond_humidity_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_humidity_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
272 ctk_label_set_xalign (CTK_LABEL (cond_humidity_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_humidity_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
273
274 cond_wind_lbl = ctk_label_new (_("Wind:")gettext ("Wind:"));
275 ctk_widget_show (cond_wind_lbl);
276 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_wind_lbl, 0, 8, 1, 1);
277 ctk_label_set_justify (CTK_LABEL (cond_wind_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_wind_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
278 ctk_label_set_xalign (CTK_LABEL (cond_wind_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_wind_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
279
280 cond_pressure_lbl = ctk_label_new (_("Pressure:")gettext ("Pressure:"));
281 ctk_widget_show (cond_pressure_lbl);
282 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_pressure_lbl, 0, 9, 1, 1);
283 ctk_label_set_justify (CTK_LABEL (cond_pressure_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_pressure_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
284 ctk_label_set_xalign (CTK_LABEL (cond_pressure_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_pressure_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
285
286 cond_vis_lbl = ctk_label_new (_("Visibility:")gettext ("Visibility:"));
287 ctk_widget_show (cond_vis_lbl);
288 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_vis_lbl, 0, 10, 1, 1);
289 ctk_label_set_justify (CTK_LABEL (cond_vis_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_vis_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
290 ctk_label_set_xalign (CTK_LABEL (cond_vis_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_vis_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
291
292 cond_sunrise_lbl = ctk_label_new (_("Sunrise:")gettext ("Sunrise:"));
293 ctk_widget_show (cond_sunrise_lbl);
294 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_sunrise_lbl, 0, 11, 1, 1);
295 ctk_label_set_justify (CTK_LABEL (cond_sunrise_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_sunrise_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
296 ctk_label_set_xalign (CTK_LABEL (cond_sunrise_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_sunrise_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
297
298 cond_sunset_lbl = ctk_label_new (_("Sunset:")gettext ("Sunset:"));
299 ctk_widget_show (cond_sunset_lbl);
300 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, cond_sunset_lbl, 0, 12, 1, 1);
301 ctk_label_set_justify (CTK_LABEL (cond_sunset_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_sunset_lbl)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
302 ctk_label_set_xalign (CTK_LABEL (cond_sunset_lbl)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_sunset_lbl)), ((ctk_label_get_type ()))))))
, 0.0);
303
304 priv->cond_location = ctk_label_new ("");
305 ctk_widget_show (priv->cond_location);
306 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_location, 1, 0, 1, 1);
307 ctk_label_set_selectable (CTK_LABEL (priv->cond_location)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_location)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
308 ctk_label_set_justify (CTK_LABEL (priv->cond_location)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_location)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
309 ctk_label_set_xalign (CTK_LABEL (priv->cond_location)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_location)), ((ctk_label_get_type ()))))))
, 0.0);
310
311 priv->cond_update = ctk_label_new ("");
312 ctk_widget_show (priv->cond_update);
313 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_update, 1, 1, 1, 1);
314 ctk_label_set_selectable (CTK_LABEL (priv->cond_update)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_update)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
315 ctk_label_set_justify (CTK_LABEL (priv->cond_update)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_update)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
316 ctk_label_set_xalign (CTK_LABEL (priv->cond_update)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_update)), ((ctk_label_get_type ()))))))
, 0.0);
317
318 priv->cond_cond = ctk_label_new ("");
319 ctk_widget_show (priv->cond_cond);
320 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_cond, 1, 2, 1, 1);
321 ctk_label_set_selectable (CTK_LABEL (priv->cond_cond)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_cond)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
322 ctk_label_set_justify (CTK_LABEL (priv->cond_cond)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_cond)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
323 ctk_label_set_xalign (CTK_LABEL (priv->cond_cond)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_cond)), ((ctk_label_get_type ()))))))
, 0.0);
324
325 priv->cond_sky = ctk_label_new ("");
326 ctk_widget_show (priv->cond_sky);
327 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_sky, 1, 3, 1, 1);
328 ctk_label_set_selectable (CTK_LABEL (priv->cond_sky)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sky)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
329 ctk_label_set_justify (CTK_LABEL (priv->cond_sky)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sky)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
330 ctk_label_set_xalign (CTK_LABEL (priv->cond_sky)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sky)), ((ctk_label_get_type ()))))))
, 0.0);
331
332 priv->cond_temp = ctk_label_new ("");
333 ctk_widget_show (priv->cond_temp);
334 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_temp, 1, 4, 1, 1);
335 ctk_label_set_selectable (CTK_LABEL (priv->cond_temp)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_temp)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
336 ctk_label_set_justify (CTK_LABEL (priv->cond_temp)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_temp)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
337 ctk_label_set_xalign (CTK_LABEL (priv->cond_temp)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_temp)), ((ctk_label_get_type ()))))))
, 0.0);
338
339 priv->cond_apparent = ctk_label_new ("");
340 ctk_widget_show (priv->cond_apparent);
341 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_apparent, 1, 5, 1, 1);
342 ctk_label_set_selectable (CTK_LABEL (priv->cond_apparent)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_apparent)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
343 ctk_label_set_justify (CTK_LABEL (priv->cond_apparent)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_apparent)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
344 ctk_label_set_xalign (CTK_LABEL (priv->cond_apparent)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_apparent)), ((ctk_label_get_type ()))))))
, 0.0);
345
346 priv->cond_dew = ctk_label_new ("");
347 ctk_widget_show (priv->cond_dew);
348 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_dew, 1, 6, 1, 1);
349 ctk_label_set_selectable (CTK_LABEL (priv->cond_dew)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_dew)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
350 ctk_label_set_justify (CTK_LABEL (priv->cond_dew)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_dew)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
351 ctk_label_set_xalign (CTK_LABEL (priv->cond_dew)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_dew)), ((ctk_label_get_type ()))))))
, 0.0);
352
353 priv->cond_humidity = ctk_label_new ("");
354 ctk_widget_show (priv->cond_humidity);
355 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_humidity, 1, 7, 1, 1);
356 ctk_label_set_selectable (CTK_LABEL (priv->cond_humidity)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_humidity)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
357 ctk_label_set_justify (CTK_LABEL (priv->cond_humidity)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_humidity)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
358 ctk_label_set_xalign (CTK_LABEL (priv->cond_humidity)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_humidity)), ((ctk_label_get_type ()))))))
, 0.0);
359
360 priv->cond_wind = ctk_label_new ("");
361 ctk_widget_show (priv->cond_wind);
362 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_wind, 1, 8, 1, 1);
363 ctk_label_set_selectable (CTK_LABEL (priv->cond_wind)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_wind)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
364 ctk_label_set_justify (CTK_LABEL (priv->cond_wind)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_wind)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
365 ctk_label_set_xalign (CTK_LABEL (priv->cond_wind)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_wind)), ((ctk_label_get_type ()))))))
, 0.0);
366
367 priv->cond_pressure = ctk_label_new ("");
368 ctk_widget_show (priv->cond_pressure);
369 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_pressure, 1, 9, 1, 1);
370 ctk_label_set_selectable (CTK_LABEL (priv->cond_pressure)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_pressure)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
371 ctk_label_set_justify (CTK_LABEL (priv->cond_pressure)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_pressure)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
372 ctk_label_set_xalign (CTK_LABEL (priv->cond_pressure)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_pressure)), ((ctk_label_get_type ()))))))
, 0.0);
373
374 priv->cond_vis = ctk_label_new ("");
375 ctk_widget_show (priv->cond_vis);
376 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_vis, 1, 10, 1, 1);
377 ctk_label_set_selectable (CTK_LABEL (priv->cond_vis)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_vis)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
378 ctk_label_set_justify (CTK_LABEL (priv->cond_vis)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_vis)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
379 ctk_label_set_xalign (CTK_LABEL (priv->cond_vis)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_vis)), ((ctk_label_get_type ()))))))
, 0.0);
380
381 priv->cond_sunrise = ctk_label_new ("");
382 ctk_widget_show (priv->cond_sunrise);
383 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_sunrise, 1, 11, 1, 1);
384 ctk_label_set_selectable (CTK_LABEL (priv->cond_sunrise)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sunrise)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
385 ctk_label_set_justify (CTK_LABEL (priv->cond_sunrise)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sunrise)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
386 ctk_label_set_xalign (CTK_LABEL (priv->cond_sunrise)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sunrise)), ((ctk_label_get_type ()))))))
, 0.0);
387
388 priv->cond_sunset = ctk_label_new ("");
389 ctk_widget_show (priv->cond_sunset);
390 ctk_grid_attach (CTK_GRID (cond_grid)((((CtkGrid*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_grid)), ((ctk_grid_get_type ()))))))
, priv->cond_sunset, 1, 12, 1, 1);
391 ctk_label_set_selectable (CTK_LABEL (priv->cond_sunset)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sunset)), ((ctk_label_get_type ()))))))
, TRUE(!(0)));
392 ctk_label_set_justify (CTK_LABEL (priv->cond_sunset)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sunset)), ((ctk_label_get_type ()))))))
, CTK_JUSTIFY_LEFT);
393 ctk_label_set_xalign (CTK_LABEL (priv->cond_sunset)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sunset)), ((ctk_label_get_type ()))))))
, 0.0);
394
395 cond_vbox = ctk_box_new (CTK_ORIENTATION_VERTICAL, 2);
396 ctk_widget_set_valign (cond_vbox, CTK_ALIGN_START);
397 ctk_widget_set_vexpand (cond_vbox, TRUE(!(0)));
398 ctk_widget_show (cond_vbox);
399 ctk_box_pack_end (CTK_BOX (cond_hbox)((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_hbox)), ((ctk_box_get_type ()))))))
, cond_vbox, FALSE(0), FALSE(0), 0);
400 ctk_container_set_border_width (CTK_CONTAINER (cond_vbox)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_vbox)), ((ctk_container_get_type ()))))))
, 2);
401
402 priv->cond_image = ctk_image_new_from_icon_name ("stock-unknown", CTK_ICON_SIZE_BUTTON);
403 ctk_widget_show (priv->cond_image);
404 ctk_container_add (CTK_CONTAINER (cond_vbox)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((cond_vbox)), ((ctk_container_get_type ()))))))
, priv->cond_image);
405
406 current_note_lbl = ctk_label_new (_("Current Conditions")gettext ("Current Conditions"));
407 ctk_widget_show (current_note_lbl);
408 ctk_notebook_set_tab_label (CTK_NOTEBOOK (weather_notebook)((((CtkNotebook*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((weather_notebook)), ((ctk_notebook_get_type ()))))))
, ctk_notebook_get_nth_page (CTK_NOTEBOOK (weather_notebook)((((CtkNotebook*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((weather_notebook)), ((ctk_notebook_get_type ()))))))
, 0), current_note_lbl);
409
410 if (gw_applet->cafeweather_pref.location->zone_valid) {
411
412 forecast_hbox = ctk_box_new (CTK_ORIENTATION_HORIZONTAL, 0);
413 ctk_container_set_border_width (CTK_CONTAINER (forecast_hbox)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((forecast_hbox)), ((ctk_container_get_type ()))))))
, 12);
414 ctk_widget_show (forecast_hbox);
415
416 scrolled_window = ctk_scrolled_window_new (NULL((void*)0), NULL((void*)0));
417 ctk_scrolled_window_set_policy (CTK_SCROLLED_WINDOW (scrolled_window)((((CtkScrolledWindow*) (void *) g_type_check_instance_cast (
(GTypeInstance*) ((scrolled_window)), ((ctk_scrolled_window_get_type
()))))))
,
418 CTK_POLICY_AUTOMATIC, CTK_POLICY_AUTOMATIC);
419 ctk_scrolled_window_set_shadow_type (CTK_SCROLLED_WINDOW (scrolled_window)((((CtkScrolledWindow*) (void *) g_type_check_instance_cast (
(GTypeInstance*) ((scrolled_window)), ((ctk_scrolled_window_get_type
()))))))
,
420 CTK_SHADOW_ETCHED_IN);
421
422 priv->forecast_text = ctk_text_view_new ();
423 set_access_namedesc (priv->forecast_text, _("Forecast Report")gettext ("Forecast Report"), _("See the ForeCast Details")gettext ("See the ForeCast Details"));
424 ctk_container_add (CTK_CONTAINER (scrolled_window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((scrolled_window)), ((ctk_container_get_type ()))))))
, priv->forecast_text);
425 ctk_text_view_set_editable (CTK_TEXT_VIEW (priv->forecast_text)((((CtkTextView*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->forecast_text)), ((ctk_text_view_get_type ())))
)))
, FALSE(0));
426 ctk_text_view_set_left_margin (CTK_TEXT_VIEW (priv->forecast_text)((((CtkTextView*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->forecast_text)), ((ctk_text_view_get_type ())))
)))
, 6);
427 ctk_widget_show (priv->forecast_text);
428 ctk_widget_show (scrolled_window);
429 ctk_box_pack_start (CTK_BOX (forecast_hbox)((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((forecast_hbox)), ((ctk_box_get_type ()))))))
, scrolled_window, TRUE(!(0)), TRUE(!(0)), 0);
430
431 ctk_container_add (CTK_CONTAINER (weather_notebook)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((weather_notebook)), ((ctk_container_get_type ()))))))
, forecast_hbox);
432
433 forecast_note_lbl = ctk_label_new (_("Forecast")gettext ("Forecast"));
434 ctk_widget_show (forecast_note_lbl);
435 ctk_notebook_set_tab_label (CTK_NOTEBOOK (weather_notebook)((((CtkNotebook*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((weather_notebook)), ((ctk_notebook_get_type ()))))))
, ctk_notebook_get_nth_page (CTK_NOTEBOOK (weather_notebook)((((CtkNotebook*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((weather_notebook)), ((ctk_notebook_get_type ()))))))
, 1), forecast_note_lbl);
436
437 }
438
439 if (gw_applet->cafeweather_pref.radar_enabled) {
440
441 radar_note_lbl = ctk_label_new_with_mnemonic (_("Radar Map")gettext ("Radar Map"));
442 ctk_widget_show (radar_note_lbl);
443
444 radar_vbox = ctk_box_new (CTK_ORIENTATION_VERTICAL, 6);
445 ctk_widget_show (radar_vbox);
446 ctk_notebook_append_page (CTK_NOTEBOOK (weather_notebook)((((CtkNotebook*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((weather_notebook)), ((ctk_notebook_get_type ()))))))
, radar_vbox, radar_note_lbl);
447 ctk_container_set_border_width (CTK_CONTAINER (radar_vbox)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((radar_vbox)), ((ctk_container_get_type ()))))))
, 6);
448
449 priv->radar_image = ctk_image_new ();
450
451 imagescroll_window = ctk_scrolled_window_new (NULL((void*)0), NULL((void*)0));
452 ctk_scrolled_window_set_policy (CTK_SCROLLED_WINDOW (imagescroll_window)((((CtkScrolledWindow*) (void *) g_type_check_instance_cast (
(GTypeInstance*) ((imagescroll_window)), ((ctk_scrolled_window_get_type
()))))))
,
453 CTK_POLICY_AUTOMATIC,
454 CTK_POLICY_AUTOMATIC);
455 ctk_scrolled_window_set_shadow_type (CTK_SCROLLED_WINDOW (imagescroll_window)((((CtkScrolledWindow*) (void *) g_type_check_instance_cast (
(GTypeInstance*) ((imagescroll_window)), ((ctk_scrolled_window_get_type
()))))))
,
456 CTK_SHADOW_ETCHED_IN);
457
458 ebox = ctk_event_box_new ();
459 ctk_widget_show (ebox);
460
461 ctk_container_add (CTK_CONTAINER (imagescroll_window)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((imagescroll_window)), ((ctk_container_get_type ()))))))
,ebox);
462 ctk_box_pack_start (CTK_BOX (radar_vbox)((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((radar_vbox)), ((ctk_box_get_type ()))))))
, imagescroll_window, TRUE(!(0)), TRUE(!(0)), 0);
463 ctk_widget_show (priv->radar_image);
464 ctk_widget_show (imagescroll_window);
465
466 ctk_container_add (CTK_CONTAINER (ebox)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((ebox)), ((ctk_container_get_type ()))))))
, priv->radar_image);
467
468 radar_link_box = ctk_box_new (CTK_ORIENTATION_VERTICAL, 0);
469 ctk_widget_set_halign (radar_link_box, CTK_ALIGN_CENTER);
470 ctk_widget_set_hexpand (radar_link_box, TRUE(!(0)));
471 ctk_widget_show (radar_link_box);
472 ctk_box_pack_start (CTK_BOX (radar_vbox)((((CtkBox*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((radar_vbox)), ((ctk_box_get_type ()))))))
, radar_link_box, FALSE(0), FALSE(0), 0);
473
474 radar_link_btn = ctk_button_new_with_mnemonic (_("_Visit Weather.com")gettext ("_Visit Weather.com"));
475 set_access_namedesc (radar_link_btn, _("Visit Weather.com")gettext ("Visit Weather.com"), _("Click to Enter Weather.com")gettext ("Click to Enter Weather.com"));
476 ctk_widget_set_size_request (radar_link_btn, 450, -2);
477 ctk_widget_show (radar_link_btn);
478 if (!g_settings_get_boolean (gw_applet->settings, "use-custom-radar-url"))
479 ctk_container_add (CTK_CONTAINER (radar_link_box)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((radar_link_box)), ((ctk_container_get_type ()))))))
, radar_link_btn);
480
481 g_signal_connect (G_OBJECT (radar_link_btn), "clicked",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((radar_link_btn)), (((GType) ((20) <<
(2))))))))), ("clicked"), (((GCallback) (link_cb))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
482 G_CALLBACK (link_cb), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((radar_link_btn)), (((GType) ((20) <<
(2))))))))), ("clicked"), (((GCallback) (link_cb))), (((void
*)0)), ((void*)0), (GConnectFlags) 0)
;
483
484 }
485
486 g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (response_cb), NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((dialog)), (((GType) ((20) << (2)))
)))))), ("response"), (((GCallback) (response_cb))), (((void*
)0)), ((void*)0), (GConnectFlags) 0)
;
487
488}
489
490static PangoFontDescription* get_system_monospace_font(void)
491{
492 PangoFontDescription *desc = NULL((void*)0);
493 GSettings *settings;
494 char *name;
495
496 settings = g_settings_new (MONOSPACE_FONT_SCHEMA"org.cafe.interface");
497 name = g_settings_get_string (settings, MONOSPACE_FONT_KEY"monospace-font-name");
498
499 if (name) {
500 desc = pango_font_description_from_string (name);
501 g_free (name);
502 }
503
504 g_object_unref (settings);
505
506 return desc;
507}
508
509static void
510override_widget_font (CtkWidget *widget,
511 PangoFontDescription *font)
512{
513 static gboolean provider_added = FALSE(0);
514 static CtkCssProvider *provider;
515 gchar *css;
516 gchar *family;
517 gchar *weight;
518 const gchar *style;
519 gchar *size;
520
521 family = g_strdup_printf ("font-family: %s;", pango_font_description_get_family (font));
522
523 weight = g_strdup_printf ("font-weight: %d;", pango_font_description_get_weight (font));
524
525 if (pango_font_description_get_style (font) == PANGO_STYLE_NORMAL)
526 style = "font-style: normal;";
527 else if (pango_font_description_get_style (font) == PANGO_STYLE_ITALIC)
528 style = "font-style: italic;";
529 else
530 style = "font-style: oblique;";
531
532 size = g_strdup_printf ("font-size: %d%s;",
533 pango_font_description_get_size (font) / PANGO_SCALE1024,
534 pango_font_description_get_size_is_absolute (font) ? "px" : "pt");
535 if (!provider_added)
536 provider = ctk_css_provider_new ();
537
538 ctk_widget_set_name(CTK_WIDGET(widget)((((CtkWidget*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((widget)), ((ctk_widget_get_type ()))))))
, "CafeWeatherAppletTextView");
539 css = g_strdup_printf ("#CafeWeatherAppletTextView { %s %s %s %s }", family, weight, style, size);
540 ctk_css_provider_load_from_data (provider, css, -1, NULL((void*)0));
541
542 if (!provider_added) {
543 ctk_style_context_add_provider_for_screen (ctk_widget_get_screen (widget),
544 CTK_STYLE_PROVIDER (provider)((((CtkStyleProvider*) (void *) g_type_check_instance_cast ((
GTypeInstance*) ((provider)), ((ctk_style_provider_get_type (
)))))))
,
545 CTK_STYLE_PROVIDER_PRIORITY_APPLICATION600);
546 provider_added = TRUE(!(0));
547 }
548
549 g_free (css);
550 g_free (family);
551 g_free (weight);
552 g_free (size);
553}
554
555void cafeweather_dialog_update(CafeWeatherDialog* dialog)
556{
557 CafeWeatherDialogPrivate *priv;
558 CafeWeatherApplet *gw_applet;
559 gchar *forecast;
560 CtkTextBuffer *buffer;
561 PangoFontDescription *font_desc;
562 const gchar *icon_name;
563
564 priv = dialog->priv;
565 gw_applet = priv->applet;
566
567 /* Check for parallel network update in progress */
568 if(gw_applet->cafeweather_info == NULL((void*)0))
569 return;
570
571 /* Update icon */
572 icon_name = weather_info_get_icon_name (gw_applet->cafeweather_info);
573 ctk_image_set_from_icon_name (CTK_IMAGE (priv->cond_image)((((CtkImage*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_image)), ((ctk_image_get_type ()))))))
,
574 icon_name, CTK_ICON_SIZE_DIALOG);
575
576 /* Update current condition fields and forecast */
577 ctk_label_set_text(CTK_LABEL(priv->cond_location)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_location)), ((ctk_label_get_type ()))))))
, weather_info_get_location_name(gw_applet->cafeweather_info));
578 ctk_label_set_text(CTK_LABEL(priv->cond_update)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_update)), ((ctk_label_get_type ()))))))
, weather_info_get_update(gw_applet->cafeweather_info));
579 ctk_label_set_text(CTK_LABEL(priv->cond_cond)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_cond)), ((ctk_label_get_type ()))))))
, weather_info_get_conditions(gw_applet->cafeweather_info));
580 ctk_label_set_text(CTK_LABEL(priv->cond_sky)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sky)), ((ctk_label_get_type ()))))))
, weather_info_get_sky(gw_applet->cafeweather_info));
581 ctk_label_set_text(CTK_LABEL(priv->cond_temp)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_temp)), ((ctk_label_get_type ()))))))
, weather_info_get_temp(gw_applet->cafeweather_info));
582 ctk_label_set_text(CTK_LABEL(priv->cond_apparent)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_apparent)), ((ctk_label_get_type ()))))))
, weather_info_get_apparent(gw_applet->cafeweather_info));
583 ctk_label_set_text(CTK_LABEL(priv->cond_dew)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_dew)), ((ctk_label_get_type ()))))))
, weather_info_get_dew(gw_applet->cafeweather_info));
584 ctk_label_set_text(CTK_LABEL(priv->cond_humidity)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_humidity)), ((ctk_label_get_type ()))))))
, weather_info_get_humidity(gw_applet->cafeweather_info));
585 ctk_label_set_text(CTK_LABEL(priv->cond_wind)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_wind)), ((ctk_label_get_type ()))))))
, weather_info_get_wind(gw_applet->cafeweather_info));
586 ctk_label_set_text(CTK_LABEL(priv->cond_pressure)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_pressure)), ((ctk_label_get_type ()))))))
, weather_info_get_pressure(gw_applet->cafeweather_info));
587 ctk_label_set_text(CTK_LABEL(priv->cond_vis)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_vis)), ((ctk_label_get_type ()))))))
, weather_info_get_visibility(gw_applet->cafeweather_info));
588 ctk_label_set_text(CTK_LABEL(priv->cond_sunrise)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sunrise)), ((ctk_label_get_type ()))))))
, weather_info_get_sunrise(gw_applet->cafeweather_info));
589 ctk_label_set_text(CTK_LABEL(priv->cond_sunset)((((CtkLabel*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->cond_sunset)), ((ctk_label_get_type ()))))))
, weather_info_get_sunset(gw_applet->cafeweather_info));
590
591 /* Update forecast */
592 if (gw_applet->cafeweather_pref.location->zone_valid) {
593 font_desc = get_system_monospace_font ();
594 if (font_desc) {
595 override_widget_font (priv->forecast_text, font_desc);
596 pango_font_description_free (font_desc);
597 }
598
599 buffer = ctk_text_view_get_buffer (CTK_TEXT_VIEW (priv->forecast_text)((((CtkTextView*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->forecast_text)), ((ctk_text_view_get_type ())))
)))
);
600 forecast = g_strdup(weather_info_get_forecast(gw_applet->cafeweather_info))g_strdup_inline (weather_info_get_forecast(gw_applet->cafeweather_info
))
;
601 if (forecast) {
602 forecast = g_strstrip(replace_multiple_new_lines(forecast))g_strchomp (g_strchug (replace_multiple_new_lines(forecast)));
603 ctk_text_buffer_set_text(buffer, forecast, -1);
604 g_free(forecast);
605 } else {
606 ctk_text_buffer_set_text(buffer, _("Forecast not currently available for this location.")gettext ("Forecast not currently available for this location."
)
, -1);
607 }
608 }
609
610 /* Update radar map */
611 if (gw_applet->cafeweather_pref.radar_enabled) {
612 GdkPixbufAnimation *radar;
613
614 radar = weather_info_get_radar (gw_applet->cafeweather_info);
615 if (radar) {
616 ctk_image_set_from_animation (CTK_IMAGE (priv->radar_image)((((CtkImage*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((priv->radar_image)), ((ctk_image_get_type ()))))))
, radar);
617 }
618 }
619}
620
621static void cafeweather_dialog_set_property (GObject *object,
622 guint prop_id,
623 const GValue *value,
624 GParamSpec *pspec G_GNUC_UNUSED__attribute__ ((__unused__)))
625{
626 CafeWeatherDialog *dialog = CAFEWEATHER_DIALOG (object)((((CafeWeatherDialog*) (void *) g_type_check_instance_cast (
(GTypeInstance*) ((object)), ((cafeweather_dialog_get_type ()
))))))
;
627
628 switch (prop_id) {
629 case PROP_CAFEWEATHER_APPLET:
630 dialog->priv->applet = g_value_get_pointer (value);
631 break;
632 }
633}
634
635static void cafeweather_dialog_get_property (GObject *object,
636 guint prop_id,
637 GValue *value,
638 GParamSpec *pspec G_GNUC_UNUSED__attribute__ ((__unused__)))
639{
640 CafeWeatherDialog *dialog = CAFEWEATHER_DIALOG (object)((((CafeWeatherDialog*) (void *) g_type_check_instance_cast (
(GTypeInstance*) ((object)), ((cafeweather_dialog_get_type ()
))))))
;
641
642 switch (prop_id) {
643 case PROP_CAFEWEATHER_APPLET:
644 g_value_set_pointer (value, dialog->priv->applet);
645 break;
646 }
647}
648
649static void cafeweather_dialog_init(CafeWeatherDialog* self)
650{
651 self->priv = cafeweather_dialog_get_instance_private (self);
652}
653
654static GObject* cafeweather_dialog_constructor(GType type, guint n_construct_params, GObjectConstructParam* construct_params)
655{
656 GObject *object;
657 CafeWeatherDialog *self;
658
659 object = G_OBJECT_CLASS (cafeweather_dialog_parent_class)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass
*) ((cafeweather_dialog_parent_class)), (((GType) ((20) <<
(2))))))))
->
660 constructor (type, n_construct_params, construct_params);
661 self = CAFEWEATHER_DIALOG (object)((((CafeWeatherDialog*) (void *) g_type_check_instance_cast (
(GTypeInstance*) ((object)), ((cafeweather_dialog_get_type ()
))))))
;
662
663 cafeweather_dialog_create (self);
664 cafeweather_dialog_update (self);
665
666 return object;
667}
668
669CtkWidget* cafeweather_dialog_new(CafeWeatherApplet* applet)
670{
671 return g_object_new(CAFEWEATHER_TYPE_DIALOG(cafeweather_dialog_get_type ()),
672 "cafeweather-applet", applet,
673 NULL((void*)0));
674}
675
676static void cafeweather_dialog_unrealize(CtkWidget* widget)
677{
678 CafeWeatherDialog* self = CAFEWEATHER_DIALOG(widget)((((CafeWeatherDialog*) (void *) g_type_check_instance_cast (
(GTypeInstance*) ((widget)), ((cafeweather_dialog_get_type ()
))))))
;
679
680 cafeweather_dialog_save_geometry(self);
681
682 CTK_WIDGET_CLASS(cafeweather_dialog_parent_class)((((CtkWidgetClass*) (void *) g_type_check_class_cast ((GTypeClass
*) ((cafeweather_dialog_parent_class)), ((ctk_widget_get_type
()))))))
->unrealize(widget);
683}
684
685static void cafeweather_dialog_class_init(CafeWeatherDialogClass* klass)
686{
687 GObjectClass *object_class = G_OBJECT_CLASS (klass)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass
*) ((klass)), (((GType) ((20) << (2))))))))
;
688 CtkWidgetClass *widget_class = CTK_WIDGET_CLASS (klass)((((CtkWidgetClass*) (void *) g_type_check_class_cast ((GTypeClass
*) ((klass)), ((ctk_widget_get_type ()))))))
;
689
690 cafeweather_dialog_parent_class = g_type_class_peek_parent (klass);
691
692 object_class->set_property = cafeweather_dialog_set_property;
693 object_class->get_property = cafeweather_dialog_get_property;
694 object_class->constructor = cafeweather_dialog_constructor;
695 widget_class->unrealize = cafeweather_dialog_unrealize;
696
697 /* This becomes an OBJECT property when CafeWeatherApplet is redone */
698 g_object_class_install_property(object_class, PROP_CAFEWEATHER_APPLET, g_param_spec_pointer ("cafeweather-applet", "CafeWeather Applet", "The CafeWeather Applet", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
699}