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 705600 - Deprecate GSimpleActionGroup functions?
Deprecate GSimpleActionGroup functions?
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gapplication
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-08-07 08:02 UTC by Murray Cumming
Modified: 2013-08-13 20:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Murray Cumming 2013-08-07 08:02:20 UTC
GSimpleActionGroup has some functions that just call the same functions in the base GActionMap. However, some have slightly different names:
https://developer.gnome.org/gio/unstable/GSimpleActionGroup.html#g-simple-action-group-insert

* g_simple_action_group_insert() just calls g_action_map_add_action().
* g_simple_action_group_remove() just calls g_action_map_remove_action().

In real OO languages such as C++, or just conceptually in C, this results in a class that has all 4 methods, all though 2 do the same thing as the others, confusing the API:

somegroup.insert()
somegroup.add_action()
somegroup.remove()
somegroup.remove_action().


The same goes for g_simple_action_group_lookup(), which just calls g_action_map_lookup_action().

Could we please deprecate these functions in GSimpleActionGroup?


I'd also like to deprecate g_simple_action_group_add_entries(). It's name is correct, but it does nothing but call g_action_map_add_action_entries() and we don't normally have convenience functions in glib or gtk+ just to avoid the need for a cast.
Comment 1 Allison Karlitskaya (desrt) 2013-08-12 08:35:12 UTC
I thought I had already done this, in fact.  Patch is welcome :)