Mercurial > pidgin
annotate src/gtkdialogs.c @ 11166:268d5c498b64
[gaim-migrate @ 13267]
Tried adding the button and the method to start the score editor.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Muise <christian.muise@gmail.com> |
---|---|
date | Fri, 29 Jul 2005 03:26:59 +0000 |
parents | e25575a59f01 |
children | a511b77a368b |
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 |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
391 #ifdef HAVE_NSS |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
392 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
|
393 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
394 g_string_append(str, " <b>Network Security Services (NSS):</b> Disabled<br/>"); |
10411 | 395 #endif |
10813
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_STARTUP_NOTIFICATION |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
398 g_string_append(str, " <b>Startup Notification:</b> Enabled<br/>"); |
10411 | 399 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
400 g_string_append(str, " <b>Startup Notification:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
401 #endif |
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_TCL |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
404 g_string_append(str, " <b>Tcl:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
405 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
406 g_string_append(str, " <b>Tcl:</b> Disabled<br/>"); |
10411 | 407 #endif |
10813
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_TK |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
410 g_string_append(str, " <b>Tk:</b> Enabled<br/>"); |
10411 | 411 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
412 g_string_append(str, " <b>Tk:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
413 #endif |
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 USE_SM |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
416 g_string_append(str, " <b>X Session Management:</b> Enabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
417 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
418 g_string_append(str, " <b>X Session Management:</b> Disabled<br/>"); |
10411 | 419 #endif |
10813
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_SCREENSAVER |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
422 g_string_append(str, " <b>XScreenSaver:</b> Enabled<br/>"); |
10411 | 423 #else |
10813
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
424 g_string_append(str, " <b>XScreenSaver:</b> Disabled<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
425 #endif |
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 LIBZEPHYR_EXT |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
428 g_string_append(str, " <b>Zephyr library (libzephyr):</b> External<br/>"); |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
429 #else |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
430 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
|
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 ZEPHYR_USES_KERBEROS |
290131d5f626
[gaim-migrate @ 12466]
Luke Schierer <lschiere@pidgin.im>
parents:
10812
diff
changeset
|
434 g_string_append(str, " <b>Zephyr uses Kerberos:</b> Yes<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 uses Kerberos:</b> No<br/>"); |
10411 | 437 #endif |
438 | |
439 /* End of not to be translated section */ | |
440 | |
9758 | 441 gtk_imhtml_append_text(GTK_IMHTML(text), str->str, GTK_IMHTML_NO_SCROLL); |
442 g_string_free(str, TRUE); | |
9753 | 443 |
444 gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); | |
445 gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); | |
10153 | 446 |
9753 | 447 /* Close Button */ |
448 bbox = gtk_hbutton_box_new(); | |
449 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
450 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); | |
451 | |
452 button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
453 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
454 | |
455 g_signal_connect_swapped(G_OBJECT(button), "clicked", | |
456 G_CALLBACK(destroy_about), G_OBJECT(about)); | |
457 g_signal_connect(G_OBJECT(about), "destroy", | |
458 G_CALLBACK(destroy_about), G_OBJECT(about)); | |
459 | |
460 /* this makes the sizes not work? */ | |
461 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); | |
462 gtk_widget_grab_default(button); | |
463 | |
464 /* Let's give'em something to talk about -- woah woah woah */ | |
465 gtk_widget_show_all(about); | |
466 gtk_window_present(GTK_WINDOW(about)); | |
9709 | 467 } |
468 | |
9730 | 469 static void |
470 gaim_gtkdialogs_im_cb(gpointer data, GaimRequestFields *fields) | |
9709 | 471 { |
9730 | 472 GaimAccount *account; |
473 const char *username; | |
9709 | 474 |
9730 | 475 account = gaim_request_fields_get_account(fields, "account"); |
476 username = gaim_request_fields_get_string(fields, "screenname"); | |
9709 | 477 |
9730 | 478 gaim_gtkdialogs_im_with_user(account, username); |
9709 | 479 } |
480 | |
9730 | 481 void |
482 gaim_gtkdialogs_im(void) | |
9709 | 483 { |
9730 | 484 GaimRequestFields *fields; |
485 GaimRequestFieldGroup *group; | |
486 GaimRequestField *field; | |
9709 | 487 |
9730 | 488 fields = gaim_request_fields_new(); |
9709 | 489 |
9730 | 490 group = gaim_request_field_group_new(NULL); |
491 gaim_request_fields_add_group(fields, group); | |
9709 | 492 |
10668 | 493 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
494 gaim_request_field_set_type_hint(field, "screenname"); | |
9730 | 495 gaim_request_field_set_required(field, TRUE); |
496 gaim_request_field_group_add_field(group, field); | |
9709 | 497 |
9730 | 498 field = gaim_request_field_account_new("account", _("_Account"), NULL); |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
499 gaim_request_field_set_type_hint(field, "account"); |
9730 | 500 gaim_request_field_set_visible(field, |
501 (gaim_connections_get_all() != NULL && | |
502 gaim_connections_get_all()->next != NULL)); | |
503 gaim_request_field_set_required(field, TRUE); | |
504 gaim_request_field_group_add_field(group, field); | |
505 | |
506 gaim_request_fields(gaim_get_blist(), _("New Instant Message"), | |
507 NULL, | |
10668 | 508 _("Please enter the screen name or alias of the person " |
509 "you would like to IM."), | |
9730 | 510 fields, |
511 _("OK"), G_CALLBACK(gaim_gtkdialogs_im_cb), | |
512 _("Cancel"), NULL, | |
513 NULL); | |
9709 | 514 } |
515 | |
9730 | 516 void |
517 gaim_gtkdialogs_im_with_user(GaimAccount *account, const char *username) | |
9709 | 518 { |
9730 | 519 GaimConversation *conv; |
520 GaimConvWindow *win; | |
521 GaimGtkWindow *gtkwin; | |
9709 | 522 |
9753 | 523 g_return_if_fail(account != NULL); |
524 g_return_if_fail(username != NULL); | |
525 | |
10246 | 526 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, username, account); |
9709 | 527 |
9730 | 528 if (conv == NULL) |
529 conv = gaim_conversation_new(GAIM_CONV_IM, account, username); | |
9709 | 530 |
9730 | 531 win = gaim_conversation_get_window(conv); |
532 gtkwin = GAIM_GTK_WINDOW(win); | |
9709 | 533 |
9730 | 534 gtk_window_present(GTK_WINDOW(gtkwin->window)); |
10827 | 535 gaim_conv_window_switch_conversation(win, conv); |
9709 | 536 } |
537 | |
9730 | 538 static gboolean |
539 gaim_gtkdialogs_ee(const char *ee) | |
9709 | 540 { |
541 GtkWidget *window; | |
542 GtkWidget *hbox; | |
543 GtkWidget *label; | |
10219 | 544 GtkWidget *img; |
9709 | 545 gchar *norm = gaim_strreplace(ee, "rocksmyworld", ""); |
546 | |
547 label = gtk_label_new(NULL); | |
548 if (!strcmp(norm, "zilding")) | |
549 gtk_label_set_markup(GTK_LABEL(label), | |
550 "<span weight=\"bold\" size=\"large\" foreground=\"purple\">Amazing! Simply Amazing!</span>"); | |
551 else if (!strcmp(norm, "robflynn")) | |
552 gtk_label_set_markup(GTK_LABEL(label), | |
553 "<span weight=\"bold\" size=\"large\" foreground=\"#1f6bad\">Pimpin\' Penguin Style! *Waddle Waddle*</span>"); | |
554 else if (!strcmp(norm, "flynorange")) | |
555 gtk_label_set_markup(GTK_LABEL(label), | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
556 "<span weight=\"bold\" size=\"large\" foreground=\"blue\">You should be me. I'm so cute!</span>"); |
9709 | 557 else if (!strcmp(norm, "ewarmenhoven")) |
558 gtk_label_set_markup(GTK_LABEL(label), | |
559 "<span weight=\"bold\" size=\"large\" foreground=\"orange\">Now that's what I like!</span>"); | |
560 else if (!strcmp(norm, "markster97")) | |
561 gtk_label_set_markup(GTK_LABEL(label), | |
562 "<span weight=\"bold\" size=\"large\" foreground=\"brown\">Ahh, and excellent choice!</span>"); | |
563 else if (!strcmp(norm, "seanegn")) | |
564 gtk_label_set_markup(GTK_LABEL(label), | |
565 "<span weight=\"bold\" size=\"large\" foreground=\"#009900\">Everytime you click my name, an angel gets its wings.</span>"); | |
566 else if (!strcmp(norm, "chipx86")) | |
567 gtk_label_set_markup(GTK_LABEL(label), | |
568 "<span weight=\"bold\" size=\"large\" foreground=\"red\">This sunflower seed taste like pizza.</span>"); | |
569 else if (!strcmp(norm, "markdoliner")) | |
570 gtk_label_set_markup(GTK_LABEL(label), | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
571 "<span weight=\"bold\" size=\"large\" foreground=\"#6364B1\">Hey! I was in that tumbleweed!</span>"); |
9709 | 572 else if (!strcmp(norm, "lschiere")) |
573 gtk_label_set_markup(GTK_LABEL(label), | |
574 "<span weight=\"bold\" size=\"large\" foreground=\"gray\">I'm not anything.</span>"); | |
575 g_free(norm); | |
576 | |
577 if (strlen(gtk_label_get_label(GTK_LABEL(label))) <= 0) | |
578 return FALSE; | |
579 | |
580 window = gtk_dialog_new_with_buttons(GAIM_ALERT_TITLE, NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_OK, NULL); | |
581 gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_OK); | |
582 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(gtk_widget_destroy), NULL); | |
583 | |
584 gtk_container_set_border_width (GTK_CONTAINER(window), 6); | |
585 gtk_window_set_resizable(GTK_WINDOW(window), FALSE); | |
586 gtk_dialog_set_has_separator(GTK_DIALOG(window), FALSE); | |
587 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(window)->vbox), 12); | |
588 gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(window)->vbox), 6); | |
589 | |
590 hbox = gtk_hbox_new(FALSE, 12); | |
591 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(window)->vbox), hbox); | |
10219 | 592 img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_COOL, gtk_icon_size_from_name(GAIM_ICON_SIZE_DIALOG_COOL)); |
9709 | 593 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); |
594 | |
595 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | |
596 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
597 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
598 | |
599 gtk_widget_show_all(window); | |
600 return TRUE; | |
601 } | |
602 | |
603 static void | |
9730 | 604 gaim_gtkdialogs_info_cb(gpointer data, GaimRequestFields *fields) |
9709 | 605 { |
606 char *username; | |
607 gboolean found = FALSE; | |
608 GaimAccount *account; | |
609 | |
610 account = gaim_request_fields_get_account(fields, "account"); | |
611 | |
612 username = g_strdup(gaim_normalize(account, | |
613 gaim_request_fields_get_string(fields, "screenname"))); | |
614 | |
615 if (username != NULL && gaim_str_has_suffix(username, "rocksmyworld")) | |
9730 | 616 found = gaim_gtkdialogs_ee(username); |
9709 | 617 |
618 if (!found && username != NULL && *username != '\0' && account != NULL) | |
619 serv_get_info(gaim_account_get_connection(account), username); | |
620 | |
621 g_free(username); | |
622 } | |
623 | |
624 void | |
9714 | 625 gaim_gtkdialogs_info(void) |
9709 | 626 { |
627 GaimRequestFields *fields; | |
628 GaimRequestFieldGroup *group; | |
629 GaimRequestField *field; | |
630 | |
631 fields = gaim_request_fields_new(); | |
632 | |
633 group = gaim_request_field_group_new(NULL); | |
634 gaim_request_fields_add_group(fields, group); | |
635 | |
10668 | 636 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
9709 | 637 gaim_request_field_set_type_hint(field, "screenname"); |
638 gaim_request_field_set_required(field, TRUE); | |
639 gaim_request_field_group_add_field(group, field); | |
640 | |
641 field = gaim_request_field_account_new("account", _("_Account"), NULL); | |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
642 gaim_request_field_set_type_hint(field, "account"); |
9709 | 643 gaim_request_field_set_visible(field, |
644 (gaim_connections_get_all() != NULL && | |
645 gaim_connections_get_all()->next != NULL)); | |
646 gaim_request_field_set_required(field, TRUE); | |
647 gaim_request_field_group_add_field(group, field); | |
648 | |
649 gaim_request_fields(gaim_get_blist(), _("Get User Info"), | |
650 NULL, | |
10668 | 651 _("Please enter the screen name or alias of the person " |
652 "whose info you would like to view."), | |
9709 | 653 fields, |
9730 | 654 _("OK"), G_CALLBACK(gaim_gtkdialogs_info_cb), |
9709 | 655 _("Cancel"), NULL, |
656 NULL); | |
657 } | |
658 | |
659 static void | |
9730 | 660 gaim_gtkdialogs_log_cb(gpointer data, GaimRequestFields *fields) |
9709 | 661 { |
662 char *username; | |
663 GaimAccount *account; | |
664 | |
665 account = gaim_request_fields_get_account(fields, "account"); | |
666 | |
667 username = g_strdup(gaim_normalize(account, | |
668 gaim_request_fields_get_string(fields, "screenname"))); | |
669 | |
9917 | 670 if(username != NULL && *username != '\0' && account != NULL ) |
671 gaim_gtk_log_show(GAIM_LOG_IM, username, account); | |
9709 | 672 |
673 g_free(username); | |
674 } | |
675 | |
9991 | 676 /* |
677 * TODO - This needs to deal with logs of all types, not just IM logs. | |
678 */ | |
9709 | 679 void |
9714 | 680 gaim_gtkdialogs_log(void) |
9709 | 681 { |
682 GaimRequestFields *fields; | |
683 GaimRequestFieldGroup *group; | |
684 GaimRequestField *field; | |
685 | |
686 fields = gaim_request_fields_new(); | |
687 | |
688 group = gaim_request_field_group_new(NULL); | |
689 gaim_request_fields_add_group(fields, group); | |
690 | |
10668 | 691 field = gaim_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
11025 | 692 gaim_request_field_set_type_hint(field, "screenname-all"); |
9709 | 693 gaim_request_field_set_required(field, TRUE); |
694 gaim_request_field_group_add_field(group, field); | |
695 | |
696 field = gaim_request_field_account_new("account", _("_Account"), NULL); | |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10774
diff
changeset
|
697 gaim_request_field_set_type_hint(field, "account"); |
9709 | 698 gaim_request_field_account_set_show_all(field, TRUE); |
699 gaim_request_field_set_visible(field, | |
700 (gaim_accounts_get_all() != NULL && | |
701 gaim_accounts_get_all()->next != NULL)); | |
702 gaim_request_field_set_required(field, TRUE); | |
703 gaim_request_field_group_add_field(group, field); | |
704 | |
11025 | 705 gaim_request_fields(gaim_get_blist(), _("View User Log"), |
9709 | 706 NULL, |
10668 | 707 _("Please enter the screen name or alias of the person " |
708 "whose log you would like to view."), | |
9709 | 709 fields, |
9730 | 710 _("OK"), G_CALLBACK(gaim_gtkdialogs_log_cb), |
9709 | 711 _("Cancel"), NULL, |
712 NULL); | |
713 } | |
714 | |
9730 | 715 static void |
716 gaim_gtkdialogs_warn_cb(GtkWidget *widget, gint resp, struct warning *w) | |
9709 | 717 { |
9730 | 718 if (resp == GTK_RESPONSE_OK) |
9753 | 719 serv_warn(w->gc, w->who, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w->anon))); |
9709 | 720 |
9753 | 721 dialogwindows = g_list_remove(dialogwindows, w->window); |
722 gtk_widget_destroy(w->window); | |
723 | |
9730 | 724 g_free(w->who); |
725 g_free(w); | |
9709 | 726 } |
727 | |
9753 | 728 /* |
9991 | 729 * TODO - Make this use the request API, if possible. |
9753 | 730 */ |
9730 | 731 void |
732 gaim_gtkdialogs_warn(GaimConnection *gc, const char *who) | |
9709 | 733 { |
9753 | 734 gchar *labeltext; |
9730 | 735 GtkWidget *hbox, *vbox; |
9709 | 736 GtkWidget *label; |
9753 | 737 GtkWidget *img; |
738 struct warning *w; | |
9730 | 739 |
9753 | 740 g_return_if_fail(gc != NULL); |
741 g_return_if_fail(who != NULL); | |
742 | |
743 w = g_new0(struct warning, 1); | |
9730 | 744 w->who = g_strdup(who); |
745 w->gc = gc; | |
746 | |
9753 | 747 w->window = gtk_dialog_new_with_buttons(_("Warn User"), NULL, 0, |
9730 | 748 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, |
749 GAIM_STOCK_WARN, GTK_RESPONSE_OK, NULL); | |
750 gtk_dialog_set_default_response (GTK_DIALOG(w->window), GTK_RESPONSE_OK); | |
751 g_signal_connect(G_OBJECT(w->window), "response", G_CALLBACK(gaim_gtkdialogs_warn_cb), w); | |
752 | |
753 gtk_container_set_border_width (GTK_CONTAINER(w->window), 6); | |
754 gtk_window_set_resizable(GTK_WINDOW(w->window), FALSE); | |
755 gtk_dialog_set_has_separator(GTK_DIALOG(w->window), FALSE); | |
756 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(w->window)->vbox), 12); | |
757 gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(w->window)->vbox), 6); | |
9709 | 758 |
759 hbox = gtk_hbox_new(FALSE, 12); | |
9730 | 760 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(w->window)->vbox), hbox); |
9753 | 761 |
762 img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); | |
763 gtk_misc_set_alignment(GTK_MISC(img), 0, 0); | |
9730 | 764 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); |
9709 | 765 |
9730 | 766 vbox = gtk_vbox_new(FALSE, 0); |
767 gtk_container_add(GTK_CONTAINER(hbox), vbox); | |
768 labeltext = g_strdup_printf(_("<span weight=\"bold\" size=\"larger\">Warn %s?</span>\n\n" | |
769 "This will increase %s's warning level and he or she will be subject to harsher rate limiting.\n"), who, who); | |
770 label = gtk_label_new(NULL); | |
771 gtk_label_set_markup(GTK_LABEL(label), labeltext); | |
772 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | |
773 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
774 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | |
775 g_free(labeltext); | |
9709 | 776 |
9730 | 777 w->anon = gtk_check_button_new_with_mnemonic(_("Warn _anonymously?")); |
778 gtk_box_pack_start(GTK_BOX(vbox), w->anon, FALSE, FALSE, 0); | |
779 | |
780 hbox = gtk_hbox_new(FALSE, 6); | |
781 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
782 img = gtk_image_new_from_stock(GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_MENU); | |
783 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); | |
784 labeltext = _("<b>Anonymous warnings are less severe.</b>"); | |
785 label = gtk_label_new(NULL); | |
786 gtk_label_set_markup(GTK_LABEL(label), labeltext); | |
787 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | |
9709 | 788 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
789 | |
9730 | 790 dialogwindows = g_list_prepend(dialogwindows, w->window); |
791 gtk_widget_show_all(w->window); | |
9709 | 792 } |
793 | |
794 static void | |
9730 | 795 gaim_gtkdialogs_alias_contact_cb(GaimContact *contact, const char *new_alias) |
796 { | |
797 gaim_contact_set_alias(contact, new_alias); | |
798 } | |
799 | |
800 void | |
801 gaim_gtkdialogs_alias_contact(GaimContact *contact) | |
802 { | |
9753 | 803 g_return_if_fail(contact != NULL); |
804 | |
9730 | 805 gaim_request_input(NULL, _("Alias Contact"), NULL, |
806 _("Enter an alias for this contact."), | |
807 contact->alias, FALSE, FALSE, NULL, | |
808 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_contact_cb), | |
809 _("Cancel"), NULL, contact); | |
810 } | |
811 | |
812 static void | |
813 gaim_gtkdialogs_alias_buddy_cb(GaimBuddy *buddy, const char *new_alias) | |
814 { | |
815 gaim_blist_alias_buddy(buddy, new_alias); | |
816 serv_alias_buddy(buddy); | |
817 } | |
818 | |
819 void | |
9753 | 820 gaim_gtkdialogs_alias_buddy(GaimBuddy *buddy) |
9730 | 821 { |
9753 | 822 gchar *secondary; |
823 | |
824 g_return_if_fail(buddy != NULL); | |
825 | |
826 secondary = g_strdup_printf(_("Enter an alias for %s."), buddy->name); | |
9730 | 827 |
828 gaim_request_input(NULL, _("Alias Buddy"), NULL, | |
9753 | 829 secondary, buddy->alias, FALSE, FALSE, NULL, |
9730 | 830 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_buddy_cb), |
9753 | 831 _("Cancel"), NULL, buddy); |
9730 | 832 |
833 g_free(secondary); | |
834 } | |
835 | |
836 static void | |
837 gaim_gtkdialogs_alias_chat_cb(GaimChat *chat, const char *new_alias) | |
9709 | 838 { |
839 gaim_blist_alias_chat(chat, new_alias); | |
840 } | |
841 | |
842 void | |
9730 | 843 gaim_gtkdialogs_alias_chat(GaimChat *chat) |
9709 | 844 { |
9753 | 845 g_return_if_fail(chat != NULL); |
846 | |
9709 | 847 gaim_request_input(NULL, _("Alias Chat"), NULL, |
848 _("Enter an alias for this chat."), | |
849 chat->alias, FALSE, FALSE, NULL, | |
9730 | 850 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_chat_cb), |
9709 | 851 _("Cancel"), NULL, chat); |
852 } | |
853 | |
854 static void | |
9753 | 855 gaim_gtkdialogs_remove_contact_cb(GaimContact *contact) |
9709 | 856 { |
9730 | 857 GaimBlistNode *bnode, *cnode; |
858 GaimGroup *group; | |
859 | |
860 cnode = (GaimBlistNode *)contact; | |
861 group = (GaimGroup*)cnode->parent; | |
862 for (bnode = cnode->child; bnode; bnode = bnode->next) { | |
863 GaimBuddy *buddy = (GaimBuddy*)bnode; | |
864 if (gaim_account_is_connected(buddy->account)) | |
865 serv_remove_buddy(buddy->account->gc, buddy, group); | |
866 } | |
867 gaim_blist_remove_contact(contact); | |
868 } | |
869 | |
870 void | |
871 gaim_gtkdialogs_remove_contact(GaimContact *contact) | |
872 { | |
873 GaimBuddy *buddy = gaim_contact_get_priority_buddy(contact); | |
874 | |
9753 | 875 g_return_if_fail(contact != NULL); |
876 g_return_if_fail(buddy != NULL); | |
9730 | 877 |
878 if (((GaimBlistNode*)contact)->child == (GaimBlistNode*)buddy && | |
879 !((GaimBlistNode*)buddy)->next) { | |
880 gaim_gtkdialogs_remove_buddy(buddy); | |
881 } else { | |
10324 | 882 gchar *text; |
883 text = g_strdup_printf( | |
884 ngettext( | |
885 "You are about to remove the contact containing %s " | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
886 "and %d other buddy from your buddy list. Do you " |
10324 | 887 "want to continue?", |
888 "You are about to remove the contact containing %s " | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
889 "and %d other buddies from your buddy list. Do you " |
10324 | 890 "want to continue?", contact->totalsize - 1), |
891 buddy->name, contact->totalsize - 1); | |
9730 | 892 |
10222 | 893 gaim_request_action(contact, NULL, _("Remove Contact"), text, 0, contact, 2, |
9753 | 894 _("Remove Contact"), G_CALLBACK(gaim_gtkdialogs_remove_contact_cb), |
9730 | 895 _("Cancel"), NULL); |
896 | |
897 g_free(text); | |
898 } | |
9709 | 899 } |
900 | |
901 void | |
9753 | 902 gaim_gtkdialogs_remove_group_cb(GaimGroup *group) |
9709 | 903 { |
9730 | 904 GaimBlistNode *cnode, *bnode; |
905 | |
906 cnode = ((GaimBlistNode*)group)->child; | |
907 | |
908 while (cnode) { | |
909 if (GAIM_BLIST_NODE_IS_CONTACT(cnode)) { | |
910 bnode = cnode->child; | |
911 cnode = cnode->next; | |
912 while (bnode) { | |
913 GaimBuddy *buddy; | |
914 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { | |
915 GaimConversation *conv; | |
916 buddy = (GaimBuddy*)bnode; | |
917 bnode = bnode->next; | |
10246 | 918 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, |
919 buddy->name, | |
920 buddy->account); | |
9730 | 921 if (gaim_account_is_connected(buddy->account)) { |
922 serv_remove_buddy(buddy->account->gc, buddy, group); | |
923 gaim_blist_remove_buddy(buddy); | |
924 if (conv) | |
925 gaim_conversation_update(conv, | |
926 GAIM_CONV_UPDATE_REMOVE); | |
927 } | |
928 } else { | |
929 bnode = bnode->next; | |
930 } | |
931 } | |
932 } else if (GAIM_BLIST_NODE_IS_CHAT(cnode)) { | |
933 GaimChat *chat = (GaimChat *)cnode; | |
934 cnode = cnode->next; | |
935 if (gaim_account_is_connected(chat->account)) | |
936 gaim_blist_remove_chat(chat); | |
937 } else { | |
938 cnode = cnode->next; | |
939 } | |
940 } | |
941 | |
942 gaim_blist_remove_group(group); | |
943 } | |
944 | |
945 void | |
946 gaim_gtkdialogs_remove_group(GaimGroup *group) | |
947 { | |
9753 | 948 gchar *text; |
949 | |
950 g_return_if_fail(group != NULL); | |
951 | |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
952 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 | 953 group->name); |
9730 | 954 |
10222 | 955 gaim_request_action(group, NULL, _("Remove Group"), text, 0, group, 2, |
9753 | 956 _("Remove Group"), G_CALLBACK(gaim_gtkdialogs_remove_group_cb), |
9730 | 957 _("Cancel"), NULL); |
958 | |
959 g_free(text); | |
9709 | 960 } |
961 | |
10246 | 962 /* XXX - Some of this should be moved into the core, methinks. */ |
9709 | 963 static void |
9753 | 964 gaim_gtkdialogs_remove_buddy_cb(GaimBuddy *buddy) |
9709 | 965 { |
9730 | 966 GaimGroup *group; |
967 GaimConversation *conv; | |
968 gchar *name; | |
969 GaimAccount *account; | |
970 | |
971 group = gaim_find_buddys_group(buddy); | |
972 name = g_strdup(buddy->name); /* b->name is a crasher after remove_buddy */ | |
973 account = buddy->account; | |
974 | |
9753 | 975 gaim_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name); |
9991 | 976 /* TODO - Should remove from blist first... then call serv_remove_buddy()? */ |
9730 | 977 serv_remove_buddy(buddy->account->gc, buddy, group); |
978 gaim_blist_remove_buddy(buddy); | |
979 | |
10246 | 980 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, name, account); |
9730 | 981 if (conv != NULL) |
982 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); | |
983 | |
984 g_free(name); | |
9709 | 985 } |
986 | |
987 void | |
9730 | 988 gaim_gtkdialogs_remove_buddy(GaimBuddy *buddy) |
9709 | 989 { |
9753 | 990 gchar *text; |
9730 | 991 |
9753 | 992 g_return_if_fail(buddy != NULL); |
9730 | 993 |
10816
c94f40ffcafb
[gaim-migrate @ 12471]
Luke Schierer <lschiere@pidgin.im>
parents:
10813
diff
changeset
|
994 text = g_strdup_printf(_("You are about to remove %s from your buddy list. Do you want to continue?"), |
9753 | 995 buddy->name); |
9730 | 996 |
10222 | 997 gaim_request_action(buddy, NULL, _("Remove Buddy"), text, 0, buddy, 2, |
9753 | 998 _("Remove Buddy"), G_CALLBACK(gaim_gtkdialogs_remove_buddy_cb), |
9730 | 999 _("Cancel"), NULL); |
1000 | |
1001 g_free(text); | |
1002 } | |
9709 | 1003 |
9730 | 1004 static void |
9753 | 1005 gaim_gtkdialogs_remove_chat_cb(GaimChat *chat) |
9730 | 1006 { |
9918 | 1007 char *name = NULL; |
10167 | 1008 GaimAccount *account; |
9918 | 1009 GaimConversation *conv = NULL; |
1010 | |
10167 | 1011 account = chat->account; |
1012 | |
1013 if (GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name != NULL) | |
1014 name = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name(chat->components); | |
9918 | 1015 |
9730 | 1016 gaim_blist_remove_chat(chat); |
9918 | 1017 |
1018 if (name != NULL) { | |
10246 | 1019 conv = gaim_find_conversation_with_account(GAIM_CONV_CHAT, name, account); |
9918 | 1020 g_free(name); |
1021 } | |
1022 | |
1023 if (conv != NULL) | |
1024 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); | |
9730 | 1025 } |
9709 | 1026 |
9730 | 1027 void |
1028 gaim_gtkdialogs_remove_chat(GaimChat *chat) | |
1029 { | |
10877
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
1030 const gchar *name; |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
1031 gchar *text; |
9753 | 1032 |
1033 g_return_if_fail(chat != NULL); | |
9730 | 1034 |
10877
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
1035 name = gaim_chat_get_name(chat); |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
1036 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
|
1037 name ? name : ""); |
99c1fb67b7bb
[gaim-migrate @ 12569]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10874
diff
changeset
|
1038 |
10222 | 1039 gaim_request_action(chat, NULL, _("Remove Chat"), text, 0, chat, 2, |
9753 | 1040 _("Remove Chat"), G_CALLBACK(gaim_gtkdialogs_remove_chat_cb), |
9730 | 1041 _("Cancel"), NULL); |
1042 | |
1043 g_free(text); | |
9709 | 1044 } |