Mercurial > pidgin.yaz
annotate src/about.c @ 5590:011a0a975060
[gaim-migrate @ 5994]
These G_MODULE_IMPORT connections things are getting on my nerves.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 31 May 2003 07:22:47 +0000 |
parents | 8e55a4d362a3 |
children | 059d95c67cda |
rev | line source |
---|---|
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 | |
3424 | 7 * it under the terms of the GNU General Public License as published by |
1 | 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 | |
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 | 25 #include <string.h> |
26 #include <stdio.h> | |
27 #include <stdlib.h> | |
28 #include <time.h> | |
29 | |
30 #include <gtk/gtk.h> | |
31 #include "gaim.h" | |
4006 | 32 #include "gtkimhtml.h" |
1 | 33 |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
34 static GtkWidget *about = NULL; |
1 | 35 |
36 static void destroy_about() | |
37 { | |
38 if (about) | |
39 gtk_widget_destroy(about); | |
40 about = NULL; | |
41 } | |
42 | |
1710
f42ce672c560
[gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1670
diff
changeset
|
43 char *name() |
f42ce672c560
[gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1670
diff
changeset
|
44 { |
f42ce672c560
[gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1670
diff
changeset
|
45 return PACKAGE; |
f42ce672c560
[gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1670
diff
changeset
|
46 } |
f42ce672c560
[gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1670
diff
changeset
|
47 |
f42ce672c560
[gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1670
diff
changeset
|
48 char *description() |
f42ce672c560
[gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1670
diff
changeset
|
49 { |
f42ce672c560
[gaim-migrate @ 1720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1670
diff
changeset
|
50 return WEBSITE; |
523
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
51 } |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
52 |
2276
8f9aa8739bf1
[gaim-migrate @ 2286]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2251
diff
changeset
|
53 char *version() |
8f9aa8739bf1
[gaim-migrate @ 2286]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2251
diff
changeset
|
54 { |
8f9aa8739bf1
[gaim-migrate @ 2286]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2251
diff
changeset
|
55 return VERSION; |
8f9aa8739bf1
[gaim-migrate @ 2286]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2251
diff
changeset
|
56 } |
8f9aa8739bf1
[gaim-migrate @ 2286]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2251
diff
changeset
|
57 |
4082 | 58 void show_about(GtkWidget *w, void *data) |
1 | 59 { |
60 GtkWidget *vbox; | |
1210 | 61 GtkWidget *frame; |
62 GtkWidget *fbox; | |
1205 | 63 GtkWidget *hbox; |
64 GtkWidget *button; | |
4006 | 65 GtkWidget *text; |
2950 | 66 GtkWidget *sw; |
3721 | 67 GtkWidget *logo; |
1205 | 68 char abouttitle[45]; |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
69 |
1 | 70 if (!about) { |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
71 |
2725
f3c094e78609
[gaim-migrate @ 2738]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2562
diff
changeset
|
72 GAIM_DIALOG(about); |
2904
3a9bca5fedcf
[gaim-migrate @ 2917]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2902
diff
changeset
|
73 gtk_window_set_default_size(GTK_WINDOW(about), 450, -1); |
2535 | 74 g_snprintf(abouttitle, sizeof(abouttitle), _("About Gaim v%s"), VERSION); |
1 | 75 gtk_window_set_title(GTK_WINDOW(about), abouttitle); |
4074 | 76 gtk_window_set_role(GTK_WINDOW(about), "about"); |
4635 | 77 gtk_window_set_resizable(GTK_WINDOW(about), TRUE); |
1210 | 78 gtk_widget_realize(about); |
1 | 79 |
1210 | 80 vbox = gtk_vbox_new(FALSE, 5); |
81 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | |
82 gtk_container_add(GTK_CONTAINER(about), vbox); | |
1205 | 83 |
2562 | 84 frame = gtk_frame_new("Gaim v" VERSION); |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
85 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
1210 | 86 |
2072 | 87 fbox = gtk_vbox_new(FALSE, 5); |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
88 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); |
1210 | 89 gtk_container_add(GTK_CONTAINER(frame), fbox); |
1205 | 90 |
5024 | 91 logo = gtk_image_new_from_stock(GAIM_STOCK_LOGO, gtk_icon_size_from_name(GAIM_ICON_SIZE_LOGO)); |
3721 | 92 gtk_box_pack_start(GTK_BOX(fbox), logo, FALSE, FALSE, 0); |
1205 | 93 |
4006 | 94 sw = gtk_scrolled_window_new(NULL, NULL); |
95 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | |
96 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | |
4197 | 97 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
4006 | 98 gtk_box_pack_start(GTK_BOX(fbox), sw, TRUE, TRUE, 0); |
3709 | 99 |
4006 | 100 text = gtk_imhtml_new(NULL, NULL); |
101 gtk_container_add(GTK_CONTAINER(sw), text); | |
4197 | 102 gtk_widget_set_size_request(sw, -1, 350); |
4006 | 103 gaim_setup_imhtml(text); |
2950 | 104 |
4006 | 105 gtk_imhtml_append_text(GTK_IMHTML(text), |
106 _("Gaim is a modular Instant Messaging client capable of " | |
107 "using AIM, ICQ, Yahoo!, MSN, IRC, Jabber, Napster, " | |
108 "Zephyr, and Gadu-Gadu all at once. It is written using " | |
4054 | 109 "Gtk+ and is licensed under the GPL.<BR><BR>"), -1, GTK_IMHTML_NO_SCROLL); |
4006 | 110 |
111 gtk_imhtml_append_text(GTK_IMHTML(text), | |
112 "<FONT SIZE=\"3\">URL:</FONT> <A HREF=\"" WEBSITE "\">" | |
4054 | 113 WEBSITE "</A><BR><BR>", -1, GTK_IMHTML_NO_SCROLL); |
4006 | 114 |
115 gtk_imhtml_append_text(GTK_IMHTML(text), | |
4160 | 116 _("<FONT SIZE=\"3\">IRC:</FONT> #gaim on irc.freenode.net" |
117 "<BR><BR>"), -1, GTK_IMHTML_NO_SCROLL); | |
4006 | 118 |
119 gtk_imhtml_append_text(GTK_IMHTML(text), | |
4054 | 120 _("<FONT SIZE=\"3\">Active Developers:</FONT><BR>"), -1, GTK_IMHTML_NO_SCROLL); |
4006 | 121 gtk_imhtml_append_text(GTK_IMHTML(text), |
4160 | 122 _(" Rob Flynn (maintainer) " |
4006 | 123 "<<A HREF=\"mailto:rob@marko.net\">rob@marko.net</A>><BR>" |
4990 | 124 " Sean Egan (lead developer) " |
4006 | 125 "<<A HREF=\"mailto:bj91704@binghamton.edu\">" |
4992 | 126 "bj91704@binghamton.edu</A>><BR>" |
4990 | 127 " Christian 'ChipX86' Hammond (developer & webmaster)<BR>" |
128 " Herman Bloggs (win32 port) " | |
129 "<<A HREF=\"mailto:hermanator12002@yahoo.com\">" | |
130 "hermanator12002@yahoo.com</A>><BR>" | |
131 " Nathan 'faceprint' Walp (developer)<BR>" | |
132 " Mark 'KingAnt' Doliner (developer)<BR>" | |
133 " Luke 'LSchiere' Schierer (support)<BR>" | |
134 "<BR>"), -1, GTK_IMHTML_NO_SCROLL); | |
4006 | 135 |
136 gtk_imhtml_append_text(GTK_IMHTML(text), | |
4054 | 137 _("<FONT SIZE=\"3\">Crazy Patch Writers:</FONT><BR>"), -1, GTK_IMHTML_NO_SCROLL); |
4006 | 138 gtk_imhtml_append_text(GTK_IMHTML(text), |
139 " Benjamin Miller<BR>" | |
140 " Decklin Foster<BR>" | |
4990 | 141 " Etan 'deryni' Reisner<BR>" |
142 " Ethan 'Paco-Paco' Blanton<br>" | |
143 " Robert 'Robot101' McQueen<BR>" | |
144 "<BR>", -1, GTK_IMHTML_NO_SCROLL); | |
4006 | 145 |
146 gtk_imhtml_append_text(GTK_IMHTML(text), | |
4054 | 147 _("<FONT SIZE=\"3\">Retired Developers:</FONT><BR>"), -1, GTK_IMHTML_NO_SCROLL); |
4006 | 148 gtk_imhtml_append_text(GTK_IMHTML(text), |
4990 | 149 _(" Adam Fritzler (former libfaim maintainer)<BR>" |
150 " Eric Warmenhoven (former lead developer)" | |
4006 | 151 "<<A HREF=\"mailto:warmenhoven@yahoo.com\">" |
152 "warmenhoven@yahoo.com</A>><BR>" | |
4990 | 153 " Jim Duchek (former maintainer)<BR>" |
154 " Jim Seymour (former Jabber developer)<BR>" | |
4006 | 155 " Mark Spencer (original author) " |
156 "<<A HREF=\"mailto:markster@marko.net\">" | |
4992 | 157 "markster@marko.net</A>><BR>" |
4990 | 158 " Syd Logan (hacker and designated driver [lazy bum])<BR>" |
159 "<BR>"), -1, GTK_IMHTML_NO_SCROLL); | |
4006 | 160 |
161 gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0); | |
162 | |
1205 | 163 /* Close Button */ |
164 | |
165 hbox = gtk_hbox_new(FALSE, 5); | |
1210 | 166 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
2450
59bac9b1a716
[gaim-migrate @ 2463]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2434
diff
changeset
|
167 gtk_widget_show(hbox); |
1205 | 168 |
3709 | 169 button = gaim_pixbuf_button_from_stock(_("Close"), GTK_STOCK_CLOSE, GAIM_BUTTON_HORIZONTAL); |
1210 | 170 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
622 | 171 |
4162
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
172 g_signal_connect_swapped(G_OBJECT(button), "clicked", |
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
173 G_CALLBACK(destroy_about), G_OBJECT(about)); |
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
174 g_signal_connect(G_OBJECT(about), "destroy", |
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
175 G_CALLBACK(destroy_about), G_OBJECT(about)); |
1210 | 176 |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
177 /* this makes the sizes not work. */ |
1976 | 178 /* GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); */ |
179 /* gtk_widget_grab_default(button); */ | |
1205 | 180 |
181 } | |
1210 | 182 |
183 /* Let's give'em something to talk about -- woah woah woah */ | |
5024 | 184 gtk_widget_show_all(about); |
4157 | 185 gtk_window_present(GTK_WINDOW(about)); |
1205 | 186 } |