Mercurial > pidgin.yaz
changeset 1210:265abea9db72
[gaim-migrate @ 1220]
Decklin is still trying to replace me, I think :-P
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 06 Dec 2000 21:39:56 +0000 |
parents | 7aec3f881c98 |
children | 892bb91e9a27 |
files | ChangeLog src/about.c src/buddy_chat.c src/dialogs.c src/prpl.c |
diffstat | 5 files changed, 196 insertions(+), 268 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Dec 06 02:49:01 2000 +0000 +++ b/ChangeLog Wed Dec 06 21:39:56 2000 +0000 @@ -2,6 +2,7 @@ version 0.11.0: * Away messages arranged alphabetically (Thanks Justin) + * More GUI adjustments version 0.11.0-pre2 (12/04/2000): * Fixed a segfault with a bad util.c
--- a/src/about.c Wed Dec 06 02:49:01 2000 +0000 +++ b/src/about.c Wed Dec 06 21:39:56 2000 +0000 @@ -31,6 +31,7 @@ #include "gaim.h" #include "pixmaps/logo.xpm" #include "pixmaps/cancel.xpm" +#include "pixmaps/about_small.xpm" static GtkWidget *about=NULL; @@ -56,7 +57,8 @@ void show_about(GtkWidget *w, void *null) { GtkWidget *vbox; - GtkWidget *table; + GtkWidget *frame; + GtkWidget *fbox; GtkWidget *a_table; GtkWidget *label; GtkWidget *pixmap; @@ -76,17 +78,21 @@ g_snprintf(abouttitle, sizeof(abouttitle), _("About GAIM v%s"), VERSION); gtk_window_set_title(GTK_WINDOW(about), abouttitle); gtk_window_set_wmclass(GTK_WINDOW(about), "about", "Gaim" ); - gtk_container_border_width(GTK_CONTAINER(about), 2); - gtk_widget_set_usize(about, 535, 255); - gtk_window_set_policy(GTK_WINDOW(about), FALSE, FALSE, TRUE); + gtk_window_set_policy(GTK_WINDOW(about), FALSE, TRUE, TRUE); - gtk_widget_show(about); + gtk_widget_realize(about); aol_icon(about->window); + vbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); + gtk_container_add(GTK_CONTAINER(about), vbox); - vbox = gtk_vbox_new(FALSE, 5); - - table = gtk_table_new(3, 2, FALSE); + frame = gtk_frame_new("Gaim " VERSION); + gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); + + fbox = gtk_hbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); + gtk_container_add(GTK_CONTAINER(frame), fbox); /* Left side, TOP */ style = gtk_widget_get_style(about); @@ -97,97 +103,60 @@ gdk_pixmap_unref(pm); gdk_bitmap_unref(bm); - gtk_table_attach(GTK_TABLE(table), pixmap, 0, 1, 0, 1, 0, 0, 5, 5); - gtk_widget_show(pixmap); - - - /* Right side, TOP*/ - hbox = gtk_vbox_new(FALSE, 5); - - label = gtk_label_new(_("GAIM is a client that supports AOL's Instant Messanger protocol. It is " - "written using Gtk+ and is licensed under the GPL.")); - gtk_widget_show(label); - gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - gtk_box_pack_start(GTK_BOX(hbox), label, GTK_EXPAND, FALSE, 0); + gtk_box_pack_start(GTK_BOX(fbox), pixmap, FALSE, FALSE, 0); /* Set up the author table */ - a_table = gtk_table_new(2, 5, FALSE); + a_table = gtk_table_new(6, 2, TRUE); + gtk_table_set_row_spacings(GTK_TABLE(a_table), 5); + gtk_table_set_col_spacings(GTK_TABLE(a_table), 5); + label = gtk_label_new(_("GAIM is a client that supports AOL's Instant Messenger protocol. " + "It is written using Gtk+ and is licensed under the GPL.\n" + "URL: http://www.marko.net/gaim/")); + gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); + gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 2, 0, 2); + /* Rob */ label = gtk_label_new("Rob Flynn (Maintainer)"); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - gtk_table_attach(GTK_TABLE(a_table), label, 0, 1, 1, 2, GTK_FILL, 0, 5, 5); + gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 2, 3); label = gtk_label_new("rob@tgflinux.com"); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - gtk_table_attach(GTK_TABLE(a_table), label, 1, 2, 1, 2, GTK_FILL, 0, 5, 5); + gtk_table_attach_defaults(GTK_TABLE(a_table), label, 1, 2, 2, 3); /* Eric */ label = gtk_label_new("Eric Warmenhoven"); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - gtk_table_attach(GTK_TABLE(a_table), label, 0, 1, 2, 3, GTK_FILL, 0, 5, 5); + gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 3, 4); label = gtk_label_new("warmenhoven@yahoo.com"); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - gtk_table_attach(GTK_TABLE(a_table), label, 1, 2, 2, 3, GTK_FILL, 0, 5, 5); + gtk_table_attach_defaults(GTK_TABLE(a_table), label, 1, 2, 3, 4); /* Jim */ label = gtk_label_new("Jim Duchek"); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - gtk_table_attach(GTK_TABLE(a_table), label, 0, 1, 3, 4, GTK_FILL, 0, 5, 5); + gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 4, 5); /* Mark */ label = gtk_label_new("Mark Spencer"); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - gtk_table_attach(GTK_TABLE(a_table), label, 0, 1, 4, 5, GTK_FILL, 0, 5, 5); + gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 5, 6); label = gtk_label_new("markster@marko.net"); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - gtk_table_attach(GTK_TABLE(a_table), label, 1, 2, 4, 5, GTK_FILL, 0, 5, 5); + gtk_table_attach_defaults(GTK_TABLE(a_table), label, 1, 2, 5, 6); - gtk_box_pack_start(GTK_BOX(hbox), a_table, TRUE, FALSE, 0); - - gtk_widget_show_all(a_table); - - /* End Author List */ - - gtk_table_attach(GTK_TABLE(table), hbox, 1, 3, 0, 1, 0, 0, 5, 5); - gtk_widget_show(hbox); - - /* Clickable URL */ - eventbox = gtk_event_box_new(); - gtk_table_attach(GTK_TABLE(table), eventbox, 0, 3, 1, 2, GTK_FILL, FALSE, 5, 5); - gtk_widget_show(eventbox); - - label = gtk_label_new("Gaim " VERSION " - http://www.marko.net/gaim/\n"); - gtk_container_add(GTK_CONTAINER(eventbox), label); - - gtk_signal_connect(GTK_OBJECT(eventbox), "button_press_event", - GTK_SIGNAL_FUNC(about_click), NULL); - gdk_window_set_cursor(eventbox->window, gdk_cursor_new(GDK_HAND2)); - gtk_widget_show(label); - - /* End Clickable URL */ + gtk_box_pack_start(GTK_BOX(fbox), a_table, TRUE, TRUE, 0); /* Close Button */ - button = picture_button(about, _("Close"), cancel_xpm); - hbox = gtk_hbox_new(FALSE, 5); - gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); - gtk_widget_show(hbox); - - /* End Button */ + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); - gtk_widget_show(vbox); - gtk_widget_show(table); - - - gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0); - gtk_box_pack_end(GTK_BOX(vbox), hbox, TRUE, TRUE, 0); - - gtk_container_add(GTK_CONTAINER(about), vbox); + button = picture_button(about, _("Close"), cancel_xpm); + gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); if (null != (void *)2) { /* 2 can be as sad as 1, it's the loneliest number since the number 1 */ @@ -201,18 +170,22 @@ gtk_signal_connect(GTK_OBJECT(about), "destroy", GTK_SIGNAL_FUNC(version_exit), NULL); } - - if (display_options & OPT_DISP_COOL_LOOK) - gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); - - GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); - gtk_widget_grab_default(button); + + /* this makes the sizes not work. */ + //GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); + //gtk_widget_grab_default(button); + button = picture_button(about, _("Web Site"), about_small_xpm); + gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + GTK_SIGNAL_FUNC(about_click), NULL); + if (display_options & OPT_DISP_COOL_LOOK) + gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); } - else - /* Let's give'em something to talk about -- woah woah woah */ - gtk_widget_show(about); + + /* Let's give'em something to talk about -- woah woah woah */ + gtk_widget_show_all(about); }
--- a/src/buddy_chat.c Wed Dec 06 02:49:01 2000 +0000 +++ b/src/buddy_chat.c Wed Dec 06 21:39:56 2000 +0000 @@ -90,8 +90,7 @@ struct gaim_connection *g; optmenu = gtk_option_menu_new(); - gtk_box_pack_start(GTK_BOX(box), optmenu, FALSE, FALSE, 5); - gtk_widget_show(optmenu); + gtk_box_pack_start(GTK_BOX(box), optmenu, FALSE, FALSE, 0); menu = gtk_menu_new(); @@ -114,97 +113,93 @@ void join_chat() { - GtkWidget *cancel; - GtkWidget *join; - GtkWidget *label; + GtkWidget *mainbox; + GtkWidget *frame; + GtkWidget *fbox; + GtkWidget *rowbox; GtkWidget *bbox; - GtkWidget *vbox; - GtkWidget *topbox; - GtkWidget *frame; + GtkWidget *join; + GtkWidget *cancel; + GtkWidget *label; GtkWidget *opt; - GtkWidget *hbox; if (!joinchat) { joinchat = gtk_window_new(GTK_WINDOW_DIALOG); gtk_window_set_wmclass(GTK_WINDOW(joinchat), "joinchat", "Gaim"); - gtk_window_set_policy(GTK_WINDOW(joinchat), FALSE, FALSE, TRUE); + gtk_window_set_policy(GTK_WINDOW(joinchat), FALSE, TRUE, TRUE); gtk_widget_realize(joinchat); gtk_signal_connect(GTK_OBJECT(joinchat), "delete_event", GTK_SIGNAL_FUNC(destroy_join_chat), joinchat); gtk_window_set_title(GTK_WINDOW(joinchat), _("Join Chat")); - gtk_container_set_border_width(GTK_CONTAINER(joinchat), 5); aol_icon(joinchat->window); - frame = gtk_frame_new(_("Buddy Chat")); - gtk_container_add(GTK_CONTAINER(joinchat), frame); - gtk_widget_show(frame); + mainbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); + gtk_container_add(GTK_CONTAINER(joinchat), mainbox); - vbox = gtk_vbox_new(FALSE, 5); - gtk_container_add(GTK_CONTAINER(frame), vbox); - gtk_widget_show(vbox); + frame = gtk_frame_new(_("Send Instant Message")); + gtk_box_pack_start(GTK_BOX(mainbox), frame, TRUE, TRUE, 0); + + fbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); + gtk_container_add(GTK_CONTAINER(frame), fbox); - topbox = gtk_hbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5); - gtk_widget_show(topbox); + rowbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(fbox), rowbox, TRUE, TRUE, 0); label = gtk_label_new(_("Join what group:")); - gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5); - gtk_widget_show(label); + gtk_box_pack_start(GTK_BOX(rowbox), label, FALSE, FALSE, 0); entry = gtk_entry_new(); - gtk_box_pack_start(GTK_BOX(topbox), entry, FALSE, FALSE, 5); + gtk_box_pack_start(GTK_BOX(rowbox), entry, TRUE, TRUE, 0); gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(do_join_chat), joinchat); gtk_window_set_focus(GTK_WINDOW(joinchat), entry); - gtk_widget_show(entry); #ifndef NO_MULTI - hbox = gtk_hbox_new(TRUE, 10); - gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 5); - gtk_widget_show(hbox); + rowbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(fbox), rowbox, TRUE, TRUE, 0); label = gtk_label_new(_("Join Chat As:")); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); - gtk_widget_show(label); + gtk_box_pack_start(GTK_BOX(rowbox), label, FALSE, FALSE, 0); - create_joinchat_menu(hbox); + create_joinchat_menu(rowbox); #else joinchatgc = connections->data; #endif - hbox = gtk_hbox_new(TRUE, 10); - gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 5); - gtk_widget_show(hbox); + rowbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(fbox), rowbox, TRUE, TRUE, 0); - opt = gtk_radio_button_new_with_label(NULL, - _("AIM Private Chats")); - gtk_box_pack_start(GTK_BOX(hbox), opt, FALSE, FALSE, 0); community = 0; + opt = gtk_radio_button_new_with_label(NULL, _("AIM Private Chats")); + gtk_box_pack_start(GTK_BOX(rowbox), opt, TRUE, TRUE, 0); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE); gtk_signal_connect(GTK_OBJECT(opt), "clicked", set_option, &community); gtk_widget_show(opt); - opt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(opt)), - _("AOL Community Chats")); - gtk_box_pack_start(GTK_BOX(hbox), opt, FALSE, FALSE, 0); - gtk_widget_show(opt); + opt = gtk_radio_button_new_with_label( + gtk_radio_button_group(GTK_RADIO_BUTTON(opt)), + _("AOL Community Chats")); + gtk_box_pack_start(GTK_BOX(rowbox), opt, TRUE, TRUE, 0); + + /* buttons */ - bbox = gtk_hbox_new(TRUE, 10); - gtk_box_pack_start(GTK_BOX(vbox), bbox, TRUE, TRUE, 5); - gtk_widget_show(bbox); + bbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(mainbox), bbox, FALSE, FALSE, 0); + + cancel = picture_button(joinchat, _("Cancel"), cancel_xpm); + gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(cancel), "clicked", + GTK_SIGNAL_FUNC(destroy_join_chat), joinchat); join = picture_button(joinchat, _("Join"), join_xpm); - gtk_box_pack_start(GTK_BOX(bbox), join, FALSE, FALSE, 5); + gtk_box_pack_end(GTK_BOX(bbox), join, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(join), "clicked", GTK_SIGNAL_FUNC(do_join_chat), joinchat); - - cancel = picture_button(joinchat, _("Cancel"), cancel_xpm); - gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 5); - gtk_signal_connect(GTK_OBJECT(cancel), "clicked", - GTK_SIGNAL_FUNC(destroy_join_chat), joinchat); } - gtk_widget_show(joinchat); + gtk_widget_show_all(joinchat); }
--- a/src/dialogs.c Wed Dec 06 02:49:01 2000 +0000 +++ b/src/dialogs.c Wed Dec 06 21:39:56 2000 +0000 @@ -630,52 +630,51 @@ void show_im_dialog() { + GtkWidget *mainbox; + GtkWidget *frame; + GtkWidget *fbox; + GtkWidget *bbox; GtkWidget *button; GtkWidget *imentry; - GtkWidget *vbox; - GtkWidget *ebox; - GtkWidget *bbox; GtkWidget *label; - GtkWidget *frame; - GtkWidget *fbox; if (!imdialog) { imdialog = gtk_window_new(GTK_WINDOW_DIALOG); gtk_window_set_wmclass(GTK_WINDOW(imdialog), "imdialog", "Gaim"); - gtk_widget_set_usize(imdialog, 255, 105); - gtk_container_border_width(GTK_CONTAINER(imdialog), 5); - gtk_window_set_policy(GTK_WINDOW(imdialog), FALSE, FALSE, TRUE); - gtk_widget_show(imdialog); - - bbox = gtk_hbox_new(TRUE, 10); - vbox = gtk_vbox_new(FALSE, 5); - ebox = gtk_hbox_new(FALSE, 2); - fbox = gtk_vbox_new(TRUE, 10); + gtk_window_set_policy(GTK_WINDOW(imdialog), FALSE, TRUE, TRUE); + gtk_widget_realize(imdialog); + + mainbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); + gtk_container_add(GTK_CONTAINER(imdialog), mainbox); frame = gtk_frame_new(_("Send Instant Message")); + gtk_box_pack_start(GTK_BOX(mainbox), frame, TRUE, TRUE, 0); - imentry = gtk_entry_new(); + bbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(mainbox), bbox, FALSE, FALSE, 0); + + button = picture_button(imdialog, _("Cancel"), cancel_xpm); + gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + GTK_SIGNAL_FUNC(destroy_dialog), imdialog); button = picture_button(imdialog, _("OK"), ok_xpm); - gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); + gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_im), imentry); - button = picture_button(imdialog, _("Cancel"), cancel_xpm); - gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); - gtk_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(destroy_dialog), imdialog); + fbox = gtk_hbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); + gtk_container_add(GTK_CONTAINER(frame), fbox); label = gtk_label_new(_("IM who:")); - gtk_box_pack_start(GTK_BOX(ebox), label, TRUE, TRUE, 10); - gtk_widget_show(label); - - gtk_box_pack_start(GTK_BOX(ebox), imentry, TRUE, TRUE, 10); - - gtk_box_pack_start(GTK_BOX(vbox), ebox, FALSE, FALSE, 5); - gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5); + gtk_box_pack_start(GTK_BOX(fbox), label, FALSE, FALSE, 0); + + imentry = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(fbox), imentry, TRUE, TRUE, 0); /* Handle closes right */ gtk_signal_connect(GTK_OBJECT(imentry), "activate", @@ -684,73 +683,62 @@ GTK_SIGNAL_FUNC(destroy_dialog), imdialog); /* Finish up */ - gtk_widget_show(ebox); - gtk_widget_show(imentry); - gtk_widget_show(bbox); - gtk_widget_show(vbox); - gtk_widget_show(fbox); - gtk_widget_show(frame); - gtk_container_add(GTK_CONTAINER(frame), vbox); - gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 5); gtk_window_set_title(GTK_WINDOW(imdialog), _("Gaim - IM user")); - gtk_container_add(GTK_CONTAINER(imdialog), fbox); gtk_widget_grab_focus(imentry); - gtk_widget_realize(imdialog); aol_icon(imdialog->window); - } - gtk_widget_show(imdialog); + gtk_widget_show_all(imdialog); } void show_info_dialog() { + GtkWidget *mainbox; + GtkWidget *frame; + GtkWidget *fbox; + GtkWidget *bbox; GtkWidget *button; GtkWidget *infoentry; - GtkWidget *vbox; - GtkWidget *ebox; - GtkWidget *bbox; GtkWidget *label; - GtkWidget *frame; - GtkWidget *fbox; if (!infodialog) { infodialog = gtk_window_new(GTK_WINDOW_DIALOG); gtk_window_set_wmclass(GTK_WINDOW(infodialog), "infodialog", "Gaim"); - gtk_widget_set_usize(infodialog, 255, 105); - gtk_container_border_width(GTK_CONTAINER(infodialog), 5); - gtk_window_set_policy(GTK_WINDOW(infodialog), FALSE, FALSE, TRUE); - gtk_widget_show(infodialog); - - bbox = gtk_hbox_new(TRUE, 10); - vbox = gtk_vbox_new(FALSE, 5); - ebox = gtk_hbox_new(FALSE, 2); - fbox = gtk_vbox_new(TRUE, 10); + gtk_window_set_policy(GTK_WINDOW(infodialog), FALSE, TRUE, TRUE); + gtk_widget_realize(infodialog); + + mainbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); + gtk_container_add(GTK_CONTAINER(infodialog), mainbox); frame = gtk_frame_new(_("Get User Info")); + gtk_box_pack_start(GTK_BOX(mainbox), frame, TRUE, TRUE, 0); - infoentry = gtk_entry_new(); + bbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(mainbox), bbox, FALSE, FALSE, 0); + + button = picture_button(infodialog, _("Cancel"), cancel_xpm); + gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + GTK_SIGNAL_FUNC(destroy_dialog), infodialog); button = picture_button(infodialog, _("OK"), ok_xpm); - gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); + gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_info), infoentry); - button = picture_button(infodialog, _("Cancel"), cancel_xpm); - gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); - gtk_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(destroy_dialog), infodialog); + fbox = gtk_hbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); + gtk_container_add(GTK_CONTAINER(frame), fbox); label = gtk_label_new(_("User:")); - gtk_box_pack_start(GTK_BOX(ebox), label, TRUE, TRUE, 10); + gtk_box_pack_start(GTK_BOX(fbox), label, FALSE, FALSE, 0); gtk_widget_show(label); - gtk_box_pack_start(GTK_BOX(ebox), infoentry, TRUE, TRUE, 10); - - gtk_box_pack_start(GTK_BOX(vbox), ebox, FALSE, FALSE, 5); - gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5); + infoentry = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(fbox), infoentry, TRUE, TRUE, 10); /* Handle closes right */ gtk_signal_connect(GTK_OBJECT(infoentry), "activate", @@ -759,23 +747,12 @@ GTK_SIGNAL_FUNC(destroy_dialog), infodialog); /* Finish up */ - gtk_widget_show(ebox); - gtk_widget_show(infoentry); - gtk_widget_show(bbox); - gtk_widget_show(vbox); - gtk_widget_show(fbox); - gtk_widget_show(frame); - gtk_container_add(GTK_CONTAINER(frame), vbox); - gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 5); gtk_window_set_title(GTK_WINDOW(infodialog), _("Gaim - Get User Info")); - gtk_container_add(GTK_CONTAINER(infodialog), fbox); gtk_widget_grab_focus(infoentry); - gtk_widget_realize(infodialog); aol_icon(infodialog->window); - } - gtk_widget_show(infodialog); + gtk_widget_show_all(infodialog); } @@ -938,24 +915,22 @@ void show_add_buddy(struct gaim_connection *gc, char *buddy, char *group) { + GtkWidget *mainbox; + GtkWidget *frame; + GtkWidget *table; + GtkWidget *bbox; GtkWidget *cancel; GtkWidget *add; GtkWidget *label; - GtkWidget *bbox; - GtkWidget *vbox; - GtkWidget *topbox; - GtkWidget *topbox1; - GtkWidget *topbox2; - GtkWidget *frame; struct addbuddy *a = g_new0(struct addbuddy, 1); a->gc = gc; - + a->window = gtk_window_new(GTK_WINDOW_DIALOG); gtk_window_set_wmclass(GTK_WINDOW(a->window), "add_buddy", "Gaim"); gtk_window_set_policy(GTK_WINDOW(a->window), FALSE, FALSE, TRUE); gtk_window_set_title(GTK_WINDOW(a->window), _("Gaim - Add Buddy")); - gtk_container_set_border_width(GTK_CONTAINER(a->window), 5); + gtk_widget_realize(a->window); aol_icon(a->window->window); gtk_signal_connect(GTK_OBJECT(a->window), "destroy", @@ -964,75 +939,61 @@ GTK_SIGNAL_FUNC(free_dialog), a); dialogwindows = g_list_prepend(dialogwindows, a->window); + mainbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); + gtk_container_add(GTK_CONTAINER(a->window), mainbox); + frame = gtk_frame_new(_("Add Buddy")); - gtk_container_add(GTK_CONTAINER(a->window), frame); + gtk_box_pack_start(GTK_BOX(mainbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); - vbox = gtk_vbox_new(FALSE, 5); - gtk_container_add(GTK_CONTAINER(frame), vbox); - gtk_widget_show(vbox); - - topbox = gtk_hbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5); - gtk_widget_show(topbox); + table = gtk_table_new(3, 2, FALSE); + gtk_table_set_row_spacings(GTK_TABLE(table), 5); + gtk_table_set_col_spacings(GTK_TABLE(table), 5); + gtk_container_set_border_width(GTK_CONTAINER(table), 5); + gtk_container_add(GTK_CONTAINER(frame), table); label = gtk_label_new(_("Buddy")); - gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5); - gtk_widget_show(label); + gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1); a->entry = gtk_entry_new(); - gtk_box_pack_end(GTK_BOX(topbox), a->entry, FALSE, FALSE, 5); + gtk_table_attach_defaults(GTK_TABLE(table), a->entry, 1, 2, 0, 1); gtk_window_set_focus(GTK_WINDOW(a->window), a->entry); if (buddy != NULL) gtk_entry_set_text(GTK_ENTRY(a->entry), buddy); gtk_signal_connect(GTK_OBJECT(a->entry), "activate", GTK_SIGNAL_FUNC(do_add_buddy), a); - gtk_widget_show(a->entry); - - topbox1 = gtk_hbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(vbox), topbox1, TRUE, TRUE, 5); - gtk_widget_show(topbox1); label = gtk_label_new(_("Alias")); - gtk_box_pack_start(GTK_BOX(topbox1), label, FALSE, FALSE, 5); - gtk_widget_show(label); + gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2); a->entry_for_alias = gtk_entry_new(); - gtk_box_pack_end(GTK_BOX(topbox1), a->entry_for_alias, FALSE, FALSE, 5); - gtk_widget_show(a->entry_for_alias); - - topbox2 = gtk_hbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(vbox), topbox2, TRUE, TRUE, 5); - gtk_widget_show(topbox2); + gtk_table_attach_defaults(GTK_TABLE(table), a->entry_for_alias, 1, 2, 1, 2); label = gtk_label_new(_("Group")); - gtk_box_pack_start(GTK_BOX(topbox2), label, FALSE, FALSE, 5); - gtk_widget_show(label); + gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2, 3); a->combo = gtk_combo_new(); - gtk_combo_set_popdown_strings(GTK_COMBO(a->combo), groups_tree(gc ? gc : connections->data)); + gtk_combo_set_popdown_strings(GTK_COMBO(a->combo), + groups_tree(gc ? gc : connections->data)); if (group != NULL) gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry), group); - gtk_box_pack_end(GTK_BOX(topbox2), a->combo, FALSE, FALSE, 5); - gtk_widget_show(a->combo); - - bbox = gtk_hbox_new(TRUE, 10); - gtk_box_pack_start(GTK_BOX(vbox), bbox, TRUE, TRUE, 5); - gtk_widget_show(bbox); + gtk_table_attach_defaults(GTK_TABLE(table), a->combo, 1, 2, 2, 3); + + bbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(mainbox), bbox, TRUE, TRUE, 0); + + cancel = picture_button(a->window, _("Cancel"), cancel_xpm); + gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(cancel), "clicked", + GTK_SIGNAL_FUNC(destroy_dialog), a->window); add = picture_button(a->window, _("Add"), add_xpm); - gtk_box_pack_start(GTK_BOX(bbox), add, FALSE, FALSE, 5); + gtk_box_pack_end(GTK_BOX(bbox), add, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(add), "clicked", GTK_SIGNAL_FUNC(do_add_buddy), a); - gtk_widget_show(add); - - cancel = picture_button(a->window, _("Cancel"), cancel_xpm); - gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 5); - gtk_signal_connect(GTK_OBJECT(cancel), "clicked", - GTK_SIGNAL_FUNC(destroy_dialog), a->window); - gtk_widget_show(cancel); - gtk_widget_show(a->window); + gtk_widget_show_all(a->window); }
--- a/src/prpl.c Wed Dec 06 02:49:01 2000 +0000 +++ b/src/prpl.c Wed Dec 06 21:39:56 2000 +0000 @@ -101,42 +101,40 @@ void do_ask_dialog(const char *text, void *data, void *doit, void *dont) { GtkWidget *window; - GtkWidget *box; + GtkWidget *vbox; GtkWidget *label; GtkWidget *hbox; GtkWidget *button; window = gtk_window_new(GTK_WINDOW_DIALOG); gtk_window_set_wmclass(GTK_WINDOW(window), "accept", "Gaim"); - gtk_window_set_policy(GTK_WINDOW(window), 0, 0, 1); - gtk_window_set_title(GTK_WINDOW(window), _("Accept?")); + gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, TRUE); + gtk_window_set_title(GTK_WINDOW(window), _("Accept?")); gtk_widget_realize(window); aol_icon(window->window); if (dont) gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(dont), data); - box = gtk_vbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(window), box); - gtk_widget_show(box); + vbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); + gtk_container_add(GTK_CONTAINER(window), vbox); label = gtk_label_new(text); - gtk_box_pack_start(GTK_BOX(box), label, 0, 0, 5); - gtk_widget_show(label); + gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); - hbox = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(box), hbox, 0, 0, 1); - gtk_widget_show(hbox); + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); + + button = picture_button(window, _("Cancel"), cancel_xpm); + gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(des_win), window); button = picture_button(window, _("Accept"), ok_xpm); - gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 5); + gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_object_set_user_data(GTK_OBJECT(button), data); if (doit) gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(doit), data); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(rem_win), window); - button = picture_button(window, _("Cancel"), cancel_xpm); - gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 5); - gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(des_win), window); - - gtk_widget_show(window); + gtk_widget_show_all(window); }