1 /* NIGHTFALL Light Curve Synthesis Program */
2 /* Copyright (C) 1998 Rainer Wichmann */
3 /* */
4 /* This program is free software; you can redistribute it */
5 /* and/or modify */
6 /* it under the terms of the GNU General Public License as */
7 /* published by */
8 /* the Free Software Foundation; either version 2 of the License, or */
9 /* (at your option) any later version. */
10 /* */
11 /* This program is distributed in the hope that it will be useful, */
12 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14 /* GNU General Public License for more details. */
15 /* */
16 /* You should have received a copy of the GNU General Public License */
17 /* along with this program; if not, write to the Free Software */
18 /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20
21 /* ANSI C forbids an empty source file, so put this outside */
22
23 #include <math.h>
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <string.h>
27
28 #include "Light.h"
29 #include "LightPassband.h"
30
31 #ifdef _WITH_GTK
32
33
34 #include "pixmaps/mcomp.xpm"
35 #include "pixmaps/manim.xpm"
36 #include "pixmaps/mplot.xpm"
37 #include "pixmaps/mhelp.xpm"
38
39 #ifdef HAVE_GNOME
40
41 GnomeUIInfo toolbar[] = {
42 GNOMEUIINFO_ITEM(N_("Compute"),
43 N_("Compute a synthetic lightcurve w/ current options"),
44 lightcurve_event, mcomp_xpm),
45 GNOMEUIINFO_TOGGLEITEM(N_("Animate"),
46 N_("Toggle animated view of binary during lightcurve computation"),
47 toggle_animate,
48 manim_xpm),
49 GNOMEUIINFO_ITEM(N_("Plot"), N_("Plot computed lightcurve"),
50 lightcurveplot_event, mplot_xpm),
51 GNOMEUIINFO_SEPARATOR,
52 GNOMEUIINFO_ITEM(N_("Info"),
53 N_("Help on the active notebook page"),
54 help_event, mhelp_xpm),
55 GNOMEUIINFO_END
56 };
57
58 /* ---------------- status bar ------------------ */
59
60 GnomeAppBar *status_bar;
61
62 #else
63
64 GtkWidget *status_bar;
65 gint context_id;
66
67 #endif
68
69
70
71 /*************************************************************
72
73 Variables for temporary storage of data
74
75 **************************************************************/
76
77 int TG_reflectstore; /* the reflection flag */
78 int TG_graphstore; /* the plot flag */
79 int TG_visualstore; /* the visualize flag */
80
81 /* -------- required for arbitrary ON/OFF of spots --------- */
82
83 int TG_P1spot = 0, TG_P2spot = 0;
84 int TG_S1spot = 0, TG_S2spot = 0;
85 int SpotActive[4] = { 0, 0, 0, 0 };
86 int TG_1spots = 0, TG_2spots = 0;
87 int FitSpotS[16] = { 0 };
88 SpotLight SpotStore[2][2];
89
90
91 /*************************************************************
92
93 Global widgets
94
95 **************************************************************/
96
97
98 /* --------------- entry fields (basic) ------------------ */
99
100 GtkWidget *e_101; /* mass ratio */
101 GtkWidget *e_102; /* inclination */
102 GtkWidget *e_103; /* primary rochefill */
103 GtkWidget *e_104; /* secondary rochefill */
104 GtkWidget *e_105; /* primary temperature */
105 GtkWidget *e_106; /* secondary temperature */
106
107 /* ---------------- entry fields (advanced) -------------- */
108
109 GtkWidget *e_107 = NULL; /* eccentricity */
110 GtkWidget *e_108 = NULL; /* periastron length */
111 GtkWidget *e_109 = NULL; /* primary F ratio */
112 GtkWidget *e_110 = NULL; /* secondary F ratio */
113 GtkWidget *e_111 = NULL; /* line rest wavelength */
114 GtkWidget *e_112 = NULL; /* # of lightcurve steps */
115 GtkWidget *e_113 = NULL; /* # of reflection iterations */
116 #ifdef HAVE_DISK
117 GtkWidget *e_114 = NULL; /* outer disk radius */
118 GtkWidget *e_115 = NULL; /* inner disk radius */
119 GtkWidget *e_116 = NULL; /* disk tilt */
120 GtkWidget *e_117 = NULL; /* disk warp */
121 GtkWidget *e_118 = NULL; /* disk hight */
122 GtkWidget *e_119 = NULL; /* disk H/R */
123 GtkWidget *e_120 = NULL; /* disk temperature */
124 #endif
125 GtkWidget *e_121 = NULL; /* primary log_g */
126 GtkWidget *e_122 = NULL; /* secondary log_g */
127
128 #ifdef HAVE_DISK
129 GtkWidget *e_130 = NULL; /* hot spot temperature */
130 GtkWidget *e_131 = NULL; /* hot spot longitude */
131 GtkWidget *e_132 = NULL; /* hot spot extent */
132 GtkWidget *e_133 = NULL; /* hot spot depth */
133 GtkWidget *e_134 = NULL; /* hot spot puff */
134
135 GtkWidget *e_140 = NULL; /* Warp maximum */
136 GtkWidget *e_141 = NULL; /* Warp longitude */
137 GtkWidget *e_142 = NULL; /* Warp width */
138 GtkWidget *e_143 = NULL; /* Warp centre */
139 #endif
140
141
142 /* ---------------- entry fields (fit) ------------------- */
143
144 GtkWidget *e_name = NULL; /* system name */
145 GtkWidget *e_301; /* fit tolerance */
146 GtkWidget *e_302 = NULL; /* period */
147 GtkWidget *e_303 = NULL; /* mass */
148 GtkWidget *e_304 = NULL; /* separation */
149 GtkWidget *e_305; /* step1 */
150 GtkWidget *e_306; /* step2 */
151
152 /* --------------- entry fields (spots) ------------------ */
153
154 GtkWidget *e_401; /* spot1 primary longitude */
155 GtkWidget *e_402; /* spot1 primary latitude */
156 GtkWidget *e_403; /* spot1 primary radius */
157 GtkWidget *e_404; /* spot1 primary dimfactor */
158 GtkWidget *e_405; /* spot2 primary longitude */
159 GtkWidget *e_406; /* spot2 primary latitude */
160 GtkWidget *e_407; /* spot2 primary radius */
161 GtkWidget *e_408; /* spot2 primary dimfactor */
162 GtkWidget *e_409; /* spot1 secondary longitude */
163 GtkWidget *e_410; /* spot1 secondary latitude */
164 GtkWidget *e_411; /* spot1 secondary radius */
165 GtkWidget *e_412; /* spot1 secondary dimfactor */
166 GtkWidget *e_413; /* spot2 secondary longitude */
167 GtkWidget *e_414; /* spot2 secondary latitude */
168 GtkWidget *e_415; /* spot2 secondary radius */
169 GtkWidget *e_416; /* spot2 secondary dimfactor */
170
171 /* --------------- entry fields (third light) ------------ */
172
173 GtkWidget *e_501 = NULL; /* third light U */
174 GtkWidget *e_502 = NULL; /* third light B */
175 GtkWidget *e_503 = NULL; /* third light V */
176 GtkWidget *e_504 = NULL; /* third light R */
177 GtkWidget *e_505 = NULL; /* third light I */
178 GtkWidget *e_506 = NULL; /* third light J */
179 GtkWidget *e_507 = NULL; /* third light H */
180 GtkWidget *e_508 = NULL; /* third light K */
181 GtkWidget *e_509 = NULL; /* third light u */
182 GtkWidget *e_510 = NULL; /* third light v */
183 GtkWidget *e_511 = NULL; /* third light b */
184 GtkWidget *e_512 = NULL; /* third light y */
185
186 /* ------------------ toggle buttons --------------------- */
187
188 GtkWidget *t_anim_button; /* toggle animated */
189 #ifdef HAVE_DISK
190 GtkWidget *t_disk_button; /* toggle disk on/off */
191 GtkWidget *t_warp_button; /* toggle warped disk */
192 #endif
193 GtkWidget *t_eccentric_button; /* toggle eccentric */
194 GtkWidget *t_fpri_button; /* toggle asynchron pri. */
195 GtkWidget *t_fsec_button; /* toggle asynchron sec. */
196 GtkWidget *t_ssp1_button; /* toggle spot1 sec. */
197 GtkWidget *t_ssp2_button; /* toggle spot2 sec. */
198 GtkWidget *t_psp1_button; /* toggle spot1 pri. */
199 GtkWidget *t_psp2_button; /* toggle spot2 pri. */
200 GtkWidget *t_bbody_button; /* toggle blackbody */
201 GtkWidget *t_sian_button; /* toggle simul.anneal */
202 GtkWidget *t_mcmc_button; /* toggle mcmc */
203
204 #ifdef HAVE_DISK
205 GtkWidget *td_button_0; /* disk temp distribution*/
206 GtkWidget *td_button_1; /* disk temp distribution*/
207 GtkWidget *td_button_2; /* disk temp distribution*/
208
209 GtkWidget *hs_temp_label; /* hot spot temperature */
210 GtkWidget *hs_longitude_label; /* hot spot longitude */
211 GtkWidget *hs_extent_label; /* hot spot extent */
212 GtkWidget *hs_depth_label; /* hot spot depth */
213 GtkWidget *hs_puff_label; /* hot spot puff */
214
215 GtkWidget *wp_max_label; /* warp maximum */
216 GtkWidget *wp_longitude_label; /* warp longitude */
217 GtkWidget *wp_width_label; /* warp width */
218 GtkWidget *wp_centre_label; /* warp centre */
219
220 #endif
221
222
223 /* ------------------------ items to grey out ------------ */
224
225 GtkWidget *menu_plot; /* plot lightcurve */
226 GtkWidget *menu_profile; /* line profiles */
227 GtkWidget *ome_button; /* fit omega */
228 GtkWidget *ecc_button; /* fit eccentricity */
229 GtkWidget *as1_button; /* fit async primary */
230 GtkWidget *as2_button; /* fit async secondary */
231 GtkWidget *ref_label; /* reflection label */
232 #ifdef HAVE_DISK
233 GtkWidget *orad_label; /* outer radius label */
234 GtkWidget *irad_label; /* inner radius label */
235 GtkWidget *tilt_label; /* disk tilt label */
236 GtkWidget *warp_label; /* disk warp label */
237 GtkWidget *thick_label; /* disk trickness label */
238 GtkWidget *hr_label; /* disk H/R label */
239 GtkWidget *disktmp_label; /* disk temperature label*/
240 #endif
241
242 /* --------------------- misc ------------------ */
243
244 GtkWidget *progress_bar; /* progress bar */
245 GtkWidget *top_window; /* the top window */
246 GtkWidget *notebook; /* the notebook */
247 GtkTooltips *tooltips; /* the tooltips */
248
249
250 /******************************************************************
251 @package nightfall
252 @author Rainer Wichmann (rwichman@lsw.uni-heidelberg.de)
253 @version 1.0
254 @short Push message on status bar
255 @tip function arguments are not used
256 @param (char) *message Message
257 @return (void)
258 @heading Graphical User Interface
259 *******************************************************************/
my_appbar_push(char * message)260 void my_appbar_push (char *message)
261 {
262 #ifdef HAVE_GNOME
263 gnome_appbar_clear_stack(status_bar);
264 gnome_appbar_push (status_bar, message);
265 while (gtk_events_pending()) gtk_main_iteration();
266 #else
267 gtk_statusbar_pop(GTK_STATUSBAR(status_bar), context_id);
268 gtk_statusbar_push(GTK_STATUSBAR(status_bar), context_id, message);
269 while (gtk_events_pending()) gtk_main_iteration();
270 #endif
271 return;
272 }
273
274 /******************************************************************
275 @package nightfall
276 @author Rainer Wichmann (rwichman@lsw.uni-heidelberg.de)
277 @version 1.0
278 @short Main GTK routine, creates GUI and waits for input
279 @param (int) argc The number of arguments
280 @param (char *) argv[] The argument array
281 @return (int) The exit status
282 @heading Graphical User Interface
283 *******************************************************************/
the_gui(int argc,char * argv[])284 int the_gui (int argc, char *argv[])
285 {
286 GtkWidget *label;
287 GtkWidget *button;
288 GtkWidget *table;
289 GtkWidget *box1;
290 GtkWidget *box2;
291 GtkWidget *box3;
292 GtkWidget *box4;
293
294 GtkWidget *pixmap;
295
296 GSList *group;
297
298
299 #ifndef HAVE_GNOME
300 GtkWidget *menu_bar;
301 GtkWidget *handlebox;
302 GtkWidget *toolbar;
303
304 char my_rc[] = "nightfallrc"; /* theme file */
305 char my_full_rc[1024] = "\0"; /* full path to theme file */
306 FILE *test; /* test for file */
307 #endif
308
309 #ifdef _WITH_OPENGL
310 gchar *info_str; /* OpenGL hardware information */
311 #endif
312
313
314 char InitString[64]; /* init string for entry field */
315 int i; /* misc */
316 char top_title[256]; /* title string */
317
318 /* >>>>>>>>>>> initialize <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
319
320 #ifdef HAVE_GNOME
321
322 int lo;
323
324 GnomeClient *client;
325 gint restarted = 0, dummy;
326 gint os_x = 20, os_y = 20, os_w = 554, os_h = 408;
327 gchar * configFile = NULL;
328 gchar * dataFile = NULL;
329 gchar * theName = NULL;
330 gchar *ptr;
331 gchar path[512];
332 gint old_page = 0;
333
334 extern gint die (GnomeClient *client, gpointer client_data);
335 extern gint save_yourself (GnomeClient *client,
336 gint phase,
337 GnomeRestartStyle restart_style,
338 gint shutdown,
339 GnomeInteractStyle interact_style,
340 gint fast,
341 gpointer client_data);
342
343
344 gnome_program_init(PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
345 /* GNOME_PARAM_POPT_TABLE, options, */
346 GNOME_PARAM_HUMAN_READABLE_NAME,
347 _("Binary Star Simulator"),
348 GNOME_PARAM_APP_SYSCONFDIR, SYSCONFDIR,
349 GNOME_PARAM_APP_DATADIR, GDOCDIR,
350 GNOME_PARAM_APP_LIBDIR, LIBDIR,
351 NULL);
352 /* gnome_init("nightfall", NULL, argc, argv); */
353 client= gnome_master_client ();
354
355 gtk_signal_connect (GTK_OBJECT (client), "save_yourself",
356 GTK_SIGNAL_FUNC (save_yourself), NULL);
357 gtk_signal_connect (GTK_OBJECT (client), "die",
358 GTK_SIGNAL_FUNC (die), NULL);
359
360
361 #else
362
363 gtk_init (&argc, &argv);
364
365 if (getenv("HOME") != NULL) {
366
367 /* test for $HOME/.nightfallrc */
368 strncpy(my_full_rc, getenv("HOME"),
369 (sizeof(my_full_rc) - sizeof(my_rc) - 3));
370 strcat(my_full_rc, "/.");
371 strncat(my_full_rc, my_rc, sizeof(my_rc));
372
373 /* test for $HOME/.gtkrc */
374 if ( (test = fopen(my_full_rc, "r")) == NULL) {
375 strncpy(my_full_rc, getenv("HOME"),
376 (sizeof(my_full_rc) - 8));
377 strcat(my_full_rc, "/.gtkrc");
378 test = fopen(my_full_rc, "r");
379 }
380
381
382 if (test != NULL) {
383 /* parse $HOME/.nightfallrc or $HOME/.gtkrc */
384 fclose(test);
385 gtk_rc_parse(my_full_rc);
386 } else {
387 /* try ./nightfallrc */
388 my_full_rc[0] = '.';
389 my_full_rc[1] = '/';
390 my_full_rc[2] = '\0';
391 strcat(my_full_rc, my_rc);
392 test = fopen(my_full_rc, "r");
393 if (test != NULL) {
394 fclose(test);
395 gtk_rc_parse(my_full_rc);
396 } else {
397 gtk_rc_parse("./.gtkrc");
398 }
399 }
400 }
401 #endif
402
403 #ifdef _WITH_OPENGL
404 /* Check if OpenGL is supported by local display */
405 /* Needed for remote displays with no GL support */
406 if ((gdk_gl_query() == FALSE) && (Flags.debug[WARN] == ON)) {
407 g_print("**Warning**: This binary was compiled with OpenGL support ON and\n");
408 g_print("**Warning**: is currently running on a machine supporting OpenGL,\n");
409 g_print("**Warning**: but probably your remote display does not support OpenGL !\n");
410 g_print("**Warning**: Thus we switch back to normal display !!\n");
411 Flags.GL = OFF;
412 } else {
413 if (Flags.debug[VERBOSE] == ON) {
414 /* vendor dependent version info string */
415 info_str = gdk_gl_get_info();
416 g_print("%s", info_str);
417 g_free(info_str);
418 }
419 Flags.GL = ON;
420 }
421 #endif
422
423 /* -------------- initialize flags ---------------------------- */
424
425 TG_reflectstore = Flags.reflect;
426 TG_graphstore = Flags.plot; Flags.plot = OFF;
427 TG_visualstore = Flags.visualize; Flags.visualize = OFF;
428
429 sprintf(top_title, "%10s %5s", PACKAGE, VERSION);
430
431 /* save current spot parameters */
432
433 SpotStore[0][0] = Spot[0][0]; SpotStore[0][1] = Spot[0][1];
434 SpotStore[1][0] = Spot[1][0]; SpotStore[1][1] = Spot[1][1];
435
436 TG_1spots = Flags.Spots1;
437 if (Flags.Spots1 > 0) { TG_P1spot = ON; SpotActive[0] = ON; }
438 if (Flags.Spots1 > 1) { TG_P2spot = ON; SpotActive[1] = ON; }
439 TG_2spots = Flags.Spots1;
440 if (Flags.Spots2 > 0) { TG_S1spot = ON; SpotActive[2] = ON; }
441 if (Flags.Spots2 > 1) { TG_S2spot = ON; SpotActive[3] = ON; }
442 for (i=0; i<16; ++i) FitSpotS[i] = Flags.simplex[10+i];
443
444
445 /* >>>>>>>>>>> top window <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
446
447 /* -------------- create new window ------------------------------ */
448
449 #ifdef HAVE_GNOME
450
451 top_window = gnome_app_new("nightfall", top_title);
452
453 if (GNOME_CLIENT_CONNECTED (client)) {
454
455 if (gnome_client_get_flags (client) & GNOME_CLIENT_RESTORED) {
456
457 restarted = 1; /* set flag */
458
459 gnome_config_push_prefix (gnome_client_get_config_prefix (client));
460
461 os_x = gnome_config_get_int ("Geometry/x");
462 os_y = gnome_config_get_int ("Geometry/y");
463 os_w = gnome_config_get_int ("Geometry/w");
464 os_h = gnome_config_get_int ("Geometry/h");
465
466 Flags.GN_tooltips = gnome_config_get_int ("Options/HaveTooltips=1");
467 Flags.GN_rempos = gnome_config_get_int ("Options/RememberPosition=1");
468 Flags.GN_exitconfirm = gnome_config_get_int ("Options/PromptOnQuit=0");
469
470 /* first, we read the config file. As the config file may have
471 * commands to read data, we then clear the data, and read
472 * those that were in memory when we were terminated.
473 */
474 configFile = gnome_config_get_string ("Configuration/File");
475 if (configFile != NULL) {
476 ptr = strrchr(configFile,'/');
477 if (ptr == NULL) {
478 ParseConfig(configFile, &dummy);
479 } else {
480 ++ptr;
481 ParseConfig(ptr, &dummy);
482 }
483 g_free(configFile);
484 }
485
486 /* set data count for all passbands to zero */
487 for ( i = 0; i < (NUM_MAG+2); ++ i) Flags.Passbands[i] = 0;
488
489 /* clear data file list */
490 ClearList();
491
492 for (i = 0; i < 12; ++i) {
493 snprintf(path, 255, "Data/File%02d", i);
494 dataFile = gnome_config_get_string(path);
495 if (dataFile != NULL) {
496 Read ( dataFile );
497 g_free( dataFile );
498 }
499 }
500
501 Flags.fill = gnome_config_get_int("Flags/fill");
502 Flags.elliptic = gnome_config_get_int("Flags/elliptic");
503 Flags.asynchron1 = gnome_config_get_int("Flags/asynchron1");
504 Flags.asynchron2 = gnome_config_get_int("Flags/asynchron2");
505 Flags.animate = gnome_config_get_int("Flags/animate");
506 Flags.plot = gnome_config_get_int("Flags/plot");
507 Flags.eps = gnome_config_get_int("Flags/eps");
508 Flags.lineprofile = gnome_config_get_int("Flags/lineprofile");
509 Flags.blackbody = gnome_config_get_int("Flags/blackbody");
510 Flags.fractional = gnome_config_get_int("Flags/fractional");
511 Flags.limb = gnome_config_get_int("Flags/limb");
512 Flags.reflect = gnome_config_get_int("Flags/reflect");
513 Flags.anneal = gnome_config_get_int("Flags/anneal");
514 Flags.PlotBand = gnome_config_get_int("Flags/PlotBand");
515
516 Flags.SimplexTol = gnome_config_get_float("Flags/STol");
517 Flags.Step[0] = gnome_config_get_float("Flags/Step0");
518 Flags.Step[1] = gnome_config_get_float("Flags/Step1");
519
520 for (lo = 0; lo < 12; ++lo)
521 {
522 snprintf(path, 255, "Flags/Dbg%02d", lo);
523 Flags.debug[lo] = gnome_config_get_int (path );
524 }
525
526 TG_reflectstore = gnome_config_get_int("Flags/reflectstore");
527 TG_graphstore = gnome_config_get_int("Flags/graphstore");
528 TG_visualstore = gnome_config_get_int("Flags/visualstore");
529
530 PhaseSteps = gnome_config_get_float("Misc/PhaseSteps");
531 old_page = gnome_config_get_int("Misc/NoteBookPage");
532
533 theName = gnome_config_get_string("Orbit/Name");
534 if (theName != NULL)
535 {
536 strncpy (Orbit.Name, theName, MAX_CFG_INLINE);
537 free (theName);
538 }
539
540 Orbit.LambdaZero = gnome_config_get_float("Orbit/LambdaZero");
541 Orbit.Third[Umag] = gnome_config_get_float("Orbit/ThirdU");
542 Orbit.Third[Bmag] = gnome_config_get_float("Orbit/ThirdB");
543 Orbit.Third[Vmag] = gnome_config_get_float("Orbit/ThirdV");
544 Orbit.Third[Rmag] = gnome_config_get_float("Orbit/ThirdR");
545 Orbit.Third[Imag] = gnome_config_get_float("Orbit/ThirdI");
546 Orbit.Third[Jmag] = gnome_config_get_float("Orbit/ThirdJ");
547 Orbit.Third[Hmag] = gnome_config_get_float("Orbit/ThirdH");
548 Orbit.Third[Kmag] = gnome_config_get_float("Orbit/ThirdK");
549 Orbit.Third[umag] = gnome_config_get_float("Orbit/Thirdu");
550 Orbit.Third[vmag] = gnome_config_get_float("Orbit/Thirdv");
551 Orbit.Third[bmag] = gnome_config_get_float("Orbit/Thirdb");
552 Orbit.Third[ymag] = gnome_config_get_float("Orbit/Thirdy");
553 Orbit.TruePeriod = gnome_config_get_float("Orbit/Period");
554 Orbit.TrueMass = gnome_config_get_float("Orbit/Mass");
555 Orbit.TrueDistance = gnome_config_get_float("Orbit/Distance");
556 Orbit.Excentricity = gnome_config_get_float("Orbit/Excentr");
557 Orbit.Omega = gnome_config_get_float("Orbit/Omega");
558 Orbit.Inclination = gnome_config_get_float("Orbit/Inclination");
559
560 Binary[Primary].Fratio = gnome_config_get_float("Binary/FR1");
561 Binary[Secondary].Fratio = gnome_config_get_float("Binary/FR2");
562 Binary[Primary].Mq = gnome_config_get_float("Binary/MQ1");
563 Binary[Secondary].Mq = gnome_config_get_float("Binary/MQ2");
564 Binary[Primary].RocheFill = gnome_config_get_float("Binary/RocheFill1");
565 Binary[Secondary].RocheFill = gnome_config_get_float("Binary/RocheFill2");
566 Binary[Primary].Temperature = gnome_config_get_float("Binary/Temp1");
567 Binary[Secondary].Temperature =gnome_config_get_float("Binary/Temp2");
568 Binary[Primary].log_g = gnome_config_get_float("Binary/LogG1");
569 Binary[Secondary].log_g = gnome_config_get_float("Binary/LogG2");
570
571 Flags.Spots1 = gnome_config_get_int("Flags/Spots1");
572 Flags.Spots2 = gnome_config_get_int("Flags/Spots2");
573
574 SpotStore[Primary][0].longitude = gnome_config_get_float("SpotP1/logitude");
575 SpotStore[Primary][0].latitude = gnome_config_get_float("SpotP1/latitude");
576 SpotStore[Primary][0].radius = gnome_config_get_float("SpotP1/radius");
577 SpotStore[Primary][0].dimfactor = gnome_config_get_float("SpotP1/dimfactor");
578
579 SpotStore[Primary][1].longitude = gnome_config_get_float("SpotP2/logitude");
580 SpotStore[Primary][1].latitude = gnome_config_get_float("SpotP2/latitude");
581 SpotStore[Primary][1].radius = gnome_config_get_float("SpotP2/radius");
582 SpotStore[Primary][1].dimfactor = gnome_config_get_float("SpotP2/dimfactor");
583
584 SpotStore[Secondary][0].longitude = gnome_config_get_float("SpotS1/logitude");
585 SpotStore[Secondary][0].latitude = gnome_config_get_float("SpotS1/latitude");
586 SpotStore[Secondary][0].radius = gnome_config_get_float("SpotS1/radius");
587 SpotStore[Secondary][0].dimfactor = gnome_config_get_float("SpotS1/dimfactor");
588
589 SpotStore[Secondary][1].longitude = gnome_config_get_float("SpotS2/logitude");
590 SpotStore[Secondary][1].latitude = gnome_config_get_float("SpotS2/latitude");
591 SpotStore[Secondary][1].radius = gnome_config_get_float("SpotS2/radius");
592 SpotStore[Secondary][1].dimfactor = gnome_config_get_float("SpotS2/dimfactor");
593
594 TG_P1spot = gnome_config_get_int ("Flags/TGP1");
595 TG_P2spot = gnome_config_get_int ("Flags/TGP2");
596 TG_S1spot = gnome_config_get_int ("Flags/TGS1");
597 TG_S2spot = gnome_config_get_int ("Flags/TGS2");
598
599 for (lo = 0; lo < 4; ++lo)
600 {
601 snprintf(path, 255, "SpotActive/%02d", lo);
602 SpotActive[lo] = gnome_config_get_int (path );
603 }
604
605 for (lo = 0; lo < 16; ++lo)
606 {
607 snprintf(path, 255, "SpotFit/%02d", lo);
608 FitSpotS[lo] = gnome_config_get_int (path );
609 }
610
611 for (lo = 0; lo < Flags.Spots1; ++lo)
612 {
613 snprintf(path, 255, "Spot_P%02d/longitude", lo);
614 Spot[Primary][lo].longitude = gnome_config_get_float (path );
615 snprintf(path, 255, "Spot_P%02d/latitude", lo);
616 Spot[Primary][lo].latitude = gnome_config_get_float (path );
617 snprintf(path, 255, "Spot_P%02d/radius", lo);
618 Spot[Primary][lo].radius = gnome_config_get_float (path );
619 snprintf(path, 255, "Spot_P%02d/dimfactor", lo);
620 Spot[Primary][lo].dimfactor = gnome_config_get_float (path );
621 }
622
623 for (lo = 0; lo < Flags.Spots2; ++lo)
624 {
625 snprintf(path, 255, "Spot_S%02d/longitude", lo);
626 Spot[Secondary][lo].longitude = gnome_config_get_float (path );
627 snprintf(path, 255, "Spot_S%02d/latitude", lo);
628 Spot[Secondary][lo].latitude = gnome_config_get_float (path );
629 snprintf(path, 255, "Spot_S%02d/radius", lo);
630 Spot[Secondary][lo].radius = gnome_config_get_float (path );
631 snprintf(path, 255, "Spot_S%02d/dimfactor", lo);
632 Spot[Secondary][lo].dimfactor = gnome_config_get_float (path );
633 }
634
635 /* fit flags
636 */
637 for (lo = 0; lo < 64; ++lo)
638 {
639 snprintf(path, 255, "Simplex/%02d", lo);
640 Flags.simplex[lo] = gnome_config_get_int (path );
641 }
642
643
644
645
646 gnome_config_pop_prefix ();
647
648 } else {
649
650 /*get this info from the config*/
651 gnome_config_push_prefix ("nightfall/");
652 Flags.GN_tooltips = gnome_config_get_int ("Options/HaveTooltips=1");
653 Flags.GN_rempos = gnome_config_get_int ("Options/RememberPosition=1");
654 Flags.GN_exitconfirm = gnome_config_get_int ("Options/PromptOnQuit=0");
655 if (Flags.GN_rempos) {
656 os_x = gnome_config_get_int ("Geometry/x=20");
657 os_y = gnome_config_get_int ("Geometry/y=20");
658 /*
659 if (strcmp("de", guess_the_locale() ) == 0)
660 os_w = gnome_config_get_int ("Geometry/w=595");
661 else
662 */
663 os_w = gnome_config_get_int ("Geometry/w=568");
664 os_h = gnome_config_get_int ("Geometry/h=408");
665 }
666
667 gnome_config_pop_prefix();
668
669 }
670
671
672 } else {
673
674 if (Flags.debug[WARN] == ON)
675 printf("**Warning**: GNOME_CLIENT_CONNECTED == FALSE (Gnome not running ?!?)\n");
676 Flags.GN_tooltips = 1;
677 Flags.GN_rempos = 1;
678 Flags.GN_exitconfirm = 0;
679
680 os_w = 568;
681 os_h = 408;
682 os_x = 20;
683 os_y = 20;
684
685 }
686
687 gtk_widget_set_uposition (GTK_WIDGET (top_window), os_x, os_y);
688 gtk_window_set_policy (GTK_WINDOW(top_window), TRUE, TRUE, FALSE);
689
690 #else
691
692 top_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
693 gtk_container_set_border_width(GTK_CONTAINER(top_window), 0);
694 gtk_window_set_title(GTK_WINDOW(top_window), top_title);
695 gtk_widget_realize(top_window);
696
697 /* #ifdef HAVE_GNOME (#else branch) */
698 #endif
699
700
701 /* ----------- connect the exit handler --------------------------- */
702
703 gtk_signal_connect (GTK_OBJECT (top_window), "delete_event",
704 GTK_SIGNAL_FUNC (delete_event), (gpointer) "9");
705
706 /* --------------- set border width of window -------------------- */
707
708 gtk_container_set_border_width (GTK_CONTAINER (top_window), 0);
709
710 /* -------------- initialize tooltips ---------------------------- */
711
712 tooltips = gtk_tooltips_new ();
713 gtk_tooltips_set_delay (tooltips, 1200);
714
715 #ifdef HAVE_GNOME
716 if (! Flags.GN_tooltips)
717 gtk_tooltips_disable( tooltips );
718 #endif
719
720
721 /* >>>>>>>>>>> the main vertical box <<<<<<<<<<<<<<<<<<<<<<<<< */
722
723 box3 = gtk_vbox_new (FALSE, 0);
724
725 #ifdef HAVE_GNOME
726 gnome_app_set_contents(GNOME_APP(top_window), box3);
727 #else
728 gtk_container_add (GTK_CONTAINER (top_window), GTK_WIDGET (box3));
729 #endif
730
731 /* >>>>>>>>>>> the menu bar <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
732
733
734 #ifdef HAVE_GNOME
735 MakeMenu();
736 #else
737 menu_bar = gtk_menu_bar_new();
738 gtk_box_pack_start (GTK_BOX (box3), menu_bar, FALSE, FALSE, 0);
739 MakeMenu(menu_bar);
740 #endif
741
742
743 /* >>>>>>>>>>> the toolbar <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
744
745 #ifdef HAVE_GNOME
746
747 gnome_app_create_toolbar(GNOME_APP(top_window), toolbar);
748 t_anim_button = toolbar[1].widget;
749 if (Flags.animate == ON)
750 gtk_toggle_button_set_active
751 (GTK_TOGGLE_BUTTON (t_anim_button), TRUE);
752
753 #else
754
755 handlebox = gtk_handle_box_new ();
756 gtk_box_pack_start ( GTK_BOX (box3) ,
757 handlebox, FALSE, TRUE, 0 );
758
759 #ifdef USING_GTK2
760 toolbar = gtk_toolbar_new ();
761 #else
762 toolbar = gtk_toolbar_new ( GTK_ORIENTATION_HORIZONTAL,
763 GTK_TOOLBAR_BOTH );
764 #endif
765 gtk_container_set_border_width ( GTK_CONTAINER ( toolbar ) , 0 );
766 #ifndef USING_GTK2
767 gtk_toolbar_set_space_size ( GTK_TOOLBAR ( toolbar ), 309 );
768 #endif
769 gtk_toolbar_set_tooltips(GTK_TOOLBAR(toolbar), TRUE);
770 gtk_container_add ( GTK_CONTAINER ( handlebox ) , toolbar );
771
772 pixmap = create_pixmap(top_window, mcomp_xpm);
773 if (pixmap)
774 gtk_toolbar_append_item ( GTK_TOOLBAR (toolbar),
775 _("Compute"),
776 _("Compute a synthetic lightcurve w/ current options"),
777 NULL,
778 pixmap,
779 GTK_SIGNAL_FUNC (lightcurve_event),
780 NULL );
781
782 pixmap = create_pixmap(top_window, manim_xpm);
783 if (pixmap) {
784 t_anim_button = gtk_toolbar_append_element ( GTK_TOOLBAR (toolbar),
785 GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
786 NULL,
787 _("Animate"),
788 _("Toggle animated view of binary during lightcurve computation"),
789 NULL,
790 pixmap,
791 GTK_SIGNAL_FUNC (toggle_animate),
792 NULL );
793
794 if (Flags.animate == ON)
795 gtk_toggle_button_set_active
796 (GTK_TOGGLE_BUTTON (t_anim_button), TRUE);
797 }
798
799 pixmap = create_pixmap(top_window, mplot_xpm);
800 if (pixmap)
801 gtk_toolbar_append_item ( GTK_TOOLBAR (toolbar),
802 _("Plot"),
803 _("Plot computed lightcurve"),
804 NULL,
805 pixmap,
806 GTK_SIGNAL_FUNC (lightcurveplot_event),
807 NULL );
808
809 gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
810
811 pixmap = create_pixmap(top_window, mhelp_xpm);
812 if (pixmap)
813 gtk_toolbar_append_item ( GTK_TOOLBAR (toolbar),
814 _("Info"),
815 _("Help on the active notebook page"),
816 NULL,
817 pixmap,
818 GTK_SIGNAL_FUNC (help_event),
819 NULL );
820
821 gtk_widget_show ( toolbar );
822 gtk_widget_show (handlebox);
823
824 #endif
825
826
827 /* >>>>>>>>>>> the notebook <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
828
829
830 box4 = gtk_hbox_new (TRUE, 0);
831 gtk_box_pack_start (GTK_BOX (box3), box4, FALSE, FALSE, 5);
832 gtk_widget_show (box4);
833
834
835 box4 = gtk_vbox_new (FALSE, 0);
836 gtk_box_pack_start (GTK_BOX (box3), box4, FALSE, FALSE, 0);
837
838 /* --------------- initialize notebook ------------------------ */
839
840 notebook = gtk_notebook_new ();
841 gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP);
842
843
844 gtk_box_pack_start (GTK_BOX (box4), notebook, FALSE, FALSE, 0);
845
846 gtk_widget_show(notebook);
847 gtk_widget_show(box4);
848
849 /* --------------- First Page ----------------------------------- */
850
851 label = gtk_label_new (_("Basic"));
852 box1 = gtk_hbox_new (TRUE, 0);
853 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), box1, label);
854 /* gtk_container_add (GTK_CONTAINER (top_window), box1); */
855 gtk_widget_show (label);
856 gtk_widget_show (box1);
857
858 /* -------------------------------------------------------------- */
859 /* the first vertical box holds a table with entry fields */
860 /* for the numerical arguments */
861 /* -------------------------------------------------------------- */
862
863 box2 = gtk_vbox_new (FALSE, 0);
864 gtk_container_set_border_width (GTK_CONTAINER (box2), 0);
865 gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
866 gtk_widget_show (box2);
867
868 table = gtk_table_new (8, 4, TRUE);
869
870 e_101 = gtk_entry_new_with_max_length (10);
871 gtk_signal_connect(GTK_OBJECT(e_101), "changed",
872 GTK_SIGNAL_FUNC(enter_massratio),
873 e_101);
874 snprintf(InitString, sizeof(InitString), "%8.5f", Binary[Primary].Mq);
875 gtk_entry_set_text (GTK_ENTRY (e_101), InitString);
876 gtk_entry_select_region (GTK_ENTRY (e_101),
877 0, GTK_ENTRY(e_101)->text_length);
878 gtk_table_attach (GTK_TABLE(table), e_101, 1, 2, 1, 2,
879 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
880 gtk_widget_show (e_101);
881
882
883 if (Flags.edu != ON)
884 {
885 button = gtk_toggle_button_new_with_label (_("Mass Ratio:"));
886 if (Flags.simplex[0] == ON)
887 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
888 gtk_signal_connect (GTK_OBJECT (button), "toggled",
889 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "0");
890 gtk_tooltips_set_tip (tooltips, button,
891 _("Toggle CONST/FIT for Mass Ratio"),
892 NULL);
893 }
894 else
895 {
896 button = gtk_label_new (_("Mass Ratio:"));
897 }
898 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 1, 2,
899 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
900 gtk_widget_show (button);
901
902
903 e_102 = gtk_entry_new_with_max_length (10);
904 gtk_signal_connect(GTK_OBJECT(e_102), "changed",
905 GTK_SIGNAL_FUNC(enter_inclination),
906 e_102);
907 snprintf(InitString, sizeof(InitString), "%8.5f", RTOD*Orbit.Inclination);
908 gtk_entry_set_text (GTK_ENTRY (e_102), InitString);
909 gtk_entry_select_region (GTK_ENTRY (e_102),
910 0, GTK_ENTRY(e_102)->text_length);
911 gtk_table_attach (GTK_TABLE(table), e_102, 3, 4, 1, 2,
912 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
913 gtk_widget_show (e_102);
914
915 if (Flags.edu != ON)
916 {
917 button = gtk_toggle_button_new_with_label (_("Inclination:"));
918 if (Flags.simplex[1] == ON)
919 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
920 gtk_signal_connect (GTK_OBJECT (button), "toggled",
921 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "1");
922 gtk_tooltips_set_tip (tooltips, button,
923 _("Toggle CONST/FIT for Inclination"),
924 NULL);
925 }
926 else
927 {
928 button = gtk_label_new (_("Inclination:"));
929 }
930 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 1, 2,
931 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
932 gtk_widget_show (button);
933
934 if (Flags.edu == ON)
935 {
936 DefineParam(Primary);
937 DefineParam(Secondary);
938 }
939
940 e_103 = gtk_entry_new_with_max_length (16);
941 gtk_signal_connect(GTK_OBJECT(e_103), "changed",
942 GTK_SIGNAL_FUNC(enter_rochefill1),
943 e_103);
944 if (Flags.edu != ON)
945 {
946 snprintf(InitString, sizeof(InitString), "%8.5f", Binary[Primary].RocheFill);
947 }
948 else
949 {
950 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Primary].Radius * PERIDIST / SOL_RADIUS);
951 }
952 gtk_entry_set_text (GTK_ENTRY (e_103), InitString);
953 gtk_entry_select_region (GTK_ENTRY (e_103),
954 0, GTK_ENTRY(e_103)->text_length);
955 gtk_table_attach (GTK_TABLE(table), e_103, 1, 2, 3, 4,
956 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
957 gtk_widget_show (e_103);
958
959 if (Flags.edu != ON)
960 {
961 button = gtk_toggle_button_new_with_label (_("Fill Factor (P):"));
962 if (Flags.simplex[2] == ON)
963 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
964 gtk_signal_connect (GTK_OBJECT (button), "toggled",
965 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "2");
966 gtk_tooltips_set_tip (tooltips, button,
967 _("Toggle CONST/FIT for Primary Roche Fill Factor"),
968 NULL);
969 }
970 else
971 {
972 button = gtk_label_new (_("Radius (P):"));
973 }
974 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 3, 4,
975 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
976 gtk_widget_show (button);
977
978
979 e_104 = gtk_entry_new_with_max_length (16);
980 gtk_signal_connect(GTK_OBJECT(e_104), "changed",
981 GTK_SIGNAL_FUNC(enter_rochefill2),
982 e_104);
983 if (Flags.edu != ON)
984 {
985 snprintf(InitString, sizeof(InitString), "%8.5f", Binary[Secondary].RocheFill);
986 }
987 else
988 {
989 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Secondary].Radius * PERIDIST / SOL_RADIUS);
990 }
991 gtk_entry_set_text (GTK_ENTRY (e_104), InitString);
992 gtk_entry_select_region (GTK_ENTRY (e_104),
993 0, GTK_ENTRY(e_104)->text_length);
994 gtk_table_attach (GTK_TABLE(table), e_104, 3, 4, 3, 4,
995 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
996 gtk_widget_show (e_104);
997
998 if (Flags.edu != ON)
999 {
1000 button = gtk_toggle_button_new_with_label (_("Fill Factor (S):"));
1001 if (Flags.simplex[3] == ON)
1002 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
1003 gtk_signal_connect (GTK_OBJECT (button), "toggled",
1004 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "3");
1005 gtk_tooltips_set_tip(tooltips, button,
1006 _("Toggle CONST/FIT for Secondary Roche Fill Factor"),
1007 NULL);
1008 }
1009 else
1010 {
1011 button = gtk_label_new (_("Radius (S):"));
1012 }
1013 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 3, 4,
1014 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1015 gtk_widget_show (button);
1016
1017
1018
1019 e_105 = gtk_entry_new_with_max_length (10);
1020 gtk_signal_connect(GTK_OBJECT(e_105), "changed",
1021 GTK_SIGNAL_FUNC(enter_temp1),
1022 e_105);
1023 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Primary].Temperature);
1024 gtk_entry_set_text (GTK_ENTRY (e_105), InitString);
1025 if (Flags.edu != ON)
1026 gtk_entry_select_region (GTK_ENTRY (e_105),
1027 0, GTK_ENTRY(e_105)->text_length);
1028 gtk_table_attach (GTK_TABLE(table), e_105, 1, 2, 5, 6,
1029 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1030 if (Flags.edu == ON)
1031 gtk_entry_set_editable(GTK_ENTRY (e_105), FALSE);
1032 gtk_widget_show (e_105);
1033
1034 if (Flags.edu != ON)
1035 {
1036 button = gtk_toggle_button_new_with_label (_("Temperature (P):"));
1037 if (Flags.simplex[4] == ON)
1038 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
1039 gtk_signal_connect (GTK_OBJECT (button), "toggled",
1040 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "4");
1041 gtk_tooltips_set_tip (tooltips, button,
1042 _("Toggle CONST/FIT for Primary Temperature"),NULL);
1043 }
1044 else
1045 {
1046 button = gtk_label_new (_("Temperature (P):"));
1047 }
1048 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 5, 6,
1049 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1050 gtk_widget_show (button);
1051
1052
1053 e_106 = gtk_entry_new_with_max_length (10);
1054 gtk_signal_connect(GTK_OBJECT(e_106), "changed",
1055 GTK_SIGNAL_FUNC(enter_temp2),
1056 e_106);
1057 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Secondary].Temperature);
1058 gtk_entry_set_text (GTK_ENTRY (e_106), InitString);
1059 gtk_entry_select_region (GTK_ENTRY (e_106),
1060 0, GTK_ENTRY(e_106)->text_length);
1061 gtk_table_attach (GTK_TABLE(table), e_106, 3, 4, 5, 6,
1062 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1063 gtk_widget_show (e_106);
1064
1065 if (Flags.edu != ON)
1066 {
1067 button = gtk_toggle_button_new_with_label (_("Temperature (S):"));
1068 if (Flags.simplex[5] == ON)
1069 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
1070 gtk_signal_connect (GTK_OBJECT (button), "toggled",
1071 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "5");
1072 gtk_tooltips_set_tip (tooltips, button,
1073 _("Toggle CONST/FIT for Secondary Temperature"),
1074 NULL);
1075 }
1076 else
1077 {
1078 button = gtk_label_new (_("Temperature (S):"));
1079 }
1080 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 5, 6,
1081 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1082 gtk_widget_show (button);
1083
1084 if (Flags.edu == ON)
1085 {
1086 button = gtk_button_new_with_label (_("Reset"));
1087 gtk_signal_connect (GTK_OBJECT (button), "clicked",
1088 GTK_SIGNAL_FUNC (reset_params), (gpointer) "reset");
1089 gtk_tooltips_set_tip (tooltips, button,
1090 _("Resert all parameters to default"),
1091 NULL);
1092 gtk_table_attach (GTK_TABLE(table), button, 3, 4, 7, 8,
1093 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1094 gtk_widget_show (button);
1095
1096 goto skipped_termout;
1097 }
1098
1099 label = gtk_label_new (_("Terminal Output:"));
1100 gtk_table_attach (GTK_TABLE(table), label, 0, 1, 7, 8,
1101 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1102 gtk_widget_show (label);
1103
1104 button = gtk_check_button_new_with_label (_("Warning"));
1105 if (Flags.debug[WARN] == ON)
1106 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
1107 gtk_signal_connect (GTK_OBJECT (button), "toggled",
1108 GTK_SIGNAL_FUNC (toggle_debug), (gpointer) "1");
1109 gtk_tooltips_set_tip (tooltips, button,
1110 _("Toggle output of warnings"),NULL);
1111 gtk_table_attach (GTK_TABLE(table), button, 1, 2, 7, 8,
1112 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1113 gtk_widget_show (button);
1114
1115 button = gtk_check_button_new_with_label (_("Verbose"));
1116 if (Flags.debug[VERBOSE] == ON)
1117 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
1118 gtk_signal_connect (GTK_OBJECT (button), "toggled",
1119 GTK_SIGNAL_FUNC (toggle_debug), (gpointer) "3");
1120 gtk_tooltips_set_tip (tooltips, button,
1121 _("Toggle verbose output"),NULL);
1122 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 7, 8,
1123 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1124 gtk_widget_show (button);
1125
1126 button = gtk_check_button_new_with_label (_("Busy"));
1127 if (Flags.debug[BUSY] == ON)
1128 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
1129 gtk_signal_connect (GTK_OBJECT (button), "toggled",
1130 GTK_SIGNAL_FUNC (toggle_debug), (gpointer) "2");
1131 gtk_tooltips_set_tip (tooltips, button,
1132 _("Toggle status output"),NULL);
1133 gtk_table_attach (GTK_TABLE(table), button, 3, 4, 7, 8,
1134 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1135 gtk_widget_show (button);
1136
1137 skipped_termout:
1138
1139 gtk_widget_show (table);
1140 gtk_box_pack_start (GTK_BOX (box2), table, FALSE, FALSE, 0);
1141
1142 #ifdef HAVE_DISK
1143
1144 if (Flags.edu == ON)
1145 goto disk_skipped;
1146
1147 /* --------------- Disk Page ----------------------------------- */
1148
1149 label = gtk_label_new (_("Disk"));
1150 box1 = gtk_hbox_new (TRUE, 0);
1151 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), box1, label);
1152 /* gtk_container_add (GTK_CONTAINER (top_window), box1); */
1153 gtk_widget_show (label);
1154 gtk_widget_show (box1);
1155
1156 /*-------------------- Disk stuff ------------------------------*/
1157
1158 box2 = gtk_vbox_new (FALSE, 0);
1159 gtk_container_set_border_width (GTK_CONTAINER (box2), 0);
1160 gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
1161 gtk_widget_show (box2);
1162
1163 table = gtk_table_new (8, 4, TRUE);
1164
1165
1166 t_disk_button =
1167 gtk_check_button_new_with_label (_("Accretion Disk"));
1168 if (Flags.disk == ON)
1169 gtk_toggle_button_set_active
1170 (GTK_TOGGLE_BUTTON (t_disk_button), TRUE);
1171 gtk_signal_connect (GTK_OBJECT (t_disk_button), "toggled",
1172 GTK_SIGNAL_FUNC (toggle_disk), NULL );
1173 gtk_tooltips_set_tip (tooltips, t_disk_button,
1174 _("Switch on accretion disk"), NULL);
1175 gtk_table_attach (GTK_TABLE(table), t_disk_button, 0, 2, 0, 1,
1176 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1177 gtk_widget_show (t_disk_button);
1178
1179 /* outer radius */
1180
1181 e_114 = gtk_entry_new_with_max_length (10);
1182 gtk_signal_connect(GTK_OBJECT(e_114), "changed",
1183 GTK_SIGNAL_FUNC(enter_odiskrad),
1184 e_114);
1185 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].Rout);
1186 gtk_entry_set_text (GTK_ENTRY (e_114), InitString);
1187 gtk_entry_select_region (GTK_ENTRY (e_114),
1188 0, GTK_ENTRY(e_114)->text_length);
1189 gtk_table_attach (GTK_TABLE(table), e_114, 1, 2, 1, 2,
1190 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1191 if (Flags.disk == ON)
1192 gtk_widget_show (e_114);
1193
1194
1195 orad_label = gtk_toggle_button_new_with_label (_("Outer Radius:"));
1196 if (Flags.simplex[40] == ON)
1197 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (orad_label), TRUE);
1198 gtk_signal_connect (GTK_OBJECT (orad_label), "toggled",
1199 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "40");
1200 gtk_tooltips_set_tip (tooltips, orad_label,
1201 _("Toggle CONST/FIT for Outer Radius"),
1202 NULL);
1203 gtk_table_attach (GTK_TABLE(table), orad_label, 0, 1, 1, 2,
1204 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1205 if (Flags.disk == ON)
1206 gtk_widget_show (orad_label);
1207
1208 /* inner radius */
1209
1210 e_115 = gtk_entry_new_with_max_length (10);
1211 gtk_signal_connect(GTK_OBJECT(e_115), "changed",
1212 GTK_SIGNAL_FUNC(enter_idiskrad),
1213 e_115);
1214 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].Rin);
1215 gtk_entry_set_text (GTK_ENTRY (e_115), InitString);
1216 gtk_entry_select_region (GTK_ENTRY (e_115),
1217 0, GTK_ENTRY(e_115)->text_length);
1218 gtk_table_attach (GTK_TABLE(table), e_115, 3, 4, 1, 2,
1219 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1220 if (Flags.disk == ON)
1221 gtk_widget_show (e_115);
1222
1223
1224 irad_label = gtk_toggle_button_new_with_label (_("Inner Radius:"));
1225 if (Flags.simplex[41] == ON)
1226 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (irad_label), TRUE);
1227 gtk_signal_connect (GTK_OBJECT (irad_label), "toggled",
1228 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "41");
1229 gtk_tooltips_set_tip (tooltips, irad_label,
1230 _("Toggle CONST/FIT for Inner Radius"),
1231 NULL);
1232 gtk_table_attach (GTK_TABLE(table), irad_label, 2, 3, 1, 2,
1233 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1234 if (Flags.disk == ON)
1235 gtk_widget_show (irad_label);
1236
1237 /* disk tilt */
1238
1239 e_116 = gtk_entry_new_with_max_length (10);
1240 gtk_signal_connect(GTK_OBJECT(e_116), "changed",
1241 GTK_SIGNAL_FUNC(enter_disktilt),
1242 e_116);
1243 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].Tilt);
1244 gtk_entry_set_text (GTK_ENTRY (e_116), InitString);
1245 gtk_entry_select_region (GTK_ENTRY (e_116),
1246 0, GTK_ENTRY(e_116)->text_length);
1247 #if 0
1248 gtk_table_attach (GTK_TABLE(table), e_116, 1, 2, 2, 3,
1249 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1250 if (Flags.disk == ON)
1251 gtk_widget_show (e_116);
1252 #endif
1253
1254 tilt_label = gtk_label_new (_("Inclination:"));
1255 #if 0
1256 gtk_table_attach (GTK_TABLE(table), tilt_label, 0, 1, 2, 3,
1257 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1258 if (Flags.disk == ON)
1259 gtk_widget_show (tilt_label);
1260 #endif
1261
1262 /* disk thickness */
1263
1264 e_118 = gtk_entry_new_with_max_length (10);
1265 gtk_signal_connect(GTK_OBJECT(e_118), "changed",
1266 GTK_SIGNAL_FUNC(enter_diskthick),
1267 e_118);
1268 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].Thick);
1269 gtk_entry_set_text (GTK_ENTRY (e_118), InitString);
1270 gtk_entry_select_region (GTK_ENTRY (e_118),
1271 0, GTK_ENTRY(e_118)->text_length);
1272 gtk_table_attach (GTK_TABLE(table), e_118, 3, 4, 2, 3,
1273 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1274 if (Flags.disk == ON)
1275 gtk_widget_show (e_118);
1276
1277
1278 thick_label = gtk_toggle_button_new_with_label (_("Thickness:"));
1279 if (Flags.simplex[42] == ON)
1280 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (thick_label), TRUE);
1281 gtk_signal_connect (GTK_OBJECT (thick_label), "toggled",
1282 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "42");
1283 gtk_tooltips_set_tip (tooltips, thick_label,
1284 _("Toggle CONST/FIT for Thickness"),
1285 NULL);
1286 gtk_table_attach (GTK_TABLE(table), thick_label, 2, 3, 2, 3,
1287 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1288 if (Flags.disk == ON)
1289 gtk_widget_show (thick_label);
1290
1291 /* disk H/R */
1292
1293 e_119 = gtk_entry_new_with_max_length (10);
1294 gtk_signal_connect(GTK_OBJECT(e_119), "changed",
1295 GTK_SIGNAL_FUNC(enter_diskhr),
1296 e_119);
1297 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].HR);
1298 gtk_entry_set_text (GTK_ENTRY (e_119), InitString);
1299 gtk_entry_select_region (GTK_ENTRY (e_119),
1300 0, GTK_ENTRY(e_119)->text_length);
1301 gtk_table_attach (GTK_TABLE(table), e_119, 1, 2, 3, 4,
1302 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1303 if (Flags.disk == ON)
1304 gtk_widget_show (e_119);
1305
1306
1307 hr_label = gtk_toggle_button_new_with_label (_("H/R:"));
1308 if (Flags.simplex[43] == ON)
1309 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hr_label), TRUE);
1310 gtk_signal_connect (GTK_OBJECT (hr_label), "toggled",
1311 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "43");
1312 gtk_tooltips_set_tip (tooltips, hr_label,
1313 _("Toggle CONST/FIT for H/R"),
1314 NULL);
1315 gtk_table_attach (GTK_TABLE(table), hr_label, 0, 1, 3, 4,
1316 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1317 if (Flags.disk == ON)
1318 gtk_widget_show (hr_label);
1319
1320 /* disk temperature */
1321
1322 e_120 = gtk_entry_new_with_max_length (10);
1323 gtk_signal_connect(GTK_OBJECT(e_120), "changed",
1324 GTK_SIGNAL_FUNC(enter_disktemp),
1325 e_120);
1326 gtk_tooltips_set_tip (tooltips, e_120,
1327 _("Effective temperature of the accretion disk"), NULL);
1328 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].Temperature);
1329 gtk_entry_set_text (GTK_ENTRY (e_120), InitString);
1330 gtk_entry_select_region (GTK_ENTRY (e_120),
1331 0, GTK_ENTRY(e_120)->text_length);
1332 gtk_table_attach (GTK_TABLE(table), e_120, 1, 2, 2, 3,
1333 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1334 if (Flags.disk == ON)
1335 gtk_widget_show (e_120);
1336
1337
1338 disktmp_label = gtk_toggle_button_new_with_label (_("Temperature:"));
1339 if (Flags.simplex[44] == ON)
1340 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (disktmp_label), TRUE);
1341 gtk_signal_connect (GTK_OBJECT (disktmp_label), "toggled",
1342 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "44");
1343 gtk_tooltips_set_tip (tooltips, disktmp_label,
1344 _("Toggle CONST/FIT for Temperature"),
1345 NULL);
1346 gtk_table_attach (GTK_TABLE(table), disktmp_label, 0, 1, 2, 3,
1347 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1348 if (Flags.disk == ON)
1349 gtk_widget_show (disktmp_label);
1350
1351
1352 /* --------------- Hot spot ------------------------------ */
1353
1354 /* Temperature */
1355
1356 e_130 = gtk_entry_new_with_max_length (10);
1357 gtk_signal_connect(GTK_OBJECT(e_130), "changed",
1358 GTK_SIGNAL_FUNC(enter_hs_temp),
1359 e_130);
1360 gtk_tooltips_set_tip (tooltips, e_130,
1361 _("Effective temperature of the hot spot"), NULL);
1362 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].tempHS);
1363 gtk_entry_set_text (GTK_ENTRY (e_130), InitString);
1364 gtk_entry_select_region (GTK_ENTRY (e_130),
1365 0, GTK_ENTRY(e_130)->text_length);
1366 gtk_table_attach (GTK_TABLE(table), e_130, 1, 2, 4, 5,
1367 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1368 if (Flags.disk == ON)
1369 gtk_widget_show (e_130);
1370
1371
1372 hs_temp_label = gtk_toggle_button_new_with_label (_("T (hot spot):"));
1373 if (Flags.simplex[45] == ON)
1374 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hs_temp_label), TRUE);
1375 gtk_signal_connect (GTK_OBJECT (hs_temp_label), "toggled",
1376 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "45");
1377 gtk_tooltips_set_tip (tooltips, hs_temp_label,
1378 _("Toggle CONST/FIT for T (hot spot)"),
1379 NULL);
1380 gtk_table_attach (GTK_TABLE(table), hs_temp_label, 0, 1, 4, 5,
1381 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1382 if (Flags.disk == ON)
1383 gtk_widget_show (hs_temp_label);
1384
1385 /* Puff */
1386
1387 e_134 = gtk_entry_new_with_max_length (10);
1388 gtk_signal_connect(GTK_OBJECT(e_134), "changed",
1389 GTK_SIGNAL_FUNC(enter_hs_puff),
1390 e_134);
1391 gtk_tooltips_set_tip (tooltips, e_134,
1392 _("Puffyness of the hot spot"), NULL);
1393 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].puffHS);
1394 gtk_entry_set_text (GTK_ENTRY (e_134), InitString);
1395 gtk_entry_select_region (GTK_ENTRY (e_134),
1396 0, GTK_ENTRY(e_134)->text_length);
1397 gtk_table_attach (GTK_TABLE(table), e_134, 3, 4, 3, 4,
1398 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1399 if (Flags.disk == ON)
1400 gtk_widget_show (e_134);
1401
1402
1403 hs_puff_label = gtk_toggle_button_new_with_label (_("Puff (hot spot):"));
1404 if (Flags.simplex[49] == ON)
1405 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hs_puff_label), TRUE);
1406 gtk_signal_connect (GTK_OBJECT (hs_puff_label), "toggled",
1407 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "49");
1408 gtk_tooltips_set_tip (tooltips, hs_puff_label,
1409 _("Toggle CONST/FIT for Puff (hot spot)"),
1410 NULL);
1411 gtk_table_attach (GTK_TABLE(table), hs_puff_label, 2, 3, 3, 4,
1412 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1413 if (Flags.disk == ON)
1414 gtk_widget_show (hs_puff_label);
1415
1416 /* Longitude */
1417
1418 e_131 = gtk_entry_new_with_max_length (10);
1419 gtk_signal_connect(GTK_OBJECT(e_131), "changed",
1420 GTK_SIGNAL_FUNC(enter_hs_longitude),
1421 e_131);
1422 gtk_tooltips_set_tip (tooltips, e_131,
1423 _("Longitude of the hot spot"), NULL);
1424 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].longitudeHS);
1425 gtk_entry_set_text (GTK_ENTRY (e_131), InitString);
1426 gtk_entry_select_region (GTK_ENTRY (e_131),
1427 0, GTK_ENTRY(e_131)->text_length);
1428 gtk_table_attach (GTK_TABLE(table), e_131, 3, 4, 4, 5,
1429 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1430 if (Flags.disk == ON)
1431 gtk_widget_show (e_131);
1432
1433
1434 hs_longitude_label = gtk_toggle_button_new_with_label (_("Longitude (hot spot):"));
1435 if (Flags.simplex[46] == ON)
1436 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hs_longitude_label), TRUE);
1437 gtk_signal_connect (GTK_OBJECT (hs_longitude_label), "toggled",
1438 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "46");
1439 gtk_tooltips_set_tip (tooltips, hs_longitude_label,
1440 _("Toggle CONST/FIT for Longitude (hot spot)"),
1441 NULL);
1442 gtk_table_attach (GTK_TABLE(table), hs_longitude_label, 2, 3, 4, 5,
1443 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1444 if (Flags.disk == ON)
1445 gtk_widget_show (hs_longitude_label);
1446
1447 /* Extent */
1448
1449 e_132 = gtk_entry_new_with_max_length (10);
1450 gtk_signal_connect(GTK_OBJECT(e_132), "changed",
1451 GTK_SIGNAL_FUNC(enter_hs_extent),
1452 e_132);
1453 gtk_tooltips_set_tip (tooltips, e_132,
1454 _("Extent of the hot spot"), NULL);
1455 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].extentHS);
1456 gtk_entry_set_text (GTK_ENTRY (e_132), InitString);
1457 gtk_entry_select_region (GTK_ENTRY (e_132),
1458 0, GTK_ENTRY(e_132)->text_length);
1459 gtk_table_attach (GTK_TABLE(table), e_132, 1, 2, 5, 6,
1460 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1461 if (Flags.disk == ON)
1462 gtk_widget_show (e_132);
1463
1464
1465 hs_extent_label = gtk_toggle_button_new_with_label (_("Extent (hot spot):"));
1466 if (Flags.simplex[47] == ON)
1467 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hs_extent_label), TRUE);
1468 gtk_signal_connect (GTK_OBJECT (hs_extent_label), "toggled",
1469 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "47");
1470 gtk_tooltips_set_tip (tooltips, hs_extent_label,
1471 _("Toggle CONST/FIT for Extent (hot spot)"),
1472 NULL);
1473 gtk_table_attach (GTK_TABLE(table), hs_extent_label, 0, 1, 5, 6,
1474 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1475 if (Flags.disk == ON)
1476 gtk_widget_show (hs_extent_label);
1477
1478 /* Depth */
1479
1480 e_133 = gtk_entry_new_with_max_length (10);
1481 gtk_signal_connect(GTK_OBJECT(e_133), "changed",
1482 GTK_SIGNAL_FUNC(enter_hs_depth),
1483 e_133);
1484 gtk_tooltips_set_tip (tooltips, e_133,
1485 _("Depth of the hot spot"), NULL);
1486 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].depthHS);
1487 gtk_entry_set_text (GTK_ENTRY (e_133), InitString);
1488 gtk_entry_select_region (GTK_ENTRY (e_133),
1489 0, GTK_ENTRY(e_133)->text_length);
1490 gtk_table_attach (GTK_TABLE(table), e_133, 3, 4, 5, 6,
1491 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1492 if (Flags.disk == ON)
1493 gtk_widget_show (e_133);
1494
1495
1496 hs_depth_label = gtk_toggle_button_new_with_label (_("Depth (hot spot):"));
1497 if (Flags.simplex[48] == ON)
1498 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hs_depth_label), TRUE);
1499 gtk_signal_connect (GTK_OBJECT (hs_depth_label), "toggled",
1500 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "48");
1501 gtk_tooltips_set_tip (tooltips, hs_depth_label,
1502 _("Toggle CONST/FIT for Depth (hot spot)"),
1503 NULL);
1504 gtk_table_attach (GTK_TABLE(table), hs_depth_label, 2, 3, 5, 6,
1505 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1506 if (Flags.disk == ON)
1507 gtk_widget_show (hs_depth_label);
1508
1509
1510 /* --------------- Warp ------------------------------ */
1511
1512 /* Maximum */
1513
1514 e_140 = gtk_entry_new_with_max_length (10);
1515 gtk_signal_connect(GTK_OBJECT(e_140), "changed",
1516 GTK_SIGNAL_FUNC(enter_warp_max),
1517 e_140);
1518 gtk_tooltips_set_tip (tooltips, e_140,
1519 _("Maximum inclination of warp"), NULL);
1520 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].maxWarp);
1521 gtk_entry_set_text (GTK_ENTRY (e_140), InitString);
1522 gtk_entry_select_region (GTK_ENTRY (e_140),
1523 0, GTK_ENTRY(e_140)->text_length);
1524 gtk_table_attach (GTK_TABLE(table), e_140, 1, 2, 6, 7,
1525 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1526 if (Flags.disk == ON)
1527 gtk_widget_show (e_140);
1528
1529
1530 wp_max_label = gtk_toggle_button_new_with_label (_("Warp maximum:"));
1531 if (Flags.simplex[50] == ON)
1532 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wp_max_label), TRUE);
1533 gtk_signal_connect (GTK_OBJECT (wp_max_label), "toggled",
1534 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "50");
1535 gtk_tooltips_set_tip (tooltips, wp_max_label,
1536 _("Toggle CONST/FIT for warp maximum"),
1537 NULL);
1538 gtk_table_attach (GTK_TABLE(table), wp_max_label, 0, 1, 6, 7,
1539 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1540 if (Flags.disk == ON)
1541 gtk_widget_show (wp_max_label);
1542
1543 /* Longitude */
1544
1545 e_141 = gtk_entry_new_with_max_length (10);
1546 gtk_signal_connect(GTK_OBJECT(e_141), "changed",
1547 GTK_SIGNAL_FUNC(enter_warp_longitude),
1548 e_141);
1549 gtk_tooltips_set_tip (tooltips, e_141,
1550 _("Longitude of warp"), NULL);
1551 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].longitudeWarp);
1552 gtk_entry_set_text (GTK_ENTRY (e_141), InitString);
1553 gtk_entry_select_region (GTK_ENTRY (e_141),
1554 0, GTK_ENTRY(e_141)->text_length);
1555 gtk_table_attach (GTK_TABLE(table), e_141, 3, 4, 6, 7,
1556 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1557 if (Flags.disk == ON)
1558 gtk_widget_show (e_141);
1559
1560
1561 wp_longitude_label = gtk_toggle_button_new_with_label (_("Warp longitude:"));
1562 if (Flags.simplex[51] == ON)
1563 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wp_longitude_label), TRUE);
1564 gtk_signal_connect (GTK_OBJECT (wp_longitude_label), "toggled",
1565 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "51");
1566 gtk_tooltips_set_tip (tooltips, wp_longitude_label,
1567 _("Toggle CONST/FIT for warp longitude"),
1568 NULL);
1569 gtk_table_attach (GTK_TABLE(table), wp_longitude_label, 2, 3, 6, 7,
1570 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1571 if (Flags.disk == ON)
1572 gtk_widget_show (wp_longitude_label);
1573
1574 /* Width */
1575
1576 e_142 = gtk_entry_new_with_max_length (10);
1577 gtk_signal_connect(GTK_OBJECT(e_142), "changed",
1578 GTK_SIGNAL_FUNC(enter_warp_width),
1579 e_142);
1580 gtk_tooltips_set_tip (tooltips, e_142,
1581 _("Width of warp"), NULL);
1582 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].widthWarp);
1583 gtk_entry_set_text (GTK_ENTRY (e_142), InitString);
1584 gtk_entry_select_region (GTK_ENTRY (e_142),
1585 0, GTK_ENTRY(e_142)->text_length);
1586 gtk_table_attach (GTK_TABLE(table), e_142, 1, 2, 7, 8,
1587 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1588 if (Flags.disk == ON)
1589 gtk_widget_show (e_142);
1590
1591
1592 wp_width_label = gtk_toggle_button_new_with_label (_("Warp width:"));
1593 if (Flags.simplex[52] == ON)
1594 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wp_width_label), TRUE);
1595 gtk_signal_connect (GTK_OBJECT (wp_width_label), "toggled",
1596 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "52");
1597 gtk_tooltips_set_tip (tooltips, wp_width_label,
1598 _("Toggle CONST/FIT for warp width"),
1599 NULL);
1600 gtk_table_attach (GTK_TABLE(table), wp_width_label, 0, 1, 7, 8,
1601 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1602 if (Flags.disk == ON)
1603 gtk_widget_show (wp_width_label);
1604
1605 /* Centre */
1606
1607 e_143 = gtk_entry_new_with_max_length (10);
1608 gtk_signal_connect(GTK_OBJECT(e_143), "changed",
1609 GTK_SIGNAL_FUNC(enter_warp_centre),
1610 e_143);
1611 gtk_tooltips_set_tip (tooltips, e_143,
1612 _("Centre of warp"), NULL);
1613 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].centreWarp);
1614 gtk_entry_set_text (GTK_ENTRY (e_143), InitString);
1615 gtk_entry_select_region (GTK_ENTRY (e_143),
1616 0, GTK_ENTRY(e_143)->text_length);
1617 gtk_table_attach (GTK_TABLE(table), e_143, 3, 4, 7, 8,
1618 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1619 if (Flags.disk == ON)
1620 gtk_widget_show (e_143);
1621
1622
1623 wp_centre_label = gtk_toggle_button_new_with_label (_("Warp centre:"));
1624 if (Flags.simplex[53] == ON)
1625 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wp_centre_label), TRUE);
1626 gtk_signal_connect (GTK_OBJECT (wp_centre_label), "toggled",
1627 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "53");
1628 gtk_tooltips_set_tip (tooltips, wp_centre_label,
1629 _("Toggle CONST/FIT for warp centre"),
1630 NULL);
1631 gtk_table_attach (GTK_TABLE(table), wp_centre_label, 2, 3, 7, 8,
1632 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1633 if (Flags.disk == ON)
1634 gtk_widget_show (wp_centre_label);
1635
1636 /* --------------- Disk model ------------------------------ */
1637
1638 td_button_0 = gtk_radio_button_new_with_label (NULL, _("simple"));
1639 if (Flags.tdisk == 0)
1640 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (td_button_0), TRUE);
1641 gtk_signal_connect (GTK_OBJECT (td_button_0), "toggled",
1642 GTK_SIGNAL_FUNC (radio_tdisk), (gpointer) "0");
1643 gtk_table_attach (GTK_TABLE(table), td_button_0, 1, 2, 0, 1,
1644 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1645 if (Flags.disk == ON)
1646 gtk_widget_show (td_button_0);
1647
1648 group = gtk_radio_button_group (GTK_RADIO_BUTTON (td_button_0));
1649
1650 td_button_1 = gtk_radio_button_new_with_label (group, _("isothermal"));
1651 if (Flags.tdisk == 1)
1652 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (td_button_1), TRUE);
1653 gtk_signal_connect (GTK_OBJECT (td_button_1), "toggled",
1654 GTK_SIGNAL_FUNC (radio_tdisk), (gpointer) "1");
1655 gtk_table_attach (GTK_TABLE(table), td_button_1, 2, 3, 0, 1,
1656 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1657 if (Flags.disk == ON)
1658 gtk_widget_show (td_button_1);
1659
1660 group = gtk_radio_button_group (GTK_RADIO_BUTTON (td_button_1));
1661
1662 td_button_2 = gtk_radio_button_new_with_label (group, _("reprocessing"));
1663 if (Flags.tdisk == 2)
1664 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (td_button_2), TRUE);
1665 gtk_signal_connect (GTK_OBJECT (td_button_2), "toggled",
1666 GTK_SIGNAL_FUNC (radio_tdisk), (gpointer) "2");
1667 gtk_table_attach (GTK_TABLE(table), td_button_2, 3, 4, 0, 1,
1668 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1669 if (Flags.disk == ON)
1670 gtk_widget_show (td_button_2);
1671
1672
1673 /* ----------------- Disk Warp ----------------------------------- */
1674
1675 /* toggle disk warp */
1676
1677 t_warp_button =
1678 gtk_check_button_new_with_label (_("Warped Disk"));
1679 if (Flags.warp == ON)
1680 gtk_toggle_button_set_active
1681 (GTK_TOGGLE_BUTTON (t_warp_button), TRUE);
1682 gtk_signal_connect (GTK_OBJECT (t_warp_button), "toggled",
1683 GTK_SIGNAL_FUNC (toggle_warp), NULL );
1684 gtk_tooltips_set_tip (tooltips, t_warp_button,
1685 _("Toggle warped disk"), NULL);
1686 #if 0
1687 gtk_table_attach (GTK_TABLE(table), t_warp_button, 0, 1, 7, 8,
1688 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1689 if (Flags.disk == ON)
1690 gtk_widget_show (t_warp_button);
1691 #endif
1692
1693 /* disk warp */
1694 e_117 = gtk_entry_new_with_max_length (10);
1695 gtk_signal_connect(GTK_OBJECT(e_117), "changed",
1696 GTK_SIGNAL_FUNC(enter_diskwarp),
1697 e_117);
1698 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Disk].Warp);
1699 gtk_entry_set_text (GTK_ENTRY (e_117), InitString);
1700 gtk_entry_select_region (GTK_ENTRY (e_117),
1701 0, GTK_ENTRY(e_117)->text_length);
1702 gtk_table_attach (GTK_TABLE(table), e_117, 3, 4, 7, 8,
1703 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1704 if ((Flags.disk == ON) && (Flags.warp == ON))
1705 gtk_widget_show (e_117);
1706
1707 warp_label = gtk_label_new (_("Warp Factor:"));
1708 gtk_table_attach (GTK_TABLE(table), warp_label, 2, 3, 7, 8,
1709 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1710 if ((Flags.disk == ON) && (Flags.warp == ON))
1711 gtk_widget_show (warp_label);
1712
1713 /* ------------------- Show table ----------------------------- */
1714
1715 gtk_widget_show (table);
1716 gtk_box_pack_start (GTK_BOX (box2), table, FALSE, FALSE, 0);
1717
1718
1719 /* ------------------- End Disk stuff ----------------------------- */
1720
1721 disk_skipped:
1722
1723 #endif
1724
1725 /* --------------- Second Page ---------------------------------- */
1726
1727 label = gtk_label_new (_("Advanced"));
1728 box1 = gtk_hbox_new (TRUE, 0);
1729 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), box1, label);
1730
1731 gtk_widget_show (label);
1732 gtk_widget_show (box1);
1733
1734 box2 = gtk_vbox_new (FALSE, 0);
1735 gtk_container_set_border_width (GTK_CONTAINER (box2), 0);
1736 gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
1737 gtk_widget_show (box2);
1738
1739 table = gtk_table_new (8, 4, TRUE);
1740
1741 if (Flags.edu == ON)
1742 goto advanced_skipped;
1743
1744 /* --------------- Eccentric orbit ----------------------------- */
1745
1746 t_eccentric_button =
1747 gtk_check_button_new_with_label (_("Eccentric Orbit"));
1748 if (Flags.elliptic == ON)
1749 gtk_toggle_button_set_active
1750 (GTK_TOGGLE_BUTTON (t_eccentric_button), TRUE);
1751 gtk_signal_connect (GTK_OBJECT (t_eccentric_button), "toggled",
1752 GTK_SIGNAL_FUNC (toggle_elliptic), NULL );
1753 gtk_tooltips_set_tip (tooltips, t_eccentric_button,
1754 _("Switch on eccentric orbit"), NULL);
1755 gtk_table_attach (GTK_TABLE(table), t_eccentric_button, 0, 2, 0, 1,
1756 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1757 gtk_widget_show (t_eccentric_button);
1758
1759 e_107 = gtk_entry_new_with_max_length (10);
1760 gtk_signal_connect(GTK_OBJECT(e_107), "changed",
1761 GTK_SIGNAL_FUNC(enter_excentricity),
1762 e_107);
1763 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Excentricity);
1764 gtk_entry_set_text (GTK_ENTRY (e_107), InitString);
1765 gtk_entry_select_region (GTK_ENTRY (e_107),
1766 0, GTK_ENTRY(e_107)->text_length);
1767 gtk_table_attach (GTK_TABLE(table), e_107, 1, 2, 1, 2,
1768 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1769 if (Flags.elliptic == ON) gtk_widget_show (e_107);
1770
1771 ecc_button = gtk_toggle_button_new_with_label (_("Eccentricity:"));
1772 if (Flags.simplex[6] == ON)
1773 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ecc_button), TRUE);
1774 gtk_signal_connect (GTK_OBJECT (ecc_button), "toggled",
1775 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "6");
1776 gtk_tooltips_set_tip (tooltips, ecc_button,
1777 _("Toggle CONST/FIT for eccentricity"), NULL);
1778 gtk_table_attach (GTK_TABLE(table), ecc_button, 0, 1, 1, 2,
1779 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1780 if (Flags.elliptic == ON) gtk_widget_show (ecc_button);
1781
1782
1783
1784 e_108 = gtk_entry_new_with_max_length (10);
1785 gtk_signal_connect(GTK_OBJECT(e_108), "changed",
1786 GTK_SIGNAL_FUNC(enter_omega),
1787 e_108);
1788 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Omega);
1789 gtk_entry_set_text (GTK_ENTRY (e_108), InitString);
1790 gtk_entry_select_region (GTK_ENTRY (e_108),
1791 0, GTK_ENTRY(e_108)->text_length);
1792 gtk_table_attach (GTK_TABLE(table), e_108, 1, 2, 2, 3,
1793 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1794 if (Flags.elliptic == ON) gtk_widget_show (e_108);
1795
1796 ome_button = gtk_toggle_button_new_with_label (_("Periastron Length:"));
1797 if (Flags.simplex[7] == ON)
1798 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ome_button), TRUE);
1799 gtk_signal_connect (GTK_OBJECT (ome_button), "toggled",
1800 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "7");
1801 gtk_tooltips_set_tip (tooltips, ome_button,
1802 _("Toggle CONST/FIT for periastron length"),
1803 NULL);
1804 gtk_table_attach (GTK_TABLE(table), ome_button, 0, 1, 2, 3,
1805 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1806 if (Flags.elliptic == ON) gtk_widget_show (ome_button);
1807
1808 /* --------------- Asynchroneous rotation ----------------------- */
1809
1810 e_109 = gtk_entry_new_with_max_length (10);
1811 gtk_signal_connect(GTK_OBJECT(e_109), "changed",
1812 GTK_SIGNAL_FUNC(enter_fratio1),
1813 e_109);
1814 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Primary].Fratio);
1815 gtk_entry_set_text (GTK_ENTRY (e_109), InitString);
1816 gtk_entry_select_region (GTK_ENTRY (e_109),
1817 0, GTK_ENTRY(e_109)->text_length);
1818 gtk_table_attach (GTK_TABLE(table), e_109, 3, 4, 1, 2,
1819 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1820 if (Flags.asynchron1 == ON) gtk_widget_show (e_109);
1821
1822 as1_button = gtk_toggle_button_new_with_label (_("F_Ratio (P):"));
1823 if (Flags.simplex[8] == ON)
1824 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (as1_button), TRUE);
1825 gtk_signal_connect (GTK_OBJECT (as1_button), "toggled",
1826 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "8");
1827 gtk_tooltips_set_tip (tooltips, button,
1828 _("Toggle CONST/FIT for Primary asynchron rotation"),
1829 NULL);
1830 gtk_table_attach (GTK_TABLE(table), as1_button, 2, 3, 1, 2,
1831 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1832 if (Flags.asynchron1 == ON) gtk_widget_show (as1_button);
1833
1834 e_110 = gtk_entry_new_with_max_length (10);
1835 gtk_signal_connect(GTK_OBJECT(e_110), "changed",
1836 GTK_SIGNAL_FUNC(enter_fratio2),
1837 e_110);
1838 snprintf(InitString, sizeof(InitString), "%6.3f", Binary[Secondary].Fratio);
1839 gtk_entry_set_text (GTK_ENTRY (e_110), InitString);
1840 gtk_entry_select_region (GTK_ENTRY (e_110),
1841 0, GTK_ENTRY(e_110)->text_length);
1842 gtk_table_attach (GTK_TABLE(table), e_110, 3, 4, 2, 3,
1843 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1844 if (Flags.asynchron2 == ON) gtk_widget_show (e_110);
1845
1846 as2_button = gtk_toggle_button_new_with_label (_("F_Ratio (S):"));
1847 if (Flags.simplex[9] == ON)
1848 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (as2_button), TRUE);
1849 gtk_signal_connect (GTK_OBJECT (as2_button), "toggled",
1850 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "9");
1851 gtk_tooltips_set_tip (tooltips, button,
1852 _("Toggle CONST/FIT for Secondary Asynchron Rotation"),
1853 NULL);
1854 gtk_table_attach (GTK_TABLE(table), as2_button, 2, 3, 2, 3,
1855 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1856 if (Flags.asynchron2 == ON) gtk_widget_show (as2_button);
1857
1858 t_fpri_button =
1859 gtk_check_button_new_with_label (_("Primary asynchron"));
1860 if (Flags.asynchron1 == ON)
1861 gtk_toggle_button_set_active
1862 (GTK_TOGGLE_BUTTON (t_fpri_button), TRUE);
1863 gtk_signal_connect (GTK_OBJECT (t_fpri_button), "toggled",
1864 GTK_SIGNAL_FUNC (toggle_fratio1), NULL );
1865 gtk_tooltips_set_tip (tooltips, t_fpri_button,
1866 _("Switch on Primary asynchron rotation"),NULL);
1867 gtk_table_attach (GTK_TABLE(table), t_fpri_button, 2, 3, 0, 1,
1868 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1869 gtk_widget_show (t_fpri_button);
1870
1871 t_fsec_button =
1872 gtk_check_button_new_with_label (_("Secondary asynchron"));
1873 if (Flags.asynchron2 == ON)
1874 gtk_toggle_button_set_active
1875 (GTK_TOGGLE_BUTTON (t_fsec_button), TRUE);
1876 gtk_signal_connect (GTK_OBJECT (t_fsec_button), "toggled",
1877 GTK_SIGNAL_FUNC (toggle_fratio2), NULL );
1878 gtk_tooltips_set_tip (tooltips, t_fsec_button,
1879 _("Switch On Secondary Asynchron Rotation"),NULL);
1880 gtk_table_attach (GTK_TABLE(table), t_fsec_button, 3, 4, 0, 1,
1881 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1882 gtk_widget_show (t_fsec_button);
1883
1884 /* --------------- Model Atmosphere ---------------------------- */
1885
1886 t_bbody_button = gtk_check_button_new_with_label (_("Model Atmosphere (with log g [P/S])"));
1887 if (Flags.blackbody == OFF)
1888 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (t_bbody_button), TRUE);
1889 gtk_signal_connect (GTK_OBJECT (t_bbody_button), "toggled",
1890 GTK_SIGNAL_FUNC (toggle_blackbody), NULL);
1891 gtk_tooltips_set_tip (tooltips, t_bbody_button,
1892 _("Toggle Blackbody/Model Atmosphere Flux"),NULL);
1893 gtk_table_attach (GTK_TABLE(table), t_bbody_button, 0, 2, 3, 4,
1894 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1895 gtk_widget_show (t_bbody_button);
1896
1897 e_121 = gtk_entry_new_with_max_length (10);
1898 gtk_signal_connect(GTK_OBJECT(e_121), "changed",
1899 GTK_SIGNAL_FUNC(enter_log_g_1),
1900 e_121);
1901 snprintf(InitString, sizeof(InitString), "%3.1f", Binary[Primary].log_g);
1902 gtk_entry_set_text (GTK_ENTRY (e_121), InitString);
1903 gtk_entry_select_region (GTK_ENTRY (e_121),
1904 0, GTK_ENTRY(e_121)->text_length);
1905 gtk_table_attach (GTK_TABLE(table), e_121, 0, 1, 4, 5,
1906 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1907 if (Flags.blackbody == OFF) gtk_widget_show (e_121);
1908
1909 e_122 = gtk_entry_new_with_max_length (10);
1910 gtk_signal_connect(GTK_OBJECT(e_122), "changed",
1911 GTK_SIGNAL_FUNC(enter_log_g_2),
1912 e_122);
1913 snprintf(InitString, sizeof(InitString), "%3.1f", Binary[Secondary].log_g);
1914 gtk_entry_set_text (GTK_ENTRY (e_122), InitString);
1915 gtk_entry_select_region (GTK_ENTRY (e_122),
1916 0, GTK_ENTRY(e_122)->text_length);
1917 gtk_table_attach (GTK_TABLE(table), e_122, 1, 2, 4, 5,
1918 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1919 if (Flags.blackbody == OFF) gtk_widget_show (e_122);
1920
1921 /* --------------- Fractional Visibility ----------------------- */
1922 #if !defined(HIGH_PRECISION)
1923 button = gtk_check_button_new_with_label (_("Fractional Visibility"));
1924 if (Flags.fractional == ON)
1925 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
1926 gtk_signal_connect (GTK_OBJECT (button), "toggled",
1927 GTK_SIGNAL_FUNC (toggle_fractional), NULL);
1928 gtk_tooltips_set_tip (tooltips, button,
1929 _("Compute Fractional Visibility to smooth Lightcurve"),
1930 NULL);
1931 gtk_table_attach (GTK_TABLE(table), button, 2, 4, 3, 4,
1932 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1933 gtk_widget_show (button);
1934 #endif
1935 /* --------------- Line Profile -------------------------------- */
1936
1937 button = gtk_check_button_new_with_label (_("Line Profile at: (nm)"));
1938 if (Flags.lineprofile == ON)
1939 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
1940 gtk_signal_connect (GTK_OBJECT (button), "toggled",
1941 GTK_SIGNAL_FUNC (toggle_lineprofile), NULL );
1942 gtk_tooltips_set_tip (tooltips, button,
1943 _("Compute Line Profiles at different Phases for given rest wavelength"),
1944 NULL);
1945 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 5, 6,
1946 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1947 gtk_widget_show (button);
1948
1949
1950 e_111 = gtk_entry_new_with_max_length (10);
1951 gtk_signal_connect(GTK_OBJECT(e_111), "changed",
1952 GTK_SIGNAL_FUNC(enter_linewave),
1953 e_111);
1954 snprintf(InitString, sizeof(InitString), "%8.1f", Orbit.LambdaZero);
1955 gtk_entry_set_text (GTK_ENTRY (e_111), InitString);
1956 gtk_entry_select_region (GTK_ENTRY (e_111),
1957 0, GTK_ENTRY(e_111)->text_length);
1958 gtk_table_attach (GTK_TABLE(table), e_111, 1, 2, 5, 6,
1959 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1960 gtk_widget_show (e_111);
1961
1962 /* --------------- Reflection ---------------------------------- */
1963
1964 button = gtk_check_button_new_with_label (_("Detailed Reflection:"));
1965 if (Flags.reflect > 0)
1966 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
1967 gtk_signal_connect (GTK_OBJECT (button), "toggled",
1968 GTK_SIGNAL_FUNC (toggle_reflect), NULL );
1969 gtk_tooltips_set_tip (tooltips, button,
1970 _("Toggle point source/detailed (iterative) reflection"), NULL);
1971 gtk_table_attach (GTK_TABLE(table), button, 0, 2, 6, 7,
1972 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1973 gtk_widget_show (button);
1974
1975
1976 ref_label = gtk_label_new (_("Reflection iterations:"));
1977 gtk_misc_set_alignment (GTK_MISC(ref_label), 0,0);
1978 gtk_tooltips_set_tip (tooltips, ref_label,
1979 _("Set number of iterations for exact reflection"),NULL);
1980 gtk_table_attach (GTK_TABLE(table), ref_label, 0, 1, 7, 8,
1981 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1982 if (Flags.reflect > 0) gtk_widget_show (ref_label);
1983
1984 e_113 = gtk_entry_new_with_max_length (10);
1985 gtk_signal_connect(GTK_OBJECT(e_113), "changed",
1986 GTK_SIGNAL_FUNC(enter_reflect_iterations),
1987 e_113);
1988 snprintf(InitString, sizeof(InitString), "%3d", Flags.reflect);
1989 gtk_entry_set_text (GTK_ENTRY (e_113), InitString);
1990 gtk_entry_select_region (GTK_ENTRY (e_113),
1991 0, GTK_ENTRY(e_113)->text_length);
1992 gtk_table_attach (GTK_TABLE(table), e_113, 1, 2, 7, 8,
1993 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
1994 if (Flags.reflect > 0) gtk_widget_show (e_113);
1995
1996 /* --------------- Limb Darkening ------------------------------ */
1997
1998 label = gtk_label_new (_("Limb Darkening Law"));
1999 gtk_misc_set_alignment (GTK_MISC(label), 0,1);
2000 gtk_table_attach (GTK_TABLE(table), label, 2, 4, 5, 6,
2001 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2002 gtk_widget_show (label);
2003
2004
2005 button = gtk_radio_button_new_with_label (NULL, _("linear"));
2006 if (Flags.limb == 0)
2007 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2008 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2009 GTK_SIGNAL_FUNC (radio_limb), (gpointer) "0");
2010 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 6, 7,
2011 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2012 gtk_widget_show (button);
2013
2014 group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
2015 button = gtk_radio_button_new_with_label (group, _("quadratic"));
2016 if (Flags.limb == 1)
2017 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2018 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2019 GTK_SIGNAL_FUNC (radio_limb), (gpointer) "1");
2020 gtk_table_attach (GTK_TABLE(table), button, 3, 4, 6, 7,
2021 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2022 gtk_widget_show (button);
2023
2024 group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
2025 button = gtk_radio_button_new_with_label (group, _("square root"));
2026 if (Flags.limb == 2)
2027 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2028 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2029 GTK_SIGNAL_FUNC (radio_limb), (gpointer) "2");
2030 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 7, 8,
2031 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2032 gtk_widget_show (button);
2033
2034 {
2035 int pos;
2036 for (pos = 0; pos < NUM_MAG; ++pos)
2037 {
2038 if (nf_pb_has_ldType(pos, LD_FOUR))
2039 {
2040 group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
2041 button = gtk_radio_button_new_with_label (group, _("four parameter"));
2042 if (Flags.limb == 3)
2043 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2044 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2045 GTK_SIGNAL_FUNC (radio_limb), (gpointer) "3");
2046 gtk_table_attach (GTK_TABLE(table), button, 3, 4, 7, 8,
2047 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2048 gtk_widget_show (button);
2049 break;
2050 }
2051 }
2052 }
2053
2054 advanced_skipped:
2055
2056 /* --------------- Lightcurve Steps ---------------------------- */
2057
2058 label = gtk_label_new (_("Lightcurve Steps:"));
2059 /* gtk_misc_set_alignment (GTK_MISC(label), 0, 1); */
2060 gtk_tooltips_set_tip (tooltips, label,
2061 _("Set number of steps for lightcurve"), NULL);
2062 gtk_table_attach (GTK_TABLE(table), label, 2, 3, 4, 5,
2063 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2064 gtk_widget_show (label);
2065
2066 e_112 = gtk_entry_new_with_max_length (10);
2067 gtk_signal_connect(GTK_OBJECT(e_112), "changed",
2068 GTK_SIGNAL_FUNC(enter_phasesteps),
2069 e_112);
2070 snprintf(InitString, sizeof(InitString), "%8d", PhaseSteps);
2071 gtk_entry_set_text (GTK_ENTRY (e_112), InitString);
2072 gtk_entry_select_region (GTK_ENTRY (e_112),
2073 0, GTK_ENTRY(e_112)->text_length);
2074 gtk_table_attach (GTK_TABLE(table), e_112, 3, 4, 4, 5,
2075 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2076 gtk_widget_show (e_112);
2077
2078
2079 gtk_widget_show (table);
2080 gtk_box_pack_start (GTK_BOX (box2), table, FALSE, FALSE, 0);
2081
2082
2083 /* --------------- Third Page ----------------------------------- */
2084
2085 makepage3 ();
2086
2087
2088 /* --------------- Fourth Page ------------------------------------ */
2089
2090 if (Flags.edu == ON)
2091 goto datafitting_skipped;
2092
2093 label = gtk_label_new (_("Data Fitting"));
2094 box1 = gtk_hbox_new (TRUE, 0);
2095 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), box1, label);
2096 /* gtk_container_add (GTK_CONTAINER (top_window), box1); */
2097 gtk_widget_show (label);
2098 gtk_widget_show (box1);
2099
2100 box2 = gtk_vbox_new (FALSE, 0);
2101 gtk_container_set_border_width (GTK_CONTAINER (box2), 0);
2102 gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
2103 gtk_widget_show (box2);
2104
2105 table = gtk_table_new (8, 4, TRUE);
2106
2107
2108 e_name = gtk_entry_new_with_max_length (10);
2109 gtk_signal_connect(GTK_OBJECT(e_name), "changed",
2110 GTK_SIGNAL_FUNC(enter_name),
2111 e_name);
2112 gtk_entry_set_text (GTK_ENTRY (e_name), Orbit.Name);
2113 gtk_entry_select_region (GTK_ENTRY (e_name),
2114 0, GTK_ENTRY(e_name)->text_length);
2115 gtk_table_attach (GTK_TABLE(table), e_name, 2, 4, 0, 1,
2116 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2117 gtk_widget_show (e_name);
2118
2119 label = gtk_label_new (_("Name of binary:"));
2120 gtk_table_attach (GTK_TABLE(table), label, 0, 2, 0, 1,
2121 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2122 gtk_widget_show (label);
2123
2124 e_302 = gtk_entry_new_with_max_length (10);
2125 gtk_signal_connect(GTK_OBJECT(e_302), "changed",
2126 GTK_SIGNAL_FUNC(enter_abs_period),
2127 e_302);
2128 snprintf(InitString, sizeof(InitString), "%8.4f", Orbit.TruePeriod/86400.);
2129 gtk_entry_set_text (GTK_ENTRY (e_302), InitString);
2130 gtk_entry_select_region (GTK_ENTRY (e_302),
2131 0, GTK_ENTRY(e_302)->text_length);
2132 gtk_table_attach (GTK_TABLE(table), e_302, 2, 4, 1, 2,
2133 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2134 gtk_widget_show (e_302);
2135
2136 label = gtk_label_new (_("Period (days):"));
2137 gtk_table_attach (GTK_TABLE(table), label, 0, 2, 1, 2,
2138 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2139 gtk_widget_show (label);
2140
2141 e_303 = gtk_entry_new_with_max_length (10);
2142 gtk_signal_connect(GTK_OBJECT(e_303), "changed",
2143 GTK_SIGNAL_FUNC(enter_abs_mass),
2144 e_303);
2145 snprintf(InitString, sizeof(InitString), "%8.4f", Orbit.TrueMass/1.989E30 );
2146 gtk_entry_set_text (GTK_ENTRY (e_303), InitString);
2147 gtk_entry_select_region (GTK_ENTRY (e_303),
2148 0, GTK_ENTRY(e_303)->text_length);
2149 gtk_table_attach (GTK_TABLE(table), e_303, 2, 4, 2, 3,
2150 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2151 gtk_widget_show (e_303);
2152
2153 button = gtk_toggle_button_new_with_label (_("Mass (solar masses):"));
2154 if (Flags.simplex[26] == ON)
2155 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2156 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2157 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "26");
2158 gtk_tooltips_set_tip (tooltips, button,
2159 _("Toggle CONST/FIT for binary mass"),NULL);
2160 gtk_table_attach (GTK_TABLE(table), button, 0, 2, 2, 3,
2161 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2162 gtk_widget_show (button);
2163
2164
2165 e_304 = gtk_entry_new_with_max_length (10);
2166 gtk_signal_connect(GTK_OBJECT(e_304), "changed",
2167 GTK_SIGNAL_FUNC(enter_abs_distance),
2168 e_304);
2169 snprintf(InitString, sizeof(InitString), "%8.4f", Orbit.TrueDistance/SOL_RADIUS);
2170 gtk_entry_set_text (GTK_ENTRY (e_304), InitString);
2171 gtk_entry_select_region (GTK_ENTRY (e_304),
2172 0, GTK_ENTRY(e_304)->text_length);
2173 gtk_table_attach (GTK_TABLE(table), e_304, 2, 4, 3, 4,
2174 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2175 gtk_widget_show (e_304);
2176
2177 button = gtk_toggle_button_new_with_label(_("Separation (solar radii):"));
2178 if (Flags.simplex[27] == ON)
2179 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2180 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2181 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "27");
2182 gtk_tooltips_set_tip (tooltips, button,
2183 _("Toggle CONST/FIT for binary separation"),NULL);
2184 gtk_table_attach (GTK_TABLE(table), button, 0, 2, 3, 4,
2185 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2186 gtk_widget_show (button);
2187
2188 e_301 = gtk_entry_new_with_max_length (10);
2189 gtk_signal_connect(GTK_OBJECT(e_301), "changed",
2190 GTK_SIGNAL_FUNC(enter_simplextol),
2191 e_301);
2192 snprintf(InitString, sizeof(InitString), "%6.4f", Flags.SimplexTol);
2193 gtk_entry_set_text (GTK_ENTRY (e_301), InitString);
2194 gtk_entry_select_region (GTK_ENTRY (e_301),
2195 0, GTK_ENTRY(e_301)->text_length);
2196 gtk_table_attach (GTK_TABLE(table), e_301, 2, 4, 5, 6,
2197 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2198 gtk_widget_show (e_301);
2199
2200 button = gtk_button_new_with_label (_("FIT with tolerance:"));
2201 gtk_signal_connect (GTK_OBJECT (button), "clicked",
2202 GTK_SIGNAL_FUNC (lightfit_event), NULL);
2203 gtk_tooltips_set_tip (tooltips, button,
2204 _("Determine best-fit model for observational data"),
2205 NULL);
2206 gtk_table_attach (GTK_TABLE(table), button, 0, 2, 5, 6,
2207 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2208 gtk_widget_show (button);
2209
2210 t_sian_button = gtk_check_button_new_with_label (_("Simulated Annealing"));
2211 if (Flags.anneal == ON)
2212 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (t_sian_button), TRUE);
2213 gtk_signal_connect (GTK_OBJECT (t_sian_button), "toggled",
2214 GTK_SIGNAL_FUNC (toggle_anneal), "A" );
2215 gtk_tooltips_set_tip (tooltips, t_sian_button,
2216 _("Switch on global (SA) fitting"), NULL);
2217 gtk_table_attach (GTK_TABLE(table), t_sian_button, 0, 2, 6, 7,
2218 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2219 gtk_widget_show (t_sian_button);
2220
2221 t_mcmc_button = gtk_check_button_new_with_label (_("Markov Chain Monte Carlo"));
2222 if (Flags.anneal == MCMC)
2223 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (t_mcmc_button), TRUE);
2224 gtk_signal_connect (GTK_OBJECT (t_mcmc_button), "toggled",
2225 GTK_SIGNAL_FUNC (toggle_anneal), "M" );
2226 gtk_tooltips_set_tip (tooltips, t_mcmc_button,
2227 _("Switch on global (MCMC) fitting"), NULL);
2228 gtk_table_attach (GTK_TABLE(table), t_mcmc_button, 2, 4, 6, 7,
2229 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2230 gtk_widget_show (t_mcmc_button);
2231
2232
2233 button = gtk_button_new_with_label (_("MAP ChiSquare with steps:"));
2234 gtk_signal_connect (GTK_OBJECT (button), "clicked",
2235 GTK_SIGNAL_FUNC (lightmap_event), NULL);
2236 gtk_tooltips_set_tip (tooltips, button,
2237 _("Compute 2D chi-square map in two parameters"),
2238 NULL);
2239 gtk_table_attach (GTK_TABLE(table), button, 0, 2, 7, 8,
2240 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2241 gtk_widget_show (button);
2242
2243 e_305 = gtk_entry_new_with_max_length (10);
2244 gtk_signal_connect(GTK_OBJECT(e_305), "changed",
2245 GTK_SIGNAL_FUNC(enter_step1),
2246 e_305);
2247 snprintf(InitString, sizeof(InitString), "%6.4f", Flags.Step[0]);
2248 gtk_entry_set_text (GTK_ENTRY (e_305), InitString);
2249 gtk_entry_select_region (GTK_ENTRY (e_305),
2250 0, GTK_ENTRY(e_305)->text_length);
2251 gtk_table_attach (GTK_TABLE(table), e_305, 2, 3, 7, 8,
2252 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2253 gtk_widget_show (e_305);
2254
2255 e_306 = gtk_entry_new_with_max_length (10);
2256 gtk_signal_connect(GTK_OBJECT(e_306), "changed",
2257 GTK_SIGNAL_FUNC(enter_step2),
2258 e_306);
2259 snprintf(InitString, sizeof(InitString), "%6.4f", Flags.Step[1]);
2260 gtk_entry_set_text (GTK_ENTRY (e_306), InitString);
2261 gtk_entry_select_region (GTK_ENTRY (e_306),
2262 0, GTK_ENTRY(e_306)->text_length);
2263 gtk_table_attach (GTK_TABLE(table), e_306, 3, 4, 7, 8,
2264 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2265 gtk_widget_show (e_306);
2266
2267 gtk_widget_show (table);
2268 gtk_box_pack_start (GTK_BOX (box2), table, FALSE, FALSE, 0);
2269
2270 datafitting_skipped:
2271
2272 /* --------------- Fifth Page ------------------------------------ */
2273
2274 label = gtk_label_new (_("Spots Primary"));
2275 box1 = gtk_hbox_new (TRUE, 0);
2276 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), box1, label);
2277
2278 gtk_widget_show (label);
2279 gtk_widget_show (box1);
2280
2281 box2 = gtk_vbox_new (FALSE, 0);
2282 gtk_container_set_border_width (GTK_CONTAINER (box2), 0);
2283 gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
2284 gtk_widget_show (box2);
2285
2286 table = gtk_table_new (8, 4, TRUE);
2287
2288 /* ------------- PRIMARY SPOT 1 ------------------------- */
2289
2290 t_psp1_button = gtk_check_button_new_with_label (_("Primary Spot One"));
2291 if (SpotActive[0] == ON)
2292 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (t_psp1_button),TRUE);
2293 gtk_signal_connect (GTK_OBJECT (t_psp1_button), "toggled",
2294 GTK_SIGNAL_FUNC (toggle_p_spot1), NULL);
2295 gtk_tooltips_set_tip (tooltips, t_psp1_button,
2296 _("Toggle inclusion/exclusion of spot"), NULL);
2297 gtk_table_attach (GTK_TABLE(table), t_psp1_button, 0, 2, 0, 1,
2298 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2299 gtk_widget_show (t_psp1_button);
2300
2301
2302 e_401 = gtk_entry_new_with_max_length (10);
2303 gtk_signal_connect(GTK_OBJECT(e_401), "changed",
2304 GTK_SIGNAL_FUNC(enter_longitude_p_spot1),
2305 e_401);
2306 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Primary][0].longitude);
2307 gtk_entry_set_text (GTK_ENTRY (e_401), InitString);
2308 gtk_entry_select_region (GTK_ENTRY (e_401),
2309 0, GTK_ENTRY(e_401)->text_length);
2310 gtk_table_attach (GTK_TABLE(table), e_401, 1, 2, 1, 2,
2311 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2312 gtk_widget_show (e_401);
2313
2314 button = gtk_toggle_button_new_with_label (_("Longitude:"));
2315 if (FitSpotS[10-10] == ON)
2316 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2317 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2318 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "10");
2319 gtk_tooltips_set_tip (tooltips, button,
2320 _("Toggle CONST/FIT for longitude"), NULL);
2321 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 1, 2,
2322 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2323 gtk_widget_show (button);
2324
2325 e_402 = gtk_entry_new_with_max_length (10);
2326 gtk_signal_connect(GTK_OBJECT(e_402), "changed",
2327 GTK_SIGNAL_FUNC(enter_latitude_p_spot1),
2328 e_402);
2329 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Primary][0].latitude);
2330 gtk_entry_set_text (GTK_ENTRY (e_402), InitString);
2331 gtk_entry_select_region (GTK_ENTRY (e_402),
2332 0, GTK_ENTRY(e_402)->text_length);
2333 gtk_table_attach (GTK_TABLE(table), e_402, 1, 2, 2, 3,
2334 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2335 gtk_widget_show (e_402);
2336
2337 button = gtk_toggle_button_new_with_label (_("Latitude:"));
2338 if (FitSpotS[11-10] == ON)
2339 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2340 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2341 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "11");
2342 gtk_tooltips_set_tip (tooltips, button,
2343 _("Toggle CONST/FIT for latitude"), NULL);
2344 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 2, 3,
2345 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2346 gtk_widget_show (button);
2347
2348 e_403 = gtk_entry_new_with_max_length (10);
2349 gtk_signal_connect(GTK_OBJECT(e_403), "changed",
2350 GTK_SIGNAL_FUNC(enter_radius_p_spot1),
2351 e_403);
2352 if (Spot[Primary][0].radius < LIM_SRA_L)
2353 Spot[Primary][0].radius = LIM_SRA_L;
2354 if (SpotStore[Primary][0].radius < LIM_SRA_L)
2355 SpotStore[Primary][0].radius = LIM_SRA_L;
2356 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Primary][0].radius);
2357 gtk_entry_set_text (GTK_ENTRY (e_403), InitString);
2358 gtk_entry_select_region (GTK_ENTRY (e_403),
2359 0, GTK_ENTRY(e_403)->text_length);
2360 gtk_table_attach (GTK_TABLE(table), e_403, 1, 2, 3, 4,
2361 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2362 gtk_widget_show (e_403);
2363
2364 button = gtk_toggle_button_new_with_label (_("Radius:"));
2365 if (FitSpotS[12-10] == ON)
2366 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2367 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2368 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "12");
2369 gtk_tooltips_set_tip (tooltips, button,
2370 _("Toggle CONST/FIT for radius"), NULL);
2371 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 3, 4,
2372 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2373 gtk_widget_show (button);
2374
2375 e_404 = gtk_entry_new_with_max_length (10);
2376 gtk_signal_connect(GTK_OBJECT(e_404), "changed",
2377 GTK_SIGNAL_FUNC(enter_dimfactor_p_spot1),
2378 e_404);
2379 if (Spot[Primary][0].dimfactor < LIM_SDF_L)
2380 Spot[Primary][0].dimfactor = LIM_SDF_L;
2381 if (SpotStore[Primary][0].dimfactor < LIM_SDF_L)
2382 SpotStore[Primary][0].dimfactor = LIM_SDF_L;
2383 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Primary][0].dimfactor);
2384 gtk_entry_set_text (GTK_ENTRY (e_404), InitString);
2385 gtk_entry_select_region (GTK_ENTRY (e_404),
2386 0, GTK_ENTRY(e_404)->text_length);
2387 gtk_table_attach (GTK_TABLE(table), e_404, 1, 2, 4, 5,
2388 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2389 gtk_widget_show (e_404);
2390
2391 button = gtk_toggle_button_new_with_label (_("Dimfactor:"));
2392 if (FitSpotS[13-10] == ON)
2393 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2394 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2395 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "13");
2396 gtk_tooltips_set_tip (tooltips, button,
2397 _("Toggle CONST/FIT for dimfactor"), NULL);
2398 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 4, 5,
2399 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2400 gtk_widget_show (button);
2401
2402 /* ------------- PRIMARY SPOT 2 ------------------------- */
2403
2404 t_psp2_button = gtk_check_button_new_with_label (_("Primary Spot Two"));
2405 if (SpotActive[1] == ON)
2406 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (t_psp2_button),TRUE);
2407 gtk_signal_connect (GTK_OBJECT (t_psp2_button), "toggled",
2408 GTK_SIGNAL_FUNC (toggle_p_spot2), NULL);
2409 gtk_tooltips_set_tip (tooltips, t_psp2_button,
2410 _("Toggle inclusion/exclusion of spot"), NULL);
2411 gtk_table_attach (GTK_TABLE(table), t_psp2_button, 2, 4, 0, 1,
2412 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2413 gtk_widget_show (t_psp2_button);
2414
2415
2416 e_405 = gtk_entry_new_with_max_length (10);
2417 gtk_signal_connect(GTK_OBJECT(e_405), "changed",
2418 GTK_SIGNAL_FUNC(enter_longitude_p_spot2),
2419 e_405);
2420 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Primary][1].longitude);
2421 gtk_entry_set_text (GTK_ENTRY (e_405), InitString);
2422 gtk_entry_select_region (GTK_ENTRY (e_405),
2423 0, GTK_ENTRY(e_405)->text_length);
2424 gtk_table_attach (GTK_TABLE(table), e_405, 3, 4, 1, 2,
2425 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2426 gtk_widget_show (e_405);
2427
2428 button = gtk_toggle_button_new_with_label (_("Longitude:"));
2429 if (FitSpotS[14-10] == ON)
2430 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2431 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2432 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "14");
2433 gtk_tooltips_set_tip (tooltips, button,
2434 _("Toggle CONST/FIT for longitude"), NULL);
2435 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 1, 2,
2436 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2437 gtk_widget_show (button);
2438
2439 e_406 = gtk_entry_new_with_max_length (10);
2440 gtk_signal_connect(GTK_OBJECT(e_406), "changed",
2441 GTK_SIGNAL_FUNC(enter_latitude_p_spot2),
2442 e_406);
2443 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Primary][1].latitude);
2444 gtk_entry_set_text (GTK_ENTRY (e_406), InitString);
2445 gtk_entry_select_region (GTK_ENTRY (e_406),
2446 0, GTK_ENTRY(e_406)->text_length);
2447 gtk_table_attach (GTK_TABLE(table), e_406, 3, 4, 2, 3,
2448 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2449 gtk_widget_show (e_406);
2450
2451 button = gtk_toggle_button_new_with_label (_("Latitude:"));
2452 if (FitSpotS[15-10] == ON)
2453 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2454 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2455 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "15");
2456 gtk_tooltips_set_tip (tooltips, button,
2457 _("Toggle CONST/FIT for latitude"), NULL);
2458 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 2, 3,
2459 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2460 gtk_widget_show (button);
2461
2462 e_407 = gtk_entry_new_with_max_length (10);
2463 gtk_signal_connect(GTK_OBJECT(e_407), "changed",
2464 GTK_SIGNAL_FUNC(enter_radius_p_spot2),
2465 e_407);
2466 if (Spot[Primary][1].radius < LIM_SRA_L)
2467 Spot[Primary][1].radius = LIM_SRA_L;
2468 if (SpotStore[Primary][1].radius < LIM_SRA_L)
2469 SpotStore[Primary][1].radius = LIM_SRA_L;
2470 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Primary][1].radius);
2471 gtk_entry_set_text (GTK_ENTRY (e_407), InitString);
2472 gtk_entry_select_region (GTK_ENTRY (e_407),
2473 0, GTK_ENTRY(e_407)->text_length);
2474 gtk_table_attach (GTK_TABLE(table), e_407, 3, 4, 3, 4,
2475 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2476 gtk_widget_show (e_407);
2477
2478 button = gtk_toggle_button_new_with_label (_("Radius:"));
2479 if (FitSpotS[16-10] == ON)
2480 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2481 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2482 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "16");
2483 gtk_tooltips_set_tip (tooltips, button,
2484 _("Toggle CONST/FIT for radius"), NULL);
2485 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 3, 4,
2486 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2487 gtk_widget_show (button);
2488
2489 e_408 = gtk_entry_new_with_max_length (10);
2490 gtk_signal_connect(GTK_OBJECT(e_408), "changed",
2491 GTK_SIGNAL_FUNC(enter_dimfactor_p_spot2),
2492 e_408);
2493 if (Spot[Primary][1].dimfactor < LIM_SDF_L)
2494 Spot[Primary][1].dimfactor = LIM_SDF_L;
2495 if (SpotStore[Primary][1].dimfactor < LIM_SDF_L)
2496 SpotStore[Primary][1].dimfactor = LIM_SDF_L;
2497 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Primary][1].dimfactor);
2498 gtk_entry_set_text (GTK_ENTRY (e_408), InitString);
2499 gtk_entry_select_region (GTK_ENTRY (e_408),
2500 0, GTK_ENTRY(e_408)->text_length);
2501 gtk_table_attach (GTK_TABLE(table), e_408, 3, 4, 4, 5,
2502 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2503 gtk_widget_show (e_408);
2504
2505 button = gtk_toggle_button_new_with_label (_("Dimfactor:"));
2506 if (FitSpotS[17-10] == ON)
2507 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2508 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2509 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "17");
2510 gtk_tooltips_set_tip (tooltips, button,
2511 _("Toggle CONST/FIT for dimfactor"), NULL);
2512 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 4, 5,
2513 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2514 gtk_widget_show (button);
2515
2516
2517 gtk_widget_show (table);
2518 gtk_box_pack_start (GTK_BOX (box2), table, FALSE, FALSE, 0);
2519
2520
2521
2522 /* --------------- Sixth Page ------------------------------------- */
2523
2524 if (Flags.edu == ON)
2525 goto spots_secondary_skipped;
2526
2527 label = gtk_label_new (_("Spots Secondary"));
2528 box1 = gtk_hbox_new (TRUE, 0);
2529 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), box1, label);
2530
2531 gtk_widget_show (label);
2532 gtk_widget_show (box1);
2533
2534 box2 = gtk_vbox_new (FALSE, 0);
2535 gtk_container_set_border_width (GTK_CONTAINER (box2), 0);
2536 gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
2537 gtk_widget_show (box2);
2538
2539 table = gtk_table_new (8, 4, TRUE);
2540
2541
2542 /* ------------- SECONDARY SPOT 1 ------------------------ */
2543
2544 t_ssp1_button = gtk_check_button_new_with_label (_("Secondary Spot One"));
2545 if (SpotActive[2] == ON)
2546 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (t_ssp1_button),TRUE);
2547 gtk_signal_connect (GTK_OBJECT (t_ssp1_button), "toggled",
2548 GTK_SIGNAL_FUNC (toggle_s_spot1), NULL);
2549 gtk_tooltips_set_tip (tooltips, t_ssp1_button,
2550 "Toggle inclusion/exclusion of spot ",NULL);
2551 gtk_table_attach (GTK_TABLE(table), t_ssp1_button, 0, 2, 0, 1,
2552 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2553 gtk_widget_show (t_ssp1_button);
2554
2555
2556 e_409 = gtk_entry_new_with_max_length (10);
2557 gtk_signal_connect(GTK_OBJECT(e_409), "changed",
2558 GTK_SIGNAL_FUNC(enter_longitude_s_spot1),
2559 e_409);
2560 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Secondary][0].longitude);
2561 gtk_entry_set_text (GTK_ENTRY (e_409), InitString);
2562 gtk_entry_select_region (GTK_ENTRY (e_409),
2563 0, GTK_ENTRY(e_409)->text_length);
2564 gtk_table_attach (GTK_TABLE(table), e_409, 1, 2, 1, 2,
2565 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2566 gtk_widget_show (e_409);
2567
2568 button = gtk_toggle_button_new_with_label (_("Longitude:"));
2569 if (FitSpotS[18-10] == ON)
2570 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2571 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2572 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "18");
2573 gtk_tooltips_set_tip (tooltips, button,
2574 _("Toggle CONST/FIT for longitude"), NULL);
2575 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 1, 2,
2576 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2577 gtk_widget_show (button);
2578
2579 e_410 = gtk_entry_new_with_max_length (10);
2580 gtk_signal_connect(GTK_OBJECT(e_410), "changed",
2581 GTK_SIGNAL_FUNC(enter_latitude_s_spot1),
2582 e_410);
2583 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Secondary][0].latitude);
2584 gtk_entry_set_text (GTK_ENTRY (e_410), InitString);
2585 gtk_entry_select_region (GTK_ENTRY (e_410),
2586 0, GTK_ENTRY(e_410)->text_length);
2587 gtk_table_attach (GTK_TABLE(table), e_410, 1, 2, 2, 3,
2588 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2589 gtk_widget_show (e_410);
2590
2591 button = gtk_toggle_button_new_with_label (_("Latitude:"));
2592 if (FitSpotS[19-10] == ON)
2593 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2594 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2595 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "19");
2596 gtk_tooltips_set_tip (tooltips, button,
2597 _("Toggle CONST/FIT for latitude"), NULL);
2598 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 2, 3,
2599 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2600 gtk_widget_show (button);
2601
2602 e_411 = gtk_entry_new_with_max_length (10);
2603 gtk_signal_connect(GTK_OBJECT(e_411), "changed",
2604 GTK_SIGNAL_FUNC(enter_radius_s_spot1),
2605 e_411);
2606 if (Spot[Secondary][0].radius < LIM_SRA_L)
2607 Spot[Secondary][0].radius = LIM_SRA_L;
2608 if (SpotStore[Secondary][0].radius < LIM_SRA_L)
2609 SpotStore[Secondary][0].radius = LIM_SRA_L;
2610 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Secondary][0].radius);
2611 gtk_entry_set_text (GTK_ENTRY (e_411), InitString);
2612 gtk_entry_select_region (GTK_ENTRY (e_411),
2613 0, GTK_ENTRY(e_411)->text_length);
2614 gtk_table_attach (GTK_TABLE(table), e_411, 1, 2, 3, 4,
2615 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2616 gtk_widget_show (e_411);
2617
2618 button = gtk_toggle_button_new_with_label (_("Radius:"));
2619 if (FitSpotS[20-10] == ON)
2620 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2621 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2622 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "20");
2623 gtk_tooltips_set_tip (tooltips, button,
2624 _("Toggle CONST/FIT for radius"), NULL);
2625 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 3, 4,
2626 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2627 gtk_widget_show (button);
2628
2629 e_412 = gtk_entry_new_with_max_length (10);
2630 gtk_signal_connect(GTK_OBJECT(e_412), "changed",
2631 GTK_SIGNAL_FUNC(enter_dimfactor_s_spot1),
2632 e_412);
2633 if (Spot[Secondary][0].dimfactor < LIM_SDF_L)
2634 Spot[Secondary][0].dimfactor = LIM_SDF_L;
2635 if (SpotStore[Secondary][0].dimfactor < LIM_SDF_L)
2636 SpotStore[Secondary][0].dimfactor = LIM_SDF_L;
2637 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Secondary][0].dimfactor);
2638 gtk_entry_set_text (GTK_ENTRY (e_412), InitString);
2639 gtk_entry_select_region (GTK_ENTRY (e_412),
2640 0, GTK_ENTRY(e_412)->text_length);
2641 gtk_table_attach (GTK_TABLE(table), e_412, 1, 2, 4, 5,
2642 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2643 gtk_widget_show (e_412);
2644
2645 button = gtk_toggle_button_new_with_label (_("Dimfactor:"));
2646 if (FitSpotS[21-10] == ON)
2647 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2648 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2649 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "21");
2650 gtk_tooltips_set_tip (tooltips, button,
2651 _("Toggle CONST/FIT for dimfactor"), NULL);
2652 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 4, 5,
2653 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2654 gtk_widget_show (button);
2655
2656 /* ------------- SECONDARY SPOT 2 ----------------------- */
2657
2658 t_ssp2_button = gtk_check_button_new_with_label (_("Secondary Spot Two"));
2659 if (SpotActive[3] == ON)
2660 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (t_ssp2_button),TRUE);
2661 gtk_signal_connect (GTK_OBJECT (t_ssp2_button), "toggled",
2662 GTK_SIGNAL_FUNC (toggle_s_spot2), NULL );
2663 gtk_tooltips_set_tip (tooltips, t_ssp2_button,
2664 _("Toggle inclusion/exclusion of spot"), NULL);
2665 gtk_table_attach (GTK_TABLE(table), t_ssp2_button, 2, 4, 0, 1,
2666 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2667 gtk_widget_show (t_ssp2_button);
2668
2669
2670 e_413 = gtk_entry_new_with_max_length (10);
2671 gtk_signal_connect(GTK_OBJECT(e_413), "changed",
2672 GTK_SIGNAL_FUNC(enter_longitude_s_spot2),
2673 e_413);
2674 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Secondary][1].longitude);
2675 gtk_entry_set_text (GTK_ENTRY (e_413), InitString);
2676 gtk_entry_select_region (GTK_ENTRY (e_413),
2677 0, GTK_ENTRY(e_413)->text_length);
2678 gtk_table_attach (GTK_TABLE(table), e_413, 3, 4, 1, 2,
2679 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2680 gtk_widget_show (e_413);
2681
2682 button = gtk_toggle_button_new_with_label (_("Longitude:"));
2683 if (FitSpotS[22-10] == ON)
2684 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2685 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2686 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "22");
2687 gtk_tooltips_set_tip (tooltips, button,
2688 _("Toggle CONST/FIT for longitude"), NULL);
2689 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 1, 2,
2690 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2691 gtk_widget_show (button);
2692
2693 e_414 = gtk_entry_new_with_max_length (10);
2694 gtk_signal_connect(GTK_OBJECT(e_414), "changed",
2695 GTK_SIGNAL_FUNC(enter_latitude_s_spot2),
2696 e_414);
2697 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Secondary][1].latitude);
2698 gtk_entry_set_text (GTK_ENTRY (e_414), InitString);
2699 gtk_entry_select_region (GTK_ENTRY (e_414),
2700 0, GTK_ENTRY(e_414)->text_length);
2701 gtk_table_attach (GTK_TABLE(table), e_414, 3, 4, 2, 3,
2702 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2703 gtk_widget_show (e_414);
2704
2705 button = gtk_toggle_button_new_with_label (_("Latitude:"));
2706 if (FitSpotS[23-10] == ON)
2707 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2708 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2709 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "23");
2710 gtk_tooltips_set_tip (tooltips, button,
2711 _("Toggle CONST/FIT for latitude"), NULL);
2712 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 2, 3,
2713 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2714 gtk_widget_show (button);
2715
2716 e_415 = gtk_entry_new_with_max_length (10);
2717 gtk_signal_connect(GTK_OBJECT(e_415), "changed",
2718 GTK_SIGNAL_FUNC(enter_radius_s_spot2),
2719 e_415);
2720 if (Spot[Secondary][1].radius < LIM_SRA_L)
2721 Spot[Secondary][1].radius = LIM_SRA_L;
2722 if (SpotStore[Secondary][1].radius < LIM_SRA_L)
2723 SpotStore[Secondary][1].radius = LIM_SRA_L;
2724 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Secondary][1].radius);
2725 gtk_entry_set_text (GTK_ENTRY (e_415), InitString);
2726 gtk_entry_select_region (GTK_ENTRY (e_415),
2727 0, GTK_ENTRY(e_415)->text_length);
2728 gtk_table_attach (GTK_TABLE(table), e_415, 3, 4, 3, 4,
2729 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2730 gtk_widget_show (e_415);
2731
2732 button = gtk_toggle_button_new_with_label (_("Radius:"));
2733 if (FitSpotS[24-10] == ON)
2734 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2735 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2736 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "24");
2737 gtk_tooltips_set_tip (tooltips, button,
2738 _("Toggle CONST/FIT for radius"), NULL);
2739 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 3, 4,
2740 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2741 gtk_widget_show (button);
2742
2743 e_416 = gtk_entry_new_with_max_length (10);
2744 gtk_signal_connect(GTK_OBJECT(e_416), "changed",
2745 GTK_SIGNAL_FUNC(enter_dimfactor_s_spot2),
2746 e_416);
2747 if (Spot[Secondary][1].dimfactor < LIM_SDF_L)
2748 Spot[Secondary][1].dimfactor = LIM_SDF_L;
2749 if (SpotStore[Secondary][1].dimfactor < LIM_SDF_L)
2750 SpotStore[Secondary][1].dimfactor = LIM_SDF_L;
2751 snprintf(InitString, sizeof(InitString), "%6.3f", SpotStore[Secondary][1].dimfactor);
2752 gtk_entry_set_text (GTK_ENTRY (e_416), InitString);
2753 gtk_entry_select_region (GTK_ENTRY (e_416),
2754 0, GTK_ENTRY(e_416)->text_length);
2755 gtk_table_attach (GTK_TABLE(table), e_416, 3, 4, 4, 5,
2756 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2757 gtk_widget_show (e_416);
2758
2759 button = gtk_toggle_button_new_with_label (_("Dimfactor:"));
2760 if (FitSpotS[25-10] == ON)
2761 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2762 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2763 GTK_SIGNAL_FUNC (toggle_fit_spot), (gpointer) "25");
2764 gtk_tooltips_set_tip (tooltips, button,
2765 _("Toggle CONST/FIT for dimfactor"), NULL);
2766 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 4, 5,
2767 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2768 gtk_widget_show (button);
2769
2770
2771 gtk_widget_show (table);
2772 gtk_box_pack_start (GTK_BOX (box2), table, FALSE, FALSE, 0);
2773
2774 spots_secondary_skipped:
2775
2776 /* --------------- Seventh Page ----------------------------------- */
2777
2778 if (Flags.edu == ON)
2779 goto third_light_skipped;
2780
2781 label = gtk_label_new (_("Third Light"));
2782 box1 = gtk_hbox_new (TRUE, 0);
2783 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), box1, label);
2784
2785 gtk_widget_show (label);
2786 gtk_widget_show (box1);
2787
2788 box2 = gtk_vbox_new (FALSE, 0);
2789 gtk_container_set_border_width (GTK_CONTAINER (box2), 0);
2790 gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
2791 gtk_widget_show (box2);
2792
2793 table = gtk_table_new (8, 4, TRUE);
2794
2795 e_501 = gtk_entry_new_with_max_length (10);
2796 gtk_signal_connect(GTK_OBJECT(e_501), "changed",
2797 GTK_SIGNAL_FUNC(enter_thirdU),
2798 e_501);
2799 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[Umag]);
2800 gtk_entry_set_text (GTK_ENTRY (e_501), InitString);
2801 gtk_entry_select_region (GTK_ENTRY (e_501),
2802 0, GTK_ENTRY(e_501)->text_length);
2803 gtk_table_attach (GTK_TABLE(table), e_501, 1, 2, 0, 1,
2804 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2805 gtk_widget_show (e_501);
2806
2807
2808 snprintf(InitString, sizeof(InitString),
2809 _("Toggle CONST/FIT for third light in %s"), Filters[Umag]);
2810 button = gtk_toggle_button_new_with_label (Filters[Umag]);
2811 if (Flags.simplex[28] == ON)
2812 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2813 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2814 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "28");
2815 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
2816 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 0, 1,
2817 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2818 gtk_widget_show (button);
2819
2820 e_502 = gtk_entry_new_with_max_length (10);
2821 gtk_signal_connect(GTK_OBJECT(e_502), "changed",
2822 GTK_SIGNAL_FUNC(enter_thirdB),
2823 e_502);
2824 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[Bmag]);
2825 gtk_entry_set_text (GTK_ENTRY (e_502), InitString);
2826 gtk_entry_select_region (GTK_ENTRY (e_502),
2827 0, GTK_ENTRY(e_502)->text_length);
2828 gtk_table_attach (GTK_TABLE(table), e_502, 1, 2, 1, 2,
2829 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2830 gtk_widget_show (e_502);
2831
2832
2833 snprintf(InitString, sizeof(InitString),
2834 _("Toggle CONST/FIT for third light in %s"), Filters[Bmag]);
2835 button = gtk_toggle_button_new_with_label (Filters[Bmag]);
2836 if (Flags.simplex[29] == ON)
2837 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2838 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2839 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "29");
2840 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
2841 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 1, 2,
2842 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2843 gtk_widget_show (button);
2844
2845 e_503 = gtk_entry_new_with_max_length (10);
2846 gtk_signal_connect(GTK_OBJECT(e_503), "changed",
2847 GTK_SIGNAL_FUNC(enter_thirdV),
2848 e_503);
2849 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[Vmag]);
2850 gtk_entry_set_text (GTK_ENTRY (e_503), InitString);
2851 gtk_entry_select_region (GTK_ENTRY (e_503),
2852 0, GTK_ENTRY(e_503)->text_length);
2853 gtk_table_attach (GTK_TABLE(table), e_503, 1, 2, 2, 3,
2854 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2855 gtk_widget_show (e_503);
2856
2857
2858 snprintf(InitString, sizeof(InitString),
2859 _("Toggle CONST/FIT for third light in %s"), Filters[Vmag]);
2860 button = gtk_toggle_button_new_with_label (Filters[Vmag]);
2861 if (Flags.simplex[30] == ON)
2862 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2863 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2864 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "30");
2865 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
2866 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 2, 3,
2867 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2868 gtk_widget_show (button);
2869
2870 e_504 = gtk_entry_new_with_max_length (10);
2871 gtk_signal_connect(GTK_OBJECT(e_504), "changed",
2872 GTK_SIGNAL_FUNC(enter_thirdR),
2873 e_504);
2874 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[Rmag]);
2875 gtk_entry_set_text (GTK_ENTRY (e_504), InitString);
2876 gtk_entry_select_region (GTK_ENTRY (e_504),
2877 0, GTK_ENTRY(e_504)->text_length);
2878 gtk_table_attach (GTK_TABLE(table), e_504, 1, 2, 3, 4,
2879 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2880 gtk_widget_show (e_504);
2881
2882
2883 snprintf(InitString, sizeof(InitString),
2884 _("Toggle CONST/FIT for third light in %s"), Filters[Rmag]);
2885 button = gtk_toggle_button_new_with_label (Filters[Rmag]);
2886 if (Flags.simplex[31] == ON)
2887 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2888 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2889 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "31");
2890 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
2891 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 3, 4,
2892 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2893 gtk_widget_show (button);
2894
2895 e_505 = gtk_entry_new_with_max_length (10);
2896 gtk_signal_connect(GTK_OBJECT(e_505), "changed",
2897 GTK_SIGNAL_FUNC(enter_thirdI),
2898 e_505);
2899 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[Imag]);
2900 gtk_entry_set_text (GTK_ENTRY (e_505), InitString);
2901 gtk_entry_select_region (GTK_ENTRY (e_505),
2902 0, GTK_ENTRY(e_505)->text_length);
2903 gtk_table_attach (GTK_TABLE(table), e_505, 1, 2, 4, 5,
2904 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2905 gtk_widget_show (e_505);
2906
2907 snprintf(InitString, sizeof(InitString),
2908 _("Toggle CONST/FIT for third light in %s"), Filters[Imag]);
2909 button = gtk_toggle_button_new_with_label (Filters[Imag]);
2910 if (Flags.simplex[32] == ON)
2911 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2912 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2913 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "32");
2914 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
2915 gtk_table_attach (GTK_TABLE(table), button, 0, 1, 4, 5,
2916 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2917 gtk_widget_show (button);
2918
2919 e_506 = gtk_entry_new_with_max_length (10);
2920 gtk_signal_connect(GTK_OBJECT(e_506), "changed",
2921 GTK_SIGNAL_FUNC(enter_thirdJ),
2922 e_506);
2923 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[Jmag]);
2924 gtk_entry_set_text (GTK_ENTRY (e_506), InitString);
2925 gtk_entry_select_region (GTK_ENTRY (e_506),
2926 0, GTK_ENTRY(e_506)->text_length);
2927 gtk_table_attach (GTK_TABLE(table), e_506, 3, 4, 0, 1,
2928 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2929 gtk_widget_show (e_506);
2930
2931
2932 snprintf(InitString, sizeof(InitString),
2933 _("Toggle CONST/FIT for third light in %s"), Filters[Jmag]);
2934 button = gtk_toggle_button_new_with_label (Filters[Jmag]);
2935 if (Flags.simplex[33] == ON)
2936 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2937 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2938 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "33");
2939 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
2940 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 0, 1,
2941 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2942 gtk_widget_show (button);
2943
2944 e_507 = gtk_entry_new_with_max_length (10);
2945 gtk_signal_connect(GTK_OBJECT(e_507), "changed",
2946 GTK_SIGNAL_FUNC(enter_thirdH),
2947 e_507);
2948 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[Hmag]);
2949 gtk_entry_set_text (GTK_ENTRY (e_507), InitString);
2950 gtk_entry_select_region (GTK_ENTRY (e_507),
2951 0, GTK_ENTRY(e_507)->text_length);
2952 gtk_table_attach (GTK_TABLE(table), e_507, 3, 4, 1, 2,
2953 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2954 gtk_widget_show (e_507);
2955
2956
2957 snprintf(InitString, sizeof(InitString),
2958 _("Toggle CONST/FIT for third light in %s"), Filters[Hmag]);
2959 button = gtk_toggle_button_new_with_label (Filters[Hmag]);
2960 if (Flags.simplex[34] == ON)
2961 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2962 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2963 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "34");
2964 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
2965 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 1, 2,
2966 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2967 gtk_widget_show (button);
2968
2969 e_508 = gtk_entry_new_with_max_length (10);
2970 gtk_signal_connect(GTK_OBJECT(e_508), "changed",
2971 GTK_SIGNAL_FUNC(enter_thirdK),
2972 e_508);
2973 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[Kmag]);
2974 gtk_entry_set_text (GTK_ENTRY (e_508), InitString);
2975 gtk_entry_select_region (GTK_ENTRY (e_508),
2976 0, GTK_ENTRY(e_508)->text_length);
2977 gtk_table_attach (GTK_TABLE(table), e_508, 3, 4, 2, 3,
2978 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2979 gtk_widget_show (e_508);
2980
2981
2982 snprintf(InitString, sizeof(InitString),
2983 _("Toggle CONST/FIT for third light in %s"), Filters[Kmag]);
2984 button = gtk_toggle_button_new_with_label (Filters[Kmag]);
2985 if (Flags.simplex[35] == ON)
2986 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2987 gtk_signal_connect (GTK_OBJECT (button), "toggled",
2988 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "35");
2989 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
2990 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 2, 3,
2991 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
2992 gtk_widget_show (button);
2993
2994 e_509 = gtk_entry_new_with_max_length (10);
2995 gtk_signal_connect(GTK_OBJECT(e_509), "changed",
2996 GTK_SIGNAL_FUNC(enter_thirdu),
2997 e_509);
2998 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[umag]);
2999 gtk_entry_set_text (GTK_ENTRY (e_509), InitString);
3000 gtk_entry_select_region (GTK_ENTRY (e_509),
3001 0, GTK_ENTRY(e_509)->text_length);
3002 gtk_table_attach (GTK_TABLE(table), e_509, 3, 4, 4, 5,
3003 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
3004 gtk_widget_show (e_509);
3005
3006
3007 snprintf(InitString, sizeof(InitString),
3008 _("Toggle CONST/FIT for third light in %s"), Filters[umag]);
3009 button = gtk_toggle_button_new_with_label (Filters[umag]);
3010 if (Flags.simplex[36] == ON)
3011 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
3012 gtk_signal_connect (GTK_OBJECT (button), "toggled",
3013 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "36");
3014 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
3015 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 4, 5,
3016 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
3017 gtk_widget_show (button);
3018
3019 e_510 = gtk_entry_new_with_max_length (10);
3020 gtk_signal_connect(GTK_OBJECT(e_510), "changed",
3021 GTK_SIGNAL_FUNC(enter_thirdv),
3022 e_510);
3023 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[vmag]);
3024 gtk_entry_set_text (GTK_ENTRY (e_510), InitString);
3025 gtk_entry_select_region (GTK_ENTRY (e_510),
3026 0, GTK_ENTRY(e_510)->text_length);
3027 gtk_table_attach (GTK_TABLE(table), e_510, 3, 4, 5, 6,
3028 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
3029 gtk_widget_show (e_510);
3030
3031
3032 snprintf(InitString, sizeof(InitString),
3033 _("Toggle CONST/FIT for third light in %s"), Filters[vmag]);
3034 button = gtk_toggle_button_new_with_label (Filters[vmag]);
3035 if (Flags.simplex[37] == ON)
3036 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
3037 gtk_signal_connect (GTK_OBJECT (button), "toggled",
3038 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "37");
3039 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
3040 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 5, 6,
3041 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
3042 gtk_widget_show (button);
3043
3044 e_511 = gtk_entry_new_with_max_length (10);
3045 gtk_signal_connect(GTK_OBJECT(e_511), "changed",
3046 GTK_SIGNAL_FUNC(enter_thirdb),
3047 e_511);
3048 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[bmag]);
3049 gtk_entry_set_text (GTK_ENTRY (e_511), InitString);
3050 gtk_entry_select_region (GTK_ENTRY (e_511),
3051 0, GTK_ENTRY(e_511)->text_length);
3052 gtk_table_attach (GTK_TABLE(table), e_511, 3, 4, 6, 7,
3053 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
3054 gtk_widget_show (e_511);
3055
3056
3057 snprintf(InitString, sizeof(InitString),
3058 _("Toggle CONST/FIT for third light in %s"), Filters[bmag]);
3059 button = gtk_toggle_button_new_with_label (Filters[bmag]);
3060 if (Flags.simplex[38] == ON)
3061 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
3062 gtk_signal_connect (GTK_OBJECT (button), "toggled",
3063 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "38");
3064 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
3065 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 6, 7,
3066 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
3067 gtk_widget_show (button);
3068
3069 e_512 = gtk_entry_new_with_max_length (10);
3070 gtk_signal_connect(GTK_OBJECT(e_512), "changed",
3071 GTK_SIGNAL_FUNC(enter_thirdy),
3072 e_512);
3073 snprintf(InitString, sizeof(InitString), "%6.3f", Orbit.Third[ymag]);
3074 gtk_entry_set_text (GTK_ENTRY (e_512), InitString);
3075 gtk_entry_select_region (GTK_ENTRY (e_512),
3076 0, GTK_ENTRY(e_512)->text_length);
3077 gtk_table_attach (GTK_TABLE(table), e_512, 3, 4, 7, 8,
3078 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
3079 gtk_widget_show (e_512);
3080
3081
3082 snprintf(InitString, sizeof(InitString),
3083 _("Toggle CONST/FIT for third light in %s"), Filters[ymag]);
3084 button = gtk_toggle_button_new_with_label (Filters[ymag]);
3085 if (Flags.simplex[39] == ON)
3086 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
3087 gtk_signal_connect (GTK_OBJECT (button), "toggled",
3088 GTK_SIGNAL_FUNC (toggle_fit), (gpointer) "39");
3089 gtk_tooltips_set_tip (tooltips, button, InitString, NULL);
3090 gtk_table_attach (GTK_TABLE(table), button, 2, 3, 7, 8,
3091 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 2, 2);
3092 gtk_widget_show (button);
3093
3094
3095 gtk_widget_show (table);
3096 gtk_box_pack_start (GTK_BOX (box2), table, FALSE, FALSE, 0);
3097
3098 third_light_skipped:
3099
3100 /* >>>>>>>>>>> the progress bar <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
3101
3102
3103 #ifdef HAVE_GNOME
3104
3105 status_bar =
3106 GNOME_APPBAR (gnome_appbar_new(TRUE, TRUE, GNOME_PREFERENCES_NEVER));
3107 progress_bar = GTK_WIDGET(gnome_appbar_get_progress(status_bar));
3108 gnome_appbar_set_default(status_bar, _("Waiting"));
3109 gnome_app_set_statusbar(GNOME_APP(top_window), GTK_WIDGET(status_bar));
3110
3111 #else
3112
3113 box4 = gtk_vbox_new (FALSE, 0);
3114 gtk_box_pack_start (GTK_BOX (box3), box4, FALSE, FALSE, 0);
3115
3116 table = gtk_table_new (5, 1, FALSE /* TRUE */);
3117 gtk_widget_show (table);
3118 gtk_box_pack_start (GTK_BOX (box4), table, FALSE, FALSE, 0);
3119
3120 status_bar = gtk_statusbar_new();
3121 gtk_table_attach (GTK_TABLE(table), status_bar, 0, 3, 0, 1,
3122 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0);
3123 context_id =
3124 gtk_statusbar_get_context_id( GTK_STATUSBAR(status_bar),
3125 _("Waiting"));
3126 gtk_statusbar_push(GTK_STATUSBAR(status_bar), context_id, _("Waiting"));
3127 gtk_widget_show (status_bar);
3128
3129 progress_bar = gtk_progress_bar_new ();
3130 gtk_table_attach (GTK_TABLE(table), progress_bar, 3, 5, 0, 1,
3131 GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0);
3132 gtk_widget_show (progress_bar);
3133
3134 gtk_widget_show (box4);
3135 #endif
3136
3137 gtk_widget_show (box3);
3138
3139 gtk_widget_show (top_window);
3140
3141 #ifdef HAVE_GNOME
3142 if (restarted == 1) gtk_notebook_set_page(GTK_NOTEBOOK(notebook), old_page);
3143 #endif
3144
3145 /* >>>>>>>>>>> enter main loop <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
3146
3147 gtk_main ();
3148
3149 return 0;
3150 }
3151
3152 #endif
3153
3154
3155
3156
3157
3158