[gaim-migrate @ 9209]

Sat, 20 Mar 2004 15:44:35 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Sat, 20 Mar 2004 15:44:35 +0000
changeset 8476
45ab15a421d8
parent 8475
3b5687726055
child 8477
cc7c41f2f5e0

[gaim-migrate @ 9209]
This adds a "Back" menu item to AIM. I think it disappared when I did
the invisibility thing.

This is ugly, but it should all change when Chip finishes his status
rewrite. So he'll just want to remove the current away.h completely...

src/away.h file | annotate | diff | comparison | revisions
src/protocols/oscar/oscar.c file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/away.h	Sat Mar 20 15:44:35 2004 +0000
@@ -0,0 +1,12 @@
+#ifndef _GAIM_AWAY_H_
+#define _GAIM_AWAY_H_
+
+#define GtkWidget int
+
+int this_file;
+
+#define A_BIG_HACK this_file;
+
+extern void do_im_back(GtkWidget *, GtkWidget *);
+
+#endif /* _GAIM_AWAY_H_ */
--- a/src/protocols/oscar/oscar.c	Fri Mar 19 20:17:31 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Mar 20 15:44:35 2004 +0000
@@ -28,6 +28,7 @@
 
 #include "account.h"
 #include "accountopt.h"
+#include "away.h"
 #include "buddyicon.h"
 #include "conversation.h"
 #include "core.h"
@@ -4670,6 +4671,13 @@
 		return;
 	} /* else... */
 
+	if (!strcmp(state, _("Back"))) {
+		/* If this is our only online account then globally set Gaim not-away */
+		GList *gcs = gaim_connections_get_all();
+		if (gcs->next == NULL)
+			do_im_back(NULL, NULL);
+	}
+
 	aim_setextstatus(od->sess, AIM_ICQ_STATE_NORMAL);
 
 	if (od->rights.maxawaymsglen == 0)
@@ -6417,6 +6425,7 @@
 		m = g_list_append(m, _("Invisible"));
 	} else {
 		m = g_list_append(m, GAIM_AWAY_CUSTOM);
+		m = g_list_append(m, _("Back"));
 		m = g_list_append(m, _("Visible"));
 		m = g_list_append(m, _("Invisible"));
 	}

mercurial