1 // ----------------------------------------------------------------------------
2 // Copyright (C) 2014
3 // David Freese, W1HKJ
4 //
5 // This file is part of flmsg
6 //
7 // flrig is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // flrig is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 // ----------------------------------------------------------------------------
20
21 #include "gettext.h"
22 #include "status.h"
23 #include "util.h"
24
25 #include "flmsg_dialog.h"
26 #include "flmsg.h"
27 #include "fileselect.h"
28 #include "calendar.h"
29 #include "wx_strings.h"
30
31 Fl_Group *tab_storm = (Fl_Group *)0;
32 Fl_Tabs *tab_storm_type = (Fl_Tabs *)0;
33
34 Fl_Group *tab_storm_1 = (Fl_Group *)0;
35
36 Fl_DateInput *w_storm_date = (Fl_DateInput *)0;
37 Fl_Input2 *w_storm_time = (Fl_Input2 *)0;
38 Fl_Button *w_storm_btn_time = (Fl_Button *)0;
39 Fl_ListBox *w_storm_zone = (Fl_ListBox *)0;
40
41 Fl_ListBox *w_storm_state = (Fl_ListBox *)0;
42 Fl_ListBox *w_storm_county = (Fl_ListBox *)0;
43 Fl_Input2 *w_storm_location = (Fl_Input2 *)0;
44
45 Fl_Button *use_storm_default = (Fl_Button *)0;
46 Fl_Button *make_storm_default = (Fl_Button *)0;
47
48 Fl_Check_Button *w_storm_tornado = (Fl_Check_Button *)0;
49 Fl_ListBox *w_storm_tornado_cat = (Fl_ListBox *)0;
50
51 Fl_Check_Button *w_storm_hail = (Fl_Check_Button *)0;
52 Fl_ListBox *w_storm_hail_size = (Fl_ListBox *)0;
53
54 Fl_Check_Button *w_storm_wind = (Fl_Check_Button *)0;
55 Fl_ListBox *w_storm_wind_cat = (Fl_ListBox *)0;;
56
57 Fl_Check_Button *w_storm_flood = (Fl_Check_Button *)0;
58 Fl_ListBox *w_storm_flood_cat = (Fl_ListBox *)0;
59
60 Fl_Check_Button *w_storm_damage = (Fl_Check_Button *)0;
61 Fl_ListBox *w_storm_damage_cat = (Fl_ListBox *)0;
62
63 Fl_Check_Button *w_storm_snow = (Fl_Check_Button *)0;
64 Fl_ListBox *w_storm_snow_tot = (Fl_ListBox *)0;
65 Fl_ListBox *w_storm_snow_dur = (Fl_ListBox *)0;
66
67 Fl_Check_Button *w_storm_f_rain = (Fl_Check_Button *)0;
68 Fl_ListBox *w_storm_f_rain_tot = (Fl_ListBox *)0;
69 Fl_ListBox *w_storm_f_rain_dur = (Fl_ListBox *)0;
70
71 Fl_Check_Button *w_storm_h_rain = (Fl_Check_Button *)0;
72 Fl_ListBox *w_storm_h_rain_tot = (Fl_ListBox *)0;
73 Fl_ListBox *w_storm_h_rain_dur = (Fl_ListBox *)0;
74
75 Fl_Input2 *w_storm_o_name = (Fl_Input2 *)0;
76 Fl_Input2 *w_storm_o_email = (Fl_Input2 *)0;
77 Fl_Input2 *w_storm_o_tele = (Fl_Input2 *)0;
78 Fl_ListBox *w_storm_o_profile = (Fl_ListBox *)0;
79
80 Fl_Group *tab_storm_2 = (Fl_Group *)0;
81 FTextEdit *w_storm_details = (FTextEdit *)0;
82
83 //----------------------------------------------------------------------
84
85 // widget callbacks & support
86
87 //----------------------------------------------------------------------
88
set_storm_counties(int ndx)89 void set_storm_counties(int ndx)
90 {
91 string st = states[ndx];
92 size_t p = st.find(',');
93 if (p != string::npos) {
94 st.erase(p+1);
95 size_t p1 = counties.find(st);
96 size_t p2 = counties.rfind(st);
97 string cnty = counties.substr(p1+3, p2 - p1 - 3);
98 size_t pc = cnty.find(',');
99 p1 = 0;
100 w_storm_county->clear();
101 while (pc != string::npos) {
102 w_storm_county->add(cnty.substr(p1, pc - p1).c_str());
103 p1 = pc + 1;
104 pc = cnty.find(',', pc + 1);
105 }
106 }
107 w_storm_county->index(0);
108 }
109
set_storm_combos()110 static void set_storm_combos()
111 {
112 w_storm_state->clear();
113 for (int i = 0; i < numstates; i++) {
114 if (i == 0)
115 w_storm_state->add("--Select State--");
116 else
117 w_storm_state->add(states[i].c_str());
118 }
119 w_storm_state->index(0);
120
121 w_storm_zone->clear();
122 for (int i = 0; i < num_us_tzones; i++)
123 w_storm_zone->add(us_tzones[i].c_str());
124 w_storm_zone->index(0);
125
126 w_storm_flood_cat->clear();
127 for (int i = 0; i < num_flood_categories; i++)
128 w_storm_flood_cat->add(flood_categories[i].c_str());
129 w_storm_flood_cat->index(0);
130
131 w_storm_hail_size->clear();
132 for (int i = 0; i < num_hail_size; i++)
133 w_storm_hail_size->add(hail_size[i].c_str());
134 w_storm_hail_size->index(0);
135
136 w_storm_tornado_cat->clear();
137 for (int i = 0; i < num_tornado_categories; i++)
138 w_storm_tornado_cat->add(tornado_categories[i].c_str());
139 w_storm_tornado_cat->index(0);
140
141 w_storm_wind_cat->clear();
142 for (int i = 0; i < num_wind_speeds; i++)
143 w_storm_wind_cat->add(wind_speeds[i].c_str());
144 w_storm_wind_cat->index(0);
145
146 w_storm_damage_cat->clear();
147 for (int i = 0; i < num_damage; i++)
148 w_storm_damage_cat->add(damage[i].c_str());
149 w_storm_damage_cat->index(0);
150
151 w_storm_snow_dur->clear();
152 for (int i = 0; i < num_snow_dur; i++)
153 w_storm_snow_dur->add(snow_dur[i].c_str());
154 w_storm_snow_dur->index(0);
155
156 w_storm_snow_tot->clear();
157 for (int i = 0; i < num_snow_tot; i++)
158 w_storm_snow_tot->add(snow_tot[i].c_str());
159 w_storm_snow_tot->index(0);
160
161 w_storm_f_rain_dur->clear();
162 for (int i = 0; i < num_ice_dur; i++)
163 w_storm_f_rain_dur->add(ice_dur[i].c_str());
164 w_storm_f_rain_dur->index(0);
165
166 w_storm_f_rain_tot->clear();
167 for (int i = 0; i < num_ice_tot; i++)
168 w_storm_f_rain_tot->add(ice_tot[i].c_str());
169 w_storm_f_rain_tot->index(0);
170
171 w_storm_h_rain_dur->clear();
172 for (int i = 0; i < num_rainfall_dur; i++)
173 w_storm_h_rain_dur->add(rainfall_dur[i].c_str());
174 w_storm_h_rain_dur->index(0);
175
176 w_storm_h_rain_tot->clear();
177 for (int i = 0; i < num_rainfall; i++)
178 w_storm_h_rain_tot->add(rainfall[i].c_str());
179 w_storm_h_rain_tot->index(0);
180
181 w_storm_o_profile->clear();
182 for (int i = 0; i < num_profiles; i++)
183 w_storm_o_profile->add(profiles[i].c_str());
184 w_storm_o_profile->index(0);
185
186 set_storm_counties(0);
187 }
188
cb_btn_time(Fl_Button *,void *)189 static void cb_btn_time(Fl_Button*, void*) {
190 w_storm_time->value(szTime(7));
191 }
192
cb_make_storm_default(Fl_Button *,void *)193 static void cb_make_storm_default(Fl_Button*, void*)
194 {
195 progStatus.swx_index_default_county = w_storm_county->index();
196 progStatus.swx_index_default_state = w_storm_state->index();
197 progStatus.swx_default_location = w_storm_location->value();
198 progStatus.swx_default_zone = w_storm_zone->value();
199 progStatus.swx_default_profile = w_storm_o_profile->value();
200 }
201
cb_use_storm_default(Fl_Button *,void *)202 static void cb_use_storm_default(Fl_Button*, void*)
203 {
204 w_storm_state->index(progStatus.swx_index_default_state);
205 set_storm_counties(progStatus.swx_index_default_state);
206 w_storm_county->index(progStatus.swx_index_default_county);
207 w_storm_location->value(progStatus.swx_default_location.c_str());
208 w_storm_zone->value(progStatus.swx_default_zone.c_str());
209 w_storm_o_name->value(progStatus.my_name.c_str());
210 w_storm_o_tele->value(progStatus.my_tel.c_str());
211 w_storm_o_email->value(progStatus.my_email.c_str());
212 w_storm_o_profile->value(progStatus.swx_default_profile.c_str());
213 }
214
storm_changed(Fl_Widget *,void *)215 void storm_changed(Fl_Widget *, void *)
216 {
217 estimate();
218 }
219
cb_storm_state(Fl_Widget *,void *)220 void cb_storm_state(Fl_Widget *, void *)
221 {
222 int n = w_storm_state->index();
223 set_storm_counties(n);
224 estimate();
225 }
226
cb_flood(Fl_Widget *,void *)227 void cb_flood(Fl_Widget *, void *)
228 {
229 w_storm_flood_cat->index(0);
230 if (w_storm_flood->value())
231 w_storm_flood_cat->activate();
232 else
233 w_storm_flood_cat->deactivate();
234 estimate();
235 }
236
cb_hail(Fl_Widget *,void *)237 void cb_hail(Fl_Widget *, void *)
238 {
239 w_storm_hail_size->index(0);
240 if (w_storm_hail->value())
241 w_storm_hail_size->activate();
242 else
243 w_storm_hail_size->deactivate();
244 estimate();
245 }
246
cb_high_wind(Fl_Widget *,void *)247 void cb_high_wind(Fl_Widget *, void *)
248 {
249 w_storm_wind_cat->index(0);
250 if (w_storm_wind->value())
251 w_storm_wind_cat->activate();
252 else
253 w_storm_wind_cat->deactivate();
254 estimate();
255 }
256
cb_tornado(Fl_Widget *,void *)257 void cb_tornado(Fl_Widget *, void *)
258 {
259 w_storm_tornado_cat->index(0);
260 if (w_storm_tornado->value())
261 w_storm_tornado_cat->activate();
262 else
263 w_storm_tornado_cat->deactivate();
264 estimate();
265 }
266
cb_damage(Fl_Widget *,void *)267 void cb_damage(Fl_Widget *, void *)
268 {
269 w_storm_damage_cat->index(0);
270 if (w_storm_damage->value())
271 w_storm_damage_cat->activate();
272 else
273 w_storm_damage_cat->deactivate();
274 estimate();
275 }
276
cb_snow(Fl_Widget *,void *)277 void cb_snow(Fl_Widget *, void *)
278 {
279 w_storm_snow_tot->index(0);
280 w_storm_snow_dur->index(0);
281 if (w_storm_snow->value()) {
282 w_storm_snow_tot->activate();
283 w_storm_snow_dur->activate();
284 } else {
285 w_storm_snow_tot->deactivate();
286 w_storm_snow_dur->deactivate();
287 }
288 estimate();
289 }
290
cb_f_rain(Fl_Widget *,void *)291 void cb_f_rain(Fl_Widget *, void *)
292 {
293 w_storm_f_rain_tot->index(0);
294 w_storm_f_rain_dur->index(0);
295 if (w_storm_f_rain->value()) {
296 w_storm_f_rain_tot->activate();
297 w_storm_f_rain_dur->activate();
298 } else {
299 w_storm_f_rain_tot->deactivate();
300 w_storm_f_rain_dur->deactivate();
301 }
302 estimate();
303 }
304
cb_h_rain(Fl_Widget *,void *)305 void cb_h_rain(Fl_Widget *, void *)
306 {
307 w_storm_h_rain_tot->index(0);
308 w_storm_h_rain_dur->index(0);
309 if (w_storm_h_rain->value()) {
310 w_storm_h_rain_tot->activate();
311 w_storm_h_rain_dur->activate();
312 } else {
313 w_storm_h_rain_tot->deactivate();
314 w_storm_h_rain_dur->deactivate();
315 }
316 estimate();
317 }
318
create_storm_tab()319 void create_storm_tab()
320 {
321 int Y = tab_top;
322 tab_storm = new Fl_Group(0, Y, 570, 390, "tab_storm");
323 tab_storm->begin();
324 tab_storm->copy_label("");
325 tab_storm->align(FL_ALIGN_INSIDE);
326
327 tab_storm_type = new Fl_Tabs(0, Y+2, 570, 387, "wx_tabs");
328 tab_storm_type->selection_color((Fl_Color)246);
329 tab_storm_type->copy_label("");
330 tab_storm_type->align(FL_ALIGN_INSIDE);
331
332 tab_storm_1 = new Fl_Group(0, Y+25, 570, 360, "Report");
333 tab_storm_1->begin();
334
335 Y += 35;
336
337 w_storm_date = new Fl_DateInput(70, Y, 140, 22, _("Date"));
338 w_storm_date->tooltip(_("Observation date : month/day/year"));
339 w_storm_date->align(FL_ALIGN_LEFT);
340 w_storm_date->box(FL_DOWN_BOX);
341 w_storm_date->color((Fl_Color)FL_BACKGROUND2_COLOR);
342 w_storm_date->selection_color((Fl_Color)FL_SELECTION_COLOR);
343 w_storm_date->labeltype(FL_NORMAL_LABEL);
344 w_storm_date->labelfont(0);
345 w_storm_date->labelsize(14);
346 w_storm_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
347 w_storm_date->when(FL_WHEN_CHANGED);
348 w_storm_date->callback(storm_changed);
349 w_storm_date->local_datetime();
350
351 w_storm_time = new Fl_Input2(250, Y, 60, 22, _("Time"));
352 w_storm_time->tooltip(_("Observation time : HHMM"));
353 w_storm_time->align(FL_ALIGN_LEFT);
354 w_storm_time->when(FL_WHEN_CHANGED);
355 w_storm_time->callback(storm_changed);
356
357 w_storm_btn_time = new Fl_Button(312, Y, 22, 22, _("..."));
358 w_storm_btn_time->tooltip(_("Current local time"));
359 w_storm_btn_time->callback((Fl_Callback*)cb_btn_time);
360
361 w_storm_zone = new Fl_ListBox(335, Y, 80, 22, "");
362 w_storm_zone->begin();
363 w_storm_zone->align(FL_ALIGN_TOP || FL_ALIGN_INSIDE);
364 w_storm_zone->tooltip(_("Time Zone, ie: EDT"));
365 w_storm_zone->when(FL_WHEN_CHANGED);
366 w_storm_zone->align(FL_ALIGN_RIGHT);
367 for (int n = 0; n < num_us_tzones; n++)
368 w_storm_zone->add(us_tzones[n].c_str());
369 w_storm_zone->callback(storm_changed);
370 w_storm_zone->end();
371
372 Y += 25;
373 w_storm_state = new Fl_ListBox(70, Y, 200, 22, _("State"));
374 w_storm_state->begin();
375 w_storm_state->tooltip(_("Select state / territory"));
376 w_storm_state->align(FL_ALIGN_LEFT);
377 w_storm_state->when(FL_WHEN_CHANGED);
378 w_storm_state->callback((Fl_Callback*)cb_storm_state);
379 w_storm_state->end();
380
381 w_storm_county = new Fl_ListBox(325, Y, 235, 22, _("County"));
382 w_storm_county->begin();
383 w_storm_county->tooltip(_("Select county"));
384 w_storm_county->align(FL_ALIGN_LEFT);
385 w_storm_county->when(FL_WHEN_CHANGED);
386 w_storm_county->callback((Fl_Callback*)storm_changed);
387 w_storm_county->end();
388
389 Y += 25;
390 int y1 = Y;
391 w_storm_location = new Fl_Input2(70, Y, 200, 22, _("Location"));
392 w_storm_location->tooltip(_("Enter location/town"));
393 w_storm_location->align(FL_ALIGN_LEFT);
394 w_storm_location->when(FL_WHEN_CHANGED);
395 w_storm_location->callback((Fl_Callback*)storm_changed);
396
397 // flood
398 Y += 35;
399 w_storm_flood = new Fl_Check_Button(20, Y, 180, 22, _("Flood"));
400 w_storm_flood->tooltip(_("Report flooding"));
401 w_storm_flood->when(FL_WHEN_CHANGED);
402 w_storm_flood->callback((Fl_Callback*)cb_flood);
403
404 w_storm_flood_cat = new Fl_ListBox(200, Y, 365, 22, "");
405 w_storm_flood_cat->tooltip(_("Select a flooding category"));
406 w_storm_flood_cat->when(FL_WHEN_CHANGED);
407 w_storm_flood_cat->callback((Fl_Callback*)storm_changed);
408 w_storm_flood_cat->deactivate();
409 //hail
410 Y += 25;
411 w_storm_hail = new Fl_Check_Button(20, Y, 180, 22, _("Hail"));
412 w_storm_hail->tooltip(_("Report incidence of hail"));
413 w_storm_hail->when(FL_WHEN_CHANGED);
414 w_storm_hail->callback((Fl_Callback*)cb_hail);
415
416 w_storm_hail_size = new Fl_ListBox(200, Y, 365, 22, "");
417 w_storm_hail_size->tooltip(_("Select a Hail size"));
418 w_storm_hail_size->when(FL_WHEN_CHANGED);
419 w_storm_hail_size->callback((Fl_Callback*)storm_changed);
420 w_storm_hail_size->deactivate();
421 //high speed wind
422 Y += 25;
423 w_storm_wind = new Fl_Check_Button(20, Y, 180, 22, _("High Wind Speed"));
424 w_storm_wind->tooltip(_("Report high winds"));
425 w_storm_wind->when(FL_WHEN_CHANGED);
426 w_storm_wind->callback((Fl_Callback*)cb_high_wind);
427
428 w_storm_wind_cat = new Fl_ListBox(200, Y, 365, 22, "");
429 w_storm_wind_cat->tooltip(_("Select a wind speed"));
430 w_storm_wind_cat->when(FL_WHEN_CHANGED);
431 w_storm_wind_cat->callback((Fl_Callback*)storm_changed);
432 w_storm_wind_cat->deactivate();
433 //tornado/funnel cloud
434 Y += 25;
435 w_storm_tornado = new Fl_Check_Button(20, Y, 180, 22, _("Tornado/Funnel cloud"));
436 w_storm_tornado->tooltip(_("Report tornado sighting"));
437 w_storm_tornado->when(FL_WHEN_CHANGED);
438 w_storm_tornado->callback((Fl_Callback*)cb_tornado);
439
440 w_storm_tornado_cat = new Fl_ListBox(200, Y, 365, 22, "");
441 w_storm_tornado_cat->tooltip(_("Select a report"));
442 w_storm_tornado_cat->when(FL_WHEN_CHANGED);
443 w_storm_tornado_cat->callback((Fl_Callback*)storm_changed);
444 w_storm_tornado_cat->deactivate();
445 //wind damage
446 Y += 25;
447 w_storm_damage = new Fl_Check_Button(20, Y, 180, 22, _("Wind Damage?"));
448 w_storm_damage->tooltip("Report wind damage");
449 w_storm_damage->when(FL_WHEN_CHANGED);
450 w_storm_damage->callback((Fl_Callback*)cb_damage);
451
452 w_storm_damage_cat = new Fl_ListBox(200, Y, 365, 22, "");
453 w_storm_damage_cat->tooltip(_("Select a Damage Desc'"));
454 w_storm_damage_cat->when(FL_WHEN_CHANGED);
455 w_storm_damage_cat->callback((Fl_Callback*)storm_changed);
456 w_storm_damage_cat->deactivate();
457 //snow
458 Y += 25;
459 w_storm_snow = new Fl_Check_Button(20, Y, 180, 22, _("Snow"));
460 w_storm_snow->tooltip("Report Snowfall");
461 w_storm_snow->when(FL_WHEN_CHANGED);
462 w_storm_snow->callback((Fl_Callback*)cb_snow);
463
464 w_storm_snow_tot = new Fl_ListBox(200, Y, 180, 22, "");
465 w_storm_snow_tot->tooltip(_("Select a snow tot'"));
466 w_storm_snow_tot->when(FL_WHEN_CHANGED);
467 w_storm_snow_tot->callback((Fl_Callback*)storm_changed);
468 w_storm_snow_tot->deactivate();
469
470 w_storm_snow_dur = new Fl_ListBox(385, Y, 180, 22, "");
471 w_storm_snow_dur->tooltip(_("Select a snow total"));
472 w_storm_snow_dur->when(FL_WHEN_CHANGED);
473 w_storm_snow_dur->callback((Fl_Callback*)storm_changed);
474 w_storm_snow_dur->deactivate();
475
476 //freezing rain/icing
477 Y += 25;
478 w_storm_f_rain = new Fl_Check_Button(20, Y, 180, 22, _("Freezing Rain/Icing"));
479 w_storm_f_rain->tooltip("Report freezing rain / ice");
480 w_storm_f_rain->when(FL_WHEN_CHANGED);
481 w_storm_f_rain->callback((Fl_Callback*)cb_f_rain);
482
483 w_storm_f_rain_tot = new Fl_ListBox(200, Y, 180, 22, "");
484 w_storm_f_rain_tot->tooltip(_("Select an ice total"));
485 w_storm_f_rain_tot->when(FL_WHEN_CHANGED);
486 w_storm_f_rain_tot->callback((Fl_Callback*)storm_changed);
487 w_storm_f_rain_tot->deactivate();
488
489 w_storm_f_rain_dur = new Fl_ListBox(385, Y, 180, 22, "");
490 w_storm_f_rain_dur->tooltip(_("Select a duration"));
491 w_storm_f_rain_dur->when(FL_WHEN_CHANGED);
492 w_storm_f_rain_dur->callback((Fl_Callback*)storm_changed);
493 w_storm_f_rain_dur->deactivate();
494 //heavy rain
495 Y += 25;
496 w_storm_h_rain = new Fl_Check_Button(20, Y, 180, 22, _("Heavy Rain"));
497 w_storm_h_rain->tooltip("Report heavy rain");
498 w_storm_h_rain->when(FL_WHEN_CHANGED);
499 w_storm_h_rain->callback((Fl_Callback*)cb_h_rain);
500
501 w_storm_h_rain_tot = new Fl_ListBox(200, Y, 180, 22, "");
502 w_storm_h_rain_tot->tooltip(_("Select rain total"));
503 w_storm_h_rain_tot->when(FL_WHEN_CHANGED);
504 w_storm_h_rain_tot->callback((Fl_Callback*)storm_changed);
505 w_storm_h_rain_tot->deactivate();
506
507 w_storm_h_rain_dur = new Fl_ListBox(385, Y, 180, 22, "");
508 w_storm_h_rain_dur->tooltip(_("Select a duration"));
509 w_storm_h_rain_dur->when(FL_WHEN_CHANGED);
510 w_storm_h_rain_dur->callback((Fl_Callback*)storm_changed);
511 w_storm_h_rain_dur->deactivate();
512 //contact information
513 Y += 35;
514 w_storm_o_name = new Fl_Input2(70, Y, 240, 22, _("Name"));
515 w_storm_o_name->when(FL_WHEN_CHANGED);
516 w_storm_o_name->align(FL_ALIGN_LEFT);
517
518 w_storm_o_tele = new Fl_Input2(380, Y, 185, 22, _("Phone"));
519 w_storm_o_tele->when(FL_WHEN_CHANGED);
520 w_storm_o_tele->align(FL_ALIGN_LEFT);
521
522 Y += 25;
523 w_storm_o_email = new Fl_Input2(70, Y, 240, 22, _("Email"));
524 w_storm_o_email->when(FL_WHEN_CHANGED);
525 w_storm_o_email->align(FL_ALIGN_LEFT);
526
527 w_storm_o_profile = new Fl_ListBox(380, Y, 185, 22, _("Profile"));
528 w_storm_o_profile->begin();
529 w_storm_o_profile->align(FL_ALIGN_LEFT);
530 w_storm_o_profile->tooltip(_("Select a profile"));
531 w_storm_o_profile->when(FL_WHEN_CHANGED);
532 w_storm_o_profile->callback((Fl_Callback*)storm_changed);
533 w_storm_o_profile->end();
534
535 make_storm_default = new Fl_Button(415, y1, 70, 24, _("Store"));
536 make_storm_default->tooltip(_("Store state/county/location\ntime-zone\nname, email, tele, profile\nas default"));
537 make_storm_default->callback((Fl_Callback*)cb_make_storm_default);
538
539 use_storm_default = new Fl_Button(490, y1, 70, 24, _("Default"));
540 use_storm_default->tooltip(_("Use state/county/location\ntime-zone\nname, email, tele, profile\nas default"));
541 use_storm_default->callback((Fl_Callback*)cb_use_storm_default);
542 tab_storm_1->end();
543
544 Y = tab_top;
545 tab_storm_2 = new Fl_Group(0, Y+25, 570, 360, _("Details"));
546 tab_storm_2->begin();
547
548 Y += 35;
549 w_storm_details = new FTextEdit(5, Y, 560, 340, _(""));
550 w_storm_details->when(FL_WHEN_RELEASE);
551 w_storm_details->callback((Fl_Callback*)storm_changed);
552
553 tab_storm_2->end();
554
555 tab_storm->end();
556
557 set_storm_combos();
558
559 tab_storm->hide();
560
561 };
562
563