LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-09-2023, 09:22 AM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,434

Rep: Reputation: 110Reputation: 110
How do I use/reuse installed icon sets?


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?
 
Old 05-10-2023, 08:15 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,363
Blog Entries: 28

Rep: Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148
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.
 
1 members found this post helpful.
Old 05-11-2023, 01:00 PM   #3
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,434

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by frankbell View Post
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.
 
Old 05-11-2023, 09:36 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,363
Blog Entries: 28

Rep: Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148
Quote:
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.

Good luck and sorry I couldn't help more.
 
1 members found this post helpful.
Old 05-11-2023, 10:50 PM   #5
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,434

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by frankbell View Post
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.
 
Old 05-12-2023, 02:12 PM   #6
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Rep: Reputation: 84
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);


I don’t really know how it is handled on Linux.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Two Awesome Tray Icon Sets for GNOME LXer Syndicated Linux News 0 02-22-2011 01:10 PM
LXer: 22 Great Icon Sets for your Linux Desktop LXer Syndicated Linux News 0 02-21-2011 02:30 AM
Reuse socket fails "Address already in use" or "Connection refused" dec10 Programming 3 05-15-2010 12:14 PM
Installing Icon Theme Sets in OpenOffice njschroe SUSE / openSUSE 1 06-09-2005 06:28 PM
icon sets slim27616 Mandriva 0 08-11-2004 06:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration