• Vasily Galkin's avatar
    gtktemplate: fix prototype tested on debian · 6d7c7b7d
    Vasily Galkin authored
    It looks that when init_template lambda attaching
    was changed from class to instance in
    it argument list should change too.
    I tested with printfs that when if it is called for class attaching
    it receives self as "s", and for instance attaching - no arguments
    This change fixes "missing 1 required positional argument: 's'" exception
    After that meld opens but with empty window.
    It looks to be related to the fact that MeldWindow tried to call
    MeldWindow.init_template class method
    resulting in second-time call of actual method,
    since only instance method was replaced to empty in first call,
    not the class one
    (I think that the first call is from "newer" python-gi 3.30.4-1
    and second call from meld itself)
    Changing this to instance method solves this problem,
    however I didn't tested on older python-gi
    Digging a bit more, I found that the "Format as patch" dialog UI
    - the 3-pane radiobuttons and reversing checkbox doesn't work.
    The checkbox can be fixed by a simple addition of @Template.Callback()
    but the radiobuttons don't
patchdialog.py 5.78 KB