#! /usr/bin/env python
import sys
import os

cwd = os.getcwd()
sys.path.append(cwd)
sys.path.append(os.path.join(cwd, "src"))

from src.manager.accountswindow import AccountsWindow
from src.manager.dbusinterface import get_dbus_interface

cwd = os.getcwd()
sys.path.append(cwd)

print """
###################################################################
#
#  Warning: you are running cGmail from source package. If you
#  want to hack the code please remind that play button on account
#  manager will launch the installed version of cgmailservice (if there
#  is one). Changes to the code of the service will appear not reflected!!!
#
###################################################################
"""

iface = get_dbus_interface()
if iface is not None:
	print "There is already a running instance"
else:
	a = AccountsWindow()
	a.show()
