Mercurial > pidgin.yaz
comparison src/conversation.c @ 4349:0c68d402f59f
[gaim-migrate @ 4614]
XML Blist
Gaim stores all the buddy lists in one big happy file now. You can order
the buddies however you want, and they'll stay ordered that way.
We can also store some per-buddy information now, which will be cool.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 19 Jan 2003 22:16:52 +0000 |
parents | f38956587637 |
children | 5fb47ec9bfe4 |
comparison
equal
deleted
inserted
replaced
4348:922b66840a51 | 4349:0c68d402f59f |
---|---|
502 return FALSE; | 502 return FALSE; |
503 } | 503 } |
504 | 504 |
505 void add_callback(GtkWidget *widget, struct conversation *c) | 505 void add_callback(GtkWidget *widget, struct conversation *c) |
506 { | 506 { |
507 struct buddy *b = find_buddy(c->gc, c->name); | 507 struct buddy *b = find_buddy(c->gc->user, c->name); |
508 if (b) { | 508 if (b) { |
509 show_confirm_del(c->gc, c->name); | 509 show_confirm_del(c->gc, c->name); |
510 } else if (c->gc) | 510 } else if (c->gc) |
511 show_add_buddy(c->gc, c->name, NULL, NULL); | 511 show_add_buddy(c->gc, c->name, NULL, NULL); |
512 | 512 |
1630 gtk_widget_show(c->window); | 1630 gtk_widget_show(c->window); |
1631 | 1631 |
1632 if (!c->is_chat || !(c->gc->prpl->options & OPT_PROTO_UNIQUE_CHATNAME)) { | 1632 if (!c->is_chat || !(c->gc->prpl->options & OPT_PROTO_UNIQUE_CHATNAME)) { |
1633 if (!who) { | 1633 if (!who) { |
1634 if (flags & WFLAG_SEND) { | 1634 if (flags & WFLAG_SEND) { |
1635 b = find_buddy(c->gc, c->gc->username); | 1635 b = find_buddy(c->gc->user, c->gc->username); |
1636 if (get_buddy_alias_only(b)) | 1636 if (get_buddy_alias_only(b)) |
1637 who = get_buddy_alias(b); | 1637 who = get_buddy_alias(b); |
1638 else if (c->gc->user->alias[0]) | 1638 else if (c->gc->user->alias[0]) |
1639 who = c->gc->user->alias; | 1639 who = c->gc->user->alias; |
1640 else if (c->gc->displayname[0]) | 1640 else if (c->gc->displayname[0]) |
1641 who = c->gc->displayname; | 1641 who = c->gc->displayname; |
1642 else | 1642 else |
1643 who = c->gc->username; | 1643 who = c->gc->username; |
1644 } else { | 1644 } else { |
1645 b = find_buddy(c->gc, c->name); | 1645 b = find_buddy(c->gc->user, c->name); |
1646 if (b) | 1646 if (b) |
1647 who = get_buddy_alias(b); | 1647 who = get_buddy_alias(b); |
1648 else | 1648 else |
1649 who = c->name; | 1649 who = c->name; |
1650 } | 1650 } |
1651 } else { | 1651 } else { |
1652 b = find_buddy(c->gc, who); | 1652 b = find_buddy(c->gc->user, who); |
1653 if (b) | 1653 if (b) |
1654 who = get_buddy_alias(b); | 1654 who = get_buddy_alias(b); |
1655 } | 1655 } |
1656 } | 1656 } |
1657 | 1657 |
2177 { | 2177 { |
2178 int dispstyle = set_dispstyle(0); | 2178 int dispstyle = set_dispstyle(0); |
2179 GtkWidget *parent = c->add->parent; | 2179 GtkWidget *parent = c->add->parent; |
2180 gboolean rebuild = FALSE; | 2180 gboolean rebuild = FALSE; |
2181 | 2181 |
2182 if (find_buddy(c->gc, c->name)) { | 2182 if (find_buddy(c->gc->user, c->name)) { |
2183 if (!gtk_object_get_user_data(GTK_OBJECT(c->add))) { | 2183 if (!gtk_object_get_user_data(GTK_OBJECT(c->add))) { |
2184 gtk_widget_destroy(c->add); | 2184 gtk_widget_destroy(c->add); |
2185 c->add = gaim_pixbuf_button_from_stock(dispstyle == 0 ? NULL : _("Remove"), | 2185 c->add = gaim_pixbuf_button_from_stock(dispstyle == 0 ? NULL : _("Remove"), |
2186 dispstyle == 1 ? NULL : "gtk-remove", | 2186 dispstyle == 1 ? NULL : "gtk-remove", |
2187 GAIM_BUTTON_VERTICAL); | 2187 GAIM_BUTTON_VERTICAL); |
2778 gtk_box_pack_end(GTK_BOX(bbox), c->sep2, FALSE, TRUE, 0); | 2778 gtk_box_pack_end(GTK_BOX(bbox), c->sep2, FALSE, TRUE, 0); |
2779 gtk_widget_show(c->sep2); | 2779 gtk_widget_show(c->sep2); |
2780 | 2780 |
2781 /* And put the other buttons on the left */ | 2781 /* And put the other buttons on the left */ |
2782 | 2782 |
2783 if (c->gc && find_buddy(c->gc, c->name) != NULL) { | 2783 if (c->gc && find_buddy(c->gc->user, c->name) != NULL) { |
2784 add = gaim_pixbuf_button_from_stock( | 2784 add = gaim_pixbuf_button_from_stock( |
2785 (dispstyle == 0 ? NULL : _("Remove")), | 2785 (dispstyle == 0 ? NULL : _("Remove")), |
2786 (dispstyle == 1 ? NULL : "gtk-remove"), | 2786 (dispstyle == 1 ? NULL : "gtk-remove"), |
2787 GAIM_BUTTON_VERTICAL); | 2787 GAIM_BUTTON_VERTICAL); |
2788 gtk_object_set_user_data(GTK_OBJECT(add), c); | 2788 gtk_object_set_user_data(GTK_OBJECT(add), c); |
3108 struct buddy *b; | 3108 struct buddy *b; |
3109 char *text; | 3109 char *text; |
3110 int index; | 3110 int index; |
3111 GtkNotebook *nb; | 3111 GtkNotebook *nb; |
3112 | 3112 |
3113 if ((im_options & OPT_IM_ALIAS_TAB) && c->gc && ((b = find_buddy(c->gc, c->name)) != NULL)) | 3113 if ((im_options & OPT_IM_ALIAS_TAB) && c->gc && ((b = find_buddy(c->gc->user, c->name)) != NULL)) |
3114 text = get_buddy_alias(b); | 3114 text = get_buddy_alias(b); |
3115 else | 3115 else |
3116 text = c->name; | 3116 text = c->name; |
3117 | 3117 |
3118 if (im_options & OPT_IM_ONE_WINDOW) { | 3118 if (im_options & OPT_IM_ONE_WINDOW) { |