~ubuntu-branches/ubuntu/oneiric/gnome-games/oneiric-updates

« back to all changes in this revision

Viewing changes to .pc/01_lpi.patch/gnect/src/main.c

  • Committer: Package Import Robot
  • Author(s): Rodrigo Moya
  • Date: 2011-05-30 13:32:04 UTC
  • mfrom: (1.1.92) (3.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20110530133204-124q7mmr507o3ouj
Tags: 1:3.0.2-0ubuntu1
* Rebased from Debian and GNOME3 PPA. Remaining Ubuntu changes
* debian/control:
  - Keep separation of games in subpackages (gnome-sudoku disabled for now)
  - Build depend on liblaunchpad-integration-3.0-dev, dh-autoreconf and gnome-common
* debian/rules:
  - Use autoreconf.mk for dh-autoreconf
  - Use multiarch location for libraries and introspection
* debian/watch:
  - Watch unstable series
* debian/patches/01_lpi.patch:
  - Launchpad integration
* debian/patches/02_desktop-path.patch:
  - Use full patch for games in /usr/games
* debian/patches/80_change_tetris_theme.patch:
  - Use plain tetris theme by default as tangoshaded runs slow
* debian/patches/81_change_iagno_theme.patch:
  - Use small theme by default

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
    tile = TILE_PLAYER2;
173
173
 
174
174
  gboard[r][c] = tile;
175
 
  gfx_draw_tile (r, c, TRUE);
 
175
  gfx_draw_tile (r, c);
176
176
 
177
177
  column = column_moveto = c;
178
178
  row = row_dropto = r;
191
191
    tile = TILE_PLAYER2;
192
192
 
193
193
  gboard[row][column] = TILE_CLEAR;
194
 
  gfx_draw_tile (row, column, TRUE);
 
194
  gfx_draw_tile (row, column);
195
195
 
196
196
  row++;
197
197
  gboard[row][column] = tile;
198
 
  gfx_draw_tile (row, column, TRUE);
 
198
  gfx_draw_tile (row, column);
199
199
}
200
200
 
201
201
 
204
204
move_cursor (gint c)
205
205
{
206
206
  gboard[0][column] = TILE_CLEAR;
207
 
  gfx_draw_tile (0, column, TRUE);
 
207
  gfx_draw_tile (0, column);
208
208
 
209
209
  column = c;
210
210
 
213
213
  else
214
214
    gboard[0][c] = TILE_PLAYER2;
215
215
 
216
 
  gfx_draw_tile (0, c, TRUE);
 
216
  gfx_draw_tile (0, c);
217
217
 
218
218
  column = column_moveto = c;
219
219
  row = row_dropto = 0;
225
225
move (gint c)
226
226
{
227
227
  gboard[0][column] = TILE_CLEAR;
228
 
  gfx_draw_tile (0, column, TRUE);
 
228
  gfx_draw_tile (0, column);
229
229
 
230
230
  column = c;
231
231
 
234
234
  else
235
235
    gboard[0][c] = TILE_PLAYER2;
236
236
 
237
 
  gfx_draw_tile (0, c, TRUE);
 
237
  gfx_draw_tile (0, c);
238
238
}
239
239
 
240
240
 
261
261
  do {
262
262
    done = (r1 == r2 && c1 == c2);
263
263
    gboard[r1][c1] = tile;
264
 
    gfx_draw_tile (r1, c1, TRUE);
 
264
    gfx_draw_tile (r1, c1);
265
265
    if (r1 != r2)
266
266
      r1 += d_row;
267
267
    if (c1 != c2)
641
641
  move_cursor (c);
642
642
 
643
643
  gboard[r][c] = TILE_CLEAR;
644
 
  gfx_draw_tile (r, c, TRUE);
 
644
  gfx_draw_tile (r, c);
645
645
 
646
646
  if (get_n_human_players () == 1 && !is_player_human ()) {
647
647
    if (moves > 0) {
653
653
      swap_player ();
654
654
      move_cursor (c);
655
655
      gboard[r][c] = TILE_CLEAR;
656
 
      gfx_draw_tile (r, c, TRUE);
 
656
      gfx_draw_tile (r, c);
657
657
    }
658
658
  }
659
659
}
774
774
                                          GTK_STOCK_CLOSE,
775
775
                                          GTK_RESPONSE_CLOSE, NULL);
776
776
 
777
 
  gtk_dialog_set_has_separator (GTK_DIALOG (scorebox), FALSE);
778
777
  gtk_window_set_resizable (GTK_WINDOW (scorebox), FALSE);
779
778
  gtk_container_set_border_width (GTK_CONTAINER (scorebox), 5);
780
779
  gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (scorebox))), 2);
781
780
 
782
 
  g_signal_connect (GTK_OBJECT (scorebox), "destroy",
 
781
  g_signal_connect (scorebox, "destroy",
783
782
                    G_CALLBACK (gtk_widget_destroyed), &scorebox);
784
783
 
785
784
  vbox = gtk_vbox_new (FALSE, 6);
1187
1186
}
1188
1187
 
1189
1188
static gboolean
1190
 
on_drawarea_expose (GtkWidget * w, GdkEventExpose * e, gpointer data)
 
1189
on_drawarea_draw (GtkWidget * w, cairo_t *cr, gpointer data)
1191
1190
{
1192
 
  gfx_expose (&e->area);
 
1191
  gfx_expose (cr);
1193
1192
 
1194
1193
  return FALSE;
1195
1194
}
1360
1359
  statusbar = gtk_statusbar_new ();
1361
1360
  ui_manager = gtk_ui_manager_new ();
1362
1361
 
1363
 
  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), FALSE);
1364
1362
  games_stock_prepare_for_statusbar_tooltips (ui_manager, statusbar);
1365
1363
  create_game_menus (ui_manager);
1366
1364
  menubar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu");
1367
1365
 
1368
 
  vpaned = gtk_vpaned_new ();
 
1366
  vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
1369
1367
 
1370
1368
  vbox = gtk_vbox_new (FALSE, 0);
1371
1369
  gridframe = games_grid_frame_new (7, 7);
1394
1392
  gtk_widget_set_events (drawarea, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
1395
1393
  g_signal_connect (G_OBJECT (drawarea), "configure_event",
1396
1394
                    G_CALLBACK (on_drawarea_resize), NULL);
1397
 
  g_signal_connect (G_OBJECT (drawarea), "expose_event",
1398
 
                    G_CALLBACK (on_drawarea_expose), NULL);
 
1395
  g_signal_connect (G_OBJECT (drawarea), "draw",
 
1396
                    G_CALLBACK (on_drawarea_draw), NULL);
1399
1397
  g_signal_connect (G_OBJECT (drawarea), "button_press_event",
1400
1398
                    G_CALLBACK (on_button_press), NULL);
1401
1399
  g_signal_connect (G_OBJECT (app), "key_press_event",
1412
1410
  gtk_widget_hide (chat);
1413
1411
#endif
1414
1412
 
1415
 
  if (!gfx_set_grid_style ())
1416
 
    return FALSE;
1417
 
 
1418
1413
  gfx_refresh_pixmaps ();
1419
1414
  gfx_draw_all ();
1420
1415