Page 1 of 1

Icon for Ubuntu while running

Posted: Mon Aug 04, 2014 12:38 am
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!

Re: Icon for Ubuntu while running

Posted: Mon Aug 04, 2014 3:23 am
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

Re: Icon for Ubuntu while running

Posted: Mon Aug 04, 2014 3:37 am
by ts-soft
Here: http://www.purebasic.fr/english/viewtop ... 15&t=59400
a script that do that for you!

Re: Icon for Ubuntu while running

Posted: Mon Aug 04, 2014 1:49 pm
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: