Subsurface and gtk 3.0

Lubomir I. Ivanov neolit123 at gmail.com
Mon Sep 30 06:00:10 UTC 2013


On 30 September 2013 15:30, Peter Suetterlin <P.Suetterlin at royac.iac.es> wrote:
>
>
>   Hi all,
>
> I just got a new dive computer that is now supported by
> libdivecomputer&Subsurface, so I wanted to install 3.1.1
>
> I'm running on a gtk3-enabled system (openSUSE 12.3), so also osm-gps-map is
> linked against it and I need to compile Subsurface with it, too.
>
> After some googling I found Linus' post with the patch and figured out things
> are in place, except for the Makefile.  I changed it, and almost everything
> compiles - except, gtk-gui.c has one reference to GTK_OBJECT left.  The
> proper(?) code was in Linus' patch, but not marked as a change.  Here's my
> diff:
>
> --- gtk-gui.c.orig      2013-06-30 17:47:46.000000000 +0100
> +++ gtk-gui.c   2013-09-30 13:12:25.855013190 +0100
> @@ -1289,7 +1289,7 @@
>  #else
>         g_signal_connect(GTK_ABOUT_DIALOG(dialog), "activate-link", G_CALLBACK(about_dialog_link_cb), NULL);
>  #endif
> -       g_object_set(GTK_OBJECT(dialog),
> +       gtk_show_about_dialog(NULL,
>                 "title", _("About Subsurface"),
>                 "program-name", "Subsurface",
>                 "comments", _("Multi-platform divelog software in C"),
>
> With that, it compiles&runs fine.
>
> I know the switch to QT is underway - but maybe someone finds this
> nevertheless helpfull :)
>

hello,
this patch would work (using gtk_show_about_dialog()), but it breaks
the about dialog url hooks on Mac and Windows builds.
g_object_set() with G_OBJECT (instead of GTK_OBJECT) should be used.

that code your are changing was last modified by me and i never got a
GTK3 setup to test it with, TBH.

lubomir
--


More information about the subsurface mailing list