1
|
1 /*
|
|
2 * gaim
|
|
3 *
|
|
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
|
|
5 *
|
|
6 * This program is free software; you can redistribute it and/or modify
|
|
7 * it under the terms of the GNU General Public License as published by
|
|
8 * the Free Software Foundation; either version 2 of the License, or
|
|
9 * (at your option) any later version.
|
|
10 *
|
|
11 * This program is distributed in the hope that it will be useful,
|
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 * GNU General Public License for more details.
|
|
15 *
|
|
16 * You should have received a copy of the GNU General Public License
|
|
17 * along with this program; if not, write to the Free Software
|
|
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
19 *
|
|
20 */
|
|
21
|
|
22 #ifdef USE_APPLET
|
|
23 #include <gnome.h>
|
|
24 #include <applet-widget.h>
|
|
25 #endif /* USE_APPLET */
|
|
26 #include <string.h>
|
|
27 #include <stdio.h>
|
|
28 #include <stdlib.h>
|
|
29 #include <time.h>
|
|
30
|
|
31 #include <gtk/gtk.h>
|
|
32 #include "gaim.h"
|
|
33 #include "pixmaps/logo.xpm"
|
|
34
|
|
35 static GtkWidget *about=NULL;
|
|
36
|
|
37 static void destroy_about()
|
|
38 {
|
|
39 if (about)
|
|
40 gtk_widget_destroy(about);
|
|
41 about = NULL;
|
|
42 }
|
|
43
|
|
44
|
|
45
|
|
46 void show_about(GtkWidget *w, void *null)
|
|
47 {
|
|
48 GtkWidget *button;
|
|
49 GtkWidget *vbox;
|
|
50 GtkWidget *pixmap;
|
|
51 GtkWidget *label;
|
|
52 GtkStyle *style;
|
|
53 GdkPixmap *pm;
|
|
54 GdkBitmap *bm;
|
|
55 char abouttitle[45];
|
|
56
|
|
57 if (!about) {
|
|
58 about = gtk_window_new(GTK_WINDOW_DIALOG);
|
|
59
|
|
60 g_snprintf(abouttitle, sizeof(abouttitle), "About GAIM v%s", VERSION);
|
|
61 gtk_window_set_title(GTK_WINDOW(about), abouttitle);
|
|
62 gtk_container_border_width(GTK_CONTAINER(about), 2);
|
73
|
63 gtk_widget_set_usize(about, 510, 370);
|
1
|
64
|
|
65 gtk_widget_show(about);
|
|
66 aol_icon(about->window);
|
|
67
|
|
68
|
|
69 vbox = gtk_vbox_new(FALSE, 0);
|
|
70 gtk_container_add(GTK_CONTAINER(about), vbox);
|
|
71 gtk_widget_show(vbox);
|
|
72
|
|
73 style = gtk_widget_get_style(about);
|
|
74 pm = gdk_pixmap_create_from_xpm_d(about->window, &bm,
|
|
75 &style->bg[GTK_STATE_NORMAL], (gchar **)aol_logo);
|
|
76 pixmap = gtk_pixmap_new(pm, bm);
|
|
77 gtk_box_pack_start(GTK_BOX(vbox), pixmap, TRUE, TRUE, 0);
|
|
78 gtk_widget_show(pixmap);
|
|
79
|
|
80 label = gtk_label_new(
|
|
81 "GAIM is a client that supports AOL's Instant Messenger protocol\nwritten under the GTK\n"
|
|
82 "It is developed by:\n"
|
|
83 "Rob Flynn <rflynn@blueridge.net> <IM: RobFlynn> (Maintainer)\n"
|
69
|
84 "Eric Warmenhoven <warmenhoven@yahoo.com> <IM: EWarmenhoven> (GNOME Applet)\n"
|
177
|
85 "Syd Logan (Designated Driver and Super Hacker *OoOoO*)\n"
|
1
|
86 "Jim Duchek <jimduchek@ou.edu> <IM:Zilding> (Former Maintainer)\n"
|
|
87 "Mark Spencer <markster@marko.net> <IM: Markster97> (Original Author)\n"
|
|
88 "\n"
|
|
89 "Gaim is brought to you by a team of penguin pimps, the letter G, and beer.\n");
|
|
90
|
|
91 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
|
|
92 gtk_widget_show(label);
|
|
93
|
|
94 button = gtk_button_new_with_label("Close");
|
|
95 gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
|
|
96 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about));
|
|
97 gtk_signal_connect(GTK_OBJECT(about), "destroy",
|
|
98 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about));
|
|
99
|
|
100 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
|
|
101 gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, FALSE, 0);
|
|
102 gtk_widget_grab_default(button);
|
|
103 gtk_widget_show(button);
|
|
104
|
|
105 } else
|
|
106 gtk_widget_show(about);
|
|
107
|
|
108 }
|