-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to remove all gdk threads_enter and leave calls #129
base: master
Are you sure you want to change the base?
Conversation
Hi Tomas! thank you for pull request, I'll review it. |
Hi Tom,
TypeError: on_btnRefresh_clicked() missing 1 required positional argument: 'button' It appeared during changing server connection (server tab, Connect entry), which should trigger your changes. |
Hi Zdenek, |
Changed used module for handling of threads from _thread to threading. Threading has better API and allows us to distinguish threads more easily. However there is a minor problem. When Gdk Window is passed as a argument to method executed in different thread then it is converted before execution of method into Gtk box. That is why i removed parent argument from connect method of GUI class. Parent argument has been removed from connect method of GUI class. Reasons described above. Connect was always called with the same parent anyway so this does not change its function. Added thread_operations.py file. It contains decorator which simulates some functionalities provided by deprecated functions. Some calls of deprecated functions have been replaced by Gdk_threads_add_idle function.
@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 :) |
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.