Beispiel #1
0
 def get_bool(self, section, key, gn=None):
     from ctypes import byref, c_int
     bool = c_int()
     if gtlib.gt_style_get_bool(self.style, section, key, byref(bool),
                                gn) == 1:
         if bool.value == 1:
             return True
         else:
             return False
     else:
         return None
Beispiel #2
0
 def get_bool(self, section, key, gn=None):
     from ctypes import byref, c_int
     bool = c_int()
     err = Error()
     rval = gtlib.gt_style_get_bool(self.style, section, key, byref(bool), \
                                    gn, err)
     if rval == STYLE_OK:
         if bool.value == 1:
             return True
         else:
             return False
     elif rval == STYLE_NOT_SET:
         return None
     elif rval == STYLE_ERROR:
         gterror(err)
Beispiel #3
0
 def get_bool(self, section, key, gn=None):
     from ctypes import byref, c_int
     bool = c_int()
     err = Error()
     rval = gtlib.gt_style_get_bool(self.style, section, key, byref(bool), \
                                    gn, err)
     if rval == STYLE_OK:
         if bool.value == 1:
             return True
         else:
             return False
     elif rval == STYLE_NOT_SET:
         return None
     elif rval == STYLE_ERROR:
         gterror(err)