Icon for Ubuntu while running

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
marcoagpinto
Addict
Addict
Posts: 1045
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Icon for Ubuntu while running

Post by marcoagpinto »

Hello!

Why can't the icon for Windows of my creations be used in Ubuntu automatically since it is in the definitions (I want it to appear on the left in the list of icons instead of a question mark)?

Months ago, someone told me how to make icons appear in Ubuntu but it is way too hard for me and most users.

Thanks!
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Icon for Ubuntu while running

Post by StarBootics »

Hello everyone,

@Fred and/or Freak : Maybe you can create a temporary or a generic *.desktop file in the "/home/username/.local/share/applications/" then copy the user selected icon to "/home/username/.local/share/icons/hicolor/48x48/apps/" folder or in the right folder name according to the icon size.

And make this optionnal in the compiler options.

Best regards
SatBootics
The Stone Age did not end due to a shortage of stones !
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Icon for Ubuntu while running

Post by ts-soft »

Here: http://www.purebasic.fr/english/viewtop ... 15&t=59400
a script that do that for you!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: Icon for Ubuntu while running

Post by heartbone »

marcoagpinto wrote:Hello!

Why can't the icon for Windows of my creations be used in Ubuntu automatically since it is in the definitions (I want it to appear on the left in the list of icons instead of a question mark)?

Months ago, someone told me how to make icons appear in Ubuntu but it is way too hard for me and most users.

Thanks!
I remember that old way of making the icons appear in UBUNTU, and it was convoluted.

luis helped me to make this easy solution:

Code: Select all

;;; SETUP LINUX ICON CREATION
UsePNGImageDecoder()   ;;;
ImportC ""   ;;;
   gtk_window_set_icon(a.l,b.l,c.l)  ;;;
EndImport   ;;;
InitSprite()
OpenWindow(0,0,0,800,600,"SOFTWARE",#PB_Window_ScreenCentered)
ICON= CatchImage(#PB_Any,?LINUXICON)   ;;;
gtk_window_set_icon_(WindowID(0),ImageID(ICON))   ;;;
Delay(5000)
End
LINUXICON: : IncludeBinary "linux.png"   ;;;
The necessary commands have 3 trailing semicolons.
I haven't tested for size constraints as I usually work with the 48 pixel icon size.
Hope this works for you. :wink:
Keep it BASIC.
Post Reply