3
# Ubuntu Tweak - PyGTK based desktop configure tool
5
# Copyright (C) 2007-2008 TualatriX <tualatrix@gmail.com>
7
# Ubuntu Tweak is free software; you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 2 of the License, or
10
# (at your option) any later version.
12
# Ubuntu Tweak is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with Ubuntu Tweak; if not, write to the Free Software Foundation, Inc.,
19
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23
sys.setdefaultencoding('utf8')
28
import dbus.mainloop.glib
31
INTERFACE = "com.ubuntu_tweak.daemon.getconfig"
32
PATH = "/com/ubuntu_tweak/daemon/getconfig"
34
class GetConfig(dbus.service.Object):
35
def __init__ (self, bus):
36
bus_name = dbus.service.BusName(INTERFACE, bus=bus)
37
dbus.service.Object.__init__(self, bus_name, PATH)
39
@dbus.service.method(INTERFACE,
40
in_signature='s', out_signature='b')
41
def is_exists(self, path):
42
return os.path.exists(path)
44
if __name__ == '__main__':
45
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
46
GetConfig(dbus.SystemBus())
48
mainloop = gobject.MainLoop()