import gconf
import ibus
from ibus import interface

class Config(ibus.Object):
    def __init__ (self, conn, path):
		super(Config, self).__init__()
        self.__proxy = ConfigProxy(self, conn, path)
        self.__client = gconf.Client()
        self.__client.connect("value-changed", self.__value_changed_cb)
        self.__client.add_dir("/", gconf.CLIENT_PRELOAD_NONE)

    def get_string(self, key):
        pass
    def get_int(self, key):
        pass
    def get_bool(self, key):
        pass
    
    def set_string(self, key, value):
        pass
    def set_int(self, key, value):
        pass
    def set_bool(self, key, value):
        pass

    def __value_changed_cb(self, gconf, key, value):
        value = self.__client.get_value(key)
        print key, type(value), value
        self.__proxy.ValueChanged(key, value)

class ConfigProxy(interface.IConfig):
    def __init__ (self, config, conn, object_path):
		super(ConfigProxy, self).__init__(conn, object_path)
        self.__config = config

    def GetString(self, key):
        return self.__config.get_string(key)
    def GetInt(self, key):
        return self.__config.get_int(key)
    def GetBool(self, key):
        return self.__config.get_bool(key)

    def SetString(self, key, value):
        self.__config.set_string(key, value)
    def SetInt(self, key, value):
        self.__config.set_int(key, value)
    def SetBool(self, key, value):
        self.__config.set_bool(key, value)

@@ -1,12 +1,851 @@
+# vim:set et sts=4 sw=4:%0A#%0A# ibus - The Input Bus%0A#%0A# Copyright(c) 2007-2008 Huang Peng %3Cshawn.p.huang@gmail.com%3E%0A#%0A# This library is free software; you can redistribute it and/or%0A# modify it under the terms of the GNU Lesser General Public%0A# License as published by the Free Software Foundation; either%0A# version 2 of the License, or(at your option) any later version.%0A#%0A# This library is distributed in the hope that it will be useful,%0A# but WITHOUT ANY WARRANTY; without even the implied warranty of%0A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A# GNU Lesser General Public License for more details.%0A#%0A# You should have received a copy of the GNU Lesser General Public%0A# License along with this program; if not, write to the%0A# Free Software Foundation, Inc., 59 Temple Place, Suite 330,%0A# Boston, MA  02111-1307  USA%0A%0A
 import gconf
@@ -945,26 +945,32 @@
 onn, path):%0A
-%09%09
+        
 super(Config
@@ -1773,10 +1773,16 @@
 h):%0A
-%09%09
+        
 supe

Add header.