Mercurial > pidgin
annotate src/gtkdialogs.c @ 11652:a66ee70c614c
[gaim-migrate @ 13936]
Whoops
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 13 Oct 2005 01:48:03 +0000 |
parents | 13f19073c0e1 |
children | bd5cc27e8071 |
rev | line source |
---|---|
9709 | 1 /* |
10297
ec140184437b
[gaim-migrate @ 11480]
Luke Schierer <lschiere@pidgin.im>
parents:
10266
diff
changeset
|
2 * @file gtkdialogs.c GTK+ Dialogs |
ec140184437b
[gaim-migrate @ 11480]
Luke Schierer <lschiere@pidgin.im>
parents:
10266
diff
changeset
|
3 * @ingroup gtkui |
ec140184437b
[gaim-migrate @ 11480]
Luke Schierer <lschiere@pidgin.im>
parents:
10266
diff
changeset
|
4 * |
9709 | 5 * gaim |
6 * | |
7 * Gaim is the legal property of its developers, whose names are too numerous | |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
9 * source distribution. | |
10 * | |
11 * This program is free software; you can redistribute it and/or modify | |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
24 */ | |
9791 | 25 #include "internal.h" |
26 #include "gtkgaim.h" | |
9709 | 27 |
28 #include "debug.h" | |
29 #include "notify.h" | |
30 #include "prpl.h" | |
31 #include "request.h" | |
32 #include "util.h" | |
33 | |
34 #include "gtkdialogs.h" | |
35 #include "gtkimhtml.h" | |
36 #include "gtkimhtmltoolbar.h" | |
37 #include "gtklog.h" | |
38 #include "gtkutils.h" | |
10297
ec140184437b
[gaim-migrate @ 11480]
Luke Schierer <lschiere@pidgin.im>
parents:
10266
diff
changeset
|
39 #include "gtkstock.h" |
9709 | 40 |
9753 | 41 static GList *dialogwindows = NULL; |
9709 | 42 |
9753 | 43 static GtkWidget *about = NULL; |
9709 | 44 |
9758 | 45 struct developer { |
46 char *name; | |
47 char *role; | |
48 char *email; | |
49 }; | |
50 | |
51 struct translator { | |
52 char *language; | |
53 char *abbr; | |
54 char *name; | |
55 char *email; | |
56 }; | |
57 | |
58 static struct developer developers[] = { | |
59 {"Sean Egan", N_("lead developer"), "sean.egan@binghamton.edu"}, | |
10508
4cc999cc6718
[gaim-migrate @ 11802]
Luke Schierer <lschiere@pidgin.im>
parents:
10493
diff
changeset
|
60 {"Daniel 'datallah' Atallah", N_("developer"), NULL}, |
9758 | 61 {"Christian 'ChipX86' Hammond", N_("developer & webmaster"), NULL}, |
10095
b28f9be379b3
[gaim-migrate @ 11114]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
9991
diff
changeset
|
62 {"Herman Bloggs", N_("win32 port"), "herman@bluedigits.com"}, |
9758 | 63 {"Nathan 'faceprint' Walp", N_("developer"), NULL}, |
64 {"Mark 'KingAnt' Doliner", N_("developer"), NULL}, | |
65 {"Ethan 'Paco-Paco' Blanton", N_("developer"), NULL}, | |
10370
acd5b7af0409
[gaim-migrate @ 11590]
Luke Schierer <lschiere@pidgin.im>
parents:
10369
diff
changeset
|
66 {"Etan 'deryni' Reisner", N_("developer"), NULL}, |
9758 | 67 {"Tim 'marv' Ringenbach", N_("developer"), NULL}, |
10369
584c792dd15c
[gaim-migrate @ 11588]
Luke Schierer <lschiere@pidgin.im>
parents:
10324
diff
changeset
|
68 {"Luke 'LSchiere' Schierer", N_("support"), "lschiere@users.sf.net"}, |
10116 | 69 {"Stu 'nosnilmot' Tomlinson", N_("developer"), NULL}, |
10874
65d3140f35fd
[gaim-migrate @ 12564]
Gary Kramlich <grim@reaperworld.com>
parents:
10852
diff
changeset
|
70 {"Gary 'grim' Kramlich", N_("developer"), NULL}, |
11036
b6070e971ceb
[gaim-migrate @ 12927]
Richard Laager <rlaager@wiktel.com>
parents:
11025
diff
changeset
|
71 {"Richard 'rlaager' Laager", N_("developer"), NULL}, |
9758 | 72 {NULL, NULL, NULL} |
73 }; | |
74 | |
10372
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
75 static struct developer patch_writers[] = { |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
76 {"Ka-Hing 'javabsp' Cheung", NULL, NULL}, |
11612
6135c29a514f
[gaim-migrate @ 13885]
Luke Schierer <lschiere@pidgin.im>
parents:
11581
diff
changeset
|
77 {"Sadrul Habib Chowdhury", NULL, NULL}, |
10372
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
78 {"Felipe 'shx' Contreras", NULL, NULL}, |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
79 {"Decklin Foster", NULL, NULL}, |
11062
97b6fb28e976
[gaim-migrate @ 13019]
Luke Schierer <lschiere@pidgin.im>
parents:
11036
diff
changeset
|
80 {"Peter 'Bleeter' Lawler", NULL, NULL}, |
10372
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
81 {"Robert 'Robot101' McQueen", NULL, NULL}, |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
82 {"Benjamin Miller", NULL, NULL}, |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
83 {"Kevin 'SimGuy' Stange", NULL, NULL}, |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
84 {NULL, NULL, NULL} |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
85 }; |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
86 |
9758 | 87 static struct developer retired_developers[] = { |
10615 | 88 {"Rob Flynn", N_("maintainer"), "gaim@robflynn.com"}, |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
89 {"Adam Fritzler", N_("libfaim maintainer"), NULL}, |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
90 {"Eric Warmenhoven", N_("lead developer"), "warmenhoven@yahoo.com"}, |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
91 {"Jim Duchek", N_("maintainer"), NULL}, |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
92 {"Jim Seymour", N_("Jabber developer"), NULL}, |
9758 | 93 {"Mark Spencer", N_("original author"), "markster@marko.net"}, |
94 {"Syd Logan", N_("hacker and designated driver [lazy bum]"), NULL}, | |
95 {NULL, NULL, NULL} | |
96 }; | |
97 | |
98 static struct translator current_translators[] = { | |
10852
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
99 {N_("Bulgarian"), "bg", "Vladimira Girginova", "missing@here.is"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
100 {N_("Bulgarian"), "bg", "Vladimir (Kaladan) Petkov", "vpetkov@i-space.org"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
101 {N_("Catalan"), "ca", "Josep Puigdemont", "tradgnome@softcatala.org"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
102 {N_("Czech"), "cs", "Miloslav Trmac", "mitr@volny.cz"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
103 {N_("Danish"), "da", "Morten Brix Pedersen", "morten@wtf.dk"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
104 {N_("German"), "de", "Björn Voigt", "bjoern@cs.tu-berlin.de"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
105 {N_("Australian English"), "en_AU", "Peter Lawler", "trans@six-by-nine.com.au"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
106 {N_("British English"), "en_GB", "Luke Ross", "lukeross@sys3175.co.uk"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
107 {N_("Canadian English"), "en_CA", "Adam Weinberger", "adamw@gnome.org"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
108 {N_("Spanish"), "es", "Javier Fernández-Sanguino Peña", "jfs@debian.org"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
109 {N_("Finnish"), "fi", "Arto Alakulju", "arto@alakulju.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
110 {N_("French"), "fr", "Éric Boumaour", "zongo_fr@users.sourceforge.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
111 {N_("Hebrew"), "he", "Pavel Bibergal", "cyberkm203@hotmail.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
112 {N_("Hindi"), "hi", "Ravishankar Shrivastava", "raviratlami@yahoo.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
113 {N_("Hungarian"), "hu", "Zoltan Sutto", "sutto.zoltan@rutinsoft.hu"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
114 {N_("Italian"), "it", "Claudio Satriano", "satriano@na.infn.it"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
115 {N_("Japanese"), "ja", "Takashi Aihana", "aihana@gnome.gr.jp"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
116 {N_("Lithuanian"), "lt", "Gediminas Čičinskas", "gediminas@parok.lt"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
117 {N_("Georgian"), "ka", "Temuri Doghonadze", "admin@security.gov.ge"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
118 {N_("Korean"), "ko", "Kyung-uk Son", "vvs740@chol.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
119 {N_("Dutch, Flemish"), "nl", "Vincent van Adrighem", "V.vanAdrighem@dirck.mine.nu"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
120 {N_("Macedonian"), "mk", "Tomislav Markovski", "herrera@users.sf.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
121 {N_("Norwegian"), "no", "Petter Johan Olsen", "petter.olsen@cc.uit.no"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
122 {N_("Polish"), "pl", "Emil Nowak", "emil5@go2.pl"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
123 {N_("Polish"), "pl", "Krzysztof Foltman", "krzysztof@foltman.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
124 {N_("Portuguese"), "pt", "Duarte Henriques", "duarte_henriques@myrealbox.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
125 {N_("Portuguese-Brazil"), "pt_BR", "Maurício de Lemos Rodrigues Collares Neto", "mauricioc@gmail.com"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
126 {N_("Romanian"), "ro", "Mişu Moldovan", "dumol@go.ro"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
127 {N_("Russian"), "ru", "Dmitry Beloglazov", "dmaa@users.sf.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
128 {N_("Serbian"), "sr", "Danilo Šegan", "dsegan@gmx.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
129 {N_("Serbian"), "sr", "Aleksandar Urosevic", "urke@users.sourceforge.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
130 {N_("Slovenian"), "sl", "Matjaz Horvat", "matjaz@owca.info"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
131 {N_("Swedish"), "sv", "Tore Lundqvist", "tlt@mima.x.se"}, |
11465
448bc3b8eb63
[gaim-migrate @ 13705]
Luke Schierer <lschiere@pidgin.im>
parents:
11338
diff
changeset
|
132 {N_("Telugu"), "te", "Mr. Subbaramaih", "info.gist@cdac.in"}, |
10852
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
133 {N_("Vietnamese"), "vi", N_("T.M.Thanh and the Gnome-Vi Team"), "gnomevi-list@lists.sf.net"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
134 {N_("Simplified Chinese"), "zh_CN", "Funda Wang", "fundawang@linux.net.cn"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
135 {N_("Traditional Chinese"), "zh_TW", "Ambrose C. Li", "acli@ada.dhs.org"}, |
62b5117114d2
[gaim-migrate @ 12526]
Luke Schierer <lschiere@pidgin.im>
parents:
10851
diff
changeset
|
136 {N_("Traditional Chinese"), "zh_TW", "Paladin R. Liu", "paladin@ms1.hinet.net"}, |
9758 | 137 {NULL, NULL, NULL, NULL} |
138 }; | |
139 | |
140 | |
141 static struct translator past_translators[] = { | |
142 {N_("Amharic"), "am", "Daniel Yacob", NULL}, | |
143 {N_("Bulgarian"), "bg", "Hristo Todorov", NULL}, | |
144 {N_("Catalan"), "ca", "JM Pérez Cáncer", NULL}, | |
10131 | 145 {N_("Catalan"), "ca", "Robert Millan", NULL}, |
9758 | 146 {N_("Czech"), "cs", "Honza Král", NULL}, |
147 {N_("German"), "de", "Daniel Seifert, Karsten Weiss", NULL}, | |
148 {N_("Spanish"), "es", "Amaya Rodrigo, Alejandro G Villar, Nicolás Lichtmaier, JM Pérez Cáncer", NULL}, | |
149 {N_("Finnish"), "fi", "Tero Kuusela", NULL}, | |
150 {N_("French"), "fr", "Sébastien François, Stéphane Pontier, Stéphane Wirtel, Loïc Jeannin", NULL}, | |
151 {N_("Italian"), "it", "Salvatore di Maggio", NULL}, | |
152 {N_("Japanese"), "ja", "Ryosuke Kutsuna, Taku Yasui, Junichi Uekawa", NULL}, | |
153 {N_("Korean"), "ko", "Sang-hyun S, A Ho-seok Lee", NULL}, | |
154 {N_("Polish"), "pl", "Przemysław Sułek", NULL}, | |
155 {N_("Russian"), "ru", "Sergey Volozhanin", NULL}, | |
156 {N_("Russian"), "ru", "Alexandre Prokoudine", NULL}, | |
157 {N_("Slovak"), "sk", "Daniel Režný", NULL}, | |
158 {N_("Swedish"), "sv", "Christian Rose", NULL}, | |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
159 {N_("Simplified Chinese"), "zh_CN", "Hashao, Rocky S. Lee", NULL}, |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
160 {N_("Traditional Chinese"), "zh_TW", "Hashao, Rocky S. Lee", NULL}, |
9758 | 161 {NULL, NULL, NULL, NULL} |
162 }; | |
163 | |
9730 | 164 void |
165 gaim_gtkdialogs_destroy_all() | |
9709 | 166 { |
9753 | 167 while (dialogwindows) { |
168 gtk_widget_destroy(dialogwindows->data); | |
169 dialogwindows = g_list_remove(dialogwindows, dialogwindows->data); | |
170 } | |
171 } | |
172 | |
173 static void destroy_about() | |
174 { | |
175 if (about != NULL) | |
176 gtk_widget_destroy(about); | |
177 about = NULL; | |
178 } | |
179 | |
180 void gaim_gtkdialogs_about(GtkWidget *w, void *data) | |
181 { | |
182 GtkWidget *hbox; | |
183 GtkWidget *vbox; | |
184 GtkWidget *logo; | |
10175 | 185 GtkWidget *frame; |
9753 | 186 GtkWidget *text; |
187 GtkWidget *bbox; | |
188 GtkWidget *button; | |
189 GtkTextIter iter; | |
9758 | 190 GString *str; |
191 int i; | |
10266 | 192 AtkObject *obj; |
9753 | 193 |
194 if (about != NULL) { | |
195 gtk_window_present(GTK_WINDOW(about)); | |
196 return; | |
197 } | |
198 | |
199 GAIM_DIALOG(about); | |
200 gtk_window_set_default_size(GTK_WINDOW(about), 450, -1); | |
201 gtk_window_set_title(GTK_WINDOW(about), _("About Gaim")); | |
202 gtk_window_set_role(GTK_WINDOW(about), "about"); | |
203 gtk_window_set_resizable(GTK_WINDOW(about), TRUE); | |
9778 | 204 gtk_window_set_default_size(GTK_WINDOW(about), 340, 550); /* Golden ratio in da hizzy */ |
9753 | 205 |
11243 | 206 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); |
207 gtk_container_set_border_width(GTK_CONTAINER(hbox), GAIM_HIG_BORDER); | |
9753 | 208 gtk_container_add(GTK_CONTAINER(about), hbox); |
209 | |
11243 | 210 vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); |
9753 | 211 gtk_container_add(GTK_CONTAINER(hbox), vbox); |
212 | |
213 logo = gtk_image_new_from_stock(GAIM_STOCK_LOGO, gtk_icon_size_from_name(GAIM_ICON_SIZE_LOGO)); | |
10266 | 214 obj = gtk_widget_get_accessible(logo); |
215 atk_object_set_description(obj, "Gaim " VERSION); | |
9753 | 216 gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); |
217 | |
10175 | 218 frame = gaim_gtk_create_imhtml(FALSE, &text, NULL); |
10522 | 219 gtk_imhtml_set_format_functions(GTK_IMHTML(text), GTK_IMHTML_ALL ^ GTK_IMHTML_SMILEY); |
10175 | 220 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
9753 | 221 |
9758 | 222 str = g_string_sized_new(4096); |
9753 | 223 |
10153 | 224 g_string_append(str, |
9758 | 225 _("Gaim is a modular messaging client capable of using " |
226 "AIM, MSN, Yahoo!, Jabber, ICQ, IRC, SILC, " | |
227 "Novell GroupWise, Napster, Zephyr, and Gadu-Gadu " | |
228 "all at once. It is written using " | |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
229 "GTK+ and is licensed under the GNU GPL.<BR><BR>")); |
9753 | 230 |
9758 | 231 g_string_append(str, "<FONT SIZE=\"4\">URL:</FONT> <A HREF=\"" |
232 GAIM_WEBSITE "\">" GAIM_WEBSITE "</A><BR/><BR/>"); | |
10493 | 233 #ifdef _WIN32 |
234 g_string_append_printf(str, _("<FONT SIZE=\"4\">IRC:</FONT> " | |
235 "#wingaim on irc.freenode.net<BR><BR>")); | |
236 #else | |
9758 | 237 g_string_append_printf(str, _("<FONT SIZE=\"4\">IRC:</FONT> " |
238 "#gaim on irc.freenode.net<BR><BR>")); | |
10493 | 239 #endif |
9753 | 240 |
241 /* Active Developers */ | |
9758 | 242 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>", |
243 _("Active Developers")); | |
244 for (i = 0; developers[i].name != NULL; i++) { | |
245 if (developers[i].email != NULL) { | |
10116 | 246 g_string_append_printf(str, " %s (%s) <<a href=\"mailto:%s\">%s</a>><br/>", |
9758 | 247 developers[i].name, _(developers[i].role), |
248 developers[i].email, developers[i].email); | |
249 } else { | |
250 g_string_append_printf(str, " %s (%s)<br/>", | |
251 developers[i].name, _(developers[i].role)); | |
252 } | |
253 } | |
254 g_string_append(str, "<BR/>"); | |
9709 | 255 |
9753 | 256 /* Crazy Patch Writers */ |
9758 | 257 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>", |
258 _("Crazy Patch Writers")); | |
10372
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
259 for (i = 0; patch_writers[i].name != NULL; i++) { |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
260 if (patch_writers[i].email != NULL) { |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
261 g_string_append_printf(str, " %s <<a href=\"mailto:%s\">%s</a>><br/>", |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
262 patch_writers[i].name, |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
263 patch_writers[i].email, patch_writers[i].email); |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
264 } else { |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
265 g_string_append_printf(str, " %s<br/>", |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
266 patch_writers[i].name); |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
267 } |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
268 } |
618a330c0260
[gaim-migrate @ 11595]
Luke Schierer <lschiere@pidgin.im>
parents:
10371
diff
changeset
|
269 g_string_append(str, "<BR/>"); |
9753 | 270 |
271 /* Retired Developers */ | |
9758 | 272 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>", |
273 _("Retired Developers")); | |
274 for (i = 0; retired_developers[i].name != NULL; i++) { | |
275 if (retired_developers[i].email != NULL) { | |
10116 | 276 g_string_append_printf(str, " %s (%s) <<a href=\"mailto:%s\">%s</a>><br/>", |
9758 | 277 retired_developers[i].name, _(retired_developers[i].role), |
278 retired_developers[i].email, retired_developers[i].email); | |
279 } else { | |
280 g_string_append_printf(str, " %s (%s)<br/>", | |
281 retired_developers[i].name, _(retired_developers[i].role)); | |
282 } | |
283 } | |
284 g_string_append(str, "<BR/>"); | |
9753 | 285 |
286 /* Current Translators */ | |
9758 | 287 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>", |
288 _("Current Translators")); | |
289 for (i = 0; current_translators[i].language != NULL; i++) { | |
290 if (current_translators[i].email != NULL) { | |
10116 | 291 g_string_append_printf(str, " <b>%s (%s)</b> - %s <<a href=\"mailto:%s\">%s</a>><br/>", |
9758 | 292 _(current_translators[i].language), |
293 current_translators[i].abbr, | |
294 _(current_translators[i].name), | |
295 current_translators[i].email, | |
296 current_translators[i].email); | |
297 } else { | |
298 g_string_append_printf(str, " <b>%s (%s)</b> - %s<br/>", | |
299 _(current_translators[i].language), | |
300 current_translators[i].abbr, | |
301 _(current_translators[i].name)); | |
302 } | |
303 } | |
304 g_string_append(str, "<BR/>"); | |
9753 | 305 |
306 /* Past Translators */ | |
9758 | 307 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>", |
308 _("Past Translators")); | |
309 for (i = 0; past_translators[i].language != NULL; i++) { | |
310 if (past_translators[i].email != NULL) { | |
10116 | 311 g_string_append_printf(str, " <b>%s (%s)</b> - %s <<a href=\"mailto:%s\">%s</a>><br/>", |
9758 | 312 _(past_translators[i].language), |
313 past_translators[i].abbr, | |
314 _(past_translators[i].name), | |
315 past_translators[i].email, | |
316 past_translators[i].email); | |
317 } else { | |
318 g_string_append_printf(str, " <b>%s (%s)</b> - %s<br/>", | |
319 _(past_translators[i].language), | |
320 past_translators[i].abbr, | |
321 _(past_translators[i].name)); | |
322 } | |
323 } | |
324 g_string_append(str, "<BR/>"); | |
325 | |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
326 g_string_append_printf(str, "<FONT SIZE=\"4\">%s</FONT><br/>", _("Debugging Information")); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
327 |
10411 | 328 /* The following primarly intented for user/developer interaction and thus |
329 ought not be translated */ | |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
330 |
10411 | 331 #ifdef CONFIG_ARGS /* win32 build doesn't use configure */ |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
332 g_string_append(str, " <b>Arguments to <i>./configure</i>:</b> " CONFIG_ARGS "<br/>"); |
10411 | 333 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
334 |
10411 | 335 #ifdef DEBUG |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
336 g_string_append(str, " <b>Print debugging messages:</b> Yes<br/>"); |
10411 | 337 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
338 g_string_append(str, " <b>Print debugging messages:</b> No<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
339 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
340 |
10411 | 341 #ifdef ENABLE_BINRELOC |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
342 g_string_append(str, " <b>Binary relocation:</b> Enabled<br/>"); |
10411 | 343 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
344 g_string_append(str, " <b>Binary relocation:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
345 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
346 |
10411 | 347 #ifdef GAIM_PLUGINS |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
348 g_string_append(str, " <b>Plugins:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
349 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
350 g_string_append(str, " <b>Plugins:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
351 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
352 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
353 #ifdef HAVE_SSL |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
354 g_string_append(str, " <b>SSL:</b> Gaim was compiled with SSL support.<br/>"); |
10411 | 355 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
356 g_string_append(str, " <b>SSL:</b> Gaim was <b><i>NOT</i></b> compiled with any SSL support!<br/>"); |
10411 | 357 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
358 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
359 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
360 g_string_append(str, "<br/> <b>Library Support</b><br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
361 |
10835 | 362 #ifdef HAVE_EVOLUTION_ADDRESSBOOK |
363 g_string_append_printf(str, " <b>Evolution Addressbook:</b> Enabled<br/>"); | |
10411 | 364 #else |
10835 | 365 g_string_append_printf(str, " <b>Evolution Addressbook:</b> Disabled<br/>"); |
10411 | 366 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
367 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
368 #ifdef USE_GTKSPELL |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
369 g_string_append(str, " <b>GtkSpell:</b> Enabled<br/>"); |
10411 | 370 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
371 g_string_append(str, " <b>GtkSpell:</b> Disabled<br/>"); |
10411 | 372 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
373 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
374 #ifdef HAVE_GNUTLS |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
375 g_string_append(str, " <b>GnuTLS:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
376 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
377 g_string_append(str, " <b>GnuTLS:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
378 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
379 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
380 #ifdef USE_AO |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
381 g_string_append(str, " <b>libao:</b> Enabled<br/>"); |
10411 | 382 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
383 g_string_append(str, " <b>libao:</b> Disabled<br/>"); |
10411 | 384 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
385 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
386 #ifdef HAVE_NSS |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
387 g_string_append(str, " <b>Network Security Services (NSS):</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
388 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
389 g_string_append(str, " <b>Network Security Services (NSS):</b> Disabled<br/>"); |
10411 | 390 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
391 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
392 #ifdef HAVE_STARTUP_NOTIFICATION |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
393 g_string_append(str, " <b>Startup Notification:</b> Enabled<br/>"); |
10411 | 394 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
395 g_string_append(str, " <b>Startup Notification:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
396 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
397 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
398 #ifdef HAVE_TCL |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
399 g_string_append(str, " <b>Tcl:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
400 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
401 g_string_append(str, " <b>Tcl:</b> Disabled<br/>"); |
10411 | 402 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
403 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
404 #ifdef HAVE_TK |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
405 g_string_append(str, " <b>Tk:</b> Enabled<br/>"); |
10411 | 406 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
407 g_string_append(str, " <b>Tk:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
408 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
409 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
410 #ifdef USE_SM |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
411 g_string_append(str, " <b>X Session Management:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
412 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
413 g_string_append(str, " <b>X Session Management:</b> Disabled<br/>"); |
10411 | 414 #endif |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
415 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
416 #ifdef USE_SCREENSAVER |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
417 g_string_append(str, " <b>XScreenSaver:</b> Enabled<br/>"); |
10411 | 418 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
419 g_string_append(str, " <b>XScreenSaver:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
420 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
421 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
422 #ifdef LIBZEPHYR_EXT |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
423 g_string_append(str, " <b>Zephyr library (libzephyr):</b> External<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
424 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
425 g_string_append(str, " <b>Zephyr library (libzephyr):</b> Not External<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
426 #endif |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
427 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
428 #ifdef ZEPHYR_USES_KERBEROS |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
429 g_string_append(str, " <b>Zephyr uses Kerberos:</b> Yes<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
430 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
431 g_string_append(str, " <b>Zephyr uses Kerberos:</b> No<br/>"); |
10411 | 432 #endif |
433 | |
434 /* End of not to be translated section */ | |
435 | |
9758 | 436 gtk_imhtml_append_text(GTK_IMHTML(text), str->str, GTK_IMHTML_NO_SCROLL); |
437 g_string_free(str, TRUE); | |
9753 | 438 |
439 gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); | |
440 gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); | |
10153 | 441 |
9753 | 442 /* Close Button */ |
443 bbox = gtk_hbutton_box_new(); | |
444 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
445 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); | |
446 | |
447 button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
448 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
449 | |
450 g_signal_connect_swapped(G_OBJECT(button), "clicked", | |
451 G_CALLBACK(destroy_about), G_OBJECT(about)); | |
452 g_signal_connect(G_OBJECT(about), "destroy", | |
453 G_CALLBACK(destroy_about), G_OBJECT(about)); | |
454 | |
455 /* this makes the sizes not work? */ | |
456 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); | |
457 gtk_widget_grab_default(button); | |
458 | |
459 /* Let's give'em something to talk about -- woah woah woah */ | |
460 gtk_widget_show_all(about); | |
461 gtk_window_present(GTK_WINDOW(about)); | |
9709 | 462 } |
463 | |
9730 | 464 static void |
465 gaim_gtkdialogs_im_cb(gpointer data, GaimRequestFields *fields) | |
9709 | 466 { |
9730 | 467 GaimAccount *account; |
468 const char *username; | |
9709 | 469 |
9730 | 470 account = gaim_request_fields_get_account(fields, "account"); |
471 username = gaim_request_fields_get_string(fields, "screenname"); | |
9709 | 472 |
9730 | 473 gaim_gtkdialogs_im_with_user(account, username); |
9709 | 474 } |
475 | |
9730 | 476 void |
477 gaim_gtkdialogs_im(void) | |
9709 | 478 { |
9730 | 479 GaimRequestFields *fields; |
480 GaimRequestFieldGroup *group; | |
481 GaimRequestField *field; | |
9709 | 482 |
9730 | 483 fields = gaim_request_fields_new(); |
9709 | 484 |
9730 | 485 group = gaim_request_field_group_new(NULL); |
486 gaim_request_fields_add_group(fields, group); | |
9709 | 487 |
10668 | 488 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
489 gaim_request_field_set_type_hint(field, "screenname"); | |
9730 | 490 gaim_request_field_set_required(field, TRUE); |
491 gaim_request_field_group_add_field(group, field); | |
9709 | 492 |
9730 | 493 field = gaim_request_field_account_new("account", _("_Account"), NULL); |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
494 gaim_request_field_set_type_hint(field, "account"); |
9730 | 495 gaim_request_field_set_visible(field, |
496 (gaim_connections_get_all() != NULL && | |
497 gaim_connections_get_all()->next != NULL)); | |
498 gaim_request_field_set_required(field, TRUE); | |
499 gaim_request_field_group_add_field(group, field); | |
500 | |
501 gaim_request_fields(gaim_get_blist(), _("New Instant Message"), | |
502 NULL, | |
10668 | 503 _("Please enter the screen name or alias of the person " |
504 "you would like to IM."), | |
9730 | 505 fields, |
506 _("OK"), G_CALLBACK(gaim_gtkdialogs_im_cb), | |
507 _("Cancel"), NULL, | |
508 NULL); | |
9709 | 509 } |
510 | |
9730 | 511 void |
512 gaim_gtkdialogs_im_with_user(GaimAccount *account, const char *username) | |
9709 | 513 { |
9730 | 514 GaimConversation *conv; |
11581 | 515 GaimGtkWindow *win; |
9709 | 516 |
9753 | 517 g_return_if_fail(account != NULL); |
518 g_return_if_fail(username != NULL); | |
519 | |
11338 | 520 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, username, account); |
9709 | 521 |
9730 | 522 if (conv == NULL) |
11338 | 523 conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, username); |
9709 | 524 |
11581 | 525 win = GAIM_GTK_CONVERSATION(conv)->win; |
9709 | 526 |
11581 | 527 gtk_window_present(GTK_WINDOW(win->window)); |
528 gaim_gtk_conv_window_switch_gtkconv(win, GAIM_GTK_CONVERSATION(conv)); | |
9709 | 529 } |
530 | |
9730 | 531 static gboolean |
532 gaim_gtkdialogs_ee(const char *ee) | |
9709 | 533 { |
534 GtkWidget *window; | |
535 GtkWidget *hbox; | |
536 GtkWidget *label; | |
10219 | 537 GtkWidget *img; |
9709 | 538 gchar *norm = gaim_strreplace(ee, "rocksmyworld", ""); |
539 | |
540 label = gtk_label_new(NULL); | |
541 if (!strcmp(norm, "zilding")) | |
542 gtk_label_set_markup(GTK_LABEL(label), | |
543 "<span weight=\"bold\" size=\"large\" foreground=\"purple\">Amazing! Simply Amazing!</span>"); | |
544 else if (!strcmp(norm, "robflynn")) | |
545 gtk_label_set_markup(GTK_LABEL(label), | |
546 "<span weight=\"bold\" size=\"large\" foreground=\"#1f6bad\">Pimpin\' Penguin Style! *Waddle Waddle*</span>"); | |
547 else if (!strcmp(norm, "flynorange")) | |
548 gtk_label_set_markup(GTK_LABEL(label), | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
549 "<span weight=\"bold\" size=\"large\" foreground=\"blue\">You should be me. I'm so cute!</span>"); |
9709 | 550 else if (!strcmp(norm, "ewarmenhoven")) |
551 gtk_label_set_markup(GTK_LABEL(label), | |
552 "<span weight=\"bold\" size=\"large\" foreground=\"orange\">Now that's what I like!</span>"); | |
553 else if (!strcmp(norm, "markster97")) | |
554 gtk_label_set_markup(GTK_LABEL(label), | |
555 "<span weight=\"bold\" size=\"large\" foreground=\"brown\">Ahh, and excellent choice!</span>"); | |
556 else if (!strcmp(norm, "seanegn")) | |
557 gtk_label_set_markup(GTK_LABEL(label), | |
558 "<span weight=\"bold\" size=\"large\" foreground=\"#009900\">Everytime you click my name, an angel gets its wings.</span>"); | |
559 else if (!strcmp(norm, "chipx86")) | |
560 gtk_label_set_markup(GTK_LABEL(label), | |
561 "<span weight=\"bold\" size=\"large\" foreground=\"red\">This sunflower seed taste like pizza.</span>"); | |
562 else if (!strcmp(norm, "markdoliner")) | |
563 gtk_label_set_markup(GTK_LABEL(label), | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
564 "<span weight=\"bold\" size=\"large\" foreground=\"#6364B1\">Hey! I was in that tumbleweed!</span>"); |
9709 | 565 else if (!strcmp(norm, "lschiere")) |
566 gtk_label_set_markup(GTK_LABEL(label), | |
567 "<span weight=\"bold\" size=\"large\" foreground=\"gray\">I'm not anything.</span>"); | |
568 g_free(norm); | |
569 | |
570 if (strlen(gtk_label_get_label(GTK_LABEL(label))) <= 0) | |
571 return FALSE; | |
572 | |
573 window = gtk_dialog_new_with_buttons(GAIM_ALERT_TITLE, NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_OK, NULL); | |
574 gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_OK); | |
575 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(gtk_widget_destroy), NULL); | |
576 | |
11243 | 577 gtk_container_set_border_width (GTK_CONTAINER(window), GAIM_HIG_BOX_SPACE); |
9709 | 578 gtk_window_set_resizable(GTK_WINDOW(window), FALSE); |
579 gtk_dialog_set_has_separator(GTK_DIALOG(window), FALSE); | |
11243 | 580 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(window)->vbox), GAIM_HIG_BORDER); |
581 gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(window)->vbox), GAIM_HIG_BOX_SPACE); | |
9709 | 582 |
11243 | 583 hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); |
9709 | 584 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(window)->vbox), hbox); |
10219 | 585 img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_COOL, gtk_icon_size_from_name(GAIM_ICON_SIZE_DIALOG_COOL)); |
9709 | 586 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); |
587 | |
588 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | |
589 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
590 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
591 | |
592 gtk_widget_show_all(window); | |
593 return TRUE; | |
594 } | |
595 | |
596 static void | |
9730 | 597 gaim_gtkdialogs_info_cb(gpointer data, GaimRequestFields *fields) |
9709 | 598 { |
599 char *username; | |
600 gboolean found = FALSE; | |
601 GaimAccount *account; | |
602 | |
603 account = gaim_request_fields_get_account(fields, "account"); | |
604 | |
605 username = g_strdup(gaim_normalize(account, | |
606 gaim_request_fields_get_string(fields, "screenname"))); | |
607 | |
608 if (username != NULL && gaim_str_has_suffix(username, "rocksmyworld")) | |
9730 | 609 found = gaim_gtkdialogs_ee(username); |
9709 | 610 |
611 if (!found && username != NULL && *username != '\0' && account != NULL) | |
612 serv_get_info(gaim_account_get_connection(account), username); | |
613 | |
614 g_free(username); | |
615 } | |
616 | |
617 void | |
9714 | 618 gaim_gtkdialogs_info(void) |
9709 | 619 { |
620 GaimRequestFields *fields; | |
621 GaimRequestFieldGroup *group; | |
622 GaimRequestField *field; | |
623 | |
624 fields = gaim_request_fields_new(); | |
625 | |
626 group = gaim_request_field_group_new(NULL); | |
627 gaim_request_fields_add_group(fields, group); | |
628 | |
10668 | 629 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
9709 | 630 gaim_request_field_set_type_hint(field, "screenname"); |
631 gaim_request_field_set_required(field, TRUE); | |
632 gaim_request_field_group_add_field(group, field); | |
633 | |
634 field = gaim_request_field_account_new("account", _("_Account"), NULL); | |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
635 gaim_request_field_set_type_hint(field, "account"); |
9709 | 636 gaim_request_field_set_visible(field, |
637 (gaim_connections_get_all() != NULL && | |
638 gaim_connections_get_all()->next != NULL)); | |
639 gaim_request_field_set_required(field, TRUE); | |
640 gaim_request_field_group_add_field(group, field); | |
641 | |
642 gaim_request_fields(gaim_get_blist(), _("Get User Info"), | |
643 NULL, | |
10668 | 644 _("Please enter the screen name or alias of the person " |
645 "whose info you would like to view."), | |
9709 | 646 fields, |
9730 | 647 _("OK"), G_CALLBACK(gaim_gtkdialogs_info_cb), |
9709 | 648 _("Cancel"), NULL, |
649 NULL); | |
650 } | |
651 | |
652 static void | |
9730 | 653 gaim_gtkdialogs_log_cb(gpointer data, GaimRequestFields *fields) |
9709 | 654 { |
655 char *username; | |
656 GaimAccount *account; | |
657 | |
658 account = gaim_request_fields_get_account(fields, "account"); | |
659 | |
660 username = g_strdup(gaim_normalize(account, | |
661 gaim_request_fields_get_string(fields, "screenname"))); | |
662 | |
9917 | 663 if(username != NULL && *username != '\0' && account != NULL ) |
664 gaim_gtk_log_show(GAIM_LOG_IM, username, account); | |
9709 | 665 |
666 g_free(username); | |
667 } | |
668 | |
9991 | 669 /* |
670 * TODO - This needs to deal with logs of all types, not just IM logs. | |
671 */ | |
9709 | 672 void |
9714 | 673 gaim_gtkdialogs_log(void) |
9709 | 674 { |
675 GaimRequestFields *fields; | |
676 GaimRequestFieldGroup *group; | |
677 GaimRequestField *field; | |
678 | |
679 fields = gaim_request_fields_new(); | |
680 | |
681 group = gaim_request_field_group_new(NULL); | |
682 gaim_request_fields_add_group(fields, group); | |
683 | |
10668 | 684 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
11025 | 685 gaim_request_field_set_type_hint(field, "screenname-all"); |
9709 | 686 gaim_request_field_set_required(field, TRUE); |
687 gaim_request_field_group_add_field(group, field); | |
688 | |
689 field = gaim_request_field_account_new("account", _("_Account"), NULL); | |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
690 gaim_request_field_set_type_hint(field, "account"); |
9709 | 691 gaim_request_field_account_set_show_all(field, TRUE); |
692 gaim_request_field_set_visible(field, | |
693 (gaim_accounts_get_all() != NULL && | |
694 gaim_accounts_get_all()->next != NULL)); | |
695 gaim_request_field_set_required(field, TRUE); | |
696 gaim_request_field_group_add_field(group, field); | |
697 | |
11025 | 698 gaim_request_fields(gaim_get_blist(), _("View User Log"), |
9709 | 699 NULL, |
10668 | 700 _("Please enter the screen name or alias of the person " |
701 "whose log you would like to view."), | |
9709 | 702 fields, |
9730 | 703 _("OK"), G_CALLBACK(gaim_gtkdialogs_log_cb), |
9709 | 704 _("Cancel"), NULL, |
705 NULL); | |
706 } | |
707 | |
9730 | 708 static void |
709 gaim_gtkdialogs_alias_contact_cb(GaimContact *contact, const char *new_alias) | |
710 { | |
711 gaim_contact_set_alias(contact, new_alias); | |
712 } | |
713 | |
714 void | |
715 gaim_gtkdialogs_alias_contact(GaimContact *contact) | |
716 { | |
9753 | 717 g_return_if_fail(contact != NULL); |
718 | |
9730 | 719 gaim_request_input(NULL, _("Alias Contact"), NULL, |
720 _("Enter an alias for this contact."), | |
721 contact->alias, FALSE, FALSE, NULL, | |
722 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_contact_cb), | |
723 _("Cancel"), NULL, contact); | |
724 } | |
725 | |
726 static void | |
727 gaim_gtkdialogs_alias_buddy_cb(GaimBuddy *buddy, const char *new_alias) | |
728 { | |
729 gaim_blist_alias_buddy(buddy, new_alias); | |
730 serv_alias_buddy(buddy); | |
731 } | |
732 | |
733 void | |
9753 | 734 gaim_gtkdialogs_alias_buddy(GaimBuddy *buddy) |
9730 | 735 { |
9753 | 736 gchar *secondary; |
737 | |
738 g_return_if_fail(buddy != NULL); | |
739 | |
740 secondary = g_strdup_printf(_("Enter an alias for %s."), buddy->name); | |
9730 | 741 |
742 gaim_request_input(NULL, _("Alias Buddy"), NULL, | |
9753 | 743 secondary, buddy->alias, FALSE, FALSE, NULL, |
9730 | 744 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_buddy_cb), |
9753 | 745 _("Cancel"), NULL, buddy); |
9730 | 746 |
747 g_free(secondary); | |
748 } | |
749 | |
750 static void | |
751 gaim_gtkdialogs_alias_chat_cb(GaimChat *chat, const char *new_alias) | |
9709 | 752 { |
753 gaim_blist_alias_chat(chat, new_alias); | |
754 } | |
755 | |
756 void | |
9730 | 757 gaim_gtkdialogs_alias_chat(GaimChat *chat) |
9709 | 758 { |
9753 | 759 g_return_if_fail(chat != NULL); |
760 | |
9709 | 761 gaim_request_input(NULL, _("Alias Chat"), NULL, |
762 _("Enter an alias for this chat."), | |
763 chat->alias, FALSE, FALSE, NULL, | |
9730 | 764 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_chat_cb), |
9709 | 765 _("Cancel"), NULL, chat); |
766 } | |
767 | |
768 static void | |
9753 | 769 gaim_gtkdialogs_remove_contact_cb(GaimContact *contact) |
9709 | 770 { |
9730 | 771 GaimBlistNode *bnode, *cnode; |
772 GaimGroup *group; | |
773 | |
774 cnode = (GaimBlistNode *)contact; | |
775 group = (GaimGroup*)cnode->parent; | |
776 for (bnode = cnode->child; bnode; bnode = bnode->next) { | |
777 GaimBuddy *buddy = (GaimBuddy*)bnode; | |
778 if (gaim_account_is_connected(buddy->account)) | |
11643 | 779 gaim_account_remove_buddy(buddy->account, buddy, group); |
9730 | 780 } |
781 gaim_blist_remove_contact(contact); | |
782 } | |
783 | |
784 void | |
785 gaim_gtkdialogs_remove_contact(GaimContact *contact) | |
786 { | |
787 GaimBuddy *buddy = gaim_contact_get_priority_buddy(contact); | |
788 | |
9753 | 789 g_return_if_fail(contact != NULL); |
790 g_return_if_fail(buddy != NULL); | |
9730 | 791 |
792 if (((GaimBlistNode*)contact)->child == (GaimBlistNode*)buddy && | |
793 !((GaimBlistNode*)buddy)->next) { | |
794 gaim_gtkdialogs_remove_buddy(buddy); | |
795 } else { | |
10324 | 796 gchar *text; |
797 text = g_strdup_printf( | |
798 ngettext( | |
799 "You are about to remove the contact containing %s " | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
800 "and %d other buddy from your buddy list. Do you " |
10324 | 801 "want to continue?", |
802 "You are about to remove the contact containing %s " | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
803 "and %d other buddies from your buddy list. Do you " |
10324 | 804 "want to continue?", contact->totalsize - 1), |
805 buddy->name, contact->totalsize - 1); | |
9730 | 806 |
10222 | 807 gaim_request_action(contact, NULL, _("Remove Contact"), text, 0, contact, 2, |
9753 | 808 _("Remove Contact"), G_CALLBACK(gaim_gtkdialogs_remove_contact_cb), |
9730 | 809 _("Cancel"), NULL); |
810 | |
811 g_free(text); | |
812 } | |
9709 | 813 } |
814 | |
815 void | |
9753 | 816 gaim_gtkdialogs_remove_group_cb(GaimGroup *group) |
9709 | 817 { |
9730 | 818 GaimBlistNode *cnode, *bnode; |
819 | |
820 cnode = ((GaimBlistNode*)group)->child; | |
821 | |
822 while (cnode) { | |
823 if (GAIM_BLIST_NODE_IS_CONTACT(cnode)) { | |
824 bnode = cnode->child; | |
825 cnode = cnode->next; | |
826 while (bnode) { | |
827 GaimBuddy *buddy; | |
828 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { | |
829 GaimConversation *conv; | |
830 buddy = (GaimBuddy*)bnode; | |
831 bnode = bnode->next; | |
11338 | 832 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, |
10246 | 833 buddy->name, |
834 buddy->account); | |
9730 | 835 if (gaim_account_is_connected(buddy->account)) { |
11643 | 836 gaim_account_remove_buddy(buddy->account, buddy, group); |
9730 | 837 gaim_blist_remove_buddy(buddy); |
838 if (conv) | |
839 gaim_conversation_update(conv, | |
840 GAIM_CONV_UPDATE_REMOVE); | |
841 } | |
842 } else { | |
843 bnode = bnode->next; | |
844 } | |
845 } | |
846 } else if (GAIM_BLIST_NODE_IS_CHAT(cnode)) { | |
847 GaimChat *chat = (GaimChat *)cnode; | |
848 cnode = cnode->next; | |
849 if (gaim_account_is_connected(chat->account)) | |
850 gaim_blist_remove_chat(chat); | |
851 } else { | |
852 cnode = cnode->next; | |
853 } | |
854 } | |
855 | |
856 gaim_blist_remove_group(group); | |
857 } | |
858 | |
859 void | |
860 gaim_gtkdialogs_remove_group(GaimGroup *group) | |
861 { | |
9753 | 862 gchar *text; |
863 | |
864 g_return_if_fail(group != NULL); | |
865 | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
866 text = g_strdup_printf(_("You are about to remove the group %s and all its members from your buddy list. Do you want to continue?"), |
9753 | 867 group->name); |
9730 | 868 |
10222 | 869 gaim_request_action(group, NULL, _("Remove Group"), text, 0, group, 2, |
9753 | 870 _("Remove Group"), G_CALLBACK(gaim_gtkdialogs_remove_group_cb), |
9730 | 871 _("Cancel"), NULL); |
872 | |
873 g_free(text); | |
9709 | 874 } |
875 | |
10246 | 876 /* XXX - Some of this should be moved into the core, methinks. */ |
9709 | 877 static void |
9753 | 878 gaim_gtkdialogs_remove_buddy_cb(GaimBuddy *buddy) |
9709 | 879 { |
9730 | 880 GaimGroup *group; |
881 GaimConversation *conv; | |
882 gchar *name; | |
883 GaimAccount *account; | |
884 | |
885 group = gaim_find_buddys_group(buddy); | |
886 name = g_strdup(buddy->name); /* b->name is a crasher after remove_buddy */ | |
887 account = buddy->account; | |
888 | |
9753 | 889 gaim_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name); |
11643 | 890 /* TODO - Should remove from blist first... then call gaim_account_remove_buddy()? */ |
891 gaim_account_remove_buddy(buddy->account, buddy, group); | |
9730 | 892 gaim_blist_remove_buddy(buddy); |
893 | |
11338 | 894 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, account); |
9730 | 895 if (conv != NULL) |
896 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); | |
897 | |
898 g_free(name); | |
9709 | 899 } |
900 | |
901 void | |
9730 | 902 gaim_gtkdialogs_remove_buddy(GaimBuddy *buddy) |
9709 | 903 { |
9753 | 904 gchar *text; |
9730 | 905 |
9753 | 906 g_return_if_fail(buddy != NULL); |
9730 | 907 |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
908 text = g_strdup_printf(_("You are about to remove %s from your buddy list. Do you want to continue?"), |
9753 | 909 buddy->name); |
9730 | 910 |
10222 | 911 gaim_request_action(buddy, NULL, _("Remove Buddy"), text, 0, buddy, 2, |
9753 | 912 _("Remove Buddy"), G_CALLBACK(gaim_gtkdialogs_remove_buddy_cb), |
9730 | 913 _("Cancel"), NULL); |
914 | |
915 g_free(text); | |
916 } | |
9709 | 917 |
9730 | 918 static void |
9753 | 919 gaim_gtkdialogs_remove_chat_cb(GaimChat *chat) |
9730 | 920 { |
9918 | 921 char *name = NULL; |
10167 | 922 GaimAccount *account; |
9918 | 923 GaimConversation *conv = NULL; |
924 | |
10167 | 925 account = chat->account; |
926 | |
927 if (GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name != NULL) | |
928 name = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name(chat->components); | |
9918 | 929 |
9730 | 930 gaim_blist_remove_chat(chat); |
9918 | 931 |
932 if (name != NULL) { | |
11338 | 933 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, name, account); |
9918 | 934 g_free(name); |
935 } | |
936 | |
937 if (conv != NULL) | |
938 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); | |
9730 | 939 } |
9709 | 940 |
9730 | 941 void |
942 gaim_gtkdialogs_remove_chat(GaimChat *chat) | |
943 { | |
10877
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
944 const gchar *name; |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
945 gchar *text; |
9753 | 946 |
947 g_return_if_fail(chat != NULL); | |
9730 | 948 |
10877
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
949 name = gaim_chat_get_name(chat); |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
950 text = g_strdup_printf(_("You are about to remove the chat %s from your buddy list. Do you want to continue?"), |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
951 name ? name : ""); |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
952 |
10222 | 953 gaim_request_action(chat, NULL, _("Remove Chat"), text, 0, chat, 2, |
9753 | 954 _("Remove Chat"), G_CALLBACK(gaim_gtkdialogs_remove_chat_cb), |
9730 | 955 _("Cancel"), NULL); |
956 | |
957 g_free(text); | |
9709 | 958 } |