GNOME Bugzilla – Bug 558709
Get rid of libgnome
Last modified: 2008-11-01 16:27:02 UTC
We need to get rid of libgnome usage in goffice. welinder@sequoia:~/gnome-src/goffice> find . -type f -name '*.[chy]' -print | xargs -n100 grep -i GOFFICE_WITH_GNOME ./goffice/app/go-conf.c:#ifdef GOFFICE_WITH_GNOME ./goffice/utils/go-file.c:#ifdef GOFFICE_WITH_GNOME ./goffice/utils/go-file.c:#ifndef GOFFICE_WITH_GNOME ./goffice/utils/go-file.c:#ifdef GOFFICE_WITH_GNOME ./goffice/gtk/goffice-gtk.c:#ifdef GOFFICE_WITH_GNOME ./goffice/gtk/goffice-gtk.c:#ifdef GOFFICE_WITH_GNOME ./goffice/goffice-config.h:#define GOFFICE_WITH_GNOME 1 ./goffice/goffice-features.h:#define GOFFICE_WITH_GNOME 1 1. goffice/app/go-conf.c is about gconf, not libgnome. configure needs to be modified to check for gconf separately. 2. goffice/utils/go-file.c: this is all about go_url_show. We should test for gtk_show_uri and use that if present. The win32 version can then be dropped [i.e., require 2.13.1 on win32] and fall back on the plain search-for-a-browser elsewhere. 3. goffice/gtk/goffice-gtk.c: this is for go_help_display. What do we do here? Perhaps search for yelp and throw it a url?
1. fully agreed, I already proposed that some times ago. 2. I'm waiting for gtk+-2.14 in debian sid to to that. 3. gio supports ghelp:// uris, so gtk_show_uri should do the trick.
Created attachment 121775 [details] [review] proposed patch (not tested with gtk-2.14) I would not remove GOFFICE_WITH_GNOME until we require gtk+-2.0 >= 2.14.0, but make it unused when gtk_show_uri is present. This patch has not been tested with gtk+-2.14.x, so I'm not sure everything works, especially the go_help_display.
Cut-and-pasto: + AC_DEFINE(HAVE_GTK_SHOW_URI, 1, [Define to 1 if you have the `gtk_tool_item_set_tooltip_text' function.]) Please go ahead and commit. Then we can sort out any problems. For example, gconf should probably default off on win32, so the win32 check needs to move up.
Does that close this bug?
(In reply to comment #2) > I would not remove GOFFICE_WITH_GNOME until we require gtk+-2.0 >= 2.14.0, but > make it unused when gtk_show_uri is present. You can use g_app_info_launch_default_for_uri() if gtk_show_uri is not present. The function g_app_info_launch_default_for_uri is in the for libgoffice required version of gio 2.16 >=. Thus, you can remove gnome_help_display and the libgnome dependency. Furthermore, your commit in http://svn.gnome.org/viewvc/goffice?view=revision&revision=2257 did not include the changed configure.in file.
configure.in commited (and fixed). g_app_info_launch_default_for_uri does work, so I'll kick out libgnome* i a few minutes.
fixed, no more WITH_GNOME code :-)