Mercurial > pidgin
changeset 4089:7f4f3aa61069
[gaim-migrate @ 4304]
Changing the button style in Preferences no longer reverts conversation
windows to the old style. It should work now. Pictures, Text, and Pictures
& Text all work for IMs and chats here. However, there may be bugs, so let
me know.
Note that the style you select is not applied to newly created windows
during the same session or when gaim is restarted. This isn't my fault! :)
This probably broke during either the preferences or conversations rewrite.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 17 Dec 2002 04:44:00 +0000 |
parents | 97003c0ef184 |
children | 286d487a4fd7 |
files | src/buddy_chat.c src/prefs.c |
diffstat | 2 files changed, 60 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy_chat.c Tue Dec 17 03:36:40 2002 +0000 +++ b/src/buddy_chat.c Tue Dec 17 04:44:00 2002 +0000 @@ -1496,16 +1496,24 @@ g_free(b); } -static GtkWidget *change_text(GtkWidget *win, char *text, GtkWidget *button, char **xpm, int chat) +static GtkWidget *change_text(GtkWidget *win, char *text, GtkWidget *button, char *stock, int chat) { int dispstyle = set_dispstyle(chat); GtkWidget *parent = button->parent; gtk_widget_destroy(button); - button = picture_button2(win, text, xpm, dispstyle); + /* XXX button = picture_button2(win, text, xpm, dispstyle); */ + button = gaim_pixbuf_button_from_stock((dispstyle == 0 ? NULL : text), + (dispstyle == 1 ? NULL : stock), + GAIM_BUTTON_VERTICAL); +#if 0 if (chat == 1) gtk_box_pack_start(GTK_BOX(parent), button, dispstyle, dispstyle, 5); else gtk_box_pack_end(GTK_BOX(parent), button, dispstyle, dispstyle, 0); + + gtk_box_pack_start(GTK_BOX(parent), button, dispstyle, dispstyle, 0); +#endif + gtk_widget_show(button); return button; } @@ -1514,6 +1522,7 @@ { GSList *C = connections; struct gaim_connection *g; + GtkWidget *parent; while (C) { GSList *bcs; @@ -1524,19 +1533,21 @@ while (bcs) { c = (struct conversation *)bcs->data; - c->send = change_text(c->window, _("Send"), c->send, tmp_send_xpm, opt); - c->invite = change_text(c->window, _("Invite"), c->invite, join_xpm, opt); - /* - c->close = change_text(c->window, _("Close"), c->close, cancel_xpm, opt); - gtk_object_set_user_data(GTK_OBJECT(c->close), c); - gtk_signal_connect(GTK_OBJECT(c->close), "clicked", - GTK_SIGNAL_FUNC(close_callback), c); - */ + parent = c->send->parent; + + c->send = change_text(c->window, _("Send"), c->send, "gtk-convert", opt); + c->invite = change_text(c->window, _("Invite"), c->invite, "gtk-jump-to", opt); + gtk_box_pack_end(GTK_BOX(parent), c->send, FALSE, FALSE, 0); + gtk_box_pack_end(GTK_BOX(parent), c->invite, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(c->send), "clicked", GTK_SIGNAL_FUNC(send_callback), c); gtk_signal_connect(GTK_OBJECT(c->invite), "clicked", GTK_SIGNAL_FUNC(invite_callback), c); + gtk_button_set_relief(GTK_BUTTON(c->send), GTK_RELIEF_NONE); + gtk_button_set_relief(GTK_BUTTON(c->invite), GTK_RELIEF_NONE); + update_buttons_by_protocol(c); bcs = bcs->next; @@ -1556,28 +1567,45 @@ while (bcs) { c = (struct conversation *)bcs->data; parent = c->send->parent; -/* c->close = change_text(c->window, _("Close"), c->close, cancel_xpm, opt); - gtk_box_reorder_child(GTK_BOX(parent), c->close, 0); - gtk_box_set_child_packing(GTK_BOX(parent), c->sep1, dispstyle, dispstyle, 0, - GTK_PACK_END); - */ + + c->send = change_text(c->window, _("Send"), c->send, "gtk-convert", opt); + gtk_box_pack_end(GTK_BOX(parent), c->send, FALSE, FALSE, 0); + + c->warn = change_text(c->window, _("Warn"), c->warn, "gtk-dialog-warning", opt); + gtk_box_pack_start(GTK_BOX(parent), c->warn, FALSE, FALSE, 0); + c->block = change_text(c->window, _("Block"), c->block, "gtk-stop", opt); + gtk_box_pack_start(GTK_BOX(parent), c->block, FALSE, FALSE, 0); + if (find_buddy(c->gc, c->name) == NULL) - c->add = change_text(c->window, _("Add"), c->add, gnome_add_xpm, opt); + c->add = change_text(c->window, _("Add"), c->add, "gtk-add", opt); else - c->add = change_text(c->window, _("Remove"), c->add, gnome_remove_xpm, opt); - gtk_box_reorder_child(GTK_BOX(parent), c->add, 2); - c->block = change_text(c->window, _("Block"), c->block, block_xpm, opt); - gtk_box_reorder_child(GTK_BOX(parent), c->block, 3); - c->warn = change_text(c->window, _("Warn"), c->warn, warn_xpm, opt); - gtk_box_reorder_child(GTK_BOX(parent), c->warn, 4); - c->info = change_text(c->window, _("Info"), c->info, tb_search_xpm, opt); - gtk_box_reorder_child(GTK_BOX(parent), c->info, 5); - c->send = change_text(c->window, _("Send"), c->send, tmp_send_xpm, opt); - gtk_box_set_child_packing(GTK_BOX(parent), c->sep2, dispstyle, dispstyle, 0, - GTK_PACK_END); - gtk_box_reorder_child(GTK_BOX(parent), c->send, 7); - gtk_object_set_user_data(GTK_OBJECT(c->close), c); - gtk_signal_connect(GTK_OBJECT(c->close), "clicked", GTK_SIGNAL_FUNC(close_callback), c); + c->add = change_text(c->window, _("Remove"), c->add, "gtk-remove", opt); + gtk_box_pack_start(GTK_BOX(parent), c->add, FALSE, FALSE, 0); + c->info = change_text(c->window, _("Info"), c->info, "gtk-find", opt); + gtk_box_pack_start(GTK_BOX(parent), c->info, FALSE, FALSE, 0); + + gtk_button_set_relief(GTK_BUTTON(c->info), GTK_RELIEF_NONE); + gtk_button_set_relief(GTK_BUTTON(c->add), GTK_RELIEF_NONE); + gtk_button_set_relief(GTK_BUTTON(c->warn), GTK_RELIEF_NONE); + gtk_button_set_relief(GTK_BUTTON(c->send), GTK_RELIEF_NONE); + gtk_button_set_relief(GTK_BUTTON(c->block), GTK_RELIEF_NONE); + + gtk_size_group_add_widget(c->sg, c->info); + gtk_size_group_add_widget(c->sg, c->add); + gtk_size_group_add_widget(c->sg, c->warn); + gtk_size_group_add_widget(c->sg, c->send); + gtk_size_group_add_widget(c->sg, c->block); + + gtk_box_reorder_child(GTK_BOX(parent), c->warn, 1); + gtk_box_reorder_child(GTK_BOX(parent), c->block, 2); + gtk_box_reorder_child(GTK_BOX(parent), c->add, 3); + gtk_box_reorder_child(GTK_BOX(parent), c->info, 4); + gtk_box_reorder_child(GTK_BOX(parent), c->sep2, 5); + + + update_buttons_by_protocol(c); + + /* XXX gtk_signal_connect(GTK_OBJECT(c->close), "clicked", GTK_SIGNAL_FUNC(close_callback), c); */ gtk_signal_connect(GTK_OBJECT(c->send), "clicked", GTK_SIGNAL_FUNC(send_callback), c); gtk_signal_connect(GTK_OBJECT(c->add), "clicked", GTK_SIGNAL_FUNC(add_callback), c); gtk_signal_connect(GTK_OBJECT(c->info), "clicked", GTK_SIGNAL_FUNC(info_callback), c);
--- a/src/prefs.c Tue Dec 17 03:36:40 2002 +0000 +++ b/src/prefs.c Tue Dec 17 04:44:00 2002 +0000 @@ -1954,9 +1954,9 @@ update_im_button_pix(); } else if (option == (int*)&chat_options) { if (clear == (OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB)) - update_im_tabs(); + update_chat_tabs(); else if (clear == (OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM)) - update_im_button_pix(); + update_chat_button_pix(); } else if (option == (int*)&blist_options) { set_blist_tab(); }