GNOME Bugzilla – Bug 302555
constify action entries
Last modified: 2005-05-02 16:07:28 UTC
I'm grepping various gnome programs for unconstified use of GtkActionEntries... here is a patch for gcalctool. I also noticed that set_gcalctool_icon is now just a useless wrapper to gtk_window_set_default_icon, so I removed it, feel free to ignore that part of the patch. objdump -x gcalctool > dump shows many other variables which could maybe be marked as const and moved to the .rodata section, but I'm not familiar with the gcalctool code base, so I didn't do it (search for .data in the dump file)
Created attachment 45870 [details] [review] patch
Thanks for the patch. The reason why there are routines with names like set_gcalctool_icon() with only a single line of code in them, is to abstract out the concept. This makes it easier if somebody wanted to port the calculator to another graphics toolkit. When the calculator used to support various graphical versions simultaneously, this was essential. Having said all that, I've used all of your patch because I've groiwn tired of continually trying to explain this with every new patch I get from developers who just think Gtk. The version number in configure.in has been bumped to 5.6.12. Changes checked into CVS HEAD.