comparison src/prpl.c @ 2372:2927c2c26fe6

[gaim-migrate @ 2385] reformatting. nothing else. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 27 Sep 2001 19:17:11 +0000
parents 571971659533
children 86c9b44a35ae
comparison
equal deleted inserted replaced
2371:db02399a9ad7 2372:2927c2c26fe6
64 { 64 {
65 struct prpl *p; 65 struct prpl *p;
66 struct prpl *old; 66 struct prpl *old;
67 if (size != sizeof(struct prpl)) { 67 if (size != sizeof(struct prpl)) {
68 do_error_dialog(_("You have attempted to load a protocol which was not compiled" 68 do_error_dialog(_("You have attempted to load a protocol which was not compiled"
69 " from the same version of the source as this application was." 69 " from the same version of the source as this application was."
70 " Unfortunately, because it is not the same version I cannot" 70 " Unfortunately, because it is not the same version I cannot"
71 " safely tell you which one it was. Needless to say, it was not" 71 " safely tell you which one it was. Needless to say, it was not"
72 " successfully loaded."), _("Protocol Error")); 72 " successfully loaded."), _("Protocol Error"));
73 return; 73 return;
74 } 74 }
75 p = g_new0(struct prpl, 1); 75 p = g_new0(struct prpl, 1);
76 pi(p); 76 pi(p);
77 if ((old = find_prpl(p->protocol)) != NULL) 77 if ((old = find_prpl(p->protocol)) != NULL)
339 c = g_slist_next(c); 339 c = g_slist_next(c);
340 } 340 }
341 } 341 }
342 } 342 }
343 343
344 static void des_email_win(GtkWidget *w, struct gaim_connection *yd) { 344 static void des_email_win(GtkWidget *w, struct gaim_connection *yd)
345 {
345 gtk_widget_destroy(yd->email_win); 346 gtk_widget_destroy(yd->email_win);
346 if (yd->email_win == w) 347 if (yd->email_win == w)
347 yd->email_win = NULL; 348 yd->email_win = NULL;
348 yd->email_label = NULL; 349 yd->email_label = NULL;
349 } 350 }
354 355
355 if (!(gc->user->options & OPT_USR_MAIL_CHECK)) 356 if (!(gc->user->options & OPT_USR_MAIL_CHECK))
356 return; 357 return;
357 358
358 if (count < 0 && from && subject) { 359 if (count < 0 && from && subject) {
359 g_snprintf(buf, sizeof buf, "%s has mail from %s: %s", 360 g_snprintf(buf, sizeof buf, "%s has mail from %s: %s", gc->username, from, subject);
360 gc->username, from, subject);
361 if (!gc->email_win) { 361 if (!gc->email_win) {
362 GtkWidget *close; 362 GtkWidget *close;
363 363
364 gc->email_win = gtk_dialog_new(); 364 gc->email_win = gtk_dialog_new();
365 gtk_window_set_policy(GTK_WINDOW(gc->email_win), 0, 0, 1); 365 gtk_window_set_policy(GTK_WINDOW(gc->email_win), 0, 0, 1);
370 gtk_widget_realize(gc->email_win); 370 gtk_widget_realize(gc->email_win);
371 aol_icon(gc->email_win->window); 371 aol_icon(gc->email_win->window);
372 372
373 gc->email_label = gtk_label_new(buf); 373 gc->email_label = gtk_label_new(buf);
374 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->vbox), 374 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->vbox),
375 gc->email_label, 0, 0, 5); 375 gc->email_label, 0, 0, 5);
376 gtk_widget_show(gc->email_label); 376 gtk_widget_show(gc->email_label);
377 377
378 close = picture_button(gc->email_win, _("Close"), cancel_xpm); 378 close = picture_button(gc->email_win, _("Close"), cancel_xpm);
379 gtk_window_set_focus(GTK_WINDOW(gc->email_win), close); 379 gtk_window_set_focus(GTK_WINDOW(gc->email_win), close);
380 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->action_area), 380 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->action_area),
381 close, 0, 0, 5); 381 close, 0, 0, 5);
382 gtk_signal_connect(GTK_OBJECT(close), "clicked", 382 gtk_signal_connect(GTK_OBJECT(close), "clicked",
383 GTK_SIGNAL_FUNC(des_email_win), gc); 383 GTK_SIGNAL_FUNC(des_email_win), gc);
384 384
385 gtk_widget_show(gc->email_win); 385 gtk_widget_show(gc->email_win);
386 } 386 }
387 gtk_label_set_text(GTK_LABEL(gc->email_label), buf); 387 gtk_label_set_text(GTK_LABEL(gc->email_label), buf);
388 } else if (count) { 388 } else if (count) {
389 g_snprintf(buf, sizeof buf, "%s has %d new message%s.", 389 g_snprintf(buf, sizeof buf, "%s has %d new message%s.",
390 gc->username, count, count == 1 ? "" : "s"); 390 gc->username, count, count == 1 ? "" : "s");
391 if (!gc->email_win) { 391 if (!gc->email_win) {
392 GtkWidget *close; 392 GtkWidget *close;
393 393
394 gc->email_win = gtk_dialog_new(); 394 gc->email_win = gtk_dialog_new();
395 gtk_window_set_policy(GTK_WINDOW(gc->email_win), 0, 0, 1); 395 gtk_window_set_policy(GTK_WINDOW(gc->email_win), 0, 0, 1);
400 gtk_widget_realize(gc->email_win); 400 gtk_widget_realize(gc->email_win);
401 aol_icon(gc->email_win->window); 401 aol_icon(gc->email_win->window);
402 402
403 gc->email_label = gtk_label_new(buf); 403 gc->email_label = gtk_label_new(buf);
404 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->vbox), 404 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->vbox),
405 gc->email_label, 0, 0, 5); 405 gc->email_label, 0, 0, 5);
406 gtk_widget_show(gc->email_label); 406 gtk_widget_show(gc->email_label);
407 407
408 close = picture_button(gc->email_win, _("Close"), cancel_xpm); 408 close = picture_button(gc->email_win, _("Close"), cancel_xpm);
409 gtk_window_set_focus(GTK_WINDOW(gc->email_win), close); 409 gtk_window_set_focus(GTK_WINDOW(gc->email_win), close);
410 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->action_area), 410 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->action_area),
411 close, 0, 0, 5); 411 close, 0, 0, 5);
412 gtk_signal_connect(GTK_OBJECT(close), "clicked", 412 gtk_signal_connect(GTK_OBJECT(close), "clicked",
413 GTK_SIGNAL_FUNC(des_email_win), gc); 413 GTK_SIGNAL_FUNC(des_email_win), gc);
414 414
415 gtk_widget_show(gc->email_win); 415 gtk_widget_show(gc->email_win);
416 } 416 }