~ubuntu-branches/ubuntu/oneiric/groundhog/oneiric

« back to all changes in this revision

Viewing changes to src/new_highscore_dialog.cc

  • Committer: Bazaar Package Importer
  • Author(s): Stephen M Moraco
  • Date: 2004-08-20 23:12:32 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040820231232-18s0op2f9g21ag1z
Tags: 1.4-6
Update Policy Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Groundhog -- a simple logic game
2
 
 * Copyright (C) 1998-2001 Maurits Rijk
 
2
 * Copyright (C) 1998-2002 Maurits Rijk
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
20
20
#include <unistd.h>
21
21
 
22
22
#include "game.h"
 
23
#include "icons.h"
23
24
#include "intl.h"
24
25
#include "new_highscore_dialog.h"
25
26
 
26
 
#include "pixmaps/champagne.xpm"
27
 
 
28
27
NewHighScoreDialog::NewHighScoreDialog(Game* game) : 
29
28
   Dialog(_("New Highscore")), _game(game)
30
29
{
34
33
                      10);
35
34
   gtk_table_set_row_spacings(GTK_TABLE(table), 10);
36
35
   gtk_table_set_col_spacings(GTK_TABLE(table), 5);
37
 
   gtk_widget_show(table);
38
36
 
39
37
   // Create champagne icon.
40
 
   GtkStyle* style = gtk_widget_get_style(table);
41
 
   GdkBitmap* mask;
42
 
   GdkPixmap* data = gdk_pixmap_colormap_create_from_xpm_d(
43
 
      table->window, gtk_widget_get_colormap(table), &mask,
44
 
      &style->bg[GTK_STATE_NORMAL], champagne_xpm);
45
 
   GtkWidget* champagne = gtk_pixmap_new(data, mask);
46
 
 
47
 
   gtk_widget_show(champagne);
48
 
   gtk_table_attach_defaults(GTK_TABLE(table), champagne, 0, 1, 0, 1);
 
38
   GtkWidget* icon = gtk_image_new_from_stock(GROUNDHOG_STOCK_CHAMPAGNE,
 
39
                                              GTK_ICON_SIZE_DIALOG);
 
40
   gtk_table_attach_defaults(GTK_TABLE(table), icon, 0, 1, 0, 1);
49
41
 
50
42
   GtkWidget* label = gtk_label_new(_("Congratulations, a new highscore!"));
51
43
   gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 0, 1);
52
 
   gtk_widget_show(label);
53
44
 
54
45
   GtkWidget* name_label = gtk_label_new(_("Name:"));
55
46
   gtk_table_attach_defaults(GTK_TABLE(table), name_label, 0, 1, 1, 2);
56
 
   gtk_widget_show(name_label);
57
47
 
58
48
   _name = gtk_entry_new();
59
49
   gtk_table_attach_defaults(GTK_TABLE(table), _name, 1, 2, 1, 2);
60
 
   gtk_widget_show(_name);
61
50
}
62
51
 
63
52
void