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

« back to all changes in this revision

Viewing changes to src/about_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
19
19
#include <config.h>
20
20
 
21
21
#include "about_dialog.h"
 
22
#include "icons.h"
22
23
#include "intl.h"
23
24
 
24
 
#include "pixmaps/groundhog.xpm"
25
 
 
26
25
AboutDialog::AboutDialog() : Dialog(_("About Groundhog"))
27
26
{
28
27
   GtkWidget* table = gtk_table_new(3, 1, FALSE);
29
28
   gtk_box_pack_start(GTK_BOX(GTK_DIALOG(_window)->vbox), table, TRUE, TRUE, 
30
29
                      10);
31
30
   gtk_table_set_row_spacings(GTK_TABLE(table), 10);
32
 
   gtk_widget_show(table);
33
31
 
34
32
   // 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);
 
33
   GtkWidget* icon = gtk_image_new_from_stock(GROUNDHOG_STOCK_ABOUT,
 
34
                                              GTK_ICON_SIZE_DIALOG);
42
35
   gtk_table_attach_defaults(GTK_TABLE(table), icon, 0, 1, 1, 2);
43
36
 
44
37
   GtkWidget* label = gtk_label_new(
45
38
      "Groundhog "
46
39
      VERSION
47
 
      "\nCopyright (C) 1998-2001 by Maurits Rijk\n"
 
40
      "\nCopyright (C) 1998-2002 by Maurits Rijk\n"
48
41
      "lpeek.mrijk@consunet.nl");
49
42
   gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
50
 
   gtk_widget_show(label);
 
43
   gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
51
44
 
52
45
   label = gtk_label_new("  Released under the GNU General Public License  ");
53
46
   gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2, 3);
54
 
   gtk_widget_show(label);
55
47
}