Changeset 7071


Ignore:
Timestamp:
Mar 20, 2018, 7:59:05 AM (19 months ago)
Author:
jrpelegrina
Message:

Fix bug in search function

Location:
bell-scheduler/trunk/fuentes
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • bell-scheduler/trunk/fuentes/bell-scheduler/python3-bellscheduler/BellBox.py

    r7013 r7071  
    5555        def init_bell_list(self):
    5656       
     57                self.alarms_error=0
    5758                tmp=self.core.bellBox.bell_list_box.get_children()
    5859                for item in tmp:
     
    6566
    6667                self.init_bell_list()
    67 
    68                 if not search:
     68                self.search_box=search
     69                if not self.search_box:
    6970                        self.bells_list=self.core.mainWindow.bells_info
    7071                        order=self.core.mainWindow.order_bells         
     
    7778                        self.new_bell_box(item,last_change)
    7879
     80                if self.alarms_error>0:
     81                        self.core.mainWindow.manage_message(True,31)   
     82
    7983        #def draw_bell         
    8084
     
    8387                self.days_on=0
    8488                self.error_sound=False
     89                self.error_image=False
    8590
    8691                hbox=Gtk.HBox()
     
    224229                        switch_button.set_sensitive(False)
    225230                        switch_button.set_active(False)
    226                         try:
    227                                 self.bells_list[id_bell]["active"]=False
    228                                 self.core.bellmanager.save_conf(self.bells_list,id_bell,"active")
    229                         except:
    230                                 pass
     231                       
     232                        if self.bells_list[id_bell]["active"]:
     233                                try:
     234                                        self.core.mainWindow.bells_info[id_bell]["active"]=False
     235                                        self.core.bellmanager.save_conf(self.core.mainWindow.bells_info,id_bell,"active")
     236                                except:
     237                                        pass
    231238                switch_button.connect("notify::active",self.on_switch_activaded,hbox)
    232239
     
    244251                        hbox.set_name("CHANGE_BOX")
    245252                else:
    246                         hbox.set_name("APP_BOX")
     253                        if not self.error_sound and not self.error_image:
     254                                hbox.set_name("APP_BOX")
     255                        else:
     256                                self.alarms_error+=1
     257                                hbox.set_name("ERROR_BOX")     
    247258                self.bell_list_box.pack_start(hbox,False,False,5)
    248259                self.bell_list_box.queue_draw()
     
    294305                        image.set_from_file(image_path)
    295306                else:
     307                        self.error_image=True
    296308                        image.set_from_file(self.image_nodisp)
    297309                        self.core.mainWindow.loading_errors=True
     
    347359
    348360                if switch.get_active():
    349                         self.bells_list[bell_to_edit]["active"]=True
     361                        self.core.mainWindow.bells_info[bell_to_edit]["active"]=True
    350362                        turn_on=True
    351363                       
    352364                else:
    353                         self.bells_list[bell_to_edit]["active"]=False
    354 
    355                 result=self.core.bellmanager.save_conf(self.bells_list,bell_to_edit,"active")
     365                        self.core.mainWindow.bells_info[bell_to_edit]["active"]=False
     366
     367                result=self.core.bellmanager.save_conf(self.core.mainWindow.bells_info,bell_to_edit,"active")
    356368                if result['status']:
    357369                        if turn_on:
  • bell-scheduler/trunk/fuentes/bell-scheduler/python3-bellscheduler/MainWindow.py

    r7018 r7071  
    530530                elif code==30:
    531531                        msg_text=_("Validating the data entered...")           
    532                                
     532                elif code==31:
     533                        msg_text=_("Detected alarms with errors")               
    533534                       
    534535                return msg_text
  • bell-scheduler/trunk/fuentes/bell-scheduler/python3-bellscheduler/rsrc/bell-scheduler.css

    r6952 r7071  
    129129        }
    130130
     131        #ERROR_BOX {
     132                background-color: #ffa64c;
     133                box-shadow: -0.5px 3px 2px #cdcdcd;
     134        }
     135       
    131136        #BANNER_BOX {
    132137                 background: #005cd2;
  • bell-scheduler/trunk/fuentes/translations/bell-scheduler.pot

    r6952 r7071  
    99"Project-Id-Version: PACKAGE VERSION\n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2018-03-02 09:44+0100\n"
     11"POT-Creation-Date: 2018-03-16 12:53+0100\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    4949
    5050#: bell-scheduler/python3-bellscheduler/MainWindow.py:383
    51 #: bell-scheduler/python3-bellscheduler/BellBox.py:101
     51#: bell-scheduler/python3-bellscheduler/BellBox.py:104
    5252msgid "M"
    5353msgstr ""
     
    6363
    6464#: bell-scheduler/python3-bellscheduler/MainWindow.py:387
    65 #: bell-scheduler/python3-bellscheduler/BellBox.py:111
     65#: bell-scheduler/python3-bellscheduler/BellBox.py:114
    6666msgid "T"
    6767msgstr ""
     
    7777
    7878#: bell-scheduler/python3-bellscheduler/MainWindow.py:391
    79 #: bell-scheduler/python3-bellscheduler/BellBox.py:121
     79#: bell-scheduler/python3-bellscheduler/BellBox.py:124
    8080msgid "W"
    8181msgstr ""
     
    9191
    9292#: bell-scheduler/python3-bellscheduler/MainWindow.py:395
    93 #: bell-scheduler/python3-bellscheduler/BellBox.py:131
     93#: bell-scheduler/python3-bellscheduler/BellBox.py:134
    9494msgid "R"
    9595msgstr ""
     
    105105
    106106#: bell-scheduler/python3-bellscheduler/MainWindow.py:399
    107 #: bell-scheduler/python3-bellscheduler/BellBox.py:141
     107#: bell-scheduler/python3-bellscheduler/BellBox.py:144
    108108msgid "F"
    109109msgstr ""
     
    233233msgstr ""
    234234
    235 #: bell-scheduler/python3-bellscheduler/BellBox.py:201
     235#: bell-scheduler/python3-bellscheduler/MainWindow.py:533
     236msgid "Detected alarms with errors"
     237msgstr ""
     238
     239#: bell-scheduler/python3-bellscheduler/BellBox.py:204
    236240msgid "Delete bell"
    237241msgstr ""
    238242
    239 #: bell-scheduler/python3-bellscheduler/BellBox.py:209
     243#: bell-scheduler/python3-bellscheduler/BellBox.py:212
    240244msgid "Edit bell"
    241245msgstr ""
    242246
    243 #: bell-scheduler/python3-bellscheduler/BellBox.py:214
     247#: bell-scheduler/python3-bellscheduler/BellBox.py:217
    244248msgid "Activate or deactivate bell"
    245249msgstr ""
    246250
    247 #: bell-scheduler/python3-bellscheduler/BellBox.py:312
     251#: bell-scheduler/python3-bellscheduler/BellBox.py:321
    248252msgid "Do you want delete the bell?"
    249253msgstr ""
  • bell-scheduler/trunk/fuentes/translations/ca_ES.UTF-8@valencia.po

    r6952 r7071  
    99"Project-Id-Version: \n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2018-03-02 12:03+0100\n"
    12 "PO-Revision-Date: 2018-03-02 12:05+0100\n"
     11"POT-Creation-Date: 2018-03-16 12:55+0100\n"
     12"PO-Revision-Date: 2018-03-16 13:05+0100\n"
    1313"Last-Translator: Pilar Embid Giner <embid_mar@gva.es>\n"
    1414"Language-Team: LliureX\n"
     
    5656
    5757#: bell-scheduler/python3-bellscheduler/MainWindow.py:383
    58 #: bell-scheduler/python3-bellscheduler/BellBox.py:101
     58#: bell-scheduler/python3-bellscheduler/BellBox.py:104
    5959msgid "M"
    6060msgstr "Dl."
     
    7070
    7171#: bell-scheduler/python3-bellscheduler/MainWindow.py:387
    72 #: bell-scheduler/python3-bellscheduler/BellBox.py:111
     72#: bell-scheduler/python3-bellscheduler/BellBox.py:114
    7373msgid "T"
    7474msgstr "Dt."
     
    8484
    8585#: bell-scheduler/python3-bellscheduler/MainWindow.py:391
    86 #: bell-scheduler/python3-bellscheduler/BellBox.py:121
     86#: bell-scheduler/python3-bellscheduler/BellBox.py:124
    8787msgid "W"
    8888msgstr "Dc."
     
    9898
    9999#: bell-scheduler/python3-bellscheduler/MainWindow.py:395
    100 #: bell-scheduler/python3-bellscheduler/BellBox.py:131
     100#: bell-scheduler/python3-bellscheduler/BellBox.py:134
    101101msgid "R"
    102102msgstr "Dj."
     
    112112
    113113#: bell-scheduler/python3-bellscheduler/MainWindow.py:399
    114 #: bell-scheduler/python3-bellscheduler/BellBox.py:141
     114#: bell-scheduler/python3-bellscheduler/BellBox.py:144
    115115msgid "F"
    116116msgstr "Dv."
     
    170170#: bell-scheduler/python3-bellscheduler/MainWindow.py:497
    171171msgid "File loaded with errors"
    172 msgstr "El fitxer s'ha carregat amb erors."
     172msgstr "El fitxer s'ha carregat amb errors."
    173173
    174174#: bell-scheduler/python3-bellscheduler/MainWindow.py:499
     
    252252msgstr "S'estan validant les dades introduïdes..."
    253253
    254 #: bell-scheduler/python3-bellscheduler/BellBox.py:201
     254#: bell-scheduler/python3-bellscheduler/MainWindow.py:533
     255msgid "Detected alarms with errors"
     256msgstr "Detectades alarmes amb errors"
     257
     258#: bell-scheduler/python3-bellscheduler/BellBox.py:204
    255259msgid "Delete bell"
    256260msgstr "Elimina l'alarma"
    257261
    258 #: bell-scheduler/python3-bellscheduler/BellBox.py:209
     262#: bell-scheduler/python3-bellscheduler/BellBox.py:212
    259263msgid "Edit bell"
    260264msgstr "Edita l'alarma"
    261265
    262 #: bell-scheduler/python3-bellscheduler/BellBox.py:214
     266#: bell-scheduler/python3-bellscheduler/BellBox.py:217
    263267msgid "Activate or deactivate bell"
    264268msgstr "Activa o desactiva l'alarma"
    265269
    266 #: bell-scheduler/python3-bellscheduler/BellBox.py:312
     270#: bell-scheduler/python3-bellscheduler/BellBox.py:321
    267271msgid "Do you want delete the bell?"
    268272msgstr "Voleu eliminar l'alarma?"
  • bell-scheduler/trunk/fuentes/translations/ca_ES@valencia.po

    r6952 r7071  
    99"Project-Id-Version: \n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2018-03-02 12:03+0100\n"
    12 "PO-Revision-Date: 2018-03-02 12:05+0100\n"
     11"POT-Creation-Date: 2018-03-16 12:57+0100\n"
     12"PO-Revision-Date: 2018-03-16 13:05+0100\n"
    1313"Last-Translator: Pilar Embid Giner <embid_mar@gva.es>\n"
    1414"Language-Team: LliureX\n"
     
    5656
    5757#: bell-scheduler/python3-bellscheduler/MainWindow.py:383
    58 #: bell-scheduler/python3-bellscheduler/BellBox.py:101
     58#: bell-scheduler/python3-bellscheduler/BellBox.py:104
    5959msgid "M"
    6060msgstr "Dl."
     
    7070
    7171#: bell-scheduler/python3-bellscheduler/MainWindow.py:387
    72 #: bell-scheduler/python3-bellscheduler/BellBox.py:111
     72#: bell-scheduler/python3-bellscheduler/BellBox.py:114
    7373msgid "T"
    7474msgstr "Dt."
     
    8484
    8585#: bell-scheduler/python3-bellscheduler/MainWindow.py:391
    86 #: bell-scheduler/python3-bellscheduler/BellBox.py:121
     86#: bell-scheduler/python3-bellscheduler/BellBox.py:124
    8787msgid "W"
    8888msgstr "Dc."
     
    9898
    9999#: bell-scheduler/python3-bellscheduler/MainWindow.py:395
    100 #: bell-scheduler/python3-bellscheduler/BellBox.py:131
     100#: bell-scheduler/python3-bellscheduler/BellBox.py:134
    101101msgid "R"
    102102msgstr "Dj."
     
    112112
    113113#: bell-scheduler/python3-bellscheduler/MainWindow.py:399
    114 #: bell-scheduler/python3-bellscheduler/BellBox.py:141
     114#: bell-scheduler/python3-bellscheduler/BellBox.py:144
    115115msgid "F"
    116116msgstr "Dv."
     
    170170#: bell-scheduler/python3-bellscheduler/MainWindow.py:497
    171171msgid "File loaded with errors"
    172 msgstr "El fitxer s'ha carregat amb erors."
     172msgstr "El fitxer s'ha carregat amb errors."
    173173
    174174#: bell-scheduler/python3-bellscheduler/MainWindow.py:499
     
    252252msgstr "S'estan validant les dades introduïdes..."
    253253
    254 #: bell-scheduler/python3-bellscheduler/BellBox.py:201
     254#: bell-scheduler/python3-bellscheduler/MainWindow.py:533
     255msgid "Detected alarms with errors"
     256msgstr "Detectades alarmes amb errors"
     257
     258#: bell-scheduler/python3-bellscheduler/BellBox.py:204
    255259msgid "Delete bell"
    256260msgstr "Elimina l'alarma"
    257261
    258 #: bell-scheduler/python3-bellscheduler/BellBox.py:209
     262#: bell-scheduler/python3-bellscheduler/BellBox.py:212
    259263msgid "Edit bell"
    260264msgstr "Edita l'alarma"
    261265
    262 #: bell-scheduler/python3-bellscheduler/BellBox.py:214
     266#: bell-scheduler/python3-bellscheduler/BellBox.py:217
    263267msgid "Activate or deactivate bell"
    264268msgstr "Activa o desactiva l'alarma"
    265269
    266 #: bell-scheduler/python3-bellscheduler/BellBox.py:312
     270#: bell-scheduler/python3-bellscheduler/BellBox.py:321
    267271msgid "Do you want delete the bell?"
    268272msgstr "Voleu eliminar l'alarma?"
  • bell-scheduler/trunk/fuentes/translations/es.po

    r6952 r7071  
    99"Project-Id-Version: \n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2018-03-02 09:45+0100\n"
    12 "PO-Revision-Date: 2018-03-02 09:46+0100\n"
     11"POT-Creation-Date: 2018-03-16 12:54+0100\n"
     12"PO-Revision-Date: 2018-03-16 12:55+0100\n"
    1313"Last-Translator: lliurex <lliurex@gva.es>\n"
    1414"Language-Team: Spanish\n"
     
    5656
    5757#: bell-scheduler/python3-bellscheduler/MainWindow.py:383
    58 #: bell-scheduler/python3-bellscheduler/BellBox.py:101
     58#: bell-scheduler/python3-bellscheduler/BellBox.py:104
    5959msgid "M"
    6060msgstr "L"
     
    7070
    7171#: bell-scheduler/python3-bellscheduler/MainWindow.py:387
    72 #: bell-scheduler/python3-bellscheduler/BellBox.py:111
     72#: bell-scheduler/python3-bellscheduler/BellBox.py:114
    7373msgid "T"
    7474msgstr "M"
     
    8484
    8585#: bell-scheduler/python3-bellscheduler/MainWindow.py:391
    86 #: bell-scheduler/python3-bellscheduler/BellBox.py:121
     86#: bell-scheduler/python3-bellscheduler/BellBox.py:124
    8787msgid "W"
    8888msgstr "X"
     
    9898
    9999#: bell-scheduler/python3-bellscheduler/MainWindow.py:395
    100 #: bell-scheduler/python3-bellscheduler/BellBox.py:131
     100#: bell-scheduler/python3-bellscheduler/BellBox.py:134
    101101msgid "R"
    102102msgstr "J"
     
    112112
    113113#: bell-scheduler/python3-bellscheduler/MainWindow.py:399
    114 #: bell-scheduler/python3-bellscheduler/BellBox.py:141
     114#: bell-scheduler/python3-bellscheduler/BellBox.py:144
    115115msgid "F"
    116116msgstr "V"
     
    251251msgstr "Validando los datos introducidos..."
    252252
    253 #: bell-scheduler/python3-bellscheduler/BellBox.py:201
     253#: bell-scheduler/python3-bellscheduler/MainWindow.py:533
     254msgid "Detected alarms with errors"
     255msgstr "Detectadas alarmas con errores"
     256
     257#: bell-scheduler/python3-bellscheduler/BellBox.py:204
    254258msgid "Delete bell"
    255259msgstr "Borrar la alarma"
    256260
    257 #: bell-scheduler/python3-bellscheduler/BellBox.py:209
     261#: bell-scheduler/python3-bellscheduler/BellBox.py:212
    258262msgid "Edit bell"
    259263msgstr "Editar la alarma"
    260264
    261 #: bell-scheduler/python3-bellscheduler/BellBox.py:214
     265#: bell-scheduler/python3-bellscheduler/BellBox.py:217
    262266msgid "Activate or deactivate bell"
    263267msgstr "Activa o desactiva la alarma"
    264268
    265 #: bell-scheduler/python3-bellscheduler/BellBox.py:312
     269#: bell-scheduler/python3-bellscheduler/BellBox.py:321
    266270msgid "Do you want delete the bell?"
    267271msgstr "¿Desea borrar la alarma?"
Note: See TracChangeset for help on using the changeset viewer.