! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Patch] Fixes python bindings constructor for exo.ToolbarsView
Status:
RESOLVED: FIXED

Comments

Description Adam Plumb editbugs 2010-01-27 18:06:57 CET
Created attachment 2796 
Patch file

In pyexo, when exo.ToolbarsView is constructed, the exo_toolbars_view_new_with_model function is used by default as the constructor function, but it is not given the is-constructor-of command in the defs file.  So the C wrapper code is not treating it as a constructor.  

This causes the following error in an example script:

adam@office1:~/Development/xfce/exo/python/examples$ python toolbars.py 
Traceback (most recent call last):
  File "toolbars.py", line 113, in <module>
    window = ToolbarsWindow()
  File "toolbars.py", line 93, in __init__
    view = ToolbarsView(manager)
  File "toolbars.py", line 47, in __init__
    exo.ToolbarsView.__init__(self, manager, ToolbarsStore())
TypeError: could not convert parameter 'spacing' of type 'gint'

I've created a patch that removes the unused exo_toolbars_view_new function definition and adds the is-constructor-of command to the *_with_model definition.

In the future, it would be better to create an override function that accepted the constructor with or without a model parameter.  (I don't know if this is possible via the defs file)
Comment 1 Nick Schermer editbugs 2010-02-15 11:14:24 CET
Applied patch in d2ea8fa. Thanks.

Bug #6186

Reported by:
Adam Plumb
Reported on: 2010-01-27
Last modified on: 2010-02-15

People

Assignee:
Nick Schermer
CC List:
1 user

Version

Version:
unspecified

Attachments

Patch file (604 bytes, patch)
2010-01-27 18:06 CET , Adam Plumb
no flags

Additional information