system-config-printer icon indicating copy to clipboard operation
system-config-printer copied to clipboard

Attempt to remove all gdk threads_enter and leave calls

Open TomasKorbar opened this issue 6 years ago • 5 comments

Hi, This pullrequest is an attempt to invent a way how to get rid of gdk threads* calls, which are deprecated. If you will agree with this way then i will rewrite the rest of system-config-printer to use this instead of gdk threads. Feel free to propose any change.

TomasKorbar avatar Feb 04 '19 14:02 TomasKorbar

Hi Tomas!

thank you for pull request, I'll review it.

zdohnal avatar Mar 05 '19 11:03 zdohnal

Hi Tom, I tried to test it and there are some changes needs to be made:

  1. Add thread_operations.py into Makefile.am, so it would get installed on proper place
  2. require gdk version in thread_operations.py to prevent warning
  3. I found two tracebacks during testing, but I'm not sure which part of code is responsible, because it is incomplete (but previous version did not do it):

TypeError: on_btnRefresh_clicked() missing 1 required positional argument: 'button' TypeError: show_IPP_Error() missing 1 required positional argument: 'message'

It appeared during changing server connection (server tab, Connect entry), which should trigger your changes.

zdohnal avatar May 27 '19 13:05 zdohnal

@TomasKorbar

zdohnal avatar May 31 '19 09:05 zdohnal

Hi Zdenek, Sorry for the delay i forgot about this. I will look into these tracebacks during today or tomorrow.

TomasKorbar avatar Jun 03 '19 11:06 TomasKorbar

@zdohnal So i reviewed the changes i made and found some more errors and repaired them. Now it should be ok. Please keep in mind that these are not all gdk_threads_enter/leave calls. If you agree with the way i replaced them i will replace them all :)

TomasKorbar avatar Jun 04 '19 19:06 TomasKorbar