Mercurial > pidgin
changeset 2906:538c58b43eff
[gaim-migrate @ 2919]
save
save me from this
wandered around the town
all the thousand things
i might miss
and you
think we'll suffer much
think we'll close our eyes
just to see the light
pass us by
with tomorrow coming
hope that i don't let you
down again
said i'm so glad to be here
does it mean a thing
if only i could breathe what you breathe
if only i could see what you see
sit
we'll take our time
watching the flowers grow
all the friends we've known
say goodbye
and you
did you suffer much
did you close your eyes
just to see the night
rush on by
gathered all around you
hope that we don't let you
down again
i said i'm so glad to be here
does it mean a thing
if only i could breathe what you breathe
if only i could see what you see
i said i'm so glad to be here
does it mean a thing
if only i could breathe what you breathe
if only i could see what you see
if only i could just believe a thing
--Moist, "Breathe" (as transcribed by http://www.veddma.com/veddma/moist.htm)
Patches from:
Ari Pollak
Ben Miller
Mark Doliner
Sean Egan
Vincas Ciziunas
Thanks everyone.
Somewhere in the middle of all of this it started to get really tedious and annoying. I think it's getting close to the point where I quit.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 21 Dec 2001 10:23:04 +0000 |
parents | a090e98dbbb6 |
children | 28cd1b9d08a1 |
files | ChangeLog plugins/filectl.c plugins/spellchk.c src/away.c src/buddy.c src/dialogs.c src/gaim.h src/gaimrc.c src/prefs.c src/protocols/oscar/oscar.c src/proxy.c src/server.c src/ui.h |
diffstat | 13 files changed, 116 insertions(+), 55 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Dec 20 21:01:59 2001 +0000 +++ b/ChangeLog Fri Dec 21 10:23:04 2001 +0000 @@ -1,6 +1,14 @@ Gaim: The Pimpin' Penguin IM Clone thats good for the soul! version 0.51: + * Arrow buttons in log viewer and some other dialogs + work (thanks Ben Miller) + * Option to only send auto-response while idle (thanks + Sean Egan) + * Control time between sending auto-responses (thanks + Mark Doliner) + * Should be able to sign on to Oscar using Mac OS X + (thanks Fingolfin, Vincas Ciziunas, et al.) version 0.50 (12/14/2001): * Updated polish translation (Thanks Przemyslaw Sulek)
--- a/plugins/filectl.c Thu Dec 20 21:01:59 2001 +0000 +++ b/plugins/filectl.c Fri Dec 21 10:23:04 2001 +0000 @@ -77,7 +77,7 @@ arg2 = getarg(buffer, 2, 1); c = find_conversation(arg1); if (!c) c = new_conversation(arg1); - write_to_conv(c, arg2, WFLAG_SEND, NULL, time(NULL)); + write_to_conv(c, arg2, WFLAG_SEND, NULL, time(NULL), -1); serv_send_im(c->gc, arg1, arg2, 0); free(arg1); free(arg2);
--- a/plugins/spellchk.c Thu Dec 20 21:01:59 2001 +0000 +++ b/plugins/spellchk.c Fri Dec 21 10:23:04 2001 +0000 @@ -360,6 +360,7 @@ GAIM_DIALOG(configwin); gtk_widget_set_usize(configwin, 450, 250); gtk_window_set_title(GTK_WINDOW(configwin), "Spell Check Config"); + gtk_signal_connect(GTK_OBJECT(configwin), "destroy", GTK_SIGNAL_FUNC(close_config), NULL); vbox = gtk_vbox_new(0, 2); gtk_container_set_border_width(GTK_CONTAINER(vbox), 4);
--- a/src/away.c Thu Dec 20 21:01:59 2001 +0000 +++ b/src/away.c Fri Dec 21 10:23:04 2001 +0000 @@ -219,6 +219,8 @@ awaytext = gtk_imhtml_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(sw), awaytext); + GTK_LAYOUT(awaytext)->hadjustment->step_increment = 10.0; + GTK_LAYOUT(awaytext)->vadjustment->step_increment = 10.0; gaim_setup_imhtml(awaytext); gtk_widget_show(awaytext); buf = stylize(a->message, BUF_LONG);
--- a/src/buddy.c Thu Dec 20 21:01:59 2001 +0000 +++ b/src/buddy.c Fri Dec 21 10:23:04 2001 +0000 @@ -2113,6 +2113,14 @@ char tmp[1024]; g_snprintf(tmp, sizeof(tmp), _("%s logged in."), b->name); write_to_conv(c, tmp, WFLAG_SYSTEM, NULL, time(NULL), -1); + } else if (clistqueue && find_queue_total_by_name(b->name)) { + struct queued_message *qm = g_new0(struct queued_message, 1); + qm->message = g_strdup_printf(_("%s logged in."), b->name); + qm->gc = gc; + qm->tm = time(NULL); + qm->flags = WFLAG_SYSTEM; + qm->len = -1; + message_queue = g_slist_append(message_queue, qm); } } bs->sound = 2; @@ -2168,6 +2176,14 @@ char tmp[1024]; g_snprintf(tmp, sizeof(tmp), _("%s logged out."), b->name); write_to_conv(c, tmp, WFLAG_SYSTEM, NULL, time(NULL), -1); + } else if (clistqueue && find_queue_total_by_name(b->name)) { + struct queued_message *qm = g_new0(struct queued_message, 1); + qm->message = g_strdup_printf(_("%s logged out."), b->name); + qm->gc = gc; + qm->tm = time(NULL); + qm->flags = WFLAG_SYSTEM; + qm->len = -1; + message_queue = g_slist_append(message_queue, qm); } }
--- a/src/dialogs.c Thu Dec 20 21:01:59 2001 +0000 +++ b/src/dialogs.c Fri Dec 21 10:23:04 2001 +0000 @@ -1853,8 +1853,6 @@ gtk_imhtml_append_text(GTK_IMHTML(b->text), more_info, -1, options); va_end(ap); - gtk_imhtml_append_text(GTK_IMHTML(b->text), "<BR>", -1, 0); - if (away) info_dlgs = g_slist_remove(info_dlgs, b); else @@ -3769,6 +3767,8 @@ gtk_signal_connect(GTK_OBJECT(layout), "url_clicked", GTK_SIGNAL_FUNC(open_url), NULL); gtk_container_add(GTK_CONTAINER(sw), layout); + GTK_LAYOUT(layout)->hadjustment->step_increment = 10.0; + GTK_LAYOUT(layout)->vadjustment->step_increment = 10.0; gaim_setup_imhtml(layout); gtk_box_pack_start(GTK_BOX(box), bbox, FALSE, FALSE, 0);
--- a/src/gaim.h Thu Dec 20 21:01:59 2001 +0000 +++ b/src/gaim.h Fri Dec 21 10:23:04 2001 +0000 @@ -307,7 +307,9 @@ #define OPT_AWAY_AUTO 0x00000008 #define OPT_AWAY_NO_AUTO_RESP 0x00000010 #define OPT_AWAY_QUEUE 0x00000020 +#define OPT_AWAY_IDLE_RESP 0x00000040 +extern guint away_resend; extern int report_idle; extern int web_browser; extern GSList *aim_users;
--- a/src/gaimrc.c Thu Dec 20 21:01:59 2001 +0000 +++ b/src/gaimrc.c Fri Dec 21 10:23:04 2001 +0000 @@ -49,6 +49,7 @@ guint font_options; guint sound_options; guint away_options; +guint away_resend; int report_idle, web_browser; struct save_pos blist_pos; @@ -731,6 +732,7 @@ sound_options = atoi(p->value[0]); } else if (!strcmp(p->option, "away_options")) { away_options = atoi(p->value[0]); + away_resend = atoi(p->value[1]); } else if (!strcmp(p->option, "font_xfld")) { g_snprintf(fontxfld, sizeof(fontxfld), "%s", p->value[0]); } else if (!strcmp(p->option, "font_face")) { @@ -807,6 +809,9 @@ for (i = 0; disp_replace[i].val; i++) if (display_options & disp_replace[i].old) *disp_replace[i].val |= disp_replace[i].new; + + if (!away_resend) + away_resend = 120; } static void gaimrc_write_options(FILE *f)
--- a/src/prefs.c Thu Dec 20 21:01:59 2001 +0000 +++ b/src/prefs.c Fri Dec 21 10:23:04 2001 +0000 @@ -829,7 +829,7 @@ *value = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin)); } -static void gaim_labeled_spin_button(GtkWidget *box, const gchar *title, int *val) +static void gaim_labeled_spin_button(GtkWidget *box, const gchar *title, int *val, int min, int max) { GtkWidget *hbox; GtkWidget *label; @@ -844,7 +844,7 @@ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); gtk_widget_show(label); - adjust = gtk_adjustment_new(*val, 1, 9999, 1, 1, 1); + adjust = gtk_adjustment_new(*val, min, max, 1, 1, 1); spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0); gtk_object_set_user_data(GTK_OBJECT(spin), val); gtk_widget_set_usize(spin, 50, -1); @@ -949,9 +949,9 @@ gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_widget_show(vbox); - gaim_labeled_spin_button(vbox, _("New window width:"), &conv_size.width); - gaim_labeled_spin_button(vbox, _("New window height:"), &conv_size.height); - gaim_labeled_spin_button(vbox, _("Entry widget height:"), &conv_size.entry_height); + gaim_labeled_spin_button(vbox, _("New window width:"), &conv_size.width, 25, 9999); + gaim_labeled_spin_button(vbox, _("New window height:"), &conv_size.height, 25, 9999); + gaim_labeled_spin_button(vbox, _("Entry widget height:"), &conv_size.entry_height, 25, 9999); frame = gtk_frame_new(_("Tab Placement")); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); @@ -1093,9 +1093,9 @@ gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_widget_show(vbox); - gaim_labeled_spin_button(vbox, _("New window width:"), &buddy_chat_size.width); - gaim_labeled_spin_button(vbox, _("New window height:"), &buddy_chat_size.height); - gaim_labeled_spin_button(vbox, _("Entry widget height:"), &buddy_chat_size.entry_height); + gaim_labeled_spin_button(vbox, _("New window width:"), &buddy_chat_size.width, 25, 9999); + gaim_labeled_spin_button(vbox, _("New window height:"), &buddy_chat_size.height, 25, 9999); + gaim_labeled_spin_button(vbox, _("Entry widget height:"), &buddy_chat_size.entry_height, 25, 9999); frame = gtk_frame_new(_("Tab Placement")); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); @@ -1823,11 +1823,12 @@ GtkWidget *vbox; GtkWidget *hbox; GtkWidget *vbox2; + GtkWidget *button; + GtkWidget *button2; GtkWidget *top; GtkWidget *bot; GtkWidget *sw; GtkWidget *sw2; - GtkWidget *button; GtkWidget *list_item; GtkWidget *sep; GtkObject *adjust; @@ -1875,7 +1876,12 @@ gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 5); gtk_widget_show(vbox2); - gaim_button(_("Don't send auto-response"), &away_options, OPT_AWAY_NO_AUTO_RESP, vbox2); + button = gaim_button(_("Don't send auto-response"), &away_options, OPT_AWAY_NO_AUTO_RESP, vbox2); + button2 = gaim_button(_("Only send auto-response when idle"), &away_options, OPT_AWAY_IDLE_RESP, + vbox2); + if (away_options & OPT_AWAY_NO_AUTO_RESP) + gtk_widget_set_sensitive(button2, FALSE); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), button2); gaim_button(_("Queue new messages when away"), &away_options, OPT_AWAY_QUEUE, vbox2); sep = gtk_hseparator_new(); @@ -1886,6 +1892,21 @@ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); + gaim_labeled_spin_button(hbox, _("Time between sending auto-responses (in seconds):"), + &away_resend, 1, 24 * 60 * 60); + + if (away_options & OPT_AWAY_NO_AUTO_RESP) + gtk_widget_set_sensitive(hbox, FALSE); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), hbox); + + sep = gtk_hseparator_new(); + gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, FALSE, 0); + gtk_widget_show(sep); + + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); + gtk_widget_show(hbox); + button = gaim_button(_("Auto Away after"), &away_options, OPT_AWAY_AUTO, hbox); adjust = gtk_adjustment_new(auto_away, 1, 1440, 1, 10, 10); @@ -1957,6 +1978,8 @@ away_text = gtk_imhtml_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(sw2), away_text); + GTK_LAYOUT(away_text)->hadjustment->step_increment = 10.0; + GTK_LAYOUT(away_text)->vadjustment->step_increment = 10.0; gaim_setup_imhtml(away_text); gtk_widget_show(away_text);
--- a/src/protocols/oscar/oscar.c Thu Dec 20 21:01:59 2001 +0000 +++ b/src/protocols/oscar/oscar.c Fri Dec 21 10:23:04 2001 +0000 @@ -1904,6 +1904,8 @@ aim_conn_setlatency(fr->conn, 0); } else if (code == AIM_RATE_CODE_WARNING) { aim_conn_setlatency(fr->conn, windowsize/4); + do_error_dialog(_("The last message was not sent because you are over the rate limit. " + "Please wait 10 seconds and try again."), _("Gaim - Error")); } else if (code == AIM_RATE_CODE_LIMIT) { aim_conn_setlatency(fr->conn, windowsize/2); } else if (code == AIM_RATE_CODE_CLEARLIMIT) {
--- a/src/proxy.c Thu Dec 20 21:01:59 2001 +0000 +++ b/src/proxy.c Fri Dec 21 10:23:04 2001 +0000 @@ -33,6 +33,7 @@ #include <sys/socket.h> #include <netdb.h> #include <netinet/in.h> +#include <arpa/inet.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> @@ -118,6 +119,24 @@ g_source_remove(tag); } +static struct sockaddr_in *gaim_gethostbyname(char *host) +{ + static struct sockaddr_in sin; + + if (!inet_aton(host, &sin.sin_addr)) { + struct hostent *hp; + if (!(hp = gethostbyname(host))) { + return NULL; + } + memset(&sin, 0, sizeof(struct sockaddr_in)); + memcpy(&sin.sin_addr.s_addr, hp->h_addr, hp->h_length); + sin.sin_family = hp->h_addrtype; + } else + sin.sin_family = AF_INET; + + return &sin; +} + static void no_one_calls(gpointer data, gint source, GaimInputCondition cond) { struct PHB *phb = data; @@ -151,31 +170,25 @@ static int proxy_connect_none(char *host, unsigned short port, struct PHB *phb) { - struct sockaddr_in sin; - struct hostent *hp; + struct sockaddr_in *sin; int fd = -1; debug_printf("connecting to %s:%d with no proxy\n", host, port); - if (!(hp = gethostbyname(host))) { + if (!(sin = gaim_gethostbyname(host))) { debug_printf("gethostbyname failed\n"); g_free(phb); return -1; } - memset(&sin, 0, sizeof(struct sockaddr_in)); - memcpy(&sin.sin_addr.s_addr, hp->h_addr, hp->h_length); - sin.sin_family = hp->h_addrtype; - sin.sin_port = htons(port); - - if ((fd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) { + if ((fd = socket(sin->sin_family, SOCK_STREAM, 0)) < 0) { debug_printf("unable to create socket\n"); g_free(phb); return -1; } fcntl(fd, F_SETFL, O_NONBLOCK); - if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { + if (connect(fd, (struct sockaddr *)sin, sizeof(*sin)) < 0) { if ((errno == EINPROGRESS) || (errno == EINTR)) { debug_printf("Connect would have blocked\n"); phb->inpa = gaim_input_add(fd, GAIM_INPUT_WRITE, no_one_calls, phb); @@ -302,23 +315,17 @@ static int proxy_connect_http(char *host, unsigned short port, struct PHB *phb) { - struct hostent *hp; - struct sockaddr_in sin; + struct sockaddr_in *sin; int fd = -1; debug_printf("connecting to %s:%d via %s:%d using HTTP\n", host, port, proxyhost, proxyport); - if (!(hp = gethostbyname(proxyhost))) { + if (!(sin = gaim_gethostbyname(proxyhost))) { g_free(phb); return -1; } - memset(&sin, 0, sizeof(struct sockaddr_in)); - memcpy(&sin.sin_addr.s_addr, hp->h_addr, hp->h_length); - sin.sin_family = hp->h_addrtype; - sin.sin_port = htons(proxyport); - - if ((fd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) { + if ((fd = socket(sin->sin_family, SOCK_STREAM, 0)) < 0) { g_free(phb); return -1; } @@ -327,7 +334,7 @@ phb->port = port; fcntl(fd, F_SETFL, O_NONBLOCK); - if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { + if (connect(fd, (struct sockaddr *)sin, sizeof(*sin)) < 0) { if ((errno == EINPROGRESS) || (errno == EINTR)) { debug_printf("Connect would have blocked\n"); phb->inpa = gaim_input_add(fd, GAIM_INPUT_WRITE, http_canwrite, phb); @@ -427,23 +434,17 @@ static int proxy_connect_socks4(char *host, unsigned short port, struct PHB *phb) { - struct sockaddr_in sin; - struct hostent *hp; + struct sockaddr_in *sin; int fd = -1; debug_printf("connecting to %s:%d via %s:%d using SOCKS4\n", host, port, proxyhost, proxyport); - if (!(hp = gethostbyname(proxyhost))) { + if (!(sin = gaim_gethostbyname(proxyhost))) { g_free(phb); return -1; } - memset(&sin, 0, sizeof(struct sockaddr_in)); - memcpy(&sin.sin_addr.s_addr, hp->h_addr, hp->h_length); - sin.sin_family = hp->h_addrtype; - sin.sin_port = htons(proxyport); - - if ((fd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) { + if ((fd = socket(sin->sin_family, SOCK_STREAM, 0)) < 0) { g_free(phb); return -1; } @@ -452,7 +453,7 @@ phb->port = port; fcntl(fd, F_SETFL, O_NONBLOCK); - if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { + if (connect(fd, (struct sockaddr *)sin, sizeof(*sin)) < 0) { if ((errno == EINPROGRESS) || (errno == EINTR)) { debug_printf("Connect would have blocked\n"); phb->inpa = gaim_input_add(fd, GAIM_INPUT_WRITE, s4_canwrite, phb); @@ -656,23 +657,17 @@ static int proxy_connect_socks5(char *host, unsigned short port, struct PHB *phb) { + struct sockaddr_in *sin; int fd = -1; - struct sockaddr_in sin; - struct hostent *hp; debug_printf("connecting to %s:%d via %s:%d using SOCKS5\n", host, port, proxyhost, proxyport); - if (!(hp = gethostbyname(proxyhost))) { + if (!(sin = gaim_gethostbyname(proxyhost))) { g_free(phb); return -1; } - memset(&sin, 0, sizeof(struct sockaddr_in)); - memcpy(&sin.sin_addr.s_addr, hp->h_addr, hp->h_length); - sin.sin_family = hp->h_addrtype; - sin.sin_port = htons(proxyport); - - if ((fd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) { + if ((fd = socket(sin->sin_family, SOCK_STREAM, 0)) < 0) { g_free(phb); return -1; } @@ -681,7 +676,7 @@ phb->port = port; fcntl(fd, F_SETFL, O_NONBLOCK); - if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { + if (connect(fd, (struct sockaddr *)sin, sizeof(*sin)) < 0) { if ((errno == EINPROGRESS) || (errno == EINTR)) { debug_printf("Connect would have blocked\n"); phb->inpa = gaim_input_add(fd, GAIM_INPUT_WRITE, s5_canwrite, phb);
--- a/src/server.c Thu Dec 20 21:01:59 2001 +0000 +++ b/src/server.c Fri Dec 21 10:23:04 2001 +0000 @@ -584,7 +584,8 @@ /* regardless of whether we queue it or not, we should send an auto-response. That is, * of course, unless the horse.... no wait. */ - if ((away_options & OPT_AWAY_NO_AUTO_RESP) || !strlen(gc->away)) { + if ((away_options & OPT_AWAY_NO_AUTO_RESP) || !strlen(gc->away) || + ((away_options & OPT_AWAY_IDLE_RESP) && !gc->is_idle)) { g_free(name); g_free(message); return; @@ -602,7 +603,7 @@ qar->sent_away = 0; away_time_queue = g_slist_append(away_time_queue, qar); } - if ((t - qar->sent_away) < 120) { + if ((t - qar->sent_away) < away_resend) { g_free(name); g_free(message); return; @@ -978,6 +979,8 @@ text = gtk_imhtml_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(sw), text); + GTK_LAYOUT(text)->hadjustment->step_increment = 10.0; + GTK_LAYOUT(text)->vadjustment->step_increment = 10.0; gaim_setup_imhtml(text); hbox = gtk_hbox_new(FALSE, 5);
--- a/src/ui.h Thu Dec 20 21:01:59 2001 +0000 +++ b/src/ui.h Fri Dec 21 10:23:04 2001 +0000 @@ -443,6 +443,10 @@ /* Functions in prpl.c */ extern void register_dialog(); +/* Functions in server.c */ +/* server.c is in desperate need need of a split */ +extern int find_queue_total_by_name(char *); + /* Functions in sound.c */ extern void play_sound(int); extern void play_file(char *);