~ubuntu-branches/ubuntu/trusty/groundhog/trusty

« back to all changes in this revision

Viewing changes to src/about_dialog.cc

  • Committer: Bazaar Package Importer
  • Author(s): Stephen M Moraco
  • Date: 2002-01-29 19:11:33 UTC
  • Revision ID: james.westby@ubuntu.com-20020129191133-r8u9eu0ggn5xbws4
Tags: upstream-1.3.2
ImportĀ upstreamĀ versionĀ 1.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Groundhog -- a simple logic game
 
2
 * Copyright (C) 1998-2001 Maurits Rijk
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 */
 
18
 
 
19
#include <config.h>
 
20
 
 
21
#include "about_dialog.h"
 
22
#include "intl.h"
 
23
 
 
24
#include "pixmaps/groundhog.xpm"
 
25
 
 
26
AboutDialog::AboutDialog() : Dialog(_("About Groundhog"))
 
27
{
 
28
   GtkWidget* table = gtk_table_new(3, 1, FALSE);
 
29
   gtk_box_pack_start(GTK_BOX(GTK_DIALOG(_window)->vbox), table, TRUE, TRUE, 
 
30
                      10);
 
31
   gtk_table_set_row_spacings(GTK_TABLE(table), 10);
 
32
   gtk_widget_show(table);
 
33
 
 
34
   // Create groundhog icon.
 
35
   GtkStyle* style = gtk_widget_get_style(table);
 
36
   GdkBitmap* mask;
 
37
   GdkPixmap* data = gdk_pixmap_colormap_create_from_xpm_d(
 
38
      table->window, gtk_widget_get_colormap(table), &mask,
 
39
      &style->bg[GTK_STATE_NORMAL], groundhog_xpm);
 
40
   GtkWidget* icon = gtk_pixmap_new(data, mask);
 
41
   gtk_widget_show(icon);
 
42
   gtk_table_attach_defaults(GTK_TABLE(table), icon, 0, 1, 1, 2);
 
43
 
 
44
   GtkWidget* label = gtk_label_new(
 
45
      "Groundhog "
 
46
      VERSION
 
47
      "\nCopyright (C) 1998-2001 by Maurits Rijk\n"
 
48
      "lpeek.mrijk@consunet.nl");
 
49
   gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
 
50
   gtk_widget_show(label);
 
51
 
 
52
   label = gtk_label_new("  Released under the GNU General Public License  ");
 
53
   gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2, 3);
 
54
   gtk_widget_show(label);
 
55
}