2 * Copyright (C) 1998 Peter Zelezny.
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.
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.
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
25 #include <gtk/gtkmain.h>
26 #include <gtk/gtkcontainer.h>
27 #include <gtk/gtkdialog.h>
28 #include <gtk/gtkvbox.h>
29 #include <gtk/gtkhbox.h>
30 #include <gtk/gtkimage.h>
31 #include <gtk/gtklabel.h>
32 #include <gtk/gtkbutton.h>
33 #include <gtk/gtkstock.h>
34 #include <gtk/gtkwindow.h>
40 #include "../common/xchat.h"
41 #include "../common/util.h"
48 #if 0 /*def USE_GNOME*/
51 menu_about (GtkWidget
* wid
, gpointer sess
)
54 const gchar
*author
[] = { "Peter Zelezny <zed@xchat.org>", 0 };
56 (snprintf
) (buf
, sizeof (buf
),
57 "An IRC Client for UNIX.\n\n"
58 "This binary was compiled on "__DATE__
"\n"
59 "Using GTK %d.%d.%d X %d\n"
61 gtk_major_version
, gtk_minor_version
, gtk_micro_version
,
63 VendorRelease (GDK_DISPLAY ()), get_cpu_str());
68 gtk_widget_show (gnome_about_new ("X-Chat", PACKAGE_VERSION
,
69 "(C) 1998-2005 Peter Zelezny", author
, buf
, 0));
74 static GtkWidget
*about
= 0;
84 menu_about (GtkWidget
* wid
, gpointer sess
)
86 GtkWidget
*vbox
, *label
, *hbox
;
88 const char *locale
= NULL
;
89 extern GtkWindow
*parent_window
; /* maingui.c */
93 gtk_window_present (GTK_WINDOW (about
));
97 about
= gtk_dialog_new ();
98 gtk_window_set_position (GTK_WINDOW (about
), GTK_WIN_POS_CENTER
);
99 gtk_window_set_resizable (GTK_WINDOW (about
), FALSE
);
100 gtk_window_set_title (GTK_WINDOW (about
), _("About "DISPLAY_NAME
));
102 gtk_window_set_transient_for (GTK_WINDOW (about
), parent_window
);
103 g_signal_connect (G_OBJECT (about
), "destroy",
104 G_CALLBACK (about_close
), 0);
106 vbox
= GTK_DIALOG (about
)->vbox
;
108 wid
= gtk_image_new_from_pixbuf (pix_xchat
);
109 gtk_container_add (GTK_CONTAINER (vbox
), wid
);
111 label
= gtk_label_new (NULL
);
112 gtk_label_set_selectable (GTK_LABEL (label
), TRUE
);
113 gtk_container_add (GTK_CONTAINER (vbox
), label
);
114 g_get_charset (&locale
);
115 (snprintf
) (buf
, sizeof (buf
),
116 "<span size=\"x-large\"><b>"DISPLAY_NAME
" "PACKAGE_VERSION
"</b></span>\n\n"
119 "<b>Charset</b>: %s "
120 "<b>Renderer</b>: %s\n"
121 "<b>Compiled</b>: "__DATE__
"\n\n"
122 "<small>\302\251 1998-2010 Peter \305\275elezn\303\275 <zed@xchat.org></small>",
123 _("A multiplatform IRC Client"),
132 gtk_label_set_markup (GTK_LABEL (label
), buf
);
133 gtk_label_set_justify (GTK_LABEL (label
), GTK_JUSTIFY_CENTER
);
135 hbox
= gtk_hbox_new (0, 2);
136 gtk_container_add (GTK_CONTAINER (vbox
), hbox
);
138 wid
= gtk_button_new_from_stock (GTK_STOCK_CLOSE
);
139 GTK_WIDGET_SET_FLAGS (GTK_WIDGET (wid
), GTK_CAN_DEFAULT
);
140 gtk_box_pack_end (GTK_BOX (GTK_DIALOG (about
)->action_area
), wid
, 0, 0, 0);
141 gtk_widget_grab_default (wid
);
142 g_signal_connect (G_OBJECT (wid
), "clicked",
143 G_CALLBACK (gtkutil_destroy
), about
);
145 gtk_widget_show_all (about
);