11
11
More details can be found at the project home page:
13
13
http://gpredict.oz9aec.net/
15
15
This program is free software; you can redistribute it and/or modify
16
16
it under the terms of the GNU General Public License as published by
17
17
the Free Software Foundation; either version 2 of the License, or
265
266
* of fullscreen modules.
269
show_pass (const gchar *satname, qth_t *qth, pass_t *pass, GtkWidget *toplevel)
269
void show_pass (const gchar *satname, qth_t *qth, pass_t *pass, GtkWidget *toplevel)
271
271
GtkWidget *dialog; /* the dialogue window */
272
272
GtkWidget *notebook; /* the notebook widet */
369
369
SINGLE_PASS_COL_MA, detail->ma,
370
370
SINGLE_PASS_COL_PHASE, detail->phase,
373
373
/* SINGLE_PASS_COL_RA */
374
374
/* SINGLE_PASS_COL_DEC */
375
375
if (flags & (SINGLE_PASS_FLAG_RA | SINGLE_PASS_FLAG_DEC)) {
517
517
g_signal_connect (dialog, "response",
518
518
G_CALLBACK (single_pass_response), NULL);
519
g_signal_connect (dialog, "destroy",
519
g_signal_connect (dialog, "destroy",
520
520
G_CALLBACK (single_pass_dialog_destroy), NULL);
521
521
g_signal_connect (dialog, "delete_event",
522
522
G_CALLBACK (single_pass_dialog_delete), NULL);
538
538
* Use sat, qth, and passes labels to obtain the relevant data
542
single_pass_response (GtkWidget *dialog, gint response, gpointer data)
541
static void single_pass_response (GtkWidget *dialog, gint response, gpointer data)
545
544
switch (response) {
547
546
case RESPONSE_PRINT:
548
547
sat_log_log (SAT_LOG_LEVEL_ERROR,
549
548
_("%s: PRINT not implemented"),
551
pass_t *pass = (pass_t *) g_object_get_data (G_OBJECT (dialog), "pass");
552
qth_t *qth = (qth_t *) g_object_get_data (G_OBJECT (dialog), "qth");
554
print_pass (pass, qth, GTK_WINDOW (dialog));
553
557
case RESPONSE_SAVE:
566
570
/** \brief Set cell renderer function. */
568
check_and_set_single_cell_renderer (GtkTreeViewColumn *column,
569
GtkCellRenderer *renderer,
571
static void check_and_set_single_cell_renderer (GtkTreeViewColumn *column,
572
GtkCellRenderer *renderer,
660
663
displayed (rendered), the tree_store will still contain the
661
664
original flaoting point numbers. Very cool!
664
latlon_cell_data_function (GtkTreeViewColumn *col,
665
GtkCellRenderer *renderer,
666
static void latlon_cell_data_function (GtkTreeViewColumn *col,
667
GtkCellRenderer *renderer,
670
672
gdouble number = 0.0;
719
721
/* general floats with 2 digits + degree char */
721
degree_cell_data_function (GtkTreeViewColumn *col,
722
GtkCellRenderer *renderer,
722
static void degree_cell_data_function (GtkTreeViewColumn *col,
723
GtkCellRenderer *renderer,
743
744
/* distance and velocity, 0 decimal digits */
745
distance_cell_data_function (GtkTreeViewColumn *col,
746
GtkCellRenderer *renderer,
745
static void distance_cell_data_function (GtkTreeViewColumn *col,
746
GtkCellRenderer *renderer,
770
770
/* range rate is special, because we may need to convert to miles
771
771
and want 2-3 decimal digits.
774
range_rate_cell_data_function (GtkTreeViewColumn *col,
775
GtkCellRenderer *renderer,
773
static void range_rate_cell_data_function (GtkTreeViewColumn *col,
774
GtkCellRenderer *renderer,
799
798
/* 0 decimal digits */
801
float_to_int_cell_data_function (GtkTreeViewColumn *col,
802
GtkCellRenderer *renderer,
799
static void float_to_int_cell_data_function (GtkTreeViewColumn *col,
800
GtkCellRenderer *renderer,
821
819
/* 2 decimal digits */
823
two_dec_cell_data_function (GtkTreeViewColumn *col,
824
GtkCellRenderer *renderer,
820
static void two_dec_cell_data_function (GtkTreeViewColumn *col,
821
GtkCellRenderer *renderer,
844
841
/* AOS/LOS; convert julian date to string */
846
time_cell_data_function (GtkTreeViewColumn *col,
847
GtkCellRenderer *renderer,
842
static void time_cell_data_function (GtkTreeViewColumn *col,
843
GtkCellRenderer *renderer,
853
849
gchar buff[TIME_FORMAT_MAX_LENGTH];
902
single_pass_dialog_delete (GtkWidget *dialog, GdkEvent *event, gpointer pass)
897
static gint single_pass_dialog_delete (GtkWidget *dialog, GdkEvent *event, gpointer pass)
904
899
/* dialog will be destroyed */
909
single_pass_dialog_destroy (GtkWidget *dialog, gpointer data)
903
static void single_pass_dialog_destroy (GtkWidget *dialog, gpointer data)
911
905
pass_t *pass = PASS(g_object_get_data (G_OBJECT (dialog), "pass"));
919
913
/*** FIXME: formalise with other copies */
921
Calc_RADec (gdouble jul_utc, gdouble saz, gdouble sel,
922
qth_t *qth, obs_astro_t *obs_set)
914
static void Calc_RADec (gdouble jul_utc, gdouble saz, gdouble sel,
915
qth_t *qth, obs_astro_t *obs_set)
925
918
double phi,theta,sin_theta,cos_theta,sin_phi,cos_phi,
926
az,el,Lxh,Lyh,Lzh,Sx,Ex,Zx,Sy,Ey,Zy,Sz,Ez,Zz,
927
Lx,Ly,Lz,cos_delta,sin_alpha,cos_alpha;
919
az,el,Lxh,Lyh,Lzh,Sx,Ex,Zx,Sy,Ey,Zy,Sz,Ez,Zz,
920
Lx,Ly,Lz,cos_delta,sin_alpha,cos_alpha;
928
921
geodetic_t geodetic;
978
971
* details of a pass.
982
show_passes (const gchar *satname, qth_t *qth, GSList *passes, GtkWidget *toplevel)
974
void show_passes (const gchar *satname, qth_t *qth, GSList *passes, GtkWidget *toplevel)
984
976
GtkWidget *dialog;
1151
1143
* Use sat, qth, and passes labels to obtain the relevant data
1155
multi_pass_response (GtkWidget *dialog, gint response, gpointer data)
1146
static void multi_pass_response (GtkWidget *dialog, gint response, gpointer data)
1157
1148
switch (response) {
1159
1150
case RESPONSE_PRINT:
1160
1151
sat_log_log (SAT_LOG_LEVEL_ERROR,
1161
1152
_("%s: PRINT not implemented"),
1165
1156
case RESPONSE_SAVE:
1179
multi_pass_dialog_delete (GtkWidget *dialog, GdkEvent *event, gpointer pass)
1169
static gint multi_pass_dialog_delete (GtkWidget *dialog, GdkEvent *event, gpointer pass)
1181
1171
/* dialog will be destroyed */
1187
multi_pass_dialog_destroy (GtkWidget *dialog, gpointer data)
1176
static void multi_pass_dialog_destroy (GtkWidget *dialog, gpointer data)
1189
1178
GSList *passes = (GSList *) g_object_get_data (G_OBJECT (dialog), "passes");
1198
1187
/** \brief Set cell renderer function. */
1200
check_and_set_multi_cell_renderer (GtkTreeViewColumn *column,
1201
GtkCellRenderer *renderer,
1188
static void check_and_set_multi_cell_renderer (GtkTreeViewColumn *column,
1189
GtkCellRenderer *renderer,
1248
1236
/* duration; convert delta t in days to HH:MM:SS */
1250
duration_cell_data_function (GtkTreeViewColumn *col,
1251
GtkCellRenderer *renderer,
1252
GtkTreeModel *model,
1237
static void duration_cell_data_function (GtkTreeViewColumn *col,
1238
GtkCellRenderer *renderer,
1239
GtkTreeModel *model,
1256
1243
gdouble number;
1323
1310
* usually happens if the user presses SHJIFT-F10? It is used as a wrapper
1324
1311
* for the function that actually creates the popup menu.
1327
popup_menu_cb (GtkWidget *treeview, gpointer data)
1313
static gboolean popup_menu_cb (GtkWidget *treeview, gpointer data)
1330
1316
/* if there is no selection, select the first row */
1342
1328
* \param list Pointer to the GtkSatList widget.
1346
button_press_cb (GtkWidget *treeview, GdkEventButton *event, gpointer data)
1331
static gboolean button_press_cb (GtkWidget *treeview, GdkEventButton *event, gpointer data)
1349
1334
/* single click with the right mouse button? */
1388
view_popup_menu (GtkWidget *treeview, GdkEventButton *event, gpointer data)
1372
static void view_popup_menu (GtkWidget *treeview, GdkEventButton *event, gpointer data)
1390
1374
GtkTreeSelection *selection;
1391
1375
GtkTreeModel *model;