Mercurial > pidgin
comparison src/about.c @ 1:2846a03bda67
[gaim-migrate @ 10]
The other missing files :)
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Thu, 23 Mar 2000 03:13:54 +0000 |
parents | |
children | 09a58e668f7b |
comparison
equal
deleted
inserted
replaced
0:a5ace2e037bc | 1:2846a03bda67 |
---|---|
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); | |
63 gtk_widget_set_usize(about, 455, 340); | |
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" | |
84 "Jim Duchek <jimduchek@ou.edu> <IM:Zilding> (Former Maintainer)\n" | |
85 "Mark Spencer <markster@marko.net> <IM: Markster97> (Original Author)\n" | |
86 "\n" | |
87 "Gaim is brought to you by a team of penguin pimps, the letter G, and beer.\n"); | |
88 | |
89 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); | |
90 gtk_widget_show(label); | |
91 | |
92 button = gtk_button_new_with_label("Close"); | |
93 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", | |
94 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about)); | |
95 gtk_signal_connect(GTK_OBJECT(about), "destroy", | |
96 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about)); | |
97 | |
98 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); | |
99 gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, FALSE, 0); | |
100 gtk_widget_grab_default(button); | |
101 gtk_widget_show(button); | |
102 | |
103 } else | |
104 gtk_widget_show(about); | |
105 | |
106 } |