GNOME Bugzilla – Bug 739224
Do not use deprecated methods
Last modified: 2015-01-19 22:11:50 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.
Created attachment 289384 [details] [review] font-view: Fixed GTK+ deprecations
Could anyone review this? It's a short <10 changed lines patch.
Review of attachment 289384 [details] [review]: Sure, looks good
Comment on attachment 289384 [details] [review] font-view: Fixed GTK+ deprecations Attachment 289384 [details] pushed as c203f9c - font-view: Fixed GTK+ deprecations
Created attachment 293634 [details] [review] Replace deprecated method with main context invocation
Review of attachment 293634 [details] [review]: Shouldn't you also replace the use of g_io_scheduler_push_job()?
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.
Created attachment 294923 [details] [review] Ported thumbnailing io scheduler job to g_task_run_in_thread
Created attachment 294924 [details] [review] Replace io scheduler with g_task_run_in_thread in load_font_infos
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?
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
(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.