Mercurial > pidgin
changeset 754:bcae3ff49680
[gaim-migrate @ 764]
You can now optionally tell gaim to display text in the convo window buttons.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Thu, 24 Aug 2000 17:37:25 +0000 |
parents | cd62f69d187e |
children | 16c2682b5678 |
files | src/conversation.c src/dialogs.c src/gaim.h src/prefs.c src/util.c |
diffstat | 5 files changed, 42 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/src/conversation.c Thu Aug 24 01:05:26 2000 +0000 +++ b/src/conversation.c Thu Aug 24 17:37:25 2000 +0000 @@ -426,7 +426,7 @@ remove_buddy(find_group_by_buddy(c->name), find_buddy(c->name)); build_edit_tree(); gtk_widget_destroy(c->add_button); - c->add_button = picture_button2(c->window, NULL, gnome_add_xpm); + c->add_button = picture_button(c->window, NULL, gnome_add_xpm); gtk_signal_connect(GTK_OBJECT(c->add_button), "clicked", GTK_SIGNAL_FUNC(add_callback), c); gtk_box_pack_end(GTK_BOX(parent), c->add_button, FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(parent), c->add_button, 1); @@ -1484,7 +1484,8 @@ GtkWidget *paned; GtkWidget *add; GtkWidget *toolbar; - + int dispstyle; + win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, TRUE); @@ -1493,16 +1494,24 @@ c->window = win; + if (display_options & OPT_DISP_CONV_SHOW_TEXT) + { + dispstyle = TRUE; + } + else + { + dispstyle = FALSE; + } - send = picture_button2(win, _("Send"), tmp_send_xpm); - info = picture_button2(win, _("Info"), tb_search_xpm); - warn = picture_button2(win, _("Warn"), warn_xpm); - close = picture_button2(win, _("Close"), cancel_xpm); + send = picture_button2(win, _("Send"), tmp_send_xpm, dispstyle); + info = picture_button2(win, _("Info"), tb_search_xpm, dispstyle); + warn = picture_button2(win, _("Warn"), warn_xpm, dispstyle); + close = picture_button2(win, _("Close"), cancel_xpm, dispstyle); if (find_buddy(c->name) != NULL) - add = picture_button2(win, _("Remove"), gnome_remove_xpm); + add = picture_button2(win, _("Remove"), gnome_remove_xpm, dispstyle); else - add = picture_button2(win, _("Add"), gnome_add_xpm); - block = picture_button2(win, _("Block"), block_xpm); + add = picture_button2(win, _("Add"), gnome_add_xpm, dispstyle); + block = picture_button2(win, _("Block"), block_xpm, dispstyle); /* use a slicker look if the user wants to */ if (display_options & OPT_DISP_COOL_LOOK) @@ -1570,12 +1579,12 @@ gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(keypress_callback), c); gtk_widget_set_usize(entry, 300, 25); - gtk_box_pack_end(GTK_BOX(bbox), close, FALSE, FALSE, 0); - gtk_box_pack_end(GTK_BOX(bbox), add, FALSE, FALSE, 0); - gtk_box_pack_end(GTK_BOX(bbox), block, FALSE, FALSE, 0); - gtk_box_pack_end(GTK_BOX(bbox), warn, FALSE, FALSE, 0); - gtk_box_pack_end(GTK_BOX(bbox), info, FALSE, FALSE, 0); - gtk_box_pack_end(GTK_BOX(bbox), send, FALSE, FALSE, 0); + gtk_box_pack_end(GTK_BOX(bbox), close, dispstyle, dispstyle, 0); + gtk_box_pack_end(GTK_BOX(bbox), add, dispstyle, dispstyle, 0); + gtk_box_pack_end(GTK_BOX(bbox), block, dispstyle, dispstyle, 0); + gtk_box_pack_end(GTK_BOX(bbox), warn, dispstyle, dispstyle, 0); + gtk_box_pack_end(GTK_BOX(bbox), info, dispstyle, dispstyle, 0); + gtk_box_pack_end(GTK_BOX(bbox), send, dispstyle, dispstyle, 0); /* pack and fill the rest */ gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 5);
--- a/src/dialogs.c Thu Aug 24 01:05:26 2000 +0000 +++ b/src/dialogs.c Thu Aug 24 17:37:25 2000 +0000 @@ -782,7 +782,7 @@ if (c != NULL) { GtkWidget *parent = c->add_button->parent; gtk_widget_destroy(c->add_button); - c->add_button = picture_button2(c->window, NULL, gnome_remove_xpm); + c->add_button = picture_button(c->window, NULL, gnome_remove_xpm); gtk_signal_connect(GTK_OBJECT(c->add_button), "clicked", GTK_SIGNAL_FUNC(add_callback), c); gtk_box_pack_end(GTK_BOX(parent), c->add_button, FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(parent), c->add_button, 1);
--- a/src/gaim.h Thu Aug 24 01:05:26 2000 +0000 +++ b/src/gaim.h Thu Aug 24 17:37:25 2000 +0000 @@ -401,7 +401,7 @@ #define TYPE_SIGNOFF 4 #define TYPE_KEEPALIVE 5 -#define REVISION "gaim:$Revision: 756 $" +#define REVISION "gaim:$Revision: 764 $" #define FLAPON "FLAPON\r\n\r\n" #define ROAST "Tic/Toc" @@ -500,7 +500,8 @@ #define OPT_DISP_CHAT_LOGON 0x00000800 #define OPT_DISP_IGN_WHITE 0x00001000 #define OPT_DISP_NO_BUTTONS 0x00002000 - +#define OPT_DISP_CONV_SHOW_TEXT 0x00004000 + extern int sound_options; #define OPT_SOUND_LOGIN 0x00000001 #define OPT_SOUND_LOGOUT 0x00000002 @@ -581,7 +582,7 @@ extern void spell_checker(GtkWidget *); extern char *away_subs(char *, char *); extern GtkWidget *picture_button(GtkWidget *, char *, char **); -extern GtkWidget *picture_button2(GtkWidget *, char *, char **); +extern GtkWidget *picture_button2(GtkWidget *, char *, char **, short); extern void translate_lst (FILE *, char *); extern void translate_blt (FILE *, char *);
--- a/src/prefs.c Thu Aug 24 01:05:26 2000 +0000 +++ b/src/prefs.c Thu Aug 24 17:37:25 2000 +0000 @@ -628,9 +628,10 @@ gtk_widget_show(sep); gaim_button(_("Show graphical smileys"), &display_options, OPT_DISP_SHOW_SMILEY, box); + gaim_button(_("Show buttons with text"), &display_options, OPT_DISP_CONV_SHOW_TEXT, box); + gaim_button(_("Show timestamp on messages"), &display_options, OPT_DISP_SHOW_TIME, box); gaim_button(_("Ignore incoming colors"), &display_options, OPT_DISP_IGNORE_COLOUR, box); gaim_button(_("Ignore white backgrounds"), &display_options, OPT_DISP_IGN_WHITE, box); - gaim_button(_("Show timestamp on messages"), &display_options, OPT_DISP_SHOW_TIME, box); sep = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5);
--- a/src/util.c Thu Aug 24 01:05:26 2000 +0000 +++ b/src/util.c Thu Aug 24 17:37:25 2000 +0000 @@ -936,13 +936,14 @@ return button; } -GtkWidget *picture_button2(GtkWidget *window, char *text, char **xpm) +GtkWidget *picture_button2(GtkWidget *window, char *text, char **xpm, short showtext) { GtkWidget *button; GtkWidget *button_box, *button_box_2; GdkBitmap *mask; GdkPixmap *pm; GtkWidget *pixmap; + GtkWidget *label; GtkTooltips *tips; tips = gtk_tooltips_new(); @@ -953,12 +954,19 @@ button_box = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(button), button_box); - button_box_2 = gtk_hbox_new(FALSE, 0); + button_box_2 = gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(button_box), button_box_2, TRUE, TRUE, 0); pm = gdk_pixmap_create_from_xpm_d(window->window, &mask, NULL, xpm); pixmap = gtk_pixmap_new(pm, mask); - gtk_box_pack_end(GTK_BOX(button_box_2), pixmap, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(button_box_2), pixmap, FALSE, FALSE, 0); + + if (showtext == TRUE) + { + label = gtk_label_new(text); + gtk_widget_show(label); + gtk_box_pack_end(GTK_BOX(button_box_2), label, FALSE, FALSE, 0); + } gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);