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 688231 - common: remove the use of some deprecated functions
common: remove the use of some deprecated functions
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-13 10:44 UTC by Thomas Wood
Modified: 2012-11-13 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
common: remove the use of the deprecated g_type_init function (1.32 KB, patch)
2012-11-13 10:44 UTC, Thomas Wood
committed Details | Review
common: remove the use of the deprecated GDK thread functions (1.36 KB, patch)
2012-11-13 10:44 UTC, Thomas Wood
needs-work Details | Review
common: remove the use of the GDK thread functions (1.91 KB, patch)
2012-11-13 13:50 UTC, Thomas Wood
committed Details | Review

Description Thomas Wood 2012-11-13 10:44:52 UTC
Remove the g_type_init function, which was deprecated in glib 2.35.1. The type
system is now initialised automatically, so increase the glib requirement to
2.35.1 to ensure this.

Remove the use of gdk_threads_enter and gdk_threads_leave as these functions
have been deprecated. The code being protected by these functions doesn't appear
to be used outside of the main thread, so they can be safely removed without
replacement.
Comment 1 Thomas Wood 2012-11-13 10:44:54 UTC
Created attachment 228867 [details] [review]
common: remove the use of the deprecated g_type_init function

The g_type_init function was deprecated in glib 2.35.1 and the type system
is now initialised automatically.
Comment 2 Thomas Wood 2012-11-13 10:44:57 UTC
Created attachment 228868 [details] [review]
common: remove the use of the deprecated GDK thread functions

These functions are not necessary as the code is never called outside of
the main thread.
Comment 3 Bastien Nocera 2012-11-13 10:55:40 UTC
Review of attachment 228867 [details] [review]:

++
Comment 4 Bastien Nocera 2012-11-13 11:11:53 UTC
Review of attachment 228868 [details] [review]:

gdk_threads_add_idle() should probably be replaced as well.

But, really, the language choosers should be made fully async (the biggest blocker being gdm_get_all_language_names() which does sync I/O).
Comment 5 Thomas Wood 2012-11-13 13:50:54 UTC
Created attachment 228886 [details] [review]
common: remove the use of the GDK thread functions

Remove the use of gdk_threads_enter and gdk_threads_leave functions, as
they have been deprecated, and also replace gdk_threads_add_idle with
g_idle_add.
Comment 6 Bastien Nocera 2012-11-13 14:11:54 UTC
Review of attachment 228886 [details] [review]:

Looks good.
Comment 7 Thomas Wood 2012-11-13 15:05:41 UTC
Attachment 228867 [details] pushed as 288c3f8 - common: remove the use of the deprecated g_type_init function
Attachment 228886 [details] pushed as 7dab589 - common: remove the use of the GDK thread functions