OpenPrinting / system-config-printer

Graphical user interface for CUPS administration
GNU General Public License v2.0
160 stars 88 forks source link

Attempt to remove all gdk threads_enter and leave calls #129

Open TomasKorbar opened 5 years ago

TomasKorbar commented 5 years ago

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.

zdohnal commented 5 years ago

Hi Tomas!

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

zdohnal commented 5 years ago

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 commented 5 years ago

@TomasKorbar

TomasKorbar commented 5 years ago

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

TomasKorbar commented 5 years ago

@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 :)