Beispiel #1
0
static void
settings_changed_cb (GSettings *settings,
                     const char *key,
                     gpointer data)
{
  GnibblesProperties *props = (GnibblesProperties *) data;

  gnibbles_properties_update (props);
}
static void
conf_value_changed_cb (GamesConf *conf,
                       const char *group,
                       const char *key,
                       gpointer data)
{
  GnibblesProperties *props = (GnibblesProperties *) data;

  if (!group || strcmp (group, KEY_PREFERENCES_GROUP) != 0)
    return;

  gnibbles_properties_update (props);
}
Beispiel #3
0
GnibblesProperties *
gnibbles_properties_new (void)
{
  GnibblesProperties *props;

  props = g_slice_new0 (GnibblesProperties);

  props->conf_notify_id = g_signal_connect (settings, "changed", G_CALLBACK (settings_changed_cb), props);

  gnibbles_properties_update (props);

  return props;
}
GnibblesProperties *
gnibbles_properties_new (void)
{
  GnibblesProperties *props;

  props = g_slice_new0 (GnibblesProperties);

  props->conf_notify_id = g_signal_connect (games_conf_get_default (),
                                            "value-changed",
                                            G_CALLBACK (conf_value_changed_cb),
                                            props);

  gnibbles_properties_update (props);

  return props;
}