Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am making some kind of file browser/manager thing. It lists files and directories. It currently uses its own set of icons for files and directories and symlinks.
Now, knowing or assuming that I have other icon sets installed, how do I use them? How can I link them to my little application? Is there some default location where I know they will be there? Will that location be the same across distros?
Icons are usually stored in subdirectoris within the /usr/share directory.
How to select the icon set you want to use depends on the desktop environment, but icon selection is usually managed somewhere in the settings dialog. In Plasma, you can select the icon set in System Settings-->Appearance-->Icons.
As to linking them to your application, I'm not quite clear on what you are asking, as applications generally use whatever iconset is set as default for the DE.
Icons are usually stored in subdirectoris within the /usr/share directory.
How to select the icon set you want to use depends on the desktop environment, but icon selection is usually managed somewhere in the settings dialog. In Plasma, you can select the icon set in System Settings-->Appearance-->Icons.
As to linking them to your application, I'm not quite clear on what you are asking, as applications generally use whatever iconset is set as default for the DE.
You probably don't understand the part that I am making/writing/coding my own application. There won't be any settings dialog until I make one, and the backend has to know how to select the icons, i.e. **I** have to know how to select the icons. I need to know what exactly "whatever iconset is set as default for the DE" means, and it wouldn't hurt to know how multiple DEs do that.
You probably don't understand the part that I am making/writing/coding my own application.
I did see that you were working on your own application, but I willingly concede that I probably did not fully understand what you were asking. I am not a coder, so I'm out of my depth as regards writing an application.
It occurs to me that, if you want to use a specific iconset in your application, you might package the desired icons with your application and hard link to them in the code, but the mechanics of how to do that are beyond my dataset.
I did see that you were working on your own application, but I willingly concede that I probably did not fully understand what you were asking. I am not a coder, so I'm out of my depth as regards writing an application.
It occurs to me that, if you want to use a specific iconset in your application, you might package the desired icons with your application and hard link to them in the code, but the mechanics of how to do that are beyond my dataset.
Good luck and sorry I couldn't help more.
No worries.
I already have my own icon pack and the code to use them, but I am not happy with it. I only have icons for files, directories and symlinks, and they are very minimalistic. I can live with it, but I know a lot of people will seriously dislike that. I want to use those icon sets that have one icon for each file type, of course not ALL possible file types, but a good enough number of them.
At least you replied. I have no idea how to accomplish this.
You would need a API that comes from the OS and it is my understanding that Linux does not have a standardized API for the GUI.
The API should have the form of
resourceID = LoadSystemResource(H_SYSTEM_ICON, “*.txt”); //This returns a resource ID, it represents the icon for files that have a TXT extension.
and then you apply that icon to your button or whatever,
button.SetIcon(H_SYSTEM_ICON , resourceID);
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.