Update of /cvsroot/gaim/gaim/src
In directory usw-pr-cvs1:/tmp/cvs-serv28857/src
Modified Files:
gaim.h prefs.c server.c
Log Message:
Thanks Joshua Blanton. The ChangeLog is getting REALLY huge.
Remember when Gaim used to have "releases"?
Index: gaim.h
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gaim.h,v
retrieving revision 1.348
retrieving revision 1.349
diff -u -d -r1.348 -r1.349
--- gaim.h 26 Oct 2002 19:16:25 -0000 1.348
+++ gaim.h 29 Oct 2002 05:57:55 -0000 1.349
@@ -340,6 +340,7 @@
#define OPT_AWAY_QUEUE 0x00000020
#define OPT_AWAY_IDLE_RESP 0x00000040
#define OPT_AWAY_QUEUE_UNREAD 0x00000080
+#define OPT_AWAY_DELAY_IN_USE 0x00000100
extern guint away_resend;
extern int report_idle;
Index: prefs.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/prefs.c,v
retrieving revision 1.263
retrieving revision 1.264
diff -u -d -r1.263 -r1.264
--- prefs.c 29 Oct 2002 05:52:51 -0000 1.263
+++ prefs.c 29 Oct 2002 05:57:55 -0000 1.264
@@ -819,6 +819,7 @@
&away_resend_new, 1, 24 * 60 * 60, sg);
gaim_button(_("_Don't send auto-response"), &away_options_new, OPT_AWAY_NO_AUTO_RESP, vbox);
gaim_button(_("_Only send auto-response when idle"), &away_options_new, OPT_AWAY_IDLE_RESP, vbox);
+ gaim_button(_("Do_n't send auto-response in active conversations"), &away_options_new, OPT_AWAY_DELAY_IN_USE, vbox);
if (away_options_new & OPT_AWAY_NO_AUTO_RESP)
gtk_widget_set_sensitive(hbox, FALSE);
Index: server.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/server.c,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- server.c 23 Oct 2002 02:49:26 -0000 1.251
+++ server.c 29 Oct 2002 05:57:55 -0000 1.252
@@ -182,6 +182,13 @@
else return 0;
}
+struct queued_away_response {
+ char name[80];
+ time_t sent_away;
+};
+
+struct queued_away_response *find_queued_away_response_by_name(char *name);
+
int serv_send_im(struct gaim_connection *gc, char *name, char *message, int len, int flags)
{
int val = -EINVAL;
@@ -192,6 +199,21 @@
if (!(flags & IM_FLAG_AWAY))
serv_touch_idle(gc);
+ if (gc->away && away_options & OPT_AWAY_DELAY_IN_USE &&
+ !(away_options & OPT_AWAY_NO_AUTO_RESP)) {
+ time_t t;
+ struct queued_away_response *qar;
+ time(&t);
+ qar = find_queued_away_response_by_name(name);
+ if (!qar) {
+ qar = (struct queued_away_response *)g_new0(struct queued_away_response, 1);
+ g_snprintf(qar->name, sizeof(qar->name), "%s", name);
+ qar->sent_away = 0;
+ away_time_queue = g_slist_append(away_time_queue, qar);
+ }
+ qar->sent_away = t;
+ }
+
if (cnv && cnv->type_again_timeout)
gtk_timeout_remove(cnv->type_again_timeout);
@@ -499,11 +521,6 @@
return i;
}
-
-struct queued_away_response {
- char name[80];
- time_t sent_away;
-};
struct queued_away_response *find_queued_away_response_by_name(char *name)
{
|