Mercurial > pidgin
annotate src/about.c @ 7763:dc79649b829d
[gaim-migrate @ 8408]
This is an implementation of immutable, reference-counted strings. It
is exceedingly trivial, I have no idea why I didn't do this long
ago... PLEASE use these anywhere you pass around strings that may be
stuck in multiple places; I'm not sure that it will save us too much
heap holistically, but it should prevent having to make a hojillion
twenty-byte allocations and free them immediately.
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Fri, 05 Dec 2003 16:56:03 +0000 |
parents | f118d4b71a00 |
children | 9d4753944c9f |
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 | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
22 #include "internal.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
23 #include "gtkimhtml.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
24 #include "gtkutils.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
25 #include "stock.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
26 #include "ui.h" |
1 | 27 |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
28 /* XXX For WEBSITE */ |
1 | 29 #include "gaim.h" |
30 | |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
31 static GtkWidget *about = NULL; |
1 | 32 |
33 static void destroy_about() | |
34 { | |
35 if (about) | |
36 gtk_widget_destroy(about); | |
37 about = NULL; | |
38 } | |
39 | |
4082 | 40 void show_about(GtkWidget *w, void *data) |
1 | 41 { |
42 GtkWidget *vbox; | |
1210 | 43 GtkWidget *frame; |
44 GtkWidget *fbox; | |
1205 | 45 GtkWidget *hbox; |
46 GtkWidget *button; | |
4006 | 47 GtkWidget *text; |
2950 | 48 GtkWidget *sw; |
3721 | 49 GtkWidget *logo; |
1205 | 50 char abouttitle[45]; |
6631 | 51 char *str; |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
52 |
1 | 53 if (!about) { |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
54 |
2725
f3c094e78609
[gaim-migrate @ 2738]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2562
diff
changeset
|
55 GAIM_DIALOG(about); |
2904
3a9bca5fedcf
[gaim-migrate @ 2917]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2902
diff
changeset
|
56 gtk_window_set_default_size(GTK_WINDOW(about), 450, -1); |
2535 | 57 g_snprintf(abouttitle, sizeof(abouttitle), _("About Gaim v%s"), VERSION); |
1 | 58 gtk_window_set_title(GTK_WINDOW(about), abouttitle); |
4074 | 59 gtk_window_set_role(GTK_WINDOW(about), "about"); |
4635 | 60 gtk_window_set_resizable(GTK_WINDOW(about), TRUE); |
1210 | 61 gtk_widget_realize(about); |
1 | 62 |
1210 | 63 vbox = gtk_vbox_new(FALSE, 5); |
64 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | |
65 gtk_container_add(GTK_CONTAINER(about), vbox); | |
1205 | 66 |
2562 | 67 frame = gtk_frame_new("Gaim v" VERSION); |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
68 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
1210 | 69 |
2072 | 70 fbox = gtk_vbox_new(FALSE, 5); |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
71 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); |
1210 | 72 gtk_container_add(GTK_CONTAINER(frame), fbox); |
1205 | 73 |
5024 | 74 logo = gtk_image_new_from_stock(GAIM_STOCK_LOGO, gtk_icon_size_from_name(GAIM_ICON_SIZE_LOGO)); |
3721 | 75 gtk_box_pack_start(GTK_BOX(fbox), logo, FALSE, FALSE, 0); |
1205 | 76 |
4006 | 77 sw = gtk_scrolled_window_new(NULL, NULL); |
78 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | |
79 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | |
4197 | 80 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
4006 | 81 gtk_box_pack_start(GTK_BOX(fbox), sw, TRUE, TRUE, 0); |
3709 | 82 |
4006 | 83 text = gtk_imhtml_new(NULL, NULL); |
84 gtk_container_add(GTK_CONTAINER(sw), text); | |
4197 | 85 gtk_widget_set_size_request(sw, -1, 350); |
4006 | 86 gaim_setup_imhtml(text); |
2950 | 87 |
4006 | 88 gtk_imhtml_append_text(GTK_IMHTML(text), |
89 _("Gaim is a modular Instant Messaging client capable of " | |
90 "using AIM, ICQ, Yahoo!, MSN, IRC, Jabber, Napster, " | |
91 "Zephyr, and Gadu-Gadu all at once. It is written using " | |
6982 | 92 "Gtk+ and is licensed under the GPL.<BR><BR>"), GTK_IMHTML_NO_SCROLL); |
4006 | 93 |
94 gtk_imhtml_append_text(GTK_IMHTML(text), | |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
95 "<FONT SIZE=\"3\">URL:</FONT> <A HREF=\"" GAIM_WEBSITE "\">" |
6982 | 96 GAIM_WEBSITE "</A><BR><BR>", GTK_IMHTML_NO_SCROLL); |
4006 | 97 |
98 gtk_imhtml_append_text(GTK_IMHTML(text), | |
4160 | 99 _("<FONT SIZE=\"3\">IRC:</FONT> #gaim on irc.freenode.net" |
6982 | 100 "<BR><BR>"), GTK_IMHTML_NO_SCROLL); |
4006 | 101 |
6631 | 102 /* Active Developers */ |
103 str = g_strconcat( | |
104 "<FONT SIZE=\"3\">", _("Active Developers"), ":</FONT><BR>" | |
105 " Rob Flynn (", _("maintainer"), ") " | |
4006 | 106 "<<A HREF=\"mailto:rob@marko.net\">rob@marko.net</A>><BR>" |
6631 | 107 " Sean Egan (", _("lead developer"), ") " |
6999 | 108 "<<A HREF=\"mailto:sean.egan@binghamton.edu\">" |
4992 | 109 "bj91704@binghamton.edu</A>><BR>" |
6631 | 110 " Christian 'ChipX86' Hammond (", _("developer & webmaster"), ")<BR>" |
111 " Herman Bloggs (", _("win32 port"), ") " | |
4990 | 112 "<<A HREF=\"mailto:hermanator12002@yahoo.com\">" |
113 "hermanator12002@yahoo.com</A>><BR>" | |
6631 | 114 " Nathan 'faceprint' Walp (", _("developer"), ")<BR>" |
115 " Mark 'KingAnt' Doliner (", _("developer"), ")<BR>" | |
6889 | 116 " Ethan 'Paco-Paco' Blanton (", _("developer"), ")<br>" |
6631 | 117 " Luke 'LSchiere' Schierer (", _("support"), ")<BR>" |
118 "<BR>", NULL); | |
6982 | 119 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); |
6631 | 120 g_free(str); |
4006 | 121 |
6631 | 122 /* Crazy Patch Writers */ |
123 str = g_strconcat( | |
124 "<FONT SIZE=\"3\">", _("Crazy Patch Writers"), ":</FONT><BR>" | |
4006 | 125 " Benjamin Miller<BR>" |
126 " Decklin Foster<BR>" | |
4990 | 127 " Etan 'deryni' Reisner<BR>" |
128 " Robert 'Robot101' McQueen<BR>" | |
6884 | 129 " Tim 'marv' Ringenbach<br>" |
7463 | 130 " Kevin 'SimGuy' Stange<br>" |
7690 | 131 " Stu 'nosnilmot' Tomlinson<br>" |
6631 | 132 "<BR>", NULL); |
6982 | 133 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); |
6631 | 134 g_free(str); |
4006 | 135 |
6936 | 136 /* Just because */ |
137 str = g_strconcat( | |
6938 | 138 "<FONT SIZE=\"3\">", "Just Because", ":</FONT><BR>" |
139 " Rachel Shelton (Vampire & Dark Lord)<br>" | |
140 "<BR>", NULL); | |
6982 | 141 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); |
6938 | 142 g_free(str); |
6936 | 143 |
6631 | 144 /* Retired Developers */ |
145 str = g_strconcat( | |
146 "<FONT SIZE=\"3\">", _("Retired Developers"), ":</FONT><BR>" | |
6938 | 147 " Adam Fritzler (", _("former libfaim maintainer"), ")<BR>" |
6631 | 148 " Eric Warmenhoven (", _("former lead developer"), ") " |
4006 | 149 "<<A HREF=\"mailto:warmenhoven@yahoo.com\">" |
150 "warmenhoven@yahoo.com</A>><BR>" | |
6631 | 151 " Jim Duchek (", _("former maintainer"), ")<BR>" |
152 " Jim Seymour (", _("former Jabber developer"), ")<BR>" | |
153 " Mark Spencer (", _("original author"), ") " | |
4006 | 154 "<<A HREF=\"mailto:markster@marko.net\">" |
4992 | 155 "markster@marko.net</A>><BR>" |
6631 | 156 " Syd Logan (", _("hacker and designated driver [lazy bum]"), |
157 ")<BR>" | |
158 "<BR>", NULL); | |
6982 | 159 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); |
6631 | 160 g_free(str); |
4006 | 161 |
6631 | 162 /* Current Translators */ |
163 str = g_strconcat( | |
164 "<FONT SIZE=\"3\">", _("Current Translators"), ":</FONT><BR>" | |
165 " <b>", _("Catalan"), " (ca)</b> - Robert Millan <<a href=\"mailto: zeratul2@wanadoo.es\">zeratul2@wanadoo.es</a>><br>" | |
166 " <b>", _("Czech"), " (cs)</b> - Miloslav Trmac <<a href=\"mailto: mitr@volny.cz\">mitr@volny.cz</a>><br>" | |
167 " <b>", _("Danish"), " (da)</b> - Morten Brix Pedersen <<a href=\"mailto: morten@wtf.dk\">morten@wtf.dk</a>><br>" | |
7657 | 168 " <b>", _("Esperanto"), "(eo)</b> - Anthony Ehrhardt <<a href=\"pastorant@minister.com\">pastorant@minister.com</a>><br>" |
6631 | 169 " <b>", _("German"), " (de)</b> - Björn Voigt <<a href=\"mailto: bjoern@cs.tu-berlin.de\">bjoern@cs.tu-berlin.de</a>><br>" |
170 " <b>", _("Spanish"), " (es)</b> - Javier Fernández-Sanguino Peña <<a href=\"mailto: jfs@debian.org\">jfs@debian.org</a>><br>" | |
7319 | 171 " <b>", _("Finnish"), " (fi)</b> - Arto Alakulju <<a href=\"mailto: arto@alakulju.net\">arto@alakulju.net</a>><br>" |
6631 | 172 " <b>", _("French"), " (fr)</b> - Éric Boumaour <<a href=\"mailto: zongo_fr@users.sourceforge.net\">zongo_fr@users.sourceforge.net</a>><br>" |
7368 | 173 " <b>", _("Hindi"), " (hi)</b> - Ravishankar Shrivastava <<a href=\"mailto: raviratlami@yahoo.com\">raviratlami@yahoo.com</a>><br>" |
6631 | 174 " <b>", _("Hungarian"), " (hu)</b> - Zoltan Sutto <<a href=\"mailto: suttozoltan@chello.hu\">suttozoltan@chello.hu</a>><br>" |
175 " <b>", _("Italian"), " (it)</b> - Claudio Satriano <<a href=\"mailto: satriano@na.infn.it\">satriano@na.infn.it</a>><br>" | |
176 " <b>", _("Korean"), " (ko)</b> - Kyung-uk Son <<a href=\"mailto: vvs740@chol.com\">vvs740@chol.com</a>><br>" | |
177 " <b>", _("Dutch; Flemish"), " (nl)</b> - Vincent van Adrighem <<a href=\"mailto: V.vanAdrighem@dirck.mine.nu\">V.vanAdrighem@dirck.mine.nu</a>><br>" | |
7508 | 178 " <b>", _("Norwegian"), " (no)</b> - Petter Johan Olsen<br>" |
6908 | 179 " <b>", _("Polish"), " (pl)</b> - Krzysztof <<a href=\"krzysztof@foltman.com\">krzysztof@foltman.com</a>>, Emil <<a href=\"emil5@go2.pl\">emil5@go2.pl</a>><br>" |
7340 | 180 " <b>", _("Portuguese"), " (pt)</b> - Duarte Henriques <<a href=\"mailto:duarte_henriques@myrealbox.com\">duarte_henriques@myrealbox.com</a>><br>" |
6631 | 181 " <b>", _("Portuguese-Brazil"), " (pt_BR)</b> - Maurício de Lemos Rodrigues Collares Neto <<a href=\"mailto: mauricioc@myrealbox.com\">mauricioc@myrealbox.com</a>><br>" |
182 " <b>", _("Romanian"), " (ro)</b> - Mişu Moldovan <<a href=\"mailto: dumol@go.ro\">dumol@go.ro</a>><br>" | |
6888 | 183 " <b>", _("Russian"), "(ru)</b> = Alexandre Prokoudine <<a href=\"mailto: avp@altlinux.ru\">avp@altlinux.ru</a>><br>" |
6659 | 184 " <b>", _("Serbian"), " (sr)</b> - Danilo Šegan <<a href=\"mailto: dsegan@gmx.net\">dsegan@gmx.net</a>>, Aleksandar Urosevic <<a href=\"mailto: urke@users.sourceforge.net\">urke@users.sourceforge.net</a>><br>" |
6631 | 185 " <b>", _("Swedish"), " (sv)</b> - Tore Lundqvist <<a href=\"mailto: tlt@mima.x.se\">tlt@mima.x.se</a>><br>" |
7649 | 186 " <b>", _("Vietnamese"), "(vi)</b> - T.M.Thanh, ", _("Gnome Vi Team"), ". <<a href=\"mailto: gnomevi-list@lists.sf.net\">gnomevi-list@lists.sf.net</a>><br>" |
6631 | 187 " <b>", _("Simplified Chinese"), " (zh_CN)</b> - Funda Wang <<a href=\"mailto: fundawang@linux.net.cn\">fundawang@linux.net.cn</a>><br>" |
6675 | 188 " <b>", _("Traditional Chinese"), " (zh_TW)</b> - Ambrose C. Li <<a href=\"mailto: acli@ada.dhs.org\">acli@ada.dhs.org</a>>, Paladin R. Liu <<a href=\"mailto: paladin@ms1.hinet.net\">paladin@ms1.hinet.net</a>><br>" |
7611 | 189 "<BR>", NULL); |
6982 | 190 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); |
6631 | 191 g_free(str); |
6546 | 192 |
6631 | 193 /* Past Translators */ |
194 str = g_strconcat( | |
195 "<FONT SIZE=\"3\">", _("Past Translators"), ":</FONT><BR>" | |
196 " <b>", _("Amharic"), " (am)</b> - Daniel Yacob<br>" | |
197 " <b>", _("Bulgarian"), " (bg)</b> - Hristo Todorov<br>" | |
198 " <b>", _("Catalan"), " (ca)</b> - JM Pérez Cáncer<br>" | |
199 " <b>", _("Czech"), " (cs)</b> - Honza Král<br>" | |
200 " <b>", _("German"), " (de)</b> - Daniel Seifert, Karsten Weiss<br>" | |
201 " <b>", _("Spanish"), " (es)</b> - Amaya Rodrigo, Alejandro G Villar, Nicolás Lichtmaier, JM Pérez Cáncer<br>" | |
7655 | 202 " <b>", _("Finnish"), " (fi)</b> - Tero Kuusela<br>" |
6631 | 203 " <b>", _("French"), " (fr)</b> - sebfrance, Stéphane Pontier, Stéphane Wirtel, Loïc Jeannin<br>" |
204 " <b>", _("Hebrew"), " (he)</b> - Pavel Bibergal<br>" | |
205 " <b>", _("Italian"), " (it)</b> - Salvatore di Maggio<br>" | |
206 " <b>", _("Japanese"), " (ja)</b> - Ryosuke Kutsuna, Taku Yasui, Junichi Uekawa<br>" | |
207 " <b>", _("Korean"), " (ko)</b> - Sang-hyun S, A Ho-seok Lee<br>" | |
208 " <b>", _("Polish"), " (pl)</b> - Przemysław Sułek<br>" | |
209 " <b>", _("Russian"), " (ru)</b> - Sergey Volozhanin<br>" | |
210 " <b>", _("Slovak"), " (sk)</b> - Daniel Režný<br>" | |
211 " <b>", _("Swedish"), " (sv)</b> - Christian Rose<br>" | |
212 " <b>", _("Chinese"), " (zh_CN, zh_TW)</b> - Hashao, Rocky S. Lee<br>" | |
213 "<BR>", NULL); | |
6982 | 214 gtk_imhtml_append_text(GTK_IMHTML(text), str, GTK_IMHTML_NO_SCROLL); |
6631 | 215 g_free(str); |
6546 | 216 |
4006 | 217 gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0); |
218 | |
1205 | 219 /* Close Button */ |
220 | |
221 hbox = gtk_hbox_new(FALSE, 5); | |
1210 | 222 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
|
223 gtk_widget_show(hbox); |
1205 | 224 |
3709 | 225 button = gaim_pixbuf_button_from_stock(_("Close"), GTK_STOCK_CLOSE, GAIM_BUTTON_HORIZONTAL); |
1210 | 226 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
622 | 227 |
4162
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
228 g_signal_connect_swapped(G_OBJECT(button), "clicked", |
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
229 G_CALLBACK(destroy_about), G_OBJECT(about)); |
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
230 g_signal_connect(G_OBJECT(about), "destroy", |
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
231 G_CALLBACK(destroy_about), G_OBJECT(about)); |
1210 | 232 |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
233 /* this makes the sizes not work. */ |
1976 | 234 /* GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); */ |
235 /* gtk_widget_grab_default(button); */ | |
1205 | 236 |
237 } | |
1210 | 238 |
239 /* Let's give'em something to talk about -- woah woah woah */ | |
5024 | 240 gtk_widget_show_all(about); |
4157 | 241 gtk_window_present(GTK_WINDOW(about)); |
1205 | 242 } |