Mercurial > pidgin
comparison src/conversation.c @ 4090:286d487a4fd7
[gaim-migrate @ 4305]
Fixed the problems with the add/remove button being moved and keeping its
original state.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 17 Dec 2002 06:53:50 +0000 |
parents | 8aa62e2e1579 |
children | 0c131a8ea3d1 |
comparison
equal
deleted
inserted
replaced
4089:7f4f3aa61069 | 4090:286d487a4fd7 |
---|---|
2415 return dispstyle; | 2415 return dispstyle; |
2416 } | 2416 } |
2417 | 2417 |
2418 void update_convo_add_button(struct conversation *c) | 2418 void update_convo_add_button(struct conversation *c) |
2419 { | 2419 { |
2420 /*int dispstyle = set_dispstyle(0);*/ | 2420 int dispstyle = set_dispstyle(0); |
2421 GtkWidget *parent = c->add->parent; | 2421 GtkWidget *parent = c->add->parent; |
2422 gboolean rebuild = FALSE; | 2422 gboolean rebuild = FALSE; |
2423 | 2423 |
2424 if (find_buddy(c->gc, c->name)) { | 2424 if (find_buddy(c->gc, c->name)) { |
2425 if (!gtk_object_get_user_data(GTK_OBJECT(c->add))) { | 2425 if (!gtk_object_get_user_data(GTK_OBJECT(c->add))) { |
2426 gtk_widget_destroy(c->add); | 2426 gtk_widget_destroy(c->add); |
2427 c->add = gaim_pixbuf_button_from_stock(_("Remove"), "gtk-remove", GAIM_BUTTON_VERTICAL); | 2427 c->add = gaim_pixbuf_button_from_stock(dispstyle == 0 ? NULL : _("Remove"), |
2428 dispstyle == 1 ? NULL : "gtk-remove", | |
2429 GAIM_BUTTON_VERTICAL); | |
2428 rebuild = TRUE; | 2430 rebuild = TRUE; |
2429 } | 2431 } |
2430 if (c->gc) { | 2432 if (c->gc) { |
2431 if (c->gc->prpl->remove_buddy == NULL) | 2433 if (c->gc->prpl->remove_buddy == NULL) |
2432 gtk_widget_set_sensitive(c->add, FALSE); | 2434 gtk_widget_set_sensitive(c->add, FALSE); |
2436 gtk_widget_set_sensitive(c->add, FALSE); | 2438 gtk_widget_set_sensitive(c->add, FALSE); |
2437 gtk_object_set_user_data(GTK_OBJECT(c->add), c); | 2439 gtk_object_set_user_data(GTK_OBJECT(c->add), c); |
2438 } else { | 2440 } else { |
2439 if (gtk_object_get_user_data(GTK_OBJECT(c->add))) { | 2441 if (gtk_object_get_user_data(GTK_OBJECT(c->add))) { |
2440 gtk_widget_destroy(c->add); | 2442 gtk_widget_destroy(c->add); |
2441 c->add = gaim_pixbuf_button_from_stock(_("Add"), "gtk-add", GAIM_BUTTON_VERTICAL); | 2443 c->add = gaim_pixbuf_button_from_stock(dispstyle == 0 ? NULL : _("Add"), |
2444 dispstyle == 1 ? NULL : "gtk-add", | |
2445 GAIM_BUTTON_VERTICAL); | |
2442 rebuild = TRUE; | 2446 rebuild = TRUE; |
2443 } | 2447 } |
2444 if (c->gc) { | 2448 if (c->gc) { |
2445 if (c->gc->prpl->add_buddy == NULL) | 2449 if (c->gc->prpl->add_buddy == NULL) |
2446 gtk_widget_set_sensitive(c->add, FALSE); | 2450 gtk_widget_set_sensitive(c->add, FALSE); |