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 302555 - constify action entries
constify action entries
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2005-04-30 17:11 UTC by Paolo Borelli
Modified: 2005-05-02 16:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (4.97 KB, patch)
2005-04-30 17:12 UTC, Paolo Borelli
none Details | Review

Description Paolo Borelli 2005-04-30 17:11:43 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)
Comment 1 Paolo Borelli 2005-04-30 17:12:26 UTC
Created attachment 45870 [details] [review]
patch
Comment 2 Rich Burridge 2005-05-02 16:07:28 UTC
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.