Changes

Jump to navigation Jump to search
m
added a new section titled Modifying Abacus
Line 167: Line 167:     
For instance, to add a menu item such as 'Reset' you would do the following in abacus.py:
 
For instance, to add a menu item such as 'Reset' you would do the following in abacus.py:
 +
 
(1)  into the menu items list add   
 
(1)  into the menu items list add   
 
         menu_items = gtk.MenuItem(_("Reset"))
 
         menu_items = gtk.MenuItem(_("Reset"))
Line 180: Line 181:     
If the changes involve modifying the graphics, then other methods may need to be modified as well.  For instance, in order to introduce a reset button that can be clicked to reset the bead positions to the beginning, the following methods had to be modified -- all in abacus_window.py:
 
If the changes involve modifying the graphics, then other methods may need to be modified as well.  For instance, in order to introduce a reset button that can be clicked to reset the bead positions to the beginning, the following methods had to be modified -- all in abacus_window.py:
 +
 
  1) in the class Abacus, methods _button_press_cb() to activate reset button,
 
  1) in the class Abacus, methods _button_press_cb() to activate reset button,
 
  2) in the class AbacusGeneric, method create() to create the graphics for reset button,
 
  2) in the class AbacusGeneric, method create() to create the graphics for reset button,
4

edits

Navigation menu