; Module/File: Window_SetDefIcon1.pb ; Function: Sets default Application-Icon (all Windows), runtime load - 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 ImportC "" gtk_window_set_default_icon_from_file(filename.p-utf8, *err) EndImport ;UsePNGImageDecoder() ; Object constants #MainWin= 0 #AppImage = 0 Global.i gEvent, gQuit Global *err.GError ;set before 1. window is created ... gtk_window_set_default_icon_from_file("/usr/share/icons/gnome/48x48/apps/preferences-desktop-screensaver.png", @*err); change to existing 48x48-icon OpenWindow(#MainWin, 300, 200, 300, 300, "Sets application icon", #PB_Window_SystemMenu | #PB_Window_SizeGadget) Repeat gEvent= WaitWindowEvent() Select gEvent Case #PB_Event_CloseWindow gQuit= #True EndSelect Until gQuit End ; IDE Options = PureBasic 5.46 LTS (Linux - x86) ; CursorPosition = 25 ; EnableUnicode ; EnableXP