1
# Copyright 2006 Joe Wreschnig
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License version 2 as
5
# published by the Free Software Foundation
7
# $Id: session.py 4330 2008-09-14 03:19:26Z piman $
14
from quodlibet import const
17
try: import gnome, gnome.ui
18
except ImportError: return
20
gnome.init("quodlibet", const.VERSION)
21
client = gnome.ui.master_client()
22
client.set_restart_style(gnome.ui.RESTART_IF_RUNNING)
23
command = os.path.normpath(os.path.join(os.getcwd(), sys.argv[0]))
24
try: client.set_restart_command([command] + sys.argv[1:])
26
# Fedora systems have a broken gnome-python wrapper for this function.
27
# http://www.sacredchao.net/quodlibet/ticket/591
28
# http://trac.gajim.org/ticket/929
29
client.set_restart_command(len(sys.argv), [command] + sys.argv[1:])
30
client.connect('die', gtk.main_quit)