<python plugin> inconsistence with indention style

Bug #200825 reported by Matthew Street
2
Affects Status Importance Assigned to Milestone
Gladex
Fix Committed
Medium
Christopher Pax

Bug Description

I am using: gladex.pyc 0.4 installed with a .deb I found on this site.
When I loaded the calculator example and told it to convert the code to python, it worked fine...

I noticed when messing with the settings that if you set the indention to spaces, that this only affects the calculator.py file, but not the calculator_callbacks.py file. This seems counter-intuitive and likely to lead to bugs (as I had) when editing the callbacks file.

Revision history for this message
Matthew Street (matt-street) wrote :

More specifically, the top part of the generated code in calculator_callbacks.py is properly spaced at 4 spaces, but the indentation where the callback functions themselves are defined are tabs.
the code in question:

def on_quit_activate(widget, data, wtree):
 print "function 'on_quit_activate' not implemented"
 pass
def on_fowardinhistory_activate(widget, data, wtree):
 print "function 'on_fowardinhistory_activate' not implemented"
 pass

def on_about_dialog_activate(widget, data, wtree):
 print "function 'on_about_dialog_activate' not implemented"
 pass

def on_button_press(widget, data, wtree):
 print "function 'on_button_press' not implemented"
 pass

def on_backinhistory_activate(widget, data, wtree):
 print "function 'on_backinhistory_activate' not implemented"
 pass

Revision history for this message
Christopher Pax (paxmanchris) wrote :

I see what must be done. It needs to be fixed in the 'get_callback_functions' function for all plugins.

This also effects the 'full' code generation of python. I will fix this two.

thanks for the report.

Changed in gladex:
assignee: nobody → paxmanchris
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Christopher Pax (paxmanchris) wrote :

Okay, I think everything is in order.

Fixed in 0.4 as of revision 150:
http://bazaar.launchpad.net/~gladex/gladex/0.4/revision/150

Fix in trunk as of revision 162:
http://bazaar.launchpad.net/~gladex/gladex/trunk/revision/162

Changed in gladex:
status: Confirmed → Fix Committed
Revision history for this message
Matthew Street (matt-street) wrote :

Wow, that was a fast response. It was kinda cool to be able to click on the link and find the fix. Thanks for the fix.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.