Skip to content

Commit 2a57f14

Browse files
bgermanncsete
authored andcommitted
Port GooCanvas to native GTK3/Cairo drawing
Replace all GooCanvas-based canvas widgets with GtkDrawingArea and Cairo for rendering satellite tracking visualizations: - gtk-polar-view: Polar plot for real-time satellite tracking - gtk-polar-plot: Polar plot for pass visualization - gtk-azel-plot: Azimuth/Elevation time plot - gtk-sat-map: World map with satellite positions and ground tracks - gtk-sky-glance: Timeline view of upcoming passes Key changes: - Replace GooCanvasItemModel objects with coordinate fields in structs - Implement on_draw() callbacks using Cairo API for all rendering - Add manual hit testing for mouse interactions - Store render state (points, colors, positions) in widget structures - Use gtk_widget_queue_draw() to trigger redraws Build system updates: - Remove goocanvas-2.0/3.0 pkg-config checks from configure.ac - Add explicit gtk+-3.0 dependency check - Update CI workflows and snap This eliminates the external GooCanvas library dependency, reducing build complexity and improving portability. The application now only requires GTK+ 3.0 and standard system libraries. Fixes: #369
1 parent 6d298e5 commit 2a57f14

21 files changed

Lines changed: 2759 additions & 4302 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run: |
2121
sudo apt-get update
2222
sudo apt-get install -y build-essential libtool intltool autoconf automake libcurl4-openssl-dev \
23-
pkg-config libglib2.0-dev libgtk-3-dev libgoocanvas-2.0-dev
23+
pkg-config libglib2.0-dev libgtk-3-dev
2424
2525
- name: Run autoconf
2626
run: ./autogen.sh

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ compiler:
99
before_install:
1010
- sudo apt-get update -qq
1111
- sudo apt-get install -y libtool intltool autoconf automake libcurl4-openssl-dev
12-
- sudo apt-get install -y pkg-config libglib2.0-dev libgtk-3-dev libgoocanvas-2.0-dev
12+
- sudo apt-get install -y pkg-config libglib2.0-dev libgtk-3-dev
1313

1414
script:
1515
- ./autogen.sh

README

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ for successful compilation of Gpredict:
3131

3232
- Gtk+ 3 or later
3333
- GLib 2.32 or later
34-
- GooCanvas 2 or 3
3534
- Libcurl 7.16 or later
3635
- Hamlib (runtime only, not required for build)
3736

@@ -40,7 +39,7 @@ often with -dev or -devel in the package name, e.g. libgtk-3-dev. On Debian and
4039
Ubuntu systems you can install the build dependencies using:
4140

4241
sudo apt install libtool intltool autoconf automake libcurl4-openssl-dev
43-
sudo apt install pkg-config libglib2.0-dev libgtk-3-dev libgoocanvas-2.0-dev
42+
sudo apt install pkg-config libglib2.0-dev libgtk-3-dev
4443

4544

4645
To build and install gpredict from source, first unpack the source package:

configure.ac

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,12 @@ else
4747
AC_MSG_ERROR(Gpredict requires libglib-dev 2.40 or later)
4848
fi
4949

50-
# check for goocanvas 2 or 3 (depends on gtk and glib)
51-
if $PKG_CONFIG --atleast-version=2.0 goocanvas-2.0; then
52-
CFLAGS="$CFLAGS `$PKG_CONFIG --cflags goocanvas-2.0`"
53-
LIBS="$LIBS `$PKG_CONFIG --libs goocanvas-2.0`"
54-
havegoocanvas2=true
50+
# check for gtk+ 3.0 or later
51+
if $PKG_CONFIG --atleast-version=3.0 gtk+-3.0; then
52+
CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gtk+-3.0`"
53+
LIBS="$LIBS `$PKG_CONFIG --libs gtk+-3.0`"
5554
else
56-
if $PKG_CONFIG --atleast-version=3.0 goocanvas-3.0; then
57-
CFLAGS="$CFLAGS `$PKG_CONFIG --cflags goocanvas-3.0`"
58-
LIBS="$LIBS `$PKG_CONFIG --libs goocanvas-3.0`"
59-
havegoocanvas3=true
60-
else
61-
AC_MSG_ERROR(Gpredict requires libgoocanvas-2.0-dev)
62-
fi
55+
AC_MSG_ERROR(Gpredict requires libgtk-3-dev)
6356
fi
6457

6558
# check for libgps (optional)
@@ -103,12 +96,6 @@ GTHR_V=`$PKG_CONFIG --modversion gthread-2.0`
10396
GDK_V=`$PKG_CONFIG --modversion gdk-3.0`
10497
GTK_V=`$PKG_CONFIG --modversion gtk+-3.0`
10598
CURL_V=`$PKG_CONFIG --modversion libcurl`
106-
if test "$havegoocanvas2" = true ; then
107-
GOOC_V=`$PKG_CONFIG --modversion goocanvas-2.0`
108-
fi
109-
if test "$havegoocanvas3" = true ; then
110-
GOOC_V=`$PKG_CONFIG --modversion goocanvas-3.0`
111-
fi
11299
if test "$havelibgps" = true ; then
113100
GPS_V=`$PKG_CONFIG --modversion libgps`
114101
fi
@@ -148,7 +135,6 @@ echo Gio version........ : $GIO_V
148135
echo Gthread version.... : $GTHR_V
149136
echo Gdk version........ : $GDK_V
150137
echo Gtk+ version....... : $GTK_V
151-
echo GooCanvas version.. : $GOOC_V
152138
echo Libcurl version.... : $CURL_V
153139
if test "$havelibgps" = true ; then
154140
echo Libgps version..... : $GPS_V

snap/snapcraft.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ parts:
2222
- libgtk-3-dev
2323
- libcurl4-openssl-dev
2424
- libglib2.0-dev
25-
- libgoocanvas-2.0-dev
2625
stage-packages:
2726
- libcanberra-gtk3-module
2827

0 commit comments

Comments
 (0)