Mercurial > pidgin
comparison src/server.c @ 2768:8a918df1a5ed
[gaim-migrate @ 2781]
you can change your registered email address
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Mon, 19 Nov 2001 16:37:32 +0000 |
| parents | 8eb8db9a8449 |
| children | a0fd8f91e294 |
comparison
equal
deleted
inserted
replaced
| 2767:e5e78d42e49e | 2768:8a918df1a5ed |
|---|---|
| 29 #include <sys/types.h> | 29 #include <sys/types.h> |
| 30 #include <sys/stat.h> | 30 #include <sys/stat.h> |
| 31 #include <sys/time.h> | 31 #include <sys/time.h> |
| 32 #include <unistd.h> | 32 #include <unistd.h> |
| 33 #include <errno.h> | 33 #include <errno.h> |
| 34 #include "gtkimhtml.h" | |
| 34 #include "prpl.h" | 35 #include "prpl.h" |
| 35 #include "multi.h" | 36 #include "multi.h" |
| 36 #include "gaim.h" | 37 #include "gaim.h" |
| 37 #ifdef USE_APPLET | 38 #ifdef USE_APPLET |
| 38 #include "applet.h" | 39 #include "applet.h" |
| 39 #endif | 40 #endif |
| 40 | 41 |
| 41 #include "pixmaps/ok.xpm" | 42 #include "pixmaps/ok.xpm" |
| 42 #include "pixmaps/cancel.xpm" | 43 #include "pixmaps/cancel.xpm" |
| 44 #include "pixmaps/tb_search.xpm" | |
| 43 | 45 |
| 44 void serv_login(struct aim_user *user) | 46 void serv_login(struct aim_user *user) |
| 45 { | 47 { |
| 46 struct prpl *p = find_prpl(user->protocol); | 48 struct prpl *p = find_prpl(user->protocol); |
| 47 | 49 |
| 948 w = 0; | 950 w = 0; |
| 949 | 951 |
| 950 chat_write(b, who, w, buf, mtime); | 952 chat_write(b, who, w, buf, mtime); |
| 951 g_free(buf); | 953 g_free(buf); |
| 952 } | 954 } |
| 955 | |
| 956 static void des_popup(GtkWidget *w, GtkWidget *window) | |
| 957 { | |
| 958 if (w == window) { | |
| 959 char *u = gtk_object_get_user_data(GTK_OBJECT(window)); | |
| 960 g_free(u); | |
| 961 } | |
| 962 gtk_widget_destroy(window); | |
| 963 } | |
| 964 | |
| 965 void serv_got_popup(char *msg, char *u, int wid, int hei) | |
| 966 { | |
| 967 GtkWidget *window; | |
| 968 GtkWidget *vbox; | |
| 969 GtkWidget *sw; | |
| 970 GtkWidget *text; | |
| 971 GtkWidget *hbox; | |
| 972 GtkWidget *button; | |
| 973 char *url = g_strdup(u); | |
| 974 | |
| 975 GAIM_DIALOG(window); | |
| 976 gtk_window_set_wmclass(GTK_WINDOW(window), "popup", "Gaim"); | |
| 977 gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, TRUE); | |
| 978 gtk_window_set_title(GTK_WINDOW(window), "Gaim - Popup"); | |
| 979 gtk_container_set_border_width(GTK_CONTAINER(window), 5); | |
| 980 gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(des_popup), window); | |
| 981 gtk_object_set_user_data(GTK_OBJECT(window), url); | |
| 982 gtk_widget_realize(window); | |
| 983 aol_icon(window->window); | |
| 984 | |
| 985 vbox = gtk_vbox_new(FALSE, 5); | |
| 986 gtk_container_add(GTK_CONTAINER(window), vbox); | |
| 987 | |
| 988 sw = gtk_scrolled_window_new(NULL, NULL); | |
| 989 gtk_widget_set_usize(sw, wid, hei); | |
| 990 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
| 991 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 5); | |
| 992 | |
| 993 text = gtk_imhtml_new(NULL, NULL); | |
| 994 gtk_container_add(GTK_CONTAINER(sw), text); | |
| 995 gaim_setup_imhtml(text); | |
| 996 | |
| 997 hbox = gtk_hbox_new(FALSE, 5); | |
| 998 gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | |
| 999 | |
| 1000 button = picture_button(window, _("Close"), cancel_xpm); | |
| 1001 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); | |
| 1002 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(des_popup), window); | |
| 1003 | |
| 1004 button = picture_button(window, _("More Info"), tb_search_xpm); | |
| 1005 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); | |
| 1006 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(open_url_nw), url); | |
| 1007 | |
| 1008 gtk_widget_show_all(window); | |
| 1009 | |
| 1010 gtk_imhtml_append_text(GTK_IMHTML(text), msg, GTK_IMHTML_NO_NEWLINE); | |
| 1011 } |
