generate-setting-docs.py: remove unused propxml argument from get_prop_type()
This commit is contained in:
@@ -111,7 +111,7 @@ def init_constants(girxml, settings):
|
|||||||
setting_name = constants[setting_name_symbol]
|
setting_name = constants[setting_name_symbol]
|
||||||
setting_names[setting_type_name] = setting_name
|
setting_names[setting_type_name] = setting_name
|
||||||
|
|
||||||
def get_prop_type(setting, pspec, propxml):
|
def get_prop_type(setting, pspec):
|
||||||
dbus_type = setting.get_dbus_property_type(pspec.name).dup_string()
|
dbus_type = setting.get_dbus_property_type(pspec.name).dup_string()
|
||||||
prop_type = dbus_type_name_map[dbus_type]
|
prop_type = dbus_type_name_map[dbus_type]
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ def get_default_value(setting, pspec, propxml):
|
|||||||
if default_value is None:
|
if default_value is None:
|
||||||
return default_value
|
return default_value
|
||||||
|
|
||||||
value_type = get_prop_type(setting, pspec, propxml)
|
value_type = get_prop_type(setting, pspec)
|
||||||
if value_type == 'string' and default_value != '' and pspec.name != 'name':
|
if value_type == 'string' and default_value != '' and pspec.name != 'name':
|
||||||
default_value = '"%s"' % default_value
|
default_value = '"%s"' % default_value
|
||||||
elif value_type == 'gchar' and default_value != '':
|
elif value_type == 'gchar' and default_value != '':
|
||||||
@@ -251,7 +251,7 @@ for settingxml in settings:
|
|||||||
if propxml is None:
|
if propxml is None:
|
||||||
propxml = ipxml.find('./gi:property[@name="%s"]' % pspec.name, ns_map)
|
propxml = ipxml.find('./gi:property[@name="%s"]' % pspec.name, ns_map)
|
||||||
|
|
||||||
value_type = get_prop_type(setting, pspec, propxml)
|
value_type = get_prop_type(setting, pspec)
|
||||||
value_desc = get_docs(propxml)
|
value_desc = get_docs(propxml)
|
||||||
default_value = get_default_value(setting, pspec, propxml)
|
default_value = get_default_value(setting, pspec, propxml)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user