BETA: New, faster version of IceWM Toolbar Icon Manager

Forum Forums antiX-development Development BETA: New, faster version of IceWM Toolbar Icon Manager

  • This topic has 35 replies, 6 voices, and was last updated Feb 20-9:32 pm by Brian Masinick.
Viewing 15 posts - 1 through 15 (of 36 total)
  • Author
    Posts
  • #99572
    Member
    PPC

      For another thread, that got me thinking how nice it would be to finally use the power of python to (almost) instantly get a localized list of all available applications (extracted from the .desktop files), since I know nothing about that programming language, I tested, on my old desktop antiX 19, a script that worked great…
      When I got to my office, I tested it on my antiX 22 computer and… it failed. It took some hard work to find out that antix 19 and antiX 22 use different python versions… Of course, it’s a nice idea to change the way users print more than one variable in the same line from one version of the programming language to the other, right? Shame on me, that I’m learning this on the fly, from on-line examples…
      Anyway:

      Please test the new version of the script: unzip the file and run the script (it uses the same localization files from the previous version, so it should be localized, for all you non English speakers).

      The “python3” version should work in antiX 21/22
      The “antiX19” version… well the name says it all…

      TO DO:
      – If the script works fine (as I guess it should, I only changed the way it creates the list of available applications), I’ll probably have to create a check, to see which python version is installed, and have the bash script run the corresponding mini-python-script (so the same script works for older and newer antiX versions)…
      – I need HELP- It seems that the .desktop files in the antiX subfolder are not displayed on the list, when using the older Python version (i.e, in antiX 19)… Anyone knows how to go around that? (It’s not a deal breaker for me, but it would be nice if all applications were listed- to the Dev Team: is there a good reason for the antiX related .desktop files to be on a subfolder??? I always wondered about that.

      P.

      • This topic was modified 2 months, 3 weeks ago by PPC.
      #99577
      Forum Admin
      anticapitalista
        Helpful
        Up
        0
        ::

        Very quick test of “python3” version – noticeably opens faster than the present version.

        Philosophers have interpreted the world in many ways; the point is to change it.

        antiX with runit - leaner and meaner.

        #99579
        Member
        PPC
          Helpful
          Up
          0
          ::

          I realized I made a mistake – the previous antiX 19 version had the same python script as the newer version… sorry about that.

          New version:

          – It should check what python version is being used and run the correct python script (only tested on antiX 22)
          – Corrected a localization bug
          – Changed all the cancel buttons to ” x “, because the gtk-cancel button is not universally localized (pt and pt-br users, for example, got those buttons is English)

          To do:
          – Text script in antiX 19
          – Add icons to the title bar

          #99581
          Member
          PPC
            Helpful
            Up
            0
            ::

            Updated version, with icons. I also changed the gtk-yes button to “Ok” because it does not get universally localized (I know, now in the Advanced instructions, it refers to a “Yes” button, and there’s an “Ok” button instead… I can live with that).

            If it works under antiX 19 (python 2.X) it seems to be production ready…

            Until I test the script under antix 19, I’m not doing anything else with it… If someone can test it in that antiX version, please report back here!

            P.

            #99594
            Moderator
            Brian Masinick
              Helpful
              Up
              0
              ::

              @PPC: I love your creativity, interest and willingness to use a variety of tools to get various tasks done.

              I’m another one who has very little experience with Python, but I did take the time and effort to write a few really simple programs in Python.

              For my first ever example of doing something with Python, I was working for a financial services company and we were trying to make certain financial compliance and networking matters as reliable and up-to-date as possible.

              Whatever we were doing, we had a big spreadsheet at one point and we were trying to locate, then modify several things.
              I figured that a script using one of several search and replace languages ought to work; either Perl or Python could do the job.
              Frankly I wasn’t very good with either of them, but I am very good (or at least I *was* once very good) at specifying details, from which almost any task could be engineered.

              So I put together a mock up of fake data that was a rough copy of some real or pseudo real data, made sure there were absolutely zero actual real data entries, then I brought the data, my exact specifications and ideas to a on-line networking friend who WAS very good with Python, and we worked together; I specified and he wrote, and we got it right with the mock data, so I tried it out on real “test data” and it also worked, so my organization was able to use my tool, with my idea and my modified version of the other guy’s code.

              More recently I was trying to build simple digital clocks in a variety of tool languages including Python.

              Your work here PPC is much more interesting and I look forward to trying it out. Hopefully I’ll get a chance to try it later today.

              --
              Brian Masinick

              #99598
              Moderator
              Brian Masinick
                Helpful
                Up
                0
                ::

                @PPC: I just tried out your tool. It’s basically an enhancement of a previous tool that has been used to do similar things, but now you can add virtually any icon that represents an application that is present in the list of applications at /usr/share/applications.

                I chose to add Geany to my IceWM toolbar. First, I added it, then I moved it, one location at a time, several app icons to the left on my toolbar and it worked perfectly. Sure enough, checking my ~/.icewm directory, there is an updated toolbar and toolbar.bak. My easy, simple, yet practical change worked perfectly. I know how to make changes myself, but with this tool I can do it very quickly, and indeed I can look at the result since I know where it is located; for those who are unfamiliar with modifying these configuration files, this is great; even for those who DO know, this is convenient and fast, and geeks can certainly continue to do it by hand OR use the tool and double-check the result.

                I like this tool; even if it doesn’t become a default, standard tool I recommend getting it in our toolchest, but it’s also light and fast, so maybe this one can become part of our next release, and available in our standard repo; it ought to work because I’m using it now with antiX 22 and the changes it performs are common to every IceWM change I’ve made in the last 25 years; hopefully the same is true for other window managers; if so, even better!

                --
                Brian Masinick

                #99621
                Member
                marcelocripe
                  Helpful
                  Up
                  0
                  ::

                  Hello PPC.

                  I just tested the new “icewm-toolbar-icon-manager-v2023-python3and2-with-icons.zip” on the ISO “antiX-23-alpha1-runit_x64-full.iso”. The execution speed of this new manager is really impressive.

                  I just couldn’t understand why you decided to remove the texts from the buttons. Allowing buttons to be translated is still the best option, translated buttons are better understood than fixed texts that we cannot translate. Not all languages understand “Ok”, the button in question should be translated to pt_BR by “Continue” and instead of the “X” the button should be “Cancel” or “Do not continue”.

                  Thank you very much!

                  – – – – –

                  Olá PPC.

                  Eu acabei de testar o novo “icewm-toolbar-icon-manager-v2023-python3and2-with-icons.zip” na ISO “antiX-23-alpha1-runit_x64-full.iso”. A velocidade na execução deste novo gerenciador é realmente impressionante.

                  Eu só não consegui entender porque você resolveu retirar os textos dos botões. Permitir a tradução dos botões ainda é a melhor opção, os botões traduzidos são melhores compreendidos do que os textos fixos que não podemos traduzir. Nem todos os idiomas compreendem “Ok”, o botão em questão deveria ser traduzido para pt_BR por “Continuar” e no lugar do “X” o botão deveria ser “Cancelar” ou “Não Continuar”.

                  Muito obrigado!

                  #99637
                  Member
                  PPC
                    Helpful
                    Up
                    0
                    ::

                    Hi @Marcelocripe – thanks for testing the script for me, I’m glad that it works and faster than ever.
                    One of the most frustrating things about trying to develop any kind of program for people to use is that we can’t please everyone…
                    On the changes I did to the localization of the script:
                    – I did state why I did every single change that I did… Like most people I hate seeing partly unlocalized applications – it makes them look unprofessional. I also hate handling with the localization part of any script. The current version of the script, that’s in the Repository has every single “cancel” or “quit” button use the gtk-cancel button. It looks great “a very nice x inside a circle with the word “Quit” next to it. The problem is that gtk-cancel buttons are only in English and some other languages (like French, I guess), not in pt-pt, for example. So I see an application totally in perfect Portuguese and then a button in English, in every single window… Are you telling me that people can’t understand what a button with ” x ” means? That it does also have to say “Cancel” (in the user’s language) for users to understand? Where do people click to close a window? Hum… in a button that is ” x “. That is recognized, across the world as “Close” or “Exit” or “Quit” from an application or window. If anticapitalista wants to use this updated version of the script (as I think he should) I ask him to keep that small change.

                    On the “ok” button change – it’s a similar situation- the script got changed to use (I think, I didn’t check) the option “gtk-yes” instead of a localized text that just said “yes”. Once again, gtk buttons are not very well localized, so I got a Portuguese window with a button saying “yes” in English. Not everyone across the world understands what “yes” means (most people do), but “ok” is used across in world, in many languages, to express approval. More humans on hearth understand what “ok” means than what the English word “yes” means, because they use “ok” on their own language.
                    You are, of course, completely right about this- ideally, the field should just have the word “yes”, marked as localized ( $”yes”), instead of “OK”, and be translated on the script’s localization files, but I thought there was no need to have the localization file changed for just that word.
                    Strangely enough, you did not complain about having the original script with those buttons is English… Just out of curiosity – to they appear in Portuguese in pt-br systems?
                    If they do not, don’t you think users will understand better the buttons as they are now?

                    Anyway: I’ll try to make a small change so the script always gets the correct icons, and a minor change, after that, I’m recommending anticapitalista to use that version- and trust me folks, I’m not writing a single extra word about localization…

                    P.

                    #99644
                    Member
                    marcelocripe
                      Helpful
                      Up
                      0
                      ::

                      PPC, about incomplete translations in various programs available in antiX. My answer is the same one I wrote on this forum and on the MX Linux forum: “There are Zeh translations that have been in Transifex for over 5 and a half years, and have never been used!” Wallon managed to prove on the MX Linux forum that the translations are not being used. We found out on the MX Linux forum that there was someone responsible for downloading the Transifex translations and uploading them to GitHub/GitLab. This person said that he always updated Gits with the same content as Transifex, but he actually didn’t do it correctly, he just said he did, but he didn’t. According to the words of Dolphin Oracle (at least that’s what I understood from the automatic translation), this person is no longer on the MX Linux development team. Dolphin Oracle took over this work and the result is that MX Linux in 6 months is more translated than antiX in years, all because Dolphin saw that the translations were not being used.
                      Therefore, replacing texts with images is a mistake, this looks like the “gear” in App Select (what is the “gear” for in Windows or Android?). And about providing a button with the text “OK” is the same as having “Yes”, both are from the English language and I don’t use them in my daily life and they should all be translated. Is “Okay” really understood across planet Earth? Does every human being on planet Earth know what “Okay” means?
                      It is up to programmers and developers whether or not to use the latest Transifex translations. If the translation is not working, then it means that the program is not prepared properly to use the translations, so the program is unfinished and needs to be completed. Like your Debinstaller that was reviewed by BobC for the translations to work.

                      Even if I do the translations directly upstream, it’s not guaranteed to make it to antiX, as .deb packages can be built with outdated or missing .mo/.qm files in many languages.

                      – – – – –

                      PPC, sobre as traduções incompletas em vários programas disponíveis no antiX. A minha resposta é a mesma que eu escrevi neste fórum e no fórum do MX Linux: “Tem traduções do Zeh que estão no Transifex há mais de 5 anos e meio, e nunca foram utilizadas!” O Wallon conseguiu provar no fórum do MX Linux que as traduções não estão sendo utilizadas. Ficamos sabendo no fórum do MX Linux que tinha um responsável em baixar as traduções do Transifex e enviar para o GitHub/GitLab. Esta pessoa dizia que sempre atualizava os Gits com o mesmo conteúdo do Transifex, mas na verdade ele não fazia isso corretamente, apenas dizia que fazia, mas não fazia. Segundo as palavras do Dolphin Oracle (ao menos foi o que eu compreendi da tradução automática), esta pessoa não está mais na equipe de desenvolvimento do MX Linux. O Dolphin Oracle assumiu este trabalho e o resulado disso é que o MX Linux em 6 meses está mais traduzido do que o antiX em anos, tudo porque o Dolphin viu que as traduções não estavam sendo utilizadas.
                      Por tanto, susbtituir os textos por imagens é um erro, isso se parece com a “engrenagem” no App Select (para que serve a “engrenagem” no Windows ou no Android?). E sobre fornecer um botão com o texto “OK” é o mesmo que ter o “Yes”, ambos são do idioma Inglês e eu não os utilizo no meu dia a dia e deveriam ser todos traduzidos. Será que o “Ok” é realmente comprendido em todo o planeta Terra? Será que todos os seres humanos do planeta Terra sabem o que significa “Ok”?
                      Cabe aos progamadores e desenvolvedores quererem utilizar ou não as traduções mais recentes do Transifex. Se a tradução não está funcionando, então significa que o programa não está preparado adequadamente para utilizar as traduções, então o programa está inacabado e precisa ser concluído. A exemplo do seu Debinstaller que foi revisado pelo BobC para as traduções funcionarem.

                      Mesmo que eu faça as traduções diretamente no desenvolvedor do código fonte, não é garantido que chegará até o antiX, já que os pacotes .deb podem ser construídos com arquivos .mo/.qm desatualizados ou faltando diversos idiomas.

                      #99658
                      Member
                      PPC
                        Helpful
                        Up
                        0
                        ::

                        Hi all- newest beta – with a little of code cleaning and also better search for harder to find icons… please test. If no bug found, I propose this to be the final beta version- and the devs can bump the version on the repo.

                        P.

                        #99664
                        Moderator
                        Brian Masinick
                          Helpful
                          Up
                          0
                          ::

                          Hi PPC, I downloaded the newest beta and tried it out. It’s working reliably and I did not detect any defects.
                          Looks and behaves well.

                          --
                          Brian Masinick

                          #99705
                          Member
                          PPC
                            Helpful
                            Up
                            0
                            ::

                            A “final” testing version is available: I added a window icon that was missing on an error message and reworked again the part of the script that tries to locate the correct icon- now it should work with almost 100% accuracy – I tested on dozen of apps, including some that do not come with antiX by default, like OnlyOffice ( it was a nice surprise and the search routine said it found an icon for it in on of the default icon folders, and that turned out to be, for some reason, a false positive, forcing me to add a check to make sure that, even after running a command to make sure the file existed, I had to run it again to make really sure the file existed… Yeah, computers are pure logic *sarcasm*).
                            This script still includes many “echo” statements, used for debugging the routine that searches for icons, from that, you can see what steps it goes trough in order to do a simple task, like displaying an icon!!!
                            For some reason the gnome game 2048 does not appear in IceWM menu, but it does come up on T.I.M. and now, it can be added to the toolbar… Maybe it’s a IceWM bug?

                            Edit: They way T.I.M. tries to place icons on the taskbar is by searching for the “Icon=” field on the .desktop file for the chosen application. Usually, that field does not say the full path to the icon… The way the script works is by checking if a .png file by that name exists in the 4 most probable folders that store icons. If it finds no match, it then tries to search for that icon file on 2 generic folders (and I mean, really search, using the “find” command, so it may take a couple of seconds to find the correct icon, on slower computers, like in my netbook… If all that fails, a generic “gears” icon is placed in the toolbar, allowing you to still use that icon to quick-launch your application. My aim is that the script always finds an acceptable icon and does not have to use that generic icon…

                            P.

                            • This reply was modified 2 months, 3 weeks ago by PPC.
                            #99719
                            Member
                            PPC
                              Helpful
                              Up
                              0
                              ::

                              I’m just too tired to find out why, on certain circumstances, if the routine to discover the correct icon, instead of the default “gears” icon, the previous version of the script just left the user without an icon (and thus, nothing was added to the toolbar), so I included another safeguard, if the icon was empty, use the default “gears” one…

                              By the way- the only icon that failed to be added and caused this was the “Search the antiX forum” one…

                              P.

                              #99723
                              Moderator
                              Brian Masinick
                                Helpful
                                Up
                                0
                                ::

                                PPC, this one still looks good, but as you say, 1) you are getting the gear icon for the search, and 2) right now our forum really doesn’t have the same capabilities to search topics within the forum; the only things searchable right now are the site-wide announcements, such as the “antiX-21 (Grup Yorum) released” announcement.

                                With regard to this, perhaps an external search that provides the appropriate reference to the antiX Forum, plus an argument list to the terms you want to search – that might be a handy tool to add, though the astute person can figure out how to search themselves.

                                Other than these minor matters, this has turned out to be a pretty good tool as it is. If you do want to add anything else later, that would be the only thing right now that I can think of. Though I’m quite capable of adding my own toolbar icons, and I’ve been doing it for 25+ years with IceWM, I have indeed found your tool to be fast and useful; whatever you decide to do or not do, I applaud everything you’ve already done. I think you’ve added plenty of value to our forum and our distribution with creativity, efficiency, and striking a good balance between function and simplicity. Well done!

                                If I come up with anything else that is worth a contribution, I’ll pass on either code or suggestions. Thanks!

                                --
                                Brian Masinick

                                #99725
                                Member
                                marcelocripe
                                  Helpful
                                  Up
                                  0
                                  ::

                                  For some reason the gnome game 2048 does not appear in IceWM menu, but it does come up on T.I.M. and now, it can be added to the toolbar… Maybe it’s a IceWM bug?

                                  This is not an issue unique to the game “gnome 2048”, other .desktop files are not displayed in antiX menus, in particular .desktop files that have an entry dedicated to a specific desktop environment. Another example that is not displayed in the antiX menus is “desmume-glade.desktop” and “desmume.desktop”, both have the entry “TryExec=desmume-glade”. If the “TryExec=desmume-glade” entry is deleted, the text of the “Name” entry is displayed after the “sudo desktop-menu –write-out-global” command.

                                  – – – – –

                                  For some reason the gnome game 2048 does not appear in IceWM menu, but it does come up on T.I.M. and now, it can be added to the toolbar… Maybe it’s a IceWM bug?

                                  Este não é um problema exclusivo do jogo “gnome 2048”, outros arquivos .desktop não são exibidos nos menus do antiX, em especial os arquivos .desktop que possuem uma entrada dedicada a um ambiente de área de trabalho específico. Um outro exemplo que não é exibido nos menus do antiX é o “desmume-glade.desktop” e o “desmume.desktop”, ambos possuem a entrada “TryExec=desmume-glade”. Se a entrada “TryExec=desmume-glade” for exculída, o texto da entrada “Name” é exibido após o comando “sudo desktop-menu –write-out-global”.

                                Viewing 15 posts - 1 through 15 (of 36 total)
                                • You must be logged in to reply to this topic.