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 560424 - GNOME Goal: Remove deprecated GLib symbols
GNOME Goal: Remove deprecated GLib symbols
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] Appearance
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks: 560423
 
 
Reported: 2008-11-12 01:29 UTC by Luis Menina
Modified: 2008-11-20 18:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
g_strcasecmp -> g_ascii_strncasecmp (583 bytes, patch)
2008-11-20 11:53 UTC, Maxim Ermilov
committed Details | Review

Description Luis Menina 2008-11-12 01:29:41 UTC
See http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/Glib
Here are the files+lines using deprecated GLib symbols in gnome-control-center:

[liberforce@donald gnome2]$ egrep -n -R -f ~/glib-2.18-deprecated-symbols.txt --include="*.[ch]" --include="*.[ch]pp" --include="*.[ch]xx" gnome-control-center
gnome-control-center/capplets/appearance/gnome-wp-xml.c:37:    if (!g_strcasecmp ((gchar *)prop, "true") || !g_strcasecmp ((gchar *)prop, "1")) {

g_strcasecmp calls should be replaced by either g_ascii_strcasecmp or g_utf8_strcasecmp (depending on the context).
Comment 1 Maxim Ermilov 2008-11-20 11:53:08 UTC
Created attachment 123102 [details] [review]
g_strcasecmp ->  g_ascii_strncasecmp
Comment 2 Maxim Ermilov 2008-11-20 12:02:57 UTC
Now It (capplets/appearance/gnome-wp-xml.c) use xml config file , But may be It should be ported to gconf?
Comment 3 Jens Granseuer 2008-11-20 18:20:32 UTC
(In reply to comment #1)
> g_strcasecmp ->  g_ascii_strncasecmp

I used g_ascii_strcasecmp, though. No need for the n version here.

2008-11-20  Jens Granseuer  <...>
        
        Patch by: Maxim Ermilov <...>

        * gnome-wp-xml.c: (gnome_wp_xml_get_bool): use g_ascii_strcasecmp
        instead of the deprecated g_strcasecmp (bug #560424)

(In reply to comment #2)
> Now It (capplets/appearance/gnome-wp-xml.c) use xml config file , But may be It
> should be ported to gconf?

No, GConf is better for small amounts of configuration data and being notified about changes. For this kind of data it's not such a great solution. In fact, it might be a good idea to convert the network capplet to use an XML file for the currently inactive network locations, too...