This solves two problems with the orbit number calculations:
- When age = 0, the orbit number must match the TLE revnum. However,
the expression inside the floor(..) can be give a non-zero value.
We need to subtract the result of the floor(..) with age = 0 to
account for this.
- In gtk-sat-data.c, the sign of the term involving the argument of
perigee and mean anomaly at epoch is wrong. The term should have
a positive sign, since it counts as an increasing fraction of a
revolution measured from the ascending node.
On a Wayland system, we can't get the primary monitor due to protocol
shortage[1]. This caused gpredict to print a critical message like:
Gdk-CRITICAL **: 02:03:59.960: gdk_monitor_get_workarea: assertion
'GDK_IS_MONITOR (monitor)' failed
Because it failed get the primary monitor, `w` and `h` were just plain
garbage.
Instead of trying to get the primary monitor, this commit gets the
monitor the window is on. This commit has been tested both on a
Wayland and a X11 session.
https://gitlab.gnome.org/GNOME/gtk/-/issues/1028
Signed-off-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
Replace deprecated g_get_current_time() and GTimeVal with newer
g_get_real_time(), or GDateTime. All functions used in this commit
have been available since 2.26.
- since 2.28
- g_get_real_time()
- since 2.26
- g_date_time_new_local()
- g_date_time_format()
This closes#237
Signed-off-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
GClassInitFunc() and GInstanceInitFunc() of GTypeInfo takes gpointer
class_data and gpointer g_class as the second argument, respectively.
We don't use them but the current GCC generates warnings like the
followings:
gtk-polar-plot.c: In function ‘gtk_polar_plot_get_type’:
gtk-polar-plot.c:109:13: warning: cast between incompatible
function types from ‘void (*)(GtkPolarPlotClass *)’ {aka
‘void (*)(struct _GtkPolarPlotClass *)’} to
‘void (*)(void *, void *)’ [-Wcast-function-type]
109 | (GClassInitFunc) gtk_polar_plot_class_init,
| ^
Add the second arguments to all functions and mark them unused by
casting with void.
Signed-off-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
The first argument to g_idle_add() is a GSourceFunc, which is
declared
gboolean (*GSourceFunc) (gpointer user_data);
gtk_freq_knob_update() was somehow changed to return a pointer in the
commit 677ebd8826, but it should be gboolean.
Signed-off-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
- Ensure confirmation dialog is centered on parent window.
- Don'tclose module if user cancels the deletion.
- Show reason for error when deletion fails.
- Use correct log level when deletion succeeds.