[API GNOME] Arrière plan du bureau

Codes specifiques à Linux
Anonyme

[API GNOME] Arrière plan du bureau

Message par Anonyme »

voici un p'tit code qui permet le changement du fond d'écran.
Pour ceux qui veulent faire un Wallpaper-tray bis ;)

http://library.gnome.org/devel/gconf/stable/index.html

Code : Tout sélectionner

; Change le fond d'écran
; POUR GNOME

ImportC "-lgconf-2"
	gconf_client_get_default()
	gconf_client_set_string(*client.i,key.s,val.s,*error.i)
EndImport


;options.s = "wallpaper" ;Tuille
;options.s = "centered"
options.s = "stretched"
;options.s = "scaled"
;options.s = "none"

Picture.s =  OpenFileRequester("Choisissez un fichier à charger", "", "", 0)


If Picture
	Client =  gconf_client_get_default()
	gconf_client_set_string(Client,"/desktop/gnome/background/picture_filename",Picture,#Null)
	gconf_client_set_string(Client,"/desktop/gnome/background/picture_options",options,#Null)
EndIf