Changeset 1944


Ignore:
Timestamp:
04/03/10 18:42:09 (22 months ago)
Author:
dart
Message:

I18n:
o Last translations update

LoPlug?:
o Fix last deliveries for logger (need more work later)

Location:
trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/i18n/lome_de.ts

    r1940 r1944  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <!DOCTYPE TS><TS version="1.1" language="de"> 
     2<!DOCTYPE TS> 
     3<TS version="2.0" language="de"> 
    34<context> 
    45    <name>AboutDlg</name> 
     
    3132        <location filename="common/about.py" line="123"/> 
    3233        <source>Close</source> 
    33         <translation type="unfinished"></translation> 
     34        <translation>Schließen</translation> 
    3435    </message> 
    3536</context> 
     
    107108        <location filename="loplug/plugins/lockon/alarm.py" line="213"/> 
    108109        <source>Provides value for G min marker</source> 
    109         <translation type="unfinished"></translation> 
     110        <translation>Stellt den Wert fÃŒr den G min Marker zur VerfÃŒgung</translation> 
    110111    </message> 
    111112    <message> 
    112113        <location filename="loplug/plugins/lockon/alarm.py" line="221"/> 
    113114        <source>Provides value for G max marker</source> 
    114         <translation type="unfinished"></translation> 
     115        <translation>Stellt den Wert fÃŒr den G max Marker zur VerfÃŒgung</translation> 
    115116    </message> 
    116117    <message> 
    117118        <location filename="loplug/plugins/lockon/alarm.py" line="229"/> 
    118119        <source>Reset the G min &amp; max markers</source> 
    119         <translation type="unfinished"></translation> 
     120        <translation>Den G min &amp; max Marker zurÃŒcksetzen</translation> 
    120121    </message> 
    121122</context> 
     
    246247        <location filename="loplug/plugins/cockpit/cockpit_view.py" line="59"/> 
    247248        <source>LoPlug - Cockpit</source> 
    248         <translation type="unfinished"></translation> 
     249        <translation>LoPlug - Cockpit</translation> 
    249250    </message> 
    250251</context> 
     
    15531554        <location filename="lotatc_client/lotatc_actions.py" line="90"/> 
    15541555        <source>Imperial</source> 
    1555         <translation type="unfinished"></translation> 
     1556        <translation>Imperial</translation> 
    15561557    </message> 
    15571558</context> 
     
    32393240        <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="474"/> 
    32403241        <source>Ts channel list</source> 
    3241         <translation type="unfinished"></translation> 
     3242        <translation>TS Channel-Liste</translation> 
    32423243    </message> 
    32433244</context> 
     
    33383339        <location filename="loplug/server/plugins_configuration.py" line="40"/> 
    33393340        <source>LoPlug - Configuration</source> 
    3340         <translation type="unfinished"></translation> 
     3341        <translation>LoPlug - Konfiguration</translation> 
    33413342    </message> 
    33423343</context> 
     
    36223623    <message> 
    36233624        <location filename="common/unitloader.py" line="208"/> 
    3624         <source>&#xb0;</source> 
     3625        <source>°</source> 
    36253626        <translation>°</translation> 
    36263627    </message> 
     
    45254526        <location filename="loplug/plugins/cockpit/gauges/views/browser.py" line="69"/> 
    45264527        <source>Go</source> 
    4527         <translation type="unfinished"></translation> 
     4528        <translation>Los</translation> 
    45284529    </message> 
    45294530</context> 
  • trunk/i18n/lome_hr.ts

    r1940 r1944  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <!DOCTYPE TS><TS version="1.1" language="hr_HR"> 
     2<!DOCTYPE TS> 
     3<TS version="2.0" language="hr_HR"> 
    34<context> 
    45    <name>AboutDlg</name> 
     
    3132        <location filename="common/about.py" line="123"/> 
    3233        <source>Close</source> 
    33         <translation type="unfinished"></translation> 
     34        <translation>Zatvori</translation> 
    3435    </message> 
    3536</context> 
     
    107108        <location filename="loplug/plugins/lockon/alarm.py" line="213"/> 
    108109        <source>Provides value for G min marker</source> 
    109         <translation type="unfinished"></translation> 
     110        <translation>Daje vrijednost za oznaku najmanjeg G</translation> 
    110111    </message> 
    111112    <message> 
    112113        <location filename="loplug/plugins/lockon/alarm.py" line="221"/> 
    113114        <source>Provides value for G max marker</source> 
    114         <translation type="unfinished"></translation> 
     115        <translation>Daje vrijednost za oznaku najvećeg G</translation> 
    115116    </message> 
    116117    <message> 
    117118        <location filename="loplug/plugins/lockon/alarm.py" line="229"/> 
    118119        <source>Reset the G min &amp; max markers</source> 
    119         <translation type="unfinished"></translation> 
     120        <translation>PoniÅ¡ti oznake najvećeg i najmanjeg G</translation> 
    120121    </message> 
    121122</context> 
     
    246247        <location filename="loplug/plugins/cockpit/cockpit_view.py" line="59"/> 
    247248        <source>LoPlug - Cockpit</source> 
    248         <translation type="unfinished"></translation> 
     249        <translation>LoPlug - Kabina</translation> 
    249250    </message> 
    250251</context> 
     
    15571558        <location filename="lotatc_client/lotatc_actions.py" line="90"/> 
    15581559        <source>Imperial</source> 
    1559         <translation type="unfinished">Angloamerički</translation> 
     1560        <translation>Angloamerički</translation> 
    15601561    </message> 
    15611562</context> 
     
    29902991    <name>PGCockpit</name> 
    29912992    <message> 
    2992         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="69"/> 
     2993        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="65"/> 
    29932994        <source>Toggle the cockpit light</source> 
    29942995        <translation>Prebaci svjetlo kabine</translation> 
    29952996    </message> 
    29962997    <message> 
    2997         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="77"/> 
     2998        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="73"/> 
    29982999        <source>Toggle the flaps position</source> 
    29993000        <translation>Prebaci poloÅŸaj zakrilca</translation> 
    30003001    </message> 
    30013002    <message> 
    3002         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="85"/> 
     3003        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="81"/> 
    30033004        <source>Set the flaps in</source> 
    30043005        <translation>Podigni zakrilca</translation> 
    30053006    </message> 
    30063007    <message> 
    3007         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="93"/> 
     3008        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="89"/> 
    30083009        <source>Set the flaps out</source> 
    30093010        <translation>Spusti zakrilca</translation> 
    30103011    </message> 
    30113012    <message> 
    3012         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="101"/> 
     3013        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="97"/> 
    30133014        <source>Toggle the AF position</source> 
    30143015        <translation>Prebaci poloÅŸaj zračne kočnice</translation> 
    30153016    </message> 
    30163017    <message> 
    3017         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="109"/> 
     3018        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="105"/> 
    30183019        <source>Set the AF in</source> 
    30193020        <translation>Zatvori zračnu kočnicu</translation> 
    30203021    </message> 
    30213022    <message> 
    3022         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="117"/> 
     3023        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="113"/> 
    30233024        <source>Set the AF out</source> 
    30243025        <translation>Otvori zračnu kočnicu</translation> 
    30253026    </message> 
    30263027    <message> 
    3027         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="126"/> 
     3028        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="122"/> 
    30283029        <source>Toggle the gear position</source> 
    30293030        <translation>Prebaci poloÅŸaj podvozja</translation> 
    30303031    </message> 
    30313032    <message> 
    3032         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="134"/> 
     3033        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="130"/> 
    30333034        <source>Set the gear down</source> 
    30343035        <translation>Spusti podvozje</translation> 
    30353036    </message> 
    30363037    <message> 
    3037         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="142"/> 
     3038        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="138"/> 
    30383039        <source>Set the gear up</source> 
    30393040        <translation>Podigni podvozje</translation> 
    30403041    </message> 
    30413042    <message> 
    3042         <location filename="loplug/plugins/cockpit/pgcockpit.py" line="369"/> 
     3043        <location filename="loplug/plugins/cockpit/pgcockpit.py" line="364"/> 
    30433044        <source>Display local cockpit</source> 
    30443045        <translation>PrikaÅŸi lokalnu kabinu</translation> 
     
    31773178    </message> 
    31783179    <message> 
    3179         <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="441"/> 
     3180        <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="440"/> 
    31803181        <source>Select TS folder</source> 
    31813182        <translation>Odaberi TS mapu</translation> 
     
    31893190        <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="77"/> 
    31903191        <source>List of player in the channel</source> 
    3191         <translation>Popis igrača u kanalau</translation> 
     3192        <translation>Popis igrača u kanalu</translation> 
    31923193    </message> 
    31933194    <message> 
    31943195        <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="91"/> 
    31953196        <source>Notify channel change</source> 
    3196         <translation>Obavijest kod promjene kanala</translation> 
     3197        <translation>Obavijesti kod promjene kanala</translation> 
    31973198    </message> 
    31983199    <message> 
    31993200        <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="98"/> 
    32003201        <source>Notify mute/unmute of micro</source> 
    3201         <translation>Obavijest kod utiÅ¡avanja/uključivanja mikrofona</translation> 
     3202        <translation>Obavijesti kod utiÅ¡avanja/uključivanja mikrofona</translation> 
    32023203    </message> 
    32033204    <message> 
    32043205        <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="105"/> 
    32053206        <source>Notify mute/unmute of headphone</source> 
    3206         <translation>Obavijest kod utiÅ¡avanja/uključivanja sluÅ¡alica</translation> 
     3207        <translation>Obavijesti kod utiÅ¡avanja/uključivanja sluÅ¡alica</translation> 
    32073208    </message> 
    32083209    <message> 
     
    32223223    </message> 
    32233224    <message> 
    3224         <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="487"/> 
     3225        <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="486"/> 
    32253226        <source>Ts player list</source> 
    32263227        <translation>Popis TS igrača</translation> 
    32273228    </message> 
    32283229    <message> 
    3229         <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="474"/> 
     3230        <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="473"/> 
    32303231        <source>Ts channel list</source> 
    3231         <translation type="unfinished"></translation> 
     3232        <translation>Popis TS kanala</translation> 
    32323233    </message> 
    32333234</context> 
     
    33283329        <location filename="loplug/server/plugins_configuration.py" line="40"/> 
    33293330        <source>LoPlug - Configuration</source> 
    3330         <translation type="unfinished"></translation> 
     3331        <translation>LoPlug - Konfiguracija</translation> 
    33313332    </message> 
    33323333</context> 
     
    34223423    </message> 
    34233424    <message> 
    3424         <location filename="loplug/plugins/lockon/screenshot.py" line="364"/> 
     3425        <location filename="loplug/plugins/lockon/screenshot.py" line="360"/> 
    34253426        <source>Screen shot enable</source> 
    34263427        <translation>Omogući slikanje</translation> 
    34273428    </message> 
    34283429    <message> 
    3429         <location filename="loplug/plugins/lockon/screenshot.py" line="366"/> 
     3430        <location filename="loplug/plugins/lockon/screenshot.py" line="362"/> 
    34303431        <source>Screen shot disable</source> 
    34313432        <translation>Onemogući slikanje</translation> 
     
    36123613    <message> 
    36133614        <location filename="common/unitloader.py" line="208"/> 
    3614         <source>&#xb0;</source> 
     3615        <source>°</source> 
    36153616        <translation>°</translation> 
    36163617    </message> 
     
    36713672        <location filename="common/about_lotatc.ui" line="47"/> 
    36723673        <source>Version here</source> 
    3673         <translation type="unfinished"></translation> 
     3674        <translation></translation> 
    36743675    </message> 
    36753676    <message> 
     
    45154516    <name>self.mainW</name> 
    45164517    <message> 
    4517         <location filename="loplug/plugins/cockpit/gauges/views/browser.py" line="69"/> 
     4518        <location filename="loplug/plugins/cockpit/gauges/views/browser.py" line="60"/> 
    45184519        <source>Go</source> 
    4519         <translation type="unfinished"></translation> 
     4520        <translation>Kreni</translation> 
    45204521    </message> 
    45214522</context> 
  • trunk/loplug/plugins/cockpit/cockpit_view.py

    r1939 r1944  
    111111        self.save() 
    112112        self.remove_all_gauges() 
    113         del self.ui 
    114         self.ui = None 
    115         del self.actions 
    116         self.actions = None 
     113#        del self.ui 
     114#        self.ui = None 
     115#        del self.actions 
     116#        self.actions = None 
    117117        event.accept() 
    118118    #----------------------------------------------------------------------- 
     
    178178        t_key = self.scene.add_gauge( key, gauge ) 
    179179        self.ui.mainGV.ensureVisible( gauge.get_graphical_item() ) 
    180         # self.emit( SIGNAL("add_gauge"),  t_key,  gauge ) 
     180        self.emit( SIGNAL("add_gauge"),  t_key,  gauge ) 
    181181        self.has_changed = True 
    182182    #----------------------------------------------------------------------- 
     
    185185    def on_remove_gauge( self ): 
    186186        gauges = self.scene.remove_selected_gauges() 
    187         # self.emit( SIGNAL("remove_gauge"),  gauges ) 
     187        self.emit( SIGNAL("remove_gauge"),  gauges ) 
    188188        self.has_changed = True 
    189189    #----------------------------------------------------------------------- 
     
    192192    def remove_all_gauges( self ): 
    193193        gauges = self.scene.remove_all_gauges() 
    194         # self.emit( SIGNAL("remove_gauge"),  gauges ) 
     194        self.emit( SIGNAL("remove_gauge"),  gauges ) 
    195195    #----------------------------------------------------------------------- 
    196196    ## Return capture rect 
  • trunk/loplug/plugins/cockpit/gauges/gaugemodel.py

    r1939 r1944  
    1818 
    1919import sys 
    20 import os 
     20import os,  logging 
    2121from PyQt4.QtCore import * 
    2222 
     
    3131        self.views_by_request = {} 
    3232        self.database = database 
     33        self.logger = logging.getLogger( "[LoPlug") 
    3334    #----------------------------------------------------------------------- 
    3435    ## Data is coming 
  • trunk/loplug/plugins/cockpit/gauges/views/light.py

    r1907 r1944  
    4545    # @param self instance class 
    4646    def _model_updated( self, model, name ): 
     47        self.debug_logger.error( "model update"+self.get_name() + ":" + name) 
    4748        entry = model.database.get( name ) 
    4849        status =  entry.obj.to_boolean() 
  • trunk/loplug/plugins/common/pgpluginclient.py

    r1939 r1944  
    5757        self.options = options 
    5858         
    59         loggerMessageHeader = "[Plug-%s]" % self.get_name() 
     59        loggerMessageHeader = "[LoPlug]" 
    6060        self.logger = logging.getLogger( loggerMessageHeader) 
    6161         
     
    7878        self.create_plug_context() 
    7979        self.load_config() 
    80  
     80#---------------------------------------------------------------- 
     81    ## Constructor 
     82    # @param self                      instance class 
     83    def debug( self, msg,  level="debug"): 
     84        f = "[%s] %s" 
     85        if level == "warning": 
     86            self.logger.warning( f % (self.get_name(),  msg)) 
     87        elif level == "info": 
     88            self.logger.info( f % (self.get_name(),  msg)) 
     89        elif level == "error": 
     90            self.logger.error( f % (self.get_name(),  msg)) 
     91        else: 
     92            self.logger.debug( f % (self.get_name(),  msg)) 
     93#---------------------------------------------------------------- 
     94    ## Constructor 
     95    # @param self                      instance class 
     96    def error( self, msg): 
     97        self.debug( msg,  "error") 
     98#---------------------------------------------------------------- 
     99    ## Constructor 
     100    # @param self                      instance class 
     101    def info( self, msg): 
     102        self.debug( msg,  "info") 
    81103#---------------------------------------------------------------- 
    82104    # Tells if this plug is a provider or not 
     
    304326            self.cnxObj = CnxObj( sock) 
    305327        except socket.error, msg: 
    306             self.logger.error( socket.error, msg ) 
     328            self.error( socket.error, msg ) 
    307329            return 
    308330 
     
    430452    # @param self                      instance class 
    431453    def __rxThreadEntryPoint__( self): 
    432         self.logger.info( "Rx thread started") 
     454        self.info( "Rx thread started") 
    433455        while( self.goOn): 
    434456            # Wait and get message from the server. 
     
    437459            except: 
    438460                # Connection probably reset by peer 
    439                 self.logger.info( "An error occurs on recv()") 
     461                self.info( "An error occurs on recv()") 
    440462                return 
    441463                 
    442464            if len( rxFrames[0]): 
    443                 # self.logger.info( "Buffer received") 
     465                # self.info( "Buffer received") 
    444466                for rxFrame in rxFrames: 
    445467                    self.__parse__( rxFrame) 
    446468               
    447469            else:   
    448                 self.logger.debug( "[%s] Socket closed" % self.get_name() ) 
     470                self.debug( "[%s] Socket closed" % self.get_name() ) 
    449471        # End of: while( self.goOn) 
    450         self.logger.info( "[%s] Exit rx loop" % self.get_name() ) 
     472        self.info( "[%s] Exit rx loop" % self.get_name() ) 
    451473 
    452474#---------------------------------------------------------------- 
     
    525547    # @param self instance class 
    526548    def _create_plug_context( self): 
    527         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     549        self.info( "WARNING: Does not implement method %s()" % __name__) 
    528550#---------------------------------------------------------------- 
    529551    # To init the UI for configuration 
     
    531553    # @param dico Options 
    532554    def _init_ui( self, options=None ): 
    533         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     555        self.info( "WARNING: Does not implement method %s()" % __name__) 
    534556#---------------------------------------------------------------- 
    535557    # To deinit the UI for configuration 
    536558    # @param self instance class 
    537559    def _deinit_ui( self ): 
    538         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     560        self.info( "WARNING: Does not implement method %s()" % __name__) 
    539561#---------------------------------------------------------------- 
    540562    # Provider datas has been updated 
    541563    # @param self instance class 
    542564    def _update_provider_data( self, data ): 
    543         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     565        self.info( "WARNING: Does not implement method %s()" % __name__) 
    544566#---------------------------------------------------------------- 
    545567    # To get configuration widget 
     
    548570    # @return config widget 
    549571    def _get_config_widget( self, data): 
    550         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     572        self.info( "WARNING: Does not implement method %s()" % __name__) 
    551573        return QLabel("No config") 
    552574#---------------------------------------------------------------- 
     
    560582    # @param self instance class 
    561583    def _load_config( self ): 
    562         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     584        self.info( "WARNING: Does not implement method %s()" % __name__) 
    563585#---------------------------------------------------------------- 
    564586    # To save the custom settings 
    565587    # @param self instance class 
    566588    def _save_config( self ): 
    567         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     589        self.info( "WARNING: Does not implement method %s()" % __name__) 
    568590#---------------------------------------------------------------- 
    569591    # To start  
    570592    # @param self                      instance class 
    571593    def _start( self ): 
    572         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     594        self.info( "WARNING: Does not implement method %s()" % __name__) 
    573595#---------------------------------------------------------------- 
    574596    # Config has been changed 
    575597    # @param self instance class 
    576598    def _config_has_changed( self): 
    577         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     599        self.info( "WARNING: Does not implement method %s()" % __name__) 
    578600#---------------------------------------------------------------- 
    579601    # Units have been updated 
     
    581603    # @param name                      Id of the data 
    582604    def _units_updated( self ): 
    583         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     605        self.info( "WARNING: Does not implement method %s()" % __name__) 
    584606#---------------------------------------------------------------- 
    585607    # To receive data issued from requests 
     
    589611    # @param datas                     datas 
    590612    def _data_received( self, destService, srcPlugId, datas): 
    591         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     613        self.info( "WARNING: Does not implement method %s()" % __name__) 
    592614#---------------------------------------------------------------- 
    593615    # Database has been updated for a entry 
     
    595617    # @param name                      Id of the data 
    596618    def _database_updated( self, name): 
    597         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     619        self.info( "WARNING: Does not implement method %s()" % __name__) 
    598620#---------------------------------------------------------------- 
    599621    # To be notified about a selection in a list 
     
    603625    # @param datas                     datas 
    604626    def _selection( self, srcPlugId, list_id, datas): 
    605         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     627        self.info( "WARNING: Does not implement method %s()" % __name__) 
    606628#---------------------------------------------------------------- 
    607629    # To receive data request command 
     
    612634    # @param supInfo                   suplementary info 
    613635    def _data_requested( self, szDataRequest): 
    614         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     636        self.info( "WARNING: Does not implement method %s()" % __name__) 
    615637#---------------------------------------------------------------- 
    616638    # To receive data discard commands 
     
    619641    # @param dataId                    identifier of the requested data 
    620642    def _data_discarded( self, szDataDiscard): 
    621         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     643        self.info( "WARNING: Does not implement method %s()" % __name__) 
    622644#---------------------------------------------------------------- 
    623645    # To execute a command 
     
    626648    # @param cmdData                   associated data 
    627649    def _execute_command( self, cmdId, cmdData): 
    628         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     650        self.info( "WARNING: Does not implement method %s()" % __name__) 
    629651#---------------------------------------------------------------- 
    630652    # To be notified about plug reset 
     
    632654    # @param datas                     datas 
    633655    def _plug_reset( self, datas): 
    634         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     656        self.info( "WARNING: Does not implement method %s()" % __name__) 
    635657#---------------------------------------------------------------- 
    636658    # To implement a process thread 
     
    639661    def _process_thread_entry_point( self): 
    640662        self.processThreadFlag = False 
    641         self.logger.info( "WARNING: Does not implement method %s()" % __name__) 
     663        self.info( "WARNING: Does not implement method %s()" % __name__) 
  • trunk/loplug/plugins/common/pgproxyclient.py

    r1939 r1944  
    7979  # @param self                      instance class 
    8080  def _shutDown( self): 
    81     self.logger.debug( "[PGProxyClient.%s] _shutDown()" % self.get_name() ) 
     81    self.debug( "[PGProxyClient.%s] _shutDown()" % self.get_name() ) 
    8282    # Close connection with server 
    8383    if self.serverCnxObj: 
     
    8888  # @param self                      instance class 
    8989  def _waitForShutDownComplete(self): 
    90     self.logger.debug( "[PGProxyClient.%s] _waitForShutDownComplete()" % self.get_name() ) 
     90    self.debug( "[PGProxyClient.%s] _waitForShutDownComplete()" % self.get_name() ) 
    9191     
    9292 
     
    179179        if len( rxFrames[0]) == 0: 
    180180          # Server Disconnect 
    181           self.logger.debug( "[PGProxyClient.%s] Deconnected()" % self.get_name() ) 
     181          self.debug( "[PGProxyClient.%s] Deconnected()" % self.get_name() ) 
    182182          self.connected = False 
    183183          self._disconnected() 
     
    209209      sleep(1) 
    210210   
    211     self.logger.debug( "[PGProxyClient.%s] Connect to server %s:%s requested" % ( self.get_name(), self.serverAddr, self.serverPort) ) 
     211    self.debug( "[PGProxyClient.%s] Connect to server %s:%s requested" % ( self.get_name(), self.serverAddr, self.serverPort) ) 
    212212     
    213213    # Create a socket and connect to the server 
     
    216216      socketWithServer.connect( ( self.serverAddr, self.serverPort)) 
    217217      self.serverCnxObj = CnxObj( socketWithServer) 
    218       self.logger.debug( "[PGProxyClient.%s] Connected()" % self.get_name() ) 
     218      self.debug( "[PGProxyClient.%s] Connected()" % self.get_name() ) 
    219219      try: 
    220220        self.widgets["lblCnxState"].setText( self.tr("Connected")) 
     
    224224      self._connected() 
    225225    except socket.error, msg: 
    226       self.logger.error( msg ) 
     226      self.error( msg ) 
    227227      self.serverCnxObj = None 
    228228      try: 
  • trunk/loplug/plugins/common/pgservice.py

    r1939 r1944  
    3232    self.parentPlug = parentPlug 
    3333    self.name = self.__class__.__name__ 
    34     loggerMessageHeader = "[Plug-%s]" % self.get_name() 
     34    loggerMessageHeader = "[LoPlug]" 
    3535    self.logger = logging.getLogger( loggerMessageHeader) 
     36#---------------------------------------------------------------- 
     37  ## Constructor 
     38  # @param self                      instance class 
     39  def debug( self, msg,  level="debug"): 
     40      f = "[%s] %s" 
     41      if level == "warning": 
     42          self.logger.warning( f % (self.get_name(),  msg)) 
     43      elif level == "info": 
     44          self.logger.info( f % (self.get_name(),  msg)) 
     45      elif level == "error": 
     46          self.logger.error( f % (self.get_name(),  msg)) 
     47      else: 
     48          self.logger.debug( f % (self.get_name(),  msg)) 
     49#---------------------------------------------------------------- 
     50  ## Constructor 
     51  # @param self                      instance class 
     52  def error( self, msg): 
     53      self.debug( msg,  "error") 
     54#---------------------------------------------------------------- 
     55  ## Constructor 
     56  # @param self                      instance class 
     57  def info( self, msg): 
     58      self.debug( msg,  "info") 
    3659#---------------------------------------------------------------- 
    3760  # To get plugin/service name 
  • trunk/loplug/plugins/datalink/pgdatalink.py

    r1939 r1944  
    8080  # @param self                      instance class 
    8181  def _shutDown( self): 
    82     self.logger.debug( "[%s] _shutDown()" % self.get_name() ) 
     82    self.debug( "[%s] _shutDown()" % self.get_name() ) 
    8383    PGProxyClient._shutDown( self) 
    8484#---------------------------------------------------------------- 
     
    8787  # @param self                      instance class 
    8888  def _waitForShutDownComplete(self): 
    89     self.logger.debug( "[%s] _waitForShutDownComplete()" % self.get_name() ) 
     89    self.debug( "[%s] _waitForShutDownComplete()" % self.get_name() ) 
    9090    PGProxyClient._waitForShutDownComplete( self) 
    9191#---------------------------------------------------------------- 
     
    9393  # @param self                      instance class 
    9494  def _connected( self): 
    95     self.logger.debug( "[%s] _connected()" % self.get_name() ) 
     95    self.debug( "[%s] _connected()" % self.get_name() ) 
    9696    self.__sendLogin__() 
    9797#---------------------------------------------------------------- 
     
    9999  # @param self                      instance class 
    100100  def _disconnected( self): 
    101     self.logger.debug( "[%s] _disconnected()" % self.get_name() ) 
     101    self.debug( "[%s] _disconnected()" % self.get_name() ) 
    102102 
    103103#---------------------------------------------------------------- 
     
    230230          del self.plugItemRequests[dataId] 
    231231      else: 
    232         self.logger.debug( "[%s] No such a requested for this plug ..." % self.get_name() ) 
     232        self.debug( "[%s] No such a requested for this plug ..." % self.get_name() ) 
    233233#---------------------------------------------------------------- 
    234234  # To receive data issued from requests 
     
    303303      self.send_object( self.plugItemRequests[dataId], PGPluginClient.OPCODE_DATA_VALUE, szObj) 
    304304    else: 
    305       self.logger.debug( "no request for ", dataId ) 
    306        
     305      self.debug( "no request for ", dataId ) 
     306       
  • trunk/loplug/plugins/general/pggeneral.py

    r1791 r1944  
    126126    # @param plugId     the plug to notify. None => All the plugs registered for this event 
    127127    def __SendData__( self, dataId, plugId=None): 
    128       self.logger.info( "sendData: ", dataId) 
     128      self.info( "sendData: " + dataId) 
    129129      if self.requests.has_key( dataId): 
    130130        obj_to_send = None 
     
    148148        # End of: if message 
    149149      else: 
    150         self.logger.info( "No client for data %s -> event not sent\n" % dataId) 
     150        self.info( "No client for data %s -> event not sent\n" % dataId) 
    151151#---------------------------------------------------------------- 
    152152    # To init the UI for configuration 
     
    189189    # @param datas                     datas 
    190190    def _data_received( self, destService, srcPlugId, datas): 
    191         self.logger.info( "receive message %s from %s" % ( datas, srcPlugId)) 
     191        self.info( "receive message %s from %s" % ( datas, srcPlugId)) 
  • trunk/loplug/plugins/input/pginput.py

    r1939 r1944  
    421421      if dataId == PGInput.MOUSE_EVENT_ID: 
    422422        # Enable hook mouse process 
    423         self.logger.debug( "Enable mouse hook -----------------------------------------------------------" ) 
     423        self.debug( "Enable mouse hook -----------------------------------------------------------" ) 
    424424        self.emit( SIGNAL("EnableMouseHook")) 
    425425 
  • trunk/loplug/plugins/lockon/alarm.py

    r1939 r1944  
    332332  # @param supInfo                   suplementary info 
    333333  def _data_requested( self, srcPlugId, itemId, period, supInfo): 
    334     self.logger.debug( "[Alarm] itemId %s requested from %s [period:%s, supInfo:%s]" % ( itemId, srcPlugId, period, supInfo) ) 
     334    self.debug( "[Alarm] itemId %s requested from %s [period:%s, supInfo:%s]" % ( itemId, srcPlugId, period, supInfo) ) 
    335335 
    336336    # Create entry for this itemId if it does not exist 
     
    381381  # @param szobj                     object 
    382382  def _data_received( self, destSvc, srcPlugId, szobj): 
    383     self.logger.debug( "[Alarm] data received, itemId: ", szobj.data_id ) 
     383    self.debug( "[Alarm] data received, itemId: "+str(szobj.data_id )) 
    384384    # ----------------------------------------------------------- 
    385385    # Message from Lockon.LuaServer 
     
    415415    # NEXT_FUEL_THRESHOLD 
    416416    elif szobj.data_id == self.build_full_itemId( Alarm.NEXT_FUEL_THRESHOLD): 
    417       self.logger.debug( self.FuelThresholdIndex ) 
     417      self.debug( self.FuelThresholdIndex ) 
    418418      self.FuelThresholdIndex = ( self.FuelThresholdIndex + 1) % len( self.FuelAlarmInfoByIndex) 
    419       self.logger.debug( self.FuelThresholdIndex ) 
     419      self.debug( self.FuelThresholdIndex ) 
    420420      self.__sendData__( Alarm.FUEL_THRESHOLD_NAME) 
    421421 
     
    452452  # @param cmdData                   associated data 
    453453  def _execute_command( self, cmdId, cmdData): 
    454     self.logger.debug( "[Alarm] Execute command %s with data %s" % ( cmdId, cmdData) ) 
     454    self.debug( "[Alarm] Execute command %s with data %s" % ( cmdId, cmdData) ) 
    455455#---------------------------------------------------------------- 
    456456  # To shutdown the instance 
     
    488488           
    489489        if not self.luaParamsInfo[luaItemId]["itemIds"].has_key( itemId): 
    490           self.logger.debug( serviceInfo["Period"] ) 
     490          self.debug( serviceInfo["Period"] ) 
    491491          self.luaParamsInfo[luaItemId]["itemIds"][itemId] = { "srcPlugIds":[], "Period":serviceInfo["Period"]} 
    492492           
     
    506506            destPlug, dataId = cst_split_on_first_part_of_address( luaItemId) 
    507507            szDataRequest = SzDataRequest( self.build_full_itemId(), dataId, period=pgcd) 
    508             self.logger.debug( self.get_name() ) 
    509             self.logger.debug( "Request itemId: %s with period: %s" % ( dataId, pgcd) ) 
     508            self.debug( self.get_name() ) 
     509            self.debug( "Request itemId: %s with period: %s" % ( dataId, pgcd) ) 
    510510            self.parentPlug.send_object( [destPlug], PGPluginClient.OPCODE_DATA_REQUESTED, szDataRequest) 
    511511#---------------------------------------------------------------- 
     
    554554  # @param options                   optional parameters which indicates if the options are to be sent 
    555555  def __sendData__( self, itemId, plugId=None): 
    556     self.logger.debug( "[Alarm] __sendData__ for itemId ", itemId ) 
     556    self.debug( "[Alarm] __sendData__ for itemId "+ str(itemId ) ) 
    557557    if self.plugItemRequests.has_key( itemId): 
    558558      obj_to_send = None 
  • trunk/loplug/plugins/lockon/llf.py

    r1939 r1944  
    262262  def selection( self, srcPlugId, datas): 
    263263    if self.featureEnable: 
    264       self.logger.debug( "[LLF] feature disable" ) 
     264      self.debug( "[LLF] feature disable" ) 
    265265      self.featureEnable = False 
    266266       
     
    273273             
    274274    else: 
    275       self.logger.debug( "[LLF] feature enable" ) 
     275      self.debug( "[LLF] feature enable" ) 
    276276      self.featureEnable = True 
    277277       
     
    326326  # @param cmdData                   associated data 
    327327  def _execute_command( self, cmdId, cmdData): 
    328     self.logger.debug( "[LLF] Execute command %s with data %s" % ( cmdId, cmdData) ) 
     328    self.debug( "[LLF] Execute command %s with data %s" % ( cmdId, cmdData) ) 
    329329#---------------------------------------------------------------- 
    330330  # To shutdown the instance 
     
    402402    # Get the next most constraining ground elevation and its arrival time 
    403403    nextMapElevation, nextMapTime = self.__getNextMostConstraningGroundElevation__() 
    404     self.logger.debug( nextMapElevation, nextMapTime ) 
     404    self.debug( nextMapElevation, nextMapTime ) 
    405405    if nextMapTime == 0: 
    406406      # The current position is the most constraining one, there is is no montain to climb. 
     
    411411      deltaHeightInPerCent = self.deltaHeight / self.targetedAltitudeASFC 
    412412       
    413       self.logger.debug( "planeHeight: %s, deltaHeight: %s, deltaHeightInPerCent: %s" % ( self.altitudeASFC, self.deltaHeight, deltaHeightInPerCent) ) 
     413      self.debug( "planeHeight: %s, deltaHeight: %s, deltaHeightInPerCent: %s" % ( self.altitudeASFC, self.deltaHeight, deltaHeightInPerCent) ) 
    414414 
    415415      found = False 
     
    432432      # Compute corresponding targetedAlitude 
    433433      targetedAltitude = self.altitudeASFC - self.altitudeAMSL + nextMapElevation + self.targetedAltitudeASFC 
    434       self.logger.debug( "ASFC: ", self.altitudeASFC ) 
    435       self.logger.debug( "AMSL: ", self.altitudeAMSL ) 
    436       self.logger.debug( "tgt : ", targetedAltitude ) 
     434      self.debug( "ASFC: ", self.altitudeASFC ) 
     435      self.debug( "AMSL: ", self.altitudeAMSL ) 
     436      self.debug( "tgt : ", targetedAltitude ) 
    437437       
    438438      # Compute the delta (in per cent) between the target and plane altitudes. 
    439439      self.deltaHeight = ( targetedAltitude - self.altitudeASFC) 
    440       self.logger.debug( "delta: ", self.deltaHeight ) 
     440      self.debug( "delta: ", self.deltaHeight ) 
    441441      deltaHeightInPerCent = self.deltaHeight / self.targetedAltitudeASFC 
    442442 
     
    450450 
    451451 
    452     self.logger.debug( "verticalVelocity: %s, requestedVerticalVelocity: %s" % ( self.verticalSpeed, requestedVerticalVelocity) ) 
     452    self.debug( "verticalVelocity: %s, requestedVerticalVelocity: %s" % ( self.verticalSpeed, requestedVerticalVelocity) ) 
    453453 
    454454    # Compute error, integratedError and derivedError 
     
    457457    derivedError           = error - self.AltiPrevError 
    458458 
    459     self.logger.debug( "error: %s, integratedError: %s" % ( error, self.AltIntragedError) ) 
     459    self.debug( "error: %s, integratedError: %s" % ( error, self.AltIntragedError) ) 
    460460     
    461461    # Compute PID components, and apply threshold on command 
     
    543543      mapElevation, latitude, logitude = self.srtm.getElevationByMin( latitude*60, longitude*60) 
    544544      self.nextMapElevations.append( mapElevation) 
    545       self.logger.debug( "idx: %3d  -> %s" % ( index+1, mapElevation) ) 
     545      self.debug( "idx: %3d  -> %s" % ( index+1, mapElevation) ) 
    546546 
    547547    # Retrieve the elevation with the most constraint 
  • trunk/loplug/plugins/lockon/pglockon.py

    r1939 r1944  
    180180  # @param datas                     datas 
    181181  def _selection( self, srcPlugId, listId, datas): 
    182     self.logger.debug( "[PGLockon] Received selection: %s for listId: %s " % ( datas, listId) ) 
     182    self.debug( "[PGLockon] Received selection: %s for listId: %s " % ( datas, listId) ) 
    183183    service, listId = cst_split_on_first_part_of_address( listId) 
    184184    self.subModule[service]._selection( srcPlugId, listId, datas ) 
  • trunk/loplug/plugins/lockon/screenshot.py

    r1939 r1944  
    217217    # @param supInfo                   suplementary info 
    218218    def _data_requested( self, srcPlugId, itemId, period, supInfo): 
    219         self.logger.debug( "[Screenshot] request ", srcPlugId, itemId ) 
     219        self.debug( "[Screenshot] request %s %s"% (  srcPlugId, itemId ) ) 
    220220        # Create entry for this itemId if it does not exist 
    221221        if not self.plugItemRequests.has_key( itemId): 
     
    246246    def selection( self, srcPlugId, datas): 
    247247      if self.is_enable: 
    248         self.logger.debug( "[Screenshot] feature disable" ) 
     248        self.debug( "[Screenshot] feature disable" ) 
    249249        self.is_enable = False 
    250250        
     
    256256  
    257257      else: 
    258         self.logger.debug( "[Screenshot] feature enable" ) 
     258        self.debug( "[Screenshot] feature enable" ) 
    259259        self.is_enable = True 
    260260         
     
    271271            self.startTimer( self.SEND_PERIOD*1000 ) #- Every minutes 
    272272        else: 
    273             self.directoryWatcher.running = False 
    274             self.directoryWatcher.wait() 
    275             self.killTimer() 
     273            if self.directoryWatcher.running: 
     274                self.directoryWatcher.running = False 
     275                self.directoryWatcher.wait() 
     276                self.killTimer() 
    276277      self.__sendData__( None, Screenshot.SCREENSHOT_STATE) 
    277278      self.__sendData__( None, Screenshot.SCREENSHOT_STATE_TTS) 
     
    308309           
    309310        elif szobj.data_id == "Lockon.Screenshot." + self.TOOGLE_SCREENSHOT_FEATURE: 
    310             self.logger.debug( "Toogle screenshot feature" ) 
     311            self.debug( "Toogle screenshot feature" ) 
    311312            self.selection( None, None) 
    312313           
     
    318319    # @param self                      instance class 
    319320    def _shutDown( self): 
    320         self.directoryWatcher.running = False 
    321         self.directoryWatcher.wait() 
    322         self.directoryWatcher = None 
     321        if self.directoryWatcher.running: 
     322          self.directoryWatcher.running = False 
     323          self.directoryWatcher.wait() 
     324          self.directoryWatcher = None 
    323325        pass 
    324326#---------------------------------------------------------------- 
     
    380382                if not srcPlugId: 
    381383                    srcPlugId = self.plugItemRequests[itemId] 
    382                 self.logger.debug( "[#################]SEND", srcPlugId, itemId ) 
     384                self.debug( "[#################]SEND %s %s"%( srcPlugId, itemId )) 
    383385                self.parentPlug.send_object( srcPlugId, PGPluginClient.OPCODE_DATA_VALUE, objToSend )   
    384386#---------------------------------------------------------------- 
  • trunk/loplug/plugins/teamspeak/pgteamspeak.py

    r1939 r1944  
    371371            self.selectedChannelName = self.channelInfo[channelId]["name"] 
    372372            self.selectedChannelId = channelId 
    373             self.logger.info( "[Teamspeak] switching to channel ", self.selectedChannelName) 
     373            self.info( "[Teamspeak] switching to channel " + self.selectedChannelName) 
    374374             
    375375            self.__sendData__( PGTeamspeak.CHANNEL_LIST) 
     
    391391    # End of: while( self.goOn): 
    392392 
    393     self.logger.debug( "[Teamspeak] Exits process" ) 
     393    self.debug( "[Teamspeak] Exits process" ) 
    394394 
    395395#---------------------------------------------------------------- 
     
    464464  # @param plugId     the plug to notify. None => All the plugs registered for this event 
    465465  def __sendData__( self, dataId, plugId=None, list=False): 
    466     self.logger.info( "sendData: ", dataId) 
     466    self.info( "sendData: " + dataId) 
    467467    if self.requests.has_key( dataId): 
    468468      obj_to_send = None 
     
    536536      # End of: if message 
    537537    else: 
    538       self.logger.info( "No client for data %s -> event not sent\n" % dataId) 
     538      self.info( "No client for data %s -> event not sent\n" % dataId) 
  • trunk/loplug/plugins/texttospeech/pgtexttospeech.py

    r1939 r1944  
    250250      self.voiceName = voiceItem.getName() 
    251251    except: 
    252       self.logger.debug( "EXCEPTION IN TTS _deinit_ui" ) 
     252      self.debug( "EXCEPTION IN TTS _deinit_ui" ) 
    253253 
    254254 
  • trunk/loplug/plugins/x52pro/pgx52pro.py

    r1939 r1944  
    290290        if self.x52pro: 
    291291            self.x52pro.make_pages() 
    292         self.logger.info( "receive message %s" % ( name ) ) 
     292        self.info( "receive message %s" % ( name ) ) 
    293293#---------------------------------------------------------------- 
    294294    # On select callack from X52 
Note: See TracChangeset for help on using the changeset viewer.