#!/usr/pkg/bin/python3.12

import findrox; findrox.version(1,9,8)
import rox
import os, sys

__builtins__._ = rox.i18n.translation(os.path.join(rox.app_dir, 'Messages'))

if len(sys.argv) == 2 and sys.argv[1] == '--backdrop':
	import actions
	actions.choose_backdrop()
	sys.exit(0)

from rox import g, choices, confirm, report_exception

old_autostart = choices.load('ROX-Session', 'AutoStart/Wallpaper')
if old_autostart and os.path.islink(old_autostart):
	if confirm(_('You have a link to an old version of Wallpaper '
		   'set to be loaded by ROX-Session. This is no '
		   'longer needed -- delete it?'), g.STOCK_DELETE):
		try:
			os.unlink(old_autostart)
		except:
			report_exception()

import main

win = main.Window()
win.show()
rox.mainloop()
