Changeset 3745

Show
Ignore:
Timestamp:
08/24/08 05:53:56 (5 months ago)
Author:
andar
Message:

Prevent selecting filter view category labels

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/deluge/ui/gtkui/filtertreeview.py

    r3729 r3745  
    203203        NOT YET! 
    204204        """ 
     205        x, y = event.get_coords() 
     206        path = self.label_view.get_path_at_pos(int(x), int(y)) 
     207        if not path: 
     208            return 
     209        path = path[0] 
     210        cat = self.model_filter[path][0] 
     211         
     212        if event.button == 1: 
     213            # Prevent selecting a category label 
     214            if cat == "cat": 
     215                return True 
     216         
     217        elif event.button == 3: 
     218            if cat == "cat": 
     219                # XXX: Show the pop-up menu 
     220                # Do not select the row 
     221                return True 
    205222        """ 
     223         
    206224        # We only care about right-clicks 
    207225        if event.button == 3: