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