![]() You will now see the template user interface. Select open, and navigate to our new directory. Next, we have to re-work the user interface file so open designer. Clicking on the text for bluegriffon sends the index 007 to the application, and the Exec field of the list tells how to launch the selected application.Ĭreate a new directory called qt5_appsearch and copy the following files from the qt5_template directory into this new directory renaming them as follows:Įdit update_res.sh and change both occurrences of template to appsearch. The number on the left is added by the application, and is an index into the generated lists. The highlighting is helpful as in the example above 'edi' is found in Media but we are looking for editors, so this line can be ignored. ![]() It will then search for whatever is currently in the text search box in these lists and display matches, highlighting the matched part. The application will read each of the '.desktop' files in /usrshare/applications and create a list of this information for each of the files. This is the information that was displayed by the search in the snapshot. There is no 'Keywords' entry in this file. Exec what you would type at the command line to launch the applicationįor the sktop file this reduces to:.Keywords words that might be used to search for the application.Comment some descriptIon of the application.Genericname this might be something like editor.For the purposes of this application, I am going to restrict its' use to the default English language and to five sections: This file describes the applications name and features, usually in many languages, and consists of several sections so the entire file can be quite long. ![]() When an application is installed, a file with the name of the application and the extension '.desktop' is placed in the /usr/share/applications directory. Most Linux desktops adhere to a standard defined by. This is much quicker than searching the menu. Clicking anywhere in the respective text closes the appsearch utility and launches the chosen HTML editor. By the time that I have typed in 'edi,' I have found two possibilities - Bluefish and Blue Griffon (scrolling down reveals no more than the two shown in the screenshot). I know that I have at least one installed, but cannot remember the name.Īs I begin to type 'editor' in the box, the search is refined, at first showing every possibility that contains the letter 'e', then 'ed'. Suppose that I need to use a HTML editor. It will be based on the template application and looks like the snapshot above. ![]() The next utility that I am going to build goes some way to solving this problem by providing real-time searching on any word and single click launching of the selected application. When I need one of these rarely used applications, I often cannot remember the name and sometimes, when searching through the menu, the name doesn't readily reflect the purpose or function of the application. Some I don't use very often, but still find useful. I have a lot of applications installed on my system. Some of the code in here is admittedly not basic stuff, so if it is a bit too much to 'get your head around,' just accept that it works for now. When you can understand (most of) this example, you will have a good understanding of basic python. It will take more time to explain, and even more time to understand, as there a lot of new ideas coming all at once. This application is more complex than the previous examples.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |