Changeset 4388

Show
Ignore:
Timestamp:
03/21/09 20:00:52 (4 years ago)
Author:
nopper
Message:

Fixing bug related to animation throbber

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branch/UmitPlugins/umit/gui/ScanNotebook.py

    r4387 r4388  
    678678            self.verify_execution) 
    679679 
     680    def stop_tab_label_animation(self): 
     681        # Stop the throbber animation 
     682        notebook = self.get_parent() 
     683 
     684        if notebook and isinstance(notebook, ScanNotebook): 
     685            lbl = notebook.get_tab_label(self) 
     686 
     687            if lbl and isinstance(lbl, HIGAnimatedTabLabel): 
     688                lbl.stop_animation() 
     689 
    680690    def verify_execution(self): 
    681691        # Using new subprocess style 
     
    683693            alive = self.command_execution.scan_state() 
    684694        except: 
     695            self.stop_tab_label_animation() 
    685696            self.disable_widgets() 
    686697            self.status.set_scan_failed() 
     
    692703        self.scan_result.refresh_nmap_output() 
    693704 
    694         # Stop the throbber animation 
    695         notebook = self.get_parent() 
    696  
    697         if notebook and isinstance(notebook, ScanNotebook): 
    698             lbl = notebook.get_tab_label(self) 
    699  
    700             if lbl and isinstance(lbl, HIGAnimatedTabLabel): 
    701                 lbl.stop_animation() 
    702          
    703705        if alive: 
    704706            return True 
    705707        else: 
     708            self.stop_tab_label_animation() 
    706709            self.parse_result(self.command_execution.get_xml_output_file()) 
    707710            self.emit("scan-finished")