Mercurial > pidgin.yaz
changeset 443:a86882c351f0
[gaim-migrate @ 453]
More UI updates. I got tired -- Ill finish later.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Thu, 29 Jun 2000 09:04:28 +0000 |
parents | fbf45eb2cd4e |
children | e7885c54ed2f |
files | pixmaps/Makefile.am pixmaps/ok.xpm src/dialogs.c |
diffstat | 3 files changed, 111 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/pixmaps/Makefile.am Thu Jun 29 08:46:09 2000 +0000 +++ b/pixmaps/Makefile.am Thu Jun 29 09:04:28 2000 +0000 @@ -16,7 +16,7 @@ daemon-buddyadd.xpm daemon-buddychat.xpm daemon-buddydel.xpm \ daemon-im.xpm daemon-info.xpm daemon-permadd.xpm \ daemon-permdel.xpm daemon.xpm fontface.xpm smile_happy.xpm \ - smile_sad.xpm smile_wink.xpm save.xpm cancel.xpm + smile_sad.xpm smile_wink.xpm save.xpm cancel.xpm ok.xpm pixmapdir = $(datadir)/pixmaps pixmap_DATA = gaim.xpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pixmaps/ok.xpm Thu Jun 29 09:04:28 2000 +0000 @@ -0,0 +1,45 @@ +/* XPM */ +static char * ok_xpm[] = { +"24 24 18 1", +" c None", +". c #000000", +"+ c #B3C2A7", +"@ c #708C58", +"# c #859D71", +"$ c #627B4D", +"% c #97AB86", +"& c #566C43", +"* c #A2BD9E", +"= c #789774", +"- c #88AC84", +"; c #5E764A", +"> c #698566", +", c #6D8855", +"' c #688251", +") c #668050", +"! c #6D8956", +"~ c #4F633E", +" ", +" ", +" ", +" ", +" ", +" ", +" .. ", +" .+@. ", +" .#$. ", +" .%@. ", +" .. .#&. ", +" .*=. .#@. ", +" .--.. .@&. ", +" .-=..;@. ", +" .-->.,&. ", +" .--'). ", +" .-!~. ", +" .--. ", +" .>. ", +" . ", +" ", +" ", +" ", +" "};
--- a/src/dialogs.c Thu Jun 29 08:46:09 2000 +0000 +++ b/src/dialogs.c Thu Jun 29 09:04:28 2000 +0000 @@ -42,6 +42,7 @@ #include "pixmaps/cancel.xpm" #include "pixmaps/save.xpm" +#include "pixmaps/ok.xpm" #define DEFAULT_FONT_NAME "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1" @@ -862,27 +863,84 @@ void show_new_bp(char *name) { - GtkWidget *cancel; - GtkWidget *ok; GtkWidget *label; GtkWidget *bbox; GtkWidget *vbox; + GtkWidget *icon_i; + GdkPixmap *icon; + GdkBitmap *mask; + GtkWidget *button; + GtkWidget *button_box; struct addbp *b = g_new0(struct addbp, 1); b->window = gtk_window_new(GTK_WINDOW_DIALOG); + gtk_widget_show(b->window); dialogwindows = g_list_prepend(dialogwindows, b->window); - cancel = gtk_button_new_with_label(_("Cancel")); - ok = gtk_button_new_with_label(_("OK")); bbox = gtk_hbox_new(TRUE, 10); vbox = gtk_vbox_new(FALSE, 5); b->nameentry = gtk_entry_new(); b->messentry = gtk_entry_new(); + + /* Build OK Button */ + + button = gtk_button_new(); + + button_box = gtk_hbox_new(FALSE, 5); + icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, ok_xpm); + icon_i = gtk_pixmap_new(icon, mask); + + label = gtk_label_new(_("OK")); + + gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2); + gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2); + + gtk_widget_show(label); + gtk_widget_show(icon_i); + + gtk_widget_show(button_box); + + gtk_container_add(GTK_CONTAINER(button), button_box); + + gtk_signal_connect(GTK_OBJECT(button), "clicked", + GTK_SIGNAL_FUNC(do_new_bp), b); + + gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); + + gtk_widget_show(button); + + /* End of OK Button */ + + /* Build Cancel Button */ + + button = gtk_button_new(); + + button_box = gtk_hbox_new(FALSE, 5); + icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, cancel_xpm); + icon_i = gtk_pixmap_new(icon, mask); + + label = gtk_label_new(_("Cancel")); + + gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2); + gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2); + + gtk_widget_show(label); + gtk_widget_show(icon_i); + + gtk_widget_show(button_box); + + gtk_container_add(GTK_CONTAINER(button), button_box); + + gtk_signal_connect(GTK_OBJECT(button), "clicked", + GTK_SIGNAL_FUNC(destroy_dialog), b->window); + + gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); + + gtk_widget_show(button); + + /* End of Cancel Button */ /* Put the buttons in the box */ - gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 10); - gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10); - label = gtk_label_new(_("Buddy To Pounce:")); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); @@ -911,17 +969,11 @@ /* Handle closes right */ gtk_signal_connect(GTK_OBJECT(b->window), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), b->window); - gtk_signal_connect(GTK_OBJECT(cancel), "clicked", - GTK_SIGNAL_FUNC(destroy_dialog), b->window); - gtk_signal_connect(GTK_OBJECT(ok), "clicked", - GTK_SIGNAL_FUNC(do_new_bp), b); gtk_signal_connect(GTK_OBJECT(b->messentry), "activate", GTK_SIGNAL_FUNC(do_new_bp), b); /* Finish up */ - gtk_widget_show(ok); - gtk_widget_show(cancel); gtk_widget_show(b->nameentry); gtk_widget_show(b->messentry); gtk_widget_show(bbox); @@ -936,8 +988,6 @@ gtk_container_border_width(GTK_CONTAINER(b->window), 10); gtk_widget_realize(b->window); aol_icon(b->window->window); - - gtk_widget_show(b->window); }