Show
Ignore:
Timestamp:
04/19/11 06:12:13 (2 years ago)
Author:
luis
Message:

(Network Scanner - Bluetooth) Warning if the library does not exists

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • network-scanner/branches/BTIntegration/umit/scan/bt/gui/btcore.py

    r5906 r5916  
    2626import gtk 
    2727 
     28from higwidgets.higdialogs import HIGDialog, HIGAlertDialog 
     29 
     30def missing_bt_library(library_name): 
     31    dlg = HIGAlertDialog(type=gtk.MESSAGE_WARNING,  
     32                                 message_format=('Missing ' + library_name),  
     33                                 secondary_text=("Bluetooth library could not be found")) 
     34    dlg.run() 
     35    dlg.destroy() 
     36       
     37 
    2838if(platform.system()=="Darwin"): 
    2939   try: 
     
    3141   except ImportError: 
    3242      print >> sys.stderr, "Error loading LightBlue dependency.Exiting UmitBT..." 
    33       raise 
     43      missing_bt_library("lightblue")  
     44      #raise 
    3445else: 
    3546   try: 
     
    3748   except ImportError: 
    3849      print >> sys.stderr, "Error loading PyBluez dependency. Exiting UmitBT..." 
     50      missing_bt_library("pybluez")  
    3951      raise 
    4052 
    4153#from umitCore.I18N import _ 
    42 from higwidgets.higdialogs import HIGDialog, HIGAlertDialog 
     54 
    4355 
    4456import umit.scan.bt.gui.io