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 "Using GTK %d.%d.%d X %d\n"
60 gtk_major_version
, gtk_minor_version
, gtk_micro_version
,
62 VendorRelease (GDK_DISPLAY ()), get_cpu_str());
67 gtk_widget_show (gnome_about_new ("X-Chat", PACKAGE_VERSION
,
68 "(C) 1998-2005 Peter Zelezny", author
, buf
, 0));
73 static GtkWidget
*about
= 0;
83 menu_about (GtkWidget
* wid
, gpointer sess
)
85 GtkWidget
*vbox
, *label
, *hbox
;
87 const char *locale
= NULL
;
88 extern GtkWindow
*parent_window
; /* maingui.c */
92 gtk_window_present (GTK_WINDOW (about
));
96 about
= gtk_dialog_new ();
97 gtk_window_set_position (GTK_WINDOW (about
), GTK_WIN_POS_CENTER
);
98 gtk_window_set_resizable (GTK_WINDOW (about
), FALSE
);
99 gtk_window_set_title (GTK_WINDOW (about
), _("About "DISPLAY_NAME
));
101 gtk_window_set_transient_for (GTK_WINDOW (about
), parent_window
);
102 g_signal_connect (G_OBJECT (about
), "destroy",
103 G_CALLBACK (about_close
), 0);
105 vbox
= GTK_DIALOG (about
)->vbox
;
107 wid
= gtk_image_new_from_pixbuf (pix_xchat
);
108 gtk_container_add (GTK_CONTAINER (vbox
), wid
);
110 label
= gtk_label_new (NULL
);
111 gtk_label_set_selectable (GTK_LABEL (label
), TRUE
);
112 gtk_container_add (GTK_CONTAINER (vbox
), label
);
113 g_get_charset (&locale
);
114 (snprintf
) (buf
, sizeof (buf
),
115 "<span size=\"x-large\"><b>"DISPLAY_NAME
" "PACKAGE_VERSION
"</b></span>\n\n"
118 "<b>Charset</b>: %s "
119 "<b>Renderer</b>: %s\n"
120 "<small>\302\251 1998-2010 Peter \305\275elezn\303\275 <zed@xchat.org></small>",
121 _("A multiplatform IRC Client"),
130 gtk_label_set_markup (GTK_LABEL (label
), buf
);
131 gtk_label_set_justify (GTK_LABEL (label
), GTK_JUSTIFY_CENTER
);
133 hbox
= gtk_hbox_new (0, 2);
134 gtk_container_add (GTK_CONTAINER (vbox
), hbox
);
136 wid
= gtk_button_new_from_stock (GTK_STOCK_CLOSE
);
137 GTK_WIDGET_SET_FLAGS (GTK_WIDGET (wid
), GTK_CAN_DEFAULT
);
138 gtk_box_pack_end (GTK_BOX (GTK_DIALOG (about
)->action_area
), wid
, 0, 0, 0);
139 gtk_widget_grab_default (wid
);
140 g_signal_connect (G_OBJECT (wid
), "clicked",
141 G_CALLBACK (gtkutil_destroy
), about
);
143 gtk_widget_show_all (about
);