Mercurial > pidgin
comparison src/multi.c @ 2190:24d947eff811
[gaim-migrate @ 2200]
this was a dumb bug.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 29 Aug 2001 23:38:38 +0000 |
parents | 34ce165132de |
children | e8e2a72a37b7 |
comparison
equal
deleted
inserted
replaced
2189:dca8e00d7de0 | 2190:24d947eff811 |
---|---|
243 txt = gtk_entry_get_text(GTK_ENTRY(u->pass)); | 243 txt = gtk_entry_get_text(GTK_ENTRY(u->pass)); |
244 if (u->options & OPT_USR_REM_PASS) | 244 if (u->options & OPT_USR_REM_PASS) |
245 g_snprintf(u->password, sizeof(u->password), "%s", txt); | 245 g_snprintf(u->password, sizeof(u->password), "%s", txt); |
246 else | 246 else |
247 u->password[0] = '\0'; | 247 u->password[0] = '\0'; |
248 gtk_widget_destroy(u->mod); | |
249 i = gtk_clist_find_row_from_data(GTK_CLIST(list), u); | 248 i = gtk_clist_find_row_from_data(GTK_CLIST(list), u); |
250 gtk_clist_set_text(GTK_CLIST(list), i, 2, | 249 gtk_clist_set_text(GTK_CLIST(list), i, 2, |
251 (u->options & OPT_USR_AUTO) ? "True" : "False"); | 250 (u->options & OPT_USR_AUTO) ? "True" : "False"); |
252 gtk_clist_set_text(GTK_CLIST(list), i, 3, proto_name(u->protocol)); | 251 gtk_clist_set_text(GTK_CLIST(list), i, 3, proto_name(u->protocol)); |
253 | 252 |
260 tmp = tmp->next; | 259 tmp = tmp->next; |
261 } | 260 } |
262 if (u->opt_entries) | 261 if (u->opt_entries) |
263 g_list_free(u->opt_entries); | 262 g_list_free(u->opt_entries); |
264 u->opt_entries = NULL; | 263 u->opt_entries = NULL; |
264 | |
265 gtk_widget_destroy(u->mod); | |
265 } else { | 266 } else { |
266 txt = gtk_entry_get_text(GTK_ENTRY(tmpusr.name)); | 267 txt = gtk_entry_get_text(GTK_ENTRY(tmpusr.name)); |
267 u = new_user(txt, tmpusr.protocol, tmpusr.options); | 268 u = new_user(txt, tmpusr.protocol, tmpusr.options); |
268 | 269 |
269 txt = gtk_entry_get_text(GTK_ENTRY(tmpusr.pass)); | 270 txt = gtk_entry_get_text(GTK_ENTRY(tmpusr.pass)); |
482 /* page 0 is general, keep it. page 1 is options for our | 483 /* page 0 is general, keep it. page 1 is options for our |
483 * particular protocol, so clear it out and make a new one. */ | 484 * particular protocol, so clear it out and make a new one. */ |
484 | 485 |
485 gtk_notebook_remove_page(GTK_NOTEBOOK(book), 1); | 486 gtk_notebook_remove_page(GTK_NOTEBOOK(book), 1); |
486 | 487 |
488 if (u && u->opt_entries) { | |
489 g_list_free(u->opt_entries); | |
490 u->opt_entries = NULL; | |
491 } else if (!u && tmpusr.opt_entries) { | |
492 g_list_free(tmpusr.opt_entries); | |
493 tmpusr.opt_entries = NULL; | |
494 } | |
495 | |
487 if (p && p->user_opts) { | 496 if (p && p->user_opts) { |
488 GList *op = (*p->user_opts)(); | 497 GList *op = (*p->user_opts)(); |
489 GList *tmp = op; | 498 GList *tmp = op; |
490 | 499 |
491 GtkWidget *vbox; | 500 GtkWidget *vbox; |
492 GtkWidget *hbox; | 501 GtkWidget *hbox; |
493 GtkWidget *label; | 502 GtkWidget *label; |
494 GtkWidget *entry; | 503 GtkWidget *entry; |
495 | 504 |
496 char buf[256]; | 505 char buf[256]; |
497 | |
498 if (u && u->opt_entries) { | |
499 g_list_free(u->opt_entries); | |
500 u->opt_entries = NULL; | |
501 } else if (!u && tmpusr.opt_entries) { | |
502 g_list_free(tmpusr.opt_entries); | |
503 tmpusr.opt_entries = NULL; | |
504 } | |
505 | 506 |
506 vbox = gtk_vbox_new(FALSE, 5); | 507 vbox = gtk_vbox_new(FALSE, 5); |
507 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 508 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
508 g_snprintf(buf, sizeof(buf), "%s Options", (*p->name)()); | 509 g_snprintf(buf, sizeof(buf), "%s Options", (*p->name)()); |
509 gtk_notebook_append_page(GTK_NOTEBOOK(book), vbox, gtk_label_new(buf)); | 510 gtk_notebook_append_page(GTK_NOTEBOOK(book), vbox, gtk_label_new(buf)); |