Mercurial > pidgin
annotate src/about.c @ 6629:bdc448cf4cb6
[gaim-migrate @ 7153]
Tim Ringenbach (marv_sf) writes:
" This patch makes sending colors in yahoo work. It also
makes a few changing to receiving them, and addresses
most of the problems with that patch (which I think
were all related to the fact it didn't do outgoing colors).
It now handles bold, italic, underline, font face, font
size, and font color in both directions. It disables
the background color button if the prpl is yahoo (in a
generic way), and farthermore strips out any <body>
tags that the user might try to type anyway (the yahoo
server purposely mangles them).
It also adds a line to g_strescape some debug messages
because I got tired them of changing the color of my
terminal.
I think I got all the bugs out. If you run with -d or
open the debug window, it will show you what both
conversion function returned, which should help track
down any problems."
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 26 Aug 2003 01:34:51 +0000 |
parents | 31b39f6c2142 |
children | f80e23e66de0 |
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]; |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
51 |
1 | 52 if (!about) { |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
53 |
2725
f3c094e78609
[gaim-migrate @ 2738]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2562
diff
changeset
|
54 GAIM_DIALOG(about); |
2904
3a9bca5fedcf
[gaim-migrate @ 2917]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2902
diff
changeset
|
55 gtk_window_set_default_size(GTK_WINDOW(about), 450, -1); |
2535 | 56 g_snprintf(abouttitle, sizeof(abouttitle), _("About Gaim v%s"), VERSION); |
1 | 57 gtk_window_set_title(GTK_WINDOW(about), abouttitle); |
4074 | 58 gtk_window_set_role(GTK_WINDOW(about), "about"); |
4635 | 59 gtk_window_set_resizable(GTK_WINDOW(about), TRUE); |
1210 | 60 gtk_widget_realize(about); |
1 | 61 |
1210 | 62 vbox = gtk_vbox_new(FALSE, 5); |
63 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | |
64 gtk_container_add(GTK_CONTAINER(about), vbox); | |
1205 | 65 |
2562 | 66 frame = gtk_frame_new("Gaim v" VERSION); |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
67 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
1210 | 68 |
2072 | 69 fbox = gtk_vbox_new(FALSE, 5); |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
70 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); |
1210 | 71 gtk_container_add(GTK_CONTAINER(frame), fbox); |
1205 | 72 |
5024 | 73 logo = gtk_image_new_from_stock(GAIM_STOCK_LOGO, gtk_icon_size_from_name(GAIM_ICON_SIZE_LOGO)); |
3721 | 74 gtk_box_pack_start(GTK_BOX(fbox), logo, FALSE, FALSE, 0); |
1205 | 75 |
4006 | 76 sw = gtk_scrolled_window_new(NULL, NULL); |
77 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | |
78 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | |
4197 | 79 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
4006 | 80 gtk_box_pack_start(GTK_BOX(fbox), sw, TRUE, TRUE, 0); |
3709 | 81 |
4006 | 82 text = gtk_imhtml_new(NULL, NULL); |
83 gtk_container_add(GTK_CONTAINER(sw), text); | |
4197 | 84 gtk_widget_set_size_request(sw, -1, 350); |
4006 | 85 gaim_setup_imhtml(text); |
2950 | 86 |
4006 | 87 gtk_imhtml_append_text(GTK_IMHTML(text), |
88 _("Gaim is a modular Instant Messaging client capable of " | |
89 "using AIM, ICQ, Yahoo!, MSN, IRC, Jabber, Napster, " | |
90 "Zephyr, and Gadu-Gadu all at once. It is written using " | |
4054 | 91 "Gtk+ and is licensed under the GPL.<BR><BR>"), -1, GTK_IMHTML_NO_SCROLL); |
4006 | 92 |
93 gtk_imhtml_append_text(GTK_IMHTML(text), | |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
94 "<FONT SIZE=\"3\">URL:</FONT> <A HREF=\"" GAIM_WEBSITE "\">" |
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
95 GAIM_WEBSITE "</A><BR><BR>", -1, GTK_IMHTML_NO_SCROLL); |
4006 | 96 |
97 gtk_imhtml_append_text(GTK_IMHTML(text), | |
4160 | 98 _("<FONT SIZE=\"3\">IRC:</FONT> #gaim on irc.freenode.net" |
99 "<BR><BR>"), -1, GTK_IMHTML_NO_SCROLL); | |
4006 | 100 |
101 gtk_imhtml_append_text(GTK_IMHTML(text), | |
4054 | 102 _("<FONT SIZE=\"3\">Active Developers:</FONT><BR>"), -1, GTK_IMHTML_NO_SCROLL); |
4006 | 103 gtk_imhtml_append_text(GTK_IMHTML(text), |
4160 | 104 _(" Rob Flynn (maintainer) " |
4006 | 105 "<<A HREF=\"mailto:rob@marko.net\">rob@marko.net</A>><BR>" |
4990 | 106 " Sean Egan (lead developer) " |
4006 | 107 "<<A HREF=\"mailto:bj91704@binghamton.edu\">" |
4992 | 108 "bj91704@binghamton.edu</A>><BR>" |
4990 | 109 " Christian 'ChipX86' Hammond (developer & webmaster)<BR>" |
110 " Herman Bloggs (win32 port) " | |
111 "<<A HREF=\"mailto:hermanator12002@yahoo.com\">" | |
112 "hermanator12002@yahoo.com</A>><BR>" | |
113 " Nathan 'faceprint' Walp (developer)<BR>" | |
114 " Mark 'KingAnt' Doliner (developer)<BR>" | |
115 " Luke 'LSchiere' Schierer (support)<BR>" | |
116 "<BR>"), -1, GTK_IMHTML_NO_SCROLL); | |
4006 | 117 |
118 gtk_imhtml_append_text(GTK_IMHTML(text), | |
4054 | 119 _("<FONT SIZE=\"3\">Crazy Patch Writers:</FONT><BR>"), -1, GTK_IMHTML_NO_SCROLL); |
4006 | 120 gtk_imhtml_append_text(GTK_IMHTML(text), |
121 " Benjamin Miller<BR>" | |
122 " Decklin Foster<BR>" | |
4990 | 123 " Etan 'deryni' Reisner<BR>" |
124 " Ethan 'Paco-Paco' Blanton<br>" | |
125 " Robert 'Robot101' McQueen<BR>" | |
126 "<BR>", -1, GTK_IMHTML_NO_SCROLL); | |
4006 | 127 |
128 gtk_imhtml_append_text(GTK_IMHTML(text), | |
4054 | 129 _("<FONT SIZE=\"3\">Retired Developers:</FONT><BR>"), -1, GTK_IMHTML_NO_SCROLL); |
4006 | 130 gtk_imhtml_append_text(GTK_IMHTML(text), |
4990 | 131 _(" Adam Fritzler (former libfaim maintainer)<BR>" |
6546 | 132 " Eric Warmenhoven (former lead developer) " |
4006 | 133 "<<A HREF=\"mailto:warmenhoven@yahoo.com\">" |
134 "warmenhoven@yahoo.com</A>><BR>" | |
4990 | 135 " Jim Duchek (former maintainer)<BR>" |
136 " Jim Seymour (former Jabber developer)<BR>" | |
4006 | 137 " Mark Spencer (original author) " |
138 "<<A HREF=\"mailto:markster@marko.net\">" | |
4992 | 139 "markster@marko.net</A>><BR>" |
4990 | 140 " Syd Logan (hacker and designated driver [lazy bum])<BR>" |
141 "<BR>"), -1, GTK_IMHTML_NO_SCROLL); | |
4006 | 142 |
6546 | 143 gtk_imhtml_append_text(GTK_IMHTML(text), |
144 _("<FONT SIZE=\"3\">Current Translators:</FONT><BR>"), -1, GTK_IMHTML_NO_SCROLL); | |
145 gtk_imhtml_append_text(GTK_IMHTML(text), | |
6555 | 146 " <b>Catalan (ca)</b> - Robert Millan <<a href=\"mailto: zeratul2@wanadoo.es\">zeratul2@wanadoo.es</a>><br>" |
6546 | 147 " <b>Czech (cs)</b> - Miloslav Trmac <<a href=\"mailto: mitr@volny.cz\">mitr@volny.cz</a>><br>" |
148 " <b>Danish (da)</b> - Morten Brix Pedersen <<a href=\"mailto: morten@wtf.dk\">morten@wtf.dk</a>><br>" | |
149 " <b>German (de)</b> - Björn Voigt <<a href=\"mailto: bjoern@cs.tu-berlin.de\">bjoern@cs.tu-berlin.de</a>><br>" | |
150 " <b>Spanish (es)</b> - Javier Fernández-Sanguino Peña <<a href=\"mailto: jfs@debian.org\">jfs@debian.org</a>><br>" | |
6570 | 151 " <b>French (fr)</b> - Éric Boumaour <<a href=\"mailto: zongo_fr@users.sourceforge.net\">zongo_fr@users.sourceforge.net</a>><br>" |
6546 | 152 " <b>Hindi (hi)</b> - Guntupalli Karunakar <<a href=\"mailto: karunakar@freedomink.org\">karunakar@freedomink.org</a>><br>" |
153 " <b>Hungarian (hu)</b> - Zoltan Sutto <<a href=\"mailto: suttozoltan@chello.hu\">suttozoltan@chello.hu</a>><br>" | |
154 " <b>Italian (it)</b> - Claudio Satriano <<a href=\"mailto: satriano@na.infn.it\">satriano@na.infn.it</a>><br>" | |
155 " <b>Korean (ko)</b> - Kyung-uk Son <<a href=\"mailto: vvs740@chol.com\">vvs740@chol.com</a>><br>" | |
156 " <b>Dutch; Flemish (nl)</b> - Vincent van Adrighem <<a href=\"mailto: V.vanAdrighem@dirck.mine.nu\">V.vanAdrighem@dirck.mine.nu</a>><br>" | |
157 " <b>Portuguese-Brazil (pt_BR)</b> - Maurício de Lemos Rodrigues Collares Neto <<a href=\"mailto: mauricioc@myrealbox.com\">mauricioc@myrealbox.com</a>><br>" | |
158 " <b>Romanian (ro)</b> - Mişu Moldovan <<a href=\"mailto: dumol@go.ro\">dumol@go.ro</a>><br>" | |
6628 | 159 " <b>Serbian (sr)</b> - Danilo Šegan <<a href=\"mailto: dsegan@gmx.net\">dsegan@gmx.net</a>><br>" |
6546 | 160 " <b>Swedish (sv)</b> - Tore Lundqvist <<a href=\"mailto: tlt@mima.x.se\">tlt@mima.x.se</a>><br>" |
6570 | 161 " <b>Simplified Chinese (zh_CN)</b> - Funda Wang <<a href=\"mailto: fundawang@linux.net.cn\">fundawang@linux.net.cn</a>><br>" |
162 " <b>Traditional Chinese (zh_TW)</b> - Ambrose C. Li <<a href=\"mailto: acli@ada.dhs.org\">acli@ada.dhs.org</a>> and Paladin R. Liu <<a href=\"mailto: paladin@ms1.hinet.net\">paladin@ms1.hinet.net</a><br>" | |
6604 | 163 "<BR>", -1, GTK_IMHTML_NO_SCROLL); |
6546 | 164 |
165 gtk_imhtml_append_text(GTK_IMHTML(text), | |
166 _("<FONT SIZE=\"3\">Past Translators:</FONT><BR>"), -1, GTK_IMHTML_NO_SCROLL); | |
167 gtk_imhtml_append_text(GTK_IMHTML(text), | |
168 " <b>Amharic (am)</b> - Daniel Yacob<br>" | |
169 " <b>Bulgarian (bg)</b> - Hristo Todorov<br>" | |
170 " <b>Catalan (ca)</b> - JM Pérez Cáncer<br>" | |
171 " <b>Czech (cs)</b> - Honza Král<br>" | |
172 " <b>German (de)</b> - Daniel Seifert, Karsten Weiss<br>" | |
6628 | 173 " <b>Spanish (es)</b> - Amaya Rodrigo, Alejandro G Villar, Nicolás Lichtmaier, JM Pérez Cáncer<br>" |
6546 | 174 " <b>French (fr)</b> - sebfrance, Stéphane Pontier, Stéphane Wirtel, Loïc Jeannin<br>" |
175 " <b>Hebrew (he)</b> - Pavel Bibergal<br>" | |
176 " <b>Italian (it)</b> - Salvatore di Maggio<br>" | |
177 " <b>Japanese (ja)</b> - Ryosuke Kutsuna, Taku Yasui, Junichi Uekawa<br>" | |
178 " <b>Korean (ko)</b> - Sang-hyun S, A Ho-seok Lee<br>" | |
179 " <b>Norwegian (no)</b> - Petter Johan Olsen<br>" | |
180 " <b>Polish (pl)</b> - Przemysław Sułek<br>" | |
181 " <b>Russian (ru)</b> - Sergey Volozhanin<br>" | |
182 " <b>Slovak (sk)</b> - Daniel Režný<br>" | |
183 " <b>Swedish (sv)</b> - Christian Rose<br>" | |
6570 | 184 " <b>Chinese (zh_CN, zh_TW)</b> - Hashao, Rocky S. Lee<br>" |
6604 | 185 "<BR>", -1, GTK_IMHTML_NO_SCROLL); |
6546 | 186 |
4006 | 187 gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0); |
188 | |
1205 | 189 /* Close Button */ |
190 | |
191 hbox = gtk_hbox_new(FALSE, 5); | |
1210 | 192 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
|
193 gtk_widget_show(hbox); |
1205 | 194 |
3709 | 195 button = gaim_pixbuf_button_from_stock(_("Close"), GTK_STOCK_CLOSE, GAIM_BUTTON_HORIZONTAL); |
1210 | 196 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
622 | 197 |
4162
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
198 g_signal_connect_swapped(G_OBJECT(button), "clicked", |
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
199 G_CALLBACK(destroy_about), G_OBJECT(about)); |
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
200 g_signal_connect(G_OBJECT(about), "destroy", |
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4160
diff
changeset
|
201 G_CALLBACK(destroy_about), G_OBJECT(about)); |
1210 | 202 |
1250
b5783215b245
[gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1233
diff
changeset
|
203 /* this makes the sizes not work. */ |
1976 | 204 /* GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); */ |
205 /* gtk_widget_grab_default(button); */ | |
1205 | 206 |
207 } | |
1210 | 208 |
209 /* Let's give'em something to talk about -- woah woah woah */ | |
5024 | 210 gtk_widget_show_all(about); |
4157 | 211 gtk_window_present(GTK_WINDOW(about)); |
1205 | 212 } |