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