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