GNOME Bugzilla – Bug 158280
option to make gcalctool use only gtk
Last modified: 2005-04-06 17:21:31 UTC
I love crossplatform software, I love being able to choose the same software even if I do not have the choice to use Gnome. This request is for the option to build gcalctool using only gtk so that it would be more portable and future proof in the long run.
Created attachment 39138 [details] [review] Patch that hopefully provides this functionality. Note that you create the Gtk-only version by adding in "--disable-gnome" as a command line option when running configure.
Changes checked into CVS HEAD. Version number in configure.in bumped to 5.6.3.
Thanks for this, I do appreciate it. From reading the patch it looks to me like Help files wont be available a version built without Gnome support, using the menu item will result in a NO OP. It might be worth going one step further and hiding the Help contents menu (but that is better left until more people are actually using the GTK only version. I'm eagerly watching Tor trying to build garnome on windows) From what I can understand of the patch none of the other changes seem as terrible as the warning message implies "Remove GNOME support. Don't do this, it removes essential features" but I can understand the need from harsh warnings to stop people like me from shooting ourselves in the foot. If you can spare a moment to explain if I'm failing to see/understand other important details I'd appreciate it.
I asked on the #gnome IRC channel whether there were any apps that did something like this, and i was pointed at Totem and GnomeMeeting. I used the later as a model for how I did the changes in gcalctool. It just wraps "#ifndef DISABLE_GNOME"'s around the code in the help callbacks. I just did the same. One of the big reasons why you might not want to use the GNOME libraries version of gcalctool is that accessibility support won't automatically work. That's built into the gnome_init() call but not the gtk_init() call. As you've seen, help support is not their either.
Abiword is another app that has both GTK and Gnome versions (and if I ever get around to checking it for Accessibility I'll be sure to check the Gnome version thanks to your comment above) Thanks again.
Euhm won't compiling it as gtk only program break the help? Can someone plz test this
looks like the menu should not show help because it will do nothing.
something like: haven't tested it :) #ifndef DISABLE_GNOME " <menuitem action='Contents'/>" #endif /*DISABLE_GNOME*/
I think only GTK addicts like me will ever want the GTK only version for when I'm stuck using Windows or other platforms that dont fully support Gnome. It will break the help, the only question is in what way will it fail. If it fails cleanly with a NO OP then I'd be happy enough to just leave it as is if it is more of a problem I'd rather disable it and grey it out than remove it and risk forgetting about it.
I like Kristof's fix. I'll try to get this in later today.
Created attachment 39761 [details] Patch to not show the Help->Contents menu item if gtk-only
Changes checked into CVS HEAD. Version number in configure.in bumped to 5.6.6. Thanks!