1
char *rcsid_gtk2_about_c =
2
"$Id: about.c 4664 2006-07-05 05:21:08Z mwedel $";
4
Crossfire client, a client program for the crossfire program.
6
Copyright (C) 2006 Mark Wedel & Crossfire Development Team
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 of the License, or
11
(at your option) any later version.
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
The author can be reached via e-mail to crossfire@metalforge.org
26
/* This file is here to cover configuration issues.
37
#include "interface.h"
42
#include "gtk2proto.h"
44
#include "../../pixmaps/crossfiretitle.xpm"
47
static GtkWidget *about_window=NULL;
50
menu_about (GtkMenuItem *menuitem,
55
GtkTextBuffer *textbuf;
58
GtkWidget *aboutgtkpixmap;
59
GdkPixmap *aboutgdkpixmap;
60
GdkBitmap *aboutgdkmask;
63
about_window=create_about_window();
65
textview = lookup_widget(about_window, "about_textview");
66
textbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
68
gtk_text_buffer_get_end_iter(textbuf, &end);
69
gtk_text_buffer_insert(textbuf, &end, VERSION_INFO, strlen(VERSION_INFO));
70
gtk_text_buffer_insert(textbuf, &end, "\n", 1);
71
gtk_text_buffer_insert(textbuf, &end, text, strlen(text));
73
/* The window must be realized before we can create the pixmap below */
74
gtk_widget_show(about_window);
76
aboutgdkpixmap = gdk_pixmap_create_from_xpm_d(about_window->window,
79
(gchar **)crossfiretitle);
80
aboutgtkpixmap= gtk_image_new_from_pixmap (aboutgdkpixmap, aboutgdkmask);
82
/* Use of hbox is a bit of a hack - isn't any easy way to add
83
* this image as the first entry of the box once other fields have been
84
* filled in. So instead, we create a hbox in that first entry just
87
hbox = lookup_widget(about_window, "about_hbox_image");
88
gtk_box_pack_start (GTK_BOX (hbox),aboutgtkpixmap, TRUE, TRUE, 0);
90
gtk_widget_show(aboutgtkpixmap);
93
gtk_widget_show(about_window);
100
on_about_close_clicked (GtkButton *button,
103
gtk_widget_hide(about_window);