what's the point of checking if the schemas exists when it's part of the same source and we know it's being installed? if the schemas is not there the installation is corrupted and we better let the code error out...
do we need those checks? what do you try to avoid? if the visibility changed then it's likely that the checkbox state will change, it's also not obvious that all those checks spare any work over calling set_active in any case.
Thank you for the work, some comment from a first review:
304 ++ const gchar * const * schemas = g_settings_ list_schemas ();
305 ++ for (i=0; !schema_exists && schemas && schemas[i]; i++)
306 ++ if (!g_strcmp0 (schema, schemas[i]))
307 ++ schema_exists = TRUE;
what's the point of checking if the schemas exists when it's part of the same source and we know it's being installed? if the schemas is not there the installation is corrupted and we better let the code error out...
286 ++on_settings_ visible_ changed (GSettings *settings, gchar *key, CcBluetoothPanel * panel)
287 ++{
288 ++ g_return_if_fail (!g_strcmp0 (key, VISIBLE_KEY));
why do you check the key? is the signal connected on another key than visible_key? that seems not required
289 ++ BUTTON( panel-> priv->indicator _check) ; button_ get_active (toggle); get_boolean (settings, key); button_ set_active (toggle, newval);
290 ++ GtkToggleButton *toggle = GTK_TOGGLE_
291 ++ gboolean oldval = gtk_toggle_
292 ++ gboolean newval = g_settings_
293 ++ if (oldval != newval)
294 ++ gtk_toggle_
do we need those checks? what do you try to avoid? if the visibility changed then it's likely that the checkbox state will change, it's also not obvious that all those checks spare any work over calling set_active in any case.