Mercurial > pidgin.yaz
comparison src/dialogs.c @ 7081:73da9c3ad9ac
[gaim-migrate @ 7646]
show_find_info() is gone.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 30 Sep 2003 22:49:00 +0000 |
parents | fc9c74cfb306 |
children | 807aba537663 |
comparison
equal
deleted
inserted
replaced
7080:fc9c74cfb306 | 7081:73da9c3ad9ac |
---|---|
984 gtk_widget_show(gtkconv->dialogs.log); | 984 gtk_widget_show(gtkconv->dialogs.log); |
985 gdk_window_raise(gtkconv->dialogs.log->window); | 985 gdk_window_raise(gtkconv->dialogs.log->window); |
986 } | 986 } |
987 | 987 |
988 /*------------------------------------------------------*/ | 988 /*------------------------------------------------------*/ |
989 /* Find Buddy By Email */ | |
990 /*------------------------------------------------------*/ | |
991 | |
992 void do_find_info(GtkWidget *w, struct findbyinfo *b) | |
993 { | |
994 const char *first; | |
995 const char *middle; | |
996 const char *last; | |
997 const char *maiden; | |
998 const char *city; | |
999 const char *state; | |
1000 const char *country; | |
1001 | |
1002 first = gtk_entry_get_text(GTK_ENTRY(b->firstentry)); | |
1003 middle = gtk_entry_get_text(GTK_ENTRY(b->middleentry)); | |
1004 last = gtk_entry_get_text(GTK_ENTRY(b->lastentry)); | |
1005 maiden = gtk_entry_get_text(GTK_ENTRY(b->maidenentry)); | |
1006 city = gtk_entry_get_text(GTK_ENTRY(b->cityentry)); | |
1007 state = gtk_entry_get_text(GTK_ENTRY(b->stateentry)); | |
1008 country = gtk_entry_get_text(GTK_ENTRY(b->countryentry)); | |
1009 | |
1010 serv_dir_search(b->gc, first, middle, last, maiden, city, state, country, ""); | |
1011 destroy_dialog(NULL, b->window); | |
1012 } | |
1013 | |
1014 void show_find_info(GaimConnection *gc) | |
1015 { | |
1016 GtkWidget *cancel; | |
1017 GtkWidget *ok; | |
1018 GtkWidget *label; | |
1019 GtkWidget *bbox; | |
1020 GtkWidget *vbox; | |
1021 GtkWidget *hbox; | |
1022 GtkWidget *fbox; | |
1023 GtkWidget *frame; | |
1024 | |
1025 struct findbyinfo *b = g_new0(struct findbyinfo, 1); | |
1026 b->gc = gc; | |
1027 GAIM_DIALOG(b->window); | |
1028 gtk_window_set_resizable(GTK_WINDOW(b->window), TRUE); | |
1029 gtk_window_set_role(GTK_WINDOW(b->window), "find_info"); | |
1030 | |
1031 dialogwindows = g_list_prepend(dialogwindows, b->window); | |
1032 | |
1033 frame = gtk_frame_new(_("Search for Buddy")); | |
1034 fbox = gtk_vbox_new(FALSE, 5); | |
1035 | |
1036 /* Build OK Button */ | |
1037 | |
1038 ok = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); | |
1039 cancel = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); | |
1040 | |
1041 bbox = gtk_hbox_new(FALSE, 5); | |
1042 vbox = gtk_vbox_new(FALSE, 5); | |
1043 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | |
1044 | |
1045 b->firstentry = gtk_entry_new(); | |
1046 b->middleentry = gtk_entry_new(); | |
1047 b->lastentry = gtk_entry_new(); | |
1048 b->maidenentry = gtk_entry_new(); | |
1049 b->cityentry = gtk_entry_new(); | |
1050 b->stateentry = gtk_entry_new(); | |
1051 b->countryentry = gtk_entry_new(); | |
1052 | |
1053 gtk_box_pack_end(GTK_BOX(bbox), ok, FALSE, FALSE, 0); | |
1054 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 0); | |
1055 | |
1056 /* Line 1 */ | |
1057 label = gtk_label_new(_("First Name")); | |
1058 | |
1059 hbox = gtk_hbox_new(FALSE, 5); | |
1060 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
1061 gtk_box_pack_end(GTK_BOX(hbox), b->firstentry, FALSE, FALSE, 0); | |
1062 | |
1063 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1064 | |
1065 /* Line 2 */ | |
1066 | |
1067 label = gtk_label_new(_("Middle Name")); | |
1068 | |
1069 hbox = gtk_hbox_new(FALSE, 5); | |
1070 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
1071 gtk_box_pack_end(GTK_BOX(hbox), b->middleentry, FALSE, FALSE, 0); | |
1072 | |
1073 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1074 | |
1075 /* Line 3 */ | |
1076 | |
1077 label = gtk_label_new(_("Last Name")); | |
1078 | |
1079 hbox = gtk_hbox_new(FALSE, 5); | |
1080 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
1081 gtk_box_pack_end(GTK_BOX(hbox), b->lastentry, FALSE, FALSE, 0); | |
1082 | |
1083 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1084 | |
1085 /* Line 4 */ | |
1086 | |
1087 label = gtk_label_new(_("Maiden Name")); | |
1088 | |
1089 hbox = gtk_hbox_new(FALSE, 5); | |
1090 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
1091 gtk_box_pack_end(GTK_BOX(hbox), b->maidenentry, FALSE, FALSE, 0); | |
1092 | |
1093 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1094 | |
1095 /* Line 5 */ | |
1096 | |
1097 label = gtk_label_new(_("City")); | |
1098 | |
1099 hbox = gtk_hbox_new(FALSE, 5); | |
1100 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
1101 gtk_box_pack_end(GTK_BOX(hbox), b->cityentry, FALSE, FALSE, 0); | |
1102 | |
1103 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1104 | |
1105 /* Line 6 */ | |
1106 label = gtk_label_new(_("State")); | |
1107 | |
1108 hbox = gtk_hbox_new(FALSE, 5); | |
1109 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
1110 gtk_box_pack_end(GTK_BOX(hbox), b->stateentry, FALSE, FALSE, 0); | |
1111 | |
1112 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1113 | |
1114 /* Line 7 */ | |
1115 label = gtk_label_new(_("Country")); | |
1116 | |
1117 hbox = gtk_hbox_new(FALSE, 5); | |
1118 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
1119 gtk_box_pack_end(GTK_BOX(hbox), b->countryentry, FALSE, FALSE, 0); | |
1120 | |
1121 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1122 | |
1123 /* Merge The Boxes */ | |
1124 | |
1125 gtk_container_add(GTK_CONTAINER(frame), vbox); | |
1126 gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 0); | |
1127 gtk_box_pack_start(GTK_BOX(fbox), bbox, FALSE, FALSE, 0); | |
1128 | |
1129 g_signal_connect(G_OBJECT(b->window), "destroy", G_CALLBACK(destroy_dialog), b->window); | |
1130 g_signal_connect(G_OBJECT(cancel), "clicked", G_CALLBACK(destroy_dialog), b->window); | |
1131 g_signal_connect(G_OBJECT(ok), "clicked", G_CALLBACK(do_find_info), b); | |
1132 | |
1133 gtk_window_set_title(GTK_WINDOW(b->window), _("Find Buddy By Info")); | |
1134 gtk_window_set_focus(GTK_WINDOW(b->window), b->firstentry); | |
1135 gtk_container_add(GTK_CONTAINER(b->window), fbox); | |
1136 gtk_container_set_border_width(GTK_CONTAINER(b->window), 5); | |
1137 gtk_widget_realize(b->window); | |
1138 | |
1139 gtk_widget_show_all(b->window); | |
1140 } | |
1141 | |
1142 /*------------------------------------------------------*/ | |
1143 /* Link Dialog */ | 989 /* Link Dialog */ |
1144 /*------------------------------------------------------*/ | 990 /*------------------------------------------------------*/ |
1145 | 991 |
1146 void cancel_link(GtkWidget *widget, GaimConversation *c) | 992 void cancel_link(GtkWidget *widget, GaimConversation *c) |
1147 { | 993 { |