GNOME Bugzilla – Bug 590995
Remove libgnome(ui) usage
Last modified: 2010-02-08 01:17:25 UTC
http://live.gnome.org/LibgnomeMustDie I am aware that GHex is not an official part of GNOME but it would be more than welcome to clean up the codebase, also for GNOME distributors. For automated statistics see http://www.gnome.org/~fpeters/299.html . ./src/gnome-print-font-picker.c:#include <libgnome/gnome-macros.h> ./src/gnome-print-font-picker.c:#include <libgnome/gnome-i18n.h> ./src/ghex-window.c:#include <libgnomeui/gnome-window-icon.h> ./src/ghex-window.h:#include <libgnomeui/gnome-window-icon.h> ./src/gnome-print-font-dialog.c:#include <libgnome/gnome-i18n.h> ./src/gnome-print-font-picker.c:#include <gnome-print-font-dialog.h> ./src/hex-document-ui.c:#include <gnome.h> ./src/print.c:#include <gnome.h> ./src/converter.c:#include <gnome.h> ./src/main.c:#include <gnome.h> ./src/ghex-window.c:#include <gnome.h> ./src/ghex-window.h:#include <gnome.h> ./src/ui.c:#include <gnome.h> ./src/hex-document.c:#include <gnome.h> ./src/gtkhex.c:#include <gnome.h> ./src/hex-dialog.c:#include <gnome.h> ./src/gnome-print-font-dialog.c:#include <gnome-print-font-dialog.h> ./src/session.h:#include <gnome.h>
Cleaned up a little bit so there are no <gnome.h> includes left: http://git.gnome.org/browse/ghex/commit/?id=0d922dd7dd85544889d5968f668f898dc024afa0 http://git.gnome.org/browse/ghex/commit/?id=0acf79f34092e48fb1eac8456606482713894740 Hence current list: ./src/main.c:#include <libgnomeui/gnome-ui-init.h> ./src/chartable.c:#include <libgnomeui/gnome-uidefs.h> ./src/converter.c:#include <libgnomeui/gnome-uidefs.h> ./src/findreplace.c:#include <libgnomeui/gnome-uidefs.h> ./src/ghex-window.c:#include <libgnomeui/gnome-uidefs.h> ./src/hex-dialog.c:#include <libgnomeui/gnome-uidefs.h> ./src/preferences.c:#include <libgnomeui/gnome-uidefs.h> ./src/gnome-print-font-picker.c:#include <libgnome/gnome-macros.h> ./src/main.c:#include <libgnomeui/gnome-client.h> ./src/session.h:#include <libgnomeui/gnome-client.h> ./src/ghex-window.c:#include <libgnomeui/gnome-window-icon.h> ./src/ghex-window.h:#include <libgnomeui/gnome-window-icon.h>
Removed libgnomeui/gnome-uidefs.h dependency: http://git.gnome.org/browse/ghex/commit/?id=04ef653cb43a573c82963aa374212ea664e78fec
Removed libgnome/gnome-macros.h and libgnomeui/gnome-client.h dependencies, remaining: ./src/main.c:#include <libgnomeui/gnome-ui-init.h> ./src/main.c:#include <libgnomeui/gnome-client.h> ./src/session.h:#include <libgnomeui/gnome-client.h>
Created attachment 152377 [details] [review] Port from poptOption to GOptionEntry
Created attachment 152378 [details] [review] Remove libgnomeui/gnome-ui-init.h dependency Replace gnome_program_init() with gtk_init_with_args()
Created attachment 152380 [details] [review] Remove GNOME session management support So we can get rid of libgnomeui dependency completely :)
I'd say that the next move should be moving from gnome_help_display to gtk_show_uri. But while API part of that move is trivial, ghex was not updated correctly to new gnome-doc-utils. I've got a semantically correct patch, that makes it build, but a few of the help translations need cosmetic fixes, as they were using html entities and xsltproc complains about it loudly.
Created attachment 152931 [details] [review] a "sort of" working patch First rename ghex.omf.in to ghex2.omf.in, then apply the patch. It needs quite a bit polish, as I'm not sure, if I removed all of the redundant bits, but it seems to work, barring those xsltproc errors.
(In reply to comment #7) > xsltproc complains about it loudly. Please provide the complete full output here (if it's a lot, as an attachment). Thanks.
Created attachment 152932 [details] error output not that's it's really interesting, but this is what xsltproc now prints, when it tries to process produced xml help files.
Created attachment 153236 [details] [review] fix xsltproc warnings This cleans up the warnings. I leave to the translators checking, if I didn't make any typos.
Comment on attachment 152377 [details] [review] Port from poptOption to GOptionEntry commited a bit different patch in commit af1e70f9a5e5a5b2ce9516d7a879cea5782da6cf
Comment on attachment 152378 [details] [review] Remove libgnomeui/gnome-ui-init.h dependency commit 9a80135b9bb810955a097ae3fd944044540e0fb6
Comment on attachment 152380 [details] [review] Remove GNOME session management support commit 9a80135b9bb810955a097ae3fd944044540e0fb6
Ops, the commit to remove Gnome session support is in commit 546c1adeff459488866cb61b9086eac596de6638
So we can close this bug now (thank you Rafał for the review of patches), cheers!
Comment on attachment 153236 [details] [review] fix xsltproc warnings commit d6fafaf8c47e25f9940f47c1b5acad78229890b0