Mercurial > pidgin
annotate src/gtkconn.c @ 6066:c99959f1bb73
[gaim-migrate @ 6516]
Re-add javabsp's F2 patch. I didn't feel like taking it out of my CVS
again, and I think he'll be able to get it working without the weird
highlight behavior.
Also fixed the ctlr+a/ctrl+pgup/ctrl+pgdown thing in gtkimhtml rather
than gtkconv.c. So now it applies to info windows and other stuff.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 09 Jul 2003 00:33:06 +0000 |
parents | 547ba881bc7e |
children | 99f4bbeb27bc |
rev | line source |
---|---|
5717 | 1 /* |
2 * gaim | |
3 * | |
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 * | |
20 */ | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5746
diff
changeset
|
21 #include "internal.h" |
5717 | 22 |
23 #include "account.h" | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5746
diff
changeset
|
24 #include "debug.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5746
diff
changeset
|
25 #include "notify.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5746
diff
changeset
|
26 #include "util.h" |
5717 | 27 |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5746
diff
changeset
|
28 #include "gtkblist.h" |
6036 | 29 #include "gtkrequest.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5746
diff
changeset
|
30 #include "gtkutils.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5746
diff
changeset
|
31 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5746
diff
changeset
|
32 #include "ui.h" |
5717 | 33 |
34 struct signon_meter { | |
35 GaimAccount *account; | |
36 GtkWidget *button; | |
37 GtkWidget *progress; | |
38 GtkWidget *status; | |
39 }; | |
40 | |
41 struct meter_window { | |
42 GtkWidget *window; | |
43 GtkWidget *table; | |
44 gint rows; | |
45 gint active_count; | |
46 GSList *meters; | |
47 } *meter_win = NULL; | |
48 | |
5991
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
49 static void kill_meter(struct signon_meter *meter, const char *text); |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
50 |
5717 | 51 static void cancel_signon(GtkWidget *button, struct signon_meter *meter) |
52 { | |
5991
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
53 if (meter->account->gc != NULL) { |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
54 meter->account->gc->wants_to_die = TRUE; |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
55 gaim_connection_destroy(meter->account->gc); |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
56 } |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
57 else { |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
58 kill_meter(meter, _("Done.")); |
5987
6e19ad2ef712
[gaim-migrate @ 6435]
Christian Hammond <chipx86@chipx86.com>
parents:
5936
diff
changeset
|
59 |
5991
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
60 if (gaim_connections_get_all() == NULL) { |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
61 destroy_all_dialogs(); |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
62 |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
63 gaim_blist_destroy(); |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
64 |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
65 show_login(); |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
66 } |
5d5bad909bc4
[gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents:
5989
diff
changeset
|
67 } |
5717 | 68 } |
69 | |
70 static void cancel_all () { | |
71 GSList *m = meter_win ? meter_win->meters : NULL; | |
72 | |
73 while (m) { | |
74 cancel_signon(NULL, m->data); | |
75 m = meter_win ? meter_win->meters : NULL; | |
76 } | |
77 } | |
78 | |
79 static gint meter_destroy(GtkWidget *window, GdkEvent *evt, struct signon_meter *meter) | |
80 { | |
81 return TRUE; | |
82 } | |
83 | |
84 static struct signon_meter *find_signon_meter(GaimConnection *gc) | |
85 { | |
86 GSList *m = meter_win ? meter_win->meters : NULL; | |
87 | |
88 while (m) { | |
89 if (((struct signon_meter *)m->data)->account == gc->account) | |
90 return m->data; | |
91 m = m->next; | |
92 } | |
93 | |
94 return NULL; | |
95 } | |
96 | |
97 static GtkWidget* create_meter_pixmap (GaimConnection *gc) | |
98 { | |
99 GdkPixbuf *pb = create_prpl_icon(gc->account); | |
100 GdkPixbuf *scale = gdk_pixbuf_scale_simple(pb, 30,30,GDK_INTERP_BILINEAR); | |
101 GtkWidget *image = | |
102 gtk_image_new_from_pixbuf(scale); | |
103 g_object_unref(G_OBJECT(pb)); | |
104 g_object_unref(G_OBJECT(scale)); | |
105 return image; | |
106 } | |
107 | |
108 | |
109 | |
110 static struct signon_meter * | |
111 new_meter(GaimConnection *gc, GtkWidget *widget, | |
112 GtkWidget *table, gint *rows) | |
113 { | |
114 GtkWidget *graphic; | |
115 GtkWidget *label; | |
116 GtkWidget *nest_vbox; | |
117 GString *name_to_print; | |
118 struct signon_meter *meter; | |
119 | |
120 | |
121 meter = g_new0(struct signon_meter, 1); | |
122 | |
123 meter->account = gaim_connection_get_account(gc); | |
124 name_to_print = g_string_new(gaim_account_get_username(meter->account)); | |
125 | |
126 (*rows)++; | |
127 gtk_table_resize (GTK_TABLE(table), *rows, 4); | |
128 | |
129 graphic = create_meter_pixmap(gc); | |
130 | |
131 nest_vbox = gtk_vbox_new (FALSE, 0); | |
132 | |
133 g_string_prepend(name_to_print, _("Signon: ")); | |
134 label = gtk_label_new (name_to_print->str); | |
135 g_string_free(name_to_print, TRUE); | |
136 gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); | |
137 | |
138 meter->status = gtk_label_new(""); | |
139 gtk_misc_set_alignment(GTK_MISC(meter->status), 0, 0.5); | |
140 gtk_widget_set_size_request(meter->status, 250, -1); | |
141 | |
142 meter->progress = gtk_progress_bar_new (); | |
143 | |
144 meter->button = gaim_pixbuf_button_from_stock (_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | |
145 g_signal_connect(G_OBJECT (meter->button), "clicked", | |
146 G_CALLBACK (cancel_signon), meter); | |
147 | |
148 gtk_table_attach (GTK_TABLE (table), graphic, 0, 1, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); | |
149 gtk_table_attach (GTK_TABLE (table), nest_vbox, 1, 2, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); | |
150 gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (label), FALSE, FALSE, 0); | |
151 gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->status), FALSE, FALSE, 0); | |
152 gtk_table_attach (GTK_TABLE (table), meter->progress, 2, 3, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); | |
153 gtk_table_attach (GTK_TABLE (table), meter->button, 3, 4, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); | |
154 | |
155 gtk_widget_show_all (GTK_WIDGET (meter_win->window)); | |
156 | |
157 meter_win->active_count++; | |
158 | |
159 return meter; | |
160 } | |
161 | |
162 static void kill_meter(struct signon_meter *meter, const char *text) { | |
163 gtk_widget_set_sensitive (meter->button, FALSE); | |
164 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(meter->progress), 1); | |
165 gtk_label_set_text(GTK_LABEL(meter->status), text); | |
166 meter_win->active_count--; | |
167 if (meter_win->active_count == 0) { | |
168 gtk_widget_destroy(meter_win->window); | |
169 g_free (meter_win); | |
170 meter_win = NULL; | |
171 } | |
172 } | |
173 | |
174 static void gaim_gtk_connection_connect_progress(GaimConnection *gc, | |
175 const char *text, size_t step, size_t step_count) | |
176 { | |
177 struct signon_meter *meter; | |
178 | |
179 if(!meter_win) { | |
180 GtkWidget *vbox; | |
181 GtkWidget *cancel_button; | |
182 | |
183 if(mainwindow) | |
184 gtk_widget_hide(mainwindow); | |
185 | |
186 meter_win = g_new0(struct meter_window, 1); | |
187 meter_win->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
188 gtk_window_set_resizable(GTK_WINDOW(meter_win->window), FALSE); | |
189 gtk_window_set_role(GTK_WINDOW(meter_win->window), "signon"); | |
190 gtk_container_set_border_width(GTK_CONTAINER(meter_win->window), 5); | |
191 gtk_window_set_title(GTK_WINDOW(meter_win->window), _("Signon")); | |
192 gtk_widget_realize(meter_win->window); | |
193 | |
194 vbox = gtk_vbox_new (FALSE, 0); | |
195 gtk_container_add(GTK_CONTAINER(meter_win->window), vbox); | |
196 | |
197 meter_win->table = gtk_table_new(1, 4, FALSE); | |
198 gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(meter_win->table), | |
199 FALSE, FALSE, 0); | |
200 gtk_container_set_border_width(GTK_CONTAINER(meter_win->table), 5); | |
201 gtk_table_set_row_spacings(GTK_TABLE(meter_win->table), 5); | |
202 gtk_table_set_col_spacings(GTK_TABLE(meter_win->table), 10); | |
203 | |
204 cancel_button = gaim_pixbuf_button_from_stock(_("Cancel All"), | |
205 GTK_STOCK_QUIT, GAIM_BUTTON_HORIZONTAL); | |
206 g_signal_connect_swapped(G_OBJECT(cancel_button), "clicked", | |
207 G_CALLBACK(cancel_all), NULL); | |
208 gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(cancel_button), | |
209 FALSE, FALSE, 0); | |
210 | |
211 g_signal_connect(G_OBJECT(meter_win->window), "delete_event", | |
212 G_CALLBACK(meter_destroy), NULL); | |
213 } | |
214 | |
215 meter = find_signon_meter(gc); | |
216 if(!meter) { | |
217 meter = new_meter(gc, meter_win->window, meter_win->table, | |
218 &meter_win->rows); | |
219 | |
220 meter_win->meters = g_slist_append(meter_win->meters, meter); | |
221 } | |
222 | |
223 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(meter->progress), | |
224 (float)step / (float)step_count); | |
225 gtk_label_set_text(GTK_LABEL(meter->status), text); | |
226 } | |
227 | |
228 static void gaim_gtk_connection_connected(GaimConnection *gc) | |
229 { | |
230 struct signon_meter *meter = find_signon_meter(gc); | |
231 | |
5885
02569519d0cc
[gaim-migrate @ 6317]
Christian Hammond <chipx86@chipx86.com>
parents:
5883
diff
changeset
|
232 gaim_setup(gc); |
02569519d0cc
[gaim-migrate @ 6317]
Christian Hammond <chipx86@chipx86.com>
parents:
5883
diff
changeset
|
233 |
6021 | 234 update_privacy_connections(); |
5885
02569519d0cc
[gaim-migrate @ 6317]
Christian Hammond <chipx86@chipx86.com>
parents:
5883
diff
changeset
|
235 do_away_menu(); |
5936
1b56a833d665
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5885
diff
changeset
|
236 gaim_gtk_blist_update_protocol_actions(); |
5885
02569519d0cc
[gaim-migrate @ 6317]
Christian Hammond <chipx86@chipx86.com>
parents:
5883
diff
changeset
|
237 |
5717 | 238 if(meter) |
239 kill_meter(meter, _("Done.")); | |
240 } | |
241 | |
6036 | 242 static void request_pass_ok_cb(GaimConnection *gc, const char *entry) |
243 { | |
244 GaimAccount *account = gaim_connection_get_account(gc); | |
245 | |
246 gaim_account_set_password(account, (*entry != '\0') ? entry : NULL); | |
247 | |
248 gaim_connection_connect(gc); | |
249 } | |
250 | |
251 static void request_pass_cancel_cb(GaimConnection *gc, const char *entry) | |
252 { | |
253 gaim_connection_destroy(gc); | |
254 } | |
255 | |
5717 | 256 static void gaim_gtk_connection_request_pass(GaimConnection *gc) |
257 { | |
6036 | 258 gaim_request_input(gc, NULL, _("Enter your password."), NULL, |
259 NULL, FALSE, TRUE, | |
260 _("OK"), G_CALLBACK(request_pass_ok_cb), | |
261 _("Cancel"), G_CALLBACK(request_pass_cancel_cb), gc); | |
5717 | 262 } |
263 | |
264 static void gaim_gtk_connection_disconnected(GaimConnection *gc, | |
265 const char *reason) | |
266 { | |
267 struct signon_meter *meter = find_signon_meter(gc); | |
5883
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
268 |
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
269 update_privacy_connections(); |
5885
02569519d0cc
[gaim-migrate @ 6317]
Christian Hammond <chipx86@chipx86.com>
parents:
5883
diff
changeset
|
270 do_away_menu(); |
5936
1b56a833d665
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5885
diff
changeset
|
271 gaim_gtk_blist_update_protocol_actions(); |
5883
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
272 |
5717 | 273 if(meter) |
274 kill_meter(meter, _("Done.")); | |
5883
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
275 |
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
276 if (gaim_connections_get_all() != NULL) |
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
277 return; |
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
278 |
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
279 destroy_all_dialogs(); |
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
280 |
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
281 gaim_blist_destroy(); |
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
282 |
f5b0c6073264
[gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
283 show_login(); |
5717 | 284 } |
285 | |
286 static void gaim_gtk_connection_notice(GaimConnection *gc, | |
287 const char *text) | |
288 { | |
289 } | |
290 | |
291 static GaimConnectionUiOps conn_ui_ops = | |
292 { | |
293 gaim_gtk_connection_connect_progress, | |
294 gaim_gtk_connection_connected, | |
295 gaim_gtk_connection_request_pass, | |
296 gaim_gtk_connection_disconnected, | |
297 gaim_gtk_connection_notice | |
298 }; | |
299 | |
300 GaimConnectionUiOps *gaim_get_gtk_connection_ui_ops(void) | |
301 { | |
302 return &conn_ui_ops; | |
303 } | |
304 | |
305 | |
5746
2c04c55222b7
[gaim-migrate @ 6171]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5717
diff
changeset
|
306 void away_on_login(char *mesg) |
5717 | 307 { |
308 GSList *awy = away_messages; | |
309 struct away_message *a, *message = NULL; | |
310 struct gaim_gtk_buddy_list *gtkblist; | |
311 | |
312 gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); | |
313 | |
314 if (!gtkblist->window) { | |
315 return; | |
316 } | |
317 | |
318 if (mesg == NULL) { | |
319 /* Use default message */ | |
320 do_away_message(NULL, default_away); | |
321 } else { | |
322 /* Use argument */ | |
323 while (awy) { | |
324 a = (struct away_message *)awy->data; | |
325 if (strcmp(a->name, mesg) == 0) { | |
326 message = a; | |
327 break; | |
328 } | |
329 awy = awy->next; | |
330 } | |
331 if (message == NULL) | |
332 message = default_away; | |
333 do_away_message(NULL, message); | |
334 } | |
335 return; | |
336 } | |
337 | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5746
diff
changeset
|
338 #if 0 |
5717 | 339 struct kick_dlg { |
340 GaimAccount *account; | |
341 GtkWidget *dlg; | |
342 }; | |
343 static GSList *kicks = NULL; | |
344 | |
345 static struct kick_dlg *find_kick_dlg(GaimAccount *account) | |
346 { | |
347 GSList *k = kicks; | |
348 while (k) { | |
349 struct kick_dlg *d = k->data; | |
350 if (d->account == account) | |
351 return d; | |
352 k = k->next; | |
353 } | |
354 return NULL; | |
355 } | |
356 | |
357 static void set_kick_null(struct kick_dlg *k) | |
358 { | |
359 kicks = g_slist_remove(kicks, k); | |
360 g_free(k); | |
361 } | |
362 | |
363 /* | |
364 * Common code for hide_login_progress(), and hide_login_progress_info() | |
365 */ | |
366 static void hide_login_progress_common(GaimConnection *gc, | |
367 char *details, | |
368 char *title, | |
369 char *prologue) | |
370 { | |
371 gchar *buf; | |
372 struct kick_dlg *k = find_kick_dlg(gc->account); | |
373 struct signon_meter *meter = find_signon_meter(gc); | |
374 buf = g_strdup_printf(_("%s\n%s: %s"), full_date(), prologue, details); | |
375 if (k) | |
376 gtk_widget_destroy(k->dlg); | |
377 k = g_new0(struct kick_dlg, 1); | |
378 k->account = gc->account; | |
379 k->dlg = gaim_notify_message(NULL, GAIM_NOTIFY_MSG_ERROR, NULL, | |
380 title, buf, G_CALLBACK(set_kick_null), k); | |
381 kicks = g_slist_append(kicks, k); | |
382 if (meter) { | |
383 kill_meter(meter, _("Done.")); | |
384 meter_win->meters = g_slist_remove(meter_win->meters, meter); | |
385 g_free(meter); | |
386 } | |
387 g_free(buf); | |
388 } | |
389 | |
390 static void hide_login_progress(GaimConnection *gc, char *why) | |
391 { | |
392 GaimAccount *account = gaim_connection_get_account(gc); | |
393 gchar *buf; | |
394 | |
395 gaim_event_broadcast(event_error, gc, why); | |
396 buf = g_strdup_printf(_("%s was unable to sign on"), | |
397 gaim_account_get_username(account)); | |
398 hide_login_progress_common(gc, why, _("Signon Error"), buf); | |
399 g_free(buf); | |
400 } | |
401 | |
402 /* | |
403 * Like hide_login_progress(), but for informational, not error/warning, | |
404 * messages. | |
405 * | |
406 */ | |
407 static void hide_login_progress_notice(GaimConnection *gc, char *why) | |
408 { | |
409 GaimAccount *account = gaim_connection_get_account(gc); | |
410 | |
411 hide_login_progress_common(gc, why, _("Notice"), | |
412 (char *)gaim_account_get_username(account)); | |
413 } | |
414 | |
415 /* | |
416 * Like hide_login_progress(), but for non-signon error messages. | |
417 * | |
418 */ | |
419 static void hide_login_progress_error(GaimConnection *gc, char *why) | |
420 { | |
421 char buf[2048]; | |
422 GaimAccount *account = gaim_connection_get_account(gc); | |
423 | |
424 gaim_event_broadcast(event_error, gc, why); | |
425 g_snprintf(buf, sizeof(buf), _("%s has been signed off"), | |
426 gaim_account_get_username(account)); | |
427 hide_login_progress_common(gc, why, _("Connection Error"), buf); | |
428 } | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5746
diff
changeset
|
429 #endif |