Changeset 2311


Ignore:
Timestamp:
Aug 1, 2016, 10:37:34 AM (3 years ago)
Author:
jrpelegrina
Message:

Improve general performance

Location:
zero-lliurex-flavours/trunk/fuentes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • zero-lliurex-flavours/trunk/fuentes/install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py

    r2145 r2311  
    4343                self.info["installed"]=False
    4444                self.info["checked"]=False
     45                self.info["incompatible"]=False
    4546                self.info["shadow_alpha"]=0.1
    4647                self.info["animation_active"]=False
     
    129130                self.configuration_start=0
    130131               
    131                 self.first_run=True
    132                 self.update_alternatives=False
    133                
    134132                self.current_grid_width=0
    135133                self.current_grid_height=0
     
    142140                self.green=CustomColor(74.0,166.,69.0)
    143141                self.light_green=CustomColor(88.0,208.0,86.0)
    144                
    145142               
    146143                self.conf_light=CustomColor(49.0,55.0,66.0)
     
    258255                        else:
    259256                                if gb.info["installed"]==True:
     257                                        self.check_meta_blocked(gb, self.gbs)
    260258                                        self.flavours_installed+=1     
    261259                                self.add_grid_button(gb)       
    262                                
    263                
    264 
    265        
     260                       
    266261        #def gather_info
    267262       
     263        def check_meta_blocked(self, gb, gbs):
     264
     265                if gb.info["pkg"]=="lliurex-meta-server":
     266                        for gb in self.gbs:
     267                                if gb.info["pkg"]=="lliurex-meta-client":
     268                                        gb.info["incompatible"]=True
     269                                elif gb.info["pkg"]=="lliurex-meta-desktop" and not gb.info["installed"]:
     270                                        gb.info["incompatible"]=True   
     271                elif gb.info["pkg"]=="lliurex-meta-client":
     272                        for gb in self.gbs:
     273                                if gb.info["pkg"]=="lliurex-meta-server":
     274                                        gb.info["incompatible"]=True                           
     275
     276        #def check_meta_blocked                         
     277
    268278        def pulsate_gathering_info(self):
    269279               
     
    317327                }
    318328               
     329                #DIALOG_LABEL{
     330                        color: #8297a1;
     331                        font: Noto Sans Bold 10;               
     332                }
     333
    319334                #MAIN_LABEL_DISABLED{
    320335                        color: #c9d4e2;
     
    474489        def button_clicked(self,widget,event,grid_button):
    475490               
    476                 if not grid_button.info["installed"]:
     491                if not (grid_button.info["installed"] or grid_button.info["incompatible"]):
    477492                        if grid_button.info["checked"]:
    478493                                self.install_metas.remove(grid_button)
    479494                                grid_button.info["checked"]=False
     495                                grid_button.info["drawingarea"].queue_draw()
     496                                self.mouse_left(grid_button.info["drawingarea"],None,grid_button)
    480497                        else:
    481498                                self.install_metas.append(grid_button)
     
    489506       
    490507        def accept_clicked(self,widget,even=None):
     508               
    491509                ret, msg=self.check_meta_compatibility()
    492510               
     
    495513                        self.msg_label.set_markup(msg)
    496514                        return
    497                
    498                 self.msg_label.hide()           
     515                else:
     516                        self.msg_label.hide()
     517                        self.show_confirm_dialog(widget)
     518       
     519        # def accept_clicked                   
     520       
     521        def show_confirm_dialog(self, widget):
     522                message=_("The selected flavours will be installed. Do you wish to continue?")
     523                label = Gtk.Label(message)
     524
     525                dialog = Gtk.Dialog("Warning", None, Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT, (Gtk.STOCK_YES, Gtk.ResponseType.YES, Gtk.STOCK_NO, Gtk.ResponseType.NO))
     526                dialog.vbox.pack_start(label,True,True,10)
     527
     528                label.show()
     529                #dialog.set_border_width(6)
     530                dialog.set_name("BACK_GRADIENT")
     531                label.set_name("DIALOG_LABEL")
     532
     533                response = dialog.run()
     534
     535                if response==Gtk.ResponseType.YES:
     536                        self.install_packages(widget)
     537                dialog.destroy()               
     538               
     539        # def show_confirm_dialog       
     540                               
     541        def install_packages(self,widget):
     542               
     543                       
    499544                cmd='apt-get update && apt-get install -y '
    500545                pkg=""
     
    504549                for item in self.install_metas:
    505550                        pkg+=item.info["pkg"] + ' '
    506                                
     551               
    507552                command=cmd+pkg
     553       
    508554                self.t=threading.Thread(target=self.execute,args=(command,))
    509555                self.t.daemon=True
    510556                self.t.start()
    511557                GLib.timeout_add(100,self.pulsate_pbar,widget)
    512                 self.progress_window.show()
    513                
    514                
    515         # def accept_clicked           
     558                self.progress_window.show()     
     559               
     560               
     561        # def install_packages 
    516562               
    517563        def check_meta_compatibility(self):
     
    623669                        ctx.fill()
    624670               
     671
     672                if grid_button.info["incompatible"]:
     673               
     674                        desc = Pango.font_description_from_string ("Noto Sans Bold 7")
     675                        pctx.set_font_description(desc)
     676                        ctx.set_source_rgba(255,0,0,1)
     677                        txt=_("Incompatible")
     678                        pctx.set_markup(txt)
     679                        width=pctx.get_pixel_size()[0]
     680                        ctx.move_to(140-width-5,120)
     681                        PangoCairo.show_layout(ctx, pctx)
     682                       
     683                        ctx.rectangle(5,139,130,1)
     684                        ctx.fill()
    625685        #def draw_button
    626686       
     
    828888        # def log               
    829889               
     890
     891                       
    830892#awesome tabs
    831893
  • zero-lliurex-flavours/trunk/fuentes/lliurex-po/zero-lliurex-flavours/ca_ES@valencia.po

    r2145 r2311  
    99"Project-Id-Version: \n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2016-07-11 09:55+0200\n"
    12 "PO-Revision-Date: 2016-07-13 09:10+0200\n"
     11"POT-Creation-Date: 2016-08-01 09:58+0200\n"
     12"PO-Revision-Date: 2016-08-01 10:01+0200\n"
    1313"Last-Translator: Pilar Embid Giner <embid_mar@gva.es>\n"
    1414"Language-Team: LliureX\n"
     
    2020"X-Generator: Poedit 1.8.7.1\n"
    2121
    22 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:277
     22#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:288
    2323msgid "No flavour detected. Check one at least"
    2424msgstr "No s'ha seleccionat cap sabor. Seleccioneu-ne un, com a mínim"
    2525
    26 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:432
     26#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:451
    2727msgid "Installation succesful. A reboot is required"
    2828msgstr "La instal·lació és correcta. Cal que reinicieu"
    2929
    30 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:435
     30#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:454
    3131msgid "An error ocurred. See log in /tmp/lliurex-flavours-selector"
    3232msgstr "S'ha produït un error. Reviseu el registre en /tmp/lliurex-flavours-selector"
    3333
    34 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:525
    35 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:533
    36 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:553
     34#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:522
     35msgid "The selected flavours will be installed. Do you wish to continue?"
     36msgstr "Els sabors seleccionats seran instal·lats. Desitgeu continuar?"
     37
     38#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:576
     39#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:584
     40#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:604
    3741msgid "Incompatibility between Server and Client detected"
    38 msgstr "S'ha detectat una incompatibilitat entre servidor i cliente"
     42msgstr "S'ha detectat una incompatibilitat entre servidor i client"
    3943
    40 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:528
     44#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:579
    4145msgid "Is not possible adding Desktop Flavour in Server"
    4246msgstr "No es pot incorporar el sabor Escriptori al servidor"
    4347
    44 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:558
     48#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:609
    4549msgid "Choose new flavour to incorporate or close button"
    4650msgstr "Seleccioneu un sabor nou per a incorporar-lo o polseu Tanca"
    4751
    48 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:597
     52#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:648
    4953msgid "Installed"
    5054msgstr "Instal·lat"
    5155
    52 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:611
     56#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:662
    5357msgid "Install"
    5458msgstr "Instal·la"
    5559
    56 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:647
     60#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:677
     61msgid "Incompatible"
     62msgstr "Incompat"
     63
     64#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:712
    5765msgid "APPLY"
    5866msgstr "APLICAR"
    5967
    60 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:704
     68#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:769
    6169msgid "CLOSE"
    6270msgstr "TANCA"
  • zero-lliurex-flavours/trunk/fuentes/lliurex-po/zero-lliurex-flavours/es.po

    r2143 r2311  
    77msgid ""
    88msgstr ""
    9 "Project-Id-Version: \n"
     9"Project-Id-Version: PACKAGE VERSION\n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2016-07-11 09:55+0200\n"
    12 "PO-Revision-Date: 2016-07-11 10:02+0200\n"
     11"POT-Creation-Date: 2016-08-01 09:58+0200\n"
     12"PO-Revision-Date: 2016-08-01 10:01+0200\n"
    1313"Last-Translator: lliurex <juapesai@hotmail.com>\n"
    1414"Language-Team: Spanish\n"
     
    1818"Content-Transfer-Encoding: 8bit\n"
    1919"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    20 "X-Generator: Poedit 1.8.7.1\n"
    2120
    22 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:277
     21#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:288
    2322msgid "No flavour detected. Check one at least"
    2423msgstr "Ningún sabor detectado. Seleccione al menos uno"
    2524
    26 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:432
     25#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:451
    2726msgid "Installation succesful. A reboot is required"
    2827msgstr "Instalación correcta. Es necesario reiniciar"
    2928
    30 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:435
     29#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:454
    3130msgid "An error ocurred. See log in /tmp/lliurex-flavours-selector"
    3231msgstr "A ocurrido un error. Revise el log en /tmp/lliurex-flavours-selector"
    3332
    34 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:525
    35 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:533
    36 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:553
     33#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:522
     34msgid "The selected flavours will be installed. Do you wish to continue?"
     35msgstr "Los sabores seleccionados serán instalados. ¿Desea continuar?"
     36
     37#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:576
     38#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:584
     39#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:604
    3740msgid "Incompatibility between Server and Client detected"
    3841msgstr "Detectada incompatibilidad entre Servidor y Cliente"
    3942
    40 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:528
     43#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:579
    4144msgid "Is not possible adding Desktop Flavour in Server"
    4245msgstr "No es posible incorporar el sabor Desktop en el Servidor"
    4346
    44 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:558
     47#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:609
    4548msgid "Choose new flavour to incorporate or close button"
    4649msgstr "Seleccione un nuevo sabor a incorporar o pulse cerrar"
    4750
    48 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:597
     51#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:648
    4952msgid "Installed"
    5053msgstr "Instalado"
    5154
    52 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:611
     55#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:662
    5356msgid "Install"
    5457msgstr "Instalar"
    5558
    56 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:647
     59#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:677
     60msgid "Incompatible"
     61msgstr "Incompat"
     62
     63#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:712
    5764msgid "APPLY"
    5865msgstr "APLICAR"
    5966
    60 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:704
     67#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:769
    6168msgid "CLOSE"
    6269msgstr "CERRAR"
  • zero-lliurex-flavours/trunk/fuentes/lliurex-po/zero-lliurex-flavours/zero-lliurex-flavours.pot

    r2143 r2311  
    99"Project-Id-Version: PACKAGE VERSION\n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2016-07-11 09:55+0200\n"
     11"POT-Creation-Date: 2016-08-01 09:58+0200\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1818"Content-Transfer-Encoding: 8bit\n"
    1919
    20 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:277
     20#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:288
    2121msgid "No flavour detected. Check one at least"
    2222msgstr ""
    2323
    24 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:432
     24#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:451
    2525msgid "Installation succesful. A reboot is required"
    2626msgstr ""
    2727
    28 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:435
     28#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:454
    2929msgid "An error ocurred. See log in /tmp/lliurex-flavours-selector"
    3030msgstr ""
    3131
    32 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:525
    33 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:533
    34 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:553
     32#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:522
     33msgid "The selected flavours will be installed. Do you wish to continue?"
     34msgstr ""
     35
     36#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:576
     37#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:584
     38#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:604
    3539msgid "Incompatibility between Server and Client detected"
    3640msgstr ""
    3741
    38 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:528
     42#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:579
    3943msgid "Is not possible adding Desktop Flavour in Server"
    4044msgstr ""
    4145
    42 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:558
     46#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:609
    4347msgid "Choose new flavour to incorporate or close button"
    4448msgstr ""
    4549
    46 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:597
     50#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:648
    4751msgid "Installed"
    4852msgstr ""
    4953
    50 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:611
     54#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:662
    5155msgid "Install"
    5256msgstr ""
    5357
    54 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:647
     58#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:677
     59msgid "Incompatible"
     60msgstr ""
     61
     62#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:712
    5563msgid "APPLY"
    5664msgstr ""
    5765
    58 #: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:704
     66#: ../install-files/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py:769
    5967msgid "CLOSE"
    6068msgstr ""
Note: See TracChangeset for help on using the changeset viewer.