9709
|
1 /*
|
|
2 * gaim
|
|
3 *
|
|
4 * Gaim is the legal property of its developers, whose names are too numerous
|
|
5 * to list here. Please refer to the COPYRIGHT file distributed with this
|
|
6 * source distribution.
|
|
7 *
|
|
8 * This program is free software; you can redistribute it and/or modify
|
|
9 * it under the terms of the GNU General Public License as published by
|
|
10 * the Free Software Foundation; either version 2 of the License, or
|
|
11 * (at your option) any later version.
|
|
12 *
|
|
13 * This program is distributed in the hope that it will be useful,
|
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 * GNU General Public License for more details.
|
|
17 *
|
|
18 * You should have received a copy of the GNU General Public License
|
|
19 * along with this program; if not, write to the Free Software
|
|
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
21 */
|
|
22 #include "gtkinternal.h"
|
|
23
|
|
24 #include "debug.h"
|
|
25 #include "notify.h"
|
|
26 #include "prpl.h"
|
|
27 #include "request.h"
|
|
28 #include "util.h"
|
|
29
|
|
30 #include "gtkdialogs.h"
|
|
31 #include "gtkimhtml.h"
|
|
32 #include "gtkimhtmltoolbar.h"
|
|
33 #include "gtklog.h"
|
|
34 #include "gtkutils.h"
|
|
35 #include "stock.h"
|
|
36
|
9753
|
37 static GList *dialogwindows = NULL;
|
9709
|
38
|
9753
|
39 static GtkWidget *about = NULL;
|
9709
|
40
|
|
41 struct warning {
|
|
42 GtkWidget *window;
|
|
43 GtkWidget *anon;
|
|
44 char *who;
|
|
45 GaimConnection *gc;
|
|
46 };
|
|
47
|
9758
|
48 struct developer {
|
|
49 char *name;
|
|
50 char *role;
|
|
51 char *email;
|
|
52 };
|
|
53
|
|
54 struct translator {
|
|
55 char *language;
|
|
56 char *abbr;
|
|
57 char *name;
|
|
58 char *email;
|
|
59 };
|
|
60
|
|
61 static struct developer developers[] = {
|
|
62 {"Rob Flynn", N_("maintainer"), "gaim@robflynn.com"},
|
|
63 {"Sean Egan", N_("lead developer"), "sean.egan@binghamton.edu"},
|
|
64 {"Christian 'ChipX86' Hammond", N_("developer & webmaster"), NULL},
|
|
65 {"Herman Bloggs", N_("win32 port"), "hermanator12002@yahoo.com"},
|
|
66 {"Nathan 'faceprint' Walp", N_("developer"), NULL},
|
|
67 {"Mark 'KingAnt' Doliner", N_("developer"), NULL},
|
|
68 {"Ethan 'Paco-Paco' Blanton", N_("developer"), NULL},
|
|
69 {"Tim 'marv' Ringenbach", N_("developer"), NULL},
|
|
70 {"Luke 'LSchiere' Schierer", N_("support"), NULL},
|
|
71 {NULL, NULL, NULL}
|
|
72 };
|
|
73
|
|
74 static struct developer retired_developers[] = {
|
|
75 {"Adam Fritzler", N_("former libfaim maintainer"), NULL},
|
|
76 {"Eric Warmenhoven", N_("former lead developer"), "warmenhoven@yahoo.com"},
|
|
77 {"Jim Duchek", N_("former maintainer"), NULL},
|
|
78 {"Jim Seymour", N_("former Jabber developer"), NULL},
|
|
79 {"Mark Spencer", N_("original author"), "markster@marko.net"},
|
|
80 {"Syd Logan", N_("hacker and designated driver [lazy bum]"), NULL},
|
|
81 {NULL, NULL, NULL}
|
|
82 };
|
|
83
|
|
84 static struct translator current_translators[] = {
|
|
85 {N_("Bulgarian"), "bg", "Alexander Shopov", "al_shopov@users.sf.net"},
|
|
86 {N_("Catalan"), "ca", "Robert Millan", "zeratul2@wanadoo.es"},
|
|
87 {N_("Czech"), "cs", "Miloslav Trmac", "mitr@volny.cz"},
|
|
88 {N_("Danish"), "da", "Morten Brix Pedersen", "morten@wtf.dk"},
|
|
89 {N_("British English"), "en_GB", "Luke Ross", "lukeross@sys3175.co.uk"},
|
|
90 {N_("Canadian English"), "en_CA", "Adam Weinberger", "adamw@gnome.org"},
|
|
91 {N_("German"), "de", "Björn Voigt", "bjoern@cs.tu-berlin.de"},
|
|
92 {N_("Spanish"), "es", "Javier Fernández-Sanguino Peña", "jfs@debian.org"},
|
|
93 {N_("Finnish"), "fi", "Arto Alakulju", "arto@alakulju.net"},
|
|
94 {N_("French"), "fr", "Éric Boumaour", "zongo_fr@users.sourceforge.net"},
|
|
95 {N_("Hebrew"), "he", "Pavel Bibergal", "cyberkm203@hotmail.com"},
|
|
96 {N_("Hindi"), "hi", "Ravishankar Shrivastava", "raviratlami@yahoo.com"},
|
|
97 {N_("Hungarian"), "hu", "Zoltan Sutto", "suttozoltan@chello.hu"},
|
|
98 {N_("Italian"), "it", "Claudio Satriano", "satriano@na.infn.it"},
|
|
99 {N_("Japanese"), "ja", "Takashi Aihana", "aihana@gnome.gr.jp"},
|
|
100 {N_("Lithuanian"), "lt", "Gediminas Čičinskas", "gediminas@parok.lt"},
|
|
101 {N_("Korean"), "ko", "Kyung-uk Son", "vvs740@chol.com"},
|
|
102 {N_("Dutch; Flemish"), "nl", "Vincent van Adrighem", "V.vanAdrighem@dirck.mine.nu"},
|
|
103 {N_("Macedonian"), "mk", "Tomislav Markovski", "herrera@users.sf.net"},
|
|
104 {N_("Norwegian"), "no", "Petter Johan Olsen", "petter.olsen@cc.uit.no"},
|
|
105 {N_("Polish"), "pl", "Krzysztof Foltman, Emil Nowak", "krzysztof@foltman.com;emil5@go2.pl"},
|
|
106 {N_("Portuguese"), "pt", "Duarte Henriques", "duarte_henriques@myrealbox.com"},
|
|
107 {N_("Portuguese-Brazil"), "pt_BR", "Maurício de Lemos Rodrigues Collares Neto", "mauricioc@gmail.com"},
|
|
108 {N_("Romanian"), "ro", "Mişu Moldovan", "dumol@go.ro"},
|
|
109 {N_("Russian"), "ru", "Dmitry Beloglazov", "dmaa@users.sf.net"},
|
|
110 {N_("Serbian"), "sr", "Danilo Šegan, Aleksandar Urosevic", "dsegan@gmx.net;urke@users.sourceforge.net"},
|
|
111 {N_("Slovenian"), "sl", "Matjaz Horvat", "matjaz@owca.info"},
|
|
112 {N_("Swedish"), "sv", "Tore Lundqvist", "tlt@mima.x.se"},
|
|
113 {N_("Vietnamese"), "vi", N_("T.M.Thanh and the Gnome-Vi Team"), "gnomevi-list@lists.sf.net"},
|
|
114 {N_("Simplified Chinese"), "zh_CN", "Funda Wang", "fundawang@linux.net.cn"},
|
|
115 {N_("Traditional Chinese"), "zh_TW", "Ambrose C. Li, Paladin R. Liu", "acli@ada.dhs.org;paladin@ms1.hinet.net"},
|
|
116 {NULL, NULL, NULL, NULL}
|
|
117 };
|
|
118
|
|
119
|
|
120 static struct translator past_translators[] = {
|
|
121 {N_("Amharic"), "am", "Daniel Yacob", NULL},
|
|
122 {N_("Bulgarian"), "bg", "Hristo Todorov", NULL},
|
|
123 {N_("Catalan"), "ca", "JM Pérez Cáncer", NULL},
|
|
124 {N_("Czech"), "cs", "Honza Král", NULL},
|
|
125 {N_("German"), "de", "Daniel Seifert, Karsten Weiss", NULL},
|
|
126 {N_("Spanish"), "es", "Amaya Rodrigo, Alejandro G Villar, Nicolás Lichtmaier, JM Pérez Cáncer", NULL},
|
|
127 {N_("Finnish"), "fi", "Tero Kuusela", NULL},
|
|
128 {N_("French"), "fr", "Sébastien François, Stéphane Pontier, Stéphane Wirtel, Loïc Jeannin", NULL},
|
|
129 {N_("Italian"), "it", "Salvatore di Maggio", NULL},
|
|
130 {N_("Japanese"), "ja", "Ryosuke Kutsuna, Taku Yasui, Junichi Uekawa", NULL},
|
|
131 {N_("Korean"), "ko", "Sang-hyun S, A Ho-seok Lee", NULL},
|
|
132 {N_("Polish"), "pl", "Przemysław Sułek", NULL},
|
|
133 {N_("Russian"), "ru", "Sergey Volozhanin", NULL},
|
|
134 {N_("Russian"), "ru", "Alexandre Prokoudine", NULL},
|
|
135 {N_("Slovak"), "sk", "Daniel Režný", NULL},
|
|
136 {N_("Swedish"), "sv", "Christian Rose", NULL},
|
|
137 {N_("Chinese"), "zh_CN, zh_TW", "Hashao, Rocky S. Lee", NULL},
|
|
138 {NULL, NULL, NULL, NULL}
|
|
139 };
|
|
140
|
9730
|
141 void
|
|
142 gaim_gtkdialogs_destroy_all()
|
9709
|
143 {
|
9753
|
144 while (dialogwindows) {
|
|
145 gtk_widget_destroy(dialogwindows->data);
|
|
146 dialogwindows = g_list_remove(dialogwindows, dialogwindows->data);
|
|
147 }
|
|
148 }
|
|
149
|
|
150 static void destroy_about()
|
|
151 {
|
|
152 if (about != NULL)
|
|
153 gtk_widget_destroy(about);
|
|
154 about = NULL;
|
|
155 }
|
|
156
|
|
157 void gaim_gtkdialogs_about(GtkWidget *w, void *data)
|
|
158 {
|
|
159 GtkWidget *hbox;
|
|
160 GtkWidget *vbox;
|
|
161 GtkWidget *logo;
|
|
162 GtkWidget *label;
|
|
163 GtkWidget *sw;
|
|
164 GtkWidget *text;
|
|
165 GtkWidget *bbox;
|
|
166 GtkWidget *button;
|
|
167 GtkTextIter iter;
|
9758
|
168 GString *str;
|
|
169 gchar *labeltext;
|
|
170 int i;
|
9753
|
171
|
|
172 if (about != NULL) {
|
|
173 gtk_window_present(GTK_WINDOW(about));
|
|
174 return;
|
|
175 }
|
|
176
|
|
177 GAIM_DIALOG(about);
|
|
178 gtk_window_set_default_size(GTK_WINDOW(about), 450, -1);
|
|
179 gtk_window_set_title(GTK_WINDOW(about), _("About Gaim"));
|
|
180 gtk_window_set_role(GTK_WINDOW(about), "about");
|
|
181 gtk_window_set_resizable(GTK_WINDOW(about), TRUE);
|
9758
|
182 gtk_window_set_default_size(GTK_WINDOW(about), 400, 550);
|
9753
|
183
|
|
184 hbox = gtk_hbox_new(FALSE, 12);
|
|
185 gtk_container_set_border_width(GTK_CONTAINER(hbox), 12);
|
|
186 gtk_container_add(GTK_CONTAINER(about), hbox);
|
|
187
|
|
188 vbox = gtk_vbox_new(FALSE, 12);
|
|
189 gtk_container_add(GTK_CONTAINER(hbox), vbox);
|
|
190
|
|
191 logo = gtk_image_new_from_stock(GAIM_STOCK_LOGO, gtk_icon_size_from_name(GAIM_ICON_SIZE_LOGO));
|
|
192 gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0);
|
|
193
|
|
194 labeltext = g_strdup_printf(_("<span weight=\"bold\" size=\"larger\">Gaim v%s</span>"), VERSION);
|
|
195 label = gtk_label_new(NULL);
|
|
196 gtk_label_set_markup(GTK_LABEL(label), labeltext);
|
|
197 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
|
|
198 gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0);
|
|
199 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
|
|
200 g_free(labeltext);
|
|
201
|
|
202 sw = gtk_scrolled_window_new(NULL, NULL);
|
|
203 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
|
|
204 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
|
205 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
|
9758
|
206 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0);
|
9753
|
207
|
|
208 text = gtk_imhtml_new(NULL, NULL);
|
|
209 gtk_container_add(GTK_CONTAINER(sw), text);
|
|
210 gaim_setup_imhtml(text);
|
|
211
|
9758
|
212 str = g_string_sized_new(4096);
|
9753
|
213
|
9758
|
214 g_string_append(str,
|
|
215 _("Gaim is a modular messaging client capable of using "
|
|
216 "AIM, MSN, Yahoo!, Jabber, ICQ, IRC, SILC, "
|
|
217 "Novell GroupWise, Napster, Zephyr, and Gadu-Gadu "
|
|
218 "all at once. It is written using "
|
|
219 "Gtk+ and is licensed under the GPL.<BR><BR>"));
|
9753
|
220
|
9758
|
221 g_string_append(str, "<FONT SIZE=\"4\">URL:</FONT> <A HREF=\""
|
|
222 GAIM_WEBSITE "\">" GAIM_WEBSITE "</A><BR/><BR/>");
|
|
223
|
|
224 g_string_append_printf(str, _("<FONT SIZE=\"4\">IRC:</FONT> "
|
|
225 "#gaim on irc.freenode.net<BR><BR>"));
|
9753
|
226
|
|
227 /* Active Developers */
|
9758
|
228 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
|
|
229 _("Active Developers"));
|
|
230 for (i = 0; developers[i].name != NULL; i++) {
|
|
231 if (developers[i].email != NULL) {
|
|
232 g_string_append_printf(str, " %s (%s) <<a href=\"mailto: %s\">%s</a>><br/>",
|
|
233 developers[i].name, _(developers[i].role),
|
|
234 developers[i].email, developers[i].email);
|
|
235 } else {
|
|
236 g_string_append_printf(str, " %s (%s)<br/>",
|
|
237 developers[i].name, _(developers[i].role));
|
|
238 }
|
|
239 }
|
|
240 g_string_append(str, "<BR/>");
|
9709
|
241
|
9753
|
242 /* Crazy Patch Writers */
|
9758
|
243 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
|
|
244 _("Crazy Patch Writers"));
|
|
245 g_string_append(str,
|
|
246 " Daniel 'datallah' Atallah<BR>"
|
|
247 " Ka-Hing 'javabsp' Cheung<BR>"
|
|
248 " Decklin Foster<BR>"
|
|
249 " Gary 'grim' Kramlich<BR>"
|
|
250 " Robert 'Robot101' McQueen<BR>"
|
|
251 " Benjamin Miller<BR>"
|
|
252 " Etan 'deryni' Reisner<BR>"
|
|
253 " Kevin 'SimGuy' Stange<BR>"
|
|
254 " Stu 'nosnilmot' Tomlinson<BR>"
|
|
255 "<BR>");
|
9753
|
256
|
|
257 /* Retired Developers */
|
9758
|
258 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
|
|
259 _("Retired Developers"));
|
|
260 for (i = 0; retired_developers[i].name != NULL; i++) {
|
|
261 if (retired_developers[i].email != NULL) {
|
|
262 g_string_append_printf(str, " %s (%s) <<A HREF=\"mailto: %s\">%s</a>><br/>",
|
|
263 retired_developers[i].name, _(retired_developers[i].role),
|
|
264 retired_developers[i].email, retired_developers[i].email);
|
|
265 } else {
|
|
266 g_string_append_printf(str, " %s (%s)<br/>",
|
|
267 retired_developers[i].name, _(retired_developers[i].role));
|
|
268 }
|
|
269 }
|
|
270 g_string_append(str, "<BR/>");
|
9753
|
271
|
|
272 /* Current Translators */
|
9758
|
273 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
|
|
274 _("Current Translators"));
|
|
275 for (i = 0; current_translators[i].language != NULL; i++) {
|
|
276 if (current_translators[i].email != NULL) {
|
|
277 g_string_append_printf(str, " <b>%s (%s)</b> - %s <<a href=\"mailto: %s\">%s</a>><br/>",
|
|
278 _(current_translators[i].language),
|
|
279 current_translators[i].abbr,
|
|
280 _(current_translators[i].name),
|
|
281 current_translators[i].email,
|
|
282 current_translators[i].email);
|
|
283 } else {
|
|
284 g_string_append_printf(str, " <b>%s (%s)</b> - %s<br/>",
|
|
285 _(current_translators[i].language),
|
|
286 current_translators[i].abbr,
|
|
287 _(current_translators[i].name));
|
|
288 }
|
|
289 }
|
|
290 g_string_append(str, "<BR/>");
|
9753
|
291
|
|
292 /* Past Translators */
|
9758
|
293 g_string_append_printf(str, "<FONT SIZE=\"4\">%s:</FONT><BR/>",
|
|
294 _("Past Translators"));
|
|
295 for (i = 0; past_translators[i].language != NULL; i++) {
|
|
296 if (past_translators[i].email != NULL) {
|
|
297 g_string_append_printf(str, " <b>%s (%s)</b> - %s <<a href=\"mailto: %s\">%s</a>><br/>",
|
|
298 _(past_translators[i].language),
|
|
299 past_translators[i].abbr,
|
|
300 _(past_translators[i].name),
|
|
301 past_translators[i].email,
|
|
302 past_translators[i].email);
|
|
303 } else {
|
|
304 g_string_append_printf(str, " <b>%s (%s)</b> - %s<br/>",
|
|
305 _(past_translators[i].language),
|
|
306 past_translators[i].abbr,
|
|
307 _(past_translators[i].name));
|
|
308 }
|
|
309 }
|
|
310 g_string_append(str, "<BR/>");
|
|
311
|
|
312 gtk_imhtml_append_text(GTK_IMHTML(text), str->str, GTK_IMHTML_NO_SCROLL);
|
|
313 g_string_free(str, TRUE);
|
9753
|
314
|
|
315 gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0);
|
|
316 gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter);
|
|
317 gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter);
|
|
318
|
|
319 /* Close Button */
|
|
320 bbox = gtk_hbutton_box_new();
|
|
321 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
|
|
322 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
|
|
323
|
|
324 button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
|
|
325 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
|
|
326
|
|
327 g_signal_connect_swapped(G_OBJECT(button), "clicked",
|
|
328 G_CALLBACK(destroy_about), G_OBJECT(about));
|
|
329 g_signal_connect(G_OBJECT(about), "destroy",
|
|
330 G_CALLBACK(destroy_about), G_OBJECT(about));
|
|
331
|
|
332 /* this makes the sizes not work? */
|
|
333 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
|
|
334 gtk_widget_grab_default(button);
|
|
335
|
|
336 /* Let's give'em something to talk about -- woah woah woah */
|
|
337 gtk_widget_show_all(about);
|
|
338 gtk_window_present(GTK_WINDOW(about));
|
9709
|
339 }
|
|
340
|
9730
|
341 static void
|
|
342 gaim_gtkdialogs_im_cb(gpointer data, GaimRequestFields *fields)
|
9709
|
343 {
|
9730
|
344 GaimAccount *account;
|
|
345 const char *username;
|
9709
|
346
|
9730
|
347 account = gaim_request_fields_get_account(fields, "account");
|
|
348 username = gaim_request_fields_get_string(fields, "screenname");
|
9709
|
349
|
9730
|
350 gaim_gtkdialogs_im_with_user(account, username);
|
9709
|
351 }
|
|
352
|
9730
|
353 void
|
|
354 gaim_gtkdialogs_im(void)
|
9709
|
355 {
|
9730
|
356 GaimRequestFields *fields;
|
|
357 GaimRequestFieldGroup *group;
|
|
358 GaimRequestField *field;
|
9709
|
359
|
9730
|
360 fields = gaim_request_fields_new();
|
9709
|
361
|
9730
|
362 group = gaim_request_field_group_new(NULL);
|
|
363 gaim_request_fields_add_group(fields, group);
|
9709
|
364
|
9730
|
365 field = gaim_request_field_string_new("screenname", _("_Screen name"),
|
|
366 NULL, FALSE);
|
|
367 gaim_request_field_set_required(field, TRUE);
|
|
368 gaim_request_field_set_type_hint(field, "screenname");
|
|
369 gaim_request_field_group_add_field(group, field);
|
9709
|
370
|
9730
|
371 field = gaim_request_field_account_new("account", _("_Account"), NULL);
|
|
372 gaim_request_field_set_visible(field,
|
|
373 (gaim_connections_get_all() != NULL &&
|
|
374 gaim_connections_get_all()->next != NULL));
|
|
375 gaim_request_field_set_required(field, TRUE);
|
|
376 gaim_request_field_group_add_field(group, field);
|
|
377
|
|
378 gaim_request_fields(gaim_get_blist(), _("New Instant Message"),
|
|
379 NULL,
|
|
380 _("Please enter the screen name of the person you "
|
|
381 "would like to IM."),
|
|
382 fields,
|
|
383 _("OK"), G_CALLBACK(gaim_gtkdialogs_im_cb),
|
|
384 _("Cancel"), NULL,
|
|
385 NULL);
|
9709
|
386 }
|
|
387
|
9730
|
388 void
|
|
389 gaim_gtkdialogs_im_with_user(GaimAccount *account, const char *username)
|
9709
|
390 {
|
9730
|
391 GaimConversation *conv;
|
|
392 GaimConvWindow *win;
|
|
393 GaimGtkWindow *gtkwin;
|
9709
|
394
|
9753
|
395 g_return_if_fail(account != NULL);
|
|
396 g_return_if_fail(username != NULL);
|
|
397
|
9730
|
398 conv = gaim_find_conversation_with_account(username, account);
|
9709
|
399
|
9730
|
400 if (conv == NULL)
|
|
401 conv = gaim_conversation_new(GAIM_CONV_IM, account, username);
|
9709
|
402
|
9730
|
403 win = gaim_conversation_get_window(conv);
|
|
404 gtkwin = GAIM_GTK_WINDOW(win);
|
9709
|
405
|
9730
|
406 gtk_window_present(GTK_WINDOW(gtkwin->window));
|
|
407 gaim_conv_window_switch_conversation(win, gaim_conversation_get_index(conv));
|
9709
|
408 }
|
|
409
|
9730
|
410 static gboolean
|
|
411 gaim_gtkdialogs_ee(const char *ee)
|
9709
|
412 {
|
|
413 GtkWidget *window;
|
|
414 GtkWidget *hbox;
|
|
415 GtkWidget *label;
|
|
416 GtkWidget *img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_COOL, GTK_ICON_SIZE_DIALOG);
|
|
417 gchar *norm = gaim_strreplace(ee, "rocksmyworld", "");
|
|
418
|
|
419 label = gtk_label_new(NULL);
|
|
420 if (!strcmp(norm, "zilding"))
|
|
421 gtk_label_set_markup(GTK_LABEL(label),
|
|
422 "<span weight=\"bold\" size=\"large\" foreground=\"purple\">Amazing! Simply Amazing!</span>");
|
|
423 else if (!strcmp(norm, "robflynn"))
|
|
424 gtk_label_set_markup(GTK_LABEL(label),
|
|
425 "<span weight=\"bold\" size=\"large\" foreground=\"#1f6bad\">Pimpin\' Penguin Style! *Waddle Waddle*</span>");
|
|
426 else if (!strcmp(norm, "flynorange"))
|
|
427 gtk_label_set_markup(GTK_LABEL(label),
|
|
428 "<span weight=\"bold\" size=\"large\" foreground=\"blue\">You should be me. I'm so cute!</span>");
|
|
429 else if (!strcmp(norm, "ewarmenhoven"))
|
|
430 gtk_label_set_markup(GTK_LABEL(label),
|
|
431 "<span weight=\"bold\" size=\"large\" foreground=\"orange\">Now that's what I like!</span>");
|
|
432 else if (!strcmp(norm, "markster97"))
|
|
433 gtk_label_set_markup(GTK_LABEL(label),
|
|
434 "<span weight=\"bold\" size=\"large\" foreground=\"brown\">Ahh, and excellent choice!</span>");
|
|
435 else if (!strcmp(norm, "seanegn"))
|
|
436 gtk_label_set_markup(GTK_LABEL(label),
|
|
437 "<span weight=\"bold\" size=\"large\" foreground=\"#009900\">Everytime you click my name, an angel gets its wings.</span>");
|
|
438 else if (!strcmp(norm, "chipx86"))
|
|
439 gtk_label_set_markup(GTK_LABEL(label),
|
|
440 "<span weight=\"bold\" size=\"large\" foreground=\"red\">This sunflower seed taste like pizza.</span>");
|
|
441 else if (!strcmp(norm, "markdoliner"))
|
|
442 gtk_label_set_markup(GTK_LABEL(label),
|
|
443 "<span weight=\"bold\" size=\"large\" foreground=\"#6364B1\">Hey! I was in that tumbleweed!</span>");
|
|
444 else if (!strcmp(norm, "lschiere"))
|
|
445 gtk_label_set_markup(GTK_LABEL(label),
|
|
446 "<span weight=\"bold\" size=\"large\" foreground=\"gray\">I'm not anything.</span>");
|
|
447 g_free(norm);
|
|
448
|
|
449 if (strlen(gtk_label_get_label(GTK_LABEL(label))) <= 0)
|
|
450 return FALSE;
|
|
451
|
|
452 window = gtk_dialog_new_with_buttons(GAIM_ALERT_TITLE, NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_OK, NULL);
|
|
453 gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_OK);
|
|
454 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(gtk_widget_destroy), NULL);
|
|
455
|
|
456 gtk_container_set_border_width (GTK_CONTAINER(window), 6);
|
|
457 gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
|
|
458 gtk_dialog_set_has_separator(GTK_DIALOG(window), FALSE);
|
|
459 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(window)->vbox), 12);
|
|
460 gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(window)->vbox), 6);
|
|
461
|
|
462 hbox = gtk_hbox_new(FALSE, 12);
|
|
463 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(window)->vbox), hbox);
|
|
464 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
|
|
465
|
|
466 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
|
|
467 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
|
468 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
|
469
|
|
470 gtk_widget_show_all(window);
|
|
471 return TRUE;
|
|
472 }
|
|
473
|
|
474 static void
|
9730
|
475 gaim_gtkdialogs_info_cb(gpointer data, GaimRequestFields *fields)
|
9709
|
476 {
|
|
477 char *username;
|
|
478 gboolean found = FALSE;
|
|
479 GaimAccount *account;
|
|
480
|
|
481 account = gaim_request_fields_get_account(fields, "account");
|
|
482
|
|
483 username = g_strdup(gaim_normalize(account,
|
|
484 gaim_request_fields_get_string(fields, "screenname")));
|
|
485
|
|
486 if (username != NULL && gaim_str_has_suffix(username, "rocksmyworld"))
|
9730
|
487 found = gaim_gtkdialogs_ee(username);
|
9709
|
488
|
|
489 if (!found && username != NULL && *username != '\0' && account != NULL)
|
|
490 serv_get_info(gaim_account_get_connection(account), username);
|
|
491
|
|
492 g_free(username);
|
|
493 }
|
|
494
|
|
495 void
|
9714
|
496 gaim_gtkdialogs_info(void)
|
9709
|
497 {
|
|
498 GaimRequestFields *fields;
|
|
499 GaimRequestFieldGroup *group;
|
|
500 GaimRequestField *field;
|
|
501
|
|
502 fields = gaim_request_fields_new();
|
|
503
|
|
504 group = gaim_request_field_group_new(NULL);
|
|
505 gaim_request_fields_add_group(fields, group);
|
|
506
|
|
507 field = gaim_request_field_string_new("screenname", _("_Screen name"),
|
|
508 NULL, FALSE);
|
|
509 gaim_request_field_set_type_hint(field, "screenname");
|
|
510 gaim_request_field_set_required(field, TRUE);
|
|
511 gaim_request_field_group_add_field(group, field);
|
|
512
|
|
513 field = gaim_request_field_account_new("account", _("_Account"), NULL);
|
|
514 gaim_request_field_set_visible(field,
|
|
515 (gaim_connections_get_all() != NULL &&
|
|
516 gaim_connections_get_all()->next != NULL));
|
|
517 gaim_request_field_set_required(field, TRUE);
|
|
518 gaim_request_field_group_add_field(group, field);
|
|
519
|
|
520 gaim_request_fields(gaim_get_blist(), _("Get User Info"),
|
|
521 NULL,
|
|
522 _("Please enter the screen name of the person whose "
|
|
523 "info you would like to view."),
|
|
524 fields,
|
9730
|
525 _("OK"), G_CALLBACK(gaim_gtkdialogs_info_cb),
|
9709
|
526 _("Cancel"), NULL,
|
|
527 NULL);
|
|
528 }
|
|
529
|
|
530 static void
|
9730
|
531 gaim_gtkdialogs_log_cb(gpointer data, GaimRequestFields *fields)
|
9709
|
532 {
|
|
533 char *username;
|
|
534 GaimAccount *account;
|
|
535
|
|
536 account = gaim_request_fields_get_account(fields, "account");
|
|
537
|
|
538 username = g_strdup(gaim_normalize(account,
|
|
539 gaim_request_fields_get_string(fields, "screenname")));
|
|
540
|
|
541 if( username != NULL && *username != '\0' && account != NULL )
|
|
542 gaim_gtk_log_show( username, account );
|
|
543
|
|
544 g_free(username);
|
|
545 }
|
|
546
|
|
547 void
|
9714
|
548 gaim_gtkdialogs_log(void)
|
9709
|
549 {
|
|
550 GaimRequestFields *fields;
|
|
551 GaimRequestFieldGroup *group;
|
|
552 GaimRequestField *field;
|
|
553
|
|
554 fields = gaim_request_fields_new();
|
|
555
|
|
556 group = gaim_request_field_group_new(NULL);
|
|
557 gaim_request_fields_add_group(fields, group);
|
|
558
|
|
559 field = gaim_request_field_string_new("screenname", _("_Screen name"),
|
|
560 NULL, FALSE);
|
|
561 gaim_request_field_set_type_hint(field, "screenname");
|
|
562 gaim_request_field_set_required(field, TRUE);
|
|
563 gaim_request_field_group_add_field(group, field);
|
|
564
|
|
565 field = gaim_request_field_account_new("account", _("_Account"), NULL);
|
|
566 gaim_request_field_account_set_show_all(field, TRUE);
|
|
567 gaim_request_field_set_visible(field,
|
|
568 (gaim_accounts_get_all() != NULL &&
|
|
569 gaim_accounts_get_all()->next != NULL));
|
|
570 gaim_request_field_set_required(field, TRUE);
|
|
571 gaim_request_field_group_add_field(group, field);
|
|
572
|
|
573 gaim_request_fields(gaim_get_blist(), _("Get User Log"),
|
|
574 NULL,
|
|
575 _("Please enter the screen name of the person whose "
|
|
576 "log you would like to view."),
|
|
577 fields,
|
9730
|
578 _("OK"), G_CALLBACK(gaim_gtkdialogs_log_cb),
|
9709
|
579 _("Cancel"), NULL,
|
|
580 NULL);
|
|
581 }
|
|
582
|
9730
|
583 static void
|
|
584 gaim_gtkdialogs_warn_cb(GtkWidget *widget, gint resp, struct warning *w)
|
9709
|
585 {
|
9730
|
586 if (resp == GTK_RESPONSE_OK)
|
9753
|
587 serv_warn(w->gc, w->who, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w->anon)));
|
9709
|
588
|
9753
|
589 dialogwindows = g_list_remove(dialogwindows, w->window);
|
|
590 gtk_widget_destroy(w->window);
|
|
591
|
9730
|
592 g_free(w->who);
|
|
593 g_free(w);
|
9709
|
594 }
|
|
595
|
9753
|
596 /*
|
|
597 * XXX - Make this use the request API, if possible.
|
|
598 */
|
9730
|
599 void
|
|
600 gaim_gtkdialogs_warn(GaimConnection *gc, const char *who)
|
9709
|
601 {
|
9753
|
602 gchar *labeltext;
|
9730
|
603 GtkWidget *hbox, *vbox;
|
9709
|
604 GtkWidget *label;
|
9753
|
605 GtkWidget *img;
|
|
606 struct warning *w;
|
9730
|
607
|
9753
|
608 g_return_if_fail(gc != NULL);
|
|
609 g_return_if_fail(who != NULL);
|
|
610
|
|
611 w = g_new0(struct warning, 1);
|
9730
|
612 w->who = g_strdup(who);
|
|
613 w->gc = gc;
|
|
614
|
9753
|
615 w->window = gtk_dialog_new_with_buttons(_("Warn User"), NULL, 0,
|
9730
|
616 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
|
617 GAIM_STOCK_WARN, GTK_RESPONSE_OK, NULL);
|
|
618 gtk_dialog_set_default_response (GTK_DIALOG(w->window), GTK_RESPONSE_OK);
|
|
619 g_signal_connect(G_OBJECT(w->window), "response", G_CALLBACK(gaim_gtkdialogs_warn_cb), w);
|
|
620
|
|
621 gtk_container_set_border_width (GTK_CONTAINER(w->window), 6);
|
|
622 gtk_window_set_resizable(GTK_WINDOW(w->window), FALSE);
|
|
623 gtk_dialog_set_has_separator(GTK_DIALOG(w->window), FALSE);
|
|
624 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(w->window)->vbox), 12);
|
|
625 gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(w->window)->vbox), 6);
|
9709
|
626
|
|
627 hbox = gtk_hbox_new(FALSE, 12);
|
9730
|
628 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(w->window)->vbox), hbox);
|
9753
|
629
|
|
630 img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG);
|
|
631 gtk_misc_set_alignment(GTK_MISC(img), 0, 0);
|
9730
|
632 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
|
9709
|
633
|
9730
|
634 vbox = gtk_vbox_new(FALSE, 0);
|
|
635 gtk_container_add(GTK_CONTAINER(hbox), vbox);
|
|
636 labeltext = g_strdup_printf(_("<span weight=\"bold\" size=\"larger\">Warn %s?</span>\n\n"
|
|
637 "This will increase %s's warning level and he or she will be subject to harsher rate limiting.\n"), who, who);
|
|
638 label = gtk_label_new(NULL);
|
|
639 gtk_label_set_markup(GTK_LABEL(label), labeltext);
|
|
640 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
|
|
641 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
|
642 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
|
|
643 g_free(labeltext);
|
9709
|
644
|
9730
|
645 w->anon = gtk_check_button_new_with_mnemonic(_("Warn _anonymously?"));
|
|
646 gtk_box_pack_start(GTK_BOX(vbox), w->anon, FALSE, FALSE, 0);
|
|
647
|
|
648 hbox = gtk_hbox_new(FALSE, 6);
|
|
649 gtk_container_add(GTK_CONTAINER(vbox), hbox);
|
|
650 img = gtk_image_new_from_stock(GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_MENU);
|
|
651 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
|
|
652 labeltext = _("<b>Anonymous warnings are less severe.</b>");
|
|
653 label = gtk_label_new(NULL);
|
|
654 gtk_label_set_markup(GTK_LABEL(label), labeltext);
|
|
655 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
|
9709
|
656 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
|
657
|
9730
|
658 dialogwindows = g_list_prepend(dialogwindows, w->window);
|
|
659 gtk_widget_show_all(w->window);
|
9709
|
660 }
|
|
661
|
|
662 static void
|
9730
|
663 gaim_gtkdialogs_alias_contact_cb(GaimContact *contact, const char *new_alias)
|
|
664 {
|
|
665 gaim_contact_set_alias(contact, new_alias);
|
|
666 }
|
|
667
|
|
668 void
|
|
669 gaim_gtkdialogs_alias_contact(GaimContact *contact)
|
|
670 {
|
9753
|
671 g_return_if_fail(contact != NULL);
|
|
672
|
9730
|
673 gaim_request_input(NULL, _("Alias Contact"), NULL,
|
|
674 _("Enter an alias for this contact."),
|
|
675 contact->alias, FALSE, FALSE, NULL,
|
|
676 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_contact_cb),
|
|
677 _("Cancel"), NULL, contact);
|
|
678 }
|
|
679
|
|
680 static void
|
|
681 gaim_gtkdialogs_alias_buddy_cb(GaimBuddy *buddy, const char *new_alias)
|
|
682 {
|
|
683 gaim_blist_alias_buddy(buddy, new_alias);
|
|
684 serv_alias_buddy(buddy);
|
|
685 }
|
|
686
|
|
687 void
|
9753
|
688 gaim_gtkdialogs_alias_buddy(GaimBuddy *buddy)
|
9730
|
689 {
|
9753
|
690 gchar *secondary;
|
|
691
|
|
692 g_return_if_fail(buddy != NULL);
|
|
693
|
|
694 secondary = g_strdup_printf(_("Enter an alias for %s."), buddy->name);
|
9730
|
695
|
|
696 gaim_request_input(NULL, _("Alias Buddy"), NULL,
|
9753
|
697 secondary, buddy->alias, FALSE, FALSE, NULL,
|
9730
|
698 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_buddy_cb),
|
9753
|
699 _("Cancel"), NULL, buddy);
|
9730
|
700
|
|
701 g_free(secondary);
|
|
702 }
|
|
703
|
|
704 static void
|
|
705 gaim_gtkdialogs_alias_chat_cb(GaimChat *chat, const char *new_alias)
|
9709
|
706 {
|
|
707 gaim_blist_alias_chat(chat, new_alias);
|
|
708 }
|
|
709
|
|
710 void
|
9730
|
711 gaim_gtkdialogs_alias_chat(GaimChat *chat)
|
9709
|
712 {
|
9753
|
713 g_return_if_fail(chat != NULL);
|
|
714
|
9709
|
715 gaim_request_input(NULL, _("Alias Chat"), NULL,
|
|
716 _("Enter an alias for this chat."),
|
|
717 chat->alias, FALSE, FALSE, NULL,
|
9730
|
718 _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_chat_cb),
|
9709
|
719 _("Cancel"), NULL, chat);
|
|
720 }
|
|
721
|
|
722 static void
|
9753
|
723 gaim_gtkdialogs_remove_contact_cb(GaimContact *contact)
|
9709
|
724 {
|
9730
|
725 GaimBlistNode *bnode, *cnode;
|
|
726 GaimGroup *group;
|
|
727
|
|
728 cnode = (GaimBlistNode *)contact;
|
|
729 group = (GaimGroup*)cnode->parent;
|
|
730 for (bnode = cnode->child; bnode; bnode = bnode->next) {
|
|
731 GaimBuddy *buddy = (GaimBuddy*)bnode;
|
|
732 if (gaim_account_is_connected(buddy->account))
|
|
733 serv_remove_buddy(buddy->account->gc, buddy, group);
|
|
734 }
|
|
735 gaim_blist_remove_contact(contact);
|
|
736 }
|
|
737
|
|
738 void
|
|
739 gaim_gtkdialogs_remove_contact(GaimContact *contact)
|
|
740 {
|
|
741 GaimBuddy *buddy = gaim_contact_get_priority_buddy(contact);
|
|
742
|
9753
|
743 g_return_if_fail(contact != NULL);
|
|
744 g_return_if_fail(buddy != NULL);
|
9730
|
745
|
|
746 if (((GaimBlistNode*)contact)->child == (GaimBlistNode*)buddy &&
|
|
747 !((GaimBlistNode*)buddy)->next) {
|
|
748 gaim_gtkdialogs_remove_buddy(buddy);
|
|
749 } else {
|
9753
|
750 gchar *text = g_strdup_printf(_("You are about to remove the contact containing %s and %d other buddies from your buddy list. Do you want to continue?"),
|
9730
|
751 buddy->name, contact->totalsize - 1);
|
|
752
|
|
753 gaim_request_action(NULL, NULL, _("Remove Contact"), text, -1, contact, 2,
|
9753
|
754 _("Remove Contact"), G_CALLBACK(gaim_gtkdialogs_remove_contact_cb),
|
9730
|
755 _("Cancel"), NULL);
|
|
756
|
|
757 g_free(text);
|
|
758 }
|
9709
|
759 }
|
|
760
|
|
761 void
|
9753
|
762 gaim_gtkdialogs_remove_group_cb(GaimGroup *group)
|
9709
|
763 {
|
9730
|
764 GaimBlistNode *cnode, *bnode;
|
|
765
|
|
766 cnode = ((GaimBlistNode*)group)->child;
|
|
767
|
|
768 while (cnode) {
|
|
769 if (GAIM_BLIST_NODE_IS_CONTACT(cnode)) {
|
|
770 bnode = cnode->child;
|
|
771 cnode = cnode->next;
|
|
772 while (bnode) {
|
|
773 GaimBuddy *buddy;
|
|
774 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) {
|
|
775 GaimConversation *conv;
|
|
776 buddy = (GaimBuddy*)bnode;
|
|
777 bnode = bnode->next;
|
|
778 conv = gaim_find_conversation_with_account(buddy->name, buddy->account);
|
|
779 if (gaim_account_is_connected(buddy->account)) {
|
|
780 serv_remove_buddy(buddy->account->gc, buddy, group);
|
|
781 gaim_blist_remove_buddy(buddy);
|
|
782 if (conv)
|
|
783 gaim_conversation_update(conv,
|
|
784 GAIM_CONV_UPDATE_REMOVE);
|
|
785 }
|
|
786 } else {
|
|
787 bnode = bnode->next;
|
|
788 }
|
|
789 }
|
|
790 } else if (GAIM_BLIST_NODE_IS_CHAT(cnode)) {
|
|
791 GaimChat *chat = (GaimChat *)cnode;
|
|
792 cnode = cnode->next;
|
|
793 if (gaim_account_is_connected(chat->account))
|
|
794 gaim_blist_remove_chat(chat);
|
|
795 } else {
|
|
796 cnode = cnode->next;
|
|
797 }
|
|
798 }
|
|
799
|
|
800 gaim_blist_remove_group(group);
|
|
801 }
|
|
802
|
|
803 void
|
|
804 gaim_gtkdialogs_remove_group(GaimGroup *group)
|
|
805 {
|
9753
|
806 gchar *text;
|
|
807
|
|
808 g_return_if_fail(group != NULL);
|
|
809
|
|
810 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?"),
|
|
811 group->name);
|
9730
|
812
|
|
813 gaim_request_action(NULL, NULL, _("Remove Group"), text, -1, group, 2,
|
9753
|
814 _("Remove Group"), G_CALLBACK(gaim_gtkdialogs_remove_group_cb),
|
9730
|
815 _("Cancel"), NULL);
|
|
816
|
|
817 g_free(text);
|
9709
|
818 }
|
|
819
|
|
820 static void
|
9753
|
821 gaim_gtkdialogs_remove_buddy_cb(GaimBuddy *buddy)
|
9709
|
822 {
|
9730
|
823 GaimGroup *group;
|
|
824 GaimConversation *conv;
|
|
825 gchar *name;
|
|
826 GaimAccount *account;
|
|
827
|
|
828 group = gaim_find_buddys_group(buddy);
|
|
829 name = g_strdup(buddy->name); /* b->name is a crasher after remove_buddy */
|
|
830 account = buddy->account;
|
|
831
|
9753
|
832 gaim_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name);
|
9730
|
833 /* XXX - Should remove from blist first... then call serv_remove_buddy()? */
|
|
834 serv_remove_buddy(buddy->account->gc, buddy, group);
|
|
835 gaim_blist_remove_buddy(buddy);
|
|
836
|
|
837 conv = gaim_find_conversation_with_account(name, account);
|
|
838
|
|
839 if (conv != NULL)
|
|
840 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE);
|
|
841
|
|
842 g_free(name);
|
9709
|
843 }
|
|
844
|
|
845 void
|
9730
|
846 gaim_gtkdialogs_remove_buddy(GaimBuddy *buddy)
|
9709
|
847 {
|
9753
|
848 gchar *text;
|
9730
|
849
|
9753
|
850 g_return_if_fail(buddy != NULL);
|
9730
|
851
|
9753
|
852 text = g_strdup_printf(_("You are about to remove %s from your buddy list. Do you want to continue?"),
|
|
853 buddy->name);
|
9730
|
854
|
|
855 gaim_request_action(NULL, NULL, _("Remove Buddy"), text, -1, buddy, 2,
|
9753
|
856 _("Remove Buddy"), G_CALLBACK(gaim_gtkdialogs_remove_buddy_cb),
|
9730
|
857 _("Cancel"), NULL);
|
|
858
|
|
859 g_free(text);
|
|
860 }
|
9709
|
861
|
9730
|
862 static void
|
9753
|
863 gaim_gtkdialogs_remove_chat_cb(GaimChat *chat)
|
9730
|
864 {
|
|
865 gaim_blist_remove_chat(chat);
|
|
866 }
|
9709
|
867
|
9730
|
868 void
|
|
869 gaim_gtkdialogs_remove_chat(GaimChat *chat)
|
|
870 {
|
9753
|
871 gchar *name = gaim_chat_get_display_name(chat);
|
|
872 gchar *text = g_strdup_printf(_("You are about to remove the chat %s from your buddy list. Do you want to continue?"), name);
|
|
873
|
|
874 g_return_if_fail(chat != NULL);
|
9730
|
875
|
|
876 gaim_request_action(NULL, NULL, _("Remove Chat"), text, -1, chat, 2,
|
9753
|
877 _("Remove Chat"), G_CALLBACK(gaim_gtkdialogs_remove_chat_cb),
|
9730
|
878 _("Cancel"), NULL);
|
|
879
|
|
880 g_free(name);
|
|
881 g_free(text);
|
9709
|
882 }
|