Exemplo n.º 1
0
/**
 * safe_cb
 * @widget: widget
 * @data: the super safe moves checkbox
 *
 * Description:
 * handles message from the 'safe moves' checkbox
 **/
static void
safe_cb (GtkWidget * widget, gpointer data)
{
  GtkWidget *super_safe_chkbox;
  super_safe_chkbox = GTK_WIDGET (data);
  properties.safe_moves = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
  conf_set_use_safe_moves (properties.safe_moves);
  gtk_widget_set_sensitive (super_safe_chkbox, properties.safe_moves);
}
Exemplo n.º 2
0
/**
 * save_properties
 *
 * Description:
 * saves the game properties to a file
 *
 * Returns:
 * TRUE if the properties can be saved, FALSE otherwise
 **/
gboolean
save_properties (void)
{
  gint i;

  for (i = 0; i < 12; i++) {
    conf_set_control_key (i, properties.keys[i]);
  }

  conf_set_theme (properties.themename);
  conf_set_configuration (game_config_name (properties.selected_config));
  conf_set_use_safe_moves (properties.safe_moves);
  conf_set_use_super_safe_moves (properties.super_safe_moves);
  conf_set_enable_sound (properties.sound);

  return TRUE;
}
Exemplo n.º 3
0
/**
 * safe_cb
 * @widget: widget
 * @data: callback data
 *
 * Description:
 * handles message from the 'safe moves' checkbox
 **/
static void
safe_cb (GtkWidget * widget, gpointer data)
{
  properties.safe_moves = GTK_TOGGLE_BUTTON (widget)->active;
  conf_set_use_safe_moves (properties.safe_moves);
}