Skip to content
  • Allison Karlitskaya's avatar
    g_settings_bind: use canonical property name · 1a20d56a
    Allison Karlitskaya authored and Matthias Clasen's avatar Matthias Clasen committed
    We were using the user-passed value of the @property argument for
    several purposes in g_settings_bind(): error messages, binding
    uniqueness (ie: one-binding-per-property-per-object) and most
    importantly, connecting to the detailed notify:: signal.
    
    The user may pass a string like "property_name" when the property's
    canonical name is "property-name".  g_object_class_find_property() will
    find the property under these circumstances, but a connection to
    "notify::property_name" will not notice notifies emitted for
    "property-name".
    
    We can solve this by using the user's string to perform the lookup and
    then using pspec->name for everything after that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684882
    1a20d56a