Mercurial > pidgin.yaz
comparison src/multi.c @ 2153:0befa2d2e540
[gaim-migrate @ 2163]
moving mail notifications to the core. this makes things much easier on the protocols. next steps: make buddy right-click menu stuff generated by the core (based on information provided by the protocols, similar to the away menu stuff); make entry-widget protocol-specific user options generated by the core based on what the protocols tell it (in a similar way).
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 22 Aug 2001 21:11:58 +0000 |
parents | fa3dfde4727e |
children | cff133e0ec0c |
comparison
equal
deleted
inserted
replaced
2152:f631cfc8e824 | 2153:0befa2d2e540 |
---|---|
290 } else if ((p->options & OPT_PROTO_NO_PASSWORD) && | 290 } else if ((p->options & OPT_PROTO_NO_PASSWORD) && |
291 !(q->options & OPT_PROTO_NO_PASSWORD)) { | 291 !(q->options & OPT_PROTO_NO_PASSWORD)) { |
292 gtk_widget_show(u->pwdbox); | 292 gtk_widget_show(u->pwdbox); |
293 gtk_widget_show(u->rempass); | 293 gtk_widget_show(u->rempass); |
294 } | 294 } |
295 if (!(p->options & OPT_PROTO_MAIL_CHECK) && | |
296 (q->options & OPT_PROTO_MAIL_CHECK)) { | |
297 gtk_widget_show(u->checkmail); | |
298 } else if ((p->options & OPT_PROTO_MAIL_CHECK) && | |
299 !(q->options & OPT_PROTO_MAIL_CHECK)) { | |
300 gtk_widget_hide(u->checkmail); | |
301 } | |
295 u->tmp_protocol = proto; | 302 u->tmp_protocol = proto; |
296 generate_prpl_options(u, u->main); | 303 generate_prpl_options(u, u->main); |
297 } else if (!u && (tmpusr.tmp_protocol != proto)) { | 304 } else if (!u && (tmpusr.tmp_protocol != proto)) { |
298 int i; | 305 int i; |
299 for (i = 0; i < 7; i++) | 306 for (i = 0; i < 7; i++) |
306 } else if ((p->options & OPT_PROTO_NO_PASSWORD) && | 313 } else if ((p->options & OPT_PROTO_NO_PASSWORD) && |
307 !(q->options & OPT_PROTO_NO_PASSWORD)) { | 314 !(q->options & OPT_PROTO_NO_PASSWORD)) { |
308 gtk_widget_show(tmpusr.pwdbox); | 315 gtk_widget_show(tmpusr.pwdbox); |
309 gtk_widget_show(tmpusr.rempass); | 316 gtk_widget_show(tmpusr.rempass); |
310 } | 317 } |
318 if (!(p->options & OPT_PROTO_MAIL_CHECK) && | |
319 (q->options & OPT_PROTO_MAIL_CHECK)) { | |
320 gtk_widget_show(tmpusr.checkmail); | |
321 } else if ((p->options & OPT_PROTO_MAIL_CHECK) && | |
322 !(q->options & OPT_PROTO_MAIL_CHECK)) { | |
323 gtk_widget_hide(tmpusr.checkmail); | |
324 } | |
311 tmpusr.tmp_protocol = tmpusr.protocol = proto; | 325 tmpusr.tmp_protocol = tmpusr.protocol = proto; |
312 generate_prpl_options(NULL, newmain); | 326 generate_prpl_options(NULL, newmain); |
313 } | 327 } |
314 } | 328 } |
315 | 329 |
367 GtkWidget *pwdbox; | 381 GtkWidget *pwdbox; |
368 GtkWidget *label; | 382 GtkWidget *label; |
369 GtkWidget *name; | 383 GtkWidget *name; |
370 GtkWidget *pass; | 384 GtkWidget *pass; |
371 GtkWidget *rempass; | 385 GtkWidget *rempass; |
386 GtkWidget *checkmail; | |
372 | 387 |
373 vbox = gtk_vbox_new(FALSE, 5); | 388 vbox = gtk_vbox_new(FALSE, 5); |
374 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 389 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
375 gtk_notebook_append_page(GTK_NOTEBOOK(book), vbox, gtk_label_new(_("General Options"))); | 390 gtk_notebook_append_page(GTK_NOTEBOOK(book), vbox, gtk_label_new(_("General Options"))); |
376 | 391 |
403 make_protocol_menu(hbox, u); | 418 make_protocol_menu(hbox, u); |
404 | 419 |
405 rempass = acct_button(_("Remember Password"), u, OPT_USR_REM_PASS, vbox); | 420 rempass = acct_button(_("Remember Password"), u, OPT_USR_REM_PASS, vbox); |
406 acct_button(_("Auto-Login"), u, OPT_USR_AUTO, vbox); | 421 acct_button(_("Auto-Login"), u, OPT_USR_AUTO, vbox); |
407 /*acct_button(_("Send KeepAlive packet (6 bytes/second)"), u, OPT_USR_KEEPALV, vbox);*/ | 422 /*acct_button(_("Send KeepAlive packet (6 bytes/second)"), u, OPT_USR_KEEPALV, vbox);*/ |
423 checkmail = acct_button(_("New Mail Notifications"), u, OPT_USR_MAIL_CHECK, vbox); | |
408 | 424 |
409 gtk_widget_show_all(vbox); | 425 gtk_widget_show_all(vbox); |
410 | 426 |
411 if (u) { | 427 if (u) { |
412 u->name = name; | 428 u->name = name; |
413 u->pwdbox = pwdbox; | 429 u->pwdbox = pwdbox; |
414 u->pass = pass; | 430 u->pass = pass; |
415 u->rempass = rempass; | 431 u->rempass = rempass; |
432 u->checkmail = checkmail; | |
416 gtk_entry_set_text(GTK_ENTRY(name), u->username); | 433 gtk_entry_set_text(GTK_ENTRY(name), u->username); |
417 gtk_entry_set_text(GTK_ENTRY(pass), u->password); | 434 gtk_entry_set_text(GTK_ENTRY(pass), u->password); |
418 gtk_entry_set_editable(GTK_ENTRY(name), FALSE); | 435 gtk_entry_set_editable(GTK_ENTRY(name), FALSE); |
419 } else { | 436 } else { |
420 tmpusr.name = name; | 437 tmpusr.name = name; |
421 tmpusr.pwdbox = pwdbox; | 438 tmpusr.pwdbox = pwdbox; |
422 tmpusr.pass = pass; | 439 tmpusr.pass = pass; |
423 tmpusr.rempass = rempass; | 440 tmpusr.rempass = rempass; |
441 tmpusr.checkmail = checkmail; | |
424 } | 442 } |
425 } | 443 } |
426 | 444 |
427 static void generate_prpl_options(struct aim_user *u, GtkWidget *book) | 445 static void generate_prpl_options(struct aim_user *u, GtkWidget *book) |
428 { | 446 { |
519 p = find_prpl(u->tmp_protocol); | 537 p = find_prpl(u->tmp_protocol); |
520 if (p->options & OPT_PROTO_NO_PASSWORD) { | 538 if (p->options & OPT_PROTO_NO_PASSWORD) { |
521 gtk_widget_hide(u->pwdbox); | 539 gtk_widget_hide(u->pwdbox); |
522 gtk_widget_hide(u->rempass); | 540 gtk_widget_hide(u->rempass); |
523 } | 541 } |
542 if (!(p->options & OPT_PROTO_MAIL_CHECK)) | |
543 gtk_widget_hide(u->checkmail); | |
524 } else { | 544 } else { |
525 p = find_prpl(tmpusr.tmp_protocol); | 545 p = find_prpl(tmpusr.tmp_protocol); |
526 if (p->options & OPT_PROTO_NO_PASSWORD) { | 546 if (p->options & OPT_PROTO_NO_PASSWORD) { |
527 gtk_widget_hide(tmpusr.pwdbox); | 547 gtk_widget_hide(tmpusr.pwdbox); |
528 gtk_widget_hide(tmpusr.rempass); | 548 gtk_widget_hide(tmpusr.rempass); |
529 } | 549 } |
550 if (!(p->options & OPT_PROTO_MAIL_CHECK)) | |
551 gtk_widget_hide(tmpusr.checkmail); | |
530 } | 552 } |
531 } | 553 } |
532 | 554 |
533 static void add_acct(GtkWidget *w, gpointer d) | 555 static void add_acct(GtkWidget *w, gpointer d) |
534 { | 556 { |