Changeset 3576

Show
Ignore:
Timestamp:
08/20/08 06:47:02 (5 years ago)
Author:
nopper
Message:

has_pause/has_stop/has_restart are now used to set the sensitive ofmenu items.
clean action should not raises warnings now.

Updated the TODO accordingly

Location:
branch/PacketManipulator
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branch/PacketManipulator/PM/Gui/Tabs/OperationsTab.py

    r3457 r3576  
    241241        ) 
    242242 
     243        idx = 0 
    243244        for lbl, stock, cb in zip(labels, stocks, callbacks): 
    244245            action =  gtk.Action(None, lbl, None, stock) 
    245246            action.connect('activate', cb, operation) 
    246  
    247             menu.append(action.create_menu_item()) 
     247            item = action.create_menu_item() 
     248             
     249            if idx in (1, 2) and not operation.has_pause or \ 
     250               idx == 3 and not operation.has_stop or \ 
     251               idx == 4 and not operation.has_restart: 
     252                item.set_sensitive(False) 
     253 
     254            menu.append(item) 
     255 
     256            idx += 1 
    248257 
    249258        menu.show_all() 
     
    303312 
    304313    def __on_clear(self, action, operation): 
    305         # TODO: try a better method 
    306314        iter = self.store.get_iter_first() 
    307315 
    308         while iter: 
     316        current = len(self.store) 
     317         
     318        while current >= 0: 
     319            iter = self.store.get_iter_from_string((current, )) 
    309320            operation = self.store.get_value(iter, 0) 
    310321 
     
    312323                self.store.remove(iter) 
    313324 
    314             iter = self.store.iter_next(iter) 
     325            current -= 1 
    315326 
    316327class OperationsTab(UmitView): 
  • branch/PacketManipulator/TODO

    r3561 r3576  
    99- hexview with insert mode 
    1010- plugins system (UmitPlugins) / geoip as example plugin 
    11 - fix the send/receive on windows 
    1211- sending/receiving a list of packets instead of a single 
    1312- switching to pyprocessing? 
    1413- documentation and test cases 
    15 - rewrite the UMPA backend 
    16 - create a method to set docstrings for Scapy (load an xml definitions file) 
     14- rewrite the UMPA backend (complete/remove) 
    1715- page to show relationships between connections 
    1816- graph page like scapy 
     
    2220- Implementing a get_icon for operation to use only the object in ListStore 
    2321- same in property grid 
    24 - disable the actions in operation popup menu (has_pause ..) 
    25 - rewrite the clean action 
    26 - implement a popup menu in proto hierarchy to remove layers