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