; Module/File: Window_SetDefIcon2.pb ; Function: Sets default Application-Icon (all Windows), embedded in exe - Linux gtk2/gtk3 ; Author: Omi ; Date: Dec. 22, 2014 ; Version: 0.1 ; Target Compiler: PureBasic 5.22/5.31/5.40 ; Target OS: Linux: (X/K/L)ubuntu, Mint, 32/64, Ascii/Uni ;-------------------------------------------------------------- ;depends on distribution EnableExplicit UsePNGImageDecoder(); this mode need decoder !!! ; Object constants #MainWin= 0 #AppImage = 0 Global.i gEvent, gQuit ;set before 1. window is created ... If CatchImage(#AppImage, ?ProgrammIcon) gtk_window_set_default_icon_(ImageID(#AppImage)) EndIf OpenWindow(#MainWin, 300, 200, 300, 300, "Sets application icon", #PB_Window_SizeGadget) Repeat gEvent= WaitWindowEvent() Select gEvent Case #PB_Event_CloseWindow gQuit= #True EndSelect Until gQuit End DataSection ProgrammIcon: : IncludeBinary "/usr/share/icons/gnome/48x48/apps/preferences-desktop-screensaver.png"; change to existing 48x48-icon EndDataSection ; IDE Options = PureBasic 5.46 LTS (Linux - x86) ; CursorPosition = 37 ; EnableUnicode ; EnableXP