1
1
/* Groundhog -- a simple logic game
2
* Copyright (C) 1998-2001 Maurits Rijk
2
* Copyright (C) 1998-2002 Maurits Rijk
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>
24
25
#include "new_highscore_dialog.h"
26
#include "pixmaps/champagne.xpm"
28
27
NewHighScoreDialog::NewHighScoreDialog(Game* game) :
29
28
Dialog(_("New Highscore")), _game(game)
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);
39
37
// Create champagne icon.
40
GtkStyle* style = gtk_widget_get_style(table);
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);
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);
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);
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);
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);