Skip to content

Python3 update for GTKlick#6

Open
jlownie wants to merge 15 commits intodsacre:masterfrom
jlownie:python3
Open

Python3 update for GTKlick#6
jlownie wants to merge 15 commits intodsacre:masterfrom
jlownie:python3

Conversation

@jlownie
Copy link

@jlownie jlownie commented Sep 26, 2021

Hello Dominic,

I've updated the code for gtklick to work with Python 3, GTK 3 and the latest version of Glade.

There was some code in profiles_pane.py (self.renderer.connect('edited', misc.weakref_method(self.on_cell_edited))) that I didn't understand (I don't know what a "weakref" is). I altered the code enough that it runs - I don't think the thread terminates properly when you close the program though.

It runs OK on my PC with the exception that the last time I ran it I don't think it was saving settings properly.

I did this work over a year ago and lost motivation to work on it further so I'm sending this pull request in the hope of getting some feedback from you. I'm not sure what your intentions are regarding the gtklick project and whether you would be interested in helping me fix these bugs or not - if you would (or could just provide some advice on how to proceed) that would be great. I can figure out how to fix that weakref problem but a bit of help would make it a lot easier.

If it's not obvious, I don't have a lot of experience with contributing to open source projects so I apologise in advance if I haven't followed normal procedures.

jlownie added 15 commits July 19, 2020 17:14
I updated the code from Python 2 to Python 3 using the application 2to3
I ran this script to convert the code from pygtk to python-gobject:
https://gitlab.gnome.org/GNOME/pygobject/blob/master/tools/pygi-convert.sh
Converted the glade file to the current format
Removed some obsolete properties from the glade file
Changed the way the glade file was loaded
Changed the check of the klick version - the check doesn't do anything useful now - it should be either fixed or removed
Changed the call of signal_autoconnect to connect_signals
…get_object() using this command:

for file in *.py; do sed -i 's;widgets\[\([^]]*\)\];wtree.get_object\(\1\);g' $file; done

also cleaned up the setup method in gtklick.py
…I'm not sure if they're still needed

Also added a few imports
…was working in the past - I have possibly broken packaging with this but it works in development environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant