annotate src/about.c @ 2375:09fe1b00d31f

[gaim-migrate @ 2388] i like this color better committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 27 Sep 2001 20:54:02 +0000
parents 2927c2c26fe6
children 6f83c22d9e70
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1 /*
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2 * gaim
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
5 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
9 * (at your option) any later version.
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
10 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
14 * GNU General Public License for more details.
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
15 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
19 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
20 */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
21
349
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 338
diff changeset
22 #ifdef HAVE_CONFIG_H
2090
b66aca8e8dce [gaim-migrate @ 2100]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2072
diff changeset
23 #include <config.h>
349
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 338
diff changeset
24 #endif
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
25 #include <string.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
26 #include <stdio.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
27 #include <stdlib.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
28 #include <time.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
29
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
30 #include <gtk/gtk.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
31 #include "gaim.h"
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
32 #include "pixmaps/logo.xpm"
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
33 #include "pixmaps/cancel.xpm"
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
34 #include "pixmaps/about_small.xpm"
2232
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
35 #include "pixmaps/panic.xpm"
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
36
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
37 static GtkWidget *about = NULL;
2232
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
38 static GtkWidget *help = NULL;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
39
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
40 static void destroy_about()
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
41 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
42 if (about)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
43 gtk_widget_destroy(about);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
44 about = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
45 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
46
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
47
546
e312b8b9bee5 [gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 541
diff changeset
48 static void version_exit()
e312b8b9bee5 [gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 541
diff changeset
49 {
1117
f3e0f41beddb [gaim-migrate @ 1127]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1009
diff changeset
50 gtk_main_quit();
546
e312b8b9bee5 [gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 541
diff changeset
51 }
e312b8b9bee5 [gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 541
diff changeset
52
e312b8b9bee5 [gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 541
diff changeset
53
523
023c3851db0a [gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 356
diff changeset
54 static void about_click(GtkWidget *w, gpointer m)
023c3851db0a [gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 356
diff changeset
55 {
1710
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
56 open_url_nw(NULL, WEBSITE);
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
57 }
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
58
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
59 char *name()
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
60 {
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
61 return PACKAGE;
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
62 }
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
63
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
64 char *description()
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
65 {
f42ce672c560 [gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1670
diff changeset
66 return WEBSITE;
523
023c3851db0a [gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 356
diff changeset
67 }
023c3851db0a [gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 356
diff changeset
68
2276
8f9aa8739bf1 [gaim-migrate @ 2286]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2251
diff changeset
69 char *version()
8f9aa8739bf1 [gaim-migrate @ 2286]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2251
diff changeset
70 {
8f9aa8739bf1 [gaim-migrate @ 2286]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2251
diff changeset
71 return VERSION;
8f9aa8739bf1 [gaim-migrate @ 2286]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2251
diff changeset
72 }
8f9aa8739bf1 [gaim-migrate @ 2286]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2251
diff changeset
73
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
74 void show_about(GtkWidget *w, void *null)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
75 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
76 GtkWidget *vbox;
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
77 GtkWidget *frame;
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
78 GtkWidget *fbox;
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
79 GtkWidget *label;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
80 GtkWidget *pixmap;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
81 GtkStyle *style;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
82 GdkPixmap *pm;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
83 GdkBitmap *bm;
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
84 GtkWidget *hbox;
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
85 GtkWidget *button;
2072
e105da353872 [gaim-migrate @ 2082]
Rob Flynn <gaim@robflynn.com>
parents: 1976
diff changeset
86 GtkWidget *text;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
87
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
88 char abouttitle[45];
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
89
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
90 if (!about) {
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
91
1972
1053abe6e9f4 [gaim-migrate @ 1982]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1971
diff changeset
92 about = gtk_window_new(GTK_WINDOW_DIALOG);
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
93
2072
e105da353872 [gaim-migrate @ 2082]
Rob Flynn <gaim@robflynn.com>
parents: 1976
diff changeset
94 gtk_widget_set_usize(GTK_WIDGET(about), 450, 450);
e105da353872 [gaim-migrate @ 2082]
Rob Flynn <gaim@robflynn.com>
parents: 1976
diff changeset
95
349
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 338
diff changeset
96 g_snprintf(abouttitle, sizeof(abouttitle), _("About GAIM v%s"), VERSION);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
97 gtk_window_set_title(GTK_WINDOW(about), abouttitle);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
98 gtk_window_set_wmclass(GTK_WINDOW(about), "about", "Gaim");
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
99 gtk_window_set_policy(GTK_WINDOW(about), FALSE, TRUE, TRUE);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
100
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
101 gtk_widget_realize(about);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
102 aol_icon(about->window);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
103
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
104 vbox = gtk_vbox_new(FALSE, 5);
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
105 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
106 gtk_container_add(GTK_CONTAINER(about), vbox);
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
107
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
108 frame = gtk_frame_new("Gaim " VERSION);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
109 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
110
2072
e105da353872 [gaim-migrate @ 2082]
Rob Flynn <gaim@robflynn.com>
parents: 1976
diff changeset
111 fbox = gtk_vbox_new(FALSE, 5);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
112 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5);
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
113 gtk_container_add(GTK_CONTAINER(frame), fbox);
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
114
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
115 /* Left side, TOP */
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
116 style = gtk_widget_get_style(about);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
117 pm = gdk_pixmap_create_from_xpm_d(about->window, &bm,
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
118 &style->bg[GTK_STATE_NORMAL], (gchar **)aol_logo);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
119 pixmap = gtk_pixmap_new(pm, bm);
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
120
644
b3900e312d8e [gaim-migrate @ 654]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 622
diff changeset
121 gdk_pixmap_unref(pm);
804
17def2bb9720 [gaim-migrate @ 814]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 644
diff changeset
122 gdk_bitmap_unref(bm);
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
123
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
124 gtk_box_pack_start(GTK_BOX(fbox), pixmap, FALSE, FALSE, 0);
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
125
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
126 label =
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
127 gtk_label_new(
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
128 _("GAIM is a client that supports AOL's Instant Messenger protocol. It is written\n"
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
129 "using Gtk+ and is licensed under the GPL.\n\n" "URL: " WEBSITE));
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
130
2072
e105da353872 [gaim-migrate @ 2082]
Rob Flynn <gaim@robflynn.com>
parents: 1976
diff changeset
131 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
132
2072
e105da353872 [gaim-migrate @ 2082]
Rob Flynn <gaim@robflynn.com>
parents: 1976
diff changeset
133 gtk_box_pack_start(GTK_BOX(fbox), label, TRUE, TRUE, 0);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
134
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
135 text = gtk_text_new(NULL, NULL);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
136
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
137 gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL,
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
138 _("Rob Flynn (maintainer) rob@marko.net\nEric Warmenhoven (lead coder) warmenhoven@yahoo.com\n\nBenjamin Miller\nDecklin Foster\nJim Duchek\nMark Spencer (original author) markster@marko.net"),
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
139 198);
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
140
2072
e105da353872 [gaim-migrate @ 2082]
Rob Flynn <gaim@robflynn.com>
parents: 1976
diff changeset
141 gtk_widget_show(text);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
142
2072
e105da353872 [gaim-migrate @ 2082]
Rob Flynn <gaim@robflynn.com>
parents: 1976
diff changeset
143 gtk_box_pack_start(GTK_BOX(fbox), text, TRUE, TRUE, 0);
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
144
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
145 /* Close Button */
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
146
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
147 hbox = gtk_hbox_new(FALSE, 5);
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
148 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
149
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
150 button = picture_button(about, _("Close"), cancel_xpm);
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
151 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
622
7f8b85e2e894 [gaim-migrate @ 632]
Rob Flynn <gaim@robflynn.com>
parents: 619
diff changeset
152
1142
4593153a956c [gaim-migrate @ 1152]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1117
diff changeset
153 if (null != (void *)2) {
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
154 /* 2 can be as sad as 1, it's the loneliest number since the number 1 */
546
e312b8b9bee5 [gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 541
diff changeset
155 gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
156 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about));
1009
d496fe2614a6 [gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 960
diff changeset
157 gtk_signal_connect(GTK_OBJECT(about), "destroy",
d496fe2614a6 [gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 960
diff changeset
158 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about));
d496fe2614a6 [gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 960
diff changeset
159 } else {
546
e312b8b9bee5 [gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 541
diff changeset
160 gtk_signal_connect(GTK_OBJECT(button), "clicked",
e312b8b9bee5 [gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 541
diff changeset
161 GTK_SIGNAL_FUNC(version_exit), NULL);
1009
d496fe2614a6 [gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 960
diff changeset
162 gtk_signal_connect(GTK_OBJECT(about), "destroy",
d496fe2614a6 [gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 960
diff changeset
163 GTK_SIGNAL_FUNC(version_exit), NULL);
d496fe2614a6 [gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 960
diff changeset
164 }
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
165
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
166 /* this makes the sizes not work. */
1976
24aed1c31342 [gaim-migrate @ 1986]
Rob Flynn <gaim@robflynn.com>
parents: 1972
diff changeset
167 /* GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); */
24aed1c31342 [gaim-migrate @ 1986]
Rob Flynn <gaim@robflynn.com>
parents: 1972
diff changeset
168 /* gtk_widget_grab_default(button); */
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
169
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
170 button = picture_button(about, _("Web Site"), about_small_xpm);
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
171 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
172 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(about_click), NULL);
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
173
2313
bd9d403fb15b [gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2276
diff changeset
174 if (misc_options & OPT_MISC_COOL_LOOK)
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
175 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
176 }
1210
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
177
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
178 /* Let's give'em something to talk about -- woah woah woah */
265abea9db72 [gaim-migrate @ 1220]
Rob Flynn <gaim@robflynn.com>
parents: 1207
diff changeset
179 gtk_widget_show_all(about);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1233
diff changeset
180
1205
7bdb54311828 [gaim-migrate @ 1215]
Rob Flynn <gaim@robflynn.com>
parents: 1142
diff changeset
181 }
2232
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
182
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
183 static void destroy_help()
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
184 {
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
185 if (help)
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
186 gtk_widget_destroy(help);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
187 help = NULL;
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
188 }
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
189
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
190 void gaim_help(GtkWidget *w, void *x)
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
191 {
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
192 GtkWidget *vbox;
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
193 GdkPixmap *pm;
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
194 GdkBitmap *bm;
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
195 GtkWidget *pix;
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
196 GtkWidget *label;
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
197 GtkWidget *hbox;
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
198 GtkWidget *close;
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
199
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
200 if (!help) {
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
201
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
202 help = gtk_window_new(GTK_WINDOW_TOPLEVEL);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
203 gtk_window_set_title(GTK_WINDOW(help), "Gaim Help");
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
204 gtk_window_set_wmclass(GTK_WINDOW(help), "help", "Gaim");
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
205 gtk_window_set_policy(GTK_WINDOW(help), FALSE, TRUE, TRUE);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
206 gtk_widget_realize(help);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
207 aol_icon(help->window);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
208 gtk_signal_connect(GTK_OBJECT(help), "destroy",
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
209 GTK_SIGNAL_FUNC(destroy_help), GTK_OBJECT(help));
2251
a38cdeba8d74 [gaim-migrate @ 2261]
Rob Flynn <gaim@robflynn.com>
parents: 2232
diff changeset
210 gtk_widget_set_usize(help, 315, -1);
2232
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
211
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
212 vbox = gtk_vbox_new(FALSE, 10);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
213 gtk_container_add(GTK_CONTAINER(help), vbox);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
214
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
215 hbox = gtk_hbox_new(FALSE, 10);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
216 gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
217
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
218 close = picture_button(help, _("Close"), cancel_xpm);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
219 gtk_box_pack_end(GTK_BOX(hbox), close, FALSE, FALSE, 5);
2372
2927c2c26fe6 [gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2362
diff changeset
220 gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(destroy_help), NULL);
2232
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
221
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
222 pm = gdk_pixmap_create_from_xpm_d(help->window, &bm, NULL, panic_xpm);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
223 pix = gtk_pixmap_new(pm, bm);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
224 gdk_pixmap_unref(pm);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
225 gdk_bitmap_unref(bm);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
226 gtk_box_pack_start(GTK_BOX(vbox), pix, FALSE, FALSE, 5);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
227
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
228 label = gtk_label_new(_("Relax, help is just around the corner. "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
229 "The first thing you'll need to do is get an AIM "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
230 "account; you can get one from http://aim.aol.com/. "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
231 "Just click the button that says \"New Users\" and "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
232 "you can create an account that way. Once you have "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
233 "your account, enter the username and password into "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
234 "the login window that comes up when you start Gaim, "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
235 "and click the Signon button. Once you're online, "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
236 "you can talk to one of the Gaim developers for more "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
237 "assistance; their contact information is in the "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
238 "AUTHORS file in the Gaim source, or at "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
239 WEBSITE "contact.shtml. If you can't get online and "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
240 "still need more assistance, feel free to email us "
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
241 "at gaim@marko.net. Thanks for using Gaim!"));
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
242 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
243 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
244 gtk_box_pack_end(GTK_BOX(vbox), label, FALSE, FALSE, 5);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
245 }
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
246
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
247 gtk_widget_show_all(help);
14e8978f86bb [gaim-migrate @ 2242]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2090
diff changeset
248 }