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