sugarlabs / memorize-activity

A memory game, not only to play but also to create you own games, for the Sugar learning environment
GNU General Public License v2.0
1 stars 15 forks source link

Fix GtkBox warnings #16

Closed yell0wfl4sh closed 6 years ago

yell0wfl4sh commented 6 years ago

FIxes #11 Easy fix, a couple of lines were redundant in activity.py

@quozl wrote:

Need a way to isolate these warnings to specific Python source lines.

were you talking about developing a way such that these type of problems can be solved in any general activity or was it this activity specific?

Though on change the number(size) of the cards, a few errors are still logged

(sugar-activity:8183): Gtk-WARNING **: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menuitem owner SugarPaletteHeader)

(sugar-activity:8183): Gtk-WARNING **: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menuitem owner SugarPaletteHeader)
quozl commented 6 years ago

Reviewed. Tested.

were you talking about developing a way such that these type of problems can be solved in any general activity or was it this activity specific?

In general. Problem with Gtk-WARNING and Gtk-CRITICAL messages is that they do not show which source line causes them. I seem to recall a general method that makes these messages raise exceptions, and then an exception handler can print a traceback. I do not have a reference to this. It might be added to sugar-docs somewhere.