After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590995 - Remove libgnome(ui) usage
Remove libgnome(ui) usage
Status: RESOLVED FIXED
Product: ghex
Classification: Applications
Component: general
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: GHex maintainers
GHex maintainers
Depends on: 584006
Blocks:
 
 
Reported: 2009-08-06 20:19 UTC by André Klapper
Modified: 2010-02-08 01:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Port from poptOption to GOptionEntry (3.54 KB, patch)
2010-01-27 06:02 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review
Remove libgnomeui/gnome-ui-init.h dependency (2.75 KB, patch)
2010-01-27 06:03 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review
Remove GNOME session management support (7.02 KB, patch)
2010-01-27 06:04 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review
a "sort of" working patch (1.31 KB, patch)
2010-02-03 16:08 UTC, Rafał Mużyło
none Details | Review
error output (55.98 KB, text/plain)
2010-02-03 16:24 UTC, Rafał Mużyło
  Details
fix xsltproc warnings (44.39 KB, patch)
2010-02-07 23:10 UTC, Rafał Mużyło
committed Details | Review

Description André Klapper 2009-08-06 20:19:17 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>
Comment 1 André Klapper 2010-01-26 18:34:56 UTC
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>
Comment 2 Javier Jardón (IRC: jjardon) 2010-01-26 19:16:04 UTC
Removed libgnomeui/gnome-uidefs.h dependency:

http://git.gnome.org/browse/ghex/commit/?id=04ef653cb43a573c82963aa374212ea664e78fec
Comment 3 Javier Jardón (IRC: jjardon) 2010-01-26 20:12:15 UTC
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>
Comment 4 Javier Jardón (IRC: jjardon) 2010-01-27 06:02:28 UTC
Created attachment 152377 [details] [review]
Port from poptOption to GOptionEntry
Comment 5 Javier Jardón (IRC: jjardon) 2010-01-27 06:03:27 UTC
Created attachment 152378 [details] [review]
Remove libgnomeui/gnome-ui-init.h dependency

Replace gnome_program_init() with gtk_init_with_args()
Comment 6 Javier Jardón (IRC: jjardon) 2010-01-27 06:04:25 UTC
Created attachment 152380 [details] [review]
Remove GNOME session management support

So we can get rid of libgnomeui dependency completely :)
Comment 7 Rafał Mużyło 2010-02-03 16:04:53 UTC
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.
Comment 8 Rafał Mużyło 2010-02-03 16:08:37 UTC
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.
Comment 9 André Klapper 2010-02-03 16:14:35 UTC
(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.
Comment 10 Rafał Mużyło 2010-02-03 16:24:38 UTC
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.
Comment 11 Rafał Mużyło 2010-02-07 23:10:52 UTC
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 12 Javier Jardón (IRC: jjardon) 2010-02-08 00:39:57 UTC
Comment on attachment 152377 [details] [review]
Port from poptOption to GOptionEntry

commited a bit different patch in commit af1e70f9a5e5a5b2ce9516d7a879cea5782da6cf
Comment 13 Javier Jardón (IRC: jjardon) 2010-02-08 00:40:20 UTC
Comment on attachment 152378 [details] [review]
Remove libgnomeui/gnome-ui-init.h dependency

commit 9a80135b9bb810955a097ae3fd944044540e0fb6
Comment 14 Javier Jardón (IRC: jjardon) 2010-02-08 00:40:43 UTC
Comment on attachment 152380 [details] [review]
Remove GNOME session management support

commit 9a80135b9bb810955a097ae3fd944044540e0fb6
Comment 15 Javier Jardón (IRC: jjardon) 2010-02-08 00:41:30 UTC
Ops, the commit to remove Gnome session support is in commit 546c1adeff459488866cb61b9086eac596de6638
Comment 16 Javier Jardón (IRC: jjardon) 2010-02-08 00:42:52 UTC
So we can close this bug now (thank you Rafał for the review of patches), cheers!
Comment 17 Javier Jardón (IRC: jjardon) 2010-02-08 01:17:25 UTC
Comment on attachment 153236 [details] [review]
fix xsltproc warnings

commit d6fafaf8c47e25f9940f47c1b5acad78229890b0