Show
Ignore:
Timestamp:
08/17/07 13:21:14 (6 years ago)
Author:
kop-labs
Message:

ToolbarInterface? - remove option added

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branch/k0p/umitInterfaceEditor/PageNotebook.py

    r1393 r1410  
    504504         
    505505     
     506    def delete_on_item(self, widget): 
     507        if not widget.is_voidplace():  
     508            # remove widgets like checkbuttons or others and put voidplace 
     509            childs = widget.get_children() 
     510            cmd = CommandAddRemoveOption(widget,childs, 
     511                                         self._profilecore, False) 
     512            widget.set_select(False) 
     513            command_manager.add_command(cmd) 
     514            log.debug(' Remove Widgets like CheckButtons or others and put voidplace') 
     515             
     516        else: 
     517            # remove voidplace and delete the widget from table/box 
     518            #XXX  
     519            cmd = CommandAddRemoveVoidplace(self,  
     520                                            widget, self._coords, False) 
     521            #widget.unload_voidplace() 
     522            command_manager.add_command(cmd) 
     523            log.debug('Remove voidplace and delete the widget from table') 
     524         
     525     
     526     
    506527         
    507528    def _key_press_event(self, widget, event): 
     
    509530        _keyval = gtk.gdk.keyval_name(event.keyval) 
    510531        if _keyval == "Delete" and self._old_selected!=None : 
    511             if not widget.is_voidplace():  
    512                 # remove widgets like checkbuttons or others and put voidplace 
    513                 childs = widget.get_children() 
    514                 cmd = CommandAddRemoveOption(widget,childs, 
    515                                              self._profilecore, False) 
    516                 widget.set_select(False) 
    517                 command_manager.add_command(cmd) 
    518                 log.debug(' Remove Widgets like CheckButtons or others and put voidplace') 
    519                  
    520             else: 
    521                 # remove voidplace and delete the widget from table/box 
    522                 #XXX  
    523                 cmd = CommandAddRemoveVoidplace(self,  
    524                                                 widget, self._coords, False) 
    525                 #widget.unload_voidplace() 
    526                 command_manager.add_command(cmd) 
    527                 log.debug('Remove voidplace and delete the widget from table') 
     532            self.delete_on_item(widget) 
     533 
    528534                 
    529535        #self._table.remove(widget)