~ubuntu-branches/ubuntu/precise/gnome-games/precise-proposed

« back to all changes in this revision

Viewing changes to iagno/properties.c

  • Committer: Package Import Robot
  • Author(s): Rodrigo Moya
  • Date: 2011-05-30 13:32:04 UTC
  • mfrom: (1.3.4)
  • mto: (163.1.3 precise)
  • mto: This revision was merged to the branch mainline in revision 143.
  • Revision ID: package-import@ubuntu.com-20110530133204-celaq1v1dsxc48q1
Tags: upstream-3.0.2
ImportĀ upstreamĀ versionĀ 3.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
extern gint animate;
63
63
extern gint animate_stagger;
64
64
extern gint flip_final;
65
 
extern gint grid;
 
65
gint show_grid;
66
66
gint sound;
67
67
 
68
68
guint t_black_computer_level;
120
120
  sound = games_conf_get_boolean (NULL, KEY_SOUND, NULL);
121
121
  games_sound_enable (sound);
122
122
 
123
 
  grid = games_conf_get_boolean (NULL, KEY_SHOW_GRID, NULL);
 
123
  show_grid = games_conf_get_boolean (NULL, KEY_SHOW_GRID, NULL);
124
124
 
125
125
  flip_final = games_conf_get_boolean (NULL, KEY_FLIP_FINAL_RESULTS, NULL);
126
126
 
159
159
 
160
160
  t_animate = animate;
161
161
  t_animate_stagger = animate_stagger;
162
 
  t_grid = grid;
 
162
  t_grid = show_grid;
163
163
  t_flip_final = flip_final;
164
164
}
165
165
 
252
252
  games_conf_set_integer (NULL, KEY_ANIMATE, animate);
253
253
 
254
254
  games_conf_set_boolean (NULL, KEY_ANIMATE_STAGGER, animate_stagger);
255
 
  games_conf_set_boolean (NULL, KEY_SHOW_GRID, grid);
 
255
  games_conf_set_boolean (NULL, KEY_SHOW_GRID, show_grid);
256
256
  games_conf_set_boolean (NULL, KEY_FLIP_FINAL_RESULTS, flip_final);
257
257
  games_conf_set_boolean (NULL, KEY_SOUND, sound);
258
258
}
260
260
static void
261
261
apply_changes (void)
262
262
{
263
 
  guint i, j;
 
263
  guint redraw = 0;
264
264
 
265
265
  black_computer_level = t_black_computer_level;
266
266
  white_computer_level = t_white_computer_level;
283
283
  if (strcmp (tile_set, tile_set_tmp)) {
284
284
    g_free (tile_set);
285
285
    tile_set = g_strdup (tile_set_tmp);
286
 
    load_pixmaps ();
287
 
    set_bg_color ();
288
 
    for (i = 0; i < 8; i++)
289
 
      for (j = 0; j < 8; j++)
290
 
        if (pixmaps[i][j] >= BLACK_TURN && pixmaps[i][j] <= WHITE_TURN)
291
 
          gui_draw_pixmap_buffer (pixmaps[i][j], i, j);
292
 
        else
293
 
          gui_draw_pixmap_buffer (0, i, j);
294
 
    gui_draw_grid ();
 
286
    redraw = 1;
295
287
  }
296
288
 
297
289
  animate = t_animate;
313
305
 
314
306
  flip_final = t_flip_final;
315
307
 
316
 
  if (grid != t_grid) {
317
 
    grid = t_grid;
318
 
    gui_draw_grid ();
 
308
  if (show_grid != t_grid) {
 
309
    show_grid = t_grid;
 
310
    redraw = 1;
 
311
  }
 
312
 
 
313
  if (redraw) {
 
314
    load_pixmaps ();
 
315
    gui_draw_board ();
319
316
  }
320
317
 
321
318
  games_sound_enable (sound);
405
402
                                         GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
406
403
                                         NULL);
407
404
 
408
 
  gtk_dialog_set_has_separator (GTK_DIALOG (propbox), FALSE);
409
405
  gtk_container_set_border_width (GTK_CONTAINER (propbox), 5);
410
406
  gtk_box_set_spacing
411
407
    (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (propbox))), 2);