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 739224 - Do not use deprecated methods
Do not use deprecated methods
Status: RESOLVED FIXED
Product: gnome-font-viewer
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-font-viewer-maint
gnome-font-viewer-maint
Depends on:
Blocks:
 
 
Reported: 2014-10-26 20:27 UTC by Robert Roth
Modified: 2015-01-19 22:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
font-view: Fixed GTK+ deprecations (1.63 KB, patch)
2014-10-26 20:33 UTC, Robert Roth
committed Details | Review
Replace deprecated method with main context invocation (1.99 KB, patch)
2015-01-03 11:16 UTC, Robert Roth
committed Details | Review
Ported thumbnailing io scheduler job to g_task_run_in_thread (1.84 KB, patch)
2015-01-19 20:47 UTC, Robert Roth
committed Details | Review
Replace io scheduler with g_task_run_in_thread in load_font_infos (4.96 KB, patch)
2015-01-19 20:47 UTC, Robert Roth
committed Details | Review

Description Robert Roth 2014-10-26 20:27:52 UTC
Currently (3.14.0) gnome-font-viewer uses some deprecated methods :
* gtk_misc_set_alignment
* margin-left and margin-right property
* g_io_scheduler_job_send_to_mainloop_async
* g_io_scheduler_push_job

These should be replaced with their suggested replacement.
Comment 1 Robert Roth 2014-10-26 20:33:26 UTC
Created attachment 289384 [details] [review]
font-view: Fixed GTK+ deprecations
Comment 2 Robert Roth 2015-01-03 02:31:54 UTC
Could anyone review this? It's a short <10 changed lines patch.
Comment 3 Cosimo Cecchi 2015-01-03 03:03:20 UTC
Review of attachment 289384 [details] [review]:

Sure, looks good
Comment 4 Robert Roth 2015-01-03 11:07:32 UTC
Comment on attachment 289384 [details] [review]
font-view: Fixed GTK+ deprecations

Attachment 289384 [details] pushed as c203f9c - font-view: Fixed GTK+ deprecations
Comment 5 Robert Roth 2015-01-03 11:16:37 UTC
Created attachment 293634 [details] [review]
Replace deprecated method with main context invocation
Comment 6 Cosimo Cecchi 2015-01-03 17:55:15 UTC
Review of attachment 293634 [details] [review]:

Shouldn't you also replace the use of g_io_scheduler_push_job()?
Comment 7 Robert Roth 2015-01-03 20:32:44 UTC
Yes, I should have, but I'm not familiar with GThreadPool, and the replacement didn't look as straight-forward as these ones. Those calls are the last ones though, so if I'll have their replacements, will surely provide a last patch, to be able to close this bug.
Comment 8 Robert Roth 2015-01-19 20:47:04 UTC
Created attachment 294923 [details] [review]
Ported thumbnailing io scheduler job to g_task_run_in_thread
Comment 9 Robert Roth 2015-01-19 20:47:16 UTC
Created attachment 294924 [details] [review]
Replace io scheduler with g_task_run_in_thread in load_font_infos
Comment 10 Robert Roth 2015-01-19 20:49:59 UTC
I only have a last one remaining, but I'm not sure how to test sushi-font-loader. I guess this is used by the nautilus preview, but somehow I couldn't get it (sushi-font-loader) to log anything (even if nautilus was started after quitting it with nautilus -q to make sure nautilus running is the one logging to console).

Could you please give me a hint on how to test that class?
Comment 11 Cosimo Cecchi 2015-01-19 22:09:45 UTC
Pushed these to master.

Attachment 293634 [details] pushed as beb0a7c - Replace deprecated method with main context invocation
Attachment 294923 [details] pushed as ec331ea - Ported thumbnailing io scheduler job to g_task_run_in_thread
Attachment 294924 [details] pushed as 63b209c - Replace io scheduler with g_task_run_in_thread in load_font_infos
Comment 12 Cosimo Cecchi 2015-01-19 22:11:50 UTC
(In reply to comment #10)
> I only have a last one remaining, but I'm not sure how to test
> sushi-font-loader. I guess this is used by the nautilus preview, but somehow I
> couldn't get it (sushi-font-loader) to log anything (even if nautilus was
> started after quitting it with nautilus -q to make sure nautilus running is the
> one logging to console).
> 
> Could you please give me a hint on how to test that class?

Nautilus or even the actual sushi preview tool never enter the picture... gnome-font-viewer has a copy of SushiFontLoader, that just loads an URI into a FT_Face asynchronously. The deprecated method usage should be fixed in sushi itself and then backported here.
I will give it a shot.